[Chimera-users] clustering models of a single pdb

Eric Pettersen pett at cgl.ucsf.edu
Mon Sep 28 10:39:35 PDT 2020

Hi Subhrangshu,
	You would need to be pretty good with Python to do this.  First, you would want to look at this: Very Basic Chimera Programming Primer <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html> to get an idea of how to write a script for Chimera to process many data files.
	Second, scripting the MD Movie dialog is almost impossible, so I think you want to use the Ensemble Cluster dialog instead.  Your workflow would basically be:

1) Open 100 pdb files.
2) Delete the parts you don't want in the clustering calculation (e.g hydrogens)
3) Bring up a Ensemble Cluster dialog for your files.
4) Save the clustering
5) Close your files and the dialog and repeat as necessary

Tips on the above:

#2: There aren't commands that exactly match what the Movie dialog does.  "del solvent" and "del H" will delete solvent and hydrogens.  "del ions" will delete all ions, so if there are particular metals you would want to preserver, for instance magnesium, you would have to modify that to "del ions & ~ Mg".

#3: You are going to need to bring up the dialog using Python code, because you will need a Python reference to the dialog.  The code for that is:

from EnsembleMatch import EnsembleCluster
d = EnsembleCluster(chimera.openModels.list(), "")

#4: In order to save the clustering, you are going to have to replicate the code for _SaveClusteringInfo.Apply (which uses the dialog instance) found in EnsembleMatch/base.py, which is in <your Chimera installation>/share (or Chimera.app/Contents/Resources/share on a Mac).

#5: Close the dialog with d.Quit()


	Eric Pettersen
	UCSF Computer Graphics Lab

> On Sep 25, 2020, at 12:40 PM, Subhrangshu Das <subhrangshu73das at gmail.com> wrote:
> Dear sir,
> I have 100 pdb files. named as output.1.pdb to output.100.pdb
> what i do manually for clustering is as follows
> 1. select 100 pdbs ->  open in chimera -> golto File -> save PDB.. -> Save Multiple Models as PDB File (renamed as all.pdb)
> 2. open chimera -> goto Tools -> MD/Ensemble Analysis -> MD Movie
> 3. in Get Ensemble Info dialogue box set -> Trajectory format : PDB 
>                                                                       PDB frames contained in: single file
>                                                                       Browse to select File <all.pdb> 
>                                                                       Use frames first through last
> 4. on click OK, a dialogue box pops out, MD Movie: PDB trajectory from all.pdb, in which, goto Analysis -> Cluster...
> 5.. on click Cluster, a dialogue box pops out, Get Clustering Parameters, in which I set  Cluster trajectory as:
> Starting frame:  1
> step size:  1
> Ending frame: 100
> Cluster based on current selection, if any: true
> Ignore solvent and non metal ions: true
> Ignore hydrogens: true
> Ignore metal ions:  alkali
> 6. on click OK, after some RMSD calculation, i get the Clustering result, which I save to a text file <cluster> 
> Now, as I need to do this for multiple times, I want to automate these steps by a python script. Can you please help with a scipt or some command help for the aforesaid tasks. Any help will be helpful in these regard.
> -- 
> Thanks & Regards,
> Subhrangshu Das
> Junior Research Fellow, CSIR-IICB
> Department of Structural Biology & Bioinformatics
> Contact - IICB TRUE Campus, CN-6, Salt lake, Sector V, Kolkata-700091
> +919804938813
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200928/726fb6ce/attachment.html>

More information about the Chimera-users mailing list