Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allegro qmmm delta mlp #427

Closed
wants to merge 2 commits into from

Conversation

tjgiese
Copy link

@tjgiese tjgiese commented May 3, 2024

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?

  • Linux 5.4.14-100.fc30.x86_64
  • Python 3.9.12
  • pytest-8.2.0
  • pluggy-1.5.0
    pytest tests/ log attached as test.log

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds or improves functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation improvement (updates to user guides, docstrings, or developer docs)

Checklist:

  • My code follows the code style of this project and has been formatted using black.
  • All new and existing tests passed, including on GPU (if relevant).
  • I have added tests that cover my changes (if relevant).
  • The option documentation (docs/options) has been updated with new or changed options.
  • I have updated CHANGELOG.md.
  • I have updated the documentation (if relevant).

@tjgiese tjgiese mentioned this pull request May 3, 2024
10 tasks
@tjgiese tjgiese closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant