/** * \file core/DiameterRestraint.h * \brief A restraint to maintain the diameter of a set of points * * Copyright 2007-2010 IMP Inventors. All rights reserved. */ #ifndef IMPCORE_DIAMETER_RESTRAINT_H #define IMPCORE_DIAMETER_RESTRAINT_H #include "core_config.h" #include "internal/remove_pointers.h" #include #include #include #include IMPCORE_BEGIN_NAMESPACE //! Restrain the diameter of a set of points /** This class also serves as an example of how to build restraints which have internal ScoreStates and perhaps more than one actual restraint object. */ class IMPCOREEXPORT DiameterRestraint: public Restraint { IMP::internal::OwnerPointer ss_; IMP::internal::OwnerPointer p_; Float diameter_; IMP::internal::OwnerPointer sc_; IMP::internal::OwnerPointer f_; FloatKey dr_; public: //! Use f to restraint sc to be withing diameter of one another /** f should have a minimum at 0 and be an upper bound-style function. */ DiameterRestraint(UnaryFunction *f, SingletonContainer *sc, Float diameter); IMP_RESTRAINT(DiameterRestraint); void set_model(Model *m); }; IMPCORE_END_NAMESPACE #endif /* IMPCORE_DIAMETER_RESTRAINT_H */