33 #include <numeric/random/random.hh>
34 #include <utility/exit.hh>
35 #include <basic/Tracer.hh>
38 #include <utility/tag/Tag.hh>
40 #include <utility/vector0.hh>
41 #include <utility/excn/Exceptions.hh>
42 #include <utility/vector1.hh>
45 #define foreach BOOST_FOREACH
51 namespace ligand_docking {
53 static basic::Tracer
rotate_tracer(
"protocols.ligand_docking.ligand_options.rotate", basic::t_debug);
75 residues(residues), atr(atr), rep(rep), jump(){}
78 residues(residues), atr(scores.first), rep(scores.second), jump(jump){}
82 return (
rep < ligand_info.
rep || (
rep == ligand_info.
rep &&
atr < ligand_info.
atr ) );
84 bool Ligand_info::operator<(std::pair<int,int>
const scores)
const{
85 return rep < scores.second || (rep == scores.second && atr < scores.first);
101 protocols::moves::Mover( that ),
102 rotate_info_(that.rotate_info_)
108 return new Rotate( *
this );
129 if ( tag->getName() !=
"Rotate" ){
130 throw utility::excn::EXCN_RosettaScriptsOption(
"This should be impossible");
132 if ( ! tag->hasOption(
"chain") )
throw utility::excn::EXCN_RosettaScriptsOption(
"'Rotate' mover requires 'chain' tag");
133 if ( ! tag->hasOption(
"distribution") )
throw utility::excn::EXCN_RosettaScriptsOption(
"'Rotate' mover requires 'distribution' tag");
134 if ( ! tag->hasOption(
"degrees") )
throw utility::excn::EXCN_RosettaScriptsOption(
"'Rotate' mover requires 'degrees' tag");
135 if ( ! tag->hasOption(
"cycles") )
throw utility::excn::EXCN_RosettaScriptsOption(
"'Rotate' mover requires 'cycles' tag");
145 if ( tag->hasOption(
"tag_along_chains") ){
148 foreach(
std::string tag_along_chain_str, tag_along_chain_strs){
165 if(grid_manager->
size() == 0)
265 ligands.push_back(best);
283 ligand_info.
jump= jump;
284 ligand_info.
atr= scores.first;
285 ligand_info.
rep= scores.second;
291 assert(tag_along_residues.size() == 1);
304 &&
check_RMSD(ligand_info, heavy_atom_number, ligands)
306 ligands.push_back(ligand_info);
317 mover->rb_jump(jump_id);
320 mover->rot_center(center);
325 mover->rb_jump(jump_id);
337 int const rep_threshold=0;
338 int const atr_threshold=-(
int) (0.85 * heavy_atom_number);
339 return ligand.
atr <= atr_threshold && ligand.
rep <= rep_threshold;
347 assert(heavy_atom_number > 0);
350 core::Real const diverse_rms = 0.65 * std::sqrt((
double) heavy_atom_number);
356 runtime_assert(these_residues.size() == compare_residues.size());
362 if (rms < diverse_rms)
return false;