Merge pull request #1103 from RosettaCommons/roccomoretti/rotamer_max
Rework proton chi expansion
With the new PDB components, there are some ligands which have an insane number of proton chis. (15+). Even at a very small level of proton chi sampling (60, -60, 180), the proton chi rotamer variants themselves absolutely kill packing and take up huge amounts of memory. (3^19 equates to greater than one billion proton chi combinations.)
To fix this, I've instituted a scheme where the proton chi expansions are randomly subsampled, if they exceed a pre-specified limit. This should be set high enough that it won't affect anything that isn't currently bogged down due to proton chi expansion.
We also had a large amount redundancy in the proton chi expansion code. I've centralized some of this, but there's still opportunities for further consolidation.