scan and minimization of dihedral angle
Hi, 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. -- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
Hi Milo, You can script most of it with Chimera commands: activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html> select atoms to be frozen (or not) in minimization with “select": <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer> “minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html> That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html> <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
Thanks. I tried using the easy method and it didn't work. Here is my script: from chimera import runCommand as rc rc("minimize") rc("~select") rc("rotation 1 @C2@C3") rc("rotation 1 90 1") rc("select :@C1@C2@C3@C5") rc("minimize freeze selected") 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). I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me) On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Milo, You can script most of it with Chimera commands:
activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html>
select atoms to be frozen (or not) in minimization with “select": <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer>
“minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: < http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
Elaine, Thanks for your help, as a original Midas user, really appreciate Chimera. Attached is the pdb file I am using. On Sun, Aug 24, 2014 at 4:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks. I tried using the easy method and it didn't work. Here is my script:
from chimera import runCommand as rc rc("minimize") rc("~select") rc("rotation 1 @C2@C3") rc("rotation 1 90 1") rc("select :@C1@C2@C3@C5") rc("minimize freeze selected")
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).
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Milo, You can script most of it with Chimera commands:
activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html>
select atoms to be frozen (or not) in minimization with “select": <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer
“minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: < http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
On Aug 24, 2014, at 2:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
Hi Milo, I didn't see this other message (but maybe it hasn't come through for some reason), but I was able to use Write Prmtop on the ligand.pdb file you sent, in both Chimera 1.9 and the current pre-1.10 daily build. The result from Chimera 1.9 is attached. The files differed only very slightly, could have been rounding. You should use at least Chimera 1.9, as there was a Write Prmtop bugfix in that version. <http://www.rbvi.ucsf.edu/chimera/docs/relnotes/1.9.html> If you are using Chimera 1.9 or newer, but still get an error of some kind, you could report the bug (menu: Help… Report a Bug). Thanks! Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
I'm using 1.8. I will upgrade. Thanks. On Mon, Aug 25, 2014 at 11:30 AM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
On Aug 24, 2014, at 2:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
Hi Milo, I didn't see this other message (but maybe it hasn't come through for some reason), but I was able to use Write Prmtop on the ligand.pdb file you sent, in both Chimera 1.9 and the current pre-1.10 daily build. The result from Chimera 1.9 is attached. The files differed only very slightly, could have been rounding.
You should use at least Chimera 1.9, as there was a Write Prmtop bugfix in that version. <http://www.rbvi.ucsf.edu/chimera/docs/relnotes/1.9.html>
If you are using Chimera 1.9 or newer, but still get an error of some kind, you could report the bug (menu: Help… Report a Bug). Thanks! Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
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. If you want non-default choices for hydrogen addition, etc. you will have to put those commands in front of the minimize command. You probably also want to check out the simple primer for scripting Chimera, here: Very Basic Chimera Programming Primer --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu On Aug 24, 2014, at 2:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks. I tried using the easy method and it didn't work. Here is my script:
from chimera import runCommand as rc rc("minimize") rc("~select") rc("rotation 1 @C2@C3") rc("rotation 1 90 1") rc("select :@C1@C2@C3@C5") rc("minimize freeze selected")
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).
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote: Hi Milo, You can script most of it with Chimera commands:
activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html>
select atoms to be frozen (or not) in minimization with “select": <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer>
“minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html> <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ======== _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Thanks for your help. Is there a command line to clear the reply log? On Mon, Aug 25, 2014 at 1:18 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
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.
If you want non-default choices for hydrogen addition, etc. you will have to put those commands in front of the minimize command.
You probably also want to check out the simple primer for scripting Chimera, here: Very Basic Chimera Programming Primer <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
On Aug 24, 2014, at 2:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks. I tried using the easy method and it didn't work. Here is my script:
from chimera import runCommand as rc rc("minimize") rc("~select") rc("rotation 1 @C2@C3") rc("rotation 1 90 1") rc("select :@C1@C2@C3@C5") rc("minimize freeze selected")
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).
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Milo, You can script most of it with Chimera commands:
activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html>
select atoms to be frozen (or not) in minimization with “select": <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer
“minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: < http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ======== _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
Eric, 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: 1). clear the "reply log" and then save the results from the "reply log" to a file 2). create a torsion angle and write that value to a file (Tools-> Structure Analysis -> Angles/Torsions -> select ->create->save) My current script goes as: from chimera import runCommand as rc rc("minimize nogui true") rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select") rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select") rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select") . . . And so on through a full rotation. Thanks, On Mon, Aug 25, 2014 at 7:36 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks for your help. Is there a command line to clear the reply log?
On Mon, Aug 25, 2014 at 1:18 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
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.
If you want non-default choices for hydrogen addition, etc. you will have to put those commands in front of the minimize command.
You probably also want to check out the simple primer for scripting Chimera, here: Very Basic Chimera Programming Primer <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
On Aug 24, 2014, at 2:04 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks. I tried using the easy method and it didn't work. Here is my script:
from chimera import runCommand as rc rc("minimize") rc("~select") rc("rotation 1 @C2@C3") rc("rotation 1 90 1") rc("select :@C1@C2@C3@C5") rc("minimize freeze selected")
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).
I also sent a second message asking how to write out the parameters determined from antechamber. (write prmtop doesn't work for me)
On Sun, Aug 24, 2014 at 1:32 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Milo, You can script most of it with Chimera commands:
activate torsion (do that part just once), increment torsion with “rotation”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rotation.html>
select atoms to be frozen (or not) in minimization with “select": < http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer
“minimize” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
That would still entail saving the Reply Log and editing it yourself. For saving log contents, these previous posts may be useful: < http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 24, 2014, at 8:11 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Hi, 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.
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722
======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ======== _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
Hi Milo, here are a couple of previous posts on saving information from the Reply Log:
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html> <http://plato.cgl.ucsf.edu/pipermail/chimera-users/2010-July/005367.html>
Elaine On Aug 26, 2014, at 9:47 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Eric, 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:
1). clear the "reply log" and then save the results from the "reply log" to a file 2). create a torsion angle and write that value to a file (Tools-> Structure Analysis -> Angles/Torsions -> select ->create->save)
My current script goes as:
from chimera import runCommand as rc rc("minimize nogui true") rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select")
rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select")
rc("rotation 1 @C4@C5") rc("rotation 1 30") rc("~rotation 1") rc("select @C3@C4@C5@C6") rc("minimize nogui true freeze selected") rc("~select") . . . And so on through a full rotation.
Thanks,
On Aug 26, 2014, at 9:47 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
1). clear the "reply log" and then save the results from the "reply log" to a file
Elaine handled the "save" part. Along the same lines, here is the code to clear the Reply Log: from chimera import dialogs r = dialogs.find('reply') r.Clear() --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
On Aug 26, 2014, at 9:47 AM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
2). create a torsion angle and write that value to a file (Tools-> Structure Analysis -> Angles/Torsions -> select ->create->save)
Probably the easiest path is to use the "rotation" command to both create the bond rotation and to increment its value. You can use the Python equivalent of the "angle" command to get the torsion value after each change, e.g.: from Midas import angle dihed = angle(":241,a@CA,CB,CG,ND") --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
Thanks for your help. I got it to run ok. I was a bit taken back by the numbers until I discovered the energy is in KJ/mol. I'm not sure if anyone is interested but, I have attached 2 perl scripts (sorry, I don't know python) that generates the python script for chimera then analyzes the output. Make PE_scan.pl (pot_energy.pl) and executable and type PE_scan.pl (and pot_energy.pl) for instructions. One requirement is that the atoms (involved in the dihedral angle) must have unique names in the structure file. ~>PE_scan.pl C1 C2 C3 C4 > PEscan.py open your molecule in chimera and on the command line type: open PEscan.py An output file is generated named: reply_log.txt An angle (degrees) vs. energy (kJ/mole) table is produced upon running pot_energy.pl. ~>pot_energy.pl reply_log.txt >energy If you have xmgrace installed: ~>xmgrace energy will plot it. Hopefully I have caught all of the bugs, but one never knows. On Tue, Aug 26, 2014 at 1:51 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
On Aug 26, 2014, at 11:49 AM, Eric Pettersen <pett@cgl.ucsf.EDU> wrote:
dihed = angle(":241,a@CA,CB,CG,ND")
Not that it matter too much, but I meant :241.a, not :241,a in the example.
--Eric
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center W. Milo Westler, Ph.D. NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ========
I'm happy you got things to work. Thanks for sharing the scripts! --Eric On Aug 28, 2014, at 1:46 PM, Milo Westler <milo@nmrfam.wisc.edu> wrote:
Thanks for your help. I got it to run ok. I was a bit taken back by the numbers until I discovered the energy is in KJ/mol. I'm not sure if anyone is interested but, I have attached 2 perl scripts (sorry, I don't know python) that generates the python script for chimera then analyzes the output.
Make PE_scan.pl (pot_energy.pl) and executable and type PE_scan.pl (and pot_energy.pl) for instructions.
One requirement is that the atoms (involved in the dihedral angle) must have unique names in the structure file.
~>PE_scan.pl C1 C2 C3 C4 > PEscan.py
open your molecule in chimera and on the command line type: open PEscan.py
An output file is generated named: reply_log.txt
An angle (degrees) vs. energy (kJ/mole) table is produced upon running pot_energy.pl.
~>pot_energy.pl reply_log.txt >energy
If you have xmgrace installed:
~>xmgrace energy
will plot it.
Hopefully I have caught all of the bugs, but one never knows.
On Tue, Aug 26, 2014 at 1:51 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote: On Aug 26, 2014, at 11:49 AM, Eric Pettersen <pett@cgl.ucsf.EDU> wrote:
dihed = angle(":241,a@CA,CB,CG,ND")
Not that it matter too much, but I meant :241.a, not :241,a in the example.
--Eric
-- -- Milo =================================================== National Magnetic Resonance Facility at Madison An NIH-Supported Resource Center
W. Milo Westler, Ph.D.
NMRFAM Director Senior Scientist and Adjunct Professor Department of Biochemistry University of Wisconsin-Madison DeLuca Biochemistry Laboratories 433 Babcock Drive Rm B160D Madison, WI USA 53706-1544 EMAIL: milo@nmrfam.wisc.edu PHONE: (608)-263-9599 FAX: (608)-263-1722 ======================================================================= ======== <PE_scan.pl><pot_energy.pl>
participants (3)
-
Elaine Meng
-
Eric Pettersen
-
Milo Westler