<div dir="ltr"><div><div><div><div>Eric,<br></div> I've got most things running that I want for my potential energy scan however there are a couple of things I still have to do manually. I am looking for commands or a python script to:<br>
<br></div>1). clear the "reply log" and then save the results from the "reply log" to a file<br></div>2). create a torsion angle and write that value to a file (Tools-> Structure Analysis -> Angles/Torsions -> select ->create->save)<br>
<br></div>My current script goes as:<br><br><div><div>from chimera import runCommand as rc<br>rc("minimize nogui true")<br>rc("rotation 1 @C4@C5")<br>rc("rotation 1 30")<br>
rc("~rotation 1")<br>rc("select @C3@C4@C5@C6")<br>rc("minimize nogui true freeze selected")<br>rc("~select")<br><br>rc("rotation 1 @C4@C5")<br>rc("rotation 1 30")<br>
rc("~rotation 1")<br>rc("select @C3@C4@C5@C6")<br>rc("minimize nogui true freeze selected")<br>rc("~select")<br><br>rc("rotation 1 @C4@C5")<br>rc("rotation 1 30")<br>
rc("~rotation 1")<br>rc("select @C3@C4@C5@C6")<br>rc("minimize nogui true freeze selected")<br>rc("~select")<br>.<br>.<br>.<br></div><div>And so on through a full rotation.<br></div>
<div><br></div><div>Thanks,<br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 7:36 PM, Milo Westler <span dir="ltr"><<a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for your help. Is there a command line to clear the reply log? <br></div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 1:18 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">On the minimize commands you want to add "nogui true", which will cause the minimization to proceed using default settings rather than querying you for hydrogen addition method, charge settings, etc. Otherwise the command brings up dialogs for those things and then releases control back to Chimera, which causes your script to continue on to the other commands without the minimization having actually occurred yet.<div>
<br></div><div>If you want non-default choices for hydrogen addition, etc. you will have to put those commands in front of the minimize command.</div><div><br></div><div>You probably also want to check out the simple primer for scripting Chimera, here: <a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html" target="_blank">Very Basic Chimera Programming Primer</a></div>
<div><br></div><div>--Eric</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888"><div> Eric Pettersen<br> UCSF Computer Graphics Lab<br>
<a href="http://www.cgl.ucsf.edu" target="_blank">http://www.cgl.ucsf.edu</a><br><br></div></font></span><div><div><div><div>On Aug 24, 2014, at 2:04 PM, Milo Westler <<a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div><div dir="ltr"><div>Thanks. I tried using the easy method and it didn't work. Here is my script:<br><br>from chimera import runCommand as rc<br>rc("minimize")<br>
rc("~select")<br>rc("rotation 1 @C2@C3")<br>
rc("rotation 1 90 1")<br>rc("select :@C1@C2@C3@C5")<br>rc("minimize freeze selected")<br><br><br><br></div><div>If I did the first command in a script, followed by a separate script using the next 3 commands, then another separate script for the last 2, it worked. If I have done something wrong, please tell me. Obviously, I could write a bunch of scripts and run them separately, but I was trying to be efficient. I want to do a potential energy scan with smaller angles (~10 degrees or so). I can write a script to write all of these separate scripts and then run them in tandem, but that can be rather tiring. I am also interested in using chimera python scripts ( I promised myself I would learn python).<br>
<br>I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <span dir="ltr"><<a href="mailto:meng@cgl.ucsf.edu" target="_blank">meng@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Milo,<br>
You can script most of it with Chimera commands:<br>
<br>
activate torsion (do that part just once), increment torsion with “rotation”:<br>
<<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html</a>><br>
<br>
select atoms to be frozen (or not) in minimization with “select":<br>
<<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer</a>><br>
<br>
“minimize” command:<br>
<<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html</a>><br>
<br>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful:<br>
<<a href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html" target="_blank">http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html</a>><br>
<<a href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html" target="_blank">http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html</a>><br>
<br>
I hope this helps,<br>
Elaine<br>
-----<br>
Elaine C. Meng, Ph.D.<br>
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
<div><div><br>
On Aug 24, 2014, at 8:11 AM, Milo Westler <<a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a>> wrote:<br>
<br>
> Hi,<br>
> I want to to a potential energy scan of a dihedral (of a small organic molecule) by setting a dihedral angle, fixing those atoms involved, and doing a minimization. Then incrementing the angle and repeating. I can currently do all of this by using the gui (set torsion angle in build_structure,minimize with selected atoms fixed , then save and edit the final energies for each angle in reply log). I'm sure that this can be done with python. I am wondering if there is an available script to do this all. As input I would have a set of torsion angles and as output I would like a table of angle and energy.<br>
><br>
> --<br>
> -- Milo<br>
> ===================================================<br>
> National Magnetic Resonance Facility at Madison<br>
> An NIH-Supported Resource Center<br>
><br>
> W. Milo Westler, Ph.D.<br>
><br>
> NMRFAM Director<br>
> Senior Scientist<br>
> and<br>
> Adjunct Professor<br>
> Department of Biochemistry<br>
> University of Wisconsin-Madison<br>
> DeLuca Biochemistry Laboratories<br>
> 433 Babcock Drive<br>
> Rm B160D<br>
> Madison, WI USA 53706-1544<br>
> EMAIL: <a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a><br>
> PHONE: <a href="tel:%28608%29-263-9599" value="+16082639599" target="_blank">(608)-263-9599</a><br>
> FAX: <a href="tel:%28608%29-263-1722" value="+16082631722" target="_blank">(608)-263-1722</a><br>
> ======================================================================= ========<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- Milo<br>===================================================<br>National Magnetic Resonance Facility at Madison<br> An NIH-Supported Resource Center<br>
<br>W. Milo Westler, Ph.D.<br><br>NMRFAM Director<br>Senior Scientist<br> and<br>Adjunct Professor<br>Department of Biochemistry<br>University of Wisconsin-Madison<br>DeLuca Biochemistry Laboratories<br>433 Babcock Drive<br>
Rm B160D<br>Madison, WI USA 53706-1544<br>EMAIL: <a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a><br>PHONE: <a href="tel:%28608%29-263-9599" value="+16082639599" target="_blank">(608)-263-9599</a><br>
FAX: <a href="tel:%28608%29-263-1722" value="+16082631722" target="_blank">(608)-263-1722</a><br>======================================================================= ========</div>
</div></div></div><div>
_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br>
</div></blockquote></div><br></div><br></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- Milo<br>===================================================<br>National Magnetic Resonance Facility at Madison<br>
An NIH-Supported Resource Center<br><br>W. Milo Westler, Ph.D.<br><br>NMRFAM Director<br>Senior Scientist<br> and<br>Adjunct Professor<br>Department of Biochemistry<br>University of Wisconsin-Madison<br>DeLuca Biochemistry Laboratories<br>
433 Babcock Drive<br>Rm B160D<br>Madison, WI USA 53706-1544<br>EMAIL: <a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a><br>PHONE: <a href="tel:%28608%29-263-9599" value="+16082639599" target="_blank">(608)-263-9599</a><br>
FAX: <a href="tel:%28608%29-263-1722" value="+16082631722" target="_blank">(608)-263-1722</a><br>======================================================================= ========</div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- Milo<br>===================================================<br>National Magnetic Resonance Facility at Madison<br> An NIH-Supported Resource Center<br>
<br>W. Milo Westler, Ph.D.<br><br>NMRFAM Director<br>Senior Scientist<br> and<br>Adjunct Professor<br>Department of Biochemistry<br>University of Wisconsin-Madison<br>DeLuca Biochemistry Laboratories<br>433 Babcock Drive<br>
Rm B160D<br>Madison, WI USA 53706-1544<br>EMAIL: <a href="mailto:milo@nmrfam.wisc.edu" target="_blank">milo@nmrfam.wisc.edu</a><br>PHONE: (608)-263-9599<br>FAX: (608)-263-1722<br>======================================================================= ========</div>
</div>