Example #1
0
def main():
    """
    Simple main that creates the proteins, mutates the protein, calculates pKa values, and prints pKa files
    """

    # I. preliminaries

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()
    version = propka.makeVersion(label=options.version_label)

    # creating protein object and calculating reference folding energy
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)
    myProtein.calculatePKA(version=version, options=options)
    dG_ref = myProtein.calculateFoldingEnergy(options=options)

    # creating a dictionary with atom objects needed for e.g. alignment mutations
    atoms = mutate.makeCompositeAtomsDictionary(protein=myProtein, pdbfiles=pdbfiles, options=options)


    # II. making mutations and calculating the folding energy
    for mutation in options.mutations:
      pka_print(mutation)
      newProtein = mutate.makeMutatedProtein(myProtein, atoms=atoms, mutation=mutation, options=options)

      # calculating pKa values for ionizable residues
      newProtein.calculatePKA(version=version, options=options)
      newProtein.writePKA(options=options)
      dG_mut = newProtein.calculateFoldingEnergy(options=options)
      pka_print("staliblization:")
      pka_print("%8.2lf %6.2lf  %s" % (dG_ref, dG_ref-dG_ref, "WT"))
      pka_print("%8.2lf %6.2lf  %s" % (dG_mut, dG_mut-dG_ref, "Mutant"))
      newProtein.writePDB(hydrogens=True, options=options)
Example #2
0
    def makeMutant(self, mutation=None, atoms=None, version=None, options=None):
        """ 
        mutates the protein according to 'mutation' using 'method'
        """
        import Source.mutate as mutate
        newProtein = mutate.makeMutatedProtein(self, mutation=mutation, atoms=atoms, options=options)

        return  newProtein
Example #3
0
def main():
    """
    Simple main that creates the proteins, mutates the protein, calculates pKa values, and prints pKa files
    """

    # I. preliminaries

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()
    version = propka.makeVersion(label=options.version_label)

    # creating protein object and calculating reference folding energy
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)
    myProtein.calculatePKA(version=version, options=options)
    dG_ref = myProtein.calculateFoldingEnergy(options=options)

    # creating a dictionary with atom objects needed for e.g. alignment mutations
    atoms = mutate.makeCompositeAtomsDictionary(protein=myProtein,
                                                pdbfiles=pdbfiles,
                                                options=options)

    # II. making mutations and calculating the folding energy
    for mutation in options.mutations:
        print(mutation)
        newProtein = mutate.makeMutatedProtein(myProtein,
                                               atoms=atoms,
                                               mutation=mutation,
                                               options=options)

        # calculating pKa values for ionizable residues
        newProtein.calculatePKA(version=version, options=options)
        newProtein.writePKA(options=options)
        dG_mut = newProtein.calculateFoldingEnergy(options=options)
        print("staliblization:")
        print("%8.2lf %6.2lf  %s" % (dG_ref, dG_ref - dG_ref, "WT"))
        print("%8.2lf %6.2lf  %s" % (dG_mut, dG_mut - dG_ref, "Mutant"))
        newProtein.writePDB(hydrogens=True, options=options)