[PyMOL] Get number of residues in model

2011-11-29 Thread Martin Hediger
Dear List How can I compute the numbers of residues in a model? Martin -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security

Re: [PyMOL] Get number of residues in model

2011-11-29 Thread Jason Vertrees
Hi Martin, You get three options: (1) You can count alpha carbons: fetch 1rx1, async=0 count_atoms n. CA (2) But, a protein could be missing alpha carbons then this is more complete (and the technique worth noting): n=0 select qq, polymer select pp, None python while cmd.count_atoms(qq):

Re: [PyMOL] Get number of residues in model

2011-11-29 Thread Tsjerk Wassenaar
Hi Martin, Here's a fourth option (and the technique worth noting :p ): print len( set( [(i.chain,i.resi,i.resn) for i in cmd.get_model(selection).atom] ) ) Cheers, Tsjerk On Tue, Nov 29, 2011 at 4:26 PM, Jason Vertrees jason.vertr...@schrodinger.com wrote: Hi Martin, You get three