Index: kernel/include/IMP/score_states/BondedListScoreState.h =================================================================== --- kernel/include/IMP/score_states/BondedListScoreState.h (revision 338) +++ kernel/include/IMP/score_states/BondedListScoreState.h (working copy) @@ -8,7 +8,6 @@ #ifndef __IMP_BONDED_LIST_SCORE_STATE_H #define __IMP_BONDED_LIST_SCORE_STATE_H -#include #include "../ScoreState.h" #include "../Index.h" #include "../Particle.h" @@ -16,43 +15,21 @@ namespace IMP { class BondedListScoreState; +//! Used to identify the BondedListScoreState in the NonbondedListScoreState typedef Index BondedListIndex; //! This abstract class maintains a list of bonded pairs. class IMPDLLEXPORT BondedListScoreState: public ScoreState { - struct BP: public std::pair - { - typedef BP This; - typedef std::pair P; - BP(): P(NULL, NULL) {} - bool is_default() const { - return first == NULL && second == NULL; - } - BP(Particle* a, Particle *b): P(std::min(a, b), std::max(a, b)) {} - IMP_COMPARISONS_2(first, second); - }; - //std::set bonds_; + public: + BondedListScoreState(){} + virtual ~BondedListScoreState(){} -public: - BondedListScoreState() {} - virtual ~BondedListScoreState() {} - //IMP_SCORE_STATE("0.5", "Daniel Russel"); + //! Set the set of particles used + virtual void set_particles(const Particles &ps)=0; - virtual bool are_bonded(Particle *a, Particle *b) const = 0; -#if 0 - //! This iterates through the pairs of non-bonded particles - /** - \precondition update() must be called first for this to be valid. - */ - typedef std::set::const_iterator BondedIterator; - BondedIterator bonded_begin() const { - return bonds_.begin(); - } - BondedIterator bonded_end() const { - return bonds_.end(); - } -#endif + //! Return true if the two particles are bonded + virtual bool are_bonded(Particle *a, Particle *b) const =0; }; } // namespace IMP