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
a783b996
Commit
a783b996
authored
Jan 13, 2017
by
peastman
Browse files
Eliminated RealOpenMM type
parent
9500f3af
Changes
148
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
236 additions
and
237 deletions
+236
-237
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
+20
-20
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
platforms/reference/include/ReferencePME.h
platforms/reference/include/ReferencePME.h
+14
-14
platforms/reference/include/ReferencePairIxn.h
platforms/reference/include/ReferencePairIxn.h
+5
-5
platforms/reference/include/ReferenceProperDihedralBond.h
platforms/reference/include/ReferenceProperDihedralBond.h
+5
-5
No files found.
platforms/reference/include/ReferenceCustomExternalIxn.h
View file @
a783b996
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define __ReferenceCustomExternalIxn_H__
#define __ReferenceCustomExternalIxn_H__
#include "ReferenceCustomExternalIxn.h"
#include "ReferenceCustomExternalIxn.h"
#include "openmm/Vec3.h"
#include "lepton/CompiledExpression.h"
#include "lepton/CompiledExpression.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -79,8 +80,8 @@ class ReferenceCustomExternalIxn {
...
@@ -79,8 +80,8 @@ class ReferenceCustomExternalIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateForce
(
int
atomIndex
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateForce
(
int
atomIndex
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energy
)
const
;
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energy
)
const
;
};
};
...
...
platforms/reference/include/ReferenceCustomGBIxn.h
View file @
a783b996
...
@@ -41,8 +41,8 @@ class ReferenceCustomGBIxn {
...
@@ -41,8 +41,8 @@ class ReferenceCustomGBIxn {
bool
cutoff
;
bool
cutoff
;
bool
periodic
;
bool
periodic
;
const
OpenMM
::
NeighborList
*
neighborList
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
;
double
cutoffDistance
;
CompiledExpressionSet
expressionSet
;
CompiledExpressionSet
expressionSet
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
std
::
vector
<
std
::
vector
<
Lepton
::
CompiledExpression
>
>
valueDerivExpressions
;
std
::
vector
<
std
::
vector
<
Lepton
::
CompiledExpression
>
>
valueDerivExpressions
;
...
@@ -59,8 +59,8 @@ class ReferenceCustomGBIxn {
...
@@ -59,8 +59,8 @@ class ReferenceCustomGBIxn {
std
::
vector
<
int
>
particleParamIndex
;
std
::
vector
<
int
>
particleParamIndex
;
std
::
vector
<
int
>
particleValueIndex
;
std
::
vector
<
int
>
particleValueIndex
;
int
rIndex
,
xIndex
,
yIndex
,
zIndex
;
int
rIndex
,
xIndex
,
yIndex
,
zIndex
;
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
values
,
dEdV
;
std
::
vector
<
std
::
vector
<
double
>
>
values
,
dEdV
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
dValuedParam
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
dValuedParam
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -73,7 +73,7 @@ class ReferenceCustomGBIxn {
...
@@ -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 {
...
@@ -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
);
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
bool
useExclusions
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -103,7 +103,7 @@ class ReferenceCustomGBIxn {
...
@@ -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 {
...
@@ -118,8 +118,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateSingleParticleEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateSingleParticleEnergyTerm
(
int
index
,
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -136,9 +136,9 @@ class ReferenceCustomGBIxn {
...
@@ -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
,
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 {
...
@@ -154,8 +154,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOnePairEnergyTerm
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
void
calculateOnePairEnergyTerm
(
int
index
,
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -169,8 +169,8 @@ class ReferenceCustomGBIxn {
...
@@ -169,8 +169,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateChainRuleForces
(
int
numAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
void
calculateChainRuleForces
(
int
numAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
energyParamDerivs
);
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -185,8 +185,8 @@ class ReferenceCustomGBIxn {
...
@@ -185,8 +185,8 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOnePairChainRule
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
void
calculateOnePairChainRule
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
bool
isExcluded
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
bool
isExcluded
);
public:
public:
...
@@ -226,7 +226,7 @@ class ReferenceCustomGBIxn {
...
@@ -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 {
...
@@ -238,7 +238,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -254,8 +254,8 @@ class ReferenceCustomGBIxn {
...
@@ -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
,
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
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceCustomHbondIxn.h
View file @
a783b996
...
@@ -43,8 +43,8 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
...
@@ -43,8 +43,8 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
class
DihedralTermInfo
;
class
DihedralTermInfo
;
bool
cutoff
;
bool
cutoff
;
bool
periodic
;
bool
periodic
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
;
double
cutoffDistance
;
std
::
vector
<
std
::
vector
<
int
>
>
donorAtoms
,
acceptorAtoms
;
std
::
vector
<
std
::
vector
<
int
>
>
donorAtoms
,
acceptorAtoms
;
Lepton
::
ExpressionProgram
energyExpression
;
Lepton
::
ExpressionProgram
energyExpression
;
std
::
vector
<
std
::
string
>
donorParamNames
,
acceptorParamNames
;
std
::
vector
<
std
::
string
>
donorParamNames
,
acceptorParamNames
;
...
@@ -65,13 +65,13 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
...
@@ -65,13 +65,13 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
donor
,
int
acceptor
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateOneIxn
(
int
donor
,
int
acceptor
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
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:
public:
...
@@ -103,7 +103,7 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
...
@@ -103,7 +103,7 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
);
void
setUseCutoff
(
double
distance
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -115,7 +115,7 @@ class ReferenceCustomHbondIxn : public ReferenceBondIxn {
...
@@ -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 {
...
@@ -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
<
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:
...
@@ -165,7 +165,7 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
;
int
p1
,
p2
;
Lepton
::
ExpressionProgram
forceExpression
;
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
)
:
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
}
...
@@ -176,8 +176,8 @@ public:
...
@@ -176,8 +176,8 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
,
p3
;
int
p1
,
p2
,
p3
;
Lepton
::
ExpressionProgram
forceExpression
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
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
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
}
...
@@ -188,11 +188,11 @@ public:
...
@@ -188,11 +188,11 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
;
int
p1
,
p2
,
p3
,
p4
;
Lepton
::
ExpressionProgram
forceExpression
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
double
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
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
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
}
...
...
platforms/reference/include/ReferenceCustomManyParticleIxn.h
View file @
a783b996
...
@@ -45,8 +45,8 @@ class ReferenceCustomManyParticleIxn {
...
@@ -45,8 +45,8 @@ class ReferenceCustomManyParticleIxn {
class
DihedralTermInfo
;
class
DihedralTermInfo
;
int
numParticlesPerSet
,
numPerParticleParameters
,
numTypes
;
int
numParticlesPerSet
,
numPerParticleParameters
,
numTypes
;
bool
useCutoff
,
usePeriodic
,
centralParticleMode
;
bool
useCutoff
,
usePeriodic
,
centralParticleMode
;
RealOpenMM
cutoffDistance
;
double
cutoffDistance
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
Lepton
::
ExpressionProgram
energyExpression
;
Lepton
::
ExpressionProgram
energyExpression
;
std
::
vector
<
std
::
vector
<
std
::
string
>
>
particleParamNames
;
std
::
vector
<
std
::
vector
<
std
::
string
>
>
particleParamNames
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
...
@@ -58,9 +58,9 @@ class ReferenceCustomManyParticleIxn {
...
@@ -58,9 +58,9 @@ class ReferenceCustomManyParticleIxn {
std
::
vector
<
AngleTermInfo
>
angleTerms
;
std
::
vector
<
AngleTermInfo
>
angleTerms
;
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
void
loopOverInteractions
(
std
::
vector
<
int
>&
particles
,
int
loopIndex
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
loopOverInteractions
(
std
::
vector
<
int
>&
particles
,
int
loopIndex
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
double
*
totalEnergy
)
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -75,13 +75,13 @@ class ReferenceCustomManyParticleIxn {
...
@@ -75,13 +75,13 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
const
std
::
vector
<
int
>&
particles
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateOneIxn
(
const
std
::
vector
<
int
>&
particles
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
**
particleParameters
,
std
::
map
<
std
::
string
,
double
>&
variables
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
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:
public:
...
@@ -110,7 +110,7 @@ class ReferenceCustomManyParticleIxn {
...
@@ -110,7 +110,7 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
);
void
setUseCutoff
(
double
distance
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -122,7 +122,7 @@ class ReferenceCustomManyParticleIxn {
...
@@ -122,7 +122,7 @@ class ReferenceCustomManyParticleIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -136,12 +136,9 @@ class ReferenceCustomManyParticleIxn {
...
@@ -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
,
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
{
class
ReferenceCustomManyParticleIxn
::
ParticleTermInfo
{
...
@@ -159,7 +156,7 @@ public:
...
@@ -159,7 +156,7 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
;
int
p1
,
p2
;
Lepton
::
ExpressionProgram
forceExpression
;
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
)
:
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
}
...
@@ -170,8 +167,8 @@ public:
...
@@ -170,8 +167,8 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
,
p3
;
int
p1
,
p2
,
p3
;
Lepton
::
ExpressionProgram
forceExpression
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
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
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
}
...
@@ -182,11 +179,11 @@ public:
...
@@ -182,11 +179,11 @@ public:
std
::
string
name
;
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
;
int
p1
,
p2
,
p3
,
p4
;
Lepton
::
ExpressionProgram
forceExpression
;
Lepton
::
ExpressionProgram
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
double
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
ExpressionProgram
&
forceExpression
)
:
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
)
{
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
}
...
...
platforms/reference/include/ReferenceCustomNonbondedIxn.h
View file @
a783b996
...
@@ -43,8 +43,8 @@ class ReferenceCustomNonbondedIxn {
...
@@ -43,8 +43,8 @@ class ReferenceCustomNonbondedIxn {
bool
useSwitch
;
bool
useSwitch
;
bool
periodic
;
bool
periodic
;
const
OpenMM
::
NeighborList
*
neighborList
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
,
switchingDistance
;
double
cutoffDistance
,
switchingDistance
;
Lepton
::
CompiledExpression
energyExpression
;
Lepton
::
CompiledExpression
energyExpression
;
Lepton
::
CompiledExpression
forceExpression
;
Lepton
::
CompiledExpression
forceExpression
;
std
::
vector
<
std
::
string
>
paramNames
;
std
::
vector
<
std
::
string
>
paramNames
;
...
@@ -68,8 +68,8 @@ class ReferenceCustomNonbondedIxn {
...
@@ -68,8 +68,8 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
energyByAtom
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
public:
public:
...
@@ -100,7 +100,7 @@ class ReferenceCustomNonbondedIxn {
...
@@ -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 {
...
@@ -121,7 +121,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setUseSwitchingFunction
(
RealOpenMM
distance
);
void
setUseSwitchingFunction
(
double
distance
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -133,7 +133,7 @@ class ReferenceCustomNonbondedIxn {
...
@@ -133,7 +133,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -152,10 +152,10 @@ class ReferenceCustomNonbondedIxn {
...
@@ -152,10 +152,10 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
double
*
fixedParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
energyByAtom
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceCustomTorsionIxn.h
View file @
a783b996
...
@@ -40,7 +40,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
...
@@ -40,7 +40,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
int
thetaIndex
;
int
thetaIndex
;
int
numParameters
;
int
numParameters
;
bool
usePeriodic
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
public:
...
@@ -70,7 +70,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
...
@@ -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 {
...
@@ -84,9 +84,9 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
};
...
...
platforms/reference/include/ReferenceDynamics.h
View file @
a783b996
...
@@ -49,8 +49,8 @@ class OPENMM_EXPORT ReferenceDynamics {
...
@@ -49,8 +49,8 @@ class OPENMM_EXPORT ReferenceDynamics {
int
_numberOfAtoms
;
int
_numberOfAtoms
;
int
_timeStep
;
int
_timeStep
;
RealOpenMM
_deltaT
;
double
_deltaT
;
RealOpenMM
_temperature
;
double
_temperature
;
int
_ownReferenceConstraint
;
int
_ownReferenceConstraint
;
ReferenceConstraintAlgorithm
*
_referenceConstraint
;
ReferenceConstraintAlgorithm
*
_referenceConstraint
;
...
@@ -67,7 +67,7 @@ class OPENMM_EXPORT ReferenceDynamics {
...
@@ -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 {
...
@@ -115,7 +115,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
getDeltaT
()
const
;
double
getDeltaT
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -123,7 +123,7 @@ class OPENMM_EXPORT ReferenceDynamics {
...
@@ -123,7 +123,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setDeltaT
(
RealOpenMM
deltaT
);
void
setDeltaT
(
double
deltaT
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -133,7 +133,7 @@ class OPENMM_EXPORT ReferenceDynamics {
...
@@ -133,7 +133,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
getTemperature
()
const
;
double
getTemperature
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -148,8 +148,8 @@ class OPENMM_EXPORT ReferenceDynamics {
...
@@ -148,8 +148,8 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
virtual
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
virtual
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
);
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 @
a783b996
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#ifndef __ReferenceForce_H__
#ifndef __ReferenceForce_H__
#define __ReferenceForce_H__
#define __ReferenceForce_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "lepton/CompiledExpression.h"
#include "lepton/CompiledExpression.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
...
@@ -34,7 +34,7 @@ class OPENMM_EXPORT ReferenceForce {
...
@@ -34,7 +34,7 @@ class OPENMM_EXPORT ReferenceForce {
private:
private:
static
RealOpenMM
periodicDifference
(
RealOpenMM
val1
,
RealOpenMM
val2
,
RealOpenMM
period
);
static
double
periodicDifference
(
double
val1
,
double
val2
,
double
period
);
public:
public:
...
@@ -80,8 +80,8 @@ class OPENMM_EXPORT ReferenceForce {
...
@@ -80,8 +80,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
getDeltaR
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
static
void
getDeltaR
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
RealOpenMM
*
deltaR
);
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -94,7 +94,7 @@ class OPENMM_EXPORT ReferenceForce {
...
@@ -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 {
...
@@ -108,8 +108,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
RealOpenMM
*
boxSize
,
RealOpenMM
*
deltaR
);
const
double
*
boxSize
,
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -123,8 +123,8 @@ class OPENMM_EXPORT ReferenceForce {
...
@@ -123,8 +123,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
static
void
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
OpenMM
::
Real
Vec
*
boxVectors
,
RealOpenMM
*
deltaR
);
const
OpenMM
::
Vec
3
*
boxVectors
,
double
*
deltaR
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -138,8 +138,8 @@ class OPENMM_EXPORT ReferenceForce {
...
@@ -138,8 +138,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
Real
Vec
getDeltaRPeriodic
(
const
OpenMM
::
Real
Vec
&
atomCoordinatesI
,
const
OpenMM
::
Real
Vec
&
atomCoordinatesJ
,
static
Vec
3
getDeltaRPeriodic
(
const
OpenMM
::
Vec
3
&
atomCoordinatesI
,
const
OpenMM
::
Vec
3
&
atomCoordinatesJ
,
const
OpenMM
::
Real
Vec
*
boxVectors
);
const
OpenMM
::
Vec
3
*
boxVectors
);
/**
/**
* Get a pointer to the memory for setting a variable in a CompiledExpression. If the expression
* Get a pointer to the memory for setting a variable in a CompiledExpression. If the expression
...
...
platforms/reference/include/ReferenceGayBerneForce.h
View file @
a783b996
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#define __ReferenceGayBerneForce_H__
#define __ReferenceGayBerneForce_H__
#include "openmm/GayBerneForce.h"
#include "openmm/GayBerneForce.h"
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include <set>
#include <set>
#include <utility>
#include <utility>
...
@@ -55,7 +55,7 @@ public:
...
@@ -55,7 +55,7 @@ public:
* @param boxVectors the periodic box vectors
* @param boxVectors the periodic box vectors
* @return the energy of the interaction
* @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:
private:
struct
ParticleInfo
;
struct
ParticleInfo
;
...
@@ -64,33 +64,33 @@ private:
...
@@ -64,33 +64,33 @@ private:
std
::
vector
<
ExceptionInfo
>
exceptions
;
std
::
vector
<
ExceptionInfo
>
exceptions
;
std
::
set
<
std
::
pair
<
int
,
int
>
>
exclusions
;
std
::
set
<
std
::
pair
<
int
,
int
>
>
exclusions
;
GayBerneForce
::
NonbondedMethod
nonbondedMethod
;
GayBerneForce
::
NonbondedMethod
nonbondedMethod
;
RealOpenMM
cutoffDistance
,
switchingDistance
;
double
cutoffDistance
,
switchingDistance
;
bool
useSwitchingFunction
;
bool
useSwitchingFunction
;
std
::
vector
<
RealOpenMM
>
s
;
std
::
vector
<
double
>
s
;
std
::
vector
<
Matrix
>
A
,
B
,
G
;
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
,
double
computeOneInteraction
(
int
particle1
,
int
particle2
,
double
sigma
,
double
epsilon
,
const
std
::
vector
<
Vec
3
>&
positions
,
std
::
vector
<
Real
Vec
>&
forces
,
std
::
vector
<
Real
Vec
>&
torques
,
const
Real
Vec
*
boxVectors
);
std
::
vector
<
Vec
3
>&
forces
,
std
::
vector
<
Vec
3
>&
torques
,
const
Vec
3
*
boxVectors
);
};
};
struct
ReferenceGayBerneForce
::
ParticleInfo
{
struct
ReferenceGayBerneForce
::
ParticleInfo
{
int
xparticle
,
yparticle
;
int
xparticle
,
yparticle
;
RealOpenMM
sigma
,
epsilon
,
rx
,
ry
,
rz
,
ex
,
ey
,
ez
;
double
sigma
,
epsilon
,
rx
,
ry
,
rz
,
ex
,
ey
,
ez
;
};
};
struct
ReferenceGayBerneForce
::
ExceptionInfo
{
struct
ReferenceGayBerneForce
::
ExceptionInfo
{
int
particle1
,
particle2
;
int
particle1
,
particle2
;
RealOpenMM
sigma
,
epsilon
;
double
sigma
,
epsilon
;
};
};
struct
ReferenceGayBerneForce
::
Matrix
{
struct
ReferenceGayBerneForce
::
Matrix
{
RealOpenMM
v
[
3
][
3
];
double
v
[
3
][
3
];
Real
Vec
operator
*
(
const
Real
Vec
&
r
)
{
Vec
3
operator
*
(
const
Vec
3
&
r
)
{
return
Real
Vec
(
v
[
0
][
0
]
*
r
[
0
]
+
v
[
0
][
1
]
*
r
[
1
]
+
v
[
0
][
2
]
*
r
[
2
],
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
[
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
]);
v
[
2
][
0
]
*
r
[
0
]
+
v
[
2
][
1
]
*
r
[
1
]
+
v
[
2
][
2
]
*
r
[
2
]);
}
}
...
@@ -103,13 +103,13 @@ struct ReferenceGayBerneForce::Matrix {
...
@@ -103,13 +103,13 @@ struct ReferenceGayBerneForce::Matrix {
return
result
;
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
]
-
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
]);
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
()
{
Matrix
inverse
()
{
RealOpenMM
invDet
=
1
/
determinant
();
double
invDet
=
1
/
determinant
();
Matrix
result
;
Matrix
result
;
result
.
v
[
0
][
0
]
=
invDet
*
(
v
[
1
][
1
]
*
v
[
2
][
2
]
-
v
[
1
][
2
]
*
v
[
2
][
1
]);
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
]);
result
.
v
[
1
][
0
]
=
-
invDet
*
(
v
[
1
][
0
]
*
v
[
2
][
2
]
-
v
[
1
][
2
]
*
v
[
2
][
0
]);
...
@@ -124,10 +124,10 @@ struct ReferenceGayBerneForce::Matrix {
...
@@ -124,10 +124,10 @@ struct ReferenceGayBerneForce::Matrix {
}
}
};
};
static
Real
Vec
operator
*
(
const
Real
Vec
&
r
,
ReferenceGayBerneForce
::
Matrix
&
m
)
{
static
Vec
3
operator
*
(
const
Vec
3
&
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
],
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
][
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
]);
m
.
v
[
0
][
2
]
*
r
[
0
]
+
m
.
v
[
1
][
2
]
*
r
[
1
]
+
m
.
v
[
2
][
2
]
*
r
[
2
]);
}
}
}
// namespace OpenMM
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceHarmonicBondIxn.h
View file @
a783b996
...
@@ -34,7 +34,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
...
@@ -34,7 +34,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
private:
private:
bool
usePeriodic
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
public:
...
@@ -62,7 +62,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
...
@@ -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 {
...
@@ -77,9 +77,9 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
};
...
...
platforms/reference/include/ReferenceKernels.h
View file @
a783b996
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
*/
*/
double
finishComputation
(
ContextImpl
&
context
,
bool
includeForce
,
bool
includeEnergy
,
int
groups
,
bool
&
valid
);
double
finishComputation
(
ContextImpl
&
context
,
bool
includeForce
,
bool
includeEnergy
,
int
groups
,
bool
&
valid
);
private:
private:
std
::
vector
<
Real
Vec
>
savedForces
;
std
::
vector
<
Vec
3
>
savedForces
;
};
};
/**
/**
...
@@ -226,8 +226,8 @@ public:
...
@@ -226,8 +226,8 @@ public:
void
applyToVelocities
(
ContextImpl
&
context
,
double
tol
);
void
applyToVelocities
(
ContextImpl
&
context
,
double
tol
);
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
std
::
vector
<
RealOpenMM
>
inverseMasses
;
std
::
vector
<
double
>
inverseMasses
;
};
};
/**
/**
...
@@ -285,7 +285,7 @@ public:
...
@@ -285,7 +285,7 @@ public:
private:
private:
int
numBonds
;
int
numBonds
;
int
**
bondIndexArray
;
int
**
bondIndexArray
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
bool
usePeriodic
;
bool
usePeriodic
;
};
};
...
@@ -323,7 +323,7 @@ public:
...
@@ -323,7 +323,7 @@ public:
private:
private:
int
numBonds
;
int
numBonds
;
int
**
bondIndexArray
;
int
**
bondIndexArray
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
@@ -364,7 +364,7 @@ public:
...
@@ -364,7 +364,7 @@ public:
private:
private:
int
numAngles
;
int
numAngles
;
int
**
angleIndexArray
;
int
**
angleIndexArray
;
RealOpenMM
**
angleParamArray
;
double
**
angleParamArray
;
bool
usePeriodic
;
bool
usePeriodic
;
};
};
...
@@ -402,7 +402,7 @@ public:
...
@@ -402,7 +402,7 @@ public:
private:
private:
int
numAngles
;
int
numAngles
;
int
**
angleIndexArray
;
int
**
angleIndexArray
;
RealOpenMM
**
angleParamArray
;
double
**
angleParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
@@ -443,7 +443,7 @@ public:
...
@@ -443,7 +443,7 @@ public:
private:
private:
int
numTorsions
;
int
numTorsions
;
int
**
torsionIndexArray
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
bool
usePeriodic
;
bool
usePeriodic
;
};
};
...
@@ -481,7 +481,7 @@ public:
...
@@ -481,7 +481,7 @@ public:
private:
private:
int
numTorsions
;
int
numTorsions
;
int
**
torsionIndexArray
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
bool
usePeriodic
;
bool
usePeriodic
;
};
};
...
@@ -516,7 +516,7 @@ public:
...
@@ -516,7 +516,7 @@ public:
*/
*/
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CMAPTorsionForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CMAPTorsionForce
&
force
);
private:
private:
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
coeff
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
coeff
;
std
::
vector
<
int
>
torsionMaps
;
std
::
vector
<
int
>
torsionMaps
;
std
::
vector
<
std
::
vector
<
int
>
>
torsionIndices
;
std
::
vector
<
std
::
vector
<
int
>
>
torsionIndices
;
bool
usePeriodic
;
bool
usePeriodic
;
...
@@ -556,7 +556,7 @@ public:
...
@@ -556,7 +556,7 @@ public:
private:
private:
int
numTorsions
;
int
numTorsions
;
int
**
torsionIndexArray
;
int
**
torsionIndexArray
;
RealOpenMM
**
torsionParamArray
;
double
**
torsionParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpression
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
Lepton
::
CompiledExpression
>
energyParamDerivExpressions
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
,
energyParamDerivNames
;
...
@@ -607,8 +607,8 @@ public:
...
@@ -607,8 +607,8 @@ public:
private:
private:
int
numParticles
,
num14
;
int
numParticles
,
num14
;
int
**
bonded14IndexArray
;
int
**
bonded14IndexArray
;
RealOpenMM
**
particleParamArray
,
**
bonded14ParamArray
;
double
**
particleParamArray
,
**
bonded14ParamArray
;
RealOpenMM
nonbondedCutoff
,
switchingDistance
,
rfDielectric
,
ewaldAlpha
,
dispersionCoefficient
;
double
nonbondedCutoff
,
switchingDistance
,
rfDielectric
,
ewaldAlpha
,
dispersionCoefficient
;
int
kmax
[
3
],
gridSize
[
3
];
int
kmax
[
3
],
gridSize
[
3
];
bool
useSwitchingFunction
;
bool
useSwitchingFunction
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
...
@@ -649,8 +649,8 @@ public:
...
@@ -649,8 +649,8 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomNonbondedForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomNonbondedForce
&
force
);
private:
private:
int
numParticles
;
int
numParticles
;
RealOpenMM
**
particleParamArray
;
double
**
particleParamArray
;
RealOpenMM
nonbondedCutoff
,
switchingDistance
,
periodicBoxSize
[
3
],
longRangeCoefficient
;
double
nonbondedCutoff
,
switchingDistance
,
periodicBoxSize
[
3
],
longRangeCoefficient
;
bool
useSwitchingFunction
,
hasInitializedLongRangeCorrection
;
bool
useSwitchingFunction
,
hasInitializedLongRangeCorrection
;
CustomNonbondedForce
*
forceCopy
;
CustomNonbondedForce
*
forceCopy
;
std
::
map
<
std
::
string
,
double
>
globalParamValues
;
std
::
map
<
std
::
string
,
double
>
globalParamValues
;
...
@@ -697,7 +697,7 @@ public:
...
@@ -697,7 +697,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
GBSAOBCForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
GBSAOBCForce
&
force
);
private:
private:
ReferenceObc
*
obc
;
ReferenceObc
*
obc
;
std
::
vector
<
RealOpenMM
>
charges
;
std
::
vector
<
double
>
charges
;
bool
isPeriodic
;
bool
isPeriodic
;
};
};
...
@@ -735,8 +735,8 @@ public:
...
@@ -735,8 +735,8 @@ public:
private:
private:
int
numParticles
;
int
numParticles
;
bool
isPeriodic
;
bool
isPeriodic
;
RealOpenMM
**
particleParamArray
;
double
**
particleParamArray
;
RealOpenMM
nonbondedCutoff
;
double
nonbondedCutoff
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
string
>
particleParameterNames
,
globalParameterNames
,
energyParamDerivNames
,
valueNames
;
std
::
vector
<
std
::
string
>
particleParameterNames
,
globalParameterNames
,
energyParamDerivNames
,
valueNames
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
std
::
vector
<
Lepton
::
CompiledExpression
>
valueExpressions
;
...
@@ -788,16 +788,16 @@ private:
...
@@ -788,16 +788,16 @@ private:
class
PeriodicDistanceFunction
;
class
PeriodicDistanceFunction
;
int
numParticles
;
int
numParticles
;
std
::
vector
<
int
>
particles
;
std
::
vector
<
int
>
particles
;
RealOpenMM
**
particleParamArray
;
double
**
particleParamArray
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpressionX
,
forceExpressionY
,
forceExpressionZ
;
Lepton
::
CompiledExpression
energyExpression
,
forceExpressionX
,
forceExpressionY
,
forceExpressionZ
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
;
std
::
vector
<
std
::
string
>
parameterNames
,
globalParameterNames
;
Real
Vec
*
boxVectors
;
Vec
3
*
boxVectors
;
};
};
class
ReferenceCalcCustomExternalForceKernel
::
PeriodicDistanceFunction
:
public
Lepton
::
CustomFunction
{
class
ReferenceCalcCustomExternalForceKernel
::
PeriodicDistanceFunction
:
public
Lepton
::
CustomFunction
{
public:
public:
Real
Vec
**
boxVectorHandle
;
Vec
3
**
boxVectorHandle
;
PeriodicDistanceFunction
(
Real
Vec
**
boxVectorHandle
);
PeriodicDistanceFunction
(
Vec
3
**
boxVectorHandle
);
int
getNumArguments
()
const
;
int
getNumArguments
()
const
;
double
evaluate
(
const
double
*
arguments
)
const
;
double
evaluate
(
const
double
*
arguments
)
const
;
double
evaluateDerivative
(
const
double
*
arguments
,
const
int
*
derivOrder
)
const
;
double
evaluateDerivative
(
const
double
*
arguments
,
const
int
*
derivOrder
)
const
;
...
@@ -838,8 +838,8 @@ public:
...
@@ -838,8 +838,8 @@ public:
private:
private:
int
numDonors
,
numAcceptors
,
numParticles
;
int
numDonors
,
numAcceptors
,
numParticles
;
bool
isPeriodic
;
bool
isPeriodic
;
RealOpenMM
**
donorParamArray
,
**
acceptorParamArray
;
double
**
donorParamArray
,
**
acceptorParamArray
;
RealOpenMM
nonbondedCutoff
;
double
nonbondedCutoff
;
ReferenceCustomHbondIxn
*
ixn
;
ReferenceCustomHbondIxn
*
ixn
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
set
<
int
>
>
exclusions
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
...
@@ -878,7 +878,7 @@ public:
...
@@ -878,7 +878,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCentroidBondForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCentroidBondForce
&
force
);
private:
private:
int
numBonds
,
numParticles
;
int
numBonds
,
numParticles
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
ReferenceCustomCentroidBondIxn
*
ixn
;
ReferenceCustomCentroidBondIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
bool
usePeriodic
;
bool
usePeriodic
;
...
@@ -917,7 +917,7 @@ public:
...
@@ -917,7 +917,7 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCompoundBondForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomCompoundBondForce
&
force
);
private:
private:
int
numBonds
;
int
numBonds
;
RealOpenMM
**
bondParamArray
;
double
**
bondParamArray
;
ReferenceCustomCompoundBondIxn
*
ixn
;
ReferenceCustomCompoundBondIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
std
::
vector
<
std
::
string
>
globalParameterNames
,
energyParamDerivNames
;
bool
usePeriodic
;
bool
usePeriodic
;
...
@@ -956,8 +956,8 @@ public:
...
@@ -956,8 +956,8 @@ public:
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomManyParticleForce
&
force
);
void
copyParametersToContext
(
ContextImpl
&
context
,
const
CustomManyParticleForce
&
force
);
private:
private:
int
numParticles
;
int
numParticles
;
RealOpenMM
cutoffDistance
;
double
cutoffDistance
;
RealOpenMM
**
particleParamArray
;
double
**
particleParamArray
;
ReferenceCustomManyParticleIxn
*
ixn
;
ReferenceCustomManyParticleIxn
*
ixn
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
std
::
vector
<
std
::
string
>
globalParameterNames
;
NonbondedMethod
nonbondedMethod
;
NonbondedMethod
nonbondedMethod
;
...
@@ -1030,7 +1030,7 @@ public:
...
@@ -1030,7 +1030,7 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVerletDynamics
*
dynamics
;
ReferenceVerletDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevStepSize
;
double
prevStepSize
;
};
};
...
@@ -1067,7 +1067,7 @@ public:
...
@@ -1067,7 +1067,7 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceStochasticDynamics
*
dynamics
;
ReferenceStochasticDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
};
};
...
@@ -1104,7 +1104,7 @@ public:
...
@@ -1104,7 +1104,7 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceBrownianDynamics
*
dynamics
;
ReferenceBrownianDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
double
prevTemp
,
prevFriction
,
prevStepSize
;
};
};
...
@@ -1143,7 +1143,7 @@ public:
...
@@ -1143,7 +1143,7 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVariableStochasticDynamics
*
dynamics
;
ReferenceVariableStochasticDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevTemp
,
prevFriction
,
prevErrorTol
;
double
prevTemp
,
prevFriction
,
prevErrorTol
;
};
};
...
@@ -1182,7 +1182,7 @@ public:
...
@@ -1182,7 +1182,7 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceVariableVerletDynamics
*
dynamics
;
ReferenceVariableVerletDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
double
prevErrorTol
;
double
prevErrorTol
;
};
};
...
@@ -1257,8 +1257,8 @@ public:
...
@@ -1257,8 +1257,8 @@ public:
private:
private:
ReferencePlatform
::
PlatformData
&
data
;
ReferencePlatform
::
PlatformData
&
data
;
ReferenceCustomDynamics
*
dynamics
;
ReferenceCustomDynamics
*
dynamics
;
std
::
vector
<
RealOpenMM
>
masses
,
globalValues
;
std
::
vector
<
double
>
masses
,
globalValues
;
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>
perDofValues
;
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>
perDofValues
;
};
};
/**
/**
...
@@ -1285,7 +1285,7 @@ public:
...
@@ -1285,7 +1285,7 @@ public:
private:
private:
ReferenceAndersenThermostat
*
thermostat
;
ReferenceAndersenThermostat
*
thermostat
;
std
::
vector
<
std
::
vector
<
int
>
>
particleGroups
;
std
::
vector
<
std
::
vector
<
int
>
>
particleGroups
;
std
::
vector
<
RealOpenMM
>
masses
;
std
::
vector
<
double
>
masses
;
};
};
/**
/**
...
...
platforms/reference/include/ReferenceLJCoulomb14.h
View file @
a783b996
...
@@ -62,9 +62,9 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
...
@@ -62,9 +62,9 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
};
...
...
platforms/reference/include/ReferenceLJCoulombIxn.h
View file @
a783b996
...
@@ -40,10 +40,10 @@ class ReferenceLJCoulombIxn {
...
@@ -40,10 +40,10 @@ class ReferenceLJCoulombIxn {
bool
ewald
;
bool
ewald
;
bool
pme
;
bool
pme
;
const
OpenMM
::
NeighborList
*
neighborList
;
const
OpenMM
::
NeighborList
*
neighborList
;
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
];
OpenMM
::
Vec
3
periodicBoxVectors
[
3
];
RealOpenMM
cutoffDistance
,
switchingDistance
;
double
cutoffDistance
,
switchingDistance
;
RealOpenMM
krf
,
crf
;
double
krf
,
crf
;
RealOpenMM
alphaEwald
;
double
alphaEwald
;
int
numRx
,
numRy
,
numRz
;
int
numRx
,
numRy
,
numRz
;
int
meshDim
[
3
];
int
meshDim
[
3
];
...
@@ -67,9 +67,9 @@ class ReferenceLJCoulombIxn {
...
@@ -67,9 +67,9 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
**
atomParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
;
double
*
energyByAtom
,
double
*
totalEnergy
)
const
;
public:
public:
...
@@ -100,7 +100,7 @@ class ReferenceLJCoulombIxn {
...
@@ -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 {
...
@@ -110,7 +110,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setUseSwitchingFunction
(
RealOpenMM
distance
);
void
setUseSwitchingFunction
(
double
distance
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -122,7 +122,7 @@ class ReferenceLJCoulombIxn {
...
@@ -122,7 +122,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -135,7 +135,7 @@ class ReferenceLJCoulombIxn {
...
@@ -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,7 +147,7 @@ class ReferenceLJCoulombIxn {
...
@@ -147,7 +147,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setUsePME
(
RealOpenMM
alpha
,
int
meshSize
[
3
]);
void
setUsePME
(
double
alpha
,
int
meshSize
[
3
]);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -167,10 +167,10 @@ class ReferenceLJCoulombIxn {
...
@@ -167,10 +167,10 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
double
*
energyByAtom
,
double
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
private:
private:
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -191,10 +191,10 @@ private:
...
@@ -191,10 +191,10 @@ private:
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateEwaldIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateEwaldIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
double
**
atomParameters
,
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
double
*
energyByAtom
,
double
*
totalEnergy
,
bool
includeDirect
,
bool
includeReciprocal
)
const
;
};
};
}
// namespace OpenMM
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceLincsAlgorithm.h
View file @
a783b996
...
@@ -37,16 +37,16 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
...
@@ -37,16 +37,16 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
int
_numTerms
;
int
_numTerms
;
int
_numberOfConstraints
;
int
_numberOfConstraints
;
int
**
_atomIndices
;
int
**
_atomIndices
;
RealOpenMM
*
_distance
;
double
*
_distance
;
bool
_hasInitialized
;
bool
_hasInitialized
;
std
::
vector
<
std
::
vector
<
int
>
>
_linkedConstraints
;
std
::
vector
<
std
::
vector
<
int
>
>
_linkedConstraints
;
std
::
vector
<
RealOpenMM
>
_sMatrix
;
std
::
vector
<
double
>
_sMatrix
;
std
::
vector
<
RealOpenMM
>
_rhs1
;
std
::
vector
<
double
>
_rhs1
;
std
::
vector
<
RealOpenMM
>
_rhs2
;
std
::
vector
<
double
>
_rhs2
;
std
::
vector
<
RealOpenMM
>
_solution
;
std
::
vector
<
double
>
_solution
;
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
_couplingMatrix
;
std
::
vector
<
std
::
vector
<
double
>
>
_couplingMatrix
;
std
::
vector
<
OpenMM
::
Real
Vec
>
_constraintDir
;
std
::
vector
<
OpenMM
::
Vec
3
>
_constraintDir
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -58,7 +58,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
...
@@ -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 {
...
@@ -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:
public:
...
@@ -92,7 +92,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
...
@@ -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 {
...
@@ -133,8 +133,8 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
apply
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
apply
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -147,8 +147,8 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
...
@@ -147,8 +147,8 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
applyToVelocities
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
applyToVelocities
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
);
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
double
>&
inverseMasses
);
};
};
}
// namespace OpenMM
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceMonteCarloBarostat.h
View file @
a783b996
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#ifndef __ReferenceMonteCarloBarostat_H__
#ifndef __ReferenceMonteCarloBarostat_H__
#define __ReferenceMonteCarloBarostat_H__
#define __ReferenceMonteCarloBarostat_H__
#include "openmm/Vec3.h"
#include <utility>
#include <utility>
#include <vector>
#include <vector>
...
@@ -34,7 +35,7 @@ class ReferenceMonteCarloBarostat {
...
@@ -34,7 +35,7 @@ class ReferenceMonteCarloBarostat {
private:
private:
std
::
vector
<
RealOpenMM
>
savedAtomPositions
[
3
];
std
::
vector
<
double
>
savedAtomPositions
[
3
];
std
::
vector
<
std
::
vector
<
int
>
>
molecules
;
std
::
vector
<
std
::
vector
<
int
>
>
molecules
;
public:
public:
...
@@ -67,7 +68,7 @@ class ReferenceMonteCarloBarostat {
...
@@ -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 {
...
@@ -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 @
a783b996
#ifndef OPENMM_REFERENCE_NEIGHBORLIST_H_
#ifndef OPENMM_REFERENCE_NEIGHBORLIST_H_
#define OPENMM_REFERENCE_NEIGHBORLIST_H_
#define OPENMM_REFERENCE_NEIGHBORLIST_H_
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <set>
#include <set>
#include <vector>
#include <vector>
namespace
OpenMM
{
namespace
OpenMM
{
typedef
std
::
vector
<
Real
Vec
>
AtomLocationList
;
typedef
std
::
vector
<
Vec
3
>
AtomLocationList
;
typedef
unsigned
int
AtomIndex
;
typedef
unsigned
int
AtomIndex
;
typedef
std
::
pair
<
AtomIndex
,
AtomIndex
>
AtomPair
;
typedef
std
::
pair
<
AtomIndex
,
AtomIndex
>
AtomPair
;
typedef
std
::
vector
<
AtomPair
>
NeighborList
;
typedef
std
::
vector
<
AtomPair
>
NeighborList
;
...
@@ -22,7 +22,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
...
@@ -22,7 +22,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
int
nAtoms
,
int
nAtoms
,
const
AtomLocationList
&
atomLocations
,
const
AtomLocationList
&
atomLocations
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
Real
Vec
*
periodicBoxVectors
,
const
Vec
3
*
periodicBoxVectors
,
bool
usePeriodic
,
bool
usePeriodic
,
double
maxDistance
,
double
maxDistance
,
double
minDistance
=
0.0
,
double
minDistance
=
0.0
,
...
@@ -37,7 +37,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
...
@@ -37,7 +37,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
int
nAtoms
,
int
nAtoms
,
const
AtomLocationList
&
atomLocations
,
const
AtomLocationList
&
atomLocations
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
std
::
vector
<
std
::
set
<
int
>
>&
exclusions
,
const
Real
Vec
*
periodicBoxVectors
,
const
Vec
3
*
periodicBoxVectors
,
bool
usePeriodic
,
bool
usePeriodic
,
double
maxDistance
,
double
maxDistance
,
double
minDistance
=
0.0
,
double
minDistance
=
0.0
,
...
...
platforms/reference/include/ReferenceObc.h
View file @
a783b996
...
@@ -39,7 +39,7 @@ class ReferenceObc {
...
@@ -39,7 +39,7 @@ class ReferenceObc {
// arrays containing OBC chain derivative
// arrays containing OBC chain derivative
std
::
vector
<
RealOpenMM
>
_obcChain
;
std
::
vector
<
double
>
_obcChain
;
// flag to signal whether ACE approximation
// flag to signal whether ACE approximation
// is to be included
// is to be included
...
@@ -117,7 +117,7 @@ class ReferenceObc {
...
@@ -117,7 +117,7 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
std
::
vector
<
RealOpenMM
>&
getObcChain
();
std
::
vector
<
double
>&
getObcChain
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -128,7 +128,7 @@ class ReferenceObc {
...
@@ -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 {
...
@@ -142,8 +142,8 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
std
::
vector
<
RealOpenMM
>&
bornRadii
,
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
std
::
vector
<
double
>&
bornRadii
,
RealOpenMM
*
energy
,
std
::
vector
<
RealOpenMM
>&
forces
)
const
;
double
*
energy
,
std
::
vector
<
double
>&
forces
)
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -155,8 +155,8 @@ class ReferenceObc {
...
@@ -155,8 +155,8 @@ class ReferenceObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
double
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
const
std
::
vector
<
RealOpenMM
>&
partialCharges
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
);
const
std
::
vector
<
double
>&
partialCharges
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
);
};
};
...
...
platforms/reference/include/ReferencePME.h
View file @
a783b996
...
@@ -32,13 +32,13 @@
...
@@ -32,13 +32,13 @@
#ifndef __ReferencePME_H__
#ifndef __ReferencePME_H__
#define __ReferencePME_H__
#define __ReferencePME_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
#include <vector>
namespace
OpenMM
{
namespace
OpenMM
{
typedef
RealOpenMM
rvec
[
3
];
typedef
double
rvec
[
3
];
typedef
struct
pme
*
typedef
struct
pme
*
...
@@ -59,12 +59,12 @@ pme_t;
...
@@ -59,12 +59,12 @@ pme_t;
* epsilon_r Dielectric coefficient, typically 1.0.
* epsilon_r Dielectric coefficient, typically 1.0.
*/
*/
int
OPENMM_EXPORT
int
OPENMM_EXPORT
pme_init
(
pme_t
*
ppme
,
pme_init
(
pme_t
*
ppme
,
RealOpenMM
ewaldcoeff
,
double
ewaldcoeff
,
int
natoms
,
int
natoms
,
const
int
ngrid
[
3
],
const
int
ngrid
[
3
],
int
pme_order
,
int
pme_order
,
RealOpenMM
epsilon_r
);
double
epsilon_r
);
/*
/*
* Evaluate reciprocal space PME energy and forces.
* Evaluate reciprocal space PME energy and forces.
...
@@ -79,12 +79,12 @@ pme_init(pme_t * ppme,
...
@@ -79,12 +79,12 @@ pme_init(pme_t * ppme,
* energy Total energy (will be written in units of kJ/mol)
* energy Total energy (will be written in units of kJ/mol)
*/
*/
int
OPENMM_EXPORT
int
OPENMM_EXPORT
pme_exec
(
pme_t
pme
,
pme_exec
(
pme_t
pme
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
const
std
::
vector
<
RealOpenMM
>&
charges
,
const
std
::
vector
<
double
>&
charges
,
const
OpenMM
::
Real
Vec
periodicBoxVectors
[
3
],
const
OpenMM
::
Vec
3
periodicBoxVectors
[
3
],
RealOpenMM
*
energy
);
double
*
energy
);
...
...
platforms/reference/include/ReferencePairIxn.h
View file @
a783b996
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#ifndef __ReferencePairIxn_H__
#ifndef __ReferencePairIxn_H__
#define __ReferencePairIxn_H__
#define __ReferencePairIxn_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
#include <vector>
...
@@ -68,10 +68,10 @@ class OPENMM_EXPORT ReferencePairIxn {
...
@@ -68,10 +68,10 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
virtual
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
virtual
void
calculatePairIxn
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
int
**
exclusions
,
double
**
atomParameters
,
int
**
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
fixedParameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
=
0
;
double
*
energyByAtom
,
double
*
totalEnergy
)
const
=
0
;
};
};
...
...
platforms/reference/include/ReferenceProperDihedralBond.h
View file @
a783b996
...
@@ -34,7 +34,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
...
@@ -34,7 +34,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
private:
private:
bool
usePeriodic
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
public:
...
@@ -62,7 +62,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
...
@@ -62,7 +62,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -78,9 +78,9 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
...
@@ -78,9 +78,9 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
};
...
...
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