Grandson of mongo patch
I have fixed a few bugs so I thought I should submit things. This email lists the changes in addition to the un checked in ones from the last patch.
API Changes: - UnaryFunctions::evaluate_derivative now returns a pair of Floats alleviating the need to use the swig hack and making the C++ and swig syntax identical. Python code doesn't need to change but C++ code does. I suggest using boost::tie(value, deriv) (from boost/tuple/ tuple.hpp) to capture the return values for minimal code change. This one glues lots of the disparate changes together.
- the TransformPairScore has changed a bit to now functions take Vector3Ds instead of three floats
- The randomize functions have been moved out of XYZDecorator into Vector3D.h. This is a more generally useful location for them (which did not exist when I first wrote them). Calls to XYZDecorator::randomize_in_box should be replaced with calls to XYZDecorator::set_coordinates(random_vector_in_box(lb, ub))
- per Ben's suggestion, the hierarchy_ and molecular_hierarchy_ prefixes were removed from some function names
Bug fixes: - fixed the get_foos documentation
- fixed the hierarchy_get_internal_bonds function, which was not finding all bonds before
- circular ref counted pointers with Optimizers/optimizer states. Likewise for Model/Particle, Model/ScoreState (for when Model is refcounted)
- BallMover was broken in the IMP repository. I shouldn't return things by passing references to functions as one can easily loose the return value.
Additions: - There is a restraint which uses the Lowest n of a set of pair scores.
- an is_nan function which uses the built in one when compiling with gcc and the lack of self equality check otherwise. Various places use it now.
- a ParticleRefinerGuard which makes sure the refine and cleanup functions are called in pairs by calling cleanup in its destructor.
- The BondCoverPartirticleRefiner takes an IntKey whose value is propagated to the particles for use with the typed pair score
Not submitted things that might be useful: - A mover to do kmeans clustering. This perhaps should be split into a score state for storing the clustering and a mover to move things to the center.
- a particle refiner that uses a lookup table
- a pair score which refines pairs of particles which are close under some metric (can be used for hierarchical collision detection
- a pair score on the distance between two cylinders
- an optimization harness which runs various copies of your optimization (in parallel if you have multiple cores at your disposal) and keeps track of the best results.
The rest is various cleanups and new test cases and some extra checks to avoid misuse. I also think that the BondCoverParticleRefiner should be removed as it is not as interesting as hoped.
participants (1)
-
Daniel Russel