Re: Keeping potassium ions out of an area during equilibration

From: Vermaas, Joshua (
Date: Tue Jun 06 2017 - 11:59:46 CDT

Hi Charles,

If you only care about keeping things out of the pore, but not really the direction, I'd actually use a coordnum collective variable. You can do the same sort of thing with the tcl forces interface, but there the scripting is a bit less straightforward, since instead of forcing the atom purely along z, technically you may want to force things towards the outside. Performancewise tclforces and collective variables are about equal if you choose sane reaction coordinates. If you use coordnum, this is what you'd do. First, you'd define the K ions as well as what you want to keep them away from:

set allsel [atomselect top "all"]
$allsel set beta 0
set ksel [atomselect top "name K"]
set psel [atosmleect top "noh and protein"]
$ksel set beta 1
$psel set beta 2
$allsel writepdb tags.pdb

Then you'd define a collective variable to drive the number of contacts between the ksel and psel groups to 0 (this goes in a seperate file. colvars.conf or something like that).

colvar {
name contacts
upperWall 0
upperWallConstant 1
coordNum {
group1 {
atomsFile tags.pdb
atomsCol B
atomsColValue 1
group2 {
atomsFile tags.pdb
atomsCol B
atomsColValue 2
#These last three parameters are up to you. See for more info.
cutoff 6
expNumer 8
expDenom 16

Then you'd add the required elements to your NAMD configuration file to use this new coordination number collective variable to eliminate contacts.

colvars on
colvarsConfig colvars.conf


On 06/05/2017 10:04 PM, Charles Hoying wrote:

I have a membrane protein that I want to equilibrate in NAMD without allowing K ions from the solvation/ionization to get close to it. Specifically, it has a pore with stable K+ binding sites on the outside, so during equilibration before I run simulations I want to keep K+ ions away from that pore.

I was thinking of modifying the "keep_water_out.tcl" script from the NAMD Membrane Proteins Tutorial (>) to recognize and keep K+ ions out of the same region, but I don't know how. Specifically, I would like to keep the ions out of the dimensions: (-3 < x < 3), (-3 < y < 3), i.e. the pore axis.

I am open to any and all suggestions whether the script or some other approach can help me solve the problem! Please let me know if there is anything I can clarify to help answer my question.


This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:21 CST