Function Repository Resource:

NucleicAcidBasePairParameters

Source Notebook

Compute the rigid-body geometric parameters for a pair of nucleic acid residues in a biomolecule

Contributed by: Robert Nachbar

ResourceFunction["NucleicAcidBasePairParameters"][biomol,{{model,chainID1,residueID1},{model,chainID2,residueID2}}]

gives an association of the base-pair parameters for residueID1 in chainID1 with residueID2 in chainID2 of model of the DNA or RNA BioMolecule biomol.

ResourceFunction["NucleicAcidBasePairParameters"][biomol,{{chainID1,residueID1},{chainID2,residueID2}}]

is equivalent to ResourceFunction["NucleicAcidBasePairParameters"][biomol,{{1,chainID1,residueID1},{1,chainID2,residueID2}}].

ResourceFunction["NucleicAcidBasePairParameters"][biomol,{{{m1,c11,r11},{m1,c12,r12}},{{m2,c21,r21},{m2,c22,r22}},}]

gives an association of base-pair parameter associations.

Details

The following parameters are computed:
"BasePair"nucleotides and relative orientation of the base planes (+/-)
"Shear"opposite displacement of the bases in the x direction
"Stretch"opposite displacement of the bases in the y direction
"Stagger"opposite displacement of the bases in the z direction
"Buckle"disrotatory rotation of the bases about the x axis
"Propeller"disrotatory rotation of the bases about the y axis
"Opening"disrotatory rotation of the bases about the z axis
"Angle"angle between the normals of the base planes

Examples

Basic Examples (4) 

Import the structure for the yeast phenylalanine tRNA:

In[1]:=
biomol = BioMolecule[ExternalIdentifier["PDBStructureID", "1EHZ"]]
Out[1]=

Show the bases U6 and A67 that have a conventional Watson-Crick geometry:

In[2]:=
BioMoleculePlot3D[biomol, ColorRules -> {{"A", 6 | 67} -> Red, _ -> Gray}, ImageSize -> Small]
Out[2]=

Compute the base-pair parameters for residues U6 and A67:

In[3]:=
ResourceFunction[
 "NucleicAcidBasePairParameters"][biomol, {{"A", 6}, {"A", 67}}]
Out[3]=

Compute the parameters for several base-pairs:

In[4]:=
ResourceFunction[
 "NucleicAcidBasePairParameters"][biomol, {{{"A", 10}, {"A", 45}}, {{"A", 11}, {"A", 44}}, {{"A", 12}, {"A", 43}}}]
Out[4]=

Scope (2) 

Import a dodecamer B-DNA structure:

In[5]:=
biomol = BioMolecule[ExternalIdentifier["PDBStructureID", "355D"]]
Out[5]=

Highlight the bases A-DC1 and B-DG12:

In[6]:=
BioMoleculePlot3D[biomol, ColorRules -> {{"A", 1} -> Red, {"B", 12} -> Red, _ -> Gray}, ImageSize -> Small]
Out[7]=

Compute the parameters for residues A-DC1 and B-DG12:

In[8]:=
ResourceFunction[
 "NucleicAcidBasePairParameters"][biomol, {{"A", 1}, {"B", 12}}]
Out[8]=

Import a short RNA that has four models:

In[9]:=
biomol = BioMolecule[ExternalIdentifier["PDBStructureID", "1ATV"]];

Highlight the residues A-G1 and A-C16 in each:

In[10]:=
BioMoleculePlot3D[#, ImageSize -> Small, ColorRules -> {{"A", 1 | 16} -> StandardRed, _ -> StandardGray}, ImageSize -> Small] & /@ biomol["Models"] // Partition[#, UpTo[2]] & // Grid
Out[11]=

Compute the parameters for the residues A-G1 and A-C16 for all the models:

In[12]:=
ResourceFunction["NucleicAcidBasePairParameters"][biomol, Table[{{m, "A", 1}, {m, "A", 16}}, {m, biomol["ModelCount"]}]]
Out[12]=

Applications (6) 

Base-pairing in duplex DNA is characteristically different from that in duplex RNA.

Import a duplex DNA:

In[13]:=
(duplexDNA = BioMolecule[ExternalIdentifier["PDBStructureID", "355D"]]) // BioMoleculePlot3D[#, ImageSize -> Small] &
Out[13]=

Compute the parameters for all the base-pairs:

In[14]:=
residuePairs = Thread@MapThread[
    Thread[{##}] &, {{"A", "B"}, MapAt[Reverse, Values@duplexDNA["ResidueIDs"][[{"A", "B"}]], 2]}];
basePairParameters = ResourceFunction["NucleicAcidBasePairParameters"][duplexDNA, residuePairs];
bpDataDNA = KeyValueMap[Prepend[#2, "Residues" -> #1] &, basePairParameters] // Tabular
Out[15]=

Import a duplex RNA:

In[16]:=
(duplexRNA = BioMolecule[ExternalIdentifier["PDBStructureID", "4JRD"]]) // BioMoleculePlot3D[#, ImageSize -> Small] &
Out[16]=

Compute the parameters for all the base-pairs:

In[17]:=
residuePairs = Thread@MapThread[
    Thread[{##}] &, {{"A", "B"}, MapThread[
      Construct, {{Rest, Most}, Values@duplexRNA["ResidueIDs"][[{"A", "B"}]]}]}];
basePairParameters = ResourceFunction["NucleicAcidBasePairParameters"][duplexRNA, residuePairs];
bpDataRNA = KeyValueMap[Prepend[#2, "Residues" -> #1] &, basePairParameters] // Tabular
Out[18]=

Plot the shear and stretch parameters for the two helices:

In[19]:=
ListPlot[
 Normal /@ {bpDataDNA[All, {"Shear", "Stretch"}], bpDataRNA[All, {"Shear", "Stretch"}]}, PlotRange -> {{-10, 2}, {-2, 2}}, AspectRatio -> Automatic, Axes -> True, Frame -> True, FrameLabel -> {"Shear", "Stretch"}, PlotLegends -> {"B-BNA", "Poly-A RNA"}]
Out[19]=

Plot the propeller and buckle parameters for the two helices:

In[20]:=
ListPlot[
 Normal /@ {bpDataDNA[All, {"Propeller", "Buckle"}], bpDataRNA[All, {"Propeller", "Buckle"}]}, PlotRange -> {{-20, 20}, {-20, 20}}, AspectRatio -> Automatic, Axes -> True, Frame -> True, FrameLabel -> {"Propeller", "Buckle"}, PlotLegends -> {"B-BNA", "Poly-A RNA"}]
Out[20]=

Publisher

Robert Nachbar

Version History

  • 1.0.0 – 13 May 2026

Source Metadata

Related Resources

Author Notes

Atom labels in biomolecules are generally standardized, but exceptions are known, so the function may occasionally fail to find the atoms of a nucleotide base and therefore be unable to compute the base-pair parameters.

License Information