"serialization/src/MonteCarloFlexibleBarostatProxy.cpp" did not exist on "0e879806cdd38e58b04481ecf7fcd93c44c7dc27"
Commit eb232608 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Merge remote-tracking branch 'upstream/master'

parents 62581e9c 7f8c5089
......@@ -34,7 +34,7 @@
#include <string>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomDynamics : public ReferenceDynamics {
private:
......@@ -121,6 +121,6 @@ public:
std::map<std::string, RealOpenMM>& globals, std::vector<std::vector<OpenMM::RealVec> >& perDof, bool& forcesAreValid);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceCustomDynamics_H__
......@@ -28,7 +28,7 @@
#include "ReferenceCustomExternalIxn.h"
#include "lepton/CompiledExpression.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomExternalIxn {
......@@ -65,7 +65,7 @@ class ReferenceCustomExternalIxn {
--------------------------------------------------------------------------------------- */
~ReferenceCustomExternalIxn( );
~ReferenceCustomExternalIxn();
/**---------------------------------------------------------------------------------------
......@@ -79,12 +79,12 @@ class ReferenceCustomExternalIxn {
--------------------------------------------------------------------------------------- */
void calculateForce( int atomIndex, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM* parameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM* energy ) const;
void calculateForce(int atomIndex, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM* parameters, std::vector<OpenMM::RealVec>& forces, RealOpenMM* energy) const;
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // _ReferenceCustomBondIxn___
......@@ -32,7 +32,7 @@
#include <set>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomGBIxn {
......@@ -244,7 +244,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
~ReferenceCustomGBIxn( );
~ReferenceCustomGBIxn();
/**---------------------------------------------------------------------------------------
......@@ -255,7 +255,7 @@ class ReferenceCustomGBIxn {
--------------------------------------------------------------------------------------- */
void setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors );
void setUseCutoff(RealOpenMM distance, const OpenMM::NeighborList& neighbors);
/**---------------------------------------------------------------------------------------
......@@ -290,4 +290,6 @@ class ReferenceCustomGBIxn {
};
} // namespace OpenMM
#endif // __ReferenceCustomGBIxn_H__
......@@ -32,7 +32,7 @@
#include <set>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomHbondIxn : public ReferenceBondIxn {
......@@ -198,4 +198,6 @@ public:
}
};
} // namespace OpenMM
#endif // __ReferenceCustomHbondIxn_H__
......@@ -33,7 +33,7 @@
#include <set>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomManyParticleIxn {
......@@ -192,4 +192,6 @@ public:
}
};
} // namespace OpenMM
#endif // __ReferenceCustomManyParticleIxn_H__
......@@ -33,7 +33,7 @@
#include <utility>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomNonbondedIxn {
......@@ -68,8 +68,8 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void calculateOneIxn( int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy );
void calculateOneIxn(int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy);
public:
......@@ -89,7 +89,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
~ReferenceCustomNonbondedIxn( );
~ReferenceCustomNonbondedIxn();
/**---------------------------------------------------------------------------------------
......@@ -100,7 +100,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors );
void setUseCutoff(RealOpenMM distance, const OpenMM::NeighborList& neighbors);
/**---------------------------------------------------------------------------------------
......@@ -121,7 +121,7 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void setUseSwitchingFunction( RealOpenMM distance );
void setUseSwitchingFunction(RealOpenMM distance);
/**---------------------------------------------------------------------------------------
......@@ -152,13 +152,15 @@ class ReferenceCustomNonbondedIxn {
--------------------------------------------------------------------------------------- */
void calculatePairIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
void calculatePairIxn(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, std::vector<std::set<int> >& exclusions,
RealOpenMM* fixedParameters, const std::map<std::string, double>& globalParameters,
std::vector<OpenMM::RealVec>& forces, RealOpenMM* energyByAtom, RealOpenMM* totalEnergy );
std::vector<OpenMM::RealVec>& forces, RealOpenMM* energyByAtom, RealOpenMM* totalEnergy);
// ---------------------------------------------------------------------------------------
};
} // namespace OpenMM
#endif // __ReferenceCustomNonbondedxIxn_H__
......@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
#include "lepton/CompiledExpression.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
......@@ -57,7 +57,7 @@ class ReferenceCustomTorsionIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~ReferenceCustomTorsionIxn( );
~ReferenceCustomTorsionIxn();
/**---------------------------------------------------------------------------------------
......@@ -71,13 +71,13 @@ class ReferenceCustomTorsionIxn : 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 // _ReferenceCustomTorsionIxn___
......@@ -26,12 +26,11 @@
#define __ReferenceDynamics_H__
#include "ReferenceConstraintAlgorithm.h"
#include "SimTKOpenMMCommon.h"
#include "openmm/System.h"
#include <cstddef>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
/**---------------------------------------------------------------------------------------
......@@ -68,7 +67,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceDynamics( int numberOfAtoms, RealOpenMM _deltaT, RealOpenMM temperature );
ReferenceDynamics(int numberOfAtoms, RealOpenMM _deltaT, RealOpenMM temperature);
/**---------------------------------------------------------------------------------------
......@@ -76,7 +75,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
virtual ~ReferenceDynamics( );
virtual ~ReferenceDynamics();
/**---------------------------------------------------------------------------------------
......@@ -86,7 +85,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
int getNumberOfAtoms( void ) const;
int getNumberOfAtoms() const;
/**---------------------------------------------------------------------------------------
......@@ -96,7 +95,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
int getTimeStep( void ) const;
int getTimeStep() const;
/**---------------------------------------------------------------------------------------
......@@ -106,7 +105,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
int incrementTimeStep( void );
int incrementTimeStep();
/**---------------------------------------------------------------------------------------
......@@ -116,7 +115,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getDeltaT( void ) const;
RealOpenMM getDeltaT() const;
/**---------------------------------------------------------------------------------------
......@@ -124,7 +123,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void setDeltaT( RealOpenMM deltaT );
void setDeltaT(RealOpenMM deltaT);
/**---------------------------------------------------------------------------------------
......@@ -134,7 +133,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
RealOpenMM getTemperature( void ) const;
RealOpenMM getTemperature() const;
/**---------------------------------------------------------------------------------------
......@@ -160,7 +159,7 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
ReferenceConstraintAlgorithm* getReferenceConstraintAlgorithm( void ) const;
ReferenceConstraintAlgorithm* getReferenceConstraintAlgorithm() const;
/**---------------------------------------------------------------------------------------
......@@ -170,9 +169,10 @@ class OPENMM_EXPORT ReferenceDynamics {
--------------------------------------------------------------------------------------- */
void setReferenceConstraintAlgorithm( ReferenceConstraintAlgorithm* referenceConstraint );
void setReferenceConstraintAlgorithm(ReferenceConstraintAlgorithm* referenceConstraint);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceDynamics_H__
......@@ -28,7 +28,7 @@
#include "lepton/CompiledExpression.h"
#include "openmm/internal/windowsExport.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferenceForce {
......@@ -44,7 +44,7 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
ReferenceForce( );
ReferenceForce();
/**---------------------------------------------------------------------------------------
......@@ -52,7 +52,7 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
~ReferenceForce( );
~ReferenceForce();
/**---------------------------------------------------------------------------------------
......@@ -80,8 +80,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static void getDeltaR( const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
RealOpenMM* deltaR );
static void getDeltaR(const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
RealOpenMM* deltaR);
/**---------------------------------------------------------------------------------------
......@@ -95,8 +95,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static void getDeltaRPeriodic( const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
const RealOpenMM* boxSize, RealOpenMM* deltaR );
static void getDeltaRPeriodic(const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
const RealOpenMM* boxSize, RealOpenMM* deltaR);
/**---------------------------------------------------------------------------------------
......@@ -110,8 +110,8 @@ class OPENMM_EXPORT ReferenceForce {
--------------------------------------------------------------------------------------- */
static void getDeltaRPeriodic( const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
const OpenMM::RealVec* boxVectors, RealOpenMM* deltaR );
static void getDeltaRPeriodic(const OpenMM::RealVec& atomCoordinatesI, const OpenMM::RealVec& atomCoordinatesJ,
const OpenMM::RealVec* boxVectors, RealOpenMM* deltaR);
/**
* Get a pointer to the memory for setting a variable in a CompiledExpression. If the expression
......@@ -126,6 +126,6 @@ class OPENMM_EXPORT ReferenceForce {
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceForce_H__
......@@ -22,24 +22,24 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __CpuGBVI_H__
#define __CpuGBVI_H__
#ifndef __ReferenceGBVI_H__
#define __ReferenceGBVI_H__
#include <vector>
#include "RealVec.h"
#include "GBVIParameters.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class CpuGBVI {
class ReferenceGBVI {
private:
// GB/VI parameters
GBVIParameters* _gbviParameters;
RealOpenMMVector _switchDeriviative;
std::vector<RealOpenMM> _switchDeriviative;
public:
......@@ -53,7 +53,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
CpuGBVI( GBVIParameters* gbviParameters );
ReferenceGBVI(GBVIParameters* gbviParameters);
/**---------------------------------------------------------------------------------------
......@@ -61,7 +61,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
~CpuGBVI( );
~ReferenceGBVI();
/**---------------------------------------------------------------------------------------
......@@ -71,7 +71,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
GBVIParameters* getGBVIParameters( void ) const;
GBVIParameters* getGBVIParameters() const;
/**---------------------------------------------------------------------------------------
......@@ -81,7 +81,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
void setGBVIParameters( GBVIParameters* gbviParameters );
void setGBVIParameters(GBVIParameters* gbviParameters);
/**---------------------------------------------------------------------------------------
......@@ -93,7 +93,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
void computeBornRadii( const std::vector<OpenMM::RealVec>& atomCoordinates, RealOpenMMVector& bornRadii );
void computeBornRadii(const std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<RealOpenMM>& bornRadii);
/**---------------------------------------------------------------------------------------
......@@ -107,7 +107,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static RealOpenMM getVolume( RealOpenMM r, RealOpenMM R, RealOpenMM S );
static RealOpenMM getVolume(RealOpenMM r, RealOpenMM R, RealOpenMM S);
/**---------------------------------------------------------------------------------------
......@@ -121,7 +121,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static RealOpenMM getL( RealOpenMM r, RealOpenMM x, RealOpenMM S );
static RealOpenMM getL(RealOpenMM r, RealOpenMM x, RealOpenMM S);
/**---------------------------------------------------------------------------------------
......@@ -135,7 +135,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static RealOpenMM dL_dr( RealOpenMM r, RealOpenMM x, RealOpenMM S );
static RealOpenMM dL_dr(RealOpenMM r, RealOpenMM x, RealOpenMM S);
/**---------------------------------------------------------------------------------------
......@@ -149,7 +149,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static RealOpenMM dL_dx( RealOpenMM r, RealOpenMM x, RealOpenMM S );
static RealOpenMM dL_dx(RealOpenMM r, RealOpenMM x, RealOpenMM S);
/**---------------------------------------------------------------------------------------
......@@ -161,7 +161,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static RealOpenMM Sgb( RealOpenMM t );
static RealOpenMM Sgb(RealOpenMM t);
/**---------------------------------------------------------------------------------------
......@@ -174,7 +174,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
RealOpenMM computeBornEnergy( const std::vector<OpenMM::RealVec>& atomCoordinates, const RealOpenMMVector& partialCharges );
RealOpenMM computeBornEnergy(const std::vector<OpenMM::RealVec>& atomCoordinates, const std::vector<RealOpenMM>& partialCharges);
/**---------------------------------------------------------------------------------------
......@@ -186,8 +186,8 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
void computeBornForces( std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMMVector& partialCharges, std::vector<OpenMM::RealVec>& inputForces );
void computeBornForces(std::vector<OpenMM::RealVec>& atomCoordinates,
const std::vector<RealOpenMM>& partialCharges, std::vector<OpenMM::RealVec>& inputForces);
/**---------------------------------------------------------------------------------------
......@@ -201,7 +201,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static double getVolumeD( double r, double R, double S );
static double getVolumeD(double r, double R, double S);
/**---------------------------------------------------------------------------------------
......@@ -215,7 +215,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static double getLD( double r, double x, double S );
static double getLD(double r, double x, double S);
/**---------------------------------------------------------------------------------------
......@@ -229,7 +229,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static double dL_drD( double r, double x, double S );
static double dL_drD(double r, double x, double S);
/**---------------------------------------------------------------------------------------
......@@ -243,7 +243,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
static double dL_dxD( double r, double x, double S );
static double dL_dxD(double r, double x, double S);
/**---------------------------------------------------------------------------------------
......@@ -254,7 +254,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
RealOpenMMVector& getSwitchDeriviative( void );
std::vector<RealOpenMM>& getSwitchDeriviative();
/**---------------------------------------------------------------------------------------
......@@ -268,8 +268,8 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
void quinticSpline( RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
RealOpenMM* outValue, RealOpenMM* outDerivative );
void quinticSpline(RealOpenMM x, RealOpenMM rl, RealOpenMM ru,
RealOpenMM* outValue, RealOpenMM* outDerivative);
/**---------------------------------------------------------------------------------------
......@@ -285,32 +285,12 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
void computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, RealOpenMM bornSum,
GBVIParameters* gbviParameters,
RealOpenMM* bornRadius, RealOpenMM* switchDeriviative );
/**---------------------------------------------------------------------------------------
Print GB/VI parameters, radii, forces, ...
@param atomCoordinates atomic coordinates
@param partialCharges partial charges
@param bornRadii Born radii (may be empty)
@param bornForces Born forces (may be empty)
@param forces forces (may be empty)
@param idString id string (who is calling)
@param log log file
--------------------------------------------------------------------------------------- */
void printGbvi( const std::vector<OpenMM::RealVec>& atomCoordinates, const RealOpenMMVector& partialCharges,
const RealOpenMMVector& bornRadii,
const RealOpenMMVector& bornForces,
const std::vector<OpenMM::RealVec>& forces,
const std::string& idString, FILE* log );
void computeBornRadiiUsingQuinticSpline(RealOpenMM atomicRadius3, RealOpenMM bornSum,
GBVIParameters* gbviParameters,
RealOpenMM* bornRadius, RealOpenMM* switchDeriviative);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __CpuGBVI_H__
#endif // __ReferenceGBVI_H__
......@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
......@@ -41,7 +41,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
ReferenceHarmonicBondIxn( );
ReferenceHarmonicBondIxn();
/**---------------------------------------------------------------------------------------
......@@ -49,7 +49,7 @@ class ReferenceHarmonicBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~ReferenceHarmonicBondIxn( );
~ReferenceHarmonicBondIxn();
/**---------------------------------------------------------------------------------------
......@@ -64,12 +64,12 @@ class ReferenceHarmonicBondIxn : 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 // _ReferenceHarmonicBondIxn___
......@@ -39,8 +39,10 @@
#include "lepton/CompiledExpression.h"
#include "lepton/ExpressionProgram.h"
class CpuObc;
class CpuGBVI;
namespace OpenMM {
class ReferenceObc;
class ReferenceGBVI;
class ReferenceAndersenThermostat;
class ReferenceCustomCompoundBondIxn;
class ReferenceCustomHbondIxn;
......@@ -54,8 +56,6 @@ class ReferenceVariableVerletDynamics;
class ReferenceVerletDynamics;
class ReferenceCustomDynamics;
namespace OpenMM {
/**
* This kernel is invoked at the beginning and end of force and energy computations. It gives the
* Platform a chance to clear buffers and do other initialization at the beginning, and to do any
......@@ -89,11 +89,13 @@ public:
* @param includeForce true if forces should be computed
* @param includeEnergy true if potential energy should be computed
* @param groups a set of bit flags for which force groups to include
* @param valid the method may set this to false to indicate the results are invalid and the force/energy
* calculation should be repeated
* @return the potential energy of the system. This value is added to all values returned by ForceImpls'
* calcForcesAndEnergy() methods. That is, each force kernel may <i>either</i> return its contribution to the
* energy directly, <i>or</i> add it to an internal buffer so that it will be included here.
*/
double finishComputation(ContextImpl& context, bool includeForce, bool includeEnergy, int groups);
double finishComputation(ContextImpl& context, bool includeForce, bool includeEnergy, int groups, bool& valid);
private:
std::vector<RealVec> savedForces;
};
......@@ -658,7 +660,7 @@ public:
*/
void copyParametersToContext(ContextImpl& context, const GBSAOBCForce& force);
private:
CpuObc* obc;
ReferenceObc* obc;
std::vector<RealOpenMM> charges;
bool isPeriodic;
};
......@@ -689,7 +691,7 @@ public:
*/
double execute(ContextImpl& context, bool includeForces, bool includeEnergy);
private:
CpuGBVI * gbvi;
ReferenceGBVI * gbvi;
std::vector<RealOpenMM> charges;
bool isPeriodic;
};
......
......@@ -28,7 +28,7 @@
#include "ReferenceBondIxn.h"
#include "openmm/internal/windowsExport.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
......@@ -40,7 +40,7 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
ReferenceLJCoulomb14( );
ReferenceLJCoulomb14();
/**---------------------------------------------------------------------------------------
......@@ -48,7 +48,7 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~ReferenceLJCoulomb14( );
~ReferenceLJCoulomb14();
/**---------------------------------------------------------------------------------------
......@@ -62,12 +62,12 @@ class OPENMM_EXPORT ReferenceLJCoulomb14 : 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 // __ReferenceLJCoulomb14_H__
......@@ -28,7 +28,7 @@
#include "ReferencePairIxn.h"
#include "ReferenceNeighborList.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceLJCoulombIxn {
......@@ -67,9 +67,9 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void calculateOneIxn( int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const;
void calculateOneIxn(int atom1, int atom2, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const;
public:
......@@ -80,7 +80,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
ReferenceLJCoulombIxn( );
ReferenceLJCoulombIxn();
/**---------------------------------------------------------------------------------------
......@@ -88,7 +88,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
~ReferenceLJCoulombIxn( );
~ReferenceLJCoulombIxn();
/**---------------------------------------------------------------------------------------
......@@ -100,7 +100,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void setUseCutoff( RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric );
void setUseCutoff(RealOpenMM distance, const OpenMM::NeighborList& neighbors, RealOpenMM solventDielectric);
/**---------------------------------------------------------------------------------------
......@@ -110,7 +110,7 @@ class ReferenceLJCoulombIxn {
--------------------------------------------------------------------------------------- */
void setUseSwitchingFunction( RealOpenMM distance );
void setUseSwitchingFunction(RealOpenMM distance);
/**---------------------------------------------------------------------------------------
......@@ -197,6 +197,6 @@ private:
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy, bool includeDirect, bool includeReciprocal) const;
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceLJCoulombIxn_H__
......@@ -28,7 +28,7 @@
#include "SimTKOpenMMRealType.h"
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
......@@ -92,7 +92,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
ReferenceLincsAlgorithm( int numberOfConstraints, int** atomIndices, RealOpenMM* distance );
ReferenceLincsAlgorithm(int numberOfConstraints, int** atomIndices, RealOpenMM* distance);
/**---------------------------------------------------------------------------------------
......@@ -102,7 +102,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
int getNumberOfConstraints( void ) const;
int getNumberOfConstraints() const;
/**---------------------------------------------------------------------------------------
......@@ -112,7 +112,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
int getNumTerms( void ) const;
int getNumTerms() const;
/**---------------------------------------------------------------------------------------
......@@ -120,7 +120,7 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
--------------------------------------------------------------------------------------- */
void setNumTerms( int terms );
void setNumTerms(int terms);
/**---------------------------------------------------------------------------------------
......@@ -131,13 +131,10 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
@param atomCoordinatesP atom coordinates prime
@param inverseMasses 1/mass
@return SimTKOpenMMCommon::DefaultReturn if converge; else
return SimTKOpenMMCommon::ErrorReturn
--------------------------------------------------------------------------------------- */
int apply( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
std::vector<OpenMM::RealVec>& atomCoordinatesP, std::vector<RealOpenMM>& inverseMasses );
void apply(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
std::vector<OpenMM::RealVec>& atomCoordinatesP, std::vector<RealOpenMM>& inverseMasses);
/**---------------------------------------------------------------------------------------
......@@ -148,15 +145,12 @@ class ReferenceLincsAlgorithm : public ReferenceConstraintAlgorithm {
@param velocities atom velocities
@param inverseMasses 1/mass
@return SimTKOpenMMCommon::DefaultReturn if converge; else
return SimTKOpenMMCommon::ErrorReturn
--------------------------------------------------------------------------------------- */
int applyToVelocities(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
void applyToVelocities(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
std::vector<OpenMM::RealVec>& velocities, std::vector<RealOpenMM>& inverseMasses);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceLincsAlgorithm_H__
......@@ -25,11 +25,10 @@
#ifndef __ReferenceMonteCarloBarostat_H__
#define __ReferenceMonteCarloBarostat_H__
#include "SimTKOpenMMCommon.h"
#include <utility>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class ReferenceMonteCarloBarostat {
......@@ -82,6 +81,6 @@ class ReferenceMonteCarloBarostat {
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferenceMonteCarloBarostat_H__
......@@ -27,7 +27,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
double maxDistance,
double minDistance = 0.0,
bool reportSymmetricPairs = false
);
);
// O(n) neighbor list method using voxel hash data structure
// parameter neighborList is automatically clear()ed before
......@@ -42,7 +42,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
double maxDistance,
double minDistance = 0.0,
bool reportSymmetricPairs = false
);
);
} // namespace OpenMM
......
......@@ -22,14 +22,14 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __CpuObc_H__
#define __CpuObc_H__
#ifndef __ReferenceObc_H__
#define __ReferenceObc_H__
#include "ObcParameters.h"
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class CpuObc {
class ReferenceObc {
private:
......@@ -39,7 +39,7 @@ class CpuObc {
// arrays containing OBC chain derivative
RealOpenMMVector _obcChain;
std::vector<RealOpenMM> _obcChain;
// flag to signal whether ACE approximation
// is to be included
......@@ -59,7 +59,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
CpuObc( ObcParameters* obcParameters );
ReferenceObc(ObcParameters* obcParameters);
/**---------------------------------------------------------------------------------------
......@@ -67,7 +67,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
~CpuObc( );
~ReferenceObc();
/**---------------------------------------------------------------------------------------
......@@ -77,7 +77,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
ObcParameters* getObcParameters( void ) const;
ObcParameters* getObcParameters() const;
/**---------------------------------------------------------------------------------------
......@@ -87,7 +87,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
void setObcParameters( ObcParameters* obcParameters );
void setObcParameters(ObcParameters* obcParameters);
/**---------------------------------------------------------------------------------------
......@@ -97,7 +97,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
int includeAceApproximation( void ) const;
int includeAceApproximation() const;
/**---------------------------------------------------------------------------------------
......@@ -107,7 +107,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
void setIncludeAceApproximation( int includeAceApproximation );
void setIncludeAceApproximation(int includeAceApproximation);
/**---------------------------------------------------------------------------------------
......@@ -117,7 +117,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
RealOpenMMVector& getObcChain( void );
std::vector<RealOpenMM>& getObcChain();
/**---------------------------------------------------------------------------------------
......@@ -128,7 +128,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
void computeBornRadii( const std::vector<OpenMM::RealVec>& atomCoordinates, RealOpenMMVector& bornRadii );
void computeBornRadii(const std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<RealOpenMM>& bornRadii);
/**---------------------------------------------------------------------------------------
......@@ -142,8 +142,8 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
void computeAceNonPolarForce( const ObcParameters* obcParameters, const RealOpenMMVector& bornRadii,
RealOpenMM* energy, RealOpenMMVector& forces ) const;
void computeAceNonPolarForce(const ObcParameters* obcParameters, const std::vector<RealOpenMM>& bornRadii,
RealOpenMM* energy, std::vector<RealOpenMM>& forces) const;
/**---------------------------------------------------------------------------------------
......@@ -155,32 +155,11 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
RealOpenMM computeBornEnergyForces( const std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMMVector& partialCharges, std::vector<OpenMM::RealVec>& forces );
/**---------------------------------------------------------------------------------------
Print Obc parameters, radii, forces, ...
@param atomCoordinates atomic coordinates
@param partialCharges partial charges
@param bornRadii Born radii (may be empty)
@param bornForces Born forces (may be empty)
@param forces forces (may be empty)
@param idString id string (who is calling)
@param log log file
--------------------------------------------------------------------------------------- */
void printObc( const std::vector<OpenMM::RealVec>& atomCoordinates,
const RealOpenMMVector& partialCharges,
const RealOpenMMVector& bornRadii,
const RealOpenMMVector& bornForces,
const std::vector<OpenMM::RealVec>& forces,
const std::string& idString, FILE* log );
RealOpenMM computeBornEnergyForces(const std::vector<OpenMM::RealVec>& atomCoordinates,
const std::vector<RealOpenMM>& partialCharges, std::vector<OpenMM::RealVec>& forces);
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __CpuObc_H__
#endif // __ReferenceObc_H__
......@@ -29,10 +29,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "SimTKOpenMMCommon.h"
#ifndef __ReferencePME_H__
#define __ReferencePME_H__
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
namespace OpenMM {
typedef RealOpenMM rvec[3];
......@@ -86,3 +91,7 @@ pme_exec(pme_t pme,
/* Release all memory in pme structure */
int OPENMM_EXPORT
pme_destroy(pme_t pme);
} // namespace OpenMM
#endif // __ReferencePME_H__
\ No newline at end of file
......@@ -27,8 +27,9 @@
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
// ---------------------------------------------------------------------------------------
namespace OpenMM {
class OPENMM_EXPORT ReferencePairIxn {
......@@ -42,7 +43,7 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
ReferencePairIxn( );
ReferencePairIxn();
/**---------------------------------------------------------------------------------------
......@@ -50,7 +51,7 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
~ReferencePairIxn( );
~ReferencePairIxn();
/**---------------------------------------------------------------------------------------
......@@ -67,13 +68,13 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
virtual void calculatePairIxn( int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
virtual void calculatePairIxn(int numberOfAtoms, std::vector<OpenMM::RealVec>& atomCoordinates,
RealOpenMM** atomParameters, int** exclusions,
RealOpenMM* fixedParameters, std::vector<OpenMM::RealVec>& forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy ) const = 0;
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const = 0;
};
// ---------------------------------------------------------------------------------------
} // namespace OpenMM
#endif // __ReferencePairIxn_H__
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