From: Thomas H. <tho...@sc...> - 2016-05-25 16:31:45
|
or simply: alter bound_combined, chain = chr(ord(chain) - 1) Cheers, Thomas On 25 May 2016, at 11:06, Tsjerk Wassenaar <ts...@gm...> wrote: > Hi James, > > This should do: > > for i in range(65:78): cmd.alter("bound_combined and chain %s"%chr(i+1),'chain="%s"'%chr(i)) > > Cheers, > > Tsjerk > > > On Wed, May 25, 2016 at 5:00 PM, James Starlight <jms...@gm...> wrote: > More precisely I would like to know how to script in pymol the > following alteration fo the chains for the multi-chain pdb > > > PyMOL>alter (bound_combined and chain B), chain="A" > Alter: modified 5157 atoms. > PyMOL>alter (bound_combined and chain C), chain="B" > Alter: modified 2285 atoms. > PyMOL>alter (bound_combined and chain D), chain="C" > Alter: modified 2778 atoms. > PyMOL>alter (bound_combined and chain E), chain="D" > Alter: modified 1560 atoms. > PyMOL>alter (bound_combined and chain F), chain="E" > Alter: modified 1114 atoms. > PyMOL>alter (bound_combined and chain G), chain="F" > Alter: modified 950 atoms. > PyMOL>alter (bound_combined and chain H), chain="G" > Alter: modified 895 atoms. > PyMOL>alter (bound_combined and chain I), chain="H" > Alter: modified 843 atoms. > PyMOL>alter (bound_combined and chain J), chain="I" > Alter: modified 806 atoms. > PyMOL>alter (bound_combined and chain K), chain="J" > Alter: modified 574 atoms. > PyMOL>alter (bound_combined and chain L), chain="K" > Alter: modified 501 atoms. > PyMOL>alter (bound_combined and chain M), chain="L" > Alter: modified 511 atoms. > PyMOL>alter (bound_combined and chain N), chain="M" > Alter: modified 433 atoms. > > > So each step we rename chain i to the i-1 name within given model :) > > Thanks! > > J. > > 2016-05-23 19:11 GMT+02:00 James Starlight <jms...@gm...>: > > Dear Pymol users! > > > > After some post-processing of MD simulation I have extracted from the > > traejctory several snapshots as individual pdbs which I need to > > 1- to re-assign information regarding chain letters (which was lost > > after some operations on pdbs) for all of those structures assuming > > that within each of these pdbs residues are ordered correctly e.g from > > (1-104 which > > should be chain A) than from 1-100 (it should be chain B), than 1-70 > > (in should be chain C) etc. > > > > 2- superimpose and combine all of the pdbs within one model in nmr-like format. > > > > Thanks for help! > > > > James > > -- > Tsjerk A. Wassenaar, Ph.D. -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |