Index: kernel/include/Vector3D.h =================================================================== --- kernel/include/Vector3D.h (revision 975) +++ kernel/include/Vector3D.h (working copy) @@ -17,6 +17,7 @@ IMP_BEGIN_NAMESPACE +//! A location in 3D typedef VectorD<3> Vector3D; IMP_END_NAMESPACE Index: kernel/include/base_types.h =================================================================== --- kernel/include/base_types.h (revision 975) +++ kernel/include/base_types.h (working copy) @@ -17,13 +17,11 @@ IMP_BEGIN_NAMESPACE -/** \defgroup kernel IMP Kernel - The core IMP types - - \defgroup helper Miscellaneous helpers - Classes and functions which are there to make your life easier. +/** + \namespace IMP \brief The IMP kernel. */ + /** \internal \namespace IMP::internal Implementation details. */ Index: kernel/include/SingletonScore.h =================================================================== --- kernel/include/SingletonScore.h (revision 975) +++ kernel/include/SingletonScore.h (working copy) @@ -16,12 +16,6 @@ class Particle; -/** \ingroup restraint - \addtogroup singleton Score functions on one particle - Score functions to be applied to a single particle. These can be - used to make more flexible restraints. - */ - //! Abstract score function for a single particle. /** SingletonScores should take a UnaryFunction as their first argument if such is needed. @@ -33,6 +27,7 @@ //! Compute the score for the particle and the derivative if needed. virtual Float evaluate(Particle *a, DerivativeAccumulator *da) const = 0; + //! virtual void show(std::ostream &out=std::cout) const = 0; IMP_REF_COUNTED_DESTRUCTOR(SingletonScore) }; Index: kernel/include/exception.h =================================================================== --- kernel/include/exception.h (revision 975) +++ kernel/include/exception.h (working copy) @@ -139,7 +139,11 @@ IMPDLLEXPORT CheckLevel get_check_level(); - +//! Execute the code block if a certain level checks are on +/** + The next code block (delimited by { }) is executed if + get_check_level() <= level. + */ #define IMP_IF_CHECK(level)\ if (level <= ::IMP::get_check_level()) Index: kernel/include/Model.h =================================================================== --- kernel/include/Model.h (revision 975) +++ kernel/include/Model.h (working copy) @@ -26,7 +26,6 @@ //! Class for storing model, its restraints, and particles. /** The Model maintains a standard IMP container for each of Particle, ScoreState and Restraint object types. - \ingroup kernel */ class IMPDLLEXPORT Model: public Object { @@ -34,7 +33,9 @@ friend class Restraint; unsigned int iteration_; public: + //! Model(); + //! ~Model(); IMP_CONTAINER(Particle, particle, ParticleIndex); Index: kernel/include/VersionInfo.h =================================================================== --- kernel/include/VersionInfo.h (revision 975) +++ kernel/include/VersionInfo.h (working copy) @@ -22,7 +22,6 @@ VersionInfo(std::string author, std::string version) : author_(author), version_(version) {} - //! Default constructor VersionInfo() : author_("unknown"), version_("unknown") {} //! \return author of this object. @@ -37,7 +36,7 @@ out << "author: " << author_ << std::endl; } -protected: +private: std::string author_, version_; }; Index: kernel/include/DerivativeAccumulator.h =================================================================== --- kernel/include/DerivativeAccumulator.h (revision 975) +++ kernel/include/DerivativeAccumulator.h (working copy) @@ -19,9 +19,11 @@ class IMPDLLEXPORT DerivativeAccumulator { public: + //! DerivativeAccumulator(Float weight=1.0) : weight_(weight) {} + //! DerivativeAccumulator(const DerivativeAccumulator ©, Float weight=1.0) : weight_(copy.weight_ * weight) {} @@ -34,7 +36,7 @@ return value * weight_; } -protected: +private: Float weight_; }; Index: kernel/include/Particle.h =================================================================== --- kernel/include/Particle.h (revision 975) +++ kernel/include/Particle.h (working copy) @@ -59,8 +59,6 @@ \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 { Index: kernel/include/UnaryFunction.h =================================================================== --- kernel/include/UnaryFunction.h (revision 975) +++ kernel/include/UnaryFunction.h (working copy) @@ -18,8 +18,6 @@ //! Abstract single variable functor class for score functions. /** These functors take a single feature value, and return a corresponding score (and optionally also the first derivative). - - \ingroup kernel */ class IMPDLLEXPORT UnaryFunction : public RefCountedObject { @@ -34,12 +32,11 @@ //! Calculate score and derivative with respect to the given feature. /** \param[in] feature Value of feature being tested. - \param[out] deriv Partial derivative of the score with respect to the - given feaure. - \return Score + \return a pair containting the score and the derivative */ virtual FloatPair evaluate_with_derivative(Float feature) const = 0; + //! virtual void show(std::ostream &out=std::cout) const = 0; IMP_REF_COUNTED_DESTRUCTOR(UnaryFunction) Index: kernel/include/VectorD.h =================================================================== --- kernel/include/VectorD.h (revision 975) +++ kernel/include/VectorD.h (working copy) @@ -1,5 +1,5 @@ /** - * \File VectorD.h \brief Simple D vector class. + * \file VectorD.h \brief Simple D vector class. * * Copyright 2007-8 Sali Lab. All rights reserved. * @@ -22,8 +22,6 @@ IMP_BEGIN_NAMESPACE //! Simple D vector class -/** \ingroup helper - */ template class VectorD { @@ -89,8 +87,6 @@ } //! \return the scalar product of two vectors. - /** \param[in] vec2 The other vector to use in the product. - */ Float scalar_product(const This &o) const { Float ret=0; for (unsigned int i=0; i< D; ++i) { @@ -132,8 +128,6 @@ } //! \return the vector product of two vectors. - /** \param[in] vec2 The other vector to use in the product. - */ VectorD vector_product(const VectorD &vec2) const { BOOST_STATIC_ASSERT(D==3); return VectorD(vec_[1] * vec2.vec_[2] - vec_[2] * vec2.vec_[1], Index: kernel/include/Index.h =================================================================== --- kernel/include/Index.h (revision 975) +++ kernel/include/Index.h (working copy) @@ -38,6 +38,7 @@ ValueException); return i_; } + //! void show(std::ostream &out) const { if (!is_default()) { out << "(" << i_ << ")"; @@ -57,7 +58,7 @@ ++i_; } #endif -protected: +private: bool is_default() const { return i_==-1; } Index: kernel/include/Restraint.h =================================================================== --- kernel/include/Restraint.h (revision 975) +++ kernel/include/Restraint.h (working copy) @@ -27,17 +27,7 @@ typedef std::vector ParticlesList; class Model; -/** \defgroup restraint General purpose restraints - Classes to define and help in defining restraints. The restraints - typically involve a Restraint which defines the set of tuples of Particles - 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 @@ -60,13 +50,10 @@ without ever having been added to a model as this is an easy mistake to make. To disable this warning for a particular restraint, call set_was_owned(true). - - \ingroup kernel */ class IMPDLLEXPORT Restraint : public RefCountedObject { public: - //! Initialize the Restraint Restraint(); ~Restraint(); Index: kernel/include/DecoratorBase.h =================================================================== --- kernel/include/DecoratorBase.h (revision 975) +++ kernel/include/DecoratorBase.h (working copy) @@ -14,50 +14,6 @@ IMP_BEGIN_NAMESPACE -/** \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/ParticleRefiner.h =================================================================== --- kernel/include/ParticleRefiner.h (revision 975) +++ kernel/include/ParticleRefiner.h (working copy) @@ -42,6 +42,7 @@ */ virtual void cleanup_refined(Particle *a, Particles &b, DerivativeAccumulator *da=0) const {} + //! virtual void show(std::ostream &out=std::cout) const { out << "ParticleRefiner base" << std::endl; }; Index: kernel/include/TripletScore.h =================================================================== --- kernel/include/TripletScore.h (revision 975) +++ kernel/include/TripletScore.h (working copy) @@ -15,13 +15,6 @@ IMP_BEGIN_NAMESPACE -/** - \ingroup restraint - \addtogroup tripletscore Score functions on three particles - Score functions to by applied to a triplet of particles. These can be - used to make more flexible restraints. - */ - //! Abstract score function for a triplet of particles. /** TripletScores should take a UnaryFunction as their first argument if such is needed. Index: kernel/include/Pointer.h =================================================================== --- kernel/include/Pointer.h (revision 975) +++ kernel/include/Pointer.h (working copy) @@ -65,7 +65,9 @@ set_pointer(o.o_); return *this; } + //! create a null pointer Pointer(): o_(NULL) {} + //! create a Pointer from a raw pointer explicit Pointer(O* o): o_(NULL) { IMP_assert(o, "Can't initialize with NULL pointer"); set_pointer(o); @@ -73,22 +75,29 @@ ~Pointer(){ set_pointer(NULL); } + /** Yup, its a pointer.*/ const O& operator*() const { audit(); return *o_; } + /** Yup, its a pointer.*/ O& operator*() { audit(); return *o_; } + /** Yup, its a pointer.*/ const O* operator->() const { audit(); return o_; } + /** Yup, its a pointer.*/ O* operator->() { audit(); return o_; } + //! return the raw pointer. + /** \assert if NULL + */ O* get() const { audit(); return o_; @@ -96,12 +105,15 @@ void operator=(O* o) { set_pointer(o); } + IMP_COMPARISONS_1(o_); + //! return true if non-null bool operator!() const { return !o_; } + //! convert to a raw pointer operator O*() const { return o_; } Index: kernel/include/Optimizer.h =================================================================== --- kernel/include/Optimizer.h (revision 975) +++ kernel/include/Optimizer.h (working copy) @@ -25,10 +25,6 @@ typedef std::vector OptimizerStates; -/** \defgroup optimizer Optimizers - Optimizers of various sorts. - */ - //! Base class for all optimizers. /** The Optimizer maintains a list of OptimizerStates which are updated each time the conformation is changed. Index: kernel/include/macros.h =================================================================== --- kernel/include/macros.h (revision 975) +++ kernel/include/macros.h (working copy) @@ -388,6 +388,10 @@ //! Use this to add a container of IMP objects /** This code should go in a .cpp file. One macro for each IMP_CONTAINER. + \param[in] Class The name of the class containing the container. + \param[in] Ucname The name of the type in uppercase + \param[in] lcname The name of the type in lower case + \param[in] Data The data type to store in the list \param[in] init Code to modify the passed in object. The object is obj its index index. \param[in] OnChanged Code to get executed when the container changes. @@ -438,6 +442,11 @@ /** This code should go in a .cpp file. One macro for each IMP_CONTAINER. + \param[in] Class The name of the class containing the container. + \param[in] Ucname The name of the type in uppercase + \param[in] lcname The name of the type in lower case + \param[in] IndexType The type to use for the index. This should be + an instantiation of Index or something similar. \param[in] init Code to modify the passed in object. The object is obj its index index. \param[in] onchanged Code to execute when the container is changed. Index: kernel/include/RefCountedObject.h =================================================================== --- kernel/include/RefCountedObject.h (revision 975) +++ kernel/include/RefCountedObject.h (working copy) @@ -41,6 +41,7 @@ // never hold pointers to it directly virtual ~RefCountedObject() { IMP_assert(!get_has_ref(), "Deleting object which still has references"); + IMP_LOG(VERBOSE, "Deleting ref counted object " << this << std::endl); --live_objects_; } Index: kernel/include/internal/ref_counting.h =================================================================== --- kernel/include/internal/ref_counting.h (revision 975) +++ kernel/include/internal/ref_counting.h (working copy) @@ -15,11 +15,8 @@ #include #include -IMP_BEGIN_NAMESPACE +IMP_BEGIN_INTERNAL_NAMESPACE -namespace internal -{ - template struct Ref { @@ -35,7 +32,7 @@ { template static void eval(O* o) { - IMP_LOG(VERBOSE, "Refing particle " << o->get_index() + IMP_LOG(VERBOSE, "Refing object with count " << o->get_ref_count() << std::endl); o->assert_is_valid(); o->ref(); @@ -57,8 +54,8 @@ { template static void eval(O *o) { - IMP_LOG(VERBOSE, "Unrefing particle " << o->get_index() - << " " << o->get_ref_count() << std::endl); + IMP_LOG(VERBOSE, "Unrefing object with count " + << o->get_ref_count() << std::endl); o->assert_is_valid(); o->unref(); if (!o->get_has_ref()) { @@ -132,8 +129,6 @@ } -} // namespace internal +IMP_END_INTERNAL_NAMESPACE -IMP_END_NAMESPACE - #endif /* IMP_REF_COUNTING_H */ Index: kernel/include/PairScore.h =================================================================== --- kernel/include/PairScore.h (revision 975) +++ kernel/include/PairScore.h (working copy) @@ -15,12 +15,6 @@ IMP_BEGIN_NAMESPACE -/** \ingroup restraint - \addtogroup pairscore Score functions on two particles - Score functions to by applied to a pair of particles. These can be - used to make more flexible restraints. - */ - //! Abstract score function for a pair of particles. /** PairScores should take a UnaryFunction as their first argument if such is needed. Index: kernel/include/Key.h =================================================================== --- kernel/include/Key.h (revision 975) +++ kernel/include/Key.h (working copy) @@ -95,7 +95,7 @@ return get_map().find(sc)->second; } } -protected: +private: bool is_default() const; public: static const std::string get_string(int i) Index: doc/internal/doxygen.conf =================================================================== --- doc/internal/doxygen.conf (revision 975) +++ doc/internal/doxygen.conf (working copy) @@ -1,4 +1,4 @@ -# Doxyfile 1.5.7.1 +# Doxyfile 1.5.7 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -99,7 +99,7 @@ # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. -INLINE_INHERITED_MEMB = NO +INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set @@ -179,7 +179,8 @@ # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = "command{1}=\code \1 \endcode" \ + "imp=\p IMP" # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. @@ -325,21 +326,21 @@ # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_CLASSES = NO +HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. -HIDE_FRIEND_COMPOUNDS = NO +HIDE_FRIEND_COMPOUNDS = YES # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. @@ -373,7 +374,7 @@ # will put a list of the files that are included by a file in the documentation # of that file. -SHOW_INCLUDE_FILES = YES +SHOW_INCLUDE_FILES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. @@ -414,7 +415,7 @@ # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. -GENERATE_TODOLIST = YES +GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test @@ -426,7 +427,7 @@ # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. -GENERATE_BUGLIST = YES +GENERATE_BUGLIST = NO # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting @@ -465,7 +466,7 @@ # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. -SHOW_FILES = YES +SHOW_FILES = NO # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index @@ -552,14 +553,10 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../../kernel/src \ +INPUT = ../../build/include \ ../../kernel/doc \ - ../../modules/domino/src \ - ../../modules/em/src \ - ../../modules/misc/src \ - ../../modules/core/src \ - ../../build/include \ - ../../doc/internal + ../../modules/core/doc \ + ../../modules/misc/doc # 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 @@ -592,7 +589,7 @@ # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -608,10 +605,10 @@ EXCLUDE_PATTERNS = */tests/* \ */imp_wrap.* \ - */internal/* \ */imp2.py \ */.svn \ - ._* + ._* \ + */internal/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -632,7 +629,7 @@ # and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = *.py # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude @@ -775,13 +772,13 @@ # each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = ../../kernel/doc/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = ../../kernel/doc/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -804,7 +801,7 @@ # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -HTML_DYNAMIC_SECTIONS = NO +HTML_DYNAMIC_SECTIONS = YES # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 @@ -816,21 +813,21 @@ # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. -GENERATE_DOCSET = NO +GENERATE_DOCSET = YES # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. -DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_FEEDNAME = IMP # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. -DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_BUNDLE_ID = org.salilab.imp # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the @@ -1215,7 +1212,7 @@ # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = *.py +INCLUDE_FILE_PATTERNS = *.h # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of @@ -1331,11 +1328,6 @@ DOT_FONTNAME = FreeSans -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot @@ -1371,7 +1363,7 @@ # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. -TEMPLATE_RELATIONS = NO +TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented @@ -1413,7 +1405,7 @@ # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. -DIRECTORY_GRAPH = YES +DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif @@ -1450,7 +1442,7 @@ # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. -MAX_DOT_GRAPH_DEPTH = 0 +MAX_DOT_GRAPH_DEPTH = 1000 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not @@ -1458,14 +1450,14 @@ # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). -DOT_TRANSPARENT = NO +DOT_TRANSPARENT = YES # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. -DOT_MULTI_TARGETS = NO +DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and