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
f2e0735f
Commit
f2e0735f
authored
Nov 21, 2012
by
Peter Eastman
Browse files
Added updateParametersInContext() methods to most AMOEBA forces.
parent
e6696626
Changes
65
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
182 additions
and
3 deletions
+182
-3
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
+12
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
...oeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
.../amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
...moeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
+10
-0
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
+71
-3
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
.../openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
...a/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
...lude/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
...api/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
...nmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
...i/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
...nmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
...mapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
+1
-0
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
...ba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
+1
-0
No files found.
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
View file @
f2e0735f
...
...
@@ -155,6 +155,16 @@ public:
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
length
,
double
quadraticK
);
/**
* Update the per-angle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-angle parameters. The set of particles involved
* in an angle cannot be changed, nor can new angles be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
f2e0735f
...
...
@@ -127,6 +127,16 @@ public:
* @param k the quadratic force constant for the bond
*/
void
setBondParameters
(
int
index
,
int
particle1
,
int
particle2
,
double
length
,
double
quadraticK
);
/**
* Update the per-bond parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setBondParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-bond parameters. The set of particles involved
* in a bond cannot be changed, nor can new bonds be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
double
_globalQuarticK
,
_globalCubicK
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
f2e0735f
...
...
@@ -152,6 +152,16 @@ public:
* Set the surface area factor kJ/(nm*nm) used in SASA contribution
*/
void
setSurfaceAreaFactor
(
double
surfaceAreaFactor
);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-particle parameters. All other aspects of the Force
* (the probe radius, the surface area factor, etc.) are unaffected and can only be changed by reinitializing the Context.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
View file @
f2e0735f
...
...
@@ -160,6 +160,16 @@ public:
* @param quadratic k the quadratic force constant for the angle, measured in kJ/mol/radian^2
*/
void
setAngleParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
length
,
double
quadraticK
);
/**
* Update the per-angle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setAngleParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-angle parameters. The set of particles involved
* in an angle cannot be changed, nor can new angles be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
View file @
f2e0735f
...
...
@@ -328,6 +328,18 @@ public:
quadrupole_zx, quadrupole_zy, quadrupole_zz)
*/
void
getSystemMultipoleMoments
(
Context
&
context
,
std
::
vector
<
double
>&
outputMultipoleMoments
);
/**
* Update the multipole parameters in a Context to match those stored in this Force object. This method
* provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setMultipoleParameters() to modify this object's parameters, then call updateParametersInState() to
* copy them over to the Context.
*
* This method has several limitations. The only information it updates is the parameters of multipoles.
* All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be
* changed by reinitializing the Context. Furthermore, this method cannot be used to add new multipoles,
* only to change the parameters of existing ones.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
View file @
f2e0735f
...
...
@@ -152,6 +152,16 @@ public:
* @param k the force constant for the out-of-plane bend
*/
void
setOutOfPlaneBendParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
double
k
);
/**
* Update the per-bend term parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setOutOfPlaneBendParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-bend term parameters. The set of particles involved
* in a term cannot be changed, nor can new terms be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
View file @
f2e0735f
...
...
@@ -102,6 +102,16 @@ public:
* @param k the force constant for the torsion
*/
void
setPiTorsionParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
int
particle4
,
int
particle5
,
int
particle6
,
double
k
);
/**
* Update the per-torsion parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setPiTorsionParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-torsion parameters. The set of particles involved
* in a torsion cannot be changed, nor can new torsions be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
View file @
f2e0735f
...
...
@@ -105,6 +105,16 @@ public:
*/
void
setStretchBendParameters
(
int
index
,
int
particle1
,
int
particle2
,
int
particle3
,
double
lengthAB
,
double
lengthCB
,
double
angle
,
double
k
);
/**
* Update the per-stretch-bend term parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setStretchBendParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-stretch-bend term parameters. The set of particles involved
* in a term cannot be changed, nor can new terms be added.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
View file @
f2e0735f
...
...
@@ -201,6 +201,16 @@ public:
* Set the method used for handling long range nonbonded interactions.
*/
void
setNonbondedMethod
(
NonbondedMethod
method
);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-particle parameters. All other aspects of the Force
* (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context.
*/
void
updateParametersInContext
(
Context
&
context
);
protected:
ForceImpl
*
createImpl
();
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
View file @
f2e0735f
...
...
@@ -88,6 +88,16 @@ public:
* @return index of added particle
*/
int
addParticle
(
double
radius
,
double
epsilon
);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInState()
* to copy them over to the Context.
*
* The only information this method updates is the values of per-particle parameters. All other aspects of the Force
* are unaffected and can only be changed by reinitializing the Context.
*/
void
updateParametersInContext
(
Context
&
context
);
/*
* Constants
...
...
plugins/amoeba/openmmapi/include/openmm/amoebaKernels.h
View file @
f2e0735f
...
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008 Stanford University and the Authors.
*
* Portions copyright (c) 2008
-2012
Stanford University and the Authors. *
* Authors: *
* Contributors: *
* *
...
...
@@ -74,7 +74,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaBondForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaBondForce
&
force
)
=
0
;
};
/**
...
...
@@ -108,6 +114,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaAngleForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaAngleForce
&
force
)
=
0
;
};
/**
...
...
@@ -141,6 +154,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaInPlaneAngleForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaInPlaneAngleForce
&
force
)
=
0
;
};
/**
...
...
@@ -174,6 +194,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaPiTorsionForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaPiTorsionForce
&
force
)
=
0
;
};
/**
...
...
@@ -207,6 +234,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaStretchBendForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaStretchBendForce
&
force
)
=
0
;
};
/**
...
...
@@ -240,6 +274,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaOutOfPlaneBendForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaOutOfPlaneBendForce
&
force
)
=
0
;
};
/**
...
...
@@ -311,7 +352,13 @@ public:
std
::
vector
<
double
>&
outputElectrostaticPotential
)
=
0
;
virtual
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMonents
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaMultipoleForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaMultipoleForce
&
force
)
=
0
;
};
/**
...
...
@@ -345,6 +392,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaGeneralizedKirkwoodForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaGeneralizedKirkwoodForce
&
force
)
=
0
;
};
...
...
@@ -378,6 +432,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaVdwForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaVdwForce
&
force
)
=
0
;
};
/**
...
...
@@ -411,6 +472,13 @@ public:
* @return the potential energy due to the force
*/
virtual
double
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
=
0
;
/**
* Copy changed parameters over to a context.
*
* @param context the context to copy parameters to
* @param force the AmoebaWcaDispersionForce to copy the parameters from
*/
virtual
void
copyParametersToContext
(
ContextImpl
&
context
,
const
AmoebaWcaDispersionForce
&
force
)
=
0
;
};
}
// namespace OpenMM
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaAngleForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaAngleForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaBondForceImpl.h
View file @
f2e0735f
...
...
@@ -64,6 +64,7 @@ public:
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
pair
<
int
,
int
>
>
getBondedParticles
()
const
;
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaBondForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaGeneralizedKirkwoodForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
Kernel
&
getKernel
()
{
return
kernel
;
}
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaGeneralizedKirkwoodForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaInPlaneAngleForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaInPlaneAngleForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaMultipoleForceImpl.h
View file @
f2e0735f
...
...
@@ -86,6 +86,7 @@ public:
std
::
vector
<
double
>&
outputElectrostaticPotential
);
void
getSystemMultipoleMoments
(
ContextImpl
&
context
,
std
::
vector
<
double
>&
outputMultipoleMonents
);
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaOutOfPlaneBendForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaOutOfPlaneBendForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaPiTorsionForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaPiTorsionForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaStretchBendForceImpl.h
View file @
f2e0735f
...
...
@@ -61,6 +61,7 @@ public:
return
std
::
map
<
std
::
string
,
double
>
();
// This force field doesn't define any parameters.
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaStretchBendForce
&
owner
;
Kernel
kernel
;
...
...
plugins/amoeba/openmmapi/include/openmm/internal/AmoebaVdwForceImpl.h
View file @
f2e0735f
...
...
@@ -68,6 +68,7 @@ public:
* long range dispersion correction to the energy.
*/
static
double
calcDispersionCorrection
(
const
System
&
system
,
const
AmoebaVdwForce
&
force
);
void
updateParametersInContext
(
ContextImpl
&
context
);
private:
AmoebaVdwForce
&
owner
;
Kernel
kernel
;
...
...
Prev
1
2
3
4
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