[MMTK] MMTK_sparseev problem

Vasisht R. Tadigotla vasisht at eden.rutgers.edu
Thu Jun 2 17:18:00 CEST 2005


Thanks for the package, but it still doesn't seem to work. Doing a python
setup.py install, creates a file SparseModes.py in the MMTK directory
which has a class SparseMatrixNormalModes, and there's a
SparseMatrixNormalModes in the NormalModes directory. According to the
manual I should be doing from MMTK.NormalModes import
SparseMatrixNormalModes, when I do that I get this error

Traceback (most recent call last):
  File "normalmodes1.py", line 12, in ?
    modes = SparseMatrixNormalModes(universe,50)
  File
"/home/vasisht/lib/python2.4/site-packages/MMTK/NormalModes/__init__.py",
line 24, in __init__
    None, True)
  File
"/home/vasisht/lib/python2.4/site-packages/MMTK/NormalModes/VibrationalModes.py",
line 130, in __init__
    ev = self._diagonalize()
  File
"/home/vasisht/lib/python2.4/site-packages/MMTK/NormalModes/Core.py", line
167, in _diagonalize
    eigenvalues, eigenvectors = sparseMatrixEV(self.fc, self.nmodes)
AttributeError: SparseMatrixNormalModes instance has no attribute 'nmodes'


If I do a from MMTK.SparseModes import SparseMatrixNormalModes I get

 File "normalmodes1.py", line 12, in ?
    modes = SparseMatrixNormalModes(universe,50)
  File "/home/vasisht/lib/python2.4/site-packages/MMTK/SparseModes.py",
line 8, in __init__
    NormalModes.__init__(self, universe, temperature)
  File
"/home/vasisht/lib/python2.4/site-packages/MMTK/NormalModes/VibrationalModes.py",
line 129, in __init__
    self._forceConstantMatrix()
  File "/home/vasisht/lib/python2.4/site-packages/MMTK/SparseModes.py",
line 18, in _forceConstantMatrix
    self.fc.scale(1./self.sqrt_mass[:, 0])
AttributeError: SparseMatrixNormalModes instance has no attribute
'sqrt_mass'

I've included the code I'm using below:

---------------------------------
from MMTK import *
from MMTK.Proteins import Protein
from MMTK.ForceFields import CalphaForceField
from MMTK.NormalModes import NormalModes, SparseMatrixNormalModes
#from MMTK.SparseModes import SparseMatrixNormalModes
from MMTK.Visualization import view

universe = InfiniteUniverse(CalphaForceField(1,1))
universe.protein =
Protein('/home/vasisht/normalmode/NMA_PUB/PDB/pdb1nik.ent',
model='calpha')

modes = SparseMatrixNormalModes(universe,50)
for mode in modes:
    print mode
------------------------------------------------------------

I don't know if I've made a mistake installing MMTK_sparseev or if I'm
using SparseMatrixNormalModes incorrectly.

Thanks,
Vasisht




On Thu, 2 Jun 2005 konrad.hinsen at laposte.net wrote:

> On 02.06.2005, at 01:05, Vasisht R. Tadigotla wrote:
>
> > I'm trying to use SparseMatrixNormalModes and I get an error that no
> > module MMTK_sparseev exists. I've looked through the list archives, and
> > found that the module needs to be built separately and is in the addons
>
> Here is the add-on package, including a file from the C version of
> ARPACK.
>
> Konrad.
> --
> ------------------------------------------------------------------------
> -------
> Konrad Hinsen
> Laboratoire Leon Brillouin, CEA Saclay,
> 91191 Gif-sur-Yvette Cedex, France
> Tel.: +33-1 69 08 79 25
> Fax: +33-1 69 08 82 61
> E-Mail: khinsen at cea.fr
> ------------------------------------------------------------------------
> -------
>

---------------------------------------------------------------------
Pour trouver les limites du possible il faut tenter l'impossible.



More information about the mmtk mailing list