#include "gromacs/topology/topology.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/gmxassert.h"
This file contains inline functions to look up atom information using the global atom index.
- Author
- Berk Hess hess@.nosp@m.kth..nosp@m.se
|
static void | mtopGetMolblockIndex (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock, int *moleculeIndex, int *atomIndexInMolecule) |
| Look up the molecule block and other indices of a global atom index. More...
|
|
static int | mtopGetMoleculeIndex (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock) |
| Returns the global molecule index of a global atom index. More...
|
|
static const t_atom & | mtopGetAtomParameters (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock) |
| Returns the atom data for an atom based on global atom index. More...
|
|
static real | mtopGetAtomMass (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock) |
| Returns the mass of an atom based on global atom index. More...
|
|
static void | mtopGetAtomAndResidueName (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock, const char **atomName, int *residueNumber, const char **residueName, int *globalResidueIndex) |
| Look up the atom and residue name and residue number and index of a global atom index. More...
|
|
static const t_resinfo & | mtopGetResidueInfo (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock) |
| Returns residue information for an atom based on global atom index. More...
|
|
static const t_pdbinfo & | mtopGetAtomPdbInfo (const gmx_mtop_t &mtop, int globalAtomIndex, int *moleculeBlock) |
| Returns PDB information for an atom based on global atom index. More...
|
|
static void mtopGetAtomAndResidueName |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock, |
|
|
const char ** |
atomName, |
|
|
int * |
residueNumber, |
|
|
const char ** |
residueName, |
|
|
int * |
globalResidueIndex |
|
) |
| |
|
inlinestatic |
Look up the atom and residue name and residue number and index of a global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time. Note that this function does a (somewhat expensive) lookup. If you want to look up data sequentially for all atoms in a molecule or the system, use one of the mtop loop functionalities.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
[out] | atomName | The atom name, input can be NULL |
[out] | residueNumber | The residue number, input can be NULL |
[out] | residueName | The residue name, input can be NULL |
[out] | globalResidueIndex | The gobal residue index, input can be NULL |
static real mtopGetAtomMass |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock |
|
) |
| |
|
inlinestatic |
Returns the mass of an atom based on global atom index.
Returns that A-state mass of the atom with global index globalAtomIndex
. The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
static const t_atom& mtopGetAtomParameters |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock |
|
) |
| |
|
inlinestatic |
Returns the atom data for an atom based on global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
static const t_pdbinfo& mtopGetAtomPdbInfo |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock |
|
) |
| |
|
inlinestatic |
Returns PDB information for an atom based on global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
static void mtopGetMolblockIndex |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock, |
|
|
int * |
moleculeIndex, |
|
|
int * |
atomIndexInMolecule |
|
) |
| |
|
inlinestatic |
Look up the molecule block and other indices of a global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
[out] | moleculeIndex | The index of the molecule in the block, can be NULL |
[out] | atomIndexInMolecule | The atom index in the molecule, can be NULL |
static int mtopGetMoleculeIndex |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock |
|
) |
| |
|
inlinestatic |
Returns the global molecule index of a global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |
static const t_resinfo& mtopGetResidueInfo |
( |
const gmx_mtop_t & |
mtop, |
|
|
int |
globalAtomIndex, |
|
|
int * |
moleculeBlock |
|
) |
| |
|
inlinestatic |
Returns residue information for an atom based on global atom index.
The atom index has to be in range: 0 <= globalAtomIndex
< mtop->natoms
. The input value of moleculeBlock should be in range. Use 0 as starting value. For subsequent calls to this function, e.g. in a loop, pass in the previously returned value for best performance. Atoms in a group tend to be in the same molecule(block), so this minimizes the search time.
- Parameters
-
[in] | mtop | The molecule topology |
[in] | globalAtomIndex | The global atom index to look up |
[in,out] | moleculeBlock | The molecule block index in mtop |