Esempio n. 1
0
# choose a forcefield
ffparams = osprey.ForcefieldParams()

# read a PDB file for molecular info
mol = osprey.readPdb('2RL0.min.reduce.pdb')

# define the conformation space
strand = osprey.Strand(mol, residues=['G648', 'G654'])
for resNum in ['G649', 'G650', 'G651']:
	strand.flexibility[resNum]\
		.setLibraryRotamers(osprey.WILD_TYPE)\
		.addWildTypeRotamers()\
		.setContinuous()
confSpace = osprey.MultiStateConfSpace([
	# yeah, we didn't define any mutations,
	# but SOFEA still needs one "mutable" state to define the sequence space
	osprey.StateMutable('protein', osprey.ConfSpace(strand))
])

# we only care about the "wild-type" sequence in this case
seq = confSpace.seqSpace.makeWildTypeSequence()

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

# make a function that makes a SOFEA config object for a state
def config(state):

	# how should we define energies of conformations?
	confEcalc = osprey.ConfEnergyCalculator(
		state.confSpace,
Esempio n. 2
0
design.flexibility['G651'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()

# define the ligand strand
ligand = osprey.Strand(mol, templateLib=templateLib, residues=['A155', 'A194'])
ligand.flexibility['A172'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()
ligand.flexibility['A192'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()
ligand.flexibility['A193'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()

# make a multi-state conf space
confSpace = osprey.MultiStateConfSpace([
    osprey.StateMutable('design', osprey.ConfSpace(design)),
    osprey.StateUnmutable('ligand', osprey.ConfSpace(ligand)),
    osprey.StateMutable('complex', osprey.ConfSpace([design, ligand]))
])

# train a LUTE model for each state
for state in confSpace.states:

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

    # how should we define energies of conformations?
    eref = osprey.ReferenceEnergies(state.confSpace, ecalc)
    confEcalc = osprey.ConfEnergyCalculator(state.confSpace,
                                            ecalc,
Esempio n. 3
0
design.flexibility['G650'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()
design.flexibility['G651'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()

# define the ligand strand
ligand = osprey.Strand(mol, templateLib=templateLib, residues=['A155', 'A194'])
ligand.flexibility['A172'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()
ligand.flexibility['A192'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()
ligand.flexibility['A193'].setLibraryRotamers(
    osprey.WILD_TYPE).addWildTypeRotamers().setContinuous()

# make a single-state conf space:
confSpace = osprey.MultiStateConfSpace(
    [osprey.StateMutable('complex', osprey.ConfSpace([design, ligand]))])
complexState = confSpace.getState('complex')

# use the "wild-type" sequence
seq = confSpace.seqSpace.makeWildTypeSequence()

# (or any other sequence defined in your conf space)
#seq = confSpace.seqSpace.makeUnassignedSequence()\
#	.set('G649', 'ALA')

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


# make a function that makes a SOFEA config object for a state
def config(state):