Merge pull request #1227 from RosettaCommons/vmullig/cyclic_packing_bug
Fix a bug in packing cyclic peptides when using beta_nov15
There's an MxN array that should be an NxM array, which throws a debug assertion error.
Tasks:
-- Add unit test to illustrate/catch the problem.
-- Figure out what's causing the problem.
-- Fix it.
-- Beauty.
Update: I think the problem was that a particular array was being set up that was intended to be NxM, where N is the number of rotamers for residue i and M is the number of rotamers for residue j, and i is strictly less than j. (This was for bonded pairs of residues). In the cyclic peptide case, at the cyclization point, i was greater than j, and the NxM matrix had the dimensions swapped. I've added logic to check whether i or j is greater and to swap the indices accordingly.