Example #1
0
ModelObjectsTemp ParticleInputs::do_get_inputs(
    Model *m, const ParticleIndexes &pis) const {
  ModelObjectsTemp ret;
  for (unsigned int i = 0; i < pis.size(); ++i) {
    ret += get_input_containers(m->get_particle(pis[i]));
    ret += get_input_particles(m->get_particle(pis[i]));
  }
  return ret;
}
Example #2
0
ParticlesTemp get_input_particles(const ModelObjectsTemp &mo) {
  ParticlesTemp ret;
  for (unsigned int i = 0; i < mo.size(); ++i) {
    ModelObject *o = mo[i];
    Particle *p = dynamic_cast<Particle *>(o);
    if (p)
      ret.push_back(p);
    else {
      ret += get_input_particles(o->get_inputs());
    }
  }
  return ret;
}
double
RadiusOfGyrationRestraint::unprotected_evaluate(DerivativeAccumulator *accum)
const {
  IMP_UNUSED(accum);
  //IMP_USAGE_CHECK(!accum, "No derivatives computed");
  if (accum) {
    IMP_WARN("Can not calcaulte derivatives\n");
  }
  //calculate actual rog
  //todo - do not use get_input_particles function
  float actual_rog=get_actual_radius_of_gyration(get_input_particles());
  IMP_LOG_VERBOSE("actual_rog:"<<actual_rog<<" predicted:"<<predicted_rog_<<
          " scale:"<<predicted_rog_*scale_<<" score: "<<
          hub_->evaluate(actual_rog)<<std::endl);
  return hub_->evaluate(actual_rog);
}
void GaussianProcessInterpolationRestraintSparse::do_show(
                                           std::ostream& out) const
{
    out << "GaussianProcessInterpolationRestraintSparse on "
        << get_input_particles().size() << " particles" << std::endl;
}