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
36762962
"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "5824286df3628c4cd001a25d0d96e58c66022cfc"
Commit
36762962
authored
Nov 23, 2011
by
Mark Friedrichs
Browse files
Edits to remove some VC9 warnings
parent
d5a7dd89
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
41 additions
and
33 deletions
+41
-33
plugins/amoeba/serialization/tests/TestSerializeAmoebaGeneralizedKirkwoodForce.cpp
...ion/tests/TestSerializeAmoebaGeneralizedKirkwoodForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicAngleForce.cpp
...alization/tests/TestSerializeAmoebaHarmonicAngleForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicBondForce.cpp
...ialization/tests/TestSerializeAmoebaHarmonicBondForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicInPlaneAngleForce.cpp
...on/tests/TestSerializeAmoebaHarmonicInPlaneAngleForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaMultipoleForce.cpp
...serialization/tests/TestSerializeAmoebaMultipoleForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaOutOfPlaneBendForce.cpp
...lization/tests/TestSerializeAmoebaOutOfPlaneBendForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaPiTorsionForce.cpp
...serialization/tests/TestSerializeAmoebaPiTorsionForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaStretchBendForce.cpp
...rialization/tests/TestSerializeAmoebaStretchBendForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaTorsionForce.cpp
...a/serialization/tests/TestSerializeAmoebaTorsionForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaTorsionTorsionForce.cpp
...lization/tests/TestSerializeAmoebaTorsionTorsionForce.cpp
+4
-4
plugins/amoeba/serialization/tests/TestSerializeAmoebaUreyBradleyForce.cpp
...rialization/tests/TestSerializeAmoebaUreyBradleyForce.cpp
+1
-1
plugins/amoeba/serialization/tests/TestSerializeAmoebaVdwForce.cpp
...moeba/serialization/tests/TestSerializeAmoebaVdwForce.cpp
+2
-2
plugins/amoeba/serialization/tests/TestSerializeAmoebaWcaDispersionForce.cpp
...alization/tests/TestSerializeAmoebaWcaDispersionForce.cpp
+1
-1
plugins/freeEnergy/platforms/cuda/src/CudaFreeEnergyKernels.cpp
...s/freeEnergy/platforms/cuda/src/CudaFreeEnergyKernels.cpp
+2
-2
plugins/freeEnergy/platforms/cuda/src/kernels/freeEnergyCudaGpu.cpp
...eeEnergy/platforms/cuda/src/kernels/freeEnergyCudaGpu.cpp
+12
-3
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
...eeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
+1
-1
plugins/freeEnergy/platforms/reference/tests/TestReferenceSoftcoreForce.h
...gy/platforms/reference/tests/TestReferenceSoftcoreForce.h
+9
-10
No files found.
plugins/amoeba/serialization/tests/TestSerializeAmoebaGeneralizedKirkwoodForce.cpp
View file @
36762962
...
@@ -77,7 +77,7 @@ void testSerialization() {
...
@@ -77,7 +77,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getIncludeCavityTerm
(),
force2
.
getIncludeCavityTerm
());
ASSERT_EQUAL
(
force1
.
getIncludeCavityTerm
(),
force2
.
getIncludeCavityTerm
());
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumParticles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumParticles
()
)
;
ii
++
)
{
double
radius1
,
charge1
,
scaleFactor1
;
double
radius1
,
charge1
,
scaleFactor1
;
double
radius2
,
charge2
,
scaleFactor2
;
double
radius2
,
charge2
,
scaleFactor2
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicAngleForce.cpp
View file @
36762962
...
@@ -64,7 +64,7 @@ void testSerialization() {
...
@@ -64,7 +64,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicAnglePentic
(),
force2
.
getAmoebaGlobalHarmonicAnglePentic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicAnglePentic
(),
force2
.
getAmoebaGlobalHarmonicAnglePentic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicAngleSextic
(),
force2
.
getAmoebaGlobalHarmonicAngleSextic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicAngleSextic
(),
force2
.
getAmoebaGlobalHarmonicAngleSextic
());
ASSERT_EQUAL
(
force1
.
getNumAngles
(),
force2
.
getNumAngles
());
ASSERT_EQUAL
(
force1
.
getNumAngles
(),
force2
.
getNumAngles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumAngles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumAngles
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
b1
,
b2
,
b3
;
int
a1
,
a2
,
a3
,
b1
,
b2
,
b3
;
double
da
,
db
,
ka
,
kb
;
double
da
,
db
,
ka
,
kb
;
force1
.
getAngleParameters
(
ii
,
a1
,
a2
,
a3
,
da
,
ka
);
force1
.
getAngleParameters
(
ii
,
a1
,
a2
,
a3
,
da
,
ka
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicBondForce.cpp
View file @
36762962
...
@@ -60,7 +60,7 @@ void testSerialization() {
...
@@ -60,7 +60,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicBondCubic
(),
force2
.
getAmoebaGlobalHarmonicBondCubic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicBondCubic
(),
force2
.
getAmoebaGlobalHarmonicBondCubic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicBondQuartic
(),
force2
.
getAmoebaGlobalHarmonicBondQuartic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicBondQuartic
(),
force2
.
getAmoebaGlobalHarmonicBondQuartic
());
ASSERT_EQUAL
(
force1
.
getNumBonds
(),
force2
.
getNumBonds
());
ASSERT_EQUAL
(
force1
.
getNumBonds
(),
force2
.
getNumBonds
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumBonds
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumBonds
()
)
;
ii
++
)
{
int
a1
,
a2
,
b1
,
b2
;
int
a1
,
a2
,
b1
,
b2
;
double
da
,
db
,
ka
,
kb
;
double
da
,
db
,
ka
,
kb
;
force1
.
getBondParameters
(
ii
,
a1
,
a2
,
da
,
ka
);
force1
.
getBondParameters
(
ii
,
a1
,
a2
,
da
,
ka
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaHarmonicInPlaneAngleForce.cpp
View file @
36762962
...
@@ -68,7 +68,7 @@ void testSerialization() {
...
@@ -68,7 +68,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicInPlaneAngleSextic
(),
force2
.
getAmoebaGlobalHarmonicInPlaneAngleSextic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalHarmonicInPlaneAngleSextic
(),
force2
.
getAmoebaGlobalHarmonicInPlaneAngleSextic
());
ASSERT_EQUAL
(
force1
.
getNumAngles
(),
force2
.
getNumAngles
());
ASSERT_EQUAL
(
force1
.
getNumAngles
(),
force2
.
getNumAngles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumAngles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumAngles
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
double
da
,
db
,
ka
,
kb
;
double
da
,
db
,
ka
,
kb
;
force1
.
getAngleParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
da
,
ka
);
force1
.
getAngleParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
da
,
ka
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaMultipoleForce.cpp
View file @
36762962
...
@@ -130,7 +130,7 @@ void testSerialization() {
...
@@ -130,7 +130,7 @@ void testSerialization() {
}
}
ASSERT_EQUAL
(
force1
.
getNumMultipoles
(),
force2
.
getNumMultipoles
());
ASSERT_EQUAL
(
force1
.
getNumMultipoles
(),
force2
.
getNumMultipoles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumMultipoles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumMultipoles
()
)
;
ii
++
)
{
int
axisType1
,
multipoleAtomZ1
,
multipoleAtomX1
,
multipoleAtomY1
;
int
axisType1
,
multipoleAtomZ1
,
multipoleAtomX1
,
multipoleAtomY1
;
int
axisType2
,
multipoleAtomZ2
,
multipoleAtomX2
,
multipoleAtomY2
;
int
axisType2
,
multipoleAtomZ2
,
multipoleAtomX2
,
multipoleAtomY2
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaOutOfPlaneBendForce.cpp
View file @
36762962
...
@@ -68,7 +68,7 @@ void testSerialization() {
...
@@ -68,7 +68,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalOutOfPlaneBendSextic
(),
force2
.
getAmoebaGlobalOutOfPlaneBendSextic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalOutOfPlaneBendSextic
(),
force2
.
getAmoebaGlobalOutOfPlaneBendSextic
());
ASSERT_EQUAL
(
force1
.
getNumOutOfPlaneBends
(),
force2
.
getNumOutOfPlaneBends
());
ASSERT_EQUAL
(
force1
.
getNumOutOfPlaneBends
(),
force2
.
getNumOutOfPlaneBends
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumOutOfPlaneBends
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumOutOfPlaneBends
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
double
ka
,
kb
;
double
ka
,
kb
;
force1
.
getOutOfPlaneBendParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
ka
);
force1
.
getOutOfPlaneBendParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
ka
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaPiTorsionForce.cpp
View file @
36762962
...
@@ -56,7 +56,7 @@ void testSerialization() {
...
@@ -56,7 +56,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical.
// Compare the two forces to see if they are identical.
AmoebaPiTorsionForce
&
force2
=
*
copy
;
AmoebaPiTorsionForce
&
force2
=
*
copy
;
ASSERT_EQUAL
(
force1
.
getNumPiTorsions
(),
force2
.
getNumPiTorsions
());
ASSERT_EQUAL
(
force1
.
getNumPiTorsions
(),
force2
.
getNumPiTorsions
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumPiTorsions
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumPiTorsions
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
b1
,
b2
,
b3
,
b4
,
b5
,
b6
;
int
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
b1
,
b2
,
b3
,
b4
,
b5
,
b6
;
double
ka
,
kb
;
double
ka
,
kb
;
force1
.
getPiTorsionParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
ka
);
force1
.
getPiTorsionParameters
(
ii
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
ka
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaStretchBendForce.cpp
View file @
36762962
...
@@ -55,7 +55,7 @@ void testSerialization() {
...
@@ -55,7 +55,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical.
// Compare the two forces to see if they are identical.
AmoebaStretchBendForce
&
force2
=
*
copy
;
AmoebaStretchBendForce
&
force2
=
*
copy
;
ASSERT_EQUAL
(
force1
.
getNumStretchBends
(),
force2
.
getNumStretchBends
());
ASSERT_EQUAL
(
force1
.
getNumStretchBends
(),
force2
.
getNumStretchBends
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumStretchBends
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumStretchBends
()
)
;
ii
++
)
{
int
p11
,
p12
,
p13
;
int
p11
,
p12
,
p13
;
int
p21
,
p22
,
p23
;
int
p21
,
p22
,
p23
;
double
dAB1
,
dAB2
;
double
dAB1
,
dAB2
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaTorsionForce.cpp
View file @
36762962
...
@@ -85,7 +85,7 @@ void testSerialization() {
...
@@ -85,7 +85,7 @@ void testSerialization() {
// Compare the two forces to see if they are identical.
// Compare the two forces to see if they are identical.
AmoebaTorsionForce
&
force2
=
*
copy
;
AmoebaTorsionForce
&
force2
=
*
copy
;
ASSERT_EQUAL
(
force1
.
getNumTorsions
(),
force2
.
getNumTorsions
());
ASSERT_EQUAL
(
force1
.
getNumTorsions
(),
force2
.
getNumTorsions
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumTorsions
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumTorsions
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
int
a1
,
a2
,
a3
,
a4
,
b1
,
b2
,
b3
,
b4
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaTorsionTorsionForce.cpp
View file @
36762962
...
@@ -64,9 +64,9 @@ static void compareGrids( const std::vector< std::vector< std::vector<double> >
...
@@ -64,9 +64,9 @@ static void compareGrids( const std::vector< std::vector< std::vector<double> >
ASSERT_EQUAL
(
grid1
.
size
(),
grid2
.
size
());
ASSERT_EQUAL
(
grid1
.
size
(),
grid2
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
grid1
.
size
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
grid1
.
size
();
ii
++
)
{
ASSERT_EQUAL
(
grid1
[
ii
].
size
(),
grid2
[
ii
].
size
());
ASSERT_EQUAL
(
grid1
[
ii
].
size
(),
grid2
[
ii
].
size
());
for
(
int
jj
=
0
;
jj
<
grid1
[
ii
].
size
();
jj
++
)
{
for
(
unsigned
int
jj
=
0
;
jj
<
grid1
[
ii
].
size
();
jj
++
)
{
ASSERT_EQUAL
(
grid1
[
ii
][
jj
].
size
(),
grid2
[
ii
][
jj
].
size
());
ASSERT_EQUAL
(
grid1
[
ii
][
jj
].
size
(),
grid2
[
ii
][
jj
].
size
());
for
(
int
kk
=
0
;
kk
<
grid1
[
ii
][
jj
].
size
();
kk
++
)
{
for
(
unsigned
int
kk
=
0
;
kk
<
grid1
[
ii
][
jj
].
size
();
kk
++
)
{
ASSERT_EQUAL
(
grid1
[
ii
][
jj
][
kk
],
grid2
[
ii
][
jj
][
kk
]);
ASSERT_EQUAL
(
grid1
[
ii
][
jj
][
kk
],
grid2
[
ii
][
jj
][
kk
]);
}
}
}
}
...
@@ -105,7 +105,7 @@ void testSerialization() {
...
@@ -105,7 +105,7 @@ void testSerialization() {
AmoebaTorsionTorsionForce
&
force2
=
*
copy
;
AmoebaTorsionTorsionForce
&
force2
=
*
copy
;
ASSERT_EQUAL
(
force1
.
getNumTorsionTorsions
(),
force2
.
getNumTorsionTorsions
());
ASSERT_EQUAL
(
force1
.
getNumTorsionTorsions
(),
force2
.
getNumTorsionTorsions
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumTorsionTorsions
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumTorsionTorsions
()
)
;
ii
++
)
{
int
a1
,
a2
,
a3
,
a4
,
a5
,
aChiral
,
aGridIndex
,
b1
,
b2
,
b3
,
b4
,
b5
,
bChiral
,
bGridIndex
;
int
a1
,
a2
,
a3
,
a4
,
a5
,
aChiral
,
aGridIndex
,
b1
,
b2
,
b3
,
b4
,
b5
,
bChiral
,
bGridIndex
;
...
@@ -122,7 +122,7 @@ void testSerialization() {
...
@@ -122,7 +122,7 @@ void testSerialization() {
}
}
ASSERT_EQUAL
(
force1
.
getNumTorsionTorsionGrids
(),
force2
.
getNumTorsionTorsionGrids
());
ASSERT_EQUAL
(
force1
.
getNumTorsionTorsionGrids
(),
force2
.
getNumTorsionTorsionGrids
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumTorsionTorsionGrids
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumTorsionTorsionGrids
()
)
;
ii
++
)
{
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid1
=
force1
.
getTorsionTorsionGrid
(
ii
);
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid1
=
force1
.
getTorsionTorsionGrid
(
ii
);
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid2
=
force2
.
getTorsionTorsionGrid
(
ii
);
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid2
=
force2
.
getTorsionTorsionGrid
(
ii
);
compareGrids
(
grid1
,
grid2
);
compareGrids
(
grid1
,
grid2
);
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaUreyBradleyForce.cpp
View file @
36762962
...
@@ -60,7 +60,7 @@ void testSerialization() {
...
@@ -60,7 +60,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalUreyBradleyCubic
(),
force2
.
getAmoebaGlobalUreyBradleyCubic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalUreyBradleyCubic
(),
force2
.
getAmoebaGlobalUreyBradleyCubic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalUreyBradleyQuartic
(),
force2
.
getAmoebaGlobalUreyBradleyQuartic
());
ASSERT_EQUAL
(
force1
.
getAmoebaGlobalUreyBradleyQuartic
(),
force2
.
getAmoebaGlobalUreyBradleyQuartic
());
ASSERT_EQUAL
(
force1
.
getNumInteractions
(),
force2
.
getNumInteractions
());
ASSERT_EQUAL
(
force1
.
getNumInteractions
(),
force2
.
getNumInteractions
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumInteractions
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumInteractions
()
)
;
ii
++
)
{
int
a1
,
a2
,
b1
,
b2
;
int
a1
,
a2
,
b1
,
b2
;
double
da
,
db
,
ka
,
kb
;
double
da
,
db
,
ka
,
kb
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaVdwForce.cpp
View file @
36762962
...
@@ -84,7 +84,7 @@ void testSerialization() {
...
@@ -84,7 +84,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumParticles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumParticles
()
)
;
ii
++
)
{
int
ivIndex1
,
classIndex1
;
int
ivIndex1
,
classIndex1
;
int
ivIndex2
,
classIndex2
;
int
ivIndex2
,
classIndex2
;
...
@@ -101,7 +101,7 @@ void testSerialization() {
...
@@ -101,7 +101,7 @@ void testSerialization() {
ASSERT_EQUAL
(
epsilon1
,
epsilon2
);
ASSERT_EQUAL
(
epsilon1
,
epsilon2
);
ASSERT_EQUAL
(
reductionFactor1
,
reductionFactor2
);
ASSERT_EQUAL
(
reductionFactor1
,
reductionFactor2
);
}
}
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumParticles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumParticles
()
)
;
ii
++
)
{
std
::
vector
<
int
>
exclusions1
;
std
::
vector
<
int
>
exclusions1
;
std
::
vector
<
int
>
exclusions2
;
std
::
vector
<
int
>
exclusions2
;
...
...
plugins/amoeba/serialization/tests/TestSerializeAmoebaWcaDispersionForce.cpp
View file @
36762962
...
@@ -83,7 +83,7 @@ void testSerialization() {
...
@@ -83,7 +83,7 @@ void testSerialization() {
ASSERT_EQUAL
(
force1
.
getSlevy
(),
force2
.
getSlevy
());
ASSERT_EQUAL
(
force1
.
getSlevy
(),
force2
.
getSlevy
());
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
ASSERT_EQUAL
(
force1
.
getNumParticles
(),
force2
.
getNumParticles
());
for
(
unsigned
int
ii
=
0
;
ii
<
force1
.
getNumParticles
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force1
.
getNumParticles
()
)
;
ii
++
)
{
double
radius1
,
epsilon1
;
double
radius1
,
epsilon1
;
double
radius2
,
epsilon2
;
double
radius2
,
epsilon2
;
...
...
plugins/freeEnergy/platforms/cuda/src/CudaFreeEnergyKernels.cpp
View file @
36762962
...
@@ -356,8 +356,8 @@ void CudaFreeEnergyCalcNonbondedSoftcoreForceKernel::initialize(const System& sy
...
@@ -356,8 +356,8 @@ void CudaFreeEnergyCalcNonbondedSoftcoreForceKernel::initialize(const System& sy
for
(
int
i
=
0
;
i
<
numExceptions
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numExceptions
;
i
++
)
{
double
charge
,
sig
,
eps
,
softcoreLJLambda
;
double
charge
,
sig
,
eps
,
softcoreLJLambda
;
force
.
getExceptionParameters
(
exceptions
[
i
],
particle1
[
i
],
particle2
[
i
],
charge
,
sig
,
eps
,
softcoreLJLambda
);
force
.
getExceptionParameters
(
exceptions
[
i
],
particle1
[
i
],
particle2
[
i
],
charge
,
sig
,
eps
,
softcoreLJLambda
);
c6
[
i
]
=
static_cast
<
float
>
(
(
4.0
f
*
eps
*
pow
f
(
sig
,
6.0
f
))
);
c6
[
i
]
=
static_cast
<
float
>
(
(
4.0
*
eps
*
pow
(
sig
,
6.0
))
);
c12
[
i
]
=
static_cast
<
float
>
(
(
4.0
f
*
eps
*
pow
f
(
sig
,
12.0
f
))
);
c12
[
i
]
=
static_cast
<
float
>
(
(
4.0
*
eps
*
pow
(
sig
,
12.0
))
);
qProd
[
i
]
=
static_cast
<
float
>
(
charge
);
qProd
[
i
]
=
static_cast
<
float
>
(
charge
);
softcoreLJLambdaArray
[
i
]
=
static_cast
<
float
>
(
softcoreLJLambda
);
softcoreLJLambdaArray
[
i
]
=
static_cast
<
float
>
(
softcoreLJLambda
);
}
}
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/freeEnergyCudaGpu.cpp
View file @
36762962
...
@@ -276,12 +276,17 @@ void freeEnergyGpuSetPeriodicBoxSize( freeEnergyGpuContext freeEnergyGpu, float
...
@@ -276,12 +276,17 @@ void freeEnergyGpuSetPeriodicBoxSize( freeEnergyGpuContext freeEnergyGpu, float
gpuSetPeriodicBoxSize
(
freeEnergyGpu
->
gpuContext
,
xsize
,
ysize
,
zsize
);
gpuSetPeriodicBoxSize
(
freeEnergyGpu
->
gpuContext
,
xsize
,
ysize
,
zsize
);
}
}
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4297)
#endif
extern
"C"
extern
"C"
void
gpuSetNonbondedSoftcoreParameters
(
freeEnergyGpuContext
freeEnergyGpu
,
float
epsfac
,
const
std
::
vector
<
int
>&
atom
,
const
std
::
vector
<
float
>&
c6
,
void
gpuSetNonbondedSoftcoreParameters
(
freeEnergyGpuContext
freeEnergyGpu
,
float
epsfac
,
const
std
::
vector
<
int
>&
atom
,
const
std
::
vector
<
float
>&
c6
,
const
std
::
vector
<
float
>&
c12
,
const
std
::
vector
<
float
>&
q
,
const
std
::
vector
<
float
>&
c12
,
const
std
::
vector
<
float
>&
q
,
const
std
::
vector
<
float
>&
softcoreLJLambdaArray
,
const
std
::
vector
<
char
>&
symbol
,
const
std
::
vector
<
float
>&
softcoreLJLambdaArray
,
const
std
::
vector
<
char
>&
symbol
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
exclusions
,
CudaFreeEnergyNonbondedMethod
method
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
exclusions
,
CudaFreeEnergyNonbondedMethod
method
,
float
cutoffDistance
,
float
solventDielectric
){
float
cutoffDistance
,
float
solventDielectric
)
{
unsigned
int
numberOfParticles
=
c6
.
size
();
unsigned
int
numberOfParticles
=
c6
.
size
();
gpuContext
gpu
=
freeEnergyGpu
->
gpuContext
;
gpuContext
gpu
=
freeEnergyGpu
->
gpuContext
;
...
@@ -301,6 +306,10 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
...
@@ -301,6 +306,10 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
throw
OpenMM
::
OpenMMException
(
msg
.
str
()
);
throw
OpenMM
::
OpenMMException
(
msg
.
str
()
);
}
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
freeEnergyGpu
->
freeEnergySim
.
epsfac
=
epsfac
;
freeEnergyGpu
->
freeEnergySim
.
epsfac
=
epsfac
;
freeEnergyGpu
->
freeEnergySim
.
nonbondedMethod
=
method
;
freeEnergyGpu
->
freeEnergySim
.
nonbondedMethod
=
method
;
...
@@ -349,7 +358,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
...
@@ -349,7 +358,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
// Dummy out extra atom data
// Dummy out extra atom data
for
(
unsigned
int
ii
=
numberOfParticles
;
ii
<
paddedNumberOfAtoms
;
ii
++
){
for
(
int
ii
=
numberOfParticles
;
ii
<
paddedNumberOfAtoms
;
ii
++
){
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
x
=
1.0
f
;
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
x
=
1.0
f
;
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
y
=
0.0
f
;
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
y
=
0.0
f
;
...
@@ -380,7 +389,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
...
@@ -380,7 +389,7 @@ void gpuSetNonbondedSoftcoreParameters( freeEnergyGpuContext freeEnergyGpu, floa
if
(
offset
>
0
){
if
(
offset
>
0
){
if
(
offset
>
numberOfParticles
){
if
(
offset
>
numberOfParticles
){
(
void
)
fprintf
(
freeEnergyGpu
->
log
,
"Dummy padded entries
\n
"
);
(
void
)
fprintf
(
freeEnergyGpu
->
log
,
"Dummy padded entries
\n
"
);
for
(
unsigned
int
ii
=
offset
;
ii
<
paddedNumberOfAtoms
;
ii
++
){
for
(
int
ii
=
offset
;
ii
<
paddedNumberOfAtoms
;
ii
++
){
(
void
)
fprintf
(
freeEnergyGpu
->
log
,
"%6u sig[%14.7e %14.7e] lambda=%10.3f q=%10.3f
\n
"
,
(
void
)
fprintf
(
freeEnergyGpu
->
log
,
"%6u sig[%14.7e %14.7e] lambda=%10.3f q=%10.3f
\n
"
,
ii
,
ii
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
x
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
y
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
z
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
w
);
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
x
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
y
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
z
,
(
*
freeEnergyGpu
->
psSigEps4
)[
ii
].
w
);
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
View file @
36762962
...
@@ -793,7 +793,7 @@ void CpuGBVISoftcore::printGbvi( const std::vector<OpenMM::RealVec>& atomCoordin
...
@@ -793,7 +793,7 @@ void CpuGBVISoftcore::printGbvi( const std::vector<OpenMM::RealVec>& atomCoordin
gbviParameters
->
getBornRadiusScalingSoftcoreMethod
(),
GBVISoftcoreParameters
::
QuinticSpline
);
gbviParameters
->
getBornRadiusScalingSoftcoreMethod
(),
GBVISoftcoreParameters
::
QuinticSpline
);
(
void
)
fprintf
(
log
,
" preFactor %15.7e)
\n
"
,
preFactor
);
(
void
)
fprintf
(
log
,
" preFactor %15.7e)
\n
"
,
preFactor
);
for
(
unsigned
int
atomI
=
0
;
atomI
<
numberOfAtoms
;
atomI
++
){
for
(
unsigned
int
atomI
=
0
;
atomI
<
static_cast
<
unsigned
int
>
(
numberOfAtoms
)
;
atomI
++
){
(
void
)
fprintf
(
log
,
"%6d r=%15.7e rSc=%15.7e swd=%15.7e lmda=%4.2f tau*gam=%15.7e q=%15.7e"
,
atomI
,
(
void
)
fprintf
(
log
,
"%6d r=%15.7e rSc=%15.7e swd=%15.7e lmda=%4.2f tau*gam=%15.7e q=%15.7e"
,
atomI
,
atomicRadii
[
atomI
],
atomicRadii
[
atomI
],
scaledRadii
[
atomI
],
scaledRadii
[
atomI
],
...
...
plugins/freeEnergy/platforms/reference/tests/TestReferenceSoftcoreForce.h
View file @
36762962
...
@@ -419,9 +419,9 @@ int PositionGenerator::setPositions( GenerationMethod method, OpenMM_SFMT::SFMT&
...
@@ -419,9 +419,9 @@ int PositionGenerator::setPositions( GenerationMethod method, OpenMM_SFMT::SFMT&
int
errorFlag
=
0
;
int
errorFlag
=
0
;
positions
.
resize
(
_numParticles
);
positions
.
resize
(
_numParticles
);
if
(
method
==
Random
){
if
(
method
==
Random
){
for
(
unsigned
int
ii
=
0
;
ii
<
_numParticles
;
ii
+=
_numParticlesPerMolecule
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
_numParticles
)
;
ii
+=
_numParticlesPerMolecule
){
positions
[
ii
]
=
Vec3
(
_boxSize
*
genrand_real2
(
sfmt
),
_boxSize
*
genrand_real2
(
sfmt
),
_boxSize
*
genrand_real2
(
sfmt
));
positions
[
ii
]
=
Vec3
(
_boxSize
*
genrand_real2
(
sfmt
),
_boxSize
*
genrand_real2
(
sfmt
),
_boxSize
*
genrand_real2
(
sfmt
));
for
(
unsigned
int
jj
=
1
;
jj
<
_numParticlesPerMolecule
;
jj
++
)
{
for
(
unsigned
int
jj
=
1
;
jj
<
static_cast
<
unsigned
int
>
(
_numParticlesPerMolecule
)
;
jj
++
)
{
positions
[
ii
+
jj
]
=
positions
[
ii
]
+
Vec3
(
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
));
positions
[
ii
+
jj
]
=
positions
[
ii
]
+
Vec3
(
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
));
}
}
}
}
...
@@ -486,7 +486,7 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
...
@@ -486,7 +486,7 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
// place molecule centers on grid
// place molecule centers on grid
for
(
unsigned
int
ii
=
0
;
ii
<
_numParticles
;
ii
+=
_numParticlesPerMolecule
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
_numParticles
)
;
ii
+=
_numParticlesPerMolecule
){
array
[
ii
]
=
Vec3
(
start
);
array
[
ii
]
=
Vec3
(
start
);
bool
done
=
false
;
bool
done
=
false
;
for
(
unsigned
int
jj
=
0
;
jj
<
3
&&
!
done
;
jj
++
){
for
(
unsigned
int
jj
=
0
;
jj
<
3
&&
!
done
;
jj
++
){
...
@@ -507,9 +507,9 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
...
@@ -507,9 +507,9 @@ int PositionGenerator::setParticlesOnGrid( const Vec3& origin, const Vec3& boxDi
// add molecule atoms
// add molecule atoms
Vec3
bondOffset
(
0.05
,
0.05
,
0.05
);
Vec3
bondOffset
(
0.05
,
0.05
,
0.05
);
for
(
unsigned
int
ii
=
0
;
ii
<
_numMolecules
;
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
_numMolecules
)
;
ii
++
){
int
molecularIndex
=
ii
*
_numParticlesPerMolecule
;
int
molecularIndex
=
ii
*
_numParticlesPerMolecule
;
for
(
unsigned
int
jj
=
1
;
jj
<
_numParticlesPerMolecule
;
jj
++
){
for
(
unsigned
int
jj
=
1
;
jj
<
static_cast
<
unsigned
int
>
(
_numParticlesPerMolecule
)
;
jj
++
){
array
[
molecularIndex
+
jj
]
=
array
[
molecularIndex
]
+
bondOffset
+
Vec3
(
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
));
array
[
molecularIndex
+
jj
]
=
array
[
molecularIndex
]
+
bondOffset
+
Vec3
(
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
),
_bondDistance
*
genrand_real2
(
sfmt
));
}
}
}
}
...
@@ -1321,7 +1321,7 @@ static NonbondedForce* copyNonbondedForce( const NonbondedForce& nonbondedForce
...
@@ -1321,7 +1321,7 @@ static NonbondedForce* copyNonbondedForce( const NonbondedForce& nonbondedForce
static
void
copySystem
(
const
System
&
inputSystem
,
System
&
systemCopy
){
static
void
copySystem
(
const
System
&
inputSystem
,
System
&
systemCopy
){
for
(
unsigned
int
ii
=
0
;
ii
<
inputSystem
.
getNumParticles
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
inputSystem
.
getNumParticles
()
)
;
ii
++
){
systemCopy
.
addParticle
(
inputSystem
.
getParticleMass
(
static_cast
<
int
>
(
ii
)
)
);
systemCopy
.
addParticle
(
inputSystem
.
getParticleMass
(
static_cast
<
int
>
(
ii
)
)
);
}
}
...
@@ -1331,8 +1331,7 @@ static void copySystem( const System& inputSystem, System& systemCopy ){
...
@@ -1331,8 +1331,7 @@ static void copySystem( const System& inputSystem, System& systemCopy ){
inputSystem
.
getDefaultPeriodicBoxVectors
(
a
,
b
,
c
);
inputSystem
.
getDefaultPeriodicBoxVectors
(
a
,
b
,
c
);
systemCopy
.
setDefaultPeriodicBoxVectors
(
a
,
b
,
c
);
systemCopy
.
setDefaultPeriodicBoxVectors
(
a
,
b
,
c
);
for
(
unsigned
int
ii
=
0
;
ii
<
inputSystem
.
getNumConstraints
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
inputSystem
.
getNumConstraints
());
ii
++
){
int
index
;
int
particle1
,
particle2
;
int
particle1
,
particle2
;
double
distance
;
double
distance
;
inputSystem
.
getConstraintParameters
(
ii
,
particle1
,
particle2
,
distance
);
inputSystem
.
getConstraintParameters
(
ii
,
particle1
,
particle2
,
distance
);
...
@@ -1698,7 +1697,7 @@ static CustomNonbondedForce* buildCustomNonbondedSoftcoreForce( const Nonbonded
...
@@ -1698,7 +1697,7 @@ static CustomNonbondedForce* buildCustomNonbondedSoftcoreForce( const Nonbonded
customNonbonded
->
addPerParticleParameter
(
"lambda"
);
customNonbonded
->
addPerParticleParameter
(
"lambda"
);
vector
<
double
>
nonbondedParams
(
4
);
vector
<
double
>
nonbondedParams
(
4
);
for
(
unsigned
int
ii
=
0
;
ii
<
nonbondedSoftcoreForce
.
getNumParticles
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
nonbondedSoftcoreForce
.
getNumParticles
()
)
;
ii
++
){
double
charge
;
double
charge
;
double
sigma
;
double
sigma
;
...
@@ -1751,7 +1750,7 @@ CustomBondForce* buildCustomBondForceForNonbondedExceptions( const NonbondedSoft
...
@@ -1751,7 +1750,7 @@ CustomBondForce* buildCustomBondForceForNonbondedExceptions( const NonbondedSoft
customBond
->
addPerBondParameter
(
"eps"
);
customBond
->
addPerBondParameter
(
"eps"
);
customBond
->
addPerBondParameter
(
"lambda"
);
customBond
->
addPerBondParameter
(
"lambda"
);
for
(
unsigned
int
ii
=
0
;
ii
<
nonbondedSoftcoreForce
.
getNumExceptions
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
nonbondedSoftcoreForce
.
getNumExceptions
()
)
;
ii
++
){
int
particle1
,
particle2
;
int
particle1
,
particle2
;
double
chargeProd
;
double
chargeProd
;
...
...
Prev
1
2
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