23 #include <basic/options/option.hh>
28 #include <basic/Tracer.hh>
31 #include <utility/assert.hh>
41 #include <utility/tag/Tag.hh>
43 #include <utility/vector0.hh>
44 #include <utility/vector1.hh>
45 #include <numeric/random/random.hh>
46 #include <boost/foreach.hpp>
52 #define foreach BOOST_FOREACH
55 namespace ligand_docking {
57 static basic::Tracer
ligand_design_tracer(
"protocols.ligand_docking.LigandDesign", basic::t_debug);
73 return "LigandDesign";
77 Mover::type(
"LigandDesign" );
83 protocols::moves::Mover( that ),
84 option_file_(that.option_file_),
85 fragments_(that.fragments_)
97 ligand_design_tracer<< fragment_types.size()<<
" fragment_types"<< std::endl;
102 ligand_design_tracer<<
"frag_name: "<< temp->name()<< std::endl;
115 return "LigandDesign";
128 if ( tag->getName() !=
"LigandDesign" ) {
129 ligand_design_tracer <<
" received incompatible Tag " << tag << std::endl;
133 if ( tag->hasOption(
"option_file") ) {
147 ligand_design_tracer<< res.
name();
149 ligand_design_tracer<<
" has incomplete connection"<< std::endl;
152 ligand_design_tracer<<
" completely connected"<< std::endl;
154 ligand_design_tracer<<
"no more connections"<< std::endl;
162 ligand_design_tracer<<
"Reached heavy atom limit"<< std::endl;
166 ligand_design_tracer<<
"Reached chi angle limit"<< std::endl;
176 return numeric::random::random_element(incomplete_connections);
183 for(
core::Size i=1; i<= residue->n_residue_connections(); ++i){
184 if(residue->connection_incomplete(i)){
185 incomplete_connections.push_back(i);
188 return incomplete_connections;
200 unconnected_residues.push_back(start);
203 return unconnected_residues;
210 using namespace basic::options::OptionKeys;
211 using basic::options::option;
214 assert(ligand.is_ligand());
215 assert( ligand.n_residue_connections() > 0);
221 core::Size const & grow_from= numeric::random::random_element(unconnected_residues);
238 ligand_design_tracer<<
"name, total, incomplete"<< name<<
" "<< total<<
" "<< incomplete<< std::endl;