[MMTK] Problem defining amber_charge

Victor Manuel Rosas-García quimico69@yahoo.com
Thu, 11 Mar 1999 08:49:09 -0800 (PST)


Hello guys,

I finally got to create a MMTK molecule with a cyclodextrin. MMTK
correctly calculates the mass. Now the problem is that when I add the
amber_charge information I get the following error message:

******************************************************
Python 1.5.1 (#2, Jan 12 1999, 19:13:08) [C] on aix4
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from mmtk import *
>>> a = Molecule('bcdex3')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/usr/local/mmtk/ChemicalObjects.py", line 403, in __init__
    ChemicalObject.__init__(self, blueprint, _memo)
  File "/usr/local/mmtk/ChemicalObjects.py", line 21, in __init__
    blueprint = self.blueprintclass(blueprint)
  File "/usr/local/mmtk/Database.py", line 337, in __init__
    BlueprintObject.__init__(self, type, molecule_types, memo)
  File "/usr/local/mmtk/Database.py", line 302, in __init__
    original = database.findType(original)
  File "/usr/local/mmtk/Database.py", line 67, in findType
    self.types[name] = self.type_constructor(filename)
  File "/usr/local/mmtk/Database.py", line 174, in __init__
    ChemicalObjectType.__init__(self, filename, MoleculeEnvironment,
  File "/usr/local/mmtk/Database.py", line 80, in __init__
    execfile(filename, vars(module), newvars)
  File "/home/vrosas/Molecules/bcdex3", line 200
    H141: 0.0, H142: 0.0, H143: 0.0, H144: 0.0, H145: 0.0, H146: 0.0,
H147: 0.0}
                                                                      
         ^
SyntaxError: invalid syntax
*******************************************************

If I try the function moleculesFromPDBSequence(sequence,
molecule_name, pdb_code) (posted a few days ago by Konrad) I get
exactly the same error.

The Molecule definition file I'm using is (big):

name = 'beta-cyclodextrin'

C1   = Atom('C')  
C2   = Atom('C') 
C3   = Atom('C') 
C4   = Atom('C')  
O5   = Atom('O') 
C6   = Atom('C')
C7   = Atom('C') 
C8   = Atom('C') 
C9   = Atom('C')
O10  = Atom('O')
C11  = Atom('C')  
C12  = Atom('C')  
C13  = Atom('C')  
C14  = Atom('C')   
O15  = Atom('O')  
C16  = Atom('C')   
C17  = Atom('C')   
C18  = Atom('C')   
O19  = Atom('O')   
O20  = Atom('O')   
O21  = Atom('O')   
C22  = Atom('C')   
C23  = Atom('C')  
O24  = Atom('O')  
O25  = Atom('O')  
O26  = Atom('O')  
O27  = Atom('O')  
C28  = Atom('C')  
C29  = Atom('C') 
O30  = Atom('O')
O31  = Atom('O') 
O32  = Atom('O') 
O33  = Atom('O') 
C34  = Atom('C') 
C35  = Atom('C') 
O36  = Atom('O') 
O37  = Atom('O') 
O38  = Atom('O') 
O39  = Atom('O') 
C40  = Atom('C') 
C41  = Atom('C') 
O42  = Atom('O') 
O43  = Atom('O') 
C44  = Atom('C')
C45  = Atom('C') 
C46  = Atom('C') 
C47  = Atom('C') 
O48  = Atom('O') 
C49  = Atom('C') 
C50  = Atom('C') 
C51  = Atom('C') 
C52  = Atom('C') 
O53  = Atom('O') 
C54  = Atom('C') 
C55  = Atom('C') 
C56  = Atom('C') 
C57  = Atom('C') 
O58  = Atom('O') 
C59  = Atom('C') 
O60  = Atom('O') 
O61  = Atom('O') 
C62  = Atom('C') 
C63  = Atom('C')  
O64  = Atom('O')  
O65  = Atom('O')  
O66  = Atom('O')  
O67  = Atom('O')   
C68  = Atom('C')   
C69  = Atom('C')   
O70  = Atom('O')  
O71  = Atom('O') 
O72  = Atom('O') 
O73  = Atom('O')  
C74  = Atom('C')  
C75  = Atom('C')  
O76  = Atom('O')  
O77  = Atom('O')  
H78  = Atom('H')  
H79  = Atom('H') 
H80  = Atom('H')  
H81  = Atom('H')  
H82  = Atom('H') 
H83  = Atom('H') 
H84  = Atom('H') 
H85  = Atom('H') 
H86  = Atom('H') 
H87  = Atom('H') 
H88  = Atom('H') 
H89  = Atom('H') 
H90  = Atom('H') 
H91  = Atom('H') 
H92  = Atom('H') 
H93  = Atom('H') 
H94  = Atom('H') 
H95  = Atom('H') 
H96  = Atom('H') 
H97  = Atom('H') 
H98  = Atom('H') 
H99  = Atom('H') 
H100 = Atom('H')  
H101 = Atom('H')  
H102 = Atom('H')  
H103 = Atom('H')  
H104 = Atom('H')  
H105 = Atom('H')  
H106 = Atom('H')  
H107 = Atom('H')  
H108 = Atom('H') 
H109 = Atom('H')  
H110 = Atom('H')  
H111 = Atom('H')  
H112 = Atom('H')  
H113 = Atom('H')  
H114 = Atom('H')  
H115 = Atom('H')  
H116 = Atom('H')  
H117 = Atom('H')  
H118 = Atom('H')  
H119 = Atom('H')  
H120 = Atom('H')  
H121 = Atom('H')  
H122 = Atom('H')  
H123 = Atom('H')  
H124 = Atom('H') 
H125 = Atom('H') 
H126 = Atom('H') 
H127 = Atom('H')  
H128 = Atom('H') 
H129 = Atom('H')  
H130 = Atom('H')  
H131 = Atom('H')  
H132 = Atom('H')  
H133 = Atom('H')  
H134 = Atom('H')  
H135 = Atom('H')  
H136 = Atom('H')  
H137 = Atom('H')  
H138 = Atom('H')  
H139 = Atom('H')  
H140 = Atom('H')  
H141 = Atom('H')  
H142 = Atom('H')  
H143 = Atom('H')  
H144 = Atom('H') 
H145 = Atom('H')  
H146 = Atom('H')  
H147 = Atom('H') 


pdbmap = [('UNK', {'C1': C1, 'C2': C2, 'C3': C3, 'C4': C4, 'O5': O5,
'C6': C6, 'C7': C7, 'C8': C8, 'C9': C9, 'O10': O10,
                   'C11': C11, 'C12': C12, 'C13': C13, 'C14': C14,
'O15': O15, 'C16': C16, 'C17': C17, 'C18': C18, 'O19': O19, 'O20': O20,
                   'O21': O21, 'C22': C22, 'C23': C23, 'O24': O24,
'O25': O25, 'O26': O26, 'O27': O27, 'C28': C28, 'C29': C29, 'O30': O30,
                   'O31': O31, 'O32': O32, 'O33': O33, 'C34': C34,
'C35': C35, 'O36': O36, 'O37': O37, 'O38': O38, 'O39': O39, 'C40': C40,
                   'C41': C41, 'O42': O42, 'O43': O43, 'C44': C44,
'C45': C45, 'C46': C46, 'C47': C47, 'O48': O48, 'C49': C49, 'C50': C50,
                   'C51': C51, 'C52': C52, 'O53': O53, 'C54': C54,
'C55': C55, 'C56': C56, 'C57': C57, 'O58': O58, 'C59': C59, 'O60':
O60, 
                   'O61': O61, 'C62': C62, 'C63': C63, 'O64': O64,
'O65': O65, 'O66': O66, 'O67': O67, 'C68': C68, 'C69': C69, 'O70':
O70, 
                   'O71': O71, 'O72': O72, 'O73': O73, 'C74': C74,
'C75': C75, 'O76': O76, 'O77': O77, 'H78': H78, 'H79': H79, 'H80':
H80, 
                   'H81': H81, 'H82': H82, 'H83': H83, 'H84': H84,
'H85': H85, 'H86': H86, 'H87': H87, 'H88': H88, 'H89': H89, 'H90':
H90, 
                   'H91': H91, 'H92': H92, 'H93': H93, 'H94': H94,
'H95': H95, 'H96': H96, 'H97': H97, 'H98': H98, 'H99': H99, 'H100':
H100, 
                   'H101': H101, 'H102': H102, 'H103': H103, 'H104':
H104, 'H105': H105, 'H106': H106, 'H107': H107, 'H108': H108, 'H109':
H109, 'H110': H110, 
                   'H111': H111, 'H112': H112, 'H113': H113, 'H114':
H114, 'H115': H115, 'H116': H116, 'H117': H117, 'H118': H118, 'H119':
H119, 'H120': H120, 
                   'H121': H121, 'H122': H122, 'H123': H123, 'H124':
H124, 'H125': H125, 'H126': H126, 'H127': H127, 'H128': H128, 'H129':
H129, 'H130': H130, 
                   'H131': H131, 'H132': H132, 'H133': H133, 'H134':
H134, 'H135': H135, 'H136': H136, 'H137': H137, 'H138': H138, 'H139':
H139, 'H140': H140, 
                   'H141': H141, 'H142': H142, 'H143': H143, 'H144':
H144, 'H145': H145, 'H146': H146, 'H147': H147})]

# Just anything, to make the test code work...

amber_atom_type = {C1: 'CT', C2: 'CT', C3: 'CT', C4: 'CT', O5: 'O',
C6: 'CT', C7: 'CT', C8: 'CT', C9: 'CT', O10: 'O', 
		    C11: 'CT', C12: 'CT', C13: 'CT', C14: 'CT', O15: 'O', C16: 'CT',
C17: 'CT', C18: 'CT', O19: 'OH', O20: 'OH',
		    O21: 'O', C22: 'CT', C23: 'CT', O24: 'OH', O25: 'OH', O26: 'OH',
O27: 'O', C28: 'CT', C29: 'CT', O30: 'OH',
		    O31: 'OH', O32: 'OH', O33: 'O', C34: 'CT', C35: 'CT', O36: 'OH',
O37: 'OH', O38: 'OH', O39: 'O', C40: 'CT',
		    C41: 'CT', O42: 'OH', O43: 'O', C44: 'CT', C45: 'CT', C46: 'CT',
C47: 'CT', O48: 'O', C49: 'CT', C50: 'CT',
		    C51: 'CT', C52: 'CT', O53: 'O', C54: 'CT', C55: 'CT', C56: 'CT',
C57: 'CT', O58: 'O', C59: 'CT', O60: 'OH',
		    O61: 'OH', C62: 'CT', C63: 'CT', O64: 'OH', O65: 'O', O66: 'OH',
O67: 'OH', C68: 'CT', C69: 'CT', O70: 'OH',
		    O71: 'O', O72: 'OH', O73: 'OH', C74: 'CT', C75: 'CT', O76: 'OH',
O77: 'O', H78: 'HO', H79: 'HC', H80: 'HO',
		    H81: 'HC', H82: 'HO', H83: 'HC', H84: 'HC', H85: 'HC', H86:
'HC', H87: 'HC', H88: 'HO', H89: 'HC', H90: 'HO',
		    H91: 'HC', H92: 'HO', H93: 'HC', H94: 'HC', H95: 'HC', H96:
'HC', H97: 'HC', H98: 'HO', H99: 'HC', H100: 'HO',
		    H101: 'HC', H102: 'HO', H103: 'HC', H104: 'HC', H105: 'HC',
H106: 'HC', H107: 'HC', H108: 'HO', H109: 'HC', H110: 'HO',
		    H111: 'HC', H112: 'HO', H113: 'HC', H114: 'HC', H115: 'HC',
H116: 'HC', H117: 'HC', H118: 'HO', H119: 'HC', H120: 'HO',
		    H121: 'HC', H122: 'HO', H123: 'HC', H124: 'HC', H125: 'HC',
H126: 'HC', H127: 'HC', H128: 'HO', H129: 'HC', H130: 'HO',
		    H131: 'HC', H132: 'HO', H133: 'HC', H134: 'HC', H135: 'HC',
H136: 'HC', H137: 'HC', H138: 'HO', H139: 'HC', H140: 'HO',
		    H141: 'HC', H142: 'HO', H143: 'HC', H144: 'HC', H145: 'HC',
H146: 'HC', H147: 'HC'}

amber_charge = {C1: 0.0, C2: 0.0, C3: 0.0, C4: 0.0, O5: 0.0, C6: 0.0,
C7: 0.0, C8: 0.0, C9: 0.0, O10: 0.0, 
		 C11: 0.0, C12: 0.0, C13: 0.0, C14: 0.0, O15: 0.0, C16: 0.0, C17:
0.0, C18: 0.0, O19: 0.0, O20: 0.0,
	         O21: 0.0, C22: 0.0, C23: 0.0, O24: 0.0, O25: 0.0, O26: 0.0,
O27: 0.0, C28: 0.0, C29: 0.0, O30: 0.0,
		 O31: 0.0, O32: 0.0, O33: 0.0, C34: 0.0, C35: 0.0, O36: 0.0, O37:
0.0, O38: 0.0, O39: 0.0, C40: 0.0,
	         C41: 0.0, O42: 0.0, O43: 0.0, C44: 0.0, C45: 0.0, C46: 0.0,
C47: 0.0, O48: 0.0, C49: 0.0, C50: 0.0,
		 C51: 0.0, C52: 0.0, O53: 0.0, C54: 0.0, C55: 0.0, C56: 0.0, C57:
0.0, O58: 0.0, C59: 0.0, O60: 0.0,
		 O61: 0.0, C62: 0.0, C63: 0.0, O64: 0.0, O65: 0.0, O66: 0.0, O67:
0.0, C68: 0.0, C69: 0.0, O70: 0.0,
		 O71: 0.0, O72: 0.0, O73: 0.0, C74: 0.0, C75: 0.0, O76: 0.0, O77:
0.0, H78: 0.0, H79: 0.0, H80: 0.0,
		 H81: 0.0, H82: 0.0, H83: 0.0, H84: 0.0, H85: 0.0, H86: 0.0, H87:
0.0, H88: 0.0, H89: 0.0, H90: 0.0,
		 H91: 0.0, H92: 0.0, H93: 0.0, H94: 0.0, H95: 0.0, H96: 0.0, H97:
0.0, H98: 0.0, H99: 0.0, H100: 0.0,
		 H101: 0.0, H102: 0.0, H103: 0.0, H104: 0.0, H105: 0.0, H106: 0.0,
H107: 0.0, H108: 0.0, H109: 0.0, H110: 0.0,
		 H111: 0.0, H112: 0.0, H113: 0.0, H114: 0.0, H115: 0.0, H116: 0.0,
H117: 0.0, H118: 0.0, H119: 0.0, H120: 0.0,
		 H121: 0.0, H122: 0.0, H123: 0.0, H124: 0.0, H125: 0.0, H126: 0.0,
H127: 0.0, H128: 0.0, H129: 0.0, H130: 0.0,
		 H131: 0.0, H132: 0.0, H133: 0.0, H134: 0.0, H135: 0.0, H136: 0.0,
H137: 0.0, H138: 0.0, H139: 0.0, H140: 0.0, 
		 H141: 0.0, H142: 0.0, H143: 0.0, H144: 0.0, H145: 0.0, H146: 0.0,
H147: 0.0}



configurations = {
    'default': PDBFile('bcdex3.pdb')
    }


What's my mistake?

Thanx

Victor
==
Victor M. Rosas García
Computational Chemistry Apprentice

e-mail: quimico69@yahoo.com

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com