24#include <gromacs/utility/programcontext.h>
25#include <gromacs/version.h>
44 gmx_output_env_t *oenv;
45 gmx::TimeUnit timeunit = gmx::TimeUnit::Picoseconds;
46 XvgFormat xvg = XvgFormat::None;
47#if GMX_VERSION >= 20230000
48 const std::filesystem::path path =
filename_;
52 output_env_init(&oenv, gmx::getProgramContext(), timeunit, FALSE, xvg, 0);
54 TRX_READ_X | TRX_READ_V | TRX_READ_F)) {
55 throw std::runtime_error(std::string(
"cannot open ") +
filename_);
57 output_env_done(oenv);
60 for (
Index i = 0; i < 3; i++) {
61 for (
Index j = 0; j < 3; j++) {
68 std::cout << std::endl;
71 throw std::runtime_error(
72 "number of beads in trajectory do not match topology");
97 gmx_output_env_t *oenv;
98 gmx::TimeUnit timeunit = gmx::TimeUnit::Picoseconds;
99 XvgFormat xvg = XvgFormat::None;
100 output_env_init(&oenv, gmx::getProgramContext(), timeunit, FALSE, xvg, 0);
104 output_env_done(oenv);
107 for (
Index i = 0; i < 3; i++) {
108 for (
Index j = 0; j < 3; j++) {
virtual void setPos(const Eigen::Vector3d &bead_position)
void setF(const Eigen::Vector3d &bead_force)
void setVel(const Eigen::Vector3d &r)
bool FirstFrame(Topology &conf) override
read in the first frame
t_trxframe gmx_frame_
gmx frame
bool NextFrame(Topology &conf) override
read in the next frame
t_trxstatus * gmx_status_
bool Open(const std::string &file) override
open a trejectory file
topology of the whole system
void setBox(const Eigen::Matrix3d &box, BoundaryCondition::eBoxtype boxtype=BoundaryCondition::typeAuto)
Bead * getBead(const Index i)
Returns a pointer to the bead with index i.
Provides a means for comparing floating point numbers.