Reference navigation
On this page
NucleicAcid
A DNA/RNA structure with base colors, nucleotide cartoons, surfaces and the Protein animation API.
from proteinmotion import NucleicAcidConstructor
NucleicAcid(topology, xyz, *, trajectory=None)Parameters
| Parameter | Default | Description |
|---|---|---|
topology | Required | Atom identities, residues, bonds, and chains in a Topology object. |
xyz | Required | Finite coordinates with shape (atoms, 3), in ångströms. |
trajectorykeyword only | None | Trajectory with the same atom identities and order; None uses the protein’s trajectory. |
Notes
Loads PDB/mmCIF or trajectories. The backbone uses C4′ with P as a fallback. Modified residues retain their deposited names and use parent-base annotations when available. Protein also draws nucleic-acid chains in mixed complexes.
Example and output
This excerpt runs inside a scene’s construct() method. The full example file includes imports, structure loading, and camera setup. Run it from a repository checkout.
"""DNA base styles, residue colors, transparency, labels and molecular surface.
Input: RCSB PDB 1BNA, a deposited B-DNA dodecamer (no simulated motion).
Render: proteinmotion render examples/dna_styles.py DNAStyles --fps 60 -o dna.mp4
The same scene accepts --renderer eevee; Blender 4.5+ is required for EEVEE.
"""
from pathlib import Path
from proteinmotion import (
BaseStyle,
Colorize,
FadeOut,
NucleicAcid,
ProteinScene,
Representation,
SetOpacity,
Text,
Write,
)
DATA = Path(__file__).resolve().parent / "data"
class DNAStyles(ProteinScene):
def construct(self):
dna = NucleicAcid.from_file(DATA / "1bna.cif").cartoon(bases="slabs").center()
dna.rotate(1.35, axis=(1, 0, 0)).rotate(-0.28, axis=(0, 0, 1))
self.add(dna)
self.camera.frame(dna, aspect=self.width / self.height).zoom(1.22)
self.camera.depth_cue = 0.3
self.camera.set_focus(dna, chain="A", residues=(5, 8), fstop=5.6)
self.add(Text("DNA · 1BNA", position=(0.055, 0.88), font_size=30))
title = Text("Base slabs", position=(0.055, 0.10), font_size=46)
self.play(Write(title), self.camera.animate.orbit(theta=0.12), run_time=1)
self.play(self.camera.animate.orbit(theta=0.18), run_time=2)
for style, heading in (
("rings", "Filled base rings"),
("sticks", "Base sticks"),
("ladder", "Ladder rods"),
):
self.play(
FadeOut(title), BaseStyle(dna, style), self.camera.animate.orbit(theta=0.10), run_time=0.8
)
title = Text(heading, position=(0.055, 0.10), font_size=46)
self.play(Write(title), self.camera.animate.orbit(theta=0.12), run_time=0.8)
self.play(self.camera.animate.orbit(theta=0.18), run_time=1.4)
region = dna.select(chain="A", residues=(5, 8))
other = dna.select(chain="B")
self.play(
FadeOut(title),
BaseStyle(dna, "slabs"),
Colorize(region, "#ffd47b", residue_delay=0.12),
SetOpacity(other, 0.16),
run_time=1.5,
)
label = region.callout(
"Residues 5–8",
subtitle="Color and opacity follow the selection",
position=(0.67, 0.25),
font_size=34,
color="#ffd47b",
)
self.play(Write(label), self.camera.animate.orbit(theta=0.12), run_time=1)
self.play(Representation(dna, "ball_and_stick"), run_time=1.2)
self.play(self.camera.animate.orbit(theta=0.20), run_time=2)
self.play(FadeOut(label), SetOpacity(other, 1), Colorize(region, None), run_time=1)
title = Text("Molecular surface", position=(0.055, 0.10), font_size=46)
self.play(Representation(dna, "surface"), Write(title), run_time=1.5)
self.play(self.camera.animate.orbit(theta=0.30), run_time=2.5)
self.wait(0.5)1BNA: slabs, rings, sticks, ladder rods, residue styling and a surface.
Methods and properties
| Name | Description |
|---|---|
| cartoon()method | Show a C4′ backbone tube with slabs, rings, sticks or ladder rods. Pass the geometry options documented on Protein.cartoon(). |
| surface()method | Show a molecular surface using base colors by default. Pass surface options documented on Protein.surface(). |
| select()method · inherited from Protein | Select atoms by author chain, residue number, and atom name. |
| build()class method · inherited from Protein | Build an ideal peptide with every heavy atom from one-letter codes and torsion angles. |
| secondary_structureproperty · inherited from Protein | Current H/E/C state of each residue, as the cartoon draws it. |
| set_secondary_structure()method · inherited from Protein | Set one H/E/C state per residue for drawing; can change between animations. |
| assign_secondary_structure()method · inherited from Protein | Assign helix, strand and coil with DSSP from the current coordinates. |
| torsions()method · inherited from Protein | Measure φ, ψ, ω and χ1–χ5 in degrees for all residues, or a selection. |
| set_torsions()method · inherited from Protein | Set torsions in degrees immediately, for every residue; see SetTorsions. |
| summary()method · inherited from Protein | Describe available molecular selections. |
| set_style()method · inherited from Protein | Apply a reusable molecular representation style. |
| reset_style()method · inherited from Protein | Clear atom appearance overrides and reset cartoon thickness. |
| show_atoms()method · inherited from Protein | Show ball-and-stick detail over the active representation. Chained animations may also change color, opacity, or transforms. |
| hide_atoms()method · inherited from Protein | Hide ball-and-stick detail while retaining the active representation. |
| label_residues()method · inherited from Protein | Create labels for the selected residues. Extra options go to ResidueLabels. |
| hydrogen_bonds()method · inherited from Protein | Create a hydrogen-bond analysis. Options go to HydrogenBonds. |
| electrostatics()method · inherited from Protein | Create a screened Coulomb analysis. Options go to Electrostatics. |
| from_file()class method · inherited from Protein | Load PDB or mmCIF coordinates and retain all models with matching atom identities. |
| fetch()class method · inherited from Protein | Download a PDB entry or AlphaFold DB model once, keep it in the cache, and load it. |
| from_trajectory()class method · inherited from Protein | Create a protein from the trajectory’s topology and first frame. |
| positionsproperty · inherited from Protein | Current atom coordinates in the protein’s local coordinate frame. |
| atom_progressproperty · inherited from Protein | Current interpolation fraction for each atom. |
| atom_opacitiesproperty · inherited from Protein | Current per-atom opacity, including global opacity and residue fades. |
| set_positions()method · inherited from Protein | Replace coordinates while preserving atom identities and topology. |
| copy()method · inherited from Protein | Copy the protein’s current state for independent animation; topology and trajectory are shared. |
| center()method · inherited from Protein | Move the molecular centroid to the world origin. |
| shift()method · inherited from Protein | Translate the object by an offset. |
| rotate()method · inherited from Protein | Rotate around the molecular centroid. |
| scale()method · inherited from Protein | Scale around the molecular centroid. |
| set_opacity()method · inherited from Protein | Set or animate opacity in [0, 1]. |
| set_color()method · inherited from Protein | Apply a tint across all representations. None restores the base palette. |
| color_by()method · inherited from Protein | Apply residue property colors and optional cartoon thickness before adding the protein to a scene. |
| color_residues()method · inherited from Protein | Apply a tint to the selected residues in every representation. |
| set_residue_opacity()method · inherited from Protein | Set opacity on the selected residues. |
| ribbon()method · inherited from Protein | Show a continuous backbone ribbon. |
| set_bases()method · inherited from Protein | Set nucleotide base shapes and optional dimensions before a scene begins. Use BaseStyle for an animated change. |
| ball_and_stick()method · inherited from Protein | Show atom spheres and covalent bond cylinders, with element colors by default. |
| with_secondary_structure()method · inherited from Protein | Assign helix, sheet, and coil labels before adding the protein to a scene. |
| animateproperty · inherited from Protein | Create a builder for protein transforms, opacity, and color animation. |
| model_matrixproperty · inherited from Protein | Current 4 × 4 transform from local to world coordinates. |
| snapshot()method · inherited from Protein | Capture the current state for deterministic timeline evaluation. |
| restore()method · inherited from Protein | Restore a state produced by snapshot(). |
NucleicAcid.cartoon(*, color='base', **kwargs)Show a C4′ backbone tube with slabs, rings, sticks or ladder rods. Pass the geometry options documented on Protein.cartoon().
| Parameter | Default | Description |
|---|---|---|
colorkeyword only | 'base' | Base palette: base, chain, rainbow, secondary, or a fixed color. |
**kwargs | — | Additional keyword options described below or in the linked constructor. |
Returns: The protein.
NucleicAcid.surface(*, color='base', **kwargs)Show a molecular surface using base colors by default. Pass surface options documented on Protein.surface().
| Parameter | Default | Description |
|---|---|---|
colorkeyword only | 'base' | Base palette: base, chain, rainbow, secondary, element, or a fixed color. |
**kwargs | — | Additional keyword options described below or in the linked constructor. |
Returns: The protein.
Additional option: max_voxels=8000000 limits the grid size. Configure surface settings before the first play() call. The ses surface is a voxel approximation.
Inherited from protein.Protein.
NucleicAcid.select(
*,
chain=None,
residues=None,
atoms=None,
resname=None,
ligands=False,
ions=False,
water=False,
within=None,
of=None,
residue_range=None,
element=None,
secondary=None,
polymer=None,
icode=None,
required=True,
updating=False,
)Select atoms by author chain, residue number, and atom name.
| Parameter | Default | Description |
|---|---|---|
chainkeyword only | None | Author chain ID or a collection of IDs; None selects all chains. |
residueskeyword only | None | Author residue number, inclusive (first, last) tuple, or list of individual numbers. |
atomskeyword only | None | Atom name or list of names, such as "CA"; None selects all atom names. |
resnamekeyword only | None | Residue name or names, such as "ASP" or ["HEM", "ATP"]; case-insensitive. |
ligandskeyword only | False | Select non-polymer residues other than water and single-atom ions. |
ionskeyword only | False | Select single-atom, non-carbon residues outside the traced chains, such as Ca²⁺ or Zn²⁺. |
waterkeyword only | False | Select water residues (HOH, WAT, SOL, and common MD names); load them with include_water=True. |
withinkeyword only | None | Distance in ångströms; keeps whole residues with any atom this close to of. |
ofkeyword only | None | Region or Protein used as the reference for within; its own residues are excluded when it belongs to the same protein. |
residue_rangekeyword only | None | Inclusive author residue-number range, e.g. (23, 34); do not also pass residues. |
elementkeyword only | None | Element symbol or collection of symbols, e.g. C or [N, O]. |
secondarykeyword only | None | Secondary-structure code or collection: H (helix), E (sheet), C (coil). |
polymerkeyword only | None | True selects polymer atoms, False selects non-polymers, None does not filter. |
icodekeyword only | None | Author insertion code or collection; an empty string selects no insertion code. |
requiredkeyword only | True | Raise if nothing matches; False returns None for an optional static selection. |
updatingkeyword only | False | Re-evaluate membership on access. False (default) freezes membership. |
Returns: Region
A residue tuple is an inclusive range. A list selects individual numbers. Empty selections raise ValueError.
Inherited from protein.Protein.
NucleicAcid.build(
sequence,
conformation='extended',
*,
phi=None,
psi=None,
omega=180.0,
chain='A',
first=1,
hydrogens=False,
)Build an ideal peptide with every heavy atom from one-letter codes and torsion angles.
| Parameter | Default | Description |
|---|---|---|
sequence | Required | One-letter codes for the 20 standard amino acids, or a list of residue names. |
conformation | 'extended' | helix, alpha, 310, pi, strand, beta, parallel, antiparallel, ppii, extended, or left. |
phikeyword only | None | φ in degrees, one value or one per residue; overrides the conformation. |
psikeyword only | None | ψ in degrees, one value or one per residue; overrides the conformation. |
omegakeyword only | 180.0 | ω in degrees, one value or one per residue. |
chainkeyword only | 'A' | Chain ID. |
firstkeyword only | 1 | Number of the first residue. |
hydrogenskeyword only | False | Add amide H atoms. |
Returns: The scene.
Inherited from protein.Protein.
NucleicAcid.secondary_structureCurrent H/E/C state of each residue, as the cartoon draws it.
Inherited from protein.Protein.
NucleicAcid.set_secondary_structure(assignments)Set one H/E/C state per residue for drawing; can change between animations.
| Parameter | Default | Description |
|---|---|---|
assignments | Required | One H, E, or C per topology residue. |
Inherited from protein.Protein.
NucleicAcid.assign_secondary_structure()Assign helix, strand and coil with DSSP from the current coordinates.
Inherited from protein.Protein.
NucleicAcid.torsions(*, chain=None, residues=None)Measure φ, ψ, ω and χ1–χ5 in degrees for all residues, or a selection.
| Parameter | Default | Description |
|---|---|---|
chainkeyword only | None | Author chain ID or IDs; None selects all chains. |
residueskeyword only | None | Author residue number, list, or inclusive (first, last) range. |
Inherited from protein.Protein.
NucleicAcid.set_torsions(
*,
conformation=None,
anchor='center',
secondary='auto',
**angles,
)Set torsions in degrees immediately, for every residue; see SetTorsions.
| Parameter | Default | Description |
|---|---|---|
conformationkeyword only | None | Sets φ and ψ together, as in SetTorsions. |
anchorkeyword only | 'center' | Part that stays still, as in SetTorsions. |
secondarykeyword only | 'auto' | "auto" updates the cartoon to the new DSSP states; "keep" leaves it unchanged. |
**angles | — | phi, psi, omega, or chi1–chi5 in degrees, as in SetTorsions. |
Inherited from protein.Protein.
NucleicAcid.summary()Describe available molecular selections.
Inherited from protein.Protein.
NucleicAcid.set_style(style)Apply a reusable molecular representation style.
| Parameter | Default | Description |
|---|---|---|
style | Required | Highlight shape or line style; allowed values are specified by the constructor. |
Inherited from protein.Protein.
NucleicAcid.reset_style()Clear atom appearance overrides and reset cartoon thickness.
Inherited from protein.Protein.
NucleicAcid.show_atoms()Show ball-and-stick detail over the active representation. Chained animations may also change color, opacity, or transforms.
Inherited from protein.Protein.
NucleicAcid.hide_atoms()Hide ball-and-stick detail while retaining the active representation.
Inherited from protein.Protein.
NucleicAcid.label_residues(
*,
chain=None,
residues=None,
font_size=26,
color='#edf3fc',
format='three_letter',
include_chain=True,
avoid_overlap=True,
offsets=None,
**kwargs,
)Create labels for the selected residues. Extra options go to ResidueLabels.
| Parameter | Default | Description |
|---|---|---|
chainkeyword only | None | Author chain ID or a collection of IDs; None selects all chains. |
residueskeyword only | None | Author residue number, inclusive (first, last) tuple, or list of individual numbers. |
font_sizekeyword only | 26 | Font size in pixels at a 1080-pixel image height. |
colorkeyword only | '#edf3fc' | Hex color or RGB values. For tint setters, None restores the representation’s base palette. |
formatkeyword only | 'three_letter' | Automatic residue name style: "three_letter" or "one_letter". |
include_chainkeyword only | True | Include the chain identifier in automatic residue names. |
avoid_overlapkeyword only | True | Adjust labels in the group to reduce overlap. |
offsetskeyword only | None | Map residue numbers or (chain, number, insertion_code) keys to label offsets. |
**kwargs | — | Additional keyword options described below or in the linked constructor. |
Returns: ResidueLabels
Inherited from protein.Protein.
NucleicAcid.hydrogen_bonds(
*,
donors=None,
acceptors=None,
max_distance=3.5,
min_angle=150,
hydrogens='auto',
donor_h_cutoff=1.3,
)Create a hydrogen-bond analysis. Options go to HydrogenBonds.
| Parameter | Default | Description |
|---|---|---|
donorskeyword only | None | Donor Region or atom indices; None uses standard amino-acid and canonical nucleotide base templates. |
acceptorskeyword only | None | Acceptor Region or atom indices; None uses standard amino-acid and canonical nucleotide base templates. |
max_distancekeyword only | 3.5 | Maximum donor–acceptor distance in ångströms. |
min_anglekeyword only | 150 | Minimum donor–hydrogen–acceptor angle in degrees. |
hydrogenskeyword only | 'auto' | "explicit", "auto", or "backbone"; controls the use of loaded or inferred hydrogens. |
donor_h_cutoffkeyword only | 1.3 | Maximum donor–hydrogen assignment distance in ångströms. |
Returns: HydrogenBonds
Inherited from protein.Protein.
NucleicAcid.electrostatics(
charges='formal',
*,
dielectric=80,
screening_length=8,
cutoff=12,
min_energy=0.05,
exclude_same_residue=True,
exclude_bonded=True,
)Create a screened Coulomb analysis. Options go to Electrostatics.
| Parameter | Default | Description |
|---|---|---|
charges | 'formal' | "formal" side-chain templates or one charge per atom, in elementary charge units. |
dielectrickeyword only | 80 | Positive relative dielectric constant. |
screening_lengthkeyword only | 8 | Positive exponential screening length in ångströms; None disables screening. |
cutoffkeyword only | 12 | Distance cutoff in ångströms. |
min_energykeyword only | 0.05 | Minimum absolute pair energy to include, in kcal/mol. |
exclude_same_residuekeyword only | True | Exclude pairs within the same residue. |
exclude_bondedkeyword only | True | Exclude directly bonded pairs. |
Returns: Electrostatics
Inherited from protein.Protein.
NucleicAcid.from_file(
path,
*,
chains=None,
include_water=False,
include_hydrogens=False,
secondary='auto',
assembly=None,
)Load PDB or mmCIF coordinates and retain all models with matching atom identities.
| Parameter | Default | Description |
|---|---|---|
path | Required | Input or output file path, as specified by the operation. |
chainskeyword only | None | Author chain ID or a collection of IDs; None loads all chains. |
include_waterkeyword only | False | Retain crystallographic waters; default False. |
include_hydrogenskeyword only | False | Retain explicit hydrogen/deuterium atoms; default False. Enable for side-chain and nucleotide hydrogen-bond analysis. |
secondarykeyword only | 'auto' | "auto" uses the file's helix and sheet records, or DSSP when it has none; "dssp" always computes; "file" uses records only. |
assemblykeyword only | None | Biological assembly to build from the deposited chains, such as "1"; None keeps the deposited chains. |
Returns: Protein
Keyword options: chains=None, include_water=False, include_hydrogens=False. Other hetero atoms are retained.
Inherited from protein.Protein.
NucleicAcid.fetch(identifier, *, cache=None, **options)Download a PDB entry or AlphaFold DB model once, keep it in the cache, and load it.
| Parameter | Default | Description |
|---|---|---|
identifier | Required | Four-character PDB ID such as "4HHB", or AlphaFold DB ID such as "AF-P0DP23-F1". |
cachekeyword only | None | Download folder; None uses PROTEINMOTION_CACHE or ~/.cache/proteinmotion. |
**options | — | from_file() options, such as assembly="1" or chains="A". |
Inherited from protein.Protein.
NucleicAcid.from_trajectory(trajectory)Create a protein from the trajectory’s topology and first frame.
| Parameter | Default | Description |
|---|---|---|
trajectory | Required | Trajectory with the same atom identities and order; None uses the protein’s trajectory. |
Returns: Protein
Inherited from protein.Protein.
NucleicAcid.positionsCurrent atom coordinates in the protein’s local coordinate frame.
Returns: Array with shape (selected atoms, 3), in ångströms.
Inherited from protein.Protein.
NucleicAcid.atom_progressCurrent interpolation fraction for each atom.
Inherited from protein.Protein.
NucleicAcid.atom_opacitiesCurrent per-atom opacity, including global opacity and residue fades.
Inherited from protein.Protein.
NucleicAcid.set_positions(xyz)Replace coordinates while preserving atom identities and topology.
| Parameter | Default | Description |
|---|---|---|
xyz | Required | Finite coordinates with shape (atoms, 3), in ångströms. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.copy()Copy the protein’s current state for independent animation; topology and trajectory are shared.
Returns: Protein
Inherited from protein.Protein.
NucleicAcid.center()Move the molecular centroid to the world origin.
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.shift(vector)Translate the object by an offset.
| Parameter | Default | Description |
|---|---|---|
vector | Required | Finite 3D translation vector in ångströms. |
Returns: The object or animation builder.
Inherited from protein.Protein.
NucleicAcid.rotate(angle, axis=(0, 1, 0))Rotate around the molecular centroid.
| Parameter | Default | Description |
|---|---|---|
angle | Required | Rotation angle in radians. |
axis | (0, 1, 0) | Nonzero 3D rotation axis; it is normalized internally. |
Returns: The protein or animation builder.
Inherited from protein.Protein.
NucleicAcid.scale(factor)Scale around the molecular centroid.
| Parameter | Default | Description |
|---|---|---|
factor | Required | Positive scale or zoom factor. |
Returns: The protein or animation builder.
Inherited from protein.Protein.
NucleicAcid.set_opacity(opacity)Set or animate opacity in [0, 1].
| Parameter | Default | Description |
|---|---|---|
opacity | Required | Opacity in [0, 1], from transparent to opaque. |
Returns: The object or animation builder.
Inherited from protein.Protein.
NucleicAcid.set_color(color)Apply a tint across all representations. None restores the base palette.
| Parameter | Default | Description |
|---|---|---|
color | Required | Hex color or RGB values. For tint setters, None restores the representation’s base palette. |
Returns: The object or a Colorize animation.
Inherited from protein.Protein.
NucleicAcid.color_by(values, *, scale=None, thickness=None)Apply residue property colors and optional cartoon thickness before adding the protein to a scene.
| Parameter | Default | Description |
|---|---|---|
values | Required | Numerical input values; see the shape and missing-value rules for this object. |
scalekeyword only | None | ColorScale shared by the structure, plots, and legend. None derives limits from finite values. |
thicknesskeyword only | None | Optional (minimum, maximum) positive cartoon cross-section scale factors. Missing values use 1. |
Inherited from protein.Protein.
NucleicAcid.color_residues(color, *, chain=None, residues=None)Apply a tint to the selected residues in every representation.
| Parameter | Default | Description |
|---|---|---|
color | Required | Hex color or RGB values. For tint setters, None restores the representation’s base palette. |
chainkeyword only | None | Author chain ID or a collection of IDs; None selects all chains. |
residueskeyword only | None | Author residue number, inclusive (first, last) tuple, or list of individual numbers. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.set_residue_opacity(opacity, *, chain=None, residues=None)Set opacity on the selected residues.
| Parameter | Default | Description |
|---|---|---|
opacity | Required | Opacity in [0, 1], from transparent to opaque. |
chainkeyword only | None | Author chain ID or a collection of IDs; None selects all chains. |
residueskeyword only | None | Author residue number, inclusive (first, last) tuple, or list of individual numbers. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.ribbon(*, color='rainbow', width=1.05, bases='none')Show a continuous backbone ribbon.
| Parameter | Default | Description |
|---|---|---|
colorkeyword only | 'rainbow' | Palette: secondary, base, rainbow, chain, or a fixed color. Surfaces also accept element. |
widthkeyword only | 1.05 | Ribbon width in ångströms. |
baseskeyword only | 'none' | Nucleotide base style: slabs, rings, sticks, ladder, or none. None in Representation preserves the current style. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.set_bases(
style,
*,
backbone_radius=None,
base_thickness=None,
base_radius=None,
)Set nucleotide base shapes and optional dimensions before a scene begins. Use BaseStyle for an animated change.
| Parameter | Default | Description |
|---|---|---|
style | Required | slabs, rings, sticks, ladder, or none. |
backbone_radiuskeyword only | None | Positive nucleotide cartoon tube radius in ångströms. |
base_thicknesskeyword only | None | Positive slab/ring thickness in ångströms. |
base_radiuskeyword only | None | Positive base-stick and connector radius in ångströms. |
Returns: The molecule.
Inherited from protein.Protein.
NucleicAcid.ball_and_stick(*, atom_scale=0.3, bond_radius=0.14, color='element')Show atom spheres and covalent bond cylinders, with element colors by default.
| Parameter | Default | Description |
|---|---|---|
atom_scalekeyword only | 0.3 | Multiplier applied to element van der Waals radii for ball-and-stick atoms. |
bond_radiuskeyword only | 0.14 | Covalent bond cylinder radius in ångströms. |
colorkeyword only | 'element' | Palette: element, base, chain, rainbow, secondary, or a fixed color. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.with_secondary_structure(assignments)Assign helix, sheet, and coil labels before adding the protein to a scene.
| Parameter | Default | Description |
|---|---|---|
assignments | Required | One "H", "E", or "C" code per topology residue for helix, sheet, or coil. |
Returns: The protein.
Inherited from protein.Protein.
NucleicAcid.animateCreate a builder for protein transforms, opacity, and color animation.
Returns: Animate
Inherited from protein.Protein.
NucleicAcid.model_matrixCurrent 4 × 4 transform from local to world coordinates.
Inherited from protein.Protein.
NucleicAcid.snapshot()Capture the current state for deterministic timeline evaluation.
Returns: State dictionary.
Inherited from protein.Protein.
NucleicAcid.restore(s)Restore a state produced by snapshot().
| Parameter | Default | Description |
|---|---|---|
s | Required | State returned by snapshot(). |
Returns: None