Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/trexio_tools/converters/convert_from.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ def run_resultsFile(trexio_file, filename, motype=None):
trexio.write_metadata_code_num(trexio_file, 1)
trexio.write_metadata_code(trexio_file,
[str(res).split('.')[-1].split()[0].replace("File","")] )
trexio.write_metadata_author_num(trexio_file, 1)
trexio.write_metadata_author(trexio_file, [res.author])
trexio.write_metadata_description(trexio_file, res.title)
if res.author is not None:
trexio.write_metadata_author_num(trexio_file, 1)
trexio.write_metadata_author(trexio_file, [res.author])
if res.title is not None:
trexio.write_metadata_description(trexio_file, res.title)

# Electrons
# ---------
Expand Down
14 changes: 9 additions & 5 deletions src/trexio_tools/converters/convert_to.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ def run_cart_phe(inp, filename, to_cartesian):

ao_num_in = trexio.read_ao_num(inp)

normalization = np.array( [ 1. ] * ao_num_in )
if trexio.has_ao_normalization(inp):
normalization = trexio.read_ao_normalization(inp)

for i,f in enumerate(normalization):
cart_normalization[i] *= f

if to_cartesian == 0:
print("Transformation from cartesian to spherical is not implemented")
Expand Down Expand Up @@ -466,10 +472,6 @@ def run_cart_phe(inp, filename, to_cartesian):
trexio.write_ao_num(out, ao_num_out)
trexio.write_ao_shell(out, shell)

normalization = np.array( [ 1. ] * ao_num_in )
if trexio.has_ao_normalization(inp):
normalization = trexio.read_ao_normalization(inp)

trexio.write_ao_normalization(out, cart_normalization)

"""
Expand Down Expand Up @@ -497,7 +499,9 @@ def run_cart_phe(inp, filename, to_cartesian):
mix radial and angular coordinates. Thus, r_power needs to be adapted to cancel
out the radial dependence of the polynomials.
"""
r_power = trexio.read_basis_r_power(inp)

r_power = [0.0 for _ in shell_ang_mom ]

r_power_sign = -1
if to_cartesian == 0:
r_power_sign = +1
Expand Down
Loading