[MMTK] removeObject

Ramon Crehuet rcrehuet at gmail.com
Sun Mar 4 21:16:31 UTC 2007


Dear all,
I think I do not understand the use of removeObject method from the
universe class.
The following script gives the error enclosed. Can somebody please
explain me how to use removeObject.
Thanks in advance,
Ramon



from MMTK import *
from MMTK.Proteins import Protein
from MMTK.ForceFields import CalphaForceField
universe=InfiniteUniverse(CalphaForceField())
molecule=Protein('insulin.pdb', model='calpha')
universe.addObject(molecule)
universe.removeObject(molecule)

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/MMTK/Universe.py", line 191,
in removeObject
    self.removeObject(o)
  File "/usr/lib/python2.4/site-packages/MMTK/Universe.py", line 191,
in removeObject
    self.removeObject(o)
  File "/usr/lib/python2.4/site-packages/MMTK/Universe.py", line 194,
in removeObject
    raise ValueError, `object` + ' is not in this universe.'
ValueError: Residue .chain0.Gly1 is not in this universe.



More information about the mmtk mailing list