smiles-drawer
Version:
A SMILES drawer and parser. Generate molecular structure depictions in pure JavaScript.
2,487 lines (700 loc) • 98.1 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>exports - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_bridgeDfs">_bridgeDfs</a></li><li><a href="global.html#_ccCountDfs">_ccCountDfs</a></li><li><a href="global.html#_ccGetDfs">_ccGetDfs</a></li><li><a href="global.html#_init">_init</a></li><li><a href="global.html#_initInfos">_initInfos</a></li><li><a href="global.html#add">add</a></li><li><a href="global.html#addAnchoredRing">addAnchoredRing</a></li><li><a href="global.html#addChild">addChild</a></li><li><a href="global.html#addEdge">addEdge</a></li><li><a href="global.html#addNeighbouringElement">addNeighbouringElement</a></li><li><a href="global.html#addRing">addRing</a></li><li><a href="global.html#addRingbondChild">addRingbondChild</a></li><li><a href="global.html#addRingConnection">addRingConnection</a></li><li><a href="global.html#addVertex">addVertex</a></li><li><a href="global.html#angle">angle</a></li><li><a href="global.html#annotateStereochemistry">annotateStereochemistry</a></li><li><a href="global.html#apothem">apothem</a></li><li><a href="global.html#areSetsEqual">areSetsEqual</a></li><li><a href="global.html#areVerticesInSameRing">areVerticesInSameRing</a></li><li><a href="global.html#atomicNumbers">atomicNumbers</a></li><li><a href="global.html#attachPseudoElement">attachPseudoElement</a></li><li><a href="global.html#averageDirection">averageDirection</a></li><li><a href="global.html#backupRingInformation">backupRingInformation</a></li><li><a href="global.html#backupRings">backupRings</a></li><li><a href="global.html#bonds">bonds</a></li><li><a href="global.html#bondsToAtoms">bondsToAtoms</a></li><li><a href="global.html#centralAngle">centralAngle</a></li><li><a href="global.html#chooseSide">chooseSide</a></li><li><a href="global.html#clear">clear</a></li><li><a href="global.html#clockwise">clockwise</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#contains">contains</a></li><li><a href="global.html#containsAll">containsAll</a></li><li><a href="global.html#containsRing">containsRing</a></li><li><a href="global.html#count">count</a></li><li><a href="global.html#createBridgedRing">createBridgedRing</a></li><li><a href="global.html#createNextBond">createNextBond</a></li><li><a href="global.html#createRing">createRing</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#degFactor">degFactor</a></li><li><a href="global.html#distance">distance</a></li><li><a href="global.html#distanceSq">distanceSq</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#divideScalar">divideScalar</a></li><li><a href="global.html#dot">dot</a></li><li><a href="global.html#draw">draw</a></li><li><a href="global.html#drawAromaticityRing">drawAromaticityRing</a></li><li><a href="global.html#drawBall">drawBall</a></li><li><a href="global.html#drawCircle">drawCircle</a></li><li><a href="global.html#drawDashedWedge">drawDashedWedge</a></li><li><a href="global.html#drawDebugPoint">drawDebugPoint</a></li><li><a href="global.html#drawDebugText">drawDebugText</a></li><li><a href="global.html#drawEdge">drawEdge</a></li><li><a href="global.html#drawEdges">drawEdges</a></li><li><a href="global.html#drawLine">drawLine</a></li><li><a href="global.html#drawPoint">drawPoint</a></li><li><a href="global.html#drawText">drawText</a></li><li><a href="global.html#drawVertices">drawVertices</a></li><li><a href="global.html#drawWedge">drawWedge</a></li><li><a href="global.html#each">each</a></li><li><a href="global.html#eachMember">eachMember</a></li><li><a href="global.html#edgeRingCount">edgeRingCount</a></li><li><a href="global.html#equals">equals</a></li><li><a href="global.html#extend">extend</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#getAdjacencyList">getAdjacencyList</a></li><li><a href="global.html#getAdjacencyMatrix">getAdjacencyMatrix</a></li><li><a href="global.html#getAngle">getAngle</a></li><li><a href="global.html#getAtomicNumber">getAtomicNumber</a></li><li><a href="global.html#getAttachedPseudoElements">getAttachedPseudoElements</a></li><li><a href="global.html#getAttachedPseudoElementsCount">getAttachedPseudoElementsCount</a></li><li><a href="global.html#getBondCount">getBondCount</a></li><li><a href="global.html#getBridgedRingRings">getBridgedRingRings</a></li><li><a href="global.html#getBridgedRings">getBridgedRings</a></li><li><a href="global.html#getBridges">getBridges</a></li><li><a href="global.html#getChargeText">getChargeText</a></li><li><a href="global.html#getClosestVertex">getClosestVertex</a></li><li><a href="global.html#getColor">getColor</a></li><li><a href="global.html#getCommonRingbondNeighbour">getCommonRingbondNeighbour</a></li><li><a href="global.html#getCommonRings">getCommonRings</a></li><li><a href="global.html#getComponentsAdjacencyMatrix">getComponentsAdjacencyMatrix</a></li><li><a href="global.html#getConnectedComponentCount">getConnectedComponentCount</a></li><li><a href="global.html#getConnectedComponents">getConnectedComponents</a></li><li><a href="global.html#getCurrentCenterOfMass">getCurrentCenterOfMass</a></li><li><a href="global.html#getCurrentCenterOfMassInNeigbourhood">getCurrentCenterOfMassInNeigbourhood</a></li><li><a href="global.html#getDistanceMatrix">getDistanceMatrix</a></li><li><a href="global.html#getDoubleBondCount">getDoubleBondCount</a></li><li><a href="global.html#getDrawnNeighbours">getDrawnNeighbours</a></li><li><a href="global.html#getEdge">getEdge</a></li><li><a href="global.html#getEdgeCount">getEdgeCount</a></li><li><a href="global.html#getEdgeList">getEdgeList</a></li><li><a href="global.html#getEdgeNormals">getEdgeNormals</a></li><li><a href="global.html#getEdges">getEdges</a></li><li><a href="global.html#getFusedRings">getFusedRings</a></li><li><a href="global.html#getHeavyAtomCount">getHeavyAtomCount</a></li><li><a href="global.html#getLargestOrAromaticCommonRing">getLargestOrAromaticCommonRing</a></li><li><a href="global.html#getLastVertexWithAngle">getLastVertexWithAngle</a></li><li><a href="global.html#getLeftChiral">getLeftChiral</a></li><li><a href="global.html#getLeftElement">getLeftElement</a></li><li><a href="global.html#getLeftVector">getLeftVector</a></li><li><a href="global.html#getLength">getLength</a></li><li><a href="global.html#getMaxBonds">getMaxBonds</a></li><li><a href="global.html#getNeighbourCount">getNeighbourCount</a></li><li><a href="global.html#getNeighbours">getNeighbours</a></li><li><a href="global.html#getNextInRing">getNextInRing</a></li><li><a href="global.html#getNonRingNeighbours">getNonRingNeighbours</a></li><li><a href="global.html#getOrderedNeighbours">getOrderedNeighbours</a></li><li><a href="global.html#getOverlapScore">getOverlapScore</a></li><li><a href="global.html#getPathIncludedDistanceMatrices">getPathIncludedDistanceMatrices</a></li><li><a href="global.html#getPolygon">getPolygon</a></li><li><a href="global.html#getRightChiral">getRightChiral</a></li><li><a href="global.html#getRightElement">getRightElement</a></li><li><a href="global.html#getRightVector">getRightVector</a></li><li><a href="global.html#getRing">getRing</a></li><li><a href="global.html#getRingbondCount">getRingbondCount</a></li><li><a href="global.html#getRingbondType">getRingbondType</a></li><li><a href="global.html#getRingCandidates">getRingCandidates</a></li><li><a href="global.html#getRingConnection">getRingConnection</a></li><li><a href="global.html#getRingConnections">getRingConnections</a></li><li><a href="global.html#getRingCount">getRingCount</a></li><li><a href="global.html#getRings">getRings</a></li><li><a href="global.html#getRotateAwayFromAngle">getRotateAwayFromAngle</a></li><li><a href="global.html#getRotateToAngle">getRotateToAngle</a></li><li><a href="global.html#getRotateTowardsAngle">getRotateTowardsAngle</a></li><li><a href="global.html#getSize">getSize</a></li><li><a href="global.html#getSpanningTreeNeighbours">getSpanningTreeNeighbours</a></li><li><a href="global.html#getSpiros">getSpiros</a></li><li><a href="global.html#getSSSR">getSSSR</a></li><li><a href="global.html#getSubgraphAdjacencyList">getSubgraphAdjacencyList</a></li><li><a href="global.html#getSubgraphAdjacencyMatrix">getSubgraphAdjacencyMatrix</a></li><li><a href="global.html#getSubgraphDistanceMatrix">getSubgraphDistanceMatrix</a></li><li><a href="global.html#getSubringCenter">getSubringCenter</a></li><li><a href="global.html#getSubtreeOverlapScore">getSubtreeOverlapScore</a></li><li><a href="global.html#getTextDirection">getTextDirection</a></li><li><a href="global.html#getTotalOverlapScore">getTotalOverlapScore</a></li><li><a href="global.html#getTreeDepth">getTreeDepth</a></li><li><a href="global.html#getVertexList">getVertexList</a></li><li><a href="global.html#getVertices">getVertices</a></li><li><a href="global.html#getVerticesAt">getVerticesAt</a></li><li><a href="global.html#hasBridgedRing">hasBridgedRing</a></li><li><a href="global.html#hasEdge">hasEdge</a></li><li><a href="global.html#haveCommonRingbond">haveCommonRingbond</a></li><li><a href="global.html#initPseudoElements">initPseudoElements</a></li><li><a href="global.html#initRings">initRings</a></li><li><a href="global.html#innerAngle">innerAngle</a></li><li><a href="global.html#intersection">intersection</a></li><li><a href="global.html#invert">invert</a></li><li><a href="global.html#isBenzeneLike">isBenzeneLike</a></li><li><a href="global.html#isBridge">isBridge</a></li><li><a href="global.html#isEdgeInRing">isEdgeInRing</a></li><li><a href="global.html#isEdgeRotatable">isEdgeRotatable</a></li><li><a href="global.html#isHeteroAtom">isHeteroAtom</a></li><li><a href="global.html#isInPolygon">isInPolygon</a></li><li><a href="global.html#isPartOfBridgedRing">isPartOfBridgedRing</a></li><li><a href="global.html#isPointInRing">isPointInRing</a></li><li><a href="global.html#isRingAromatic">isRingAromatic</a></li><li><a href="global.html#isSupersetOf">isSupersetOf</a></li><li><a href="global.html#isTerminal">isTerminal</a></li><li><a href="global.html#kkLayout">kkLayout</a></li><li><a href="global.html#length">length</a></li><li><a href="global.html#lengthSq">lengthSq</a></li><li><a href="global.html#mass">mass</a></li><li><a href="global.html#matrixToString">matrixToString</a></li><li><a href="global.html#maxBonds">maxBonds</a></li><li><a href="global.html#meanAngle">meanAngle</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#midpoint">midpoint</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#multiplyScalar">multiplyScalar</a></li><li><a href="global.html#neighbouringElementsEqual">neighbouringElementsEqual</a></li><li><a href="global.html#normalize">normalize</a></li><li><a href="global.html#normalized">normalized</a></li><li><a href="global.html#normals">normals</a></li><li><a href="global.html#parityOfPermutation">parityOfPermutation</a></li><li><a href="global.html#pathSetsContain">pathSetsContain</a></li><li><a href="global.html#polyCircumradius">polyCircumradius</a></li><li><a href="global.html#position">position</a></li><li><a href="global.html#print">print</a></li><li><a href="global.html#printRingInfo">printRingInfo</a></li><li><a href="global.html#radFactor">radFactor</a></li><li><a href="global.html#relativeClockwise">relativeClockwise</a></li><li><a href="global.html#remove">remove</a></li><li><a href="global.html#removeAll">removeAll</a></li><li><a href="global.html#removeRing">removeRing</a></li><li><a href="global.html#removeRingConnection">removeRingConnection</a></li><li><a href="global.html#removeRingConnectionsBetween">removeRingConnectionsBetween</a></li><li><a href="global.html#removeUnique">removeUnique</a></li><li><a href="global.html#reset">reset</a></li><li><a href="global.html#resolvePrimaryOverlaps">resolvePrimaryOverlaps</a></li><li><a href="global.html#resolveSecondaryOverlaps">resolveSecondaryOverlaps</a></li><li><a href="global.html#restoreRingInformation">restoreRingInformation</a></li><li><a href="global.html#restoreRings">restoreRings</a></li><li><a href="global.html#rotate">rotate</a></li><li><a href="global.html#rotateAround">rotateAround</a></li><li><a href="global.html#rotateAwayFrom">rotateAwayFrom</a></li><li><a href="global.html#rotateDrawing">rotateDrawing</a></li><li><a href="global.html#rotateSubtree">rotateSubtree</a></li><li><a href="global.html#rotateTo">rotateTo</a></li><li><a href="global.html#rotateToXAxis">rotateToXAxis</a></li><li><a href="global.html#round">round</a></li><li><a href="global.html#sameSideAs">sameSideAs</a></li><li><a href="global.html#scalarProjection">scalarProjection</a></li><li><a href="global.html#scale">scale</a></li><li><a href="global.html#setBondType">setBondType</a></li><li><a href="global.html#setLeftVector">setLeftVector</a></li><li><a href="global.html#setParentVertexId">setParentVertexId</a></li><li><a href="global.html#setPosition">setPosition</a></li><li><a href="global.html#setPositionFromVector">setPositionFromVector</a></li><li><a href="global.html#setRightVector">setRightVector</a></li><li><a href="global.html#setRingCenter">setRingCenter</a></li><li><a href="global.html#setTheme">setTheme</a></li><li><a href="global.html#shorten">shorten</a></li><li><a href="global.html#shortenFrom">shortenFrom</a></li><li><a href="global.html#shortenLeft">shortenLeft</a></li><li><a href="global.html#shortenRight">shortenRight</a></li><li><a href="global.html#shortenTo">shortenTo</a></li><li><a href="global.html#sortByAtomicNumberDesc">sortByAtomicNumberDesc</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#threePointangle">threePointangle</a></li><li><a href="global.html#toDeg">toDeg</a></li><li><a href="global.html#toggle">toggle</a></li><li><a href="global.html#toRad">toRad</a></li><li><a href="global.html#toString">toString</a></li><li><a href="global.html#traverseBF">traverseBF</a></li><li><a href="global.html#traverseTree">traverseTree</a></li><li><a href="global.html#twoPI">twoPI</a></li><li><a href="global.html#unique">unique</a></li><li><a href="global.html#units">units</a></li><li><a href="global.html#updateOther">updateOther</a></li><li><a href="global.html#updateSize">updateSize</a></li><li><a href="global.html#visitStereochemistry">visitStereochemistry</a></li><li><a href="global.html#whichSide">whichSide</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">exports</h1>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A class representing the molecular graph.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(parseTree, isomeric<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Graph.js.html">Graph.js</a>, <a href="Graph.js.html#line18">line 18</a>
</li></ul></dd>
</dl>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>vertices</code></td>
<td class="type">
<span class="param-type">Array.<Vertex></span>
</td>
<td class="description last"><p>The vertices of the graph.</p></td>
</tr>
<tr>
<td class="name"><code>edges</code></td>
<td class="type">
<span class="param-type">Array.<Edge></span>
</td>
<td class="description last"><p>The edges of this graph.</p></td>
</tr>
<tr>
<td class="name"><code>vertexIdsToEdgeId</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>A map mapping vertex ids to the edge between the two vertices. The key is defined as vertexAId + '_' + vertexBId.</p></td>
</tr>
<tr>
<td class="name"><code>elementCount</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>A map associating element symbols with the number of occurences in this graph.</p></td>
</tr>
<tr>
<td class="name"><code>isometric</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean indicating whether or not the SMILES associated with this graph is isometric.</p></td>
</tr>
</tbody>
</table>
<div class="description">
<p>The constructor of the class Graph.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parseTree</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>A SMILES parse tree.</p></td>
</tr>
<tr>
<td class="name"><code>isomeric</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>false</code>
</td>
<td class="description last"><p>A boolean specifying whether or not the SMILES is isomeric.</p></td>
</tr>
</tbody>
</table>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A static class containing helper functions for math-related tasks.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MathHelper.js.html">MathHelper.js</a>, <a href="MathHelper.js.html#line4">line 4</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A class representing a vertex.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(value, x<span class="signature-attributes">opt</span>, y<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Vertex.js.html">Vertex.js</a>, <a href="Vertex.js.html#line27">line 27</a>
</li></ul></dd>
</dl>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The id of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Atom</span>
</td>
<td class="description last"><p>The atom associated with this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type">Vector2</span>
</td>
<td class="description last"><p>The position of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>previousPosition</code></td>
<td class="type">
<span class="param-type">Vector2</span>
</td>
<td class="description last"><p>The position of the previous vertex.</p></td>
</tr>
<tr>
<td class="name"><code>parentVertexId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">null</span>
</td>
<td class="description last"><p>The id of the previous vertex.</p></td>
</tr>
<tr>
<td class="name"><code>children</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>The ids of the children of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>spanningTreeChildren</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>The ids of the children of this vertex as defined in the spanning tree defined by the SMILES.</p></td>
</tr>
<tr>
<td class="name"><code>edges</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>The ids of edges associated with this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>positioned</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean indicating whether or not this vertex has been positioned.</p></td>
</tr>
<tr>
<td class="name"><code>angle</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The angle of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>dir</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The direction of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>neighbourCount</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The number of neighbouring vertices.</p></td>
</tr>
<tr>
<td class="name"><code>neighbours</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>The vertex ids of neighbouring vertices.</p></td>
</tr>
<tr>
<td class="name"><code>neighbouringElements</code></td>
<td class="type">
<span class="param-type">Array.<String></span>
</td>
<td class="description last"><p>The element symbols associated with neighbouring vertices.</p></td>
</tr>
<tr>
<td class="name"><code>forcePositioned</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean indicating whether or not this vertex was positioned using a force-based approach.</p></td>
</tr>
</tbody>
</table>
<div class="description">
<p>The constructor for the class Vertex.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Atom</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The value associated with this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>0</code>
</td>
<td class="description last"><p>The initial x coordinate of the positional vector of this vertex.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>0</code>
</td>
<td class="description last"><p>The initial y coordinate of the positional vector of this vertex.</p></td>
</tr>
</tbody>
</table>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A class representing a ring connection.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(firstRing, secondRing)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="RingConnection.js.html">RingConnection.js</a>, <a href="RingConnection.js.html#line13">line 13</a>
</li></ul></dd>
</dl>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The id of this ring connection.</p></td>
</tr>
<tr>
<td class="name"><code>firstRingId</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>A ring id.</p></td>
</tr>
<tr>
<td class="name"><code>secondRingId</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>A ring id.</p></td>
</tr>
<tr>
<td class="name"><code>vertices</code></td>
<td class="type">
<span class="param-type">Set.<Number></span>
</td>
<td class="description last"><p>A set containing the vertex ids participating in the ring connection.</p></td>
</tr>
</tbody>
</table>
<div class="description">
<p>The constructor for the class RingConnection.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firstRing</code></td>
<td class="type">
<span class="param-type">Ring</span>
</td>
<td class="description last"><p>A ring.</p></td>
</tr>
<tr>
<td class="name"><code>secondRing</code></td>
<td class="type">
<span class="param-type">Ring</span>
</td>
<td class="description last"><p>A ring.</p></td>
</tr>
</tbody>
</table>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A static class containing helper functions for array-related tasks.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ArrayHelper.js.html">ArrayHelper.js</a>, <a href="ArrayHelper.js.html#line6">line 6</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>A class representing a ring.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(members)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Ring.js.html">Ring.js</a>, <a href="Ring.js.html#line25">line 25</a>
</li></ul></dd>
</dl>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The id of this ring.</p></td>
</tr>
<tr>
<td class="name"><code>members</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>An array containing the vertex ids of the ring members.</p></td>
</tr>
<tr>
<td class="name"><code>edges</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>An array containing the edge ids of the edges between the ring members.</p></td>
</tr>
<tr>
<td class="name"><code>insiders</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>An array containing the vertex ids of the vertices contained within the ring if it is a bridged ring.</p></td>
</tr>
<tr>
<td class="name"><code>neighbours</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>An array containing the ids of neighbouring rings.</p></td>
</tr>
<tr>
<td class="name"><code>positioned</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean indicating whether or not this ring has been positioned.</p></td>
</tr>
<tr>
<td class="name"><code>center</code></td>
<td class="type">
<span class="param-type">Vector2</span>
</td>
<td class="description last"><p>The center of this ring.</p></td>
</tr>
<tr>
<td class="name"><code>rings</code></td>
<td class="type">
<span class="param-type">Array.<Ring></span>
</td>
<td class="description last"><p>The rings contained within this ring if this ring is bridged.</p></td>
</tr>
<tr>
<td class="name"><code>isBridged</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean whether or not this ring is bridged.</p></td>
</tr>
<tr>
<td class="name"><code>isPartOfBridged</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean whether or not this ring is part of a bridge ring.</p></td>
</tr>
<tr>
<td class="name"><code>isSpiro</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean whether or not this ring is part of a spiro.</p></td>
</tr>
<tr>
<td class="name"><code>isFused</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean whether or not this ring is part of a fused ring.</p></td>
</tr>
<tr>
<td class="name"><code>centralAngle</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The central angle of this ring.</p></td>
</tr>
<tr>
<td class="name"><code>canFlip</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>A boolean indicating whether or not this ring allows flipping of attached vertices to the inside of the ring.</p></td>
</tr>
</tbody>
</table>
<div class="description">
<p>The constructor for the class Ring.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>members</code></td>
<td class="type">
<span class="param-type">Array.<Number></span>
</td>
<td class="description last"><p>An array containing the vertex ids of the members of the ring to be created.</p></td>
</tr>
</tbody>
</table>
</div>
</article>
</section>
<section>
<header>
<h2>
exports
</h2>
<div class="class-description"><p>The main class of the application representing the smiles drawer</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">(options)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Drawer.js.html">Drawer.js</a>, <a href="Drawer.js.html#line27">line 27</a>
</li></ul></dd>
</dl>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>graph</code></td>
<td class="type">
<span class="param-type">Graph</span>
</td>
<td class="description last"><p>The graph associated with this SmilesDrawer.Drawer instance.</p></td>
</tr>
<tr>
<td class="name"><code>ringIdCounter</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>An internal counter to keep track of ring ids.</p></td>
</tr>
<tr>
<td class="name"><code>ringConnectionIdCounter</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>An internal counter to keep track of ring connection ids.</p></td>
</tr>
<tr>
<td class="name"><code>canvasWrapper</code></td>
<td class="type">
<span class="param-type">CanvasWrapper</span>
</td>
<td class="description last"><p>The CanvasWrapper associated with this SmilesDrawer.Drawer instance.</p></td>
</tr>
<tr>
<td class="name"><code>totalOverlapScore</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The current internal total overlap score.</p></td>
</tr>
<tr>
<td class="name"><code>defaultOptions</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The default options.</p></td>
</tr>
<tr>
<td class="name"><code>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The merged options.</p></td>
</tr>
<tr>
<td class="name"><code>theme</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The current theme.</p></td>
</tr>
</tbody>
</table>
<div class="description">
<p>The constructor for the class SmilesDrawer.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>