28 #include <basic/Tracer.hh>
34 #include <utility/pointer/ReferenceCount.hh>
35 #include <utility/pointer/owning_ptr.hh>
37 #include <utility/vector1.hh>
40 namespace hotspot_hashing {
42 static basic::Tracer
tr(
"protocols.hotspot_hashing.StubGenerator" );
46 using namespace core::conformation;
47 using namespace core::chemical;
59 tr.Debug <<
"Placing at transform: " << transform << std::endl;
69 tr.Debug <<
"Placed residue at anchor location: " << pose.
residue(residueindex).
xyz(
"CA") << std::endl;
78 residue->atom_name(residue->nbr_atom()),
87 residue->select_orient_atoms(atom_center, atom_a, atom_b);
90 residue->xyz(atom_center),
92 residue->xyz(atom_b));
106 if (transform.get_translation().length() != 0)
108 newjump.
translation_along_axis(upstreamstub, transform.get_translation(), transform.get_translation().length());
115 tr.Debug <<
"Appended residue on pose. Residue: " << pose.
total_residue() <<
" Jump: " << pose.
num_jump() <<
" Anchor atom: " << residue->atom_name(residue->nbr_atom()) << std::endl;
120 for (
core::Size i = 1; i <= residue->natoms(); i++)
122 residue->set_xyz(i, transform.
local2global(residue->xyz(i)));
128 for (
core::Size i = 1; i <= residue->natoms(); i++)
130 residue->set_xyz(i, transform.
global2local(residue->xyz(i)));
137 residue->select_orient_atoms( a, b, c );
153 residue->xyz(residue->atom_index(
"CA")),
155 residue->xyz(residue->atom_index(
"CA")),
156 residue->xyz(residue->atom_index(
"C")));
166 if (residue->first_sidechain_atom() > residue->nheavyatoms())
168 return residue->xyz(residue->nbr_atom());
171 for (
core::Size i = residue->first_sidechain_atom(); i <= residue->nheavyatoms(); ++i)
173 centroid += residue->xyz(i);
176 centroid /= (1 + residue->nheavyatoms() - residue->first_sidechain_atom());