def findGmec(epart):

	print("\n\nFinding GMEC with energy partition: %s\n" % epart)

	# configure conformation energies with the desired energy partition
	confEcalc = osprey.ConfEnergyCalculator(confSpace, ecalc, energyPartition=epart)

	# find the GMEC
	emat = osprey.EnergyMatrix(confEcalc)
	astar = osprey.AStarTraditional(emat, confSpace)
	gmec = osprey.GMECFinder(astar, confEcalc).find()
Example #2
0
    def makeAStar(rcs, emat=emat):
        return osprey.AStarTraditional(
            emat,
            rcs,
            showProgress=False,

            # Set a limit on the size of the conf tree so we don't use unlimited memory.
            # The minimum possible value here is (num design positions + 1), but setting this too
            # small can make A* search take much much longer. So pick something big enough to keep
            # A* running efficiently, but not so big that all the nodes don't fit in memory.
            # Keep in mind, COMETS will keep multiple conf trees in memory at the same time.
            # Nodes use a variable amount of memory though, so there's no hard correspondence
            # between numbers of node and amount of memory used. You might need to experiment
            # to see what values work best here
            # (this setting works in tandem with the minNumConfTrees setting above)
            maxNumNodes=1000000)
Example #3
0
 def makeRigidAStar(rcs, emat=info.ematRigid):
     return osprey.AStarTraditional(emat, rcs, showProgress=True)
Example #4
0
 def makeAStar_min(rcs, emat=info.ematMinimized):
     return osprey.AStarTraditional(emat, rcs, showProgress=True)
Example #5
0
def makeAStar(rcs, emat=emat):
    return osprey.AStarTraditional(emat, rcs, showProgress=False)
Example #6
0
 def makeAStarMinimized(rcs, emat=ematMinimized):
     return osprey.AStarTraditional(emat, rcs, showProgress=False)
Example #7
0
 def makePfunc(rcs, confEcalc=info.confEcalcMinimized, emat=ematMinimized):
     return osprey.PartitionFunction(
         confEcalc, osprey.AStarTraditional(emat, rcs, showProgress=False),
         osprey.AStarTraditional(emat, rcs, showProgress=False), rcs)
Example #8
0
 def makeAStarRigid(rcs, emat=complex.ematRigid):
     return osprey.AStarTraditional(complex.ematRigid,
                                    rcs,
                                    showProgress=False)
Example #9
0
 def makeAStar(rcs, emat=complex.emat):
     return osprey.AStarTraditional(complex.emat,
                                    rcs,
                                    showProgress=False,
                                    maxNumNodes=2000000)
Example #10
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)