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
bf9898e6
Commit
bf9898e6
authored
Oct 20, 2008
by
Peter Eastman
Browse files
Working on making the GBSA test cases pass
parent
a138663d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
platforms/cuda/CMakeLists.txt
platforms/cuda/CMakeLists.txt
+2
-2
platforms/cuda/tests/TestCudaGBSAOBCForceField.cpp
platforms/cuda/tests/TestCudaGBSAOBCForceField.cpp
+11
-5
platforms/reference/tests/TestReferenceGBSAOBCForceField.cpp
platforms/reference/tests/TestReferenceGBSAOBCForceField.cpp
+1
-1
No files found.
platforms/cuda/CMakeLists.txt
View file @
bf9898e6
...
...
@@ -102,7 +102,7 @@ ENDFOREACH(subdir)
CUDA_INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
CUDA_ADD_LIBRARY
(
${
SHARED_TARGET
}
SHARED
${
SOURCE_FILES
}
${
SOURCE_INCLUDE_FILES
}
${
API_ABS_INCLUDE_FILES
}
)
CUDA_ADD_LIBRARY
(
${
STATIC_TARGET
}
STATIC
${
SOURCE_FILES
}
${
SOURCE_INCLUDE_FILES
}
${
API_ABS_INCLUDE_FILES
}
)
#
CUDA_ADD_LIBRARY(${STATIC_TARGET} STATIC ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
TARGET_LINK_LIBRARIES
(
${
SHARED_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
_d optimized
${
OPENMM_LIBRARY_NAME
}
)
TARGET_LINK_LIBRARIES
(
${
STATIC_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
_static_d optimized
${
OPENMM_LIBRARY_NAME
}
_static
)
#
TARGET_LINK_LIBRARIES(${STATIC_TARGET} debug ${OPENMM_LIBRARY_NAME}_static_d optimized ${OPENMM_LIBRARY_NAME}_static)
platforms/cuda/tests/TestCudaGBSAOBCForceField.cpp
View file @
bf9898e6
...
...
@@ -56,15 +56,17 @@ void testSingleAtom() {
system
.
setAtomMass
(
0
,
2.0
);
LangevinIntegrator
integrator
(
0
,
0.1
,
0.01
);
GBSAOBCForceField
*
forceField
=
new
GBSAOBCForceField
(
1
);
StandardMMForceField
*
standard
=
new
StandardMMForceField
(
1
,
0
,
0
,
0
,
0
,
0
);
forceField
->
setAtomParameters
(
0
,
0.5
,
0.15
,
1
);
standard
->
setAtomParameters
(
0
,
0.5
,
1
,
0
);
system
.
addForce
(
forceField
);
system
.
addForce
(
new
S
tandard
MMForceField
(
1
,
0
,
0
,
0
,
0
,
0
)
);
system
.
addForce
(
s
tandard
);
OpenMMContext
context
(
system
,
integrator
,
platform
);
vector
<
Vec3
>
positions
(
1
);
positions
[
0
]
=
Vec3
(
0
,
0
,
0
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Energy
);
double
bornRadius
=
0.15
-
0.09
;
// dielectric offset
double
bornRadius
=
0.15
-
0.
0
09
;
// dielectric offset
double
eps0
=
EPSILON0
;
double
bornEnergy
=
(
-
0.5
*
0.5
/
(
8
*
PI_M
*
eps0
))
*
(
1.0
/
forceField
->
getSoluteDielectric
()
-
1.0
/
forceField
->
getSolventDielectric
())
/
bornRadius
;
double
extendedRadius
=
bornRadius
+
0.14
;
// probe radius
...
...
@@ -78,10 +80,14 @@ void testForce() {
System
system
(
numAtoms
,
0
);
LangevinIntegrator
integrator
(
0
,
0.1
,
0.01
);
GBSAOBCForceField
*
forceField
=
new
GBSAOBCForceField
(
numAtoms
);
for
(
int
i
=
0
;
i
<
numAtoms
;
++
i
)
forceField
->
setAtomParameters
(
i
,
i
%
2
==
0
?
-
1
:
1
,
0.15
,
1
);
StandardMMForceField
*
standard
=
new
StandardMMForceField
(
numAtoms
,
0
,
0
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
numAtoms
;
++
i
)
{
double
charge
=
i
%
2
==
0
?
-
1
:
1
;
forceField
->
setAtomParameters
(
i
,
charge
,
0.15
,
1
);
standard
->
setAtomParameters
(
i
,
charge
,
1
,
0
);
}
system
.
addForce
(
forceField
);
system
.
addForce
(
new
S
tandard
MMForceField
(
numAtoms
,
0
,
0
,
0
,
0
,
0
)
);
system
.
addForce
(
s
tandard
);
OpenMMContext
context
(
system
,
integrator
,
platform
);
// Set random positions for all the atoms.
...
...
platforms/reference/tests/TestReferenceGBSAOBCForceField.cpp
View file @
bf9898e6
...
...
@@ -62,7 +62,7 @@ void testSingleAtom() {
positions
[
0
]
=
Vec3
(
0
,
0
,
0
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Energy
);
double
bornRadius
=
0.15
-
0.09
;
// dielectric offset
double
bornRadius
=
0.15
-
0.
0
09
;
// dielectric offset
double
eps0
=
EPSILON0
;
double
bornEnergy
=
(
-
0.5
*
0.5
/
(
8
*
PI_M
*
eps0
))
*
(
1.0
/
forceField
->
getSoluteDielectric
()
-
1.0
/
forceField
->
getSolventDielectric
())
/
bornRadius
;
double
extendedRadius
=
bornRadius
+
0.14
;
// probe radius
...
...
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