示例#1
0
ParticleIndexes Simulator::get_simulation_particle_indexes() const {
  IMP_OBJECT_LOG;
  ParticleIndexes ps;
  if (get_number_of_particles() == 0) {
    Model *m = get_model();
    ParticleIndexes pis = m->get_particle_indexes();
    for (ParticleIndexes::const_iterator it = pis.begin();
         it != pis.end(); ++it) {
      if (get_is_simulation_particle(*it)) {
        ps.push_back(*it);
      }
    }
  } else {
    ps = IMP::internal::get_index(
        ParticlesTemp(particles_begin(), particles_end()));
  }
  return ps;
}
void SingletonContainerSet::do_show(std::ostream &out) const {
  IMP_CHECK_OBJECT(this);
  out << get_number_of_particles()
      << " containers" << std::endl;
}