[Chimera-users] Amber Force Field
goddard at sonic.net
Fri May 4 09:12:59 PDT 2012
If you want to get the minimized energy within your Python script
then you need to run the minimization using a Python function call
rather than a Chimera text command. To figure out how to do that I look
at the Python code that is called by the Chimera text command in your
or also available online
The minimize() Python function is called using the text command
arguments. I see it basically does
from MMMD import base
minimizer = base.Minimizer(molecules, nsteps, stepsize, cgsteps,
fixedAtoms, memorize, nogui, addhyd, lambda m:
m.run(), exclres, cache, prep)
Looking at base.py in the same directory and tracking back from where
"Initial energy..." is printed in file MMTKinter.py I see the energy is
I have not tested this out but perhaps it will move you in the direction
you want to go.
> Thanks for the response. The code that you suggested seems to work. I am
> getting the initial energy reported in the Python Shell along with other
> lines that are reporting on the activities of the command.
> Since I am embedding this command in a runCommand statement, I would like
> to get the initial energy value put into a variable within the Python
> script instead of the Python Shell window. Is there any way to accomplish
> On Fri, 13 Apr 2012, Elaine Meng wrote:
>> Hi Forbes,
>> The minimization tool reports the total energy, not any breakdown into components (electrostatic, VDW, strain) or interactions between sets of atoms. However, the "minimize" command has a "fragment" option for ignoring all but the specified residues, so you could at least limit what is considered the total system. That also makes the calculation faster, although single-point energy calculation (0 steps minimization) should already be pretty fast.
>> Example (and see also "nogui true"):
>> minimize spec :13.a,17.a fragment true cgsteps 0 nsteps 0
>> On Apr 13, 2012, at 10:38 AM, Conrad Huang wrote:
>>> Chimera's "Structure Editing -> Minimize Structure" tool (or the "minimize" command) may be used to do this. The tool reports the initial energy of the system in the Reply Log. If you give zero as the number of steps for both steepest descent and conjugate gradient minimization, then Chimera should return immediately.
>>> On 4/13/12 7:09 AM, Forbes J. Burkowski wrote:
>>>> I have noticed that scripts can start with:
>>>> import MMTK
>>>> import MMTK.ForceFields
>>>> from MMTK.ForceFields import Amber94ForceField
>>>> We are doing some side chain packing studies that would benefit from the
>>>> availablity of "easy" force field calculations. Currently, the algorithm
>>>> works with useRotamers() to set two neighbouring rotamers and this is
>>>> followed by a simple energy calculation to evaluate the interaction energy
>>>> between the two rotamers. Right now, the energy calculation is only a bit
>>>> more sophisticated than a steric collision detector.
>>>> Question: Can we use some functions in the MMTK.ForceFields module to get
>>>> an improved energy calculation?
>>>> Any suggestions would be appreciated.
>>>> Chimera-users mailing list
>>>> Chimera-users at cgl.ucsf.edu
>>> Chimera-users mailing list
>>> Chimera-users at cgl.ucsf.edu
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
More information about the Chimera-users