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:
void setRandomNumberSeed(int 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:
ForceImpl* createImpl() const;
private:
......
......@@ -148,6 +148,15 @@ public:
* @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);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
......
......@@ -61,6 +61,15 @@ public:
void setFrequency(int 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:
ForceImpl* createImpl() const;
private:
......
......@@ -202,6 +202,15 @@ public:
* the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added.
*/
void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
......
......@@ -199,6 +199,15 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
......
......@@ -297,6 +297,15 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
......
......@@ -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.
*/
void updateParametersInContext(Context& context);
/**
* Returns whether or not this force makes use of periodic boundary
* conditions.
*
* @returns false
*/
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
......
......@@ -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.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -443,6 +443,15 @@ public:
* new donors or acceptors be added.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -461,6 +461,15 @@ public:
* the parameters of existing ones.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -464,6 +464,15 @@ public:
* the parameters of existing ones.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -205,6 +205,15 @@ public:
* the Context. The set of particles involved in a torsion cannot be changed, nor can new torsions be added.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -78,6 +78,14 @@ public:
* @param group the group index. Legal values are between 0 and 31 (inclusive).
*/
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:
friend class ContextImpl;
/**
......
......@@ -184,6 +184,15 @@ public:
* change the parameters of existing ones.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -229,6 +229,15 @@ public:
* Set the upper limit used in the quintic spline scaling method, measured in nm (~5.0)
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -102,6 +102,15 @@ public:
* in a angle cannot be changed, nor can new angles be added.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -99,6 +99,15 @@ public:
* in a bond cannot be changed, nor can new bonds be added.
*/
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:
ForceImpl* createImpl() const;
private:
......
......@@ -171,6 +171,15 @@ public:
void setRandomNumberSeed(int 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:
ForceImpl* createImpl() const;
private:
......
......@@ -127,6 +127,15 @@ public:
void setRandomNumberSeed(int 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:
ForceImpl* createImpl() const;
private:
......
......@@ -224,6 +224,15 @@ public:
void setRandomNumberSeed(int 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:
ForceImpl* createImpl() const;
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