def controlMut():
    from pyrosetta.toolbox import generate_resfile_from_pdb, generate_resfile_from_pose
    # generate_resfile_from_pdb('2AVX_pyrrolysine.pdb', 'my.resfile')
    #  ^ causes error  EXCN_Base::what()
    # likely due to uncleaned file?
    #
    # what if we clean first ...
    from pyrosetta.toolbox import cleanATOM
    cleanATOM('2AVX_pyrrolysine.pdb')
    generate_resfile_from_pdb('2AVX_pyrrolysine.clean.pdb','my2.resfile')
    # ^ doesnt work either causes error: ERROR: Unrecognized residue: LG1

    # The following does work.
    generate_resfile_from_pose(pose, 'my.resfile')
Ejemplo n.º 2
0
task_pack = standard_packer_task(pose)
task_pack.restrict_to_repacking()
task_pack.temporarily_fix_everything()
task_pack.temporarily_set_pack_residue(49, True)

print(task_pack)

pack_mover = PackRotamersMover(scorefxn, task_pack)

pack_mover.apply(pose)

import tempfile

# Design

# work around for windows permission problem
YY8_resfile1 = tempfile.mkstemp()[1]
YY8_resfile2 = tempfile.mkstemp()[1]

generate_resfile_from_pdb("../test/data/workshops/1YY8.clean.pdb",
                          YY8_resfile1)
generate_resfile_from_pose(pose, YY8_resfile2)

task_design = core.pack.task.TaskFactory.create_packer_task(pose)
core.pack.task.parse_resfile(pose, task_design, YY8_resfile2)

mutate_residue(pose, 49, 'E')

#os.remove(YY8_resfile1)
#os.remove(YY8_resfile2)