Molecular structure drawing

MolecularGraph.DRAW_SETTINGConstant
DRAW_SETTING

Default setting parameters of the molecule drawing canvas.

Required fields

  • :display_terminal_carbon(Bool) whether to display terminal C atom or not
  • :double_bond_notation(Symbol)
    • :alongside: all double bonds are represented as a carbon skeleton and a segment alongside it.
    • :dual: all double bonds are represented as two equal length parallel segments.
    • :chain: :dual for chain bonds and :alongside for ring bonds
    • :terminal: :dual for terminal bonds (adjacent to degree=1 node) and :alongside for others (default)
  • :atomcolor(Dict{Symbol,Color}) atom symbol and bond colors for organic atoms
  • :defaul_atom_color(Dict{Symbol,Color}) colors for other atoms
source
MolecularGraph.drawsvgMethod
drawsvg(mol::GraphMol, width::Int, height::Int)

Generate molecular structure image as a SVG format string.

width and height specifies the size of the image (width and height attribute of svg tag).

source
MolecularGraph.initcanvas!Method
initcanvas!(canvas::Canvas, coords::AbstractArray{Float64}, boundary::Tuple)

Move and adjust the size of the molecule for drawing.

source