Fix fsapt + external potential - nocom/noreorient #2934
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@carolinesargent identified a bug where running FSAPT with an external potential w/o having frozen the orientation with no_com + no_reorient would run but give the wrong answer. :-(
External potentials has long been one of those cases where we required the user to freeze the orientation at molecule creation time so that the potential could be set in the same frame. This couldn't be fixed driver-side because as soon as the
core.Molbuilds w/o freeze directives, it loses the original Cartesian coordinates. (The clone, set_nocom, set_noreorient calls in the driver allow regular sapt to forego user setting by preventing the dimer, monoA, monoB from having different frames.)Happily, in the intervening period, @maxscheurer ran into exactly this problem for polarizable embedding potentials and solved it by tacking a copy of the original Cartesians onto the molecule. So we're applying this to FSAPT also.
I've been getting some segfaults that I think are a quirk of my directory, hence the cc31 testing.
User API & Changelog headlines
Dev notes & details
Checklist
Status