[chimera-dev] Molecular energy

Victor Muñoz chewaka.87 at gmail.com
Tue Apr 5 11:19:01 PDT 2011


Dear Elisabeth,

You can try to define a new class that derives from the MMTKinter like this:

First create a simple function in the MMTKinter class that will give you the
energy:
*
def energy(self):

                return self.universe.energy()*

Now let's create the new class:

*from MMMD.MMTKinter import MMTKinter

class NewClass(MMTKinter):

        def __init__(self, molecule):
                self.molecule = molecule
                self.nogui = True
                self._MMTK = MMTKinter(self.molecule, self.nogui)
                self._MMTK._finishIniti()
                self._MMTK.loadMMTKCoordinates()

        def energy(self):
                self.energy = self._MMTK.energy()
                print self.energy*

This way you can initialize the MMTKinter class and create the universe,
being the molecule your own molecule. With the self.nogui = True you just do
all that stuff without the graphic interface. The energy function here will
return you the energy of the system.

Hope that will help. If it's not what you wanted just send another mail and
I'll look it for you again.

Kind regards,

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20110405/8738d921/attachment.html>


More information about the Chimera-dev mailing list