Skip to content

Prototype for heterogenous mass repartitioning#1186

Merged
swails merged 5 commits into
masterfrom
unknown repository
Sep 14, 2021
Merged

Prototype for heterogenous mass repartitioning#1186
swails merged 5 commits into
masterfrom
unknown repository

Conversation

@bradakstx

@bradakstx bradakstx commented Jul 28, 2021

Copy link
Copy Markdown
Contributor

This is a draft implementation of the two-tier mass repartitioning
strategy recently published by the Sugita group. The main change is that
an additional "alternate" target hydrogen mass is supplied for hydrogens
that are connected to a ring. The complete strategy proposed for AMBER
force fields is:

  1. reduce the target mass from 3 x 1.008 to 2.5 x 1.008
  2. use an alternate target mass of 2 x 1.008

Changes to the code:

  • A new optional keyword altmass has been added to the HMassRepartition
    action that supplies the alternative mass.
  • A quick scheme to produce rdkit mol objects from single-residue ParmEd
    molecules has been added so that we can access the IsInRing() method for
    determining which atoms are in rings.

Things to improve:

The use of rdkit molecules seems to work fine in practice, but is
obviously terribly inefficient -- a new molecule is created for each and
every atom to check rather than the other way around. I can think of
multiple ways to restructure this, but I'll kick that to the development
community. The current implementation seems to work very robustly
regardless.

This is a draft implementation of the two-tier mass repartitioning
strategy recently published by the Sugita group. The main change is that
an additional "alternate" target hydrogen mass is supplied for hydrogens
that are connected to a ring. The complete strategy proposed for AMBER
force fields is:

1. reduce the target mass from 3*1.008 to 2.5*1.008
2. use an alternate target mass of 2*1.008

Changes to the code:

- A new optional keyword `altmass` has been added to the HMassRepartition
action that supplies the alternative mass.
- A quick scheme to produce rdkit mol objects from single-residue ParmEd
molecules has been added so that we can access the IsInRing() method for
determining which atoms are in rings.

Things to improve:

The use of rdkit molecules seems to work fine in practice, but is
obviously terribly inefficient -- a new molecule is created for each and
every atom to check rather than the other way around. I can think of
multiple ways to restructure this, but I'll kick that to the development
community. The current implementation seems to work very robustly
regardless.
Original implementation was a bit seat-of-my-pants. Remove the need to mess with sys.stdout.
Comment thread parmed/tools/actions.py Outdated
Comment thread parmed/tools/actions.py Outdated
Comment thread parmed/tools/actions.py Outdated
Comment thread parmed/tools/actions.py Outdated
Comment thread parmed/tools/actions.py Outdated
Comment thread parmed/tools/actions.py
- various cosmetic changes (idx instead of number attribute)
- altmass is now ring_hmass
- rdkit is now optional and a warning is raised if it is needed but not
present (fallback to the standard approach)
- look-up table based on residue idx should significantly speed-up
repartitioning on large proteins, etc.
@swails

swails commented Aug 25, 2021

Copy link
Copy Markdown
Contributor

Can we add a test case so when I finally do get around to adding ring perception to ParmEd I can make sure I don't break this?

Would like to include a method/property in the Atom class that
determines if atom.is_in_ring.
Comment thread parmed/tools/actions.py Outdated
Co-authored-by: Jason Swails <jason@entos.ai>
@swails swails merged commit dc24e9e into ParmEd:master Sep 14, 2021
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.

3 participants