17 #include <basic/options/option.hh>
29 #include <numeric/xyz.functions.hh>
30 #include <numeric/statistics.functions.hh>
45 #include <basic/options/keys/patterson.OptionKeys.gen.hh>
50 #include <basic/Tracer.hh>
54 #include <utility/vector1.hh>
57 #define _USE_MATH_DEFINES
69 namespace electron_density {
90 using namespace core::scoring::methods;
91 static basic::Tracer
TR(
"core.scoring.electron_density.PattersonCorrEnergy");
99 scoreRepacks = basic::options::option[ basic::options::OptionKeys::patterson::use_on_repack ]();
135 using namespace methods;
142 utility_exit_with_message(
"Density scoring function called but no map loaded.");
147 int virt_res_idx = root_edge.
start();
153 bool create_new_lre_container(
false );
155 if ( energies.long_range_container( lr_type ) == 0 ) {
156 create_new_lre_container =
true;
161 if ( dec->size() != pose.
total_residue() || dec->fixed() != virt_res_idx ) {
162 create_new_lre_container =
true;
166 if ( create_new_lre_container ) {
167 TR <<
"Creating new one-to-all energy container (" << pose.
total_residue() <<
")" << std::endl;
169 energies.set_long_range_container( lr_type, new_dec );
176 TR.Warning <<
"Fold tree is not set properly for patterson function scoring." << std::endl;
194 TR.Debug <<
"PattersonCorrEnergy::setup_for_scoring() returns PCC = " <<
pcc_structure << std::endl;
218 using namespace numeric::statistics;
229 TR.Debug <<
"Rescore residue " << rsd.seqpos() <<
" : patterson CC = " << cc << std::endl;
264 using namespace numeric::statistics;
266 int resid =
id.rsd();
267 int atmid =
id.atomno();
287 Vector const f1( atom_x.cross( atom_y ) );