[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] AnglesRestraint



I think it would be good to have an AnglesRestraint which stores a list of chains and applies an AngleRestraint-like restraint to each triple in each chain. It is easier to set up and maintain than a whole mess of AngleRestraints and more efficient too.

Comments?

//! Restraint the angles between particles
/** Currently the particles can be added as chains and the angle
   of each three successive particles in the chain is restrained.
   \ingroup restraint
*/
class IMPDLLEXPORT AnglesRestraint : public Restraint
{
public:
 //! Create the angle restraint.
 /** \param[in] score_func Scoring function for the restraint.
  */
 AnglesRestraint(UnaryFunction* score_func);
 virtual ~AnglesRestraint(){}

 IMP_RESTRAINT("0.5", "Daniel Russel");

 //! Add a chain of particles
 /** Each three successive particles are restrained*/
 void add_chain(const Particles &ps);

 //! Clear all the store chains
 void clear_chains();
protected:
   std::auto_ptr<UnaryFunction> score_func_;
   std::vector<int> chain_splits_;
};