29 #include <basic/options/keys/in.OptionKeys.gen.hh>
31 #include <basic/options/keys/lh.OptionKeys.gen.hh>
32 #include <basic/options/keys/wum.OptionKeys.gen.hh>
34 #include <basic/options/option.hh>
45 #include <utility/vector1.hh>
49 #include <utility/excn/Exceptions.hh>
54 #if defined(WIN32) || defined(__CYGWIN__)
62 static basic::Tracer
TR(
"WorkUnit_LoopHash");
78 TR.Debug <<
"Setting type to WU_Type_LoopHash" << std::endl;
84 using namespace basic::options;
85 using namespace basic::options::OptionKeys;
88 core::Size num_partitions = option[ OptionKeys::wum::n_slaves_per_master]();
89 if( option[ OptionKeys::lh::num_partitions].user() )
90 num_partitions = option[ OptionKeys::lh::num_partitions]();
91 core::Size assigned_num = mpi_rank % num_partitions;
97 catch( utility::excn::EXCN_Msg_Exception e ){
108 using namespace core::pose;
109 using namespace protocols::loops;
110 using namespace basic::options;
111 using namespace basic::options::OptionKeys;
114 TR <<
"Empty WorkUnit ! Cannot execute run() " << std::endl;
127 TR <<
"Executing WorkUnit_LoopHash_Mover..." << std::endl;
136 if( option[ OptionKeys::lh::bss]() ) lsampler.
set_nonideal(
true);
139 if( pose.is_fullatom() ){
144 TR.Info <<
"Running loophash function: Start: " <<
get_start() <<
" End: " <<
get_end() << std::endl;
150 TR.Info <<
"Build " <<
decoys().
size() <<
" structures in " << endtime - starttime <<
" s " << std::endl;
162 (*it)->copy_scores( *start_struct );
163 (*it)->add_energy(
"censcore", censcore );
165 (*it)->add_string_value(
"husid", (*it)->get_string_value(
"husid") +
"." + new_usid );
166 (*it)->add_string_value(
"usid", new_usid );
167 (*it)->add_energy(
"state", 1 );
169 if( option[ OptionKeys::lh::bss]() ) {
172 if( (pss != NULL) && (pss2 != NULL) ){
173 TR.Debug <<
"LoophashResult: " << pss->
CA_rmsd( *pss2 ) <<
" " << pss->
get_energy(
"censcore") << std::endl;
175 TR <<
"LoophashResult: ERROR, dynamic cast to BSS failed" << std::endl;
180 if( (pss != NULL) && (pss2 != NULL) ){
181 TR.Debug <<
"LoophashResult: " << pss->
CA_rmsd( *pss2 ) <<
" " << pss->
get_energy(
"censcore") << std::endl;
183 TR <<
"LoophashResult: ERROR, dynamic cast to PSS failed" << std::endl;