RDKitMinimalLib.get_svg
— Functionget_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)))
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)
RDKitMinimalLib.get_rxn_svg
— Functionget_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))
The currently supported options (details
) are:
atoms
: list to specify which atoms are highlighted. Like the one provided byget_substruct_match
bonds
: list to specify which bonds are highlighted Like the one provided byget_substruct_match
width
,height
,offsetx
,offsety
: used to draw in a subregion of a canvaslegend
: 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