Hi,
I would like to get secondary structure information from a PyMol file. I
know that the following command gives a long list of every residue:
>> iterate & n. ca, print resn,resi,ss
I found the following script, that gives you a more "condensed" list (see
below):
>> PyMOL>@.
Hi Ferdi,
It is better to post such questions to the user list. As you've
noticed I also answer mails there. But I'm not the only one, and
you'll get access to a whole community. Besides, the posts get
archived for future reference. Aside from that, it is commonly
regarded impolite to address such
Just want to confirm that this works beautifully.
Thanks so much, Tsjerk.
On Oct 10, 2007, at 3:25 AM, Tsjerk Wassenaar wrote:
Hi Frieda,
I had to rewrite the script to get the output desired, now also
using a class definition :p
It works fine for me:
PyMOL>@../..\ss.pml
PyMOL>class SSList
Hi Frieda,
I had to rewrite the script to get the output desired, now also using a
class definition :p
It works fine for me:
PyMOL>@../..\ss.pml
PyMOL>class SSList:\
PyMOL>list = []\
PyMOL>def purge( self, resi, ss ):\
PyMOL>if not self.list or self.list[-1][0] != ss:\
PyMOL>self.list.append( [ss
Hi everyone,
Sorry for posting my replies to the list; I hope this is all generally
useful.
Firstly, the bug: the obvious cause is if the line "if ss == currentType:"
is never true. In that case, it is making a list of one-residue sses, with,
as Tsjerk correctly pointed out, the default end of -1.
Hi Tsjerk,
I am getting two errors. Is there a problem with line endings? I am
taking the code in emails and on the wiki and pasting it into a text
editor (BBEdit), then copying that and pasting into the PyMOL command
line. The text editor is saving the text with Unix (LF) which I take
to
Hi Gilleain,
I tried the code with a different, single pdb file (1CRN) loaded in
PyMOL, and got the same output formatting.
The original PyMOL file I am working with has seven different protein
structures in it. The pdb IDs are
1ujc
1h2e
1k6m
1e58
1nt4
1dkq
1qwo
and they have been aligned
Hi Gillean,
For what it's worth, I experienced the same... No dashes in the numbers:
1-1
1--1 L
1-2
2--1 L
2-3
3--1 L
...
etc.
The double dash must come from the "-1" value used as default for your SSE
class. Better double check what's going on there :)
Cheers,
Tsjerk
On 10/9/07, gilleain
Hi Frieda,
That's odd. It seems to work okay for mulitchain proteins (I'll add
some extra bits to handle chains).
The "--" in the output is weird. It suggests that either the start
numbers end in a dash or the end number start with a dash. It's
difficult to diagnose the bug, if bug there is, with
Hi Frieda,
The slash should tell Pymol that the following should be parsed as python
code, but it should work without too, since "while" is a python keyword. The
output you show bothers me. For my case it gives:
[['PRO', '7', 'L'], ['ASP', '8', 'L'], ['PRO', '9', 'H'], ['ALA', '16',
'H'], ['LEU',
Hi Tsjerk, Frieda,
I made a different solution (I can't get Tsjerk's to work, oddly -
it looks
like it should step through sses correctly, but I can't see why the "
sslist.pop(i)" gives what it should).
Anyway, my 'versions' :) are on the wiki as:
http://www.pymolwiki.org/index.php/Ss
whic
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 "", line 2
Hi Gillean, Frieda,
The versions posted on the wiki should work for older versions of
Python/Pymol. Don't see why it shouldn't.
Anyway, in my implementation, the pop(i) throws out the element which is the
same as the next one, for each element. After that, sslist contains exactly
what is requested
Hi Tsjerk, Frieda,
I made a different solution (I can't get Tsjerk's to work, oddly - it looks
like it should step through sses correctly, but I can't see why the "
sslist.pop(i)" gives what it should).
Anyway, my 'versions' :) are on the wiki as:
http://www.pymolwiki.org/index.php/Ss
which
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 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 wa
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 wrote:
>
> Hi,
>
> I would like to get secondary structure informa
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
17 matches
Mail list logo