Пример #1
0
def main():
    """
    This is the main that just performs the determinant search
    """

    # I. preliminaries

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

    # creating protein object
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)

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

    # II. optimise 'single-site' mutation and selecting the good determinants
    mutations = []
    for mutation in options.mutations:
        # II.a. combinatorial search of 'determinants' for each site
        best_mutation = myProtein.optimizeMutationDeterminants(
            atoms=atoms, mutation=mutation, version=version, options=options)
        if best_mutation != None:
            mutations.append(best_mutation)
Пример #2
0
def main():
    """
    This is the main that just performs the determinant search
    """

    # I. preliminaries

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

    # creating protein object
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)

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


    # II. optimise 'single-site' mutation and selecting the good determinants
    mutations = []
    for mutation in options.mutations:
        # II.a. combinatorial search of 'determinants' for each site
        best_mutation = myProtein.optimizeMutationDeterminants(atoms=atoms, mutation=mutation, version=version, options=options)
        if best_mutation != None:
            mutations.append( best_mutation )
Пример #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:
      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)
Пример #4
0
def main():
    """
    This is a tailor-made propka-executable for propka's GUI, but also useful for commandline execution
    """

    # I. preliminaries

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

    # creating the protein object
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)

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

    # II. optimise 'single-site' mutation and selecting the good determinants
    mutations = []
    for mutation in options.mutations:
        # II.a. combinatorial search of 'determinants' for each site
        best_mutation = myProtein.optimizeMutationDeterminants(
            atoms=atoms, mutation=mutation, version=version, options=options)
        if best_mutation != None:
            mutations.append(best_mutation)

    # III. combinatorial search of single-site mutations with their resulting 'determinants'
    if len(mutations) > 0:
        best_mutation = myProtein.optimizeMultipleMutations(
            mutations=mutations, atoms=atoms, version=version, options=options)
    else:
        print("Could not find any mutation combination more stable than WT\n")
        sys.exit(8)
Пример #5
0
def main():
    """
    This is a tailor-made propka-executable for propka's GUI, but also useful for commandline execution
    """

    # I. preliminaries

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

    # creating the protein object
    myProtein = Protein(pdbfile=pdbfiles[0], options=options)

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


    # II. optimise 'single-site' mutation and selecting the good determinants
    mutations = []
    for mutation in options.mutations:
        # II.a. combinatorial search of 'determinants' for each site
        best_mutation = myProtein.optimizeMutationDeterminants(atoms=atoms, mutation=mutation, version=version, options=options)
        if best_mutation != None:
            mutations.append( best_mutation )

    # III. combinatorial search of single-site mutations with their resulting 'determinants'
    if len(mutations) > 0:
      best_mutation = myProtein.optimizeMultipleMutations(mutations=mutations, atoms=atoms, version=version, options=options)
    else:
      pka_print("Could not find any mutation combination more stable than WT\n")
      sys.exit(8)
Пример #6
0
def main():
    """
    Simple main that creates the proteins, protonates them, and prints new pdb files with hydrogen atoms
    """

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()

    for pdbfile in pdbfiles:

        # creating protein object
        myProtein = Protein(pdbfile=pdbfile, options=options)
        filename = "%s_new.pdb" % (myProtein.name)
        myProtein.writePDB(filename=filename, hydrogens=True)
Пример #7
0
def main():
    """
    Simple main that creates the proteins, protonates them, and prints new pdb files with hydrogen atoms
    """

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()

    for pdbfile in pdbfiles:

      # creating protein object
      myProtein = Protein(pdbfile=pdbfile, options=options)
      filename = "%s_new.pdb" % (myProtein.name)
      myProtein.writePDB(filename=filename, hydrogens=True)
Пример #8
0
def main():
    """
    Simple main that creates the proteins, calculates pKa values, and prints pKa files
    """

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()

    for pdbfile in pdbfiles:
        # creating protein object
        myProtein = Protein(pdbfile=pdbfile, options=options)

        # calculating pKa values for ionizable residues
        myProtein.calculatePKA(options=options)
        # printing pka file
        myProtein.writePKA(options=options)
Пример #9
0
def main():
    """
    Simple main that creates the proteins, calculates pKa values, and prints pKa files
    """

    # loading options, flaggs and arguments
    options, pdbfiles = lib.loadOptions()

    for pdbfile in pdbfiles:
        # creating protein object
        myProtein = Protein(pdbfile=pdbfile, options=options)
       
        # calculating pKa values for ionizable residues
        myProtein.calculatePKA(options=options)
        # printing pka file
        myProtein.writePKA(options=options)
Пример #10
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)