STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::diskutil::CoordinateSeries< T > Class Template Reference

Store the coordinates and box information for a series of frames, in one of several levels of precision. Individual frames can be extracted into CoordinateFrame, and PhaseSpace, and PhaseSpaceSynthesis objects, or new frames can be added from CoordinateFrame objects. This object is not the CoordinateFrame equivalent of a PhaseSpaceSynthesis object, however: its purpose is to collect only the coordinates of many frames of a single system at the appropriate level of precision. More...

#include <coordinate_series.h>

Public Member Functions

 CoordinateSeries (const CoordinateSeries &original, HybridFormat format_in)
 A special copy constructor can create an object with an altered memory format.
 
HybridFormat getFormat () const
 Get the memory format.
 
int getAtomCount () const
 Get the number of atoms in each frame of the series.
 
int getFrameCount () const
 Get the number of frames in the series.
 
int getFrameCapacity () const
 Get the maximum number of frames that the object can hold.
 
UnitCellType getUnitCellType () const
 Get the unit cell type of the coordinate system.
 
int getFixedPrecisionBits () const
 Get the fixed precision bits after the decimal (if applicable, warn if the data type is non-integer).
 
std::vector< double > getBoxSpaceTransform (int frame_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the transformation matrix to take coordinates into box (fractional) space. The result should be interpreted as a 3x3 matrix in column-major format.
 
std::vector< double > getInverseTransform (int frame_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the transformation matrix to take coordinates from fractional space back into real space. The result should be interpreted as a 3x3 matrix in column-major format.
 
CoordinateFrame exportFrame (size_t frame_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Prepare a CoordinateFrame object based on one frame of the series, accomplishing any necessary data conversions to put the coordinates back into the familiar double-precision format.
 
PhaseSpace exportPhaseSpace (size_t frame_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Prepare a PhaseSpace object based on one frame of the series, accomplishing any data conversions needed to put the coordinates back into the familiar double-precision format.
 
void exportToFile (const std::string &file_name, CoordinateFileKind output_kind=CoordinateFileKind::AMBER_CRD, PrintSituation expectation=PrintSituation::UNKNOWN, int low_index=0, int high_index=0, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Export the contents of this coordinate series to a trajectory file.
 
const Hybrid< T > & getCoordinateReference (CartesianDimension dim) const
 Get a const reference to the one of the Cartesian coordinate arrays.
 
const Hybrid< T > * getCoordinatePointer (CartesianDimension dim) const
 Get a const pointer to one of the Cartesian coordinate arrays.
 
const Hybrid< double > & getBoxTransforms () const
 Get a const reference to the box space transformation matrices.
 
const Hybrid< double > * getBoxTransformPointer () const
 Get a const pointer to the box space transformation matrices.
 
const Hybrid< double > & getInverseTransforms () const
 Get a const reference to the box space transformation matrices.
 
const Hybrid< double > * getInverseTransformPointer () const
 Get a const pointer to the box space transformation matrices.
 
const Hybrid< double > * getBoxDimensionPointer () const
 Get a const pointer to the list of box dimensions for all frames.
 
const CoordinateSeries< T > * getSelfPointer () const
 Get a const pointer to the object iself, so that it may be passed to functions by const reference and still emit a const poiner.
 
void importFromFile (const std::string &file_name, CoordinateFileKind file_kind=CoordinateFileKind::UNKNOWN, const std::vector< int > &frame_numbers={}, int replica_count=1, int frame_index_start=-1)
 Import coordinates from a file. This function accepts directives to read a subset of the coordinates and integrate them into the series at a specified point.
 
void reserve (const int new_frame_capacity)
 Reserve capacity in this series. The new frames will be uninitialized.
 
void shrinkToFit ()
 Shrink the object's various arrays to accommodate only the current frame and atom counts. Mimics the Standard Template Library vector shrink_to_fit() member function.
 
 CoordinateSeries (int natom_in=0, int nframe_in=0, UnitCellType unit_cell_in=UnitCellType::NONE, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 There are several options for constructing this collection of coordinate frames.
 
 CoordinateSeries (const std::string &file_name, int atom_count_in=0, CoordinateFileKind file_kind=CoordinateFileKind::UNKNOWN, const std::vector< int > &frame_numbers={}, int replica_count=1, UnitCellType unit_cell_in=UnitCellType::NONE, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 
 CoordinateSeries (PhaseSpace *ps, int nframe_in, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 
 CoordinateSeries (const PhaseSpace &ps, int nframe_in, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 
 CoordinateSeries (CoordinateFrame *cf, int nframe_in, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 
 CoordinateSeries (const CoordinateFrame &cf, int nframe_in, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 
 CoordinateSeries (const CoordinateSeries &original)=default
 Use the default copy and move constructors, copy and move assignment operators. This object has no const members to trigger implicit deletions and no POINTER-kind Hybrid objects to repair.
 
 CoordinateSeries (CoordinateSeries &&original)=default
 
CoordinateSeriesoperator= (const CoordinateSeries &other)=default
 
CoordinateSeriesoperator= (CoordinateSeries &&other)=default
 
template<typename Toriginal>
 CoordinateSeries (const CoordinateSeries< Toriginal > &original, int globalpos_scale_bits_in=0, HybridFormat format_in=default_hpc_format)
 Special copy constructor to take a CoordinateSeries of one data type into another. The implementation requires a special declaration (template <typename T> template <typename Toriginal>...) with two uses of the template keyword because of the nested nature of these templates. In other contexts template <typename T, typename Toriginal> would suffice.
 
template<typename Treport>
std::vector< Treport > getInterlacedCoordinates (int frame_index, int globalpos_bits_out=-1, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the interlaced coordinates of one frame.
 
template<typename Treport>
std::vector< Treport > getInterlacedCoordinates (int frame_index, int low_index, int high_index, int globalpos_bits_out=-1, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 
std::vector< double > getBoxDimensions (int frame_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the box dimensions in their pure form for a particular frame.
 
const Hybrid< double > & getBoxDimensions () const
 
void extractFrame (CoordinateFrame *cf, size_t frame_index, const GpuDetails &gpu) const
 Extract coordinates to a pre-existing object.
 
void extractFrame (PhaseSpace *ps, size_t frame_index, TrajectoryKind kind, CoordinateCycle time_point, const GpuDetails &gpu) const
 
void extractFrame (PhaseSpace *ps, size_t frame_index, TrajectoryKind kind, const GpuDetails &gpu) const
 
void extractFrame (PhaseSpace *ps, size_t frame_index, const GpuDetails &gpu) const
 
void extractFrame (CoordinateFrame *cf, size_t frame_index, HybridTargetLevel tier) const
 
void extractFrame (PhaseSpace *ps, size_t frame_index, TrajectoryKind kind, CoordinateCycle time_point, HybridTargetLevel tier) const
 
void extractFrame (PhaseSpace *ps, size_t frame_index, TrajectoryKind kind, HybridTargetLevel tier) const
 
void extractFrame (PhaseSpace *ps, size_t frame_index, HybridTargetLevel tier) const
 
const Hybrid< T > * getFramesHandle (CartesianDimension dim) const
 Get a pointer to one of the coordinate arrays.
 
Hybrid< T > * getFramesHandle (CartesianDimension dim)
 
const Hybrid< double > * getBoxTransformsHandle () const
 Get a pointer to the box space transform. Overloading follows from getCoordinateHandle(), above.
 
Hybrid< double > * getBoxTransformsHandle ()
 
const Hybrid< double > * getInverseTransformsHandle () const
 Get a pointer to the inverse transform that takes coordinates back into real space. Overloading follows from getCoordinateHandle(), above.
 
Hybrid< double > * getInverseTransformsHandle ()
 
const Hybrid< double > * getBoxDimensionsHandle () const
 Get a pointer to the transform that takes coordinates back into real space. Overloading follows from getCoordinateHandle(), above.
 
Hybrid< double > * getBoxDimensionsHandle ()
 
const CoordinateSeriesReader< T > data (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the abstract for this object, containing C-style pointers for the most rapid access to any of its member variables.
 
CoordinateSeriesWriter< T > data (HybridTargetLevel tier=HybridTargetLevel::HOST)
 
const CoordinateSeriesReader< void > templateFreeData (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the object's abstract, with all templated type pointers cast to void pointers. The true data type can be encoded in a separate 64-bit unsigned integer code (use std::type_index() as seen in DataTypes/common_types.h). Parameter descriptions and overloading match those in data() above.
 
CoordinateSeriesWriter< void > templateFreeData (HybridTargetLevel tier=HybridTargetLevel::HOST)
 
void importFrame (const CoordinateFrameReader &cfr, int atom_start, int atom_end, int frame_index=-1)
 Import coordinates from a CoordinateFrame or PhaseSpace object. The original object must have the same number of atoms as the CoordinateSeries itself, or else a range of atoms within the original coordinate object must be specified that fits the CoordinateSeries. The default behavior is to push the new coordinates to the back of the list, but any frame index within the bounds of the current list may also be specified.
 
void importFrame (const CoordinateFrameReader &cfr, int frame_index=-1)
 
void importFrame (const CoordinateFrameWriter &cfw, int atom_start, int atom_end, int frame_index=-1)
 
void importFrame (const CoordinateFrameWriter &cfw, int frame_index=-1)
 
void importFrame (const CoordinateFrame &cf, int atom_start, int atom_end, int frame_index=-1)
 
void importFrame (const CoordinateFrame &cf, int frame_index=-1)
 
void importFrame (const CoordinateFrame *cf, int atom_start, int atom_end, int frame_index=-1)
 
void importFrame (const CoordinateFrame *cf, int frame_index=-1)
 
void importFrame (const PhaseSpace &ps, int atom_start, int atom_end, int frame_index=-1, TrajectoryKind kind=TrajectoryKind::POSITIONS, CoordinateCycle orientation=CoordinateCycle::WHITE)
 
void importFrame (const PhaseSpace &ps, int frame_index=-1, TrajectoryKind kind=TrajectoryKind::POSITIONS, CoordinateCycle orientation=CoordinateCycle::WHITE)
 
void importFrame (const PhaseSpace *ps, int atom_start, int atom_end, int frame_index=-1, TrajectoryKind kind=TrajectoryKind::POSITIONS, CoordinateCycle orientation=CoordinateCycle::WHITE)
 
void importFrame (const PhaseSpace *ps, int frame_index=-1, TrajectoryKind kind=TrajectoryKind::POSITIONS, CoordinateCycle orientation=CoordinateCycle::WHITE)
 
void resize (int new_frame_count)
 Resize the series, allocating new capacity if needed, initializing new frames with the provided coordinate set. ("New" frames are defined as any frames with indices greater than the original maximum index, regardless of whether new capacity was allocated to hold them or if the size simply increased within the existing space available.)
 
void resize (int new_frame_count, const CoordinateFrameReader &cfr, int atom_start=0, int atom_end=0)
 
void resize (int new_frame_count, const CoordinateFrameWriter &cfw, int atom_start=0, int atom_end=0)
 
void resize (int new_frame_count, const CoordinateFrame &cf, int atom_start=0, int atom_end=0)
 
void resize (int new_frame_count, CoordinateFrame *cf, int atom_start=0, int atom_end=0)
 
void resize (int new_frame_count, const PhaseSpace &ps, int atom_start=0, int atom_end=0)
 
void resize (int new_frame_count, PhaseSpace *ps, int atom_start=0, int atom_end=0)
 
void pushBack (const CoordinateFrameReader &cfr, int atom_start=0, int atom_end=0)
 Push a coordinate set to the back of the list. This invokes the import member function after reallocating the frame series with 25% spare capacity if the original capacity is insufficient.
 
void pushBack (const CoordinateFrameWriter &cfw, int atom_start=0, int atom_end=0)
 
void pushBack (const CoordinateFrame &cf, int atom_start=0, int atom_end=0)
 
void pushBack (CoordinateFrame *cf, int atom_start=0, int atom_end=0)
 
void pushBack (const PhaseSpace &ps, int atom_start=0, int atom_end=0)
 
void pushBack (PhaseSpace *ps, int atom_start=0, int atom_end=0)
 

Detailed Description

template<typename T>
class stormm::diskutil::CoordinateSeries< T >

Store the coordinates and box information for a series of frames, in one of several levels of precision. Individual frames can be extracted into CoordinateFrame, and PhaseSpace, and PhaseSpaceSynthesis objects, or new frames can be added from CoordinateFrame objects. This object is not the CoordinateFrame equivalent of a PhaseSpaceSynthesis object, however: its purpose is to collect only the coordinates of many frames of a single system at the appropriate level of precision.

Constructor & Destructor Documentation

◆ CoordinateSeries() [1/4]

template<typename T>
stormm::trajectory::CoordinateSeries< T >::CoordinateSeries ( int natom_in = 0,
int nframe_in = 0,
UnitCellType unit_cell_in = UnitCellType::NONE,
int globalpos_scale_bits_in = 0,
HybridFormat format_in = default_hpc_format )
explicit

There are several options for constructing this collection of coordinate frames.

Overloaded:

  • Allocate to hold a given number of atoms and frames
  • Create from any of the coordinate file formats (restart and input coordinate formats will create only one frame, but this limit can be increased later)
  • From an existing PhaseSpace or CoordinateFrame object (as a pointer or a copy, with the option to make many copies immediately)
Parameters
natom_inThe number of atoms expected
nframe_inInitial number of frames to allocate for
unit_cell_inThe type of unit cell to prepare for (this can be modified after creating the object)
file_nameFile to read from
frame_numbers_inFrame numbers of the file to read (default all frames)
replica_count_inThe number of times to replicate a series of one of more frames read from a file (this is useful for immediately making many copies of a restrart or input coordinates file, which has only one frame)
atom_count_inThe number of atoms to expect (critical if the input file is an Amber .crd format trajectory, otherwise can be left at zero to be filled in when the file is read)
psPre-existing object with a complete coordinate set to use as a template. When constructing from a pre-existing PhaseSpace object, nframe_in indicates a number of copies to allocate for and create.
cfPre-existing object with a complete coordinate set to use as a template. When constructing from a pre-existing CoordinateFrame, nframe_in indicates a number of copies to allocate for and create.

◆ CoordinateSeries() [2/4]

template<typename T>
stormm::trajectory::CoordinateSeries< T >::CoordinateSeries ( const CoordinateSeries< T > & original)
default

Use the default copy and move constructors, copy and move assignment operators. This object has no const members to trigger implicit deletions and no POINTER-kind Hybrid objects to repair.

Parameters
originalThe original object, being copied or moved
otherThe other object, being copied or moved by assignment

◆ CoordinateSeries() [3/4]

template<typename T>
stormm::trajectory::CoordinateSeries< T >::CoordinateSeries ( const CoordinateSeries< T > & original,
HybridFormat format_in )
explicit

A special copy constructor can create an object with an altered memory format.

Parameters
originalThe original object, being copied or moved
format_inThe format to apply to the new object. Content is subject to the priority of the deepCopy() function for Hybrid objects, as it is with the PhaseSpace and CoordinateFrame objects.

◆ CoordinateSeries() [4/4]

template<typename T>
template<typename Toriginal>
stormm::trajectory::CoordinateSeries< T >::CoordinateSeries ( const CoordinateSeries< Toriginal > & original,
int globalpos_scale_bits_in = 0,
HybridFormat format_in = default_hpc_format )

Special copy constructor to take a CoordinateSeries of one data type into another. The implementation requires a special declaration (template <typename T> template <typename Toriginal>...) with two uses of the template keyword because of the nested nature of these templates. In other contexts template <typename T, typename Toriginal> would suffice.

Parameters
originalThe original object, being copied or moved

Member Function Documentation

◆ data()

template<typename T>
const CoordinateSeriesReader< T > stormm::trajectory::CoordinateSeries< T >::data ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the abstract for this object, containing C-style pointers for the most rapid access to any of its member variables.

Overloaded:

  • Get a read-only abstract from a const coordinate series
  • Get a writeable abstract from a non-const coordinate series
Parameters
tierGet pointers to data at the level of the CPU host or GPU device

◆ exportFrame()

template<typename T>
CoordinateFrame stormm::trajectory::CoordinateSeries< T >::exportFrame ( size_t frame_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Prepare a CoordinateFrame object based on one frame of the series, accomplishing any necessary data conversions to put the coordinates back into the familiar double-precision format.

Parameters
frame_indexThe frame to extract
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ exportPhaseSpace()

template<typename T>
PhaseSpace stormm::trajectory::CoordinateSeries< T >::exportPhaseSpace ( size_t frame_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Prepare a PhaseSpace object based on one frame of the series, accomplishing any data conversions needed to put the coordinates back into the familiar double-precision format.

Parameters
frame_indexThe frame to extract
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ exportToFile()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::exportToFile ( const std::string & file_name,
CoordinateFileKind output_kind = CoordinateFileKind::AMBER_CRD,
PrintSituation expectation = PrintSituation::UNKNOWN,
int low_index = 0,
int high_index = 0,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Export the contents of this coordinate series to a trajectory file.

Parameters
file_nameName of the file to write
output_kindThe format of the file to write (checkpoint files print position and velocity data by obligation, but trajectory files can contain either of these as well as forces)
expectationThe condition in which the output file is expected to be found
low_indexThe first frame index to export
high_indexThe upper limit of frame indices to export
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ extractFrame()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::extractFrame ( CoordinateFrame * cf,
size_t frame_index,
const GpuDetails & gpu ) const

Extract coordinates to a pre-existing object.

Overloaded:

  • Load coordinates into a CoordinateFrame object
  • Load coordinates into a PhaseSpace object using the stated point in the time cycle or taking the object's current orientation
Parameters
cfCoordinate frame into which coordinates shall be placed
psPhase space object into which coordinates shall be placed
frame_indexFrame to use in coordinate extraction

◆ getBoxDimensions()

template<typename T>
std::vector< double > stormm::trajectory::CoordinateSeries< T >::getBoxDimensions ( int frame_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Get the box dimensions in their pure form for a particular frame.

Overloaded:

  • Get the dimensions for a specific system on the CPU host or GPU device
  • Get the dimensions for all systems at both levels
Parameters
frame_indexThe frame for which to extract the transformation matrix
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ getBoxSpaceTransform()

template<typename T>
std::vector< double > stormm::trajectory::CoordinateSeries< T >::getBoxSpaceTransform ( int frame_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Get the transformation matrix to take coordinates into box (fractional) space. The result should be interpreted as a 3x3 matrix in column-major format.

Parameters
frame_indexThe frame for which to extract the transformation matrix
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ getCoordinatePointer()

template<typename T>
const Hybrid< T > * stormm::trajectory::CoordinateSeries< T >::getCoordinatePointer ( CartesianDimension dim) const

Get a const pointer to one of the Cartesian coordinate arrays.

Parameters
dimThe dimension of interest

◆ getCoordinateReference()

template<typename T>
const Hybrid< T > & stormm::trajectory::CoordinateSeries< T >::getCoordinateReference ( CartesianDimension dim) const

Get a const reference to the one of the Cartesian coordinate arrays.

Parameters
dimThe dimension of interest

◆ getFramesHandle()

template<typename T>
const Hybrid< T > * stormm::trajectory::CoordinateSeries< T >::getFramesHandle ( CartesianDimension dim) const

Get a pointer to one of the coordinate arrays.

Overloaded:

  • Get a const pointer to the storage array of a const object.
  • Get a non-const pointer to the storage space of a mutable object.
Parameters
dimSpecify coordinate data along one of the Cartesian axes

◆ getInterlacedCoordinates()

template<typename T>
template<typename Treport>
std::vector< Treport > stormm::trajectory::CoordinateSeries< T >::getInterlacedCoordinates ( int frame_index,
int globalpos_bits_out = -1,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Get the interlaced coordinates of one frame.

Overloaded:

  • Get coordinates for all atoms in a frame
  • Get coordinates for a selected range of atoms in a frame
Parameters
frame_indexIndex of the frame to access
globalpos_bits_outThe number of bits after the point to apply if a fixed-precision output is required. Setting this to <= 0 indicates floating point output.
low_indexThe lower atom index of a range
high_indexThe upper atom index of a range
tierThe level at which to access coordinates

◆ getInverseTransform()

template<typename T>
std::vector< double > stormm::trajectory::CoordinateSeries< T >::getInverseTransform ( int frame_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Get the transformation matrix to take coordinates from fractional space back into real space. The result should be interpreted as a 3x3 matrix in column-major format.

Parameters
frame_indexThe frame for which to extract the transformation matrix
tierLevel at which to retrieve data (if STORMM is compiled to run on a GPU)

◆ importFrame()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::importFrame ( const CoordinateFrameReader & cfr,
int atom_start,
int atom_end,
int frame_index = -1 )

Import coordinates from a CoordinateFrame or PhaseSpace object. The original object must have the same number of atoms as the CoordinateSeries itself, or else a range of atoms within the original coordinate object must be specified that fits the CoordinateSeries. The default behavior is to push the new coordinates to the back of the list, but any frame index within the bounds of the current list may also be specified.

Overloaded:

  • Accept all types of single-frame coordinate objects
  • Accept all atoms or a subset of the atoms that fits the current atom count of the CoordinateSeries
Parameters
cfrCoordinates to import. The CoordinateFrameReader is the most basic object available for importation. Both CoordinateFrame and PhaseSpace objects can create CoordinateFrameReaders or writers, and the writers can be const-ified into readers.
cfwCoordinates to import
cfCoordinates to import
psCoordinates to import
atom_startFirst atom from the coordinate set to add to a frame of the series
atom_endLimit of atoms from the coordinate set to add to a frame of the series
frame_indexIndex of the frame into which the coordinates should be imported. The default value of -1 adds the new coordinates to the end of the list.

◆ importFromFile()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::importFromFile ( const std::string & file_name,
CoordinateFileKind file_kind = CoordinateFileKind::UNKNOWN,
const std::vector< int > & frame_numbers = {},
int replica_count = 1,
int frame_index_start = -1 )

Import coordinates from a file. This function accepts directives to read a subset of the coordinates and integrate them into the series at a specified point.

Parameters
file_nameName of the file
file_kindThe kind of coordinate file being read, default UNKNOWN which will lead to automatic deduction of the file type
frame_numbersList of frame indices (starting from zero) to import from the file (if the file is too small to hold one or more frames with the requested indices, this is an error)
replica_count_inThe number of replicas of the frames from this file (default 1). If additional replicas are requested, the whole series will be added in sequence, i.e. frames 3, 5, 8, 9, 3, 5, 8, 9, 3, ...
frame_index_startThe starting index of the series for incorporating frames found in the file. A negative value in this argument triggers addition to the end of any existing series.

◆ pushBack()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::pushBack ( const CoordinateFrameReader & cfr,
int atom_start = 0,
int atom_end = 0 )

Push a coordinate set to the back of the list. This invokes the import member function after reallocating the frame series with 25% spare capacity if the original capacity is insufficient.

Overloaded:

  • Accept all types of single-frame coordinate objects
  • Accept all atoms or a subset of the atoms that fits the current atom count of the CoordinateSeries
Parameters
cfrCoordinates to import. The CoordinateFrameReader is the most basic object available for importation. Both CoordinateFrame and PhaseSpace objects can create CoordinateFrameReaders or writers, and the writers can be const-ified into readers.
cfwCoordinates to import
cfCoordinates to import
psCoordinates to import
atom_startFirst atom from the coordinate set to add to a frame of the series
atom_endLimit of atoms from the coordinate set to add to a frame of the series

◆ reserve()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::reserve ( const int new_frame_capacity)

Reserve capacity in this series. The new frames will be uninitialized.

Parameters
new_frame_capacityThe new capacity to prepare for. If such capacity already exists, the function will do nothing.

◆ resize()

template<typename T>
void stormm::trajectory::CoordinateSeries< T >::resize ( int new_frame_count)

Resize the series, allocating new capacity if needed, initializing new frames with the provided coordinate set. ("New" frames are defined as any frames with indices greater than the original maximum index, regardless of whether new capacity was allocated to hold them or if the size simply increased within the existing space available.)

Overloaded:

  • Accept all types of single-frame coordinate objects
  • Accept all atoms or a subset of the atoms that fits the current atom count of the CoordinateSeries
Parameters
new_frame_countThe number of new frames that the list shall report holding. This is less than or equal to the capacity; if there is insufficient capacity when resize() is called, new capacity will be allocated to hold precisely new_frame_count frames.
cfrOptional coordinate set to use in initializing new frames. If no coordinates are provided, the series will report holding frames but have undefined values in them.
cfwOptional coordinate set to use in initializing new frames
cfOptional coordinate set to use in initializing new frames
psOptional coordinate set to use in initializing new frames
atom_startFirst atom from the coordinate set to add to a frame of the series (the default value is zero, to use all atoms)
atom_endLimit of atoms from the coordinate set to add to a frame of the series (the default value of zero will trigger an access to atom count from the coordinate object to load all of its atoms)

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