Hi Tsjerk,
When I paste your script into the command line of PyMol (MacPyMol to
be exact), this is the response:
Traceback (most recent call last):
File "/home/local/warren/MacPyMOL070703/build/Deployment/
MacPyMOL.app/pymol/modules/pymol/parser.py", line 456, in parse
File "<string>", line 2
iterate n. ca, sslist.append( [resn,resi,ss] )
^
SyntaxError: invalid syntax
Is there a way to correct this? (BTW, I am not a python scripter. I
have some experience with javascript, so I see some similarity, but
the syntax is probably going to evade me).
Thanks,
Frieda
On Oct 9, 2007, at 3:35 AM, Tsjerk Wassenaar wrote:
Hi Frieda,
In addition to my previous mail, the following works for me:
sslist=[]
iterate n. ca, sslist.append( [resn,resi,ss] )
/i=1, j=len(sslist)-1
/while i<j:\
if sslist[i][2] == sslist[i+1][2]:\
sslist.pop[i]\
j = j - 1\
else:\
i=i+2
Hope it helps,
Tsjerk
On 10/9/07, Tsjerk Wassenaar < tsje...@gmail.com> wrote:
Hi Frieda,
There's no such command. You'll have to parse the output you get
through a script which filters it in the way you want. This isn't
difficult though (good python exercise :p).
Best,
Tsjerk
On 10/9/07, Frieda Reichsman < frie...@nsm.umass.edu> wrote:
Hi,
I would like to get secondary structure information from a PyMOL
file. I searched the list and found this:
> I need a list of the secondary structure assigned to each
residue by dss in
> pymol. Is there a simple way to write this information to a
file, or dump it
> to the screen?
To dump it to the screen, try:
iterate <object name> & n. ca, print resn,resi,ss
and it works, but the output is a long list of every residue. Is
there a command to get the output more succinctly, such as
1-5 L
6-10 H
11-15 S
Thanks,
Frieda
///////////////////////////////////////////
Frieda Reichsman
Molecules in Motion
Interactive Molecular Structures
http://www.moleculesinmotion.com
///////////////////////////////////////////
----------------------------------------------------------------------
---
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a
browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users
--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
///////////////////////////////////////////
Frieda Reichsman
Molecules in Motion
Interactive Molecular Structures
http://www.moleculesinmotion.com
///////////////////////////////////////////