CWC may support parts of the spec in the future.#' ChemDoodle Viewer Canvas #' #' Widget that accepts a SMILES string and visualizes it using ChemDoodle #' #' htmlwidgets #' #' #: background color of the canvas, set this to undefined to create a see-through canvas #' scale of the canvas, set this after the molecule has been loaded, then repaint the canvas #' atom text font size for 2D depiction #' the atom text font families, families cascade through the array if not found on the users computer for 2D depiction #' atom text will be italicized #' diameter of atom circles for 2D depiction #' use Jmol colors for atoms #' use PyMOL colors for atoms, will default to Jmol if that specification is also true #' render implicit hydrogens on all labels that are visible #' show labels for terminal carbons #' show all carbon labels #' draw the bonds #' width of the bonds for 2D depiction also controls the width of primitive lines for bonds rendered in WebGL scenes #' relative saturation width of double and triple bond lines for 2D depiction #' bond end style for 2D depiction Allowed Values:, #' color the bond by using the Jmol colors of the connected atoms, the type of fill is controlled by the bonds_colorGradient specification #' color the bond by using the PyMOL colors of the connected atoms, the type of fill is controlled by the bonds_colorGradient specification, will default to Jmol if that specification is also true #' color the bond by using a gradient between the two colors of the constituent atoms, rather than by using a color split #' double bonds are drawn symmetrically always, instead of pointing towards the center of a ring, for instance for 2D depiction #' #' #' chemdoodle_viewer <- function ( smiles, width = 500, height = 500, bondscale = 14.4, #canvas settings backgroundColor = "white", scale = 1, #atom settings atoms_font_size_2D = 12, atoms_font_families_2D = c ( "Helvetica", "Arial", "Dialog" ), atoms_font_italic_2D = FALSE, atoms_circleDiameter_2D = 10, atoms_useJMOLColors = FALSE, atoms_usePYMOLColors = FALSE, atoms_implicitHydrogens_2D = TRUE, atoms_displayTerminalCarbonLabels_2D = TRUE, atoms_displayAllCarbonLabels_2D = FALSE, # bond specifications bonds_display = TRUE, bonds_width_2D = 1, bonds_saturationWidth_2D = 0.2, bonds_ends_2D = "round", bonds_useJMOLColors = FALSE, bonds_usePYMOLColors = FALSE, bonds_wedgeThickness_2D = 0. W3C Web Components announced by Alex Russell at Fronteers 2011. The ChemDoodle Web Components library was publicly released on. The ChemDoodle Web Components are not HTML5 Web Components. I also want to address a common misconception about Web Components as Simen stated. The tutorial shows how to initialize ChemDoodle Web Components on elements that already exist in the DOM, and how to create ChemDoodle Web Components in a closed DOM with no pre-existing elements. You can then use the ChemDoodle Web Components library after everything is set up by React on the elements you already created. If you do not want to do that, I recommend creating the elements for the ChemDoodle Web Components while you are setting up the DOM first. The ChemDoodle Web Components is not distributed as a React module, but you can create one from the source provided. So my question might be utterly stupid: But is there any chance i can use this libary in my react-office addin? I tried just importing it, and of course it is not a module.Ĭan anyone that has more clue, have a brief look on the API and tell me, if there is a way? I am very new to React, OfficeAddIn or JavaScript in general. The "ChemDoodleWeb.js" File presets one variable called "ChemDoodle" to the outside, which is used everywhere do control a canvas. If you want to use them in plain HTML Websites one would first add two references to the header section of the HTML file: Īnd then the libary can be accessed in the body section of the same file simply by //Do something ChemDoodle related The software we use to draw molecules at university is called "ChemDoodle", and it comes with a free WebAPI based on HTML5 and JavaScript: ChemDoodleWeb-Components. for the HTML5 ChemDoodle Web Components on iPhone OS platforms. The library uses
0 Comments
Leave a Reply. |