Skip to content

Conversation

@bradakstx
Copy link
Contributor

@bradakstx bradakstx commented Jul 28, 2021

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.
- 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
Copy link
Contributor

swails commented Aug 25, 2021

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.
@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