Project

General

Profile

Bug #427

Dispersion correction broken with mdrun -rerun

Added by Teemu Murtola over 9 years ago. Updated over 9 years ago.

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

Description

Created an attachment (id=458)
Input files for reproducing the bug

With the latest git master, if I do a mdrun -rerun with a topology that has dispersion correction enabled and if the input trajectory does not have velocities, the dispersion correction energy and pressure seem to be random, most often giving +-Inf values in the log file (multiple runs with the same .tpr file seem to give different values). If velocities are present in the trajectory, everything seems to work. I'm attaching a package with .top, .gro, and .mdp files for reproducing the problem (create a .tpr file from the files, and then rerun with the .gro file as the input trajectory).

rerun_dc_bug.tar.gz (11.2 KB) rerun_dc_bug.tar.gz Input files for reproducing the bug Teemu Murtola, 06/07/2010 01:44 PM

History

#1 Updated by Teemu Murtola over 9 years ago

The problem is that the update_globals() call that calculates the dispersion correction (line 2363 in src/kernel/md.c) gets the box from the variable lastbox, but that is only initialized on line 2237, which is inside an if statement (starting on line 2228) and is only executed if the rerun trajectory contains velocities. So if there are no velocities, the box size passed to update_globals() is uninitialized. I'm not sure what's the best way of fixing this, since following the flow of execution for all the cases in do_md() is quite difficult...

#2 Updated by Berk Hess over 9 years ago

I fixed this.
While I was at it I also made mdrun only read the rerun traj on the master node
and made rerun work with PD.

Berk

Also available in: Atom PDF