Project

General

Profile

Bug #321

cg / steep minimizations do not write modified configurations to trajectory

Added by Heiko Lammert over 10 years ago. Updated over 10 years ago.

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

Description

In the trr trajectory written during a minimization, using cg or steep,
all frames except the last one are identical to the starting configuration.
The minimization itself does work, as the energy decreases
and a modified final configuration is found and written.

Observed in Gromacs 4.0.3 on x86-64 running Linux, on a single CPU.

do_cg() in minimize.c gets a t_state state_global.
Modified configurations are stored in a local copy, s_min->s.
Frames are written using write_traj(),
which calls fwrite_trn() for the unmodified state_global.

Only after the minimization loop, copy_em_coords_back()
is called for not-parallel runs ( if (!PAR ),
which updates state_global from s_min->s.
The final frame is written after this, using the modified state_global.

The same problem exists in do_steep().

Possible fix:

Calling copy_em_coords_back() after each iteration inside
the minimization loop produces trajectories with updated configurations.

History

#1 Updated by Berk Hess over 10 years ago

I fixed it.
Note that this problem only occured when not running in parallel.

Berk

Also available in: Atom PDF