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
588a4c9d
"wrappers/python/vscode:/vscode.git/clone" did not exist on "f6d9006666848a0ea68e914fe7216c4bf7133cc3"
Commit
588a4c9d
authored
Dec 10, 2013
by
peastman
Browse files
Merged changes from main branch
parents
bbf3de23
ff6af025
Changes
77
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
67 additions
and
126 deletions
+67
-126
platforms/reference/src/SimTKReference/ReferenceBrownianDynamics.cpp
...eference/src/SimTKReference/ReferenceBrownianDynamics.cpp
+2
-2
platforms/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
...s/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
+9
-20
platforms/reference/src/SimTKReference/ReferenceConstraints.cpp
...rms/reference/src/SimTKReference/ReferenceConstraints.cpp
+11
-22
platforms/reference/src/SimTKReference/ReferenceCustomDynamics.cpp
.../reference/src/SimTKReference/ReferenceCustomDynamics.cpp
+3
-3
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
+2
-1
platforms/reference/src/SimTKReference/ReferenceSETTLEAlgorithm.cpp
...reference/src/SimTKReference/ReferenceSETTLEAlgorithm.cpp
+12
-8
platforms/reference/src/SimTKReference/ReferenceStochasticDynamics.cpp
...erence/src/SimTKReference/ReferenceStochasticDynamics.cpp
+2
-2
platforms/reference/src/SimTKReference/ReferenceVariableStochasticDynamics.cpp
...rc/SimTKReference/ReferenceVariableStochasticDynamics.cpp
+2
-2
platforms/reference/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
...ce/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
+2
-2
platforms/reference/src/SimTKReference/ReferenceVerletDynamics.cpp
.../reference/src/SimTKReference/ReferenceVerletDynamics.cpp
+2
-2
platforms/reference/tests/CMakeLists.txt
platforms/reference/tests/CMakeLists.txt
+1
-0
plugins/amoeba/CMakeLists.txt
plugins/amoeba/CMakeLists.txt
+2
-2
plugins/amoeba/platforms/cuda/CMakeLists.txt
plugins/amoeba/platforms/cuda/CMakeLists.txt
+4
-2
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
+3
-1
plugins/amoeba/platforms/reference/tests/CMakeLists.txt
plugins/amoeba/platforms/reference/tests/CMakeLists.txt
+1
-51
plugins/amoeba/serialization/tests/CMakeLists.txt
plugins/amoeba/serialization/tests/CMakeLists.txt
+1
-0
plugins/cpupme/CMakeLists.txt
plugins/cpupme/CMakeLists.txt
+1
-1
plugins/cpupme/tests/CMakeLists.txt
plugins/cpupme/tests/CMakeLists.txt
+1
-1
plugins/drude/CMakeLists.txt
plugins/drude/CMakeLists.txt
+2
-2
plugins/drude/platforms/cuda/CMakeLists.txt
plugins/drude/platforms/cuda/CMakeLists.txt
+4
-2
No files found.
platforms/reference/src/SimTKReference/ReferenceBrownianDynamics.cpp
View file @
588a4c9d
...
@@ -125,7 +125,7 @@ RealOpenMM ReferenceBrownianDynamics::getFriction( void ) const {
...
@@ -125,7 +125,7 @@ RealOpenMM ReferenceBrownianDynamics::getFriction( void ) const {
void
ReferenceBrownianDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceBrownianDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
)
{
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -162,7 +162,7 @@ void ReferenceBrownianDynamics::update(const OpenMM::System& system, vector<Real
...
@@ -162,7 +162,7 @@ void ReferenceBrownianDynamics::update(const OpenMM::System& system, vector<Real
}
}
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
if
(
referenceConstraintAlgorithm
)
if
(
referenceConstraintAlgorithm
)
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
);
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
,
tolerance
);
// Update the positions and velocities.
// Update the positions and velocities.
...
...
platforms/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
View file @
588a4c9d
...
@@ -48,14 +48,12 @@ ReferenceCCMAAlgorithm::ReferenceCCMAAlgorithm(int numberOfAtoms,
...
@@ -48,14 +48,12 @@ ReferenceCCMAAlgorithm::ReferenceCCMAAlgorithm(int numberOfAtoms,
const
vector
<
pair
<
int
,
int
>
>&
atomIndices
,
const
vector
<
pair
<
int
,
int
>
>&
atomIndices
,
const
vector
<
RealOpenMM
>&
distance
,
const
vector
<
RealOpenMM
>&
distance
,
vector
<
RealOpenMM
>&
masses
,
vector
<
RealOpenMM
>&
masses
,
vector
<
AngleInfo
>&
angles
,
vector
<
AngleInfo
>&
angles
)
{
RealOpenMM
tolerance
)
{
_numberOfConstraints
=
numberOfConstraints
;
_numberOfConstraints
=
numberOfConstraints
;
_atomIndices
=
atomIndices
;
_atomIndices
=
atomIndices
;
_distance
=
distance
;
_distance
=
distance
;
_maximumNumberOfIterations
=
150
;
_maximumNumberOfIterations
=
150
;
_tolerance
=
tolerance
;
_hasInitializedMasses
=
false
;
_hasInitializedMasses
=
false
;
// work arrays
// work arrays
...
@@ -201,28 +199,20 @@ void ReferenceCCMAAlgorithm::setMaximumNumberOfIterations(int maximumNumberOfIte
...
@@ -201,28 +199,20 @@ void ReferenceCCMAAlgorithm::setMaximumNumberOfIterations(int maximumNumberOfIte
_maximumNumberOfIterations
=
maximumNumberOfIterations
;
_maximumNumberOfIterations
=
maximumNumberOfIterations
;
}
}
RealOpenMM
ReferenceCCMAAlgorithm
::
getTolerance
()
const
{
return
_tolerance
;
}
void
ReferenceCCMAAlgorithm
::
setTolerance
(
RealOpenMM
tolerance
)
{
_tolerance
=
tolerance
;
}
void
ReferenceCCMAAlgorithm
::
apply
(
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceCCMAAlgorithm
::
apply
(
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
atomCoordinatesP
,
vector
<
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
)
{
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
applyConstraints
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
false
);
applyConstraints
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
false
,
tolerance
);
}
}
void
ReferenceCCMAAlgorithm
::
applyToVelocities
(
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
void
ReferenceCCMAAlgorithm
::
applyToVelocities
(
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
RealVec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
)
{
std
::
vector
<
OpenMM
::
RealVec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
applyConstraints
(
atomCoordinates
,
velocities
,
inverseMasses
,
true
);
applyConstraints
(
atomCoordinates
,
velocities
,
inverseMasses
,
true
,
tolerance
);
}
}
void
ReferenceCCMAAlgorithm
::
applyConstraints
(
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceCCMAAlgorithm
::
applyConstraints
(
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
atomCoordinatesP
,
vector
<
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
,
bool
constrainingVelocities
)
{
vector
<
RealOpenMM
>&
inverseMasses
,
bool
constrainingVelocities
,
RealOpenMM
tolerance
)
{
// temp arrays
// temp arrays
vector
<
RealVec
>&
r_ij
=
_r_ij
;
vector
<
RealVec
>&
r_ij
=
_r_ij
;
...
@@ -242,15 +232,14 @@ void ReferenceCCMAAlgorithm::applyConstraints(vector<RealVec>& atomCoordinates,
...
@@ -242,15 +232,14 @@ void ReferenceCCMAAlgorithm::applyConstraints(vector<RealVec>& atomCoordinates,
// setup: r_ij for each (i,j) constraint
// setup: r_ij for each (i,j) constraint
RealOpenMM
tolerance
=
getTolerance
()
*
2
;
for
(
int
ii
=
0
;
ii
<
_numberOfConstraints
;
ii
++
)
{
for
(
int
ii
=
0
;
ii
<
_numberOfConstraints
;
ii
++
)
{
int
atomI
=
_atomIndices
[
ii
].
first
;
int
atomI
=
_atomIndices
[
ii
].
first
;
int
atomJ
=
_atomIndices
[
ii
].
second
;
int
atomJ
=
_atomIndices
[
ii
].
second
;
r_ij
[
ii
]
=
atomCoordinates
[
atomI
]
-
atomCoordinates
[
atomJ
];
r_ij
[
ii
]
=
atomCoordinates
[
atomI
]
-
atomCoordinates
[
atomJ
];
d_ij2
[
ii
]
=
r_ij
[
ii
].
dot
(
r_ij
[
ii
]);
d_ij2
[
ii
]
=
r_ij
[
ii
].
dot
(
r_ij
[
ii
]);
}
}
RealOpenMM
lowerTol
=
1
-
2
*
getT
olerance
()
+
getT
olerance
()
*
getT
olerance
()
;
RealOpenMM
lowerTol
=
1
-
2
*
t
olerance
+
t
olerance
*
t
olerance
;
RealOpenMM
upperTol
=
1
+
2
*
getT
olerance
()
+
getT
olerance
()
*
getT
olerance
()
;
RealOpenMM
upperTol
=
1
+
2
*
t
olerance
+
t
olerance
*
t
olerance
;
// main loop
// main loop
...
@@ -267,7 +256,7 @@ void ReferenceCCMAAlgorithm::applyConstraints(vector<RealVec>& atomCoordinates,
...
@@ -267,7 +256,7 @@ void ReferenceCCMAAlgorithm::applyConstraints(vector<RealVec>& atomCoordinates,
if
(
constrainingVelocities
)
{
if
(
constrainingVelocities
)
{
RealOpenMM
rrpr
=
rp_ij
.
dot
(
r_ij
[
ii
]);
RealOpenMM
rrpr
=
rp_ij
.
dot
(
r_ij
[
ii
]);
constraintDelta
[
ii
]
=
-
2
*
reducedMasses
[
ii
]
*
rrpr
/
d_ij2
[
ii
];
constraintDelta
[
ii
]
=
-
2
*
reducedMasses
[
ii
]
*
rrpr
/
d_ij2
[
ii
];
if
(
fabs
(
constraintDelta
[
ii
])
<=
getT
olerance
()
)
if
(
fabs
(
constraintDelta
[
ii
])
<=
t
olerance
)
numberConverged
++
;
numberConverged
++
;
}
}
else
{
else
{
...
...
platforms/reference/src/SimTKReference/ReferenceConstraints.cpp
View file @
588a4c9d
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "ReferenceConstraints.h"
#include "ReferenceConstraints.h"
#include "ReferenceCCMAAlgorithm.h"
#include "ReferenceSETTLEAlgorithm.h"
#include "openmm/HarmonicAngleForce.h"
#include "openmm/HarmonicAngleForce.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include <map>
#include <map>
...
@@ -39,8 +41,7 @@
...
@@ -39,8 +41,7 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
using
namespace
std
;
using
namespace
std
;
ReferenceConstraints
::
ReferenceConstraints
(
const
System
&
system
,
RealOpenMM
tolerance
)
:
ccma
(
NULL
),
settle
(
NULL
)
{
ReferenceConstraints
::
ReferenceConstraints
(
const
System
&
system
)
:
ccma
(
NULL
),
settle
(
NULL
)
{
this
->
tolerance
=
tolerance
;
int
numParticles
=
system
.
getNumParticles
();
int
numParticles
=
system
.
getNumParticles
();
vector
<
RealOpenMM
>
masses
(
numParticles
);
vector
<
RealOpenMM
>
masses
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
...
@@ -141,7 +142,7 @@ ReferenceConstraints::ReferenceConstraints(const System& system, RealOpenMM tole
...
@@ -141,7 +142,7 @@ ReferenceConstraints::ReferenceConstraints(const System& system, RealOpenMM tole
isSettleAtom
[
p2
]
=
true
;
isSettleAtom
[
p2
]
=
true
;
isSettleAtom
[
p3
]
=
true
;
isSettleAtom
[
p3
]
=
true
;
}
}
settle
=
new
ReferenceSETTLEAlgorithm
(
atom1
,
atom2
,
atom3
,
distance1
,
distance2
,
masses
,
tolerance
);
settle
=
new
ReferenceSETTLEAlgorithm
(
atom1
,
atom2
,
atom3
,
distance1
,
distance2
,
masses
);
}
}
// All other constraints are handled with CCMA.
// All other constraints are handled with CCMA.
...
@@ -179,7 +180,7 @@ ReferenceConstraints::ReferenceConstraints(const System& system, RealOpenMM tole
...
@@ -179,7 +180,7 @@ ReferenceConstraints::ReferenceConstraints(const System& system, RealOpenMM tole
// Create the CCMA object.
// Create the CCMA object.
ccma
=
new
ReferenceCCMAAlgorithm
(
numParticles
,
numCCMA
,
ccmaIndices
,
ccmaDistance
,
masses
,
angles
,
tolerance
);
ccma
=
new
ReferenceCCMAAlgorithm
(
numParticles
,
numCCMA
,
ccmaIndices
,
ccmaDistance
,
masses
,
angles
);
}
}
}
}
...
@@ -190,28 +191,16 @@ ReferenceConstraints::~ReferenceConstraints() {
...
@@ -190,28 +191,16 @@ ReferenceConstraints::~ReferenceConstraints() {
delete
settle
;
delete
settle
;
}
}
RealOpenMM
ReferenceConstraints
::
getTolerance
()
const
{
void
ReferenceConstraints
::
apply
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
return
tolerance
;
}
void
ReferenceConstraints
::
setTolerance
(
RealOpenMM
tolerance
)
{
this
->
tolerance
=
tolerance
;
if
(
ccma
!=
NULL
)
ccma
->
setTolerance
(
tolerance
);
if
(
settle
!=
NULL
)
settle
->
setTolerance
(
tolerance
);
}
void
ReferenceConstraints
::
apply
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
)
{
if
(
ccma
!=
NULL
)
if
(
ccma
!=
NULL
)
ccma
->
apply
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
);
ccma
->
apply
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
tolerance
);
if
(
settle
!=
NULL
)
if
(
settle
!=
NULL
)
settle
->
apply
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
);
settle
->
apply
(
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
tolerance
);
}
}
void
ReferenceConstraints
::
applyToVelocities
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
)
{
void
ReferenceConstraints
::
applyToVelocities
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
if
(
ccma
!=
NULL
)
if
(
ccma
!=
NULL
)
ccma
->
applyToVelocities
(
atomCoordinates
,
velocities
,
inverseMasses
);
ccma
->
applyToVelocities
(
atomCoordinates
,
velocities
,
inverseMasses
,
tolerance
);
if
(
settle
!=
NULL
)
if
(
settle
!=
NULL
)
settle
->
applyToVelocities
(
atomCoordinates
,
velocities
,
inverseMasses
);
settle
->
applyToVelocities
(
atomCoordinates
,
velocities
,
inverseMasses
,
tolerance
);
}
}
platforms/reference/src/SimTKReference/ReferenceCustomDynamics.cpp
View file @
588a4c9d
...
@@ -97,7 +97,7 @@ ReferenceCustomDynamics::~ReferenceCustomDynamics() {
...
@@ -97,7 +97,7 @@ ReferenceCustomDynamics::~ReferenceCustomDynamics() {
void
ReferenceCustomDynamics
::
update
(
ContextImpl
&
context
,
int
numberOfAtoms
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceCustomDynamics
::
update
(
ContextImpl
&
context
,
int
numberOfAtoms
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
map
<
string
,
RealOpenMM
>&
globals
,
vector
<
vector
<
RealVec
>
>&
perDof
,
bool
&
forcesAreValid
){
map
<
string
,
RealOpenMM
>&
globals
,
vector
<
vector
<
RealVec
>
>&
perDof
,
bool
&
forcesAreValid
,
RealOpenMM
tolerance
){
int
numSteps
=
stepType
.
size
();
int
numSteps
=
stepType
.
size
();
globals
.
insert
(
context
.
getParameters
().
begin
(),
context
.
getParameters
().
end
());
globals
.
insert
(
context
.
getParameters
().
begin
(),
context
.
getParameters
().
end
());
oldPos
=
atomCoordinates
;
oldPos
=
atomCoordinates
;
...
@@ -252,12 +252,12 @@ void ReferenceCustomDynamics::update(ContextImpl& context, int numberOfAtoms, ve
...
@@ -252,12 +252,12 @@ void ReferenceCustomDynamics::update(ContextImpl& context, int numberOfAtoms, ve
break
;
break
;
}
}
case
CustomIntegrator
::
ConstrainPositions
:
{
case
CustomIntegrator
::
ConstrainPositions
:
{
getReferenceConstraintAlgorithm
()
->
apply
(
oldPos
,
atomCoordinates
,
inverseMasses
);
getReferenceConstraintAlgorithm
()
->
apply
(
oldPos
,
atomCoordinates
,
inverseMasses
,
tolerance
);
oldPos
=
atomCoordinates
;
oldPos
=
atomCoordinates
;
break
;
break
;
}
}
case
CustomIntegrator
::
ConstrainVelocities
:
{
case
CustomIntegrator
::
ConstrainVelocities
:
{
getReferenceConstraintAlgorithm
()
->
applyToVelocities
(
oldPos
,
velocities
,
inverseMasses
);
getReferenceConstraintAlgorithm
()
->
applyToVelocities
(
oldPos
,
velocities
,
inverseMasses
,
tolerance
);
break
;
break
;
}
}
case
CustomIntegrator
::
UpdateContextState
:
{
case
CustomIntegrator
::
UpdateContextState
:
{
...
...
platforms/reference/src/SimTKReference/ReferenceDynamics.cpp
View file @
588a4c9d
...
@@ -249,11 +249,12 @@ void ReferenceDynamics::setReferenceConstraintAlgorithm( ReferenceConstraintAlgo
...
@@ -249,11 +249,12 @@ void ReferenceDynamics::setReferenceConstraintAlgorithm( ReferenceConstraintAlgo
@param velocities velocities
@param velocities velocities
@param forces forces
@param forces forces
@param masses atom masses
@param masses atom masses
@param tolerance the constraint tolerance
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ReferenceDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
)
{
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
...
platforms/reference/src/SimTKReference/ReferenceSETTLEAlgorithm.cpp
View file @
588a4c9d
...
@@ -35,19 +35,23 @@ using namespace OpenMM;
...
@@ -35,19 +35,23 @@ using namespace OpenMM;
using
namespace
std
;
using
namespace
std
;
ReferenceSETTLEAlgorithm
::
ReferenceSETTLEAlgorithm
(
const
vector
<
int
>&
atom1
,
const
vector
<
int
>&
atom2
,
const
vector
<
int
>&
atom3
,
ReferenceSETTLEAlgorithm
::
ReferenceSETTLEAlgorithm
(
const
vector
<
int
>&
atom1
,
const
vector
<
int
>&
atom2
,
const
vector
<
int
>&
atom3
,
const
vector
<
RealOpenMM
>&
distance1
,
const
vector
<
RealOpenMM
>&
distance2
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
)
:
const
vector
<
RealOpenMM
>&
distance1
,
const
vector
<
RealOpenMM
>&
distance2
,
vector
<
RealOpenMM
>&
masses
)
:
atom1
(
atom1
),
atom2
(
atom2
),
atom3
(
atom3
),
distance1
(
distance1
),
distance2
(
distance2
),
masses
(
masses
)
,
tolerance
(
tolerance
)
{
atom1
(
atom1
),
atom2
(
atom2
),
atom3
(
atom3
),
distance1
(
distance1
),
distance2
(
distance2
),
masses
(
masses
)
{
}
}
RealOpenMM
ReferenceSETTLEAlgorithm
::
get
Tolerance
()
const
{
int
ReferenceSETTLEAlgorithm
::
get
NumClusters
()
const
{
return
to
lerance
;
return
a
to
m1
.
size
()
;
}
}
void
ReferenceSETTLEAlgorithm
::
setTolerance
(
RealOpenMM
tolerance
)
{
void
ReferenceSETTLEAlgorithm
::
getClusterParameters
(
int
index
,
int
&
atom1
,
int
&
atom2
,
int
&
atom3
,
RealOpenMM
&
distance1
,
RealOpenMM
&
distance2
)
const
{
this
->
tolerance
=
tolerance
;
atom1
=
this
->
atom1
[
index
];
atom2
=
this
->
atom2
[
index
];
atom3
=
this
->
atom3
[
index
];
distance1
=
this
->
distance1
[
index
];
distance2
=
this
->
distance2
[
index
];
}
}
void
ReferenceSETTLEAlgorithm
::
apply
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
)
{
void
ReferenceSETTLEAlgorithm
::
apply
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
for
(
int
index
=
0
;
index
<
(
int
)
atom1
.
size
();
++
index
)
{
for
(
int
index
=
0
;
index
<
(
int
)
atom1
.
size
();
++
index
)
{
RealVec
apos0
=
atomCoordinates
[
atom1
[
index
]];
RealVec
apos0
=
atomCoordinates
[
atom1
[
index
]];
RealVec
xp0
=
atomCoordinatesP
[
atom1
[
index
]]
-
apos0
;
RealVec
xp0
=
atomCoordinatesP
[
atom1
[
index
]]
-
apos0
;
...
@@ -190,7 +194,7 @@ void ReferenceSETTLEAlgorithm::apply(vector<OpenMM::RealVec>& atomCoordinates, v
...
@@ -190,7 +194,7 @@ void ReferenceSETTLEAlgorithm::apply(vector<OpenMM::RealVec>& atomCoordinates, v
}
}
}
}
void
ReferenceSETTLEAlgorithm
::
applyToVelocities
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
)
{
void
ReferenceSETTLEAlgorithm
::
applyToVelocities
(
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
vector
<
OpenMM
::
RealVec
>&
velocities
,
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
{
for
(
int
index
=
0
;
index
<
(
int
)
atom1
.
size
();
++
index
)
{
for
(
int
index
=
0
;
index
<
(
int
)
atom1
.
size
();
++
index
)
{
RealVec
apos0
=
atomCoordinates
[
atom1
[
index
]];
RealVec
apos0
=
atomCoordinates
[
atom1
[
index
]];
RealVec
apos1
=
atomCoordinates
[
atom2
[
index
]];
RealVec
apos1
=
atomCoordinates
[
atom2
[
index
]];
...
...
platforms/reference/src/SimTKReference/ReferenceStochasticDynamics.cpp
View file @
588a4c9d
...
@@ -200,7 +200,7 @@ void ReferenceStochasticDynamics::updatePart2( int numberOfAtoms, vector<RealVec
...
@@ -200,7 +200,7 @@ void ReferenceStochasticDynamics::updatePart2( int numberOfAtoms, vector<RealVec
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ReferenceStochasticDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceStochasticDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
)
{
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -235,7 +235,7 @@ void ReferenceStochasticDynamics::update(const OpenMM::System& system, vector<Re
...
@@ -235,7 +235,7 @@ void ReferenceStochasticDynamics::update(const OpenMM::System& system, vector<Re
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
if
(
referenceConstraintAlgorithm
)
if
(
referenceConstraintAlgorithm
)
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
);
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
,
tolerance
);
// copy xPrime -> atomCoordinates
// copy xPrime -> atomCoordinates
...
...
platforms/reference/src/SimTKReference/ReferenceVariableStochasticDynamics.cpp
View file @
588a4c9d
...
@@ -260,7 +260,7 @@ void ReferenceVariableStochasticDynamics::updatePart2( int numberOfAtoms, vector
...
@@ -260,7 +260,7 @@ void ReferenceVariableStochasticDynamics::updatePart2( int numberOfAtoms, vector
void
ReferenceVariableStochasticDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceVariableStochasticDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
maxStepSize
)
{
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
maxStepSize
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -279,7 +279,7 @@ void ReferenceVariableStochasticDynamics::update(const OpenMM::System& system, v
...
@@ -279,7 +279,7 @@ void ReferenceVariableStochasticDynamics::update(const OpenMM::System& system, v
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
if
(
referenceConstraintAlgorithm
)
if
(
referenceConstraintAlgorithm
)
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
);
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
,
tolerance
);
// copy xPrime -> atomCoordinates
// copy xPrime -> atomCoordinates
...
...
platforms/reference/src/SimTKReference/ReferenceVariableVerletDynamics.cpp
View file @
588a4c9d
...
@@ -104,7 +104,7 @@ void ReferenceVariableVerletDynamics::setAccuracy( RealOpenMM accuracy ) {
...
@@ -104,7 +104,7 @@ void ReferenceVariableVerletDynamics::setAccuracy( RealOpenMM accuracy ) {
void
ReferenceVariableVerletDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceVariableVerletDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
maxStepSize
)
{
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
maxStepSize
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -155,7 +155,7 @@ void ReferenceVariableVerletDynamics::update(const OpenMM::System& system, vecto
...
@@ -155,7 +155,7 @@ void ReferenceVariableVerletDynamics::update(const OpenMM::System& system, vecto
}
}
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
if
(
referenceConstraintAlgorithm
)
if
(
referenceConstraintAlgorithm
)
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
);
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
,
tolerance
);
// Update the positions and velocities.
// Update the positions and velocities.
...
...
platforms/reference/src/SimTKReference/ReferenceVerletDynamics.cpp
View file @
588a4c9d
...
@@ -95,7 +95,7 @@ ReferenceVerletDynamics::~ReferenceVerletDynamics( ){
...
@@ -95,7 +95,7 @@ ReferenceVerletDynamics::~ReferenceVerletDynamics( ){
void
ReferenceVerletDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
void
ReferenceVerletDynamics
::
update
(
const
OpenMM
::
System
&
system
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
velocities
,
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
)
{
vector
<
RealVec
>&
forces
,
vector
<
RealOpenMM
>&
masses
,
RealOpenMM
tolerance
)
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -131,7 +131,7 @@ void ReferenceVerletDynamics::update(const OpenMM::System& system, vector<RealVe
...
@@ -131,7 +131,7 @@ void ReferenceVerletDynamics::update(const OpenMM::System& system, vector<RealVe
}
}
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
ReferenceConstraintAlgorithm
*
referenceConstraintAlgorithm
=
getReferenceConstraintAlgorithm
();
if
(
referenceConstraintAlgorithm
)
if
(
referenceConstraintAlgorithm
)
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
);
referenceConstraintAlgorithm
->
apply
(
atomCoordinates
,
xPrime
,
inverseMasses
,
tolerance
);
// Update the positions and velocities.
// Update the positions and velocities.
...
...
platforms/reference/tests/CMakeLists.txt
View file @
588a4c9d
...
@@ -12,6 +12,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
...
@@ -12,6 +12,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# All tests use shared libraries
# All tests use shared libraries
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
...
...
plugins/amoeba/CMakeLists.txt
View file @
588a4c9d
...
@@ -99,14 +99,14 @@ ENDIF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
...
@@ -99,14 +99,14 @@ ENDIF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
ADD_LIBRARY
(
${
SHARED_AMOEBA_TARGET
}
SHARED
${
SOURCE_AMOEBA_FILES
}
${
SOURCE_AMOEBA_INCLUDE_FILES
}
${
API_AMOEBA_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
SHARED_AMOEBA_TARGET
}
SHARED
${
SOURCE_AMOEBA_FILES
}
${
SOURCE_AMOEBA_INCLUDE_FILES
}
${
API_AMOEBA_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_AMOEBA_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_AMOEBA_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_AMOEBA_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_AMOEBA_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
FILE
(
GLOB serialization_files
${
CMAKE_CUURENT_SOURCE_DIR
}
/serialization/src/*.cpp
)
FILE
(
GLOB serialization_files
${
CMAKE_CUURENT_SOURCE_DIR
}
/serialization/src/*.cpp
)
SET_SOURCE_FILES_PROPERTIES
(
${
serialization_files
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_AMOEBA_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL"
)
SET_SOURCE_FILES_PROPERTIES
(
${
serialization_files
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_AMOEBA_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL"
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
ADD_LIBRARY
(
${
STATIC_AMOEBA_TARGET
}
STATIC
${
SOURCE_AMOEBA_FILES
}
${
SOURCE_AMOEBA_INCLUDE_FILES
}
${
API_AMOEBA_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
STATIC_AMOEBA_TARGET
}
STATIC
${
SOURCE_AMOEBA_FILES
}
${
SOURCE_AMOEBA_INCLUDE_FILES
}
${
API_AMOEBA_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
STATIC_AMOEBA_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
STATIC_AMOEBA_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY"
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
IF
(
OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS
)
IF
(
OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS
)
...
...
plugins/amoeba/platforms/cuda/CMakeLists.txt
View file @
588a4c9d
...
@@ -109,9 +109,11 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
...
@@ -109,9 +109,11 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
CUDA_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
CUDA_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
CUDA_d optimized
${
OPENMM_LIBRARY_NAME
}
CUDA
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
CUDA_d optimized
${
OPENMM_LIBRARY_NAME
}
CUDA
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_AMOEBA_TARGET
}
optimized
${
SHARED_AMOEBA_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_AMOEBA_TARGET
}
optimized
${
SHARED_AMOEBA_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_BUILDING_SHARED_LIBRARY"
)
IF
(
APPLE
)
IF
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"-F/Library/Frameworks -framework CUDA"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-F/Library/Frameworks -framework CUDA"
)
ELSE
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ENDIF
(
APPLE
)
ENDIF
(
APPLE
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
...
...
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
View file @
588a4c9d
...
@@ -15,7 +15,9 @@ FOREACH(TEST_PROG ${TEST_PROGS})
...
@@ -15,7 +15,9 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_AMOEBA_TARGET
}
${
SHARED_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_AMOEBA_TARGET
}
${
SHARED_TARGET
}
)
IF
(
APPLE
)
IF
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"-F/Library/Frameworks -framework CUDA"
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-F/Library/Frameworks -framework CUDA"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ELSE
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ENDIF
(
APPLE
)
ENDIF
(
APPLE
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
IF
(
OPENMM_BUILD_CUDA_DOUBLE_PRECISION_TESTS
)
IF
(
OPENMM_BUILD_CUDA_DOUBLE_PRECISION_TESTS
)
...
...
plugins/amoeba/platforms/reference/tests/CMakeLists.txt
View file @
588a4c9d
...
@@ -2,33 +2,16 @@
...
@@ -2,33 +2,16 @@
# Testing
# Testing
#
#
ENABLE_TESTING
()
ENABLE_TESTING
()
#INCLUDE_DIRECTORIES(${CUDA_INCLUDE})
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/include
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/include
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/openmmapi/include/openmm
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/openmmapi/include/openmm
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/src
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/src
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/src/kernels
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/reference/src/kernels
)
#SET(SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET "AmoebaTinkerParameterFile" )
#SET(AMOEBA_TINKER_PARAMETER_FILE_SOURCE_FILES "AmoebaTinkerParameterFile.cpp" )
#SET(AMOEBA_TINKER_PARAMETER_FILE_INCLUDE_FILES "AmoebaTinkerParameterFile.h" )
Set
(
SHARED_OPENMM__AMOEBA_TARGET OpenMMAmoeba
)
Set
(
SHARED_OPENMM__AMOEBA_TARGET OpenMMAmoeba
)
Set
(
STATIC_OPENMM_TARGET OpenMMAmoeba_static
)
Set
(
STATIC_OPENMM_TARGET OpenMMAmoeba_static
)
Set
(
SHARED_CUDA_TARGET OpenMMAmoebaCuda
)
Set
(
STATIC_CUDA_TARGET OpenMMCuda_static OpenMMAmoebaCuda_static
)
#ADD_LIBRARY(${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET} SHARED ${AMOEBA_TINKER_PARAMETER_FILE_SOURCE_FILES} ${AMOEBA_TINKER_PARAMETER_FILE_INCLUDE_FILES} )
#SET_TARGET_PROPERTIES(${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET} PROPERTIES COMPILE_FLAGS "-DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_VALIDATE_BUILDING_SHARED_LIBRARY")
#TARGET_LINK_LIBRARIES(${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET} debug ${OPENMM_LIBRARY_NAME}_d optimized ${OPENMM_LIBRARY_NAME})
#TARGET_LINK_LIBRARIES(${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET} debug ${SHARED_OPENMM__AMOEBA_TARGET}_d optimized ${SHARED_OPENMM__AMOEBA_TARGET})
#TARGET_LINK_LIBRARIES(${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET} debug ${SHARED_CUDA_TARGET}_d optimized ${SHARED_CUDA_TARGET})
IF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
IF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
SET
(
SHARED_CUDA_TARGET
${
SHARED_CUDA_TARGET
}
_d
)
SET
(
SHARED_OPENMM__AMOEBA_TARGET
${
SHARED_OPENMM__AMOEBA_TARGET
}
_d
)
SET
(
SHARED_OPENMM__AMOEBA_TARGET
${
SHARED_OPENMM__AMOEBA_TARGET
}
_d
)
#SET(STATIC_CUDA_TARGET ${STATIC_CUDA_TARGET}_d)
#Set(STATIC_OPENMM_TARGET ${STATIC_OPENMM_TARGET}_d)
ENDIF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
ENDIF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
#LINK_DIRECTORIES
#LINK_DIRECTORIES
...
@@ -41,41 +24,8 @@ FOREACH(TEST_PROG ${TEST_PROGS})
...
@@ -41,41 +24,8 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# Link with shared library
# Link with shared library
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
#TARGET_LINK_LIBRARIES(${TEST_ROOT} ${SHARED_TARGET} ${SHARED_OPENMM_TARGET} ${SHARED_CUDA_TARGET} ${SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET})
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM__AMOEBA_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM__AMOEBA_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
# Link with static library
# SET(TEST_STATIC ${TEST_ROOT}Static)
# CUDA_ADD_EXECUTABLE(${TEST_STATIC} ${TEST_PROG})
# SET_TARGET_PROPERTIES(${TEST_STATIC}
# PROPERTIES
# COMPILE_FLAGS "-DOPENMM_USE_STATIC_LIBRARIES"
# )
# TARGET_LINK_LIBRARIES(${TEST_STATIC} ${STATIC_TARGET} ${STATIC_OPENMM_TARGET} ${STATIC_CUDA_TARGET})
# ADD_TEST(${TEST_STATIC} ${EXECUTABLE_OUTPUT_PATH}/${TEST_STATIC})
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
# TestCudaUsingParameterFile customized w/ command-line argument (input file name used in test)
#ADD_EXECUTABLE(TestAmoebaCudaUsingParameterFile TstAmoebaCudaUsingParameterFile.cpp)
#TARGET_LINK_LIBRARIES(TestAmoebaCudaUsingParameterFile ${SHARED_TARGET} ${SHARED_OPENMM_TARGET} ${SHARED_CUDA_TARGET})
#ADD_TEST(TestCudaUsingParameterFile "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFile" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/lambdaSdObcParameters.txt")
#ADD_TEST(TestCudaUsingParameterFile "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFile" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfNoPbcParameters.txt")
#
#SET(TEST_ROOT TestCudaUsingParameterFile)
#SET(TEST_PROG TstCudaUsingParameterFile.cpp)
#SET(TEST_STATIC ${TEST_ROOT}Static)
#SET(INCLUDE_CUDA_STATIC 1)
#IF(INCLUDE_CUDA_STATIC)
# ADD_EXECUTABLE(${TEST_STATIC} ${TEST_PROG})
# SET_TARGET_PROPERTIES(${TEST_STATIC}
# PROPERTIES
# COMPILE_FLAGS "-DOPENMM_USE_STATIC_LIBRARIES"
# )
# TARGET_LINK_LIBRARIES(${TEST_STATIC} ${STATIC_TARGET} ${STATIC_BROOK_TARGET})
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/lambdaSdObcParameters.txt")
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfNoPbcParameters.txt")
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfPbcParameters.txt" " +checkEnergyForceConsistent -checkForces" )
#ENDIF(INCLUDE_CUDA_STATIC)
plugins/amoeba/serialization/tests/CMakeLists.txt
View file @
588a4c9d
...
@@ -12,6 +12,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
...
@@ -12,6 +12,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# All tests use shared libraries
# All tests use shared libraries
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
OPENMM_AMOEBA_LIBRARY_NAME
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
OPENMM_AMOEBA_LIBRARY_NAME
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
plugins/cpupme/CMakeLists.txt
View file @
588a4c9d
...
@@ -85,7 +85,7 @@ TARGET_LINK_LIBRARIES(${SHARED_TARGET} ${MAIN_OPENMM_LIB} ${PTHREADS_LIB} ${FFTW
...
@@ -85,7 +85,7 @@ TARGET_LINK_LIBRARIES(${SHARED_TARGET} ${MAIN_OPENMM_LIB} ${PTHREADS_LIB} ${FFTW
IF
(
FFTW_THREADS_LIBRARY
)
IF
(
FFTW_THREADS_LIBRARY
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
FFTW_THREADS_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
FFTW_THREADS_LIBRARY
}
)
ENDIF
(
FFTW_THREADS_LIBRARY
)
ENDIF
(
FFTW_THREADS_LIBRARY
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_PME_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_PME_BUILDING_SHARED_LIBRARY"
)
INSTALL_TARGETS
(
/lib/plugins RUNTIME_DIRECTORY /lib/plugins
${
SHARED_TARGET
}
)
INSTALL_TARGETS
(
/lib/plugins RUNTIME_DIRECTORY /lib/plugins
${
SHARED_TARGET
}
)
...
...
plugins/cpupme/tests/CMakeLists.txt
View file @
588a4c9d
...
@@ -6,7 +6,6 @@ ENABLE_TESTING()
...
@@ -6,7 +6,6 @@ ENABLE_TESTING()
SET
(
SHARED_OPENMM_PME_TARGET OpenMMPME
)
SET
(
SHARED_OPENMM_PME_TARGET OpenMMPME
)
IF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
IF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
SET
(
SHARED_CUDA_TARGET
${
SHARED_CUDA_TARGET
}
_d
)
SET
(
SHARED_OPENMM_PME_TARGET
${
SHARED_OPENMM_PME_TARGET
}
_d
)
SET
(
SHARED_OPENMM_PME_TARGET
${
SHARED_OPENMM_PME_TARGET
}
_d
)
ENDIF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
ENDIF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
...
@@ -21,5 +20,6 @@ FOREACH(TEST_PROG ${TEST_PROGS})
...
@@ -21,5 +20,6 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM_PME_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM_PME_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
plugins/drude/CMakeLists.txt
View file @
588a4c9d
...
@@ -87,14 +87,14 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/S
...
@@ -87,14 +87,14 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/S
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
ADD_LIBRARY
(
${
SHARED_DRUDE_TARGET
}
SHARED
${
SOURCE_DRUDE_FILES
}
${
SOURCE_DRUDE_INCLUDE_FILES
}
${
API_DRUDE_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
SHARED_DRUDE_TARGET
}
SHARED
${
SOURCE_DRUDE_FILES
}
${
SOURCE_DRUDE_INCLUDE_FILES
}
${
API_DRUDE_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_DRUDE_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_DRUDE_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_DRUDE_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_DRUDE_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
FILE
(
GLOB serialization_files
${
CMAKE_CUURENT_SOURCE_DIR
}
/serialization/src/*.cpp
)
FILE
(
GLOB serialization_files
${
CMAKE_CUURENT_SOURCE_DIR
}
/serialization/src/*.cpp
)
SET_SOURCE_FILES_PROPERTIES
(
${
serialization_files
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_DRUDE_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL"
)
SET_SOURCE_FILES_PROPERTIES
(
${
serialization_files
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_DRUDE_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL"
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
ADD_LIBRARY
(
${
STATIC_DRUDE_TARGET
}
STATIC
${
SOURCE_DRUDE_FILES
}
${
SOURCE_DRUDE_INCLUDE_FILES
}
${
API_DRUDE_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
STATIC_DRUDE_TARGET
}
STATIC
${
SOURCE_DRUDE_FILES
}
${
SOURCE_DRUDE_INCLUDE_FILES
}
${
API_DRUDE_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
STATIC_DRUDE_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
STATIC_DRUDE_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY"
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
ENDIF
(
OPENMM_BUILD_STATIC_LIB
)
#IF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
#IF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
...
...
plugins/drude/platforms/cuda/CMakeLists.txt
View file @
588a4c9d
...
@@ -109,9 +109,11 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
...
@@ -109,9 +109,11 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
CUDA_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
CUDA_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
CUDA_d optimized
${
OPENMM_LIBRARY_NAME
}
CUDA
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
CUDA_d optimized
${
OPENMM_LIBRARY_NAME
}
CUDA
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_DRUDE_TARGET
}
optimized
${
SHARED_DRUDE_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_DRUDE_TARGET
}
optimized
${
SHARED_DRUDE_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_BUILDING_SHARED_LIBRARY"
)
IF
(
APPLE
)
IF
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"-F/Library/Frameworks -framework CUDA"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-F/Library/Frameworks -framework CUDA"
)
ELSE
(
APPLE
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ENDIF
(
APPLE
)
ENDIF
(
APPLE
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
...
...
Prev
1
2
3
4
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