21 #include <basic/Tracer.hh>
34 #include <utility/tag/Tag.hh>
35 #include <utility/string_util.hh>
36 #include <ObjexxFCL/FArray1D.hh>
37 #include <utility/excn/Exceptions.hh>
38 #include <ObjexxFCL/format.hh>
41 namespace simple_filters {
43 static basic::Tracer
TR(
"protocols.simple_filters.DdgFilter" );
56 ddg_threshold_( -15.0 ),
59 use_custom_task_(false),
67 translate_by_(DEFAULT_TRANSLATION_DISTANCE)
77 bool const symmetry ) :
79 ddg_threshold_(ddg_threshold),
80 scorefxn_(scorefxn->
clone()),
82 use_custom_task_( false ),
83 repack_bound_( true ),
84 relax_bound_( false ),
90 translate_by_(DEFAULT_TRANSLATION_DISTANCE)
96 TR <<
"PB enabled" << std::endl;
131 using namespace core::scoring;
138 repack( tag->getOption<
bool >(
"repack", 1 ) );
139 symmetry_ = tag->getOption<
bool>(
"symmetry", 0 );
142 repack_bound( tag->getOption<
bool>(
"repack_bound", 1 ) );
143 relax_bound( tag->getOption<
bool>(
"relax_bound", 0 ) );
146 if( tag->hasOption(
"relax_mover" ) )
149 if(tag->hasOption(
"chain_num"))
155 throw utility::excn::EXCN_RosettaScriptsOption(
"ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." );
158 TR<<
"ddg filter with threshold "<<
ddg_threshold_<<
" repeats="<<
repeats()<<
" and scorefxn "<<scorefxn_name<<
" with symmetry " <<std::endl;
166 TR <<
"PB enabled. Translation distance = " <<
translate_by_ <<
" A" << std::endl;
168 TR.Warning <<
"Translation distance may be too large for PB-enabled scoring. Consider 100 (default) if you run out of memory: " <<
translate_by_ << std::endl;
179 utility::lua::LuaObject
const & score_fxns,
180 utility::lua::LuaObject
const & ) {
181 using namespace core::scoring;
182 if( def[
"scorename"] )
184 if( def[
"scorefxn"] ) {
191 repeats( def[
"repeats"] ? def[
"repeats"].to<core::Size>() : 1 );
192 repack( def[
"repack"] ? def[
"repack"].to<bool>() :
true );
193 symmetry_ = def[
"symmetry"] ? def[
"symmetry"].to<
bool>() :
false;
194 repack_bound_ = def[
"repack_bound"] ? def[
"repack_bound"].to<
bool>() :
true;
195 relax_bound_ = def[
"relax_bound"] ? def[
"relax_bound"].to<
bool>() :
false;
198 if( def[
"chain_num"] ) {
200 for (utility::lua::LuaIterator i=def[
"chain_num"].begin(),
end; i !=
end; ++i) {
206 utility_exit_with_message(
"ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." );
218 TR<<
"ddg is "<<pose_ddg<<
" ";
220 TR<<
"passing"<<std::endl;
223 TR<<
"failing"<<std::endl;
231 out<<
"ddg "<<pose_ddg<<
'\n';
277 utility_exit_with_message(
"ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." );
278 using namespace protocols::moves;
292 translate->trans_axis(translation_axis);
293 translate->apply( split_pose );
299 translate->apply( split_pose );
304 core::Real const dG( bound_energy - unbound_energy );