Exemplo n.º 1
0
    def __init__(self, PDBlines, parent, atoms):
        Molecule.__init__(self, PDBlines)
        self.parent = parent
        self.atoms = atoms
        for atom in atoms:
            atom.parent = self
        line = PDBlines[0]
        self.res_type1 = string.strip(line[17:20])
        self.res_number = string.atoi(line[23:26])

        self.is_Nterm = 0
        self.is_Cterm = 0
        self.has_central_pt = 0
        self.atoms_dict = {}
        for atom in self.atoms:
            self.atoms_dict[atom.atom_type] = atom
            if atom.atom_type[:2] == 'C3':
                self.central_pt = Point(atom.x, atom.y, atom.z)
                self.central_atom = atom
                self.x = atom.x
                self.y = atom.y
                self.z = atom.z
                self.has_central_pt = 1
        self.is_Nterm = 0
        self.is_Cterm = 0
        self.vtk_arg_list = {}

        trace_args = {'color': [0.1, 0.1, 1.0], 'opacity': 1.0}
        self.vtk_arg_list['trace'] = trace_args
        self.visible = 0
        self.transparent = 0
Exemplo n.º 2
0
    def __init__(self, PDBlines, parent, atoms):
        Molecule.__init__(self, PDBlines)
        self.parent = parent
        self.atoms = atoms
        for atom in atoms:
            atom.parent = self
        line = PDBlines[0]
        self.res_type1  = string.strip(line[17:20])
        self.res_number = string.atoi(line[23:26])

        self.is_Nterm = 0
        self.is_Cterm = 0
        self.has_central_pt = 0    
        self.atoms_dict = {}
        for atom in self.atoms:
            self.atoms_dict[atom.atom_type] = atom
            if atom.atom_type[:2] == 'C3':
                self.central_pt = Point(atom.x, atom.y, atom.z)
                self.central_atom = atom
                self.x=atom.x
                self.y=atom.y
                self.z=atom.z
                self.has_central_pt = 1
        self.is_Nterm = 0
        self.is_Cterm = 0
        self.vtk_arg_list = {}
        

        trace_args = {'color':[0.1,0.1,1.0],
                      'opacity':1.0}
        self.vtk_arg_list['trace'] = trace_args
        self.visible = 0
        self.transparent = 0
Exemplo n.º 3
0
 def __init__(self, PDBlines, parent):
     Molecule.__init__(self, PDBlines)
     self.parent = parent
     for atom in self.atoms:
         atom.parent = self
     self.res_number = string.atoi(PDBlines[0][23:26])
     self.key = '%s%s' % (self.res_number, self.chain_name)
Exemplo n.º 4
0
 def __init__(self, PDBlines, parent):
     Molecule.__init__(self, PDBlines)
     self.parent = parent
     for atom in self.atoms:
         atom.parent = self
     self.res_number = string.atoi(PDBlines[0][23:26])
     self.key = '%s%s'%(self.res_number, self.chain_name)
Exemplo n.º 5
0
    def __init__(self, parent, PDBlines, atoms):
        Molecule.__init__(self, PDBlines)
        self.atoms = atoms
        for atom in self.atoms:
            atom.parent = self
        self.parent = parent
        # load amino acid properties
        types = {'ALA':'A',
                 'CYS':'C','CYD':'C','CYX':'C','CYZ':'C',
                 'ASP':'D','GLU':'E','PHE':'F','GLY':'G',
                 'HIS':'H','HID':'H','HIE':'H',
                 'ILE':'I','LYS':'K','LEU':'L',
                 'MET':'M','ASN':'N','PRO':'P','GLN':'Q','ARG':'R',
                 'SER':'S','THR':'T','VAL':'V','TRP':'W','TYR':'Y'}
        self.res_type1  = types[self.res_type]
        line = PDBlines[0]
        self.res_number = string.atoi(line[23:26])
        # store alpha carbon coordinates
        self.has_central_pt = 0
        self.atoms_dict = {}
        for atom in self.atoms:
            self.atoms_dict[atom.atom_type] = atom
            if atom.atom_type == 'CA':
                self.central_pt = Point(atom.x, atom.y, atom.z)
                self.central_atom = atom
                self.x=atom.x
                self.y=atom.y
                self.z=atom.z
                self.has_central_pt = 1
        try:
            self.atoms_dict['CA']
        except KeyError:
            print "Warning: %s%d has no apparent alpha carbon"%(self.res_type, self.res_number)

        types = {'ALA':71.09,'CYS':103.15,'CYD':103.15,'CYX':103.15,'CYZ':103.15,
                 'ASP':115.09,'GLU':129.12,'PHE':147.18,
                 'GLY':57.05,'HIS':137.14,'HID':137.14,'HIE':137.14,'ILE':113.16,'LYS':128.17,'LEU':113.16,
                 'MET':131.19,'ASN':114.11,'PRO':97.12,'GLN':128.14,'ARG':156.19,
                 'SER':87.08,'THR':101.11,'VAL':99.14,'TRP':186.21,'TYR':163.18}
        self.mw = types[self.res_type]
        # these get fixed later on in initialization by class Protein
        self.is_Nterm = 0
        self.is_Cterm = 0
        # create the vtk_args_list
        # [onoff, width, color, splines, sides, specular, specularpower]
        self.vtk_arg_list = {}                  # this gets overridden because residue doesnt need everything in Molecule
        trace_args = {'color':[0.1,0.1,1.0],
                     'opacity':1.0}
        self.vtk_arg_list['trace'] = trace_args
        self.visible = 0
        self.transparent = 0
Exemplo n.º 6
0
 def __init__(self, PDBlines, parent):
     Molecule.__init__(self, PDBlines)
     self.parent = parent
     self.residues = []
     self.residue_dict = {}
     self.selected = 1
     self.key = self.chain_name
     self.default_chain_color = self.get_chain_color_word()
     trace_args   = {'visualize':1,
                    'currently_on':0,
                    'representation':'tube',
                    'width':0.4,
                    'splines':6,
                    'sides':5,
                    'specular':0.1,
                    'specular_power':10}
     self.vtk_arg_list['trace']  = trace_args
Exemplo n.º 7
0
 def __init__(self, PDBlines, parent):
     Molecule.__init__(self, PDBlines)
     self.parent = parent
     self.residues = []
     self.residue_dict = {}
     self.selected = 1
     self.key = self.chain_name
     self.default_chain_color = self.get_chain_color_word()
     trace_args = {
         'visualize': 1,
         'currently_on': 0,
         'representation': 'tube',
         'width': 0.4,
         'splines': 6,
         'sides': 5,
         'specular': 0.1,
         'specular_power': 10
     }
     self.vtk_arg_list['trace'] = trace_args
Exemplo n.º 8
0
 def __init__(self, PDBlines):
     Molecule.__init__(self, PDBlines)
     self.res_number = string.atoi(PDBlines[0][23:26])
     self.key = '%s%s'%(self.res_number, self.chain_name)
Exemplo n.º 9
0
 def deselect(self):
     Molecule.deselect(self)
     self.selected = 0
     for rez in self.residues:
         rez.deselect()
Exemplo n.º 10
0
 def select(self):
     Molecule.select(self)
     self.selected = 1
     for rez in self.residues:
         rez.select()
Exemplo n.º 11
0
    def __init__(self, parent, PDBlines, atoms):
        Molecule.__init__(self, PDBlines)
        self.atoms = atoms
        for atom in self.atoms:
            atom.parent = self
        self.parent = parent
        # load amino acid properties
        types = {
            'ALA': 'A',
            'CYS': 'C',
            'CYD': 'C',
            'CYX': 'C',
            'CYZ': 'C',
            'ASP': 'D',
            'GLU': 'E',
            'PHE': 'F',
            'GLY': 'G',
            'HIS': 'H',
            'HID': 'H',
            'HIE': 'H',
            'ILE': 'I',
            'LYS': 'K',
            'LEU': 'L',
            'MET': 'M',
            'ASN': 'N',
            'PRO': 'P',
            'GLN': 'Q',
            'ARG': 'R',
            'SER': 'S',
            'THR': 'T',
            'VAL': 'V',
            'TRP': 'W',
            'TYR': 'Y'
        }
        self.res_type1 = types[self.res_type]
        line = PDBlines[0]
        self.res_number = string.atoi(line[23:26])
        # store alpha carbon coordinates
        self.has_central_pt = 0
        self.atoms_dict = {}
        for atom in self.atoms:
            self.atoms_dict[atom.atom_type] = atom
            if atom.atom_type == 'CA':
                self.central_pt = Point(atom.x, atom.y, atom.z)
                self.central_atom = atom
                self.x = atom.x
                self.y = atom.y
                self.z = atom.z
                self.has_central_pt = 1
        try:
            self.atoms_dict['CA']
        except KeyError:
            print "Warning: %s%d has no apparent alpha carbon" % (
                self.res_type, self.res_number)

        types = {
            'ALA': 71.09,
            'CYS': 103.15,
            'CYD': 103.15,
            'CYX': 103.15,
            'CYZ': 103.15,
            'ASP': 115.09,
            'GLU': 129.12,
            'PHE': 147.18,
            'GLY': 57.05,
            'HIS': 137.14,
            'HID': 137.14,
            'HIE': 137.14,
            'ILE': 113.16,
            'LYS': 128.17,
            'LEU': 113.16,
            'MET': 131.19,
            'ASN': 114.11,
            'PRO': 97.12,
            'GLN': 128.14,
            'ARG': 156.19,
            'SER': 87.08,
            'THR': 101.11,
            'VAL': 99.14,
            'TRP': 186.21,
            'TYR': 163.18
        }
        self.mw = types[self.res_type]
        # these get fixed later on in initialization by class Protein
        self.is_Nterm = 0
        self.is_Cterm = 0
        # create the vtk_args_list
        # [onoff, width, color, splines, sides, specular, specularpower]
        self.vtk_arg_list = {
        }  # this gets overridden because residue doesnt need everything in Molecule
        trace_args = {'color': [0.1, 0.1, 1.0], 'opacity': 1.0}
        self.vtk_arg_list['trace'] = trace_args
        self.visible = 0
        self.transparent = 0
Exemplo n.º 12
0
 def deselect(self):
     Molecule.deselect(self)
     self.selected = 0
     for rez in self.residues:
         rez.deselect()
Exemplo n.º 13
0
 def select(self):
     Molecule.select(self)
     self.selected = 1
     for rez in self.residues:
         rez.select()
Exemplo n.º 14
0
 def __init__(self, PDBlines):
     Molecule.__init__(self, PDBlines)
     self.res_number = string.atoi(PDBlines[0][23:26])
     self.key = '%s%s'%(self.res_number, self.chain_name)