Project

General

Profile

Bug #142

Electrostatics-dependent crash in constant pressure when using freeze groups

Added by David Mobley over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

OK, I have another weird bug (sorry, I must drive you guys nuts sometimes).

I am trying to simulate three (frozen) LJ spheres in a row, two of which I want to have charged (equal
and opposite charges). I'm of course using freeze groups to hold these fixed. I'm doing minimization,
then equilibrating with constant volume, then constant pressure. Constant pressure equilibration
crashes with a seg fault anytime I have ANY charge on the spheres (i.e., -0.01, +0.01 on the end
spheres). But if the charges are zero, it works fine.

I'm linking to a tarball to reproduce the problem. Just use the run0.sh script to run; currently it runs the
working case. The working topology is dipole_blocked2.top; the "broken" topology is
dipole_blocked2_crash.top. You'll have to switch the name of the topology in the run file to get the
other case.

I have no idea what could be going on. I just know I need to run my LJ spheres in a row with charges on
them, and it doesn't work...

I'm using the CVS version (which I just updated a couple days ago) currently, but I get the same crashes
in 3.3.

Thanks,
David

History

#1 Updated by Berk Hess over 12 years ago

This is a typical example of the problems you get when
combining pressure scaling and freezing in Gromacs.
Note that this is mentioned in mdp_opt.html,
although not with the word WARNING and a hint to
the instabilities.

The problem is that the frozen coordinates are not scaled.
Your water therefore 'scales' through the spheres causing
instabilities.

This problem is not easy to fix. We could, optionally,
also scale the frozen groups. But often one want would like
to have the intra-freezegroup distances to be fixed.
Then one would need to define the pbc for the frozen group,
which is not trivial.

Berk.

#2 Updated by Berk Hess over 12 years ago

For your simulation, wouldn't it be a better solution
to put a constraint between the two outer spheres
and construct the middle sphere using a virtual site?

Berk.

#3 Updated by David Mobley over 12 years ago

Berk,

Why does this only happen when the spheres have charges on them? Also, I don't run into this problem
with other geometries (i.e. hexagons of spheres, rather than lines of spheres).

Maybe I should go back to what I used to do, which is use position restraints for the constant pressure
stuff and freeze groups only for constant volume. But I was having trouble getting that to work because
I want to have the spheres very close together, meaning that the restraints have to be really big, so very
large forces, etc...

Are there any other ways that come to mind off the top of your head to achieve the same effect (frozen
spheres) without using freeze groups?

Thanks,
David

#4 Updated by Berk Hess over 12 years ago

Can't you use the constraint option I mailed before?

One thing that might help is to exclude all atom pairs
in the frozen groups, using exclusions or energy group
exclusions.

I don't know why it only happens with the three spheres.
But write some more frames to trajectory and watch
what happens.

Berk.

#5 Updated by David Mobley over 12 years ago

Berk,

Can't you use the constraint option I mailed before?

For some reason I'm not remembering this, and can't find it in my old e-mail. I'm guessing you're
talking about using constraints, i.e. as for water, to keep it fixed?

One thing that might help is to exclude all atom pairs
in the frozen groups, using exclusions or energy group
exclusions.

I'll give that a shot. Thanks.

David

#6 Updated by Berk Hess over 12 years ago

My constraint comment is in bugzilla:
http://bugzilla.gromacs.org/show_bug.cgi?id=142#c2

Berk.

#7 Updated by David Mobley over 12 years ago

Berk, thanks. Somehow I hadn't noticed that one.

Incidentally, it also seems that turning on exclusions is helping.

Thanks again,
David

Also available in: Atom PDF