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
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
210 additions
and
467 deletions
+210
-467
platforms/reference/include/ReferenceNeighborList.h
platforms/reference/include/ReferenceNeighborList.h
+2
-2
platforms/reference/include/ReferenceObc.h
platforms/reference/include/ReferenceObc.h
+19
-40
platforms/reference/include/ReferencePME.h
platforms/reference/include/ReferencePME.h
+10
-1
platforms/reference/include/ReferencePairIxn.h
platforms/reference/include/ReferencePairIxn.h
+7
-6
platforms/reference/include/ReferenceProperDihedralBond.h
platforms/reference/include/ReferenceProperDihedralBond.h
+6
-6
platforms/reference/include/ReferenceRbDihedralBond.h
platforms/reference/include/ReferenceRbDihedralBond.h
+6
-6
platforms/reference/include/ReferenceStochasticDynamics.h
platforms/reference/include/ReferenceStochasticDynamics.h
+9
-9
platforms/reference/include/ReferenceVariableStochasticDynamics.h
...s/reference/include/ReferenceVariableStochasticDynamics.h
+11
-11
platforms/reference/include/ReferenceVariableVerletDynamics.h
...forms/reference/include/ReferenceVariableVerletDynamics.h
+6
-6
platforms/reference/include/ReferenceVerletDynamics.h
platforms/reference/include/ReferenceVerletDynamics.h
+4
-4
platforms/reference/include/ReferenceVirtualSites.h
platforms/reference/include/ReferenceVirtualSites.h
+4
-0
platforms/reference/include/SimTKOpenMMCommon.h
platforms/reference/include/SimTKOpenMMCommon.h
+0
-65
platforms/reference/include/SimTKOpenMMLog.h
platforms/reference/include/SimTKOpenMMLog.h
+0
-185
platforms/reference/include/SimTKOpenMMUtilities.h
platforms/reference/include/SimTKOpenMMUtilities.h
+22
-20
platforms/reference/include/fftpack.h
platforms/reference/include/fftpack.h
+1
-2
platforms/reference/src/ReferenceKernelFactory.cpp
platforms/reference/src/ReferenceKernelFactory.cpp
+1
-1
platforms/reference/src/ReferenceKernels.cpp
platforms/reference/src/ReferenceKernels.cpp
+13
-13
platforms/reference/src/SimTKReference/GBVIParameters.cpp
platforms/reference/src/SimTKReference/GBVIParameters.cpp
+42
-43
platforms/reference/src/SimTKReference/ObcParameters.cpp
platforms/reference/src/SimTKReference/ObcParameters.cpp
+42
-42
platforms/reference/src/SimTKReference/ReferenceAndersenThermostat.cpp
...erence/src/SimTKReference/ReferenceAndersenThermostat.cpp
+5
-5
No files found.
platforms/reference/include/ReferenceNeighborList.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
...
@@ -27,7 +27,7 @@ void OPENMM_EXPORT computeNeighborListNaive(
double
maxDistance
,
double
maxDistance
,
double
minDistance
=
0.0
,
double
minDistance
=
0.0
,
bool
reportSymmetricPairs
=
false
bool
reportSymmetricPairs
=
false
);
);
// O(n) neighbor list method using voxel hash data structure
// O(n) neighbor list method using voxel hash data structure
// parameter neighborList is automatically clear()ed before
// parameter neighborList is automatically clear()ed before
...
@@ -42,7 +42,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
...
@@ -42,7 +42,7 @@ void OPENMM_EXPORT computeNeighborListVoxelHash(
double
maxDistance
,
double
maxDistance
,
double
minDistance
=
0.0
,
double
minDistance
=
0.0
,
bool
reportSymmetricPairs
=
false
bool
reportSymmetricPairs
=
false
);
);
}
// namespace OpenMM
}
// namespace OpenMM
...
...
platforms/reference/include/
Cpu
Obc.h
→
platforms/reference/include/
Reference
Obc.h
View file @
162d69a2
...
@@ -22,14 +22,14 @@
...
@@ -22,14 +22,14 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
#ifndef __
Cpu
Obc_H__
#ifndef __
Reference
Obc_H__
#define __
Cpu
Obc_H__
#define __
Reference
Obc_H__
#include "ObcParameters.h"
#include "ObcParameters.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
Cpu
Obc
{
class
Reference
Obc
{
private:
private:
...
@@ -39,7 +39,7 @@ class CpuObc {
...
@@ -39,7 +39,7 @@ class CpuObc {
// arrays containing OBC chain derivative
// arrays containing OBC chain derivative
RealOpenMM
Vector
_obcChain
;
std
::
vector
<
RealOpenMM
>
_obcChain
;
// flag to signal whether ACE approximation
// flag to signal whether ACE approximation
// is to be included
// is to be included
...
@@ -59,7 +59,7 @@ class CpuObc {
...
@@ -59,7 +59,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
Cpu
Obc
(
ObcParameters
*
obcParameters
);
Reference
Obc
(
ObcParameters
*
obcParameters
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -67,7 +67,7 @@ class CpuObc {
...
@@ -67,7 +67,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
Cpu
Obc
(
);
~
Reference
Obc
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -77,7 +77,7 @@ class CpuObc {
...
@@ -77,7 +77,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ObcParameters
*
getObcParameters
(
void
)
const
;
ObcParameters
*
getObcParameters
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -87,7 +87,7 @@ class CpuObc {
...
@@ -87,7 +87,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setObcParameters
(
ObcParameters
*
obcParameters
);
void
setObcParameters
(
ObcParameters
*
obcParameters
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -97,7 +97,7 @@ class CpuObc {
...
@@ -97,7 +97,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
int
includeAceApproximation
(
void
)
const
;
int
includeAceApproximation
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -107,7 +107,7 @@ class CpuObc {
...
@@ -107,7 +107,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setIncludeAceApproximation
(
int
includeAceApproximation
);
void
setIncludeAceApproximation
(
int
includeAceApproximation
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -117,7 +117,7 @@ class CpuObc {
...
@@ -117,7 +117,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
Vector
&
getObcChain
(
void
);
std
::
vector
<
RealOpenMM
>
&
getObcChain
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -128,7 +128,7 @@ class CpuObc {
...
@@ -128,7 +128,7 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
computeBornRadii
(
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
RealOpenMM
Vector
&
bornRadii
);
void
computeBornRadii
(
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
RealOpenMM
>
&
bornRadii
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -142,8 +142,8 @@ class CpuObc {
...
@@ -142,8 +142,8 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
RealOpenMM
Vector
&
bornRadii
,
void
computeAceNonPolarForce
(
const
ObcParameters
*
obcParameters
,
const
std
::
vector
<
RealOpenMM
>
&
bornRadii
,
RealOpenMM
*
energy
,
RealOpenMM
Vector
&
forces
)
const
;
RealOpenMM
*
energy
,
std
::
vector
<
RealOpenMM
>
&
forces
)
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -155,32 +155,11 @@ class CpuObc {
...
@@ -155,32 +155,11 @@ class CpuObc {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
RealOpenMM
computeBornEnergyForces
(
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
const
RealOpenMMVector
&
partialCharges
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
);
const
std
::
vector
<
RealOpenMM
>&
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
);
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __
Cpu
Obc_H__
#endif // __
Reference
Obc_H__
platforms/reference/include/ReferencePME.h
View file @
162d69a2
...
@@ -29,10 +29,15 @@
...
@@ -29,10 +29,15 @@
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*/
*/
#include "SimTKOpenMMCommon.h"
#ifndef __ReferencePME_H__
#define __ReferencePME_H__
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
#include <vector>
namespace
OpenMM
{
typedef
RealOpenMM
rvec
[
3
];
typedef
RealOpenMM
rvec
[
3
];
...
@@ -86,3 +91,7 @@ pme_exec(pme_t pme,
...
@@ -86,3 +91,7 @@ pme_exec(pme_t pme,
/* Release all memory in pme structure */
/* Release all memory in pme structure */
int
OPENMM_EXPORT
int
OPENMM_EXPORT
pme_destroy
(
pme_t
pme
);
pme_destroy
(
pme_t
pme
);
}
// namespace OpenMM
#endif // __ReferencePME_H__
\ No newline at end of file
platforms/reference/include/ReferencePairIxn.h
View file @
162d69a2
...
@@ -27,8 +27,9 @@
...
@@ -27,8 +27,9 @@
#include "RealVec.h"
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <vector>
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
OPENMM_EXPORT
ReferencePairIxn
{
class
OPENMM_EXPORT
ReferencePairIxn
{
...
@@ -42,7 +43,7 @@ class OPENMM_EXPORT ReferencePairIxn {
...
@@ -42,7 +43,7 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ReferencePairIxn
(
);
ReferencePairIxn
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -50,7 +51,7 @@ class OPENMM_EXPORT ReferencePairIxn {
...
@@ -50,7 +51,7 @@ class OPENMM_EXPORT ReferencePairIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferencePairIxn
(
);
~
ReferencePairIxn
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -67,13 +68,13 @@ class OPENMM_EXPORT 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
**
atomParameters
,
int
**
exclusions
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
fixedParameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
=
0
;
RealOpenMM
*
energyByAtom
,
RealOpenMM
*
totalEnergy
)
const
=
0
;
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferencePairIxn_H__
#endif // __ReferencePairIxn_H__
platforms/reference/include/ReferenceProperDihedralBond.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
#include "ReferenceBondIxn.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
OPENMM_EXPORT
ReferenceProperDihedralBond
:
public
ReferenceBondIxn
{
class
OPENMM_EXPORT
ReferenceProperDihedralBond
:
public
ReferenceBondIxn
{
...
@@ -41,7 +41,7 @@ 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 {
...
@@ -49,7 +49,7 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceProperDihedralBond
(
);
~
ReferenceProperDihedralBond
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -65,12 +65,12 @@ class OPENMM_EXPORT ReferenceProperDihedralBond : public ReferenceBondIxn {
...
@@ -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
*
parameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
RealOpenMM
*
totalEnergy
)
const
;
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceProperDihedralBond_H__
#endif // __ReferenceProperDihedralBond_H__
platforms/reference/include/ReferenceRbDihedralBond.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "ReferenceBondIxn.h"
#include "ReferenceBondIxn.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
OPENMM_EXPORT
ReferenceRbDihedralBond
:
public
ReferenceBondIxn
{
class
OPENMM_EXPORT
ReferenceRbDihedralBond
:
public
ReferenceBondIxn
{
...
@@ -41,7 +41,7 @@ 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 {
...
@@ -49,7 +49,7 @@ class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceRbDihedralBond
(
);
~
ReferenceRbDihedralBond
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -63,12 +63,12 @@ class OPENMM_EXPORT ReferenceRbDihedralBond : public ReferenceBondIxn {
...
@@ -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
*
parameters
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
RealOpenMM
*
totalEnergy
)
const
;
RealOpenMM
*
totalEnergy
)
const
;
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceRbDihedralBond_H__
#endif // __ReferenceRbDihedralBond_H__
platforms/reference/include/ReferenceStochasticDynamics.h
View file @
162d69a2
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include "ReferenceDynamics.h"
#include "ReferenceDynamics.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
OPENMM_EXPORT
ReferenceStochasticDynamics
:
public
ReferenceDynamics
{
class
OPENMM_EXPORT
ReferenceStochasticDynamics
:
public
ReferenceDynamics
{
...
@@ -51,7 +51,7 @@ 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 {
...
@@ -59,7 +59,7 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceStochasticDynamics
(
);
~
ReferenceStochasticDynamics
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -69,7 +69,7 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
...
@@ -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 {
...
@@ -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
,
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
);
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
std
::
vector
<
OpenMM
::
RealVec
>&
xPrime
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -115,11 +115,11 @@ class OPENMM_EXPORT ReferenceStochasticDynamics : public ReferenceDynamics {
...
@@ -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
,
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
);
std
::
vector
<
OpenMM
::
RealVec
>&
forces
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
std
::
vector
<
OpenMM
::
RealVec
>&
xPrime
);
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceStochasticDynamics_H__
#endif // __ReferenceStochasticDynamics_H__
platforms/reference/include/ReferenceVariableStochasticDynamics.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceVariableStochasticDynamics
:
public
ReferenceDynamics
{
class
ReferenceVariableStochasticDynamics
:
public
ReferenceDynamics
{
...
@@ -50,7 +50,7 @@ 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 {
...
@@ -58,7 +58,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceVariableStochasticDynamics
(
);
~
ReferenceVariableStochasticDynamics
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -68,7 +68,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
...
@@ -68,7 +68,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
getTau
(
void
)
const
;
RealOpenMM
getTau
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -78,7 +78,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
...
@@ -78,7 +78,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
getAccuracy
(
void
)
const
;
RealOpenMM
getAccuracy
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -86,7 +86,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
...
@@ -86,7 +86,7 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setAccuracy
(
RealOpenMM
accuracy
);
void
setAccuracy
(
RealOpenMM
accuracy
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -120,9 +120,9 @@ class ReferenceVariableStochasticDynamics : public ReferenceDynamics {
...
@@ -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
>&
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 {
...
@@ -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
>&
forces
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
,
std
::
vector
<
OpenMM
::
RealVec
>&
xPrime
);
std
::
vector
<
OpenMM
::
RealVec
>&
xPrime
);
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceVariableStochasticDynamics_H__
#endif // __ReferenceVariableStochasticDynamics_H__
platforms/reference/include/ReferenceVariableVerletDynamics.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceVariableVerletDynamics
:
public
ReferenceDynamics
{
class
ReferenceVariableVerletDynamics
:
public
ReferenceDynamics
{
...
@@ -48,7 +48,7 @@ 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 {
...
@@ -56,7 +56,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceVariableVerletDynamics
(
);
~
ReferenceVariableVerletDynamics
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -66,7 +66,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
...
@@ -66,7 +66,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
getAccuracy
(
void
)
const
;
RealOpenMM
getAccuracy
()
const
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -74,7 +74,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
...
@@ -74,7 +74,7 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
setAccuracy
(
RealOpenMM
accuracy
);
void
setAccuracy
(
RealOpenMM
accuracy
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -95,6 +95,6 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
...
@@ -95,6 +95,6 @@ class ReferenceVariableVerletDynamics : public ReferenceDynamics {
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceVariableVerletDynamics_H__
#endif // __ReferenceVariableVerletDynamics_H__
platforms/reference/include/ReferenceVerletDynamics.h
View file @
162d69a2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "ReferenceDynamics.h"
#include "ReferenceDynamics.h"
// ---------------------------------------------------------------------------------------
namespace
OpenMM
{
class
ReferenceVerletDynamics
:
public
ReferenceDynamics
{
class
ReferenceVerletDynamics
:
public
ReferenceDynamics
{
...
@@ -49,7 +49,7 @@ 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 {
...
@@ -57,7 +57,7 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
~
ReferenceVerletDynamics
(
);
~
ReferenceVerletDynamics
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -77,6 +77,6 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
...
@@ -77,6 +77,6 @@ class ReferenceVerletDynamics : public ReferenceDynamics {
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __ReferenceVerletDynamics_H__
#endif // __ReferenceVerletDynamics_H__
platforms/reference/include/ReferenceVirtualSites.h
View file @
162d69a2
...
@@ -36,6 +36,8 @@
...
@@ -36,6 +36,8 @@
#include "RealVec.h"
#include "RealVec.h"
#include <vector>
#include <vector>
namespace
OpenMM
{
class
OPENMM_EXPORT
ReferenceVirtualSites
{
class
OPENMM_EXPORT
ReferenceVirtualSites
{
public:
public:
/**
/**
...
@@ -48,4 +50,6 @@ public:
...
@@ -48,4 +50,6 @@ public:
static
void
distributeForces
(
const
OpenMM
::
System
&
system
,
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
);
static
void
distributeForces
(
const
OpenMM
::
System
&
system
,
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
RealVec
>&
forces
);
};
};
}
// namespace OpenMM
#endif // __ReferenceVirtualSites_H__
#endif // __ReferenceVirtualSites_H__
platforms/reference/include/SimTKOpenMMCommon.h
deleted
100644 → 0
View file @
2379b982
/* 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__
platforms/reference/include/SimTKOpenMMLog.h
deleted
100644 → 0
View file @
2379b982
/* 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__
platforms/reference/include/SimTKOpenMMUtilities.h
View file @
162d69a2
...
@@ -27,12 +27,14 @@
...
@@ -27,12 +27,14 @@
// class of shared, static utility methods
// class of shared, static utility methods
#include "
SimTKOpenMMCommon
.h"
#include "
RealVec
.h"
#include "sfmt/SFMT.h"
#include "sfmt/SFMT.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#include <string>
#include <string>
namespace
OpenMM
{
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
Class of static methods to be shared
Class of static methods to be shared
...
@@ -54,8 +56,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -54,8 +56,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
// dummy constructor/destructor
// dummy constructor/destructor
SimTKOpenMMUtilities
(){};
SimTKOpenMMUtilities
()
{};
~
SimTKOpenMMUtilities
(){};
~
SimTKOpenMMUtilities
()
{};
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -73,9 +75,9 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -73,9 +75,9 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
RealOpenMM
*
allocateOneDRealOpenMMArray
(
int
iSize
,
RealOpenMM
*
array1D
,
int
initialize
,
static
RealOpenMM
*
allocateOneDRealOpenMMArray
(
int
iSize
,
RealOpenMM
*
array1D
,
int
initialize
,
RealOpenMM
initialValue
,
RealOpenMM
initialValue
,
const
std
::
string
&
idString
=
std
::
string
(
"1DArray"
)
);
const
std
::
string
&
idString
=
std
::
string
(
"1DArray"
)
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -94,10 +96,10 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -94,10 +96,10 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
RealOpenMM
**
allocateTwoDRealOpenMMArray
(
int
iSize
,
int
jSize
,
static
RealOpenMM
**
allocateTwoDRealOpenMMArray
(
int
iSize
,
int
jSize
,
RealOpenMM
**
array2D
,
int
initialize
,
RealOpenMM
**
array2D
,
int
initialize
,
RealOpenMM
initialValue
,
RealOpenMM
initialValue
,
const
std
::
string
&
idString
=
std
::
string
(
"2DArray"
)
);
const
std
::
string
&
idString
=
std
::
string
(
"2DArray"
)
);
/* ---------------------------------------------------------------------------------------
/* ---------------------------------------------------------------------------------------
...
@@ -110,8 +112,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -110,8 +112,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
freeOneDRealOpenMMArray
(
RealOpenMM
*
array1D
,
static
void
freeOneDRealOpenMMArray
(
RealOpenMM
*
array1D
,
const
std
::
string
&
idString
=
std
::
string
(
"1DArray"
)
);
const
std
::
string
&
idString
=
std
::
string
(
"1DArray"
)
);
/* ---------------------------------------------------------------------------------------
/* ---------------------------------------------------------------------------------------
...
@@ -124,8 +126,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -124,8 +126,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
freeTwoDRealOpenMMArray
(
RealOpenMM
**
array2D
,
static
void
freeTwoDRealOpenMMArray
(
RealOpenMM
**
array2D
,
const
std
::
string
&
idString
=
std
::
string
(
"2DArray"
)
);
const
std
::
string
&
idString
=
std
::
string
(
"2DArray"
)
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -140,8 +142,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -140,8 +142,8 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
initialize2DRealOpenMMArray
(
int
iSize
,
int
jSize
,
static
void
initialize2DRealOpenMMArray
(
int
iSize
,
int
jSize
,
RealOpenMM
**
array2D
,
RealOpenMM
initialValue
);
RealOpenMM
**
array2D
,
RealOpenMM
initialValue
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -157,7 +159,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -157,7 +159,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
crossProductVector3
(
RealOpenMM
*
vectorX
,
RealOpenMM
*
vectorY
,
RealOpenMM
*
vectorZ
);
static
void
crossProductVector3
(
RealOpenMM
*
vectorX
,
RealOpenMM
*
vectorY
,
RealOpenMM
*
vectorZ
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -167,7 +169,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -167,7 +169,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
RealOpenMM
getNormallyDistributedRandomNumber
(
void
);
static
RealOpenMM
getNormallyDistributedRandomNumber
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -177,7 +179,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -177,7 +179,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
RealOpenMM
getUniformlyDistributedRandomNumber
(
void
);
static
RealOpenMM
getUniformlyDistributedRandomNumber
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -187,7 +189,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -187,7 +189,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
uint32_t
getRandomNumberSeed
(
void
);
static
uint32_t
getRandomNumberSeed
();
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -197,7 +199,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -197,7 +199,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
static
void
setRandomNumberSeed
(
uint32_t
seed
);
static
void
setRandomNumberSeed
(
uint32_t
seed
);
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -219,7 +221,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
...
@@ -219,7 +221,7 @@ class OPENMM_EXPORT SimTKOpenMMUtilities {
static
void
loadCheckpoint
(
std
::
istream
&
stream
);
static
void
loadCheckpoint
(
std
::
istream
&
stream
);
};
};
//
---------------------------------------------------------------------------------------
}
//
namespace OpenMM
#endif // __SimTKOpenMMUtilities_H__
#endif // __SimTKOpenMMUtilities_H__
platforms/reference/include/fftpack.h
View file @
162d69a2
...
@@ -14,14 +14,13 @@
...
@@ -14,14 +14,13 @@
* drop a line to lindahl@cbr.su.se and let me know about it!
* drop a line to lindahl@cbr.su.se and let me know about it!
*/
*/
#include "SimTKOpenMMCommon.h"
#ifndef _FFTPACK_H_
#ifndef _FFTPACK_H_
#define _FFTPACK_H_
#define _FFTPACK_H_
#include <stdio.h>
#include <stdio.h>
#include "RealVec.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport.h"
#ifdef __cplusplus
#ifdef __cplusplus
...
...
platforms/reference/src/ReferenceKernelFactory.cpp
View file @
162d69a2
...
@@ -100,5 +100,5 @@ KernelImpl* ReferenceKernelFactory::createKernelImpl(std::string name, const Pla
...
@@ -100,5 +100,5 @@ KernelImpl* ReferenceKernelFactory::createKernelImpl(std::string name, const Pla
return
new
ReferenceApplyMonteCarloBarostatKernel
(
name
,
platform
);
return
new
ReferenceApplyMonteCarloBarostatKernel
(
name
,
platform
);
if
(
name
==
RemoveCMMotionKernel
::
Name
())
if
(
name
==
RemoveCMMotionKernel
::
Name
())
return
new
ReferenceRemoveCMMotionKernel
(
name
,
platform
,
data
);
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
());
}
}
platforms/reference/src/ReferenceKernels.cpp
View file @
162d69a2
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "ReferenceKernels.h"
#include "ReferenceKernels.h"
#include "
Cpu
Obc.h"
#include "
Reference
Obc.h"
#include "
Cpu
GBVI.h"
#include "
Reference
GBVI.h"
#include "ReferenceAndersenThermostat.h"
#include "ReferenceAndersenThermostat.h"
#include "ReferenceAngleBondIxn.h"
#include "ReferenceAngleBondIxn.h"
#include "ReferenceBondForce.h"
#include "ReferenceBondForce.h"
...
@@ -1105,13 +1105,13 @@ void ReferenceCalcGBSAOBCForceKernel::initialize(const System& system, const GBS
...
@@ -1105,13 +1105,13 @@ void ReferenceCalcGBSAOBCForceKernel::initialize(const System& system, const GBS
ObcParameters
*
obcParameters
=
new
ObcParameters
(
numParticles
,
ObcParameters
::
ObcTypeII
);
ObcParameters
*
obcParameters
=
new
ObcParameters
(
numParticles
,
ObcParameters
::
ObcTypeII
);
obcParameters
->
setAtomicRadii
(
atomicRadii
);
obcParameters
->
setAtomicRadii
(
atomicRadii
);
obcParameters
->
setScaledRadiusFactors
(
scaleFactors
);
obcParameters
->
setScaledRadiusFactors
(
scaleFactors
);
obcParameters
->
setSolventDielectric
(
static_cast
<
RealOpenMM
>
(
force
.
getSolventDielectric
())
);
obcParameters
->
setSolventDielectric
(
static_cast
<
RealOpenMM
>
(
force
.
getSolventDielectric
()));
obcParameters
->
setSoluteDielectric
(
static_cast
<
RealOpenMM
>
(
force
.
getSoluteDielectric
())
);
obcParameters
->
setSoluteDielectric
(
static_cast
<
RealOpenMM
>
(
force
.
getSoluteDielectric
()));
obcParameters
->
setPi4Asolv
(
4
*
M_PI
*
force
.
getSurfaceAreaEnergy
());
obcParameters
->
setPi4Asolv
(
4
*
M_PI
*
force
.
getSurfaceAreaEnergy
());
if
(
force
.
getNonbondedMethod
()
!=
GBSAOBCForce
::
NoCutoff
)
if
(
force
.
getNonbondedMethod
()
!=
GBSAOBCForce
::
NoCutoff
)
obcParameters
->
setUseCutoff
(
static_cast
<
RealOpenMM
>
(
force
.
getCutoffDistance
()));
obcParameters
->
setUseCutoff
(
static_cast
<
RealOpenMM
>
(
force
.
getCutoffDistance
()));
isPeriodic
=
(
force
.
getNonbondedMethod
()
==
GBSAOBCForce
::
CutoffPeriodic
);
isPeriodic
=
(
force
.
getNonbondedMethod
()
==
GBSAOBCForce
::
CutoffPeriodic
);
obc
=
new
Cpu
Obc
(
obcParameters
);
obc
=
new
Reference
Obc
(
obcParameters
);
obc
->
setIncludeAceApproximation
(
true
);
obc
->
setIncludeAceApproximation
(
true
);
}
}
...
@@ -1152,7 +1152,7 @@ ReferenceCalcGBVIForceKernel::~ReferenceCalcGBVIForceKernel() {
...
@@ -1152,7 +1152,7 @@ ReferenceCalcGBVIForceKernel::~ReferenceCalcGBVIForceKernel() {
}
}
}
}
void
ReferenceCalcGBVIForceKernel
::
initialize
(
const
System
&
system
,
const
GBVIForce
&
force
,
const
std
::
vector
<
double
>
&
inputScaledRadii
)
{
void
ReferenceCalcGBVIForceKernel
::
initialize
(
const
System
&
system
,
const
GBVIForce
&
force
,
const
std
::
vector
<
double
>
&
inputScaledRadii
)
{
int
numParticles
=
system
.
getNumParticles
();
int
numParticles
=
system
.
getNumParticles
();
...
@@ -1185,7 +1185,7 @@ void ReferenceCalcGBVIForceKernel::initialize(const System& system, const GBVIFo
...
@@ -1185,7 +1185,7 @@ void ReferenceCalcGBVIForceKernel::initialize(const System& system, const GBVIFo
if
(
force
.
getNonbondedMethod
()
!=
GBVIForce
::
NoCutoff
)
if
(
force
.
getNonbondedMethod
()
!=
GBVIForce
::
NoCutoff
)
gBVIParameters
->
setUseCutoff
(
static_cast
<
RealOpenMM
>
(
force
.
getCutoffDistance
()));
gBVIParameters
->
setUseCutoff
(
static_cast
<
RealOpenMM
>
(
force
.
getCutoffDistance
()));
isPeriodic
=
(
force
.
getNonbondedMethod
()
==
GBVIForce
::
CutoffPeriodic
);
isPeriodic
=
(
force
.
getNonbondedMethod
()
==
GBVIForce
::
CutoffPeriodic
);
gbvi
=
new
Cpu
GBVI
(
gBVIParameters
);
gbvi
=
new
Reference
GBVI
(
gBVIParameters
);
}
}
double
ReferenceCalcGBVIForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
double
ReferenceCalcGBVIForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
...
@@ -1201,7 +1201,7 @@ double ReferenceCalcGBVIForceKernel::execute(ContextImpl& context, bool includeF
...
@@ -1201,7 +1201,7 @@ double ReferenceCalcGBVIForceKernel::execute(ContextImpl& context, bool includeF
gbvi
->
computeBornForces
(
posData
,
charges
,
forceData
);
gbvi
->
computeBornForces
(
posData
,
charges
,
forceData
);
energy
=
0.0
;
energy
=
0.0
;
}
}
if
(
includeEnergy
){
if
(
includeEnergy
)
{
energy
=
gbvi
->
computeBornEnergy
(
posData
,
charges
);
energy
=
gbvi
->
computeBornEnergy
(
posData
,
charges
);
}
}
return
static_cast
<
double
>
(
energy
);
return
static_cast
<
double
>
(
energy
);
...
@@ -1710,7 +1710,7 @@ void ReferenceIntegrateVerletStepKernel::execute(ContextImpl& context, const Ver
...
@@ -1710,7 +1710,7 @@ void ReferenceIntegrateVerletStepKernel::execute(ContextImpl& context, const Ver
if
(
dynamics
)
if
(
dynamics
)
delete
dynamics
;
delete
dynamics
;
dynamics
=
new
ReferenceVerletDynamics
(
context
.
getSystem
().
getNumParticles
(),
static_cast
<
RealOpenMM
>
(
stepSize
)
);
dynamics
=
new
ReferenceVerletDynamics
(
context
.
getSystem
().
getNumParticles
(),
static_cast
<
RealOpenMM
>
(
stepSize
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
prevStepSize
=
stepSize
;
prevStepSize
=
stepSize
;
}
}
...
@@ -1748,12 +1748,12 @@ void ReferenceIntegrateLangevinStepKernel::execute(ContextImpl& context, const L
...
@@ -1748,12 +1748,12 @@ void ReferenceIntegrateLangevinStepKernel::execute(ContextImpl& context, const L
if
(
dynamics
)
if
(
dynamics
)
delete
dynamics
;
delete
dynamics
;
RealOpenMM
tau
=
static_cast
<
RealOpenMM
>
(
friction
==
0.0
?
0.0
:
1.0
/
friction
);
RealOpenMM
tau
=
static_cast
<
RealOpenMM
>
(
friction
==
0.0
?
0.0
:
1.0
/
friction
);
dynamics
=
new
ReferenceStochasticDynamics
(
dynamics
=
new
ReferenceStochasticDynamics
(
context
.
getSystem
().
getNumParticles
(),
context
.
getSystem
().
getNumParticles
(),
static_cast
<
RealOpenMM
>
(
stepSize
),
static_cast
<
RealOpenMM
>
(
stepSize
),
static_cast
<
RealOpenMM
>
(
tau
),
static_cast
<
RealOpenMM
>
(
tau
),
static_cast
<
RealOpenMM
>
(
temperature
)
);
static_cast
<
RealOpenMM
>
(
temperature
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
prevTemp
=
temperature
;
prevTemp
=
temperature
;
prevFriction
=
friction
;
prevFriction
=
friction
;
...
@@ -1797,7 +1797,7 @@ void ReferenceIntegrateBrownianStepKernel::execute(ContextImpl& context, const B
...
@@ -1797,7 +1797,7 @@ void ReferenceIntegrateBrownianStepKernel::execute(ContextImpl& context, const B
context
.
getSystem
().
getNumParticles
(),
context
.
getSystem
().
getNumParticles
(),
static_cast
<
RealOpenMM
>
(
stepSize
),
static_cast
<
RealOpenMM
>
(
stepSize
),
static_cast
<
RealOpenMM
>
(
friction
),
static_cast
<
RealOpenMM
>
(
friction
),
static_cast
<
RealOpenMM
>
(
temperature
)
);
static_cast
<
RealOpenMM
>
(
temperature
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
prevTemp
=
temperature
;
prevTemp
=
temperature
;
prevFriction
=
friction
;
prevFriction
=
friction
;
...
@@ -1837,7 +1837,7 @@ double ReferenceIntegrateVariableLangevinStepKernel::execute(ContextImpl& contex
...
@@ -1837,7 +1837,7 @@ double ReferenceIntegrateVariableLangevinStepKernel::execute(ContextImpl& contex
if
(
dynamics
)
if
(
dynamics
)
delete
dynamics
;
delete
dynamics
;
RealOpenMM
tau
=
static_cast
<
RealOpenMM
>
(
friction
==
0.0
?
0.0
:
1.0
/
friction
);
RealOpenMM
tau
=
static_cast
<
RealOpenMM
>
(
friction
==
0.0
?
0.0
:
1.0
/
friction
);
dynamics
=
new
ReferenceVariableStochasticDynamics
(
context
.
getSystem
().
getNumParticles
(),
(
RealOpenMM
)
tau
,
(
RealOpenMM
)
temperature
,
(
RealOpenMM
)
errorTol
);
dynamics
=
new
ReferenceVariableStochasticDynamics
(
context
.
getSystem
().
getNumParticles
(),
(
RealOpenMM
)
tau
,
(
RealOpenMM
)
temperature
,
(
RealOpenMM
)
errorTol
);
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
dynamics
->
setReferenceConstraintAlgorithm
(
&
extractConstraints
(
context
));
prevTemp
=
temperature
;
prevTemp
=
temperature
;
...
...
platforms/reference/src/
gbsa
/GBVIParameters.cpp
→
platforms/reference/src/
SimTKReference
/GBVIParameters.cpp
View file @
162d69a2
...
@@ -28,10 +28,9 @@
...
@@ -28,10 +28,9 @@
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "GBVIParameters.h"
#include "GBVIParameters.h"
#include "SimTKOpenMMCommon.h"
using
std
::
vector
;
using
std
::
vector
;
using
OpenMM
::
RealVec
;
using
namespace
OpenMM
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -41,19 +40,19 @@ using OpenMM::RealVec;
...
@@ -41,19 +40,19 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
GBVIParameters
::
GBVIParameters
(
int
numberOfAtoms
)
:
_numberOfAtoms
(
numberOfAtoms
),
GBVIParameters
::
GBVIParameters
(
int
numberOfAtoms
)
:
_numberOfAtoms
(
numberOfAtoms
),
_soluteDielectric
(
1.0
),
_soluteDielectric
(
1.0
),
_solventDielectric
(
78.3
),
_solventDielectric
(
78.3
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_cutoff
(
false
),
_cutoff
(
false
),
_periodic
(
false
),
_periodic
(
false
),
_bornRadiusScalingMethod
(
0
),
_bornRadiusScalingMethod
(
0
),
_quinticLowerLimitFactor
(
0.8
),
_quinticLowerLimitFactor
(
0.8
),
_quinticUpperBornRadiusLimit
(
5.0
)
{
_quinticUpperBornRadiusLimit
(
5.0
)
{
_atomicRadii
.
resize
(
numberOfAtoms
);
_atomicRadii
.
resize
(
numberOfAtoms
);
_scaledRadii
.
resize
(
numberOfAtoms
);
_scaledRadii
.
resize
(
numberOfAtoms
);
_gammaParameters
.
resize
(
numberOfAtoms
);
_gammaParameters
.
resize
(
numberOfAtoms
);
}
}
...
@@ -63,7 +62,7 @@ GBVIParameters::GBVIParameters( int numberOfAtoms ) : _numberOfAtoms(numberOfAto
...
@@ -63,7 +62,7 @@ GBVIParameters::GBVIParameters( int numberOfAtoms ) : _numberOfAtoms(numberOfAto
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
GBVIParameters
::~
GBVIParameters
(
){
GBVIParameters
::~
GBVIParameters
()
{
}
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -74,7 +73,7 @@ GBVIParameters::~GBVIParameters( ){
...
@@ -74,7 +73,7 @@ GBVIParameters::~GBVIParameters( ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
int
GBVIParameters
::
getNumberOfAtoms
(
void
)
const
{
int
GBVIParameters
::
getNumberOfAtoms
()
const
{
return
_numberOfAtoms
;
return
_numberOfAtoms
;
}
}
...
@@ -86,7 +85,7 @@ int GBVIParameters::getNumberOfAtoms( void ) const {
...
@@ -86,7 +85,7 @@ int GBVIParameters::getNumberOfAtoms( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getElectricConstant
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getElectricConstant
()
const
{
return
_electricConstant
;
return
_electricConstant
;
}
}
...
@@ -98,7 +97,7 @@ RealOpenMM GBVIParameters::getElectricConstant( void ) const {
...
@@ -98,7 +97,7 @@ RealOpenMM GBVIParameters::getElectricConstant( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getSolventDielectric
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getSolventDielectric
()
const
{
return
_solventDielectric
;
return
_solventDielectric
;
}
}
...
@@ -110,7 +109,7 @@ RealOpenMM GBVIParameters::getSolventDielectric( void ) const {
...
@@ -110,7 +109,7 @@ RealOpenMM GBVIParameters::getSolventDielectric( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setSolventDielectric
(
RealOpenMM
solventDielectric
){
void
GBVIParameters
::
setSolventDielectric
(
RealOpenMM
solventDielectric
)
{
_solventDielectric
=
solventDielectric
;
_solventDielectric
=
solventDielectric
;
}
}
...
@@ -122,7 +121,7 @@ void GBVIParameters::setSolventDielectric( RealOpenMM solventDielectric ){
...
@@ -122,7 +121,7 @@ void GBVIParameters::setSolventDielectric( RealOpenMM solventDielectric ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getSoluteDielectric
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getSoluteDielectric
()
const
{
return
_soluteDielectric
;
return
_soluteDielectric
;
}
}
...
@@ -134,7 +133,7 @@ RealOpenMM GBVIParameters::getSoluteDielectric( void ) const {
...
@@ -134,7 +133,7 @@ RealOpenMM GBVIParameters::getSoluteDielectric( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setSoluteDielectric
(
RealOpenMM
soluteDielectric
){
void
GBVIParameters
::
setSoluteDielectric
(
RealOpenMM
soluteDielectric
)
{
_soluteDielectric
=
soluteDielectric
;
_soluteDielectric
=
soluteDielectric
;
}
}
...
@@ -146,7 +145,7 @@ void GBVIParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){
...
@@ -146,7 +145,7 @@ void GBVIParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
const
RealOpenMM
Vector
&
GBVIParameters
::
getAtomicRadii
(
void
)
const
{
const
vector
<
RealOpenMM
>
&
GBVIParameters
::
getAtomicRadii
()
const
{
return
_atomicRadii
;
return
_atomicRadii
;
}
}
...
@@ -158,10 +157,10 @@ const RealOpenMMVector& GBVIParameters::getAtomicRadii( void ) const {
...
@@ -158,10 +157,10 @@ const RealOpenMMVector& GBVIParameters::getAtomicRadii( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setAtomicRadii
(
const
RealOpenMM
Vector
&
atomicRadii
){
void
GBVIParameters
::
setAtomicRadii
(
const
vector
<
RealOpenMM
>
&
atomicRadii
)
{
if
(
atomicRadii
.
size
()
==
_atomicRadii
.
size
()
){
if
(
atomicRadii
.
size
()
==
_atomicRadii
.
size
())
{
for
(
unsigned
int
ii
=
0
;
ii
<
atomicRadii
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
atomicRadii
.
size
();
ii
++
)
{
_atomicRadii
[
ii
]
=
atomicRadii
[
ii
];
_atomicRadii
[
ii
]
=
atomicRadii
[
ii
];
}
}
}
else
{
}
else
{
...
@@ -170,7 +169,7 @@ void GBVIParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
...
@@ -170,7 +169,7 @@ void GBVIParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
msg
<<
atomicRadii
.
size
();
msg
<<
atomicRadii
.
size
();
msg
<<
" current size="
<<
_atomicRadii
.
size
();
msg
<<
" current size="
<<
_atomicRadii
.
size
();
throw
OpenMM
::
OpenMMException
(
msg
.
str
());
throw
OpenMM
::
OpenMMException
(
msg
.
str
());
}
}
}
}
...
@@ -181,7 +180,7 @@ void GBVIParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
...
@@ -181,7 +180,7 @@ void GBVIParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
const
RealOpenMM
Vector
&
GBVIParameters
::
getScaledRadii
(
void
)
const
{
const
vector
<
RealOpenMM
>
&
GBVIParameters
::
getScaledRadii
()
const
{
return
_scaledRadii
;
return
_scaledRadii
;
}
}
...
@@ -193,10 +192,10 @@ const RealOpenMMVector& GBVIParameters::getScaledRadii( void ) const {
...
@@ -193,10 +192,10 @@ const RealOpenMMVector& GBVIParameters::getScaledRadii( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setScaledRadii
(
const
RealOpenMM
Vector
&
scaledRadii
){
void
GBVIParameters
::
setScaledRadii
(
const
vector
<
RealOpenMM
>
&
scaledRadii
)
{
if
(
scaledRadii
.
size
()
==
_scaledRadii
.
size
()
){
if
(
scaledRadii
.
size
()
==
_scaledRadii
.
size
())
{
for
(
unsigned
int
ii
=
0
;
ii
<
scaledRadii
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
scaledRadii
.
size
();
ii
++
)
{
_scaledRadii
[
ii
]
=
scaledRadii
[
ii
];
_scaledRadii
[
ii
]
=
scaledRadii
[
ii
];
}
}
}
else
{
}
else
{
...
@@ -218,7 +217,7 @@ void GBVIParameters::setScaledRadii( const RealOpenMMVector& scaledRadii ){
...
@@ -218,7 +217,7 @@ void GBVIParameters::setScaledRadii( const RealOpenMMVector& scaledRadii ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
const
RealOpenMM
Vector
&
GBVIParameters
::
getGammaParameters
(
void
)
const
{
const
vector
<
RealOpenMM
>
&
GBVIParameters
::
getGammaParameters
()
const
{
return
_gammaParameters
;
return
_gammaParameters
;
}
}
...
@@ -230,10 +229,10 @@ const RealOpenMMVector& GBVIParameters::getGammaParameters( void ) const {
...
@@ -230,10 +229,10 @@ const RealOpenMMVector& GBVIParameters::getGammaParameters( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setGammaParameters
(
const
RealOpenMM
Vector
&
gammas
){
void
GBVIParameters
::
setGammaParameters
(
const
vector
<
RealOpenMM
>
&
gammas
)
{
if
(
gammas
.
size
()
==
_gammaParameters
.
size
()
){
if
(
gammas
.
size
()
==
_gammaParameters
.
size
())
{
for
(
unsigned
int
ii
=
0
;
ii
<
gammas
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
gammas
.
size
();
ii
++
)
{
_gammaParameters
[
ii
]
=
gammas
[
ii
];
_gammaParameters
[
ii
]
=
gammas
[
ii
];
}
}
}
else
{
}
else
{
...
@@ -254,7 +253,7 @@ void GBVIParameters::setGammaParameters( const RealOpenMMVector& gammas ){
...
@@ -254,7 +253,7 @@ void GBVIParameters::setGammaParameters( const RealOpenMMVector& gammas ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setUseCutoff
(
RealOpenMM
distance
)
{
void
GBVIParameters
::
setUseCutoff
(
RealOpenMM
distance
)
{
_cutoff
=
true
;
_cutoff
=
true
;
_cutoffDistance
=
distance
;
_cutoffDistance
=
distance
;
...
@@ -330,7 +329,7 @@ const OpenMM::RealVec* GBVIParameters::getPeriodicBox() {
...
@@ -330,7 +329,7 @@ const OpenMM::RealVec* GBVIParameters::getPeriodicBox() {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getTau
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getTau
()
const
{
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
...
@@ -340,7 +339,7 @@ RealOpenMM GBVIParameters::getTau( void ) const {
...
@@ -340,7 +339,7 @@ RealOpenMM GBVIParameters::getTau( void ) const {
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
RealOpenMM
tau
;
RealOpenMM
tau
;
if
(
getSoluteDielectric
()
!=
zero
&&
getSolventDielectric
()
!=
zero
){
if
(
getSoluteDielectric
()
!=
zero
&&
getSolventDielectric
()
!=
zero
)
{
tau
=
(
one
/
getSoluteDielectric
())
-
(
one
/
getSolventDielectric
());
tau
=
(
one
/
getSoluteDielectric
())
-
(
one
/
getSolventDielectric
());
}
else
{
}
else
{
tau
=
zero
;
tau
=
zero
;
...
@@ -357,7 +356,7 @@ RealOpenMM GBVIParameters::getTau( void ) const {
...
@@ -357,7 +356,7 @@ RealOpenMM GBVIParameters::getTau( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
int
GBVIParameters
::
getBornRadiusScalingMethod
(
void
)
const
{
int
GBVIParameters
::
getBornRadiusScalingMethod
()
const
{
return
_bornRadiusScalingMethod
;
return
_bornRadiusScalingMethod
;
}
}
...
@@ -369,7 +368,7 @@ int GBVIParameters::getBornRadiusScalingMethod( void ) const {
...
@@ -369,7 +368,7 @@ int GBVIParameters::getBornRadiusScalingMethod( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setBornRadiusScalingMethod
(
int
bornRadiusScalingMethod
){
void
GBVIParameters
::
setBornRadiusScalingMethod
(
int
bornRadiusScalingMethod
)
{
_bornRadiusScalingMethod
=
bornRadiusScalingMethod
;
_bornRadiusScalingMethod
=
bornRadiusScalingMethod
;
}
}
...
@@ -381,7 +380,7 @@ void GBVIParameters::setBornRadiusScalingMethod( int bornRadiusScalingMethod ){
...
@@ -381,7 +380,7 @@ void GBVIParameters::setBornRadiusScalingMethod( int bornRadiusScalingMethod ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getQuinticLowerLimitFactor
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getQuinticLowerLimitFactor
()
const
{
return
_quinticLowerLimitFactor
;
return
_quinticLowerLimitFactor
;
}
}
...
@@ -393,7 +392,7 @@ RealOpenMM GBVIParameters::getQuinticLowerLimitFactor( void ) const {
...
@@ -393,7 +392,7 @@ RealOpenMM GBVIParameters::getQuinticLowerLimitFactor( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setQuinticLowerLimitFactor
(
RealOpenMM
quinticLowerLimitFactor
){
void
GBVIParameters
::
setQuinticLowerLimitFactor
(
RealOpenMM
quinticLowerLimitFactor
)
{
_quinticLowerLimitFactor
=
quinticLowerLimitFactor
;
_quinticLowerLimitFactor
=
quinticLowerLimitFactor
;
}
}
...
@@ -405,7 +404,7 @@ void GBVIParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFac
...
@@ -405,7 +404,7 @@ void GBVIParameters::setQuinticLowerLimitFactor( RealOpenMM quinticLowerLimitFac
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
GBVIParameters
::
getQuinticUpperBornRadiusLimit
(
void
)
const
{
RealOpenMM
GBVIParameters
::
getQuinticUpperBornRadiusLimit
()
const
{
return
_quinticUpperBornRadiusLimit
;
return
_quinticUpperBornRadiusLimit
;
}
}
...
@@ -417,6 +416,6 @@ RealOpenMM GBVIParameters::getQuinticUpperBornRadiusLimit( void ) const {
...
@@ -417,6 +416,6 @@ RealOpenMM GBVIParameters::getQuinticUpperBornRadiusLimit( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
GBVIParameters
::
setQuinticUpperBornRadiusLimit
(
RealOpenMM
quinticUpperBornRadiusLimit
){
void
GBVIParameters
::
setQuinticUpperBornRadiusLimit
(
RealOpenMM
quinticUpperBornRadiusLimit
)
{
_quinticUpperBornRadiusLimit
=
quinticUpperBornRadiusLimit
;
_quinticUpperBornRadiusLimit
=
quinticUpperBornRadiusLimit
;
}
}
platforms/reference/src/
gbsa
/ObcParameters.cpp
→
platforms/reference/src/
SimTKReference
/ObcParameters.cpp
View file @
162d69a2
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
#include "ObcParameters.h"
#include "ObcParameters.h"
#include "SimTKOpenMMCommon.h"
using
std
::
vector
;
using
std
::
vector
;
using
namespace
OpenMM
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -41,21 +41,21 @@ using std::vector;
...
@@ -41,21 +41,21 @@ using std::vector;
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ObcParameters
::
ObcParameters
(
int
numberOfAtoms
,
ObcParameters
::
ObcType
obcType
)
:
ObcParameters
::
ObcParameters
(
int
numberOfAtoms
,
ObcParameters
::
ObcType
obcType
)
:
_numberOfAtoms
(
numberOfAtoms
),
_numberOfAtoms
(
numberOfAtoms
),
_solventDielectric
(
78.3
),
_solventDielectric
(
78.3
),
_soluteDielectric
(
1.0
),
_soluteDielectric
(
1.0
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_probeRadius
(
0.14
),
_probeRadius
(
0.14
),
_pi4Asolv
(
28.3919551
),
_pi4Asolv
(
28.3919551
),
_dielectricOffset
(
0.009
),
_dielectricOffset
(
0.009
),
_obcType
(
obcType
),
_obcType
(
obcType
),
_cutoff
(
false
),
_cutoff
(
false
),
_periodic
(
false
)
{
_periodic
(
false
)
{
_atomicRadii
.
resize
(
numberOfAtoms
);
_atomicRadii
.
resize
(
numberOfAtoms
);
_scaledRadiusFactors
.
resize
(
numberOfAtoms
);
_scaledRadiusFactors
.
resize
(
numberOfAtoms
);
setObcTypeParameters
(
obcType
);
setObcTypeParameters
(
obcType
);
}
}
...
@@ -65,7 +65,7 @@ ObcParameters::ObcParameters( int numberOfAtoms, ObcParameters::ObcType obcType
...
@@ -65,7 +65,7 @@ ObcParameters::ObcParameters( int numberOfAtoms, ObcParameters::ObcType obcType
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ObcParameters
::~
ObcParameters
(
){
ObcParameters
::~
ObcParameters
()
{
}
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -76,7 +76,7 @@ ObcParameters::~ObcParameters( ){
...
@@ -76,7 +76,7 @@ ObcParameters::~ObcParameters( ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
int
ObcParameters
::
getNumberOfAtoms
(
void
)
const
{
int
ObcParameters
::
getNumberOfAtoms
()
const
{
return
_numberOfAtoms
;
return
_numberOfAtoms
;
}
}
...
@@ -88,7 +88,7 @@ int ObcParameters::getNumberOfAtoms( void ) const {
...
@@ -88,7 +88,7 @@ int ObcParameters::getNumberOfAtoms( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ObcParameters
::
ObcType
ObcParameters
::
getObcType
(
void
)
const
{
ObcParameters
::
ObcType
ObcParameters
::
getObcType
()
const
{
return
_obcType
;
return
_obcType
;
}
}
...
@@ -100,8 +100,8 @@ ObcParameters::ObcType ObcParameters::getObcType( void ) const {
...
@@ -100,8 +100,8 @@ ObcParameters::ObcType ObcParameters::getObcType( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setObcTypeParameters
(
ObcParameters
::
ObcType
obcType
){
void
ObcParameters
::
setObcTypeParameters
(
ObcParameters
::
ObcType
obcType
)
{
if
(
obcType
==
ObcTypeI
){
if
(
obcType
==
ObcTypeI
)
{
_alphaObc
=
0.8
f
;
_alphaObc
=
0.8
f
;
_betaObc
=
0.0
f
;
_betaObc
=
0.0
f
;
_gammaObc
=
2.91
f
;
_gammaObc
=
2.91
f
;
...
@@ -121,7 +121,7 @@ void ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){
...
@@ -121,7 +121,7 @@ void ObcParameters::setObcTypeParameters( ObcParameters::ObcType obcType ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getDielectricOffset
(
void
)
const
{
RealOpenMM
ObcParameters
::
getDielectricOffset
()
const
{
return
_dielectricOffset
;
return
_dielectricOffset
;
}
}
...
@@ -133,7 +133,7 @@ RealOpenMM ObcParameters::getDielectricOffset( void ) const {
...
@@ -133,7 +133,7 @@ RealOpenMM ObcParameters::getDielectricOffset( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getAlphaObc
(
void
)
const
{
RealOpenMM
ObcParameters
::
getAlphaObc
()
const
{
return
_alphaObc
;
return
_alphaObc
;
}
}
...
@@ -145,7 +145,7 @@ RealOpenMM ObcParameters::getAlphaObc( void ) const {
...
@@ -145,7 +145,7 @@ RealOpenMM ObcParameters::getAlphaObc( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getBetaObc
(
void
)
const
{
RealOpenMM
ObcParameters
::
getBetaObc
()
const
{
return
_betaObc
;
return
_betaObc
;
}
}
...
@@ -157,7 +157,7 @@ RealOpenMM ObcParameters::getBetaObc( void ) const {
...
@@ -157,7 +157,7 @@ RealOpenMM ObcParameters::getBetaObc( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getGammaObc
(
void
)
const
{
RealOpenMM
ObcParameters
::
getGammaObc
()
const
{
return
_gammaObc
;
return
_gammaObc
;
}
}
...
@@ -169,7 +169,7 @@ RealOpenMM ObcParameters::getGammaObc( void ) const {
...
@@ -169,7 +169,7 @@ RealOpenMM ObcParameters::getGammaObc( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getSolventDielectric
(
void
)
const
{
RealOpenMM
ObcParameters
::
getSolventDielectric
()
const
{
return
_solventDielectric
;
return
_solventDielectric
;
}
}
...
@@ -181,7 +181,7 @@ RealOpenMM ObcParameters::getSolventDielectric( void ) const {
...
@@ -181,7 +181,7 @@ RealOpenMM ObcParameters::getSolventDielectric( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setSolventDielectric
(
RealOpenMM
solventDielectric
){
void
ObcParameters
::
setSolventDielectric
(
RealOpenMM
solventDielectric
)
{
_solventDielectric
=
solventDielectric
;
_solventDielectric
=
solventDielectric
;
}
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -192,7 +192,7 @@ void ObcParameters::setSolventDielectric( RealOpenMM solventDielectric ){
...
@@ -192,7 +192,7 @@ void ObcParameters::setSolventDielectric( RealOpenMM solventDielectric ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getSoluteDielectric
(
void
)
const
{
RealOpenMM
ObcParameters
::
getSoluteDielectric
()
const
{
return
_soluteDielectric
;
return
_soluteDielectric
;
}
}
...
@@ -204,7 +204,7 @@ RealOpenMM ObcParameters::getSoluteDielectric( void ) const {
...
@@ -204,7 +204,7 @@ RealOpenMM ObcParameters::getSoluteDielectric( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setSoluteDielectric
(
RealOpenMM
soluteDielectric
){
void
ObcParameters
::
setSoluteDielectric
(
RealOpenMM
soluteDielectric
)
{
_soluteDielectric
=
soluteDielectric
;
_soluteDielectric
=
soluteDielectric
;
}
}
...
@@ -216,7 +216,7 @@ void ObcParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){
...
@@ -216,7 +216,7 @@ void ObcParameters::setSoluteDielectric( RealOpenMM soluteDielectric ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getElectricConstant
(
void
)
const
{
RealOpenMM
ObcParameters
::
getElectricConstant
()
const
{
return
_electricConstant
;
return
_electricConstant
;
}
}
...
@@ -228,7 +228,7 @@ RealOpenMM ObcParameters::getElectricConstant( void ) const {
...
@@ -228,7 +228,7 @@ RealOpenMM ObcParameters::getElectricConstant( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getProbeRadius
(
void
)
const
{
RealOpenMM
ObcParameters
::
getProbeRadius
()
const
{
return
_probeRadius
;
return
_probeRadius
;
}
}
...
@@ -240,7 +240,7 @@ RealOpenMM ObcParameters::getProbeRadius( void ) const {
...
@@ -240,7 +240,7 @@ RealOpenMM ObcParameters::getProbeRadius( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setProbeRadius
(
RealOpenMM
probeRadius
){
void
ObcParameters
::
setProbeRadius
(
RealOpenMM
probeRadius
)
{
_probeRadius
=
probeRadius
;
_probeRadius
=
probeRadius
;
}
}
...
@@ -254,7 +254,7 @@ void ObcParameters::setProbeRadius( RealOpenMM probeRadius ){
...
@@ -254,7 +254,7 @@ void ObcParameters::setProbeRadius( RealOpenMM probeRadius ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
RealOpenMM
ObcParameters
::
getPi4Asolv
(
void
)
const
{
RealOpenMM
ObcParameters
::
getPi4Asolv
()
const
{
return
_pi4Asolv
;
return
_pi4Asolv
;
}
}
...
@@ -270,7 +270,7 @@ void ObcParameters::setPi4Asolv(RealOpenMM pi4Asolv) {
...
@@ -270,7 +270,7 @@ void ObcParameters::setPi4Asolv(RealOpenMM pi4Asolv) {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
const
RealOpenMM
Vector
&
ObcParameters
::
getAtomicRadii
(
void
)
const
{
const
vector
<
RealOpenMM
>
&
ObcParameters
::
getAtomicRadii
()
const
{
return
_atomicRadii
;
return
_atomicRadii
;
}
}
...
@@ -282,10 +282,10 @@ const RealOpenMMVector& ObcParameters::getAtomicRadii( void ) const {
...
@@ -282,10 +282,10 @@ const RealOpenMMVector& ObcParameters::getAtomicRadii( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setAtomicRadii
(
const
RealOpenMM
Vector
&
atomicRadii
){
void
ObcParameters
::
setAtomicRadii
(
const
vector
<
RealOpenMM
>
&
atomicRadii
)
{
if
(
atomicRadii
.
size
()
==
_atomicRadii
.
size
()
){
if
(
atomicRadii
.
size
()
==
_atomicRadii
.
size
())
{
for
(
unsigned
int
ii
=
0
;
ii
<
atomicRadii
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
atomicRadii
.
size
();
ii
++
)
{
_atomicRadii
[
ii
]
=
atomicRadii
[
ii
];
_atomicRadii
[
ii
]
=
atomicRadii
[
ii
];
}
}
}
else
{
}
else
{
...
@@ -306,7 +306,7 @@ void ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
...
@@ -306,7 +306,7 @@ void ObcParameters::setAtomicRadii( const RealOpenMMVector& atomicRadii ){
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
const
RealOpenMM
Vector
&
ObcParameters
::
getScaledRadiusFactors
(
void
)
const
{
const
vector
<
RealOpenMM
>
&
ObcParameters
::
getScaledRadiusFactors
()
const
{
return
_scaledRadiusFactors
;
return
_scaledRadiusFactors
;
}
}
...
@@ -318,10 +318,10 @@ const RealOpenMMVector& ObcParameters::getScaledRadiusFactors( void ) const {
...
@@ -318,10 +318,10 @@ const RealOpenMMVector& ObcParameters::getScaledRadiusFactors( void ) const {
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setScaledRadiusFactors
(
const
RealOpenMM
Vector
&
scaledRadiusFactors
){
void
ObcParameters
::
setScaledRadiusFactors
(
const
vector
<
RealOpenMM
>
&
scaledRadiusFactors
)
{
if
(
scaledRadiusFactors
.
size
()
==
_scaledRadiusFactors
.
size
()
){
if
(
scaledRadiusFactors
.
size
()
==
_scaledRadiusFactors
.
size
())
{
for
(
unsigned
int
ii
=
0
;
ii
<
scaledRadiusFactors
.
size
();
ii
++
){
for
(
unsigned
int
ii
=
0
;
ii
<
scaledRadiusFactors
.
size
();
ii
++
)
{
_scaledRadiusFactors
[
ii
]
=
scaledRadiusFactors
[
ii
];
_scaledRadiusFactors
[
ii
]
=
scaledRadiusFactors
[
ii
];
}
}
}
else
{
}
else
{
...
@@ -342,7 +342,7 @@ void ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadius
...
@@ -342,7 +342,7 @@ void ObcParameters::setScaledRadiusFactors( const RealOpenMMVector& scaledRadius
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ObcParameters
::
setUseCutoff
(
RealOpenMM
distance
)
{
void
ObcParameters
::
setUseCutoff
(
RealOpenMM
distance
)
{
_cutoff
=
true
;
_cutoff
=
true
;
_cutoffDistance
=
distance
;
_cutoffDistance
=
distance
;
...
...
platforms/reference/src/SimTKReference/ReferenceAndersenThermostat.cpp
View file @
162d69a2
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "ReferenceAndersenThermostat.h"
#include "ReferenceAndersenThermostat.h"
using
std
::
vector
;
using
std
::
vector
;
using
OpenMM
::
RealVec
;
using
namespace
OpenMM
;
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -37,7 +37,7 @@ using OpenMM::RealVec;
...
@@ -37,7 +37,7 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ReferenceAndersenThermostat
::
ReferenceAndersenThermostat
(
)
{
ReferenceAndersenThermostat
::
ReferenceAndersenThermostat
()
{
}
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -46,7 +46,7 @@ using OpenMM::RealVec;
...
@@ -46,7 +46,7 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
ReferenceAndersenThermostat
::~
ReferenceAndersenThermostat
(
)
{
ReferenceAndersenThermostat
::~
ReferenceAndersenThermostat
()
{
}
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
...
@@ -61,8 +61,8 @@ using OpenMM::RealVec;
...
@@ -61,8 +61,8 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
--------------------------------------------------------------------------------------- */
void
ReferenceAndersenThermostat
::
applyThermostat
(
const
vector
<
vector
<
int
>
>&
atomGroups
,
vector
<
RealVec
>&
atomVelocities
,
vector
<
RealOpenMM
>&
atomMasses
,
void
ReferenceAndersenThermostat
::
applyThermostat
(
const
vector
<
vector
<
int
>
>&
atomGroups
,
vector
<
RealVec
>&
atomVelocities
,
vector
<
RealOpenMM
>&
atomMasses
,
RealOpenMM
temperature
,
RealOpenMM
collisionFrequency
,
RealOpenMM
stepSize
)
const
{
RealOpenMM
temperature
,
RealOpenMM
collisionFrequency
,
RealOpenMM
stepSize
)
const
{
const
RealOpenMM
collisionProbability
=
1.0
f
-
EXP
(
-
collisionFrequency
*
stepSize
);
const
RealOpenMM
collisionProbability
=
1.0
f
-
EXP
(
-
collisionFrequency
*
stepSize
);
for
(
int
i
=
0
;
i
<
(
int
)
atomGroups
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
(
int
)
atomGroups
.
size
();
++
i
)
{
...
...
Prev
1
2
3
4
5
6
7
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