code: function(meshGeom, vertAssoc, nucleotideAssoc, opts, 
                                 traceIndex, chain) {
    var traces = chain.backboneTraces();
    var numVerts = _cartoonNumVerts(traces, opts.arcDetail * 4,
                                    opts.splineDetail);
    var numIndices = _cartoonNumIndices(traces, opts.arcDetail * 4,
                                        opts.splineDetail);
    // figure out which of the traces consist of nucleic acids. They require 
    // additional space for rendering the sticks.
    var nucleicAcidTraces = [];
    var vertForBaseSticks = opts.protoCyl.numVerts() + 
      2 * opts.protoSphere.numVerts();
    var indicesForBaseSticks = opts.protoCyl.numIndices() + 
      2 * opts.protoSphere.numIndices();
    for (var i = 0; i < traces.length; ++i) {
      var trace = traces[i];
      if (trace.residueAt(0).isNucleotide()) {
        nucleicAcidTraces.push(trace);
        // each DNA/RNA base gets a double-capped cylinder
        numVerts += trace.length() * vertForBaseSticks;
        numIndices += trace.length() * indicesForBaseSticks;
      }
    }
    meshGeom.addChainVertArray(chain, numVerts, numIndices);
    for (var ti = 0; ti < traces.length; ++ti) {
      traceIndex = _cartoonForSingleTrace(meshGeom, vertAssoc, traces[ti], 
                                          traceIndex, opts);
    }
    _addNucleotideSticks(meshGeom, nucleotideAssoc, nucleicAcidTraces, opts);
    return traceIndex;
  }
docs: generates the mesh geometry for displaying a single chain as either cartoon or tube (opts.forceTube === true).