IMPCONTAINER_BEGIN_NAMESPACE

AllPairContainer::AllPairContainer(SingletonContainerAdaptor c,
                                   std::string name)
    : PairContainer(c->get_model(), name), c_(c) {
  c.set_name_if_default("AllPairContainerInput0%1%");
}
IMPCORE_BEGIN_NAMESPACE

ConnectivityRestraint::ConnectivityRestraint(PairScore *ps,
                                             SingletonContainerAdaptor sc)
    : Restraint(sc->get_model(), "ConnectivityRestraint %1%"), ps_(ps) {
  sc.set_name_if_default("ConnectivityRestraintInput%1%");
  sc_ = sc;
}
IMPCONTAINER_BEGIN_NAMESPACE

AllBipartitePairContainer::AllBipartitePairContainer(
    SingletonContainerAdaptor a, SingletonContainerAdaptor b, std::string name)
    : PairContainer(a->get_model(), name), a_(a), b_(b) {
  a.set_name_if_default("AllBipartitePairContainerInput0%1%");
  b.set_name_if_default("AllBipartitePairContainerInput1%1%");
}
ExcludedVolumeRestraint::ExcludedVolumeRestraint(SingletonContainerAdaptor sc,
                                                 SoftSpherePairScore *ssps,
                                                 ObjectKey ok, double s)
    : Restraint(sc->get_model(), "ExcludedVolumeRestraint %1%"),
      sc_(sc),
      initialized_(false),
      ssps_(ssps) {
  sc.set_name_if_default("EVRInput%1%");
  slack_ = s;
  key_ = ok;
}
IMPCORE_BEGIN_NAMESPACE

ExcludedVolumeRestraint::ExcludedVolumeRestraint(SingletonContainerAdaptor sc,
                                                 double k, double s,
                                                 std::string name)
    : Restraint(sc->get_model(), name),
      sc_(sc),
      initialized_(false),
      ssps_(new SoftSpherePairScore(k)) {
  sc.set_name_if_default("EVRInput%1%");
  slack_ = s;
  std::ostringstream oss;
  oss << "ExcludedVolume " << get_name() << " hierarchy " << this;
  key_ = ObjectKey(oss.str());
}
IMPCONTAINER_BEGIN_NAMESPACE


ClosePairContainer::ClosePairContainer(SingletonContainerAdaptor c,
                                       double distance,
                                       double slack):
  P(c, distance,
    core::internal::default_cpf(c->get_number_of_particles()), slack){
}