当前位置: 首页>>代码示例>>C++>>正文


C++ ModelObjectsTemp类代码示例

本文整理汇总了C++中ModelObjectsTemp的典型用法代码示例。如果您正苦于以下问题:C++ ModelObjectsTemp类的具体用法?C++ ModelObjectsTemp怎么用?C++ ModelObjectsTemp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ModelObjectsTemp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: do_get_inputs

ModelObjectsTemp CoreClosePairContainer::do_get_inputs() const {
  ModelObjectsTemp ret;
  ret.push_back(c_);
  ret.push_back(score_state_);
  ret.push_back(moved_);
  return ret;
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:7,代码来源:CoreClosePairContainer.cpp

示例2: do_get_inputs

ModelObjectsTemp ConnectivityRestraint::do_get_inputs() const {
  if (!sc_) return ModelObjectsTemp();
  ModelObjectsTemp ret;
  ret += ps_->get_inputs(get_model(), sc_->get_all_possible_indexes());
  ret.push_back(sc_);
  return ret;
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:7,代码来源:ConnectivityRestraint.cpp

示例3: get_score_state_inputs

ModelObjectsTemp MovedSingletonContainer::get_score_state_inputs() const {
  ModelObjectsTemp ret =
      IMP::get_particles(get_model(), pc_->get_indexes());
  ret.push_back(pc_);
  ret += get_extra_inputs();
  return ret;
}
开发者ID:AljGaber,项目名称:imp,代码行数:7,代码来源:MovedSingletonContainer.cpp

示例4: do_get_inputs

ModelObjectsTemp EnvelopePenetrationRestraint::do_get_inputs() const {
  ModelObjectsTemp pt;
  for (ParticleConstIterator it = particles_begin(); it != particles_end();
       ++it) {
    pt.push_back(*it);
  }
  return pt;
}
开发者ID:salilab,项目名称:imp,代码行数:8,代码来源:EnvelopePenetrationRestraint.cpp

示例5: do_get_outputs

ModelObjectsTemp KinematicForestScoreState::do_get_outputs() const {
  ModelObjectsTemp ret;
  ret += atoms_;
  for (unsigned int i = 0; i < rbs_.size(); i++) {
    ret.push_back(rbs_[i]);
  }
  return ret;
}
开发者ID:salilab,项目名称:imp,代码行数:8,代码来源:KinematicForestScoreState.cpp

示例6: do_get_inputs

ModelObjectsTemp DensityFillingRestraint::do_get_inputs() const {
  ModelObjectsTemp pt;
  for (ParticleConstIterator it = particles_begin(); it != particles_end();
       ++it) {
    pt.push_back(*it);
  }
  return pt;
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:8,代码来源:DensityFillingRestraint.cpp

示例7: do_get_inputs

IMPKINEMATICS_BEGIN_NAMESPACE

ModelObjectsTemp KinematicForestScoreState::do_get_inputs() const {
  ModelObjectsTemp ret;
  ret += atoms_;
  for (unsigned int i = 0; i < rbs_.size(); i++) {
    ret.push_back(rbs_[i]);
  }
  return ret;
}
开发者ID:salilab,项目名称:imp,代码行数:10,代码来源:KinematicForestScoreState.cpp

示例8: get_all_possible_indexes

ParticleIndexes DummyPairContainer::get_all_possible_indexes() const {
  ParticleIndexes ret = c_->get_all_possible_indexes();
  ModelObjectsTemp mos =
      cpf_->get_inputs(get_model(), c_->get_indexes());
  for (unsigned int i = 0; i < mos.size(); ++i) {
    ModelObject *o = mos[i];
    Particle *p = dynamic_cast<Particle *>(o);
    if (p) ret.push_back(p->get_index());
  }
  return ret;
}
开发者ID:salilab,项目名称:imp,代码行数:11,代码来源:incremental_scoring_function.cpp

示例9: get_score_state_inputs

ModelObjectsTemp CoreClosePairContainer::get_score_state_inputs()
    const {
  ParticleIndexes all = c_->get_all_possible_indexes();
  ModelObjectsTemp ret = IMP::get_particles(get_model(), all);
  for (unsigned int i = 0; i < get_number_of_pair_filters(); ++i) {
    ret += get_pair_filter(i)->get_inputs(get_model(), all);
  }
  ret += cpf_->get_inputs(get_model(), all);
  ret.push_back(c_);
  ret.push_back(moved_);
  return ret;
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:12,代码来源:CoreClosePairContainer.cpp

示例10: do_get_inputs

ModelObjectsTemp RevoluteJointMover::do_get_inputs() const {
  ModelObjectsTemp ret;
  core::RigidMembers tmp(joints_[0]->get_parent_node().get_rigid_members());
  for (unsigned int i = 0; i < tmp.size(); ++i)
      ret.push_back(tmp[i]); //->get_particle());
  for (unsigned int j = 0; j < joints_.size(); ++j) {
      tmp = joints_[j]->get_child_node().get_rigid_members();
      for (unsigned int i = 0; i < tmp.size(); ++i)
          ret.push_back(tmp[i]); //->get_particle());
  }
  return ret;
}
开发者ID:salilab,项目名称:imp,代码行数:12,代码来源:RevoluteJointMover.cpp

示例11: do_get_inputs

ModelObjectsTemp SameResiduePairFilter::do_get_inputs(
    Model *m, const ParticleIndexes &pis) const {
  ModelObjectsTemp ret = IMP::get_particles(m, pis);
  for (unsigned int i = 0; i < pis.size(); ++i) {
    if (Atom::get_is_setup(m, pis[i])) {
      Particle *parent = Hierarchy(m, pis[i]).get_parent();
      if (parent) {
        ret.push_back(parent);
      }
    }
  }
  return ret;
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:13,代码来源:SameResiduePairFilter.cpp

示例12: get_mover

ParticleIndexes MonteCarlo::get_movable_particles() const {
    ParticleIndexes movable;
    for (unsigned int i = 0; i < get_number_of_movers(); ++i) {
        ModelObjectsTemp t = get_mover(i)->get_outputs();
        for (unsigned int j = 0; j < t.size(); ++j) {
            ModelObject *mo = t[j];
            if (dynamic_cast<Particle *>(mo)) {
                movable.push_back(dynamic_cast<Particle *>(mo)->get_index());
            }
        }
    }
    return movable;
}
开发者ID:AljGaber,项目名称:imp,代码行数:13,代码来源:MonteCarlo.cpp

示例13: do_get_inputs

ModelObjectsTemp BondedPairFilter::do_get_inputs(
    Model *m, const ParticleIndexes &pis) const {
  ModelObjectsTemp ret = IMP::get_particles(m, pis);
  for (unsigned int i = 0; i < pis.size(); ++i) {
    if (Bonded::get_is_setup(m, pis[i])) {
      Bonded b(m, pis[i]);
      for (unsigned int i = 0; i < b.get_number_of_bonds(); ++i) {
        ret.push_back(b.get_bond(i));
      }
    }
  }
  return ret;
}
开发者ID:AljGaber,项目名称:imp,代码行数:13,代码来源:BondedPairFilter.cpp

示例14: get_required_score_states

ScoreStatesTemp get_required_score_states(const ModelObjectsTemp &mos,
                                          ScoreStatesTemp exclude) {
  if (mos.empty()) return ScoreStatesTemp();
  ScoreStatesTemp ret;
  for (unsigned int i = 0; i < mos.size(); ++i) {
    mos[0]->get_model()->do_set_has_required_score_states(mos[i], true);
    ret += mos[i]->get_required_score_states();
  }
  std::sort(ret.begin(), ret.end());
  std::sort(exclude.begin(), exclude.end());
  ScoreStatesTemp diff;
  std::set_difference(ret.begin(), ret.end(), exclude.begin(), exclude.end(),
                      std::back_inserter(diff));
  return get_update_order(diff);
}
开发者ID:newtonjoo,项目名称:imp,代码行数:15,代码来源:model_object_helpers.cpp

示例15: get_model

void HybridMonteCarlo::do_step()
{
    //gibbs sampler on x and v
    //persistence=p samples p times x and once v
    //However because it's constant E, a rejected move
    //will result in recalculating the same move up to p times
    //until it is either accepted or the velocities are redrawn
    //since p has to be independent of the outcome (markov property)
    //we avoid recalculating the trajectory on rejection by just trying
    //it over and over without doing the md again.
    persistence_counter_ += 1;
    if (persistence_counter_ == persistence_)
    {
        persistence_counter_ = 0;
        //boltzmann constant in kcal/mol
        static const double kB = 8.31441 / 4186.6;
        md_->assign_velocities(get_kt() / kB);
    }
    ParticleIndexes all_optimized_particles;
    {
      ModelObjectsTemp op = get_model()->get_optimized_particles();
      for (unsigned int i = 0; i< op.size(); ++i) {
        all_optimized_particles.push_back(dynamic_cast<Particle*>(op[i].get())
                                          ->get_index());
      }
    }
    double last = do_evaluate(all_optimized_particles);
    core::MonteCarloMoverResult moved = do_move();

    double energy = do_evaluate(all_optimized_particles);
    bool accepted = do_accept_or_reject_move(energy, last,
                                             moved.get_proposal_ratio());
    while ((!accepted) && (persistence_counter_ < persistence_-1))
    {
        persistence_counter_ += 1;
        accepted = do_accept_or_reject_move(energy, last,
                                            moved.get_proposal_ratio());
    }

    /*std::cout << "hmc"
        << " old " << last
        << " new " << energy
        << " delta " << energy-last
        << " accepted " << accepted
        <<std::endl;*/
}
开发者ID:drussel,项目名称:imp,代码行数:46,代码来源:HybridMonteCarlo.cpp


注:本文中的ModelObjectsTemp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。