Description Usage Arguments Value Examples
View source: R/molecule_figures_rdkit.R
Plot 2D structure based on SMILES string
1 |
plot |
logical, if TRUE the molecule will be directly plot |
size |
size of the figure, default is 600 |
filenpath |
path to file |
a png figure of the molecule, either saved to disk or directly plot
1 2 3 4 5 6 7 8 | #You need to set anaconda environment prior to running RDKit code
reticulate::use_condaenv(condaenv = "my-rdkit-env", conda = "/Users/lrichter/miniconda3/bin/conda")
#draws molecule directly into plot pane
draw_mol("C[C@]1([C@H]2C[C@H]3[C@H](C(=O)C(=C([C@]3(C(=O)C2=C(C4=C1C=CC=C4O)O)O)O)C(=O)N)N(C)C)O")
in order to crop the white space around pictures ImageMagick can be used.
the command in windows is >magick mogrify -trim *.png
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.