Re: [PyMOL] How to export secondary structure information from aPDBusing PyMol?

2016-05-14 Thread Tsjerk Wassenaar
Hi Zhang Chen,

Yes, Pymol only recognizes Helix (3-,alpha,pi), Sheet and Loop (including
turns and such).

Best,

Tsjerk
On May 14, 2016 13:55, "ZHANG Cheng" <272699...@qq.com> wrote:

> Dear Dr Tsjerk,
> Thank you very much. Now it works!
>
> There are only L, S, H
>
> So,
> L: loop
> S: beta-strand
> H: alpha-helix
>
> Is that right?
>
> Thank you.
>
> Cheng
>
>
> -- Original --
> *From: * "Tsjerk Wassenaar";;
> *Date: * Sat, May 14, 2016 07:49 PM
> *To: * "ZHANG Cheng"<272699...@qq.com>;
> *Cc: * "pymol-users";
> *Subject: * Re: [PyMOL] How to export secondary structure information
> from aPDBusing PyMol?
>
> Hi Zhang Chen,
>
> Oh, I guess that the %d should be %s then. Sorry.
>
> Cheers,
>
> Tsjerk
> On May 14, 2016 13:45, "ZHANG Cheng" <272699...@qq.com> wrote:
>
>> Dear Dr Tsjerk,
>> Thank you very much!.
>>
>> For example, I have a structure of "protein.pdb". I tried but seems not
>> work:
>>
>> PyMOL>open("ss.dat","w").writelines(["Residue %d: %s\n"%(a.resi,a.ss) for
>> a in cmd.get_model("protein"+" and n. ca").atom])
>> Traceback (most recent call last):
>>   File "D:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
>> 464, in parse
>> exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>>   File "", line 1, in 
>> TypeError: int argument required
>>
>> Can I ask how to modify that?
>>
>> Thank you!
>>
>>
>> -- Original --
>> *From: * "Tsjerk Wassenaar";;
>> *Date: * Sat, May 14, 2016 05:24 AM
>> *To: * "ZHANG Cheng"<272699...@qq.com>;
>> *Cc: * "pymol-users";
>> *Subject: * Re: [PyMOL] How to export secondary structure information
>> from a PDBusing PyMol?
>>
>> Hi Zhang Cheng,
>>
>> If you replace SELECTION with a proper selection statement (with quotes),
>> then something like:
>>
>> open("ss.dat","w").writelines( ["Residue %d: %s\n"%(a.resi,a.ss) for a in
>> cmd.get_model(SELECTION+" and n. ca").atom] )
>>
>> It will write the results to a file called ss.dat. Do mind all
>> parentheses/brackets.
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>> On Fri, May 13, 2016 at 10:30 PM, ZHANG Cheng <272699...@qq.com> wrote:
>>
>>> Dear PyMol friends,
>>> I would like to export the secondary structure of individual residues
>>> from a PDB. Can I ask if I can use PyMol to do that?
>>>
>>> I would like something like this:
>>>
>>> Residue 1: alpha-helix
>>> Residue 2: beta-sheet
>>> ..
>>>
>>>
>>>
>>> I think "http://webclu.bio.wzw.tum.de/cgi-bin/stride/stridecgi.py"; can
>>> also do that. However, I found that one residue is loop in Pymol but is
>>> indicated as "strand" in the website. So I wonder if Pymol can output the 
>>> secondary
>>> structure of individual residues from a PDB?
>>>
>>> Thank you.
>>>
>>>
>>> --
>>> Mobile security can be enabling, not merely restricting. Employees who
>>> bring their own devices (BYOD) to work are irked by the imposition of MDM
>>> restrictions. Mobile Device Manager Plus allows you to control only the
>>> apps on BYO-devices by containerizing them, leaving personal data
>>> untouched!
>>> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>>> ___
>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>>
--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] How to export secondary structure information from aPDBusing PyMol?

2016-05-14 Thread ZHANG Cheng
Dear Dr Tsjerk,
Thank you very much. Now it works!


There are only L, S, H


So,
L: loop
S: beta-strand
H: alpha-helix


Is that right?


Thank you.


Cheng




-- Original --
From:  "Tsjerk Wassenaar";;
Date:  Sat, May 14, 2016 07:49 PM
To:  "ZHANG Cheng"<272699...@qq.com>; 
Cc:  "pymol-users"; 
Subject:  Re: [PyMOL] How to export secondary structure information from 
aPDBusing PyMol?




Hi Zhang Chen,
 
Oh, I guess that the %d should be %s then. Sorry.
 
Cheers,
 
Tsjerk
 On May 14, 2016 13:45, "ZHANG Cheng" <272699...@qq.com> wrote:
Dear Dr Tsjerk,
Thank you very much!.


For example, I have a structure of "protein.pdb". I tried but seems not work:


PyMOL>open("ss.dat","w").writelines(["Residue %d: %s\n"%(a.resi,a.ss) for a in 
cmd.get_model("protein"+" and n. ca").atom])
Traceback (most recent call last):
  File "D:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line 464, 
in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
  File "", line 1, in 
TypeError: int argument required


Can I ask how to modify that?


Thank you!





-- Original --
From:  "Tsjerk Wassenaar";;
Date:  Sat, May 14, 2016 05:24 AM
To:  "ZHANG Cheng"<272699...@qq.com>; 
Cc:  "pymol-users"; 
Subject:  Re: [PyMOL] How to export secondary structure information from a 
PDBusing PyMol?



Hi Zhang Cheng,

If you replace SELECTION with a proper selection statement (with quotes), then 
something like:


open("ss.dat","w").writelines( ["Residue %d: %s\n"%(a.resi,a.ss) for a in 
cmd.get_model(SELECTION+" and n. ca").atom] )


It will write the results to a file called ss.dat. Do mind all 
parentheses/brackets.


Hope it helps,


Tsjerk


On Fri, May 13, 2016 at 10:30 PM, ZHANG Cheng <272699...@qq.com> wrote:
Dear PyMol friends,
I would like to export the secondary structure of individual residues from a 
PDB. Can I ask if I can use PyMol to do that?


I would like something like this:


Residue 1: alpha-helix
Residue 2: beta-sheet
..






I think "http://webclu.bio.wzw.tum.de/cgi-bin/stride/stridecgi.py"; can also do 
that. However, I found that one residue is loop in Pymol but is indicated as 
"strand" in the website. So I wonder if Pymol can output the secondary 
structure of individual residues from a PDB?


Thank you.

--
 Mobile security can be enabling, not merely restricting. Employees who
 bring their own devices (BYOD) to work are irked by the imposition of MDM
 restrictions. Mobile Device Manager Plus allows you to control only the
 apps on BYO-devices by containerizing them, leaving personal data untouched!
 https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net





-- 
Tsjerk A. Wassenaar, Ph.D.--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net