You are here

select_best_unique_ligand_poses output

3 posts / 0 new
Last post
select_best_unique_ligand_poses output
#1

For select_best_unique_ligand_poses output: is there a way to show the number of poses that he did not wrote out because the rmsd is too near to an already outputted pose for each outputted pose seperately? That is, sort of the "cluster" size.
Thanks

Post Situation: 
Thu, 2013-07-11 02:33
ast

Not without changing the C++ code. It keeps track of the minimum rmsd encountered, but not which structure encountered it. If you don't mind recompiling, it should be straightforward to implement, though. Just change src/apps/public/lignad_docking/select_best_unique_ligand_poses.cc as follows (untested):


00129 core::Real rms = 1e99;
++ core::Size best_pose = 0;
00130 utility::vector1 < core::Real > rms_list;
00131 for(core::Size j = 1; j <= selected_poses.size(); ++j) {
00132 // Can't break early if we want to compute the full rms table
00133 //if(rms < min_rmsd) break;
00134 core::Real this_rms = core::scoring::automorphic_rmsd(selected_poses[j]->residue(last_rsd), a_pose->residue(last_rsd), false /*don't superimpose*/);
00135 rms_list.push_back(this_rms);
+ if( this_rms < rms ) { best_pose = j; }
00136 rms = std::min(rms, this_rms);
00137 }
00138 if(rms >= min_rmsd) {
00139 selected_poses.push_back( a_pose );
00140 selected_scores.push_back( scores_list2[i].second );
00141 selected_tags.push_back( tag );
00142 rms_table.push_back( rms_list );
~~ TR << "Keeping " << tag << " as cluster " << selected_poses.size() << std::endl;
00144 } else {
~~ TR << "Skipping " << tag << " best match " << best_pose << " rmsd " << rms << std::endl;
00146 }
00147 }

In the tracer output will be an annotation of every pose skipped because of rmsd considerations, and which was the output structure with the best rmsd match. You'd then need to parse the tracer output for the appropriate lines to match things up. Keep in mind that there is an early out once you reach the number of output structures desired (so the last structure output will always have zero partners), so if you want the full cluster size against all of the top 5% by energy, you'll need to pass a really large value to -docking:ligand:max_poses

Thu, 2013-07-11 11:35
rmoretti

Thanks a lot!
Works like a charm.

cheers

Mon, 2013-07-15 08:12
ast