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
8469621f
Commit
8469621f
authored
Feb 23, 2017
by
peastman
Committed by
GitHub
Feb 23, 2017
Browse files
Merge pull request #1747 from peastman/realtype
Eliminated RealOpenMM
parents
b84e22ba
6813ca57
Changes
151
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
260 additions
and
262 deletions
+260
-262
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
+16
-16
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
+16
-16
platforms/reference/include/ReferenceCustomDynamics.h
platforms/reference/include/ReferenceCustomDynamics.h
+13
-13
platforms/reference/include/ReferenceCustomExternalIxn.h
platforms/reference/include/ReferenceCustomExternalIxn.h
+3
-2
platforms/reference/include/ReferenceCustomGBIxn.h
platforms/reference/include/ReferenceCustomGBIxn.h
+21
-21
platforms/reference/include/ReferenceCustomHbondIxn.h
platforms/reference/include/ReferenceCustomHbondIxn.h
+19
-19
platforms/reference/include/ReferenceCustomManyParticleIxn.h
platforms/reference/include/ReferenceCustomManyParticleIxn.h
+22
-25
platforms/reference/include/ReferenceCustomNonbondedIxn.h
platforms/reference/include/ReferenceCustomNonbondedIxn.h
+11
-11
platforms/reference/include/ReferenceCustomTorsionIxn.h
platforms/reference/include/ReferenceCustomTorsionIxn.h
+5
-5
platforms/reference/include/ReferenceDynamics.h
platforms/reference/include/ReferenceDynamics.h
+8
-8
platforms/reference/include/ReferenceForce.h
platforms/reference/include/ReferenceForce.h
+11
-11
platforms/reference/include/ReferenceGayBerneForce.h
platforms/reference/include/ReferenceGayBerneForce.h
+19
-19
platforms/reference/include/ReferenceHarmonicBondIxn.h
platforms/reference/include/ReferenceHarmonicBondIxn.h
+5
-5
platforms/reference/include/ReferenceKernels.h
platforms/reference/include/ReferenceKernels.h
+36
-36
platforms/reference/include/ReferenceLJCoulomb14.h
platforms/reference/include/ReferenceLJCoulomb14.h
+3
-3
platforms/reference/include/ReferenceLJCoulombIxn.h
platforms/reference/include/ReferenceLJCoulombIxn.h
+23
-24
platforms/reference/include/ReferenceLincsAlgorithm.h
platforms/reference/include/ReferenceLincsAlgorithm.h
+14
-14
platforms/reference/include/ReferenceMonteCarloBarostat.h
platforms/reference/include/ReferenceMonteCarloBarostat.h
+4
-3
platforms/reference/include/ReferenceNeighborList.h
platforms/reference/include/ReferenceNeighborList.h
+4
-4
platforms/reference/include/ReferenceObc.h
platforms/reference/include/ReferenceObc.h
+7
-7
No files found.
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
View file @
8469621f
...
...
@@ -54,7 +54,7 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
/**---------------------------------------------------------------------------------------
...
...
@@ -68,12 +68,12 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
groupCenters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Vec
3
>&
groupCenters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
void
computeDelta
(
int
group1
,
int
group2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
groupCenters
)
const
;
void
computeDelta
(
int
group1
,
int
group2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
groupCenters
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -106,7 +106,7 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -130,9 +130,9 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
bondParameters
,
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
bondParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
@@ -153,7 +153,7 @@ public:
std
::
string
name
;
int
g1
,
g2
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -164,8 +164,8 @@ public:
std
::
string
name
;
int
g1
,
g2
,
g3
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
g3
(
groups
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -176,11 +176,11 @@ public:
std
::
string
name
;
int
g1
,
g2
,
g3
,
g4
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
g3
(
groups
[
2
]),
g4
(
groups
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
View file @
8469621f
...
...
@@ -52,7 +52,7 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
/**---------------------------------------------------------------------------------------
...
...
@@ -66,12 +66,12 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
void
computeDelta
(
int
atom1
,
int
atom2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -103,7 +103,7 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -127,9 +127,9 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
bondParameters
,
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
bondParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
@@ -150,7 +150,7 @@ public:
std
::
string
name
;
int
p1
,
p2
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -161,8 +161,8 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -173,11 +173,11 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomDynamics.h
View file @
8469621f
...
...
@@ -43,8 +43,8 @@ private:
class
DerivFunction
;
const
OpenMM
::
CustomIntegrator
&
integrator
;
std
::
vector
<
RealOpenMM
>
inverseMasses
;
std
::
vector
<
OpenMM
::
Real
Vec
>
sumBuffer
,
oldPos
;
std
::
vector
<
double
>
inverseMasses
;
std
::
vector
<
OpenMM
::
Vec
3
>
sumBuffer
,
oldPos
;
std
::
vector
<
OpenMM
::
CustomIntegrator
::
ComputationType
>
stepType
;
std
::
vector
<
std
::
string
>
stepVariable
;
std
::
vector
<
std
::
vector
<
Lepton
::
CompiledExpression
>
>
stepExpressions
;
...
...
@@ -60,15 +60,15 @@ private:
std
::
vector
<
int
>
perDofVariableIndex
,
stepVariableIndex
;
std
::
vector
<
double
>
perDofVariable
;
void
initialize
(
OpenMM
::
ContextImpl
&
context
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
);
void
initialize
(
OpenMM
::
ContextImpl
&
context
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
);
Lepton
::
ExpressionTreeNode
replaceDerivFunctions
(
const
Lepton
::
ExpressionTreeNode
&
node
,
OpenMM
::
ContextImpl
&
context
);
void
computePerDof
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
results
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
const
std
::
vector
<
RealOpenMM
>&
masses
,
const
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
const
Lepton
::
CompiledExpression
&
expression
);
void
computePerDof
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
results
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
const
std
::
vector
<
double
>&
masses
,
const
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
const
Lepton
::
CompiledExpression
&
expression
);
void
recordChangedParameters
(
OpenMM
::
ContextImpl
&
context
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
);
void
recordChangedParameters
(
OpenMM
::
ContextImpl
&
context
,
std
::
map
<
std
::
string
,
double
>&
globals
);
bool
evaluateCondition
(
int
step
);
...
...
@@ -110,9 +110,9 @@ public:
--------------------------------------------------------------------------------------- */
void
update
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
bool
&
forcesAreValid
,
RealOpenMM
tolerance
);
void
update
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
bool
&
forcesAreValid
,
double
tolerance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -130,9 +130,9 @@ public:
--------------------------------------------------------------------------------------- */
double
computeKineticEnergy
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
bool
&
forcesAreValid
);
double
computeKineticEnergy
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
bool
&
forcesAreValid
);
};
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceCustomExternalIxn.h
View file @
8469621f
...
...
@@ -26,6 +26,7 @@
#define __ReferenceCustomExternalIxn_H__
#include "ReferenceCustomExternalIxn.h"
#include "openmm/Vec3.h"
#include "lepton/CompiledExpression.h"
namespace
OpenMM
{
...
...
@@ -79,8 +80,8 @@ class ReferenceCustomExternalIxn {
--------------------------------------------------------------------------------------- */
void
calculateForce
(
int
atomIndex
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energy
)
const
;
void
calculateForce
(
int
atomIndex
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energy
)
const
;
};
...
...
platforms/reference/include/ReferenceCustomGBIxn.h
View file @
8469621f
...
...
@@ -41,8 +41,8 @@ class ReferenceCustomGBIxn {
bool
cutoff
;
bool
periodic
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
;
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
double
cutoffDistance
;
CompiledExpressionSet
expressionSet
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
std
::
vector
<
std
::
vector
<
Lepton
::
CompiledExpression
>
>
valueDerivExpressions
;
...
...
@@ -59,8 +59,8 @@ class ReferenceCustomGBIxn {
std
::
vector
<
int
>
particleParamIndex
;
std
::
vector
<
int
>
particleValueIndex
;
int
rIndex
,
xIndex
,
yIndex
,
zIndex
;
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
values
,
dEdV
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
dValuedParam
;
std
::
vector
<
std
::
vector
<
double
>
>
values
,
dEdV
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
dValuedParam
;
/**---------------------------------------------------------------------------------------
...
...
@@ -73,7 +73,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateSingleParticleValue
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
);
void
calculateSingleParticleValue
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
);
/**---------------------------------------------------------------------------------------
...
...
@@ -88,7 +88,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateParticlePairValue
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
void
calculateParticlePairValue
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
bool
useExclusions
);
/**---------------------------------------------------------------------------------------
...
...
@@ -103,7 +103,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateOnePairValue
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
);
void
calculateOnePairValue
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
);
/**---------------------------------------------------------------------------------------
...
...
@@ -118,8 +118,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateSingleParticleEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateSingleParticleEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
...
...
@@ -136,9 +136,9 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateParticlePairEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
void
calculateParticlePairEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
bool
useExclusions
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
...
...
@@ -154,8 +154,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateOnePairEnergyTerm
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOnePairEnergyTerm
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
...
...
@@ -169,8 +169,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateChainRuleForces
(
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
energyParamDerivs
);
void
calculateChainRuleForces
(
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
...
...
@@ -185,8 +185,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateOnePairChainRule
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
bool
isExcluded
);
void
calculateOnePairChainRule
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
bool
isExcluded
);
public:
...
...
@@ -226,7 +226,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
,
const
OpenMM
::
NeighborList
&
neighbors
);
void
setUseCutoff
(
double
distance
,
const
OpenMM
::
NeighborList
&
neighbors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -238,7 +238,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -254,8 +254,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void
calculateIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceCustomHbondIxn.h
View file @
8469621f
...
...
@@ -43,8 +43,8 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
class
DihedralTermInfo
;
bool
cutoff
;
bool
periodic
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
;
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
double
cutoffDistance
;
std
::
vector
<
std
::
vector
<
int
>
>
donorAtoms
,
acceptorAtoms
;
Lepton
::
ExpressionProgram
energyExpression
;
std
::
vector
<
std
::
string
>
donorParamNames
,
acceptorParamNames
;
...
...
@@ -65,13 +65,13 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
donor
,
int
acceptor
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
void
calculateOneIxn
(
int
donor
,
int
acceptor
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -103,7 +103,7 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
);
void
setUseCutoff
(
double
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -115,7 +115,7 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -152,9 +152,9 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
donorParameters
,
RealOpenMM
**
acceptorParameters
,
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
donorParameters
,
double
**
acceptorParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
// ---------------------------------------------------------------------------------------
...
...
@@ -165,7 +165,7 @@ public:
std
::
string
name
;
int
p1
,
p2
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -176,8 +176,8 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -188,11 +188,11 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomManyParticleIxn.h
View file @
8469621f
...
...
@@ -45,8 +45,8 @@ class ReferenceCustomManyParticleIxn {
class
DihedralTermInfo
;
int
numParticlesPerSet
,
numPerParticleParameters
,
numTypes
;
bool
useCutoff
,
usePeriodic
,
centralParticleMode
;
RealOpenMM
cutoffDistance
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
double
cutoffDistance
;
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
Lepton
::
ExpressionProgram
energyExpression
;
std
::
vector
<
std
::
vector
<
std
::
string
>
>
particleParamNames
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
...
...
@@ -58,9 +58,9 @@ class ReferenceCustomManyParticleIxn {
std
::
vector
<
AngleTermInfo
>
angleTerms
;
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
void
loopOverInteractions
(
std
::
vector
<
int
>&
particles
,
int
loopIndex
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
void
loopOverInteractions
(
std
::
vector
<
int
>&
particles
,
int
loopIndex
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -75,13 +75,13 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
const
std
::
vector
<
int
>&
particles
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
void
calculateOneIxn
(
const
std
::
vector
<
int
>&
particles
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -110,7 +110,7 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
);
void
setUseCutoff
(
double
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -122,7 +122,7 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -136,12 +136,9 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
void
calculateIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
particleParameters
,
void
calculateIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
particleParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
// ---------------------------------------------------------------------------------------
std
::
vector
<
OpenMM
::
Vec3
>&
forces
,
double
*
totalEnergy
)
const
;
};
class
ReferenceCustomManyParticleIxn
::
ParticleTermInfo
{
...
...
@@ -159,7 +156,7 @@ public:
std
::
string
name
;
int
p1
,
p2
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -170,8 +167,8 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -182,11 +179,11 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomNonbondedIxn.h
View file @
8469621f
...
...
@@ -43,8 +43,8 @@ class ReferenceCustomNonbondedIxn {
bool
useSwitch
;
bool
periodic
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
,
switchingDistance
;
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
double
cutoffDistance
,
switchingDistance
;
Lepton
::
CompiledExpression
energyExpression
;
Lepton
::
CompiledExpression
forceExpression
;
std
::
vector
<
std
::
string
>
paramNames
;
...
...
@@ -68,8 +68,8 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
public:
...
...
@@ -100,7 +100,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
,
const
OpenMM
::
NeighborList
&
neighbors
);
void
setUseCutoff
(
double
distance
,
const
OpenMM
::
NeighborList
&
neighbors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -121,7 +121,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void
setUseSwitchingFunction
(
RealOpenMM
distance
);
void
setUseSwitchingFunction
(
double
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -133,7 +133,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -152,10 +152,10 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
*
fixedParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceCustomTorsionIxn.h
View file @
8469621f
...
...
@@ -40,7 +40,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
int
thetaIndex
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
...
...
@@ -70,7 +70,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -84,9 +84,9 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceDynamics.h
View file @
8469621f
...
...
@@ -49,8 +49,8 @@ class OPENMM_EXPORT ReferenceDynamics {
int
_numberOfAtoms
;
int
_timeStep
;
RealOpenMM
_deltaT
;
RealOpenMM
_temperature
;
double
_deltaT
;
double
_temperature
;
int
_ownReferenceConstraint
;
ReferenceConstraintAlgorithm
*
_referenceConstraint
;
...
...
@@ -67,7 +67,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceDynamics
(
int
numberOfAtoms
,
RealOpenMM
_deltaT
,
RealOpenMM
temperature
);
ReferenceDynamics
(
int
numberOfAtoms
,
double
_deltaT
,
double
temperature
);
/**---------------------------------------------------------------------------------------
...
...
@@ -115,7 +115,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM
getDeltaT
()
const
;
double
getDeltaT
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -123,7 +123,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void
setDeltaT
(
RealOpenMM
deltaT
);
void
setDeltaT
(
double
deltaT
);
/**---------------------------------------------------------------------------------------
...
...
@@ -133,7 +133,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM
getTemperature
()
const
;
double
getTemperature
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -148,8 +148,8 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
virtual
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
);
virtual
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
double
tolerance
);
/**---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceForce.h
View file @
8469621f
...
...
@@ -24,7 +24,7 @@
#ifndef __ReferenceForce_H__
#define __ReferenceForce_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "lepton/CompiledExpression.h"
#include "openmm/internal/windowsExport.h"
...
...
@@ -34,7 +34,7 @@ class OPENMM_EXPORT ReferenceForce {
private:
static
RealOpenMM
periodicDifference
(
RealOpenMM
val1
,
RealOpenMM
val2
,
RealOpenMM
period
);
static
double
periodicDifference
(
double
val1
,
double
val2
,
double
period
);
public:
...
...
@@ -80,8 +80,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static
void
getDeltaR
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
RealOpenMM
*
deltaR
);
static
void
getDeltaR
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
...
...
@@ -94,7 +94,7 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static
Real
Vec
getDeltaR
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
);
static
Vec
3
getDeltaR
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
);
/**---------------------------------------------------------------------------------------
...
...
@@ -108,8 +108,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
const
RealOpenMM
*
boxSize
,
RealOpenMM
*
deltaR
);
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
double
*
boxSize
,
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
...
...
@@ -123,8 +123,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
const
OpenMM
::
Real
Vec
*
boxVectors
,
RealOpenMM
*
deltaR
);
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
OpenMM
::
Vec
3
*
boxVectors
,
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
...
...
@@ -138,8 +138,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static
Real
Vec
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
const
OpenMM
::
Real
Vec
*
boxVectors
);
static
Vec
3
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
OpenMM
::
Vec
3
*
boxVectors
);
/**
* Get a pointer to the memory for setting a variable in a CompiledExpression. If the expression
...
...
platforms/reference/include/ReferenceGayBerneForce.h
View file @
8469621f
...
...
@@ -33,7 +33,7 @@
#define __ReferenceGayBerneForce_H__
#include "openmm/GayBerneForce.h"
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include <set>
#include <utility>
...
...
@@ -55,7 +55,7 @@ public:
* @param boxVectors the periodic box vectors
* @return the energy of the interaction
*/
RealOpenMM
calculateForce
(
const
std
::
vector
<
Real
Vec
>&
positions
,
std
::
vector
<
Real
Vec
>&
forces
,
const
Real
Vec
*
boxVectors
);
double
calculateForce
(
const
std
::
vector
<
Vec
3
>&
positions
,
std
::
vector
<
Vec
3
>&
forces
,
const
Vec
3
*
boxVectors
);
private:
struct
ParticleInfo
;
...
...
@@ -64,33 +64,33 @@ private:
std
::
vector
<
ExceptionInfo
>
exceptions
;
std
::
set
<
std
::
pair
<
int
,
int
>
>
exclusions
;
GayBerneForce
::
NonbondedMethod
nonbondedMethod
;
RealOpenMM
cutoffDistance
,
switchingDistance
;
double
cutoffDistance
,
switchingDistance
;
bool
useSwitchingFunction
;
std
::
vector
<
RealOpenMM
>
s
;
std
::
vector
<
double
>
s
;
std
::
vector
<
Matrix
>
A
,
B
,
G
;
void
computeEllipsoidFrames
(
const
std
::
vector
<
Real
Vec
>&
positions
);
void
computeEllipsoidFrames
(
const
std
::
vector
<
Vec
3
>&
positions
);
void
applyTorques
(
const
std
::
vector
<
Real
Vec
>&
positions
,
std
::
vector
<
Real
Vec
>&
forces
,
const
std
::
vector
<
Real
Vec
>&
torques
);
void
applyTorques
(
const
std
::
vector
<
Vec
3
>&
positions
,
std
::
vector
<
Vec
3
>&
forces
,
const
std
::
vector
<
Vec
3
>&
torques
);
RealOpenMM
computeOneInteraction
(
int
particle1
,
int
particle2
,
RealOpenMM
sigma
,
RealOpenMM
epsilon
,
const
std
::
vector
<
Real
Vec
>&
positions
,
std
::
vector
<
Real
Vec
>&
forces
,
std
::
vector
<
Real
Vec
>&
torques
,
const
Real
Vec
*
boxVectors
);
double
computeOneInteraction
(
int
particle1
,
int
particle2
,
double
sigma
,
double
epsilon
,
const
std
::
vector
<
Vec
3
>&
positions
,
std
::
vector
<
Vec
3
>&
forces
,
std
::
vector
<
Vec
3
>&
torques
,
const
Vec
3
*
boxVectors
);
};
struct
ReferenceGayBerneForce
::
ParticleInfo
{
int
xparticle
,
yparticle
;
RealOpenMM
sigma
,
epsilon
,
rx
,
ry
,
rz
,
ex
,
ey
,
ez
;
double
sigma
,
epsilon
,
rx
,
ry
,
rz
,
ex
,
ey
,
ez
;
};
struct
ReferenceGayBerneForce
::
ExceptionInfo
{
int
particle1
,
particle2
;
RealOpenMM
sigma
,
epsilon
;
double
sigma
,
epsilon
;
};
struct
ReferenceGayBerneForce
::
Matrix
{
RealOpenMM
v
[
3
][
3
];
Real
Vec
operator
*
(
const
Real
Vec
&
r
)
{
return
Real
Vec
(
v
[
0
][
0
]
*
r
[
0
]
+
v
[
0
][
1
]
*
r
[
1
]
+
v
[
0
][
2
]
*
r
[
2
],
double
v
[
3
][
3
];
Vec
3
operator
*
(
const
Vec
3
&
r
)
{
return
Vec
3
(
v
[
0
][
0
]
*
r
[
0
]
+
v
[
0
][
1
]
*
r
[
1
]
+
v
[
0
][
2
]
*
r
[
2
],
v
[
1
][
0
]
*
r
[
0
]
+
v
[
1
][
1
]
*
r
[
1
]
+
v
[
1
][
2
]
*
r
[
2
],
v
[
2
][
0
]
*
r
[
0
]
+
v
[
2
][
1
]
*
r
[
1
]
+
v
[
2
][
2
]
*
r
[
2
]);
}
...
...
@@ -103,13 +103,13 @@ struct ReferenceGayBerneForce::Matrix {
return
result
;
}
RealOpenMM
determinant
()
{
double
determinant
()
{
return
(
v
[
0
][
0
]
*
v
[
1
][
1
]
*
v
[
2
][
2
]
+
v
[
0
][
1
]
*
v
[
1
][
2
]
*
v
[
2
][
0
]
+
v
[
0
][
2
]
*
v
[
1
][
0
]
*
v
[
2
][
1
]
-
v
[
0
][
0
]
*
v
[
1
][
2
]
*
v
[
2
][
1
]
-
v
[
0
][
1
]
*
v
[
1
][
0
]
*
v
[
2
][
2
]
-
v
[
0
][
2
]
*
v
[
1
][
1
]
*
v
[
2
][
0
]);
}
Matrix
inverse
()
{
RealOpenMM
invDet
=
1
/
determinant
();
double
invDet
=
1
/
determinant
();
Matrix
result
;
result
.
v
[
0
][
0
]
=
invDet
*
(
v
[
1
][
1
]
*
v
[
2
][
2
]
-
v
[
1
][
2
]
*
v
[
2
][
1
]);
result
.
v
[
1
][
0
]
=
-
invDet
*
(
v
[
1
][
0
]
*
v
[
2
][
2
]
-
v
[
1
][
2
]
*
v
[
2
][
0
]);
...
...
@@ -124,8 +124,8 @@ struct ReferenceGayBerneForce::Matrix {
}
};
static
Real
Vec
operator
*
(
const
Real
Vec
&
r
,
ReferenceGayBerneForce
::
Matrix
&
m
)
{
return
Real
Vec
(
m
.
v
[
0
][
0
]
*
r
[
0
]
+
m
.
v
[
1
][
0
]
*
r
[
1
]
+
m
.
v
[
2
][
0
]
*
r
[
2
],
static
Vec
3
operator
*
(
const
Vec
3
&
r
,
ReferenceGayBerneForce
::
Matrix
&
m
)
{
return
Vec
3
(
m
.
v
[
0
][
0
]
*
r
[
0
]
+
m
.
v
[
1
][
0
]
*
r
[
1
]
+
m
.
v
[
2
][
0
]
*
r
[
2
],
m
.
v
[
0
][
1
]
*
r
[
0
]
+
m
.
v
[
1
][
1
]
*
r
[
1
]
+
m
.
v
[
2
][
1
]
*
r
[
2
],
m
.
v
[
0
][
2
]
*
r
[
0
]
+
m
.
v
[
1
][
2
]
*
r
[
1
]
+
m
.
v
[
2
][
2
]
*
r
[
2
]);
}
...
...
platforms/reference/include/ReferenceHarmonicBondIxn.h
View file @
8469621f
...
...
@@ -34,7 +34,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
private:
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
...
...
@@ -62,7 +62,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -77,9 +77,9 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceKernels.h
View file @
8469621f
...
...
@@ -98,7 +98,7 @@ public:
*/
double
finishComputation
(
ContextImpl
&
context
,
bool
includeForce
,
bool
includeEnergy
,
int
groups
,
bool
&
valid
);
private:
std
::
vector
<
Real
Vec
>
savedForces
;
std
::
vector
<
Vec
3
>
savedForces
;
};
/**
...
...
@@ -226,8 +226,8 @@ public:
void
applyToVelocities
(
ContextImpl
&
context
,
double
tol
);
private:
ReferencePlatform
::
PlatformData
&
data
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
RealOpenMM
>
inverseMasses
;
std
::
vector
<
double
>
masses
;
std
::
vector
<
double
>
inverseMasses
;
};
/**
...
...
@@ -285,7 +285,7 @@ public:
private:
int
numBonds
;
int
**
bondIndexArray
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
bool
usePeriodic
;
};
...
...
@@ -323,7 +323,7 @@ public:
private:
int
numBonds
;
int
**
bondIndexArray
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
...
@@ -364,7 +364,7 @@ public:
private:
int
numAngles
;
int
**
angleIndexArray
;
RealOpenMM
**
angleParamArray
;
double
**
angleParamArray
;
bool
usePeriodic
;
};
...
...
@@ -402,7 +402,7 @@ public:
private:
int
numAngles
;
int
**
angleIndexArray
;
RealOpenMM
**
angleParamArray
;
double
**
angleParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
...
@@ -443,7 +443,7 @@ public:
private:
int
numTorsions
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
bool
usePeriodic
;
};
...
...
@@ -481,7 +481,7 @@ public:
private:
int
numTorsions
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
bool
usePeriodic
;
};
...
...
@@ -516,7 +516,7 @@ public:
*/
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CMAPTorsionForce
&
force
);
private:
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
coeff
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
coeff
;
std
::
vector
<
int
>
torsionMaps
;
std
::
vector
<
std
::
vector
<
int
>
>
torsionIndices
;
bool
usePeriodic
;
...
...
@@ -556,7 +556,7 @@ public:
private:
int
numTorsions
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
...
@@ -616,8 +616,8 @@ public:
private:
int
numParticles
,
num14
;
int
**
bonded14IndexArray
;
RealOpenMM
**
particleParamArray
,
**
bonded14ParamArray
;
RealOpenMM
nonbondedCutoff
,
switchingDistance
,
rfDielectric
,
ewaldAlpha
,
ewaldDispersionAlpha
,
dispersionCoefficient
;
double
**
particleParamArray
,
**
bonded14ParamArray
;
double
nonbondedCutoff
,
switchingDistance
,
rfDielectric
,
ewaldAlpha
,
ewaldDispersionAlpha
,
dispersionCoefficient
;
int
kmax
[
3
],
gridSize
[
3
],
dispersionGridSize
[
3
];
bool
useSwitchingFunction
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
...
...
@@ -658,8 +658,8 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomNonbondedForce
&
force
);
private:
int
numParticles
;
RealOpenMM
**
particleParamArray
;
RealOpenMM
nonbondedCutoff
,
switchingDistance
,
periodicBoxSize
[
3
],
longRangeCoefficient
;
double
**
particleParamArray
;
double
nonbondedCutoff
,
switchingDistance
,
periodicBoxSize
[
3
],
longRangeCoefficient
;
bool
useSwitchingFunction
,
hasInitializedLongRangeCorrection
;
CustomNonbondedForce
*
forceCopy
;
std
::
map
<
std
::
string
,
double
>
globalParamValues
;
...
...
@@ -706,7 +706,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
GBSAOBCForce
&
force
);
private:
ReferenceObc
*
obc
;
std
::
vector
<
RealOpenMM
>
charges
;
std
::
vector
<
double
>
charges
;
bool
isPeriodic
;
};
...
...
@@ -744,8 +744,8 @@ public:
private:
int
numParticles
;
bool
isPeriodic
;
RealOpenMM
**
particleParamArray
;
RealOpenMM
nonbondedCutoff
;
double
**
particleParamArray
;
double
nonbondedCutoff
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
string
>
particleParameterNames
,
globalParameterNames
,
energyParamDerivNames
,
valueNames
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
...
...
@@ -797,16 +797,16 @@ private:
class
PeriodicDistanceFunction
;
int
numParticles
;
std
::
vector
<
int
>
particles
;
RealOpenMM
**
particleParamArray
;
double
**
particleParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpressionX
,
forceExpressionY
,
forceExpressionZ
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
;
Real
Vec
*
boxVectors
;
Vec
3
*
boxVectors
;
};
class
ReferenceCalcCustomExternalForceKernel
::
PeriodicDistanceFunction
:
public
Lepton
::
CustomFunction
{
public:
Real
Vec
**
boxVectorHandle
;
PeriodicDistanceFunction
(
Real
Vec
**
boxVectorHandle
);
Vec
3
**
boxVectorHandle
;
PeriodicDistanceFunction
(
Vec
3
**
boxVectorHandle
);
int
getNumArguments
()
const
;
double
evaluate
(
const
double
*
arguments
)
const
;
double
evaluateDerivative
(
const
double
*
arguments
,
const
int
*
derivOrder
)
const
;
...
...
@@ -847,8 +847,8 @@ public:
private:
int
numDonors
,
numAcceptors
,
numParticles
;
bool
isPeriodic
;
RealOpenMM
**
donorParamArray
,
**
acceptorParamArray
;
RealOpenMM
nonbondedCutoff
;
double
**
donorParamArray
,
**
acceptorParamArray
;
double
nonbondedCutoff
;
ReferenceCustomHbondIxn
*
ixn
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
...
...
@@ -887,7 +887,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCentroidBondForce
&
force
);
private:
int
numBonds
,
numParticles
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
ReferenceCustomCentroidBondIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
bool
usePeriodic
;
...
...
@@ -926,7 +926,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCompoundBondForce
&
force
);
private:
int
numBonds
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
ReferenceCustomCompoundBondIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
bool
usePeriodic
;
...
...
@@ -965,8 +965,8 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomManyParticleForce
&
force
);
private:
int
numParticles
;
RealOpenMM
cutoffDistance
;
RealOpenMM
**
particleParamArray
;
double
cutoffDistance
;
double
**
particleParamArray
;
ReferenceCustomManyParticleIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
NonbondedMethod
nonbondedMethod
;
...
...
@@ -1039,7 +1039,7 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVerletDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevStepSize
;
};
...
...
@@ -1076,7 +1076,7 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceStochasticDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
};
...
...
@@ -1113,7 +1113,7 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceBrownianDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
};
...
...
@@ -1152,7 +1152,7 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVariableStochasticDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevErrorTol
;
};
...
...
@@ -1191,7 +1191,7 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVariableVerletDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevErrorTol
;
};
...
...
@@ -1266,8 +1266,8 @@ public:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferenceCustomDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
,
globalValues
;
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>
perDofValues
;
std
::
vector
<
double
>
masses
,
globalValues
;
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>
perDofValues
;
};
/**
...
...
@@ -1294,7 +1294,7 @@ public:
private:
ReferenceAndersenThermostat
*
thermostat
;
std
::
vector
<
std
::
vector
<
int
>
>
particleGroups
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
};
/**
...
...
platforms/reference/include/ReferenceLJCoulomb14.h
View file @
8469621f
...
...
@@ -62,9 +62,9 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceLJCoulombIxn.h
View file @
8469621f
...
...
@@ -40,10 +40,10 @@ class ReferenceLJCoulombIxn {
bool
ewald
;
bool
pme
,
ljpme
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
,
switchingDistance
;
RealOpenMM
krf
,
crf
;
RealOpenMM
alphaEwald
,
alphaDispersionEwald
;
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
double
cutoffDistance
,
switchingDistance
;
double
krf
,
crf
;
double
alphaEwald
,
alphaDispersionEwald
;
int
numRx
,
numRy
,
numRz
;
int
meshDim
[
3
],
dispersionMeshDim
[
3
];
...
...
@@ -67,9 +67,9 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
;
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
)
const
;
public:
...
...
@@ -100,7 +100,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
,
const
OpenMM
::
NeighborList
&
neighbors
,
RealOpenMM
solventDielectric
);
void
setUseCutoff
(
double
distance
,
const
OpenMM
::
NeighborList
&
neighbors
,
double
solventDielectric
);
/**---------------------------------------------------------------------------------------
...
...
@@ -110,7 +110,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setUseSwitchingFunction
(
RealOpenMM
distance
);
void
setUseSwitchingFunction
(
double
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -122,7 +122,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -135,7 +135,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setUseEwald
(
RealOpenMM
alpha
,
int
kmaxx
,
int
kmaxy
,
int
kmaxz
);
void
setUseEwald
(
double
alpha
,
int
kmaxx
,
int
kmaxy
,
int
kmaxz
);
/**---------------------------------------------------------------------------------------
...
...
@@ -147,8 +147,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setUsePME
(
RealOpenMM
alpha
,
int
meshSize
[
3
]);
void
setUsePME
(
double
alpha
,
int
meshSize
[
3
]);
/**---------------------------------------------------------------------------------------
...
...
@@ -159,7 +158,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
setUseLJPME
(
RealOpenMM
dalpha
,
int
dmeshSize
[
3
]);
void
setUseLJPME
(
double
dalpha
,
int
dmeshSize
[
3
]);
/**---------------------------------------------------------------------------------------
...
...
@@ -179,10 +178,10 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
private:
/**---------------------------------------------------------------------------------------
...
...
@@ -203,10 +202,10 @@ private:
--------------------------------------------------------------------------------------- */
void
calculateEwaldIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
void
calculateEwaldIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
};
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceLincsAlgorithm.h
View file @
8469621f
...
...
@@ -37,16 +37,16 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
int
_numTerms
;
int
_numberOfConstraints
;
int
**
_atomIndices
;
RealOpenMM
*
_distance
;
double
*
_distance
;
bool
_hasInitialized
;
std
::
vector
<
std
::
vector
<
int
>
>
_linkedConstraints
;
std
::
vector
<
RealOpenMM
>
_sMatrix
;
std
::
vector
<
RealOpenMM
>
_rhs1
;
std
::
vector
<
RealOpenMM
>
_rhs2
;
std
::
vector
<
RealOpenMM
>
_solution
;
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
_couplingMatrix
;
std
::
vector
<
OpenMM
::
Real
Vec
>
_constraintDir
;
std
::
vector
<
double
>
_sMatrix
;
std
::
vector
<
double
>
_rhs1
;
std
::
vector
<
double
>
_rhs2
;
std
::
vector
<
double
>
_solution
;
std
::
vector
<
std
::
vector
<
double
>
>
_couplingMatrix
;
std
::
vector
<
OpenMM
::
Vec
3
>
_constraintDir
;
/**---------------------------------------------------------------------------------------
...
...
@@ -58,7 +58,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
void
initialize
(
int
numberOfAtoms
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
void
initialize
(
int
numberOfAtoms
,
std
::
vector
<
double
>&
inverseMasses
);
/**---------------------------------------------------------------------------------------
...
...
@@ -78,7 +78,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
void
updateAtomPositions
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
void
updateAtomPositions
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
double
>&
inverseMasses
);
public:
...
...
@@ -92,7 +92,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
ReferenceLincsAlgorithm
(
int
numberOfConstraints
,
int
**
atomIndices
,
RealOpenMM
*
distance
);
ReferenceLincsAlgorithm
(
int
numberOfConstraints
,
int
**
atomIndices
,
double
*
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -133,8 +133,8 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
void
apply
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
void
apply
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
);
/**---------------------------------------------------------------------------------------
...
...
@@ -147,8 +147,8 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
void
applyToVelocities
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
void
applyToVelocities
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
double
>&
inverseMasses
);
};
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceMonteCarloBarostat.h
View file @
8469621f
...
...
@@ -25,6 +25,7 @@
#ifndef __ReferenceMonteCarloBarostat_H__
#define __ReferenceMonteCarloBarostat_H__
#include "openmm/Vec3.h"
#include <utility>
#include <vector>
...
...
@@ -34,7 +35,7 @@ class ReferenceMonteCarloBarostat {
private:
std
::
vector
<
RealOpenMM
>
savedAtomPositions
[
3
];
std
::
vector
<
double
>
savedAtomPositions
[
3
];
std
::
vector
<
std
::
vector
<
int
>
>
molecules
;
public:
...
...
@@ -67,7 +68,7 @@ class ReferenceMonteCarloBarostat {
--------------------------------------------------------------------------------------- */
void
applyBarostat
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomPositions
,
const
OpenMM
::
Real
Vec
*
boxVectors
,
RealOpenMM
scaleX
,
RealOpenMM
scaleY
,
RealOpenMM
scaleZ
);
void
applyBarostat
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomPositions
,
const
OpenMM
::
Vec
3
*
boxVectors
,
double
scaleX
,
double
scaleY
,
double
scaleZ
);
/**---------------------------------------------------------------------------------------
...
...
@@ -77,7 +78,7 @@ class ReferenceMonteCarloBarostat {
--------------------------------------------------------------------------------------- */
void
restorePositions
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomPositions
);
void
restorePositions
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomPositions
);
};
...
...
platforms/reference/include/ReferenceNeighborList.h
View file @
8469621f
#ifndef OPENMM_REFERENCE_NEIGHBORLIST_H_
#define OPENMM_REFERENCE_NEIGHBORLIST_H_
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include <set>
#include <vector>
namespace
OpenMM
{
typedef
std
::
vector
<
Real
Vec
>
AtomLocationList
;
typedef
std
::
vector
<
Vec
3
>
AtomLocationList
;
typedef
unsigned
int
AtomIndex
;
typedef
std
::
pair
<
AtomIndex
,
AtomIndex
>
AtomPair
;
typedef
std
::
vector
<
AtomPair
>
NeighborList
;
...
...
@@ -22,7 +22,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
int
nAtoms
,
const
AtomLocationList
&
atomLocations
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
Real
Vec
*
periodicBoxVectors
,
const
Vec
3
*
periodicBoxVectors
,
bool
usePeriodic
,
double
maxDistance
,
double
minDistance
=
0.0
,
...
...
@@ -37,7 +37,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
int
nAtoms
,
const
AtomLocationList
&
atomLocations
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
Real
Vec
*
periodicBoxVectors
,
const
Vec
3
*
periodicBoxVectors
,
bool
usePeriodic
,
double
maxDistance
,
double
minDistance
=
0.0
,
...
...
platforms/reference/include/ReferenceObc.h
View file @
8469621f
...
...
@@ -39,7 +39,7 @@ class ReferenceObc {
// arrays containing OBC chain derivative
std
::
vector
<
RealOpenMM
>
_obcChain
;
std
::
vector
<
double
>
_obcChain
;
// flag to signal whether ACE approximation
// is to be included
...
...
@@ -117,7 +117,7 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
std
::
vector
<
RealOpenMM
>&
getObcChain
();
std
::
vector
<
double
>&
getObcChain
();
/**---------------------------------------------------------------------------------------
...
...
@@ -128,7 +128,7 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
void
computeBornRadii
(
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
RealOpenMM
>&
bornRadii
);
void
computeBornRadii
(
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
double
>&
bornRadii
);
/**---------------------------------------------------------------------------------------
...
...
@@ -142,8 +142,8 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
std
::
vector
<
RealOpenMM
>&
bornRadii
,
RealOpenMM
*
energy
,
std
::
vector
<
RealOpenMM
>&
forces
)
const
;
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
std
::
vector
<
double
>&
bornRadii
,
double
*
energy
,
std
::
vector
<
double
>&
forces
)
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -155,8 +155,8 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
RealOpenMM
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
const
std
::
vector
<
RealOpenMM
>&
partialCharges
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
);
double
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
const
std
::
vector
<
double
>&
partialCharges
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
);
};
...
...
Prev
1
2
3
4
5
6
7
8
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