예제 #1
0
 def mutateToAla(self):
     """
     mutating residue to 'ALA'
     Note, if you mutate a ionizable residue to Ala it will remain in 'ionizable_residues list'
     and propka will try to calcualte the pKa of it !!!
     """
     keep_atoms = lib.atomList("ALA")
     self.printLabel()
     self.resName = "ALA"
     self.setResidueLabel()
     self.printLabel()
     new_atoms = []
     for atom in self.atoms:
         if atom.name in keep_atoms:
             new_atoms.append(atom)
     print(self.atoms)
     print(new_atoms)
     self.cleanupResidue
     self.pKa_mod = pKa_mod(self.resName)
     self.pKa_pro = self.pKa_mod
     self.atoms = new_atoms
예제 #2
0
 def mutateToAla(self):
     """
     mutating residue to 'ALA'
     Note, if you mutate a ionizable residue to Ala it will remain in 'ionizable_residues list'
     and propka will try to calcualte the pKa of it !!!
     """
     keep_atoms = lib.atomList("ALA")
     self.printLabel()
     self.resName = "ALA"
     self.setResidueLabel()
     self.printLabel()
     new_atoms = []
     for atom in self.atoms:
         if atom.name in keep_atoms:
             new_atoms.append(atom)
     pka_print(self.atoms)
     pka_print(new_atoms)
     self.cleanupResidue
     self.pKa_mod = pKa_mod(self.resName)
     self.pKa_pro = self.pKa_mod
     self.atoms = new_atoms
예제 #3
0
    def checkAtoms(self, options=None):
        """
        Checks that all heavy atoms are there
        """
        outstr  = "%s%4d - " % (self.resName, self.resNumb)
        atom_list = lib.atomList(self.resName)
        OK = True
        for name in atom_list:
            FOUND = False
            for atom in self.atoms:
                if atom.name == name:
                    FOUND = True
            if FOUND == False:
                outstr += " %s" % (name)
                OK = False

        if OK == True:
            self.checkConfigurations(verbose=False)
            outstr += " OK (%2d: %2d)" % (len(self.atoms), len(self.configurations))
            if options.verbose == True:
                print(outstr)
        else:
            outstr += " missing"
            print(outstr)
예제 #4
0
def makeCorrespondingAtomNames():
    """
    setting up a dictionary to define 'corresponding atoms' between two residues for 'overlap'
    """

    # getting list of all atoms
    resNames = residueList("standard")

    names = {}

    #   ----- back-bone & 'CB' section -----
    # simplifying the setup by including back-bone and 'CB' with this loop
    for resName1 in resNames:
      names[resName1] = {}
      for resName2 in resNames:
        names[resName1][resName2] = [['N',  'N'],
                                     ['CA', 'CA'],
                                     ['C',  'C'],
                                     ['O',  'O']]
        if resName1 != "GLY" and resName2 != "GLY":
          names[resName1][resName2].append(['CB', 'CB'])

    #   ----- self-overlap section -----
    # setting up all atoms for self-comparison
    for resName in resNames:
      atmNames = atomList(resName)
      for atmName in atmNames:
        if atmName not in ['N', 'CA', 'CB', 'C', 'O']:
          names[resName][resName].append([atmName, atmName])


    #   ----- side-chain section -----
    # side-chains left to consider (sorted alphabetically):
    # ['ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL']


    # ARG
    # None 


    # ASN
    str1 = "ASN  CG"
    str2 = "ARG  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)


    # ASP
    str1 = "ASP  CG"
    str2 = "ARG  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "ASP  OD1 OD2"
    str2 = "ASN  OD1 ND2"
    extendCorrespondingAtomsDictionary(names, str1, str2)


    # CYS
    # None 


    # GLN
    str1 = "GLN  CG CD"
    str2 = "ARG  CG CD"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "GLN  CG"
    str2 = "ASN  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "GLN  CG"
    str2 = "ASP  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)


    # GLU


    # HIS


    # ILE


    # LEU


    # LYS


    # MET


    # PHE


    # PRO


    # SER


    # THR


    # TRP


    # TYR
    str1 = "TYR  CG"
    str2 = "LYS  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)


    # VAL


    return  names
예제 #5
0
def makeCorrespondingAtomNames():
    """
    setting up a dictionary to define 'corresponding atoms' between two residues for 'overlap'
    """

    # getting list of all atoms
    resNames = residueList("standard")

    names = {}

    #   ----- back-bone & 'CB' section -----
    # simplifying the setup by including back-bone and 'CB' with this loop
    for resName1 in resNames:
        names[resName1] = {}
        for resName2 in resNames:
            names[resName1][resName2] = [['N', 'N'], ['CA', 'CA'], ['C', 'C'],
                                         ['O', 'O']]
            if resName1 != "GLY" and resName2 != "GLY":
                names[resName1][resName2].append(['CB', 'CB'])

    #   ----- self-overlap section -----
    # setting up all atoms for self-comparison
    for resName in resNames:
        atmNames = atomList(resName)
        for atmName in atmNames:
            if atmName not in ['N', 'CA', 'CB', 'C', 'O']:
                names[resName][resName].append([atmName, atmName])

    #   ----- side-chain section -----
    # side-chains left to consider (sorted alphabetically):
    # ['ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL']

    # ARG
    # None

    # ASN
    str1 = "ASN  CG"
    str2 = "ARG  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    # ASP
    str1 = "ASP  CG"
    str2 = "ARG  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "ASP  OD1 OD2"
    str2 = "ASN  OD1 ND2"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    # CYS
    # None

    # GLN
    str1 = "GLN  CG CD"
    str2 = "ARG  CG CD"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "GLN  CG"
    str2 = "ASN  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    str1 = "GLN  CG"
    str2 = "ASP  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    # GLU

    # HIS

    # ILE

    # LEU

    # LYS

    # MET

    # PHE

    # PRO

    # SER

    # THR

    # TRP

    # TYR
    str1 = "TYR  CG"
    str2 = "LYS  CG"
    extendCorrespondingAtomsDictionary(names, str1, str2)

    # VAL

    return names