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

Develop qmmm delta mlp #85

Closed
wants to merge 11 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

  • Merges main branch changes into develop.
  • Adds per_edge_species_scales_mask: List[List[bool]] option to the input yaml. This is a symmetric list of size NumAtomTypes x NumAtomTypes. If an element is false, then all edges between the two types are ignored. In other words, this acts like a mask whose values are either 1.0 or 0.0, and it multiplies the edge energies based on the pair of atom types.
  • Added configs/qmmm.yaml example (the example requires Allegro qmmm delta mlp nequip#427)

Motivation and Context

In the context of QM/MM, one would have "QM atom types" and "MM atom types". The elements of the mask correspond to QM/QM, QM/MM, or MM/MM interactions. One would set all QM/QM and QM/MM edge interactions to true and all MM/MM edge interactions to false. This is necessary to conserve 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 nequip (mir-group/nequip#427) which adds a per_species_rescale_shifts_mask option.

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
    cd tests && pytest nn/ log attached as tests_nn.log
    cd tests && pytest model/ can make it through 60% of test_allegro.py without error but then my computer runs out of memory. This is not specific to this particular PR; it happens whn I test the nequip+allegro develop branches too. I should test the main branches and open a separate issue.

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

3 participants