Merge pull request #5075
From branch aleaverfay/hotfix_rama_ats_w_dof_derivs
Fix a segfault that shows up when using cartesian minimization
with the "old" (pre ref2015) rama term on termini.
Now, the RamachandranEnergy class checks residues to see that
they're not termini before appending the dof-deriv atoms for their
phi or psi, since if they are termini, then those atoms don't exist.
The Ramachandran class (which defines the potential) uses logic
to decide whether a residue should have its energy counted; that
logic needs to be invoked by the RamachandranEnergy class in its
atoms_with_dof_derivatives function.
Thanks for the heads up, Florian and Julia! Thanks for the help in
zeroing in out the problem, TJ!