Closed MIWdlB closed 3 years ago
Hi Michael, thanks for the detailed description of the issue!
It looks like you have already figured it all out. So adding the full fix would be terrific. Thank you :-)
If you want you can just make a pr to the devel
branch with the fix.
Feel free to let me know if you have any questions regarding that.
Just to be sure that I don't miss something: I don't fully understand the last format, are the missing lines supposed to be filled with 0.0 (if so the last line was probably supposed to have some entry differ from 0.0) or is this not xyz? geometry = """ H 0.0 O 0.0 1.0 H 0.0 0.0 0.0 """
No problem, I'll set up a PR and link it here when I do.
And yes, that's my mistake - I've update the original comment to make it clearer, thanks.
Awesome! I'll keep the issue open until then.
I was trying to build a QuantumChemistryBase object, for which I needed a ParametersQC.
My geometry was set up from earlier pyscf/psi4 calculations like:
As a singe line string this is "\n H ... \n O ... \ When ParametersQS gets to calling the
convert_to_list
method to reformat the geomtery it return an empty list.That's because it splits the string into lines, then loops through lines, breaking at the first which doesn't have length 4.
This error was a little tricky to find because it only becomes an issue in the Openfermion package when it tries to name a molecule based on the atoms described by its geometry.
As far as I can tell this will also be a problem for anyone using the format below, which (i think) all the popular chemistry packages accept:
I'm happy to either add in a check to make sure the geometry is in the expected single line format (not my preference for readability), or to add a fix to the function that remove trialling blank lines and fills in 0s if needed. Let me know what you prefer :smile: