Learn R Programming

SpecHelpers (version 0.3.1)

multiplet: Compute & Possibly Draw an NMR Multiplet with Optional Annotations

Description

Serves as a teaching and self-study tool to understand complex NMR multiplets. Inspired by the Valiulin book (see the reference). One can draw a multiplet, and optionally draw the splitting tree along with annotations of the J values and guides connecting the tree to the peak maxima.

Usage

multiplet(
  J = c(15, 12, 2),
  pw = 0.5,
  plot = TRUE,
  plotJtree = TRUE,
  showJvalues = TRUE,
  showJtreeGuides = TRUE
)

Value

A matrix as produced by makeSpec().

Arguments

J

Numeric. A vector giving the coupling constants.

pw

Numeric. Half the peak width at half-maximum (HWHM). Passed to makeSpec(), and then lorentzCurve() where it is the gamma argument.

plot

Logical. Shall the multiplet be drawn?

plotJtree

Logical. Shall the Jtree be drawn? plot must also be TRUE in this case, and is set automatically if needed.

showJvalues

Logical. Should the J values be added to the plot? Only relevant if plotJtree = TRUE.

showJtreeGuides

Logical. Shall dotted guides be drawn between the last leaves of the Jtree and the peak maxima? Only relevant if plotJtree = TRUE.

Author

Bryan A. Hanson, DePauw University. hanson@depauw.edu

References

Roman A. Valiulin NMR Multiplet Interpretation, 2nd Edition, de Gruyter, 2025.

Examples

Run this code
# Example 3.1 from Valiulin, a ddt.
res <- multiplet(J = c(16.8, 10.1, 6.7, 6.7))
# Example 3.2 from Valiulin, a tt.
res <- multiplet(J = c(6.1, 6.1, 2.15, 2.15))
# Example 3.3 from Valiulin, a dddd.
res <- multiplet(J = c(12.7, 12.2, 10.0, 4.9))
# Some other nice examples
res <- multiplet(J = c(15, 12, 8, 7), pw = 0.25)
res <- multiplet(J = c(15, 8, 5, 2))

Run the code above in your browser using DataLab