<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am trying to read in a PDB fille.</FONT></DIV>
<DIV><FONT face=Arial size=2>My code looks like this:</FONT><FONT
face=CMTT12></DIV>
<DIV>
<P align=left><FONT face=Arial size=2>from MMTK import *<BR>from MMTK.PDB import
PDBConfiguration<BR>from MMTK.ForceFields import Amber94ForceField<BR>import
sys</FONT></P>
<P align=left><FONT face=Arial size=2>conf =
PDBConfiguration('alanin.pdb')<BR>chains =
conf.createPeptideChains()<BR>universe =
InfiniteUniverse(Amber94ForceField())<BR>universe.addObject(chains)<BR>print
universe.energy()<BR>print universe.energyTerms()['electrostatic']</FONT></P>
<P align=left><FONT face=Arial size=2>When I try and specify the PDB file to be
something that was not included in the source distribution (i.e. a configuration
that is not 2YCC.pdb, insulin.pdb etc), I get errors. For example, I got
alanin.pdb from the protein databank. I put this file in
C:\Python23\Lib\site-packages\MMTK\Database\PDB. When I run the code as
above, I get the following error:</FONT></P>
<P align=left><FONT face=Arial size=2>Traceback (most recent call
last):<BR> File
"C:\PYTHON23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line
310, in RunScript<BR> exec codeObject in
__main__.__dict__<BR> File "C:\Python23\Scripts\shirl.py", line 6, in
?<BR> <BR> File
"c:\python23\Lib\site-packages\MMTK\PDB.py", line 147, in
__init__<BR> Scientific.IO.PDB.Structure.__init__(self,
filename)<BR> File "C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py",
line 890, in __init__<BR>
self.parseFile(PDBFile(filename))<BR> File
"C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py", line 1041, in
parseFile<BR> type, data = file.readLine()<BR> File
"C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py", line 152, in
readLine<BR> data = {'serial_number': line[1],<BR> File
"C:\PYTHON23\Lib\site-packages\Scientific\IO\FortranFormat.py", line 122, in
__getitem__<BR> return self.data[i]<BR>IndexError: list
in</FONT><FONT face=Arial size=2>dex out of range</FONT></P>
<P align=left><FONT face=Arial size=2>If instead I have insulin.pdb instead of
alanin.pdb, it works.</FONT></P>
<P align=left><FONT face=Arial size=2>Is there something I am doing wrong?
I even created an evironment variable in my PATH called MMTKPATH according to
this link: </FONT><FONT face=Arial size=2><A
href="http://starship.python.net/crew/hinsen/mmtk_manual/database.html">http://starship.python.net/crew/hinsen/mmtk_manual/database.html</A></FONT></P>
<P align=left><FONT face=Arial size=2>I tried setting this env variable to be:
C:\Python23\Lib\site-packages\MMTK\Database\PDB and
C:\Python23\Lib\site-packages\MMTK\Database, but neither work??<BR></FONT><FONT
face=Arial size=2><BR>Thanks in advance,<BR></FONT><FONT face=Arial
size=2>shirley</FONT></P>
<P align=left></P>
<P align=left><FONT face=Arial
size=2></FONT> </P></FONT></DIV></BODY></HTML>