00001 /** 00002 * \file ConstantRestraint.h \brief Constant restraint. 00003 * 00004 * Just return a constant. 00005 * 00006 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00007 * 00008 */ 00009 00010 #ifndef IMPCORE_CONSTANT_RESTRAINT_H 00011 #define IMPCORE_CONSTANT_RESTRAINT_H 00012 00013 #include "core_config.h" 00014 00015 #include <IMP/Restraint.h> 00016 #include <IMP/PairScore.h> 00017 00018 IMPCORE_BEGIN_NAMESPACE 00019 00020 //! Return a constant value. 00021 /** This restraint is mostly for testing, but can also be used to make 00022 the total score look nicer. 00023 */ 00024 class IMPCOREEXPORT ConstantRestraint : public Restraint 00025 { 00026 Float v_; 00027 public: 00028 //! Add v to the total score. 00029 ConstantRestraint(Float v); 00030 00031 IMP_RESTRAINT(ConstantRestraint) 00032 }; 00033 00034 IMPCORE_END_NAMESPACE 00035 00036 #endif /* IMPCORE_CONSTANT_RESTRAINT_H */