00001 /** 00002 * \file SingletonRestraint.h 00003 * \brief Apply a SingletonScore to a Particle. 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 00012 #ifndef IMPCORE_SINGLETON_RESTRAINT_H 00013 #define IMPCORE_SINGLETON_RESTRAINT_H 00014 00015 #include "core_config.h" 00016 00017 #include <IMP/Restraint.h> 00018 #include <IMP/Pointer.h> 00019 #include <IMP/SingletonScore.h> 00020 00021 #include <iostream> 00022 00023 IMPCORE_BEGIN_NAMESPACE 00024 00025 //! Applies a SingletonScore to a Particle. 00026 /** This restraint stores a Particle. 00027 \see SingletonRestraint 00028 */ 00029 class IMPCOREEXPORT SingletonRestraint : public Restraint 00030 { 00031 IMP::internal::OwnerPointer<SingletonScore> ss_; 00032 Pointer<Particle> v_; 00033 mutable double score_; 00034 public: 00035 //! Create the restraint. 00036 /** This function takes the function to apply to the 00037 stored Singleton and the Singleton. 00038 */ 00039 SingletonRestraint(SingletonScore *ss, 00040 Particle* vt, 00041 std::string name="SingletonRestraint %1%"); 00042 00043 IMP_INCREMENTAL_RESTRAINT(SingletonRestraint); 00044 }; 00045 00046 IMPCORE_END_NAMESPACE 00047 00048 #endif /* IMPCORE_SINGLETON_RESTRAINT_H */