UNPKG

crystvis-js

Version:

A Three.js based crystallographic visualisation tool

3,136 lines (930 loc) 72.2 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Adding favicon --> <!-- Adding meta --> <!-- Adding external script--> <!-- Adding external style--> <!-- Adding scripts--> <!-- Adding style--> <!-- Adding overlay script--> <!-- Adding overlay style--> <title> Model </title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/third-party/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/third-party/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/reset.css"> <link type="text/css" rel="stylesheet" href="styles/clean-jsdoc-theme-base.css"> <link type="text/css" rel="stylesheet" href="styles/clean-jsdoc-theme-dark.css"> <svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"> <defs> <symbol id="copy-icon" viewbox="0 0 488.3 488.3"> <g> <path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z" /> <path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z" /> </g> </symbol> <symbol id='search-icon' viewBox="0 0 512 512"> <g> <g> <path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z" /> </g> </g> <g> <g> <path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z" /> </g> </g> </symbol> <symbol id="down-icon" viewBox="0 0 16 16"> <path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z" > </path> </symbol> </defs> </svg> </head> <body> <nav class="navbar" id="navbar"> <div class="navbar-heading" id="navbar-heading"><a href="index.html"><h2 class="navbar-heading-text">Home</h2></a></div><div class="search-box" id="search-box"><div class="search-box-input-container"><input class="search-box-input" type="text" placeholder="Search..." id="search-box-input" /><svg class="search-icon" alt="search-icon"><use xlink:href="#search-icon"></use></svg></div><div class="search-item-container" id="search-item-container"><ul class="search-item-ul" id="search-item-ul"></ul></div></div><div class="sidebar-main-content" id="sidebar-main-content"><div class="accordion collapsed" id="9953002" > <h3 class="accordion-heading">Modules<svg><use xlink:href="#down-icon"></use></svg></h3><ul class="accordion-content"><li class="accordion-list" id=""><a href="lib_model.module_js.html">lib/model.js</a></li><li class="accordion-list" id=""><a href="lib_modelview.module_js.html">lib/modelview.js</a></li><li class="accordion-list" id=""><a href="lib_visualizer.module_js.html">lib/visualizer.js</a></li></ul> </div><div class="accordion collapsed" id="3878701" > <h3 class="accordion-heading">Classes<svg><use xlink:href="#down-icon"></use></svg></h3><ul class="accordion-content"><li class="accordion collapsed child" id=6175172><div class="accordion-heading child"><a href="lib_model.module_js-AtomImage.html">AtomImage</a><svg><use xlink:href="#down-icon"></use></svg></div><ul class='methods accordion-content'><li data-type='method'><a href="lib_model.module_js-AtomImage.html#addEllipsoid">addEllipsoid</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#addLabel">addLabel</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#ellipsoidProperty">ellipsoidProperty</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#getArrayValue">getArrayValue</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#labelProperty">labelProperty</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#removeEllipsoid">removeEllipsoid</a></li><li data-type='method'><a href="lib_model.module_js-AtomImage.html#removeLabel">removeLabel</a></li></ul></li><li class="accordion-list" id=""><a href="lib_model.module_js-BondImage.html">BondImage</a></li><li class="accordion collapsed child" id=6715610><div class="accordion-heading child"><a href="lib_model.module_js-Model.html">Model</a><svg><use xlink:href="#down-icon"></use></svg></div><ul class='methods accordion-content'><li data-type='method'><a href="lib_model.module_js-Model.html#absToFrac">absToFrac</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#addLink">addLink</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#addSphere">addSphere</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#clearGraphics">clearGraphics</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#deleteArray">deleteArray</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#find">find</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#fracToAbs">fracToAbs</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#getArray">getArray</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#hasArray">hasArray</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#minimumSupercell">minimumSupercell</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#removeGraphics">removeGraphics</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#setArray">setArray</a></li><li data-type='method'><a href="lib_model.module_js-Model.html#view">view</a></li></ul></li><li class="accordion collapsed child" id=2271872><div class="accordion-heading child"><a href="lib_modelview.module_js-ModelView.html">ModelView</a><svg><use xlink:href="#down-icon"></use></svg></div><ul class='methods accordion-content'><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#addEllipsoids">addEllipsoids</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#addLabels">addLabels</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#and">and</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#ellipsoidProperties">ellipsoidProperties</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#find">find</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#hide">hide</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#labelProperties">labelProperties</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#map">map</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#not">not</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#or">or</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#removeEllipsoids">removeEllipsoids</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#removeLabels">removeLabels</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#setProperty">setProperty</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#show">show</a></li><li data-type='method'><a href="lib_modelview.module_js-ModelView.html#xor">xor</a></li></ul></li><li class="accordion collapsed child" id=6565660><div class="accordion-heading child"><a href="lib_visualizer.module_js-CrystVis.html">CrystVis</a><svg><use xlink:href="#down-icon"></use></svg></div><ul class='methods accordion-content'><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#addPrimitive">addPrimitive</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#centerCamera">centerCamera</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#deleteModel">deleteModel</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#displayModel">displayModel</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#getScreenshotData">getScreenshotData</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#loadModels">loadModels</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#onAtomBox">onAtomBox</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#onAtomClick">onAtomClick</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#reloadModel">reloadModel</a></li><li data-type='method'><a href="lib_visualizer.module_js-CrystVis.html#removePrimitive">removePrimitive</a></li></ul></li></ul> </div><div class="accordion collapsed" id="6000571" > <h3 class="accordion-heading">Tutorials<svg><use xlink:href="#down-icon"></use></svg></h3><ul class="accordion-content"><li class="accordion-list" id=""><a href="tutorial-Events.html">Events</a></li><li class="accordion-list" id=""><a href="tutorial-Queries.html">Queries</a></li></ul> </div> </nav> <div class="navbar-ham" id="navbar-ham"> <div> <div class="first"></div> <div class="second"></div> <div class="third"></div> </div> </div> <div id="main" class="main-content"> <h1 id='page-title' class="page-title"> Model </h1> <section> <header> <h2> <span class="ancestors"><a href="lib_model.module_js.html">lib/model.js</a>~</span> Model </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="Model"> <a href="#Model">#</a> <span class="type-signature"></span>new Model<span class="signature">(atoms, parameters)</span><span class="type-signature"></span> </h4> <div class="description"> <p>An object containing an Atomic structure and taking care of its periodic nature, allowing querying and selection, and so on.</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>atoms</code></td> <td class="type"> <span class="param-type">crystcif.Atoms</span> </td> <td class="description last"><p>Atomic structure, in crystcif's Atoms format</p></td> </tr> <tr> <td class="name"><code>parameters</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Additional options:</p> <ul> <li><code>supercell</code></li> <li><code>molecularCrystal</code> (if true, load full molecules in central unit cell)</li> <li><code>useNMRActiveIsotopes</code> (if true, all isotopes are set by default to the most common one with non-zero spin)</li> <li><code>vdwScaling</code> (scale van der Waals radii by a constant factor)</li> <li><code>vdwElementScaling</code> (table of per-element factors to scale VdW radii by)</li> </ul></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line917">line 917</a> </li></ul></dd> </div> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="all"> <a href="#all">#</a> <span class="type-signature">(readonly) </span>all<span class="type-signature"> :ModelView</span> </h4> <div class="description"> <p>ModelView containing all the atoms of the image</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">ModelView</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1199">line 1199</a> </li></ul></dd> </div> </dl> <h4 class="name" id="atoms"> <a href="#atoms">#</a> <span class="type-signature">(readonly) </span>atoms<span class="type-signature"> :Array.&lt;AtomImage></span> </h4> <div class="description"> <p>Atom images in this model</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;AtomImage></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1190">line 1190</a> </li></ul></dd> </div> </dl> <h4 class="name" id="axes"> <a href="#axes">#</a> <span class="type-signature">(readonly) </span>axes<span class="type-signature"> :AxesMesh</span> </h4> <div class="description"> <p>Graphical object representing the unit cell's axes</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">AxesMesh</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1208">line 1208</a> </li></ul></dd> </div> </dl> <h4 class="name" id="box"> <a href="#box">#</a> <span class="type-signature">(readonly) </span>box<span class="type-signature"> :BoxMesh</span> </h4> <div class="description"> <p>Graphical object representing the unit cell's box</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">BoxMesh</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1217">line 1217</a> </li></ul></dd> </div> </dl> <h4 class="name" id="cell"> <a href="#cell">#</a> <span class="type-signature">(readonly) </span>cell<span class="type-signature"> :Array.&lt;Array></span> </h4> <div class="description"> <p>Unit cell of the model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;Array></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1118">line 1118</a> </li></ul></dd> </div> </dl> <h4 class="name" id="crystalLabels"> <a href="#crystalLabels">#</a> <span class="type-signature">(readonly) </span>crystalLabels<span class="type-signature"> :Array.&lt;String></span> </h4> <div class="description"> <p>Crystallographic labels of each atom</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;String></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1163">line 1163</a> </li></ul></dd> </div> </dl> <h4 class="name" id="info"> <a href="#info">#</a> <span class="type-signature">(readonly) </span>info<span class="type-signature"> :Object</span> </h4> <div class="description"> <p>Additional information from the model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Object</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1136">line 1136</a> </li></ul></dd> </div> </dl> <h4 class="name" id="length"> <a href="#length">#</a> <span class="type-signature">(readonly) </span>length<span class="type-signature"> :int</span> </h4> <div class="description"> <p>Number of atoms in this model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">int</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1073">line 1073</a> </li></ul></dd> </div> </dl> <h4 class="name" id="numbers"> <a href="#numbers">#</a> <span class="type-signature">(readonly) </span>numbers<span class="type-signature"> :Array.&lt;int></span> </h4> <div class="description"> <p>Atomic numbers in this model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;int></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1091">line 1091</a> </li></ul></dd> </div> </dl> <h4 class="name" id="pbc"> <a href="#pbc">#</a> <span class="type-signature">(readonly) </span>pbc<span class="type-signature"> :Array.&lt;bool></span> </h4> <div class="description"> <p>Periodic boundary conditions</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;bool></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1127">line 1127</a> </li></ul></dd> </div> </dl> <h4 class="name" id="periodic"> <a href="#periodic">#</a> <span class="type-signature">(readonly) </span>periodic<span class="type-signature"> :bool</span> </h4> <div class="description"> <p>Whether this model is periodic in all three directions of space</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">bool</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1145">line 1145</a> </li></ul></dd> </div> </dl> <h4 class="name" id="positions"> <a href="#positions">#</a> <span class="type-signature">(readonly) </span>positions<span class="type-signature"> :Array.&lt;Array></span> </h4> <div class="description"> <p>Coordinates of the atoms in this model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;Array></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1100">line 1100</a> </li></ul></dd> </div> </dl> <h4 class="name" id="renderer"> <a href="#renderer">#</a> <span class="type-signature"></span>renderer<span class="type-signature"> :Renderer</span> </h4> <div class="description"> <p>Renderer used for this model's graphics</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Renderer</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1243">line 1243</a> </li></ul></dd> </div> </dl> <h4 class="name" id="scaledPositions"> <a href="#scaledPositions">#</a> <span class="type-signature">(readonly) </span>scaledPositions<span class="type-signature"> :Array.&lt;Array></span> </h4> <div class="description"> <p>Fractional coordinates of the atoms in this model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;Array></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1109">line 1109</a> </li></ul></dd> </div> </dl> <h4 class="name" id="speciesIndices"> <a href="#speciesIndices">#</a> <span class="type-signature">(readonly) </span>speciesIndices<span class="type-signature"> :Array.&lt;int></span> </h4> <div class="description"> <p>Indices of each atom by their species (e.g. C1, C2, H1, C3, H2, etc.)</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;int></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1154">line 1154</a> </li></ul></dd> </div> </dl> <h4 class="name" id="supercell"> <a href="#supercell">#</a> <span class="type-signature">(readonly) </span>supercell<span class="type-signature"> :Array.&lt;int></span> </h4> <div class="description"> <p>Shape of the supercell for this model</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;int></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1172">line 1172</a> </li></ul></dd> </div> </dl> <h4 class="name" id="supercellGrid"> <a href="#supercellGrid">#</a> <span class="type-signature">(readonly) </span>supercellGrid<span class="type-signature"> :Array.&lt;Array></span> </h4> <div class="description"> <p>Full grid of origin coordinates of the cells making up the supercell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;Array></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1181">line 1181</a> </li></ul></dd> </div> </dl> <h4 class="name" id="symbols"> <a href="#symbols">#</a> <span class="type-signature">(readonly) </span>symbols<span class="type-signature"> :Array.&lt;String></span> </h4> <div class="description"> <p>Chemical symbols in this model's original cell</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Array.&lt;String></span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1082">line 1082</a> </li></ul></dd> </div> </dl> <h4 class="name" id="vdwElementScaling"> <a href="#vdwElementScaling">#</a> <span class="type-signature">(readonly) </span>vdwElementScaling<span class="type-signature"> :Object</span> </h4> <div class="description"> <p>Table of scaling factors by element for Van der Waals radii</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">Object</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1235">line 1235</a> </li></ul></dd> </div> </dl> <h4 class="name" id="vdwScaling"> <a href="#vdwScaling">#</a> <span class="type-signature">(readonly) </span>vdwScaling<span class="type-signature"> :float</span> </h4> <div class="description"> <p>Global scaling factor for Van der Waals radii</p> </div> <div class="member-item-container flex"> <strong>Type: </strong> <ul> <li> <span class="param-type">float</span> </li> </ul> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1226">line 1226</a> </li></ul></dd> </div> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="absToFrac"> <a href="#absToFrac">#</a> <span class="type-signature"></span>absToFrac<span class="signature">(x)</span><span class="type-signature"> &rarr; {Array.&lt;float>}</span> </h4> <div class="description"> <p>Convert absolute coordinates to fractional</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">Array.&lt;float></span> </td> <td class="description last"><p>Absolute coordinates</p></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1649">line 1649</a> </li></ul></dd> </div> </dl> <div class="method-member-container mt-20"> <strong>Returns:</strong> <div class="param-desc"> <p>Fractional coordinates</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Array.&lt;float></span> </dd> </dl> </div> <h4 class="name" id="addLink"> <a href="#addLink">#</a> <span class="type-signature"></span>addLink<span class="signature">(from, to, name, label, parameters)</span><span class="type-signature"></span> </h4> <div class="description"> <p>Add link drawn on model</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>from</code></td> <td class="type"> <span class="param-type">Atom</span> | <span class="param-type">Array</span> </td> <td class="default"> </td> <td class="description last"><p>Starting point</p></td> </tr> <tr> <td class="name"><code>to</code></td> <td class="type"> <span class="param-type">Atom</span> | <span class="param-type">Array</span> </td> <td class="default"> </td> <td class="description last"><p>End point</p></td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="default"> link </td> <td class="description last"><p>Name to use for the link object</p></td> </tr> <tr> <td class="name"><code>label</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="default"> null </td> <td class="description last"><p>Text label to add to the link</p></td> </tr> <tr> <td class="name"><code>parameters</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="default"> </td> <td class="description last"><p>Additional parameters (see LineMesh)</p></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1326">line 1326</a> </li></ul></dd> </div> </dl> <h4 class="name" id="addSphere"> <a href="#addSphere">#</a> <span class="type-signature"></span>addSphere<span class="signature">(center, radius, name, parameters)</span><span class="type-signature"></span> </h4> <div class="description"> <p>Add a sphere drawn on model</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>center</code></td> <td class="type"> <span class="param-type">Atom</span> | <span class="param-type">Array</span> </td> <td class="default"> </td> <td class="description last"><p>Center of the sphere</p></td> </tr> <tr> <td class="name"><code>radius</code></td> <td class="type"> <span class="param-type">float</span> </td> <td class="default"> </td> <td class="description last"><p>Radius of the sphere</p></td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="default"> sphere </td> <td class="description last"><p>Name to use for the sphere object</p></td> </tr> <tr> <td class="name"><code>parameters</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="default"> </td> <td class="description last"><p>Additional parameters (see EllipsoidMesh)</p></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1361">line 1361</a> </li></ul></dd> </div> </dl> <h4 class="name" id="clearGraphics"> <a href="#clearGraphics">#</a> <span class="type-signature"></span>clearGraphics<span class="signature">()</span><span class="type-signature"></span> </h4> <div class="description"> <p>Remove all graphical objects</p> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1407">line 1407</a> </li></ul></dd> </div> </dl> <h4 class="name" id="deleteArray"> <a href="#deleteArray">#</a> <span class="type-signature"></span>deleteArray<span class="signature">(name)</span><span class="type-signature"></span> </h4> <div class="description"> <p>Delete an array from the underlying Atoms object</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>Name of the array to delete</p></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1310">line 1310</a> </li></ul></dd> </div> </dl> <h4 class="name" id="find"> <a href="#find">#</a> <span class="type-signature"></span>find<span class="signature">(query)</span><span class="type-signature"> &rarr; {ModelView}</span> </h4> <div class="description"> <p>Find a group of atoms based on a given query and return as AtomImages</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>query</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last"><p>A search query for atoms. Must use nested lists of types and arguments, and can use logic operators $and, $or and $xor.</p></td> </tr> </tbody> </table> </div> <dl class="details"> <div class="details-item-container"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model.js.html">model.js</a>, <a href="model.js.html#line1700">line 1700</a> </li></ul></dd> </div> </dl> <div class="method-member-container mt-20"> <strong>Returns:</strong> <div class="param-desc"> <p>ModelView object for found atoms</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">ModelView</span> </dd> </dl> </div> <h4 class="name" id="fracToAbs"> <a href="#fracToAbs">#</a> <span class="type-signature"></span>fracToAbs<span class="signature">(fx)</span><span class="type-signature"> &rarr; {Array.&lt;float>}</span> </h4> <div class="description"> <p>Convert fractional coordinates to absolute</p> </div> <div class="method-member-container flex flex-col w-100 overflow-auto mt-20"> <strong>Parameters:</strong> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fx</code></td> <td class="type"> <span class="param-type">Array.&lt;float></span> </td> <td class="description last"><p>Fractional coordinates</p></td> </tr> </tbody> </table> </div>