[gmx-users] dynamic indexing
Anton Feenstra
feenstra at chem.vu.nl
Wed Apr 2 10:22:01 CEST 2003
Christoph Freudenberger wrote:
> hi there,
>
> I'd like to do some sort of "dynamic indexing" in an analysis tool.
>
> If the tool finds an atom to be within a given distance range
> from another atom it should get the atom numbers of all the atoms
> with the same resid to perform further calculations with them.
> What I need is something like the "same resid as..." feature
> in vmd.
>
> I could write a loop that checks the resid for each atom in the
> system, but that would be rather expensive.
>
> Is there a way to do that smarter?
Yes, first build an index of resid's, each with a list of atoms
that belong to that res. You'll need to do that only once, at
the beginning. Later you can simply look op the resid
and you get the list of atoms. You can use the gromacs 'blocks'
structures for that, i.e. an array of indices (indexed by resid)
that index into another, larger array, where all the atoms are.
--
Groetjes,
Anton
_____________ _______________________________________________________
| | |
| _ _ ___,| K. Anton Feenstra |
| / \ / \'| | | Dept. of Pharmacochem. - Vrije Universiteit Amsterdam |
|( | )| | | De Boelelaan 1083 - 1081 HV Amsterdam - Netherlands |
| \_/ \_/ | | | Tel: +31 20 44 47608 - Fax: +31 20 44 47610 |
| | Feenstra at chem.vu.nl - www.chem.vu.nl/~feenstra/ |
| | "If You See Me Getting High, Knock Me Down" |
| | (Red Hot Chili Peppers) |
|_____________|_______________________________________________________|
More information about the gromacs.org_gmx-users
mailing list