1 #ifndef OPENMM_CUSTOMMANYPARTICLEFORCEIMPL_H_
2 #define OPENMM_CUSTOMMANYPARTICLEFORCEIMPL_H_
35 #include "ForceImpl.h"
36 #include "openmm/CustomManyParticleForce.h"
37 #include "openmm/Kernel.h"
38 #include "lepton/CustomFunction.h"
39 #include "lepton/ExpressionTreeNode.h"
40 #include "lepton/ParsedExpression.h"
62 double calcForcesAndEnergy(
ContextImpl& context,
bool includeForces,
bool includeEnergy,
int groups);
63 std::map<std::string, double> getDefaultParameters();
64 std::vector<std::string> getKernelNames();
65 void updateParametersInContext(
ContextImpl& context);
80 static Lepton::ParsedExpression prepareExpression(
const CustomManyParticleForce& force,
const std::map<std::string, Lepton::CustomFunction*>& functions, std::map<std::string, std::vector<int> >& distances,
81 std::map<std::string, std::vector<int> >& angles, std::map<std::string, std::vector<int> >& dihedrals);
96 static void buildFilterArrays(
const CustomManyParticleForce& force,
int& numTypes, std::vector<int>& particleTypes, std::vector<int>& orderIndex, std::vector<std::vector<int> >& particleOrder);
98 class FunctionPlaceholder;
99 static Lepton::ExpressionTreeNode replaceFunctions(
const Lepton::ExpressionTreeNode& node, std::map<std::string, int> atoms,
100 std::map<std::string, std::vector<int> >& distances, std::map<std::string, std::vector<int> >& angles,
101 std::map<std::string, std::vector<int> >& dihedrals);
102 static void generatePermutations(std::vector<int>& values,
int numFixed, std::vector<std::vector<int> >& result);
This is the internal implementation of a Context.
Definition: ContextImpl.h:53
const CustomManyParticleForce & getOwner() const
Get the Force object from which this ForceImpl was created.
Definition: CustomManyParticleForceImpl.h:56
void updateContextState(ContextImpl &context)
This method is called at the beginning of each time step.
Definition: CustomManyParticleForceImpl.h:59
A Kernel encapsulates a particular implementation of a calculation that can be performed on the data ...
Definition: Kernel.h:58
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
This class supports a wide variety of nonbonded N-particle interactions, where N is user specified...
Definition: CustomManyParticleForce.h:162
This is the internal implementation of CustomManyParticleForce.
Definition: CustomManyParticleForceImpl.h:51