Gromacs  2026.0-dev-20251119-5f0a571d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::H5mdParticleBlockBuilder Class Reference

#include <gromacs/fileio/h5md/h5md_particleblock.h>

Description

Builder class for H5mdParticleBlock objects.

Asserts that all added data sets are consistent with our expectation for trajectory data. Trajectory data sets must have a 1-dimensional frame dimension (i.e. each frame has shape real[numParticles][3]) and created for the same number of particles. Adding a H5mdTimeDataBlock which has inconsistent frame dimensions and number of particles results in a throw.

If no data sets are added, the constructed H5mdParticleBlock will have numParticles() = 0. In this case no data sets are managed.

Public Member Functions

 H5mdParticleBlockBuilder ()=default
 Construct a new builder.
 
H5mdParticleBlockBuildersetBox (H5mdFrameDataSet< real > &&box)
 Assign a per-frame box data set. More...
 
H5mdParticleBlockBuildersetPosition (H5mdTimeDataBlock< RVec > &&position)
 Assign a position data set. More...
 
H5mdParticleBlockBuildersetVelocity (H5mdTimeDataBlock< RVec > &&velocity)
 Assign a velocity data set. More...
 
H5mdParticleBlockBuildersetForce (H5mdTimeDataBlock< RVec > &&force)
 Assign a force data set. More...
 
H5mdParticleBlock build ()
 Build and return the H5mdParticleBlock.
 

Member Function Documentation

H5mdParticleBlockBuilder & gmx::H5mdParticleBlockBuilder::setBox ( H5mdFrameDataSet< real > &&  box)

Assign a per-frame box data set.

Exceptions
gmx::FileIOErrorif the data set frame dimensions are not { 3, 3 }.
H5mdParticleBlockBuilder & gmx::H5mdParticleBlockBuilder::setForce ( H5mdTimeDataBlock< RVec > &&  force)

Assign a force data set.

Exceptions
gmx::FileIOErrorif the value frame dimensions are not 1-dimensional or do not exactly match the frame dimensions of other already added data sets.
H5mdParticleBlockBuilder & gmx::H5mdParticleBlockBuilder::setPosition ( H5mdTimeDataBlock< RVec > &&  position)

Assign a position data set.

Exceptions
gmx::FileIOErrorif the value frame dimensions are not 1-dimensional or do not exactly match the frame dimensions of other already added data sets.
H5mdParticleBlockBuilder & gmx::H5mdParticleBlockBuilder::setVelocity ( H5mdTimeDataBlock< RVec > &&  velocity)

Assign a velocity data set.

Exceptions
gmx::FileIOErrorif the value frame dimensions are not 1-dimensional or do not exactly match the frame dimensions of other already added data sets.

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