psi4 icon indicating copy to clipboard operation
psi4 copied to clipboard

Fix initial cartesian units

Open timostrunk opened this issue 11 months ago • 2 comments

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

Status

  • [x] Ready for review
  • [ ] Ready for merge

timostrunk avatar Mar 21 '24 13:03 timostrunk

I ran pytest quick tests, all pytest still running

timostrunk avatar Mar 21 '24 16:03 timostrunk

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, std::allocator >, char const*, int) ! E ! psi::DFHelper::initialize() ! E ! ! E !----------------------------------------------------------------------------------!

I think this is independent of this PR and the PR would be good to go

timostrunk avatar Mar 21 '24 17:03 timostrunk