|
Rosetta 3.5
|
The AtomTree class is a wrapper for a tree of kinematic Atoms. More...
#include <AtomTree.hh>


Public Types | |
| typedef id::AtomID | AtomID |
| typedef id::AtomID_Mask | AtomID_Mask |
| typedef id::DOF_Type | DOF_Type |
| typedef id::DOF_ID | DOF_ID |
| typedef id::DOF_ID_Mask | DOF_ID_Mask |
| typedef id::StubID | StubID |
| typedef std::vector< AtomID > | AtomIDs |
| typedef std::map< AtomID, Vector > | FragXYZ |
| typedef std::map< StubID, RT > | FragRT |
| typedef tree::Atom | Atom |
| typedef tree::AtomOP | AtomOP |
| typedef tree::AtomCOP | AtomCOP |
Public Member Functions | |
| AtomTree (AtomPointer2D const &new_atom_pointer, bool const from_xyz=true) | |
| construction: from a tree of atoms; More... | |
| AtomTree () | |
| default constructor More... | |
| virtual | ~AtomTree () |
| Destructor. More... | |
| AtomTree (AtomTree const &src) | |
| copy ctor More... | |
| AtomTree & | operator= (AtomTree const &src) |
| Copy assignment, makes complete copy of another AtomTree. More... | |
| void | set_weak_pointer_to_self (AtomTreeCAP self_pointer) |
| Weak-pointer setter. The object that instantiates an owning pointer to an AtomTree object must hand that AtomTree a weak pointer to itself so that the AtomTree may share that weak pointer with other AtomTrees. Such sharing allows for crucial speedups when copying between AtomTrees. If the object that instantiates this AtomTree does not provide it with a pointer-to-self, the AtomTree will still function, but it will not share its pointers properly. More... | |
| Size | size () const |
| number of residues More... | |
| bool | has (AtomID const &id) const |
| true only if AtomID is in the range of the map and its Atom pointer has value More... | |
| void | replace_residue_subtree (id::BondID const &incoming, utility::vector1< id::BondID > const &outgoing, AtomPointer1D const &new_atoms) |
| add an atom id1 to the AtomTree whose parent is id2 void add_atom( AtomID const & id1, AtomID const & id2, bool const add_bonded_atom, bool const from_xyz ); More... | |
| void | promote_sameresidue_nonjump_child (AtomID const &parent_atom_id) |
| Useful for guaranteeing that a stub remains within a single residue. More... | |
| void | delete_seqpos (Size const seqpos) |
| Deletes atoms for seqpos. Does not renumber other atoms – need to call update_sequence_numbering for that designed for the simple case of 1 incoming connecting and 0 or 1 outgoing connection, where the desired behavior is to rewire the outgoing connection in place of seqpos' tree. More... | |
| void | update_sequence_numbering (Size const new_size, utility::vector1< int > const &old2new) |
| updates the Atom's AtomID's and the atom_pointer array More... | |
| void | replace_tree (AtomPointer2D const &new_atom_pointer, bool const from_xyz=true) |
| replaces the entire tree More... | |
| void | copy_coords (AtomTree const &src) |
| copy the internal and xyz coords from src tree, which should have the same topology as me More... | |
| void | set_dof (DOF_ID const &id, Real const setting) |
| setters More... | |
| void | set_xyz (AtomID const &id, PointPosition const &xyz) |
| set a specific atom xyz position More... | |
| void | batch_set_xyz (utility::vector1< AtomID > const &id, utility::vector1< PointPosition > const &xyz) |
| simultaniously set several atom xyz positions More... | |
| void | set_jump (AtomID const &id, Jump const &jump) |
| set a specific jump transform More... | |
| void | set_jump_now (AtomID const &id, Jump const &jump) |
| set a specific jump transform and immediately refold downstream atoms More... | |
| AtomID | set_stub_transform (StubID const &stub_id1, StubID const &stub_id2, RT const &target_rt) |
| Set the transform between two stubs, returns the atomid of the jump atom which moved (for book-keeping) More... | |
| RT | get_stub_transform (StubID const &stub_id1, StubID const &stub_id2) const |
| get the transform between two stubs More... | |
| DOF_ID | set_torsion_angle (AtomID const &atom1, AtomID const &atom2, AtomID const &atom3, AtomID const &atom4, Real const setting) |
| set a torsion angle "setting" to a specifc DOF derived by the four atoms More... | |
| DOF_ID | set_bond_angle (AtomID const &atom1, AtomID const &atom2, AtomID const &atom3, Real const setting) |
| DOF_ID | set_bond_length (AtomID const &atom1, AtomID const &atom2, Real const setting) |
| void | update_domain_map (DomainMap &domain_map, AtomID_Mask const &dof_moved, AtomID_Mask const &xyz_moved) const |
| generates a "domain_map" defining the rigid body regions whose internal coords have not changed, according to the informaiton in the two bool Mask's update domain map from dof_moved and xyz_moved More... | |
| void | clear () |
| clear the content of an AtomTree object, delete root atom and all pointers More... | |
| void | insert_fragment (StubID const &instub_id, FragRT const &outstub_transforms, FragXYZ const &frag_xyz, utility::vector1< AtomID > &moving_atoms) |
| ResidueListIterator | residue_xyz_change_list_begin () const |
| The AtomTree provides to the Conformation object a list of residues whose xyz coordinates have changed. When the Conformation has finished reading off residues that have changed from the AtomTree, and has copied the coordinates of those residues into its conformation::Residue objects, it informs the AtomTree to reset this list by a call to mark_changed_residues_registered. More... | |
| ResidueListIterator | residue_xyz_change_list_end () const |
| void | note_coordinate_change_registered () const |
| The AtomTree provides a list of residues who's xyz coordinates have changed to the Conformation object. When the Conformation has finished reading off residues that have changed from the AtomTree, and has copied the coordinates of those residues into its conformation::Residue objects, it informs the AtomTree to reset this list by a call to mark_changed_residues_registered. More... | |
| bool | empty () const |
| is there any atom in the tree yet? More... | |
| AtomCOP | root () const |
| const-access to the root of the tree More... | |
| Real | dof (DOF_ID const &id) const |
| get value of DOF( PHI, THETA, D, RB1, ....) given its DOF_ID More... | |
| PointPosition const & | xyz (AtomID const &id) const |
| get xyz position of an atom given its AtomID More... | |
| Atom const & | atom (AtomID const &id) const |
| retreive a kinematic Atom in the tree by its AtomID More... | |
| Atom const & | atom_dont_do_update (AtomID const &id) const |
| retreive a kinematic Atom in the tree by its AtomID – no update! More... | |
| Jump const & | jump (AtomID const &id) const |
| retrieve a Jump in the tree by that JumpAtom's AtomID. More... | |
| DOF_ID | torsion_angle_dof_id (AtomID const &atom1, AtomID const &atom2, AtomID const &atom3, AtomID const &atom4) const |
| a wrapper function to get the DOF_ID of a torsion angle given those four atoms which define this torsion More... | |
| DOF_ID | torsion_angle_dof_id (AtomID const &atom1_in_id, AtomID const &atom2_in_id, AtomID const &atom3_in_id, AtomID const &atom4_in_id, Real &offset) const |
| get the DOF_ID of a torsion angle given those four atoms which define this torsion More... | |
| DOF_ID | bond_angle_dof_id (AtomID const &atom1_in_id, AtomID const &atom2_in_id, AtomID const &atom3_in_id, Real &offset) const |
| get the DOF_ID of a bond angle given those 3 atoms which define this torsion More... | |
| DOF_ID | bond_length_dof_id (AtomID const &atom1_in_id, AtomID const &atom2_in_id) const |
| get the DOF_ID of a bond length given those 2 atoms which define this torsion More... | |
| Real | torsion_angle (AtomID const &atom1, AtomID const &atom2, AtomID const &atom3, AtomID const &atom4) const |
| calculate torsion angle defined by four atoms in the atom tree More... | |
| Real | bond_angle (AtomID const &atom1, AtomID const &atom2, AtomID const &atom3) const |
| Real | bond_length (AtomID const &atom1, AtomID const &atom2) const |
| void | set_jump_atom_stub_id (StubID const &id) |
| Stub | stub_from_id (StubID const &id) const |
| AtomTreeCAP | topological_match_to () const |
| Functions only necessary for unit tests. More... | |
| utility::vector1< AtomTreeCAP > const & | topological_observers () const |
| For testing purposes only: report the list of observer AtomTrees that are topological copies of this tree. The fact that AtomTrees keep track of other atom trees is "private" in the sense that no other class needs to worry about it. However, to test that the topological match algorithm is working properly, this private data needs to be readable. Do not use this function outside of the unit tests. More... | |
Private Member Functions | |
| void | attach_topological_observer (AtomTreeCAP observer) const |
| When an atom tree copies the topology of another atom tree, it must register itself as a topological observer of that other tree. When the other tree changes its topology, then the tree being observed must notify its observers that they are no longer a topological copy of this tree. An atom tree may only be the topological copy of a single other atom tree, though several atom trees may be copies of a single atom tree. More... | |
| void | notify_topological_change (AtomTreeCAP observee) const |
| When an atom tree changes its topology, it must inform all of its observers that they are no longer the same topology as this tree. More... | |
| void | detatch_topological_observer (AtomTreeCAP observer) const |
| When an atom tree observing this tree decides it wants to become an observer of another tree, it must notify the tree that it formerly observed of this change. More... | |
| void | find_root_from_atom_pointer () |
| Deduce root_ from atom_pointer_ – look for atom with atom->parent() == 0. More... | |
| void | get_frag_atoms (StubID const &id, FragXYZ const &frag_xyz, AtomCOP &frag_atom, AtomCOP &nonfrag_atom) const |
| StubID | get_frag_pseudo_stub_id (AtomID const &id, FragXYZ const &frag_xyz, bool &fail) const |
| Stub | get_frag_local_stub (StubID const &stubid, FragXYZ const &frag_xyz, bool &fail) const |
| Vector | get_frag_local_xyz (AtomID const &id, FragXYZ const &frag_xyz, bool &fail) const |
| Vector | get_frag_descendant_local_xyz (AtomCOP atom, FragXYZ const &frag_xyz, bool &fail) const |
| Vector | get_frag_parent_local_xyz (AtomCOP child, FragXYZ const &frag_xyz, bool &fail) const |
| void | insert_single_fragment (StubID const &instub_id, FragRT const &outstub_transforms, FragXYZ const &frag_xyz, utility::vector1< AtomID > &moving_atoms) |
| void | update_atom_ids_from_atom_pointer () |
| bookkeeping – set the Atoms' atomIDs from the atom_pointer_ array More... | |
| AtomOP | atom_pointer (AtomID const &id) |
| Convenience when we want an Atom*. More... | |
| AtomCOP | atom_pointer (AtomID const &id) const |
| Convenience when we want an Atom*. More... | |
| void | update_internal_coords () const |
| Update the internal coordinates using the xyz (cartesian) coords these two private functions are for maintaining synchrony between the internal and xyz coords. More... | |
| void | update_xyz_coords () const |
| Update the xyz coordinates using the internal coords. More... | |
| void | set_new_topology () |
| Notify self of new tree topology Useful if we move to caching some things that depend on the tree. More... | |
Private Attributes | |
| AtomTreeCAP | this_weak_ptr_ |
| A weak pointer to self (this). The weak pointer must be provided to the AtomTree immediately after creation. The weak pointer. More... | |
| AtomOP | root_ |
| Root Atom. More... | |
| AtomPointer2D | atom_pointer_ |
| Atom pointers map (map[AtomID] = AtomPointer) More... | |
| bool | internal_coords_need_updating_ |
| List of the jump atom ID's, excluding the root. Order matters (for movemap indexing) More... | |
| bool | xyz_coords_need_updating_ |
| XYZ coords out of date? More... | |
| AtomTreeCAP | topological_match_to_ |
| pointer to the atom tree this tree has an exact topological match to since that tree was the last tree copied from without subsequence topological modifications – or at most one modification when that tree copied this tree's topology More... | |
| utility::vector1< AtomTreeCAP > | topological_observers_ |
| pointers to all atom trees that are observing this tree's topology. On topological changes (including the destruction of this tree!), each of these trees have their topological_match_to_ pointers set to null and this list is cleared. More... | |
| AtomDOFChangeSet | dof_changeset_ |
| A list of the atoms that have had changed DOFs since the last refold. More... | |
| ResidueCoordinateChangeListOP | external_coordinate_residues_changed_ |
| A list of residues that have had xyz coordinate changes since the last time the owning Conformation object has asked for an update. More... | |
The AtomTree class is a wrapper for a tree of kinematic Atoms.
the responsibilities of the class are:
See AtomTree overview and concepts for details.
Definition at line 106 of file AtomTree.hh.
Definition at line 125 of file AtomTree.hh.
Definition at line 127 of file AtomTree.hh.
Definition at line 111 of file AtomTree.hh.
Definition at line 113 of file AtomTree.hh.
| typedef std::vector< AtomID > core::kinematics::AtomTree::AtomIDs |
Definition at line 119 of file AtomTree.hh.
Definition at line 126 of file AtomTree.hh.
Definition at line 115 of file AtomTree.hh.
Definition at line 116 of file AtomTree.hh.
Definition at line 114 of file AtomTree.hh.
| typedef std::map< StubID, RT > core::kinematics::AtomTree::FragRT |
Definition at line 123 of file AtomTree.hh.
| typedef std::map< AtomID, Vector > core::kinematics::AtomTree::FragXYZ |
Definition at line 122 of file AtomTree.hh.
Definition at line 117 of file AtomTree.hh.
| core::kinematics::AtomTree::AtomTree | ( | AtomPointer2D const & | new_atom_pointer, |
| bool const | from_xyz = true |
||
| ) |
construction: from a tree of atoms;
this will claim the tree as our own. new_root has information about its children, and they have information about their children. From those atom positions, internal coordinates can be updated and atom pointers will be added into the AtomTree map.
Definition at line 71 of file AtomTree.cc.
References external_coordinate_residues_changed_, replace_tree(), and core::id::AtomID_Map< T >::size().
| core::kinematics::AtomTree::AtomTree | ( | ) |
default constructor
Definition at line 87 of file AtomTree.cc.
|
virtual |
| core::kinematics::AtomTree::AtomTree | ( | AtomTree const & | src) |
copy ctor
copy ctor, uses operator= without this initialization, the destruction of this
Definition at line 107 of file AtomTree.cc.
| tree::Atom const & core::kinematics::AtomTree::atom | ( | AtomID const & | id) | const |
retreive a kinematic Atom in the tree by its AtomID
Definition at line 544 of file AtomTree.cc.
References atom_pointer_, update_internal_coords(), and update_xyz_coords().
Referenced by protocols::simple_filters::JumpEvaluator::apply(), core::optimization::symmetry::atom_tree_dfunc(), core::optimization::atom_tree_dfunc(), protocols::rna::RNA_StructureParameters::check_forward_backward(), protocols::simple_moves::ConstrainToIdealMover::check_if_really_connected(), delete_seqpos(), core::scoring::methods::LinearChainbreakEnergy::do_score_ovp(), protocols::backrub::BackrubMover::dof_id_ranges(), protocols::backrub::BackrubSegment::end_atoms1(), core::conformation::Conformation::fill_missing_atoms(), protocols::topology_broker::fix_internal_coords_of_siblings(), get_frag_local_xyz(), get_frag_pseudo_stub_id(), core::scoring::rna::initialize_atoms_for_which_we_need_new_dofs(), protocols::simple_moves::DOFHistogramRecorder::insert_dofs_by_residue(), insert_fragment(), insert_single_fragment(), protocols::simple_filters::JumpEvaluator::JumpEvaluator(), protocols::branch_angle::BranchAngleOptimizer::optimize_angles(), protocols::branch_angle::BranchAngleOptimizer::overall_params(), protocols::rna::print_internal_coords(), protocols::backrub::BackrubMover::random_angle(), protocols::backrub::BackrubMover::rotate_segment(), protocols::backrub::BackrubSegment::start_atoms2(), and protocols::simple_moves::ConstrainToIdealMover::vary_bond_geometry().
| tree::Atom const & core::kinematics::AtomTree::atom_dont_do_update | ( | AtomID const & | id) | const |
retreive a kinematic Atom in the tree by its AtomID – no update!
Definition at line 556 of file AtomTree.cc.
References atom_pointer_.
Referenced by core::pose::copy_dofs(), core::io::pdb::dump_connect_info(), protocols::coarse_rna::CoarseRNA_LoopCloser::figure_out_forward_backward_res_by_backtracking(), and core::scoring::rna::fix_sugar_coords().
Convenience when we want an Atom*.
Definition at line 623 of file AtomTree.hh.
References atom_pointer_.
Referenced by bond_angle_dof_id(), bond_length_dof_id(), get_frag_atoms(), get_frag_local_stub(), get_frag_local_xyz(), get_frag_pseudo_stub_id(), insert_fragment(), insert_single_fragment(), promote_sameresidue_nonjump_child(), replace_residue_subtree(), set_jump_atom_stub_id(), set_stub_transform(), and torsion_angle_dof_id().
Convenience when we want an Atom*.
Definition at line 630 of file AtomTree.hh.
References atom_pointer_.
|
private |
When an atom tree copies the topology of another atom tree, it must register itself as a topological observer of that other tree. When the other tree changes its topology, then the tree being observed must notify its observers that they are no longer a topological copy of this tree. An atom tree may only be the topological copy of a single other atom tree, though several atom trees may be copies of a single atom tree.
Definition at line 1507 of file AtomTree.cc.
References this_weak_ptr_, and topological_observers_.
Referenced by operator=().
| void core::kinematics::AtomTree::batch_set_xyz | ( | utility::vector1< AtomID > const & | id, |
| utility::vector1< PointPosition > const & | xyz | ||
| ) |
simultaniously set several atom xyz positions
Definition at line 899 of file AtomTree.cc.
References atom_pointer_, internal_coords_need_updating_, and update_xyz_coords().
| Real core::kinematics::AtomTree::bond_angle | ( | AtomID const & | atom1, |
| AtomID const & | atom2, | ||
| AtomID const & | atom3 | ||
| ) | const |
Definition at line 1018 of file AtomTree.cc.
References bond_angle_dof_id(), dof(), core::kinematics::TR(), and core::id::DOF_ID::valid().
| id::DOF_ID core::kinematics::AtomTree::bond_angle_dof_id | ( | AtomID const & | atom1_in_id, |
| AtomID const & | atom2_in_id, | ||
| AtomID const & | atom3_in_id, | ||
| Real & | offset | ||
| ) | const |
get the DOF_ID of a bond angle given those 3 atoms which define this torsion
Definition at line 1041 of file AtomTree.cc.
References atom_pointer(), core::id::BOGUS_DOF_ID, and core::id::THETA.
Referenced by bond_angle(), set_bond_angle(), protocols::loops::loop_closure::kinematic_closure::TorsionSamplingKinematicPerturber::set_pose_after_closure(), protocols::loops::loop_closure::kinematic_closure::VicinitySamplingKinematicPerturber::set_pose_after_closure(), protocols::loops::loop_closure::kinematic_closure::NeighborDependentTorsionSamplingKinematicPerturber::set_pose_after_closure(), protocols::loops::loop_closure::kinematic_closure::TorsionRestrictedKinematicPerturber::set_pose_after_closure(), protocols::loops::loop_closure::kinematic_closure::TabooSamplingKinematicPerturber::set_pose_after_closure(), and protocols::loops::loop_closure::kinematic_closure::NeighborDependentTabooSamplingKinematicPerturber::set_pose_after_closure().
Definition at line 1114 of file AtomTree.cc.
References bond_length_dof_id(), dof(), core::kinematics::TR(), and core::id::DOF_ID::valid().
| id::DOF_ID core::kinematics::AtomTree::bond_length_dof_id | ( | AtomID const & | atom1_in_id, |
| AtomID const & | atom2_in_id | ||
| ) | const |
get the DOF_ID of a bond length given those 2 atoms which define this torsion
Definition at line 1134 of file AtomTree.cc.
References atom_pointer(), core::id::BOGUS_DOF_ID, and core::id::D.
Referenced by bond_length(), and set_bond_length().
| void core::kinematics::AtomTree::clear | ( | ) |
clear the content of an AtomTree object, delete root atom and all pointers
This is done by releasing memories of all atoms including the root atom , and clearing atom_pointer map
Definition at line 1203 of file AtomTree.cc.
References atom_pointer_, core::id::AtomID_Map< T >::clear(), external_coordinate_residues_changed_, root_, and set_new_topology().
Referenced by operator=(), replace_tree(), and ~AtomTree().
| void core::kinematics::AtomTree::copy_coords | ( | AtomTree const & | src) |
copy the internal and xyz coords from src tree, which should have the same topology as me
Definition at line 1219 of file AtomTree.cc.
References dof_changeset_, external_coordinate_residues_changed_, internal_coords_need_updating_, root(), root_, and xyz_coords_need_updating_.
Referenced by operator=().
| void core::kinematics::AtomTree::delete_seqpos | ( | Size const | seqpos) |
Deletes atoms for seqpos. Does not renumber other atoms – need to call update_sequence_numbering for that designed for the simple case of 1 incoming connecting and 0 or 1 outgoing connection, where the desired behavior is to rewire the outgoing connection in place of seqpos' tree.
assumes one incoming and at most one outgoing Need fancier fxn for general case
Definition at line 333 of file AtomTree.cc.
References atom(), atom_pointer_, core::id::AtomID_Map< T >::resize(), root(), set_new_topology(), size(), and update_sequence_numbering().
|
private |
When an atom tree observing this tree decides it wants to become an observer of another tree, it must notify the tree that it formerly observed of this change.
When an AtomTree which was observing this AtomTree changes its topology or is deleted, it must invoke this method on this AtomTree. When this happens, this AtomTree marks the observer's position in its list of observers as null.
Definition at line 1554 of file AtomTree.cc.
References topological_observers_.
get value of DOF( PHI, THETA, D, RB1, ....) given its DOF_ID
retrieve a specific DOF by its ID.
Definition at line 522 of file AtomTree.cc.
References atom_pointer_, and update_internal_coords().
Referenced by bond_angle(), bond_length(), core::conformation::Conformation::fill_missing_atoms(), protocols::topology_broker::fix_internal_coords_of_siblings(), core::scoring::rna::fix_sugar_coords_WORKS_BUT_SLOW(), protocols::rna::print_internal_coords(), torsion_angle_dof_id(), and core::pack::scmin::ResidueAtomTreeCollection::update_atom_tree().
|
inline |
|
private |
Deduce root_ from atom_pointer_ – look for atom with atom->parent() == 0.
/////////////////////////////////////////////////////////////////////////// / /
AtomOP parent(0); if ( !id2.valid() || // root !atom_pointer_.has( id2 ) || atom_pointer_[ id2 ] == 0 ) {
if ( root_ != 0 ) { utility_exit_with_message("add_atom: parent not in the tree"); } } else { parent = atom_pointer_[ id2 ]; }
create the new atom AtomOP atom( add_bonded_atom ? static_cast< AtomOP >( new BondedAtom() ) : static_cast< AtomOP >( new JumpAtom() ) ); atom->id( id1 ); atom_pointer_.set( id1, atom );
if ( parent ) { parent->append_atom( atom ); } else { root_ = atom; atom->parent( 0 ); }
if ( from_xyz ) { internal_coords_need_updating_ = true; } else { xyz_coords_need_updating_ = true; }
}
Definition at line 194 of file AtomTree.cc.
References atom_pointer_, root_, and core::id::AtomID_Map< T >::size().
Referenced by replace_tree().
|
private |
Definition at line 1598 of file AtomTree.cc.
References atom_pointer().
Referenced by insert_fragment(), and insert_single_fragment().
|
private |
private helper for fragment insertion routines
Definition at line 1785 of file AtomTree.cc.
References core::id::StubID::atom1, core::id::StubID::atom2, core::id::StubID::atom3, get_frag_local_stub(), get_frag_pseudo_stub_id(), core::kinematics::Stub::global2local(), core::kinematics::Stub::local2global(), stub_from_id(), and xyz().
Referenced by get_frag_local_xyz().
|
private |
private helper for fragment insertion routines
Definition at line 1704 of file AtomTree.cc.
References core::id::StubID::atom1, core::id::StubID::atom2, core::id::StubID::atom3, atom_pointer(), get_frag_local_xyz(), stub_from_id(), and core::kinematics::TR().
Referenced by get_frag_descendant_local_xyz(), get_frag_parent_local_xyz(), and insert_fragment().
|
private |
private helper for fragment insertion routines
id is either in frag or a child or a gchild or a parent
Definition at line 1751 of file AtomTree.cc.
References atom(), atom_pointer(), get_frag_descendant_local_xyz(), and get_frag_parent_local_xyz().
Referenced by get_frag_local_stub().
|
private |
private helper for fragment insertion routines
Definition at line 1828 of file AtomTree.cc.
References get_frag_local_stub(), get_frag_pseudo_stub_id(), core::kinematics::Stub::global2local(), core::kinematics::Stub::local2global(), stub_from_id(), and xyz().
Referenced by get_frag_local_xyz().
|
private |
id is a frag atom
look for two more nearby frag atoms to define a pseudo-stub for getting coords for parents or children of this atom
Definition at line 1645 of file AtomTree.cc.
References atom(), and atom_pointer().
Referenced by get_frag_descendant_local_xyz(), get_frag_parent_local_xyz(), and insert_fragment().
| RT core::kinematics::AtomTree::get_stub_transform | ( | StubID const & | stub_id1, |
| StubID const & | stub_id2 | ||
| ) | const |
get the transform between two stubs
Definition at line 1420 of file AtomTree.cc.
References stub_from_id().
true only if AtomID is in the range of the map and its Atom pointer has value
the atom with this AtomID in the current AtomID_Map?
Definition at line 176 of file AtomTree.hh.
References atom_pointer_, and core::id::AtomID_Map< T >::has().
Referenced by core::scoring::constraints::AtomPairConstraint::dist(), and protocols::topology_broker::fix_internal_coords_of_siblings().
| void core::kinematics::AtomTree::insert_fragment | ( | StubID const & | instub_id, |
| FragRT const & | outstub_transforms, | ||
| FragXYZ const & | frag_xyz, | ||
| utility::vector1< AtomID > & | moving_atoms | ||
| ) |
Definition at line 1981 of file AtomTree.cc.
References atom(), atom_pointer(), get_frag_atoms(), get_frag_local_stub(), get_frag_pseudo_stub_id(), core::kinematics::Stub::global2local(), insert_single_fragment(), and core::kinematics::TR().
|
private |
Definition at line 1858 of file AtomTree.cc.
References protocols::comparative_modeling::features::A, atom(), atom_pointer(), atom_pointer_, protocols::match::upstream::b, core::kinematics::RT::distance_squared(), external_coordinate_residues_changed_, get_frag_atoms(), core::kinematics::RT::get_rotation(), core::kinematics::RT::get_translation(), internal_coords_need_updating_, core::kinematics::Stub::local2global(), core::kinematics::Stub::M, stub_from_id(), core::scoring::hbonds::t(), and core::kinematics::Stub::v.
Referenced by insert_fragment().
retrieve a Jump in the tree by that JumpAtom's AtomID.
Definition at line 565 of file AtomTree.cc.
References atom_pointer_, and update_internal_coords().
| void core::kinematics::AtomTree::note_coordinate_change_registered | ( | ) | const |
The AtomTree provides a list of residues who's xyz coordinates have changed to the Conformation object. When the Conformation has finished reading off residues that have changed from the AtomTree, and has copied the coordinates of those residues into its conformation::Residue objects, it informs the AtomTree to reset this list by a call to mark_changed_residues_registered.
Definition at line 1494 of file AtomTree.cc.
References external_coordinate_residues_changed_.
|
private |
When an atom tree changes its topology, it must inform all of its observers that they are no longer the same topology as this tree.
The AtomTree being observed calls this notify_topological_change on all of the AtomeTrees that are observing it. The this object "detaches" itself from the observee in this function. In debug mode, this function ensures that this object was actually observing the observee – if it wasn't, then an internal error has occurred. The observee and the observer have gotten out of sync.
Definition at line 1543 of file AtomTree.cc.
References topological_match_to_.
Copy assignment, makes complete copy of another AtomTree.
makes a complete copy of another AtomTree src by cloning the root_atom and all its offspring atoms. Also update atom_pointer map.
Definition at line 1293 of file AtomTree.cc.
References atom_pointer_, attach_topological_observer(), clear(), copy_coords(), dof_changeset_, external_coordinate_residues_changed_, internal_coords_need_updating_, root_, this_weak_ptr_, topological_match_to_, and xyz_coords_need_updating_.
| void core::kinematics::AtomTree::promote_sameresidue_nonjump_child | ( | AtomID const & | parent_atom_id) |
Useful for guaranteeing that a stub remains within a single residue.
Useful for guaranteeing that a stub remains within a single residue
Definition at line 2121 of file AtomTree.cc.
References atom_pointer(), internal_coords_need_updating_, set_new_topology(), core::kinematics::TR(), and update_xyz_coords().
Referenced by core::conformation::promote_sameresidue_child_of_jump_atom().
| void core::kinematics::AtomTree::replace_residue_subtree | ( | id::BondID const & | incoming, |
| utility::vector1< id::BondID > const & | outgoing, | ||
| AtomPointer1D const & | new_atoms | ||
| ) |
add an atom id1 to the AtomTree whose parent is id2 void add_atom( AtomID const & id1, AtomID const & id2, bool const add_bonded_atom, bool const from_xyz );
/ void setup_backrub_segment( utility::vector1< AtomID > const & mainchain, AtomID const & downstream_id, // mainchain child of last atom in mainchain vector utility::vector1< std::pair< Size, Size > > const & edges, Size const first_new_pseudo_residue ); ///////////////////////////////////////////////////////////////////////////////// /modification of topology: atoms are incorporated into tree, not cloned void insert_subtree( Atom * const subtree_root, AtomID const & anchor_id, bool const insert_at_front );
void insert_subtree_into_bond( Atom * const subtree_root, AtomID const & old_child_id, AtomID const & new_parent_id );replace any subtree of atoms in the atom tree by a new tree of atoms void replace_subtree( Atom * const subtree_root, AtomIDs const & old_atoms, id::AtomID_Map< AtomID > const & atom_map );
Definition at line 402 of file AtomTree.cc.
References core::id::BondID::atom1, core::id::BondID::atom2, atom_pointer(), atom_pointer_, core::id::AtomID::atomno(), core::id::AtomID_Map< T >::clear(), internal_coords_need_updating_, root_, core::id::AtomID::rsd(), set_new_topology(), update_xyz_coords(), and core::id::AtomID::valid().
Referenced by core::conformation::replace_residue_in_atom_tree().
| void core::kinematics::AtomTree::replace_tree | ( | AtomPointer2D const & | new_atom_pointer, |
| bool const | from_xyz = true |
||
| ) |
replaces the entire tree
fill the AtomTree with a new tree of atoms by recording their pointers in the map. Sync internal and xyz coords.
Definition at line 214 of file AtomTree.cc.
References atom_pointer_, clear(), external_coordinate_residues_changed_, find_root_from_atom_pointer(), internal_coords_need_updating_, set_new_topology(), core::id::AtomID_Map< T >::size(), update_internal_coords(), update_xyz_coords(), and xyz_coords_need_updating_.
Referenced by AtomTree().
| ResidueListIterator core::kinematics::AtomTree::residue_xyz_change_list_begin | ( | ) | const |
The AtomTree provides to the Conformation object a list of residues whose xyz coordinates have changed. When the Conformation has finished reading off residues that have changed from the AtomTree, and has copied the coordinates of those residues into its conformation::Residue objects, it informs the AtomTree to reset this list by a call to mark_changed_residues_registered.
The list of which residues have had coordinate changes is unknown until the DFS has completed. The DFS must be triggered before iterators are given to the Conformation object.
Definition at line 1471 of file AtomTree.cc.
References external_coordinate_residues_changed_, update_xyz_coords(), and xyz_coords_need_updating_.
| ResidueListIterator core::kinematics::AtomTree::residue_xyz_change_list_end | ( | ) | const |
The list of which residues have had coordinate changes is unknown until the DFS has completed. The DFS must be triggered before iterators are given to the Conformation object.
Definition at line 1481 of file AtomTree.cc.
References external_coordinate_residues_changed_, update_xyz_coords(), and xyz_coords_need_updating_.
|
inline |
const-access to the root of the tree
Definition at line 405 of file AtomTree.hh.
References root_.
Referenced by protocols::toolbox::match_enzdes_util::constrain_pose_res_to_invrots(), copy_coords(), delete_seqpos(), protocols::viewer::dump_atomtree_kinemage(), protocols::ligand_docking::restrain_ligand_nbr_atom(), protocols::ligand_docking::LigandBaseProtocol::restrain_ligand_nbr_atom(), protocols::ligand_docking::MinimizeBackbone::restrain_protein_Calphas(), protocols::ligand_docking::LigandBaseProtocol::restrain_protein_Calphas(), core::optimization::CartesianMinimizerMap::setup(), core::optimization::MinimizerMap::setup(), and core::optimization::symmetry::SymMinimizerMap::SymMinimizerMap().
| id::DOF_ID core::kinematics::AtomTree::set_bond_angle | ( | AtomID const & | atom1, |
| AtomID const & | atom2, | ||
| AtomID const & | atom3, | ||
| Real const | setting | ||
| ) |
Definition at line 995 of file AtomTree.cc.
References bond_angle_dof_id(), set_dof(), and core::id::DOF_ID::valid().
| id::DOF_ID core::kinematics::AtomTree::set_bond_length | ( | AtomID const & | atom1, |
| AtomID const & | atom2, | ||
| Real const | setting | ||
| ) |
Definition at line 1095 of file AtomTree.cc.
References bond_length_dof_id(), set_dof(), and core::id::DOF_ID::valid().
setters
brief set a specific DOF in the tree
Definition at line 873 of file AtomTree.cc.
References atom_pointer_, dof_changeset_, update_internal_coords(), and xyz_coords_need_updating_.
Referenced by set_bond_angle(), set_bond_length(), and set_torsion_angle().
set a specific jump transform
Definition at line 915 of file AtomTree.cc.
References atom_pointer_, dof_changeset_, update_internal_coords(), and xyz_coords_need_updating_.
Referenced by set_jump_now().
| void core::kinematics::AtomTree::set_jump_atom_stub_id | ( | StubID const & | id) |
Definition at line 1951 of file AtomTree.cc.
References atom_pointer(), internal_coords_need_updating_, and update_xyz_coords().
set a specific jump transform and immediately refold downstream atoms
Definition at line 930 of file AtomTree.cc.
References set_jump().
|
private |
Notify self of new tree topology Useful if we move to caching some things that depend on the tree.
If this tree changes its topology, then its no longer a match in topology to the tree it was copied from, nor are the trees that are a copy of it. Detatch this as an observer of the AtomTree it is observing (if any) and inform all the trees observing this tree that the topology has changed before clearing the topological_observers_ array.
Definition at line 1575 of file AtomTree.cc.
References topological_match_to_, and topological_observers_.
Referenced by clear(), delete_seqpos(), promote_sameresidue_nonjump_child(), replace_residue_subtree(), and replace_tree().
| id::AtomID core::kinematics::AtomTree::set_stub_transform | ( | StubID const & | stub_id1, |
| StubID const & | stub_id2, | ||
| RT const & | target_rt | ||
| ) |
Set the transform between two stubs, returns the atomid of the jump atom which moved (for book-keeping)
Set the transform between two stubs Returns the atomid of the jump atom which moved.
Definition at line 1373 of file AtomTree.cc.
References protocols::comparative_modeling::features::A, core::id::StubID::atom(), atom_pointer(), protocols::match::upstream::b, core::kinematics::tree::distance_squared(), external_coordinate_residues_changed_, core::kinematics::find_stub_transform(), internal_coords_need_updating_, core::kinematics::RT::reverse(), and stub_from_id().
| id::DOF_ID core::kinematics::AtomTree::set_torsion_angle | ( | AtomID const & | atom1, |
| AtomID const & | atom2, | ||
| AtomID const & | atom3, | ||
| AtomID const & | atom4, | ||
| Real const | setting | ||
| ) |
set a torsion angle "setting" to a specifc DOF derived by the four atoms
@ details it is possible that no DOF can be obtained given these four atoms or the torsion does not match exactly the DOF(PHI) angle. In the former case, a BOGUS_DOF_ID is returned as indicator and in the latter case, an offset value is deducted from input setting to set the real DOF value properly.
Definition at line 964 of file AtomTree.cc.
References set_dof(), and torsion_angle_dof_id().
| void core::kinematics::AtomTree::set_weak_pointer_to_self | ( | AtomTreeCAP | self_pointer) |
Weak-pointer setter. The object that instantiates an owning pointer to an AtomTree object must hand that AtomTree a weak pointer to itself so that the AtomTree may share that weak pointer with other AtomTrees. Such sharing allows for crucial speedups when copying between AtomTrees. If the object that instantiates this AtomTree does not provide it with a pointer-to-self, the AtomTree will still function, but it will not share its pointers properly.
Definition at line 122 of file AtomTree.cc.
References this_weak_ptr_.
| void core::kinematics::AtomTree::set_xyz | ( | AtomID const & | id, |
| PointPosition const & | xyz | ||
| ) |
set a specific atom xyz position
Definition at line 886 of file AtomTree.cc.
References atom_pointer_, internal_coords_need_updating_, and update_xyz_coords().
Referenced by core::pack::scmin::ResidueAtomTreeCollection::update_atom_tree().
|
inline |
number of residues
Definition at line 168 of file AtomTree.hh.
References atom_pointer_, and core::id::AtomID_Map< T >::size().
Referenced by delete_seqpos(), core::conformation::insert_residue_into_atom_tree(), and update_atom_ids_from_atom_pointer().
Definition at line 500 of file AtomTree.hh.
References xyz().
Referenced by protocols::simple_filters::JumpEvaluator::apply(), get_frag_descendant_local_xyz(), get_frag_local_stub(), get_frag_parent_local_xyz(), get_stub_transform(), insert_single_fragment(), protocols::simple_filters::JumpEvaluator::JumpEvaluator(), and set_stub_transform().
|
inline |
Functions only necessary for unit tests.
For testing purposes only: report the address of the AtomTree this tree is a topological copy of. The fact that AtomTrees keep track of other atom trees is "private" in the sense that no other class needs to worry about it. However, to test that the topological match algorithm is working properly, this private data needs to be readable. Do not use this function outside of the unit tests.
Definition at line 536 of file AtomTree.hh.
References topological_match_to_.
|
inline |
For testing purposes only: report the list of observer AtomTrees that are topological copies of this tree. The fact that AtomTrees keep track of other atom trees is "private" in the sense that no other class needs to worry about it. However, to test that the topological match algorithm is working properly, this private data needs to be readable. Do not use this function outside of the unit tests.
Definition at line 547 of file AtomTree.hh.
References topological_observers_.
| Real core::kinematics::AtomTree::torsion_angle | ( | AtomID const & | atom1, |
| AtomID const & | atom2, | ||
| AtomID const & | atom3, | ||
| AtomID const & | atom4 | ||
| ) | const |
calculate torsion angle defined by four atoms in the atom tree
Definition at line 1167 of file AtomTree.cc.
References atom_pointer_, torsion_angle_dof_id(), core::kinematics::TR(), and update_internal_coords().
Referenced by protocols::simple_moves::TorsionDOFMover::apply().
|
inline |
a wrapper function to get the DOF_ID of a torsion angle given those four atoms which define this torsion
another version of this functino also calculates an offset value, which is not needed here
Definition at line 434 of file AtomTree.hh.
Referenced by protocols::simple_moves::TorsionDOFMover::apply(), protocols::swa::rna::RNA_AnalyticLoopCloser::figure_out_dof_ids_and_offsets(), protocols::coarse_rna::CoarseRNA_LoopCloser::figure_out_dof_ids_and_offsets(), set_torsion_angle(), and torsion_angle().
| id::DOF_ID core::kinematics::AtomTree::torsion_angle_dof_id | ( | AtomID const & | atom1_in_id, |
| AtomID const & | atom2_in_id, | ||
| AtomID const & | atom3_in_id, | ||
| AtomID const & | atom4_in_id, | ||
| Real & | offset | ||
| ) | const |
get the DOF_ID of a torsion angle given those four atoms which define this torsion
an "offset" value is also calculated that torsion(id1,id2,id3,id4) = dof( dof_id ) + offset. A BOGUS_DOF_ID will be returned if no proper DOF can be found for these four atoms. offset is mainly for an atom with a previous sibling as the torsion(PHI) attached to it is calculated as improper angle with respect to its sibling.
Definition at line 580 of file AtomTree.cc.
References atom_pointer(), core::id::BOGUS_DOF_ID, core::pack::interaction_graph::debug, dof(), core::id::PHI, core::id::THETA, core::kinematics::TR(), update_internal_coords(), and update_xyz_coords().
|
private |
bookkeeping – set the Atoms' atomIDs from the atom_pointer_ array
Definition at line 1259 of file AtomTree.cc.
References atom_pointer_, size(), and core::id::AtomID_Map< T >::size().
Referenced by update_sequence_numbering().
| void core::kinematics::AtomTree::update_domain_map | ( | DomainMap & | domain_map, |
| AtomID_Mask const & | dof_moved, | ||
| AtomID_Mask const & | xyz_moved | ||
| ) | const |
generates a "domain_map" defining the rigid body regions whose internal coords have not changed, according to the informaiton in the two bool Mask's update domain map from dof_moved and xyz_moved
domain map is residue-based and indicate which residues stay relatively rigid to each other in one domain since last move and therefore their interaction energy does not have to be recalculated. This function calls atom->update_domain_map from the root atom of the tree.
Definition at line 1242 of file AtomTree.cc.
References root_.
Referenced by core::optimization::CartesianMinimizerMap::setup(), core::optimization::MinimizerMap::setup(), and core::optimization::symmetry::SymMinimizerMap::SymMinimizerMap().
|
private |
Update the internal coordinates using the xyz (cartesian) coords these two private functions are for maintaining synchrony between the internal and xyz coords.
update_internal_coords would be called in situations where we want to ensure that the internal degrees are valid, eg when we are about to set a new internal DOF.
Definition at line 1351 of file AtomTree.cc.
References core::kinematics::default_stub, internal_coords_need_updating_, root_, and xyz_coords_need_updating_.
Referenced by atom(), dof(), jump(), replace_tree(), set_dof(), set_jump(), torsion_angle(), and torsion_angle_dof_id().
| void core::kinematics::AtomTree::update_sequence_numbering | ( | Size const | new_size, |
| utility::vector1< int > const & | old2new | ||
| ) |
updates the Atom's AtomID's and the atom_pointer array
Definition at line 1271 of file AtomTree.cc.
References atom_pointer_, external_coordinate_residues_changed_, update_atom_ids_from_atom_pointer(), and core::id::AtomID_Map< T >::update_sequence_numbering().
Referenced by delete_seqpos(), and core::conformation::insert_residue_into_atom_tree().
|
private |
Update the xyz coordinates using the internal coords.
update xyz coordinates from internal cooridnates
Definition at line 1431 of file AtomTree.cc.
References atom_pointer_, dof_changeset_, external_coordinate_residues_changed_, internal_coords_need_updating_, root_, and xyz_coords_need_updating_.
Referenced by atom(), batch_set_xyz(), promote_sameresidue_nonjump_child(), replace_residue_subtree(), replace_tree(), residue_xyz_change_list_begin(), residue_xyz_change_list_end(), set_jump_atom_stub_id(), set_xyz(), torsion_angle_dof_id(), and xyz().
| PointPosition const & core::kinematics::AtomTree::xyz | ( | AtomID const & | id) | const |
get xyz position of an atom given its AtomID
retrieve the xyz position of an atom in the tree by its AtomID
Definition at line 531 of file AtomTree.cc.
References atom_pointer_, and update_xyz_coords().
Referenced by get_frag_descendant_local_xyz(), get_frag_parent_local_xyz(), and stub_from_id().
|
private |
Atom pointers map (map[AtomID] = AtomPointer)
Definition at line 664 of file AtomTree.hh.
Referenced by atom(), atom_dont_do_update(), atom_pointer(), batch_set_xyz(), clear(), delete_seqpos(), dof(), find_root_from_atom_pointer(), has(), insert_single_fragment(), jump(), operator=(), replace_residue_subtree(), replace_tree(), set_dof(), set_jump(), set_xyz(), size(), torsion_angle(), update_atom_ids_from_atom_pointer(), update_sequence_numbering(), update_xyz_coords(), and xyz().
|
mutableprivate |
A list of the atoms that have had changed DOFs since the last refold.
Definition at line 688 of file AtomTree.hh.
Referenced by copy_coords(), operator=(), set_dof(), set_jump(), and update_xyz_coords().
|
private |
A list of residues that have had xyz coordinate changes since the last time the owning Conformation object has asked for an update.
Definition at line 691 of file AtomTree.hh.
Referenced by AtomTree(), clear(), copy_coords(), insert_single_fragment(), note_coordinate_change_registered(), operator=(), replace_tree(), residue_xyz_change_list_begin(), residue_xyz_change_list_end(), set_stub_transform(), update_sequence_numbering(), and update_xyz_coords().
|
mutableprivate |
List of the jump atom ID's, excluding the root. Order matters (for movemap indexing)
Internal coords out of date?
Definition at line 670 of file AtomTree.hh.
Referenced by batch_set_xyz(), copy_coords(), insert_single_fragment(), operator=(), promote_sameresidue_nonjump_child(), replace_residue_subtree(), replace_tree(), set_jump_atom_stub_id(), set_stub_transform(), set_xyz(), update_internal_coords(), and update_xyz_coords().
|
private |
Root Atom.
Definition at line 661 of file AtomTree.hh.
Referenced by clear(), copy_coords(), empty(), find_root_from_atom_pointer(), operator=(), replace_residue_subtree(), root(), update_domain_map(), update_internal_coords(), and update_xyz_coords().
|
private |
A weak pointer to self (this). The weak pointer must be provided to the AtomTree immediately after creation. The weak pointer.
Definition at line 658 of file AtomTree.hh.
Referenced by attach_topological_observer(), operator=(), and set_weak_pointer_to_self().
|
mutableprivate |
pointer to the atom tree this tree has an exact topological match to since that tree was the last tree copied from without subsequence topological modifications – or at most one modification when that tree copied this tree's topology
Definition at line 679 of file AtomTree.hh.
Referenced by notify_topological_change(), operator=(), set_new_topology(), and topological_match_to().
|
mutableprivate |
pointers to all atom trees that are observing this tree's topology. On topological changes (including the destruction of this tree!), each of these trees have their topological_match_to_ pointers set to null and this list is cleared.
Definition at line 685 of file AtomTree.hh.
Referenced by attach_topological_observer(), detatch_topological_observer(), set_new_topology(), and topological_observers().
|
mutableprivate |
XYZ coords out of date?
Definition at line 673 of file AtomTree.hh.
Referenced by copy_coords(), operator=(), replace_tree(), residue_xyz_change_list_begin(), residue_xyz_change_list_end(), set_dof(), set_jump(), update_internal_coords(), and update_xyz_coords().
1.8.4