Re: Asymmetric concentration gradient: non-periodic z-boundary for only ions

From: Athreya, Nagendra Bala Murali (
Date: Wed Sep 02 2020 - 21:35:55 CDT

Hi Dave and JC,

Thank you both. I implemented the system with creating a vacuum region on top and bottom and applied PME covering the particle and vacuum regions. It worked!

From: David Hardy <>
Sent: Thursday, August 27, 2020 10:16 AM
To: <>; JC Gumbart <>
Cc: Athreya, Nagendra Bala Murali <>
Subject: Re: namd-l: Asymmetric concentration gradient: non-periodic z-boundary for only ions

Hi Nagendra,

The coordinate wrapping configuration options affect only the output coordinates, not the simulation itself, so it is purely cosmetic. In fact, you lose information when wrapping by keeping the periodic images of coordinates rather than the original atom coordinates.

I looked through your input files but wasn't clear on how you are handling non-periodicity in Z. To prevent particles from "seeing" each other through PME across the Z boundaries of the cell, you need to have a vacuum region along the top and bottom of your system that, when summed, is greater than the Z max distance between particles. The PME cell that you define covers the particle and vacuum regions. You still need to keep the same 1A resolution grid spacing for PME (assuming 4th order interpolation). The tclBC wall boundaries placed at the top and bottom of the particle layer are to keep the particles out of the vacuum region. If you follow these guidelines, you should never see ions wrapping around the Z-coordinate.

Best regards,

David J. Hardy, Ph.D.
Beckman Institute
University of Illinois at Urbana-Champaign
405 N. Mathews Ave., Urbana, IL 61801<>,
On Aug 25, 2020, at 7:27 PM, JC Gumbart <<>> wrote:
You could try turning it off.  Im not sure that will make the difference, but I could be wrong.  Other things to look at are the serials of the ions you want it to apply to (in the conf file) and perhaps also the range d over which the force is applied.
On Aug 25, 2020, at 4:06 PM, Athreya, Nagendra Bala Murali <<>> wrote:
Hey JC,
Thank you for the helping me out. Sorry for the delayed response as I was trying to run couple to simulations to test various things to fix the issue, which turned out to be unsuccessful.
I had previously tried to replicate similar system as mentioned in your publication with a 2D membrane. I used the script you provided to restrict the ions to maintain asymmetric concentrations (10mM:1M), however, I just observe the ions wrapping around z-coordinate and making a symmetric concentration across the membrane. I also tried the adjust the ratios in the script for K+ and Cl- ions, even this did not work.
Should I use "wrapAll off"? (in your config file, it is still kept on).
From: Gumbart, JC <<>>
Sent: Saturday, August 15, 2020 8:23 PM
To:<> <<>>; Athreya, Nagendra Bala Murali <<>>
Subject: Re: namd-l: Asymmetric concentration gradient: non-periodic z-boundary for only ions
Hi Nagendra,
The ions spreading out is just a visualization artifact of them no longer being wrapped.  The problem, I think, is in your tcl bc script.  Try using "wrapmode cell.
We did something similar to what you want to do in this paper:>  I attach example tclBC inputs for comparison with yours.
On Aug 11, 2020, at 8:50 PM, Athreya, Nagendra Bala Murali <<>> wrote:
I am trying to simulate an ion channel under electric bias with asymmetric concentration gradient conditions (where X,Y-directions can be periodic, however Z-direction needs to be non-periodic for ions). The ions on one side of the channel is 10mM and the other side is 1M.
When I tried to simulate with PBC (using wrapAll = ON), the ions move to the other side and the whole system neutralizes over time.
When I turn wrapAll OFF, and use a tclBC script to push ions from the z-boundaries (as suggested here:, the ions just expand in all directions but everything else remains in the initial defined cuboid.
I am not sure what is going on. I have attached the minimization, equilibration, and script when voltage is applied. Am I missing something?
I would appreciate any help I can get.
Thank you,

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