Index: kernel/include/Model.h =================================================================== --- kernel/include/Model.h (revision 734) +++ kernel/include/Model.h (working copy) @@ -25,13 +25,13 @@ typedef std::vector ScoreStates; //! Class for storing model, its restraints, and particles. -/** All attribute data for particles is stored through indexing in the - model_data_ structure. - Currently no suport for constraints (e.g. rigid bodies). +/** The Model maintains a standard IMP container for each of Particle, + ScoreState and Restraint object types. \ingroup kernel */ class IMPDLLEXPORT Model: public Object { + private: friend class Restraint; unsigned int iteration_; public: @@ -47,6 +47,9 @@ //! Evaluate all of the restraints in the model and return the score. /** \param[in] calc_derivs If true, also evaluate the first derivatives. \return The score. + + All of the stored ScoreState objects are updated before the + restraints are evaluated. */ Float evaluate(bool calc_derivs); Index: kernel/include/restraints/BondDecoratorRestraint.h =================================================================== --- kernel/include/restraints/BondDecoratorRestraint.h (revision 734) +++ kernel/include/restraints/BondDecoratorRestraint.h (working copy) @@ -31,6 +31,7 @@ the bond. This can become a parameter eventually. \ingroup bond + \ingroupd restraint */ class IMPDLLEXPORT BondDecoratorRestraint : public Restraint { Index: kernel/include/Restraint.h =================================================================== --- kernel/include/Restraint.h (revision 734) +++ kernel/include/Restraint.h (working copy) @@ -36,6 +36,11 @@ and then various functions which are applied to the tuples. */ +/** \defgroup exp_restraint Experimental restraints + These are restraints which directly use various types of experimental + data. + */ + //! Abstract class for representing restraints /** Restraints should take their score function or UnaryFunction as the first argument. Restraints which act on large numbers of Index: kernel/include/DecoratorBase.h =================================================================== --- kernel/include/DecoratorBase.h (revision 734) +++ kernel/include/DecoratorBase.h (working copy) @@ -15,6 +15,50 @@ namespace IMP { +/** \defgroup decorators Decorators + +Decorators wrap particles +- maintain invariants: e.g. any the particles have all of x,y,z coordinates +- add functionality: e.g. you can get the coordinates as an IMP::Vector3D +- provide uniform names for attributes: so you don't use "x" some places +and "X" other places +- cache keys since those can be expensive to create + +\note In general, you should not access particle attributes except +through decorators + + +The general usage of the decorators is quite simple +- Create a decorator around a particle which does not have the needed +attributes. This adds the attributes. +\verbatim +d= IMP.core.MyDecorator.create(p) +\endverbatim +- Cast a particle which has the required attributes to a decorator, +checking that it has the attributes +\verbatim +d= IMP.core.MyDecorator.cast(p) +\endverbatim +- Wrap a particle which is known to have the required attributes in a +decorator. No checks are necessarily made +\verbatim +d= IMP.core.MyDecorator(p) +\endverbatim +- Access and manipulate attributes or groups of attributes through +methods like +\verbatim +x=d.get_foo() +d.set_foo(1.0) +\endverbatim +- When needed, access the keys used by the decorator through methods like +\verbatim +d.get_foo_key() +\endverbatim + + */ + + + /** A base class for decorators. Implementers of decorators should just inherit from this and then use the IMP_DECORATOR macro */ Index: kernel/include/decorators/XYZDecorator.h =================================================================== --- kernel/include/decorators/XYZDecorator.h (revision 734) +++ kernel/include/decorators/XYZDecorator.h (working copy) @@ -20,6 +20,7 @@ //! A a decorator for a particle with x,y,z coordinates. /** \ingroup helper + \ingroup decorators */ class IMPDLLEXPORT XYZDecorator: public DecoratorBase { @@ -130,6 +131,7 @@ //! Compute the distance between a pair of particles /** \ingroup helper + \relates XYZDecorator */ IMPDLLEXPORT Float distance(XYZDecorator a, XYZDecorator b); Index: kernel/include/decorators/HierarchyDecorator.h =================================================================== --- kernel/include/decorators/HierarchyDecorator.h (revision 734) +++ kernel/include/decorators/HierarchyDecorator.h (working copy) @@ -55,6 +55,7 @@ //! A visitor for traversal of a hierarchy /** This works from both C++ and Python \ingroup hierarchy + \ingroup decorators */ class IMPDLLEXPORT HierarchyVisitor { @@ -133,6 +134,7 @@ /** \param[in] d The HierarchyDecorator for the tree in question \param[in] v The visitor to be applied. This is passed by reference. \ingroup hierarchy + \relates HierarchyDecorator */ IMPDLLEXPORT void breadth_first_traversal(HierarchyDecorator d, HierarchyVisitor &v); @@ -140,6 +142,7 @@ //! Depth first traversal of the hierarchy /** See breadth_first_traversal and HierarchyVisitor for more information \ingroup hierarchy + \relates HierarchyDecorator */ IMPDLLEXPORT void depth_first_traversal(HierarchyDecorator d, HierarchyVisitor &v); @@ -168,6 +171,7 @@ the functor state. \ingroup hierarchy + \relates HierarchyDecorator */ template F breadth_first_traversal_with_data(HD d, F f, typename F::result_type i) @@ -192,6 +196,7 @@ //! Apply functor F to each particle, traversing the hierarchy depth first. /** See breadth_first_traversal for documentation. \ingroup hierarchy + \relates HierarchyDecorator */ template F depth_first_traversal_with_data(HD d, F f, typename F::result_type i) @@ -218,6 +223,7 @@ //! A simple visitor which pretty-prints the hierarchy /** The template argument NP is the decorator to use to print each node. \ingroup hierarchy + \relates HierarchyDecorator */ template struct HierarchyPrinter @@ -258,6 +264,7 @@ //! Print the hierarchy using a given decorator as to display each node /** The last argument limits how deep will be printed out. \ingroup hierarchy + \relates HierarchyDecorator */ template std::ostream &show(HierarchyDecorator h, std::ostream &out=std::cout, @@ -272,6 +279,7 @@ //! A simple functor to count the number of particles in a hierarchy. /** This is a good example of a simple HierarchyVisitor. \ingroup hierarchy + \relates HierarchyDecorator */ struct HierarchyCounter: public HierarchyVisitor { @@ -317,6 +325,7 @@ //! Gather all the Particle* in the hierarchy which meet some criteria /** \ingroup hierarchy + \relates HierarchyDecorator */ template Out hierarchy_gather(HierarchyDecorator h, F f, Out out) @@ -346,6 +355,7 @@ //! Gather all the Particle* in the hierarchy which match on an attribute /** \ingroup hierarchy + \relates HierarchyDecorator */ template Out hierarchy_gather_by_attribute(HierarchyDecorator h, K k, V v, Out out) @@ -384,6 +394,7 @@ //! Gather all the Particle* in the hierarchy which match on two attributes /** \ingroup hierarchy + \relates HierarchyDecorator */ template Out hierarchy_gather_by_attributes(HierarchyDecorator h, K0 k0, @@ -399,6 +410,7 @@ //! Find the first node which matches some criteria /** \ingroup hierarchy + \relates HierarchyDecorator */ template HD hierarchy_find(HD h, F f) @@ -426,14 +438,20 @@ //! Get all the leaves of the bit of hierarchy +/** \relates HierarchyDecorator + */ IMPDLLEXPORT Particles hierarchy_get_leaves(HierarchyDecorator mhd); //! Get the bonds internal to this tree +/** \relates HierarchyDecorator + */ IMPDLLEXPORT BondDecorators hierarchy_get_internal_bonds(HierarchyDecorator mhd); //! Get all the particles in the subtree +/** \relates HierarchyDecorator + */ IMPDLLEXPORT Particles hierarchy_get_all_descendants(HierarchyDecorator mhd); Index: kernel/include/decorators/AtomDecorator.h =================================================================== --- kernel/include/decorators/AtomDecorator.h (revision 734) +++ kernel/include/decorators/AtomDecorator.h (working copy) @@ -32,6 +32,7 @@ add_type(string) method which adds a string name and assigns it to the next unused type int available. \ingroup hierarchy + \ingroup decorators */ class IMPDLLEXPORT AtomDecorator: public XYZDecorator { Index: kernel/include/decorators/NameDecorator.h =================================================================== --- kernel/include/decorators/NameDecorator.h (revision 734) +++ kernel/include/decorators/NameDecorator.h (working copy) @@ -18,6 +18,7 @@ //! A simple decorator which controls the Particle description. /** \ingroup helper + \ingroup decorators */ class IMPDLLEXPORT NameDecorator: public DecoratorBase { Index: kernel/include/decorators/ResidueDecorator.h =================================================================== --- kernel/include/decorators/ResidueDecorator.h (revision 734) +++ kernel/include/decorators/ResidueDecorator.h (working copy) @@ -26,6 +26,7 @@ dynamically. This can be easily done in an analogous manner when we need it. \ingroup hierarchy + \ingroup decorators */ class IMPDLLEXPORT ResidueDecorator: public DecoratorBase { Index: kernel/include/decorators/MolecularHierarchyDecorator.h =================================================================== --- kernel/include/decorators/MolecularHierarchyDecorator.h (revision 734) +++ kernel/include/decorators/MolecularHierarchyDecorator.h (working copy) @@ -23,6 +23,7 @@ //! A decorator for helping deal with a hierarchy of molecules /** \ingroup hierarchy + \ingroup decorators */ class IMPDLLEXPORT MolecularHierarchyDecorator: public HierarchyDecorator { @@ -154,6 +155,7 @@ Gather all the molecular particles of a certain level in the molecular hierarchy \ingroup hierarchy + \relates MolecularHierarchyDecorator */ IMPDLLEXPORT Particles molecular_hierarchy_get_by_type(MolecularHierarchyDecorator mhd, @@ -172,6 +174,7 @@ most proteins consist of a few contiguous blocks of indices. \ingroup hierarchy + \relates MolecularHierarchyDecorator */ IMPDLLEXPORT ResidueDecorator molecular_hierarchy_get_residue(MolecularHierarchyDecorator mhd, @@ -185,6 +188,8 @@ removed). The particles become children of the frament. \throw ValueException If all the particles do not have the same parent. + + \relates MolecularHierarchyDecorator */ IMPDLLEXPORT MolecularHierarchyDecorator create_fragment(const MolecularHierarchyDecorators &ps); Index: kernel/include/decorators/bond_decorators.h =================================================================== --- kernel/include/decorators/bond_decorators.h (revision 734) +++ kernel/include/decorators/bond_decorators.h (working copy) @@ -42,7 +42,8 @@ As with AtomDecorator, the types of bonds will eventually be run-time expandible. - \ingroup bond Bonds + \ingroup bond + \ingroup decorators */ class IMPDLLEXPORT BondDecorator: public DecoratorBase { @@ -81,6 +82,7 @@ //! A decorator for a particle which has bonds. /** \ingroup bond + \ingroup decorators */ class IMPDLLEXPORT BondedDecorator: public DecoratorBase { @@ -144,6 +146,8 @@ \return BondDecorator of the bond Particle. \ingroup bond + \relates BondDecorator + \relates BondedDecorator */ IMPDLLEXPORT BondDecorator bond(BondedDecorator a, BondedDecorator b, Int t); @@ -157,6 +161,8 @@ \return BondDecorator of the bond Particle. \ingroup bond + \relates BondDecorator + \relates BondedDecorator */ IMPDLLEXPORT inline BondDecorator custom_bond(BondedDecorator a, BondedDecorator b, @@ -172,14 +178,17 @@ //! Destroy the bond connecting to particles. /** \param[in] b The bond. \ingroup bond + \relates BondDecorator + \relates BondedDecorator */ IMPDLLEXPORT void unbond(BondDecorator b); //! Get the bond between two particles. -/** - BondDecorator() is returned if the particles are not bonded. - \ingroup bond +/** BondDecorator() is returned if the particles are not bonded. + \ingroup bond + \relates BondDecorator + \relates BondedDecorator */ IMPDLLEXPORT BondDecorator get_bond(BondedDecorator a, BondedDecorator b); Index: kernel/include/Particle.h =================================================================== --- kernel/include/Particle.h (revision 734) +++ kernel/include/Particle.h (working copy) @@ -40,17 +40,46 @@ class Model; //! Class to handle individual model particles. -/** This class contains particle methods and indexes to particle attributes. +/** + A IMP::Particle is a mapping between keys and values. + + Four possible types of values: + - Float (float) + - String (std::string or Python string) + - Int (int) + - Particle (A pointer to another IMP::Particle) + + To use an attribute you first create a key + \verbatim + f= IMP.FloatKey("MyAttribute") + \endverbatim + Creating a key is expensive and should not be done often. + + Then use it to maniputate the attribute. + \verbatim + p.add_attribute(f, initial_value, whether_attribute_is_optimized) + p.set_attribute(f, new_value) + p.remove_attribute(f) + \endverbatim + + + + This class contains particle methods and indexes to particle attributes. To merely prevent a particle from moving during optimization, mark all of its attributes as being non-optimizable (set_is_optimized method). A particle may only belong to one model. + \note In general, Particles should only be used through + \ref decorators "Decorators" as these provide a nice and more reliable + interface. + \ingroup kernel */ class IMPDLLEXPORT Particle : public RefCountedObject { +private: friend class Model; /* This has to be declared here since boost 1.35 wants the full @@ -89,18 +118,23 @@ Particle(); ~Particle(); - //! The index of this particle in the model + //! The unique index of this particle in the Model containing it. ParticleIndex get_index() const { return pi_; } - //! Get pointer to model particle data. - /** \return all particle data in the model. + /** Get pointer to Model containing this particle. + \throw InvalidStateException if now Model contains this particle. */ Model* get_model() const { return model_.get(); } + /** @name Float Attributes + Float attributes can be optimized, meaning the optimizer is + allowed to change their value in order to improve the score. + */ + /*@{*/ //! Add a Float attribute to this particle. /** \param[in] name Name of the attribute being added. \param[in] value Initial value of the attribute. @@ -110,27 +144,27 @@ void add_attribute(FloatKey name, const Float value, const bool is_optimized = false); - //! Remove a Float attribute from this particle. - /** \param[in] name Name of the attribute being added. + /** Remove a Float attribute from this particle. + \param[in] name Name of the attribute being added. */ void remove_attribute(FloatKey name); - //! Does particle have a Float attribute with the given name. - /** \param[in] name Name of the attribute being checked. + /** Does particle have a Float attribute with the given name. + \param[in] name Name of the attribute being checked. \return true if Float attribute exists in this particle. */ bool has_attribute(FloatKey name) const; - //! Get the specified Float for this particle. - /** \param[in] name Name of the attribute being retrieved. + /** Get the specified Float for this particle. + \param[in] name Name of the attribute being retrieved. \exception std::out_of_range attribute does not exist. \return the value of this attribute. */ Float get_value(FloatKey name) const; - //! Set the specified Float for this particle. - /** \param[in] name Name of the attribute being set. + /** Set the specified Float for this particle. + \param[in] name Name of the attribute being set. \param[in] value Value of the attribute being set. \exception std::out_of_range attribute does not exist. */ @@ -145,113 +179,177 @@ void add_to_derivative(FloatKey name, Float value, const DerivativeAccumulator &da); - //! Set whether this float attribute is optimized + /** Set whether this float attribute is optimized.*/ void set_is_optimized(FloatKey k, bool tf); - //! Return whether this float attribute is optimized + /** Return whether this float attribute is optimized.*/ bool get_is_optimized(FloatKey k) const; - //! Get the derivative of a specified Float. - /** \param[in] name Name of the attribute being modified. + /** Get the derivative of a specified Float. + \param[in] name Name of the attribute being modified. \exception std::out_of_range attribute does not exist. */ Float get_derivative(FloatKey name) const; + //! An iterator through the keys of the float attributes of this particle + typedef FloatTable::AttributeKeyIterator + FloatKeyIterator; + //! Iterate through the keys of float attributes of the particle + FloatKeyIterator float_keys_begin() const { + return floats_.attribute_keys_begin(); + } + FloatKeyIterator float_keys_end() const { + return floats_.attribute_keys_end(); + } + + //! An iterator through the keys of the derivative attributes of this particle + typedef OptimizedTable::AttributeKeyIterator + OptimizedKeyIterator; + //! Iterate through the keys of float attributes of the particle + OptimizedKeyIterator optimized_keys_begin() const { + return optimizeds_.attribute_keys_begin(); + } + OptimizedKeyIterator optimized_keys_end() const { + return optimizeds_.attribute_keys_end(); + } + /*@}*/ + + + /** @name Int Attributes*/ + /*@{*/ //! Add an Int attribute to this particle. /** \param[in] name Name of the attribute being added. \param[in] value Initial value of the attribute. */ void add_attribute(IntKey name, const Int value); - //! Remove a Int attribute from this particle. - /** \param[in] name Name of the attribute being added. + /** Remove a Int attribute from this particle. + \param[in] name Name of the attribute being added. */ void remove_attribute(IntKey name); - //! Does particle have an Int attribute with the given name. - /** \param[in] name Name of the attribute being checked. + /** Does particle have an Int attribute with the given name. + \param[in] name Name of the attribute being checked. \return true if Int attribute exists in this particle. */ bool has_attribute(IntKey name) const; - //! Get the specified Int for this particle. - /** \param[in] name Name of the attribute being retrieved. + /** Get the specified Int for this particle. + \param[in] name Name of the attribute being retrieved. \exception std::out_of_range attribute does not exist. \return value of the attribute. */ Int get_value(IntKey name) const; - //! Set the specified Int for this particle. - /** \param[in] name Name of the attribute being set. + /** Set the specified Int for this particle. + \param[in] name Name of the attribute being set. \param[in] value Value of the attribute being set. \exception std::out_of_range attribute does not exist. */ void set_value(IntKey name, Int value); - //! Add a String attribute to this particle. - /** \param[in] name Name of the attribute being added. + //! An iterator through the keys of the int attributes of this particle + typedef IntTable::AttributeKeyIterator IntKeyIterator; + //! Iterate through the keys of int attributes of the particle + IntKeyIterator int_keys_begin() const { + return ints_.attribute_keys_begin(); + } + IntKeyIterator int_keys_end() const { + return ints_.attribute_keys_end(); + } + /*@}*/ + + + /** @name String Attributes*/ + /*@{*/ + + /** Add a String attribute to this particle. + \param[in] name Name of the attribute being added. \param[in] value Initial value of the attribute. */ void add_attribute(StringKey name, const String value); - //! Remove a String attribute from this particle. - /** \param[in] name Name of the attribute being added. + /** Remove a String attribute from this particle. + \param[in] name Name of the attribute being added. */ void remove_attribute(StringKey name); - //! Does particle have a String attribute with the given name. - /** \param[in] name Name of the attribute being checked. + /** Does particle have a String attribute with the given name. + \param[in] name Name of the attribute being checked. \return true if Int attribute exists in this particle. */ bool has_attribute(StringKey name) const; - //! Get the specified String for this particle. - /** \param[in] name Name of the attribute being retrieved. + /** Get the specified String for this particle. + \param[in] name Name of the attribute being retrieved. \exception std::out_of_range attribute does not exist. \return value of the attribute. */ String get_value(StringKey name) const; - //! Set the specified String for this particle. - /** \param[in] name Name of the attribute being set. + /** Set the specified String for this particle. + \param[in] name Name of the attribute being set. \param[in] value Value of the attribute being set. \exception std::out_of_range attribute does not exist. */ void set_value(StringKey name, String value); + //! An iterator through the keys of the string attributes of this particle + typedef StringTable::AttributeKeyIterator StringKeyIterator; + //! Iterate through the keys of string attributes of the particle + StringKeyIterator string_keys_begin() const { + return strings_.attribute_keys_begin(); + } + StringKeyIterator string_keys_end() const { + return strings_.attribute_keys_end(); + } + /*@}*/ - //! Add a Particle attribute to this particle. - /** \param[in] name Name of the attribute being added. + + /** @name Particle Attributes*/ + /*@{*/ + /** Add a Particle attribute to this particle. + \param[in] name Name of the attribute being added. \param[in] value Initial value of the attribute. */ void add_attribute(ParticleKey name, Particle* value); - //! Remove a Particle attribute from this particle. - /** \param[in] name Name of the attribute being added. + /** Remove a Particle attribute from this particle. + \param[in] name Name of the attribute being added. */ void remove_attribute(ParticleKey name); - //! Does particle have a Particle attribute with the given name. - /** \param[in] name Name of the attribute being checked. + /** Does particle have a Particle attribute with the given name. + \param[in] name Name of the attribute being checked. \return true if Particle attribute exists in this particle. */ bool has_attribute(ParticleKey name) const; - //! Get the specified Particle for this particle. - /** \param[in] name Name of the attribute being retrieved. + /** Get the specified Particle for this particle. + \param[in] name Name of the attribute being retrieved. \exception std::out_of_range attribute does not exist. \return value of the attribute. */ Particle* get_value(ParticleKey name) const; - //! Set the specified Particle for this particle. - /** \param[in] name Name of the attribute being set. + /** Set the specified Particle for this particle. + \param[in] name Name of the attribute being set. \param[in] value Value of the attribute being set. \exception std::out_of_range attribute does not exist. */ void set_value(ParticleKey name, Particle* value); + //! An iterator through the keys of the Particle attributes of this particle + typedef ParticleTable::AttributeKeyIterator ParticleKeyIterator; + //! Iterate through the keys of Particle attributes of the particle + ParticleKeyIterator particle_keys_begin() const { + return particles_.attribute_keys_begin(); + } + ParticleKeyIterator particle_keys_end() const { + return particles_.attribute_keys_end(); + } + /*@}*/ //! Set whether the particle is active. /** Restraints referencing the particle are only evaluated for 'active' @@ -280,16 +378,12 @@ */ void show(std::ostream& out = std::cout) const; - + /** @name Python accessors for the keys of all attributes + These should only be used from python. Use the iterators in C++. + \todo These should be move to the swig file and made %extends. + */ + /*@{*/ //! Return a vector containing all the FloatKeys for the Particle - /** - This is for use in python mostly. C++ users should use the iterators. - - \todo I would like to have a type-agnostic way of calling this - to be used to writing generic functions in python. The only - ways I can think of doing this are to pass dummy arguments, - which seems inelegant. - */ std::vector get_float_attributes() const { return floats_.get_keys(); } @@ -308,62 +402,9 @@ std::vector get_particle_attributes() const { return particles_.get_keys(); } + /*@}*/ - - //! An iterator through the keys of the float attributes of this particle - typedef FloatTable::AttributeKeyIterator - FloatKeyIterator; - //! Iterate through the keys of float attributes of the particle - FloatKeyIterator float_keys_begin() const { - return floats_.attribute_keys_begin(); - } - FloatKeyIterator float_keys_end() const { - return floats_.attribute_keys_end(); - } - - //! An iterator through the keys of the derivative attributes of this particle - typedef OptimizedTable::AttributeKeyIterator - OptimizedKeyIterator; - //! Iterate through the keys of float attributes of the particle - OptimizedKeyIterator optimized_keys_begin() const { - return optimizeds_.attribute_keys_begin(); - } - OptimizedKeyIterator optimized_keys_end() const { - return optimizeds_.attribute_keys_end(); - } - - - //! An iterator through the keys of the int attributes of this particle - typedef IntTable::AttributeKeyIterator IntKeyIterator; - //! Iterate through the keys of int attributes of the particle - IntKeyIterator int_keys_begin() const { - return ints_.attribute_keys_begin(); - } - IntKeyIterator int_keys_end() const { - return ints_.attribute_keys_end(); - } - - //! An iterator through the keys of the string attributes of this particle - typedef StringTable::AttributeKeyIterator StringKeyIterator; - //! Iterate through the keys of string attributes of the particle - StringKeyIterator string_keys_begin() const { - return strings_.attribute_keys_begin(); - } - StringKeyIterator string_keys_end() const { - return strings_.attribute_keys_end(); - } - - //! An iterator through the keys of the Particle attributes of this particle - typedef ParticleTable::AttributeKeyIterator ParticleKeyIterator; - //! Iterate through the keys of Particle attributes of the particle - ParticleKeyIterator particle_keys_begin() const { - return particles_.attribute_keys_begin(); - } - ParticleKeyIterator particle_keys_end() const { - return particles_.attribute_keys_end(); - } - -protected: +private: void zero_derivatives(); // Set pointer to model particle data. Index: kernel/include/ScoreState.h =================================================================== --- kernel/include/ScoreState.h (revision 734) +++ kernel/include/ScoreState.h (working copy) @@ -31,6 +31,14 @@ However, optimizers may not pick up new particles or changes to whether particular attributes are optimized or not. + The ScoreState base class has an iteration counter built in + so that a given score state will only be updated once per + Model::evaluate call, even if many other ScoreStates ask that + it be updated. To use this projection mechanism, inherit from + ScoreState and provide implementations of do_before_evaluate() + and do_after_evaluate(). Or, better yet, use the IMP_SCORESTATE + macro. + \note When logging is VERBOSE, state should print enough information in evaluate to reproduce the the entire flow of data in update. When logging is TERSE the restraint should print out only a constant number Index: kernel/include/Optimizer.h =================================================================== --- kernel/include/Optimizer.h (revision 734) +++ kernel/include/Optimizer.h (working copy) @@ -31,8 +31,12 @@ */ //! Base class for all optimizers. -/** \note There is currently no optimizer support for constraints - (e.g. rigid bodies). +/** The Optimizer maintains a list of OptimizerStates which are + updated each time the conformation is changed. + + The optimizers have one key method Optimizer::optimize which takes + the number of steps to perform. The optimizers can have other + stopping conditions as appropriate. */ class IMPDLLEXPORT Optimizer: public Object { Index: doc/internal/doxygen.conf =================================================================== --- doc/internal/doxygen.conf (revision 734) +++ doc/internal/doxygen.conf (working copy) @@ -168,7 +168,7 @@ # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. -TAB_SIZE = 8 +TAB_SIZE = 2 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". @@ -462,8 +462,11 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../../kernel/src ../../modules/domino/src \ - ../../modules/em/src ../../build/include +INPUT = ../../kernel/src \ + ../../modules/domino/src \ + ../../modules/em/src \ + ../../build/include \ + ../../doc/internal # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default Index: modules/em/include/EMFitRestraint.h =================================================================== --- modules/em/include/EMFitRestraint.h (revision 734) +++ modules/em/include/EMFitRestraint.h (working copy) @@ -19,6 +19,9 @@ { //! Calculate score based on fit to EM map +/** \ingroup exp_restraint + + */ class IMPEMEXPORT EMFitRestraint : public Restraint { public: Index: modules/domino/include/DominoOptimizer.h =================================================================== --- modules/domino/include/DominoOptimizer.h (revision 734) +++ modules/domino/include/DominoOptimizer.h (working copy) @@ -21,7 +21,7 @@ { //! An exact inference optimizer. -/** \ingroup optimize +/** \ingroup optimizer */ class IMPDOMINOEXPORT DominoOptimizer : public Optimizer { Index: modules/domino/include/SimpleDiscreteRestraint.h =================================================================== --- modules/domino/include/SimpleDiscreteRestraint.h (revision 734) +++ modules/domino/include/SimpleDiscreteRestraint.h (working copy) @@ -23,7 +23,9 @@ namespace domino { - +/** + \ingroup restraint + */ class IMPDOMINOEXPORT SimpleDiscreteRestraint : public Restraint { public: