"serialization/tests/TestSerializeMonteCarloBarostat.cpp" did not exist on "ff88ddadca8ed8a67946efda9550253745401fe4"
Commit 786bc04f authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #1591 from peastman/statechanged

updateParametersInContext() causes stateChanged() to be called
parents f7935fef 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.
......
......@@ -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();
}
......@@ -460,3 +460,7 @@ void ContextImpl::loadCheckpoint(istream& stream) {
updateStateDataKernel.getAs<UpdateStateDataKernel>().loadCheckpoint(*this, stream);
hasSetPositions = true;
}
void ContextImpl::systemChanged() {
integrator.stateChanged(State::Energy);
}
......@@ -108,4 +108,5 @@ map<string, double> CustomAngleForceImpl::getDefaultParameters() {
void CustomAngleForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomAngleForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -113,4 +113,5 @@ vector<pair<int, int> > CustomBondForceImpl::getBondedParticles() const {
void CustomBondForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomBondForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -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) {
......
......@@ -208,4 +208,5 @@ ExpressionTreeNode CustomCompoundBondForceImpl::replaceFunctions(const Expressio
void CustomCompoundBondForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomCompoundBondForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -97,4 +97,5 @@ map<string, double> CustomExternalForceImpl::getDefaultParameters() {
void CustomExternalForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomExternalForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -126,4 +126,5 @@ map<string, double> CustomGBForceImpl::getDefaultParameters() {
void CustomGBForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomGBForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -278,4 +278,5 @@ ExpressionTreeNode CustomHbondForceImpl::replaceFunctions(const ExpressionTreeNo
void CustomHbondForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomHbondForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -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) {
......
......@@ -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) {
......
......@@ -115,4 +115,5 @@ map<string, double> CustomTorsionForceImpl::getDefaultParameters() {
void CustomTorsionForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcCustomTorsionForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -69,4 +69,5 @@ std::vector<std::string> GBSAOBCForceImpl::getKernelNames() {
void GBSAOBCForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcGBSAOBCForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -126,4 +126,5 @@ std::vector<std::string> GayBerneForceImpl::getKernelNames() {
void GayBerneForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcGayBerneForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -63,4 +63,5 @@ std::vector<std::string> HarmonicAngleForceImpl::getKernelNames() {
void HarmonicAngleForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcHarmonicAngleForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -73,4 +73,5 @@ vector<pair<int, int> > HarmonicBondForceImpl::getBondedParticles() const {
void HarmonicBondForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcHarmonicBondForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -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 {
......
......@@ -63,4 +63,5 @@ std::vector<std::string> PeriodicTorsionForceImpl::getKernelNames() {
void PeriodicTorsionForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcPeriodicTorsionForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
......@@ -63,4 +63,5 @@ std::vector<std::string> RBTorsionForceImpl::getKernelNames() {
void RBTorsionForceImpl::updateParametersInContext(ContextImpl& context) {
kernel.getAs<CalcRBTorsionForceKernel>().copyParametersToContext(context, owner);
context.systemChanged();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment