[gmx-users] g_select and make_ndx

Ivan Gladich ivan.gladich at marge.uochb.cas.cz
Tue May 17 17:16:54 CEST 2011

Dear all
      I would like to calculate the diffusivity coefficient of water in 
a slab geometry i.e. air-water-air.
One of the problem is to avoid from the calculation the waters that 
evaporating from one interface to the other.

My idea was to create an index file that counts for the non-evaporating 
water molecules.
I can do that with the tool g_select

  g_select -f traj-tot.xtc -b 10000 -e 20000 -n index.ndx -s topol.tpr 
-on select_index -select "all and same residue as  (y> 0.2 and y< 7)"

that creates for me a new index file that, for each time step, it 
conserves the index of non evaporating waters (my air-water interface is 
along the y direction).

So this new index will contains 10000 (because I save the trajectory 
every 1 ps) group of the name

[ all_and_same_residue_as_(y>_0.2_and_y<_7)_* ]

My question: is it possible to create a new index file that contains 
only the atom index that are common to all [ 
all_and_same_residue_as_(y>_0.2_and_y<_7)_* ] groups?
In this way I could track all the water molecules that are not 
evaporated in 10 ns simulation....

I know that make_ndx can create a new group that contains  the atom 
indexes that are common  between all the groups..

 > "group1" & "group2"....

but now I have 10000 groups....and I think I will have also problem with 
the name length....

Is there a smarter way to do that?
thanks a lot for any comment or suggestions
Best Regards

Ivan Gladich, Ph.D.
Postdoctoral Fellow
Academy of Sciences of the Czech Republic
Institute of Organic Chemistry and Biochemistry AS CR, v.v.i.
Flemingovo nám. 2.
166 10 Praha 6
Czech Republic

Tel: +420775504164
e-mail: ivan.gladich at uochb.cas.cz
web page:http://www.molecular.cz/~gladich/

More information about the gromacs.org_gmx-users mailing list