Re: SMD: Fixing centroid

From: Almeida-Hernndez, Yasser, Dr. (
Date: Mon Dec 20 2021 - 07:00:55 CST

Dear all,

I have a similar problem to Moumita, so I will follow the same thread.

In my case, I have a complex of two proteins chains and I want to pull them apart. The complex is aligned such as the vector between the chains COMs is parallel to the X-axis. I want to pull the protein's COMs along that vector in opposite directions. The complex is in a rectangular box of 210 x 118 x 118 A.

I got a colvars configuration file (attached) from a colleague to modify according to my problem, which I did with the Colvars Dashboard plugin.

The file has first a distance colvar to monitor the distance, and then some others to define the application of the forces for each protein on each axis.

If I understood well, the:

ref {
     dummyAtom (X, Y, Z)

section should refer to the COM of each protein, right?

The problem is that, if I put the COM of my proteins, it doesn't work, but it does with the original values coming from a completely different system (in the file).

My COMs are:
COM(A) = [-11.17, 0.40, -0.28]
COM(B) = [36.67, -0.44, 0.97]

In the harmonic definition section, the values are the ones in the original file. Since I want to pull the COMs in opposite direction along the X-axis, I should put my COM_X values in the centers for pull_chainA_x and pull_chainB_x, and larger values for the targetCenters, correct?

Any help will be very appreciated,

Best regards,

From: <> on behalf of Jrme Hnin <>
Sent: Tuesday, December 14, 2021 3:10:25 PM
To: NAMD list; Anup Prasad
Cc: Moumita Saharay
Subject: Re: namd-l: SMD: Fixing centroid

Hi all,

Adding to the answer by Anup: if you pull on a distance colvar, there is probably no need for fixing (or restraining) any group of atoms. However, if you want to pull along a specific direction, you can use the "distanceZ" function, specifying that the axis is not z but x.


----- On 14 Dc 21, at 12:02, Anup Prasad <> wrote:
Hi Dr. Moumita,
I don't think that there is any straightforward command for fixing the centroid of a group of atoms. Instead of it you can try the "distance colvar" module. You have to calculate the centre of mass (com) of the group of atoms and create the dummy atom at this com. Then apply distance colvar between "group of atoms" and "dummy atoms" along with SMD simulation. Fix the dummy atom in SMD instead of a group of atoms.
Defining collective variables (NAMD 2.13 User's Guide)<>
Defining collective variables (NAMD 2.13 User's Guide)


On Tue, 14 Dec 2021 at 15:52, Moumita Saharay <<>> wrote:
Dear all,
I want to perform a constant velocity pulling experiment using
Steered Molecular Dynamics (SMD). I used the following TCL
script to mark the fixed and SMD atoms. It works well when there is
only one atom to be fixed. But I want to fix the centroid of a collection of
CA atoms, for example, CA atoms of GLU203, PHE257, and ASP480.
How do I do that ? Please help me to resolve this issue.

TCL script:
set allatoms [atomselect top all]
$allatoms set beta 0
set fixedatom [atomselect top "resname GLU and resid 203 and name CA"]
$fixedatom set beta 1
$allatoms set occupancy 0
set smdatom [atomselect top "index 10525"]
$smdatom set occupancy 1
$allatoms writepdb smd_step5_01.ref
set smdpos [lindex [$smdatom get {x y z}] 0]
set fixedpos [lindex [$fixedatom get {x y z}] 0]
vecnorm [vecsub $smdpos $fixedpos]


Dr. Moumita Saharay
Assistant Professor,
Department of Systems and Computational Biology,
School of Life Sciences,
University of Hyderabad,
Gachibowli, Hyderabad, India

This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:12 CST