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
"platforms/opencl/vscode:/vscode.git/clone" did not exist on "e09b108890e3f3769d1ecf422bdb519a78431b41"
Commit
a783b996
authored
Jan 13, 2017
by
peastman
Browse files
Eliminated RealOpenMM type
parent
9500f3af
Changes
148
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
194 additions
and
320 deletions
+194
-320
platforms/cpu/src/CpuSETTLE.cpp
platforms/cpu/src/CpuSETTLE.cpp
+16
-16
platforms/cpu/tests/TestCpuNeighborList.cpp
platforms/cpu/tests/TestCpuNeighborList.cpp
+7
-7
platforms/cuda/src/CudaIntegrationUtilities.cpp
platforms/cuda/src/CudaIntegrationUtilities.cpp
+4
-4
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
+4
-4
platforms/reference/include/ObcParameters.h
platforms/reference/include/ObcParameters.h
+37
-37
platforms/reference/include/RealVec.h
platforms/reference/include/RealVec.h
+4
-133
platforms/reference/include/ReferenceAndersenThermostat.h
platforms/reference/include/ReferenceAndersenThermostat.h
+3
-2
platforms/reference/include/ReferenceAngleBondIxn.h
platforms/reference/include/ReferenceAngleBondIxn.h
+8
-7
platforms/reference/include/ReferenceBondForce.h
platforms/reference/include/ReferenceBondForce.h
+3
-3
platforms/reference/include/ReferenceBondIxn.h
platforms/reference/include/ReferenceBondIxn.h
+11
-11
platforms/reference/include/ReferenceBrownianDynamics.h
platforms/reference/include/ReferenceBrownianDynamics.h
+7
-7
platforms/reference/include/ReferenceCCMAAlgorithm.h
platforms/reference/include/ReferenceCCMAAlgorithm.h
+17
-17
platforms/reference/include/ReferenceCMAPTorsionIxn.h
platforms/reference/include/ReferenceCMAPTorsionIxn.h
+10
-10
platforms/reference/include/ReferenceConstraintAlgorithm.h
platforms/reference/include/ReferenceConstraintAlgorithm.h
+6
-5
platforms/reference/include/ReferenceConstraints.h
platforms/reference/include/ReferenceConstraints.h
+2
-2
platforms/reference/include/ReferenceCustomAngleIxn.h
platforms/reference/include/ReferenceCustomAngleIxn.h
+5
-5
platforms/reference/include/ReferenceCustomBondIxn.h
platforms/reference/include/ReferenceCustomBondIxn.h
+5
-5
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
+16
-16
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
+16
-16
platforms/reference/include/ReferenceCustomDynamics.h
platforms/reference/include/ReferenceCustomDynamics.h
+13
-13
No files found.
platforms/cpu/src/CpuSETTLE.cpp
View file @
a783b996
...
...
@@ -37,8 +37,8 @@ using namespace std;
class
CpuSETTLE
::
ApplyToPositionsTask
:
public
ThreadPool
::
Task
{
public:
ApplyToPositionsTask
(
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
,
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
)
:
atomCoordinates
(
atomCoordinates
),
atomCoordinatesP
(
atomCoordinatesP
),
ApplyToPositionsTask
(
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
vector
<
double
>&
inverseMasses
,
double
tolerance
,
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
)
:
atomCoordinates
(
atomCoordinates
),
atomCoordinatesP
(
atomCoordinatesP
),
inverseMasses
(
inverseMasses
),
tolerance
(
tolerance
),
threadSettle
(
threadSettle
)
{
gmx_atomic_set
(
&
atomicCounter
,
0
);
}
...
...
@@ -50,18 +50,18 @@ public:
threadSettle
[
index
]
->
apply
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
tolerance
);
}
}
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
;
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
;
vector
<
RealOpenMM
>&
inverseMasses
;
RealOpenMM
tolerance
;
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
;
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
;
vector
<
double
>&
inverseMasses
;
double
tolerance
;
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
;
gmx_atomic_t
atomicCounter
;
};
class
CpuSETTLE
::
ApplyToVelocitiesTask
:
public
ThreadPool
::
Task
{
public:
ApplyToVelocitiesTask
(
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
,
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
)
:
atomCoordinates
(
atomCoordinates
),
velocities
(
velocities
),
ApplyToVelocitiesTask
(
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
vector
<
OpenMM
::
Vec
3
>&
velocities
,
vector
<
double
>&
inverseMasses
,
double
tolerance
,
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
)
:
atomCoordinates
(
atomCoordinates
),
velocities
(
velocities
),
inverseMasses
(
inverseMasses
),
tolerance
(
tolerance
),
threadSettle
(
threadSettle
)
{
gmx_atomic_set
(
&
atomicCounter
,
0
);
}
...
...
@@ -73,10 +73,10 @@ public:
threadSettle
[
index
]
->
applyToVelocities
(
atomCoordinates
,
velocities
,
inverseMasses
,
tolerance
);
}
}
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
;
vector
<
OpenMM
::
Real
Vec
>&
velocities
;
vector
<
RealOpenMM
>&
inverseMasses
;
RealOpenMM
tolerance
;
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
;
vector
<
OpenMM
::
Vec
3
>&
velocities
;
vector
<
double
>&
inverseMasses
;
double
tolerance
;
vector
<
ReferenceSETTLEAlgorithm
*>&
threadSettle
;
gmx_atomic_t
atomicCounter
;
};
...
...
@@ -84,7 +84,7 @@ public:
CpuSETTLE
::
CpuSETTLE
(
const
System
&
system
,
const
ReferenceSETTLEAlgorithm
&
settle
,
ThreadPool
&
threads
)
:
threads
(
threads
)
{
int
numBlocks
=
10
*
threads
.
getNumThreads
();
int
numClusters
=
settle
.
getNumClusters
();
vector
<
RealOpenMM
>
mass
(
system
.
getNumParticles
());
vector
<
double
>
mass
(
system
.
getNumParticles
());
for
(
int
i
=
0
;
i
<
system
.
getNumParticles
();
i
++
)
mass
[
i
]
=
system
.
getParticleMass
(
i
);
for
(
int
i
=
0
;
i
<
numBlocks
;
i
++
)
{
...
...
@@ -93,7 +93,7 @@ CpuSETTLE::CpuSETTLE(const System& system, const ReferenceSETTLEAlgorithm& settl
if
(
start
!=
end
)
{
int
numThreadClusters
=
end
-
start
;
vector
<
int
>
atom1
(
numThreadClusters
),
atom2
(
numThreadClusters
),
atom3
(
numThreadClusters
);
vector
<
RealOpenMM
>
distance1
(
numThreadClusters
),
distance2
(
numThreadClusters
);
vector
<
double
>
distance1
(
numThreadClusters
),
distance2
(
numThreadClusters
);
for
(
int
j
=
0
;
j
<
numThreadClusters
;
j
++
)
settle
.
getClusterParameters
(
start
+
j
,
atom1
[
j
],
atom2
[
j
],
atom3
[
j
],
distance1
[
j
],
distance2
[
j
]);
threadSettle
.
push_back
(
new
ReferenceSETTLEAlgorithm
(
atom1
,
atom2
,
atom3
,
distance1
,
distance2
,
mass
));
...
...
@@ -106,13 +106,13 @@ CpuSETTLE::~CpuSETTLE() {
delete
threadSettle
[
i
];
}
void
CpuSETTLE
::
apply
(
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
void
CpuSETTLE
::
apply
(
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
vector
<
double
>&
inverseMasses
,
double
tolerance
)
{
ApplyToPositionsTask
task
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
tolerance
,
threadSettle
);
threads
.
execute
(
task
);
threads
.
waitForThreads
();
}
void
CpuSETTLE
::
applyToVelocities
(
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
void
CpuSETTLE
::
applyToVelocities
(
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
vector
<
OpenMM
::
Vec
3
>&
velocities
,
vector
<
double
>&
inverseMasses
,
double
tolerance
)
{
ApplyToVelocitiesTask
task
(
atomCoordinates
,
velocities
,
inverseMasses
,
tolerance
,
threadSettle
);
threads
.
execute
(
task
);
threads
.
waitForThreads
();
...
...
platforms/cpu/tests/TestCpuNeighborList.cpp
View file @
a783b996
...
...
@@ -51,16 +51,16 @@ using namespace std;
void
testNeighborList
(
bool
periodic
,
bool
triclinic
)
{
const
int
numParticles
=
500
;
const
float
cutoff
=
2.0
f
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
if
(
triclinic
)
{
boxVectors
[
0
]
=
Real
Vec
(
10
,
0
,
0
);
boxVectors
[
1
]
=
Real
Vec
(
4
,
9
,
0
);
boxVectors
[
2
]
=
Real
Vec
(
-
3
,
-
3.5
,
11
);
boxVectors
[
0
]
=
Vec
3
(
10
,
0
,
0
);
boxVectors
[
1
]
=
Vec
3
(
4
,
9
,
0
);
boxVectors
[
2
]
=
Vec
3
(
-
3
,
-
3.5
,
11
);
}
else
{
boxVectors
[
0
]
=
Real
Vec
(
10
,
0
,
0
);
boxVectors
[
1
]
=
Real
Vec
(
0
,
9
,
0
);
boxVectors
[
2
]
=
Real
Vec
(
0
,
0
,
11
);
boxVectors
[
0
]
=
Vec
3
(
10
,
0
,
0
);
boxVectors
[
1
]
=
Vec
3
(
0
,
9
,
0
);
boxVectors
[
2
]
=
Vec
3
(
0
,
0
,
11
);
}
const
float
boxSize
[
3
]
=
{(
float
)
boxVectors
[
0
][
0
],
(
float
)
boxVectors
[
1
][
1
],
(
float
)
boxVectors
[
2
][
2
]};
const
int
blockSize
=
8
;
...
...
platforms/cuda/src/CudaIntegrationUtilities.cpp
View file @
a783b996
...
...
@@ -310,15 +310,15 @@ CudaIntegrationUtilities::CudaIntegrationUtilities(CudaContext& context, const S
// Record information needed by ReferenceCCMAAlgorithm.
vector
<
pair
<
int
,
int
>
>
refIndices
(
numCCMA
);
vector
<
RealOpenMM
>
refDistance
(
numCCMA
);
vector
<
double
>
refDistance
(
numCCMA
);
for
(
int
i
=
0
;
i
<
numCCMA
;
i
++
)
{
int
index
=
ccmaConstraints
[
i
];
refIndices
[
i
]
=
make_pair
(
atom1
[
index
],
atom2
[
index
]);
refDistance
[
i
]
=
distance
[
index
];
}
vector
<
RealOpenMM
>
refMasses
(
numAtoms
);
vector
<
double
>
refMasses
(
numAtoms
);
for
(
int
i
=
0
;
i
<
numAtoms
;
++
i
)
refMasses
[
i
]
=
(
RealOpenMM
)
system
.
getParticleMass
(
i
);
refMasses
[
i
]
=
system
.
getParticleMass
(
i
);
// Look up angles for CCMA.
...
...
@@ -330,7 +330,7 @@ CudaIntegrationUtilities::CudaIntegrationUtilities(CudaContext& context, const S
int
atom1
,
atom2
,
atom3
;
double
angle
,
k
;
force
->
getAngleParameters
(
j
,
atom1
,
atom2
,
atom3
,
angle
,
k
);
angles
.
push_back
(
ReferenceCCMAAlgorithm
::
AngleInfo
(
atom1
,
atom2
,
atom3
,
(
RealOpenMM
)
angle
));
angles
.
push_back
(
ReferenceCCMAAlgorithm
::
AngleInfo
(
atom1
,
atom2
,
atom3
,
angle
));
}
}
}
...
...
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
View file @
a783b996
...
...
@@ -329,15 +329,15 @@ OpenCLIntegrationUtilities::OpenCLIntegrationUtilities(OpenCLContext& context, c
// Record information needed by ReferenceCCMAAlgorithm.
vector
<
pair
<
int
,
int
>
>
refIndices
(
numCCMA
);
vector
<
RealOpenMM
>
refDistance
(
numCCMA
);
vector
<
double
>
refDistance
(
numCCMA
);
for
(
int
i
=
0
;
i
<
numCCMA
;
i
++
)
{
int
index
=
ccmaConstraints
[
i
];
refIndices
[
i
]
=
make_pair
(
atom1
[
index
],
atom2
[
index
]);
refDistance
[
i
]
=
distance
[
index
];
}
vector
<
RealOpenMM
>
refMasses
(
numAtoms
);
vector
<
double
>
refMasses
(
numAtoms
);
for
(
int
i
=
0
;
i
<
numAtoms
;
++
i
)
refMasses
[
i
]
=
(
RealOpenMM
)
system
.
getParticleMass
(
i
);
refMasses
[
i
]
=
(
double
)
system
.
getParticleMass
(
i
);
// Look up angles for CCMA.
...
...
@@ -349,7 +349,7 @@ OpenCLIntegrationUtilities::OpenCLIntegrationUtilities(OpenCLContext& context, c
int
atom1
,
atom2
,
atom3
;
double
angle
,
k
;
force
->
getAngleParameters
(
j
,
atom1
,
atom2
,
atom3
,
angle
,
k
);
angles
.
push_back
(
ReferenceCCMAAlgorithm
::
AngleInfo
(
atom1
,
atom2
,
atom3
,
(
RealOpenMM
)
angle
));
angles
.
push_back
(
ReferenceCCMAAlgorithm
::
AngleInfo
(
atom1
,
atom2
,
atom3
,
angle
));
}
}
}
...
...
platforms/reference/include/ObcParameters.h
View file @
a783b996
...
...
@@ -25,7 +25,7 @@
#ifndef __ObcParameters_H__
#define __ObcParameters_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include <vector>
namespace
OpenMM
{
...
...
@@ -44,29 +44,29 @@ class ObcParameters {
int
_numberOfAtoms
;
RealOpenMM
_solventDielectric
;
RealOpenMM
_soluteDielectric
;
RealOpenMM
_electricConstant
;
RealOpenMM
_probeRadius
;
RealOpenMM
_pi4Asolv
;
double
_solventDielectric
;
double
_soluteDielectric
;
double
_electricConstant
;
double
_probeRadius
;
double
_pi4Asolv
;
RealOpenMM
_dielectricOffset
;
RealOpenMM
_alphaObc
;
RealOpenMM
_betaObc
;
RealOpenMM
_gammaObc
;
double
_dielectricOffset
;
double
_alphaObc
;
double
_betaObc
;
double
_gammaObc
;
ObcType
_obcType
;
// scaled radius factors (S_kk in HCT paper)
std
::
vector
<
RealOpenMM
>
_atomicRadii
;
std
::
vector
<
RealOpenMM
>
_scaledRadiusFactors
;
std
::
vector
<
double
>
_atomicRadii
;
std
::
vector
<
double
>
_scaledRadiusFactors
;
// cutoff and periodic boundary conditions
bool
_cutoff
;
bool
_periodic
;
OpenMM
::
Real
Vec
_periodicBoxVectors
[
3
];
RealOpenMM
_cutoffDistance
;
OpenMM
::
Vec
3
_periodicBoxVectors
[
3
];
double
_cutoffDistance
;
/**---------------------------------------------------------------------------------------
...
...
@@ -76,7 +76,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setDielectricOffset
(
RealOpenMM
dielectricOffset
);
void
setDielectricOffset
(
double
dielectricOffset
);
public:
...
...
@@ -116,7 +116,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getElectricConstant
()
const
;
double
getElectricConstant
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -126,7 +126,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getProbeRadius
()
const
;
double
getProbeRadius
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -136,18 +136,18 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setProbeRadius
(
RealOpenMM
probeRadius
);
void
setProbeRadius
(
double
probeRadius
);
/**---------------------------------------------------------------------------------------
Get pi4Asolv: used in ACE approximation for nonpolar term
((RealOpenMM)
M_PI
)
*4.0f*0.0049f*1000.0f; (Simbios)
M_PI*4.0f*0.0049f*1000.0f; (Simbios)
@return pi4Asolv
--------------------------------------------------------------------------------------- */
RealOpenMM
getPi4Asolv
()
const
;
double
getPi4Asolv
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -155,7 +155,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setPi4Asolv
(
RealOpenMM
pi4Asolv
);
void
setPi4Asolv
(
double
pi4Asolv
);
/**---------------------------------------------------------------------------------------
...
...
@@ -165,7 +165,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getSolventDielectric
()
const
;
double
getSolventDielectric
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -175,7 +175,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setSolventDielectric
(
RealOpenMM
solventDielectric
);
void
setSolventDielectric
(
double
solventDielectric
);
/**---------------------------------------------------------------------------------------
...
...
@@ -185,7 +185,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getSoluteDielectric
()
const
;
double
getSoluteDielectric
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -195,7 +195,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setSoluteDielectric
(
RealOpenMM
soluteDielectric
);
void
setSoluteDielectric
(
double
soluteDielectric
);
/**---------------------------------------------------------------------------------------
...
...
@@ -225,7 +225,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getAlphaObc
()
const
;
double
getAlphaObc
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -235,7 +235,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getBetaObc
()
const
;
double
getBetaObc
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -245,7 +245,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getGammaObc
()
const
;
double
getGammaObc
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -255,7 +255,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getDielectricOffset
()
const
;
double
getDielectricOffset
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -265,7 +265,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
const
std
::
vector
<
RealOpenMM
>&
getScaledRadiusFactors
()
const
;
const
std
::
vector
<
double
>&
getScaledRadiusFactors
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -275,7 +275,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setScaledRadiusFactors
(
const
std
::
vector
<
RealOpenMM
>&
scaledRadiusFactors
);
void
setScaledRadiusFactors
(
const
std
::
vector
<
double
>&
scaledRadiusFactors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -285,7 +285,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
const
std
::
vector
<
RealOpenMM
>&
getAtomicRadii
()
const
;
const
std
::
vector
<
double
>&
getAtomicRadii
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -295,7 +295,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setAtomicRadii
(
const
std
::
vector
<
RealOpenMM
>&
atomicRadii
);
void
setAtomicRadii
(
const
std
::
vector
<
double
>&
atomicRadii
);
/**---------------------------------------------------------------------------------------
...
...
@@ -306,7 +306,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setUseCutoff
(
RealOpenMM
distance
);
void
setUseCutoff
(
double
distance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -322,7 +322,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getCutoffDistance
()
const
;
double
getCutoffDistance
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -334,7 +334,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -350,7 +350,7 @@ class ObcParameters {
--------------------------------------------------------------------------------------- */
const
OpenMM
::
Real
Vec
*
getPeriodicBox
();
const
OpenMM
::
Vec
3
*
getPeriodicBox
();
};
...
...
platforms/reference/include/RealVec.h
View file @
a783b996
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
3
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
7
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -34,143 +34,14 @@
#include "SimTKOpenMMRealType.h"
#include "openmm/Vec3.h"
#include <cassert>
#include <iosfwd>
namespace
OpenMM
{
/**
* This is identical to Vec3, except that the components are of type RealOpenMM, so
* it can be compiled in either single or double precision. Automatic conversion
* between this class and Vec3 is supported.
*/
class
RealVec
{
public:
/**
* Create a RealVec whose elements are all 0.
*/
RealVec
()
{
data
[
0
]
=
data
[
1
]
=
data
[
2
]
=
0.0
;
}
/**
* Create a RealVec with specified x, y, and z components.
*/
RealVec
(
RealOpenMM
x
,
RealOpenMM
y
,
RealOpenMM
z
)
{
data
[
0
]
=
x
;
data
[
1
]
=
y
;
data
[
2
]
=
z
;
}
/**
* Create a RealVec from a Vec3.
* This file exists only for backward compatibility. RealVec is now just a typedef for Vec3.
*/
RealVec
(
Vec3
v
)
{
data
[
0
]
=
v
[
0
];
data
[
1
]
=
v
[
1
];
data
[
2
]
=
v
[
2
];
}
/**
* Create a Vec3 from a RealVec.
*/
operator
Vec3
()
const
{
return
Vec3
(
data
[
0
],
data
[
1
],
data
[
2
]);
}
RealOpenMM
operator
[](
int
index
)
const
{
assert
(
index
>=
0
&&
index
<
3
);
return
data
[
index
];
}
RealOpenMM
&
operator
[](
int
index
)
{
assert
(
index
>=
0
&&
index
<
3
);
return
data
[
index
];
}
// Arithmetic operators
// unary plus
RealVec
operator
+
()
const
{
return
RealVec
(
*
this
);
}
// plus
RealVec
operator
+
(
const
RealVec
&
rhs
)
const
{
const
RealVec
&
lhs
=
*
this
;
return
RealVec
(
lhs
[
0
]
+
rhs
[
0
],
lhs
[
1
]
+
rhs
[
1
],
lhs
[
2
]
+
rhs
[
2
]);
}
RealVec
&
operator
+=
(
const
RealVec
&
rhs
)
{
data
[
0
]
+=
rhs
[
0
];
data
[
1
]
+=
rhs
[
1
];
data
[
2
]
+=
rhs
[
2
];
return
*
this
;
}
// unary minus
RealVec
operator
-
()
const
{
const
RealVec
&
lhs
=
*
this
;
return
RealVec
(
-
lhs
[
0
],
-
lhs
[
1
],
-
lhs
[
2
]);
}
// minus
RealVec
operator
-
(
const
RealVec
&
rhs
)
const
{
const
RealVec
&
lhs
=
*
this
;
return
RealVec
(
lhs
[
0
]
-
rhs
[
0
],
lhs
[
1
]
-
rhs
[
1
],
lhs
[
2
]
-
rhs
[
2
]);
}
RealVec
&
operator
-=
(
const
RealVec
&
rhs
)
{
data
[
0
]
-=
rhs
[
0
];
data
[
1
]
-=
rhs
[
1
];
data
[
2
]
-=
rhs
[
2
];
return
*
this
;
}
// scalar product
RealVec
operator
*
(
RealOpenMM
rhs
)
const
{
const
RealVec
&
lhs
=
*
this
;
return
RealVec
(
lhs
[
0
]
*
rhs
,
lhs
[
1
]
*
rhs
,
lhs
[
2
]
*
rhs
);
}
RealVec
&
operator
*=
(
RealOpenMM
rhs
)
{
data
[
0
]
*=
rhs
;
data
[
1
]
*=
rhs
;
data
[
2
]
*=
rhs
;
return
*
this
;
}
// scalar division
RealVec
operator
/
(
double
rhs
)
const
{
const
RealVec
&
lhs
=
*
this
;
double
scale
=
1.0
/
rhs
;
return
RealVec
(
lhs
[
0
]
*
scale
,
lhs
[
1
]
*
scale
,
lhs
[
2
]
*
scale
);
}
RealVec
&
operator
/=
(
double
rhs
)
{
double
scale
=
1.0
/
rhs
;
data
[
0
]
*=
scale
;
data
[
1
]
*=
scale
;
data
[
2
]
*=
scale
;
return
*
this
;
}
// dot product
RealOpenMM
dot
(
const
RealVec
&
rhs
)
const
{
const
RealVec
&
lhs
=
*
this
;
return
lhs
[
0
]
*
rhs
[
0
]
+
lhs
[
1
]
*
rhs
[
1
]
+
lhs
[
2
]
*
rhs
[
2
];
}
// cross product
RealVec
cross
(
const
RealVec
&
rhs
)
const
{
return
RealVec
(
data
[
1
]
*
rhs
[
2
]
-
data
[
2
]
*
rhs
[
1
],
data
[
2
]
*
rhs
[
0
]
-
data
[
0
]
*
rhs
[
2
],
data
[
0
]
*
rhs
[
1
]
-
data
[
1
]
*
rhs
[
0
]);
}
private:
RealOpenMM
data
[
3
];
};
namespace
OpenMM
{
template
<
class
CHAR
,
class
TRAITS
>
std
::
basic_ostream
<
CHAR
,
TRAITS
>&
operator
<<
(
std
::
basic_ostream
<
CHAR
,
TRAITS
>&
o
,
const
RealVec
&
v
)
{
o
<<
'['
<<
v
[
0
]
<<
", "
<<
v
[
1
]
<<
", "
<<
v
[
2
]
<<
']'
;
return
o
;
}
typedef
Vec3
RealVec
;
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceAndersenThermostat.h
View file @
a783b996
...
...
@@ -25,6 +25,7 @@
#ifndef __ReferenceAndersenThermostat_H__
#define __ReferenceAndersenThermostat_H__
#include "openmm/Vec3.h"
#include <vector>
namespace
OpenMM
{
...
...
@@ -64,8 +65,8 @@ class ReferenceAndersenThermostat {
--------------------------------------------------------------------------------------- */
void
applyThermostat
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
atomGroups
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomVelocities
,
std
::
vector
<
RealOpenMM
>&
atomMasses
,
RealOpenMM
temperature
,
RealOpenMM
collisionFrequency
,
RealOpenMM
stepSize
)
const
;
void
applyThermostat
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
atomGroups
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomVelocities
,
std
::
vector
<
double
>&
atomMasses
,
double
temperature
,
double
collisionFrequency
,
double
stepSize
)
const
;
};
...
...
platforms/reference/include/ReferenceAngleBondIxn.h
View file @
a783b996
...
...
@@ -26,6 +26,7 @@
#define __ReferenceAngleBondIxn_H__
#include "ReferenceBondIxn.h"
#include "openmm/Vec3.h"
namespace
OpenMM
{
...
...
@@ -34,7 +35,7 @@ class OPENMM_EXPORT ReferenceAngleBondIxn : public ReferenceBondIxn {
private:
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
...
...
@@ -62,7 +63,7 @@ class OPENMM_EXPORT ReferenceAngleBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -76,8 +77,8 @@ class OPENMM_EXPORT ReferenceAngleBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
getPrefactorsGivenAngleCosine
(
RealOpenMM
cosine
,
RealOpenMM
*
angleParameters
,
RealOpenMM
*
dEdR
,
RealOpenMM
*
energyTerm
)
const
;
void
getPrefactorsGivenAngleCosine
(
double
cosine
,
double
*
angleParameters
,
double
*
dEdR
,
double
*
energyTerm
)
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -92,9 +93,9 @@ class OPENMM_EXPORT ReferenceAngleBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceBondForce.h
View file @
a783b996
...
...
@@ -68,9 +68,9 @@ class OPENMM_EXPORT ReferenceBondForce : public ReferenceForce {
--------------------------------------------------------------------------------------- */
void
calculateForce
(
int
numberOfBonds
,
int
**
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
ReferenceBondIxn
&
referenceBondIxn
);
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
ReferenceBondIxn
&
referenceBondIxn
);
};
...
...
platforms/reference/include/ReferenceBondIxn.h
View file @
a783b996
...
...
@@ -25,7 +25,7 @@
#ifndef __ReferenceBondIxn_H__
#define __ReferenceBondIxn_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
...
...
@@ -65,9 +65,9 @@ class OPENMM_EXPORT ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
virtual
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
virtual
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
/**---------------------------------------------------------------------------------------
...
...
@@ -82,7 +82,7 @@ class OPENMM_EXPORT ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
static
RealOpenMM
getNormedDotProduct
(
RealOpenMM
*
vector1
,
RealOpenMM
*
vector2
,
int
hasREntry
);
static
double
getNormedDotProduct
(
double
*
vector1
,
double
*
vector2
,
int
hasREntry
);
/**---------------------------------------------------------------------------------------
...
...
@@ -98,8 +98,8 @@ class OPENMM_EXPORT ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
static
RealOpenMM
getAngleBetweenTwoVectors
(
RealOpenMM
*
vector1
,
RealOpenMM
*
vector2
,
RealOpenMM
*
outputDotProduct
,
int
hasREntry
);
static
double
getAngleBetweenTwoVectors
(
double
*
vector1
,
double
*
vector2
,
double
*
outputDotProduct
,
int
hasREntry
);
/**---------------------------------------------------------------------------------------
...
...
@@ -119,10 +119,10 @@ class OPENMM_EXPORT ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
static
RealOpenMM
getDihedralAngleBetweenThreeVectors
(
RealOpenMM
*
vector1
,
RealOpenMM
*
vector2
,
RealOpenMM
*
vector3
,
RealOpenMM
**
outputCrossProduct
,
RealOpenMM
*
cosineOfAngle
,
RealOpenMM
*
signVector
,
RealOpenMM
*
signOfAngle
,
int
hasREntry
);
static
double
getDihedralAngleBetweenThreeVectors
(
double
*
vector1
,
double
*
vector2
,
double
*
vector3
,
double
**
outputCrossProduct
,
double
*
cosineOfAngle
,
double
*
signVector
,
double
*
signOfAngle
,
int
hasREntry
);
};
...
...
platforms/reference/include/ReferenceBrownianDynamics.h
View file @
a783b996
...
...
@@ -33,9 +33,9 @@ class ReferenceBrownianDynamics : public ReferenceDynamics {
private:
std
::
vector
<
OpenMM
::
Real
Vec
>
xPrime
;
std
::
vector
<
RealOpenMM
>
inverseMasses
;
RealOpenMM
friction
;
std
::
vector
<
OpenMM
::
Vec
3
>
xPrime
;
std
::
vector
<
double
>
inverseMasses
;
double
friction
;
public:
...
...
@@ -50,7 +50,7 @@ class ReferenceBrownianDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceBrownianDynamics
(
int
numberOfAtoms
,
RealOpenMM
deltaT
,
RealOpenMM
friction
,
RealOpenMM
temperature
);
ReferenceBrownianDynamics
(
int
numberOfAtoms
,
double
deltaT
,
double
friction
,
double
temperature
);
/**---------------------------------------------------------------------------------------
...
...
@@ -68,7 +68,7 @@ class ReferenceBrownianDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM
getFriction
()
const
;
double
getFriction
()
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -83,8 +83,8 @@ class ReferenceBrownianDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
);
void
update
(
const
OpenMM
::
System
&
system
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
double
tolerance
);
};
...
...
platforms/reference/include/ReferenceCCMAAlgorithm.h
View file @
a783b996
...
...
@@ -37,23 +37,23 @@ class OPENMM_EXPORT ReferenceCCMAAlgorithm : public ReferenceConstraintAlgorithm
protected:
int
_maximumNumberOfIterations
;
RealOpenMM
_elementCutoff
;
double
_elementCutoff
;
int
_numberOfConstraints
;
std
::
vector
<
std
::
pair
<
int
,
int
>
>
_atomIndices
;
std
::
vector
<
RealOpenMM
>
_distance
;
std
::
vector
<
double
>
_distance
;
std
::
vector
<
OpenMM
::
Real
Vec
>
_r_ij
;
RealOpenMM
*
_d_ij2
;
RealOpenMM
*
_distanceTolerance
;
RealOpenMM
*
_reducedMasses
;
std
::
vector
<
OpenMM
::
Vec
3
>
_r_ij
;
double
*
_d_ij2
;
double
*
_distanceTolerance
;
double
*
_reducedMasses
;
bool
_hasInitializedMasses
;
std
::
vector
<
std
::
vector
<
std
::
pair
<
int
,
RealOpenMM
>
>
>
_matrix
;
std
::
vector
<
std
::
vector
<
std
::
pair
<
int
,
double
>
>
>
_matrix
;
private:
void
applyConstraints
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
bool
constrainingVelocities
,
RealOpenMM
tolerance
);
void
applyConstraints
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
,
bool
constrainingVelocities
,
double
tolerance
);
public:
class
AngleInfo
;
...
...
@@ -69,7 +69,7 @@ public:
* @param angles angle force field terms
* @param elementCutoff the cutoff for which elements of the inverse matrix to keep
*/
ReferenceCCMAAlgorithm
(
int
numberOfAtoms
,
int
numberOfConstraints
,
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>&
atomIndices
,
const
std
::
vector
<
RealOpenMM
>&
distance
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
vector
<
AngleInfo
>&
angles
,
RealOpenMM
elementCutoff
);
ReferenceCCMAAlgorithm
(
int
numberOfAtoms
,
int
numberOfConstraints
,
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>&
atomIndices
,
const
std
::
vector
<
double
>&
distance
,
std
::
vector
<
double
>&
masses
,
std
::
vector
<
AngleInfo
>&
angles
,
double
elementCutoff
);
~
ReferenceCCMAAlgorithm
();
...
...
@@ -96,8 +96,8 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
void
apply
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
);
void
apply
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
);
/**
* Apply the constraint algorithm to velocities.
...
...
@@ -107,14 +107,14 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
);
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
);
/**
* Get the inverse constraint matrix. Each element represents one column, and contains a list
* of all non-zero elements in the form (index, value).
*/
const
std
::
vector
<
std
::
vector
<
std
::
pair
<
int
,
RealOpenMM
>
>
>&
getMatrix
()
const
;
const
std
::
vector
<
std
::
vector
<
std
::
pair
<
int
,
double
>
>
>&
getMatrix
()
const
;
};
...
...
@@ -122,8 +122,8 @@ class ReferenceCCMAAlgorithm::AngleInfo
{
public:
int
atom1
,
atom2
,
atom3
;
RealOpenMM
angle
;
AngleInfo
(
int
atom1
,
int
atom2
,
int
atom3
,
RealOpenMM
angle
)
:
double
angle
;
AngleInfo
(
int
atom1
,
int
atom2
,
int
atom3
,
double
angle
)
:
atom1
(
atom1
),
atom2
(
atom2
),
atom3
(
atom3
),
angle
(
angle
)
{
}
...
...
platforms/reference/include/ReferenceCMAPTorsionIxn.h
View file @
a783b996
...
...
@@ -35,11 +35,11 @@ class ReferenceCMAPTorsionIxn : public ReferenceBondIxn {
private:
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
coeff
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
coeff
;
std
::
vector
<
int
>
torsionMaps
;
std
::
vector
<
std
::
vector
<
int
>
>
torsionIndices
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
/**---------------------------------------------------------------------------------------
...
...
@@ -52,8 +52,8 @@ private:
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
index
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
void
calculateOneIxn
(
int
index
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
public:
...
...
@@ -63,7 +63,7 @@ public:
--------------------------------------------------------------------------------------- */
ReferenceCMAPTorsionIxn
(
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>&
coeff
,
ReferenceCMAPTorsionIxn
(
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
coeff
,
const
std
::
vector
<
int
>&
torsionMaps
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
torsionIndices
);
...
...
@@ -75,7 +75,7 @@ public:
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -87,7 +87,7 @@ public:
--------------------------------------------------------------------------------------- */
void
calculateIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
void
calculateIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
)
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -95,9 +95,9 @@ public:
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/include/ReferenceConstraintAlgorithm.h
View file @
a783b996
...
...
@@ -25,8 +25,9 @@
#ifndef __ReferenceConstraintAlgorithm_H__
#define __ReferenceConstraintAlgorithm_H__
#include "
Real
Vec.h"
#include "
openmm/
Vec
3
.h"
#include "openmm/internal/windowsExport.h"
#include "SimTKOpenMMRealType.h"
#include <vector>
namespace
OpenMM
{
...
...
@@ -47,8 +48,8 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
virtual
void
apply
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
=
0
;
virtual
void
apply
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
)
=
0
;
/**
* Apply the constraint algorithm to velocities.
...
...
@@ -58,8 +59,8 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
virtual
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
=
0
;
virtual
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
)
=
0
;
};
}
// namespace OpenMM
...
...
platforms/reference/include/ReferenceConstraints.h
View file @
a783b996
...
...
@@ -55,7 +55,7 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
void
apply
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinatesP
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
);
void
apply
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinatesP
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
);
/**
* Apply the constraint algorithm to velocities.
...
...
@@ -65,7 +65,7 @@ public:
* @param inverseMasses 1/mass
* @param tolerance the constraint tolerance
*/
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
);
void
applyToVelocities
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
double
>&
inverseMasses
,
double
tolerance
);
ReferenceConstraintAlgorithm
*
ccma
;
ReferenceConstraintAlgorithm
*
settle
;
};
...
...
platforms/reference/include/ReferenceCustomAngleIxn.h
View file @
a783b996
...
...
@@ -40,7 +40,7 @@ class ReferenceCustomAngleIxn : public ReferenceBondIxn {
int
thetaIndex
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
...
...
@@ -70,7 +70,7 @@ class ReferenceCustomAngleIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -84,9 +84,9 @@ class ReferenceCustomAngleIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceCustomBondIxn.h
View file @
a783b996
...
...
@@ -41,7 +41,7 @@ class ReferenceCustomBondIxn : public ReferenceBondIxn {
int
rIndex
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
public:
...
...
@@ -71,7 +71,7 @@ class ReferenceCustomBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -85,9 +85,9 @@ class ReferenceCustomBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
*
parameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateBondIxn
(
int
*
atomIndices
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
*
parameters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
};
...
...
platforms/reference/include/ReferenceCustomCentroidBondIxn.h
View file @
a783b996
...
...
@@ -54,7 +54,7 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
/**---------------------------------------------------------------------------------------
...
...
@@ -68,12 +68,12 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
groupCenters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Vec
3
>&
groupCenters
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
void
computeDelta
(
int
group1
,
int
group2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
groupCenters
)
const
;
void
computeDelta
(
int
group1
,
int
group2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
groupCenters
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -106,7 +106,7 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -130,9 +130,9 @@ class ReferenceCustomCentroidBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
bondParameters
,
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
bondParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
@@ -153,7 +153,7 @@ public:
std
::
string
name
;
int
g1
,
g2
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -164,8 +164,8 @@ public:
std
::
string
name
;
int
g1
,
g2
,
g3
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
g3
(
groups
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -176,11 +176,11 @@ public:
std
::
string
name
;
int
g1
,
g2
,
g3
,
g4
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
groups
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
g1
(
groups
[
0
]),
g2
(
groups
[
1
]),
g3
(
groups
[
2
]),
g4
(
groups
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
View file @
a783b996
...
...
@@ -52,7 +52,7 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
std
::
vector
<
DihedralTermInfo
>
dihedralTerms
;
int
numParameters
;
bool
usePeriodic
;
Real
Vec
boxVectors
[
3
];
Vec
3
boxVectors
[
3
];
/**---------------------------------------------------------------------------------------
...
...
@@ -66,12 +66,12 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
void
calculateOneIxn
(
int
bond
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
void
computeDelta
(
int
atom1
,
int
atom2
,
RealOpenMM
*
delta
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
)
const
;
void
computeDelta
(
int
atom1
,
int
atom2
,
double
*
delta
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
)
const
;
static
RealOpenMM
computeAngle
(
RealOpenMM
*
vec1
,
RealOpenMM
*
vec2
);
static
double
computeAngle
(
double
*
vec1
,
double
*
vec2
);
public:
...
...
@@ -103,7 +103,7 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
setPeriodic
(
OpenMM
::
Real
Vec
*
vectors
);
void
setPeriodic
(
OpenMM
::
Vec
3
*
vectors
);
/**---------------------------------------------------------------------------------------
...
...
@@ -127,9 +127,9 @@ class ReferenceCustomCompoundBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
RealOpenMM
**
bondParameters
,
void
calculatePairIxn
(
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
double
**
bondParameters
,
const
std
::
map
<
std
::
string
,
double
>&
globalParameters
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
RealOpenMM
*
totalEnergy
,
double
*
energyParamDerivs
);
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
double
*
totalEnergy
,
double
*
energyParamDerivs
);
// ---------------------------------------------------------------------------------------
...
...
@@ -150,7 +150,7 @@ public:
std
::
string
name
;
int
p1
,
p2
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta
[
ReferenceForce
::
LastDeltaRIndex
];
DistanceTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -161,8 +161,8 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
AngleTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
forceExpression
(
forceExpression
)
{
}
...
...
@@ -173,11 +173,11 @@ public:
std
::
string
name
;
int
p1
,
p2
,
p3
,
p4
,
index
;
Lepton
::
CompiledExpression
forceExpression
;
mutable
RealOpenMM
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
RealOpenMM
cross1
[
3
];
mutable
RealOpenMM
cross2
[
3
];
mutable
double
delta1
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta2
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
delta3
[
ReferenceForce
::
LastDeltaRIndex
];
mutable
double
cross1
[
3
];
mutable
double
cross2
[
3
];
DihedralTermInfo
(
const
std
::
string
&
name
,
const
std
::
vector
<
int
>&
atoms
,
const
Lepton
::
CompiledExpression
&
forceExpression
)
:
name
(
name
),
p1
(
atoms
[
0
]),
p2
(
atoms
[
1
]),
p3
(
atoms
[
2
]),
p4
(
atoms
[
3
]),
forceExpression
(
forceExpression
)
{
}
...
...
platforms/reference/include/ReferenceCustomDynamics.h
View file @
a783b996
...
...
@@ -43,8 +43,8 @@ private:
class
DerivFunction
;
const
OpenMM
::
CustomIntegrator
&
integrator
;
std
::
vector
<
RealOpenMM
>
inverseMasses
;
std
::
vector
<
OpenMM
::
Real
Vec
>
sumBuffer
,
oldPos
;
std
::
vector
<
double
>
inverseMasses
;
std
::
vector
<
OpenMM
::
Vec
3
>
sumBuffer
,
oldPos
;
std
::
vector
<
OpenMM
::
CustomIntegrator
::
ComputationType
>
stepType
;
std
::
vector
<
std
::
string
>
stepVariable
;
std
::
vector
<
std
::
vector
<
Lepton
::
CompiledExpression
>
>
stepExpressions
;
...
...
@@ -60,15 +60,15 @@ private:
std
::
vector
<
int
>
perDofVariableIndex
,
stepVariableIndex
;
std
::
vector
<
double
>
perDofVariable
;
void
initialize
(
OpenMM
::
ContextImpl
&
context
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
);
void
initialize
(
OpenMM
::
ContextImpl
&
context
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
);
Lepton
::
ExpressionTreeNode
replaceDerivFunctions
(
const
Lepton
::
ExpressionTreeNode
&
node
,
OpenMM
::
ContextImpl
&
context
);
void
computePerDof
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
results
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
const
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
const
std
::
vector
<
RealOpenMM
>&
masses
,
const
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
const
Lepton
::
CompiledExpression
&
expression
);
void
computePerDof
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
results
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
const
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
const
std
::
vector
<
double
>&
masses
,
const
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
const
Lepton
::
CompiledExpression
&
expression
);
void
recordChangedParameters
(
OpenMM
::
ContextImpl
&
context
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
);
void
recordChangedParameters
(
OpenMM
::
ContextImpl
&
context
,
std
::
map
<
std
::
string
,
double
>&
globals
);
bool
evaluateCondition
(
int
step
);
...
...
@@ -110,9 +110,9 @@ public:
--------------------------------------------------------------------------------------- */
void
update
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
bool
&
forcesAreValid
,
RealOpenMM
tolerance
);
void
update
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
bool
&
forcesAreValid
,
double
tolerance
);
/**---------------------------------------------------------------------------------------
...
...
@@ -130,9 +130,9 @@ public:
--------------------------------------------------------------------------------------- */
double
computeKineticEnergy
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
velocities
,
std
::
vector
<
OpenMM
::
Real
Vec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
masses
,
std
::
map
<
std
::
string
,
RealOpenMM
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Real
Vec
>
>&
perDof
,
bool
&
forcesAreValid
);
double
computeKineticEnergy
(
OpenMM
::
ContextImpl
&
context
,
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
Vec
3
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
Vec
3
>&
velocities
,
std
::
vector
<
OpenMM
::
Vec
3
>&
forces
,
std
::
vector
<
double
>&
masses
,
std
::
map
<
std
::
string
,
double
>&
globals
,
std
::
vector
<
std
::
vector
<
OpenMM
::
Vec
3
>
>&
perDof
,
bool
&
forcesAreValid
);
};
}
// namespace OpenMM
...
...
Prev
1
2
3
4
5
6
…
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