Merge pull request #2024 from RosettaCommons/jadolfbr/tree_based_glycan_relax
Add GlycanTreeSet machinery
This PR adds a `GlycanTreeSet` that handles glycan tree connectivity, and changes many calls to on-the-fly functions to use functions contained in these classes instead.
- The `GlycanTreeSet` is composed of individual GlycanTrees, each identified by the starting glycan number.
- Each `GlycanTree` is composed of `GlycanNodes`.
- Each `GlycanNode` contains a lot of information on the inter-glycan residue connectivity. This greatly reduces the number of on-the-fly calculations that need to be made to figure out parents, children, root distances, and exocyclic torsion information.
- These classes are contained in the Conformation layer and can be used independently of a pose.
A `GlycanTreeSet` is contained in the `GlycanTreeSetObserver`. This observer responds to pose length changes so that the connectivity information is always preserved. A function has been added to pose to get this `pose.glycan_tree_set()` which returns a `nullptr` if no glycans are in the pose. The `GlycanTreeSetObserver` is ONLY ever present if glycans are added in some fashion - either by actually glycosylating or by loading from a structure file.
A unit test has been added for the functionality contained in this class.
Thanks to @raemisch who helped conceive this and originally started working on these classes this summer. Also thanks to @roccomoretti, @smlewis, @aleaverfay, and @JWLabonte for help on different parts on this.
Other
====
- This adds a line to delete a residue from the atom tree in `pose.delete_residue_slow()` which prevents a crash if a residue is accessed during the length observer, since we don't rebuild the atom tree until after the LengthEvent is sent out. `pose.delete_polymer_residue()` also does this.
- Fixes copy constructors in various classes I have written that hold OPs, or outright adds explicit copy constructors where they were missing.
- Adds a GlycanPositionSelector that allows selection of any residue in a tree.
- @JWLabonte - note that many functions held in pose/carbohydrates/util are now moved to conformation/carbohydrates/util.