Commit eb232608 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Merge remote-tracking branch 'upstream/master'

parents 62581e9c 7f8c5089
......@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
......@@ -41,7 +41,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
ReferenceProperDihedralBond( );
ReferenceProperDihedralBond();
/**---------------------------------------------------------------------------------------
......@@ -49,7 +49,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~ReferenceProperDihedralBond( );
~ReferenceProperDihedralBond();
/**---------------------------------------------------------------------------------------
......@@ -65,12 +65,12 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void calculateBondIxn( int* atomIndices, std::vector<OpenMM::RealVec>& atomCoordinates,
void calculateBondIxn(int* atomIndices, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM* parameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* totalEnergy ) const;
RealOpenMM* totalEnergy) const;
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceProperDihedralBond_H__
......@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
......@@ -41,7 +41,7 @@ class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
ReferenceRbDihedralBond( );
ReferenceRbDihedralBond();
/**---------------------------------------------------------------------------------------
......@@ -49,7 +49,7 @@ class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~ReferenceRbDihedralBond( );
~ReferenceRbDihedralBond();
/**---------------------------------------------------------------------------------------
......@@ -63,12 +63,12 @@ class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
void calculateBondIxn( int* atomIndices, std::vector<OpenMM::RealVec>& atomCoordinates,
void calculateBondIxn(int* atomIndices, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM* parameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* totalEnergy ) const;
RealOpenMM* totalEnergy) const;
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceRbDihedralBond_H__
......@@ -28,7 +28,7 @@
#include "ReferenceDynamics.h"
#include "openmm/internal/windowsExport.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
......@@ -51,7 +51,7 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceStochasticDynamics( int numberOfAtoms, RealOpenMM deltaT, RealOpenMM tau, RealOpenMM temperature );
ReferenceStochasticDynamics(int numberOfAtoms, RealOpenMM deltaT, RealOpenMM tau, RealOpenMM temperature);
/**---------------------------------------------------------------------------------------
......@@ -59,7 +59,7 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
~ReferenceStochasticDynamics( );
~ReferenceStochasticDynamics();
/**---------------------------------------------------------------------------------------
......@@ -69,7 +69,7 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getTau( void ) const;
RealOpenMM getTau() const;
/**---------------------------------------------------------------------------------------
......@@ -100,8 +100,8 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
virtual void updatePart1( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& inverseMasses, std::vector<OpenMM::RealVec>& xPrime );
virtual void updatePart1(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& inverseMasses, std::vector<OpenMM::RealVec>& xPrime);
/**---------------------------------------------------------------------------------------
......@@ -115,11 +115,11 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
virtual void updatePart2( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& inverseMasses, std::vector<OpenMM::RealVec>& xPrime );
virtual void updatePart2(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& inverseMasses, std::vector<OpenMM::RealVec>& xPrime);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceStochasticDynamics_H__
......@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
......@@ -50,7 +50,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceVariableStochasticDynamics( int numberOfAtoms, RealOpenMM tau, RealOpenMM temperature, RealOpenMM accuracy );
ReferenceVariableStochasticDynamics(int numberOfAtoms, RealOpenMM tau, RealOpenMM temperature, RealOpenMM accuracy);
/**---------------------------------------------------------------------------------------
......@@ -58,7 +58,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
~ReferenceVariableStochasticDynamics( );
~ReferenceVariableStochasticDynamics();
/**---------------------------------------------------------------------------------------
......@@ -68,7 +68,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getTau( void ) const;
RealOpenMM getTau() const;
/**---------------------------------------------------------------------------------------
......@@ -78,7 +78,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getAccuracy( void ) const;
RealOpenMM getAccuracy() const;
/**---------------------------------------------------------------------------------------
......@@ -86,7 +86,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void setAccuracy( RealOpenMM accuracy );
void setAccuracy(RealOpenMM accuracy);
/**---------------------------------------------------------------------------------------
......@@ -120,9 +120,9 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void updatePart1( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
void updatePart1(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& masses, std::vector<RealOpenMM>& inverseMasses,
std::vector<OpenMM::RealVec>& xPrime, RealOpenMM maxStepSize );
std::vector<OpenMM::RealVec>& xPrime, RealOpenMM maxStepSize);
/**---------------------------------------------------------------------------------------
......@@ -136,12 +136,12 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void updatePart2( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
void updatePart2(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& velocities,
std::vector<OpenMM::RealVec>& forces, std::vector<RealOpenMM>& inverseMasses,
std::vector<OpenMM::RealVec>& xPrime );
std::vector<OpenMM::RealVec>& xPrime);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceVariableStochasticDynamics_H__
......@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceVariableVerletDynamics : public ReferenceDynamics {
......@@ -48,7 +48,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceVariableVerletDynamics( int numberOfAtoms, RealOpenMM accuracy );
ReferenceVariableVerletDynamics(int numberOfAtoms, RealOpenMM accuracy);
/**---------------------------------------------------------------------------------------
......@@ -56,7 +56,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
~ReferenceVariableVerletDynamics( );
~ReferenceVariableVerletDynamics();
/**---------------------------------------------------------------------------------------
......@@ -66,7 +66,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getAccuracy( void ) const;
RealOpenMM getAccuracy() const;
/**---------------------------------------------------------------------------------------
......@@ -74,7 +74,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void setAccuracy( RealOpenMM accuracy );
void setAccuracy(RealOpenMM accuracy);
/**---------------------------------------------------------------------------------------
......@@ -95,6 +95,6 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceVariableVerletDynamics_H__
......@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceVerletDynamics : public ReferenceDynamics {
......@@ -49,7 +49,7 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceVerletDynamics( int numberOfAtoms, RealOpenMM deltaT );
ReferenceVerletDynamics(int numberOfAtoms, RealOpenMM deltaT);
/**---------------------------------------------------------------------------------------
......@@ -57,7 +57,7 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
~ReferenceVerletDynamics( );
~ReferenceVerletDynamics();
/**---------------------------------------------------------------------------------------
......@@ -77,6 +77,6 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceVerletDynamics_H__
......@@ -36,6 +36,8 @@
#include "RealVec.h"
#include <vector>
namespace OpenMM {
class OPENMM_EXPORT ReferenceVirtualSites {
public:
/**
......@@ -48,4 +50,6 @@ public:
static void distributeForces(const OpenMM::System& system, const std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& forces);
};
} // namespace OpenMM
#endif // __ReferenceVirtualSites_H__
/* Portions copyright (c) 2006 Stanford University and Simbios.
* Contributors: Pande Group
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __SimTKOpenMMCommon_H__
#define __SimTKOpenMMCommon_H__
// include file containing entries commonly used
// STL includes
#include <vector>
#include <string>
// ---------------------------------------------------------------------------------------
#include "RealVec.h"
// ---------------------------------------------------------------------------------------
typedef std::vector<RealOpenMM> RealOpenMMVector;
typedef RealOpenMMVector::iterator RealOpenMMVectorI;
typedef RealOpenMMVector::const_iterator RealOpenMMVectorCI;
// ---------------------------------------------------------------------------------------
class SimTKOpenMMCommon {
public:
static const std::string NotSet;
static const RealOpenMM BigCutoffValue;
static const std::string Comment;
static const std::string Tab;
static const std::string YesU;
static const std::string YesUl;
static const std::string YesL;
// subroutine returns
static const int DefaultReturn;
static const int ErrorReturn;
};
#endif // __SimTKOpenMMCommon_H__
/* Portions copyright (c) 2006 Stanford University and Simbios.
* Contributors: Pande Group
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __SimTKOpenMMLog_H__
#define __SimTKOpenMMLog_H__
#include <cstdio>
#include <sstream>
#include "SimTKOpenMMCommon.h"
#include "openmm/internal/windowsExport.h"
/** ---------------------------------------------------------------------------------------
SimTKOpenMMLog class used for logging
--------------------------------------------------------------------------------------- */
class OPENMM_EXPORT SimTKOpenMMLog {
public:
// log levels
enum LogLevels { LogOff, LogLowLevel, LogHighLevel };
private:
// file to write to
FILE* _logFile;
// log level
LogLevels _logLevel;
// global reference
static SimTKOpenMMLog* _simTKOpenMMLog;
public:
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog constructor (Simbios)
@param logFile file reference for logging
--------------------------------------------------------------------------------------- */
SimTKOpenMMLog( FILE* logFile = NULL );
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog destructor (Simbios)
--------------------------------------------------------------------------------------- */
~SimTKOpenMMLog( );
/**---------------------------------------------------------------------------------------
SimTKOpenMMLog log message to log (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
void logMessage( const std::stringstream& message ) const;
/**---------------------------------------------------------------------------------------
Get LogFile
@return logFile
--------------------------------------------------------------------------------------- */
FILE* getLogFile( void ) const;
/**---------------------------------------------------------------------------------------
Set LogFile
@param input logFile
--------------------------------------------------------------------------------------- */
void setLogFile( FILE* logFile );
/**---------------------------------------------------------------------------------------
Set LogLevel
@param input logLevel
--------------------------------------------------------------------------------------- */
void setLogLevel( SimTKOpenMMLog::LogLevels logLevel );
/**---------------------------------------------------------------------------------------
Set global simTKLog (Simbios)
@param logFile file to log to
@return new SimTKOpenMMLog
--------------------------------------------------------------------------------------- */
static SimTKOpenMMLog* setSimTKOpenMMLog( FILE* logFile = NULL );
/**---------------------------------------------------------------------------------------
Get global simTKLog -- static method (Simbios)
@return static member
--------------------------------------------------------------------------------------- */
static SimTKOpenMMLog* getSimTKOpenMMLog( void );
/**---------------------------------------------------------------------------------------
Get global simTKLog (Simbios)
@return FILE reference
--------------------------------------------------------------------------------------- */
static FILE* getSimTKOpenMMLogFile( void );
/**---------------------------------------------------------------------------------------
Staitc method to print message (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
static void printMessage( const std::stringstream& message );
/**---------------------------------------------------------------------------------------
Staitc method to print warning message (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
static void printWarning( const std::stringstream& message );
/**---------------------------------------------------------------------------------------
Static method to print error message and exist program (Simbios)
@param message message to log
--------------------------------------------------------------------------------------- */
static void printError( const std::stringstream& message );
};
#endif //__SimTKOpenMMLog_H__
......@@ -14,14 +14,13 @@
* drop a line to lindahl@cbr.su.se and let me know about it!
*/
#include "SimTKOpenMMCommon.h"
#ifndef _FFTPACK_H_
#define _FFTPACK_H_
#include <stdio.h>
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#ifdef __cplusplus
......
......@@ -100,5 +100,5 @@ KernelImpl* ReferenceKernelFactory::createKernelImpl(std::string name, const Pla
return new ReferenceApplyMonteCarloBarostatKernel(name, platform);
if (name == RemoveCMMotionKernel::Name())
return new ReferenceRemoveCMMotionKernel(name, platform, data);
throw OpenMMException( (std::string("Tried to create kernel with illegal kernel name '") + name + "'").c_str() );
throw OpenMMException((std::string("Tried to create kernel with illegal kernel name '") + name + "'").c_str());
}
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