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
eb232608
"libraries/vscode:/vscode.git/clone" did not exist on "a63645c0913af551f99b77f7d82982e654a0274d"
Commit
eb232608
authored
Apr 22, 2015
by
John Chodera (MSKCC)
Browse files
Merge remote-tracking branch 'upstream/master'
parents
62581e9c
7f8c5089
Changes
267
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
178 additions
and
198 deletions
+178
-198
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+8
-8
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+2
-2
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+12
-12
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
.../amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
+3
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
...nmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
+8
-8
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
...i/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
...pi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
+2
-2
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
+10
-10
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
+7
-7
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
...s/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
+4
-4
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
+12
-12
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
+33
-33
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
+25
-25
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
+9
-9
plugins/amoeba/openmmapi/src/AmoebaPiTorsionForce.cpp
plugins/amoeba/openmmapi/src/AmoebaPiTorsionForce.cpp
+2
-2
plugins/amoeba/openmmapi/src/AmoebaStretchBendForce.cpp
plugins/amoeba/openmmapi/src/AmoebaStretchBendForce.cpp
+1
-1
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
+4
-4
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
...ns/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
+15
-35
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
+19
-19
No files found.
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
eb232608
...
...
@@ -71,28 +71,28 @@ public:
*
* @param cubicK the cubic force constant for the bond
*/
void
setAmoebaGlobalBondCubic
(
double
cubicK
);
void
setAmoebaGlobalBondCubic
(
double
cubicK
);
/**
* Get the global cubic term
*
* @return global cubicK term
*/
double
getAmoebaGlobalBondCubic
(
void
)
const
;
double
getAmoebaGlobalBondCubic
()
const
;
/**
* Set the global quartic term
*
* @param quarticK the quartic force constant for the bond
*/
void
setAmoebaGlobalBondQuartic
(
double
quarticK
);
void
setAmoebaGlobalBondQuartic
(
double
quarticK
);
/**
* Get the global quartic term
*
* @return global quartic term
*/
double
getAmoebaGlobalBondQuartic
(
void
)
const
;
double
getAmoebaGlobalBondQuartic
()
const
;
/**
* Add a bond term to the force field.
...
...
@@ -104,7 +104,7 @@ public:
* @return the index of the bond that was added
*/
int
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
int
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
/**
* Get the force field parameters for a bond term.
...
...
@@ -116,7 +116,7 @@ public:
* @param quadratic k the quadratic force constant for the bond
*/
void
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
;
void
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
;
/**
* Set the force field parameters for a bond term.
...
...
@@ -127,7 +127,7 @@ public:
* @param length the equilibrium length of the bond, measured in nm
* @param k the quadratic force constant for the bond
*/
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
/**
* Update the per-bond parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
...
@@ -167,7 +167,7 @@ public:
particle1
=
particle2
=
-
1
;
length
=
quadraticK
=
0.0
;
}
BondInfo
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
:
BondInfo
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
:
particle1
(
particle1
),
particle2
(
particle2
),
length
(
length
),
quadraticK
(
quadraticK
)
{
}
};
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
eb232608
...
...
@@ -127,7 +127,7 @@ public:
/**
* Get the flag signaling whether the cavity term should be included
*/
int
getIncludeCavityTerm
(
)
const
;
int
getIncludeCavityTerm
()
const
;
/**
* Set the flag signaling whether the cavity term should be included
...
...
@@ -152,7 +152,7 @@ public:
/**
* Set the surface area factor kJ/(nm*nm) used in SASA contribution
*/
void
setSurfaceAreaFactor
(
double
surfaceAreaFactor
);
void
setSurfaceAreaFactor
(
double
surfaceAreaFactor
);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
View file @
eb232608
...
...
@@ -70,56 +70,56 @@ public:
*
* @param cubicK the cubic force constant for the angle
*/
void
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
);
void
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
);
/**
* Get the global cubic term
*
* @return global cubicK term
*/
double
getAmoebaGlobalInPlaneAngleCubic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleCubic
()
const
;
/**
* Set the global quartic term
*
* @param quarticK the quartic force constant for the angle
*/
void
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
);
void
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
);
/**
* Get the global quartic term
*
* @return global quartic term
*/
double
getAmoebaGlobalInPlaneAngleQuartic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleQuartic
()
const
;
/**
* Set the global pentic term
*
* @param penticK the pentic force constant for the angle
*/
void
setAmoebaGlobalInPlaneAnglePentic
(
double
penticK
);
void
setAmoebaGlobalInPlaneAnglePentic
(
double
penticK
);
/**
* Get the global pentic term
*
* @return global penticK term
*/
double
getAmoebaGlobalInPlaneAnglePentic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAnglePentic
()
const
;
/**
* Set the global sextic term
*
* @param sexticK the sextic force constant for the angle
*/
void
setAmoebaGlobalInPlaneAngleSextic
(
double
sexticK
);
void
setAmoebaGlobalInPlaneAngleSextic
(
double
sexticK
);
/**
* Get the global sextic term
*
* @return global sextic term
*/
double
getAmoebaGlobalInPlaneAngleSextic
(
void
)
const
;
double
getAmoebaGlobalInPlaneAngleSextic
()
const
;
/**
* Add an angle term to the force field.
...
...
@@ -133,7 +133,7 @@ public:
* @return the index of the angle that was added
*/
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
double
quadraticK
);
/**
* Get the force field parameters for an angle term.
...
...
@@ -147,7 +147,7 @@ public:
* @param quadratic k the quadratic force constant for the angle measured in kJ/mol/radian^2
*/
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
length
,
double
&
quadraticK
)
const
;
double
&
quadraticK
)
const
;
/**
* Set the force field parameters for an angle term.
...
...
@@ -160,7 +160,7 @@ public:
* @param length the equilibrium angle, measured in radians
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
/**
* Update the per-angle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
...
@@ -200,7 +200,7 @@ public:
particle1
=
particle2
=
particle3
=
particle4
=
-
1
;
length
=
quadraticK
=
0.0
;
}
AngleInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
:
AngleInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
:
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
particle4
(
particle4
),
length
(
length
),
quadraticK
(
quadraticK
)
{
}
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
View file @
eb232608
...
...
@@ -148,7 +148,7 @@ public:
lengthAB
=
lengthCB
=
angle
=
k1
=
k2
=
0.0
;
}
StretchBendInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
double
lengthAB
,
double
lengthCB
,
double
angle
,
double
k1
,
double
k2
)
:
double
lengthAB
,
double
lengthCB
,
double
angle
,
double
k1
,
double
k2
)
:
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
lengthAB
(
lengthAB
),
lengthCB
(
lengthCB
),
angle
(
angle
),
k1
(
k1
),
k2
(
k2
)
{
}
...
...
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
View file @
eb232608
...
...
@@ -350,10 +350,10 @@ public:
virtual
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
)
=
0
;
virtual
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
=
0
;
virtual
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
=
0
;
virtual
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
)
=
0
;
virtual
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
)
=
0
;
/**
* Copy changed parameters over to a context.
*
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
View file @
eb232608
...
...
@@ -70,9 +70,9 @@ public:
* @param minCovalentIndex minimum covalent index
* @param maxCovalentIndex maximum covalent index
*/
static
void
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
index
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
);
static
void
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
index
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
);
/**
* Get the covalent degree for the CovalentEnd lists
...
...
@@ -80,14 +80,14 @@ public:
* @param force AmoebaMultipoleForce force reference
* @param covalentDegree covalent degrees for the CovalentEnd lists
*/
static
void
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
);
static
void
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
);
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
);
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
);
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
void
updateParametersInContext
(
ContextImpl
&
context
);
...
...
@@ -97,7 +97,7 @@ private:
static
int
CovalentDegrees
[
AmoebaMultipoleForce
::
CovalentEnd
];
static
bool
initializedCovalentDegrees
;
static
const
int
*
getCovalentDegrees
(
void
);
static
const
int
*
getCovalentDegrees
();
};
}
// namespace OpenMM
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
View file @
eb232608
...
...
@@ -61,7 +61,7 @@ public:
}
std
::
vector
<
std
::
string
>
getKernelNames
();
OPENMM_EXPORT_AMOEBA
static
void
reorderGrid
(
const
TorsionTorsionGrid
&
grid
,
TorsionTorsionGrid
&
reorderedGrid
);
OPENMM_EXPORT_AMOEBA
static
void
reorderGrid
(
const
TorsionTorsionGrid
&
grid
,
TorsionTorsionGrid
&
reorderedGrid
);
private:
const
AmoebaTorsionTorsionForce
&
owner
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
View file @
eb232608
...
...
@@ -69,7 +69,7 @@ public:
* @param particleIndex the particle index
* @param maxDispersionEnergy maximum dispersion energy
*/
static
void
getMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
,
int
particleIndex
,
double
&
maxDispersionEnergy
);
static
void
getMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
,
int
particleIndex
,
double
&
maxDispersionEnergy
);
/**
* Get the total maximum dispersion energy
...
...
@@ -78,7 +78,7 @@ public:
*
* @return total maximum dispersion energy for the system
*/
static
double
getTotalMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
);
static
double
getTotalMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
);
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
...
...
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
View file @
eb232608
...
...
@@ -46,7 +46,7 @@ int AmoebaAngleForce::addAngle(int particle1, int particle2, int particle3, dou
}
void
AmoebaAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
length
,
double
&
quadraticK
)
const
{
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
particle3
=
angles
[
index
].
particle3
;
...
...
@@ -55,7 +55,7 @@ void AmoebaAngleForce::getAngleParameters(int index, int& particle1, int& partic
}
void
AmoebaAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
{
double
length
,
double
quadraticK
)
{
angles
[
index
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle3
=
particle3
;
...
...
@@ -63,35 +63,35 @@ void AmoebaAngleForce::setAngleParameters(int index, int particle1, int particle
angles
[
index
].
quadraticK
=
quadraticK
;
}
double
AmoebaAngleForce
::
getAmoebaGlobalAngleCubic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleCubic
()
const
{
return
_globalCubicK
;
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleCubic
(
double
cubicK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
double
AmoebaAngleForce
::
getAmoebaGlobalAngleQuartic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleQuartic
()
const
{
return
_globalQuarticK
;
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleQuartic
(
double
quarticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
AmoebaAngleForce
::
getAmoebaGlobalAnglePentic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAnglePentic
()
const
{
return
_globalPenticK
;
}
void
AmoebaAngleForce
::
setAmoebaGlobalAnglePentic
(
double
penticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAnglePentic
(
double
penticK
)
{
_globalPenticK
=
penticK
;
}
double
AmoebaAngleForce
::
getAmoebaGlobalAngleSextic
(
void
)
const
{
double
AmoebaAngleForce
::
getAmoebaGlobalAngleSextic
()
const
{
return
_globalSexticK
;
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleSextic
(
double
sexticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleSextic
(
double
sexticK
)
{
_globalSexticK
=
sexticK
;
}
...
...
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
View file @
eb232608
...
...
@@ -41,37 +41,37 @@ AmoebaBondForce::AmoebaBondForce() {
}
int
AmoebaBondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
bonds
.
push_back
(
BondInfo
(
particle1
,
particle2
,
length
,
quadraticK
));
bonds
.
push_back
(
BondInfo
(
particle1
,
particle2
,
length
,
quadraticK
));
return
bonds
.
size
()
-
1
;
}
void
AmoebaBondForce
::
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
{
void
AmoebaBondForce
::
getBondParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
bonds
[
index
].
particle1
;
particle2
=
bonds
[
index
].
particle2
;
length
=
bonds
[
index
].
length
;
quadraticK
=
bonds
[
index
].
quadraticK
;
}
void
AmoebaBondForce
::
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
void
AmoebaBondForce
::
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
bonds
[
index
].
particle1
=
particle1
;
bonds
[
index
].
particle2
=
particle2
;
bonds
[
index
].
length
=
length
;
bonds
[
index
].
quadraticK
=
quadraticK
;
}
void
AmoebaBondForce
::
setAmoebaGlobalBondCubic
(
double
cubicK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
void
AmoebaBondForce
::
setAmoebaGlobalBondQuartic
(
double
quarticK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
AmoebaBondForce
::
getAmoebaGlobalBondCubic
(
void
)
const
{
double
AmoebaBondForce
::
getAmoebaGlobalBondCubic
()
const
{
return
_globalCubicK
;
}
double
AmoebaBondForce
::
getAmoebaGlobalBondQuartic
(
void
)
const
{
double
AmoebaBondForce
::
getAmoebaGlobalBondQuartic
()
const
{
return
_globalQuarticK
;
}
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
View file @
eb232608
...
...
@@ -62,7 +62,7 @@ double AmoebaGeneralizedKirkwoodForce::getDielectricOffset() const {
return dielectricOffset;
}
void AmoebaGeneralizedKirkwoodForce::setDielectricOffset(double inputDielectricOffset
) {
void AmoebaGeneralizedKirkwoodForce::setDielectricOffset(double inputDielectricOffset) {
dielectricOffset = inputDielectricOffset;
} */
...
...
@@ -70,7 +70,7 @@ int AmoebaGeneralizedKirkwoodForce::getIncludeCavityTerm() const {
return
includeCavityTerm
;
}
void
AmoebaGeneralizedKirkwoodForce
::
setIncludeCavityTerm
(
int
inputIncludeCavityTerm
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setIncludeCavityTerm
(
int
inputIncludeCavityTerm
)
{
includeCavityTerm
=
inputIncludeCavityTerm
;
}
...
...
@@ -78,7 +78,7 @@ double AmoebaGeneralizedKirkwoodForce::getProbeRadius() const {
return
probeRadius
;
}
void
AmoebaGeneralizedKirkwoodForce
::
setProbeRadius
(
double
inputProbeRadius
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setProbeRadius
(
double
inputProbeRadius
)
{
probeRadius
=
inputProbeRadius
;
}
...
...
@@ -86,7 +86,7 @@ double AmoebaGeneralizedKirkwoodForce::getSurfaceAreaFactor() const {
return
surfaceAreaFactor
;
}
void
AmoebaGeneralizedKirkwoodForce
::
setSurfaceAreaFactor
(
double
inputSurfaceAreaFactor
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setSurfaceAreaFactor
(
double
inputSurfaceAreaFactor
)
{
surfaceAreaFactor
=
inputSurfaceAreaFactor
;
}
...
...
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
View file @
eb232608
...
...
@@ -40,13 +40,13 @@ AmoebaInPlaneAngleForce::AmoebaInPlaneAngleForce() {
_globalCubicK
=
_globalQuarticK
=
_globalPenticK
=
_globalSexticK
=
0.0
;
}
int
AmoebaInPlaneAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
angles
.
push_back
(
AngleInfo
(
particle1
,
particle2
,
particle3
,
particle4
,
length
,
quadraticK
));
int
AmoebaInPlaneAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
angles
.
push_back
(
AngleInfo
(
particle1
,
particle2
,
particle3
,
particle4
,
length
,
quadraticK
));
return
angles
.
size
()
-
1
;
}
void
AmoebaInPlaneAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
length
,
double
&
quadraticK
)
const
{
double
&
length
,
double
&
quadraticK
)
const
{
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
particle3
=
angles
[
index
].
particle3
;
...
...
@@ -56,7 +56,7 @@ void AmoebaInPlaneAngleForce::getAngleParameters(int index, int& particle1, int&
}
void
AmoebaInPlaneAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
)
{
double
length
,
double
quadraticK
)
{
angles
[
index
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle3
=
particle3
;
...
...
@@ -65,35 +65,35 @@ void AmoebaInPlaneAngleForce::setAngleParameters(int index, int particle1, int p
angles
[
index
].
quadraticK
=
quadraticK
;
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleCubic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleCubic
()
const
{
return
_globalCubicK
;
}
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleQuartic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleQuartic
()
const
{
return
_globalQuarticK
;
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAnglePentic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAnglePentic
(
double
cubicK
)
{
_globalPenticK
=
cubicK
;
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleSextic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleSextic
(
double
quarticK
)
{
_globalSexticK
=
quarticK
;
}
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAnglePentic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAnglePentic
()
const
{
return
_globalPenticK
;
}
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleSextic
(
void
)
const
{
double
AmoebaInPlaneAngleForce
::
getAmoebaGlobalInPlaneAngleSextic
()
const
{
return
_globalSexticK
;
}
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
View file @
eb232608
...
...
@@ -45,19 +45,19 @@ AmoebaMultipoleForce::AmoebaMultipoleForce() : nonbondedMethod(NoCutoff), polari
pmeGridDimension
[
0
]
=
pmeGridDimension
[
1
]
=
pmeGridDimension
[
2
];
}
AmoebaMultipoleForce
::
NonbondedMethod
AmoebaMultipoleForce
::
getNonbondedMethod
(
void
)
const
{
AmoebaMultipoleForce
::
NonbondedMethod
AmoebaMultipoleForce
::
getNonbondedMethod
()
const
{
return
nonbondedMethod
;
}
void
AmoebaMultipoleForce
::
setNonbondedMethod
(
AmoebaMultipoleForce
::
NonbondedMethod
method
)
{
void
AmoebaMultipoleForce
::
setNonbondedMethod
(
AmoebaMultipoleForce
::
NonbondedMethod
method
)
{
nonbondedMethod
=
method
;
}
AmoebaMultipoleForce
::
PolarizationType
AmoebaMultipoleForce
::
getPolarizationType
(
void
)
const
{
AmoebaMultipoleForce
::
PolarizationType
AmoebaMultipoleForce
::
getPolarizationType
()
const
{
return
polarizationType
;
}
void
AmoebaMultipoleForce
::
setPolarizationType
(
AmoebaMultipoleForce
::
PolarizationType
type
)
{
void
AmoebaMultipoleForce
::
setPolarizationType
(
AmoebaMultipoleForce
::
PolarizationType
type
)
{
polarizationType
=
type
;
}
...
...
@@ -73,19 +73,19 @@ double AmoebaMultipoleForce::getAEwald() const {
return
aewald
;
}
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
aewald
=
inputAewald
;
}
int
AmoebaMultipoleForce
::
getPmeBSplineOrder
(
void
)
const
{
int
AmoebaMultipoleForce
::
getPmeBSplineOrder
()
const
{
return
pmeBSplineOrder
;
}
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
if
(
gridDimension
.
size
()
<
3
){
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
if
(
gridDimension
.
size
()
<
3
)
{
gridDimension
.
resize
(
3
);
}
if
(
pmeGridDimension
.
size
()
>
2
){
if
(
pmeGridDimension
.
size
()
>
2
)
{
gridDimension
[
0
]
=
pmeGridDimension
[
0
];
gridDimension
[
1
]
=
pmeGridDimension
[
1
];
gridDimension
[
2
]
=
pmeGridDimension
[
2
];
...
...
@@ -95,7 +95,7 @@ void AmoebaMultipoleForce::getPmeGridDimensions( std::vector<int>& gridDimension
return
;
}
void
AmoebaMultipoleForce
::
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
)
{
void
AmoebaMultipoleForce
::
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
)
{
pmeGridDimension
.
resize
(
3
);
pmeGridDimension
[
0
]
=
gridDimension
[
0
];
pmeGridDimension
[
1
]
=
gridDimension
[
1
];
...
...
@@ -103,19 +103,19 @@ void AmoebaMultipoleForce::setPmeGridDimensions( const std::vector<int>& gridDim
return
;
}
int
AmoebaMultipoleForce
::
getMutualInducedMaxIterations
(
void
)
const
{
int
AmoebaMultipoleForce
::
getMutualInducedMaxIterations
()
const
{
return
mutualInducedMaxIterations
;
}
void
AmoebaMultipoleForce
::
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
)
{
void
AmoebaMultipoleForce
::
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
)
{
mutualInducedMaxIterations
=
inputMutualInducedMaxIterations
;
}
double
AmoebaMultipoleForce
::
getMutualInducedTargetEpsilon
(
void
)
const
{
double
AmoebaMultipoleForce
::
getMutualInducedTargetEpsilon
()
const
{
return
mutualInducedTargetEpsilon
;
}
void
AmoebaMultipoleForce
::
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
)
{
void
AmoebaMultipoleForce
::
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
)
{
mutualInducedTargetEpsilon
=
inputMutualInducedTargetEpsilon
;
}
...
...
@@ -127,22 +127,22 @@ void AmoebaMultipoleForce::setEwaldErrorTolerance(double tol) {
ewaldErrorTol
=
tol
;
}
int
AmoebaMultipoleForce
::
addMultipole
(
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
AmoebaMultipoleForce
::
addMultipole
(
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
multipoleAtomZ
,
int
multipoleAtomX
,
int
multipoleAtomY
,
double
thole
,
double
dampingFactor
,
double
polarity
)
{
multipoles
.
push_back
(
MultipoleInfo
(
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
));
multipoles
.
push_back
(
MultipoleInfo
(
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
));
return
multipoles
.
size
()
-
1
;
}
void
AmoebaMultipoleForce
::
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
int
&
axisType
,
int
&
multipoleAtomZ
,
int
&
multipoleAtomX
,
int
&
multipoleAtomY
,
double
&
thole
,
double
&
dampingFactor
,
double
&
polarity
)
const
{
int
&
axisType
,
int
&
multipoleAtomZ
,
int
&
multipoleAtomX
,
int
&
multipoleAtomY
,
double
&
thole
,
double
&
dampingFactor
,
double
&
polarity
)
const
{
charge
=
multipoles
[
index
].
charge
;
molecularDipole
.
resize
(
3
);
molecularDipole
.
resize
(
3
);
molecularDipole
[
0
]
=
multipoles
[
index
].
molecularDipole
[
0
];
molecularDipole
[
1
]
=
multipoles
[
index
].
molecularDipole
[
1
];
molecularDipole
[
2
]
=
multipoles
[
index
].
molecularDipole
[
2
];
molecularQuadrupole
.
resize
(
9
);
molecularQuadrupole
.
resize
(
9
);
molecularQuadrupole
[
0
]
=
multipoles
[
index
].
molecularQuadrupole
[
0
];
molecularQuadrupole
[
1
]
=
multipoles
[
index
].
molecularQuadrupole
[
1
];
molecularQuadrupole
[
2
]
=
multipoles
[
index
].
molecularQuadrupole
[
2
];
...
...
@@ -164,7 +164,7 @@ void AmoebaMultipoleForce::getMultipoleParameters(int index, double& charge, std
}
void
AmoebaMultipoleForce
::
setMultipoleParameters
(
int
index
,
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
multipoleAtomZ
,
int
multipoleAtomX
,
int
multipoleAtomY
,
double
thole
,
double
dampingFactor
,
double
polarity
)
{
int
axisType
,
int
multipoleAtomZ
,
int
multipoleAtomX
,
int
multipoleAtomY
,
double
thole
,
double
dampingFactor
,
double
polarity
)
{
multipoles
[
index
].
charge
=
charge
;
...
...
@@ -192,34 +192,34 @@ void AmoebaMultipoleForce::setMultipoleParameters(int index, double charge, cons
}
void
AmoebaMultipoleForce
::
setCovalentMap
(
int
index
,
CovalentType
typeId
,
const
std
::
vector
<
int
>&
covalentAtoms
)
{
void
AmoebaMultipoleForce
::
setCovalentMap
(
int
index
,
CovalentType
typeId
,
const
std
::
vector
<
int
>&
covalentAtoms
)
{
std
::
vector
<
int
>&
covalentList
=
multipoles
[
index
].
covalentInfo
[
typeId
];
covalentList
.
resize
(
covalentAtoms
.
size
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentAtoms
.
size
();
ii
++
){
covalentList
.
resize
(
covalentAtoms
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentAtoms
.
size
();
ii
++
)
{
covalentList
[
ii
]
=
covalentAtoms
[
ii
];
}
}
void
AmoebaMultipoleForce
::
getCovalentMap
(
int
index
,
CovalentType
typeId
,
std
::
vector
<
int
>&
covalentAtoms
)
const
{
void
AmoebaMultipoleForce
::
getCovalentMap
(
int
index
,
CovalentType
typeId
,
std
::
vector
<
int
>&
covalentAtoms
)
const
{
// load covalent atom index entries for atomId==index and covalentId==typeId into covalentAtoms
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
typeId
];
covalentAtoms
.
resize
(
covalentList
.
size
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
covalentAtoms
.
resize
(
covalentList
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
covalentAtoms
[
ii
]
=
covalentList
[
ii
];
}
}
void
AmoebaMultipoleForce
::
getCovalentMaps
(
int
index
,
std
::
vector
<
std
::
vector
<
int
>
>&
covalentLists
)
const
{
void
AmoebaMultipoleForce
::
getCovalentMaps
(
int
index
,
std
::
vector
<
std
::
vector
<
int
>
>&
covalentLists
)
const
{
covalentLists
.
resize
(
CovalentEnd
);
for
(
unsigned
int
jj
=
0
;
jj
<
CovalentEnd
;
jj
++
){
covalentLists
.
resize
(
CovalentEnd
);
for
(
unsigned
int
jj
=
0
;
jj
<
CovalentEnd
;
jj
++
)
{
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
jj
];
std
::
vector
<
int
>
covalentAtoms
;
covalentAtoms
.
resize
(
covalentList
.
size
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
covalentAtoms
.
resize
(
covalentList
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
covalentAtoms
[
ii
]
=
covalentList
[
ii
];
}
covalentLists
[
jj
]
=
covalentAtoms
;
...
...
@@ -230,11 +230,11 @@ void AmoebaMultipoleForce::getInducedDipoles(Context& context, vector<Vec3>& dip
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getInducedDipoles
(
getContextImpl
(
context
),
dipoles
);
}
void
AmoebaMultipoleForce
::
getElectrostaticPotential
(
const
std
::
vector
<
Vec3
>&
inputGrid
,
Context
&
context
,
std
::
vector
<
double
>&
outputElectrostaticPotential
){
void
AmoebaMultipoleForce
::
getElectrostaticPotential
(
const
std
::
vector
<
Vec3
>&
inputGrid
,
Context
&
context
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
{
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getElectrostaticPotential
(
getContextImpl
(
context
),
inputGrid
,
outputElectrostaticPotential
);
}
void
AmoebaMultipoleForce
::
getSystemMultipoleMoments
(
Context
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
){
void
AmoebaMultipoleForce
::
getSystemMultipoleMoments
(
Context
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
)
{
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getSystemMultipoleMoments
(
getContextImpl
(
context
),
outputMultipoleMoments
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
View file @
eb232608
...
...
@@ -64,26 +64,26 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
}
double
quadrupoleValidationTolerance
=
1.0e-05
;
for
(
int
ii
=
0
;
ii
<
system
.
getNumParticles
();
ii
++
){
for
(
int
ii
=
0
;
ii
<
system
.
getNumParticles
();
ii
++
)
{
int
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
;
double
charge
,
thole
,
dampingFactor
,
polarity
;
std
::
vector
<
double
>
molecularDipole
;
std
::
vector
<
double
>
molecularQuadrupole
;
owner
.
getMultipoleParameters
(
ii
,
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
);
owner
.
getMultipoleParameters
(
ii
,
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
);
// check quadrupole is traceless and symmetric
double
trace
=
fabs
(
molecularQuadrupole
[
0
]
+
molecularQuadrupole
[
4
]
+
molecularQuadrupole
[
8
]
);
if
(
trace
>
quadrupoleValidationTolerance
){
double
trace
=
fabs
(
molecularQuadrupole
[
0
]
+
molecularQuadrupole
[
4
]
+
molecularQuadrupole
[
8
]);
if
(
trace
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: qudarupole for particle="
<<
ii
;
buffer
<<
" has nonzero trace: "
<<
trace
<<
"; AMOEBA plugin assumes traceless quadrupole."
;
throw
OpenMMException
(
buffer
.
str
());
}
if
(
fabs
(
molecularQuadrupole
[
1
]
-
molecularQuadrupole
[
3
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
1
]
-
molecularQuadrupole
[
3
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: XY and YX components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
1
]
<<
" "
<<
molecularQuadrupole
[
3
]
<<
"];"
;
...
...
@@ -91,7 +91,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
throw
OpenMMException
(
buffer
.
str
());
}
if
(
fabs
(
molecularQuadrupole
[
2
]
-
molecularQuadrupole
[
6
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
2
]
-
molecularQuadrupole
[
6
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: XZ and ZX components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
2
]
<<
" "
<<
molecularQuadrupole
[
6
]
<<
"];"
;
...
...
@@ -99,7 +99,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
throw
OpenMMException
(
buffer
.
str
());
}
if
(
fabs
(
molecularQuadrupole
[
5
]
-
molecularQuadrupole
[
7
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
5
]
-
molecularQuadrupole
[
7
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: YZ and ZY components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
5
]
<<
" "
<<
molecularQuadrupole
[
7
]
<<
"];"
;
...
...
@@ -109,9 +109,9 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
// only 'Z-then-X', 'Bisector', Z-Bisect, ThreeFold currently handled
if
(
axisType
!=
AmoebaMultipoleForce
::
ZThenX
&&
axisType
!=
AmoebaMultipoleForce
::
Bisector
&&
if
(
axisType
!=
AmoebaMultipoleForce
::
ZThenX
&&
axisType
!=
AmoebaMultipoleForce
::
Bisector
&&
axisType
!=
AmoebaMultipoleForce
::
ZBisect
&&
axisType
!=
AmoebaMultipoleForce
::
ThreeFold
&&
axisType
!=
AmoebaMultipoleForce
::
ZOnly
&&
axisType
!=
AmoebaMultipoleForce
::
NoAxisType
)
{
axisType
!=
AmoebaMultipoleForce
::
ZOnly
&&
axisType
!=
AmoebaMultipoleForce
::
NoAxisType
)
{
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: axis type="
<<
axisType
;
buffer
<<
" not currently handled - only axisTypes[ "
;
...
...
@@ -138,8 +138,8 @@ std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() {
return
names
;
}
const
int
*
AmoebaMultipoleForceImpl
::
getCovalentDegrees
(
void
)
{
if
(
!
initializedCovalentDegrees
){
const
int
*
AmoebaMultipoleForceImpl
::
getCovalentDegrees
()
{
if
(
!
initializedCovalentDegrees
)
{
initializedCovalentDegrees
=
true
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent12
]
=
1
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent13
]
=
2
;
...
...
@@ -153,20 +153,20 @@ const int* AmoebaMultipoleForceImpl::getCovalentDegrees( void ) {
return
CovalentDegrees
;
}
void
AmoebaMultipoleForceImpl
::
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
atomIndex
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
){
void
AmoebaMultipoleForceImpl
::
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
atomIndex
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
)
{
*
minCovalentIndex
=
999999999
;
*
maxCovalentIndex
=
-
999999999
;
for
(
unsigned
int
kk
=
0
;
kk
<
lists
.
size
();
kk
++
){
for
(
unsigned
int
kk
=
0
;
kk
<
lists
.
size
();
kk
++
)
{
AmoebaMultipoleForce
::
CovalentType
jj
=
lists
[
kk
];
std
::
vector
<
int
>
covalentList
;
force
.
getCovalentMap
(
atomIndex
,
jj
,
covalentList
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
if
(
*
minCovalentIndex
>
covalentList
[
ii
]
){
force
.
getCovalentMap
(
atomIndex
,
jj
,
covalentList
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
if
(
*
minCovalentIndex
>
covalentList
[
ii
])
{
*
minCovalentIndex
=
covalentList
[
ii
];
}
if
(
*
maxCovalentIndex
<
covalentList
[
ii
]
){
if
(
*
maxCovalentIndex
<
covalentList
[
ii
])
{
*
maxCovalentIndex
=
covalentList
[
ii
];
}
}
...
...
@@ -174,10 +174,10 @@ void AmoebaMultipoleForceImpl::getCovalentRange( const AmoebaMultipoleForce& for
return
;
}
void
AmoebaMultipoleForceImpl
::
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
){
covalentDegree
.
resize
(
AmoebaMultipoleForce
::
CovalentEnd
);
void
AmoebaMultipoleForceImpl
::
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
)
{
covalentDegree
.
resize
(
AmoebaMultipoleForce
::
CovalentEnd
);
const
int
*
CovalentDegrees
=
AmoebaMultipoleForceImpl
::
getCovalentDegrees
();
for
(
unsigned
int
kk
=
0
;
kk
<
AmoebaMultipoleForce
::
CovalentEnd
;
kk
++
){
for
(
unsigned
int
kk
=
0
;
kk
<
AmoebaMultipoleForce
::
CovalentEnd
;
kk
++
)
{
covalentDegree
[
kk
]
=
CovalentDegrees
[
kk
];
}
return
;
...
...
@@ -187,12 +187,12 @@ void AmoebaMultipoleForceImpl::getInducedDipoles(ContextImpl& context, vector<Ve
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getInducedDipoles
(
context
,
dipoles
);
}
void
AmoebaMultipoleForceImpl
::
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
){
void
AmoebaMultipoleForceImpl
::
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
{
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getElectrostaticPotential
(
context
,
inputGrid
,
outputElectrostaticPotential
);
}
void
AmoebaMultipoleForceImpl
::
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
){
void
AmoebaMultipoleForceImpl
::
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
)
{
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getSystemMultipoleMoments
(
context
,
outputMultipoleMoments
);
}
...
...
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
View file @
eb232608
...
...
@@ -44,35 +44,35 @@ AmoebaOutOfPlaneBendForce::AmoebaOutOfPlaneBendForce() {
}
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendCubic
(
void
)
const
{
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendCubic
()
const
{
return
_globalCubicK
;
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendCubic
(
double
cubicK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
}
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendQuartic
(
void
)
const
{
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendQuartic
()
const
{
return
_globalQuarticK
;
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendQuartic
(
double
quarticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
}
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendPentic
(
void
)
const
{
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendPentic
()
const
{
return
_globalPenticK
;
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendPentic
(
double
penticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendPentic
(
double
penticK
)
{
_globalPenticK
=
penticK
;
}
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendSextic
(
void
)
const
{
double
AmoebaOutOfPlaneBendForce
::
getAmoebaGlobalOutOfPlaneBendSextic
()
const
{
return
_globalSexticK
;
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendSextic
(
double
sexticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendSextic
(
double
sexticK
)
{
_globalSexticK
=
sexticK
;
}
...
...
@@ -82,7 +82,7 @@ int AmoebaOutOfPlaneBendForce::addOutOfPlaneBend(int particle1, int particle2, i
}
void
AmoebaOutOfPlaneBendForce
::
getOutOfPlaneBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
k
)
const
{
double
&
k
)
const
{
particle1
=
outOfPlaneBends
[
index
].
particle1
;
particle2
=
outOfPlaneBends
[
index
].
particle2
;
particle3
=
outOfPlaneBends
[
index
].
particle3
;
...
...
plugins/amoeba/openmmapi/src/AmoebaPiTorsionForce.cpp
View file @
eb232608
...
...
@@ -44,7 +44,7 @@ int AmoebaPiTorsionForce::addPiTorsion(int particle1, int particle2, int particl
return
piTorsions
.
size
()
-
1
;
}
void
AmoebaPiTorsionForce
::
getPiTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
particle6
,
double
&
k
)
const
{
void
AmoebaPiTorsionForce
::
getPiTorsionParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
int
&
particle5
,
int
&
particle6
,
double
&
k
)
const
{
particle1
=
piTorsions
[
index
].
particle1
;
particle2
=
piTorsions
[
index
].
particle2
;
particle3
=
piTorsions
[
index
].
particle3
;
...
...
@@ -54,7 +54,7 @@ void AmoebaPiTorsionForce::getPiTorsionParameters(int index, int& particle1, int
k
=
piTorsions
[
index
].
k
;
}
void
AmoebaPiTorsionForce
::
setPiTorsionParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
particle5
,
int
particle6
,
double
k
)
{
void
AmoebaPiTorsionForce
::
setPiTorsionParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
particle5
,
int
particle6
,
double
k
)
{
piTorsions
[
index
].
particle1
=
particle1
;
piTorsions
[
index
].
particle2
=
particle2
;
piTorsions
[
index
].
particle3
=
particle3
;
...
...
plugins/amoeba/openmmapi/src/AmoebaStretchBendForce.cpp
View file @
eb232608
...
...
@@ -46,7 +46,7 @@ int AmoebaStretchBendForce::addStretchBend(int particle1, int particle2, int par
}
void
AmoebaStretchBendForce
::
getStretchBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
lengthAB
,
double
&
lengthCB
,
double
&
angle
,
double
&
k1
,
double
&
k2
)
const
{
double
&
lengthAB
,
double
&
lengthCB
,
double
&
angle
,
double
&
k1
,
double
&
k2
)
const
{
particle1
=
stretchBends
[
index
].
particle1
;
particle2
=
stretchBends
[
index
].
particle2
;
particle3
=
stretchBends
[
index
].
particle3
;
...
...
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
View file @
eb232608
...
...
@@ -70,13 +70,13 @@ void AmoebaTorsionTorsionForce::setTorsionTorsionParameters(int index, int parti
torsionTorsions
[
index
].
gridIndex
=
gridIndex
;
}
const
TorsionTorsionGrid
&
AmoebaTorsionTorsionForce
::
getTorsionTorsionGrid
(
int
index
)
const
{
const
TorsionTorsionGrid
&
AmoebaTorsionTorsionForce
::
getTorsionTorsionGrid
(
int
index
)
const
{
return
torsionTorsionGrids
[
index
].
getTorsionTorsionGrid
();
}
void
AmoebaTorsionTorsionForce
::
setTorsionTorsionGrid
(
int
index
,
const
TorsionTorsionGrid
&
grid
)
{
if
(
index
>=
static_cast
<
int
>
(
torsionTorsionGrids
.
size
())
){
torsionTorsionGrids
.
resize
(
index
+
1
);
void
AmoebaTorsionTorsionForce
::
setTorsionTorsionGrid
(
int
index
,
const
TorsionTorsionGrid
&
grid
)
{
if
(
index
>=
static_cast
<
int
>
(
torsionTorsionGrids
.
size
()))
{
torsionTorsionGrids
.
resize
(
index
+
1
);
}
torsionTorsionGrids
[
index
]
=
grid
;
}
...
...
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForceImpl.cpp
View file @
eb232608
...
...
@@ -70,12 +70,11 @@ typedef std::map< double, Map_Double_IntPair > Map_Double_MapDoubleIntPair;
typedef
Map_Double_MapDoubleIntPair
::
iterator
Map_Double_MapDoubleIntPairI
;
typedef
Map_Double_MapDoubleIntPair
::
const_iterator
Map_Double_MapDoubleIntPairCI
;
void
AmoebaTorsionTorsionForceImpl
::
reorderGrid
(
const
TorsionTorsionGrid
&
grid
,
TorsionTorsionGrid
&
reorderedGrid
){
void
AmoebaTorsionTorsionForceImpl
::
reorderGrid
(
const
TorsionTorsionGrid
&
grid
,
TorsionTorsionGrid
&
reorderedGrid
)
{
reorderedGrid
.
resize
(
grid
.
size
()
);
std
::
vector
<
Map_Double_IntPair
>
map_Double_IntPair_Vector
(
grid
.
size
()
);
reorderedGrid
.
resize
(
grid
.
size
());
std
::
vector
<
Map_Double_IntPair
>
map_Double_IntPair_Vector
(
grid
.
size
());
Map_Double_MapDoubleIntPair
mapAngles
;
//(void) fprintf( stderr, "AmoebaTorsionTorsionForceImpl::reorder grid\n" );
// (1) set dimensions for reorderd grid
// (2) build map:
...
...
@@ -84,27 +83,27 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid( const TorsionTorsionGrid& grid,
for
(
unsigned
int
ii
=
0
;
ii
<
grid
.
size
();
ii
++
)
{
reorderedGrid
[
ii
].
resize
(
grid
[
ii
].
size
()
);
reorderedGrid
[
ii
].
resize
(
grid
[
ii
].
size
());
for
(
unsigned
int
jj
=
0
;
jj
<
grid
[
ii
].
size
();
jj
++
)
{
reorderedGrid
[
ii
][
jj
].
resize
(
grid
[
ii
][
jj
].
size
()
);
reorderedGrid
[
ii
][
jj
].
resize
(
grid
[
ii
][
jj
].
size
());
double
angleX
=
grid
[
ii
][
jj
][
0
];
double
angleY
=
grid
[
ii
][
jj
][
1
];
if
(
mapAngles
.
find
(
angleX
)
==
mapAngles
.
end
()
){
if
(
map_Double_IntPair_Vector
[
ii
].
size
()
>
0
){
if
(
mapAngles
.
find
(
angleX
)
==
mapAngles
.
end
())
{
if
(
map_Double_IntPair_Vector
[
ii
].
size
()
>
0
)
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"TorsionTorsion grid reorder: x-angle not set correctly: x=%15.7e y=%15.7e size=%u should be zero; ii/jj indies=%u %u.
\n
"
,
angleX
,
angleY
,
static_cast
<
unsigned
int
>
(
map_Double_IntPair_Vector
[
ii
].
size
()),
ii
,
jj
);
(
void
)
sprintf
(
buffer
,
"TorsionTorsion grid reorder: x-angle not set correctly: x=%15.7e y=%15.7e size=%u should be zero; ii/jj indies=%u %u.
\n
"
,
angleX
,
angleY
,
static_cast
<
unsigned
int
>
(
map_Double_IntPair_Vector
[
ii
].
size
()),
ii
,
jj
);
throw
OpenMMException
(
buffer
);
}
mapAngles
[
angleX
]
=
map_Double_IntPair_Vector
[
ii
];
}
Map_Double_IntPair
&
map_Double_IntPair
=
mapAngles
[
angleX
];
if
(
map_Double_IntPair
.
find
(
angleY
)
!=
map_Double_IntPair
.
end
()
){
if
(
map_Double_IntPair
.
find
(
angleY
)
!=
map_Double_IntPair
.
end
())
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"TorsionTorsion grid reorder: angle pair found twice: %15.7e %15.7e %u
\n
"
,
angleX
,
angleY
,
static_cast
<
unsigned
int
>
(
map_Double_IntPair
.
size
())
);
(
void
)
sprintf
(
buffer
,
"TorsionTorsion grid reorder: angle pair found twice: %15.7e %15.7e %u
\n
"
,
angleX
,
angleY
,
static_cast
<
unsigned
int
>
(
map_Double_IntPair
.
size
()));
throw
OpenMMException
(
buffer
);
}
struct
IntPair
pair
;
...
...
@@ -114,24 +113,6 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid( const TorsionTorsionGrid& grid,
}
}
#if 0
(void) fprintf( stderr, "TorsionTorsion grid reorder map\n" );
for( Map_Double_MapDoubleIntPairCI ii = mapAngles.begin(); ii != mapAngles.end(); ii++ ){
double angleX = ii->first;
Map_Double_IntPair map_Double_IntPair = ii->second;
(void) fprintf( stderr, " %15.7e %u \n", angleX, static_cast<unsigned int>(map_Double_IntPair.size()) );
}
for( Map_Double_MapDoubleIntPairCI ii = mapAngles.begin(); ii != mapAngles.end(); ii++ ){
double angleX = ii->first;
Map_Double_IntPair map_Double_IntPair = ii->second;
for( Map_Double_IntPairCI jj = map_Double_IntPair.begin(); jj != map_Double_IntPair.end(); jj++ ){
double angle = jj->first;
struct IntPair pair = jj->second;
(void) fprintf( stderr, " %15.7e %15.7e %d %d\n", angleX, angle, pair.index1, pair.index2 );
}
}
#endif
// load reordered entries
Map_Double_MapDoubleIntPairCI
mapII
=
mapAngles
.
begin
();
...
...
@@ -144,7 +125,6 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid( const TorsionTorsionGrid& grid,
struct
IntPair
pair
=
mapJJ
->
second
;
int
index1
=
pair
.
index1
;
int
index2
=
pair
.
index2
;
//(void) fprintf( stderr, " %3d %3d %15.7e %15.7e %3d %3d zzz\n", ii, jj, mapII->first, mapJJ->first, index1, index2 );
for
(
unsigned
int
kk
=
0
;
kk
<
grid
[
ii
][
jj
].
size
();
kk
++
)
{
reorderedGrid
[
ii
][
jj
][
kk
]
=
static_cast
<
float
>
(
grid
[
index1
][
index2
][
kk
]);
...
...
@@ -153,12 +133,12 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid( const TorsionTorsionGrid& grid,
// increment map iterators
mapJJ
++
;
if
(
mapJJ
==
map_Double_IntPair
.
end
()
){
if
(
mapJJ
==
map_Double_IntPair
.
end
())
{
mapII
++
;
if
(
mapII
==
mapAngles
.
end
()
){
if
(
(
jj
!=
(
grid
[
ii
].
size
()
-
1
))
&&
(
ii
!=
(
grid
.
size
()
-
1
))
){
if
(
mapII
==
mapAngles
.
end
())
{
if
(
(
jj
!=
(
grid
[
ii
].
size
()
-
1
))
&&
(
ii
!=
(
grid
.
size
()
-
1
)))
{
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"AmoebaTorsionTorsionForceImpl::reorderGrid: error detected with map iterators.
\n
"
);
(
void
)
sprintf
(
buffer
,
"AmoebaTorsionTorsionForceImpl::reorderGrid: error detected with map iterators.
\n
"
);
throw
OpenMMException
(
buffer
);
}
}
else
{
...
...
plugins/amoeba/openmmapi/src/AmoebaVdwForce.cpp
View file @
eb232608
...
...
@@ -41,13 +41,13 @@ using std::vector;
AmoebaVdwForce
::
AmoebaVdwForce
()
:
nonbondedMethod
(
NoCutoff
),
sigmaCombiningRule
(
"CUBIC-MEAN"
),
epsilonCombiningRule
(
"HHG"
),
cutoff
(
1.0e+10
),
useDispersionCorrection
(
true
)
{
}
int
AmoebaVdwForce
::
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
)
{
int
AmoebaVdwForce
::
addParticle
(
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
)
{
parameters
.
push_back
(
VdwInfo
(
parentIndex
,
sigma
,
epsilon
,
reductionFactor
));
return
parameters
.
size
()
-
1
;
}
void
AmoebaVdwForce
::
getParticleParameters
(
int
particleIndex
,
int
&
parentIndex
,
double
&
sigma
,
double
&
epsilon
,
double
&
reductionFactor
)
const
{
double
&
sigma
,
double
&
epsilon
,
double
&
reductionFactor
)
const
{
parentIndex
=
parameters
[
particleIndex
].
parentIndex
;
sigma
=
parameters
[
particleIndex
].
sigma
;
epsilon
=
parameters
[
particleIndex
].
epsilon
;
...
...
@@ -55,54 +55,54 @@ void AmoebaVdwForce::getParticleParameters(int particleIndex, int& parentIndex,
}
void
AmoebaVdwForce
::
setParticleParameters
(
int
particleIndex
,
int
parentIndex
,
double
sigma
,
double
epsilon
,
double
reductionFactor
)
{
double
sigma
,
double
epsilon
,
double
reductionFactor
)
{
parameters
[
particleIndex
].
parentIndex
=
parentIndex
;
parameters
[
particleIndex
].
sigma
=
sigma
;
parameters
[
particleIndex
].
epsilon
=
epsilon
;
parameters
[
particleIndex
].
reductionFactor
=
reductionFactor
;
}
void
AmoebaVdwForce
::
setSigmaCombiningRule
(
const
std
::
string
&
inputSigmaCombiningRule
)
{
void
AmoebaVdwForce
::
setSigmaCombiningRule
(
const
std
::
string
&
inputSigmaCombiningRule
)
{
sigmaCombiningRule
=
inputSigmaCombiningRule
;
}
const
std
::
string
&
AmoebaVdwForce
::
getSigmaCombiningRule
(
void
)
const
{
const
std
::
string
&
AmoebaVdwForce
::
getSigmaCombiningRule
()
const
{
return
sigmaCombiningRule
;
}
void
AmoebaVdwForce
::
setEpsilonCombiningRule
(
const
std
::
string
&
inputEpsilonCombiningRule
)
{
void
AmoebaVdwForce
::
setEpsilonCombiningRule
(
const
std
::
string
&
inputEpsilonCombiningRule
)
{
epsilonCombiningRule
=
inputEpsilonCombiningRule
;
}
const
std
::
string
&
AmoebaVdwForce
::
getEpsilonCombiningRule
(
void
)
const
{
const
std
::
string
&
AmoebaVdwForce
::
getEpsilonCombiningRule
()
const
{
return
epsilonCombiningRule
;
}
void
AmoebaVdwForce
::
setParticleExclusions
(
int
particleIndex
,
const
std
::
vector
<
int
>&
inputExclusions
)
{
void
AmoebaVdwForce
::
setParticleExclusions
(
int
particleIndex
,
const
std
::
vector
<
int
>&
inputExclusions
)
{
if
(
exclusions
.
size
()
<
parameters
.
size
()
){
exclusions
.
resize
(
parameters
.
size
()
);
if
(
exclusions
.
size
()
<
parameters
.
size
())
{
exclusions
.
resize
(
parameters
.
size
());
}
if
(
static_cast
<
int
>
(
exclusions
.
size
())
<
particleIndex
){
exclusions
.
resize
(
particleIndex
+
10
);
if
(
static_cast
<
int
>
(
exclusions
.
size
())
<
particleIndex
)
{
exclusions
.
resize
(
particleIndex
+
10
);
}
for
(
unsigned
int
ii
=
0
;
ii
<
inputExclusions
.
size
();
ii
++
){
exclusions
[
particleIndex
].
push_back
(
inputExclusions
[
ii
]
);
for
(
unsigned
int
ii
=
0
;
ii
<
inputExclusions
.
size
();
ii
++
)
{
exclusions
[
particleIndex
].
push_back
(
inputExclusions
[
ii
]);
}
}
void
AmoebaVdwForce
::
getParticleExclusions
(
int
particleIndex
,
std
::
vector
<
int
>&
outputExclusions
)
const
{
void
AmoebaVdwForce
::
getParticleExclusions
(
int
particleIndex
,
std
::
vector
<
int
>&
outputExclusions
)
const
{
if
(
particleIndex
<
static_cast
<
int
>
(
exclusions
.
size
())
){
outputExclusions
.
resize
(
exclusions
[
particleIndex
].
size
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
exclusions
[
particleIndex
].
size
();
ii
++
){
if
(
particleIndex
<
static_cast
<
int
>
(
exclusions
.
size
()))
{
outputExclusions
.
resize
(
exclusions
[
particleIndex
].
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
exclusions
[
particleIndex
].
size
();
ii
++
)
{
outputExclusions
[
ii
]
=
exclusions
[
particleIndex
][
ii
];
}
}
}
void
AmoebaVdwForce
::
setCutoff
(
double
inputCutoff
){
void
AmoebaVdwForce
::
setCutoff
(
double
inputCutoff
)
{
cutoff
=
inputCutoff
;
}
...
...
Prev
1
…
4
5
6
7
8
9
10
11
12
…
14
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