47 #include <basic/options/option.hh>
49 #include <basic/options/keys/fast_loops.OptionKeys.gen.hh>
54 #include <basic/Tracer.hh>
56 #include <basic/options/keys/out.OptionKeys.gen.hh>
57 #include <basic/options/keys/loops.OptionKeys.gen.hh>
58 #include <utility/io/ozstream.hh>
61 #include <basic/options/option_macros.hh>
68 #include <utility/vector1.hh>
69 #include <ObjexxFCL/format.hh>
75 namespace ObjexxFCL {
namespace fmt { } }
using namespace ObjexxFCL::fmt;
83 namespace loop_closure {
90 static basic::Tracer
tr(
"protocols.loops.loop_closure.ccd.FASelectSlidingWindowLoopClosure");
94 FASelectSlidingWindowLoopClosure::FASelectSlidingWindowLoopClosure(
113 return "FASelectSlidingWindowLoopClosure";
123 using namespace basic::options;
124 using namespace basic::options::OptionKeys;
125 NEW_OPT( fast_loops::rmsd_dump,
"dump all pdbs for loops that are below in rmsd", 2.0 );
131 using namespace fragment;
142 typedef std::list< std::pair< core::Real, FragID > > FragList;
143 FragList scored_frags;
146 FragStore< Real > rms_store(
"loop_rms");
147 FragStore< Real > fascore_store(
"fa_score");
148 FragStore< Real > post_relax_rms_store(
"post_relax_looprms");
150 FragStore< Real > chainbreak_store(
"chainbreak");
151 FragStore< Real > overlap_store(
"overlap");
156 scored_frags.push_back( std::make_pair( score_store.retrieve( *it ), *it ) );
159 scored_frags.reverse();
162 tr.Debug <<
"try " << Ntest <<
" of " << Ntot <<
" fragments in full-atom mode" << std::endl;
168 std::string frag_file=basic::options::option[ basic::options::OptionKeys::out::file::silent ]()+
"_best_frags";
170 FragList::iterator frag_list_it = scored_frags.begin();
171 for (
Size ct = 1; ct <= Ntest; ct ++, ++frag_list_it ) {
172 FragID
const& frag( frag_list_it->second );
174 Pose centroid_pose( more_cut );
177 frag.apply(
movemap(), centroid_pose );
184 if (
tr.Trace.visible() ) fa_pose.
dump_pdb(
"set_fold_tree_fa_pose.pdb");
188 fa_frame_->steal( centroid_pose );
189 fa_frame_->apply( 1, fa_pose );
191 if (
tr.Trace.visible() ) fa_pose.
dump_pdb(
"fa_pose.pdb");
192 if (
tr.Trace.visible() ) centroid_pose.
dump_pdb(
"centroid.pdb" );
194 if ( rms_store.retrieve( frag ) < basic::options::option[ basic::options::OptionKeys::fast_loops::rmsd_dump ]() ) {
202 if ( rms_store.retrieve( frag ) < basic::options::option[ basic::options::OptionKeys::fast_loops::rmsd_dump ]() ) {
207 if (
tr.Trace.visible() ) fa_pose.
dump_pdb(
"fa_relaxed_pose.pdb");
214 fascore_store.store( frag, fa_score );
215 post_relax_rms_store.store( frag, post_relax_looprms );
217 utility::io::ozstream frag_stream;
218 frag_stream.open_append( frag_file );
220 Real const size_fraction( 1.0*frag.frame().length() /
loop_.
size());
221 frag_stream << RJ( 10, vdw_store.retrieve( frag ) )<<
" "
222 << RJ( 10, score_store.retrieve( frag ) )<<
" "
223 << RJ( 10, chainbreak_store.retrieve( frag) )<<
" "
224 << RJ( 10, overlap_store.retrieve( frag ) )<<
" "
225 << RJ( 10, rms_store.retrieve( frag ) )<<
" "
226 << RJ( 10, fascore_store.retrieve( frag ) )<<
" "
227 << RJ( 10, post_relax_rms_store.retrieve( frag ) )<<
" "
228 << RJ( 10, size_fraction ) <<
" "
253 using namespace basic::options;
258 scorefxn->show( std::cout, pose );
259 std::cout << std::endl;
262 bool const fix_natsc = basic::options::option[ basic::options::OptionKeys::loops::fix_natsc ];
267 relax::FastRelax fast_relax( scorefxn, option[ OptionKeys::fast_loops::fast_relax_sequence_file ]() );
269 fast_relax.
apply( pose );
270 return (*scorefxn)( pose );