00001 /** 00002 * \file MinimumSingletonRestraint.h 00003 * \brief Score based on the minimum score over a set of Singletons 00004 * 00005 * This file is generated by a script (core/tools/make-container). 00006 * Do not edit directly. 00007 * 00008 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00009 */ 00010 00011 #ifndef IMPCONTAINER_MAXIMUM_SINGLETON_RESTRAINT_H 00012 #define IMPCONTAINER_MAXIMUM_SINGLETON_RESTRAINT_H 00013 00014 #include "container_config.h" 00015 #include <IMP/Restraint.h> 00016 #include <IMP/SingletonScore.h> 00017 #include <IMP/SingletonContainer.h> 00018 00019 IMPCONTAINER_BEGIN_NAMESPACE 00020 00021 //! Score based on the maximum singleton over a set of Singletons 00022 /** The score is evaluated for each of the Singletons in the container 00023 and the value of the maximum n scores is used. That is, 00024 if n is 1, the value of the restraint is the value of the maximum 00025 score over the container. 00026 */ 00027 class IMPCONTAINEREXPORT MaximumSingletonRestraint 00028 : public Restraint 00029 { 00030 IMP::internal::OwnerPointer<SingletonScore> f_; 00031 IMP::internal::OwnerPointer<SingletonContainer> c_; 00032 unsigned int n_; 00033 public: 00034 /** n is the number of maximum scores to use. 00035 */ 00036 MaximumSingletonRestraint(SingletonScore *f, 00037 SingletonContainer *c, 00038 unsigned int n=1, 00039 std::string name 00040 ="MaximumSingletonRestraint %1%"); 00041 00042 IMP_RESTRAINT(MaximumSingletonRestraint); 00043 00044 //! Set the number of lowest scores to use. 00045 void set_n(unsigned int n) { n_=n;} 00046 }; 00047 00048 00049 IMPCONTAINER_END_NAMESPACE 00050 00051 #endif /* IMPCONTAINER_MAXIMUM_SINGLETON_RESTRAINT_H */