STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::testing::TestSystemManager Class Reference

Provide the means to read a series of topology and coordinate files, then organize them into corresponding lists of AtomGraph and PhaseSpace objects. The object can also export coordinates in other formats. Error checking is provided to abort the (test) program or issue a warning, and the object can signal whether dependent tests should be run or aborted. More...

#include <test_system_manager.h>

Public Member Functions

std::string getTopologyBasePath () const
 Return the base path for topologies.
 
std::string getCoordinateBasePath () const
 Return the base path for coordinates.
 
std::string getTopologyExtension () const
 Return the extension for topologies.
 
std::string getCoordinateExtension () const
 Return the extension for coordinates.
 
std::string getTopologyFile (int index) const
 Return the full name of a topology file according to some index in the list.
 
std::string getCoordinateFile (int index) const
 Return the full name of a coordinate file according to some index in the list.
 
CoordinateFrame exportCoordinateFrame (int index) const
 Get a copy of the coordinates for one system as a CoordinateFrame object.
 
PhaseSpace exportPhaseSpace (int index) const
 Get a copy of the coordinates for one system as a PhaseSpace object.
 
AtomGraph exportAtomGraph (int index) const
 Export the topology for one system.
 
template<typename T>
CoordinateSeries< T > exportCoordinateSeries (const int base_system, int frame_count, double perturbation_sigma=0.0, int xrs_seed=915083, int scale_bits=0) const
 Get a coordinate series out of the object, based on one system from its repository.
 
 TestSystemManager ()
 The constructor takes lists of topologies, then lists of coordinates, with a one-to-one correspondence of files in each list.
 
 TestSystemManager (const std::string &topology_base_in, const std::string &topology_extn_in, const std::vector< std::string > &topology_names_in, const std::string &coordinate_base_in, const std::string &coordinate_extn_in, const std::vector< std::string > &coordinate_names_in, ExceptionResponse policy=ExceptionResponse::WARN, TestPriority fault_response_in=TestPriority::ABORT, TestPriority all_go_response_in=TestPriority::CRITICAL, const DynamicsControls &dyncon=DynamicsControls())
 
 TestSystemManager (const std::string &topology_base_in, const std::string &topology_extn_in, const std::vector< std::string > &topology_names_in, const std::string &coordinate_base_in, const std::string &coordinate_extn_in, const std::vector< std::string > &coordinate_names_in, const DynamicsControls &dyncon, ExceptionResponse policy=ExceptionResponse::WARN)
 
 TestSystemManager (const std::string &topology_base_in, const std::vector< std::string > &topology_names_in, const std::string &coordinate_base_in, const std::vector< std::string > &coordinate_names_in, ExceptionResponse policy=ExceptionResponse::WARN, TestPriority fault_response_in=TestPriority::ABORT, TestPriority all_go_response_in=TestPriority::CRITICAL, const DynamicsControls &dyncon=DynamicsControls())
 
 TestSystemManager (const std::string &topology_base_in, const std::vector< std::string > &topology_names_in, const std::string &coordinate_base_in, const std::vector< std::string > &coordinate_names_in, const DynamicsControls &dyncon, ExceptionResponse policy=ExceptionResponse::WARN)
 
 TestSystemManager (const std::vector< std::string > &topology_names_in, const std::vector< std::string > &coordinate_names_in, ExceptionResponse policy=ExceptionResponse::WARN, TestPriority fault_response_in=TestPriority::ABORT, TestPriority all_go_response_in=TestPriority::CRITICAL, const DynamicsControls &dyncon=DynamicsControls())
 
 TestSystemManager (const std::vector< std::string > &topology_names_in, const std::vector< std::string > &coordinate_names_in, const DynamicsControls &dyncon, ExceptionResponse policy=ExceptionResponse::WARN)
 
int getSystemCount () const
 Get the number of systems in the object.
 
int getSystemCount (UnitCellType query_bc) const
 
int getSystemCount (const std::vector< UnitCellType > &query_bc) const
 
std::vector< int > getQualifyingSystems (UnitCellType uc_choice) const
 Get a list of all topologies meeting a specific unit cell type.
 
std::vector< int > getQualifyingSystems (const std::vector< UnitCellType > &uc_choice) const
 
std::vector< int > getQualifyingSystems (int critical_atom_count, RelationalOperator rel) const
 
TestPriority getTestingStatus () const
 Get the planned course of action for subsequent tests in the event that a file is non-existent, or for any reason unreadable.
 
TestPriority getTestingStatus (int index) const
 
TestPriority getTestingStatus (const std::vector< int > &indices) const
 
const PhaseSpaceviewCoordinates (int index)
 Get a const reference to the coordinates for one or more systems.
 
const std::vector< PhaseSpace > & viewCoordinates ()
 
const AtomGraphgetTopologyReference (int index) const
 Get a const reference to the topology for one or more systems.
 
const std::vector< AtomGraph > & getTopologyReference () const
 
AtomGraphgetTopologyPointer (int index)
 Get a pointer to one or more topologies.
 
const AtomGraphgetTopologyPointer (int index) const
 
std::vector< AtomGraph * > getTopologyPointer ()
 
const std::vector< AtomGraph * > getTopologyPointer () const
 
PhaseSpaceSynthesis exportPhaseSpaceSynthesis (const std::vector< int > &index_key, double perturbation_sigma=0.0, int xrs_seed=7108262, int scale_bits=40, int vel_bits=default_velocity_scale_bits, int frc_bits=default_force_scale_bits) const
 Get a synthesis of coordinates with fixed-precision storage ready for positions, velocities, and forces.
 
PhaseSpaceSynthesis exportPhaseSpaceSynthesis (UnitCellType uc_choice) const
 
PhaseSpaceSynthesis exportPhaseSpaceSynthesis (const std::vector< UnitCellType > &uc_choice) const
 
AtomGraphSynthesis exportAtomGraphSynthesis (const std::vector< int > &index_key, ExceptionResponse policy=ExceptionResponse::SILENT, const GpuDetails &gpu=null_gpu) const
 Get a synthesis of topologies based on a series of system indices from the manager.
 
AtomGraphSynthesis exportAtomGraphSynthesis (UnitCellType uc_choice, ExceptionResponse policy=ExceptionResponse::SILENT, const GpuDetails &gpu=null_gpu) const
 
AtomGraphSynthesis exportAtomGraphSynthesis (const std::vector< UnitCellType > &uc_choice, ExceptionResponse policy=ExceptionResponse::SILENT, const GpuDetails &gpu=null_gpu) const
 
SystemCache exportSystemCache (const std::vector< int > &index_key, const TestEnvironment &oe, const std::vector< std::string > &x_name_list={}, const std::vector< CoordinateFileKind > &x_type_list={}, const std::vector< std::string > &r_name_list={}, const std::vector< CoordinateFileKind > &r_type_list={}, const std::vector< std::string > &label_list={})
 Produce a SystemCache based on a compilation of the systems read into the manager.
 
SystemCache exportSystemCache (const std::string &fnml)
 

Detailed Description

Provide the means to read a series of topology and coordinate files, then organize them into corresponding lists of AtomGraph and PhaseSpace objects. The object can also export coordinates in other formats. Error checking is provided to abort the (test) program or issue a warning, and the object can signal whether dependent tests should be run or aborted.

Constructor & Destructor Documentation

◆ TestSystemManager()

stormm::testing::TestSystemManager::TestSystemManager ( )

The constructor takes lists of topologies, then lists of coordinates, with a one-to-one correspondence of files in each list.

Overloaded:

  • Create a blank object (so that this object can be easily containerized)
  • Accept straight lists of file names for both topologies and the coordinates
  • Accept a common base name and extension for the topologies and the coordinates
  • Accept a common base name for the topologies and the coordinates

Member Function Documentation

◆ exportAtomGraph()

AtomGraph stormm::testing::TestSystemManager::exportAtomGraph ( int index) const

Export the topology for one system.

Parameters
indexThe system of interest.

◆ exportAtomGraphSynthesis()

AtomGraphSynthesis stormm::testing::TestSystemManager::exportAtomGraphSynthesis ( const std::vector< int > & index_key,
ExceptionResponse policy = ExceptionResponse::SILENT,
const GpuDetails & gpu = null_gpu ) const

Get a synthesis of topologies based on a series of system indices from the manager.

Overloaded:

  • Select a list of systems based on their indices within the manager
  • Select all systems conforming to one or more specific types of unit cell (a critical factor in building a synthesis is that all systems use similar boundary conditions)

Descriptions of parameters follow from getPhaseSpaceSynthesis() above, with the addition of:

Parameters
policySpecify whether to report abnormal input. In most cases, the AtomGraphSynthesis will report being given a longer list of topologies than was required (unused topologies). For most testing purposes, this is benign, and should not be raised to the end user's attention.
gpuDetails of the GPU that will handle the workload (this helps in laying out valence work units)

◆ exportCoordinateFrame()

CoordinateFrame stormm::testing::TestSystemManager::exportCoordinateFrame ( int index) const

Get a copy of the coordinates for one system as a CoordinateFrame object.

Parameters
indexThe system of interest

◆ exportCoordinateSeries()

template<typename T>
CoordinateSeries< T > stormm::testing::TestSystemManager::exportCoordinateSeries ( const int base_system,
int frame_count,
double perturbation_sigma = 0.0,
int xrs_seed = 915083,
int scale_bits = 0 ) const

Get a coordinate series out of the object, based on one system from its repository.

Parameters
base_system
frame_countThe number of frames in the series, each a copy of the original coordinate set
perturbation_sigmaThe Gaussian width by which to perturb coordinates
xrs_seedRandom number generator seed
scale_bitsThe number of bits after the decimal to include, if the data type of the coordinate series is integral (fixed precision)

◆ exportPhaseSpace()

PhaseSpace stormm::testing::TestSystemManager::exportPhaseSpace ( int index) const

Get a copy of the coordinates for one system as a PhaseSpace object.

Parameters
indexThe system of interest

◆ exportPhaseSpaceSynthesis()

PhaseSpaceSynthesis stormm::testing::TestSystemManager::exportPhaseSpaceSynthesis ( const std::vector< int > & index_key,
double perturbation_sigma = 0.0,
int xrs_seed = 7108262,
int scale_bits = 40,
int vel_bits = default_velocity_scale_bits,
int frc_bits = default_force_scale_bits ) const

Get a synthesis of coordinates with fixed-precision storage ready for positions, velocities, and forces.

Overloaded:

  • Select a list of systems based on their indices within the manager
  • Select all systems conforming to one or more specific types of unit cell (a critical factor in building a synthesis is that all systems use similar boundary conditions)

Parameter descriptions follow from getCoordinateSeries() above, with the addition of:

Parameters
index_keyA series of system indices from within the TestSystemManager with which to compose the synthesis. Topologies and coordinates will be drawn upon.
uc_choiceThe choice or choices of unit cell to select (one instance of each matching system will be included in the result)
vel_bitsThe number of bits in the fraction for the velocity representation
frc_bitsThe number of bits in the fraction for the force representation

◆ exportSystemCache()

SystemCache stormm::testing::TestSystemManager::exportSystemCache ( const std::vector< int > & index_key,
const TestEnvironment & oe,
const std::vector< std::string > & x_name_list = {},
const std::vector< CoordinateFileKind > & x_type_list = {},
const std::vector< std::string > & r_name_list = {},
const std::vector< CoordinateFileKind > & r_type_list = {},
const std::vector< std::string > & label_list = {} )

Produce a SystemCache based on a compilation of the systems read into the manager.

Overloaded:

  • Accept a list of system indices, and optionally labels to apply
  • Accept a string input for a &files namelist
Parameters
index_keyA series of system indices from within the TestSystemManager with which to compose the cache. Topologies and coordinates will be drawn upon.
x_name_listA list of trajectory file names for each cache item
x_type_listA list of file types for each trajectory file to write
r_name_listA list of restart file names for each cache item
r_type_listA list of file types for each restart file to write
label_listA list of labels to apply to each cache item. If provided, this array have the same length as index_key.
fnmlA string containing the contents of a &files namelist

◆ getQualifyingSystems()

std::vector< int > stormm::testing::TestSystemManager::getQualifyingSystems ( UnitCellType uc_choice) const

Get a list of all topologies meeting a specific unit cell type.

Overloaded:

  • Return a list of topologies matching one selected unit cell type.
  • Return a list of topologies matching any of a list of unit cell types.
Parameters
uc_choiceThe unit cell type of interest

◆ getSystemCount()

int stormm::testing::TestSystemManager::getSystemCount ( ) const

Get the number of systems in the object.

Overloaded:

  • Obtain the total number of systems
  • Obtain the number of systems adhering to selected boundary conditions
Parameters
query_bcThe boundary conditions of interest

◆ getTestingStatus()

TestPriority stormm::testing::TestSystemManager::getTestingStatus ( ) const

Get the planned course of action for subsequent tests in the event that a file is non-existent, or for any reason unreadable.

Overloaded:

  • Return a general status for any and all systems covered by the manager
  • Return a specific status for an individual system by index
  • Return the overall status for a collections of systems, specified by index
Parameters
indexIndex of the system of interest
indicesIndices of the systems of interest

◆ getTopologyPointer()

AtomGraph * stormm::testing::TestSystemManager::getTopologyPointer ( int index)

Get a pointer to one or more topologies.

Overloaded:

  • Get a pointer to a single topology
  • Get a vector of pointers to all topologies in order
  • Return const results for a const object or non-const results for a non-const object
Parameters
indexIdentifier of a specific topology of interest

◆ getTopologyReference()

const AtomGraph & stormm::testing::TestSystemManager::getTopologyReference ( int index) const

Get a const reference to the topology for one or more systems.

Overloaded:

  • Get a reference to a single topology
  • Get a reference to the vector of all topologies in order
Parameters
indexThe system of interest

◆ viewCoordinates()

const PhaseSpace & stormm::testing::TestSystemManager::viewCoordinates ( int index)

Get a const reference to the coordinates for one or more systems.

Overloaded:

  • Get a reference to a single coordinate set
  • Get a const reference to the vector of all coordinate sets
Parameters
indexThe system of interest

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