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
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
17 changed files
with
47 additions
and
67 deletions
+47
-67
plugins/drude/platforms/cuda/tests/CMakeLists.txt
plugins/drude/platforms/cuda/tests/CMakeLists.txt
+3
-1
plugins/drude/platforms/opencl/CMakeLists.txt
plugins/drude/platforms/opencl/CMakeLists.txt
+1
-1
plugins/drude/platforms/opencl/tests/CMakeLists.txt
plugins/drude/platforms/opencl/tests/CMakeLists.txt
+1
-0
plugins/drude/platforms/reference/src/ReferenceDrudeKernels.cpp
...s/drude/platforms/reference/src/ReferenceDrudeKernels.cpp
+11
-49
plugins/drude/platforms/reference/src/ReferenceDrudeKernels.h
...ins/drude/platforms/reference/src/ReferenceDrudeKernels.h
+2
-4
plugins/drude/platforms/reference/tests/CMakeLists.txt
plugins/drude/platforms/reference/tests/CMakeLists.txt
+1
-0
plugins/drude/serialization/tests/CMakeLists.txt
plugins/drude/serialization/tests/CMakeLists.txt
+2
-1
plugins/rpmd/CMakeLists.txt
plugins/rpmd/CMakeLists.txt
+2
-2
plugins/rpmd/platforms/cuda/CMakeLists.txt
plugins/rpmd/platforms/cuda/CMakeLists.txt
+4
-2
plugins/rpmd/platforms/cuda/tests/CMakeLists.txt
plugins/rpmd/platforms/cuda/tests/CMakeLists.txt
+3
-1
plugins/rpmd/platforms/opencl/CMakeLists.txt
plugins/rpmd/platforms/opencl/CMakeLists.txt
+1
-1
plugins/rpmd/platforms/opencl/tests/CMakeLists.txt
plugins/rpmd/platforms/opencl/tests/CMakeLists.txt
+1
-0
plugins/rpmd/platforms/reference/tests/CMakeLists.txt
plugins/rpmd/platforms/reference/tests/CMakeLists.txt
+1
-0
serialization/tests/CMakeLists.txt
serialization/tests/CMakeLists.txt
+1
-0
tests/CMakeLists.txt
tests/CMakeLists.txt
+1
-0
wrappers/python/setup.py
wrappers/python/setup.py
+2
-5
wrappers/python/simtk/unit/basedimension.py
wrappers/python/simtk/unit/basedimension.py
+10
-0
No files found.
plugins/drude/platforms/cuda/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -15,7 +15,9 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_DRUDE_TARGET
}
${
SHARED_TARGET
}
)
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
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
IF
(
OPENMM_BUILD_CUDA_DOUBLE_PRECISION_TESTS
)
...
...
plugins/drude/platforms/opencl/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -109,7 +109,7 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
OPENCL_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
OpenCL_d optimized
${
OPENMM_LIBRARY_NAME
}
OpenCL
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_DRUDE_TARGET
}
optimized
${
SHARED_DRUDE_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-msse2 -DOPENMM_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-msse2 -DOPENMM_BUILDING_SHARED_LIBRARY"
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
# Ensure that links to the main OpenCL library will be resolved.
...
...
plugins/drude/platforms/opencl/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -14,6 +14,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# Link with shared library
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_DRUDE_TARGET
}
${
SHARED_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
IF
(
OPENMM_BUILD_OPENCL_DOUBLE_PRECISION_TESTS
)
ADD_TEST
(
${
TEST_ROOT
}
Mixed
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
mixed
)
...
...
plugins/drude/platforms/reference/src/ReferenceDrudeKernels.cpp
View file @
588a4c9d
...
...
@@ -56,7 +56,12 @@ static vector<RealVec>& extractForces(ContextImpl& context) {
return
*
((
vector
<
RealVec
>*
)
data
->
forces
);
}
static
double
computeShiftedKineticEnergy
(
ContextImpl
&
context
,
vector
<
double
>&
inverseMasses
,
double
timeShift
,
ReferenceConstraintAlgorithm
*
constraints
)
{
static
ReferenceConstraints
&
extractConstraints
(
ContextImpl
&
context
)
{
ReferencePlatform
::
PlatformData
*
data
=
reinterpret_cast
<
ReferencePlatform
::
PlatformData
*>
(
context
.
getPlatformData
());
return
*
(
ReferenceConstraints
*
)
data
->
constraints
;
}
static
double
computeShiftedKineticEnergy
(
ContextImpl
&
context
,
vector
<
double
>&
inverseMasses
,
double
timeShift
)
{
const
System
&
system
=
context
.
getSystem
();
int
numParticles
=
system
.
getNumParticles
();
vector
<
RealVec
>&
posData
=
extractPositions
(
context
);
...
...
@@ -75,10 +80,7 @@ static double computeShiftedKineticEnergy(ContextImpl& context, vector<double>&
// Apply constraints to them.
if
(
constraints
!=
NULL
)
{
constraints
->
setTolerance
(
1e-4
);
constraints
->
applyToVelocities
(
posData
,
shiftedVel
,
inverseMasses
);
}
extractConstraints
(
context
).
applyToVelocities
(
posData
,
shiftedVel
,
inverseMasses
,
1e-4
);
// Compute the kinetic energy.
...
...
@@ -224,8 +226,6 @@ void ReferenceCalcDrudeForceKernel::copyParametersToContext(ContextImpl& context
}
ReferenceIntegrateDrudeLangevinStepKernel
::~
ReferenceIntegrateDrudeLangevinStepKernel
()
{
if
(
constraints
!=
NULL
)
delete
constraints
;
}
void
ReferenceIntegrateDrudeLangevinStepKernel
::
initialize
(
const
System
&
system
,
const
DrudeLangevinIntegrator
&
integrator
,
const
DrudeForce
&
force
)
{
...
...
@@ -254,23 +254,6 @@ void ReferenceIntegrateDrudeLangevinStepKernel::initialize(const System& system,
pairInvReducedMass
.
push_back
((
m1
+
m2
)
/
(
m1
*
m2
));
}
normalParticles
.
insert
(
normalParticles
.
begin
(),
particles
.
begin
(),
particles
.
end
());
// Prepare constraints.
if
(
system
.
getNumConstraints
()
>
0
)
{
vector
<
pair
<
int
,
int
>
>
constraintIndices
;
vector
<
RealOpenMM
>
constraintDistances
;
for
(
int
i
=
0
;
i
<
system
.
getNumConstraints
();
++
i
)
{
int
particle1
,
particle2
;
double
distance
;
system
.
getConstraintParameters
(
i
,
particle1
,
particle2
,
distance
);
if
(
system
.
getParticleMass
(
particle1
)
!=
0
||
system
.
getParticleMass
(
particle2
)
!=
0
)
{
constraintIndices
.
push_back
(
make_pair
(
particle1
,
particle2
));
constraintDistances
.
push_back
(
distance
);
}
}
constraints
=
new
ReferenceConstraints
(
system
,
(
RealOpenMM
)
integrator
.
getConstraintTolerance
());
}
}
void
ReferenceIntegrateDrudeLangevinStepKernel
::
execute
(
ContextImpl
&
context
,
const
DrudeLangevinIntegrator
&
integrator
)
{
...
...
@@ -330,8 +313,7 @@ void ReferenceIntegrateDrudeLangevinStepKernel::execute(ContextImpl& context, co
// Apply constraints.
if
(
constraints
!=
NULL
)
constraints
->
apply
(
pos
,
xPrime
,
particleInvMass
);
extractConstraints
(
context
).
apply
(
pos
,
xPrime
,
particleInvMass
,
integrator
.
getConstraintTolerance
());
// Record the constrained positions and velocities.
...
...
@@ -348,12 +330,10 @@ void ReferenceIntegrateDrudeLangevinStepKernel::execute(ContextImpl& context, co
}
double
ReferenceIntegrateDrudeLangevinStepKernel
::
computeKineticEnergy
(
ContextImpl
&
context
,
const
DrudeLangevinIntegrator
&
integrator
)
{
return
computeShiftedKineticEnergy
(
context
,
particleInvMass
,
0.5
*
integrator
.
getStepSize
()
,
constraints
);
return
computeShiftedKineticEnergy
(
context
,
particleInvMass
,
0.5
*
integrator
.
getStepSize
());
}
ReferenceIntegrateDrudeSCFStepKernel
::~
ReferenceIntegrateDrudeSCFStepKernel
()
{
if
(
constraints
!=
NULL
)
delete
constraints
;
if
(
minimizerPos
!=
NULL
)
lbfgs_free
(
minimizerPos
);
}
...
...
@@ -377,23 +357,6 @@ void ReferenceIntegrateDrudeSCFStepKernel::initialize(const System& system, cons
particleInvMass
.
push_back
(
mass
==
0.0
?
0.0
:
1.0
/
mass
);
}
// Prepare constraints.
if
(
system
.
getNumConstraints
()
>
0
)
{
vector
<
pair
<
int
,
int
>
>
constraintIndices
;
vector
<
RealOpenMM
>
constraintDistances
;
for
(
int
i
=
0
;
i
<
system
.
getNumConstraints
();
++
i
)
{
int
particle1
,
particle2
;
double
distance
;
system
.
getConstraintParameters
(
i
,
particle1
,
particle2
,
distance
);
if
(
system
.
getParticleMass
(
particle1
)
!=
0
||
system
.
getParticleMass
(
particle2
)
!=
0
)
{
constraintIndices
.
push_back
(
make_pair
(
particle1
,
particle2
));
constraintDistances
.
push_back
(
distance
);
}
}
constraints
=
new
ReferenceConstraints
(
system
,
(
RealOpenMM
)
integrator
.
getConstraintTolerance
());
}
// Initialize the energy minimizer.
minimizerPos
=
lbfgs_malloc
(
drudeParticles
.
size
()
*
3
);
...
...
@@ -424,8 +387,7 @@ void ReferenceIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const D
// Apply constraints.
if
(
constraints
!=
NULL
)
constraints
->
apply
(
pos
,
xPrime
,
particleInvMass
);
extractConstraints
(
context
).
apply
(
pos
,
xPrime
,
particleInvMass
,
integrator
.
getConstraintTolerance
());
// Record the constrained positions and velocities.
...
...
@@ -446,7 +408,7 @@ void ReferenceIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const D
}
double
ReferenceIntegrateDrudeSCFStepKernel
::
computeKineticEnergy
(
ContextImpl
&
context
,
const
DrudeSCFIntegrator
&
integrator
)
{
return
computeShiftedKineticEnergy
(
context
,
particleInvMass
,
0.5
*
integrator
.
getStepSize
()
,
constraints
);
return
computeShiftedKineticEnergy
(
context
,
particleInvMass
,
0.5
*
integrator
.
getStepSize
());
}
struct
MinimizerData
{
...
...
plugins/drude/platforms/reference/src/ReferenceDrudeKernels.h
View file @
588a4c9d
...
...
@@ -86,7 +86,7 @@ private:
class
ReferenceIntegrateDrudeLangevinStepKernel
:
public
IntegrateDrudeLangevinStepKernel
{
public:
ReferenceIntegrateDrudeLangevinStepKernel
(
std
::
string
name
,
const
Platform
&
platform
,
ReferencePlatform
::
PlatformData
&
data
)
:
IntegrateDrudeLangevinStepKernel
(
name
,
platform
),
data
(
data
)
,
constraints
(
NULL
)
{
IntegrateDrudeLangevinStepKernel
(
name
,
platform
),
data
(
data
)
{
}
~
ReferenceIntegrateDrudeLangevinStepKernel
();
/**
...
...
@@ -118,7 +118,6 @@ private:
std
::
vector
<
double
>
particleInvMass
;
std
::
vector
<
double
>
pairInvTotalMass
;
std
::
vector
<
double
>
pairInvReducedMass
;
ReferenceConstraintAlgorithm
*
constraints
;
};
/**
...
...
@@ -127,7 +126,7 @@ private:
class
ReferenceIntegrateDrudeSCFStepKernel
:
public
IntegrateDrudeSCFStepKernel
{
public:
ReferenceIntegrateDrudeSCFStepKernel
(
std
::
string
name
,
const
Platform
&
platform
,
ReferencePlatform
::
PlatformData
&
data
)
:
IntegrateDrudeSCFStepKernel
(
name
,
platform
),
data
(
data
),
constraints
(
NULL
),
minimizerPos
(
NULL
)
{
IntegrateDrudeSCFStepKernel
(
name
,
platform
),
data
(
data
),
minimizerPos
(
NULL
)
{
}
~
ReferenceIntegrateDrudeSCFStepKernel
();
/**
...
...
@@ -157,7 +156,6 @@ private:
ReferencePlatform
::
PlatformData
&
data
;
std
::
vector
<
int
>
drudeParticles
;
std
::
vector
<
double
>
particleInvMass
;
ReferenceConstraintAlgorithm
*
constraints
;
lbfgsfloatval_t
*
minimizerPos
;
lbfgs_parameter_t
minimizerParams
;
};
...
...
plugins/drude/platforms/reference/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -26,5 +26,6 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM_DRUDE_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
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
plugins/drude/serialization/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -11,7 +11,8 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# All tests use shared libraries
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
OPENMM_SERIALIZATION_LIBRARY_NAME
}
${
OPENMM_DRUDE_SERIALIZATION_LIBRARY_NAME
}
${
OPENMM_DRUDE_LIBRARY_NAME
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
OPENMM_DRUDE_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
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
plugins/rpmd/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -97,7 +97,7 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/S
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
ADD_LIBRARY
(
${
SHARED_RPMD_TARGET
}
SHARED
${
SOURCE_RPMD_FILES
}
${
SOURCE_RPMD_INCLUDE_FILES
}
${
API_RPMD_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_RPMD_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_RPMD_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_RPMD_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_RPMD_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
#IF( CREATE_SERIALIZABLE_OPENMM_RPMD )
# ADD_LIBRARY(${SHARED_RPMD_SERIALIZABLE_TARGET} SHARED ${SOURCE_RPMD_FILES} ${SOURCE_RPMD_INCLUDE_FILES} ${API_RPMD_ABS_INCLUDE_FILES})
...
...
@@ -107,7 +107,7 @@ SET_TARGET_PROPERTIES(${SHARED_RPMD_TARGET} PROPERTIES COMPILE_FLAGS "-DOPENMM_R
IF
(
OPENMM_BUILD_STATIC_LIB
)
ADD_LIBRARY
(
${
STATIC_RPMD_TARGET
}
STATIC
${
SOURCE_RPMD_FILES
}
${
SOURCE_RPMD_INCLUDE_FILES
}
${
API_RPMD_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
STATIC_RPMD_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-DOPENMM_USE_STATIC_LIBRARIES -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_USE_STATIC_LIBRARIES -DLEPTON_BUILDING_STATIC_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
STATIC_RPMD_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
)
#IF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
...
...
plugins/rpmd/platforms/cuda/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -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
}
debug
${
OPENMM_LIBRARY_NAME
}
CUDA_d optimized
${
OPENMM_LIBRARY_NAME
}
CUDA
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_RPMD_TARGET
}
optimized
${
SHARED_RPMD_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
)
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
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
...
...
plugins/rpmd/platforms/cuda/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -15,7 +15,9 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_RPMD_TARGET
}
${
SHARED_TARGET
}
)
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
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
IF
(
OPENMM_BUILD_CUDA_DOUBLE_PRECISION_TESTS
)
...
...
plugins/rpmd/platforms/opencl/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -108,7 +108,7 @@ ENDIF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
${
MAIN_OPENMM_LIB
}
${
OPENCL_LIBRARIES
}
${
PTHREADS_LIB
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
OpenCL_d optimized
${
OPENMM_LIBRARY_NAME
}
OpenCL
)
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
SHARED_RPMD_TARGET
}
optimized
${
SHARED_RPMD_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
COMPILE_FLAGS
"
-msse2 -DOPENMM_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES
LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-msse2 -DOPENMM_BUILDING_SHARED_LIBRARY"
)
INSTALL
(
TARGETS
${
SHARED_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/plugins
)
# Ensure that links to the main OpenCL library will be resolved.
...
...
plugins/rpmd/platforms/opencl/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -14,6 +14,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# Link with shared library
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_RPMD_TARGET
}
${
SHARED_TARGET
}
)
SET_TARGET_PROPERTIES
(
${
TEST_ROOT
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
"
)
ADD_TEST
(
${
TEST_ROOT
}
Single
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
single
)
IF
(
OPENMM_BUILD_OPENCL_DOUBLE_PRECISION_TESTS
)
ADD_TEST
(
${
TEST_ROOT
}
Mixed
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
mixed
)
...
...
plugins/rpmd/platforms/reference/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -26,5 +26,6 @@ FOREACH(TEST_PROG ${TEST_PROGS})
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_OPENMM_RPMD_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
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
serialization/tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -12,6 +12,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# All tests use shared libraries
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
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
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
tests/CMakeLists.txt
View file @
588a4c9d
...
...
@@ -11,6 +11,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# All tests use shared library only
ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
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
}
)
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
wrappers/python/setup.py
View file @
588a4c9d
...
...
@@ -195,11 +195,8 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
extra_compile_args
.
append
(
'/EHsc'
)
else
:
if
platform
.
system
()
==
'Darwin'
:
macVersion
=
[
int
(
x
)
for
x
in
platform
.
mac_ver
()[
0
].
split
(
'.'
)]
if
tuple
(
macVersion
)
<
(
10
,
6
):
os
.
environ
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
'10.5'
extra_link_args
.
append
(
'-Wl,-rpath,'
+
openmm_lib_path
)
extra_compile_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
]
extra_link_args
+=
[
'-stdlib=libc++'
,
'-mmacosx-version-min=10.7'
,
'-Wl'
,
'-rpath'
,
openmm_lib_path
]
library_dirs
=
[
openmm_lib_path
]
include_dirs
=
openmm_include_path
.
split
(
';'
)
...
...
wrappers/python/simtk/unit/basedimension.py
View file @
588a4c9d
...
...
@@ -90,6 +90,16 @@ class BaseDimension(object):
def
__repr__
(
self
):
return
'BaseDimension("%s")'
%
self
.
name
def
__eq__
(
self
,
other
):
if
isinstance
(
other
,
BaseDimension
):
return
self
.
_index
==
other
.
_index
return
False
def
__ne__
(
self
,
other
):
if
isinstance
(
other
,
BaseDimension
):
return
self
.
_index
!=
other
.
_index
return
False
# run module directly for testing
if
__name__
==
'__main__'
:
...
...
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