IMP
2.0.0
The Integrative Modeling Platform
|
Apply a TripletFunction to a TripletContainer to maintain an invariant. More...
#include <IMP/container/TripletsConstraint.h>
Public Member Functions | |
TripletsConstraint (TripletModifier *before, TripletDerivativeModifier *after, TripletContainerAdaptor c, std::string name="TripletConstraint %1%") | |
Public Member Functions inherited from IMP::kernel::Constraint | |
Constraint (Model *m, std::string name="Constraint %1%") | |
virtual void | do_after_evaluate (DerivativeAccumulator *da) |
virtual void | do_before_evaluate () |
Public Member Functions inherited from IMP::kernel::ScoreState | |
ScoreState (Model *m, std::string name="ScoreState %1%") | |
void | after_evaluate (DerivativeAccumulator *accpt) |
Do post evaluation work if needed. | |
void | before_evaluate () |
Force update of the structure. | |
ContainersTemp | get_input_containers () const |
ParticlesTemp | get_input_particles () const |
ContainersTemp | get_output_containers () const |
ParticlesTemp | get_output_particles () const |
Public Member Functions inherited from IMP::kernel::ModelObject | |
ModelObject (Model *m, std::string name) | |
ModelObjectsTemp | get_inputs () const |
ModelObjectsTemps | get_interactions () const |
Model * | get_model () const |
ModelObjectsTemp | get_outputs () const |
Public Member Functions inherited from IMP::base::Object | |
virtual void | clear_caches () |
virtual IMP::base::VersionInfo | get_version_info () const =0 |
Get information about the module and version of the object. | |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
Protected Member Functions | |
virtual ModelObjectsTemp | do_get_inputs () const |
virtual ModelObjectsTemp | do_get_outputs () const |
void | do_update_attributes () |
void | do_update_derivatives (DerivativeAccumulator *da) |
Related Functions | |
(Note that these are not member functions.) | |
typedef IMP::base::Vector < IMP::base::WeakPointer < TripletsConstraint > > | TripletsConstraintsTemp |
Related Functions inherited from IMP::kernel::Constraint | |
typedef IMP::base::Vector < IMP::base::WeakPointer < Constraint > > | ConstraintsTemp |
Related Functions inherited from IMP::kernel::ScoreState | |
typedef IMP::base::Vector < IMP::base::WeakPointer < ScoreState > > | ScoreStatesTemp |
Related Functions inherited from IMP::kernel::ModelObject | |
typedef IMP::base::Vector < IMP::base::WeakPointer < ModelObject > > | ModelObjectsTemp |
Related Functions inherited from IMP::base::Object | |
typedef IMP::base::Vector < IMP::base::WeakPointer < Object > > | ObjectsTemp |
The score state is passed up to two TripletModifiers, one to apply before evaluation and the other after. The one after should take a DerivativeAccumulator as its last argument for TripletModifier::apply() and will only be called if the score was computed with derivatives.
An example showing a how to use such a score state to maintain a cover of the atoms of a protein by a sphere per residue.
## \example core/cover_particles.py ## Show how to maintain a sphere per residue which includes all atoms of the residue. The derivatives are propagated from the sphere cover to the atoms so that restraints can be used at multiple levels. import IMP import IMP.core import IMP.atom import IMP.atom m= IMP.Model() prot= IMP.atom.read_pdb(IMP.core.get_example_path('example_protein.pdb'), m) res= IMP.atom.get_by_type(prot, IMP.atom.RESIDUE_TYPE) pr= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) for r in res: # add coordinates and a radius to the residue particle IMP.core.XYZR.setup_particle(r) # make sure that the coordinates and the radius define a sphere # which contains all of the leaves (atoms) of the residue IMP.core.Cover.setup_particle(r.get_particle(), pr) # update the coordinates of the residue particles so that they cover the atoms m.update()
Definition at line 43 of file TripletsConstraint.h.
IMP::container::TripletsConstraint::TripletsConstraint | ( | TripletModifier * | before, |
TripletDerivativeModifier * | after, | ||
TripletContainerAdaptor | c, | ||
std::string | name = "TripletConstraint %1%" |
||
) |
[in] | c | The Container to hold the elements to process |
[in] | before | The TripletModifier to apply to all elements before evaluate. |
[in] | after | The TripletModifier to apply to all elements after evaluate. |
[in] | name | The object name |
Definition at line 63 of file TripletsConstraint.h.
|
protectedvirtual |
Override if this reads other objects during evaluate.
Implements IMP::kernel::ModelObject.
|
protectedvirtual |
Override if this writes other objects during evaluate.
Implements IMP::kernel::ModelObject.
|
related |
Pass a set of objects.
Definition at line 79 of file TripletsConstraint.h.