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
599a2cda
Commit
599a2cda
authored
Sep 21, 2016
by
peastman
Browse files
updateParametersInContext() causes stateChanged() to be called
parent
10b51d25
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
26 additions
and
0 deletions
+26
-0
openmmapi/include/openmm/internal/ContextImpl.h
openmmapi/include/openmm/internal/ContextImpl.h
+4
-0
openmmapi/src/CMAPTorsionForceImpl.cpp
openmmapi/src/CMAPTorsionForceImpl.cpp
+1
-0
openmmapi/src/ContextImpl.cpp
openmmapi/src/ContextImpl.cpp
+4
-0
openmmapi/src/CustomAngleForceImpl.cpp
openmmapi/src/CustomAngleForceImpl.cpp
+1
-0
openmmapi/src/CustomBondForceImpl.cpp
openmmapi/src/CustomBondForceImpl.cpp
+1
-0
openmmapi/src/CustomCentroidBondForceImpl.cpp
openmmapi/src/CustomCentroidBondForceImpl.cpp
+1
-0
openmmapi/src/CustomCompoundBondForceImpl.cpp
openmmapi/src/CustomCompoundBondForceImpl.cpp
+1
-0
openmmapi/src/CustomExternalForceImpl.cpp
openmmapi/src/CustomExternalForceImpl.cpp
+1
-0
openmmapi/src/CustomGBForceImpl.cpp
openmmapi/src/CustomGBForceImpl.cpp
+1
-0
openmmapi/src/CustomHbondForceImpl.cpp
openmmapi/src/CustomHbondForceImpl.cpp
+1
-0
openmmapi/src/CustomManyParticleForceImpl.cpp
openmmapi/src/CustomManyParticleForceImpl.cpp
+1
-0
openmmapi/src/CustomNonbondedForceImpl.cpp
openmmapi/src/CustomNonbondedForceImpl.cpp
+1
-0
openmmapi/src/CustomTorsionForceImpl.cpp
openmmapi/src/CustomTorsionForceImpl.cpp
+1
-0
openmmapi/src/GBSAOBCForceImpl.cpp
openmmapi/src/GBSAOBCForceImpl.cpp
+1
-0
openmmapi/src/GayBerneForceImpl.cpp
openmmapi/src/GayBerneForceImpl.cpp
+1
-0
openmmapi/src/HarmonicAngleForceImpl.cpp
openmmapi/src/HarmonicAngleForceImpl.cpp
+1
-0
openmmapi/src/HarmonicBondForceImpl.cpp
openmmapi/src/HarmonicBondForceImpl.cpp
+1
-0
openmmapi/src/NonbondedForceImpl.cpp
openmmapi/src/NonbondedForceImpl.cpp
+1
-0
openmmapi/src/PeriodicTorsionForceImpl.cpp
openmmapi/src/PeriodicTorsionForceImpl.cpp
+1
-0
openmmapi/src/RBTorsionForceImpl.cpp
openmmapi/src/RBTorsionForceImpl.cpp
+1
-0
No files found.
openmmapi/include/openmm/internal/ContextImpl.h
View file @
599a2cda
...
...
@@ -252,6 +252,10 @@ public:
void
integratorDeleted
()
{
integratorIsDeleted
=
true
;
}
/**
* Notify the integrator that some aspect of the system has changed, and cached information should be discarded.
*/
void
systemChanged
();
/**
* This is the routine that actually computes the list of molecules returned by getMolecules(). Normally
* you should never call it. It is exposed here because the same logic is useful to other classes too.
...
...
openmmapi/src/CMAPTorsionForceImpl.cpp
View file @
599a2cda
...
...
@@ -158,4 +158,5 @@ void CMAPTorsionForceImpl::calcMapDerivatives(int size, const vector<double>& en
void
CMAPTorsionForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCMAPTorsionForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/ContextImpl.cpp
View file @
599a2cda
...
...
@@ -460,3 +460,7 @@ void ContextImpl::loadCheckpoint(istream& stream) {
updateStateDataKernel
.
getAs
<
UpdateStateDataKernel
>
().
loadCheckpoint
(
*
this
,
stream
);
hasSetPositions
=
true
;
}
void
ContextImpl
::
systemChanged
()
{
integrator
.
stateChanged
(
State
::
Energy
);
}
openmmapi/src/CustomAngleForceImpl.cpp
View file @
599a2cda
...
...
@@ -108,4 +108,5 @@ map<string, double> CustomAngleForceImpl::getDefaultParameters() {
void
CustomAngleForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomAngleForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomBondForceImpl.cpp
View file @
599a2cda
...
...
@@ -113,4 +113,5 @@ vector<pair<int, int> > CustomBondForceImpl::getBondedParticles() const {
void
CustomBondForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomBondForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomCentroidBondForceImpl.cpp
View file @
599a2cda
...
...
@@ -246,6 +246,7 @@ void CustomCentroidBondForceImpl::addBondsBetweenGroups(int group1, int group2,
void
CustomCentroidBondForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomCentroidBondForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
void
CustomCentroidBondForceImpl
::
computeNormalizedWeights
(
const
CustomCentroidBondForce
&
force
,
const
System
&
system
,
vector
<
vector
<
double
>
>&
weights
)
{
...
...
openmmapi/src/CustomCompoundBondForceImpl.cpp
View file @
599a2cda
...
...
@@ -208,4 +208,5 @@ ExpressionTreeNode CustomCompoundBondForceImpl::replaceFunctions(const Expressio
void
CustomCompoundBondForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomCompoundBondForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomExternalForceImpl.cpp
View file @
599a2cda
...
...
@@ -97,4 +97,5 @@ map<string, double> CustomExternalForceImpl::getDefaultParameters() {
void
CustomExternalForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomExternalForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomGBForceImpl.cpp
View file @
599a2cda
...
...
@@ -126,4 +126,5 @@ map<string, double> CustomGBForceImpl::getDefaultParameters() {
void
CustomGBForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomGBForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomHbondForceImpl.cpp
View file @
599a2cda
...
...
@@ -278,4 +278,5 @@ ExpressionTreeNode CustomHbondForceImpl::replaceFunctions(const ExpressionTreeNo
void
CustomHbondForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomHbondForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/CustomManyParticleForceImpl.cpp
View file @
599a2cda
...
...
@@ -240,6 +240,7 @@ ExpressionTreeNode CustomManyParticleForceImpl::replaceFunctions(const Expressio
void
CustomManyParticleForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomManyParticleForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
void
CustomManyParticleForceImpl
::
buildFilterArrays
(
const
CustomManyParticleForce
&
force
,
int
&
numTypes
,
vector
<
int
>&
particleTypes
,
vector
<
int
>&
orderIndex
,
vector
<
vector
<
int
>
>&
particleOrder
)
{
...
...
openmmapi/src/CustomNonbondedForceImpl.cpp
View file @
599a2cda
...
...
@@ -155,6 +155,7 @@ map<string, double> CustomNonbondedForceImpl::getDefaultParameters() {
void
CustomNonbondedForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomNonbondedForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
void
CustomNonbondedForceImpl
::
calcLongRangeCorrection
(
const
CustomNonbondedForce
&
force
,
const
Context
&
context
,
double
&
coefficient
,
vector
<
double
>&
derivatives
)
{
...
...
openmmapi/src/CustomTorsionForceImpl.cpp
View file @
599a2cda
...
...
@@ -115,4 +115,5 @@ map<string, double> CustomTorsionForceImpl::getDefaultParameters() {
void
CustomTorsionForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcCustomTorsionForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/GBSAOBCForceImpl.cpp
View file @
599a2cda
...
...
@@ -69,4 +69,5 @@ std::vector<std::string> GBSAOBCForceImpl::getKernelNames() {
void
GBSAOBCForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcGBSAOBCForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/GayBerneForceImpl.cpp
View file @
599a2cda
...
...
@@ -126,4 +126,5 @@ std::vector<std::string> GayBerneForceImpl::getKernelNames() {
void
GayBerneForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcGayBerneForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/HarmonicAngleForceImpl.cpp
View file @
599a2cda
...
...
@@ -63,4 +63,5 @@ std::vector<std::string> HarmonicAngleForceImpl::getKernelNames() {
void
HarmonicAngleForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcHarmonicAngleForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/HarmonicBondForceImpl.cpp
View file @
599a2cda
...
...
@@ -73,4 +73,5 @@ vector<pair<int, int> > HarmonicBondForceImpl::getBondedParticles() const {
void
HarmonicBondForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcHarmonicBondForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/NonbondedForceImpl.cpp
View file @
599a2cda
...
...
@@ -277,6 +277,7 @@ double NonbondedForceImpl::calcDispersionCorrection(const System& system, const
void
NonbondedForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcNonbondedForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
void
NonbondedForceImpl
::
getPMEParameters
(
double
&
alpha
,
int
&
nx
,
int
&
ny
,
int
&
nz
)
const
{
...
...
openmmapi/src/PeriodicTorsionForceImpl.cpp
View file @
599a2cda
...
...
@@ -63,4 +63,5 @@ std::vector<std::string> PeriodicTorsionForceImpl::getKernelNames() {
void
PeriodicTorsionForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcPeriodicTorsionForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
openmmapi/src/RBTorsionForceImpl.cpp
View file @
599a2cda
...
...
@@ -63,4 +63,5 @@ std::vector<std::string> RBTorsionForceImpl::getKernelNames() {
void
RBTorsionForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcRBTorsionForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
context
.
systemChanged
();
}
Prev
1
2
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