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
454eda76
Commit
454eda76
authored
Jan 14, 2016
by
Saurabh Belsare
Browse files
Added required headers. Still need to actually implement the functions
parent
ad966d1c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
274 additions
and
269 deletions
+274
-269
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
+7
-9
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
+13
-12
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
...nmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
+4
-6
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
+25
-21
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
+7
-3
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+218
-218
No files found.
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
View file @
454eda76
...
...
@@ -316,15 +316,6 @@ public:
* This can be overridden by explicitly setting an alpha parameter and grid dimensions to use.
*/
void
setEwaldErrorTolerance
(
double
tol
);
/**
* Get the induced dipole moments of all particles.
*
* @param context the Context for which to get the induced dipoles
* @param[out] dipoles the induced dipole moment of particle i is stored into the i'th element
*/
void
getInducedDipoles
(
Context
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
/**
* Get the fixed dipole moments of all particles in the global reference frame.
*
...
...
@@ -332,6 +323,13 @@ public:
* @param[out] dipoles the fixed dipole moment of particle i is stored into the i'th element
*/
void
getLabFramePermanentDipoles
(
Context
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
/**
* Get the induced dipole moments of all particles.
*
* @param context the Context for which to get the induced dipoles
* @param[out] dipoles the induced dipole moment of particle i is stored into the i'th element
*/
void
getInducedDipoles
(
Context
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
/**
* Get the electrostatic potential.
...
...
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
View file @
454eda76
...
...
@@ -59,7 +59,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the AmoebaBondForce this kernel will be used for
*/
...
...
@@ -99,7 +99,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the AmoebaAngleForce this kernel will be used for
*/
...
...
@@ -139,7 +139,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the AmoebaInPlaneAngleForce this kernel will be used for
*/
...
...
@@ -179,7 +179,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the PiTorsionForce this kernel will be used for
*/
...
...
@@ -219,7 +219,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the StretchBendForce this kernel will be used for
*/
...
...
@@ -259,7 +259,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the OutOfPlaneBendForce this kernel will be used for
*/
...
...
@@ -299,7 +299,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the TorsionTorsionForce this kernel will be used for
*/
...
...
@@ -332,7 +332,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the MultipoleForce this kernel will be used for
*/
...
...
@@ -348,6 +348,7 @@ public:
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
virtual
void
getLabFramePermanentDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
)
=
0
;
virtual
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
)
=
0
;
virtual
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
...
...
@@ -364,7 +365,7 @@ public:
/**
* Get the parameters being used for PME.
*
*
* @param alpha the separation parameter
* @param nx the number of grid points along the X axis
* @param ny the number of grid points along the Y axis
...
...
@@ -389,7 +390,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the GBSAOBCForce this kernel will be used for
*/
...
...
@@ -429,7 +430,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the GBSAOBCForce this kernel will be used for
*/
...
...
@@ -469,7 +470,7 @@ public:
/**
* Initialize the kernel.
*
*
* @param system the System this kernel will be applied to
* @param force the GBSAOBCForce this kernel will be used for
*/
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
View file @
454eda76
...
...
@@ -64,7 +64,7 @@ public:
/**
* Get the CovalentMap for an atom
*
*
* @param force AmoebaMultipoleForce force reference
* @param index the index of the atom for which to set parameters
* @param minCovalentIndex minimum covalent index
...
...
@@ -76,15 +76,13 @@ public:
/**
* Get the covalent degree for the CovalentEnd lists
*
*
* @param force AmoebaMultipoleForce force reference
* @param covalentDegree covalent degrees for the CovalentEnd lists
*/
static
void
getCovalentDegree
(
const
AmoebaMultipoleForce
&
force
,
std
::
vector
<
int
>&
covalentDegree
);
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getLabFramePermanentDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getInducedDipoles
(
ContextImpl
&
context
,
std
::
vector
<
Vec3
>&
dipoles
);
void
getElectrostaticPotential
(
ContextImpl
&
context
,
const
std
::
vector
<
Vec3
>&
inputGrid
,
std
::
vector
<
double
>&
outputElectrostaticPotential
);
...
...
@@ -92,7 +90,7 @@ public:
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
void
updateParametersInContext
(
ContextImpl
&
context
);
void
getPMEParameters
(
double
&
alpha
,
int
&
nx
,
int
&
ny
,
int
&
nz
)
const
;
private:
const
AmoebaMultipoleForce
&
owner
;
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForce.cpp
View file @
454eda76
...
...
@@ -69,19 +69,19 @@ void AmoebaMultipoleForce::setCutoffDistance(double distance) {
cutoffDistance
=
distance
;
}
double
AmoebaMultipoleForce
::
getAEwald
()
const
{
return
aewald
;
}
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
aewald
=
inputAewald
;
}
int
AmoebaMultipoleForce
::
getPmeBSplineOrder
()
const
{
return
pmeBSplineOrder
;
}
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
double
AmoebaMultipoleForce
::
getAEwald
()
const
{
return
aewald
;
}
void
AmoebaMultipoleForce
::
setAEwald
(
double
inputAewald
)
{
aewald
=
inputAewald
;
}
int
AmoebaMultipoleForce
::
getPmeBSplineOrder
()
const
{
return
pmeBSplineOrder
;
}
void
AmoebaMultipoleForce
::
getPmeGridDimensions
(
std
::
vector
<
int
>&
gridDimension
)
const
{
if
(
gridDimension
.
size
()
<
3
)
{
gridDimension
.
resize
(
3
);
}
...
...
@@ -93,15 +93,15 @@ void AmoebaMultipoleForce::getPmeGridDimensions(std::vector<int>& gridDimension)
gridDimension
[
0
]
=
gridDimension
[
1
]
=
gridDimension
[
2
]
=
0
;
}
return
;
}
}
void
AmoebaMultipoleForce
::
setPmeGridDimensions
(
const
std
::
vector
<
int
>&
gridDimension
)
{
pmeGridDimension
.
resize
(
3
);
pmeGridDimension
[
0
]
=
gridDimension
[
0
];
pmeGridDimension
[
1
]
=
gridDimension
[
1
];
pmeGridDimension
[
2
]
=
gridDimension
[
2
];
return
;
}
}
void
AmoebaMultipoleForce
::
getPMEParametersInContext
(
const
Context
&
context
,
double
&
alpha
,
int
&
nx
,
int
&
ny
,
int
&
nz
)
const
{
dynamic_cast
<
const
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getPMEParameters
(
alpha
,
nx
,
ny
,
nz
);
...
...
@@ -131,13 +131,13 @@ void AmoebaMultipoleForce::setEwaldErrorTolerance(double tol) {
ewaldErrorTol
=
tol
;
}
int
AmoebaMultipoleForce
::
addMultipole
(
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
AmoebaMultipoleForce
::
addMultipole
(
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
multipoleAtomZ
,
int
multipoleAtomX
,
int
multipoleAtomY
,
double
thole
,
double
dampingFactor
,
double
polarity
)
{
multipoles
.
push_back
(
MultipoleInfo
(
charge
,
molecularDipole
,
molecularQuadrupole
,
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
));
return
multipoles
.
size
()
-
1
;
}
void
AmoebaMultipoleForce
::
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
void
AmoebaMultipoleForce
::
getMultipoleParameters
(
int
index
,
double
&
charge
,
std
::
vector
<
double
>&
molecularDipole
,
std
::
vector
<
double
>&
molecularQuadrupole
,
int
&
axisType
,
int
&
multipoleAtomZ
,
int
&
multipoleAtomX
,
int
&
multipoleAtomY
,
double
&
thole
,
double
&
dampingFactor
,
double
&
polarity
)
const
{
charge
=
multipoles
[
index
].
charge
;
...
...
@@ -167,7 +167,7 @@ void AmoebaMultipoleForce::getMultipoleParameters(int index, double& charge, std
polarity
=
multipoles
[
index
].
polarity
;
}
void
AmoebaMultipoleForce
::
setMultipoleParameters
(
int
index
,
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
void
AmoebaMultipoleForce
::
setMultipoleParameters
(
int
index
,
double
charge
,
const
std
::
vector
<
double
>&
molecularDipole
,
const
std
::
vector
<
double
>&
molecularQuadrupole
,
int
axisType
,
int
multipoleAtomZ
,
int
multipoleAtomX
,
int
multipoleAtomY
,
double
thole
,
double
dampingFactor
,
double
polarity
)
{
multipoles
[
index
].
charge
=
charge
;
...
...
@@ -230,8 +230,12 @@ void AmoebaMultipoleForce::getCovalentMaps(int index, std::vector< std::vector<i
}
}
void
AmoebaMultipoleForce
::
getInducedDipoles
(
Context
&
context
,
vector
<
Vec3
>&
dipoles
)
{
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getInducedDipoles
(
getContextImpl
(
context
),
dipoles
);
void
AmoebaMultipoleForce
::
getLabFramePermanentDipoles
(
Context
&
context
,
vector
<
Vec3
>&
dipoles
)
{
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getLabFramePermanentDipoles
(
getContextImpl
(
context
),
dipoles
);
}
void
AmoebaMultipoleForce
::
getLabFramePermanentDipoles
(
Context
&
context
,
vector
<
Vec3
>&
dipoles
)
{
dynamic_cast
<
AmoebaMultipoleForceImpl
&>
(
getImplInContext
(
context
)).
getLabFramePermanentDipoles
(
getContextImpl
(
context
),
dipoles
);
}
void
AmoebaMultipoleForce
::
getElectrostaticPotential
(
const
std
::
vector
<
Vec3
>&
inputGrid
,
Context
&
context
,
std
::
vector
<
double
>&
outputElectrostaticPotential
)
{
...
...
plugins/amoeba/openmmapi/src/AmoebaMultipoleForceImpl.cpp
View file @
454eda76
...
...
@@ -61,7 +61,7 @@ void AmoebaMultipoleForceImpl::initialize(ContextImpl& context) {
double
cutoff
=
owner
.
getCutoffDistance
();
if
(
cutoff
>
0.5
*
boxVectors
[
0
][
0
]
||
cutoff
>
0.5
*
boxVectors
[
1
][
1
]
||
cutoff
>
0.5
*
boxVectors
[
2
][
2
])
throw
OpenMMException
(
"AmoebaMultipoleForce: The cutoff distance cannot be greater than half the periodic box size."
);
}
}
double
quadrupoleValidationTolerance
=
1.0e-05
;
for
(
int
ii
=
0
;
ii
<
system
.
getNumParticles
();
ii
++
)
{
...
...
@@ -170,7 +170,7 @@ void AmoebaMultipoleForceImpl::getCovalentRange(const AmoebaMultipoleForce& forc
*
maxCovalentIndex
=
covalentList
[
ii
];
}
}
}
}
return
;
}
...
...
@@ -179,10 +179,14 @@ void AmoebaMultipoleForceImpl::getCovalentDegree(const AmoebaMultipoleForce& for
const
int
*
CovalentDegrees
=
AmoebaMultipoleForceImpl
::
getCovalentDegrees
();
for
(
unsigned
int
kk
=
0
;
kk
<
AmoebaMultipoleForce
::
CovalentEnd
;
kk
++
)
{
covalentDegree
[
kk
]
=
CovalentDegrees
[
kk
];
}
}
return
;
}
void
AmoebaMultipoleForceImpl
::
getLabFramePermanentDipoles
(
ContextImpl
&
context
,
vector
<
Vec3
>&
dipoles
)
{
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getLabFramePermanentDipoles
(
context
,
dipoles
);
}
void
AmoebaMultipoleForceImpl
::
getInducedDipoles
(
ContextImpl
&
context
,
vector
<
Vec3
>&
dipoles
)
{
kernel
.
getAs
<
CalcAmoebaMultipoleForceKernel
>
().
getInducedDipoles
(
context
,
dipoles
);
}
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
454eda76
This diff is collapsed.
Click to expand it.
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