Skip to content

Commit

Permalink
Merge pull request #33 from TREX-CoE/fix_orca
Browse files Browse the repository at this point in the history
Add basis_r_power to orca and pyscf converters
  • Loading branch information
scemama authored Jan 18, 2024
2 parents c31e321 + 0888891 commit 6654488
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ docopt
# It is quite a heavy package with a lot of functionalities which
# you may not need

pyscf
pyscf==2.3.0
4 changes: 4 additions & 0 deletions src/trexio_tools/converters/orca_to_trexio.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ def orca_to_trexio(
# normalization factors
basis_shell_factor = [1.0 for _ in range(basis_shell_num)] # 1.0 in ORCA

# power of r is always zero for Gaussian functions
basis_r_power = [0.0 for _ in range(basis_shell_num) ]

def my_factorial2(n):
if n < 0:
return(1)
Expand Down Expand Up @@ -197,6 +200,7 @@ def gto_norm(alpha, ax, ay, az):
trexio.write_basis_nucleus_index(trexio_file, nucleus_index) #
trexio.write_basis_shell_ang_mom(trexio_file, shell_ang_mom) #
trexio.write_basis_shell_factor(trexio_file, basis_shell_factor) #
trexio.write_basis_r_power(trexio_file, basis_r_power) #
trexio.write_basis_shell_index(trexio_file, basis_shell_index) #
trexio.write_basis_exponent(trexio_file, basis_exponent) #
trexio.write_basis_coefficient(trexio_file, basis_coefficient) #
Expand Down
4 changes: 4 additions & 0 deletions src/trexio_tools/converters/pyscf_to_trexio.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ def pyscf_to_trexio(
# normalization factors
basis_shell_factor = [1.0 for _ in range(basis_shell_num)] # 1.0 in pySCF

# power of r is always zero for Gaussian functions
basis_r_power = [0.0 for _ in range(basis_shell_num) ]

# gto_norm(l, expnt) => l is angmom, expnt is exponent
# Note!! Here, the normalization factor of the spherical part
# are not included. The normalization factor is computed according
Expand Down Expand Up @@ -507,6 +510,7 @@ def pyscf_to_trexio(
trexio.write_basis_prim_num(trexio_file, basis_prim_num) #
trexio.write_basis_nucleus_index(trexio_file, nucleus_index) #
trexio.write_basis_shell_ang_mom(trexio_file, shell_ang_mom) #
trexio.write_basis_r_power(trexio_file, basis_r_power) #
trexio.write_basis_shell_factor(trexio_file, basis_shell_factor) #
trexio.write_basis_shell_index(trexio_file, basis_shell_index) #
trexio.write_basis_exponent(trexio_file, basis_exponent) #
Expand Down

0 comments on commit 6654488

Please sign in to comment.