Create a new
MoleculeViewer inside the HTML DOM element with the given
HTML element or HTML id of the DOM element where the viewer will be created
callback called when a new atom is clicked on
Callback to get the initial positioning of the settings modal.
The callback is called once, the first time the settings are opened.
Applies saved settings, possibly filling in with default values
Returns a PNG screenshot of the viewer as a URI string
Highlight a given
atom in the current structure.
If a supercell larger than [1, 1, 1] is currently displayed, this
function accept indexes larger than the result of
natoms(), and will
then highlight atoms outside of the central image.
index of the central atom in the environment to show,
undefined to disable highlighting.
Get the number of atoms in the structure, or
undefined if no structure
is currently loaded
the number of atoms in the currently loaded structure
Add the given
callback to be called whenever a setting changes. The
callback will be given the path to the settings as a list of keys; and
the new value of the setting.
There is currently no way to remove a callback.
Remove all HTML added by this MoleculeViewer in the current document
Resize the 3Dmol viewer/canvas to the size of the HTML element containing this widget.