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
2e9c418a
Commit
2e9c418a
authored
May 05, 2016
by
peastman
Browse files
Merge branch 'master' into gayberne
parents
8f532e31
a4d327f5
Changes
254
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
201 additions
and
100 deletions
+201
-100
olla/src/Platform.cpp
olla/src/Platform.cpp
+9
-3
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/CustomIntegrator.h
openmmapi/include/openmm/CustomIntegrator.h
+4
-4
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/MonteCarloAnisotropicBarostat.h
openmmapi/include/openmm/MonteCarloAnisotropicBarostat.h
+24
-15
openmmapi/include/openmm/MonteCarloBarostat.h
openmmapi/include/openmm/MonteCarloBarostat.h
+21
-12
openmmapi/include/openmm/MonteCarloMembraneBarostat.h
openmmapi/include/openmm/MonteCarloMembraneBarostat.h
+19
-10
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/include/openmm/internal/OSRngSeed.h
openmmapi/include/openmm/internal/OSRngSeed.h
+1
-1
openmmapi/src/CMAPTorsionForce.cpp
openmmapi/src/CMAPTorsionForce.cpp
+10
-2
openmmapi/src/ContextImpl.cpp
openmmapi/src/ContextImpl.cpp
+8
-3
openmmapi/src/CustomAngleForce.cpp
openmmapi/src/CustomAngleForce.cpp
+10
-2
openmmapi/src/CustomBondForce.cpp
openmmapi/src/CustomBondForce.cpp
+10
-2
No files found.
olla/src/Platform.cpp
View file @
2e9c418a
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -89,15 +89,21 @@ void Platform::setPropertyValue(Context& context, const string& property, const
}
const
string
&
Platform
::
getPropertyDefaultValue
(
const
string
&
property
)
const
{
map
<
string
,
string
>::
const_iterator
value
=
defaultProperties
.
find
(
property
);
string
propertyName
=
property
;
if
(
deprecatedPropertyReplacements
.
find
(
property
)
!=
deprecatedPropertyReplacements
.
end
())
propertyName
=
deprecatedPropertyReplacements
.
find
(
property
)
->
second
;
map
<
string
,
string
>::
const_iterator
value
=
defaultProperties
.
find
(
propertyName
);
if
(
value
==
defaultProperties
.
end
())
throw
OpenMMException
(
"getPropertyDefaultValue: Illegal property name"
);
return
value
->
second
;
}
void
Platform
::
setPropertyDefaultValue
(
const
string
&
property
,
const
string
&
value
)
{
string
propertyName
=
property
;
if
(
deprecatedPropertyReplacements
.
find
(
property
)
!=
deprecatedPropertyReplacements
.
end
())
propertyName
=
deprecatedPropertyReplacements
.
find
(
property
)
->
second
;
for
(
int
i
=
0
;
i
<
(
int
)
platformProperties
.
size
();
i
++
)
if
(
platformProperties
[
i
]
==
property
)
{
if
(
platformProperties
[
i
]
==
property
Name
)
{
defaultProperties
[
property
]
=
value
;
return
;
}
...
...
openmmapi/include/openmm/CMAPTorsionForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -159,15 +159,18 @@ public:
* new bonds and torsions cannot be added.
*/
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
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -175,6 +178,7 @@ private:
class
CMAPTorsionInfo
;
std
::
vector
<
MapInfo
>
maps
;
std
::
vector
<
CMAPTorsionInfo
>
torsions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomAngleForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -203,15 +203,18 @@ public:
* the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added.
*/
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
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -222,6 +225,7 @@ private:
std
::
vector
<
AngleParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
AngleInfo
>
angles
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomBondForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -200,15 +200,18 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
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
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -219,6 +222,7 @@ private:
std
::
vector
<
BondParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomCentroidBondForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -324,15 +324,18 @@ public:
* bonds be added.
*/
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
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -348,6 +351,7 @@ private:
std
::
vector
<
GroupInfo
>
groups
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomCompoundBondForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -298,15 +298,18 @@ public:
* the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added.
*/
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
* conditions.
*
* @returns
fal
se
* @returns
true if force uses PBC and false otherwi
se
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -320,6 +323,7 @@ private:
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
FunctionInfo
>
functions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/CustomIntegrator.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2011-201
2
Stanford University and the Authors. *
* Portions copyright (c) 2011-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -266,15 +266,15 @@ public:
/**
* Begin an "if" block.
*/
Begin
IfBlock
=
6
,
IfBlock
Start
=
6
,
/**
* Begin a while" block.
*/
Begin
WhileBlock
=
7
,
WhileBlock
Start
=
7
,
/**
* End an "if" or "while" block.
*/
End
Block
=
8
Block
End
=
8
};
/**
* Create a CustomIntegrator.
...
...
openmmapi/include/openmm/CustomTorsionForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -206,15 +206,18 @@ public:
* the Context. The set of particles involved in a torsion cannot be changed, nor can new torsions be added.
*/
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
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
@@ -225,6 +228,7 @@ private:
std
::
vector
<
TorsionParameterInfo
>
parameters
;
std
::
vector
<
GlobalParameterInfo
>
globalParameters
;
std
::
vector
<
TorsionInfo
>
torsions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/HarmonicAngleForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -102,20 +102,23 @@ public:
* in a angle cannot be changed, nor can new angles be added.
*/
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
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
protected:
bool
usesPeriodicBoundaryConditions
()
const
;
protected
:
ForceImpl
*
createImpl
()
const
;
private:
class
AngleInfo
;
std
::
vector
<
AngleInfo
>
angles
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/HarmonicBondForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -99,20 +99,24 @@ public:
* in a bond cannot be changed, nor can new bonds be added.
*/
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
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
class
BondInfo
;
std
::
vector
<
BondInfo
>
bonds
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/MonteCarloAnisotropicBarostat.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010-201
3
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman, Lee-Ping Wang *
* Contributors: *
* *
...
...
@@ -81,17 +81,25 @@ public:
static
const
std
::
string
key
=
"MonteCarloPressureZ"
;
return
key
;
}
/**
* This is the name of the parameter which stores the current temperature at which the
* system is being maintained (in Kelvin)
*/
static
const
std
::
string
&
Temperature
()
{
static
const
std
::
string
key
=
"AnisotropicMonteCarloTemperature"
;
return
key
;
}
/**
* Create a MonteCarloAnisotropicBarostat.
*
* @param defaultPressure The default pressure acting on each axis (in bar)
* @param
t
emperature
the
temperature at which the system is being maintained (in Kelvin)
* @param
defaultT
emperature
the default
temperature at which the system is being maintained (in Kelvin)
* @param scaleX whether to allow the X dimension of the periodic box to change size
* @param scaleY whether to allow the Y dimension of the periodic box to change size
* @param scaleZ whether to allow the Z dimension of the periodic box to change size
* @param frequency the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
*/
MonteCarloAnisotropicBarostat
(
const
Vec3
&
defaultPressure
,
double
t
emperature
,
bool
scaleX
=
true
,
bool
scaleY
=
true
,
bool
scaleZ
=
true
,
int
frequency
=
25
);
MonteCarloAnisotropicBarostat
(
const
Vec3
&
defaultPressure
,
double
defaultT
emperature
,
bool
scaleX
=
true
,
bool
scaleY
=
true
,
bool
scaleZ
=
true
,
int
frequency
=
25
);
/**
* Get the default pressure (in bar).
*
...
...
@@ -142,18 +150,19 @@ public:
frequency
=
freq
;
}
/**
* Get the temperature at which the system is being maintained, measured in Kelvin.
* Get the
default
temperature at which the system is being maintained, measured in Kelvin.
*/
double
getTemperature
()
const
{
return
t
emperature
;
double
get
Default
Temperature
()
const
{
return
defaultT
emperature
;
}
/**
* Set the temperature at which the system is being maintained.
* Set the default temperature at which the system is being maintained. This will affect any new Contexts you create,
* but not ones that already exist.
*
* @param temp the system temperature, measured in Kelvin.
*/
void
setTemperature
(
double
temp
)
{
t
emperature
=
temp
;
void
set
Default
Temperature
(
double
temp
)
{
defaultT
emperature
=
temp
;
}
/**
* Get the random number seed. See setRandomNumberSeed() for details.
...
...
@@ -188,7 +197,7 @@ protected:
ForceImpl
*
createImpl
()
const
;
private:
Vec3
defaultPressure
;
double
t
emperature
;
double
defaultT
emperature
;
bool
scaleX
,
scaleY
,
scaleZ
;
int
frequency
,
randomNumberSeed
;
};
...
...
openmmapi/include/openmm/MonteCarloBarostat.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -58,14 +58,22 @@ public:
static
const
std
::
string
key
=
"MonteCarloPressure"
;
return
key
;
}
/**
* This is the name of the parameter which stores the current temperature at which the
* system is being maintained (in Kelvin)
*/
static
const
std
::
string
&
Temperature
()
{
static
const
std
::
string
key
=
"MonteCarloTemperature"
;
return
key
;
}
/**
* Create a MonteCarloBarostat.
*
* @param defaultPressure the default pressure acting on the system (in bar)
* @param
t
emperature
the
temperature at which the system is being maintained (in Kelvin)
* @param
defaultT
emperature
the default
temperature at which the system is being maintained (in Kelvin)
* @param frequency the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
*/
MonteCarloBarostat
(
double
defaultPressure
,
double
t
emperature
,
int
frequency
=
25
);
MonteCarloBarostat
(
double
defaultPressure
,
double
defaultT
emperature
,
int
frequency
=
25
);
/**
* Get the default pressure acting on the system (in bar).
*
...
...
@@ -98,18 +106,19 @@ public:
frequency
=
freq
;
}
/**
* Get the temperature at which the system is being maintained, measured in Kelvin.
* Get the
default
temperature at which the system is being maintained, measured in Kelvin.
*/
double
getTemperature
()
const
{
return
t
emperature
;
double
get
Default
Temperature
()
const
{
return
defaultT
emperature
;
}
/**
* Set the temperature at which the system is being maintained.
* Set the default temperature at which the system is being maintained. This will affect any new Contexts you create,
* but not ones that already exist.
*
* @param temp the system temperature, measured in Kelvin.
*/
void
setTemperature
(
double
temp
)
{
t
emperature
=
temp
;
void
set
Default
Temperature
(
double
temp
)
{
defaultT
emperature
=
temp
;
}
/**
* Get the random number seed. See setRandomNumberSeed() for details.
...
...
@@ -143,7 +152,7 @@ public:
protected:
ForceImpl
*
createImpl
()
const
;
private:
double
defaultPressure
,
t
emperature
;
double
defaultPressure
,
defaultT
emperature
;
int
frequency
,
randomNumberSeed
;
};
...
...
openmmapi/include/openmm/MonteCarloMembraneBarostat.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010-201
4
Stanford University and the Authors. *
* Portions copyright (c) 2010-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -111,17 +111,25 @@ public:
static
const
std
::
string
key
=
"MembraneMonteCarloSurfaceTension"
;
return
key
;
}
/**
* This is the name of the parameter which stores the current temperature at which the
* system is being maintained (in Kelvin)
*/
static
const
std
::
string
&
Temperature
()
{
static
const
std
::
string
key
=
"MembraneMonteCarloTemperature"
;
return
key
;
}
/**
* Create a MonteCarloMembraneBarostat.
*
* @param defaultPressure the default pressure acting on the system (in bar)
* @param defaultSurfaceTension the default surface tension acting on the system (in bar*nm)
* @param
t
emperature
the temperature at which the system is being maintained (in Kelvin)
* @param
defaultT
emperature the
default
temperature at which the system is being maintained (in Kelvin)
* @param xymode the mode specifying the behavior of the X and Y axes
* @param zmode the mode specifying the behavior of the Z axis
* @param frequency the frequency at which Monte Carlo volume changes should be attempted (in time steps)
*/
MonteCarloMembraneBarostat
(
double
defaultPressure
,
double
defaultSurfaceTension
,
double
t
emperature
,
XYMode
xymode
,
ZMode
zmode
,
int
frequency
=
25
);
MonteCarloMembraneBarostat
(
double
defaultPressure
,
double
defaultSurfaceTension
,
double
defaultT
emperature
,
XYMode
xymode
,
ZMode
zmode
,
int
frequency
=
25
);
/**
* Get the default pressure acting on the system (in bar).
*
...
...
@@ -171,18 +179,19 @@ public:
frequency
=
freq
;
}
/**
* Get the temperature at which the system is being maintained, measured in Kelvin.
* Get the
default
temperature at which the system is being maintained, measured in Kelvin.
*/
double
getTemperature
()
const
{
return
t
emperature
;
double
get
Default
Temperature
()
const
{
return
defaultT
emperature
;
}
/**
* Set the temperature at which the system is being maintained.
* Set the default temperature at which the system is being maintained. This will affect any new Contexts you create,
* but not ones that already exist.
*
* @param temp the system temperature, measured in Kelvin.
*/
void
setTemperature
(
double
temp
)
{
t
emperature
=
temp
;
void
set
Default
Temperature
(
double
temp
)
{
defaultT
emperature
=
temp
;
}
/**
* Get the mode specifying the behavior of the X and Y axes.
...
...
@@ -240,7 +249,7 @@ public:
protected:
ForceImpl
*
createImpl
()
const
;
private:
double
defaultPressure
,
defaultSurfaceTension
,
t
emperature
;
double
defaultPressure
,
defaultSurfaceTension
,
defaultT
emperature
;
XYMode
xymode
;
ZMode
zmode
;
int
frequency
,
randomNumberSeed
;
...
...
openmmapi/include/openmm/PeriodicTorsionForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -108,20 +108,24 @@ public:
* in a torsion cannot be changed, nor can new torsions be added.
*/
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
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
class
PeriodicTorsionInfo
;
std
::
vector
<
PeriodicTorsionInfo
>
periodicTorsions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/RBTorsionForce.h
View file @
2e9c418a
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -117,20 +117,24 @@ public:
* in a torsion cannot be changed, nor can new torsions be added.
*/
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
* conditions.
*
* @returns true if force uses PBC and false otherwise
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
class
RBTorsionInfo
;
std
::
vector
<
RBTorsionInfo
>
rbTorsions
;
bool
usePeriodic
;
};
/**
...
...
openmmapi/include/openmm/internal/OSRngSeed.h
View file @
2e9c418a
#
ifndef
OPENMM_OSRNGSEED_H_
#ifndef OPENMM_OSRNGSEED_H_
#define OPENMM_OSRNGSEED_H_
...
...
openmmapi/src/CMAPTorsionForce.cpp
View file @
2e9c418a
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -37,7 +37,7 @@
using
namespace
OpenMM
;
CMAPTorsionForce
::
CMAPTorsionForce
()
{
CMAPTorsionForce
::
CMAPTorsionForce
()
:
usePeriodic
(
false
)
{
}
int
CMAPTorsionForce
::
addMap
(
int
size
,
const
std
::
vector
<
double
>&
energy
)
{
...
...
@@ -99,3 +99,11 @@ ForceImpl* CMAPTorsionForce::createImpl() const {
void
CMAPTorsionForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CMAPTorsionForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
void
CMAPTorsionForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CMAPTorsionForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
openmmapi/src/ContextImpl.cpp
View file @
2e9c418a
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
3
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
6
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -84,15 +84,20 @@ ContextImpl::ContextImpl(Context& owner, const System& system, Integrator& integ
// Validate the list of properties.
const
vector
<
string
>&
platformProperties
=
platform
->
getPropertyNames
();
map
<
string
,
string
>
validatedProperties
;
for
(
map
<
string
,
string
>::
const_iterator
iter
=
properties
.
begin
();
iter
!=
properties
.
end
();
++
iter
)
{
string
property
=
iter
->
first
;
if
(
platform
->
deprecatedPropertyReplacements
.
find
(
property
)
!=
platform
->
deprecatedPropertyReplacements
.
end
())
property
=
platform
->
deprecatedPropertyReplacements
[
property
];
bool
valid
=
false
;
for
(
int
i
=
0
;
i
<
(
int
)
platformProperties
.
size
();
i
++
)
if
(
platformProperties
[
i
]
==
iter
->
first
)
{
if
(
platformProperties
[
i
]
==
property
)
{
valid
=
true
;
break
;
}
if
(
!
valid
)
throw
OpenMMException
(
"Illegal property name: "
+
iter
->
first
);
validatedProperties
[
property
]
=
iter
->
second
;
}
// Find the list of kernels required.
...
...
@@ -139,7 +144,7 @@ ContextImpl::ContextImpl(Context& owner, const System& system, Integrator& integ
for
(
int
i
=
candidatePlatforms
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
try
{
this
->
platform
=
platform
=
candidatePlatforms
[
i
].
second
;
platform
->
contextCreated
(
*
this
,
p
roperties
);
platform
->
contextCreated
(
*
this
,
validatedP
roperties
);
break
;
}
catch
(...)
{
...
...
openmmapi/src/CustomAngleForce.cpp
View file @
2e9c418a
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -44,7 +44,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
vector
;
CustomAngleForce
::
CustomAngleForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
{
CustomAngleForce
::
CustomAngleForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
const
string
&
CustomAngleForce
::
getEnergyFunction
()
const
{
...
...
@@ -123,3 +123,11 @@ ForceImpl* CustomAngleForce::createImpl() const {
void
CustomAngleForce
::
updateParametersInContext
(
Context
&
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 @
2e9c418a
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* 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 *
* Contributors: *
* *
...
...
@@ -44,7 +44,7 @@ using std::string;
using
std
::
stringstream
;
using
std
::
vector
;
CustomBondForce
::
CustomBondForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
{
CustomBondForce
::
CustomBondForce
(
const
string
&
energy
)
:
energyExpression
(
energy
)
,
usePeriodic
(
false
)
{
}
const
string
&
CustomBondForce
::
getEnergyFunction
()
const
{
...
...
@@ -121,3 +121,11 @@ ForceImpl* CustomBondForce::createImpl() const {
void
CustomBondForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomBondForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
void
CustomBondForce
::
setUsesPeriodicBoundaryConditions
(
bool
periodic
)
{
usePeriodic
=
periodic
;
}
bool
CustomBondForce
::
usesPeriodicBoundaryConditions
()
const
{
return
usePeriodic
;
}
Prev
1
2
3
4
5
6
…
13
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