Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
908340c1
Commit
908340c1
authored
Apr 12, 2016
by
Peter Eastman
Browse files
Reference implementation of periodic boundary conditions for bonded forces
parent
4bd2f9d2
Changes
54
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
184 additions
and
65 deletions
+184
-65
openmmapi/include/openmm/CMAPTorsionForce.h
openmmapi/include/openmm/CMAPTorsionForce.h
+9
-5
openmmapi/include/openmm/CustomAngleForce.h
openmmapi/include/openmm/CustomAngleForce.h
+9
-5
openmmapi/include/openmm/CustomBondForce.h
openmmapi/include/openmm/CustomBondForce.h
+9
-5
openmmapi/include/openmm/CustomCentroidBondForce.h
openmmapi/include/openmm/CustomCentroidBondForce.h
+9
-5
openmmapi/include/openmm/CustomCompoundBondForce.h
openmmapi/include/openmm/CustomCompoundBondForce.h
+9
-5
openmmapi/include/openmm/CustomTorsionForce.h
openmmapi/include/openmm/CustomTorsionForce.h
+8
-4
openmmapi/include/openmm/HarmonicAngleForce.h
openmmapi/include/openmm/HarmonicAngleForce.h
+8
-5
openmmapi/include/openmm/HarmonicBondForce.h
openmmapi/include/openmm/HarmonicBondForce.h
+8
-4
openmmapi/include/openmm/PeriodicTorsionForce.h
openmmapi/include/openmm/PeriodicTorsionForce.h
+8
-4
openmmapi/include/openmm/RBTorsionForce.h
openmmapi/include/openmm/RBTorsionForce.h
+8
-4
openmmapi/src/CMAPTorsionForce.cpp
openmmapi/src/CMAPTorsionForce.cpp
+10
-2
openmmapi/src/CustomAngleForce.cpp
openmmapi/src/CustomAngleForce.cpp
+10
-2
openmmapi/src/CustomBondForce.cpp
openmmapi/src/CustomBondForce.cpp
+10
-2
openmmapi/src/CustomCentroidBondForce.cpp
openmmapi/src/CustomCentroidBondForce.cpp
+10
-2
openmmapi/src/CustomCompoundBondForce.cpp
openmmapi/src/CustomCompoundBondForce.cpp
+10
-2
openmmapi/src/CustomTorsionForce.cpp
openmmapi/src/CustomTorsionForce.cpp
+10
-2
openmmapi/src/HarmonicAngleForce.cpp
openmmapi/src/HarmonicAngleForce.cpp
+10
-2
openmmapi/src/HarmonicBondForce.cpp
openmmapi/src/HarmonicBondForce.cpp
+9
-1
openmmapi/src/PeriodicTorsionForce.cpp
openmmapi/src/PeriodicTorsionForce.cpp
+10
-2
openmmapi/src/RBTorsionForce.cpp
openmmapi/src/RBTorsionForce.cpp
+10
-2
No files found.
openmmapi/include/openmm/CMAPTorsionForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010-201
5
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -159,15 +159,18 @@ public:
...
@@ -159,15 +159,18 @@ public:
* new bonds and torsions cannot be added.
* new bonds and torsions cannot be added.
*/
*/
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -175,6 +178,7 @@ private:
...
@@ -175,6 +178,7 @@ private:
class
CMAPTorsionInfo
;
class
CMAPTorsionInfo
;
std
::
vector
<
MapInfo
>
maps
;
std
::
vector
<
MapInfo
>
maps
;
std
::
vector
<
CMAPTorsionInfo
>
torsions
;
std
::
vector
<
CMAPTorsionInfo
>
torsions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/CustomAngleForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -203,15 +203,18 @@ public:
...
@@ -203,15 +203,18 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -222,6 +225,7 @@ private:
...
@@ -222,6 +225,7 @@ private:
std
::
vector
<
AngleParameterInfo
>
parameters
;
std
::
vector
<
AngleParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
AngleInfo
>
angles
;
std
::
vector
<
AngleInfo
>
angles
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/CustomBondForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -200,15 +200,18 @@ public:
...
@@ -200,15 +200,18 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -219,6 +222,7 @@ private:
...
@@ -219,6 +222,7 @@ private:
std
::
vector
<
BondParameterInfo
>
parameters
;
std
::
vector
<
BondParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
BondInfo
>
bonds
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/CustomCentroidBondForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
5
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -324,15 +324,18 @@ public:
...
@@ -324,15 +324,18 @@ public:
* bonds be added.
* bonds be added.
*/
*/
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -348,6 +351,7 @@ private:
...
@@ -348,6 +351,7 @@ private:
std
::
vector
<
GroupInfo
>
groups
;
std
::
vector
<
GroupInfo
>
groups
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/CustomCompoundBondForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
4
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -298,15 +298,18 @@ public:
...
@@ -298,15 +298,18 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -320,6 +323,7 @@ private:
...
@@ -320,6 +323,7 @@ private:
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/CustomTorsionForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -206,15 +206,18 @@ public:
...
@@ -206,15 +206,18 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns true if force uses PBC and false otherwise
* @returns true if force uses PBC and false otherwise
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
...
@@ -225,6 +228,7 @@ private:
...
@@ -225,6 +228,7 @@ private:
std
::
vector
<
TorsionParameterInfo
>
parameters
;
std
::
vector
<
TorsionParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
TorsionInfo
>
torsions
;
std
::
vector
<
TorsionInfo
>
torsions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/HarmonicAngleForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -102,20 +102,23 @@ public:
...
@@ -102,20 +102,23 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns true if force uses PBC and false otherwise
* @returns true if force uses PBC and false otherwise
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
protected
:
return
false
;
}
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
class
AngleInfo
;
class
AngleInfo
;
std
::
vector
<
AngleInfo
>
angles
;
std
::
vector
<
AngleInfo
>
angles
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/HarmonicBondForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -99,20 +99,24 @@ public:
...
@@ -99,20 +99,24 @@ 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
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns true if force uses PBC and false otherwise
* @returns true if force uses PBC and false otherwise
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
class
BondInfo
;
class
BondInfo
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
BondInfo
>
bonds
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/PeriodicTorsionForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -108,20 +108,24 @@ public:
...
@@ -108,20 +108,24 @@ public:
* in a torsion cannot be changed, nor can new torsions be added.
* in a torsion cannot be changed, nor can new torsions be added.
*/
*/
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns true if force uses PBC and false otherwise
* @returns true if force uses PBC and false otherwise
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
class
PeriodicTorsionInfo
;
class
PeriodicTorsionInfo
;
std
::
vector
<
PeriodicTorsionInfo
>
periodicTorsions
;
std
::
vector
<
PeriodicTorsionInfo
>
periodicTorsions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/include/openmm/RBTorsionForce.h
View file @
908340c1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -117,20 +117,24 @@ public:
...
@@ -117,20 +117,24 @@ public:
* in a torsion cannot be changed, nor can new torsions be added.
* in a torsion cannot be changed, nor can new torsions be added.
*/
*/
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
/**
* Set whether this force should apply periodic boundary conditions when calculating displacements.
* Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
*/
void
setUsesPeriodicBoundaryConditions
(
bool
periodic
);
/**
/**
* Returns whether or not this force makes use of periodic boundary
* Returns whether or not this force makes use of periodic boundary
* conditions.
* conditions.
*
*
* @returns true if force uses PBC and false otherwise
* @returns true if force uses PBC and false otherwise
*/
*/
bool
usesPeriodicBoundaryConditions
()
const
{
bool
usesPeriodicBoundaryConditions
()
const
;
return
false
;
}
protected:
protected:
ForceImpl
*
createImpl
()
const
;
ForceImpl
*
createImpl
()
const
;
private:
private:
class
RBTorsionInfo
;
class
RBTorsionInfo
;
std
::
vector
<
RBTorsionInfo
>
rbTorsions
;
std
::
vector
<
RBTorsionInfo
>
rbTorsions
;
bool
usePeriodic
;
};
};
/**
/**
...
...
openmmapi/src/CMAPTorsionForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010-201
5
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
CMAPTorsionForce
::
CMAPTorsionForce
()
{
CMAPTorsionForce
::
CMAPTorsionForce
()
:
usePeriodic
(
false
)
{
}
}
int
CMAPTorsionForce
::
addMap
(
int
size
,
const
std
::
vector
<
double
>&
energy
)
{
int
CMAPTorsionForce
::
addMap
(
int
size
,
const
std
::
vector
<
double
>&
energy
)
{
...
@@ -99,3 +99,11 @@ ForceImpl* CMAPTorsionForce::createImpl() const {
...
@@ -99,3 +99,11 @@ ForceImpl* CMAPTorsionForce::createImpl() const {
void
CMAPTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CMAPTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CMAPTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CMAPTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CMAPTorsionForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CMAPTorsionForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/CustomAngleForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010 Stanford University and the Authors.
*
* Portions copyright (c) 2010
-2016
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -44,7 +44,7 @@ using std::string;
...
@@ -44,7 +44,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
stringstream
;
using
std
::
vector
;
using
std
::
vector
;
CustomAngleForce
::
CustomAngleForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
{
CustomAngleForce
::
CustomAngleForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
}
const
string
&
CustomAngleForce
::
getEnergyFunction
()
const
{
const
string
&
CustomAngleForce
::
getEnergyFunction
()
const
{
...
@@ -123,3 +123,11 @@ ForceImpl* CustomAngleForce::createImpl() const {
...
@@ -123,3 +123,11 @@ ForceImpl* CustomAngleForce::createImpl() const {
void
CustomAngleForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CustomAngleForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomAngleForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CustomAngleForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CustomAngleForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomAngleForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/CustomBondForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-20
09
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
16
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -44,7 +44,7 @@ using std::string;
...
@@ -44,7 +44,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
stringstream
;
using
std
::
vector
;
using
std
::
vector
;
CustomBondForce
::
CustomBondForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
{
CustomBondForce
::
CustomBondForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
}
const
string
&
CustomBondForce
::
getEnergyFunction
()
const
{
const
string
&
CustomBondForce
::
getEnergyFunction
()
const
{
...
@@ -121,3 +121,11 @@ ForceImpl* CustomBondForce::createImpl() const {
...
@@ -121,3 +121,11 @@ ForceImpl* CustomBondForce::createImpl() const {
void
CustomBondForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CustomBondForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CustomBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CustomBondForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomBondForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/CustomCentroidBondForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2015 Stanford University and the Authors.
*
* Portions copyright (c) 2015
-2016
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -48,7 +48,7 @@ using std::string;
...
@@ -48,7 +48,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
stringstream
;
using
std
::
vector
;
using
std
::
vector
;
CustomCentroidBondForce
::
CustomCentroidBondForce
(
int
numGroups
,
const
string
&
energy
)
:
groupsPerBond
(
numGroups
),
energyExpression
(
energy
)
{
CustomCentroidBondForce
::
CustomCentroidBondForce
(
int
numGroups
,
const
string
&
energy
)
:
groupsPerBond
(
numGroups
),
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
}
CustomCentroidBondForce
::~
CustomCentroidBondForce
()
{
CustomCentroidBondForce
::~
CustomCentroidBondForce
()
{
...
@@ -173,3 +173,11 @@ ForceImpl* CustomCentroidBondForce::createImpl() const {
...
@@ -173,3 +173,11 @@ ForceImpl* CustomCentroidBondForce::createImpl() const {
void
CustomCentroidBondForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CustomCentroidBondForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomCentroidBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CustomCentroidBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CustomCentroidBondForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomCentroidBondForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/CustomCompoundBondForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
4
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -48,7 +48,7 @@ using std::string;
...
@@ -48,7 +48,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
stringstream
;
using
std
::
vector
;
using
std
::
vector
;
CustomCompoundBondForce
::
CustomCompoundBondForce
(
int
numParticles
,
const
string
&
energy
)
:
particlesPerBond
(
numParticles
),
energyExpression
(
energy
)
{
CustomCompoundBondForce
::
CustomCompoundBondForce
(
int
numParticles
,
const
string
&
energy
)
:
particlesPerBond
(
numParticles
),
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
}
...
@@ -176,3 +176,11 @@ ForceImpl* CustomCompoundBondForce::createImpl() const {
...
@@ -176,3 +176,11 @@ ForceImpl* CustomCompoundBondForce::createImpl() const {
void
CustomCompoundBondForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CustomCompoundBondForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomCompoundBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CustomCompoundBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CustomCompoundBondForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomCompoundBondForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/CustomTorsionForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2010 Stanford University and the Authors.
*
* Portions copyright (c) 2010
-2016
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -44,7 +44,7 @@ using std::string;
...
@@ -44,7 +44,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
stringstream
;
using
std
::
vector
;
using
std
::
vector
;
CustomTorsionForce
::
CustomTorsionForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
{
CustomTorsionForce
::
CustomTorsionForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
}
const
string
&
CustomTorsionForce
::
getEnergyFunction
()
const
{
const
string
&
CustomTorsionForce
::
getEnergyFunction
()
const
{
...
@@ -125,3 +125,11 @@ ForceImpl* CustomTorsionForce::createImpl() const {
...
@@ -125,3 +125,11 @@ ForceImpl* CustomTorsionForce::createImpl() const {
void
CustomTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
void
CustomTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
CustomTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
CustomTorsionForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomTorsionForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/HarmonicAngleForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-20
09
Stanford University and the Authors. *
* Portions copyright (c) 2008-20
16
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
HarmonicAngleForce
::
HarmonicAngleForce
()
{
HarmonicAngleForce
::
HarmonicAngleForce
()
:
usePeriodic
(
false
)
{
}
}
int
HarmonicAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
angle
,
double
k
)
{
int
HarmonicAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
angle
,
double
k
)
{
...
@@ -70,3 +70,11 @@ ForceImpl* HarmonicAngleForce::createImpl() const {
...
@@ -70,3 +70,11 @@ ForceImpl* HarmonicAngleForce::createImpl() const {
void
HarmonicAngleForce
::
updateParametersInContext
(
Context
&
context
)
{
void
HarmonicAngleForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
HarmonicAngleForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
HarmonicAngleForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
HarmonicAngleForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
HarmonicAngleForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/HarmonicBondForce.cpp
View file @
908340c1
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
HarmonicBondForce
::
HarmonicBondForce
()
{
HarmonicBondForce
::
HarmonicBondForce
()
:
usePeriodic
(
false
)
{
}
}
int
HarmonicBondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
k
)
{
int
HarmonicBondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
k
)
{
...
@@ -68,3 +68,11 @@ ForceImpl* HarmonicBondForce::createImpl() const {
...
@@ -68,3 +68,11 @@ ForceImpl* HarmonicBondForce::createImpl() const {
void
HarmonicBondForce
::
updateParametersInContext
(
Context
&
context
)
{
void
HarmonicBondForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
HarmonicBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
HarmonicBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
HarmonicBondForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
HarmonicBondForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/PeriodicTorsionForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
PeriodicTorsionForce
::
PeriodicTorsionForce
()
{
PeriodicTorsionForce
::
PeriodicTorsionForce
()
:
usePeriodic
(
false
)
{
}
}
int
PeriodicTorsionForce
::
addTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
periodicity
,
double
phase
,
double
k
)
{
int
PeriodicTorsionForce
::
addTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
periodicity
,
double
phase
,
double
k
)
{
...
@@ -74,3 +74,11 @@ ForceImpl* PeriodicTorsionForce::createImpl() const {
...
@@ -74,3 +74,11 @@ ForceImpl* PeriodicTorsionForce::createImpl() const {
void
PeriodicTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
void
PeriodicTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
PeriodicTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
PeriodicTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
PeriodicTorsionForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
PeriodicTorsionForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/RBTorsionForce.cpp
View file @
908340c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2008-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
RBTorsionForce
::
RBTorsionForce
()
{
RBTorsionForce
::
RBTorsionForce
()
:
usePeriodic
(
false
)
{
}
}
int
RBTorsionForce
::
addTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
c0
,
double
c1
,
double
c2
,
double
c3
,
double
c4
,
double
c5
)
{
int
RBTorsionForce
::
addTorsion
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
c0
,
double
c1
,
double
c2
,
double
c3
,
double
c4
,
double
c5
)
{
...
@@ -80,3 +80,11 @@ ForceImpl* RBTorsionForce::createImpl() const {
...
@@ -80,3 +80,11 @@ ForceImpl* RBTorsionForce::createImpl() const {
void
RBTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
void
RBTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
RBTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
dynamic_cast
<
RBTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
}
void
RBTorsionForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
RBTorsionForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment