Project

General

Profile

Bug #2542

Freezing does not work with constraints

Added by Semen Yesylevskyy 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
Works in 5.1.2, doesn't work in 2018.1.
Affected version:
Difficulty:
uncategorized
Close

Description

Freezing stopped working in version 2018.1!
This is rather critical bug - it is impossible to use frozen groups in this version.
To reproduce:
In attached system SOL residue #1 is frozen completely. If this is run with Gromacs 5.1.2 it stays frozen as expected. In 2018.1 frozen molecule moves freely.

bug.zip (9.91 KB) bug.zip System to reproduce the bug Semen Yesylevskyy, 06/04/2018 11:08 AM
ion.zip (9.91 KB) ion.zip Semen Yesylevskyy, 06/05/2018 01:56 PM

Associated revisions

Revision f0bcda84 (diff)
Added by Berk Hess 8 months ago

Remove constraint v correction for frozen atoms

The optimized update routines no longer set the velocities of frozen
dimensions to zero, but the constraint code would still correct
the velocities of frozen dimensions.

Note that the COM correction can still modify velocities of frozen
dimensions, but this is a negligible effect unless there are
systematic COM forces.

Fixes #2542

Change-Id: I4770d9bd7991a021ce173f219eb7310a91eaf10e

Revision 1645a388 (diff)
Added by Berk Hess 8 months ago

Avoid COM removal moving frozen atoms

Fixes #2551
Refs #2542

Change-Id: Ifd7523661248594cce7329dfd86e814b78c9c32c

History

#1 Updated by Berk Hess 9 months ago

  • Status changed from New to In Progress
  • Assignee set to Berk Hess

#2 Updated by Gerrit Code Review Bot 9 months ago

Gerrit received a related patchset '1' for Issue #2542.
Uploader: Berk Hess ()
Change-Id: gromacs~release-2018~I4770d9bd7991a021ce173f219eb7310a91eaf10e
Gerrit URL: https://gerrit.gromacs.org/7974

#3 Updated by Berk Hess 9 months ago

  • Status changed from In Progress to Fix uploaded

The main contribution comes from constraints corrections to the velocities of frozen atoms. I pushed up a correction for this.
There can be (small) effects of center of mass velocities corrections on frozen dimensions. We should consider adding a warning in grompp for applying COM removal to frozen dimensions.

#4 Updated by Berk Hess 9 months ago

  • Category set to mdrun
  • Target version set to 2018.2

#5 Updated by Berk Hess 9 months ago

  • Subject changed from Freezing does not work to Freezing does not work with constraints

#6 Updated by Mark Abraham 9 months ago

Was there a change since 5.1.2 that caused this? Do we need to consider fixing it 2016 branch?

#7 Updated by Semen Yesylevskyy 9 months ago

Berk Hess wrote:

The main contribution comes from constraints corrections to the velocities of frozen atoms. I pushed up a correction for this.
There can be (small) effects of center of mass velocities corrections on frozen dimensions. We should consider adding a warning in grompp for applying COM removal to frozen dimensions.

I need to add that this also happens to the atoms without any constraints on them. See attached system with frozen ion - it also moves a lot. So I wonder if the name "Freezing does not work with constraints" is correct - it seems that freezing just does not work at all :)

#8 Updated by David van der Spoel 9 months ago

This is indeed due to the com_groups = system option. You can circumvent this by using com_groups = water in your mdp file (I tested it). I guess a warning in grompp would be in place if com_groups overlap with freeze_grps.

#9 Updated by Semen Yesylevskyy 9 months ago

David van der Spoel wrote:

This is indeed due to the com_groups = system option. You can circumvent this by using com_groups = water in your mdp file (I tested it). I guess a warning in grompp would be in place if com_groups overlap with freeze_grps.

The warning is a good option indeed, however I see few problems:
1) The behavior is fundamentally different between the versions. In 5.x and 2016.x frozen groups were fixed even with com_groups = system. In 2018.x they move. So your old setups no longer run as intended. This is very confusing and frustrating for the user.
2) This is counterintuitive. If I freeze the group I expect it to be, well, frozen :) regardless of other options.
3) Leaving frozen groups out of com_groups produces a warning "Some atoms are not part of any center of mass motion removal group."
4) What happens in the case if only X dim is frozen and the atom is out of com_groups?

#10 Updated by Berk Hess 9 months ago

1) Could be addressed by detecting such cases and passing them through the non-optimized integrator
2) You are asking for incompatible requirements. But this could be done automatically by excluding frozen atoms from the group.
3) That warning should be fixed.
4) We could pass such cases through the old integrator setup, but to be 100% correct, their mass should not contribute to the COM mass along frozen dimensions.

#11 Updated by Gerrit Code Review Bot 9 months ago

Gerrit received a related patchset '1' for Issue #2542.
Uploader: Berk Hess ()
Change-Id: gromacs~release-2018~Ifd7523661248594cce7329dfd86e814b78c9c32c
Gerrit URL: https://gerrit.gromacs.org/7982

#12 Updated by Berk Hess 9 months ago

I opened a new issue #2551 and uploaded a fix that should replicate the old behavior.
Any other changes we discussed should probably go into master.

#13 Updated by Berk Hess 8 months ago

  • Status changed from Fix uploaded to Resolved

#14 Updated by Mark Abraham 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF