Beispiel #1
0
cvm::atom::atom(atom const &a)
  : index(a.index)
{
  id = (cvm::proxy)->get_atom_id(index);
  update_mass();
  reset_data();
}
Beispiel #2
0
cvm::atom::atom(int atom_number)
{
  colvarproxy *p = cvm::proxy;
  index = p->init_atom(atom_number);
  if (cvm::debug()) {
    cvm::log("The index of this atom in the colvarproxy arrays is "+
             cvm::to_str(index)+".\n");
  }
  id = p->get_atom_id(index);
  update_mass();
  reset_data();
}
Beispiel #3
0
cvm::atom::atom(cvm::residue_id const &residue,
                std::string const     &atom_name,
                std::string const     &segment_id)
{
  colvarproxy *p = cvm::proxy;
  index = p->init_atom(residue, atom_name, segment_id);
  if (cvm::debug()) {
    cvm::log("The index of this atom in the colvarproxy_namd arrays is "+
             cvm::to_str(index)+".\n");
  }
  id = p->get_atom_id(index);
  update_mass();
  reset_data();
}
Beispiel #4
0
void insert(int j, int i) {
    update_mass(j, i);
    if (nodes_type[j] == NODE_INTERNAL) {
        insert_recursive(j, i);
    } else if (nodes_body[j] > -1) {
        nodes_type[j] = NODE_INTERNAL;
        branch(j);
        insert_recursive(j, nodes_body[j]);
        insert_recursive(j, i);
        nodes_body[j] = -1;
    } else {
        nodes_body[j] = i;
    }
}