Commit 8086b201 authored by Peter Eastman's avatar Peter Eastman
Browse files

Further cleanup to reference platform - mostly deleting lots of unnecessary "default return" values

parent 51475608
...@@ -173,11 +173,9 @@ RealOpenMM ImplicitSolventParameters::getSolventDielectric( void ) const { ...@@ -173,11 +173,9 @@ RealOpenMM ImplicitSolventParameters::getSolventDielectric( void ) const {
@param solventDielectric solvent dielectric @param solventDielectric solvent dielectric
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setSolventDielectric( RealOpenMM solventDielectric ){ void ImplicitSolventParameters::setSolventDielectric( RealOpenMM solventDielectric ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -187,7 +185,6 @@ int ImplicitSolventParameters::setSolventDielectric( RealOpenMM solventDielectri ...@@ -187,7 +185,6 @@ int ImplicitSolventParameters::setSolventDielectric( RealOpenMM solventDielectri
_solventDielectric = solventDielectric; _solventDielectric = solventDielectric;
_resetPreFactor(); _resetPreFactor();
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -215,11 +212,9 @@ RealOpenMM ImplicitSolventParameters::getSoluteDielectric( void ) const { ...@@ -215,11 +212,9 @@ RealOpenMM ImplicitSolventParameters::getSoluteDielectric( void ) const {
@param soluteDielectric solute dielectric @param soluteDielectric solute dielectric
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){ void ImplicitSolventParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -229,7 +224,6 @@ int ImplicitSolventParameters::setSoluteDielectric( RealOpenMM soluteDielectric ...@@ -229,7 +224,6 @@ int ImplicitSolventParameters::setSoluteDielectric( RealOpenMM soluteDielectric
_soluteDielectric = soluteDielectric; _soluteDielectric = soluteDielectric;
_resetPreFactor(); _resetPreFactor();
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -257,11 +251,9 @@ RealOpenMM ImplicitSolventParameters::getElectricConstant( void ) const { ...@@ -257,11 +251,9 @@ RealOpenMM ImplicitSolventParameters::getElectricConstant( void ) const {
@param electricConstant electric constant @param electricConstant electric constant
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setElectricConstant( RealOpenMM electricConstant ){ void ImplicitSolventParameters::setElectricConstant( RealOpenMM electricConstant ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -271,8 +263,6 @@ int ImplicitSolventParameters::setElectricConstant( RealOpenMM electricConstant ...@@ -271,8 +263,6 @@ int ImplicitSolventParameters::setElectricConstant( RealOpenMM electricConstant
_electricConstant = electricConstant; _electricConstant = electricConstant;
_resetPreFactor(); _resetPreFactor();
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -300,11 +290,9 @@ RealOpenMM ImplicitSolventParameters::getProbeRadius( void ) const { ...@@ -300,11 +290,9 @@ RealOpenMM ImplicitSolventParameters::getProbeRadius( void ) const {
@param probeRadius probe radius @param probeRadius probe radius
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setProbeRadius( RealOpenMM probeRadius ){ void ImplicitSolventParameters::setProbeRadius( RealOpenMM probeRadius ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -313,7 +301,6 @@ int ImplicitSolventParameters::setProbeRadius( RealOpenMM probeRadius ){ ...@@ -313,7 +301,6 @@ int ImplicitSolventParameters::setProbeRadius( RealOpenMM probeRadius ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_probeRadius = probeRadius; _probeRadius = probeRadius;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -364,11 +351,9 @@ RealOpenMM ImplicitSolventParameters::getPreFactor( void ) const { ...@@ -364,11 +351,9 @@ RealOpenMM ImplicitSolventParameters::getPreFactor( void ) const {
@param pi4Asolv probe radius @param pi4Asolv probe radius
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setPi4Asolv( RealOpenMM pi4Asolv ){ void ImplicitSolventParameters::setPi4Asolv( RealOpenMM pi4Asolv ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -377,7 +362,6 @@ int ImplicitSolventParameters::setPi4Asolv( RealOpenMM pi4Asolv ){ ...@@ -377,7 +362,6 @@ int ImplicitSolventParameters::setPi4Asolv( RealOpenMM pi4Asolv ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_pi4Asolv = pi4Asolv; _pi4Asolv = pi4Asolv;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -405,11 +389,9 @@ RealOpenMM ImplicitSolventParameters::getKcalA_To_kJNm( void ) const { ...@@ -405,11 +389,9 @@ RealOpenMM ImplicitSolventParameters::getKcalA_To_kJNm( void ) const {
@param kcalA_To_kJNm probe radius @param kcalA_To_kJNm probe radius
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm ){ void ImplicitSolventParameters::setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -418,7 +400,6 @@ int ImplicitSolventParameters::setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm ){ ...@@ -418,7 +400,6 @@ int ImplicitSolventParameters::setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_kcalA_To_kJNm = kcalA_To_kJNm; _kcalA_To_kJNm = kcalA_To_kJNm;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -452,11 +433,9 @@ RealOpenMM* ImplicitSolventParameters::getAtomicRadii( void ) const { ...@@ -452,11 +433,9 @@ RealOpenMM* ImplicitSolventParameters::getAtomicRadii( void ) const {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ void ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -469,8 +448,6 @@ int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -469,8 +448,6 @@ int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
_ownAtomicRadii = false; _ownAtomicRadii = false;
} }
_atomicRadii = atomicRadii; _atomicRadii = atomicRadii;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -479,11 +456,9 @@ int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -479,11 +456,9 @@ int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){ void ImplicitSolventParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -512,58 +487,17 @@ int ImplicitSolventParameters::setAtomicRadii( const RealOpenMMVector& atomicRad ...@@ -512,58 +487,17 @@ int ImplicitSolventParameters::setAtomicRadii( const RealOpenMMVector& atomicRad
for( int ii = 0; ii < numberOfAtoms; ii++ ){ for( int ii = 0; ii < numberOfAtoms; ii++ ){
_atomicRadii[ii] = atomicRadii[ii]; _atomicRadii[ii] = atomicRadii[ii];
} }
return SimTKOpenMMCommon::DefaultReturn;
} }
/**---------------------------------------------------------------------------------------
Set AtomicRadii array
@param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */
/*
int ImplicitSolventParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// ---------------------------------------------------------------------------------------
static const char* methodName = "\nImplicitSolventParameters::setAtomicRadii:";
// ---------------------------------------------------------------------------------------
int numberOfAtoms = getNumberOfAtoms();
if( _ownAtomicRadii ){
delete[] _atomicRadii;
_atomicRadii = new RealOpenMM[numberOfAtoms];
} else if( _atomicRadii == NULL ){
_atomicRadii = new RealOpenMM[numberOfAtoms];
_ownAtomicRadii = true;
}
// force kcal/A units
for( int ii = 0; ii < numberOfAtoms; ii++ ){
_atomicRadii[ii] = atomicRadii[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
} */
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
Set AtomicRadii array Set AtomicRadii array
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setOwnAtomicRadii( int ownAtomicRadii ){ void ImplicitSolventParameters::setOwnAtomicRadii( int ownAtomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -572,8 +506,6 @@ int ImplicitSolventParameters::setOwnAtomicRadii( int ownAtomicRadii ){ ...@@ -572,8 +506,6 @@ int ImplicitSolventParameters::setOwnAtomicRadii( int ownAtomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownAtomicRadii = ownAtomicRadii; _ownAtomicRadii = ownAtomicRadii;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -602,11 +534,9 @@ int ImplicitSolventParameters::getFreeArrays( void ) const { ...@@ -602,11 +534,9 @@ int ImplicitSolventParameters::getFreeArrays( void ) const {
@param freeArrays flag @param freeArrays flag
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ImplicitSolventParameters::setFreeArrays( int freeArrays ){ void ImplicitSolventParameters::setFreeArrays( int freeArrays ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -615,8 +545,6 @@ int ImplicitSolventParameters::setFreeArrays( int freeArrays ){ ...@@ -615,8 +545,6 @@ int ImplicitSolventParameters::setFreeArrays( int freeArrays ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_freeArrays = freeArrays; _freeArrays = freeArrays;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -683,8 +611,6 @@ void ImplicitSolventParameters::_resetPreFactor( void ){ ...@@ -683,8 +611,6 @@ void ImplicitSolventParameters::_resetPreFactor( void ){
@param title title (optional) @param title title (optional)
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
std::string ImplicitSolventParameters::getStateString( const char* title ) const { std::string ImplicitSolventParameters::getStateString( const char* title ) const {
......
...@@ -75,11 +75,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -75,11 +75,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param kcalA_To_kJNm probe radius @param kcalA_To_kJNm probe radius
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm ); void setKcalA_To_kJNm( RealOpenMM kcalA_To_kJNm );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -87,11 +85,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -87,11 +85,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param freeArrays flag @param freeArrays flag
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setFreeArrays( int freeArrays ); void setFreeArrays( int freeArrays );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -167,11 +163,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -167,11 +163,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param solventDielectric solvent dielectric @param solventDielectric solvent dielectric
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setSolventDielectric( RealOpenMM solventDielectric ); void setSolventDielectric( RealOpenMM solventDielectric );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -189,11 +183,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -189,11 +183,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param soluteDielectric solute dielectric @param soluteDielectric solute dielectric
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setSoluteDielectric( RealOpenMM soluteDielectric ); void setSoluteDielectric( RealOpenMM soluteDielectric );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -222,11 +214,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -222,11 +214,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param electricConstant electric constant @param electricConstant electric constant
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setElectricConstant( RealOpenMM electricConstant ); void setElectricConstant( RealOpenMM electricConstant );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -244,11 +234,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -244,11 +234,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param probeRadius probe radius @param probeRadius probe radius
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setProbeRadius( RealOpenMM probeRadius ); void setProbeRadius( RealOpenMM probeRadius );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -278,11 +266,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -278,11 +266,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param pi4Asolv see above @param pi4Asolv see above
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setPi4Asolv( RealOpenMM pi4Asolv ); void setPi4Asolv( RealOpenMM pi4Asolv );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -300,11 +286,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -300,11 +286,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
virtual int setAtomicRadii( RealOpenMM* atomicRadii ); virtual void setAtomicRadii( RealOpenMM* atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -312,23 +296,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -312,23 +296,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
virtual int setAtomicRadii( const RealOpenMMVector& atomicRadii ); virtual void setAtomicRadii( const RealOpenMMVector& atomicRadii );
/**---------------------------------------------------------------------------------------
Set AtomicRadii array
@param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */
//virtual int setAtomicRadii( RealOpenMM* atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -339,11 +309,9 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -339,11 +309,9 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param ownAtomicRadii flag indicating whether array of atomic radii @param ownAtomicRadii flag indicating whether array of atomic radii
should be freed should be freed
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setOwnAtomicRadii( int ownAtomicRadii ); void setOwnAtomicRadii( int ownAtomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -351,8 +319,6 @@ class OPENMM_EXPORT ImplicitSolventParameters { ...@@ -351,8 +319,6 @@ class OPENMM_EXPORT ImplicitSolventParameters {
@param title title (optional) @param title title (optional)
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
virtual std::string getStateString( const char* title ) const; virtual std::string getStateString( const char* title ) const;
......
...@@ -180,11 +180,9 @@ ObcParameters::ObcType ObcParameters::getObcType( void ) const { ...@@ -180,11 +180,9 @@ ObcParameters::ObcType ObcParameters::getObcType( void ) const {
@param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8) @param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8)
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){ void ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -202,8 +200,6 @@ int ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){ ...@@ -202,8 +200,6 @@ int ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){
_gammaObc = 4.85f; _gammaObc = 4.85f;
} }
_obcType = obcType; _obcType = obcType;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -311,11 +307,9 @@ RealOpenMM* ObcParameters::getAtomicRadii( void ) const { ...@@ -311,11 +307,9 @@ RealOpenMM* ObcParameters::getAtomicRadii( void ) const {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ void ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -323,7 +317,7 @@ int ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -323,7 +317,7 @@ int ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -332,11 +326,9 @@ int ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -332,11 +326,9 @@ int ObcParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){ void ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -344,7 +336,7 @@ int ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){ ...@@ -344,7 +336,7 @@ int ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -380,11 +372,9 @@ const RealOpenMM* ObcParameters::getScaledRadiusFactors( void ) const { ...@@ -380,11 +372,9 @@ const RealOpenMM* ObcParameters::getScaledRadiusFactors( void ) const {
@param ownScaledRadiusFactors flag indicating whether scale factors @param ownScaledRadiusFactors flag indicating whether scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ void ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -393,8 +383,6 @@ int ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ ...@@ -393,8 +383,6 @@ int ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownScaledRadiusFactors = ownScaledRadiusFactors; _ownScaledRadiusFactors = ownScaledRadiusFactors;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -403,11 +391,9 @@ int ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ ...@@ -403,11 +391,9 @@ int ObcParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
@param scaledRadiusFactors scaledRadiusFactors @param scaledRadiusFactors scaledRadiusFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){ void ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -421,9 +407,6 @@ int ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){ ...@@ -421,9 +407,6 @@ int ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){
} }
_scaledRadiusFactors = scaledRadiusFactors; _scaledRadiusFactors = scaledRadiusFactors;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -432,11 +415,9 @@ int ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){ ...@@ -432,11 +415,9 @@ int ObcParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){
@param scaledRadiusFactors scaledRadiusFactors @param scaledRadiusFactors scaledRadiusFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors ){ void ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -452,8 +433,6 @@ int ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusF ...@@ -452,8 +433,6 @@ int ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusF
for( int ii = 0; ii < (int) scaledRadiusFactors.size(); ii++ ){ for( int ii = 0; ii < (int) scaledRadiusFactors.size(); ii++ ){
_scaledRadiusFactors[ii] = scaledRadiusFactors[ii]; _scaledRadiusFactors[ii] = scaledRadiusFactors[ii];
} }
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -571,15 +550,12 @@ std::string ObcParameters::getStateString( const char* title ) const { ...@@ -571,15 +550,12 @@ std::string ObcParameters::getStateString( const char* title ) const {
@param distance the cutoff distance @param distance the cutoff distance
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setUseCutoff( RealOpenMM distance ) { void ObcParameters::setUseCutoff( RealOpenMM distance ) {
cutoff = true; cutoff = true;
cutoffDistance = distance; cutoffDistance = distance;
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -610,11 +586,9 @@ RealOpenMM ObcParameters::getCutoffDistance() { ...@@ -610,11 +586,9 @@ RealOpenMM ObcParameters::getCutoffDistance() {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcParameters::setPeriodic( RealVec& boxSize ) { void ObcParameters::setPeriodic( RealVec& boxSize ) {
assert(cutoff); assert(cutoff);
assert(boxSize[0] >= 2.0*cutoffDistance); assert(boxSize[0] >= 2.0*cutoffDistance);
...@@ -624,7 +598,6 @@ int ObcParameters::setPeriodic( RealVec& boxSize ) { ...@@ -624,7 +598,6 @@ int ObcParameters::setPeriodic( RealVec& boxSize ) {
periodicBoxSize[0] = boxSize[0]; periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1]; periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2]; periodicBoxSize[2] = boxSize[2];
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
...@@ -68,12 +68,10 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -68,12 +68,10 @@ class ObcParameters : public ImplicitSolventParameters {
Set solvent dielectric (Simbios) Set solvent dielectric (Simbios)
@param dielectricOffset solvent dielectric @param dielectricOffset solvent dielectric
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setDielectricOffset( RealOpenMM dielectricOffset ); void setDielectricOffset( RealOpenMM dielectricOffset );
public: public:
...@@ -119,11 +117,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -119,11 +117,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8) @param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8)
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setObcTypeParameters( ObcParameters::ObcType obcType ); void setObcTypeParameters( ObcParameters::ObcType obcType );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -183,8 +179,8 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -183,8 +179,8 @@ class ObcParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ); void setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors );
int setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors ); void setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -192,12 +188,10 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -192,12 +188,10 @@ class ObcParameters : public ImplicitSolventParameters {
@param ownScaledRadiusFactors flag indicating whether scale factors @param ownScaledRadiusFactors flag indicating whether scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setOwnScaleFactors( int ownScaledRadiusFactors ); void setOwnScaleFactors( int ownScaledRadiusFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -215,11 +209,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -215,11 +209,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param radii array to store Macromodel radii for each atom @param radii array to store Macromodel radii for each atom
@param log if set, then print error messages to log file @param log if set, then print error messages to log file
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int getMacroModelAtomicRadii( int numberOfAtoms, void getMacroModelAtomicRadii( int numberOfAtoms,
char*** atomNames, RealOpenMM* radii, FILE* log ); char*** atomNames, RealOpenMM* radii, FILE* log );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -238,11 +230,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -238,11 +230,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setAtomicRadii( RealOpenMM* atomicRadii ); void setAtomicRadii( RealOpenMM* atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -250,11 +240,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -250,11 +240,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setAtomicRadii( const RealOpenMMVector& atomicRadii ); void setAtomicRadii( const RealOpenMMVector& atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -287,11 +275,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -287,11 +275,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param distance the cutoff distance @param distance the cutoff distance
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setUseCutoff( RealOpenMM distance ); void setUseCutoff( RealOpenMM distance );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -317,11 +303,9 @@ class ObcParameters : public ImplicitSolventParameters { ...@@ -317,11 +303,9 @@ class ObcParameters : public ImplicitSolventParameters {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setPeriodic( OpenMM::RealVec& boxSize ); void setPeriodic( OpenMM::RealVec& boxSize );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
The OBC Generalized Born model is based on the following papers:
J. Phys. Chem. 1996 100, 19824-19839 (HCT paper)
Proteins: Structure, Function, and Bioinformatics 55:383-394 (2004) (OBC paper)
---------------------------------------------------------------------------------------
The two main interface methods perform the following tasks:
(1) set the GBSA parameters; this method is called once prior to execution of
the main simulation loop
(2) calculate the GBSA forces/energy given the atom coordinates and charges
for each simulation step
The two methods and helper methods are in the file cpuObcInterface.cpp
---------------------------------------------------------------------------------------
The setup call is
cpuSetObcParameters( int numberOfAtoms, RealOpenMM* atomicRadii, RealOpenMM* obcScaleFactors,
int includeAceApproximation,
RealOpenMM soluteDielectric, RealOpenMM solventDielectric, FILE* log );
The parameters include the following:
(1) number of atoms
(2) the OBC atomic radii (akin to VDW radii, but optimized for GBSA calculations)
(3) the OBC scale factors for each atom
(4) a flag indicating whether the nonpolar ACE approximation is to be included
in calculating the forces and energy: I do not have a reference for this term
(5-6) the solute and solvent dielectric (typically 1.0 & 78.3)
(7) a log file reference; the reference may be set to NULL,
if logging is unwanted. Note: if the reference is NULL, warnings, ... will be output to stderr
cpuSetObcParameters() creates a static CpuObc object which is then referenced when the
GBSA forces and energy are to be calculated
The default OBC model is the Type II model: Eq. 8 in the 2004 OBC paper;
for the Type I model, replace the call
ObcParameters* obcParameters = new ObcParameters( numberOfAtoms, ObcParameters::ObcTypeII );
with
ObcParameters* obcParameters = new ObcParameters( numberOfAtoms, ObcParameters::ObcTypeI );
---------------------------------------------------------------------------------------
The OBC scale factors may be obtained via calls to either of the following 'helper' methods
getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, RealOpenMM* scaleFactors )
or
getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpenMM* masses, RealOpenMM* scaleFactors )
Documentation for the inputs to these routines is contained in the file, cpuObcInterface.cpp.
The scale factors are those used in Tinker5, and are based on the element type
of each atom (H, C, N, O, ...).
---------------------------------------------------------------------------------------
The OBC radii may be obtained via the helper method:
getGbsaRadii( int numberOfAtoms, const int* atomicNumber,
const int* numberOfCovalentPartners, const int* indexOfCovalentPartner,
RealOpenMM* gbsaRadii );
Documentation for the inputs to this routine is contained in the file, cpuObcInterface.cpp.
The radii are based on the atom type (methyl C, carbonyl C, ...). The value for a hydrogen
depends on its covalent heavy atom partner. As for the OBC scale factors, the values
hardwired into the method are the same as those used in Tinker5.
---------------------------------------------------------------------------------------
The energy/forces are calculated via the call
cpuCalculateImplicitSolventForces( RealOpenMM** atomCoordinates, const RealOpenMM* partialCharges,
RealOpenMM** forces, RealOpenMM* energy, int updateBornRadii );
The coordinate and force arrays should have the layout: atomCoordinates[atomIndex][3] &
forces[atomIndex][3]
If updateBornRadii = 0, then the Born radii from the previous iteration are used; this reduces the
number of O(N**2) loops from 3 to 2.
If updateBornRadii != 0, then the Born radii are calculated for the input configuration.
For MD runs, setting updateBornRadii = 0 is relatively safe since the radii change little
from one iteration to the next. However, for minimization techniques updateBornRadii
should probably be set to a nonzero value since the configuarations can change significantly
between adjacent calls.
---------------------------------------------------------------------------------------
Notes:
(1) The type (float or double) for floating-point numbers is set in the file SimTKOpenMMRealType.h.
If 'RealOpenMMType' is set to 1 in the file, the calculations are performed in
single-precision; otherwise they are performed in double-precision
(2) The units are Angstroms for the spatial dimensions, kcal/mol for energy, and kcal/mol.A for the forces
(3) The code in gromacsCpuObcInterface.cpp provides an example of the parameter setup, ... used for
interfacing w/ Gromacs; the details are somewhat different from the code in cpuObcInterface.cpp
(4) Output from Tinker for a singles ubiquitin configuration are in the directory 'Examples'.
The xyz file gives the coordinates and atom types (Amber99 -- note the charge for atom type 268
(line 2008 in the Tinker amber99.prm file) was changed from -0.2737 to -0.2774 to agree w/
the value used in the version of Gromacs we have access to.)
The key file specifies that OBC should be used for the implicit solvent.
The results are in the files 111UBQ.gbsaAce and 111UBQ.gbsaNoAce. The first file includes the
ACE approximation, while the second does not. On the first line of each file, the number of atoms
and GBSA energy are reported. The remaining lines (one for each atom) give the coordinates (3 entries),
Born radius, partial charge, GBSA radius (rsolv in Tinker), the OBC scaling factor, and the forces (3). The
last three fields give the atomic number, Tinker Amber99 atom name and type.
---------------------------------------------------------------------------------------
...@@ -143,11 +143,9 @@ cpuSetObcParameters( int numberOfAtoms, RealOpenMM* atomicRadii, RealOpenMM* obc ...@@ -143,11 +143,9 @@ cpuSetObcParameters( int numberOfAtoms, RealOpenMM* atomicRadii, RealOpenMM* obc
Function calls a static method in CpuImplicitSolvent class to calculate forces/energy Function calls a static method in CpuImplicitSolvent class to calculate forces/energy
@return result from CpuImplicitSolvent::computeImplicitSolventForces
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
extern "C" int extern "C" void
cpuCalculateImplicitSolventForces( vector<RealVec>& atomCoordinates, cpuCalculateImplicitSolventForces( vector<RealVec>& atomCoordinates,
const RealOpenMM* partialCharges, const RealOpenMM* partialCharges,
vector<RealVec>& forces, RealOpenMM* energy, vector<RealVec>& forces, RealOpenMM* energy,
...@@ -159,14 +157,11 @@ cpuCalculateImplicitSolventForces( vector<RealVec>& atomCoordinates, ...@@ -159,14 +157,11 @@ cpuCalculateImplicitSolventForces( vector<RealVec>& atomCoordinates,
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
int status = CpuImplicitSolvent::getCpuImplicitSolvent()->computeImplicitSolventForces( atomCoordinates, partialCharges, CpuImplicitSolvent::getCpuImplicitSolvent()->computeImplicitSolventForces( atomCoordinates, partialCharges,
forces, updateBornRadii ); forces, updateBornRadii );
*energy = CpuImplicitSolvent::getCpuImplicitSolvent()->getEnergy(); *energy = CpuImplicitSolvent::getCpuImplicitSolvent()->getEnergy();
// printf( "\ncpuCalculateImplicitSolventForcesE=%.5e", *energy ); // printf( "\ncpuCalculateImplicitSolventForcesE=%.5e", *energy );
return status;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -213,11 +208,9 @@ extern "C" int cpuDeleteObcParameters( void ){ ...@@ -213,11 +208,9 @@ extern "C" int cpuDeleteObcParameters( void ){
@param masses input masses @param masses input masses
@param scaleFactors output atomic numbers @param scaleFactors output atomic numbers
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
extern "C" int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpenMM* masses, extern "C" void getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpenMM* masses,
RealOpenMM* scaleFactors ){ RealOpenMM* scaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -252,8 +245,6 @@ extern "C" int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealO ...@@ -252,8 +245,6 @@ extern "C" int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealO
scaleFactors[atomI] = (RealOpenMM) scaleFactor; scaleFactors[atomI] = (RealOpenMM) scaleFactor;
} }
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -264,11 +255,9 @@ extern "C" int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealO ...@@ -264,11 +255,9 @@ extern "C" int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealO
@param atomicNumber input atomic number for each atom @param atomicNumber input atomic number for each atom
@param scaleFactors output atomic numbers @param scaleFactors output atomic numbers
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
extern "C" int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, RealOpenMM* scaleFactors ){ extern "C" void getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, RealOpenMM* scaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -324,8 +313,6 @@ extern "C" int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, R ...@@ -324,8 +313,6 @@ extern "C" int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, R
scaleFactors[atomI] = (RealOpenMM) scaleFactor; scaleFactors[atomI] = (RealOpenMM) scaleFactor;
} }
return SimTKOpenMMCommon::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -346,11 +333,9 @@ extern "C" int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, R ...@@ -346,11 +333,9 @@ extern "C" int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, R
@param gbsaRadii output GBSA radii @param gbsaRadii output GBSA radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
extern "C" int getGbsaRadii( int numberOfAtoms, const int* atomicNumber, extern "C" void getGbsaRadii( int numberOfAtoms, const int* atomicNumber,
const int* numberOfCovalentPartners, const int* numberOfCovalentPartners,
const int* indexOfCovalentPartner, const int* indexOfCovalentPartner,
RealOpenMM* gbsaRadii ){ RealOpenMM* gbsaRadii ){
...@@ -488,6 +473,4 @@ extern "C" int getGbsaRadii( int numberOfAtoms, const int* atomicNumber, ...@@ -488,6 +473,4 @@ extern "C" int getGbsaRadii( int numberOfAtoms, const int* atomicNumber,
gbsaRadii[atomI] = (RealOpenMM) radius; gbsaRadii[atomI] = (RealOpenMM) radius;
} }
return SimTKOpenMMCommon::DefaultReturn;
} }
...@@ -104,11 +104,9 @@ int cpuSetObcParameters( int numberOfAtoms, RealOpenMM* atomicRadii, RealOpenMM* ...@@ -104,11 +104,9 @@ int cpuSetObcParameters( int numberOfAtoms, RealOpenMM* atomicRadii, RealOpenMM*
Function calls a static method in CpuImplicitSolvent class to calculate forces/energy Function calls a static method in CpuImplicitSolvent class to calculate forces/energy
@return result from CpuImplicitSolvent::computeImplicitSolventForces
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
externC int cpuCalculateImplicitSolventForces( std::vector<OpenMM::RealVec>& atomCoordinates, externC void cpuCalculateImplicitSolventForces( std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMM* partialChargesIn, const RealOpenMM* partialChargesIn,
std::vector<OpenMM::RealVec>& forces, RealOpenMM* energy, std::vector<OpenMM::RealVec>& forces, RealOpenMM* energy,
int updateBornRadii ); int updateBornRadii );
...@@ -121,11 +119,9 @@ externC int cpuCalculateImplicitSolventForces( std::vector<OpenMM::RealVec>& ato ...@@ -121,11 +119,9 @@ externC int cpuCalculateImplicitSolventForces( std::vector<OpenMM::RealVec>& ato
@param masses input masses @param masses input masses
@param scaleFactors output atomic numbers @param scaleFactors output atomic numbers
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
externC int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpenMM* masses, externC void getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpenMM* masses,
RealOpenMM* scaleFactors ); RealOpenMM* scaleFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -136,11 +132,9 @@ externC int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpen ...@@ -136,11 +132,9 @@ externC int getObcScaleFactorsGivenAtomMasses( int numberOfAtoms, const RealOpen
@param atomicNumber input atomic number for each atom @param atomicNumber input atomic number for each atom
@param scaleFactors output atomic numbers @param scaleFactors output atomic numbers
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
externC int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, externC void getObcScaleFactors( int numberOfAtoms, const int* atomicNumber,
RealOpenMM* scaleFactors ); RealOpenMM* scaleFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -156,11 +150,9 @@ externC int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber, ...@@ -156,11 +150,9 @@ externC int getObcScaleFactors( int numberOfAtoms, const int* atomicNumber,
then indexOfCovalentPartner[22] = 24 then indexOfCovalentPartner[22] = 24
@param gbsaRadii output GBSA radii @param gbsaRadii output GBSA radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
externC int getGbsaRadii( int numberOfAtoms, const int* atomicNumber, externC void getGbsaRadii( int numberOfAtoms, const int* atomicNumber,
const int* numberOfCovalentPartners, const int* numberOfCovalentPartners,
const int* indexOfCovalentPartner, RealOpenMM* gbsaRadii ); const int* indexOfCovalentPartner, RealOpenMM* gbsaRadii );
......
...@@ -43,8 +43,6 @@ using OpenMM::RealVec; ...@@ -43,8 +43,6 @@ using OpenMM::RealVec;
@param fValues2 on return contains the values of the derivative of the function wrt second dimension @param fValues2 on return contains the values of the derivative of the function wrt second dimension
@param fValues12 on return contains the values of the derivative of the function wrt first & second dimension @param fValues12 on return contains the values of the derivative of the function wrt first & second dimension
@return AmoebaCommon::DefaultReturn
On first call a check is performed to see if the grid is valid On first call a check is performed to see if the grid is valid
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
......
...@@ -160,8 +160,6 @@ private: ...@@ -160,8 +160,6 @@ private:
@param functionValue1 d(energy)/dx1 @param functionValue1 d(energy)/dx1
@param functionValue2 d(energy)/dx2 @param functionValue2 d(energy)/dx2
@return AmoebaCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
void getBicubicValues( void getBicubicValues(
......
...@@ -73,18 +73,14 @@ ReferenceFreeEnergyLJCoulomb14Softcore::~ReferenceFreeEnergyLJCoulomb14Softcore( ...@@ -73,18 +73,14 @@ ReferenceFreeEnergyLJCoulomb14Softcore::~ReferenceFreeEnergyLJCoulomb14Softcore(
@param distance the cutoff distance @param distance the cutoff distance
@param solventDielectric the dielectric constant of the bulk solvent @param solventDielectric the dielectric constant of the bulk solvent
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulomb14Softcore::setUseCutoff( RealOpenMM distance, RealOpenMM solventDielectric ) { void ReferenceFreeEnergyLJCoulomb14Softcore::setUseCutoff( RealOpenMM distance, RealOpenMM solventDielectric ) {
cutoff = true; cutoff = true;
cutoffDistance = distance; cutoffDistance = distance;
krf = pow(cutoffDistance, (RealOpenMM)-3.0)*(solventDielectric-1.0f)/(2.0f*solventDielectric+1.0f); krf = pow(cutoffDistance, (RealOpenMM)-3.0)*(solventDielectric-1.0f)/(2.0f*solventDielectric+1.0f);
crf = (1.0f/cutoffDistance)*(3.0f*solventDielectric)/(2.0f*solventDielectric+1.0f); crf = (1.0f/cutoffDistance)*(3.0f*solventDielectric)/(2.0f*solventDielectric+1.0f);
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -101,11 +97,9 @@ ReferenceFreeEnergyLJCoulomb14Softcore::~ReferenceFreeEnergyLJCoulomb14Softcore( ...@@ -101,11 +97,9 @@ ReferenceFreeEnergyLJCoulomb14Softcore::~ReferenceFreeEnergyLJCoulomb14Softcore(
parameter[1]= (c12/c6)**1/6 parameter[1]= (c12/c6)**1/6
parameter[2]= epsfactor*q1*q2 parameter[2]= epsfactor*q1*q2
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulomb14Softcore::getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1, void ReferenceFreeEnergyLJCoulomb14Softcore::getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1,
RealOpenMM q2, RealOpenMM epsfac, RealOpenMM q2, RealOpenMM epsfac,
RealOpenMM* parameters ) const { RealOpenMM* parameters ) const {
...@@ -128,8 +122,6 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::getDerivedParameters( RealOpenMM c6, ...@@ -128,8 +122,6 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::getDerivedParameters( RealOpenMM c6,
parameters[1] = POW( (c12/c6), oneSixth ); parameters[1] = POW( (c12/c6), oneSixth );
} }
parameters[2] = epsfac*q1*q2; parameters[2] = epsfac*q1*q2;
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -236,11 +228,9 @@ void ReferenceFreeEnergyLJCoulomb14Softcore::calculateBondIxn( int* atomIndices, ...@@ -236,11 +228,9 @@ void ReferenceFreeEnergyLJCoulomb14Softcore::calculateBondIxn( int* atomIndices,
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps, void ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps,
RealOpenMM* dEdR, RealOpenMM* energy ) const { RealOpenMM* dEdR, RealOpenMM* energy ) const {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -262,8 +252,6 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inve ...@@ -262,8 +252,6 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inve
*dEdR = eps*( twelve*sig6 - six )*sig6; *dEdR = eps*( twelve*sig6 - six )*sig6;
*energy += eps*(sig6-one)*sig6; *energy += eps*(sig6-one)*sig6;
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -277,11 +265,9 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inve ...@@ -277,11 +265,9 @@ int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneLJ14Ixn( RealOpenMM inve
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneSoftCoreLJ14Ixn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps, void ReferenceFreeEnergyLJCoulomb14Softcore::calculateOneSoftCoreLJ14Ixn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps,
RealOpenMM lambda, RealOpenMM lambda,
RealOpenMM* dEdR, RealOpenMM* energy ) const { RealOpenMM* dEdR, RealOpenMM* energy ) const {
...@@ -328,5 +314,4 @@ if( maxPrint++ < 5 ){ ...@@ -328,5 +314,4 @@ if( maxPrint++ < 5 ){
r, sig, eps/lambda, lambda, dEdROrig, *dEdR, E_Orig, *energy, softcoreLJInv, sig6 ); r, sig, eps/lambda, lambda, dEdROrig, *dEdR, E_Orig, *energy, softcoreLJInv, sig6 );
} }
#endif #endif
return ReferenceForce::DefaultReturn;
} }
...@@ -62,11 +62,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn { ...@@ -62,11 +62,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn {
@param distance the cutoff distance @param distance the cutoff distance
@param solventDielectric the dielectric constant of the bulk solvent @param solventDielectric the dielectric constant of the bulk solvent
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setUseCutoff( RealOpenMM distance, RealOpenMM solventDielectric ); void setUseCutoff( RealOpenMM distance, RealOpenMM solventDielectric );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -82,11 +80,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn { ...@@ -82,11 +80,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn {
parameter[1]= (c12/c6)**1/6 parameter[1]= (c12/c6)**1/6
parameter[2]= epsfactor*q1*q2 parameter[2]= epsfactor*q1*q2
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1, void getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1,
RealOpenMM q2, RealOpenMM epsfac, RealOpenMM q2, RealOpenMM epsfac,
RealOpenMM* parameters ) const; RealOpenMM* parameters ) const;
...@@ -116,11 +112,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn { ...@@ -116,11 +112,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn {
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateOneLJ14Ixn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps, void calculateOneLJ14Ixn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps,
RealOpenMM* dEdR, RealOpenMM* energy ) const; RealOpenMM* dEdR, RealOpenMM* energy ) const;
...@@ -135,11 +129,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn { ...@@ -135,11 +129,9 @@ class ReferenceFreeEnergyLJCoulomb14Softcore : public ReferenceBondIxn {
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateOneSoftCoreLJ14Ixn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps, void calculateOneSoftCoreLJ14Ixn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps,
RealOpenMM lambda, RealOpenMM* dEdR, RealOpenMM* energy ) const; RealOpenMM lambda, RealOpenMM* dEdR, RealOpenMM* energy ) const;
}; };
......
...@@ -81,19 +81,15 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx ...@@ -81,19 +81,15 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx
@param neighbors the neighbor list to use @param neighbors the neighbor list to use
@param solventDielectric the dielectric constant of the bulk solvent @param solventDielectric the dielectric constant of the bulk solvent
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric ) { void ReferenceFreeEnergyLJCoulombSoftcoreIxn::setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric ) {
cutoff = true; cutoff = true;
cutoffDistance = distance; cutoffDistance = distance;
neighborList = &neighbors; neighborList = &neighbors;
krf = pow(cutoffDistance, (RealOpenMM)-3.0)*(solventDielectric-1.0f)/(2.0f*solventDielectric+1.0f); krf = pow(cutoffDistance, (RealOpenMM)-3.0)*(solventDielectric-1.0f)/(2.0f*solventDielectric+1.0f);
crf = (1.0f/cutoffDistance)*(3.0f*solventDielectric)/(2.0f*solventDielectric+1.0f); crf = (1.0f/cutoffDistance)*(3.0f*solventDielectric)/(2.0f*solventDielectric+1.0f);
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -104,11 +100,9 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx ...@@ -104,11 +100,9 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::setPeriodic( RealVec& boxSize ) { void ReferenceFreeEnergyLJCoulombSoftcoreIxn::setPeriodic( RealVec& boxSize ) {
assert(cutoff); assert(cutoff);
assert(boxSize[0] >= 2.0*cutoffDistance); assert(boxSize[0] >= 2.0*cutoffDistance);
...@@ -118,8 +112,6 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx ...@@ -118,8 +112,6 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx
periodicBoxSize[0] = boxSize[0]; periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1]; periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2]; periodicBoxSize[2] = boxSize[2];
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -180,11 +172,9 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx ...@@ -180,11 +172,9 @@ ReferenceFreeEnergyLJCoulombSoftcoreIxn::~ReferenceFreeEnergyLJCoulombSoftcoreIx
parameter[EpsIndex] = sqrt(c6*c6/c12) (2*sqrt(epsilon)) parameter[EpsIndex] = sqrt(c6*c6/c12) (2*sqrt(epsilon))
parameter[QIndex] = epsfactorSqrt*q1 parameter[QIndex] = epsfactorSqrt*q1
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1,
RealOpenMM epsfacSqrt, RealOpenMM epsfacSqrt,
RealOpenMM* parameters ) const { RealOpenMM* parameters ) const {
...@@ -215,8 +205,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6 ...@@ -215,8 +205,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6
} }
parameters[QIndex] = epsfacSqrt*q1; parameters[QIndex] = epsfacSqrt*q1;
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -235,11 +223,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6 ...@@ -235,11 +223,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::getDerivedParameters( RealOpenMM c6
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, vector<RealVec>& forces, RealOpenMM* fixedParameters, vector<RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const { RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const {
...@@ -524,7 +510,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom ...@@ -524,7 +510,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom
// *********************************************************************** // ***********************************************************************
#endif #endif
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -542,12 +527,10 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom ...@@ -542,12 +527,10 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom
@param forces force array (forces added) @param forces force array (forces added)
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, vector<RealVec>& forces, RealOpenMM* fixedParameters, vector<RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const { RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const {
...@@ -655,7 +638,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms, ...@@ -655,7 +638,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms,
// *********************************************************************** // ***********************************************************************
#endif #endif
return ReferenceForce::DefaultReturn;
} }
...@@ -675,11 +657,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms, ...@@ -675,11 +657,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms,
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms, vector<RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, vector<RealVec>& forces, RealOpenMM* fixedParameters, vector<RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const { RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const {
...@@ -720,8 +700,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms ...@@ -720,8 +700,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms
delete[] exclusionIndices; delete[] exclusionIndices;
} }
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -736,11 +714,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms ...@@ -736,11 +714,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePairIxn( int numberOfAtoms
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, vector<RealVec>& atomCoordinates, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, vector<RealVec>& atomCoordinates,
RealOpenMM** atomParameters, vector<RealVec>& forces, RealOpenMM** atomParameters, vector<RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const { RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const {
...@@ -827,7 +803,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, ve ...@@ -827,7 +803,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, ve
energyByAtom[jj] += energy; energyByAtom[jj] += energy;
} }
} }
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -840,11 +815,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, ve ...@@ -840,11 +815,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, ve
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps,
RealOpenMM* dEdR, RealOpenMM* energy ) const { RealOpenMM* dEdR, RealOpenMM* energy ) const {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -866,8 +839,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inver ...@@ -866,8 +839,6 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inver
*dEdR = eps*( twelve*sig6 - six )*sig6; *dEdR = eps*( twelve*sig6 - six )*sig6;
*energy += eps*(sig6-one)*sig6; *energy += eps*(sig6-one)*sig6;
return ReferenceForce::DefaultReturn;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -881,11 +852,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inver ...@@ -881,11 +852,9 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneLJIxn( RealOpenMM inver
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneSoftCoreLJIxn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps, void ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneSoftCoreLJIxn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps,
RealOpenMM lambda, RealOpenMM lambda,
RealOpenMM* dEdR, RealOpenMM* energy ) const { RealOpenMM* dEdR, RealOpenMM* energy ) const {
...@@ -932,5 +901,4 @@ if( maxPrint++ < 5 ){ ...@@ -932,5 +901,4 @@ if( maxPrint++ < 5 ){
r, sig, eps/lambda, lambda, dEdROrig, *dEdR, E_Orig, *energy, softcoreLJInv, sig6 ); r, sig, eps/lambda, lambda, dEdROrig, *dEdR, E_Orig, *energy, softcoreLJInv, sig6 );
} }
#endif #endif
return ReferenceForce::DefaultReturn;
} }
...@@ -65,11 +65,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn { ...@@ -65,11 +65,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn {
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateOneIxn( int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates, void calculateOneIxn( int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM** atomParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const; RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const;
...@@ -100,11 +98,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn { ...@@ -100,11 +98,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn {
@param neighbors the neighbor list to use @param neighbors the neighbor list to use
@param solventDielectric the dielectric constant of the bulk solvent @param solventDielectric the dielectric constant of the bulk solvent
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric ); void setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -114,11 +110,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn { ...@@ -114,11 +110,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setPeriodic( OpenMM::RealVec& boxSize ); void setPeriodic( OpenMM::RealVec& boxSize );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -167,11 +161,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn { ...@@ -167,11 +161,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn {
parameter[EpsIndex] = 0.5*( (c12/c6)**1/6 ) parameter[EpsIndex] = 0.5*( (c12/c6)**1/6 )
parameter[QIndex] = epsfactorSqrt*q1 parameter[QIndex] = epsfactorSqrt*q1
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1, void getDerivedParameters( RealOpenMM c6, RealOpenMM c12, RealOpenMM q1,
RealOpenMM epsfacSqrt, RealOpenMM epsfacSqrt,
RealOpenMM* parameters ) const; RealOpenMM* parameters ) const;
...@@ -191,11 +183,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn { ...@@ -191,11 +183,9 @@ class ReferenceFreeEnergyLJCoulombSoftcoreIxn : public ReferencePairIxn {
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculatePairIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, void calculatePairIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const; RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const;
...@@ -217,11 +207,9 @@ private: ...@@ -217,11 +207,9 @@ private:
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateEwaldIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, void calculateEwaldIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const; RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const;
...@@ -241,12 +229,10 @@ private: ...@@ -241,12 +229,10 @@ private:
@param forces force array (forces added) @param forces force array (forces added)
@param energyByAtom atom energy @param energyByAtom atom energy
@param totalEnergy total energy @param totalEnergy total energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculatePMEIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, void calculatePMEIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions, RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const; RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const;
...@@ -261,11 +247,9 @@ private: ...@@ -261,11 +247,9 @@ private:
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateOneLJIxn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps, void calculateOneLJIxn( RealOpenMM inverseR, RealOpenMM sig, RealOpenMM eps,
RealOpenMM* dEdR, RealOpenMM* energy ) const; RealOpenMM* dEdR, RealOpenMM* energy ) const;
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -279,11 +263,9 @@ private: ...@@ -279,11 +263,9 @@ private:
@param dEdR output force factor @param dEdR output force factor
@param energy LJ energy @param energy LJ energy
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int calculateOneSoftCoreLJIxn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps, void calculateOneSoftCoreLJIxn( RealOpenMM r, RealOpenMM sig, RealOpenMM eps,
RealOpenMM lambda, RealOpenMM* dEdR, RealOpenMM* energy ) const; RealOpenMM lambda, RealOpenMM* dEdR, RealOpenMM* energy ) const;
......
...@@ -122,11 +122,9 @@ GBVISoftcoreParameters* CpuGBVISoftcore::getGBVISoftcoreParameters( void ) const ...@@ -122,11 +122,9 @@ GBVISoftcoreParameters* CpuGBVISoftcore::getGBVISoftcoreParameters( void ) const
@param GBVISoftcoreParameters reference @param GBVISoftcoreParameters reference
@return 0;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuGBVISoftcore::setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviParameters ){ void CpuGBVISoftcore::setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviParameters ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -135,7 +133,6 @@ int CpuGBVISoftcore::setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviPara ...@@ -135,7 +133,6 @@ int CpuGBVISoftcore::setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviPara
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_gbviParameters = gbviParameters; _gbviParameters = gbviParameters;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -190,13 +187,11 @@ RealOpenMM* CpuGBVISoftcore::getSwitchDeriviativeConst( void ) const { ...@@ -190,13 +187,11 @@ RealOpenMM* CpuGBVISoftcore::getSwitchDeriviativeConst( void ) const {
@param outValue value of spline at x @param outValue value of spline at x
@param outDerivative value of derivative of spline at x @param outDerivative value of derivative of spline at x
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
#define GBVISoftcoreDebug 0 #define GBVISoftcoreDebug 0
int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru, void CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
RealOpenMM* outValue, RealOpenMM* outDerivative ){ RealOpenMM* outValue, RealOpenMM* outDerivative ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -220,8 +215,6 @@ int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru, ...@@ -220,8 +215,6 @@ int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
*outValue = one + ratio3*(minusTen + fifteen*ratio + minusSix*ratio2); *outValue = one + ratio3*(minusTen + fifteen*ratio + minusSix*ratio2);
*outDerivative = ratio2*(minusThirty + sixty*ratio + minusThirty*ratio2)/denominator; *outDerivative = ratio2*(minusThirty + sixty*ratio + minusThirty*ratio2)/denominator;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -236,13 +229,11 @@ int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru, ...@@ -236,13 +229,11 @@ int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
@param bornRadius output Born radius @param bornRadius output Born radius
@param switchDeriviative output switching function deriviative @param switchDeriviative output switching function deriviative
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
#define GBVISoftcoreDebug 0 #define GBVISoftcoreDebug 0
int CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, RealOpenMM bornSum, void CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, RealOpenMM bornSum,
GBVISoftcoreParameters* gbviParameters, GBVISoftcoreParameters* gbviParameters,
RealOpenMM& bornRadius, RealOpenMM* switchDeriviative ){ RealOpenMM& bornRadius, RealOpenMM* switchDeriviative ){
...@@ -303,8 +294,6 @@ int CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius ...@@ -303,8 +294,6 @@ int CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius
*switchDeriviative = one; *switchDeriviative = one;
} }
bornRadius = POW( sum, minusOneThird ); bornRadius = POW( sum, minusOneThird );
return 0;
} }
#undef GBVISoftcoreDebug #undef GBVISoftcoreDebug
...@@ -317,13 +306,11 @@ int CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius ...@@ -317,13 +306,11 @@ int CpuGBVISoftcore::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius
@param bornRadii output array of Born radii @param bornRadii output array of Born radii
@param chain not used here @param chain not used here
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
#define GBVISoftcoreDebug 0 #define GBVISoftcoreDebug 0
int CpuGBVISoftcore::computeBornRadii( vector<RealVec>& atomCoordinates, vector<RealOpenMM>& bornRadii, RealOpenMM* switchDeriviative ){ void CpuGBVISoftcore::computeBornRadii( vector<RealVec>& atomCoordinates, vector<RealOpenMM>& bornRadii, RealOpenMM* switchDeriviative ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -412,8 +399,6 @@ if( atomI == 0 || atomI == 1 ){ ...@@ -412,8 +399,6 @@ if( atomI == 0 || atomI == 1 ){
} }
return 0;
} }
#undef GBVISoftcoreDebug #undef GBVISoftcoreDebug
...@@ -715,12 +700,10 @@ RealOpenMM e3 = -partialChargeI2*partialCharges[atomJ]*Sgb( t )/deltaR[Reference ...@@ -715,12 +700,10 @@ RealOpenMM e3 = -partialChargeI2*partialCharges[atomJ]*Sgb( t )/deltaR[Reference
@param partialCharges partial charges @param partialCharges partial charges
@param forces forces @param forces forces
@return 0;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuGBVISoftcore::computeBornForces( const vector<RealOpenMM>& bornRadii, vector<RealVec>& atomCoordinates, void CpuGBVISoftcore::computeBornForces( const vector<RealOpenMM>& bornRadii, vector<RealVec>& atomCoordinates,
const RealOpenMM* partialCharges, vector<RealVec>& inputForces ){ const RealOpenMM* partialCharges, vector<RealVec>& inputForces ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -1103,9 +1086,6 @@ if( atomI == 0 ){ ...@@ -1103,9 +1086,6 @@ if( atomI == 0 ){
delete[] forces; delete[] forces;
delete[] block; delete[] block;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
...@@ -85,11 +85,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent { ...@@ -85,11 +85,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
@param ImplicitSolventParameters @param ImplicitSolventParameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviParameters ); void setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviParameters );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -111,11 +109,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent { ...@@ -111,11 +109,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
@param bornRadii output array of Born radii @param bornRadii output array of Born radii
@param switchDeriviative derivative of switch function @param switchDeriviative derivative of switch function
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeBornRadii( std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<RealOpenMM>& bornRadii, void computeBornRadii( std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<RealOpenMM>& bornRadii,
RealOpenMM* switchDeriviative = NULL ); RealOpenMM* switchDeriviative = NULL );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -222,11 +218,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent { ...@@ -222,11 +218,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
@param partialCharges partial charges @param partialCharges partial charges
@param forces output forces @param forces output forces
@return SimTKOpenMMCommon::DefaultReturn;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeBornForces( const std::vector<RealOpenMM>& bornRadii, std::vector<OpenMM::RealVec>& atomCoordinates, void computeBornForces( const std::vector<RealOpenMM>& bornRadii, std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMM* partialCharges, std::vector<OpenMM::RealVec>& inputForces ); const RealOpenMM* partialCharges, std::vector<OpenMM::RealVec>& inputForces );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -295,11 +289,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent { ...@@ -295,11 +289,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
@param outValue value of spline at x @param outValue value of spline at x
@param outDerivative value of derivative of spline at x @param outDerivative value of derivative of spline at x
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru, RealOpenMM* outValue, RealOpenMM* outDerivative ); void quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru, RealOpenMM* outValue, RealOpenMM* outDerivative );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -313,11 +305,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent { ...@@ -313,11 +305,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
@param bornRadius output Born radius @param bornRadius output Born radius
@param switchDeriviative output switching function deriviative @param switchDeriviative output switching function deriviative
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, RealOpenMM bornSum, void computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, RealOpenMM bornSum,
GBVISoftcoreParameters* gbviParameters, GBVISoftcoreParameters* gbviParameters,
RealOpenMM& bornRadius, RealOpenMM* switchDeriviative ); RealOpenMM& bornRadius, RealOpenMM* switchDeriviative );
......
...@@ -116,11 +116,9 @@ ObcSoftcoreParameters* CpuObcSoftcore::getObcSoftcoreParameters( void ) const { ...@@ -116,11 +116,9 @@ ObcSoftcoreParameters* CpuObcSoftcore::getObcSoftcoreParameters( void ) const {
@param ObcSoftcoreParameters reference @param ObcSoftcoreParameters reference
@return SimTKOpenMMCommon::DefaultReturn;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuObcSoftcore::setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcoreParameters ){ void CpuObcSoftcore::setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcoreParameters ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -129,7 +127,6 @@ int CpuObcSoftcore::setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcor ...@@ -129,7 +127,6 @@ int CpuObcSoftcore::setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcor
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_obcSoftcoreParameters = obcSoftcoreParameters; _obcSoftcoreParameters = obcSoftcoreParameters;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -207,11 +204,9 @@ vector<RealOpenMM>& CpuObcSoftcore::getObcChainTemp( void ){ ...@@ -207,11 +204,9 @@ vector<RealOpenMM>& CpuObcSoftcore::getObcChainTemp( void ){
@param atomCoordinates atomic coordinates @param atomCoordinates atomic coordinates
@param bornRadii output array of Born radii @param bornRadii output array of Born radii
@return array of Born radii
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuObcSoftcore::computeBornRadii( vector<RealVec>& atomCoordinates, RealOpenMM* bornRadii ){ void CpuObcSoftcore::computeBornRadii( vector<RealVec>& atomCoordinates, RealOpenMM* bornRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -333,9 +328,6 @@ if( logFile ){ ...@@ -333,9 +328,6 @@ if( logFile ){
(void) fclose( logFile ); (void) fclose( logFile );
} }
#endif #endif
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -348,11 +340,9 @@ if( logFile ){ ...@@ -348,11 +340,9 @@ if( logFile ){
@param energy energy (output): value is incremented from input value @param energy energy (output): value is incremented from input value
@param forces forces: values are incremented from input values @param forces forces: values are incremented from input values
@return 0
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSoftcoreParameters, void CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSoftcoreParameters,
const vector<RealOpenMM>& bornRadii, RealOpenMM* energy, const vector<RealOpenMM>& bornRadii, RealOpenMM* energy,
vector<RealOpenMM>& forces ) const { vector<RealOpenMM>& forces ) const {
...@@ -398,9 +388,6 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof ...@@ -398,9 +388,6 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof
forces[atomI] += minusSix*saTerm/bornRadii[atomI]; forces[atomI] += minusSix*saTerm/bornRadii[atomI];
} }
} }
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -413,13 +400,11 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof ...@@ -413,13 +400,11 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof
@param partialCharges partial charges @param partialCharges partial charges
@param forces forces @param forces forces
@return 0
The array bornRadii is also updated and the obcEnergy The array bornRadii is also updated and the obcEnergy
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int CpuObcSoftcore::computeBornEnergyForces( vector<RealOpenMM>& bornRadii, vector<RealVec>& atomCoordinates, void CpuObcSoftcore::computeBornEnergyForces( vector<RealOpenMM>& bornRadii, vector<RealVec>& atomCoordinates,
const RealOpenMM* partialCharges, vector<RealVec>& inputForces ){ const RealOpenMM* partialCharges, vector<RealVec>& inputForces ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -720,9 +705,6 @@ int CpuObcSoftcore::computeBornEnergyForces( vector<RealOpenMM>& bornRadii, vect ...@@ -720,9 +705,6 @@ int CpuObcSoftcore::computeBornEnergyForces( vector<RealOpenMM>& bornRadii, vect
bornRadii = bornRadiiTemp; bornRadii = bornRadiiTemp;
obcChain = obcChainTemp; obcChain = obcChainTemp;
free( (char*) block ); free( (char*) block );
free( (char*) forces ); free( (char*) forces );
return 0;
} }
...@@ -86,11 +86,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent { ...@@ -86,11 +86,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent {
@param ImplicitSolventParameters @param ImplicitSolventParameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcoreParameters ); void setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcoreParameters );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -124,11 +122,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent { ...@@ -124,11 +122,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent {
@param obcChain output array of OBC chain derivative factors; if NULL, @param obcChain output array of OBC chain derivative factors; if NULL,
then ignored then ignored
@return array of Born radii
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeBornRadii( std::vector<OpenMM::RealVec>& atomCoordinates, RealOpenMM* bornRadii ); void computeBornRadii( std::vector<OpenMM::RealVec>& atomCoordinates, RealOpenMM* bornRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -140,11 +136,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent { ...@@ -140,11 +136,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent {
@param energy energy (output): value is incremented from input value @param energy energy (output): value is incremented from input value
@param forces forces: values are incremented from input values @param forces forces: values are incremented from input values
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeAceNonPolarForce( const ObcSoftcoreParameters* obcSoftcoreParameters, void computeAceNonPolarForce( const ObcSoftcoreParameters* obcSoftcoreParameters,
const std::vector<RealOpenMM>& bornRadii, RealOpenMM* energy, const std::vector<RealOpenMM>& bornRadii, RealOpenMM* energy,
std::vector<RealOpenMM>& forces ) const; std::vector<RealOpenMM>& forces ) const;
...@@ -157,11 +151,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent { ...@@ -157,11 +151,9 @@ class CpuObcSoftcore : public CpuImplicitSolvent {
@param partialCharges partial charges @param partialCharges partial charges
@param forces forces @param forces forces
@return force array
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int computeBornEnergyForces( std::vector<RealOpenMM>& bornRadii, std::vector<OpenMM::RealVec>& atomCoordinates, void computeBornEnergyForces( std::vector<RealOpenMM>& bornRadii, std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMM* partialCharges, std::vector<OpenMM::RealVec>& forces ); const RealOpenMM* partialCharges, std::vector<OpenMM::RealVec>& forces );
}; };
......
...@@ -187,11 +187,10 @@ RealOpenMM GBVISoftcoreParameters::getQuinticLowerLimitFactor( void ) const { ...@@ -187,11 +187,10 @@ RealOpenMM GBVISoftcoreParameters::getQuinticLowerLimitFactor( void ) const {
Set the quintic spline lower limit factor Set the quintic spline lower limit factor
@param quintic spline lower limit factor @param quintic spline lower limit factor
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFactor ){ void GBVISoftcoreParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFactor ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -200,7 +199,6 @@ int GBVISoftcoreParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerL ...@@ -200,7 +199,6 @@ int GBVISoftcoreParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerL
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_quinticLowerLimitFactor = quinticLowerLimitFactor; _quinticLowerLimitFactor = quinticLowerLimitFactor;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -228,11 +226,9 @@ RealOpenMM GBVISoftcoreParameters::getQuinticUpperBornRadiusLimit( void ) const ...@@ -228,11 +226,9 @@ RealOpenMM GBVISoftcoreParameters::getQuinticUpperBornRadiusLimit( void ) const
@param quintic spline upper limit @param quintic spline upper limit
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setQuinticUpperBornRadiusLimit( RealOpenMM quinticUpperBornRadiusLimit ){ void GBVISoftcoreParameters::setQuinticUpperBornRadiusLimit( RealOpenMM quinticUpperBornRadiusLimit ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -242,7 +238,6 @@ int GBVISoftcoreParameters::setQuinticUpperBornRadiusLimit( RealOpenMM quinticUp ...@@ -242,7 +238,6 @@ int GBVISoftcoreParameters::setQuinticUpperBornRadiusLimit( RealOpenMM quinticUp
_quinticUpperBornRadiusLimit = quinticUpperBornRadiusLimit; _quinticUpperBornRadiusLimit = quinticUpperBornRadiusLimit;
_quinticUpperSplineLimit = POW( _quinticUpperBornRadiusLimit, static_cast<RealOpenMM>(-3.0) ); _quinticUpperSplineLimit = POW( _quinticUpperBornRadiusLimit, static_cast<RealOpenMM>(-3.0) );
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -291,11 +286,9 @@ RealOpenMM* GBVISoftcoreParameters::getAtomicRadii( void ) const { ...@@ -291,11 +286,9 @@ RealOpenMM* GBVISoftcoreParameters::getAtomicRadii( void ) const {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ void GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -303,7 +296,7 @@ int GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -303,7 +296,7 @@ int GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -312,11 +305,9 @@ int GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -312,11 +305,9 @@ int GBVISoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){ void GBVISoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -324,7 +315,7 @@ int GBVISoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ...@@ -324,7 +315,7 @@ int GBVISoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -360,11 +351,9 @@ const RealOpenMM* GBVISoftcoreParameters::getScaledRadii( void ) const { ...@@ -360,11 +351,9 @@ const RealOpenMM* GBVISoftcoreParameters::getScaledRadii( void ) const {
@param ownScaledRadii flag indicating whether scale factors @param ownScaledRadii flag indicating whether scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){ void GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -373,8 +362,6 @@ int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){ ...@@ -373,8 +362,6 @@ int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownScaledRadii = ownScaledRadii; _ownScaledRadii = ownScaledRadii;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -383,11 +370,9 @@ int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){ ...@@ -383,11 +370,9 @@ int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){
@param scaledRadii scaledRadii @param scaledRadii scaledRadii
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){ void GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -401,9 +386,6 @@ int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){ ...@@ -401,9 +386,6 @@ int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){
} }
_scaledRadii = scaledRadii; _scaledRadii = scaledRadii;
return 0;
} }
#if RealOpenMMType == 0 #if RealOpenMMType == 0
...@@ -414,11 +396,9 @@ int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){ ...@@ -414,11 +396,9 @@ int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){
@param scaledRadii scaledRadii @param scaledRadii scaledRadii
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){ void GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -433,9 +413,6 @@ int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){ ...@@ -433,9 +413,6 @@ int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){
for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){ for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){
_scaledRadii[ii] = (RealOpenMM) scaledRadii[ii]; _scaledRadii[ii] = (RealOpenMM) scaledRadii[ii];
} }
return 0;
} }
#endif #endif
...@@ -446,11 +423,9 @@ int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){ ...@@ -446,11 +423,9 @@ int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){
@param scaledRadii scaledRadii @param scaledRadii scaledRadii
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setScaledRadii( const RealOpenMMVector& scaledRadii ){ void GBVISoftcoreParameters::setScaledRadii( const RealOpenMMVector& scaledRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -466,8 +441,6 @@ int GBVISoftcoreParameters::setScaledRadii( const RealOpenMMVector& scaledRadii ...@@ -466,8 +441,6 @@ int GBVISoftcoreParameters::setScaledRadii( const RealOpenMMVector& scaledRadii
for( int ii = 0; ii < (int) scaledRadii.size(); ii++ ){ for( int ii = 0; ii < (int) scaledRadii.size(); ii++ ){
_scaledRadii[ii] = scaledRadii[ii]; _scaledRadii[ii] = scaledRadii[ii];
} }
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -503,11 +476,9 @@ RealOpenMM* GBVISoftcoreParameters::getGammaParameters( void ) const { ...@@ -503,11 +476,9 @@ RealOpenMM* GBVISoftcoreParameters::getGammaParameters( void ) const {
@param ownGammaParameters flag indicating whether gamma parameter @param ownGammaParameters flag indicating whether gamma parameter
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){ void GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -516,8 +487,6 @@ int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){ ...@@ -516,8 +487,6 @@ int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownGammaParameters = ownGammaParameters; _ownGammaParameters = ownGammaParameters;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -526,11 +495,9 @@ int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){ ...@@ -526,11 +495,9 @@ int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){
@param gammas gamma parameters @param gammas gamma parameters
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){ void GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -544,9 +511,6 @@ int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){ ...@@ -544,9 +511,6 @@ int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){
} }
_gammaParameters = gammas; _gammaParameters = gammas;
return 0;
} }
#if RealOpenMMType == 0 #if RealOpenMMType == 0
...@@ -557,11 +521,9 @@ int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){ ...@@ -557,11 +521,9 @@ int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){
@param gammas gammas @param gammas gammas
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setGammaParameters( float* gammas ){ void GBVISoftcoreParameters::setGammaParameters( float* gammas ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -576,9 +538,6 @@ int GBVISoftcoreParameters::setGammaParameters( float* gammas ){ ...@@ -576,9 +538,6 @@ int GBVISoftcoreParameters::setGammaParameters( float* gammas ){
for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){ for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){
_gammaParameters[ii] = (RealOpenMM) gammas[ii]; _gammaParameters[ii] = (RealOpenMM) gammas[ii];
} }
return 0;
} }
#endif #endif
...@@ -589,11 +548,9 @@ int GBVISoftcoreParameters::setGammaParameters( float* gammas ){ ...@@ -589,11 +548,9 @@ int GBVISoftcoreParameters::setGammaParameters( float* gammas ){
@param gammas gammas @param gammas gammas
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setGammaParameters( const RealOpenMMVector& gammas ){ void GBVISoftcoreParameters::setGammaParameters( const RealOpenMMVector& gammas ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -610,8 +567,6 @@ int GBVISoftcoreParameters::setGammaParameters( const RealOpenMMVector& gammas ) ...@@ -610,8 +567,6 @@ int GBVISoftcoreParameters::setGammaParameters( const RealOpenMMVector& gammas )
for( int ii = 0; ii < (int) gammas.size(); ii++ ){ for( int ii = 0; ii < (int) gammas.size(); ii++ ){
_gammaParameters[ii] = gammas[ii]; _gammaParameters[ii] = gammas[ii];
} }
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -647,11 +602,9 @@ RealOpenMM* GBVISoftcoreParameters::getBornRadiusScaleFactors( void ) const { ...@@ -647,11 +602,9 @@ RealOpenMM* GBVISoftcoreParameters::getBornRadiusScaleFactors( void ) const {
@param ownBornRadiusScaleFactors flag indicating whether Born radius scale factors @param ownBornRadiusScaleFactors flag indicating whether Born radius scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScaleFactorsParameters ){ void GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScaleFactorsParameters ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -660,8 +613,6 @@ int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScale ...@@ -660,8 +613,6 @@ int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScale
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownBornRadiusScaleFactors = ownBornRadiusScaleFactorsParameters; _ownBornRadiusScaleFactors = ownBornRadiusScaleFactorsParameters;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -670,11 +621,9 @@ int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScale ...@@ -670,11 +621,9 @@ int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScale
@param bornRadiusScaleFactors Born radius scale factors @param bornRadiusScaleFactors Born radius scale factors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusScaleFactors ){ void GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusScaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -688,9 +637,6 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusSca ...@@ -688,9 +637,6 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusSca
} }
_bornRadiusScaleFactors = bornRadiusScaleFactors; _bornRadiusScaleFactors = bornRadiusScaleFactors;
return 0;
} }
#if RealOpenMMType == 0 #if RealOpenMMType == 0
...@@ -701,11 +647,9 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusSca ...@@ -701,11 +647,9 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusSca
@param bornRadiusScaleFactorss bornRadiusScaleFactorss @param bornRadiusScaleFactorss bornRadiusScaleFactorss
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setBornRadiusScaleFactors( float* bornRadiusScaleFactorss ){ void GBVISoftcoreParameters::setBornRadiusScaleFactors( float* bornRadiusScaleFactorss ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -733,11 +677,9 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( float* bornRadiusScaleFac ...@@ -733,11 +677,9 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( float* bornRadiusScaleFac
@param bornRadiusScaleFactors bornRadiusScaleFactors @param bornRadiusScaleFactors bornRadiusScaleFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setBornRadiusScaleFactors( const RealOpenMMVector& bornRadiusScaleFactors ){ void GBVISoftcoreParameters::setBornRadiusScaleFactors( const RealOpenMMVector& bornRadiusScaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -754,8 +696,6 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( const RealOpenMMVector& b ...@@ -754,8 +696,6 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( const RealOpenMMVector& b
for( int ii = 0; ii < (int) bornRadiusScaleFactors.size(); ii++ ){ for( int ii = 0; ii < (int) bornRadiusScaleFactors.size(); ii++ ){
_bornRadiusScaleFactors[ii] = bornRadiusScaleFactors[ii]; _bornRadiusScaleFactors[ii] = bornRadiusScaleFactors[ii];
} }
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -791,15 +731,12 @@ std::string GBVISoftcoreParameters::getStateString( const char* title ) const { ...@@ -791,15 +731,12 @@ std::string GBVISoftcoreParameters::getStateString( const char* title ) const {
@param distance the cutoff distance @param distance the cutoff distance
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setUseCutoff( RealOpenMM distance ) { void GBVISoftcoreParameters::setUseCutoff( RealOpenMM distance ) {
cutoff = true; cutoff = true;
cutoffDistance = distance; cutoffDistance = distance;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -830,11 +767,9 @@ RealOpenMM GBVISoftcoreParameters::getCutoffDistance() { ...@@ -830,11 +767,9 @@ RealOpenMM GBVISoftcoreParameters::getCutoffDistance() {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int GBVISoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) { void GBVISoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
assert(cutoff); assert(cutoff);
assert(boxSize[0] >= 2.0*cutoffDistance); assert(boxSize[0] >= 2.0*cutoffDistance);
...@@ -844,7 +779,6 @@ int GBVISoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) { ...@@ -844,7 +779,6 @@ int GBVISoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
periodicBoxSize[0] = boxSize[0]; periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1]; periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2]; periodicBoxSize[2] = boxSize[2];
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
...@@ -119,11 +119,11 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -119,11 +119,11 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setScaledRadii( RealOpenMM* scaledRadii ); void setScaledRadii( RealOpenMM* scaledRadii );
#if RealOpenMMType == 0 #if RealOpenMMType == 0
int setScaledRadii( float* scaledRadii ); void setScaledRadii( float* scaledRadii );
#endif #endif
int setScaledRadii( const RealOpenMMVector& scaledRadii ); void setScaledRadii( const RealOpenMMVector& scaledRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -131,12 +131,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -131,12 +131,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param ownScaledRadiusFactors flag indicating whether scaled radii @param ownScaledRadiusFactors flag indicating whether scaled radii
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setOwnScaledRadii( int ownScaledRadii ); void setOwnScaledRadii( int ownScaledRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -154,11 +152,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -154,11 +152,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setAtomicRadii( RealOpenMM* atomicRadii ); void setAtomicRadii( RealOpenMM* atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -166,11 +162,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -166,11 +162,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setAtomicRadii( const RealOpenMMVector& atomicRadii ); void setAtomicRadii( const RealOpenMMVector& atomicRadii );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -178,12 +172,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -178,12 +172,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param ownGammaParameters flag indicating whether gamma parameter @param ownGammaParameters flag indicating whether gamma parameter
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setOwnGammaParameters( int ownGammaParameters ); void setOwnGammaParameters( int ownGammaParameters );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -201,11 +193,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -201,11 +193,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param gammaParameters array of gamma parameters @param gammaParameters array of gamma parameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setGammaParameters( RealOpenMM* gammaParameters ); void setGammaParameters( RealOpenMM* gammaParameters );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -213,11 +203,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -213,11 +203,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param gammaParameters array of gamma parameters @param gammaParameters array of gamma parameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setGammaParameters( const RealOpenMMVector& gammaParameters ); void setGammaParameters( const RealOpenMMVector& gammaParameters );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -225,12 +213,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -225,12 +213,10 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param ownBornRadiusScaleFactors flag indicating whether bornRadiusScaleFactor parameter @param ownBornRadiusScaleFactors flag indicating whether bornRadiusScaleFactor parameter
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setOwnBornRadiusScaleFactors( int ownBornRadiusScaleFactors ); void setOwnBornRadiusScaleFactors( int ownBornRadiusScaleFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -248,11 +234,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -248,11 +234,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param bornRadiusScaleFactors array of bornRadiusScaleFactor parameters @param bornRadiusScaleFactors array of bornRadiusScaleFactor parameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setBornRadiusScaleFactors( RealOpenMM* bornRadiusScaleFactors ); void setBornRadiusScaleFactors( RealOpenMM* bornRadiusScaleFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -260,11 +244,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -260,11 +244,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param bornRadiusScaleFactors array of bornRadiusScaleFactor parameters @param bornRadiusScaleFactors array of bornRadiusScaleFactor parameters
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setBornRadiusScaleFactors( const RealOpenMMVector& bornRadiusScaleFactors ); void setBornRadiusScaleFactors( const RealOpenMMVector& bornRadiusScaleFactors );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -284,11 +266,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -284,11 +266,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param distance the cutoff distance @param distance the cutoff distance
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setUseCutoff( RealOpenMM distance ); void setUseCutoff( RealOpenMM distance );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -314,11 +294,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -314,11 +294,9 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setPeriodic( RealOpenMM* boxSize ); void setPeriodic( RealOpenMM* boxSize );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -350,7 +328,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -350,7 +328,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFactor ); void setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFactor );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -367,7 +345,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -367,7 +345,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int setQuinticUpperBornRadiusLimit( RealOpenMM quinticUpperBornRadiusLimit ); void setQuinticUpperBornRadiusLimit( RealOpenMM quinticUpperBornRadiusLimit );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
...@@ -196,11 +196,9 @@ ObcSoftcoreParameters::ObcType ObcSoftcoreParameters::getObcType( void ) const { ...@@ -196,11 +196,9 @@ ObcSoftcoreParameters::ObcType ObcSoftcoreParameters::getObcType( void ) const {
@param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8) @param obcType OBC type (ObcTypeI or ObcTypeII -- Eq. 7 or 8)
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setObcTypeParameters( ObcSoftcoreParameters::ObcType obcType ){ void ObcSoftcoreParameters::setObcTypeParameters( ObcSoftcoreParameters::ObcType obcType ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -218,8 +216,6 @@ int ObcSoftcoreParameters::setObcTypeParameters( ObcSoftcoreParameters::ObcType ...@@ -218,8 +216,6 @@ int ObcSoftcoreParameters::setObcTypeParameters( ObcSoftcoreParameters::ObcType
_gammaObc = 4.85f; _gammaObc = 4.85f;
} }
_obcType = obcType; _obcType = obcType;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -327,11 +323,9 @@ RealOpenMM* ObcSoftcoreParameters::getAtomicRadii( void ) const { ...@@ -327,11 +323,9 @@ RealOpenMM* ObcSoftcoreParameters::getAtomicRadii( void ) const {
@param atomicRadii array of atomic radii @param atomicRadii array of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ void ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -339,7 +333,7 @@ int ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -339,7 +333,7 @@ int ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -348,11 +342,9 @@ int ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){ ...@@ -348,11 +342,9 @@ int ObcSoftcoreParameters::setAtomicRadii( RealOpenMM* atomicRadii ){
@param atomicRadii vector of atomic radii @param atomicRadii vector of atomic radii
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){ void ObcSoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -360,7 +352,7 @@ int ObcSoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ) ...@@ -360,7 +352,7 @@ int ObcSoftcoreParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii )
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
return ImplicitSolventParameters::setAtomicRadii( atomicRadii ); ImplicitSolventParameters::setAtomicRadii( atomicRadii );
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -396,11 +388,9 @@ const RealOpenMM* ObcSoftcoreParameters::getScaledRadiusFactors( void ) const { ...@@ -396,11 +388,9 @@ const RealOpenMM* ObcSoftcoreParameters::getScaledRadiusFactors( void ) const {
@param ownScaledRadiusFactors flag indicating whether scale factors @param ownScaledRadiusFactors flag indicating whether scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ void ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -409,8 +399,6 @@ int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ ...@@ -409,8 +399,6 @@ int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownScaledRadiusFactors = ownScaledRadiusFactors; _ownScaledRadiusFactors = ownScaledRadiusFactors;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -419,11 +407,9 @@ int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){ ...@@ -419,11 +407,9 @@ int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
@param scaledRadiusFactors scaledRadiusFactors @param scaledRadiusFactors scaledRadiusFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){ void ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -437,9 +423,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFacto ...@@ -437,9 +423,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFacto
} }
_scaledRadiusFactors = scaledRadiusFactors; _scaledRadiusFactors = scaledRadiusFactors;
return 0;
} }
#if RealOpenMMType == 0 #if RealOpenMMType == 0
...@@ -450,11 +433,9 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFacto ...@@ -450,11 +433,9 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFacto
@param scaledRadiusFactors scaledRadiusFactors @param scaledRadiusFactors scaledRadiusFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){ void ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -469,9 +450,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){ ...@@ -469,9 +450,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){
for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){ for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){
_scaledRadiusFactors[ii] = (RealOpenMM) scaledRadiusFactors[ii]; _scaledRadiusFactors[ii] = (RealOpenMM) scaledRadiusFactors[ii];
} }
return 0;
} }
#endif #endif
...@@ -482,11 +460,9 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){ ...@@ -482,11 +460,9 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){
@param scaledRadiusFactors scaledRadiusFactors @param scaledRadiusFactors scaledRadiusFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors ){ void ObcSoftcoreParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadiusFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -502,8 +478,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( const RealOpenMMVector& scale ...@@ -502,8 +478,6 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( const RealOpenMMVector& scale
for( int ii = 0; ii < (int) scaledRadiusFactors.size(); ii++ ){ for( int ii = 0; ii < (int) scaledRadiusFactors.size(); ii++ ){
_scaledRadiusFactors[ii] = scaledRadiusFactors[ii]; _scaledRadiusFactors[ii] = scaledRadiusFactors[ii];
} }
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -621,15 +595,12 @@ std::string ObcSoftcoreParameters::getStateString( const char* title ) const { ...@@ -621,15 +595,12 @@ std::string ObcSoftcoreParameters::getStateString( const char* title ) const {
@param distance the cutoff distance @param distance the cutoff distance
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setUseCutoff( RealOpenMM distance ) { void ObcSoftcoreParameters::setUseCutoff( RealOpenMM distance ) {
cutoff = true; cutoff = true;
cutoffDistance = distance; cutoffDistance = distance;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -660,11 +631,9 @@ RealOpenMM ObcSoftcoreParameters::getCutoffDistance() { ...@@ -660,11 +631,9 @@ RealOpenMM ObcSoftcoreParameters::getCutoffDistance() {
@param boxSize the X, Y, and Z widths of the periodic box @param boxSize the X, Y, and Z widths of the periodic box
@return ReferenceForce::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) { void ObcSoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
assert(cutoff); assert(cutoff);
assert(boxSize[0] >= 2.0*cutoffDistance); assert(boxSize[0] >= 2.0*cutoffDistance);
...@@ -674,7 +643,6 @@ int ObcSoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) { ...@@ -674,7 +643,6 @@ int ObcSoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
periodicBoxSize[0] = boxSize[0]; periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1]; periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2]; periodicBoxSize[2] = boxSize[2];
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -730,11 +698,9 @@ const RealOpenMM* ObcSoftcoreParameters::getNonPolarScaleFactors( void ) const { ...@@ -730,11 +698,9 @@ const RealOpenMM* ObcSoftcoreParameters::getNonPolarScaleFactors( void ) const {
@param ownNonPolarScaleFactors flag indicating whether scale factors @param ownNonPolarScaleFactors flag indicating whether scale factors
array should be deleted array should be deleted
@return SimTKOpenMMCommon::DefaultReturn
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFactors ){ void ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -743,8 +709,6 @@ int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFacto ...@@ -743,8 +709,6 @@ int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFacto
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_ownNonPolarScaleFactors = ownNonPolarScaleFactors; _ownNonPolarScaleFactors = ownNonPolarScaleFactors;
return 0;
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -753,11 +717,9 @@ int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFacto ...@@ -753,11 +717,9 @@ int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFacto
@param nonPolarScaleFactors nonPolarScaleFactors @param nonPolarScaleFactors nonPolarScaleFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonPolarScaleFactors ){ void ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonPolarScaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -774,9 +736,6 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonP ...@@ -774,9 +736,6 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonP
for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){ for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){
_nonPolarScaleFactors[ii] = nonPolarScaleFactors[ii]; _nonPolarScaleFactors[ii] = nonPolarScaleFactors[ii];
} }
return 0;
} }
#if RealOpenMMType == 0 #if RealOpenMMType == 0
...@@ -787,11 +746,9 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonP ...@@ -787,11 +746,9 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonP
@param nonPolarScaleFactors nonPolarScaleFactors @param nonPolarScaleFactors nonPolarScaleFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors ){ void ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -806,9 +763,6 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors ...@@ -806,9 +763,6 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors
for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){ for( int ii = 0; ii < getNumberOfAtoms(); ii++ ){
_nonPolarScaleFactors[ii] = (RealOpenMM) nonPolarScaleFactors[ii]; _nonPolarScaleFactors[ii] = (RealOpenMM) nonPolarScaleFactors[ii];
} }
return 0;
} }
#endif #endif
...@@ -819,11 +773,9 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors ...@@ -819,11 +773,9 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors
@param nonPolarScaleFactors nonPolarScaleFactors @param nonPolarScaleFactors nonPolarScaleFactors
@return SimTKOpenMMCommon::DefaultReturn always
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
int ObcSoftcoreParameters::setNonPolarPrefactor( RealOpenMM nonPolarPreFactor ){ void ObcSoftcoreParameters::setNonPolarPrefactor( RealOpenMM nonPolarPreFactor ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -832,6 +784,5 @@ int ObcSoftcoreParameters::setNonPolarPrefactor( RealOpenMM nonPolarPreFactor ){ ...@@ -832,6 +784,5 @@ int ObcSoftcoreParameters::setNonPolarPrefactor( RealOpenMM nonPolarPreFactor ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_nonPolarPreFactor = nonPolarPreFactor; _nonPolarPreFactor = nonPolarPreFactor;
return 0;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment