RDKitMinimalLib.get_svgFunction
get_svg(mol::Mol, details::Union{Dict{String,Any},Nothing}=nothing)::String

Get a SVG depiction of the mol.

Examples

mol = get_mol("CC(=O)Oc1ccccc1C(=O)O")
svg = get_svg(mol, Dict{String,Any}("height" => 300, "width" => 350))
mol = get_mol("CC(=O)Oc1ccccc1C(=O)O")
qmol = get_qmol("c1ccccc1")
smatch = get_substruct_match(mol, qmol)
svg = get_svg(mol, merge(smatch, Dict{String, Any}("height" => 350, "width" => 350)))
source
get_svg(mol::Mol, smatches::Vector, details::Dict=Dict{String,Any}())::String

Get a SVG depiction of the mol with multiple substructre matches.

Examples

mol = get_mol("c1ccccc1")
qmol = get_qmol("c")
smatches = get_substruct_matches(mol, qmol)
svg = get_svg(mol, smatches)
source
RDKitMinimalLib.get_rxn_svgFunction
get_rxn_svg(rxn::Reaction, details::Union{Dict{String,Any},Nothing}=nothing)::String

Get a SVG depiction of the reaction.

Examples

svg = get_rxn_svg(rxn)
rxn = get_rxn("[CH3:1][OH:2]>>[CH2:1]=[OH0:2]")
rxn_svg = get_rxn_svg(rxn, Dict{String,Any}("height" => 300, "width" => 500))
source

The currently supported options (details) are:

  • atoms: list to specify which atoms are highlighted. Like the one provided by get_substruct_match
  • bonds: list to specify which bonds are highlighted Like the one provided by get_substruct_match
  • width, height, offsetx, offsety: used to draw in a subregion of a canvas
  • legend: the legend drawn under the molecule
  • The following MolDrawOptions:
    • addAtomIndices
    • addBondIndices
    • additionalAtomLabelPadding
    • addStereoAnnotation
    • annotationFontScale
    • atomHighlightsAreCircles
    • atomLabelDeuteriumTritium
    • atomLabels
    • backgroundColour
    • bondLineWidth
    • centreMoleculesBeforeDrawing
    • circleAtoms
    • clearBackground
    • continuousHighlight
    • dummiesAreAttachments
    • explicitMethyl
    • fillHighlights
    • fixedBondLength
    • fixedScale
    • flagCloseContactsDist
    • fontFile
    • highlightBondWidthMultiplier
    • highlightColour
    • highlightRadius
    • includeAtomTags
    • includeMetadata
    • includeRadicals
    • legendColour
    • legendFontSize
    • maxFontSize
    • minFontSize
    • multipleBondOffset
    • padding
    • prepareMolsBeforeDrawing
    • rotate
    • scaleBondWidth
    • scaleHighlightBondWidth
    • symbolColour