Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::test::TopologyManager Class Reference

#include <gromacs/selection/tests/toputils.h>


Helps create and manage the lifetime of topology and related data structures.

Public Member Functions

void loadTopology (const char *filename)
 Load a topology from an input file relative to the source tree.
void requestFrame ()
 Prepare the memory within a trajectory frame needed for test.
void requestVelocities ()
void requestForces ()
void initFrameIndices (const ArrayRef< const int > &index)
void initAtoms (int count)
 Functions for creating simplistic topologies. More...
void initAtomTypes (const ArrayRef< const char *const > &types)
void initUniformResidues (int residueSize)
void initUniformMolecules (int moleculeSize)
void initTopology (int numMoleculeTypes, int numMoleculeBlocks)
 Functions for creating realistic topologies. More...
void setMoleculeType (int moleculeTypeIndex, ArrayRef< const int > residueSizes)
void setMoleculeBlock (int moleculeBlockIndex, int moleculeTypeIndex, int numMoleculesToAdd)
void finalizeTopology ()
gmx_mtop_t * topology ()
t_atoms & atoms ()
t_trxframe * frame ()

Member Function Documentation

void gmx::test::TopologyManager::initAtoms ( int  count)

Functions for creating simplistic topologies.

These are easy to work with for some kinds of tests.

void gmx::test::TopologyManager::initTopology ( int  numMoleculeTypes,
int  numMoleculeBlocks 

Functions for creating realistic topologies.

Real topologies aren't uniform, so we need to be able to create custom topologies to test against.

Ideally, we'd just be able to push new molecule types and blocks, but the data structures are not mature enough for that yet. The intended usage pattern is to initialize the topology and declare the number of molecule types and blocks, and then call the setter functions to fill in the data structures.

The documentation for this class was generated from the following files: