[MMTK] Scientific.IO.PDB problems

Christian Blouin cblouin@is2.dal.ca
Thu, 7 Jun 2001 09:06:57 -0400


	Greetings,

		My problem is not specifically with MMTK but with the
underlying  Scientific.IO.PDB.  I am attempting to open a PDB file, do some
modification to the peptide_chains objects and the rewrite to a file. However,
I get an error message as shown in the interactive session I pasted below. Does
anyone know what I'm doing wrong? Bye the way, the file has output anyway to
out.pdb, with an END statement, but without the heteroatoms. In the second
case, using a PDBFile object as writeToFIle destination, the file ends abruptly
three residues short of the polypeptide chain.

	Cheers,

	Christian

_________________________________________________________________________
 		
Python 2.1 (#1, Apr 21 2001, 18:56:55)
[GCC 2.96 20000731 (Red Hat Linux 7.0)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from Scientific.IO.PDB import *
>>>
>>> r = Structure('1QAX.pdb')
>>> r.peptide_chains[0].residues[5].atoms['N']['occupancy'] = 100.0
>>> r.writeToFile('out.pdb')
        Traceback (most recent call last):
          File "<stdin>", line 1, in ?
          File "/usr/lib/python2.1/site-packages/Scientific/IO/PDB.py", line 1128, in writeToFile
            o.writeToFile(file)
          File "/usr/lib/python2.1/site-packages/Scientific/IO/PDB.py", line 536, in writeToFile
            file.nextResidue(self.name, self.number, self.terminusType())
        AttributeError: Molecule instance has no attribute 'terminusType'
>>> h = PDBFile('test.pdb', 'w')
>>> r.writeToFile(h)
        Traceback (most recent call last):
          File "<stdin>", line 1, in ?
          File "/usr/lib/python2.1/site-packages/Scientific/IO/PDB.py", line 1128, in writeToFile
            o.writeToFile(file)
          File "/usr/lib/python2.1/site-packages/Scientific/IO/PDB.py", line 536, in writeToFile
            file.nextResidue(self.name, self.number, self.terminusType())
        AttributeError: Molecule instance has no attribute 'terminusType'
>>>  


-- 
---------------------------------------
Christian Blouin Ph.D.
CIAR - Evolutionary Biology
Dalhousie University
Halifax, NS, Canada
(902)494-2881
(902)494-1355[FAX]