Dear Elisabeth,<br><br>You can try to define a new class that derives from the MMTKinter like this:<br><br>First create a simple function in the MMTKinter class that will give you the energy:<br><i><br>def energy(self):<br>
<br> return self.universe.energy()</i><br><br>Now let's create the new class:<br><br><i>from MMMD.MMTKinter import MMTKinter<br><br>class NewClass(MMTKinter):<br><br> def __init__(self, molecule):<br>
self.molecule = molecule<br> self.nogui = True<br> self._MMTK = MMTKinter(self.molecule, self.nogui)<br> self._MMTK._finishIniti()<br> self._MMTK.loadMMTKCoordinates()<br>
<br> def energy(self):<br> self.energy = self._MMTK.energy()<br> print self.energy</i><br><br>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.<br>
<br>Hope that will help. If it's not what you wanted just send another mail and I'll look it for you again.<br><br>Kind regards,<br clear="all"><br>-- <br><div style="text-align: center;"><img src="http://farm5.static.flickr.com/4045/4194316803_f773f9c017_o.jpg"></div>
<br>