<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 22, 2012, at 11:09 PM, Xiao-Ping Zhang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear Chimera developers,<br><br>I would like to generate some peptides from a protein sequence. The<br>peptide builder in Chimera is a very nice application. I wonder if there<br>is a stand alone script which I can use to generate series peptides from<br>the command line.</div></blockquote><br></div><div>Hi Xiao-Ping,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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:</div><div><br></div><div>from chimera import runCommand</div><div>runCommand("write 0 out.pdb")</div><div>runCommand("close session")</div><div><br></div><div>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:</div><div><br></div><div><a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a></div><div><br></div><div>--Eric</div><div><br></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></div></span> </div></body></html>