#include <gromacs/trajectory/trajectoryframe.h>
Contains a valid trajectory frame.
Valid frames have a step and time, but need not have any particular other fields.
- Todo:
- Eventually t_trxframe should be replaced by a class such as this. Currently we need to introduce BoxMatrix so that we can have a normal C++ getter that returns the contents of a box matrix, since you cannot use a real[DIM][DIM] as a function return type.
- Todo:
- Consider a std::optional work-alike type for expressing that a field may or may not have content.
|
| TrajectoryFrame (const t_trxframe &frame) |
| Constructor. More...
|
|
std::string | frameName () const |
| Return a string that helps users identify this frame, containing time and step number. More...
|
|
std::int64_t | step () const |
| Step number read from the trajectory file frame.
|
|
double | time () const |
| Time read from the trajectory file frame.
|
|
PbcType | pbc () const |
| The PBC characteristics of the box.
|
|
ArrayRef< const RVec > | x () const |
| Get a view of position coordinates of the frame (which could be empty).
|
|
ArrayRef< const RVec > | v () const |
| Get a view of velocity coordinates of the frame (which could be empty).
|
|
ArrayRef< const RVec > | f () const |
| Get a view of force coordinates of the frame (which could be empty).
|
|
bool | hasBox () const |
| Return whether the frame has a box.
|
|
const BoxMatrix & | box () const |
| Return a handle to the frame's box, which is all zero if the frame has no box.
|
|
gmx::TrajectoryFrame::TrajectoryFrame |
( |
const t_trxframe & |
frame | ) |
|
|
explicit |
Constructor.
- Exceptions
-
APIError | If frame lacks either step or time. |
std::string gmx::TrajectoryFrame::frameName |
( |
| ) |
const |
Return a string that helps users identify this frame, containing time and step number.
- Exceptions
-
std::bad_alloc | when out of memory |
The documentation for this class was generated from the following files:
- api/legacy/include/gromacs/trajectory/trajectoryframe.h
- src/gromacs/trajectory/trajectoryframe.cpp