23 #include <basic/options/keys/OptionKeys.hh>
36 #include <basic/Tracer.hh>
42 #include <utility/vector1.hh>
56 static basic::Tracer
tr(
"core.scoring.LinearChainbreak", basic::t_info);
131 upper_rsd.
atom(
"OVU1" ).
xyz());
134 Stub manual_lower_stub(lower_rsd.
atom(
"OVL2").
xyz(),
138 if (
distance(lower_stub, manual_lower_stub) > 0.01)
139 tr.Warning <<
"WARNING: mismatch between manual computed and atom-tree stub: "
140 << lower_stub <<
" " << manual_lower_stub << std::endl;
143 manual_lower_stub.M.col_x().distance(upper_stub.M.col_x()) +
144 manual_lower_stub.M.col_y().distance(upper_stub.M.col_y()) +
145 manual_lower_stub.M.col_z().distance(upper_stub.M.col_z());
159 Real total_dev = 0.0;
160 Real total_ovp = 0.0;
174 for (
Size i = 1; i <= cutpoints.size(); ++i) {
175 const int cutpoint = cutpoints[i];
190 tr.Trace <<
"Chainbreak skipped-- "
198 total_ovp +=
do_score_ovp(lower_rsd, upper_rsd, nbb, cutpoint, pose);
221 using namespace basic::options;
222 using namespace basic::options::OptionKeys;
232 Size const residue =
id.rsd();
236 Vector const & xyz_moving( pose.
xyz(
id ) );
240 Size const nbb( lower_rsd.mainchain_atoms().size() );
241 if (
id.atomno() == lower_rsd.mainchain_atoms()[nbb] ) {
242 xyz_fixed = upper_rsd.atom(
"OVU1" ).xyz();
243 }
else if ( lower_rsd.atom_name(
id.atomno() ) ==
"OVL1" ) {
244 xyz_fixed = upper_rsd.atom( upper_rsd.mainchain_atoms()[1] ).
xyz();
245 }
else if ( lower_rsd.atom_name(
id.atomno() ) ==
"OVL2" ) {
246 xyz_fixed = upper_rsd.atom( upper_rsd.mainchain_atoms()[2] ).
xyz();
252 Vector const f2 ( xyz_moving - xyz_fixed );
253 Real const dist ( f2.length() );
254 if ( dist >= 0.01 ) {
255 Real const invdist( 1.0 / dist );
256 F1 += weights[
linear_chainbreak ] * invdist * cross( xyz_moving, xyz_fixed ) / 3;
266 Vector const & xyz_moving( pose.
xyz(
id ) );
270 Size const nbb( lower_rsd.mainchain_atoms().size() );
271 if (
id.atomno() == upper_rsd.mainchain_atoms()[1] ) {
272 xyz_fixed = lower_rsd.atom(
"OVL1" ).xyz();
273 }
else if (
id.atomno() == upper_rsd.mainchain_atoms()[2] ) {
274 xyz_fixed = lower_rsd.atom(
"OVL2" ).xyz();
275 }
else if ( upper_rsd.atom_name(
id.atomno() ) ==
"OVU1" ) {
276 xyz_fixed = lower_rsd.atom( lower_rsd.mainchain_atoms()[nbb] ).
xyz();
282 Vector const f2 ( xyz_moving - xyz_fixed );
283 Real const dist ( f2.length() );
284 if ( dist >= 0.01 ) {
285 Real const invdist( 1.0 / dist );
286 F1 += weights[
linear_chainbreak ] * invdist * cross( xyz_moving, xyz_fixed ) / 3;