<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 20, 2010, at 11:46 PM, richardbonnet wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear,<br><br>Is there a way to use writeprmtop with the command line?<br>Is it a way to use chimera to write prmtop amd inpcrd files for a ligand<br>(gaff type + am1-bcc charge) + the corresponding protein (Gasteiger<br>charges + ff99sb) with the command line? I have lot of problems with<br>input format for antechmaber. It can intersting to use chimera with the<br>command line to solve this type of stuff.</div></blockquote><br></div><div>Hi Richard,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>These Amber tools are being created in collaboration with an Amber developer and the collaboration has been slow going and therefore all of these tools are very much in an unfinished state, including the fact that none of them have command-line equivalents.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Nonetheless you can workaround the lack of command-line versions by using a small Python script to call their Python API via Chimera's "runscript" command. So if you had a Python script file (<i>e.g.</i> named "callWritePrmtop.py") that contained this:</div><div><br></div><div>from WritePrmtop import writePrmtop</div><div>from chimera.selection import currentMolecules</div><div>writePrmtop(currentMolecules()[0], arguments[0], "ff99SB")</div><div><br></div><div>then a Chimera script like this would call it:</div><div><br></div><div>addh # if needed</div><div>addcharge</div><div>sel #0</div><div>runscript /path/to/callWritePrmtop.py output.prmtop</div><div><br></div><div>After execution, the file "output.prmtop" (in the same folder as the callWritePrmtop.py script) would contain the PRMTOP for the selected model (#0 in the example script).</div><div><br></div><div>--Eric</div><br><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><br></body></html>