[gmx-users] position restraints

Justin Lemkul jalemkul at vt.edu
Mon Mar 25 20:32:01 CET 2013



On 3/25/13 3:25 PM, Shima Arasteh wrote:
> Dear Justin,
>
> As I got, I need to edit the lipid_posre.itp file. To do so, I need to change numbering of position restraining in lipid_posre.itp file to what they are in their original itp file: In my case popc.itp file.
> Am I right?
>

More or less, but for the sake of clarity, let me explain this fully so you can 
hopefully arrive at a resolution quickly.  Say I have a system of arbitrary 
molecules that have 4 atoms each.  Position restraints only work per 
[moleculetype], so using genrestr is somewhat dangerous unless you are working 
with a coordinate file or suitable index file that only specifies a single 
molecule.  Otherwise, the selection is rather ham-handed and actually gives you 
a nonfunctional .itp file (hence the WARNING in the help description). 
Therefore, I can only use atom numbers 1, 2, 3, and 4 in my 
[position_restraints] directive.  Anything above 4 (i.e. based on selecting 
multiple molecules in genrestr) triggers a fatal error.

What then happens is that grompp reads those atoms, and every time it encounters 
those atom numbers within the [moleculetype] (irrespective of how many times 
that molecule appears), restraints are applied as specified.

So, if you want to restrain only P atoms of every POPC molecule, you basically 
need a one-line .itp file.  If, for instance, P is atom number 8:

[ position_restraints ]
    8   1   0    0    1000

That will restrain all P atoms (every time they occur, as grompp finds them 
throughout the coordinate file) in the z-dimension only.  Hopefully that all 
makes sense and this experience has been educational as far as how these things 
work.

-Justin

-- 
========================================

Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================



More information about the gromacs.org_gmx-users mailing list