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
4d499572
Commit
4d499572
authored
Oct 04, 2011
by
Mark Friedrichs
Browse files
Cleaned up code
parent
e9505f5b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
645 additions
and
1470 deletions
+645
-1470
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
...eeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
+415
-813
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.h
...freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.h
+5
-14
plugins/freeEnergy/platforms/reference/src/gbsa/GBVISoftcoreParameters.cpp
...y/platforms/reference/src/gbsa/GBVISoftcoreParameters.cpp
+154
-552
plugins/freeEnergy/platforms/reference/src/gbsa/GBVISoftcoreParameters.h
...rgy/platforms/reference/src/gbsa/GBVISoftcoreParameters.h
+71
-91
No files found.
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
View file @
4d499572
This diff is collapsed.
Click to expand it.
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.h
View file @
4d499572
...
...
@@ -26,11 +26,10 @@
#define __CpuGBVISoftcore_H__
#include "GBVISoftcoreParameters.h"
#include "gbsa/CpuImplicitSolvent.h"
// ---------------------------------------------------------------------------------------
class
CpuGBVISoftcore
:
public
CpuImplicitSolvent
{
class
CpuGBVISoftcore
{
private:
...
...
@@ -38,14 +37,9 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
GBVISoftcoreParameters
*
_gbviParameters
;
//
arrays
containing switching function derivative
//
vector
containing switching function derivative
RealOpenMM
*
_switchDeriviative
;
// initialize data members (more than
// one constructor, so centralize intialization here)
void
_initializeGBVISoftcoreDataMembers
(
void
);
std
::
vector
<
RealOpenMM
>
_switchDeriviative
;
public:
...
...
@@ -59,7 +53,7 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
--------------------------------------------------------------------------------------- */
CpuGBVISoftcore
(
ImplicitSolvent
Parameters
*
gbviParameters
);
CpuGBVISoftcore
(
GBVISoftcore
Parameters
*
gbviParameters
);
/**---------------------------------------------------------------------------------------
...
...
@@ -98,8 +92,7 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
--------------------------------------------------------------------------------------- */
RealOpenMM
*
getSwitchDeriviative
(
void
);
RealOpenMM
*
getSwitchDeriviativeConst
(
void
)
const
;
std
::
vector
<
RealOpenMM
>&
getSwitchDeriviative
(
void
);
/**---------------------------------------------------------------------------------------
...
...
@@ -111,8 +104,6 @@ class CpuGBVISoftcore : public CpuImplicitSolvent {
--------------------------------------------------------------------------------------- */
void
computeBornRadii
(
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
RealOpenMM
>&
bornRadii
,
RealOpenMM
*
switchDeriviative
=
NULL
);
void
computeBornRadii
(
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
RealOpenMM
>&
bornRadii
);
/**---------------------------------------------------------------------------------------
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/GBVISoftcoreParameters.cpp
View file @
4d499572
This diff is collapsed.
Click to expand it.
plugins/freeEnergy/platforms/reference/src/gbsa/GBVISoftcoreParameters.h
View file @
4d499572
...
...
@@ -26,11 +26,10 @@
#define __GBVISoftcoreParameters_H__
#include "SimTKUtilities/SimTKOpenMMCommon.h"
#include "gbsa/ImplicitSolventParameters.h"
// ---------------------------------------------------------------------------------------
class
GBVISoftcoreParameters
:
public
ImplicitSolventParameters
{
class
GBVISoftcoreParameters
{
public:
...
...
@@ -42,41 +41,41 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
* No scaling method is applied.
*/
NoScaling
=
0
,
/**
* Use the method outlined in Proteins 55, 383-394 (2004), Eq. 6
*/
Tanh
=
1
,
/**
* Use quintic spline scaling function
*/
QuinticSpline
=
2
QuinticSpline
=
1
};
private:
// scaled radii
int
_ownScaledRadii
;
RealOpenMM
*
_scaledRadii
;
int
_numberOfAtoms
;
// parameters:
// scaled radii
// gamma parameters
int
_ownGammaParameters
;
RealOpenMM
*
_gammaParameters
;
// BornRadiusScaleFactors parameters
int
_ownBornRadiusScaleFactors
;
RealOpenMM
*
_bornRadiusScaleFactors
;
std
::
vector
<
RealOpenMM
>
_scaledRadii
;
std
::
vector
<
RealOpenMM
>
_atomicRadii
;
std
::
vector
<
RealOpenMM
>
_gammaParameters
;
std
::
vector
<
RealOpenMM
>
_bornRadiusScaleFactors
;
RealOpenMM
_solventDielectric
;
RealOpenMM
_soluteDielectric
;
RealOpenMM
_electricConstant
;
// cutoff and periodic boundary conditions
bool
cutoff
;
bool
periodic
;
RealOpenMM
periodicBoxSize
[
3
];
RealOpenMM
cutoffDistance
;
bool
_
cutoff
;
bool
_
periodic
;
RealOpenMM
_
periodicBoxSize
[
3
];
RealOpenMM
_
cutoffDistance
;
// Born radii switching function params
BornRadiusScalingSoftcoreMethod
_bornRadiusScalingSoftcoreMethod
;
RealOpenMM
_quinticLowerLimitFactor
;
RealOpenMM
_quinticUpperBornRadiusLimit
;
RealOpenMM
_quinticUpperSplineLimit
;
...
...
@@ -103,140 +102,133 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
/**---------------------------------------------------------------------------------------
R
et
urn scaled radii
G
et
number of atoms
@return
array
@return
number of atoms
--------------------------------------------------------------------------------------- */
const
RealOpenMM
*
getScaledRadii
(
void
)
const
;
int
getNumberOfAtoms
(
void
)
const
;
/**---------------------------------------------------------------------------------------
R
et
urn scaled radii
G
et
electric constant
@return
array
@return
electric constant
--------------------------------------------------------------------------------------- */
void
setScaledRadii
(
RealOpenMM
*
scaledRadii
);
#if RealOpenMMType == 0
void
setScaledRadii
(
float
*
scaledRadii
);
#endif
void
setScaledRadii
(
const
RealOpenMMVector
&
scaledRadii
);
RealOpenMM
getElectricConstant
(
void
)
const
;
/**---------------------------------------------------------------------------------------
Set flag indicating whether scaled radii array should be
dele
ted
Get solvent
d
i
ele
ctric
@param ownScaledRadiusFactors flag indicating whether scaled radii
array should be deleted
@return solvent dielectric
--------------------------------------------------------------------------------------- */
void
setOwnScaledRadii
(
int
ownScaledRadii
)
;
RealOpenMM
getSolventDielectric
(
void
)
const
;
/**---------------------------------------------------------------------------------------
G
et
AtomicRadii array w/ dielectric offset applied
S
et
solvent dielectric
@
return array of atom volumes
@
param solventDielectric solvent dielectric
--------------------------------------------------------------------------------------- */
RealOpenMM
*
getAtomicRadii
(
void
)
const
;
void
setSolventDielectric
(
RealOpenMM
solventDielectric
)
;
/**---------------------------------------------------------------------------------------
S
et
AtomicRadii array
G
et
solute dielectric
@
param atomicRadii array of atomic radii
@
return soluteDielectric
--------------------------------------------------------------------------------------- */
void
setAtomicRadii
(
RealOpenMM
*
atomicRadii
)
;
RealOpenMM
getSoluteDielectric
(
void
)
const
;
/**---------------------------------------------------------------------------------------
Set
AtomicRadii array
Set
solute dielectric
@param
atomicRadii vector of atomic radii
@param
soluteDielectric solute dielectric
--------------------------------------------------------------------------------------- */
void
set
AtomicRadii
(
const
RealOpenMMVector
&
atomicRadii
);
void
set
SoluteDielectric
(
RealOpenMM
soluteDielectric
);
/**---------------------------------------------------------------------------------------
S
et
flag indicating whether gamma parameter array should be deleted
R
et
urn scaled radii
@param ownGammaParameters flag indicating whether gamma parameter
array should be deleted
@return array
--------------------------------------------------------------------------------------- */
void
setOwnGammaParameters
(
int
ownGammaParameters
)
;
const
std
::
vector
<
RealOpenMM
>&
getScaledRadii
(
void
)
const
;
/**---------------------------------------------------------------------------------------
G
et
GammaParameters array
S
et
scaled radii
@
return array of gamma values
@
param vector of scaled radii
--------------------------------------------------------------------------------------- */
RealOpenMM
*
getGammaParameters
(
void
)
const
;
void
setScaledRadii
(
const
std
::
vector
<
RealOpenMM
>&
radii
)
;
/**---------------------------------------------------------------------------------------
S
et
GammaParameters array
G
et
AtomicRadii array w/ dielectric offset applied
@
param gammaParameters array of gamma parameter
s
@
return array of atom volume
s
--------------------------------------------------------------------------------------- */
void
setGammaParameters
(
RealOpenMM
*
gammaParameters
)
;
const
std
::
vector
<
RealOpenMM
>&
getAtomicRadii
(
void
)
const
;
/**---------------------------------------------------------------------------------------
Set
GammaParameters
array
Set
AtomicRadii
array
@param
gammaParameters array of gamma parameters
@param
atomicRadii vector of atomic radii
--------------------------------------------------------------------------------------- */
void
set
GammaParameters
(
const
RealOpenMMVector
&
gammaParameters
);
void
set
AtomicRadii
(
const
RealOpenMMVector
&
atomicRadii
);
/**---------------------------------------------------------------------------------------
S
et
flag indicating whether bornRadiusScaleFactor p
arameter array
should be deleted
G
et
GammaP
arameter
s
array
@param ownBornRadiusScaleFactors flag indicating whether bornRadiusScaleFactor parameter
array should be deleted
@return array of gamma values
--------------------------------------------------------------------------------------- */
void
setOwnBornRadiusScaleFactors
(
int
ownBornRadiusScaleFactors
)
;
const
std
::
vector
<
RealOpenMM
>&
getGammaParameters
(
void
)
const
;
/**---------------------------------------------------------------------------------------
G
et
BornRadiusScaleFacto
rs array
S
et
GammaParamete
rs array
@
return array of bornRadiusScaleFactor value
s
@
param gammaParameters array of gamma parameter
s
--------------------------------------------------------------------------------------- */
RealOpenMM
*
getBornRadiusScaleFactors
(
void
)
const
;
void
setGammaParameters
(
const
RealOpenMMVector
&
gammaParameters
)
;
/**---------------------------------------------------------------------------------------
S
et BornRadiusScaleFactors array
G
et BornRadiusScaleFactors array
@
param bornRadiusScaleFactors
array of bornRadiusScaleFactor
parameter
s
@
return
array of bornRadiusScaleFactor
value
s
--------------------------------------------------------------------------------------- */
void
setBornRadiusScaleFa
ctor
s
(
RealOpenMM
*
b
ornRadiusScaleFactors
)
;
const
std
::
ve
ctor
<
RealOpenMM
>&
getB
ornRadiusScaleFactors
(
void
)
const
;
/**---------------------------------------------------------------------------------------
...
...
@@ -248,18 +240,6 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
void
setBornRadiusScaleFactors
(
const
RealOpenMMVector
&
bornRadiusScaleFactors
);
/**---------------------------------------------------------------------------------------
Get string w/ state
@param title title (optional)
@return string
--------------------------------------------------------------------------------------- */
std
::
string
getStateString
(
const
char
*
title
)
const
;
/**---------------------------------------------------------------------------------------
Set the force to use a cutoff.
...
...
@@ -276,7 +256,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */
bool
getUseCutoff
();
bool
getUseCutoff
(
void
);
/**---------------------------------------------------------------------------------------
...
...
@@ -284,7 +264,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */
RealOpenMM
getCutoffDistance
();
RealOpenMM
getCutoffDistance
(
void
);
/**---------------------------------------------------------------------------------------
...
...
@@ -304,7 +284,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */
bool
getPeriodic
();
bool
getPeriodic
(
void
);
/**---------------------------------------------------------------------------------------
...
...
@@ -312,7 +292,7 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
--------------------------------------------------------------------------------------- */
const
RealOpenMM
*
getPeriodicBox
();
const
RealOpenMM
*
getPeriodicBox
(
void
);
/**---------------------------------------------------------------------------------------
...
...
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