// Autogenerated by tools\build\make_containers.py
// from tools\build\container_templates\core\ClassnameRestraint.h
// Do not edit - any changes will be lost!

/**
 *  \file IMP/core/SingletonRestraint.h
 *  \brief Apply a SingletonScore to a Singleton.
 *
 *  Copyright 2007-2021 IMP Inventors. All rights reserved.
 *
 */

#ifndef IMPCORE_SINGLETON_RESTRAINT_H
#define IMPCORE_SINGLETON_RESTRAINT_H

#include <IMP/core/core_config.h>

#include <IMP/internal/TupleRestraint.h>
#include <IMP/SingletonScore.h>

#include <iostream>

IMPCORE_BEGIN_NAMESPACE

//! Applies a SingletonScore to a Singleton.
/** This restraint stores a Singleton.
    \see SingletonRestraint
 */
class SingletonRestraint :
#if defined(SWIG) || defined(IMP_DOXYGEN)
    public Restraint
#else
    public IMP::internal::TupleRestraint<SingletonScore>
#endif
    {
 public:
  //! Create the restraint.
  /** This function takes the function to apply to the
      stored Singleton and the Singleton.
   */
  SingletonRestraint(Model *m, SingletonScore *ss, ParticleIndex vt,
                     std::string name = "SingletonRestraint %1%")
      : IMP::internal::TupleRestraint<SingletonScore>(ss, m, vt, name) {
  }

#if defined(SWIG) || defined(IMP_DOXYGEN)
 protected:
  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
  IMP::ModelObjectsTemp do_get_inputs() const;
  IMP_OBJECT_METHODS(SingletonRestraint)
#endif
};

IMPCORE_END_NAMESPACE

#endif /* IMPCORE_SINGLETON_RESTRAINT_H */
