[gmx-users] Exclude ions from spherical region

Joshua Adelman jla65 at pitt.edu
Tue Jul 16 18:00:40 CEST 2013

I am in the process of evaluating whether Gromacs is suitable for a simulation that I'm planning to conduct, and I was hoping that more experienced users might provide insight into whether the following is possible: I want to exclude a subset of molecules (i.e. all but one or two ions in the system) from a spherical region centered at the origin using a half-harmonic restraint. In this setup, the ions would not feel an external force if they were a distance greater than R away from (0, 0, 0), and but they would be repelled from the excluded sphere with some appropriate force constant at distance less than R.

I looked at the distance restraint feature, which appears to have the capability of providing a restraint with a half-harmonic shape. I believe if I set r_1 from Fig 4.13 in the 4.6.3 Manual (up1) to a distance larger than the simulation box's extent this would get me a restraint of the correct function form (unless I'm missing a subtly of how it works). However, it looks like this must be defined between two explicit atoms, whereas I want the distance measured between an atom and a point in the lab frame. 

I also looked at the pull code, which appears to provide a way of measuring distances from the origin by leaving pull-group0 empty. This functionality, however, does not appear to support a flat bottom region in the restraint. Unless I'm mistaken, it looks like the only option is to have a standard harmonic restraint via the umbrella option. 

If anyone has insight into how to get the desired functionality using Gromacs. I would appreciate it. I have seen some suggestion on the list for a hacked in version of a flat-bottom potential, but I would prefer a solution that didn't involve modifying the code if possible.

Best wishes,

More information about the gromacs.org_gmx-users mailing list