PyRosetta (15) Rigid Body Movers & Docking

PyRosetta (15): Rigid Body Movers & Docking

Introduction

The fundamental docking move is a rigid-body transformation consisting of a translation and rotation. Any rigid body move also needs to know which part moves and which part is fixed. In Rosetta, this division is known as a Jump and the set of protein segments and jumps are stored in an object attached to a pose called a FoldTree.

Rigid body movers are components of protein docking protocols.

Initiation

1
2
3
4
5
import pyrosetta
from pyrosetta import rosetta
import pyrosetta.rosetta.protocols.rigid as rigid
import pyrosetta.rosetta.protocols.docking as docking
pyrosetta.init()

Manual rotation and translation

RigidBodySpinMover class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# load pose
pose = pyrosetta.pose_from_pdb("input.pdb")

# instantiating RigidBodyTransMover
trans_mover = rigid.RigidBodyTransMover(pose, 1)

# set Z-axis as the translation (sliding); Set sliding distance to 5 Å
trans_axis = rosetta.numeric.xyzVector_double_t(0, 0, 1)
trans_mover.trans_axis(trans_axis)
trans_mover.step_size(5.0)

# apply RigidBodyTransMover
trans_mover.apply(pose)

# save pose as pdb
pose.dump_pdb("translated_output.pdb")

RigidBodyTransMover class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# load pose
pose = pyrosetta.pose_from_pdb("input.pdb")

# Instantiating RigidBodySpinMover
spin_mover = rigid.RigidBodySpinMover()
rotation_axis = xyzVector_double_t(0.0, 0.0, 1.0)
rotation_angle = 45.0 # degree

# Set spin axis
spin_mover.spin_axis(rotation_axis)

# Set rotation angle (in degree)
spin_mover.spin_mag(rotation_angle)

# Apply RigidBodySpinMover
spin_mover.apply(pose)

# save pose as pdb
pose.dump_pdb("spinned_output.pdb")

RigidBodyRandomizeMover

1
2
3
4
5
6
7
# sliding 1st jump
jump_num = 1

# `partner_upstream`: the first chain in pose
# `partner_downstream`: the second chain in pose
randomize1 = rigid.RigidBodyRandomizeMover(my_pose, jump_num, rigid.partner_upstream)
randomize2 = rigid.RigidBodyRandomizeMover(my_pose, jump_num, rigid.partner_downstream)

Slide into contact: DockingSlideIntoContactMover/ FADockingSlideIntoContactMover

1
2
3
4
5
6
7
8
9
10
# load pose
pose = pyrosetta.pose_from_pdb("input.pdb")

# Instantiating DockingSlideIntoContactMover
slide_mover = docking.DockingSlideIntoContactMover(1) # sliding jump 1
#slide_mover = FaDockingSlideIntoContact(jump_num) # for full-atom mode
slide_mover.apply(pose)

# Save pose
pose.dump_pdb("slide_into_contact_output.pdb")

Low Resolution Global Docking Mover: DockingLowRes

The argument "A_B" tells Rosetta to make chain A the “rigid” chain and allow chain B to move.

If there were more chains in the pdb structure, supplying "AB_C" would hold chains A and B rigid together as a single unit and allow chain C to move.

The third argument Vector1([1]) is required, it creates a Rosetta vector object — indexed from 1 — with one element that identifies the first Jump in the FoldTree for docking use.

1
2
3
4
5
6
7
8
9
10
# Assume that we have a `Pose` object named `cen_pose`
# 1st jump
jump_num = 1
dock_lowres = DockingLowRes(scorefxn_low, jump_num)

# Setup Fold Tree
setup_foldtree(cen_pose,"A_B",Vector1([1]))

# Apply to cen_pose
dock_lowres.apply(cen_pose)

High Resolution Global Docking Mover: DockMCMProtocol

The high-resolution stage of RosettaDock is also available as a Mover. This mover encompasses random rigid-body moves, side-chain packing, and gradient-based minimization in the rigid-body coordinates. High-resolution docking needs an all-atom score function. The optimized docking weights are available as a patch to the standard all-atom energy function.

Unlike for DockingLowRes, we must supply the docking partners with "A_B" instead of jump_num.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Assume that we have a `Pose` object named `cen_pose`
scorefxn_high = create_score_function("ref2015.wts", "docking")

# Instantiating high resolution global docking mover
dock_hi_res = DockMCMProtocol()
dock_hi_res.set_scorefxn(scorefxn_high)

# Setup Fold Tree
setup_foldtree(cen_pose,"A_B",Vector1([1]))

dock_hi_res.set_partners("A_B") # make sure the FoldTree is set up properly

# Apply
dock_hi_res.apply(my_pose)

# Copy the side chains from the original monomer structures
recover_sidechains = ReturnSidechainMover(starting_pose)
recover_sidechains.apply(my_pose)

# Or, we can use a `PackRotamersMover`
# my_tf = TaskFactory()
# my_tf.push_back(operation.InitializeFromCommandline())
# my_tf.push_back(operation.RestrictToRepacking())
# my_packer = pyrosetta.rosetta.protocols.minimization_packing.PackRotamersMover()
# my_packer.task_factory(my_tf)
# my_packer.apply(my_pose)

Docking Using XML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
xml = pyrosetta.rosetta.protocols.rosetta_scripts.XmlObjects.create_from_string("""
<ROSETTASCRIPTS>
<SCOREFXNS>
<ScoreFunction name="fa_standard" weights="ref2015.wts"/> `ref2015.wts` score function
</SCOREFXNS>
<RESIDUE_SELECTORS>
<Chain name="chX" chains="X"/> select chain "X" in pose
</RESIDUE_SELECTORS>
<SIMPLE_METRICS>
<RMSDMetric name="rmsd_chX" residue_selector="chX" reference_name="store_native" residue_selector_ref="chX" robust="true" rmsd_type="rmsd_all" />
Measurement using RMSD of chain X
</SIMPLE_METRICS>
<SCORINGGRIDS ligand_chain="X" width="25">
<ClassicGrid grid_name="vdw" weight="1.0"/>
Grids are recalculated if any non-ligand atoms change position.
The weight specified for each grid is multiplied by the ligand score for that grid.
</SCORINGGRIDS>
<LIGAND_AREAS>
<LigandArea name="docking_sidechain_X" chain="X" cutoff="6.0" add_nbr_radius="true" all_atom_mode="true" minimize_ligand="10"/>
<LigandArea name="final_sidechain_X" chain="X" cutoff="6.0" add_nbr_radius="true" all_atom_mode="true"/>
<LigandArea name="final_backbone_X" chain="X" cutoff="7.0" add_nbr_radius="false" all_atom_mode="true" Calpha_restraints="0.3"/>
</LIGAND_AREAS>
<INTERFACE_BUILDERS>
<InterfaceBuilder name="side_chain_for_docking" ligand_areas="docking_sidechain_X"/>
<InterfaceBuilder name="side_chain_for_final" ligand_areas="final_sidechain_X"/>
<InterfaceBuilder name="backbone" ligand_areas="final_backbone_X" extension_window="3"/>
</INTERFACE_BUILDERS>
<MOVEMAP_BUILDERS>
<MoveMapBuilder name="docking" sc_interface="side_chain_for_docking" minimize_water="true"/>
<MoveMapBuilder name="final" sc_interface="side_chain_for_final" bb_interface="backbone" minimize_water="true"/>
</MOVEMAP_BUILDERS>
<MOVERS>
<SavePoseMover name="spm" restore_pose="0" reference_name="store_native"/>
<Transform name="transform" chain="X" box_size="20.0" move_distance="10" angle="360" initial_perturb="2" cycles="500" repeats="5" temperature="1000"/>
<HighResDocker name="high_res_docker" cycles="9" repack_every_Nth="3" scorefxn="fa_standard" movemap_builder="docking"/>
<FinalMinimizer name="final" scorefxn="fa_standard" movemap_builder="final"/>
</MOVERS>
<FILTERS>
<LigInterfaceEnergy name="interfE" scorefxn="fa_standard" energy_cutoff="0.0" confidence="0"/>
<SimpleMetricFilter name="rmsd_chX" metric="rmsd_chX" cutoff="999999." comparison_type="lt" confidence="0"/>
</FILTERS>
<PROTOCOLS>
<Add mover="spm"/>
<Add mover="transform"/>
<Add mover="high_res_docker"/>
<Add mover="final"/>
<Add filter="interfE"/>
<Add filter="rmsd_chX"/>
</PROTOCOLS>
</ROSETTASCRIPTS>
""").get_mover("ParsedProtocol")
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2024-2025 Michael Lau
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信