Commit 98c26853 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Mods to get Free energy plugin libs to compile on Windows; still problem w/...

Mods to get Free energy plugin libs to compile on Windows; still problem w/ kCalculateLocalSoftcoreForces.cu
and hence OpenMMFreeEnergyCuda lib
parent cf7d9866
......@@ -242,8 +242,8 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom
RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, RealOpenMM** forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const {
#include "../SimTKUtilities/RealTypeSimTk.h"
#if 0
typedef std::complex<RealOpenMM> d_complex;
static const RealOpenMM epsilon = 1.0;
......@@ -523,6 +523,7 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateEwaldIxn( int numberOfAtom
// ***********************************************************************
#endif
return ReferenceForce::DefaultReturn;
}
......@@ -552,7 +553,7 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const {
#if 0
RealOpenMM SQRT_PI = sqrt(PI);
static const RealOpenMM one = 1.0;
......@@ -653,7 +654,7 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculatePMEIxn( int numberOfAtoms,
// ***********************************************************************
#endif
return ReferenceForce::DefaultReturn;
}
......@@ -877,7 +878,7 @@ int ReferenceFreeEnergyLJCoulombSoftcoreIxn::calculateOneIxn( int ii, int jj, Re
message << "]";
}
SimTKOpenMMLog::printMessage( message );
//SimTKOpenMMLog::printMessage( message );
}
return ReferenceForce::DefaultReturn;
}
......
......@@ -120,7 +120,7 @@ GBVISoftcoreParameters* CpuGBVISoftcore::getGBVISoftcoreParameters( void ) const
@param GBVISoftcoreParameters reference
@return SimTKOpenMMCommon::DefaultReturn;
@return 0;
--------------------------------------------------------------------------------------- */
......@@ -133,7 +133,7 @@ int CpuGBVISoftcore::setGBVISoftcoreParameters( GBVISoftcoreParameters* gbviPara
// ---------------------------------------------------------------------------------------
_gbviParameters = gbviParameters;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -219,7 +219,7 @@ int CpuGBVISoftcore::quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
*outValue = one + ratio3*(minusTen + fifteen*ratio + minusSix*ratio2);
*outDerivative = ratio2*(minusThirty + sixty*ratio + minusThirty*ratio2)/denominator;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -410,7 +410,7 @@ if( atomI == 0 || atomI == 1 ){
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -717,7 +717,7 @@ RealOpenMM e3 = -partialChargeI2*partialCharges[atomJ]*Sgb( t )/deltaR[Reference
@param partialCharges partial charges
@param forces forces
@return SimTKOpenMMCommon::DefaultReturn;
@return 0;
--------------------------------------------------------------------------------------- */
......@@ -1092,7 +1092,7 @@ if( atomI == 0 ){
delete[] forces;
delete[] block;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -1212,7 +1212,7 @@ int CpuGBVISoftcore::writeBornEnergyForces( RealOpenMM** atomCoordinates,
(void) fclose( implicitSolventResultsFile );
*/
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -1343,7 +1343,7 @@ int CpuGBVISoftcore::writeForceLoop( int numberOfAtoms, const IntVector& chunkSi
@param partialCharges partial charges
@param forces forces
@return SimTKOpenMMCommon::DefaultReturn;
@return 0;
The array bornRadii is also updated and the obcEnergy
......@@ -1356,7 +1356,7 @@ int CpuGBVISoftcore::computeBornEnergyForces( RealOpenMM* bornRadii, RealOpenMM*
// static const char* methodName = "\nCpuGBVISoftcore::computeBornEnergyForcesPrint";
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......
......@@ -25,7 +25,7 @@
#include <string.h>
#include <sstream>
#include "../SimTKUtilities/SimTKOpenMMCommon.h"
//#include "../SimTKUtilities/SimTKOpenMMCommon.h"
#include "../SimTKUtilities/SimTKOpenMMLog.h"
#include "../SimTKUtilities/SimTKOpenMMUtilities.h"
#include "CpuObcSoftcore.h"
......@@ -134,7 +134,7 @@ int CpuObcSoftcore::setObcSoftcoreParameters( ObcSoftcoreParameters* obcSoftcor
// ---------------------------------------------------------------------------------------
_obcSoftcoreParameters = obcSoftcoreParameters;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -341,7 +341,7 @@ if( logFile ){
}
#endif
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -355,7 +355,7 @@ if( logFile ){
@param energy energy (output): value is incremented from input value
@param forces forces: values are incremented from input values
@return SimTKOpenMMCommon::DefaultReturn
@return 0
--------------------------------------------------------------------------------------- */
......@@ -406,7 +406,7 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof
}
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -420,7 +420,7 @@ int CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSof
@param partialCharges partial charges
@param forces forces
@return SimTKOpenMMCommon::DefaultReturn;
@return 0
The array bornRadii is also updated and the obcEnergy
......@@ -736,7 +736,7 @@ int CpuObcSoftcore::computeBornEnergyForces( RealOpenMM* bornRadii, RealOpenMM**
free( (char*) block );
free( (char*) forces );
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -773,9 +773,9 @@ std::string CpuObcSoftcore::getStateString( const char* title ) const {
@param forces forces
@param resultsFileName output file name
@return SimTKOpenMMCommon::DefaultReturn unless
@return 0 unless
file cannot be opened
in which case return SimTKOpenMMCommon::ErrorReturn
in which case return -1
--------------------------------------------------------------------------------------- */
......@@ -819,13 +819,15 @@ int CpuObcSoftcore::writeBornEnergyForces( RealOpenMM** atomCoordinates,
std::stringstream message;
message << methodName;
message << " Opened file=<" << resultsFileName << ">.";
SimTKOpenMMLog::printMessage( message );
//SimTKOpenMMLog::printMessage( message );
(void) fprintf( stderr, "%s", message.str().c_str() );
} else {
std::stringstream message;
message << methodName;
message << " could not open file=<" << resultsFileName << "> -- abort output.";
SimTKOpenMMLog::printMessage( message );
return SimTKOpenMMCommon::ErrorReturn;
//SimTKOpenMMLog::printMessage( message );
(void) fprintf( stderr, "%s", message.str().c_str() );
return -1;
}
// header
......@@ -855,7 +857,7 @@ int CpuObcSoftcore::writeBornEnergyForces( RealOpenMM** atomCoordinates,
}
(void) fclose( implicitSolventResultsFile );
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -868,9 +870,9 @@ int CpuObcSoftcore::writeBornEnergyForces( RealOpenMM** atomCoordinates,
@param bornForce Born force prefactor
@param outputFileName output file name
@return SimTKOpenMMCommon::DefaultReturn unless
@return 0 unless
file cannot be opened
in which case return SimTKOpenMMCommon::ErrorReturn
in which case return -1
--------------------------------------------------------------------------------------- */
......@@ -1399,6 +1401,6 @@ if( logFile && atomI >= 0 ){
(void) fclose( logFile );
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -200,7 +200,7 @@ int GBVISoftcoreParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerL
// ---------------------------------------------------------------------------------------
_quinticLowerLimitFactor = quinticLowerLimitFactor;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -242,7 +242,7 @@ int GBVISoftcoreParameters::setQuinticUpperBornRadiusLimit( RealOpenMM quinticUp
_quinticUpperBornRadiusLimit = quinticUpperBornRadiusLimit;
_quinticUpperSplineLimit = POW( _quinticUpperBornRadiusLimit, static_cast<RealOpenMM>(-3.0) );
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -374,7 +374,7 @@ int GBVISoftcoreParameters::setOwnScaledRadii( int ownScaledRadii ){
_ownScaledRadii = ownScaledRadii;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -402,7 +402,7 @@ int GBVISoftcoreParameters::setScaledRadii( RealOpenMM* scaledRadii ){
_scaledRadii = scaledRadii;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -434,7 +434,7 @@ int GBVISoftcoreParameters::setScaledRadii( float* scaledRadii ){
_scaledRadii[ii] = (RealOpenMM) scaledRadii[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -467,7 +467,7 @@ int GBVISoftcoreParameters::setScaledRadii( const RealOpenMMVector& scaledRadii
_scaledRadii[ii] = scaledRadii[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -517,7 +517,7 @@ int GBVISoftcoreParameters::setOwnGammaParameters( int ownGammaParameters ){
_ownGammaParameters = ownGammaParameters;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -545,7 +545,7 @@ int GBVISoftcoreParameters::setGammaParameters( RealOpenMM* gammas ){
_gammaParameters = gammas;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -577,7 +577,7 @@ int GBVISoftcoreParameters::setGammaParameters( float* gammas ){
_gammaParameters[ii] = (RealOpenMM) gammas[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -611,7 +611,7 @@ int GBVISoftcoreParameters::setGammaParameters( const RealOpenMMVector& gammas )
_gammaParameters[ii] = gammas[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -661,7 +661,7 @@ int GBVISoftcoreParameters::setOwnBornRadiusScaleFactors( int ownBornRadiusScale
_ownBornRadiusScaleFactors = ownBornRadiusScaleFactorsParameters;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -689,7 +689,7 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( RealOpenMM* bornRadiusSca
_bornRadiusScaleFactors = bornRadiusScaleFactors;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -721,7 +721,7 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( float* bornRadiusScaleFac
_bornRadiusScaleFactors[ii] = (RealOpenMM) bornRadiusScaleFactorss[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -755,7 +755,7 @@ int GBVISoftcoreParameters::setBornRadiusScaleFactors( const RealOpenMMVector& b
_bornRadiusScaleFactors[ii] = bornRadiusScaleFactors[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -835,7 +835,7 @@ int GBVISoftcoreParameters::isNotReady( void ) const {
if( errors ){
message << std::endl;
SimTKOpenMMLog::printMessage( message );
(void) fprintf( stderr, "%s", message.str().c_str() );
}
errors += isReady;
......@@ -857,7 +857,7 @@ int GBVISoftcoreParameters::setUseCutoff( RealOpenMM distance ) {
cutoff = true;
cutoffDistance = distance;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -902,7 +902,7 @@ int GBVISoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2];
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......
......@@ -219,7 +219,7 @@ int ObcSoftcoreParameters::setObcTypeParameters( ObcSoftcoreParameters::ObcType
}
_obcType = obcType;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -410,7 +410,7 @@ int ObcSoftcoreParameters::setOwnScaleFactors( int ownScaledRadiusFactors ){
_ownScaledRadiusFactors = ownScaledRadiusFactors;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -438,7 +438,7 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( RealOpenMM* scaledRadiusFacto
_scaledRadiusFactors = scaledRadiusFactors;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -470,7 +470,7 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( float* scaledRadiusFactors ){
_scaledRadiusFactors[ii] = (RealOpenMM) scaledRadiusFactors[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -503,7 +503,7 @@ int ObcSoftcoreParameters::setScaledRadiusFactors( const RealOpenMMVector& scale
_scaledRadiusFactors[ii] = scaledRadiusFactors[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -659,7 +659,7 @@ int ObcSoftcoreParameters::isNotReady( void ) const {
if( errors ){
message << std::endl;
SimTKOpenMMLog::printMessage( message );
(void) fprintf( stderr, "%s", message.str().c_str() );
}
errors += isReady;
......@@ -681,7 +681,7 @@ int ObcSoftcoreParameters::setUseCutoff( RealOpenMM distance ) {
cutoff = true;
cutoffDistance = distance;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -726,7 +726,7 @@ int ObcSoftcoreParameters::setPeriodic( RealOpenMM* boxSize ) {
periodicBoxSize[0] = boxSize[0];
periodicBoxSize[1] = boxSize[1];
periodicBoxSize[2] = boxSize[2];
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -796,7 +796,7 @@ int ObcSoftcoreParameters::setOwnNonPolarScaleFactors( int ownNonPolarScaleFacto
_ownNonPolarScaleFactors = ownNonPolarScaleFactors;
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
/**---------------------------------------------------------------------------------------
......@@ -827,7 +827,7 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( const RealOpenMMVector& nonP
_nonPolarScaleFactors[ii] = nonPolarScaleFactors[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -859,7 +859,7 @@ int ObcSoftcoreParameters::setNonPolarScaleFactors( float* nonPolarScaleFactors
_nonPolarScaleFactors[ii] = (RealOpenMM) nonPolarScaleFactors[ii];
}
return SimTKOpenMMCommon::DefaultReturn;
return 0;
}
......@@ -884,6 +884,6 @@ int ObcSoftcoreParameters::setNonPolarPrefactor( RealOpenMM nonPolarPreFactor ){
// ---------------------------------------------------------------------------------------
_nonPolarPreFactor = nonPolarPreFactor;
return SimTKOpenMMCommon::DefaultReturn;
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