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
d95b90b9
Commit
d95b90b9
authored
Feb 23, 2015
by
peastman
Browse files
Cleaned up formatting in AMOEBA code
parent
a568bb12
Changes
77
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
169 additions
and
169 deletions
+169
-169
libraries/validate/include/ValidateOpenMM.h
libraries/validate/include/ValidateOpenMM.h
+2
-2
libraries/validate/include/ValidateOpenMMForces.h
libraries/validate/include/ValidateOpenMMForces.h
+36
-36
libraries/validate/src/ValidateOpenMM.cpp
libraries/validate/src/ValidateOpenMM.cpp
+2
-2
libraries/validate/src/ValidateOpenMMForces.cpp
libraries/validate/src/ValidateOpenMMForces.cpp
+12
-12
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
+8
-8
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+6
-6
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+8
-8
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
+7
-7
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
+6
-6
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
+5
-5
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
+8
-8
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
+28
-28
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
+24
-24
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
+5
-5
No files found.
libraries/validate/include/ValidateOpenMM.h
View file @
d95b90b9
...
@@ -83,7 +83,7 @@ typedef StringStringVectorMap::const_iterator StringStringVectorMapCI;
...
@@ -83,7 +83,7 @@ typedef StringStringVectorMap::const_iterator StringStringVectorMapCI;
class
ValidateOpenMM
{
class
ValidateOpenMM
{
public:
public:
ValidateOpenMM
(
void
);
ValidateOpenMM
();
~
ValidateOpenMM
();
~
ValidateOpenMM
();
// force names
// force names
...
@@ -166,7 +166,7 @@ public:
...
@@ -166,7 +166,7 @@ public:
* @return log
* @return log
*
*
*/
*/
FILE
*
getLog
(
)
const
;
FILE
*
getLog
()
const
;
/**
/**
*
*
...
...
libraries/validate/include/ValidateOpenMMForces.h
View file @
d95b90b9
...
@@ -41,7 +41,7 @@ typedef MapIntInt::const_iterator MapIntIntCI;
...
@@ -41,7 +41,7 @@ typedef MapIntInt::const_iterator MapIntIntCI;
class
ForceValidationResult
{
class
ForceValidationResult
{
public:
public:
ForceValidationResult
(
const
Context
&
context1
,
const
Context
&
context2
,
StringUIntMap
&
forceNamesMap
);
ForceValidationResult
(
const
Context
&
context1
,
const
Context
&
context2
,
StringUIntMap
&
forceNamesMap
);
~
ForceValidationResult
();
~
ForceValidationResult
();
/**
/**
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
*
*
* @throws OpenMMException if energyIndex is not 0 or 1
* @throws OpenMMException if energyIndex is not 0 or 1
*/
*/
double
getPotentialEnergy
(
int
energyIndex
)
const
;
double
getPotentialEnergy
(
int
energyIndex
)
const
;
/**
/**
* Get array of forces at specified platform index (0 || 1)
* Get array of forces at specified platform index (0 || 1)
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
*
*
* @throws OpenMMException if forceIndex is not 0 or 1
* @throws OpenMMException if forceIndex is not 0 or 1
*/
*/
std
::
vector
<
double
>
getForceNorms
(
int
forceIndex
)
const
;
std
::
vector
<
double
>
getForceNorms
(
int
forceIndex
)
const
;
/**
/**
* Get array of forces at platform index (0 || 1)
* Get array of forces at platform index (0 || 1)
...
@@ -69,7 +69,7 @@ public:
...
@@ -69,7 +69,7 @@ public:
*
*
* @throws OpenMMException if forceIndex is not 0 or 1
* @throws OpenMMException if forceIndex is not 0 or 1
*/
*/
std
::
vector
<
Vec3
>
getForces
(
int
forceIndex
)
const
;
std
::
vector
<
Vec3
>
getForces
(
int
forceIndex
)
const
;
/**
/**
* Get maximum delta in force norm
* Get maximum delta in force norm
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
*
*
* @return max delta in norm of forces
* @return max delta in norm of forces
*/
*/
double
getMaxDeltaForceNorm
(
int
*
maxIndex
=
NULL
)
const
;
double
getMaxDeltaForceNorm
(
int
*
maxIndex
=
NULL
)
const
;
/**
/**
* Get maximum relative delta in force norm
* Get maximum relative delta in force norm
...
@@ -87,7 +87,7 @@ public:
...
@@ -87,7 +87,7 @@ public:
*
*
* @return max relative delta in norm of forces
* @return max relative delta in norm of forces
*/
*/
double
getMaxRelativeDeltaForceNorm
(
int
*
maxIndex
=
NULL
)
const
;
double
getMaxRelativeDeltaForceNorm
(
int
*
maxIndex
=
NULL
)
const
;
/**
/**
* Get maximum dot product between forces
* Get maximum dot product between forces
...
@@ -96,7 +96,7 @@ public:
...
@@ -96,7 +96,7 @@ public:
*
*
* @return max dot product between forces
* @return max dot product between forces
*/
*/
double
getMaxDotProduct
(
int
*
maxIndex
=
NULL
)
const
;
double
getMaxDotProduct
(
int
*
maxIndex
=
NULL
)
const
;
/**
/**
* Get name of force associated w/ computed results
* Get name of force associated w/ computed results
...
@@ -104,7 +104,7 @@ public:
...
@@ -104,7 +104,7 @@ public:
* @return force name(s); if more than one force active in computation,
* @return force name(s); if more than one force active in computation,
* then names are concatenated and separated by '::' (e.g., 'NB_FORCE::GBSA_OBC_FORCE')
* then names are concatenated and separated by '::' (e.g., 'NB_FORCE::GBSA_OBC_FORCE')
*/
*/
std
::
string
getForceName
(
void
)
const
;
std
::
string
getForceName
()
const
;
/**
/**
* Get platform name
* Get platform name
...
@@ -115,7 +115,7 @@ public:
...
@@ -115,7 +115,7 @@ public:
*
*
* @throws OpenMMException if index is not 0 or 1
* @throws OpenMMException if index is not 0 or 1
*/
*/
std
::
string
getPlatformName
(
int
index
)
const
;
std
::
string
getPlatformName
(
int
index
)
const
;
/**
/**
* Register index of two entries that differ by a specified tolerance
* Register index of two entries that differ by a specified tolerance
...
@@ -123,46 +123,46 @@ public:
...
@@ -123,46 +123,46 @@ public:
* @param index inconsistent index
* @param index inconsistent index
*
*
*/
*/
void
registerInconsistentForceIndex
(
int
index
,
int
value
=
1
);
void
registerInconsistentForceIndex
(
int
index
,
int
value
=
1
);
/**
/**
* Clear list of entries that differ by a specified tolerance
* Clear list of entries that differ by a specified tolerance
*
*
*/
*/
void
clearInconsistentForceIndexList
(
void
);
void
clearInconsistentForceIndexList
();
/**
/**
* Get list of entries that differ by a specified tolerance
* Get list of entries that differ by a specified tolerance
*
*
*/
*/
void
getInconsistentForceIndexList
(
std
::
vector
<
int
>&
inconsistentIndices
)
const
;
void
getInconsistentForceIndexList
(
std
::
vector
<
int
>&
inconsistentIndices
)
const
;
/**
/**
* Get number of entries in inconsistent index list
* Get number of entries in inconsistent index list
*
*
*/
*/
int
getNumberOfInconsistentForceEntries
(
void
)
const
;
int
getNumberOfInconsistentForceEntries
()
const
;
/**
/**
* Return true if nans were detected
* Return true if nans were detected
*
*
* @return true if nans were detected
* @return true if nans were detected
*/
*/
int
nansDetected
(
void
)
const
;
int
nansDetected
()
const
;
/**
/**
* Determine if force norms are valid
* Determine if force norms are valid
*
*
* @param tolerance tolerance
* @param tolerance tolerance
*/
*/
void
compareForceNorms
(
double
tolerance
);
void
compareForceNorms
(
double
tolerance
);
/**
/**
* Determine if forces are valid
* Determine if forces are valid
*
*
* @param tolerance tolerance
* @param tolerance tolerance
*/
*/
void
compareForces
(
double
tolerance
);
void
compareForces
(
double
tolerance
);
private:
private:
...
@@ -193,13 +193,13 @@ private:
...
@@ -193,13 +193,13 @@ private:
* Calculate norms of vectors
* Calculate norms of vectors
*
*
*/
*/
void
_calculateNorms
(
void
);
void
_calculateNorms
();
/**
/**
* Calculate norms of specified vector
* Calculate norms of specified vector
*
*
*/
*/
void
_calculateNormOfForceVector
(
int
forceIndex
);
void
_calculateNormOfForceVector
(
int
forceIndex
);
// stat indices
// stat indices
...
@@ -216,7 +216,7 @@ private:
...
@@ -216,7 +216,7 @@ private:
* Find vector stats
* Find vector stats
*
*
*/
*/
void
_findStatsForDouble
(
const
std
::
vector
<
double
>&
array
,
std
::
vector
<
double
>&
statVector
)
const
;
void
_findStatsForDouble
(
const
std
::
vector
<
double
>&
array
,
std
::
vector
<
double
>&
statVector
)
const
;
};
};
// Class used to compare forces/potential energies on two platforms
// Class used to compare forces/potential energies on two platforms
...
@@ -224,7 +224,7 @@ private:
...
@@ -224,7 +224,7 @@ private:
class
ValidateOpenMMForces
:
public
ValidateOpenMM
{
class
ValidateOpenMMForces
:
public
ValidateOpenMM
{
public:
public:
OPENMM_VALIDATE_EXPORT
ValidateOpenMMForces
(
void
);
OPENMM_VALIDATE_EXPORT
ValidateOpenMMForces
();
OPENMM_VALIDATE_EXPORT
~
ValidateOpenMMForces
();
OPENMM_VALIDATE_EXPORT
~
ValidateOpenMMForces
();
/**
/**
...
@@ -236,7 +236,7 @@ public:
...
@@ -236,7 +236,7 @@ public:
*
*
* @return number of inconsistent entries
* @return number of inconsistent entries
*/
*/
int
OPENMM_VALIDATE_EXPORT
compareWithReferencePlatform
(
Context
&
context
,
std
::
string
*
summaryString
=
NULL
);
int
OPENMM_VALIDATE_EXPORT
compareWithReferencePlatform
(
Context
&
context
,
std
::
string
*
summaryString
=
NULL
);
/**
/**
* Validate force/energy by comparing the results between the forces/energies computed on two different platforms
* Validate force/energy by comparing the results between the forces/energies computed on two different platforms
...
@@ -250,7 +250,7 @@ public:
...
@@ -250,7 +250,7 @@ public:
* on the two input platforms
* on the two input platforms
*/
*/
ForceValidationResult
*
compareForce
(
Context
&
context
,
std
::
vector
<
int
>&
compareForces
,
ForceValidationResult
*
compareForce
(
Context
&
context
,
std
::
vector
<
int
>&
compareForces
,
Platform
&
platform1
,
Platform
&
platform2
)
const
;
Platform
&
platform1
,
Platform
&
platform2
)
const
;
/**
/**
* Compare individual forces by comparing calculations across two platforms (platform associated w/ input context and
* Compare individual forces by comparing calculations across two platforms (platform associated w/ input context and
...
@@ -261,42 +261,42 @@ public:
...
@@ -261,42 +261,42 @@ public:
* @param forceValidationResults output vector of ForceValidationResult ptrs (user is responsible for deleting
* @param forceValidationResults output vector of ForceValidationResult ptrs (user is responsible for deleting
* individual ForceValidationResult objects)
* individual ForceValidationResult objects)
*/
*/
void
compareOpenMMForces
(
Context
&
context
,
Platform
&
comparisonPlatform
,
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
void
compareOpenMMForces
(
Context
&
context
,
Platform
&
comparisonPlatform
,
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
/**
/**
* Determine if results are consistent
* Determine if results are consistent
*
*
* @param forceValidationResults vector of ForceValidationResult ptrs to check if forces are consistent
* @param forceValidationResults vector of ForceValidationResult ptrs to check if forces are consistent
*/
*/
void
checkForInconsistentForceEntries
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
void
checkForInconsistentForceEntries
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
/**
/**
* Get total number of force entries that are inconsistent
* Get total number of force entries that are inconsistent
*
*
* @param forceValidationResults vector of ForceValidationResult ptrs to check if forces are consistent
* @param forceValidationResults vector of ForceValidationResult ptrs to check if forces are consistent
*/
*/
int
getTotalNumberOfInconsistentForceEntries
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
int
getTotalNumberOfInconsistentForceEntries
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
/**
/**
* Get summary string of results
* Get summary string of results
*
*
* @param forceValidationResults vector of ForceValidationResult ptrs
* @param forceValidationResults vector of ForceValidationResult ptrs
*/
*/
std
::
string
getSummary
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
std
::
string
getSummary
(
std
::
vector
<
ForceValidationResult
*>&
forceValidationResults
)
const
;
/**
/**
* Set force tolerance
* Set force tolerance
*
*
* @param tolerance force tolerance
* @param tolerance force tolerance
*/
*/
void
setForceTolerance
(
double
tolerance
);
void
setForceTolerance
(
double
tolerance
);
/**
/**
* Get force tolerance
* Get force tolerance
*
*
* @return force tolerance
* @return force tolerance
*/
*/
double
getForceTolerance
(
void
)
const
;
double
getForceTolerance
()
const
;
/*
/*
* Get force tolerance for specified force
* Get force tolerance for specified force
...
@@ -307,7 +307,7 @@ public:
...
@@ -307,7 +307,7 @@ public:
*
*
* */
* */
double
getForceTolerance
(
const
std
::
string
&
forceName
)
const
;
double
getForceTolerance
(
const
std
::
string
&
forceName
)
const
;
/*
/*
* Get max errors to print in summary string
* Get max errors to print in summary string
...
@@ -316,7 +316,7 @@ public:
...
@@ -316,7 +316,7 @@ public:
*
*
* */
* */
int
getMaxErrorsToPrint
(
void
)
const
;
int
getMaxErrorsToPrint
()
const
;
/*
/*
* Set max errors to print in summary string
* Set max errors to print in summary string
...
@@ -325,7 +325,7 @@ public:
...
@@ -325,7 +325,7 @@ public:
*
*
* */
* */
void
setMaxErrorsToPrint
(
int
maxErrorsToPrint
);
void
setMaxErrorsToPrint
(
int
maxErrorsToPrint
);
/*
/*
* Return true if force is not to be validated (Andersen thermostat, CM motion remover, ...)
* Return true if force is not to be validated (Andersen thermostat, CM motion remover, ...)
...
@@ -335,13 +335,13 @@ public:
...
@@ -335,13 +335,13 @@ public:
* @return true if force is not currently validated
* @return true if force is not currently validated
**/
**/
int
isExcludedForce
(
std
::
string
forceName
)
const
;
int
isExcludedForce
(
std
::
string
forceName
)
const
;
private:
private:
// initialize class entries
// initialize class entries
void
_initialize
(
void
);
void
_initialize
();
/*
/*
* Format output line
* Format output line
...
@@ -354,9 +354,9 @@ private:
...
@@ -354,9 +354,9 @@ private:
*
*
* */
* */
std
::
string
_getLine
(
const
std
::
string
&
tab
,
std
::
string
_getLine
(
const
std
::
string
&
tab
,
const
std
::
string
&
description
,
const
std
::
string
&
description
,
const
std
::
string
&
value
)
const
;
const
std
::
string
&
value
)
const
;
std
::
vector
<
ForceValidationResult
*>
_forceValidationResults
;
std
::
vector
<
ForceValidationResult
*>
_forceValidationResults
;
...
...
libraries/validate/src/ValidateOpenMM.cpp
View file @
d95b90b9
...
@@ -54,7 +54,7 @@ const std::string ValidateOpenMM::CUSTOM_EXTERNAL_FORCE = "CustomExter
...
@@ -54,7 +54,7 @@ const std::string ValidateOpenMM::CUSTOM_EXTERNAL_FORCE = "CustomExter
const
std
::
string
ValidateOpenMM
::
CUSTOM_NONBONDED_FORCE
=
"CustomNonBonded"
;
const
std
::
string
ValidateOpenMM
::
CUSTOM_NONBONDED_FORCE
=
"CustomNonBonded"
;
ValidateOpenMM
::
ValidateOpenMM
(
void
)
{
ValidateOpenMM
::
ValidateOpenMM
()
{
_log
=
NULL
;
_log
=
NULL
;
...
@@ -82,7 +82,7 @@ int ValidateOpenMM::isNanOrInfinity( double number ){
...
@@ -82,7 +82,7 @@ int ValidateOpenMM::isNanOrInfinity( double number ){
return
(
number
!=
number
||
number
==
std
::
numeric_limits
<
double
>::
infinity
()
||
number
==
-
std
::
numeric_limits
<
double
>::
infinity
())
?
1
:
0
;
return
(
number
!=
number
||
number
==
std
::
numeric_limits
<
double
>::
infinity
()
||
number
==
-
std
::
numeric_limits
<
double
>::
infinity
())
?
1
:
0
;
}
}
FILE
*
ValidateOpenMM
::
getLog
(
void
)
const
{
FILE
*
ValidateOpenMM
::
getLog
()
const
{
return
_log
;
return
_log
;
}
}
...
...
libraries/validate/src/ValidateOpenMMForces.cpp
View file @
d95b90b9
...
@@ -68,7 +68,7 @@ ForceValidationResult::ForceValidationResult( const Context& context1, const Con
...
@@ -68,7 +68,7 @@ ForceValidationResult::ForceValidationResult( const Context& context1, const Con
ForceValidationResult
::~
ForceValidationResult
(
){
ForceValidationResult
::~
ForceValidationResult
(
){
}
}
void
ForceValidationResult
::
_calculateNorms
(
void
){
void
ForceValidationResult
::
_calculateNorms
(){
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -195,7 +195,7 @@ std::vector<double> ForceValidationResult::getForceNorms( int forceIndex ) cons
...
@@ -195,7 +195,7 @@ std::vector<double> ForceValidationResult::getForceNorms( int forceIndex ) cons
}
}
}
}
int
ForceValidationResult
::
nansDetected
(
void
)
const
{
int
ForceValidationResult
::
nansDetected
()
const
{
return
_nansDetected
;
return
_nansDetected
;
}
}
...
@@ -203,7 +203,7 @@ void ForceValidationResult::registerInconsistentForceIndex( int index, int value
...
@@ -203,7 +203,7 @@ void ForceValidationResult::registerInconsistentForceIndex( int index, int value
_inconsistentForceIndicies
[
index
]
=
value
;
_inconsistentForceIndicies
[
index
]
=
value
;
}
}
void
ForceValidationResult
::
clearInconsistentForceIndexList
(
void
){
void
ForceValidationResult
::
clearInconsistentForceIndexList
(){
_inconsistentForceIndicies
.
clear
();
_inconsistentForceIndicies
.
clear
();
}
}
...
@@ -213,7 +213,7 @@ void ForceValidationResult::getInconsistentForceIndexList( std::vector<int>& inc
...
@@ -213,7 +213,7 @@ void ForceValidationResult::getInconsistentForceIndexList( std::vector<int>& inc
}
}
}
}
int
ForceValidationResult
::
getNumberOfInconsistentForceEntries
(
void
)
const
{
int
ForceValidationResult
::
getNumberOfInconsistentForceEntries
()
const
{
return
static_cast
<
int
>
(
_inconsistentForceIndicies
.
size
()
);
return
static_cast
<
int
>
(
_inconsistentForceIndicies
.
size
()
);
}
}
...
@@ -329,7 +329,7 @@ double ForceValidationResult::getMaxDotProduct( int* maxIndex ) const {
...
@@ -329,7 +329,7 @@ double ForceValidationResult::getMaxDotProduct( int* maxIndex ) const {
return
maxDotProduct
;
return
maxDotProduct
;
}
}
std
::
string
ForceValidationResult
::
getForceName
(
void
)
const
{
std
::
string
ForceValidationResult
::
getForceName
()
const
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -376,7 +376,7 @@ void ForceValidationResult::compareForces( double tolerance ){
...
@@ -376,7 +376,7 @@ void ForceValidationResult::compareForces( double tolerance ){
std
::
vector
<
Vec3
>
forces2
=
getForces
(
1
);
std
::
vector
<
Vec3
>
forces2
=
getForces
(
1
);
std
::
vector
<
double
>
forceNorms2
=
getForceNorms
(
1
);
std
::
vector
<
double
>
forceNorms2
=
getForceNorms
(
1
);
clearInconsistentForceIndexList
(
);
clearInconsistentForceIndexList
();
for
(
unsigned
int
jj
=
0
;
jj
<
forces1
.
size
();
jj
++
){
for
(
unsigned
int
jj
=
0
;
jj
<
forces1
.
size
();
jj
++
){
if
(
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms1
[
jj
]
)
||
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms2
[
jj
]
)
){
if
(
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms1
[
jj
]
)
||
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms2
[
jj
]
)
){
registerInconsistentForceIndex
(
jj
);
registerInconsistentForceIndex
(
jj
);
...
@@ -406,7 +406,7 @@ void ForceValidationResult::compareForceNorms( double tolerance ){
...
@@ -406,7 +406,7 @@ void ForceValidationResult::compareForceNorms( double tolerance ){
std
::
vector
<
double
>
forceNorms0
=
getForceNorms
(
0
);
std
::
vector
<
double
>
forceNorms0
=
getForceNorms
(
0
);
std
::
vector
<
double
>
forceNorms1
=
getForceNorms
(
1
);
std
::
vector
<
double
>
forceNorms1
=
getForceNorms
(
1
);
clearInconsistentForceIndexList
(
);
clearInconsistentForceIndexList
();
for
(
unsigned
int
jj
=
0
;
jj
<
forceNorms0
.
size
();
jj
++
){
for
(
unsigned
int
jj
=
0
;
jj
<
forceNorms0
.
size
();
jj
++
){
if
(
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms0
[
jj
]
)
||
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms1
[
jj
]
)
){
if
(
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms0
[
jj
]
)
||
ValidateOpenMM
::
isNanOrInfinity
(
forceNorms1
[
jj
]
)
){
registerInconsistentForceIndex
(
jj
);
registerInconsistentForceIndex
(
jj
);
...
@@ -420,11 +420,11 @@ void ForceValidationResult::compareForceNorms( double tolerance ){
...
@@ -420,11 +420,11 @@ void ForceValidationResult::compareForceNorms( double tolerance ){
}
}
}
}
ValidateOpenMMForces
::
ValidateOpenMMForces
(
void
)
{
ValidateOpenMMForces
::
ValidateOpenMMForces
()
{
_initialize
();
_initialize
();
}
}
void
ValidateOpenMMForces
::
_initialize
(
void
){
void
ValidateOpenMMForces
::
_initialize
(){
_forceTolerance
=
1.0e-02
;
_forceTolerance
=
1.0e-02
;
_maxErrorsToPrint
=
25
;
_maxErrorsToPrint
=
25
;
...
@@ -450,7 +450,7 @@ void ValidateOpenMMForces::_initialize( void ){
...
@@ -450,7 +450,7 @@ void ValidateOpenMMForces::_initialize( void ){
_forcesToBeExcluded
[
ANDERSEN_THERMOSTAT
]
=
1
;
_forcesToBeExcluded
[
ANDERSEN_THERMOSTAT
]
=
1
;
}
}
ValidateOpenMMForces
::~
ValidateOpenMMForces
(
){
ValidateOpenMMForces
::~
ValidateOpenMMForces
(){
for
(
unsigned
int
ii
=
0
;
ii
<
_forceValidationResults
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
_forceValidationResults
.
size
();
ii
++
){
delete
_forceValidationResults
[
ii
];
delete
_forceValidationResults
[
ii
];
...
@@ -459,7 +459,7 @@ ValidateOpenMMForces::~ValidateOpenMMForces( ){
...
@@ -459,7 +459,7 @@ ValidateOpenMMForces::~ValidateOpenMMForces( ){
}
}
double
ValidateOpenMMForces
::
getForceTolerance
(
void
)
const
{
double
ValidateOpenMMForces
::
getForceTolerance
()
const
{
return
_forceTolerance
;
return
_forceTolerance
;
}
}
...
@@ -706,7 +706,7 @@ double ValidateOpenMMForces::getForceTolerance( const std::string& forceName ) c
...
@@ -706,7 +706,7 @@ double ValidateOpenMMForces::getForceTolerance( const std::string& forceName ) c
return
_forceTolerance
;
return
_forceTolerance
;
}
}
int
ValidateOpenMMForces
::
getMaxErrorsToPrint
(
void
)
const
{
int
ValidateOpenMMForces
::
getMaxErrorsToPrint
()
const
{
return
_maxErrorsToPrint
;
return
_maxErrorsToPrint
;
}
}
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
View file @
d95b90b9
...
@@ -70,7 +70,7 @@ public:
...
@@ -70,7 +70,7 @@ public:
*
*
* @param cubicK the cubic force constant for the angle
* @param cubicK the cubic force constant for the angle
*/
*/
void
setAmoebaGlobalAngleCubic
(
double
cubicK
);
void
setAmoebaGlobalAngleCubic
(
double
cubicK
);
/**
/**
* Get the global cubic term
* Get the global cubic term
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
*
*
* @param quarticK the quartic force constant for the angle
* @param quarticK the quartic force constant for the angle
*/
*/
void
setAmoebaGlobalAngleQuartic
(
double
quarticK
);
void
setAmoebaGlobalAngleQuartic
(
double
quarticK
);
/**
/**
* Get the global quartic term
* Get the global quartic term
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
*
*
* @param penticK the pentic force constant for the angle
* @param penticK the pentic force constant for the angle
*/
*/
void
setAmoebaGlobalAnglePentic
(
double
penticK
);
void
setAmoebaGlobalAnglePentic
(
double
penticK
);
/**
/**
* Get the global pentic term
* Get the global pentic term
...
@@ -112,7 +112,7 @@ public:
...
@@ -112,7 +112,7 @@ public:
*
*
* @param sexticK the sextic force constant for the angle
* @param sexticK the sextic force constant for the angle
*/
*/
void
setAmoebaGlobalAngleSextic
(
double
sexticK
);
void
setAmoebaGlobalAngleSextic
(
double
sexticK
);
/**
/**
* Get the global sextic term
* Get the global sextic term
...
@@ -131,7 +131,7 @@ public:
...
@@ -131,7 +131,7 @@ public:
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @return the index of the angle that was added
* @return the index of the angle that was added
*/
*/
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
/**
/**
* Get the force field parameters for an angle term.
* Get the force field parameters for an angle term.
...
@@ -143,7 +143,7 @@ public:
...
@@ -143,7 +143,7 @@ public:
* @param length the equilibrium angle, measured in degress
* @param length the equilibrium angle, measured in degress
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @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
,
double
&
length
,
double
&
quadraticK
)
const
;
void
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
double
&
length
,
double
&
quadraticK
)
const
;
/**
/**
* Set the force field parameters for an angle term.
* Set the force field parameters for an angle term.
...
@@ -155,7 +155,7 @@ public:
...
@@ -155,7 +155,7 @@ public:
* @param length the equilibrium angle, measured in degrees
* @param length the equilibrium angle, measured in degrees
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @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
,
double
length
,
double
quadraticK
);
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
/**
/**
* Update the per-angle parameters in a Context to match those stored in this Force object. This method provides
* 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.
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
@@ -195,7 +195,7 @@ public:
...
@@ -195,7 +195,7 @@ public:
particle1
=
particle2
=
particle3
=
-
1
;
particle1
=
particle2
=
particle3
=
-
1
;
length
=
quadraticK
=
0.0
;
length
=
quadraticK
=
0.0
;
}
}
AngleInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
:
AngleInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
)
:
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
length
(
length
),
quadraticK
(
quadraticK
)
{
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
length
(
length
),
quadraticK
(
quadraticK
)
{
}
}
};
};
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
d95b90b9
...
@@ -71,7 +71,7 @@ public:
...
@@ -71,7 +71,7 @@ public:
*
*
* @param cubicK the cubic force constant for the bond
* @param cubicK the cubic force constant for the bond
*/
*/
void
setAmoebaGlobalBondCubic
(
double
cubicK
);
void
setAmoebaGlobalBondCubic
(
double
cubicK
);
/**
/**
* Get the global cubic term
* Get the global cubic term
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
*
*
* @param quarticK the quartic force constant for the bond
* @param quarticK the quartic force constant for the bond
*/
*/
void
setAmoebaGlobalBondQuartic
(
double
quarticK
);
void
setAmoebaGlobalBondQuartic
(
double
quarticK
);
/**
/**
* Get the global quartic term
* Get the global quartic term
...
@@ -104,7 +104,7 @@ public:
...
@@ -104,7 +104,7 @@ public:
* @return the index of the bond that was added
* @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.
* Get the force field parameters for a bond term.
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
* @param quadratic k the quadratic force constant for the bond
* @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.
* Set the force field parameters for a bond term.
...
@@ -127,7 +127,7 @@ public:
...
@@ -127,7 +127,7 @@ public:
* @param length the equilibrium length of the bond, measured in nm
* @param length the equilibrium length of the bond, measured in nm
* @param k the quadratic force constant for the bond
* @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
* 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.
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
@@ -167,7 +167,7 @@ public:
...
@@ -167,7 +167,7 @@ public:
particle1
=
particle2
=
-
1
;
particle1
=
particle2
=
-
1
;
length
=
quadraticK
=
0.0
;
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
)
{
particle1
(
particle1
),
particle2
(
particle2
),
length
(
length
),
quadraticK
(
quadraticK
)
{
}
}
};
};
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
d95b90b9
...
@@ -152,7 +152,7 @@ public:
...
@@ -152,7 +152,7 @@ public:
/**
/**
* Set the surface area factor kJ/(nm*nm) used in SASA contribution
* 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
* 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.
* 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 @
d95b90b9
...
@@ -70,7 +70,7 @@ public:
...
@@ -70,7 +70,7 @@ public:
*
*
* @param cubicK the cubic force constant for the angle
* @param cubicK the cubic force constant for the angle
*/
*/
void
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
);
void
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
);
/**
/**
* Get the global cubic term
* Get the global cubic term
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
*
*
* @param quarticK the quartic force constant for the angle
* @param quarticK the quartic force constant for the angle
*/
*/
void
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
);
void
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
);
/**
/**
* Get the global quartic term
* Get the global quartic term
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
*
*
* @param penticK the pentic force constant for the angle
* @param penticK the pentic force constant for the angle
*/
*/
void
setAmoebaGlobalInPlaneAnglePentic
(
double
penticK
);
void
setAmoebaGlobalInPlaneAnglePentic
(
double
penticK
);
/**
/**
* Get the global pentic term
* Get the global pentic term
...
@@ -112,7 +112,7 @@ public:
...
@@ -112,7 +112,7 @@ public:
*
*
* @param sexticK the sextic force constant for the angle
* @param sexticK the sextic force constant for the angle
*/
*/
void
setAmoebaGlobalInPlaneAngleSextic
(
double
sexticK
);
void
setAmoebaGlobalInPlaneAngleSextic
(
double
sexticK
);
/**
/**
* Get the global sextic term
* Get the global sextic term
...
@@ -133,7 +133,7 @@ public:
...
@@ -133,7 +133,7 @@ public:
* @return the index of the angle that was added
* @return the index of the angle that was added
*/
*/
int
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
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.
* Get the force field parameters for an angle term.
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
* @param quadratic k the quadratic force constant for the angle measured in kJ/mol/radian^2
* @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
,
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.
* Set the force field parameters for an angle term.
...
@@ -160,7 +160,7 @@ public:
...
@@ -160,7 +160,7 @@ public:
* @param length the equilibrium angle, measured in radians
* @param length the equilibrium angle, measured in radians
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
* @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
* 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.
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
...
@@ -200,7 +200,7 @@ public:
...
@@ -200,7 +200,7 @@ public:
particle1
=
particle2
=
particle3
=
particle4
=
-
1
;
particle1
=
particle2
=
particle3
=
particle4
=
-
1
;
length
=
quadraticK
=
0.0
;
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
),
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
particle4
(
particle4
),
length
(
length
),
quadraticK
(
quadraticK
)
{
length
(
length
),
quadraticK
(
quadraticK
)
{
}
}
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
View file @
d95b90b9
...
@@ -148,7 +148,7 @@ public:
...
@@ -148,7 +148,7 @@ public:
lengthAB
=
lengthCB
=
angle
=
k1
=
k2
=
0.0
;
lengthAB
=
lengthCB
=
angle
=
k1
=
k2
=
0.0
;
}
}
StretchBendInfo
(
int
particle1
,
int
particle2
,
int
particle3
,
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
),
particle1
(
particle1
),
particle2
(
particle2
),
particle3
(
particle3
),
lengthAB
(
lengthAB
),
lengthCB
(
lengthCB
),
angle
(
angle
),
k1
(
k1
),
k2
(
k2
)
{
lengthAB
(
lengthAB
),
lengthCB
(
lengthCB
),
angle
(
angle
),
k1
(
k1
),
k2
(
k2
)
{
}
}
...
...
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
View file @
d95b90b9
...
@@ -350,10 +350,10 @@ public:
...
@@ -350,10 +350,10 @@ public:
virtual
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
)
=
0
;
virtual
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
)
=
0
;
virtual
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
virtual
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
=
0
;
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.
* Copy changed parameters over to a context.
*
*
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
View file @
d95b90b9
...
@@ -70,9 +70,9 @@ public:
...
@@ -70,9 +70,9 @@ public:
* @param minCovalentIndex minimum covalent index
* @param minCovalentIndex minimum covalent index
* @param maxCovalentIndex maximum covalent index
* @param maxCovalentIndex maximum covalent index
*/
*/
static
void
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
index
,
static
void
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
index
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
);
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
);
/**
/**
* Get the covalent degree for the CovalentEnd lists
* Get the covalent degree for the CovalentEnd lists
...
@@ -80,14 +80,14 @@ public:
...
@@ -80,14 +80,14 @@ public:
* @param force AmoebaMultipoleForce force reference
* @param force AmoebaMultipoleForce force reference
* @param covalentDegree covalent degrees for the CovalentEnd lists
* @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
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
);
std
::
vector
<
double
>&
outputElectrostaticPotential
);
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
void
updateParametersInContext
(
ContextImpl
&
context
);
void
updateParametersInContext
(
ContextImpl
&
context
);
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaTorsionTorsionForceImpl.h
View file @
d95b90b9
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
}
}
std
::
vector
<
std
::
string
>
getKernelNames
();
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:
private:
const
AmoebaTorsionTorsionForce
&
owner
;
const
AmoebaTorsionTorsionForce
&
owner
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaWcaDispersionForceImpl.h
View file @
d95b90b9
...
@@ -69,7 +69,7 @@ public:
...
@@ -69,7 +69,7 @@ public:
* @param particleIndex the particle index
* @param particleIndex the particle index
* @param maxDispersionEnergy maximum dispersion energy
* @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
* Get the total maximum dispersion energy
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
*
*
* @return total maximum dispersion energy for the system
* @return total maximum dispersion energy for the system
*/
*/
static
double
getTotalMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
);
static
double
getTotalMaximumDispersionEnergy
(
const
AmoebaWcaDispersionForce
&
force
);
void
updateParametersInContext
(
ContextImpl
&
context
);
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
private:
...
...
plugins/amoeba/openmmapi/src/AmoebaAngleForce.cpp
View file @
d95b90b9
...
@@ -46,7 +46,7 @@ int AmoebaAngleForce::addAngle(int particle1, int particle2, int particle3, dou
...
@@ -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
,
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
;
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
particle2
=
angles
[
index
].
particle2
;
particle3
=
angles
[
index
].
particle3
;
particle3
=
angles
[
index
].
particle3
;
...
@@ -55,7 +55,7 @@ void AmoebaAngleForce::getAngleParameters(int index, int& particle1, int& partic
...
@@ -55,7 +55,7 @@ void AmoebaAngleForce::getAngleParameters(int index, int& particle1, int& partic
}
}
void
AmoebaAngleForce
::
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
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
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle3
=
particle3
;
angles
[
index
].
particle3
=
particle3
;
...
@@ -67,7 +67,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleCubic() const {
...
@@ -67,7 +67,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleCubic() const {
return
_globalCubicK
;
return
_globalCubicK
;
}
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleCubic
(
double
cubicK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
_globalCubicK
=
cubicK
;
}
}
...
@@ -75,7 +75,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleQuartic() const {
...
@@ -75,7 +75,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleQuartic() const {
return
_globalQuarticK
;
return
_globalQuarticK
;
}
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleQuartic
(
double
quarticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
_globalQuarticK
=
quarticK
;
}
}
...
@@ -83,7 +83,7 @@ double AmoebaAngleForce::getAmoebaGlobalAnglePentic() const {
...
@@ -83,7 +83,7 @@ double AmoebaAngleForce::getAmoebaGlobalAnglePentic() const {
return
_globalPenticK
;
return
_globalPenticK
;
}
}
void
AmoebaAngleForce
::
setAmoebaGlobalAnglePentic
(
double
penticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAnglePentic
(
double
penticK
)
{
_globalPenticK
=
penticK
;
_globalPenticK
=
penticK
;
}
}
...
@@ -91,7 +91,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleSextic() const {
...
@@ -91,7 +91,7 @@ double AmoebaAngleForce::getAmoebaGlobalAngleSextic() const {
return
_globalSexticK
;
return
_globalSexticK
;
}
}
void
AmoebaAngleForce
::
setAmoebaGlobalAngleSextic
(
double
sexticK
)
{
void
AmoebaAngleForce
::
setAmoebaGlobalAngleSextic
(
double
sexticK
)
{
_globalSexticK
=
sexticK
;
_globalSexticK
=
sexticK
;
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp
View file @
d95b90b9
...
@@ -41,29 +41,29 @@ AmoebaBondForce::AmoebaBondForce() {
...
@@ -41,29 +41,29 @@ AmoebaBondForce::AmoebaBondForce() {
}
}
int
AmoebaBondForce
::
addBond
(
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
)
{
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
;
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
;
particle1
=
bonds
[
index
].
particle1
;
particle2
=
bonds
[
index
].
particle2
;
particle2
=
bonds
[
index
].
particle2
;
length
=
bonds
[
index
].
length
;
length
=
bonds
[
index
].
length
;
quadraticK
=
bonds
[
index
].
quadraticK
;
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
].
particle1
=
particle1
;
bonds
[
index
].
particle2
=
particle2
;
bonds
[
index
].
particle2
=
particle2
;
bonds
[
index
].
length
=
length
;
bonds
[
index
].
length
=
length
;
bonds
[
index
].
quadraticK
=
quadraticK
;
bonds
[
index
].
quadraticK
=
quadraticK
;
}
}
void
AmoebaBondForce
::
setAmoebaGlobalBondCubic
(
double
cubicK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
_globalCubicK
=
cubicK
;
}
}
void
AmoebaBondForce
::
setAmoebaGlobalBondQuartic
(
double
quarticK
)
{
void
AmoebaBondForce
::
setAmoebaGlobalBondQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
_globalQuarticK
=
quarticK
;
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaGeneralizedKirkwoodForce.cpp
View file @
d95b90b9
...
@@ -62,7 +62,7 @@ double AmoebaGeneralizedKirkwoodForce::getDielectricOffset() const {
...
@@ -62,7 +62,7 @@ double AmoebaGeneralizedKirkwoodForce::getDielectricOffset() const {
return dielectricOffset;
return dielectricOffset;
}
}
void AmoebaGeneralizedKirkwoodForce::setDielectricOffset(double inputDielectricOffset
) {
void AmoebaGeneralizedKirkwoodForce::setDielectricOffset(double inputDielectricOffset) {
dielectricOffset = inputDielectricOffset;
dielectricOffset = inputDielectricOffset;
} */
} */
...
@@ -70,7 +70,7 @@ int AmoebaGeneralizedKirkwoodForce::getIncludeCavityTerm() const {
...
@@ -70,7 +70,7 @@ int AmoebaGeneralizedKirkwoodForce::getIncludeCavityTerm() const {
return
includeCavityTerm
;
return
includeCavityTerm
;
}
}
void
AmoebaGeneralizedKirkwoodForce
::
setIncludeCavityTerm
(
int
inputIncludeCavityTerm
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setIncludeCavityTerm
(
int
inputIncludeCavityTerm
)
{
includeCavityTerm
=
inputIncludeCavityTerm
;
includeCavityTerm
=
inputIncludeCavityTerm
;
}
}
...
@@ -78,7 +78,7 @@ double AmoebaGeneralizedKirkwoodForce::getProbeRadius() const {
...
@@ -78,7 +78,7 @@ double AmoebaGeneralizedKirkwoodForce::getProbeRadius() const {
return
probeRadius
;
return
probeRadius
;
}
}
void
AmoebaGeneralizedKirkwoodForce
::
setProbeRadius
(
double
inputProbeRadius
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setProbeRadius
(
double
inputProbeRadius
)
{
probeRadius
=
inputProbeRadius
;
probeRadius
=
inputProbeRadius
;
}
}
...
@@ -86,7 +86,7 @@ double AmoebaGeneralizedKirkwoodForce::getSurfaceAreaFactor() const {
...
@@ -86,7 +86,7 @@ double AmoebaGeneralizedKirkwoodForce::getSurfaceAreaFactor() const {
return
surfaceAreaFactor
;
return
surfaceAreaFactor
;
}
}
void
AmoebaGeneralizedKirkwoodForce
::
setSurfaceAreaFactor
(
double
inputSurfaceAreaFactor
)
{
void
AmoebaGeneralizedKirkwoodForce
::
setSurfaceAreaFactor
(
double
inputSurfaceAreaFactor
)
{
surfaceAreaFactor
=
inputSurfaceAreaFactor
;
surfaceAreaFactor
=
inputSurfaceAreaFactor
;
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaInPlaneAngleForce.cpp
View file @
d95b90b9
...
@@ -40,13 +40,13 @@ AmoebaInPlaneAngleForce::AmoebaInPlaneAngleForce() {
...
@@ -40,13 +40,13 @@ AmoebaInPlaneAngleForce::AmoebaInPlaneAngleForce() {
_globalCubicK
=
_globalQuarticK
=
_globalPenticK
=
_globalSexticK
=
0.0
;
_globalCubicK
=
_globalQuarticK
=
_globalPenticK
=
_globalSexticK
=
0.0
;
}
}
int
AmoebaInPlaneAngleForce
::
addAngle
(
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
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
));
angles
.
push_back
(
AngleInfo
(
particle1
,
particle2
,
particle3
,
particle4
,
length
,
quadraticK
));
return
angles
.
size
()
-
1
;
return
angles
.
size
()
-
1
;
}
}
void
AmoebaInPlaneAngleForce
::
getAngleParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
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
;
particle1
=
angles
[
index
].
particle1
;
particle2
=
angles
[
index
].
particle2
;
particle2
=
angles
[
index
].
particle2
;
particle3
=
angles
[
index
].
particle3
;
particle3
=
angles
[
index
].
particle3
;
...
@@ -56,7 +56,7 @@ void AmoebaInPlaneAngleForce::getAngleParameters(int index, int& particle1, int&
...
@@ -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
,
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
].
particle1
=
particle1
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle2
=
particle2
;
angles
[
index
].
particle3
=
particle3
;
angles
[
index
].
particle3
=
particle3
;
...
@@ -65,11 +65,11 @@ void AmoebaInPlaneAngleForce::setAngleParameters(int index, int particle1, int p
...
@@ -65,11 +65,11 @@ void AmoebaInPlaneAngleForce::setAngleParameters(int index, int particle1, int p
angles
[
index
].
quadraticK
=
quadraticK
;
angles
[
index
].
quadraticK
=
quadraticK
;
}
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
_globalCubicK
=
cubicK
;
}
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
_globalQuarticK
=
quarticK
;
}
}
...
@@ -81,11 +81,11 @@ double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleQuartic() const {
...
@@ -81,11 +81,11 @@ double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleQuartic() const {
return
_globalQuarticK
;
return
_globalQuarticK
;
}
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAnglePentic
(
double
cubicK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAnglePentic
(
double
cubicK
)
{
_globalPenticK
=
cubicK
;
_globalPenticK
=
cubicK
;
}
}
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleSextic
(
double
quarticK
)
{
void
AmoebaInPlaneAngleForce
::
setAmoebaGlobalInPlaneAngleSextic
(
double
quarticK
)
{
_globalSexticK
=
quarticK
;
_globalSexticK
=
quarticK
;
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
View file @
d95b90b9
...
@@ -49,7 +49,7 @@ AmoebaMultipoleForce::NonbondedMethod AmoebaMultipoleForce::getNonbondedMethod()
...
@@ -49,7 +49,7 @@ AmoebaMultipoleForce::NonbondedMethod AmoebaMultipoleForce::getNonbondedMethod()
return
nonbondedMethod
;
return
nonbondedMethod
;
}
}
void
AmoebaMultipoleForce
::
setNonbondedMethod
(
AmoebaMultipoleForce
::
NonbondedMethod
method
)
{
void
AmoebaMultipoleForce
::
setNonbondedMethod
(
AmoebaMultipoleForce
::
NonbondedMethod
method
)
{
nonbondedMethod
=
method
;
nonbondedMethod
=
method
;
}
}
...
@@ -57,7 +57,7 @@ AmoebaMultipoleForce::PolarizationType AmoebaMultipoleForce::getPolarizationType
...
@@ -57,7 +57,7 @@ AmoebaMultipoleForce::PolarizationType AmoebaMultipoleForce::getPolarizationType
return
polarizationType
;
return
polarizationType
;
}
}
void
AmoebaMultipoleForce
::
setPolarizationType
(
AmoebaMultipoleForce
::
PolarizationType
type
)
{
void
AmoebaMultipoleForce
::
setPolarizationType
(
AmoebaMultipoleForce
::
PolarizationType
type
)
{
polarizationType
=
type
;
polarizationType
=
type
;
}
}
...
@@ -73,7 +73,7 @@ double AmoebaMultipoleForce::getAEwald() const {
...
@@ -73,7 +73,7 @@ double AmoebaMultipoleForce::getAEwald() const {
return
aewald
;
return
aewald
;
}
}
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
aewald
=
inputAewald
;
aewald
=
inputAewald
;
}
}
...
@@ -81,11 +81,11 @@ int AmoebaMultipoleForce::getPmeBSplineOrder() const {
...
@@ -81,11 +81,11 @@ int AmoebaMultipoleForce::getPmeBSplineOrder() const {
return
pmeBSplineOrder
;
return
pmeBSplineOrder
;
}
}
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
if
(
gridDimension
.
size
()
<
3
){
if
(
gridDimension
.
size
()
<
3
)
{
gridDimension
.
resize
(
3
);
gridDimension
.
resize
(
3
);
}
}
if
(
pmeGridDimension
.
size
()
>
2
){
if
(
pmeGridDimension
.
size
()
>
2
)
{
gridDimension
[
0
]
=
pmeGridDimension
[
0
];
gridDimension
[
0
]
=
pmeGridDimension
[
0
];
gridDimension
[
1
]
=
pmeGridDimension
[
1
];
gridDimension
[
1
]
=
pmeGridDimension
[
1
];
gridDimension
[
2
]
=
pmeGridDimension
[
2
];
gridDimension
[
2
]
=
pmeGridDimension
[
2
];
...
@@ -95,7 +95,7 @@ void AmoebaMultipoleForce::getPmeGridDimensions( std::vector<int>& gridDimension
...
@@ -95,7 +95,7 @@ void AmoebaMultipoleForce::getPmeGridDimensions( std::vector<int>& gridDimension
return
;
return
;
}
}
void
AmoebaMultipoleForce
::
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
)
{
void
AmoebaMultipoleForce
::
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
)
{
pmeGridDimension
.
resize
(
3
);
pmeGridDimension
.
resize
(
3
);
pmeGridDimension
[
0
]
=
gridDimension
[
0
];
pmeGridDimension
[
0
]
=
gridDimension
[
0
];
pmeGridDimension
[
1
]
=
gridDimension
[
1
];
pmeGridDimension
[
1
]
=
gridDimension
[
1
];
...
@@ -107,7 +107,7 @@ int AmoebaMultipoleForce::getMutualInducedMaxIterations() const {
...
@@ -107,7 +107,7 @@ int AmoebaMultipoleForce::getMutualInducedMaxIterations() const {
return
mutualInducedMaxIterations
;
return
mutualInducedMaxIterations
;
}
}
void
AmoebaMultipoleForce
::
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
)
{
void
AmoebaMultipoleForce
::
setMutualInducedMaxIterations
(
int
inputMutualInducedMaxIterations
)
{
mutualInducedMaxIterations
=
inputMutualInducedMaxIterations
;
mutualInducedMaxIterations
=
inputMutualInducedMaxIterations
;
}
}
...
@@ -115,7 +115,7 @@ double AmoebaMultipoleForce::getMutualInducedTargetEpsilon() const {
...
@@ -115,7 +115,7 @@ double AmoebaMultipoleForce::getMutualInducedTargetEpsilon() const {
return
mutualInducedTargetEpsilon
;
return
mutualInducedTargetEpsilon
;
}
}
void
AmoebaMultipoleForce
::
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
)
{
void
AmoebaMultipoleForce
::
setMutualInducedTargetEpsilon
(
double
inputMutualInducedTargetEpsilon
)
{
mutualInducedTargetEpsilon
=
inputMutualInducedTargetEpsilon
;
mutualInducedTargetEpsilon
=
inputMutualInducedTargetEpsilon
;
}
}
...
@@ -127,22 +127,22 @@ void AmoebaMultipoleForce::setEwaldErrorTolerance(double tol) {
...
@@ -127,22 +127,22 @@ void AmoebaMultipoleForce::setEwaldErrorTolerance(double tol) {
ewaldErrorTol
=
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
)
{
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
;
return
multipoles
.
size
()
-
1
;
}
}
void
AmoebaMultipoleForce
::
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
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
;
charge
=
multipoles
[
index
].
charge
;
molecularDipole
.
resize
(
3
);
molecularDipole
.
resize
(
3
);
molecularDipole
[
0
]
=
multipoles
[
index
].
molecularDipole
[
0
];
molecularDipole
[
0
]
=
multipoles
[
index
].
molecularDipole
[
0
];
molecularDipole
[
1
]
=
multipoles
[
index
].
molecularDipole
[
1
];
molecularDipole
[
1
]
=
multipoles
[
index
].
molecularDipole
[
1
];
molecularDipole
[
2
]
=
multipoles
[
index
].
molecularDipole
[
2
];
molecularDipole
[
2
]
=
multipoles
[
index
].
molecularDipole
[
2
];
molecularQuadrupole
.
resize
(
9
);
molecularQuadrupole
.
resize
(
9
);
molecularQuadrupole
[
0
]
=
multipoles
[
index
].
molecularQuadrupole
[
0
];
molecularQuadrupole
[
0
]
=
multipoles
[
index
].
molecularQuadrupole
[
0
];
molecularQuadrupole
[
1
]
=
multipoles
[
index
].
molecularQuadrupole
[
1
];
molecularQuadrupole
[
1
]
=
multipoles
[
index
].
molecularQuadrupole
[
1
];
molecularQuadrupole
[
2
]
=
multipoles
[
index
].
molecularQuadrupole
[
2
];
molecularQuadrupole
[
2
]
=
multipoles
[
index
].
molecularQuadrupole
[
2
];
...
@@ -164,7 +164,7 @@ void AmoebaMultipoleForce::getMultipoleParameters(int index, double& charge, std
...
@@ -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
,
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
;
multipoles
[
index
].
charge
=
charge
;
...
@@ -192,34 +192,34 @@ void AmoebaMultipoleForce::setMultipoleParameters(int index, double charge, cons
...
@@ -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
];
std
::
vector
<
int
>&
covalentList
=
multipoles
[
index
].
covalentInfo
[
typeId
];
covalentList
.
resize
(
covalentAtoms
.
size
()
);
covalentList
.
resize
(
covalentAtoms
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentAtoms
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
covalentAtoms
.
size
();
ii
++
)
{
covalentList
[
ii
]
=
covalentAtoms
[
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
// load covalent atom index entries for atomId==index and covalentId==typeId into covalentAtoms
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
typeId
];
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
typeId
];
covalentAtoms
.
resize
(
covalentList
.
size
()
);
covalentAtoms
.
resize
(
covalentList
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
covalentAtoms
[
ii
]
=
covalentList
[
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
);
covalentLists
.
resize
(
CovalentEnd
);
for
(
unsigned
int
jj
=
0
;
jj
<
CovalentEnd
;
jj
++
){
for
(
unsigned
int
jj
=
0
;
jj
<
CovalentEnd
;
jj
++
)
{
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
jj
];
std
::
vector
<
int
>
covalentList
=
multipoles
[
index
].
covalentInfo
[
jj
];
std
::
vector
<
int
>
covalentAtoms
;
std
::
vector
<
int
>
covalentAtoms
;
covalentAtoms
.
resize
(
covalentList
.
size
()
);
covalentAtoms
.
resize
(
covalentList
.
size
());
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
covalentAtoms
[
ii
]
=
covalentList
[
ii
];
covalentAtoms
[
ii
]
=
covalentList
[
ii
];
}
}
covalentLists
[
jj
]
=
covalentAtoms
;
covalentLists
[
jj
]
=
covalentAtoms
;
...
@@ -230,11 +230,11 @@ void AmoebaMultipoleForce::getInducedDipoles(Context& context, vector<Vec3>& dip
...
@@ -230,11 +230,11 @@ void AmoebaMultipoleForce::getInducedDipoles(Context& context, vector<Vec3>& dip
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getInducedDipoles
(
getContextImpl
(
context
),
dipoles
);
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
);
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
);
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getSystemMultipoleMoments
(
getContextImpl
(
context
),
outputMultipoleMoments
);
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
View file @
d95b90b9
...
@@ -64,26 +64,26 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
...
@@ -64,26 +64,26 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
}
}
double
quadrupoleValidationTolerance
=
1.0e-05
;
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
;
int
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
;
double
charge
,
thole
,
dampingFactor
,
polarity
;
double
charge
,
thole
,
dampingFactor
,
polarity
;
std
::
vector
<
double
>
molecularDipole
;
std
::
vector
<
double
>
molecularDipole
;
std
::
vector
<
double
>
molecularQuadrupole
;
std
::
vector
<
double
>
molecularQuadrupole
;
owner
.
getMultipoleParameters
(
ii
,
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
owner
.
getMultipoleParameters
(
ii
,
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
);
thole
,
dampingFactor
,
polarity
);
// check quadrupole is traceless and symmetric
// check quadrupole is traceless and symmetric
double
trace
=
fabs
(
molecularQuadrupole
[
0
]
+
molecularQuadrupole
[
4
]
+
molecularQuadrupole
[
8
]
);
double
trace
=
fabs
(
molecularQuadrupole
[
0
]
+
molecularQuadrupole
[
4
]
+
molecularQuadrupole
[
8
]);
if
(
trace
>
quadrupoleValidationTolerance
){
if
(
trace
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: qudarupole for particle="
<<
ii
;
buffer
<<
"AmoebaMultipoleForce: qudarupole for particle="
<<
ii
;
buffer
<<
" has nonzero trace: "
<<
trace
<<
"; AMOEBA plugin assumes traceless quadrupole."
;
buffer
<<
" has nonzero trace: "
<<
trace
<<
"; AMOEBA plugin assumes traceless quadrupole."
;
throw
OpenMMException
(
buffer
.
str
());
throw
OpenMMException
(
buffer
.
str
());
}
}
if
(
fabs
(
molecularQuadrupole
[
1
]
-
molecularQuadrupole
[
3
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
1
]
-
molecularQuadrupole
[
3
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: XY and YX components of quadrupole for particle="
<<
ii
;
buffer
<<
"AmoebaMultipoleForce: XY and YX components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
1
]
<<
" "
<<
molecularQuadrupole
[
3
]
<<
"];"
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
1
]
<<
" "
<<
molecularQuadrupole
[
3
]
<<
"];"
;
...
@@ -91,7 +91,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
...
@@ -91,7 +91,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
throw
OpenMMException
(
buffer
.
str
());
throw
OpenMMException
(
buffer
.
str
());
}
}
if
(
fabs
(
molecularQuadrupole
[
2
]
-
molecularQuadrupole
[
6
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
2
]
-
molecularQuadrupole
[
6
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: XZ and ZX components of quadrupole for particle="
<<
ii
;
buffer
<<
"AmoebaMultipoleForce: XZ and ZX components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
2
]
<<
" "
<<
molecularQuadrupole
[
6
]
<<
"];"
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
2
]
<<
" "
<<
molecularQuadrupole
[
6
]
<<
"];"
;
...
@@ -99,7 +99,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
...
@@ -99,7 +99,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
throw
OpenMMException
(
buffer
.
str
());
throw
OpenMMException
(
buffer
.
str
());
}
}
if
(
fabs
(
molecularQuadrupole
[
5
]
-
molecularQuadrupole
[
7
]
)
>
quadrupoleValidationTolerance
){
if
(
fabs
(
molecularQuadrupole
[
5
]
-
molecularQuadrupole
[
7
])
>
quadrupoleValidationTolerance
)
{
std
::
stringstream
buffer
;
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: YZ and ZY components of quadrupole for particle="
<<
ii
;
buffer
<<
"AmoebaMultipoleForce: YZ and ZY components of quadrupole for particle="
<<
ii
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
5
]
<<
" "
<<
molecularQuadrupole
[
7
]
<<
"];"
;
buffer
<<
" are not equal: ["
<<
molecularQuadrupole
[
5
]
<<
" "
<<
molecularQuadrupole
[
7
]
<<
"];"
;
...
@@ -109,9 +109,9 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
...
@@ -109,9 +109,9 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
// only 'Z-then-X', 'Bisector', Z-Bisect, ThreeFold currently handled
// 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
::
ZBisect
&&
axisType
!=
AmoebaMultipoleForce
::
ThreeFold
&&
axisType
!=
AmoebaMultipoleForce
::
ZOnly
&&
axisType
!=
AmoebaMultipoleForce
::
NoAxisType
)
{
axisType
!=
AmoebaMultipoleForce
::
ZOnly
&&
axisType
!=
AmoebaMultipoleForce
::
NoAxisType
)
{
std
::
stringstream
buffer
;
std
::
stringstream
buffer
;
buffer
<<
"AmoebaMultipoleForce: axis type="
<<
axisType
;
buffer
<<
"AmoebaMultipoleForce: axis type="
<<
axisType
;
buffer
<<
" not currently handled - only axisTypes[ "
;
buffer
<<
" not currently handled - only axisTypes[ "
;
...
@@ -139,7 +139,7 @@ std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() {
...
@@ -139,7 +139,7 @@ std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() {
}
}
const
int
*
AmoebaMultipoleForceImpl
::
getCovalentDegrees
()
{
const
int
*
AmoebaMultipoleForceImpl
::
getCovalentDegrees
()
{
if
(
!
initializedCovalentDegrees
){
if
(
!
initializedCovalentDegrees
)
{
initializedCovalentDegrees
=
true
;
initializedCovalentDegrees
=
true
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent12
]
=
1
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent12
]
=
1
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent13
]
=
2
;
CovalentDegrees
[
AmoebaMultipoleForce
::
Covalent13
]
=
2
;
...
@@ -153,20 +153,20 @@ const int* AmoebaMultipoleForceImpl::getCovalentDegrees() {
...
@@ -153,20 +153,20 @@ const int* AmoebaMultipoleForceImpl::getCovalentDegrees() {
return
CovalentDegrees
;
return
CovalentDegrees
;
}
}
void
AmoebaMultipoleForceImpl
::
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
atomIndex
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
void
AmoebaMultipoleForceImpl
::
getCovalentRange
(
const
AmoebaMultipoleForce
&
force
,
int
atomIndex
,
const
std
::
vector
<
AmoebaMultipoleForce
::
CovalentType
>&
lists
,
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
){
int
*
minCovalentIndex
,
int
*
maxCovalentIndex
)
{
*
minCovalentIndex
=
999999999
;
*
minCovalentIndex
=
999999999
;
*
maxCovalentIndex
=
-
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
];
AmoebaMultipoleForce
::
CovalentType
jj
=
lists
[
kk
];
std
::
vector
<
int
>
covalentList
;
std
::
vector
<
int
>
covalentList
;
force
.
getCovalentMap
(
atomIndex
,
jj
,
covalentList
);
force
.
getCovalentMap
(
atomIndex
,
jj
,
covalentList
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
covalentList
.
size
();
ii
++
)
{
if
(
*
minCovalentIndex
>
covalentList
[
ii
]
){
if
(
*
minCovalentIndex
>
covalentList
[
ii
])
{
*
minCovalentIndex
=
covalentList
[
ii
];
*
minCovalentIndex
=
covalentList
[
ii
];
}
}
if
(
*
maxCovalentIndex
<
covalentList
[
ii
]
){
if
(
*
maxCovalentIndex
<
covalentList
[
ii
])
{
*
maxCovalentIndex
=
covalentList
[
ii
];
*
maxCovalentIndex
=
covalentList
[
ii
];
}
}
}
}
...
@@ -174,10 +174,10 @@ void AmoebaMultipoleForceImpl::getCovalentRange( const AmoebaMultipoleForce& for
...
@@ -174,10 +174,10 @@ void AmoebaMultipoleForceImpl::getCovalentRange( const AmoebaMultipoleForce& for
return
;
return
;
}
}
void
AmoebaMultipoleForceImpl
::
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
){
void
AmoebaMultipoleForceImpl
::
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
)
{
covalentDegree
.
resize
(
AmoebaMultipoleForce
::
CovalentEnd
);
covalentDegree
.
resize
(
AmoebaMultipoleForce
::
CovalentEnd
);
const
int
*
CovalentDegrees
=
AmoebaMultipoleForceImpl
::
getCovalentDegrees
();
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
];
covalentDegree
[
kk
]
=
CovalentDegrees
[
kk
];
}
}
return
;
return
;
...
@@ -187,12 +187,12 @@ void AmoebaMultipoleForceImpl::getInducedDipoles(ContextImpl& context, vector<Ve
...
@@ -187,12 +187,12 @@ void AmoebaMultipoleForceImpl::getInducedDipoles(ContextImpl& context, vector<Ve
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getInducedDipoles
(
context
,
dipoles
);
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getInducedDipoles
(
context
,
dipoles
);
}
}
void
AmoebaMultipoleForceImpl
::
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
void
AmoebaMultipoleForceImpl
::
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
){
std
::
vector
<
double
>&
outputElectrostaticPotential
)
{
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getElectrostaticPotential
(
context
,
inputGrid
,
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
);
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getSystemMultipoleMoments
(
context
,
outputMultipoleMoments
);
}
}
...
...
plugins/amoeba/openmmapi/src/AmoebaOutOfPlaneBendForce.cpp
View file @
d95b90b9
...
@@ -48,7 +48,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendCubic() const {
...
@@ -48,7 +48,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendCubic() const {
return
_globalCubicK
;
return
_globalCubicK
;
}
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendCubic
(
double
cubicK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendCubic
(
double
cubicK
)
{
_globalCubicK
=
cubicK
;
_globalCubicK
=
cubicK
;
}
}
...
@@ -56,7 +56,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendQuartic() const {
...
@@ -56,7 +56,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendQuartic() const {
return
_globalQuarticK
;
return
_globalQuarticK
;
}
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendQuartic
(
double
quarticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendQuartic
(
double
quarticK
)
{
_globalQuarticK
=
quarticK
;
_globalQuarticK
=
quarticK
;
}
}
...
@@ -64,7 +64,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendPentic() const {
...
@@ -64,7 +64,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendPentic() const {
return
_globalPenticK
;
return
_globalPenticK
;
}
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendPentic
(
double
penticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendPentic
(
double
penticK
)
{
_globalPenticK
=
penticK
;
_globalPenticK
=
penticK
;
}
}
...
@@ -72,7 +72,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendSextic() const {
...
@@ -72,7 +72,7 @@ double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendSextic() const {
return
_globalSexticK
;
return
_globalSexticK
;
}
}
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendSextic
(
double
sexticK
)
{
void
AmoebaOutOfPlaneBendForce
::
setAmoebaGlobalOutOfPlaneBendSextic
(
double
sexticK
)
{
_globalSexticK
=
sexticK
;
_globalSexticK
=
sexticK
;
}
}
...
@@ -82,7 +82,7 @@ int AmoebaOutOfPlaneBendForce::addOutOfPlaneBend(int particle1, int particle2, i
...
@@ -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
,
void
AmoebaOutOfPlaneBendForce
::
getOutOfPlaneBendParameters
(
int
index
,
int
&
particle1
,
int
&
particle2
,
int
&
particle3
,
int
&
particle4
,
double
&
k
)
const
{
double
&
k
)
const
{
particle1
=
outOfPlaneBends
[
index
].
particle1
;
particle1
=
outOfPlaneBends
[
index
].
particle1
;
particle2
=
outOfPlaneBends
[
index
].
particle2
;
particle2
=
outOfPlaneBends
[
index
].
particle2
;
particle3
=
outOfPlaneBends
[
index
].
particle3
;
particle3
=
outOfPlaneBends
[
index
].
particle3
;
...
...
Prev
1
2
3
4
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