#import "@preview/alchemist:0.1.5": *

#figure([
#cetz.canvas({
import cetz.draw: *

draw-skeleton(name: "mol1",mol-anchor: "east", {
  molecule("N")
  branch({
    single(angle: 3)
    molecule(
      "H",
    )
  })
  branch({
    single(angle: 5,)
    molecule(
        name: "Hext",
      "H",
    )
  })
  single()
  molecule("CH")
  branch({
    single(angle: 6, from: 0)
    molecule(
        name: "R1",
      "R_1",
    )
  })
  single()
  molecule("CO")
  single()
  molecule("NH")
  single()
  molecule("CH")
  branch({
    single(angle: 6, from: 0)
    molecule(
        name: "R2",
      "R_2",
    )
  })
  single()
  molecule("C")
  
  branch({
    single(angle: 1)
    molecule(
        name: "O",
      "O",
    )
  })
  branch({
    single(angle: -1,)
    molecule(
        name: "OHext",
      "OH"
    )
  })
  })
line((to: "mol1.north-west", rel: (-2pt, 2pt)), (to: "mol1.north-west", rel: (-2pt, -1)), "mol1.R1.south-west", "mol1.R2.south-east",(to: "mol1.O.north-east", rel: (2pt, -1)), (to: "mol1.O.north-east", rel: (2pt, 2pt)), close: true, stroke: blue)
rect((to: "mol1.Hext.north-west", rel: (-2pt, 2pt)),(to: "mol1.Hext.south-east", rel: (2pt, -2pt)), stroke: red)
rect((to: "mol1.OHext.north-west", rel: (-2pt, 2pt)),(to: "mol1.OHext.south-east", rel: (2pt, -2pt)), stroke: red)
 })
 
A protein is made of a chain of residues and of two caps. The left cap is
          the N-terminal proton and the right cap is the C-terminal hydroxyl.
          Altogether, the residual chain (enclosed here in the blue polygon) and both
          the H and OH red-colored caps do form a complete protein polymer in its
          finished state.
],
  caption: [End Capping Chemistry of the Protein Polymer],
) <fig_xtpcpp-protein-polymer>

