[MMTK] why?

Konrad Hinsen research at khinsen.fastmail.net
Mon Dec 17 15:21:21 UTC 2012

子茗 writes:

 > >>> Protein('1XY2.pdb').view()
 > Traceback (most recent call last):
 >   File "<pyshell#31>", line 1, in <module>
 >     Protein('1XY2.pdb').view()
 >   File "E:\python25\Lib\site-packages\MMTK\Proteins.py", line 683, in __init__
 >     blueprint = Database.BlueprintProtein(items[0])
 >   File "E:\python25\Lib\site-packages\MMTK\Database.py", line 449, in __init__
 >     ReferenceBlueprint.__init__(self, type, protein_types)
 >   File "E:\python25\Lib\site-packages\MMTK\Database.py", line 442, in __init__
 >     self.type.createObject(self.__dict__)
 >   File "E:\python25\Lib\site-packages\MMTK\Database.py", line 347, in createObject
 >     exec file_text in vars(self.environment), newvars
 >   File "<string>", line 1
 >     HEADER    HORMONE                                 05-JUN-87   1XY2
 >                     ^
 > SyntaxError: invalid syntax
 > so why is it? how does to correct it?

These error messages suggest that you copied the PDB file for 1XY2
into the directory "Proteins" of the MMTK Database. That directory is
meant for scripts that construct a protein (see the examples for an
illustration). If you put a PDB file there, MMTK will try to run it as
a Python script, which leads to the error message you see.

Just move the PDB script to the directory where you run your Python
script from, and it should work.

Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research AT khinsen DOT fastmail DOT net

More information about the mmtk mailing list