From 8b463dbc543f8501804e26f5c041b7b656e01d74 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 18 Oct 2021 16:23:07 +0200 Subject: [PATCH 1/8] FIX: more flexible ECP format --- trex.org | 56 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/trex.org b/trex.org index e36bf19..2b21f04 100644 --- a/trex.org +++ b/trex.org @@ -122,7 +122,7 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an \[ V_A^{\text{ECP}} = V_{A \ell_{\max}} + - \sum_{\ell=0}^{\ell_{\max} -1} + \sum_{\ell=0}^{\ell_{\max}-1} \sum_{m=-\ell}^{\ell} | Y_{\ell m} \rangle \left[ V_{A \ell} - V_{A \ell_{\max}} \right] \langle Y_{\ell m} | \] @@ -138,20 +138,24 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an See http://dx.doi.org/10.1063/1.4984046 for more info. #+NAME: ecp - | Variable | Type | Dimensions | Description | - |-----------------------+---------+------------------------------------------+----------------------------------------------------------------------------------------------| - | ~lmax_plus_1~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max} + 1$, one higher than the maximum angular momentum in the removed core orbitals | - | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | - | ~local_n~ | ~int~ | ~(nucleus.num)~ | Number of local functions $N_{q \ell}$ | - | ~local_num_n_max~ | ~dim~ | | Maximum value of ~local_n~, used for dimensioning arrays | - | ~local_exponent~ | ~float~ | ~(ecp.local_num_n_max, nucleus.num)~ | $\alpha_{A q \ell_{\max}}$ | - | ~local_coef~ | ~float~ | ~(ecp.local_num_n_max, nucleus.num)~ | $\beta_{A q \ell_{\max}}$ | - | ~local_power~ | ~int~ | ~(ecp.local_num_n_max, nucleus.num)~ | $n_{A q \ell_{\max}}$ | - | ~non_local_n~ | ~int~ | ~(nucleus.num)~ | $N_{q \ell_{\max}}$ | - | ~non_local_num_n_max~ | ~dim~ | | Maximum value of ~non_local_n~, used for dimensioning arrays | - | ~non_local_exponent~ | ~float~ | ~(ecp.non_local_num_n_max, nucleus.num)~ | $\alpha_{A q \ell}$ | - | ~non_local_coef~ | ~float~ | ~(ecp.non_local_num_n_max, nucleus.num)~ | $\beta_{A q \ell}$ | - | ~non_local_power~ | ~int~ | ~(ecp.non_local_num_n_max, nucleus.num)~ | $n_{A q \ell}$ | + | Variable | Type | Dimensions | Description | + |---------------+---------+-----------------+-----------------------------------------------------------------------------| + | ~max_ang_mom~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}$ the maximum angular momentum in the removed core orbitals | + | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | + | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | + | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | + | ~nucleus~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | + | ~exponent~ | ~float~ | ~(ecp.num)~ | $\alpha_{A q \ell}$ all ECP exponents | + | ~coefficient~ | ~float~ | ~(ecp.num)~ | $\beta_{A q \ell}$ all ECP coefficients | + | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | + + +*Note for developers*: avoid having variables with similar prefix in their name. +HDF5 back end might cause issues due to the way `find_dataset` function works +in the H5LT module. For example, in the ECP group we use ~max_ang_mom~ and +~ang_mom_max~ due to this. +The latter causes issues when written before ~ang_mom~ in the TREXIO file. + #+CALL: json(data=ecp, title="ecp") @@ -159,22 +163,20 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an :RESULTS: #+begin_src python :tangle trex.json "ecp": { - "lmax_plus_1" : [ "int" , [ "nucleus.num" ] ] - , "z_core" : [ "float", [ "nucleus.num" ] ] - , "local_n" : [ "int" , [ "nucleus.num" ] ] - , "local_num_n_max" : [ "dim" , [] ] - , "local_exponent" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ] - , "local_coef" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ] - , "local_power" : [ "int" , [ "nucleus.num", "ecp.local_num_n_max" ] ] - , "non_local_n" : [ "int" , [ "nucleus.num" ] ] - , "non_local_num_n_max" : [ "dim" , [] ] - , "non_local_exponent" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ] - , "non_local_coef" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ] - , "non_local_power" : [ "int" , [ "nucleus.num", "ecp.non_local_num_n_max" ] ] + "max_ang_mom" : [ "int" , [ "nucleus.num" ] ] + , "z_core" : [ "float", [ "nucleus.num" ] ] + , "num" : [ "dim" , [] ] + , "ang_mom" : [ "int" , [ "ecp.num" ] ] + , "nucleus" : [ "index", [ "ecp.num" ] ] + , "exponent" : [ "float", [ "ecp.num" ] ] + , "coefficient" : [ "float", [ "ecp.num" ] ] + , "power" : [ "int" , [ "ecp.num" ] ] } , #+end_src :END: + + * Basis set (basis group) We consider here basis functions centered on nuclei. Hence, we enable From 6ab65d243298f0dc688f2b58780a47193040123d Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 18 Oct 2021 16:53:17 +0200 Subject: [PATCH 2/8] add an example for GAMESS format --- trex.org | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/trex.org b/trex.org index 2b21f04..e208b2b 100644 --- a/trex.org +++ b/trex.org @@ -175,7 +175,60 @@ The latter causes issues when written before ~ang_mom~ in the TREXIO file. #+end_src :END: +** Example + For example, consider H_2 molecule with the following + [[https://pseudopotentiallibrary.org/recipes/H/ccECP/H.ccECP.gamess][effective core potential]] + (in GAMESS input format for the H atom): + + #+BEGIN_EXAMPLE +H-ccECP GEN 0 1 +3 +1.00000000000000 1 21.24359508259891 +21.24359508259891 3 21.24359508259891 +-10.85192405303825 2 21.77696655044365 +1 +0.00000000000000 2 1.000000000000000 + #+END_EXAMPLE + + In TREXIO representation this would be: + + #+BEGIN_EXAMPLE +ecp_num = 8 + +# max angular momentum per atom +ecp_max_ang_mom = [ 1, 1 ] +# number of core electrons to remove per atom +ecp_zcore = [ 0, 0 ] + +# first 4 ECP elements correspond to the first H atom, same for the second H atom +ecp_nucleus = [ + 0, 0, 0, 0, + 1, 1, 1, 1 + ] + +# 3 first ECP elements correspond to l=1 of the first H atom, then 1 ECP for l=0; same for the second H atom +ecp_ang_mom = [ + 1, 1, 1, 0, + 1, 1, 1, 0 + ] + +# flat arrays with ECP quantities that can be parsed based on the aforementioned ecp_ang_mom and ecp_nucleus +ecp_coefficient = [ + 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000, + 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000 + ] + +ecp_exponent = [ + 21.24359508259891, 21.24359508259891, 21.77696655044365, 1.000000000000000, + 21.24359508259891, 21.24359508259891, 21.77696655044365, 1.000000000000000 + ] + +ecp_power = [ + -1, 1, 0, 0, + -1, 1, 0, 0 + ] + #+END_EXAMPLE * Basis set (basis group) From 31485e6f90e59eccb971c51cfbc7ae0697cbd28d Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 18 Oct 2021 17:43:53 +0200 Subject: [PATCH 3/8] nucleus_index instead of nucleus attribute in ECP --- trex.org | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/trex.org b/trex.org index e208b2b..d25747e 100644 --- a/trex.org +++ b/trex.org @@ -138,16 +138,16 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an See http://dx.doi.org/10.1063/1.4984046 for more info. #+NAME: ecp - | Variable | Type | Dimensions | Description | - |---------------+---------+-----------------+-----------------------------------------------------------------------------| - | ~max_ang_mom~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}$ the maximum angular momentum in the removed core orbitals | - | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | - | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | - | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | - | ~nucleus~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | - | ~exponent~ | ~float~ | ~(ecp.num)~ | $\alpha_{A q \ell}$ all ECP exponents | - | ~coefficient~ | ~float~ | ~(ecp.num)~ | $\beta_{A q \ell}$ all ECP coefficients | - | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | + | Variable | Type | Dimensions | Description | + |-----------------+---------+-----------------+-----------------------------------------------------------------------------| + | ~max_ang_mom~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}$ the maximum angular momentum in the removed core orbitals | + | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | + | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | + | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | + | ~nucleus_index~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | + | ~exponent~ | ~float~ | ~(ecp.num)~ | $\alpha_{A q \ell}$ all ECP exponents | + | ~coefficient~ | ~float~ | ~(ecp.num)~ | $\beta_{A q \ell}$ all ECP coefficients | + | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | *Note for developers*: avoid having variables with similar prefix in their name. @@ -163,14 +163,14 @@ The latter causes issues when written before ~ang_mom~ in the TREXIO file. :RESULTS: #+begin_src python :tangle trex.json "ecp": { - "max_ang_mom" : [ "int" , [ "nucleus.num" ] ] - , "z_core" : [ "float", [ "nucleus.num" ] ] - , "num" : [ "dim" , [] ] - , "ang_mom" : [ "int" , [ "ecp.num" ] ] - , "nucleus" : [ "index", [ "ecp.num" ] ] - , "exponent" : [ "float", [ "ecp.num" ] ] - , "coefficient" : [ "float", [ "ecp.num" ] ] - , "power" : [ "int" , [ "ecp.num" ] ] + "max_ang_mom" : [ "int" , [ "nucleus.num" ] ] + , "z_core" : [ "float", [ "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" ] ] } , #+end_src :END: @@ -194,37 +194,37 @@ H-ccECP GEN 0 1 In TREXIO representation this would be: #+BEGIN_EXAMPLE -ecp_num = 8 +num = 8 # max angular momentum per atom -ecp_max_ang_mom = [ 1, 1 ] +max_ang_mom = [ 1, 1 ] # number of core electrons to remove per atom -ecp_zcore = [ 0, 0 ] +zcore = [ 0, 0 ] # first 4 ECP elements correspond to the first H atom, same for the second H atom -ecp_nucleus = [ +nucleus_index = [ 0, 0, 0, 0, 1, 1, 1, 1 ] # 3 first ECP elements correspond to l=1 of the first H atom, then 1 ECP for l=0; same for the second H atom -ecp_ang_mom = [ +ang_mom = [ 1, 1, 1, 0, 1, 1, 1, 0 ] # flat arrays with ECP quantities that can be parsed based on the aforementioned ecp_ang_mom and ecp_nucleus -ecp_coefficient = [ +coefficient = [ 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000, 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000 ] -ecp_exponent = [ +exponent = [ 21.24359508259891, 21.24359508259891, 21.77696655044365, 1.000000000000000, 21.24359508259891, 21.24359508259891, 21.77696655044365, 1.000000000000000 ] -ecp_power = [ +power = [ -1, 1, 0, 0, -1, 1, 0, 0 ] From 2d07db222fb5a6a38ceb4d5c413767c89d383121 Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 19 Oct 2021 10:26:35 +0200 Subject: [PATCH 4/8] upgrade major versions due to changes in the ECP format --- configure.ac | 2 +- python/pytrexio/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb9f626..55b705d 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([trexio], [1.1.0], [https://github.com/TREX-CoE/trexio/issues]) +AC_INIT([trexio], [2.0.0], [https://github.com/TREX-CoE/trexio/issues]) AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11]) AM_MAINTAINER_MODE() LT_PREREQ([2.2]) diff --git a/python/pytrexio/_version.py b/python/pytrexio/_version.py index 3dc1f76..5becc17 100644 --- a/python/pytrexio/_version.py +++ b/python/pytrexio/_version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "1.0.0" From e9ca73efc0239c4b7b781f37520e0922de14732c Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 19 Oct 2021 12:01:17 +0200 Subject: [PATCH 5/8] change array name of lmax to lmax+1 for better dimensioning --- trex.org | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/trex.org b/trex.org index d25747e..f44b008 100644 --- a/trex.org +++ b/trex.org @@ -121,10 +121,10 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an core electrons of atom $A$ is expressed as \[ V_A^{\text{ECP}} = - V_{A \ell_{\max}} + - \sum_{\ell=0}^{\ell_{\max}-1} + V_{A \ell_{\max}+1} + + \sum_{\ell=0}^{\ell_{\max}} \sum_{m=-\ell}^{\ell} | Y_{\ell m} \rangle \left[ - V_{A \ell} - V_{A \ell_{\max}} \right] \langle Y_{\ell m} | + V_{A \ell} - V_{A \ell_{\max}+1} \right] \langle Y_{\ell m} | \] The functions $V_{A\ell}$ are parameterized as: @@ -138,16 +138,16 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an See http://dx.doi.org/10.1063/1.4984046 for more info. #+NAME: ecp - | Variable | Type | Dimensions | Description | - |-----------------+---------+-----------------+-----------------------------------------------------------------------------| - | ~max_ang_mom~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}$ the maximum angular momentum in the removed core orbitals | - | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | - | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | - | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | - | ~nucleus_index~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | - | ~exponent~ | ~float~ | ~(ecp.num)~ | $\alpha_{A q \ell}$ all ECP exponents | - | ~coefficient~ | ~float~ | ~(ecp.num)~ | $\beta_{A q \ell}$ all ECP coefficients | - | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | + | Variable | Type | Dimensions | Description | + |----------------------+---------+-----------------+----------------------------------------------------------------------------------------| + | ~max_ang_mom_plus_1~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}+1$, one higher than the max angular momentum in the removed core orbitals | + | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | + | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | + | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | + | ~nucleus_index~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | + | ~exponent~ | ~float~ | ~(ecp.num)~ | $\alpha_{A q \ell}$ all ECP exponents | + | ~coefficient~ | ~float~ | ~(ecp.num)~ | $\beta_{A q \ell}$ all ECP coefficients | + | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | *Note for developers*: avoid having variables with similar prefix in their name. @@ -163,14 +163,14 @@ The latter causes issues when written before ~ang_mom~ in the TREXIO file. :RESULTS: #+begin_src python :tangle trex.json "ecp": { - "max_ang_mom" : [ "int" , [ "nucleus.num" ] ] - , "z_core" : [ "float", [ "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" ] ] + "max_ang_mom_plus_1" : [ "int" , [ "nucleus.num" ] ] + , "z_core" : [ "float", [ "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" ] ] } , #+end_src :END: @@ -196,10 +196,11 @@ H-ccECP GEN 0 1 #+BEGIN_EXAMPLE num = 8 -# max angular momentum per atom -max_ang_mom = [ 1, 1 ] +# lmax+1 per atom +max_ang_mom_plus_1 = [ 2, 2 ] + # number of core electrons to remove per atom -zcore = [ 0, 0 ] +zcore = [ 0, 0 ] # first 4 ECP elements correspond to the first H atom, same for the second H atom nucleus_index = [ From 250b29a7bdf89bf0db06015bdc78e48ad8880180 Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 19 Oct 2021 13:31:48 +0200 Subject: [PATCH 6/8] fix typo in the example --- trex.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trex.org b/trex.org index f44b008..1841692 100644 --- a/trex.org +++ b/trex.org @@ -197,7 +197,7 @@ H-ccECP GEN 0 1 num = 8 # lmax+1 per atom -max_ang_mom_plus_1 = [ 2, 2 ] +max_ang_mom_plus_1 = [ 1, 1 ] # number of core electrons to remove per atom zcore = [ 0, 0 ] From 68cf38e8228a1d4ee5be1368dd733393323e9805 Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 19 Oct 2021 15:47:13 +0200 Subject: [PATCH 7/8] better documentation of th ECP block --- trex.org | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/trex.org b/trex.org index 1841692..9fc315d 100644 --- a/trex.org +++ b/trex.org @@ -118,7 +118,7 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an * Effective core potentials (ecp group) An effective core potential (ECP) $V_A^{\text{ECP}}$ replacing the - core electrons of atom $A$ is expressed as + core electrons of atom $A$ can be expressed as \[ V_A^{\text{ECP}} = V_{A \ell_{\max}+1} + @@ -127,6 +127,9 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an V_{A \ell} - V_{A \ell_{\max}+1} \right] \langle Y_{\ell m} | \] + The first term in the equation above is sometimes attributed to the local channel, + while the remaining terms correspond to the non-local channel projections. + The functions $V_{A\ell}$ are parameterized as: \[ V_{A \ell}(\mathbf{r}) = @@ -135,13 +138,13 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an e^{-\alpha_{A q \ell} |\mathbf{r}-\mathbf{R}_{A}|^2 } \] - See http://dx.doi.org/10.1063/1.4984046 for more info. + See http://dx.doi.org/10.1063/1.4984046 or https://doi.org/10.1063/1.5121006for more info. #+NAME: ecp | Variable | Type | Dimensions | Description | |----------------------+---------+-----------------+----------------------------------------------------------------------------------------| | ~max_ang_mom_plus_1~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}+1$, one higher than the max angular momentum in the removed core orbitals | - | ~z_core~ | ~float~ | ~(nucleus.num)~ | Charges to remove | + | ~z_core~ | ~float~ | ~(nucleus.num)~ | Number of core electrons to remove per atom | | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | | ~nucleus_index~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | @@ -150,10 +153,17 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an | ~power~ | ~int~ | ~(ecp.num)~ | $n_{A q \ell}$ all ECP powers | +There might be some confusion in the meaning of the $\ell_{\max}$. +It can be attributed to the maximum angular momentum occupied +in the core orbitals, which are removed by the ECP. +On the other hand, it can be attributed to the maximum angular momentum of the +ECP that replaces the core electrons. +*Note*, that the latter $\ell_{\max}$ is always higher by 1 than the former. + + *Note for developers*: avoid having variables with similar prefix in their name. -HDF5 back end might cause issues due to the way `find_dataset` function works -in the H5LT module. For example, in the ECP group we use ~max_ang_mom~ and -~ang_mom_max~ due to this. +HDF5 back end might cause issues due to the way `find_dataset` function works. +For example, in the ECP group we use ~max_ang_mom~ and not ~ang_mom_max~. The latter causes issues when written before ~ang_mom~ in the TREXIO file. @@ -202,19 +212,19 @@ max_ang_mom_plus_1 = [ 1, 1 ] # number of core electrons to remove per atom zcore = [ 0, 0 ] -# first 4 ECP elements correspond to the first H atom, same for the second H atom +# first 4 ECP elements correspond to the first H atom; the remaining 4 elements are for the second H atom nucleus_index = [ 0, 0, 0, 0, 1, 1, 1, 1 ] -# 3 first ECP elements correspond to l=1 of the first H atom, then 1 ECP for l=0; same for the second H atom +# 3 first ECP elements correspond to the P orbital (l=1), then 1 element for the S orbital (l=0) ; similar for the second H atom ang_mom = [ 1, 1, 1, 0, 1, 1, 1, 0 ] -# flat arrays with ECP quantities that can be parsed based on the aforementioned ecp_ang_mom and ecp_nucleus +# ECP quantities that can be attributed to atoms and/or angular momenta based on the aforementioned ecp_nucleus and ecp_ang_mom arrays coefficient = [ 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000, 1.00000000000000, 21.24359508259891, -10.85192405303825, 0.00000000000000 From 8fa8fc0c99a7c629e1fba0e02bfa54aefb173499 Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 19 Oct 2021 17:07:15 +0200 Subject: [PATCH 8/8] change ecp_z_core type from float to int --- trex.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trex.org b/trex.org index 9fc315d..5ee11dd 100644 --- a/trex.org +++ b/trex.org @@ -144,7 +144,7 @@ arrays are 0-based. Hence, we introduce the ~index~ type which is an | Variable | Type | Dimensions | Description | |----------------------+---------+-----------------+----------------------------------------------------------------------------------------| | ~max_ang_mom_plus_1~ | ~int~ | ~(nucleus.num)~ | $\ell_{\max}+1$, one higher than the max angular momentum in the removed core orbitals | - | ~z_core~ | ~float~ | ~(nucleus.num)~ | Number of core electrons to remove per atom | + | ~z_core~ | ~int~ | ~(nucleus.num)~ | Number of core electrons to remove per atom | | ~num~ | ~dim~ | | Total number of ECP functions for all atoms and all values of $\ell$ | | ~ang_mom~ | ~int~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the angular momentum $\ell$ | | ~nucleus_index~ | ~index~ | ~(ecp.num)~ | One-to-one correspondence between ECP items and the atom index | @@ -174,7 +174,7 @@ The latter causes issues when written before ~ang_mom~ in the TREXIO file. #+begin_src python :tangle trex.json "ecp": { "max_ang_mom_plus_1" : [ "int" , [ "nucleus.num" ] ] - , "z_core" : [ "float", [ "nucleus.num" ] ] + , "z_core" : [ "int" , [ "nucleus.num" ] ] , "num" : [ "dim" , [] ] , "ang_mom" : [ "int" , [ "ecp.num" ] ] , "nucleus_index" : [ "index", [ "ecp.num" ] ] @@ -212,13 +212,13 @@ max_ang_mom_plus_1 = [ 1, 1 ] # number of core electrons to remove per atom zcore = [ 0, 0 ] -# first 4 ECP elements correspond to the first H atom; the remaining 4 elements are for the second H atom +# first 4 ECP elements correspond to the first H atom ; the remaining 4 elements are for the second H atom nucleus_index = [ 0, 0, 0, 0, 1, 1, 1, 1 ] -# 3 first ECP elements correspond to the P orbital (l=1), then 1 element for the S orbital (l=0) ; similar for the second H atom +# 3 first ECP elements correspond to potential of the P orbital (l=1), then 1 element for the S orbital (l=0) ; similar for the second H atom ang_mom = [ 1, 1, 1, 0, 1, 1, 1, 0