Quickstart¶
This page gets you from zero to a generated, minimized, and analyzed DNA structure in under five minutes.
1. Generate a DNA Structure¶
MDNA returns a Nucleic object — the central data structure that holds the sequence, reference frames, and (optionally) an atomic-resolution MDTraj trajectory.
2. Visualize¶
This produces a 3D matplotlib plot showing the helical axis and backbone.
3. Minimize the Structure¶
Monte Carlo relaxation removes steric clashes and elastic strain:
Note
minimize() updates the internal trajectory and frames in-place.
4. Analyze Rigid Base Parameters¶
params, names = dna.get_parameters()
print("Parameter names:", names)
print("Shape:", params.shape) # (n_frames, n_bp, n_params)
Or retrieve a single parameter:
5. Export to PDB¶
Or get the MDTraj trajectory directly:
What's Next?¶
| Goal | Page |
|---|---|
| Build custom shapes, circular DNA, extend & connect | Building DNA |
| Mutate, methylate, flip bases | Modifying DNA |
| Analyze trajectories and rigid base parameters | Analyzing DNA |
| Understand how the classes fit together | Architecture |
| Full function/class reference | API Reference |