[gmx-users] indexing atoms
Mark.Abraham at anu.edu.au
Thu Nov 30 06:14:48 CET 2006
> I am wondering about a response I got a while ago about indexing
> atoms. I am not very familiar with awk, but it seems like a fairly simple
> way to search through a .gro file and find the solvent molecules with a
> particular z-coordinate range, as I need for my simulation. My question
> however, concerns implementing this into an md run. I would like to add
> an acceleration to solvent molecules that are within a certain distance
> from a lipid bilayer. However, if the solvent molecules diffuse too far
> away during the md run, I no longer want them to have an acceleration.
> Therefore, it appears that at every time step I need to perform a check to
> see which solvent molecules are close enough to warrant an acceleration.
> So, is there a way that I can incorporate the awk file such that it runs
> and creates a particular index group at every time step? If not, is there
> some other way that I can check at each time step (or every several time
> steps) which solvent molecules have a particular z-coordinate and give them
> an acceleration?
I presume you've read the relevant manual sections. If there's nothing
useful there, the only way to do something like this would be to get
inside the C code, loop over all solvent molecules after do_force to
check for their position, and then adjust the force on them accordingly.
More information about the gromacs.org_gmx-users