Molecular structure drawing

MolecularGraph.ballstickMethod
ballstick(mol::UndirectedGraph; radii=0.3, bonddiameter=0.1)

Represent mol as a ball-and-stick model in three dimensions. mol should have 3d atom positions represented in Angstroms. 3D SDF files can be downloaded from sites such as PubChem.

radii optionally specifies the radii of the balls, in Angstroms. bonddiameter optionally specifies the radii of the sticks, in Angstroms.

This function requires that you load one of the backends of the Makie/GLMakie/CairoMakie family.

source
MolecularGraph.spacefillingMethod
spacefilling(mol::UndirectedGraph; radii="van der Waals")

Represent mol as a space-filling (Calotte) model in three dimensions. mol should have 3d atom positions represented in Angstroms. (3D SDF files can be downloaded from sites such as PubChem.) The two supported options for radii are "van der Waals" and "covalent"; the former are available only for main-group elements, and the latter are available for all.

This function requires that you load one of the backends of the Makie/GLMakie/CairoMakie family.

source
MolecularGraph.stickMethod
stick(mol::UndirectedGraph; size=0.3)

Represent mol as a stick model in three dimensions. mol should have 3d atom positions represented in Angstroms. 3D SDF files can be downloaded from sites such as PubChem.

size optionally specifies the width of the sticks, in Angstroms.

This function requires that you load one of the backends of the Makie/GLMakie/CairoMakie family.

source
MolecularGraph.wireMethod
wire(mol::UndirectedGraph; size=0.1)

Represent mol as a wire-frame model in three dimensions. mol should have 3d atom positions represented in Angstroms. 3D SDF files can be downloaded from sites such as PubChem.

size optionally specifies the width of the bonds, in Angstroms.

This function requires that you load one of the backends of the Makie/GLMakie/CairoMakie family.

source
MolecularGraph.drawsvgMethod
drawsvg(mol::SimpleMolGraph) -> String

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.html_fixed_sizeMethod
html_fixed_size(mol::SimpleMolGraph, width, height) -> HTML{String}

Generate fixed-size HTML wrapper for the SVG element.

The width and height args can be numeric values (converted to px) or CSS strings like 100%.

source
MolecularGraph.html_gridMethod
html_grid(mols, cols, rowheight) -> HTML{String}

Generate grid layout HTML wrapper for the SVG elements.

cols - number of columns in the grid. rowheight - numeric value (converted to px) or CSS string like 100%.

source