Re: Constraints in NAMD

From: Joshua Adelman (
Date: Wed Apr 22 2009 - 10:37:39 CDT

On Apr 22, 2009, at 7:50 AM, DimitryASuplatov wrote:

> Hello,
> I want to apply harmonic constraints to some atoms of my system.
> To my understanding I have to set
> constraints on
> consexp 2
> ..
> I dont get several things:
> 1/ I want to make en energy minimization and then apply restraints.
> Does that mean that I can not do this in a single run - first I have
> to do the EM, then acquire resulting pdb file and only then start a
> new simulation specifying this file as the reference one?

Yes, you probably have to do this in two steps.

> 2/ What is the format of consref and conskfile files? I could not find
> any examples of the files on the web - only the config file options.
> Can you show me yours?

As it says in the manual, they are pdb files within an altered column
to specify which atoms to restrain and with what force constant. You
can use a single pdb file, by setting the beta column to zero for all
atoms and then setting the ones you want to restrain to 1.0. Then use
the constraintScaling parameter to tune the force constant. In the VMD
tcl console you would do the following to setup the pdb:

set all [atomselect top "all"]
set sel [atomselect top "index 1 or index 5"]

$all set beta 0.0
$sel set beta 1.0

$all writepdb restraint.pdb

then in your config:

constraints on
consref restraint.pdb
conskfile restraint.pdb
conskcol B
constraintScaling 3.0

if you wanted to set the force constant to 3 kcal/mol/A^2

> 3/ I want to gradually decrease the restraints on my atoms. Could I do
> this in a single run?


for {set i 0} {$i <= 6} {incr i 1} {
        set ck [expr {3 - $i*0.5}]
        constraintScaling $ck
run 25000

> 4/ What value is the general maximum for force constraint in NAMD? I
> mean, for example in gromacs setting posres constant to more than 1000
> kJ/mol nm is generally useless since nothing moves already at this
> value.

Do you mean what is a recommended value? Because you can set the force
constant as high as you want in theory, but you'll eventually start
causing problems with the integration of the dynamics. I would just
convert the force constant that you use in gromacs into the units used
by namd.

> Thank you for your time and patience.

Joshua L. Adelman
Biophysics Graduate Group Lab: 510.643.2159
218 Wellman Hall Fax: 510.642.7428
University of California, Berkeley
Berkeley, CA 94720 USA

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:52:39 CST