Merge pull request #1834 from RosettaCommons/JWLabonte/sugars/branching
PDB Input: Making Rosetta a little bit less picky about LINK records
This merge will fix a problem with loading `.pdb` files where `LINK` records are not sorted like any sensible human would sort them. In cases where such files include a `LINK` record from a branch point residue to a higher-numbered residue before a lower-numbered residue, Rosetta would crash, because one cannot build a branch before a main chain is complete.
(This still does not fix cases where people list `LINK` records backwards or where they number residues in branches in non-nonsensical ways.)
I also want to say that I fixed this using a lambda function, so yay, C++11.
FYI: @jadolfbr, @raemisch
@smlewis: Will you be able to run this branch with your XRW read-all-the-pdbs script? This should give us better numbers.
All tests pass.