28 #include <basic/Tracer.hh>
35 #include <numeric/deriv/distance_deriv.hh>
41 #include <utility/vector1.hh>
66 static basic::Tracer
TR(
"core.mm.MMBondLengthEnergy");
138 TR(basic::t_trace) <<
"residue_pair_energy: processing residues "
139 << rsd1.
seqpos() <<
"." << rsd1_type.
name() <<
"-"
140 << rsd2.
seqpos() <<
"." << rsd2_type.
name() << std::endl;
144 for (
Size ii = 1; ii <= r1_resconn_ids.size(); ++ii ) {
145 Size const resconn_id1( r1_resconn_ids[ii] );
155 TR(basic::t_trace) <<
"Found residue connection id " << resconn_id1 <<
"-" << resconn_id2 <<
": "
156 << rsd1.
atom_name( resconn_atomno1 ) <<
"-" << rsd2.
atom_name( resconn_atomno2 ) << std::endl;
162 ( rsd1.
atom( resconn_atomno1 ).
xyz()-rsd2.
atom( resconn_atomno2 ).
xyz() ).length();
165 <<
"r1 " << resconn_atomno1 <<
" " << rsd1.
atom_name( resconn_atomno1 ) <<
"("
166 << rsd1_type.
atom( resconn_atomno1 ).
mm_name() <<
") - "
167 <<
"r2 " << resconn_atomno2 <<
" " << rsd2.
atom_name( resconn_atomno2 ) <<
"("
168 << rsd2_type.
atom( resconn_atomno2 ).
mm_name() <<
")" << std::endl;
170 energy +=
potential_.mm::MMBondLengthScore::score
188 TR(basic::t_trace) <<
"MMIntrares Processing residue " << rsd.
seqpos() <<
" " << rsd_type.
name()
192 for (
Size atm_i=1; atm_i<=rsd_type.
natoms(); ++atm_i) {
194 for (
Size j=1; j<=atm_nbrs.size(); ++j) {
195 Size atm_j = atm_nbrs[j];
207 <<
"r1 " << atm_i <<
" " << rsd.
atom_name( atm_i ) <<
"("
209 <<
"r2 " << atm_j <<
" " << rsd.
atom_name( atm_j ) <<
"("
210 << rsd_type.
atom( atm_j ).
mm_name() <<
")" << std::endl;
213 energy +=
potential_.mm::MMBondLengthScore::score
241 Size const atomno(
id.atomno());
245 for (
Size j=1; j<=atm_nbrs.size(); ++j) {
246 Size atm2 = atm_nbrs[j];
257 numeric::deriv::distance_f1_f2_deriv( rsd.
xyz( atomno ), rsd.
xyz( atm2 ), d, f1, f2 );
268 for (
Size ii = 1; ii <= connections.size(); ++ii ) {
269 Size const ii_resconn = connections[ ii ];
278 Size const mmat2 = neighb_restype.atom( neighb_atom1 ).mm_atom_type_index();
281 if ( rsd_type.
atom_type(atomno).
is_virtual() || neighb_restype.atom_type(neighb_atom1).is_virtual() )
286 numeric::deriv::distance_f1_f2_deriv( rsd.
xyz( atomno ), neighb_res.xyz( neighb_atom1 ), d, f1, f2 );