[MMTK] MMTK temperature initialization

Konrad Hinsen hinsen@cnrs-orleans.fr
Fri, 14 Jan 2000 19:58:44 +0100


> Temperature:
> Traceback.........
> File..
> File "usr/lib/python1.5/site-packages/MMTK/Collection.py", line 329, in temperature
> ZeroDivisionError; float division

Here's the code for temperature evaluation:

    def temperature(self, velocities = None):
        "Returns the temperature."
        energy = self.kineticEnergy(velocities)
        return 2.*energy/(self.degreesOfFreedom()*Units.k_B)

The last line is line 329. If you get a division by zero, then the
number of degrees of freedom of your universe is zero, which means
that it contains no atoms. Perhaps you forgot to add the protein
object to the universe.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------