TREX-CoE / trexio_tools

Set of tools for trexio files
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Convert to cartesian seams to be broken in 0.7.0 #34

Closed addman2 closed 8 months ago

addman2 commented 9 months ago

With version 0.7.0 I have some issues running conversion to cartesian, getting this error message:

Traceback (most recent call last):
  File "/home/addman/Robota/ENVs/turbogenius/bin/trexio", line 8, in <module>
    sys.exit(main())
  File "/home/addman/Robota/ENVs/turbogenius/lib/python3.9/site-packages/trexio_tools/trexio_run.py", line 99, in main
    run(args["TREXIO_FILE"], args["--output"], args["--type"], args["--spin_order"])
  File "/home/addman/Robota/ENVs/turbogenius/lib/python3.9/site-packages/trexio_tools/converters/convert_to.py", line 598, in run
    run_cartesian(trexio_file, filename)
  File "/home/addman/Robota/ENVs/turbogenius/lib/python3.9/site-packages/trexio_tools/converters/convert_to.py", line 577, in run_cartesian
    run_cart_phe(t, filename, to_cartesian=1)
  File "/home/addman/Robota/ENVs/turbogenius/lib/python3.9/site-packages/trexio_tools/converters/convert_to.py", line 494, in run_cart_phe
    r_power = trexio.read_basis_r_power(inp)
  File "/home/addman/Robota/ENVs/turbogenius/lib/python3.9/site-packages/trexio.py", line 6625, in read_basis_r_power
    raise Error(rc)

Version 0.6.0 works fine. Reproducer attached.

q-posev commented 9 months ago

Hi @addman2 ,

This is a consequence of MR #30, the cartesian converter now requires basis_r_power array to be present in the trexio file. Do you obtain your trexio file by converting from pyscf output? If yes, then update your trexio-tools installation (install from the latest commit of this github repo) and rerun both converters.

@scemama bug reports like this is what I was talking about when we discussed making the read of r_power optional.

scemama commented 9 months ago

Hi, we could insert in the converter the fact that if basis_r_power is not present, we set it to an array of ones.

q-posev commented 8 months ago

Closing as @addman2 confirmed that it's working now