[PyMOL] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files
Hello, I wanted to know if its possible in PyMOL to split a PDB file with multiple chains,into its component chains and make smaller PDB files corresponding to each chain. For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I make split it to separate components like 1a55_P.pdb, 1a55_Q.pdb, 1a55_R.pdb Also, in case I have a large number of multiple chain PDB files, how could I go about splitting each of them? Please help. - Anasuya Dighe -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files
Hi Anasuya, load 1a55.pdb create 1a55_P, 1a55 and c. P create 1a55_Q, 1a55 and c. Q create 1a55_R, 1a55 and c. R save 1a55_P.pdb, 1a55_P save 1a55_Q.pdb, 1a55_Q save 1a55_R.pdb, 1a55_R Andreas On 04/04/2013 11:19, Anasuya Dighe wrote: Hello, I wanted to know if its possible in PyMOL to split a PDB file with multiple chains,into its component chains and make smaller PDB files corresponding to each chain. For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I make split it to separate components like 1a55_P.pdb, 1a55_Q.pdb, 1a55_R.pdb Also, in case I have a large number of multiple chain PDB files, how could I go about splitting each of them? Please help. - Anasuya Dighe -- Andreas Förster, Research Associate Paul Freemont Xiaodong Zhang Labs Department of Biochemistry, Imperial College London http://www.msf.bio.ic.ac.uk -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files
Hi Anasuya, You can make the selections in PyMOL and save each chain separately. But if you have to do batch processing, you're probably better off using sed: sed -n /^.\{21\}P/p 1a55.pdb 1a55_P.pdb sed -n /^.\{21\}Q/p 1a55.pdb 1a55_Q.pdb sed -n /^.\{21\}R/p 1a55.pdb 1a55_R.pdb To automate completely, you can do (in bash): pdb=1a55.pdb for chain in $(grep ^ATOM $pdb | cut -b 22 | sort -u); do sed -n /^.\{21\}$chain/p $pdb ${pdb%.pdb}_$chain.pdb; done You can make that a small script, like 'chains.sh', containing: #!/bin/bash pdb=$1 for chain in $(grep ^ATOM $pdb | cut -b 22 | sort -u) do sed -n /^.\{21\}$chain/p $pdb ${pdb%.pdb}_$chain.pdb done That script you can run giving a pdb file as argument. Hope it helps, Tsjerk On Thu, Apr 4, 2013 at 12:19 PM, Anasuya Dighe anas...@mbu.iisc.ernet.inwrote: Hello, I wanted to know if its possible in PyMOL to split a PDB file with multiple chains,into its component chains and make smaller PDB files corresponding to each chain. For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I make split it to separate components like 1a55_P.pdb, 1a55_Q.pdb, 1a55_R.pdb Also, in case I have a large number of multiple chain PDB files, how could I go about splitting each of them? Please help. - Anasuya Dighe -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- Tsjerk A. Wassenaar, Ph.D. -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files
Hello Anasuya, On Thu, 2013-04-04 15:49 EDT, Anasuya Dighe anas...@mbu.iisc.ernet.in wrote: Hello, I wanted to know if its possible in PyMOL to split a PDB file with multiple chains,into its component chains and make smaller PDB files corresponding to each chain. For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I make split it to separate components like 1a55_P.pdb, 1a55_Q.pdb, 1a55_R.pdb Also, in case I have a large number of multiple chain PDB files, how could I go about splitting each of them? In addition to the other (manual) answers, there is a script on the PyMOL wiki that does exactly this. See: http://www.pymolwiki.org/index.php/Split_chains Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Dept. of Biomedical Molecular Sciences Botterell Hall Rm 644 Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 robert.campb...@queensu.cahttp://pldserver1.biochem.queensu.ca/~rlc -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net