Re: [PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Seth Harris
Thanks Thomas and Tsjerk for pointing me back to the path...from my quicksand and brambles where I knew I was off! Brilliant. Seems to be an unfortunate habit I have in scripting where it's like "Why use a simple, elegant one-liner when a mess of impenetrable hack-arounds would do?" I had forgotten

Re: [PyMOL] unable to open the file

2011-01-23 Thread Christoph Gohlke
You can try the attached patch. It fixes three issues: * is_string() returns False in case of unicode filenames * Python/Tk bug http://bugs.python.org/issue5712 * filenames containing whitespace Christoph On 1/23/2011 7:02 AM, wang_qi wrote: Hello, everyone, I have downloaded the pymol of vers

[PyMOL] unable to open the file

2011-01-23 Thread wang_qi
Hello, everyone, I have downloaded the pymol of version 1.3. and installed it on windows XP successfully. But when selecting "file-open" to load my file, it doesn't work and displays that the file is unable to be opend. Dose anyone meet this problem? Ana how how can i solve it? Thanks. Qi Wan

Re: [PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Thomas Holder
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. R

Re: [PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Tsjerk Wassenaar
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 wrote: > Hi Seth, > > So you just want to have all unique chain identifiers for the > 'polymer' selection? Does the follo

Re: [PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Tsjerk Wassenaar
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 wrote: > Hi All, > I am script-

[PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Seth Harris
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: cmd.create ("justpolys","polymer") polymer_chains=[] for a in cmd.index("justpolys"):