MELDOpenMMPlugin
MeldForceImpl.h
1 /*
2  Copyright 2015 by Justin MacCallum, Alberto Perez, Ken Dill
3  All rights reserved
4 */
5 
6 #ifndef OPENMM_MELD_FORCE_IMPL_H_
7 #define OPENMM_MELD_FORCE_IMPL_H_
8 
9 #include "MeldForce.h"
10 #include "openmm/internal/ForceImpl.h"
11 #include "openmm/Kernel.h"
12 #include <utility>
13 #include <set>
14 #include <vector>
15 #include <string>
16 
17 namespace MeldPlugin {
18 
19 class MeldForceImpl : public OpenMM::ForceImpl {
20 public:
21  MeldForceImpl(const MeldForce& owner);
22 
24 
25  void initialize(OpenMM::ContextImpl& context);
26 
27  const MeldForce& getOwner() const {
28  return owner;
29  }
30 
31  void updateContextState(OpenMM::ContextImpl& context) {
32  // This force field doesn't update the state directly.
33  }
34 
35  double calcForcesAndEnergy(OpenMM::ContextImpl& context, bool includeForces, bool includeEnergy, int groups);
36 
37  std::map<std::string, double> getDefaultParameters() {
38  return std::map<std::string, double>(); // This force field doesn't define any parameters.
39  }
40 
41  std::vector<std::string> getKernelNames();
42 
43  void updateParametersInContext(OpenMM::ContextImpl& context);
44 
45 private:
46  const MeldForce& owner;
47  OpenMM::Kernel kernel;
48 };
49 
50 } // namespace MeldPlugin
51 
52 #endif /*OPENMM_MELD_FORCE_IMPL_H_*/
void updateParametersInContext(OpenMM::ContextImpl &context)
std::map< std::string, double > getDefaultParameters()
Definition: MeldForceImpl.h:37
void updateContextState(OpenMM::ContextImpl &context)
Definition: MeldForceImpl.h:31
const MeldForce & getOwner() const
Definition: MeldForceImpl.h:27
Definition: MeldForceImpl.h:17
std::vector< std::string > getKernelNames()
This is the MELD Force.
Definition: MeldForce.h:21
MeldForceImpl(const MeldForce &owner)
void initialize(OpenMM::ContextImpl &context)
Definition: MeldForceImpl.h:19
double calcForcesAndEnergy(OpenMM::ContextImpl &context, bool includeForces, bool includeEnergy, int groups)