Membrane-bound relaxation constrained by an ED map

Member Site Forums PyRosetta PyRosetta – Applications Membrane-bound relaxation constrained by an ED map

Viewing 0 reply threads
  • Author
    Posts
    • #3613
      Anonymous

        I am energy minimising a membrane protein with the RosettaMP framework, but also constraining it to the electron density map.

        I am creating the membrane chain vector thinggy by starting with an OPM database style PDB (protein placed ±14 Å xy plane but without the cute membrane marker atoms aren’t used) with the usual `pyrosetta.rosetta.protocols.membrane.AddMembraneMover(‘from_structure’)`, but then I am calling `pyrosetta.rosetta.protocols.simple_moves.AlignChainMover()` to move the pose (based on the peptide chain) to a pose in the ccp4 map.

        `AddMembraneMover(‘from_structure’)` on a pose in the OPM database positioning generates an `out.span` which will result in a segfault when applied to the cpp4 map pose —both by writing `AddMembraneMover(‘out.span’)` or manually making a `SpanningTopology()` with various `.add_span(Span(..))`.

        It “seems” to work, but it’s always hard to tell as there are lots of secret things going on. Say `AqueousPoreFinder`makes a position dependent `_DLPC_ellipse.dat` file, although I do not if this does anything.

        However, what worries me is that the membrane namespace/module contains the movers `TranslationRotationMover`, `TranslationMover` and `RotationMover` —but require rototranslation matrices, so if I were to have gone down the rabbithole of 3D rototranslations, I’d have moved the map in gemmi.

        So my question is: Is it okay to move a AddMembraneMover membrane chain vector thinggy with AlignChainMover?

        The code simplified is the following:


        import pymol2

        # pdbblocks
        with pymol2.PyMOL() as pymol:
        pymol.cmd.load('homologue_phyre.pdb', 'phyre')
        # remove rubbish parts
        pymol.cmd.remove('resi 1-68 or resi 245-282 or resi 494-504')
        # align
        pymol.cmd.alter('*', 'chain="A"')
        pymol.cmd.sort()
        pymol.cmd.fetch('6C08')
        pymol.cmd.align('phyre', '6C08 and chain C')
        pymol.cmd.delete('6C08')
        map_pdbblock = pymol.cmd.get_pdbstr()
        pymol.cmd.load('OPM_6c08.pdb', 'OPM')
        pymol.cmd.align('phyre', 'OPM')
        pymol.cmd.delete('OPM')
        mem_pdbblock = pymol.cmd.get_pdbstr()

        # poses
        map_pose = pyrosetta.Pose()
        pyrosetta.rosetta.core.import_pose.pose_from_pdbstring(map_pose, map_pdbblock)

        mem_pose = pyrosetta.Pose()
        pyrosetta.rosetta.core.import_pose.pose_from_pdbstring(mem_pose, mem_pdbblock)
        addmem = pyrosetta.rosetta.protocols.membrane.AddMembraneMover('from_structure')
        addmem.apply(mem_pose)

        # align
        ali = pyrosetta.rosetta.protocols.simple_moves.AlignChainMover()
        ali.pose(map_pose)
        ali.source_chain(1) # 0 for whole is a no as num res differs due to MEM resn
        ali.target_chain(1)
        ali.apply(mem_pose)

        # the vector thing moved for sure:
        import nglview
        from IPython.display import display

        view = nglview.show_rosetta(map_pose)
        view.add_structure(nglview.RosettaStructure(mem_pose))
        display(view)

        # pore
        pose = mem_pose
        pyrosetta.rosetta.protocols.membrane.AqueousPoreFinder().apply(pose)

        # scorefxn
        scorefxnED = pyrosetta.create_score_function('mpframework_smooth_fa_2012')
        ED = pyrosetta.rosetta.core.scoring.electron_density.getDensityMap('6c08.ccp4')
        sdsm = pyrosetta.rosetta.protocols.electron_density.SetupForDensityScoringMover()
        sdsm.apply(pose)
        elec_dens_fast = pyrosetta.rosetta.core.scoring.ScoreType.elec_dens_fast
        scorefxnED.set_weight(elec_dens_fast, 10)

        # movemap
        movemap = pyrosetta.MoveMap()
        assert len(pyrosetta.rosetta.core.pose.get_chains(pose)) == 2, 'Not two chains'
        v = pyrosetta.rosetta.core.select.residue_selector.ChainSelector(1).apply(pose)
        mem_chain = pyrosetta.rosetta.core.pose.get_chain_from_chain_id(2, pose)
        movemap.set_bb(allow_bb=v)
        movemap.set_chi(allow_chi=v)
        movemap.set_jump(False)

        # relax
        relax = pyrosetta.rosetta.protocols.relax.FastRelax(scorefxnED, 15)
        relax.set_movemap(movemap)
        relax.apply(pose)

         

         

    Viewing 0 reply threads
    • You must be logged in to reply to this topic.