[Chimera-users] batch peptide builder

Eric Pettersen pett at cgl.ucsf.edu
Thu Feb 23 12:00:19 PST 2012

On Feb 22, 2012, at 11:09 PM, Xiao-Ping Zhang wrote:

> Dear Chimera developers,
> I would like to generate some peptides from a protein sequence. The
> peptide builder in Chimera is a very nice application. I wonder if  
> there
> is a stand alone script which I can use to generate series peptides  
> from
> the command line.

Hi Xiao-Ping,
	There's no command equivalent for the peptide builder, but everything  
is doable through the magic of Python.  I've appended a script that  
calls the underlying Python function to build a peptide.  I hope you  
know or are willing to learn Python since you will undoubtedly need to  
modify the script to suit your needs.  Python is very easy to learn.
	You probably want to add some kind of loop to build your peptide  
series, and you will need to add some code to write the models out.   
Keep in mind that you can use Chimera's runCommand() function to  
execute Chimera commands that you don't know the Python equivalent  
for.  So this Python snippet would write out model 0 to a file named  
"out.pdb" and then close all models:

from chimera import runCommand
runCommand("write 0 out.pdb")
runCommand("close session")

Actually, you definitely want to look at the part of the Chimera  
Programmer's Guide that talks about looping through data files and  
running Chimera commands on them, which is very similar to what you  
want to do.  That's here:



                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120223/6d053b54/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: peptide.py
Type: text/x-python-script
Size: 854 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120223/6d053b54/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120223/6d053b54/attachment-0001.html>

More information about the Chimera-users mailing list