Light dummy atoms (source code question)

From: Tom Joseph (thomas.joseph_at_mssm.edu)
Date: Wed Oct 31 2007 - 20:58:30 CDT

I recently set up and am running a simulation in NAMD 2.6 with a
representation of the magnesium ion that distributes charges among a
set of dummy atoms [1]. This representation was tested with the
AMBER99 force field, which I'm using. Initially, when trying to run
my simulation, NAMD would give up immediately with a message of the
form "FATAL ERROR: child atom x bonded only to child H atoms".

Armed with gdb and the source code, I found a solution to my problem.
NAMD tags all atoms with weight less than 3.5 as hydrogen atoms for
some internal purpose. My dummy atoms had weight 3.0 and so NAMD
erroneously treated them as hydrogens for this purpose. Changing this
threshold from 3.5 to 2.5 allowed my simulation to run, and so far
it's going fine.

My question is, did I break anything? Also, was there a better way to do this?

And, shouldn't NAMD check the atom name or assigned atom type instead
of just the atomic weight when deciding if an atom is hydrogen? (There
is a similar check for oxygens.) I suspect that the 3.5 threshold is
for deuterium and tritium but perhaps there is some way for light
dummy atoms (and, presumably, dummies with oxygen-like weights) to be
accommodated as well.

Here is my change:

diff -ur OriginalNAMD/NAMD_2.6_Source/src/Molecule.C
BuildNAMD/NAMD_2.6_Source/src/Molecule.C
--- OriginalNAMD/NAMD_2.6_Source/src/Molecule.C 2006-08-18
21:01:00.000000000 -0400
+++ BuildNAMD/NAMD_2.6_Source/src/Molecule.C 2007-10-10 18:08:04.000000000 -0400
@@ -5536,7 +5536,7 @@

     /* Determine the type of the atom (H or O) */
     atoms[i].status = UnknownAtom; // the default
- if (atoms[i].mass <=3.5) {
+ if (atoms[i].mass <=2.5) {
       atoms[i].status |= HydrogenAtom;
     } else if ((atomNames[i].atomname[0] == 'O') &&
          (atoms[i].mass >= 14.0) &&

Thanks very much,
--Tom Joseph

[1] Oelschlaeger et al. Magnesium-Cationic Dummy Atom Molecules
Enhance Representation of DNA Polymerase beta in Molecular Dynamics
Simulations: Improved Accuracy in Studies of Structural Features and
Mutational Effects. J Mol Biol. 2007 February 16; 366(2): 687–701.
http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=1859854

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:27 CST