[MMTK] PDB file

Shirley Hui shirleyhui at alumni.uwaterloo.ca
Tue May 11 02:13:28 CEST 2004


I just tried again with another PDB file and it seems to work with the other PDB file?
I wonder if it just something wrong with the alanin file that I have?  Does anyone else have problems with alanin.pdb?
The alanin.pdb file I am using is below:

REMARK FILENAME="/usr/people/nonella/xplor/benchmark1/ALANIN.PDB"
REMARK PARAM11.PRO ( from PARAM6A )
REMARK ===========
REMARK PROTEIN PARAMETERS:
REMARK PEPTIDE GEOMETRY FROM RAMACHANDRAN ET AL BBA 359:298 (1974)
REMARK TORSIONS FROM HAGLER ET AL JACS 98:4600 (1976)
REMARK LENNARD-JONES NONBONDED PARAMETERS WITH SPECIAL TREATMENT OF 1:4
REMARK CARBON-CARBON INTERACTIONS: JORGENSON ET. AL.
REMARK JACS 103:3976-3985 WITH 1-4 RC=1.80/0.1
REMARK DATE:16-Feb-89 11:21:32 created by user: nonella
ATOM 1 CA ACE 1 -2.184 0.591 0.910 0.0 10.0 MAIN
ATOM 2 C ACE 1 -0.665 0.627 0.966 100.0 0.0 MAIN
ATOM 3 O ACE 1 -0.069 1.213 1.868 100.0 0.0 MAIN
ATOM 4 N ALA 2 0.000 0.000 0.000 100.0 0.0 MAIN
ATOM 5 H ALA 2 -0.490 -0.462 -0.712 100.0 0.0 MAIN
ATOM 6 CA ALA 2 1.450 0.000 0.000 0.0 10.0 MAIN
ATOM 7 CB ALA 2 1.969 -0.670 -1.262 100.0 0.0 MAIN
ATOM 8 C ALA 2 2.010 1.413 0.000 100.0 0.0 MAIN
ATOM 9 O ALA 2 2.911 1.748 0.767 100.0 0.0 MAIN
ATOM 10 N ALA 3 1.488 2.280 -0.863 100.0 0.0 MAIN
ATOM 11 H ALA 3 0.770 1.998 -1.467 100.0 0.0 MAIN
ATOM 12 CA ALA 3 1.981 3.643 -0.909 0.0 10.0 MAIN
ATOM 13 CB ALA 3 1.147 4.464 -1.880 100.0 0.0 MAIN
ATOM 14 C ALA 3 1.865 4.326 0.444 100.0 0.0 MAIN
ATOM 15 O ALA 3 2.801 4.963 0.924 100.0 0.0 MAIN
ATOM 16 N ALA 4 0.710 4.211 1.093 100.0 0.0 MAIN
ATOM 17 H ALA 4 -0.026 3.700 0.697 100.0 0.0 MAIN
ATOM 18 CA ALA 4 0.541 4.841 2.388 0.0 10.0 MAIN
ATOM 19 CB ALA 4 -0.809 4.462 2.976 100.0 0.0 MAIN
ATOM 20 C ALA 4 1.591 4.371 3.381 100.0 0.0 MAIN
ATOM 21 O ALA 4 2.212 5.167 4.085 100.0 0.0 MAIN
ATOM 22 N ALA 5 1.818 3.063 3.463 100.0 0.0 MAIN
ATOM 23 H ALA 5 1.315 2.443 2.895 100.0 0.0 MAIN
ATOM 24 CA ALA 5 2.809 2.556 4.392 0.0 10.0 MAIN
ATOM 25 CB ALA 5 2.970 1.055 4.209 100.0 0.0 MAIN
ATOM 26 C ALA 5 4.176 3.170 4.142 100.0 0.0 MAIN
ATOM 27 O ALA 5 4.859 3.615 5.064 100.0 0.0 MAIN
ATOM 28 N ALA 6 4.611 3.212 2.886 100.0 0.0 MAIN
ATOM 29 H ALA 6 4.055 2.853 2.163 100.0 0.0 MAIN
ATOM 30 CA ALA 6 5.908 3.786 2.586 0.0 10.0 MAIN
ATOM 31 CB ALA 6 6.121 3.830 1.082 100.0 0.0 MAIN
ATOM 32 C ALA 6 6.012 5.221 3.079 100.0 0.0 MAIN
ATOM 33 O ALA 6 6.992 5.614 3.710 100.0 0.0 MAIN
ATOM 34 N ALA 7 5.002 6.040 2.802 100.0 0.0 MAIN
ATOM 35 H ALA 7 4.228 5.711 2.297 100.0 0.0 MAIN
ATOM 36 CA ALA 7 5.044 7.419 3.245 0.0 10.0 MAIN
ATOM 37 CB ALA 7 3.730 8.110 2.918 100.0 0.0 MAIN
ATOM 38 C ALA 7 5.219 7.518 4.752 100.0 0.0 MAIN
ATOM 39 O ALA 7 6.045 8.278 5.255 100.0 0.0 MAIN
ATOM 40 N ALA 8 4.445 6.748 5.512 100.0 0.0 MAIN
ATOM 41 H ALA 8 3.792 6.148 5.096 100.0 0.0 MAIN
ATOM 42 CA ALA 8 4.566 6.799 6.956 0.0 10.0 MAIN
ATOM 43 CB ALA 8 3.670 5.747 7.589 100.0 0.0 MAIN
ATOM 44 C ALA 8 5.984 6.488 7.409 100.0 0.0 MAIN
ATOM 45 O ALA 8 6.560 7.186 8.241 100.0 0.0 MAIN
ATOM 46 N ALA 9 6.582 5.429 6.871 100.0 0.0 MAIN
ATOM 47 H ALA 9 6.109 4.882 6.209 100.0 0.0 MAIN
ATOM 48 CA ALA 9 7.934 5.082 7.264 0.0 10.0 MAIN
ATOM 49 CB ALA 9 8.436 3.918 6.425 100.0 0.0 MAIN
ATOM 50 C ALA 9 8.898 6.233 7.027 100.0 0.0 MAIN
ATOM 51 O ALA 9 9.705 6.584 7.887 100.0 0.0 MAIN
ATOM 52 N ALA 10 8.839 6.851 5.851 100.0 0.0 MAIN
ATOM 53 H ALA 10 8.190 6.560 5.176 100.0 0.0 MAIN
ATOM 54 CA ALA 10 9.733 7.956 5.567 0.0 10.0 MAIN
ATOM 55 CB ALA 10 9.388 8.570 4.219 100.0 0.0 MAIN
ATOM 56 C ALA 10 9.595 9.067 6.595 100.0 0.0 MAIN
ATOM 57 O ALA 10 10.580 9.587 7.117 100.0 0.0 MAIN
ATOM 58 N ALA 11 8.364 9.460 6.912 100.0 0.0 MAIN
ATOM 59 H ALA 11 7.590 9.036 6.488 100.0 0.0 MAIN
ATOM 60 CA ALA 11 8.169 10.516 7.887 0.0 10.0 MAIN
ATOM 61 CB ALA 11 6.686 10.695 8.168 100.0 0.0 MAIN
ATOM 62 C ALA 11 8.823 10.177 9.217 100.0 0.0 MAIN
ATOM 63 O ALA 11 9.523 10.992 9.815 100.0 0.0 MAIN
ATOM 64 N CBX 12 8.610 8.962 9.714 100.0 0.0 MAIN
ATOM 65 H CBX 12 8.050 8.324 9.225 100.0 0.0 MAIN
ATOM 66 CA CBX 12 9.223 8.571 11.014 0.0 10.0 MAIN
END

----- Original Message ----- 
From: Shirley Hui
To: mmtk at python.net
Sent: Monday, May 10, 2004 7:51 PM
Subject: [MMTK] PDB file


I am trying to read in a PDB fille.
My code looks like this:
from MMTK import *
from MMTK.PDB import PDBConfiguration
from MMTK.ForceFields import Amber94ForceField
import sys
conf = PDBConfiguration('alanin.pdb')
chains = conf.createPeptideChains()
universe = InfiniteUniverse(Amber94ForceField())
universe.addObject(chains)
print universe.energy()
print universe.energyTerms()['electrostatic']
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:
Traceback (most recent call last):
  File
"C:\PYTHON23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Python23\Scripts\shirl.py", line 6, in ?

  File "c:\python23\Lib\site-packages\MMTK\PDB.py", line 147, in __init__
    Scientific.IO.PDB.Structure.__init__(self, filename)
  File "C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py", line 890, in
__init__
    self.parseFile(PDBFile(filename))
  File "C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py", line 1041, in
parseFile
    type, data = file.readLine()
  File "C:\PYTHON23\Lib\site-packages\Scientific\IO\PDB.py", line 152, in
readLine
    data = {'serial_number': line[1],
  File "C:\PYTHON23\Lib\site-packages\Scientific\IO\FortranFormat.py", line
122, in __getitem__
    return self.data[i]
IndexError: list index out of range
If instead I have insulin.pdb instead of alanin.pdb, it works.
Is there something I am doing wrong?  I even created an evironment variable
in my PATH called MMTKPATH according to this link:
http://starship.python.net/crew/hinsen/mmtk_manual/database.html
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??

Thanks in advance,
shirley




_______________________________________________
mmtk maillist  -  mmtk at starship.python.net
http://starship.python.net/mailman/listinfo/mmtk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://starship.python.net/pipermail/mmtk/attachments/20040510/5b54e6ca/attachment.html


More information about the mmtk mailing list