Bug #43

turning on free energy turns off angle restraints

Added by David Mobley almost 14 years ago. Updated almost 14 years ago.

Target version:
Affected version - extra info:
Affected version:


When applying angle restraints to a set of atoms, the angle restraint energy
output in the log and energy files becomes zero the instant free energy is
switched on, even if there are no perturbed parameters defined in the topology
files. Hence, angle restraints are useless for free energy calculations.

I'll attach a couple of topology/run files to reproduce this, but I would note
that as far as I can tell it is any angle restraints and free energy

Please fix ASAP: I've been running free energy calculations for quite some time
and this causes problems for all of my calculations.

To reproduce the bug: Try running the attached minimization with and without
free_energy in the mdp file set to yes. Check out the angle energy output. It is
nonzero when free energy is no, zero when free_energy is yes.

bug.tar.gz (385 KB) bug.tar.gz To demonstrate bug David Mobley, 01/23/2006 09:37 PM


#1 Updated by David Mobley almost 14 years ago

Created an attachment (id=14)
To demonstrate bug

Already described in bugzilla.

#2 Updated by David Mobley almost 14 years ago

Additional remarks:
Further testing shows that angle restraints don't turn off simply when
free_energy=yes, but when free_energy=yes and lambda=1. For lambda=0, they work
fine, and for free_energy=yes as lambda goes from zero to 1, they gradually turn

Since angle restraints appear to be handled by dopdihs_min as dihedrals, my
suspicion is that B state parameters for the restraint parameters are never set,
so that when lambda=1, angle restraints have spring constants of zero, but at
lambda=0, they are fine.

As far as I can tell there is currently no way to read different B state angle
restraint parameters from the topology file. Furthermore, distance restraints
and dihedral restraints do fine without reading B state parameters.

Suggested fixes:
(a) Provide an option to read B state restraint parameters from the topology
file, for all of distance, dihedral, and angle restraints.
(b) Alternatively, simply make sure B state restraint parameters are set equal
to A state restraint parameters.

#3 Updated by David Mobley almost 14 years ago

Further update: Grompp reads the appropriate parameters from the topology file
just fine, (and fills in defaults when needed). But one of the parameters never
makes it into the tpr file. In particular, cpB is always exactly zero for ANGRES
when the tpr file is dumped. But phiB is set appropriately.

I'll update if I make any more progress.

#4 Updated by David Mobley almost 14 years ago

I was never able to track this down completely aside from what I've already
written. I temporarily "solved" the problem on my end by making the angle
restraints code always use the A state parameters rather than trying to use the
B state parameters also. So I don't immediately need a bugfix myself, but
obviously this should be fixed for 3.3.1 (or the ability to use perturbed B
state angle parameters should be removed).

Currently, the manual states that it is possible to use perturbed B state angle
restraint parameters, but currently the bug makes this impossible.

#5 Updated by Berk Hess almost 14 years ago

This was a nasty bug.
The problem was that the angle-restraint parameters were stored
incorrectly in the tpr file.
I have fixed it completely in the CVS.
I also made a fix for 3.3.1, but there the B-state parameters
are always copied from the A-state.

Also available in: Atom PDF