From: <nat...@us...> - 2012-03-01 20:29:44
|
Revision: 14984 http://cctbx.svn.sourceforge.net/cctbx/?rev=14984&view=rev Author: natechols Date: 2012-03-01 20:29:38 +0000 (Thu, 01 Mar 2012) Log Message: ----------- tweaks to pdb symmetry search, including gui stuff Modified Paths: -------------- trunk/mmtbx/command_line/search_pdb_symmetry.py trunk/mmtbx/pdb_symmetry.py Modified: trunk/mmtbx/command_line/search_pdb_symmetry.py =================================================================== --- trunk/mmtbx/command_line/search_pdb_symmetry.py 2012-03-01 19:42:36 UTC (rev 14983) +++ trunk/mmtbx/command_line/search_pdb_symmetry.py 2012-03-01 20:29:38 UTC (rev 14984) @@ -1,15 +1,20 @@ import iotbx.phil from libtbx.utils import Sorry, Usage +from libtbx import group_args import sys master_phil = iotbx.phil.parse(""" symmetry_search + .short_caption = PDB symmetry search .caption = This utility allows you to search the PDB for structures with \ similar unit cell parameters. Crystallization artifacts due to \ impurities in the protein solution can often be detected this way, if the \ - protein which actually crystallized has been solved before. - .style = auto_align caption_img:icons/custom/db_lookup.png + protein which actually crystallized has been solved before. Note that \ + a large number of false positives are usually expected for genuinely \ + novel structures, so the presence of similar unit cells is not \ + necessarily a bad sign. + .style = box auto_align caption_img:icons/custom/pdb_import64.png { file_name = None .type = path @@ -63,6 +68,7 @@ niggli_cell = symm.niggli_cell().unit_cell().parameters() print >> out, "" print >> out, "Top %d matches (sorted by RMSD):" + results = [] for scored in scores[:params.max_hits_to_display] : print >> out, "%s (rmsd = %.3f, volume ratio = %.2f)" % \ (scored.entry.pdb_id, scored.rmsd, scored.volume_ratio) @@ -73,6 +79,14 @@ print >> out, " Target cell: %8.3f %8.3f %8.3f %8.3f %8.3f %8.3f" % \ niggli_cell print >> out, "" + results.append(group_args( + pdb_id=scored.entry.pdb_id, + rmsd=scored.rmsd, + volume_ratio=scored.volume_ratio, + pdb_symmetry=scored.entry.crystal_symmetry)) + return group_args( + crystal_symmetry=symm, + hits=results) def validate_params (params) : params = params.symmetry_search Modified: trunk/mmtbx/pdb_symmetry.py =================================================================== --- trunk/mmtbx/pdb_symmetry.py 2012-03-01 19:42:36 UTC (rev 14983) +++ trunk/mmtbx/pdb_symmetry.py 2012-03-01 20:29:38 UTC (rev 14984) @@ -83,7 +83,10 @@ for entry in symmetry_db : entry_volume = entry.niggli_cell.unit_cell().volume() entry_uc = entry.niggli_cell.unit_cell().parameters() - rmsd = rms_difference(niggli_uc, entry_uc) + # XXX suggested by James Holton - sum separate RMSDs for edge lengths and + # angles + rmsd = rms_difference(niggli_uc[0:3], entry_uc[0:3]) + \ + rms_difference(niggli_uc[3:6], entry_uc[3:6]) if (max_rmsd is not None) and (rmsd > max_rmsd) : continue scores.append(group_args(entry=entry, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |