-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5d52bf
commit 41264ce
Showing
21 changed files
with
2,967 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
nix: | ||
name: Nix | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v30 | ||
- run: | | ||
nix flake check -L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
dist | ||
dist-* | ||
cabal-dev | ||
*.o | ||
*.hi | ||
*.chi | ||
*.chs.h | ||
*.dyn_o | ||
*.dyn_hi | ||
.hpc | ||
.hsenv | ||
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
*.prof | ||
*.aux | ||
*.hp | ||
*.eventlog | ||
.stack-work/ | ||
cabal.project.local | ||
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
.direnv/ | ||
result* | ||
configure | ||
config.log | ||
config.status | ||
configure~ | ||
autom4te.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Revision history for trexio-hs | ||
|
||
## 0.1.0 -- YYYY-mm-dd | ||
|
||
* First version. Released on an unsuspecting world. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
Copyright (c) 2024, Maxi Maximilian | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of [project] nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
# trexio-hs | ||
# trexio-hs | ||
Haskell bindings for the TREXIO library for reading, writing and storing wave function data in quantum chemistry and solid state physics. | ||
For the original C-API see <https://github.com/TREX-CoE/trexio> | ||
|
||
## Usage | ||
To build the Haskell bindings, the C library and headers need to be installed on your system and found by Cabal. | ||
If they are in an exotic location, you may pass `--extra-lib-dirs=` and `--extra-include-dirs` to cabal. | ||
|
||
### Nix | ||
If you're using Nix, you can include these bindings as an overlay, e.g. such a `flake.nix`: | ||
|
||
```nix | ||
{ | ||
description = "My Haskell project with TREXIO"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
trexio-hs.url = "github:sheepforce/trexio-hs"; | ||
}; | ||
outputs = | ||
let system = "x86_64-linux"; | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ trexio-hs.overlays.default ]; | ||
}; | ||
in { | ||
packages."${system}".default = pkgs.haskellPackages.callCabal2Nix | ||
"my-project" ./. { }; | ||
}; | ||
} | ||
``` | ||
|
||
Of course, you can also simply build the project via `nix build github:sheepforce/trexio-hs`. | ||
|
||
### Cabal | ||
This package is on Hackage: <https://hackage.haskell.org/package/trexio-hs> | ||
With plain nix, simply include `trexio-hs` in your `build-depends` field in your `cabal-file`. | ||
|
||
|
||
## Documentation | ||
Please have a look at the Haddocks. Build them via `cabal haddock`. | ||
You may also have a look at [Hackage](https://hackage.haskell.org/package/trexio-hs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
{ | ||
|
||
"metadata": { | ||
"code_num" : [ "dim", [] ] | ||
, "code" : [ "str", [ "metadata.code_num" ] ] | ||
, "author_num" : [ "dim", [] ] | ||
, "author" : [ "str", [ "metadata.author_num" ] ] | ||
, "package_version" : [ "str", [] ] | ||
, "description" : [ "str", [] ] | ||
, "unsafe" : [ "int", [] ] | ||
} , | ||
|
||
"nucleus": { | ||
"num" : [ "dim" , [] ] | ||
, "charge" : [ "float", [ "nucleus.num" ] ] | ||
, "coord" : [ "float", [ "nucleus.num", "3" ] ] | ||
, "label" : [ "str" , [ "nucleus.num" ] ] | ||
, "point_group" : [ "str" , [] ] | ||
, "repulsion" : [ "float", [] ] | ||
} , | ||
|
||
"cell": { | ||
"a" : [ "float", [ "3" ] ] | ||
, "b" : [ "float", [ "3" ] ] | ||
, "c" : [ "float", [ "3" ] ] | ||
, "G_a" : [ "float", [ "3" ] ] | ||
, "G_b" : [ "float", [ "3" ] ] | ||
, "G_c" : [ "float", [ "3" ] ] | ||
, "two_pi" : [ "int" , [] ] | ||
} , | ||
|
||
"pbc": { | ||
"periodic" : [ "int" , [] ] | ||
, "k_point" : [ "float", [ "3" ] ] | ||
} , | ||
|
||
"electron": { | ||
"num" : [ "dim", [] ] | ||
, "up_num" : [ "int", [] ] | ||
, "dn_num" : [ "int", [] ] | ||
} , | ||
|
||
"state": { | ||
"num" : [ "dim" , [] ] | ||
, "id" : [ "index", [] ] | ||
, "energy" : [ "float", [] ] | ||
, "current_label" : [ "str" , [] ] | ||
, "label" : [ "str" , [ "state.num" ] ] | ||
, "file_name" : [ "str" , [ "state.num" ] ] | ||
} , | ||
|
||
"basis": { | ||
"type" : [ "str" , [] ] | ||
, "prim_num" : [ "dim" , [] ] | ||
, "shell_num" : [ "dim" , [] ] | ||
, "nao_grid_num" : [ "dim" , [] ] | ||
, "interp_coeff_cnt" : [ "dim" , [] ] | ||
, "nucleus_index" : [ "index", [ "basis.shell_num" ] ] | ||
, "shell_ang_mom" : [ "int" , [ "basis.shell_num" ] ] | ||
, "shell_factor" : [ "float", [ "basis.shell_num" ] ] | ||
, "r_power" : [ "int" , [ "basis.shell_num" ] ] | ||
, "nao_grid_start" : [ "index", [ "basis.shell_num" ] ] | ||
, "nao_grid_size" : [ "dim" , [ "basis.shell_num" ] ] | ||
, "shell_index" : [ "index", [ "basis.prim_num" ] ] | ||
, "exponent" : [ "float", [ "basis.prim_num" ] ] | ||
, "coefficient" : [ "float", [ "basis.prim_num" ] ] | ||
, "prim_factor" : [ "float", [ "basis.prim_num" ] ] | ||
, "e_cut" : [ "float", [] ] | ||
, "nao_grid_radius" : [ "float", [ "basis.nao_grid_num" ] ] | ||
, "nao_grid_phi" : [ "float", [ "basis.nao_grid_num" ] ] | ||
, "nao_grid_grad" : [ "float", [ "basis.nao_grid_num" ] ] | ||
, "nao_grid_lap" : [ "float", [ "basis.nao_grid_num" ] ] | ||
, "interpolator_kind" : [ "str" , [] ] | ||
, "interpolator_phi" : [ "float", [ "basis.nao_grid_num", "basis.interp_coeff_cnt" ] ] | ||
, "interpolator_grad" : [ "float", [ "basis.nao_grid_num", "basis.interp_coeff_cnt" ] ] | ||
, "interpolator_lap" : [ "float", [ "basis.nao_grid_num", "basis.interp_coeff_cnt" ] ] | ||
} , | ||
|
||
"ecp": { | ||
"max_ang_mom_plus_1" : [ "int" , [ "nucleus.num" ] ] | ||
, "z_core" : [ "int" , [ "nucleus.num" ] ] | ||
, "num" : [ "dim" , [] ] | ||
, "ang_mom" : [ "int" , [ "ecp.num" ] ] | ||
, "nucleus_index" : [ "index", [ "ecp.num" ] ] | ||
, "exponent" : [ "float", [ "ecp.num" ] ] | ||
, "coefficient" : [ "float", [ "ecp.num" ] ] | ||
, "power" : [ "int" , [ "ecp.num" ] ] | ||
} , | ||
|
||
"grid": { | ||
"description" : [ "str" , [] ] | ||
, "rad_precision" : [ "float", [] ] | ||
, "num" : [ "dim" , [] ] | ||
, "max_ang_num" : [ "int" , [] ] | ||
, "min_ang_num" : [ "int" , [] ] | ||
, "coord" : [ "float", [ "grid.num" ] ] | ||
, "weight" : [ "float", [ "grid.num" ] ] | ||
, "ang_num" : [ "dim" , [] ] | ||
, "ang_coord" : [ "float", [ "grid.ang_num" ] ] | ||
, "ang_weight" : [ "float", [ "grid.ang_num" ] ] | ||
, "rad_num" : [ "dim" , [] ] | ||
, "rad_coord" : [ "float", [ "grid.rad_num" ] ] | ||
, "rad_weight" : [ "float", [ "grid.rad_num" ] ] | ||
} , | ||
|
||
"ao": { | ||
"cartesian" : [ "int" , [] ] | ||
, "num" : [ "dim" , [] ] | ||
, "shell" : [ "index", [ "ao.num" ] ] | ||
, "normalization" : [ "float", [ "ao.num" ] ] | ||
} , | ||
|
||
"ao_1e_int": { | ||
"overlap" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "kinetic" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "potential_n_e" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "ecp" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "core_hamiltonian" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "overlap_im" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "kinetic_im" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "potential_n_e_im" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "ecp_im" : [ "float", [ "ao.num", "ao.num" ] ] | ||
, "core_hamiltonian_im" : [ "float", [ "ao.num", "ao.num" ] ] | ||
} , | ||
|
||
"ao_2e_int": { | ||
"eri" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ] | ||
, "eri_lr" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ] | ||
, "eri_cholesky_num" : [ "dim" , [] ] | ||
, "eri_cholesky" : [ "float sparse", [ "ao_2e_int.eri_cholesky_num", "ao.num", "ao.num" ] ] | ||
, "eri_lr_cholesky_num" : [ "dim" , [] ] | ||
, "eri_lr_cholesky" : [ "float sparse", [ "ao_2e_int.eri_lr_cholesky_num", "ao.num", "ao.num" ] ] | ||
} , | ||
|
||
"mo": { | ||
"type" : [ "str" , [] ] | ||
, "num" : [ "dim" , [] ] | ||
, "coefficient" : [ "float", [ "mo.num", "ao.num" ] ] | ||
, "coefficient_im" : [ "float", [ "mo.num", "ao.num" ] ] | ||
, "class" : [ "str" , [ "mo.num" ] ] | ||
, "symmetry" : [ "str" , [ "mo.num" ] ] | ||
, "occupation" : [ "float", [ "mo.num" ] ] | ||
, "energy" : [ "float", [ "mo.num" ] ] | ||
, "spin" : [ "int" , [ "mo.num" ] ] | ||
} , | ||
|
||
"mo_1e_int": { | ||
"overlap" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "kinetic" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "potential_n_e" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "ecp" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "core_hamiltonian" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "overlap_im" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "kinetic_im" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "potential_n_e_im" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "ecp_im" : [ "float", [ "mo.num", "mo.num" ] ] | ||
, "core_hamiltonian_im" : [ "float", [ "mo.num", "mo.num" ] ] | ||
} , | ||
|
||
"mo_2e_int": { | ||
"eri" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "eri_lr" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "eri_cholesky_num" : [ "dim" , [] ] | ||
, "eri_cholesky" : [ "float sparse", [ "mo_2e_int.eri_cholesky_num", "mo.num", "mo.num" ] ] | ||
, "eri_lr_cholesky_num" : [ "dim" , [] ] | ||
, "eri_lr_cholesky" : [ "float sparse", [ "mo_2e_int.eri_lr_cholesky_num", "mo.num", "mo.num" ] ] | ||
} , | ||
|
||
"determinant": { | ||
"num" : [ "dim readonly" , [] ] | ||
, "list" : [ "int special" , [ "determinant.num" ] ] | ||
, "coefficient" : [ "float buffered", [ "determinant.num" ] ] | ||
} , | ||
|
||
"csf": { | ||
"num" : [ "dim readonly" , [] ] | ||
, "coefficient" : [ "float buffered", [ "csf.num" ] ] | ||
, "det_coefficient" : [ "float sparse" , [ "csf.num", "determinant.num" ] ] | ||
} , | ||
|
||
"amplitude": { | ||
"single" : [ "float sparse", [ "mo.num", "mo.num" ] ] | ||
, "single_exp" : [ "float sparse", [ "mo.num", "mo.num" ] ] | ||
, "double" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "double_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "triple" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "triple_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "quadruple" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "quadruple_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
} , | ||
|
||
"rdm": { | ||
"1e" : [ "float" , [ "mo.num", "mo.num" ] ] | ||
, "1e_up" : [ "float" , [ "mo.num", "mo.num" ] ] | ||
, "1e_dn" : [ "float" , [ "mo.num", "mo.num" ] ] | ||
, "2e" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "2e_upup" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "2e_dndn" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "2e_updn" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] | ||
, "2e_cholesky_num" : [ "dim" , [] ] | ||
, "2e_cholesky" : [ "float sparse", [ "rdm.2e_cholesky_num", "mo.num", "mo.num" ] ] | ||
, "2e_upup_cholesky_num" : [ "dim" , [] ] | ||
, "2e_upup_cholesky" : [ "float sparse", [ "rdm.2e_upup_cholesky_num", "mo.num", "mo.num" ] ] | ||
, "2e_dndn_cholesky_num" : [ "dim" , [] ] | ||
, "2e_dndn_cholesky" : [ "float sparse", [ "rdm.2e_dndn_cholesky_num", "mo.num", "mo.num" ] ] | ||
, "2e_updn_cholesky_num" : [ "dim" , [] ] | ||
, "2e_updn_cholesky" : [ "float sparse", [ "rdm.2e_updn_cholesky_num", "mo.num", "mo.num" ] ] | ||
} , | ||
|
||
"jastrow": { | ||
"type" : [ "str" , [] ] | ||
, "en_num" : [ "dim" , [] ] | ||
, "ee_num" : [ "dim" , [] ] | ||
, "een_num" : [ "dim" , [] ] | ||
, "en" : [ "float" , [ "jastrow.en_num" ] ] | ||
, "ee" : [ "float" , [ "jastrow.ee_num" ] ] | ||
, "een" : [ "float" , [ "jastrow.een_num" ] ] | ||
, "en_nucleus" : [ "index" , [ "jastrow.en_num" ] ] | ||
, "een_nucleus" : [ "index" , [ "jastrow.een_num" ] ] | ||
, "ee_scaling" : [ "float" , [] ] | ||
, "en_scaling" : [ "float" , [ "nucleus.num" ] ] | ||
} , | ||
|
||
"qmc": { | ||
"num" : [ "dim" , [] ] | ||
, "point" : [ "float", [ "qmc.num", "electron.num", "3" ] ] | ||
, "psi" : [ "float", [ "qmc.num" ] ] | ||
, "e_loc" : [ "float", [ "qmc.num" ] ] | ||
} | ||
|
||
} |
Oops, something went wrong.