From cf2da028f16a5267748b82188b0d3bd4c0585115 Mon Sep 17 00:00:00 2001 From: "M. Eric Irrgang" Date: Thu, 11 Feb 2021 15:52:34 +0300 Subject: [PATCH] Updates for GROMACS 2021. --- ci_scripts/install_gromacs_2021.sh | 2 +- src/cpp/brerpotential.cpp | 4 ++-- src/cpp/brerpotential.h | 2 +- src/cpp/linearpotential.cpp | 2 +- src/cpp/linearpotential.h | 4 ++-- src/cpp/linearstoppotential.cpp | 2 +- src/cpp/linearstoppotential.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ci_scripts/install_gromacs_2021.sh b/ci_scripts/install_gromacs_2021.sh index 6a9ac5c..3d73d0c 100755 --- a/ci_scripts/install_gromacs_2021.sh +++ b/ci_scripts/install_gromacs_2021.sh @@ -25,7 +25,7 @@ pushd $HOME -DGMX_DOUBLE=$GMX_DOUBLE \ -DGMX_MPI=$GMX_MPI \ -DGMX_THREAD_MPI=$GMX_THREAD_MPI \ - -DGMXAPI=ON \ + -DGMX_INSTALL_LEGACY_API=ON \ -DCMAKE_INSTALL_PREFIX=$HOME/install/gromacs_2021 \ .. make -j2 install diff --git a/src/cpp/brerpotential.cpp b/src/cpp/brerpotential.cpp index 3f00096..5b01115 100644 --- a/src/cpp/brerpotential.cpp +++ b/src/cpp/brerpotential.cpp @@ -120,7 +120,7 @@ void BRER::callback(gmx::Vector v, gmx::Vector v0, double t, } if (fabs(alpha_ - alpha_prev_) < tolerance_) { - converged_ = TRUE; + converged_ = true; if (parameter_file_) { writeparameters(t, R); } @@ -137,7 +137,7 @@ void BRER::callback(gmx::Vector v, gmx::Vector v0, double t, } gmx::PotentialPointData BRER::calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t) { + double t) { // Our convention is to calculate the force that will be applied to v. // An equal and opposite force is applied to v0. auto rdiff = v - v0; diff --git a/src/cpp/brerpotential.h b/src/cpp/brerpotential.h index bf871cc..1d10417 100644 --- a/src/cpp/brerpotential.h +++ b/src/cpp/brerpotential.h @@ -85,7 +85,7 @@ class BRER { // restraint as an argument. gmx::PotentialPointData calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t); + double t); void writeparameters(double t, const double R); diff --git a/src/cpp/linearpotential.cpp b/src/cpp/linearpotential.cpp index ea1aa54..29785c9 100644 --- a/src/cpp/linearpotential.cpp +++ b/src/cpp/linearpotential.cpp @@ -64,7 +64,7 @@ void Linear::callback(gmx::Vector v, gmx::Vector v0, double t, } gmx::PotentialPointData Linear::calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t) { + double t) { // Our convention is to calculate the force that will be applied to v. // An equal and opposite force is applied to v0. auto rdiff = v - v0; diff --git a/src/cpp/linearpotential.h b/src/cpp/linearpotential.h index 75cb388..9036f5e 100644 --- a/src/cpp/linearpotential.h +++ b/src/cpp/linearpotential.h @@ -39,7 +39,7 @@ class Linear { std::string filename); gmx::PotentialPointData calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t); + double t); void writeparameters(double t, const double R); @@ -47,7 +47,7 @@ class Linear { const Resources &resources); private: - bool initialized_{FALSE}; + bool initialized_{false}; double alpha_; /// target distance diff --git a/src/cpp/linearstoppotential.cpp b/src/cpp/linearstoppotential.cpp index dd00e4f..85ba61a 100644 --- a/src/cpp/linearstoppotential.cpp +++ b/src/cpp/linearstoppotential.cpp @@ -93,7 +93,7 @@ void LinearStop::callback(gmx::Vector v, gmx::Vector v0, double t, } gmx::PotentialPointData LinearStop::calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t) { + double t) { // Our convention is to calculate the force that will be applied to v. // An equal and opposite force is applied to v0. time_ = t; diff --git a/src/cpp/linearstoppotential.h b/src/cpp/linearstoppotential.h index 8216616..243d8a1 100644 --- a/src/cpp/linearstoppotential.h +++ b/src/cpp/linearstoppotential.h @@ -48,7 +48,7 @@ class LinearStop { // be able to better optimize a free function that receives the current // restraint as an argument. gmx::PotentialPointData calculate(gmx::Vector v, gmx::Vector v0, - gmx_unused double t); + double t); void writeparameters(double t, const double R);