// 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/MinimumTripletScore.h
 *  \brief Define TripletScore.
 *
 *  Copyright 2007-2021 IMP Inventors. All rights reserved.
 */

#ifndef IMPCONTAINER_MINIMUM_TRIPLET_SCORE_H
#define IMPCONTAINER_MINIMUM_TRIPLET_SCORE_H

#include <IMP/container/container_config.h>
#include <IMP/TripletScore.h>
#include <IMP/triplet_macros.h>

IMPCONTAINER_BEGIN_NAMESPACE

//! Evaluate the min or max n particle_triplet scores of the passed set
/** Each of the set of TripletScores is evaluated and the sum of the
    minimum n is returned.
*/
class IMPCONTAINEREXPORT MinimumTripletScore : public TripletScore {
  TripletScores scores_;
  unsigned int n_;

 public:
  MinimumTripletScore(const TripletScoresTemp &scores, unsigned int n = 1,
                        std::string name = "TripletScore %1%");
  virtual double evaluate_index(Model *m, const ParticleIndexTriplet& vt,
                                DerivativeAccumulator *da) const IMP_OVERRIDE;
  virtual ModelObjectsTemp do_get_inputs(
      Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
  IMP_TRIPLET_SCORE_METHODS(MinimumTripletScore);
  IMP_OBJECT_METHODS(MinimumTripletScore);

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

IMP_OBJECTS(MinimumTripletScore, MinimumTripletScores);

IMPCONTAINER_END_NAMESPACE

#endif /* IMPCONTAINER_MINIMUM_TRIPLET_SCORE_H */
