Merge pull request #5110: aleaverfay/bugfix_pepspec_anchor_at_term
pepspec: copy coords instead of overwriting anchor
This fixes a bug brought to me by Astghik Tsokolakyan who was
getting a segfault from the count_pair code and saw that I had
written count_pair. Astghik was using the pepspec application
setting the pep_anchor to be the first residue in the peptide,
but also extending the peptide 3 residues off both the N-
and C-termini. The extension code works nicely building off
the termini, but after the extension completes, it does some
centroid modeling and switches back to fullatom where it
calls "replace_residue" on the anchor residue to restore
its rotamer. This is a problem when the anchor residue in
the original pose was a termini residue and its a middle-of-
the-chain residue after the extensions have been added.
One solution is to not anchor from either termini, but
that can't be the right solution as the app in its
documentation says that you should be able to use a
single residue for the anchor.
The bug fix is to copy the coordinates that can be copied
from the original residue into the new residue.