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
4d6895b0
"ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "cdc8d9dc0810d959eef144149939ec7a3618b208"
Commit
4d6895b0
authored
Jul 26, 2011
by
Mark Friedrichs
Browse files
Fix for logic involving particles w/ NoAxisType
parent
53d1c90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+11
-7
No files found.
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
4d6895b0
...
@@ -1598,14 +1598,18 @@ void AmoebaReferenceMultipoleForce::mapTorqueToForce( const MultipoleParticleDat
...
@@ -1598,14 +1598,18 @@ void AmoebaReferenceMultipoleForce::mapTorqueToForce( const MultipoleParticleDat
// get coordinates of this atom and the z & x axis atoms
// get coordinates of this atom and the z & x axis atoms
// compute the vector between the atoms and 1/sqrt(d2), d2 is distance between
// compute the vector between the atoms and 1/sqrt(d2), d2 is distance between
// this atom and the axis atom
// this atom and the axis atom
if
(
axisType
==
AmoebaMultipoleForce
::
NoAxisType
){
return
;
}
getDelta
(
particleI
,
particleU
,
vector
[
U
]
);
getDelta
(
particleI
,
particleU
,
vector
[
U
]
);
norms
[
U
]
=
AmoebaReferenceForce
::
normalizeVector3
(
vector
[
U
]
);
norms
[
U
]
=
AmoebaReferenceForce
::
normalizeVector3
(
vector
[
U
]
);
getDelta
(
particleI
,
particleV
,
vector
[
V
]
);
getDelta
(
particleI
,
particleV
,
vector
[
V
]
);
norms
[
V
]
=
AmoebaReferenceForce
::
normalizeVector3
(
vector
[
V
]
);
norms
[
V
]
=
AmoebaReferenceForce
::
normalizeVector3
(
vector
[
V
]
);
if
(
axisType
==
AmoebaMultipoleForce
::
ZBisect
||
axisType
==
AmoebaMultipoleForce
::
ThreeFold
){
if
(
particleW
&&
(
axisType
==
AmoebaMultipoleForce
::
ZBisect
||
axisType
==
AmoebaMultipoleForce
::
ThreeFold
)
){
getDelta
(
particleI
,
*
particleW
,
vector
[
W
]
);
getDelta
(
particleI
,
*
particleW
,
vector
[
W
]
);
}
else
{
}
else
{
AmoebaReferenceForce
::
getCrossProduct
(
vector
[
U
],
vector
[
V
],
vector
[
W
]
);
AmoebaReferenceForce
::
getCrossProduct
(
vector
[
U
],
vector
[
V
],
vector
[
W
]
);
...
@@ -2006,10 +2010,10 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffElectrostatic( std::v
...
@@ -2006,10 +2010,10 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffElectrostatic( std::v
// map torques to forces
// map torques to forces
for
(
unsigned
int
ii
=
0
;
ii
<
particleData
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
particleData
.
size
();
ii
++
){
mapTorqueToForce
(
particleData
[
ii
],
particleData
[
multipoleAtomZs
[
ii
]],
particleData
[
multipoleAtomXs
[
ii
]],
if
(
axisTypes
[
ii
]
!=
AmoebaMultipoleForce
::
NoAxisType
){
m
ultipoleAtomYs
[
ii
]
>
-
1
?
&
particleData
[
multipoleAtom
Y
s
[
ii
]]
:
NULL
,
axisTypes
[
ii
],
torques
[
ii
],
forces
);
m
apTorqueToForce
(
particleData
[
ii
],
particleData
[
multipoleAtom
Z
s
[
ii
]]
,
particleData
[
multipoleAtomXs
[
ii
]],
//mapTorqueToForceOld( particleData[ii],
particleData[multipoleAtom
Z
s[ii]]
, particleData[multipoleAtomX
s[ii]
]
,
multipoleAtomYs
[
ii
]
>
-
1
?
&
particleData
[
multipoleAtom
Y
s
[
ii
]]
:
NULL
,
axisTypes
[
ii
],
torque
s
[
ii
],
forces
);
// axisTypes[ii], torques[ii], forces );
}
}
}
// diagnostics
// diagnostics
...
@@ -2074,7 +2078,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffForceAndEnergy( const
...
@@ -2074,7 +2078,7 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateNoCutoffForceAndEnergy( const
// check for chiral centers that need multipoles inverted
// check for chiral centers that need multipoles inverted
for
(
unsigned
int
ii
=
0
;
ii
<
numParticles
;
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
numParticles
;
ii
++
){
if
(
multipoleAtomYs
[
ii
]
){
if
(
multipoleAtomYs
[
ii
]
>
-
1
){
checkChiral
(
particleData
[
ii
],
axisTypes
[
ii
],
particleData
[
multipoleAtomZs
[
ii
]],
particleData
[
multipoleAtomXs
[
ii
]],
particleData
[
multipoleAtomYs
[
ii
]]
);
checkChiral
(
particleData
[
ii
],
axisTypes
[
ii
],
particleData
[
multipoleAtomZs
[
ii
]],
particleData
[
multipoleAtomXs
[
ii
]],
particleData
[
multipoleAtomYs
[
ii
]]
);
}
}
}
}
...
...
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