"platforms/opencl/vscode:/vscode.git/clone" did not exist on "79ba35047c646c2a8b80a003e231f6d3ed2bfbbf"
Commit 54d474a6 authored by peastman's avatar peastman
Browse files

Merge pull request #762 from swails/is_periodic

Implements `usesPeriodicBoundaryConditions` on `Force`s and `System`
parents 19ccd0f8 1f15a914
...@@ -117,6 +117,15 @@ public: ...@@ -117,6 +117,15 @@ public:
void setRandomNumberSeed(int seed) { void setRandomNumberSeed(int seed) {
randomNumberSeed = seed; randomNumberSeed = seed;
} }
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -148,6 +148,15 @@ public: ...@@ -148,6 +148,15 @@ public:
* @param b4 the index of the fourth particle forming the second torsion * @param b4 the index of the fourth particle forming the second torsion
*/ */
void setTorsionParameters(int index, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4); void setTorsionParameters(int index, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -61,6 +61,15 @@ public: ...@@ -61,6 +61,15 @@ public:
void setFrequency(int freq) { void setFrequency(int freq) {
frequency = freq; frequency = freq;
} }
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -202,6 +202,15 @@ public: ...@@ -202,6 +202,15 @@ public:
* the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added. * the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -199,6 +199,15 @@ public: ...@@ -199,6 +199,15 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added. * the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -297,6 +297,15 @@ public: ...@@ -297,6 +297,15 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added. * the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -199,6 +199,15 @@ public: ...@@ -199,6 +199,15 @@ public:
* the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones. * the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -523,6 +523,15 @@ public: ...@@ -523,6 +523,15 @@ public:
* the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones. * the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == CustomGBForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -443,6 +443,15 @@ public: ...@@ -443,6 +443,15 @@ public:
* new donors or acceptors be added. * new donors or acceptors be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == CustomHbondForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -461,6 +461,15 @@ public: ...@@ -461,6 +461,15 @@ public:
* the parameters of existing ones. * the parameters of existing ones.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == CustomManyParticleForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -464,6 +464,15 @@ public: ...@@ -464,6 +464,15 @@ public:
* the parameters of existing ones. * the parameters of existing ones.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == CustomNonbondedForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -205,6 +205,15 @@ public: ...@@ -205,6 +205,15 @@ public:
* the Context. The set of particles involved in a torsion cannot be changed, nor can new torsions be added. * the Context. The set of particles involved in a torsion cannot be changed, nor can new torsions be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -78,6 +78,14 @@ public: ...@@ -78,6 +78,14 @@ public:
* @param group the group index. Legal values are between 0 and 31 (inclusive). * @param group the group index. Legal values are between 0 and 31 (inclusive).
*/ */
void setForceGroup(int group); void setForceGroup(int group);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions. This method should be overridden for all Force subclasses, or
* a OpenMM::OpenMMException will be thrown
*
* @return true if Force uses periodic boundaries or false if it does not
*/
virtual bool usesPeriodicBoundaryConditions() const;
protected: protected:
friend class ContextImpl; friend class ContextImpl;
/** /**
......
...@@ -184,6 +184,15 @@ public: ...@@ -184,6 +184,15 @@ public:
* change the parameters of existing ones. * change the parameters of existing ones.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == GBSAOBCForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -229,6 +229,15 @@ public: ...@@ -229,6 +229,15 @@ public:
* Set the upper limit used in the quintic spline scaling method, measured in nm (~5.0) * Set the upper limit used in the quintic spline scaling method, measured in nm (~5.0)
*/ */
void setQuinticUpperBornRadiusLimit(double quinticUpperBornRadiusLimit); void setQuinticUpperBornRadiusLimit(double quinticUpperBornRadiusLimit);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == GBVIForce::CutoffPeriodic;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -102,6 +102,15 @@ public: ...@@ -102,6 +102,15 @@ public:
* in a angle cannot be changed, nor can new angles be added. * in a angle cannot be changed, nor can new angles be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -99,6 +99,15 @@ public: ...@@ -99,6 +99,15 @@ public:
* in a bond cannot be changed, nor can new bonds be added. * in a bond cannot be changed, nor can new bonds be added.
*/ */
void updateParametersInContext(Context& context); void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -171,6 +171,15 @@ public: ...@@ -171,6 +171,15 @@ public:
void setRandomNumberSeed(int seed) { void setRandomNumberSeed(int seed) {
randomNumberSeed = seed; randomNumberSeed = seed;
} }
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -127,6 +127,15 @@ public: ...@@ -127,6 +127,15 @@ public:
void setRandomNumberSeed(int seed) { void setRandomNumberSeed(int seed) {
randomNumberSeed = seed; randomNumberSeed = seed;
} }
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -224,6 +224,15 @@ public: ...@@ -224,6 +224,15 @@ public:
void setRandomNumberSeed(int seed) { void setRandomNumberSeed(int seed) {
randomNumberSeed = seed; randomNumberSeed = seed;
} }
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment