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.
Allows allegro to be used as a QM/MM DeltaMLP which corrects the QM/QM and nearby QM/MM interactions without altering MM/MM interactions.
Description
Adds per_species_rescale_shifts_mask: List[bool] option to the input yaml. This is a list of bool values whose length is NumAtomTypes. If an element is false, then that atom type's shift parameter is forced to be zero. In other words, this acts like a mask whose values are either 1.0 or 0.0, and it multiplies the shift parameters element-wise.
Motivation and Context
In the context of QM/MM, one would have "QM atom types" and "MM atom types". The "MM atom types" mask elements should be "false" and the "QM atom types" mask elements should be "true". In this way, the energy is extensive as the number of QM atoms grows, but it also conserves energy as MM atoms flow into and out of the QM region's vicinity. This strategy is analogous to the DPRc model based on DeePMD-kit (doi: 10.1021/acs.jctc.1c00201). The changes made here are highly related to a pull request made to allegro (mir-group/allegro#85) which adds a per_edge_species_scales_mask option that effectively deletes edges between pairs of atom types. In the context of QM/MM, one would delete all MM/MM edges.
How Has This Been Tested?
pytest tests/
log attached as test.logTypes of changes
Checklist:
black
.docs/options
) has been updated with new or changed options.CHANGELOG.md
.