xmol::trajectory::Trajectory class

Forward-traversable, re-enterable MD trajectory

Trajectory

Public types

class Iterator
Iterator[Trajectory::Frame] (don't confuse with Frame)
struct Sentinel
class Slice
Reference to trajectory slice.

Constructors, destructors, conversion operators

Trajectory() deleted
Trajectory(xmol::Frame frame) explicit
Constructor.
Trajectory(Trajectory&& other) defaulted
Move constructor, invalidates iterators/slices.
Trajectory(const Trajectory& other) deleted

Public functions

auto operator=(Trajectory&& other) -> Trajectory& defaulted
Move assignment, invalidates iterators/slices.
auto operator=(const Trajectory& other) -> Trajectory& deleted
template<typename InputFile>
void extend(InputFile&& input_file)
Extend trajectory with input_file, invalidates iterators/slices.
auto begin() -> Iterator
auto end() -> Sentinel
auto at(size_t i) -> Frame
auto slice(std::optional<size_t> begin = {}, std::optional<size_t> end = {}, size_t step = 1) -> Slice
Slice of trajectory.
auto n_frames() const -> size_t
Total number of frames in trajectory.
auto n_atoms() const -> size_t
Number of atoms in trajectory frame.