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
c6b1fa83
Commit
c6b1fa83
authored
Sep 30, 2010
by
Mark Friedrichs
Browse files
Cleaned up for Windows compile
parent
e20cc4f2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
31 deletions
+33
-31
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+20
-18
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.h
...erence/src/SimTKReference/AmoebaReferenceMultipoleForce.h
+3
-3
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceOutOfPlaneBendForce.cpp
...src/SimTKReference/AmoebaReferenceOutOfPlaneBendForce.cpp
+1
-1
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferencePiTorsionForce.cpp
...ence/src/SimTKReference/AmoebaReferencePiTorsionForce.cpp
+1
-1
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceStretchBendForce.cpp
...ce/src/SimTKReference/AmoebaReferenceStretchBendForce.cpp
+1
-1
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceTorsionForce.cpp
...erence/src/SimTKReference/AmoebaReferenceTorsionForce.cpp
+1
-1
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceTorsionTorsionForce.cpp
...src/SimTKReference/AmoebaReferenceTorsionTorsionForce.cpp
+1
-1
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceVdwForce.cpp
.../reference/src/SimTKReference/AmoebaReferenceVdwForce.cpp
+3
-3
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceWcaDispersionForce.cpp
.../src/SimTKReference/AmoebaReferenceWcaDispersionForce.cpp
+2
-2
No files found.
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
c6b1fa83
...
@@ -182,7 +182,7 @@ void AmoebaReferenceMultipoleForce::logRealOpenMMVectors( const std::string& hea
...
@@ -182,7 +182,7 @@ void AmoebaReferenceMultipoleForce::logRealOpenMMVectors( const std::string& hea
}
}
void
AmoebaReferenceMultipoleForce
::
logParticleData
(
const
std
::
string
&
header
,
const
std
::
vector
<
MultipoleParticleData
>&
particleData
,
void
AmoebaReferenceMultipoleForce
::
logParticleData
(
const
std
::
string
&
header
,
const
std
::
vector
<
MultipoleParticleData
>&
particleData
,
unsigned
int
printFlag
,
FILE
*
log
,
int
maxPrint
)
const
{
unsigned
int
printFlag
,
FILE
*
log
,
unsigned
int
maxPrint
)
const
{
(
void
)
fprintf
(
log
,
"%s"
,
header
.
c_str
()
);
(
void
)
fprintf
(
log
,
"%s"
,
header
.
c_str
()
);
...
@@ -224,7 +224,7 @@ void AmoebaReferenceMultipoleForce::logParticleData( const std::string& header,
...
@@ -224,7 +224,7 @@ void AmoebaReferenceMultipoleForce::logParticleData( const std::string& header,
*/
*/
void
AmoebaReferenceMultipoleForce
::
showScaleMapForParticle
(
unsigned
int
particleI
,
FILE
*
log
)
const
{
void
AmoebaReferenceMultipoleForce
::
showScaleMapForParticle
(
unsigned
int
particleI
,
FILE
*
log
)
const
{
(
void
)
fprintf
(
log
,
"Scale map particle %5u maxIndex=%
d
\n
"
,
particleI
,
_maxScaleIndex
[
particleI
]
);
(
void
)
fprintf
(
log
,
"Scale map particle %5u maxIndex=%
u
\n
"
,
particleI
,
_maxScaleIndex
[
particleI
]
);
std
::
string
scaleNames
[
LAST_SCALE_TYPE_INDEX
]
=
{
"D"
,
"P"
,
"M"
};
std
::
string
scaleNames
[
LAST_SCALE_TYPE_INDEX
]
=
{
"D"
,
"P"
,
"M"
};
for
(
unsigned
int
ii
=
0
;
ii
<
_scaleMaps
[
particleI
].
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
_scaleMaps
[
particleI
].
size
();
ii
++
){
...
@@ -269,7 +269,7 @@ void AmoebaReferenceMultipoleForce::setupScaleMaps( const std::vector< std::vect
...
@@ -269,7 +269,7 @@ void AmoebaReferenceMultipoleForce::setupScaleMaps( const std::vector< std::vect
for
(
unsigned
jj
=
0
;
jj
<
AmoebaMultipoleForce
::
PolarizationCovalent11
;
jj
++
){
for
(
unsigned
jj
=
0
;
jj
<
AmoebaMultipoleForce
::
PolarizationCovalent11
;
jj
++
){
const
std
::
vector
<
int
>
covalentList
=
covalentInfo
[
jj
];
const
std
::
vector
<
int
>
covalentList
=
covalentInfo
[
jj
];
for
(
unsigned
int
kk
=
0
;
kk
<
covalentList
.
size
();
kk
++
){
for
(
unsigned
int
kk
=
0
;
kk
<
covalentList
.
size
();
kk
++
){
int
covalentIndex
=
covalentList
[
kk
];
unsigned
int
covalentIndex
=
static_cast
<
unsigned
int
>
(
covalentList
[
kk
]
)
;
if
(
covalentIndex
<
ii
)
continue
;
if
(
covalentIndex
<
ii
)
continue
;
// handle 0.5 factor for p14
// handle 0.5 factor for p14
...
@@ -293,7 +293,7 @@ void AmoebaReferenceMultipoleForce::setupScaleMaps( const std::vector< std::vect
...
@@ -293,7 +293,7 @@ void AmoebaReferenceMultipoleForce::setupScaleMaps( const std::vector< std::vect
for
(
unsigned
jj
=
AmoebaMultipoleForce
::
PolarizationCovalent11
;
jj
<
covalentInfo
.
size
();
jj
++
){
for
(
unsigned
jj
=
AmoebaMultipoleForce
::
PolarizationCovalent11
;
jj
<
covalentInfo
.
size
();
jj
++
){
const
std
::
vector
<
int
>
covalentList
=
covalentInfo
[
jj
];
const
std
::
vector
<
int
>
covalentList
=
covalentInfo
[
jj
];
for
(
unsigned
int
kk
=
0
;
kk
<
covalentList
.
size
();
kk
++
){
for
(
unsigned
int
kk
=
0
;
kk
<
covalentList
.
size
();
kk
++
){
int
covalentIndex
=
covalentList
[
kk
];
unsigned
int
covalentIndex
=
static_cast
<
unsigned
int
>
(
covalentList
[
kk
]
)
;
if
(
covalentIndex
<
ii
)
continue
;
if
(
covalentIndex
<
ii
)
continue
;
_scaleMaps
[
ii
][
D_SCALE
][
covalentIndex
]
=
_dScale
[
jj
-
4
];
_scaleMaps
[
ii
][
D_SCALE
][
covalentIndex
]
=
_dScale
[
jj
-
4
];
_scaleMaps
[
ii
][
U_SCALE
][
covalentIndex
]
=
_uScale
[
jj
-
4
];
_scaleMaps
[
ii
][
U_SCALE
][
covalentIndex
]
=
_uScale
[
jj
-
4
];
...
@@ -802,7 +802,7 @@ fprintf( stderr, "MIb %3u eps=%15.7e %15.7e %15.7e\n", iteration, epsilonDirect,
...
@@ -802,7 +802,7 @@ fprintf( stderr, "MIb %3u eps=%15.7e %15.7e %15.7e\n", iteration, epsilonDirect,
setMutualInducedDipoleConverged
(
true
);
setMutualInducedDipoleConverged
(
true
);
done
=
true
;
done
=
true
;
}
}
if
(
currentEpsilon
<
epsilon
||
iteration
>=
getMaximumMutualInducedDipoleIterations
()
){
if
(
currentEpsilon
<
epsilon
||
static_cast
<
int
>
(
iteration
)
>=
getMaximumMutualInducedDipoleIterations
()
){
done
=
true
;
done
=
true
;
}
}
currentEpsilon
=
epsilon
;
currentEpsilon
=
epsilon
;
...
@@ -848,7 +848,7 @@ off2
...
@@ -848,7 +848,7 @@ off2
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
RealOpenMM
e
,
ei
,
fgrp
,
gfd
;
RealOpenMM
e
,
ei
;
RealOpenMM
damp
,
expdamp
;
RealOpenMM
damp
,
expdamp
;
RealOpenMM
pdi
,
pti
,
pgamma
;
RealOpenMM
pdi
,
pti
,
pgamma
;
RealOpenMM
scale3
,
scale3i
;
RealOpenMM
scale3
,
scale3i
;
...
@@ -858,26 +858,28 @@ off2
...
@@ -858,26 +858,28 @@ off2
RealOpenMM
psc3
,
psc5
,
psc7
;
RealOpenMM
psc3
,
psc5
,
psc7
;
RealOpenMM
dsc3
,
dsc5
,
dsc7
;
RealOpenMM
dsc3
,
dsc5
,
dsc7
;
RealOpenMM
xr
,
yr
,
zr
;
RealOpenMM
xr
,
yr
,
zr
;
RealOpenMM
xix
,
yix
,
zix
;
//
RealOpenMM xix,yix,zix;
RealOpenMM
xiy
,
yiy
,
ziy
;
//
RealOpenMM xiy,yiy,ziy;
RealOpenMM
xiz
,
yiz
,
ziz
;
//
RealOpenMM xiz,yiz,ziz;
RealOpenMM
xkx
,
ykx
,
zkx
;
//
RealOpenMM xkx,ykx,zkx;
RealOpenMM
xky
,
yky
,
zky
;
//
RealOpenMM xky,yky,zky;
RealOpenMM
xkz
,
ykz
,
zkz
;
//
RealOpenMM xkz,ykz,zkz;
RealOpenMM
r
,
r2
,
rr1
,
rr3
;
RealOpenMM
r
,
r2
,
rr1
,
rr3
;
RealOpenMM
rr5
,
rr7
,
rr9
,
rr11
;
RealOpenMM
rr5
,
rr7
,
rr9
,
rr11
;
RealOpenMM
vxx
,
vyy
,
vzz
;
//
RealOpenMM vxx,vyy,vzz;
RealOpenMM
vyx
,
vzx
,
vzy
;
//
RealOpenMM vyx,vzx,vzy;
RealOpenMM
qi
[
10
];
RealOpenMM
qi
[
10
];
RealOpenMM
ck
,
qk
[
10
];
RealOpenMM
qk
[
10
];
/*
RealOpenMM frcxi[4],frcxk[4];
RealOpenMM frcxi[4],frcxk[4];
RealOpenMM frcyi[4],frcyk[4];
RealOpenMM frcyi[4],frcyk[4];
RealOpenMM frczi[4],frczk[4];
RealOpenMM frczi[4],frczk[4];
*/
RealOpenMM
fridmp
[
4
],
findmp
[
4
];
RealOpenMM
fridmp
[
4
],
findmp
[
4
];
RealOpenMM
ftm2
[
4
],
ftm2i
[
4
];
RealOpenMM
ftm2
[
4
],
ftm2i
[
4
];
RealOpenMM
ttm2
[
4
],
ttm3
[
4
];
RealOpenMM
ttm2
[
4
],
ttm3
[
4
];
RealOpenMM
ttm2i
[
4
],
ttm3i
[
4
];
RealOpenMM
ttm2i
[
4
],
ttm3i
[
4
];
RealOpenMM
dixdk
[
4
]
,
fdir
[
4
]
;
RealOpenMM
dixdk
[
4
];
RealOpenMM
dixuk
[
4
],
dkxui
[
4
];
RealOpenMM
dixuk
[
4
],
dkxui
[
4
];
RealOpenMM
dixukp
[
4
],
dkxuip
[
4
];
RealOpenMM
dixukp
[
4
],
dkxuip
[
4
];
RealOpenMM
uixqkr
[
4
],
ukxqir
[
4
];
RealOpenMM
uixqkr
[
4
],
ukxqir
[
4
];
...
@@ -1499,7 +1501,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffElectrostatic( std::v
...
@@ -1499,7 +1501,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffElectrostatic( std::v
return
energy
;
return
energy
;
}
}
RealOpenMM
AmoebaReferenceMultipoleForce
::
calculateNoCutoffForceAndEnergy
(
int
numParticles
,
RealOpenMM
AmoebaReferenceMultipoleForce
::
calculateNoCutoffForceAndEnergy
(
unsigned
int
numParticles
,
RealOpenMM
**
particlePositions
,
RealOpenMM
**
particlePositions
,
const
std
::
vector
<
RealOpenMM
>&
charges
,
const
std
::
vector
<
RealOpenMM
>&
charges
,
const
std
::
vector
<
RealOpenMM
>&
dipoles
,
const
std
::
vector
<
RealOpenMM
>&
dipoles
,
...
@@ -1613,7 +1615,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateForceAndEnergy( int numPartic
...
@@ -1613,7 +1615,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateForceAndEnergy( int numPartic
setupScaleMaps
(
multipoleParticleCovalentInfo
);
setupScaleMaps
(
multipoleParticleCovalentInfo
);
if
(
getNonbondedMethod
()
==
NoCutoff
||
1
){
if
(
getNonbondedMethod
()
==
NoCutoff
||
1
){
return
calculateNoCutoffForceAndEnergy
(
numParticles
,
particlePositions
,
charges
,
dipoles
,
quadrupoles
,
tholes
,
dampingFactors
,
return
calculateNoCutoffForceAndEnergy
(
static_cast
<
unsigned
int
>
(
numParticles
)
,
particlePositions
,
charges
,
dipoles
,
quadrupoles
,
tholes
,
dampingFactors
,
polarity
,
axisTypes
,
multipoleAtomId1s
,
multipoleAtomId2s
,
forces
);
polarity
,
axisTypes
,
multipoleAtomId1s
,
multipoleAtomId2s
,
forces
);
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.h
View file @
c6b1fa83
...
@@ -245,7 +245,7 @@ private:
...
@@ -245,7 +245,7 @@ private:
enum
ScaleType
{
D_SCALE
,
P_SCALE
,
M_SCALE
,
U_SCALE
,
LAST_SCALE_TYPE_INDEX
};
enum
ScaleType
{
D_SCALE
,
P_SCALE
,
M_SCALE
,
U_SCALE
,
LAST_SCALE_TYPE_INDEX
};
std
::
vector
<
std
::
vector
<
MapIntRealOpenMM
>
>
_scaleMaps
;
std
::
vector
<
std
::
vector
<
MapIntRealOpenMM
>
>
_scaleMaps
;
std
::
vector
<
int
>
_maxScaleIndex
;
std
::
vector
<
unsigned
int
>
_maxScaleIndex
;
RealOpenMM
_dScale
[
5
];
RealOpenMM
_dScale
[
5
];
RealOpenMM
_pScale
[
5
];
RealOpenMM
_pScale
[
5
];
RealOpenMM
_mScale
[
5
];
RealOpenMM
_mScale
[
5
];
...
@@ -362,7 +362,7 @@ private:
...
@@ -362,7 +362,7 @@ private:
FILE
*
log
=
stderr
,
unsigned
int
itemsPerVector
=
1
,
int
maxPrint
=
-
1
)
const
;
FILE
*
log
=
stderr
,
unsigned
int
itemsPerVector
=
1
,
int
maxPrint
=
-
1
)
const
;
void
logParticleData
(
const
std
::
string
&
header
,
const
std
::
vector
<
MultipoleParticleData
>&
particleData
,
void
logParticleData
(
const
std
::
string
&
header
,
const
std
::
vector
<
MultipoleParticleData
>&
particleData
,
unsigned
int
printFlag
,
FILE
*
log
,
int
maxPrint
)
const
;
unsigned
int
printFlag
,
FILE
*
log
,
unsigned
int
maxPrint
)
const
;
void
showScaleMapForParticle
(
unsigned
int
particleI
,
FILE
*
log
)
const
;
void
showScaleMapForParticle
(
unsigned
int
particleI
,
FILE
*
log
)
const
;
...
@@ -462,7 +462,7 @@ private:
...
@@ -462,7 +462,7 @@ private:
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
calculateNoCutoffForceAndEnergy
(
int
numParticles
,
RealOpenMM
**
particlePositions
,
RealOpenMM
calculateNoCutoffForceAndEnergy
(
unsigned
int
numParticles
,
RealOpenMM
**
particlePositions
,
const
std
::
vector
<
RealOpenMM
>&
charges
,
const
std
::
vector
<
RealOpenMM
>&
charges
,
const
std
::
vector
<
RealOpenMM
>&
dipoles
,
const
std
::
vector
<
RealOpenMM
>&
dipoles
,
const
std
::
vector
<
RealOpenMM
>&
quadrupoles
,
const
std
::
vector
<
RealOpenMM
>&
quadrupoles
,
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceOutOfPlaneBendForce.cpp
View file @
c6b1fa83
...
@@ -205,7 +205,7 @@ RealOpenMM AmoebaReferenceOutOfPlaneBendForce::calculateForceAndEnergy( int numO
...
@@ -205,7 +205,7 @@ RealOpenMM AmoebaReferenceOutOfPlaneBendForce::calculateForceAndEnergy( int numO
RealOpenMM
angleSextic
,
RealOpenMM
angleSextic
,
RealOpenMM
**
forceData
)
const
{
RealOpenMM
**
forceData
)
const
{
RealOpenMM
energy
=
0.0
;
RealOpenMM
energy
=
0.0
;
for
(
unsigned
int
ii
=
0
;
ii
<
numOutOfPlaneBends
;
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numOutOfPlaneBends
)
;
ii
++
)
{
int
particle1Index
=
particle1
[
ii
];
int
particle1Index
=
particle1
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle3Index
=
particle3
[
ii
];
int
particle3Index
=
particle3
[
ii
];
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferencePiTorsionForce.cpp
View file @
c6b1fa83
...
@@ -193,7 +193,7 @@ RealOpenMM AmoebaReferencePiTorsionForce::calculateForceAndEnergy( int numPiTors
...
@@ -193,7 +193,7 @@ RealOpenMM AmoebaReferencePiTorsionForce::calculateForceAndEnergy( int numPiTors
const
std
::
vector
<
RealOpenMM
>&
kTorsion
,
const
std
::
vector
<
RealOpenMM
>&
kTorsion
,
RealOpenMM
**
forceData
)
const
{
RealOpenMM
**
forceData
)
const
{
RealOpenMM
energy
=
0.0
;
RealOpenMM
energy
=
0.0
;
for
(
unsigned
int
ii
=
0
;
ii
<
numPiTorsions
;
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numPiTorsions
)
;
ii
++
)
{
int
particle1Index
=
particle1
[
ii
];
int
particle1Index
=
particle1
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle2Index
=
particle2
[
ii
];
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceStretchBendForce.cpp
View file @
c6b1fa83
...
@@ -154,7 +154,7 @@ RealOpenMM AmoebaReferenceStretchBendForce::calculateForceAndEnergy( int numStre
...
@@ -154,7 +154,7 @@ RealOpenMM AmoebaReferenceStretchBendForce::calculateForceAndEnergy( int numStre
const
std
::
vector
<
RealOpenMM
>&
kQuadratic
,
const
std
::
vector
<
RealOpenMM
>&
kQuadratic
,
RealOpenMM
**
forceData
)
const
{
RealOpenMM
**
forceData
)
const
{
RealOpenMM
energy
=
0.0
;
RealOpenMM
energy
=
0.0
;
for
(
unsigned
int
ii
=
0
;
ii
<
numStretchBends
;
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numStretchBends
)
;
ii
++
)
{
int
particle1Index
=
particle1
[
ii
];
int
particle1Index
=
particle1
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle3Index
=
particle3
[
ii
];
int
particle3Index
=
particle3
[
ii
];
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceTorsionForce.cpp
View file @
c6b1fa83
...
@@ -219,7 +219,7 @@ RealOpenMM AmoebaReferenceTorsionForce::calculateForceAndEnergy( int numTorsions
...
@@ -219,7 +219,7 @@ RealOpenMM AmoebaReferenceTorsionForce::calculateForceAndEnergy( int numTorsions
const
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>&
torsionParameters3
,
const
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>&
torsionParameters3
,
RealOpenMM
**
forceData
)
const
{
RealOpenMM
**
forceData
)
const
{
RealOpenMM
energy
=
0.0
;
RealOpenMM
energy
=
0.0
;
for
(
unsigned
int
ii
=
0
;
ii
<
numTorsions
;
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numTorsions
)
;
ii
++
)
{
int
particle1Index
=
particle1
[
ii
];
int
particle1Index
=
particle1
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle3Index
=
particle3
[
ii
];
int
particle3Index
=
particle3
[
ii
];
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceTorsionTorsionForce.cpp
View file @
c6b1fa83
...
@@ -560,7 +560,7 @@ RealOpenMM AmoebaReferenceTorsionTorsionForce::calculateForceAndEnergy( int numT
...
@@ -560,7 +560,7 @@ RealOpenMM AmoebaReferenceTorsionTorsionForce::calculateForceAndEnergy( int numT
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
>&
torsionTorsionGrids
,
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
std
::
vector
<
RealOpenMM
>
>
>
>&
torsionTorsionGrids
,
RealOpenMM
**
forceData
)
const
{
RealOpenMM
**
forceData
)
const
{
RealOpenMM
energy
=
0.0
;
RealOpenMM
energy
=
0.0
;
for
(
unsigned
int
ii
=
0
;
ii
<
numTorsionTorsions
;
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numTorsionTorsions
)
;
ii
++
)
{
int
particle1Index
=
particle1
[
ii
];
int
particle1Index
=
particle1
[
ii
];
int
particle2Index
=
particle2
[
ii
];
int
particle2Index
=
particle2
[
ii
];
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceVdwForce.cpp
View file @
c6b1fa83
...
@@ -220,7 +220,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
...
@@ -220,7 +220,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
std
::
vector
<
Vec3
>
reducedPositions
;
std
::
vector
<
Vec3
>
reducedPositions
;
reducedPositions
.
resize
(
numParticles
);
reducedPositions
.
resize
(
numParticles
);
for
(
unsigned
int
ii
=
0
;
ii
<
numParticles
;
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numParticles
)
;
ii
++
){
if
(
reductions
[
ii
]
!=
zero
){
if
(
reductions
[
ii
]
!=
zero
){
int
reductionIndex
=
indexIVs
[
ii
];
int
reductionIndex
=
indexIVs
[
ii
];
reducedPositions
[
ii
]
=
Vec3
(
reductions
[
ii
]
*
(
particlePositions
[
ii
][
0
]
-
particlePositions
[
reductionIndex
][
0
]
)
+
particlePositions
[
reductionIndex
][
0
],
reducedPositions
[
ii
]
=
Vec3
(
reductions
[
ii
]
*
(
particlePositions
[
ii
][
0
]
-
particlePositions
[
reductionIndex
][
0
]
)
+
particlePositions
[
reductionIndex
][
0
],
...
@@ -236,7 +236,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
...
@@ -236,7 +236,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
RealOpenMM
energy
=
zero
;
RealOpenMM
energy
=
zero
;
std
::
vector
<
unsigned
int
>
exclusions
(
numParticles
,
0
);
std
::
vector
<
unsigned
int
>
exclusions
(
numParticles
,
0
);
for
(
unsigned
int
ii
=
0
;
ii
<
numParticles
;
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numParticles
)
;
ii
++
){
RealOpenMM
sigmaI
=
sigmas
[
ii
];
RealOpenMM
sigmaI
=
sigmas
[
ii
];
RealOpenMM
epsilonI
=
epsilons
[
ii
];
RealOpenMM
epsilonI
=
epsilons
[
ii
];
...
@@ -244,7 +244,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
...
@@ -244,7 +244,7 @@ RealOpenMM AmoebaReferenceVdwForce::calculateNoCutoffForceAndEnergy( int numPart
exclusions
[
allExclusions
[
ii
][
jj
]]
=
1
;
exclusions
[
allExclusions
[
ii
][
jj
]]
=
1
;
}
}
for
(
unsigned
int
jj
=
ii
+
1
;
jj
<
numParticles
;
jj
++
){
for
(
unsigned
int
jj
=
ii
+
1
;
jj
<
static_cast
<
unsigned
int
>
(
numParticles
)
;
jj
++
){
if
(
exclusions
[
jj
]
==
0
){
if
(
exclusions
[
jj
]
==
0
){
RealOpenMM
combindedSigma
=
(
this
->*
_combineSigmas
)(
sigmaI
,
sigmas
[
jj
]
);
RealOpenMM
combindedSigma
=
(
this
->*
_combineSigmas
)(
sigmaI
,
sigmas
[
jj
]
);
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceWcaDispersionForce.cpp
View file @
c6b1fa83
...
@@ -281,7 +281,7 @@ RealOpenMM AmoebaReferenceWcaDispersionForce::calculateForceAndEnergy( int numPa
...
@@ -281,7 +281,7 @@ RealOpenMM AmoebaReferenceWcaDispersionForce::calculateForceAndEnergy( int numPa
RealOpenMM
intermediateValues
[
LastIntermediateValueIndex
];
RealOpenMM
intermediateValues
[
LastIntermediateValueIndex
];
for
(
unsigned
int
ii
=
0
;
ii
<
numParticles
;
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
numParticles
)
;
ii
++
){
RealOpenMM
epsi
=
epsilons
[
ii
];
RealOpenMM
epsi
=
epsilons
[
ii
];
RealOpenMM
rmini
=
radii
[
ii
];
RealOpenMM
rmini
=
radii
[
ii
];
...
@@ -316,7 +316,7 @@ RealOpenMM AmoebaReferenceWcaDispersionForce::calculateForceAndEnergy( int numPa
...
@@ -316,7 +316,7 @@ RealOpenMM AmoebaReferenceWcaDispersionForce::calculateForceAndEnergy( int numPa
intermediateValues
[
AH
]
=
emixh
*
rmixh7
;
intermediateValues
[
AH
]
=
emixh
*
rmixh7
;
for
(
unsigned
int
jj
=
0
;
jj
<
numParticles
;
jj
++
){
for
(
unsigned
int
jj
=
0
;
jj
<
static_cast
<
unsigned
int
>
(
numParticles
)
;
jj
++
){
if
(
ii
==
jj
)
continue
;
if
(
ii
==
jj
)
continue
;
...
...
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