Merge pull request #1576 from RosettaCommons/dimaio/mg_cartmin_issue2
This PR addresses the same issue in #1566 (unfortunately, that PR did not completely fix the problem), with bondangle/bondlength minimization of Mg-containing poses. The issue arises due to the input_stub logic selecting three collinear atoms to build the stub.
This PR fixes this issue by choosing alternate atoms if the selected stub atoms are collinear.