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

/**
 *  \file IMP/container/MinimumQuadScore.h
 *  \brief Define QuadScore.
 *
 *  Copyright 2007-2021 IMP Inventors. All rights reserved.
 */

#ifndef IMPCONTAINER_MINIMUM_QUAD_SCORE_H
#define IMPCONTAINER_MINIMUM_QUAD_SCORE_H

#include <IMP/container/container_config.h>
#include <IMP/QuadScore.h>
#include <IMP/quad_macros.h>

IMPCONTAINER_BEGIN_NAMESPACE

//! Evaluate the min or max n particle_quad scores of the passed set
/** Each of the set of QuadScores is evaluated and the sum of the
    minimum n is returned.
*/
class IMPCONTAINEREXPORT MinimumQuadScore : public QuadScore {
  QuadScores scores_;
  unsigned int n_;

 public:
  MinimumQuadScore(const QuadScoresTemp &scores, unsigned int n = 1,
                        std::string name = "QuadScore %1%");
  virtual double evaluate_index(Model *m, const ParticleIndexQuad& vt,
                                DerivativeAccumulator *da) const IMP_OVERRIDE;
  virtual ModelObjectsTemp do_get_inputs(
      Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
  IMP_QUAD_SCORE_METHODS(MinimumQuadScore);
  IMP_OBJECT_METHODS(MinimumQuadScore);

  Restraints do_create_current_decomposition(Model *m,
                                             const ParticleIndexQuad& vt) const
      IMP_OVERRIDE;
};

IMP_OBJECTS(MinimumQuadScore, MinimumQuadScores);

IMPCONTAINER_END_NAMESPACE

#endif /* IMPCONTAINER_MINIMUM_QUAD_SCORE_H */
