Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xrq-phys/pfaffine
☕️ Pfaffian caffeine for Geminal wavefunction brews.
https://github.com/xrq-phys/pfaffine
blis lapack skew-symmetric
Last synced: 2 months ago
JSON representation
☕️ Pfaffian caffeine for Geminal wavefunction brews.
- Host: GitHub
- URL: https://github.com/xrq-phys/pfaffine
- Owner: xrq-phys
- License: mpl-2.0
- Created: 2020-04-09T18:43:30.000Z (almost 5 years ago)
- Default Branch: blis
- Last Pushed: 2021-09-12T08:11:48.000Z (over 3 years ago)
- Last Synced: 2023-05-22T14:49:36.220Z (over 1 year ago)
- Topics: blis, lapack, skew-symmetric
- Language: C++
- Homepage:
- Size: 550 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
☕️Pfaffine
==========*Pfaffine aims to be the caffeine that wakes your program up when you work with Geminal wavefunctions.*
Pfaffine is an numerical package for fast calculation of Pfaffian.
This branch has its background relinked against an extended version of [BLIS](https://github.com/flame/blis).### Requirements
#### C++ Compiler
- Compiler supports C++ 11;
- Compiler recognizes `#pragma once`;#### Library and Others
- My [BLIS library fork](https://github.com/xrq-phys/blis) with `skr2k` & `skmm`. This API-dependence is explicit;### Build and Linking
Simple `makefile` is provided. One can copy the example `make.darwin` to `make.inc` and modify accordingly. `make install` builds and installs an instantiated library together with several templated headers into `{Repository root}/dest`.
Including directly the `.tcc` files is another way and it's more extensive in some sense.
## Usage
One can select between templated C++ and conventinoal C99 interfaces, which are stored `pfaffine.hh` and `pfaffine.h` correspondingly.
Interfaces are further categorized into 2 types: **full** interface that requires large memory allocation done outside function calls and **simplified** ones that allocates memory automatically for the user.
Full interface looks like this in C++/C99, correspondingly. Note that it can also be called from Fortran:
```cpp
template
T skpfa(char uplo, unsigned n,
T *A, unsigned ldA, unsigned inv,
T *Sp1, T *Sp2, T *Sp3, T *Sp4, T *Sp5, unsigned npanel);
``````c
void cal_?skpfa_(fpType *Pfa, char *uplo, unsigned *n, fpType *A, unsigned *ldA, unsigned *inv,
fpType *Sp1, fpType *Sp2, fpType *Sp3, fpType *Sp4, fpType *Sp5, unsigned *npanel);
```Here in C99 interface the `fpType` denotes floating point type corresponding to character `?` in function names, i.e. `double` for `dskpfa`, `double complex` for `zskpfa`, etc.
Following full interface is the **simplified** one, defined as:
```cpp
template
T skpfa(char uplo, unsigned n, T *A, unsigned ldA, unsigned inv);
``````c
void ?skpfa(fpType *Pfa, char uplo, unsigned n, fpType *A, unsigned ldA, unsigned inv);
```In all cases above, `A` will be replaced by its full inverse if `inv=1`, otherwise the upper-half of tri-diagonal form will be kept. Detailed explanation for parameters referred here is available in docstring in `src/skpfa.tcc`.
## Licensing
Source code forms under this branch are provided under the [Mozilla Public License](https://www.mozilla.org/en-US/MPL). As long as one keep modifications of these specific files open, they are is allowed to use it for whatever they like *at her or his own risk*.