Re: Collective Variables to Restrain Ions Away From Protein

From: Aron Broom (
Date: Thu Apr 17 2014 - 23:15:35 CDT

So this ought to be possible:

If you use either a colvar like this (but without the boundaries) or just
use a simple distance colvar to the COM of your protein, then make a
harmonic using that, but with a slightly abnormal force constant.

The key would be, you make the force constant for the harmonic negative.
 This should create, rather than a well centered at the protein, a
repulsive hill centered at the protein, and then you can control how far
from the protein the ions tend to get by adjusting the colvar width. This
is essentially how one does the "keep away" rather than "come towards" you

I've used this technique in other MD programs, but never tested it in NAMD.
 I don't see why it wouldn't work though.


On Thu, Apr 17, 2014 at 7:36 PM, Chris Ing <> wrote:

> I'd like to prevent ions from interacting with my membrane-embedded
> protein using collective variables. I wanted to avoid using a modification
> of keep_waters_out.tcl because it seemed too complex / slow. To make
> matters simpler, I only have a handful of neutralizing ions in the box so I
> can make a separate variable for each one.
> I've tried this colvar code below without success. Ions on one side of the
> bilayer seem to be restrained quite nicely but those on the opposite side
> of the box are flocking like crazy to the lipid interface trying to get
> through the bilayer (to what I imagine is the +20-40 Ang region).
> colvar {
> name restrain01
> width 1.0
> lowerBoundary 20.0
> upperBoundary 40.0
> lowerwallconstant 0.5
> upperwallconstant 0.5
> distanceZ {
> # Ion #1
> main {
> atomNumbers { 60984 }
> }
> # C.O.M. of Protein
> ref {
> atomNumbers { 1244 5633 2707 4170 }
> }
> axis ( 0.0, 0.0, 1.0 )
> }
> }
> If I use the distanceZ "period 1.0" flag, I get the warning:
> Lower wall and upper wall are equal in the periodic domain of the colvar:
> disabling walls.
> and the ions don't go anywhere.
> I need to use a specific version of NAMD 2.9 for this task.
> It seems like this could be a common problem, but I was unable to find
> anything on namd-l about restraining things "away from a target" as opposed
> to restraining to a target used in umbrella sampling.
> Thanks,
> -Chris Ing

Aron Broom M.Sc
PhD Student
Department of Chemistry
University of Waterloo

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:22 CST