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
a587c652
"vscode:/vscode.git/clone" did not exist on "eeaf98b0b164e7213596be7afcb848f4d5306080"
Commit
a587c652
authored
Oct 05, 2011
by
Mark Friedrichs
Browse files
Minor mods
parent
7f561d68
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
40 deletions
+33
-40
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
...eeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
+1
-8
plugins/freeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.cpp
...reeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.cpp
+14
-9
plugins/freeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.h
.../freeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.h
+1
-13
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
...gy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
+11
-4
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.h
...ergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.h
+6
-6
No files found.
plugins/freeEnergy/platforms/reference/src/gbsa/CpuGBVISoftcore.cpp
View file @
a587c652
...
...
@@ -42,11 +42,7 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
CpuGBVISoftcore
::
CpuGBVISoftcore
(
GBVISoftcoreParameters
*
gbviParameters
){
// ---------------------------------------------------------------------------------------
_gbviParameters
=
gbviParameters
;
CpuGBVISoftcore
::
CpuGBVISoftcore
(
GBVISoftcoreParameters
*
gbviParameters
)
:
_gbviParameters
(
gbviParameters
)
{
_switchDeriviative
.
resize
(
_gbviParameters
->
getNumberOfAtoms
());
}
...
...
@@ -69,9 +65,6 @@ CpuGBVISoftcore::~CpuGBVISoftcore( ){
--------------------------------------------------------------------------------------- */
GBVISoftcoreParameters
*
CpuGBVISoftcore
::
getGBVISoftcoreParameters
(
void
)
const
{
// ---------------------------------------------------------------------------------------
return
_gbviParameters
;
}
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.cpp
View file @
a587c652
...
...
@@ -44,10 +44,12 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */
CpuObcSoftcore
::
CpuObcSoftcore
(
ObcSoftcoreParameters
*
obcSoftcoreParameters
){
_obcSoftcoreParameters
=
obcSoftcoreParameters
;
_includeAceApproximation
=
1
;
CpuObcSoftcore
::
CpuObcSoftcore
(
ObcSoftcoreParameters
*
obcSoftcoreParameters
)
:
_obcSoftcoreParameters
(
obcSoftcoreParameters
),
_includeAceApproximation
(
1
)
{
_obcChain
.
resize
(
_obcSoftcoreParameters
->
getNumberOfAtoms
());
}
/**---------------------------------------------------------------------------------------
...
...
@@ -132,7 +134,7 @@ void CpuObcSoftcore::setIncludeAceApproximation( int includeAceApproximation ){
--------------------------------------------------------------------------------------- */
void
CpuObcSoftcore
::
computeBornRadii
(
vector
<
RealVec
>&
atomCoordinates
,
RealOpenMMVector
&
bornRadii
){
void
CpuObcSoftcore
::
computeBornRadii
(
const
vector
<
RealVec
>&
atomCoordinates
,
RealOpenMMVector
&
bornRadii
){
// ---------------------------------------------------------------------------------------
...
...
@@ -191,6 +193,7 @@ void CpuObcSoftcore::computeBornRadii( vector<RealVec>& atomCoordinates, RealOp
RealOpenMM
rScaledRadiusJ
=
r
+
scaledRadiusJ
;
if
(
offsetRadiusI
<
rScaledRadiusJ
){
RealOpenMM
rInverse
=
one
/
r
;
RealOpenMM
l_ij
=
offsetRadiusI
>
FABS
(
r
-
scaledRadiusJ
)
?
offsetRadiusI
:
FABS
(
r
-
scaledRadiusJ
);
l_ij
=
one
/
l_ij
;
...
...
@@ -248,7 +251,8 @@ void CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSo
const
vector
<
RealOpenMM
>&
bornRadii
,
RealOpenMM
*
energy
,
vector
<
RealOpenMM
>&
forces
)
const
{
static
const
RealOpenMM
minusSix
=
-
6.0
;
static
const
RealOpenMM
zero
=
0.0
;
static
const
RealOpenMM
six
=
6.0
;
// ---------------------------------------------------------------------------------------
...
...
@@ -277,12 +281,12 @@ void CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSo
// no paper to cite.
for
(
int
atomI
=
0
;
atomI
<
numberOfAtoms
;
atomI
++
){
if
(
bornRadii
[
atomI
]
>
0.0
){
if
(
bornRadii
[
atomI
]
>
zero
){
RealOpenMM
r
=
atomicRadii
[
atomI
]
+
probeRadius
;
RealOpenMM
ratio6
=
POW
(
atomicRadii
[
atomI
]
/
bornRadii
[
atomI
],
s
tatic_cast
<
RealOpenMM
>
(
6.0
)
);
RealOpenMM
ratio6
=
POW
(
atomicRadii
[
atomI
]
/
bornRadii
[
atomI
],
s
ix
);
RealOpenMM
saTerm
=
nonPolarScaleFactors
[
atomI
]
*
surfaceAreaFactor
*
r
*
r
*
ratio6
;
*
energy
+=
saTerm
;
forces
[
atomI
]
+
=
minusS
ix
*
saTerm
/
bornRadii
[
atomI
];
forces
[
atomI
]
-
=
s
ix
*
saTerm
/
bornRadii
[
atomI
];
}
}
}
...
...
@@ -295,7 +299,7 @@ void CpuObcSoftcore::computeAceNonPolarForce( const ObcSoftcoreParameters* obcSo
@param partialCharges partial charges
@param forces forces
The array bornRadii is also updated and the obcE
nergy
@return e
nergy
--------------------------------------------------------------------------------------- */
...
...
@@ -369,6 +373,7 @@ RealOpenMM CpuObcSoftcore::computeBornEnergyForces( vector<RealVec>& atomCoordin
ReferenceForce
::
getDeltaR
(
atomCoordinates
[
atomI
],
atomCoordinates
[
atomJ
],
deltaR
);
if
(
_obcSoftcoreParameters
->
getUseCutoff
()
&&
deltaR
[
ReferenceForce
::
RIndex
]
>
_obcSoftcoreParameters
->
getCutoffDistance
())
continue
;
RealOpenMM
r2
=
deltaR
[
ReferenceForce
::
R2Index
];
RealOpenMM
deltaX
=
deltaR
[
ReferenceForce
::
XIndex
];
RealOpenMM
deltaY
=
deltaR
[
ReferenceForce
::
YIndex
];
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/CpuObcSoftcore.h
View file @
a587c652
...
...
@@ -26,7 +26,6 @@
#define __CpuObcSoftcore_H__
#include "ObcSoftcoreParameters.h"
#include "gbsa/CpuImplicitSolvent.h"
// ---------------------------------------------------------------------------------------
...
...
@@ -109,17 +108,6 @@ class CpuObcSoftcore {
void
setIncludeAceApproximation
(
int
includeAceApproximation
);
/**---------------------------------------------------------------------------------------
Get energy
@return energy
--------------------------------------------------------------------------------------- */
RealOpenMM
getEnergy
(
void
)
const
;
/**---------------------------------------------------------------------------------------
Return OBC chain derivative: size = _implicitSolventParameters->getNumberOfAtoms()
...
...
@@ -142,7 +130,7 @@ class CpuObcSoftcore {
--------------------------------------------------------------------------------------- */
void
computeBornRadii
(
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
RealOpenMMVector
&
bornRadii
);
void
computeBornRadii
(
const
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
RealOpenMMVector
&
bornRadii
);
/**---------------------------------------------------------------------------------------
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.cpp
View file @
a587c652
...
...
@@ -41,10 +41,16 @@
ObcSoftcoreParameters
::
ObcSoftcoreParameters
(
int
numberOfAtoms
,
ObcSoftcoreParameters
::
ObcType
obcType
)
:
_numberOfAtoms
(
numberOfAtoms
),
_obcType
(
obcType
),
_dielectricOffset
(
0.009
),
_nonPolarPreFactor
(
2.25936
),
_soluteDielectric
(
1.0
),
_solventDielectric
(
78.3
),
_probeRadius
(
0.14
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_pi4Asolv
(
28.3919551
),
_cutoff
(
false
),
_periodic
(
false
)
{
_obcType
(
obcType
),
_dielectricOffset
(
0.009
),
_nonPolarPreFactor
(
2.25936
),
_soluteDielectric
(
1.0
),
_solventDielectric
(
78.3
),
_probeRadius
(
0.14
),
_electricConstant
(
-
0.5
*
ONE_4PI_EPS0
),
_pi4Asolv
(
28.3919551
),
_cutoff
(
false
),
_periodic
(
false
)
{
_atomicRadii
.
resize
(
numberOfAtoms
);
_scaledRadiusFactors
.
resize
(
numberOfAtoms
);
...
...
@@ -156,6 +162,7 @@ RealOpenMM ObcSoftcoreParameters::getBetaObc( void ) const {
RealOpenMM
ObcSoftcoreParameters
::
getGammaObc
(
void
)
const
{
return
_gammaObc
;
}
/**---------------------------------------------------------------------------------------
Get solvent dielectric
...
...
plugins/freeEnergy/platforms/reference/src/gbsa/ObcSoftcoreParameters.h
View file @
a587c652
...
...
@@ -77,7 +77,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
ObcSoftcoreParameters constructor
(Simbios)
ObcSoftcoreParameters constructor
@param numberOfAtoms number of atoms
...
...
@@ -87,7 +87,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
ObcSoftcoreParameters destructor
(Simbios)
ObcSoftcoreParameters destructor
--------------------------------------------------------------------------------------- */
...
...
@@ -115,7 +115,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
Get probe radius
(Simbios)
Get probe radius
@return probeRadius
...
...
@@ -125,7 +125,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
Set probe radius
(Simbios)
Set probe radius
@param probeRadius probe radius
...
...
@@ -136,7 +136,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
Get pi4Asolv: used in ACE approximation for nonpolar term
((RealOpenMM) M_PI)*4.0f*0.0049f*1000.0f;
(Simbios)
((RealOpenMM) M_PI)*4.0f*0.0049f*1000.0f;
@return pi4Asolv
...
...
@@ -236,7 +236,7 @@ class ObcSoftcoreParameters {
/**---------------------------------------------------------------------------------------
Get solvent dielectric
(Simbios)
Get solvent dielectric
@return dielectricOffset dielectric offset
...
...
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