Skip to content

Commit

Permalink
Merge pull request #415 from michellab/revert-412-feature_pmefep_2023
Browse files Browse the repository at this point in the history
Revert "Support for PME in SOMD FEP" [ci skip]
  • Loading branch information
lohedges authored Nov 16, 2022
2 parents 13e5112 + 0f79c0a commit f87b3ee
Show file tree
Hide file tree
Showing 20 changed files with 769 additions and 19,430 deletions.
2 changes: 0 additions & 2 deletions corelib/src/libs/SireMove/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,12 @@ set ( SIREMOVE_OPENMM_HEADERS
openmmmdintegrator.h
openmmfrenergydt.h
openmmfrenergyst.h
openmmpmefep.h
)

set ( SIREMOVE_OPENMM_SOURCES
openmmmdintegrator.cpp
openmmfrenergydt.cpp
openmmfrenergyst.cpp
openmmpmefep.cpp
)

if ( ${SIRE_USE_OPENMM} )
Expand Down
142 changes: 53 additions & 89 deletions corelib/src/libs/SireMove/openmmfrenergyst.cpp

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions corelib/src/libs/SireMove/openmmfrenergyst.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMFrEnergyST

namespace SireMove {

/** This class implements single topology a free energy method using OpenMM.
/** This class implements single topology a free energy method using OpenMM.
@author Julien Michel,Gaetano Calabro and Antonia Mey
*/
class SIREMOVE_EXPORT OpenMMFrEnergyST
Expand Down Expand Up @@ -108,7 +108,7 @@ namespace SireMove {

QString getCombiningRules(void);
void setCombiningRules(QString);

QString getCutoffType(void);
void setCutoffType(QString);

Expand Down Expand Up @@ -200,19 +200,17 @@ namespace SireMove {
int getRandomSeed(void);
void setRandomSeed(int);

void setDebug(bool);

private:
void createContext(IntegratorWorkspace &workspace,
SireUnits::Dimension::Time timestep);
void destroyContext();
void updateBoxDimensions(OpenMM::State &state_openmm,
QVector<QVector<Vector>> &buffered_dimensions,
AtomicVelocityWorkspace &ws);

void updateBoxDimensions(OpenMM::State &state_openmm,
QVector<QVector<Vector>> &buffered_dimensions, bool Debug,
AtomicVelocityWorkspace &ws);
double getPotentialEnergyAtLambda(double lambda);
void updateOpenMMContextLambda(double lambda);
boost::tuples::tuple<double, double, double> calculateGradient(double increment_plus,
boost::tuples::tuple<double, double, double> calculateGradient(double increment_plus,
double increment_minus, double potential_energy_lambda, double beta);
QVector<double> computeReducedPerturbedEnergies(double);
void emptyContainers(void);
Expand Down Expand Up @@ -284,7 +282,7 @@ namespace SireMove {
QVector<double> pot_energies;

QVector<double> forward_Metropolis;

QVector<double> backward_Metropolis;

QVector<QVector <double> > reduced_perturbed_energies;
Expand Down
9 changes: 5 additions & 4 deletions corelib/src/libs/SireMove/openmmmdintegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ void OpenMMMDIntegrator::initialise()
flag_cutoff = CUTOFFPERIODIC;
else if (CutoffType == "ewald")
flag_cutoff = EWALD;
else if (CutoffType == "PME")
else if (CutoffType == "pme")
flag_cutoff = PME;
else
throw SireError::program_bug(QObject::tr(
"The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic,ewal,PME"), CODELOC);
"The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic,ewal,pme"), CODELOC);

if (Debug)
qDebug() << "\nCutoffType = " << CutoffType << "\n";
Expand Down Expand Up @@ -1485,7 +1485,8 @@ System OpenMMMDIntegrator::equilibrateSystem(System &system,

const int nmols = ws.nMolecules();
int k = 0;

double Ekin_sire = 0;
double Ekin_openmm = 0;
for (int i = 0; i < nmols; i++)
{

Expand Down Expand Up @@ -1712,7 +1713,7 @@ void OpenMMMDIntegrator::integrate(IntegratorWorkspace &workspace, const Symbol

int k = 0;
double Ekin_openmm=0;

double Ekin_sire=0;
for (int i = 0; i < nmols; i++)
{
Vector *sire_coords = ws.coordsArray(i);
Expand Down
Loading

0 comments on commit f87b3ee

Please sign in to comment.