Hi All,
I am script-plowing through PDB files and extracting unique chain
identifiers only for polymers using PyMOL's polymer selection. Right now
my code is a kind of brute force thing like this:
code
cmd.create (justpolys,polymer)
polymer_chains=[]
for a in cmd.index(justpolys):
Hi Seth,
So you just want to have all unique chain identifiers for the
'polymer' selection? Does the following give what you want?:
polychains = set([i.chain for i in cmd.get_model('polymer')])
Hope it helps,
Tsjerk
On Sun, Jan 23, 2011 at 10:04 AM, Seth Harris set...@gmail.com wrote:
Hi
Oops... That should've been:
polychains = set([i.chain for i in cmd.get_model('polymer').atom])
Sorry for that. :p
Tsjerk
On Sun, Jan 23, 2011 at 10:32 AM, Tsjerk Wassenaar tsje...@gmail.com wrote:
Hi Seth,
So you just want to have all unique chain identifiers for the
'polymer' selection?
Hi Seth,
I think this one-liner will do the job for you:
print cmd.get_chains('polymer')
Cheers,
Thomas
Seth Harris wrote, On 01/23/11 10:04:
Hi All,
I am script-plowing through PDB files and extracting unique chain
identifiers only for polymers using PyMOL's polymer selection. Right