draw(smiles, target, theme = 'light', successCallback = null, errorCallback = null, weights = null) {
    // get the settings
    let rest = [];
    [smiles, ...rest] = smiles.split(' ');
    let info = rest.join(' ');
    let settings = {};

    if (info.includes('__')) {
      let settingsString = info.substring(info.indexOf('__') + 2, info.lastIndexOf('__'));
      settings = JSON.parse(settingsString.replaceAll('\'', '"'));
    }

    let defaultSettings = {
      textAboveArrow: '{reagents}',
      textBelowArrow: ''
    };
    settings = Options.extend(true, defaultSettings, settings);

    if (smiles.includes('>')) {
      try {
        this.drawReaction(smiles, target, theme, settings, weights, successCallback);
      } catch (err) {
        if (errorCallback) {
          errorCallback(err);
        } else {
          console.error(err);
        }
      }
    } else {
      try {
        this.drawMolecule(smiles, target, theme, weights, successCallback);
      } catch (err) {
        if (errorCallback) {
          errorCallback(err);
        } else {
          console.error(err);
        }
      }
    }
  }
Draw the smiles to the target.
@param {String} smiles The SMILES to be depicted.
@param {*} target The target element.
@param {String} theme The theme.
@param {?CallableFunction} successCallback The function called on success.
@param {?CallableFunction} errorCallback The function called on error.
@param {?Number[]|Object} weights The weights for the gaussians.