restraint on a group of atoms at their center of mass?

From: Dan W. (dan_at_omitted.net)
Date: Thu Oct 16 2008 - 14:16:19 CDT

I am new to NAMD and Tcl scripting, but I am trying to restrain a group of
atoms (a ligand) to a specific location during an FEP calculation. The
ligand is growing in from nothing, and without restraints, moves too much
before Lambda reaches 1. I can overcome this by restraining a specific
atom, or set of atoms for the ligand using "constraints on" and specifying
constraints in a PDB file, but this is not ideal. I would like to
constrain the center of mass for this ligand which should allow it to
still rotate in place.

I had two ideas of how to do this, and am not sure if either one would
work. The first would be to add a dummy atom to the PDB file, at the
center of mass of the ligand, and put my restraint on this atom. I am not
sure how to implement this, or if it would have any unintended
consequences on my calculations.

The second idea was to use TclForces to restrain the position of the
ligand. I tried to come up with a script that would do this, but wasn't
able to find enough examples to figure out the exact syntax. To give a
little better idea of what exactly I am trying to do, below is a bit of
what I came up with so far, with comments in the places where I got stuck.

Thanks in advance for any help!

# add ligand atoms
set hal1 1
set hal2 2
   ...
set hal8 8

addatom $hal1
addatom $hal2
   ...
addatom $hal8

# make a group of the ligand atoms
set atomlist {$hal1 $hal2 ... $hal8}
set groupid [addgroup $atomlist]

proc calcforces { } {
        global groupid

        # read in force currently applied to groupid ?
        # scale this force by some amount ?
        # add this scaled force, in the opposite direction, to groupid

}

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:49:59 CST