Esempio n. 1
0
strand = osprey.Strand('1CC8.ss.pdb')
strand.flexibility['A2'].setLibraryRotamers('ALA', 'GLY')
strand.flexibility['A3'].setLibraryRotamers(osprey.WILD_TYPE, 'VAL')
strand.flexibility['A4'].setLibraryRotamers(osprey.WILD_TYPE)

# make the conf space
confSpace = osprey.ConfSpace(strand)

# choose a forcefield
ffparams = osprey.ForcefieldParams()

# how should we compute energies of molecules?
ecalc = osprey.EnergyCalculator(confSpace, ffparams)

# how should we define energies of conformations?
confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc)

# compute the energy matrix
emat = osprey.EnergyMatrix(confEcalc)

# run DEE with just steric pruning
pmat = osprey.DEE(confSpace, emat, showProgress=True)

# or run DEE with Goldstein pruning
#i0 = 10.0 # kcal/mol
#pmat = osprey.DEE(confSpace, emat, showProgress=True, singlesGoldsteinDiffThreshold=i0, pairsGoldsteinDiffThreshold=i0)

# find the best sequence and rotamers
astar = osprey.AStarMPLP(emat, pmat)
gmec = osprey.GMECFinder(astar, confEcalc).find()
Esempio n. 2
0
import osprey

osprey.start()

# define a strand
strand = osprey.Strand('1CC8.ss.pdb')
strand.flexibility['A2'].setLibraryRotamers('ALA', 'GLY')
strand.flexibility['A3'].setLibraryRotamers(osprey.WILD_TYPE, 'VAL')
strand.flexibility['A4'].setLibraryRotamers(osprey.WILD_TYPE)

# make the conf space
confSpace = osprey.ConfSpace(strand)

# choose a forcefield
ffparams = osprey.ForcefieldParams()

# how should we compute energies of molecules?
ecalc = osprey.EnergyCalculator(confSpace, ffparams)

# how should we define energies of conformations?
confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc)

# how should confs be ordered and searched?
emat = osprey.EnergyMatrix(confEcalc)
astar = osprey.AStarMPLP(emat, confSpace)

# find the best sequence and rotamers
gmec = osprey.GMECFinder(astar, confEcalc).find()

Esempio n. 3
0
def astarFactory(emat, rcs):
    return osprey.AStarMPLP(emat, rcs, numIterations=5)
Esempio n. 4
0
protein = osprey.Strand(mol, residues=['A2', 'A30'])

protein.flexibility['A2'].setLibraryRotamers('ALA', 'GLY')
protein.flexibility['A3'].setLibraryRotamers(osprey.WILD_TYPE, 'VAL',
                                             'ARG').setContinuous(10)
protein.flexibility['A4'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers()

# make the conf space
confSpace = osprey.ConfSpace(protein)

# how should molecule energies be calculated?
ecalc = osprey.EnergyCalculator(confSpace, ffparams, parallelism=parallelism)

# how could conformation energies be calculated?
confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc)

# calculate the energy matrix
emat = osprey.EnergyMatrix(confEcalc, cacheFile='/tmp/emat.dat')

# define the conformation search
astar = osprey.AStarMPLP(emat, confSpace, numIterations=1)
# or
traditionalAstar = osprey.AStarTraditional(emat, confSpace)

energyWindow = 0.1  # kcal/mol
confs = osprey.GMECFinder(astar,
                          confEcalc,
                          printIntermediateConfs=True,
                          confLog='confs.txt').find(energyWindow)
Esempio n. 5
0
# define a strand
strand = osprey.Strand('1CC8.ss.pdb')
strand.flexibility['A2'].setLibraryRotamers('ALA', 'GLY')
strand.flexibility['A3'].setLibraryRotamers(osprey.WILD_TYPE, 'VAL')
strand.flexibility['A4'].setLibraryRotamers(osprey.WILD_TYPE)

# make the conf space
confSpace = osprey.ConfSpace(strand)

# choose a forcefield
ffparams = osprey.ForcefieldParams()

# compute the reference energies (with res entropy)
ecalc = osprey.EnergyCalculator(confSpace, ffparams)
eref = osprey.ReferenceEnergies(confSpace, ecalc, addResEntropy=True)

# define conf energy, with res entropy
confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc, referenceEnergies=eref, addResEntropy=True)

# use the reference energies for energy matrix computation
emat = osprey.EnergyMatrix(confEcalc)

# Optional: using edge MPLP when using reference energies can make A* faster
astar = osprey.AStarMPLP(emat, confSpace, updater=osprey.EdgeUpdater())

# find the best sequence and rotamers
gmec = osprey.GMECFinder(astar, confEcalc).find()


Esempio n. 6
0
import osprey

osprey.start()

# define a strand
strand = osprey.Strand('1CC8.ss.pdb')
strand.flexibility['A2'].setLibraryRotamers(osprey.WILD_TYPE).setContinuous()
strand.flexibility['A3'].setLibraryRotamers(osprey.WILD_TYPE).setContinuous()
strand.flexibility['A4'].setLibraryRotamers(osprey.WILD_TYPE).setContinuous()

# make the conf space
confSpace = osprey.ConfSpace(strand)

# choose a forcefield
ffparams = osprey.ForcefieldParams()

# how to compute the energy of a conformation?
ecalc = osprey.EnergyCalculator(confSpace, ffparams)
confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc)

# configure external memory settings
osprey.initExternalMemory(64)

# how should confs be ordered and searched?
emat = osprey.EnergyMatrix(confEcalc)
astar = osprey.AStarMPLP(emat, confSpace, useExternalMemory=True)

# find the best sequence and rotamers
gmec = osprey.GMECFinder(astar, confEcalc, useExternalMemory=True).find()