Adding Linker DNA¶
This tutorial demonstrates how to extend DNA sequences from a loaded structure and integrate the extended DNA with protein components. This process is useful for creating complex models for simulations or visualization, aiding in the study of DNA-protein interactions.
Steps Covered:¶
- Load and visualize the initial PDB structure.
- Isolate and extend the DNA component.
- Combine the extended DNA with the protein structure.
- Save the modified structure for further analysis.
Loading and Visualizing Initial Structures¶
Start by loading a PDB file and visualize it to confirm the structure's integrity.
In [ ]:
Copied!
import mdtraj as md
import nglview as nv
import mdna
# Load PDB file
pdb = md.load('./pdbs/1kx5.pdb')
view = nv.show_mdtraj(pdb)
view
import mdtraj as md
import nglview as nv
import mdna
# Load PDB file
pdb = md.load('./pdbs/1kx5.pdb')
view = nv.show_mdtraj(pdb)
view
The autoreload extension is already loaded. To reload it, use: %reload_ext autoreload
NGLWidget()
Extending the DNA Structure¶
Isolate the DNA part, describe its current state, and then extend it at both ends.
In [3]:
Copied!
# Load DNA part from traj object
dna = mdna.load(pdb)
dna.describe()
# Add random linker DNA in forward and reverse direction. Note the exvol_rad parameter set to zero, because due to the wrapping of around the core protein, the exvol beads overlap. This is not allowed in the current implementation of the MC algorithm.
dna.extend(n_bp=36, exvol_rad=0)
dna.extend(n_bp=36, exvol_rad=0, forward=False)
# Visualize the extended DNA
dna.draw()
# Load DNA part from traj object
dna = mdna.load(pdb)
dna.describe()
# Add random linker DNA in forward and reverse direction. Note the exvol_rad parameter set to zero, because due to the wrapping of around the core protein, the exvol beads overlap. This is not allowed in the current implementation of the MC algorithm.
dna.extend(n_bp=36, exvol_rad=0)
dna.extend(n_bp=36, exvol_rad=0, forward=False)
# Visualize the extended DNA
dna.draw()
DNA structure with 147 base pairs Sequence: ATCAATATCCACCTGCAGATACTACCAAAAGTGTATTTGGAAACTGCTCCATCAAAAGGCATGTTCAGCTGGAATCCAGCTGAACATGCCTTTTGATGGAGCAGTTTCCAAATACACTTTTGGTAGTATCTGCAGGTGGATATTGAT Trajectory: <mdtraj.Trajectory with 1 frames, 16755 atoms, 4416 residues, and unitcells> Frames: (147, 1, 4, 3) Random sequence: GGAGCTCGCGTATTATGTCGGTTTGTGGAATTTAGA Minimize the DNA structure: simple equilibration = False equilibrate writhe = False excluded volume radius = 0 temperature = 300 Circular: False
Integration with Protein Structure¶
Isolate the protein part of the structure, combine it with the extended DNA, and save the new structure.
In [ ]:
Copied!
# Stack extended DNA and protein back together
protein = pdb.atom_slice(pdb.top.select('not chainid 0 1'))
dna_traj = dna.get_traj()
extended_traj = dna_traj.stack(protein)
view = nv.show_mdtraj(extended_traj)
view
# Stack extended DNA and protein back together
protein = pdb.atom_slice(pdb.top.select('not chainid 0 1'))
dna_traj = dna.get_traj()
extended_traj = dna_traj.stack(protein)
view = nv.show_mdtraj(extended_traj)
view
In [ ]:
Copied!
# Save extended traj
extended_traj.save_pdb('./pdbs/1kx5_extended.pdb')
# Save extended traj
extended_traj.save_pdb('./pdbs/1kx5_extended.pdb')
In [ ]:
Copied!