psi4
psi4 copied to clipboard
Fix initial cartesian units
Description
This PR fixes #3147 . Basically the psithon way of defining molecules converted _initial_cartesian on parsing. When adding an external potential this was used as molecule.set_geometry(clone_molecule._initial_cartesian). set_geometry applies the conversion again.
The two python ways I found, which set initial_cartesian did not do the conversion leading to incorrect geometries, when using external_potential and molecules defined as unit=angstrom.
User API & Changelog headlines
- [x] Fixes #3147: Parsing molecules with angstrom units and using external_potential from python was broken
Dev notes & details
- [x] Fixes #3147: Parsing molecules from psithon and python left mol._initial_cartesian in a different unit. This aligns the units. Downstream this had the effect of breaking using molecules with angstrom units with an external_potential from python
Questions
- [x] Question1
Checklist
- [x] Tests added for any new features
- [x] All or relevant fraction of full tests run
Status
- [x] Ready for review
- [ ] Ready for merge
I ran pytest quick tests, all pytest still running
All tests ran through except for:
FAILED tests/fsapt1/test_input.py::test_fsapt1 - AssertionError: Traceback (most recent call last):
with the message:
E !----------------------------------------------------------------------------------!
E ! !
E ! Fatal Error: SCF_SUBTYPE=INCORE was specified, but there is not enough memory to !
E ! do in-core! Increase the amount of memory allocated to Psi4 or allow for !
E ! out-of-core to be used. !
E ! Error occurred in file: /home/conda/feedstock_root/build_artifacts/psi4nm_171103 !
E ! 8779956/work/psi4/src/psi4/lib3index/dfhelper.cc on line: 261 !
E ! The most recent 5 function calls were: !
E ! psi::PsiException::PsiException(std::__cxx11::basic_string<char, !
E ! std::char_traits
I think this is independent of this PR and the PR would be good to go