#include "gromacs/mdtypes/state.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
-#include "gromacs/utility/mdmodulenotification.h"
+#include "gromacs/utility/mdmodulesnotifiers.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/textreader.h"
#include "gromacs/utility/unique_cptr.h"
t_state state_;
//! PBC box
matrix box_;
- //! Virial from constraints
- tensor constraintsVirial_;
- //! Virial from force computation
- tensor forceVirial_;
//! Total virial
tensor totalVirial_;
//! Pressure
// Input record
inputrec_.delta_t = 0.001;
- // F_EQM
- inputrec_.bQMMM = true;
// F_RF_EXCL will not be tested - group scheme is not supported any more
inputrec_.cutoff_scheme = CutoffScheme::Verlet;
// F_COUL_RECIP
// Dipole (mu)
inputrec_.ewald_geometry = EwaldGeometry::ThreeDC;
- // GMX_CONSTRAINTVIR environment variable should also be
- // set to print constraints and force virials separately.
- gmxSetenv("GMX_CONSTRAINTVIR", "true", 1);
// To print constrain RMSD, constraints algorithm should be set to LINCS.
inputrec_.eConstrAlg = ConstraintAlgorithm::Lincs;
// TODO This object will always return zero as RMSD value.
// It is more relevant to have non-zero value for testing.
constraints_ = makeConstraints(
- mtop_, inputrec_, nullptr, false, nullptr, &cr_, nullptr, nullptr, nullptr, false);
+ mtop_, inputrec_, nullptr, false, nullptr, &cr_, false, nullptr, nullptr, nullptr, false, nullptr);
}
/*! \brief Helper function to generate synthetic data to output
box_[ZZ][YY] = (*testValue += 0.1);
box_[ZZ][ZZ] = (*testValue += 0.1);
- constraintsVirial_[XX][XX] = (*testValue += 0.1);
- constraintsVirial_[XX][YY] = (*testValue += 0.1);
- constraintsVirial_[XX][ZZ] = (*testValue += 0.1);
- constraintsVirial_[YY][XX] = (*testValue += 0.1);
- constraintsVirial_[YY][YY] = (*testValue += 0.1);
- constraintsVirial_[YY][ZZ] = (*testValue += 0.1);
- constraintsVirial_[ZZ][XX] = (*testValue += 0.1);
- constraintsVirial_[ZZ][YY] = (*testValue += 0.1);
- constraintsVirial_[ZZ][ZZ] = (*testValue += 0.1);
-
- forceVirial_[XX][XX] = (*testValue += 0.1);
- forceVirial_[XX][YY] = (*testValue += 0.1);
- forceVirial_[XX][ZZ] = (*testValue += 0.1);
- forceVirial_[YY][XX] = (*testValue += 0.1);
- forceVirial_[YY][YY] = (*testValue += 0.1);
- forceVirial_[YY][ZZ] = (*testValue += 0.1);
- forceVirial_[ZZ][XX] = (*testValue += 0.1);
- forceVirial_[ZZ][YY] = (*testValue += 0.1);
- forceVirial_[ZZ][ZZ] = (*testValue += 0.1);
+ // Removing GMX_CONSTRVIR removed a total increment of 1.8
+ // To avoid unnecessary changes in reference data, we keep the increment
+ (*testValue += 1.8);
totalVirial_[XX][XX] = (*testValue += 0.1);
totalVirial_[XX][YY] = (*testValue += 0.1);
tmass_,
enerdata_.get(),
nullptr,
- nullptr,
box_,
PTCouplingArrays({ state_.boxv,
state_.nosehoover_xi,
state_.nhpres_xi,
state_.nhpres_vxi }),
state_.fep_state,
- constraintsVirial_,
- forceVirial_,
totalVirial_,
pressure_,
&ekindata_,
checker_.checkString(TextReader::readFileToString(logFilename_), "log");
}
-INSTANTIATE_TEST_CASE_P(WithParameters, EnergyOutputTest, ::testing::ValuesIn(parametersSets));
+INSTANTIATE_TEST_SUITE_P(WithParameters, EnergyOutputTest, ::testing::ValuesIn(parametersSets));
} // namespace
} // namespace test