[MMTK] Protein.py, PeptideChain question

Justin Lemkul jalemkul at vt.edu
Mon Apr 11 15:20:15 CEST 2005


Hello all,

In continuing with trying to read in Amber files to MMTK (no small task, as I 
have 
discovered), I have run into a small problem.  I am now able to read in small 
nucleotide 
sequences created within Amber (this was relatively easy), but I am having 
difficulties 
reading in short peptide sequences.  Although these examples are trivial at 
the moment, 
they should be of definite utility in the future.

I have attempted reading in my arbitrary peptide sequence (ACE Glu Pro His Ala 
Gly 
Phe NME) two different ways:

universe.protein = Protein(filename, "no_hydrogens")

This gives the following error output:

Traceback (most recent call last):
  File "AmberReader.py", line 40, in ?
    universe.protein = Protein(filename, "no_hydrogens")
  File "/usr/local/lib/python2.4/site-packages/MMTK/Proteins.py", line 572, in 
__init__
    m._numbers = [i]
AttributeError: 'str' object has no attribute '_numbers'

I assumed that there was some incompatibility between the function and this 
short 
chain, in that it was a short chain, not a full protein with multipled, 
numbered chains.  
So, after a bit of reading, I discovered PeptideChain, and decided to give it 
a shot:

universe.protein = PeptideChain(filename)

Here's what I got from that:

Traceback (most recent call last):
  File "AmberReader.py", line 40, in ?
    universe.protein = PeptideChain(filename)
  File "/usr/local/lib/python2.4/site-packages/MMTK/Proteins.py", line 226, in 
__init__
    sequence = map(Biopolymers._fullName, sequence)
  File "/usr/local/lib/python2.4/site-packages/MMTK/Biopolymers.py", line 116, 
in 
_fullName
    return _residue_names[string.lower(residue)]
KeyError: '.'

Any ideas on how I might fix this?  Thanks!

-Justin




More information about the mmtk mailing list