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
c2ea6c28
Commit
c2ea6c28
authored
Jan 07, 2016
by
Peter Eastman
Browse files
Continuing CUDA implementation of extrapolated polarization
parent
a4e2d9a6
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
770 additions
and
131 deletions
+770
-131
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
+73
-45
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.h
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.h
+1
-1
plugins/amoeba/platforms/cuda/src/kernels/multipoleInducedField.cu
...moeba/platforms/cuda/src/kernels/multipoleInducedField.cu
+160
-64
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaExtrapolatedPolarization.cpp
...rms/cuda/tests/TestCudaAmoebaExtrapolatedPolarization.cpp
+521
-0
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+2
-6
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.h
...erence/src/SimTKReference/AmoebaReferenceMultipoleForce.h
+0
-2
plugins/amoeba/platforms/reference/tests/TestReferenceAmoebaExtrapolatedPolarization.cpp
...nce/tests/TestReferenceAmoebaExtrapolatedPolarization.cpp
+13
-13
No files found.
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
View file @
c2ea6c28
...
...
@@ -1019,10 +1019,10 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
int
numOrders
=
force
.
getExtrapolationCoefficients
().
size
();
extrapolatedDipole
=
new
CudaArray
(
cu
,
3
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipole"
);
extrapolatedDipolePolar
=
new
CudaArray
(
cu
,
3
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipolePolar"
);
inducedDipoleFieldGradient
=
new
CudaArray
(
cu
,
6
*
numMultipoles
,
elementSize
,
"inducedDipoleFieldGradient"
);
inducedDipoleFieldGradientPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
,
elementSize
,
"inducedDipoleFieldGradientPolar"
);
extrapolatedDipoleFieldGradient
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipoleFieldGradient"
);
extrapolatedDipoleFieldGradientPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipoleFieldGradientPolar"
);
inducedDipoleFieldGradient
=
new
CudaArray
(
cu
,
6
*
paddedNumAtoms
,
sizeof
(
long
long
)
,
"inducedDipoleFieldGradient"
);
inducedDipoleFieldGradientPolar
=
new
CudaArray
(
cu
,
6
*
paddedNumAtoms
,
sizeof
(
long
long
)
,
"inducedDipoleFieldGradientPolar"
);
extrapolatedDipoleFieldGradient
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
(
numOrders
-
1
)
,
elementSize
,
"extrapolatedDipoleFieldGradient"
);
extrapolatedDipoleFieldGradientPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
(
numOrders
-
1
)
,
elementSize
,
"extrapolatedDipoleFieldGradientPolar"
);
}
cu
.
addAutoclearBuffer
(
*
field
);
cu
.
addAutoclearBuffer
(
*
fieldPolar
);
...
...
@@ -1109,6 +1109,10 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
defines
[
"ENERGY_SCALE_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
/
innerDielectric
);
if
(
polarizationType
==
AmoebaMultipoleForce
::
Direct
)
defines
[
"DIRECT_POLARIZATION"
]
=
""
;
else
if
(
polarizationType
==
AmoebaMultipoleForce
::
Mutual
)
defines
[
"MUTUAL_POLARIZATION"
]
=
""
;
else
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
defines
[
"EXTRAPOLATED_POLARIZATION"
]
=
""
;
if
(
useShuffle
)
defines
[
"USE_SHUFFLE"
]
=
""
;
if
(
hasQuadrupoles
)
...
...
@@ -1129,7 +1133,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
coefficients
<<
","
;
double
sum
=
0
;
for
(
int
j
=
i
;
j
<
maxExtrapolationOrder
;
j
++
)
sum
=
force
.
getExtrapolationCoefficients
()[
j
];
sum
+
=
force
.
getExtrapolationCoefficients
()[
j
];
coefficients
<<
cu
.
doubleToString
(
sum
);
}
defines
[
"EXTRAPOLATION_COEFFICIENTS_SUM"
]
=
coefficients
.
str
();
...
...
@@ -1176,8 +1180,8 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
extrapolatedDipoleGkPolar
=
new
CudaArray
(
cu
,
3
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipoleGkPolar"
);
inducedDipoleFieldGradientGk
=
new
CudaArray
(
cu
,
6
*
numMultipoles
,
elementSize
,
"inducedDipoleFieldGradientGk"
);
inducedDipoleFieldGradientGkPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
,
elementSize
,
"inducedDipoleFieldGradientGkPolar"
);
extrapolatedDipoleFieldGradientGk
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipoleFieldGradientGk"
);
extrapolatedDipoleFieldGradientGkPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
numOrders
,
elementSize
,
"extrapolatedDipoleFieldGradientGkPolar"
);
extrapolatedDipoleFieldGradientGk
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
(
numOrders
-
1
)
,
elementSize
,
"extrapolatedDipoleFieldGradientGk"
);
extrapolatedDipoleFieldGradientGkPolar
=
new
CudaArray
(
cu
,
6
*
numMultipoles
*
(
numOrders
-
1
)
,
elementSize
,
"extrapolatedDipoleFieldGradientGkPolar"
);
}
}
int
maxThreads
=
cu
.
getNonbondedUtilities
().
getForceThreadBlockSize
();
...
...
@@ -1203,6 +1207,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
initExtrapolatedKernel
=
cu
.
getKernel
(
module
,
"initExtrapolatedDipoles"
);
iterateExtrapolatedKernel
=
cu
.
getKernel
(
module
,
"iterateExtrapolatedDipoles"
);
computeExtrapolatedKernel
=
cu
.
getKernel
(
module
,
"computeExtrapolatedDipoles"
);
addExtrapolatedGradientKernel
=
cu
.
getKernel
(
module
,
"addExtrapolatedFieldGradientToForce"
);
}
stringstream
electrostaticsSource
;
electrostaticsSource
<<
CudaKernelSources
::
vectorOps
;
...
...
@@ -1659,6 +1664,14 @@ double CudaCalcAmoebaMultipoleForceKernel::execute(ContextImpl& context, bool in
&
pmePhip
->
getDevicePointer
(),
&
pmePhidp
->
getDevicePointer
(),
&
pmeCphi
->
getDevicePointer
(),
recipBoxVectorPointer
[
0
],
recipBoxVectorPointer
[
1
],
recipBoxVectorPointer
[
2
]};
cu
.
executeKernel
(
pmeInducedForceKernel
,
pmeInducedForceArgs
,
cu
.
getNumAtoms
());
}
// If using extrapolated polarization, add in force contributions from µ(m) T µ(n).
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
{
void
*
extrapolatedArgs
[]
=
{
&
cu
.
getForce
().
getDevicePointer
(),
&
extrapolatedDipole
->
getDevicePointer
(),
&
extrapolatedDipolePolar
->
getDevicePointer
(),
&
extrapolatedDipoleFieldGradient
->
getDevicePointer
(),
&
extrapolatedDipoleFieldGradientPolar
->
getDevicePointer
()};
cu
.
executeKernel
(
addExtrapolatedGradientKernel
,
extrapolatedArgs
,
numMultipoles
);
}
// Map torques to force.
...
...
@@ -1678,37 +1691,63 @@ void CudaCalcAmoebaMultipoleForceKernel::computeInducedField(void** recipBoxVect
int
startTileIndex
=
nb
.
getStartTileIndex
();
int
numTileIndices
=
nb
.
getNumTiles
();
int
numForceThreadBlocks
=
nb
.
getNumForceThreadBlocks
();
if
(
pmeGrid
==
NULL
)
{
cu
.
clearBuffer
(
*
inducedField
);
cu
.
clearBuffer
(
*
inducedFieldPolar
);
if
(
gkKernel
==
NULL
)
{
void
*
computeInducedFieldArgs
[]
=
{
&
inducedField
->
getDevicePointer
(),
&
inducedFieldPolar
->
getDevicePointer
(),
&
cu
.
getPosq
().
getDevicePointer
(),
&
nb
.
getExclusionTiles
().
getDevicePointer
(),
&
inducedDipole
->
getDevicePointer
(),
&
inducedDipolePolar
->
getDevicePointer
(),
&
startTileIndex
,
&
numTileIndices
,
&
dampingAndThole
->
getDevicePointer
()};
cu
.
executeKernel
(
computeInducedFieldKernel
,
computeInducedFieldArgs
,
numForceThreadBlocks
*
inducedFieldThreads
,
inducedFieldThreads
);
unsigned
int
maxTiles
=
0
;
vector
<
void
*>
computeInducedFieldArgs
;
computeInducedFieldArgs
.
push_back
(
&
inducedField
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
inducedFieldPolar
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
cu
.
getPosq
().
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
nb
.
getExclusionTiles
().
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
inducedDipole
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
inducedDipolePolar
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
startTileIndex
);
computeInducedFieldArgs
.
push_back
(
&
numTileIndices
);
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
{
computeInducedFieldArgs
.
push_back
(
&
inducedDipoleFieldGradient
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
inducedDipoleFieldGradientPolar
->
getDevicePointer
());
}
if
(
pmeGrid
!=
NULL
)
{
computeInducedFieldArgs
.
push_back
(
&
nb
.
getInteractingTiles
().
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
nb
.
getInteractionCount
().
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
cu
.
getPeriodicBoxSizePointer
());
computeInducedFieldArgs
.
push_back
(
cu
.
getInvPeriodicBoxSizePointer
());
computeInducedFieldArgs
.
push_back
(
cu
.
getPeriodicBoxVecXPointer
());
computeInducedFieldArgs
.
push_back
(
cu
.
getPeriodicBoxVecYPointer
());
computeInducedFieldArgs
.
push_back
(
cu
.
getPeriodicBoxVecZPointer
());
computeInducedFieldArgs
.
push_back
(
&
maxTiles
);
computeInducedFieldArgs
.
push_back
(
&
nb
.
getBlockCenters
().
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
nb
.
getInteractingAtoms
().
getDevicePointer
());
}
if
(
gkKernel
!=
NULL
)
{
computeInducedFieldArgs
.
push_back
(
&
gkKernel
->
getInducedField
()
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
gkKernel
->
getInducedFieldPolar
()
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
gkKernel
->
getInducedDipoles
()
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
gkKernel
->
getInducedDipolesPolar
()
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
gkKernel
->
getBornRadii
()
->
getDevicePointer
());
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
{
computeInducedFieldArgs
.
push_back
(
&
inducedDipoleFieldGradientGk
->
getDevicePointer
());
computeInducedFieldArgs
.
push_back
(
&
inducedDipoleFieldGradientGkPolar
->
getDevicePointer
());
}
else
{
cu
.
clearBuffer
(
*
gkKernel
->
getInducedField
());
cu
.
clearBuffer
(
*
gkKernel
->
getInducedFieldPolar
());
void
*
computeInducedFieldArgs
[]
=
{
&
inducedField
->
getDevicePointer
(),
&
inducedFieldPolar
->
getDevicePointer
(),
&
cu
.
getPosq
().
getDevicePointer
(),
&
nb
.
getExclusionTiles
().
getDevicePointer
(),
&
inducedDipole
->
getDevicePointer
(),
&
inducedDipolePolar
->
getDevicePointer
(),
&
startTileIndex
,
&
numTileIndices
,
&
gkKernel
->
getInducedField
()
->
getDevicePointer
(),
&
gkKernel
->
getInducedFieldPolar
()
->
getDevicePointer
(),
&
gkKernel
->
getInducedDipoles
()
->
getDevicePointer
(),
&
gkKernel
->
getInducedDipolesPolar
()
->
getDevicePointer
(),
&
gkKernel
->
getBornRadii
()
->
getDevicePointer
(),
&
dampingAndThole
->
getDevicePointer
()};
cu
.
executeKernel
(
computeInducedFieldKernel
,
computeInducedFieldArgs
,
numForceThreadBlocks
*
inducedFieldThreads
,
inducedFieldThreads
);
}
computeInducedFieldArgs
.
push_back
(
&
dampingAndThole
->
getDevicePointer
());
cu
.
clearBuffer
(
*
inducedField
);
cu
.
clearBuffer
(
*
inducedFieldPolar
);
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
{
cu
.
clearBuffer
(
*
inducedDipoleFieldGradient
);
cu
.
clearBuffer
(
*
inducedDipoleFieldGradientPolar
);
}
if
(
gkKernel
!=
NULL
)
{
cu
.
clearBuffer
(
*
gkKernel
->
getInducedField
());
cu
.
clearBuffer
(
*
gkKernel
->
getInducedFieldPolar
());
if
(
polarizationType
==
AmoebaMultipoleForce
::
Extrapolated
)
{
cu
.
clearBuffer
(
*
inducedDipoleFieldGradientGk
);
cu
.
clearBuffer
(
*
inducedDipoleFieldGradientGkPolar
);
}
}
if
(
pmeGrid
==
NULL
)
cu
.
executeKernel
(
computeInducedFieldKernel
,
&
computeInducedFieldArgs
[
0
],
numForceThreadBlocks
*
inducedFieldThreads
,
inducedFieldThreads
);
else
{
cu
.
clearBuffer
(
*
inducedField
);
cu
.
clearBuffer
(
*
inducedFieldPolar
);
unsigned
int
maxTiles
=
nb
.
getInteractingTiles
().
getSize
();
void
*
computeInducedFieldArgs
[]
=
{
&
inducedField
->
getDevicePointer
(),
&
inducedFieldPolar
->
getDevicePointer
(),
&
cu
.
getPosq
().
getDevicePointer
(),
&
nb
.
getExclusionTiles
().
getDevicePointer
(),
&
inducedDipole
->
getDevicePointer
(),
&
inducedDipolePolar
->
getDevicePointer
(),
&
startTileIndex
,
&
numTileIndices
,
&
nb
.
getInteractingTiles
().
getDevicePointer
(),
&
nb
.
getInteractionCount
().
getDevicePointer
(),
cu
.
getPeriodicBoxSizePointer
(),
cu
.
getInvPeriodicBoxSizePointer
(),
cu
.
getPeriodicBoxVecXPointer
(),
cu
.
getPeriodicBoxVecYPointer
(),
cu
.
getPeriodicBoxVecZPointer
(),
&
maxTiles
,
&
nb
.
getBlockCenters
().
getDevicePointer
(),
&
nb
.
getInteractingAtoms
().
getDevicePointer
(),
&
dampingAndThole
->
getDevicePointer
()};
cu
.
executeKernel
(
computeInducedFieldKernel
,
computeInducedFieldArgs
,
numForceThreadBlocks
*
inducedFieldThreads
,
inducedFieldThreads
);
maxTiles
=
nb
.
getInteractingTiles
().
getSize
();
cu
.
executeKernel
(
computeInducedFieldKernel
,
&
computeInducedFieldArgs
[
0
],
numForceThreadBlocks
*
inducedFieldThreads
,
inducedFieldThreads
);
cu
.
clearBuffer
(
*
pmeGrid
);
void
*
pmeSpreadInducedDipolesArgs
[]
=
{
&
cu
.
getPosq
().
getDevicePointer
(),
&
inducedDipole
->
getDevicePointer
(),
&
inducedDipolePolar
->
getDevicePointer
(),
&
pmeGrid
->
getDevicePointer
(),
&
pmeAtomGridIndex
->
getDevicePointer
(),
cu
.
getPeriodicBoxVecXPointer
(),
cu
.
getPeriodicBoxVecYPointer
(),
cu
.
getPeriodicBoxVecZPointer
(),
...
...
@@ -1859,17 +1898,6 @@ void CudaCalcAmoebaMultipoleForceKernel::computeExtrapolatedDipoles(void** recip
cu
.
executeKernel
(
iterateExtrapolatedKernel
,
iterateArgs
,
extrapolatedDipole
->
getSize
());
}
cout
<<
"CUDA"
<<
endl
;
vector
<
float
>
d
;
extrapolatedDipole
->
download
(
d
);
for
(
int
i
=
0
;
i
<
maxExtrapolationOrder
;
i
++
)
{
cout
<<
"order "
<<
i
<<
endl
;
for
(
int
j
=
0
;
j
<
numMultipoles
;
j
++
)
{
int
k
=
3
*
(
j
+
i
*
numMultipoles
);
cout
<<
d
[
k
]
<<
" "
<<
d
[
k
+
1
]
<<
" "
<<
d
[
k
+
2
]
<<
endl
;
}
}
// Take a linear combination of the µ_(n) components to form the total dipole
void
*
computeArgs
[]
=
{
&
inducedDipole
->
getDevicePointer
(),
&
inducedDipolePolar
->
getDevicePointer
(),
&
extrapolatedDipole
->
getDevicePointer
(),
...
...
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.h
View file @
c2ea6c28
...
...
@@ -459,7 +459,7 @@ private:
CUfunction
pmeGridIndexKernel
,
pmeSpreadFixedMultipolesKernel
,
pmeSpreadInducedDipolesKernel
,
pmeFinishSpreadChargeKernel
,
pmeConvolutionKernel
;
CUfunction
pmeFixedPotentialKernel
,
pmeInducedPotentialKernel
,
pmeFixedForceKernel
,
pmeInducedForceKernel
,
pmeRecordInducedFieldDipolesKernel
,
computePotentialKernel
;
CUfunction
recordDIISDipolesKernel
,
buildMatrixKernel
;
CUfunction
initExtrapolatedKernel
,
iterateExtrapolatedKernel
,
computeExtrapolatedKernel
;
CUfunction
initExtrapolatedKernel
,
iterateExtrapolatedKernel
,
computeExtrapolatedKernel
,
addExtrapolatedGradientKernel
;
CUfunction
pmeTransformMultipolesKernel
,
pmeTransformPotentialKernel
;
CudaCalcAmoebaGeneralizedKirkwoodForceKernel
*
gkKernel
;
static
const
int
PmeOrder
=
5
;
...
...
plugins/amoeba/platforms/cuda/src/kernels/multipoleInducedField.cu
View file @
c2ea6c28
This diff is collapsed.
Click to expand it.
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaExtrapolatedPolarization.cpp
0 → 100644
View file @
c2ea6c28
This diff is collapsed.
Click to expand it.
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
c2ea6c28
...
...
@@ -25,6 +25,7 @@
#include "AmoebaReferenceMultipoleForce.h"
#include "jama_svd.h"
#include <algorithm>
// In case we're using some primitive version of Visual Studio this will
// make sure that erf() and erfc() are defined.
#include "openmm/internal/MSVC_erfc.h"
...
...
@@ -1785,10 +1786,6 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateElectrostatic(const vector<Mu
vector<RealVec>& torques,
vector<RealVec>& forces)
{
const
int
deriv1
[]
=
{
1
,
4
,
7
,
8
,
10
,
15
,
17
,
13
,
14
,
19
};
const
int
deriv2
[]
=
{
2
,
7
,
5
,
9
,
13
,
11
,
18
,
15
,
19
,
16
};
const
int
deriv3
[]
=
{
3
,
8
,
9
,
6
,
14
,
16
,
12
,
19
,
17
,
18
};
RealOpenMM energy = 0.0;
vector<RealOpenMM> scaleFactors(LAST_SCALE_TYPE_INDEX);
for (unsigned int kk = 0; kk < scaleFactors.size(); kk++) {
...
...
@@ -1796,6 +1793,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateElectrostatic(const vector<Mu
}
// main loop over particle pairs
for (unsigned int ii = 0; ii < particleData.size(); ii++) {
for (unsigned int jj = ii+1; jj < particleData.size(); jj++) {
...
...
@@ -6072,7 +6070,6 @@ void AmoebaReferencePmeMultipoleForce::recordInducedDipoleField(vector<RealVec>&
fieldPolar[i][1] -= _phip[10*i+1]*fracToCart[1][0] + _phip[10*i+2]*fracToCart[1][1] + _phip[10*i+3]*fracToCart[1][2];
fieldPolar[i][2] -= _phip[10*i+1]*fracToCart[2][0] + _phip[10*i+2]*fracToCart[2][1] + _phip[10*i+3]*fracToCart[2][2];
}
}
void AmoebaReferencePmeMultipoleForce::calculateReciprocalSpaceInducedDipoleField(vector<UpdateInducedDipoleFieldStruct>& updateInducedDipoleFields)
...
...
@@ -6238,7 +6235,6 @@ void AmoebaReferencePmeMultipoleForce::calculateDirectInducedDipolePairIxns(cons
alsq2n *= alsq2;
RealOpenMM bn3 = (5.0*bn2+alsq2n*exp2a)/r2;
// compute the error function scaled and unscaled terms
RealOpenMM scale3 = 1.0;
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.h
View file @
c2ea6c28
...
...
@@ -673,8 +673,6 @@ protected:
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
_ptDipoleFieldGradientP
;
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
_ptDipoleFieldGradientD
;
int
_mutualInducedDipoleConverged
;
int
_mutualInducedDipoleIterations
;
int
_maximumMutualInducedDipoleIterations
;
...
...
plugins/amoeba/platforms/reference/tests/TestReferenceAmoeba
PT
Polarization.cpp
→
plugins/amoeba/platforms/reference/tests/TestReferenceAmoeba
Extrapolated
Polarization.cpp
View file @
c2ea6c28
...
...
@@ -30,7 +30,7 @@
* -------------------------------------------------------------------------- */
/**
* This tests the Reference implementation of the
PT
polarization algorithms in
Reference
AmoebaMultipoleForce.
* This tests the Reference implementation of the
extrapolated
polarization algorithms in AmoebaMultipoleForce.
*/
#include "openmm/internal/AssertionUtilities.h"
...
...
@@ -307,9 +307,9 @@ static void check_finite_differences(vector<Vec3> analytic_forces, Context &cont
}
static
void
testWaterDimer
ExPTPolarization
TriclinicPME
()
{
static
void
testWaterDimerTriclinicPME
()
{
std
::
string
testName
=
"testWaterDimer
ExPTPolarization
TriclinicPME"
;
std
::
string
testName
=
"testWaterDimerTriclinicPME"
;
System
system
;
AmoebaMultipoleForce
*
amoebaMultipoleForce
=
new
AmoebaMultipoleForce
();;
...
...
@@ -356,9 +356,9 @@ static void testWaterDimerExPTPolarizationTriclinicPME() {
}
static
void
testWaterDimer
ExPTPolarization
TriclinicPMENoPolGroups
()
{
static
void
testWaterDimerTriclinicPMENoPolGroups
()
{
std
::
string
testName
=
"testWaterDimer
ExPTPolarization
TriclinicPMENoPolGroups"
;
std
::
string
testName
=
"testWaterDimerTriclinicPMENoPolGroups"
;
System
system
;
AmoebaMultipoleForce
*
amoebaMultipoleForce
=
new
AmoebaMultipoleForce
();;
...
...
@@ -406,9 +406,9 @@ static void testWaterDimerExPTPolarizationTriclinicPMENoPolGroups() {
}
static
void
testWaterDimer
ExPTPolarization
NoCutoff
()
{
static
void
testWaterDimerNoCutoff
()
{
std
::
string
testName
=
"testWaterDimer
ExPTPolarization
NoCutoff"
;
std
::
string
testName
=
"testWaterDimerNoCutoff"
;
System
system
;
AmoebaMultipoleForce
*
amoebaMultipoleForce
=
new
AmoebaMultipoleForce
();;
...
...
@@ -447,9 +447,9 @@ static void testWaterDimerExPTPolarizationNoCutoff() {
}
static
void
testWaterDimer
ExPTPolarization
NoCutoffNoPolGroups
()
{
static
void
testWaterDimerNoCutoffNoPolGroups
()
{
std
::
string
testName
=
"testWaterDimer
ExPTPolarization
NoCutoffNoPolGroups"
;
std
::
string
testName
=
"testWaterDimerNoCutoffNoPolGroups"
;
System
system
;
AmoebaMultipoleForce
*
amoebaMultipoleForce
=
new
AmoebaMultipoleForce
();;
...
...
@@ -499,16 +499,16 @@ int main(int numberOfArguments, char* argv[]) {
*/
// PME, triclinic
testWaterDimer
ExPTPolarization
TriclinicPME
();
testWaterDimerTriclinicPME
();
// PME, triclinic, no polarization groups
testWaterDimer
ExPTPolarization
TriclinicPMENoPolGroups
();
testWaterDimerTriclinicPMENoPolGroups
();
// No cutoff
testWaterDimer
ExPTPolarization
NoCutoff
();
testWaterDimerNoCutoff
();
// No cutoff, no polarization groups
testWaterDimer
ExPTPolarization
NoCutoffNoPolGroups
();
testWaterDimerNoCutoffNoPolGroups
();
}
catch
(
const
std
::
exception
&
e
)
{
...
...
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