Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
162d69a2
Commit
162d69a2
authored
Feb 20, 2015
by
peastman
Browse files
Merge pull request #827 from peastman/reference
Lots of cleanup to reference platform
parents
2379b982
c44c956d
Changes
150
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
141 additions
and
155 deletions
+141
-155
platforms/reference/include/ReferenceConstraintAlgorithm.h
platforms/reference/include/ReferenceConstraintAlgorithm.h
+5
-2
platforms/reference/include/ReferenceCustomAngleIxn.h
platforms/reference/include/ReferenceCustomAngleIxn.h
+4
-4
platforms/reference/include/ReferenceCustomBondIxn.h
platforms/reference/include/ReferenceCustomBondIxn.h
+5
-5
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
+3
-1
platforms/reference/include/ReferenceCustomDynamics.h
platforms/reference/include/ReferenceCustomDynamics.h
+2
-2
platforms/reference/include/ReferenceCustomExternalIxn.h
platforms/reference/include/ReferenceCustomExternalIxn.h
+5
-5
platforms/reference/include/ReferenceCustomGBIxn.h
platforms/reference/include/ReferenceCustomGBIxn.h
+5
-3
platforms/reference/include/ReferenceCustomHbondIxn.h
platforms/reference/include/ReferenceCustomHbondIxn.h
+3
-1
platforms/reference/include/ReferenceCustomManyParticleIxn.h
platforms/reference/include/ReferenceCustomManyParticleIxn.h
+3
-1
platforms/reference/include/ReferenceCustomNonbondedIxn.h
platforms/reference/include/ReferenceCustomNonbondedIxn.h
+10
-8
platforms/reference/include/ReferenceCustomTorsionIxn.h
platforms/reference/include/ReferenceCustomTorsionIxn.h
+5
-5
platforms/reference/include/ReferenceDynamics.h
platforms/reference/include/ReferenceDynamics.h
+13
-13
platforms/reference/include/ReferenceForce.h
platforms/reference/include/ReferenceForce.h
+10
-10
platforms/reference/include/ReferenceGBVI.h
platforms/reference/include/ReferenceGBVI.h
+30
-50
platforms/reference/include/ReferenceHarmonicBondIxn.h
platforms/reference/include/ReferenceHarmonicBondIxn.h
+6
-6
platforms/reference/include/ReferenceKernels.h
platforms/reference/include/ReferenceKernels.h
+6
-6
platforms/reference/include/ReferenceLJCoulomb14.h
platforms/reference/include/ReferenceLJCoulomb14.h
+6
-6
platforms/reference/include/ReferenceLJCoulombIxn.h
platforms/reference/include/ReferenceLJCoulombIxn.h
+9
-9
platforms/reference/include/ReferenceLincsAlgorithm.h
platforms/reference/include/ReferenceLincsAlgorithm.h
+9
-15
platforms/reference/include/ReferenceMonteCarloBarostat.h
platforms/reference/include/ReferenceMonteCarloBarostat.h
+2
-3
No files found.
platforms/reference/include/ReferenceConstraintAlgorithm.h
View file @
162d69a2
...
...
@@ -25,8 +25,11 @@
#ifndef __ReferenceConstraintAlgorithm_H__
#define __ReferenceConstraintAlgorithm_H__
#include "
SimTKOpenMMCommon
.h"
#include "
RealVec
.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
namespace
OpenMM
{
/**
* This abstract class defines the interface which constraint algorithms must implement.
...
...
@@ -59,6 +62,6 @@ public:
std
::
vector
<
OpenMM
::
RealVec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
RealOpenMM
tolerance
)
=
0
;
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceConstraintAlgorithm_H__
platforms/reference/include/ReferenceCustomAngleIxn.h
View file @
162d69a2
...
...
@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
#include "lepton/CompiledExpression.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceCustomAngleIxn
:
public
ReferenceBondIxn
{
...
...
@@ -57,7 +57,7 @@ class ReferenceCustomAngleIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~
ReferenceCustomAngleIxn
(
);
~
ReferenceCustomAngleIxn
();
/**---------------------------------------------------------------------------------------
...
...
@@ -71,13 +71,13 @@ class ReferenceCustomAngleIxn : 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
;
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // _ReferenceCustomAngleIxn___
platforms/reference/include/ReferenceCustomBondIxn.h
View file @
162d69a2
...
...
@@ -28,7 +28,7 @@
#include "ReferenceBondIxn.h"
#include "lepton/CompiledExpression.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceCustomBondIxn
:
public
ReferenceBondIxn
{
...
...
@@ -58,7 +58,7 @@ class ReferenceCustomBondIxn : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
~
ReferenceCustomBondIxn
(
);
~
ReferenceCustomBondIxn
();
/**---------------------------------------------------------------------------------------
...
...
@@ -72,13 +72,13 @@ class ReferenceCustomBondIxn : 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 // _ReferenceCustomBondIxn___
platforms/reference/include/ReferenceCustomCompoundBondIxn.h
View file @
162d69a2
...
...
@@ -31,7 +31,7 @@
#include <map>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceCustomCompoundBondIxn
:
public
ReferenceBondIxn
{
...
...
@@ -169,4 +169,6 @@ public:
}
};
}
// namespace OpenMM
#endif // __ReferenceCustomCompoundBondIxn_H__
platforms/reference/include/ReferenceCustomDynamics.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceCustomExternalIxn.h
View file @
162d69a2
...
...
@@ -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___
platforms/reference/include/ReferenceCustomGBIxn.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceCustomHbondIxn.h
View file @
162d69a2
...
...
@@ -32,7 +32,7 @@
#include <set>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceCustomHbondIxn
:
public
ReferenceBondIxn
{
...
...
@@ -198,4 +198,6 @@ public:
}
};
}
// namespace OpenMM
#endif // __ReferenceCustomHbondIxn_H__
platforms/reference/include/ReferenceCustomManyParticleIxn.h
View file @
162d69a2
...
...
@@ -33,7 +33,7 @@
#include <set>
#include <vector>
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceCustomManyParticleIxn
{
...
...
@@ -192,4 +192,6 @@ public:
}
};
}
// namespace OpenMM
#endif // __ReferenceCustomManyParticleIxn_H__
platforms/reference/include/ReferenceCustomNonbondedIxn.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceCustomTorsionIxn.h
View file @
162d69a2
...
...
@@ -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___
platforms/reference/include/ReferenceDynamics.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceForce.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/
Cpu
GBVI.h
→
platforms/reference/include/
Reference
GBVI.h
View file @
162d69a2
...
...
@@ -22,24 +22,24 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __
Cpu
GBVI_H__
#define __
Cpu
GBVI_H__
#ifndef __
Reference
GBVI_H__
#define __
Reference
GBVI_H__
#include <vector>
#include "RealVec.h"
#include "GBVIParameters.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
Cpu
GBVI
{
class
Reference
GBVI
{
private:
// GB/VI parameters
GBVIParameters
*
_gbviParameters
;
RealOpenMM
Vector
_switchDeriviative
;
std
::
vector
<
RealOpenMM
>
_switchDeriviative
;
public:
...
...
@@ -53,7 +53,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
Cpu
GBVI
(
GBVIParameters
*
gbviParameters
);
Reference
GBVI
(
GBVIParameters
*
gbviParameters
);
/**---------------------------------------------------------------------------------------
...
...
@@ -61,7 +61,7 @@ class CpuGBVI {
--------------------------------------------------------------------------------------- */
~
Cpu
GBVI
(
);
~
Reference
GBVI
();
/**---------------------------------------------------------------------------------------
...
...
@@ -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
,
RealOpenMM
Vector
&
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
RealOpenMM
Vector
&
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
RealOpenMM
Vector
&
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 {
--------------------------------------------------------------------------------------- */
RealOpenMM
Vector
&
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
,
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
);
RealOpenMM
*
bornRadius
,
RealOpenMM
*
switchDeriviative
);
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __
Cpu
GBVI_H__
#endif // __
Reference
GBVI_H__
platforms/reference/include/ReferenceHarmonicBondIxn.h
View file @
162d69a2
...
...
@@ -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___
platforms/reference/include/ReferenceKernels.h
View file @
162d69a2
...
...
@@ -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
...
...
@@ -658,7 +658,7 @@ public:
*/
void
copyParametersToContext
(
ContextImpl
&
context
,
const
GBSAOBCForce
&
force
);
private:
Cpu
Obc
*
obc
;
Reference
Obc
*
obc
;
std
::
vector
<
RealOpenMM
>
charges
;
bool
isPeriodic
;
};
...
...
@@ -689,7 +689,7 @@ public:
*/
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
);
private:
Cpu
GBVI
*
gbvi
;
Reference
GBVI
*
gbvi
;
std
::
vector
<
RealOpenMM
>
charges
;
bool
isPeriodic
;
};
...
...
platforms/reference/include/ReferenceLJCoulomb14.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceLJCoulombIxn.h
View file @
162d69a2
...
...
@@ -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
,
void
calculateOneIxn
(
int
atom1
,
int
atom2
,
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
RealOpenMM
**
atomParameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
;
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__
platforms/reference/include/ReferenceLincsAlgorithm.h
View file @
162d69a2
...
...
@@ -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__
platforms/reference/include/ReferenceMonteCarloBarostat.h
View file @
162d69a2
...
...
@@ -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__
Prev
1
2
3
4
5
6
…
8
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment