from colorama import Fore from CHOMP import PDB, NewSystem, RotamerLibrary, RotamerGenerator, FasterPacker, SimulatedAnnealingPacker, ResidueGenerator from chomp_setup import dunbrack_lib, energy_function, NewNeighborMap from chomptools.design import DesignSystem, DesignEnergyGraph #from chomptools.cplexpacker import CplexPacker from time import time from CHOMP import System inputpdb = '2zta.pdb' assert os.path.isfile(inputpdb) from chomptools.design import Palette ### Load a protein normally P = PDB(inputpdb) P.RemoveHydrogens() S = NewSystem(P) print 'WT E', energy_function(S) dimer = NewSystem(P) S = System.Join(dimer) print 'WT E', energy_function(S) S.WritePDB('2zta_renum.pdb') ### Create a design palette ### TODO: make a version of the chomptools.design tools that ### identifies residues by ID and chain, rather than just ID ### this will facilitate the design of oligomers dp = Palette(S) dp.AddWT() ## Manually identified interface residues in PyMOL ## Use this line to freeze all non-interfacial resides #dp.FreezeAll()
print Fore.GREEN print 'DESIGN RESULTS' print 'Chain A:', seqA print 'Chain B:', seqB if seqA == seqB: print 'H**o-dimer!' else: print 'Hetero-dimer' print Fore.RESET ### Let's rescore the redesigned output. It will vary a bit from the E that came out of ### combinatorial optimization. First, there is the usual source of deviation (neglect of ### small interactions in the EnergyGraph. Anoter source of small deviations is that when ### we create a system using CreateSystemFromRotamers coordinate precision is reduced to ### the precision of a PDB file. score = energy_function(designedS) print 'E =', score open('designed.pdb', 'w').write(str(designedS)) open('designed.seq', 'w').write(designedS.GetSequence()) S.Label = 'Wild-type' designedS.Label = 'Redesigned' energy_function.CompareSystems(S, designedS) for i in range(0, 10): mp = MonteCarloPacker() mp.SetTemperature(.1) combo, E = mp.Pack(eg.pl, eg) print 'Packer E', E print 'Retest E', eg[combo]
print Fore.GREEN print 'DESIGN RESULTS' print 'Chain A:',seqA print 'Chain B:',seqB if seqA == seqB: print 'H**o-dimer!' else: print 'Hetero-dimer' print Fore.RESET ### Let's rescore the redesigned output. It will vary a bit from the E that came out of ### combinatorial optimization. First, there is the usual source of deviation (neglect of ### small interactions in the EnergyGraph. Anoter source of small deviations is that when ### we create a system using CreateSystemFromRotamers coordinate precision is reduced to ### the precision of a PDB file. score = energy_function(designedS) print 'E =', score open('designed.pdb','w').write(str(designedS)) open('designed.seq','w').write(designedS.GetSequence()) S.Label = 'Wild-type' designedS.Label = 'Redesigned' energy_function.CompareSystems(S, designedS) for i in range(0,10): mp=MonteCarloPacker() mp.SetTemperature(.1) combo, E = mp.Pack(eg.pl, eg) print 'Packer E',E