-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathREADME.html
463 lines (460 loc) · 24.6 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<html lang = "en">
<head>
<meta charset="utf-8">
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-521cbf980c80.css" integrity="sha512-Uhy/mAyAx1HfsenmjQ85ASpOk5bjt2Ay03pNeixXIvkHlEm5S+N4u0HWfDGhvsGYx4bGyviXWGGPZeIffqYcNA==" media="all" rel="stylesheet">
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-be0481bef7d9.css" integrity="sha512-vgSBvvfZP2Kl3LF7M/gHnUD7GKfHl7aTSB55Cjr6xHkxaP/InJ41AXLEEy+6mArnvt2HJPmZYqGoIRqAZg352Q==" media="all" rel="stylesheet">
<meta name="viewport" content="width=device-width">
</head>
<body>
<div id="readme" class="readme blob instapaper_body">
<article class="markdown-body entry-content" itemprop="text"><h2><a href="#project-title-d3-molecule" aria-hidden="true" class="anchor" id="user-content-project-title-d3-molecule"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Project Title: d3-molecule</h2>
<p><strong>d3-molecule</strong> is an open-source library for learning Chemical Bonding in an interactive way.</p>
<h2><a href="#" aria-hidden="true" class="anchor" id=""><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><a href="https://github.com/wangyingxie/wangyingxie.github.io/blob/master/screenshot2.png" target="_blank"><img src="https://github.com/wangyingxie/wangyingxie.github.io/raw/master/screenshot2.png" alt="Screenshot" style="max-width:100%;"></a></h2>
<h2><a href="#version-history" aria-hidden="true" class="anchor" id="user-content-version-history"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Version History</h2>
<table>
<thead>
<tr>
<th>Version</th>
<th>Date</th>
<th>Brief Description</th>
<th>Author(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>v1.0.0</code></td>
<td>2017/03/01</td>
<td>Initial creation</td>
<td><a href="mailto:[email protected]">[email protected]</a></td>
</tr>
<tr>
<td><code>v1.0.3</code></td>
<td>2017/03/01</td>
<td>Update Readme</td>
<td><a href="mailto:[email protected]">[email protected]</a></td>
</tr>
<tr>
<td><code>v1.1.1</code></td>
<td>2017/12/31</td>
<td>Update Readme</td>
<td><a href="mailto:[email protected]">[email protected]</a></td>
</tr>
<tr>
<td><code>v2.0.0</code></td>
<td>2018/02/07</td>
<td>Visualize organic chemical structures based on IUPAC conventions</td>
<td><a href="mailto:[email protected]">[email protected];</a> <a href="mailto:[email protected]">[email protected]</a></td>
</tr></tbody></table>
<h2><a href="#usage-and-features" aria-hidden="true" class="anchor" id="user-content-usage-and-features"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Usage and Features</h2>
<ul>
<li>Clicking the atom selects it</li>
<li>Clicking on 2 atoms, joins them by a bond</li>
<li>Clicking on a bond, toggles the bond type</li>
<li>Clicking on a view port, locks and unlocks it from movement</li>
<li>Double clicking a bond, removes it</li>
<li>Double clicking an atom, removes it and its bonds</li>
<li>Lock/ Unlock atoms to their position if needed.</li>
<li>Hide/ Show atoms if needed.</li>
<li>Drag and Resizing of molemethaneculecule container</li>
<li>Option to Export molecule as a PNG image</li>
<li>Configurable forces, constants of force directed graph for the molecule</li>
<li>Configurable style parameters for canvas, atoms, bonds</li>
<li>Visualize organic chemical structures based on IUPAC conventions.</li>
</ul>
<h2><a href="#features-wip" aria-hidden="true" class="anchor" id="user-content-features-wip"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Features WIP</h2>
<ul>
<li>Molecule Reaction components</li>
<li>Loading examples directly from standard notations like SMILE</li>
<li>3-D support</li>
</ul>
<p>Check out an example here. <a href="https://arpitnarechania.github.io/d3-molecule/" rel="nofollow">Demo</a></p>
<h2><a href="#installation" aria-hidden="true" class="anchor" id="user-content-installation"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Installation</h2>
<p>Download d3-molecule using npm.</p>
<pre><code>npm install d3-molecule --save-dev
cd d3-molecule
npm install
</code></pre>
<p>To use this library then, simply include d3.js, jquery, Molecule.js and Molecule.css:</p>
<div class="highlight highlight-text-html-basic"><pre><<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>/path/to/jquery.min.js<span class="pl-pds">"</span></span>></<span class="pl-ent">script</span>>
<<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>/path/to/d3.min.js<span class="pl-pds">"</span></span>></<span class="pl-ent">script</span>>
<<span class="pl-ent">link</span> <span class="pl-e">href</span>=<span class="pl-s"><span class="pl-pds">"</span>/path/to/dist/css/Molecule.css<span class="pl-pds">"</span></span>>
<<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>/path/to/dist/js/Molecule.js<span class="pl-pds">"</span></span>></<span class="pl-ent">script</span>></pre></div>
<h2><a href="#basic-usage" aria-hidden="true" class="anchor" id="user-content-basic-usage"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Basic Usage</h2>
<p>To use this library, you must create a container element and instantiate a new Molecule:</p>
<div class="highlight highlight-text-html-basic"><pre><<span class="pl-ent">div</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>container<span class="pl-pds">"</span></span>></<span class="pl-ent">div</span>></pre></div>
<p>Data</p>
<pre><code>var data = {
"nodes": [
{
"id": 0,
"atom": "Mg",
"charge":""
"size": 24
},
{
"id": 1,
"atom": "Cl",
"charge":""
"size": 35
},
{
"id": 2,
"atom": "Cl",
"charge":""
"size": 35
}
],
"links": [
{
"source": 0,
"target": 1,
"bond": 1
},
{
"source": 0,
"target": 2,
"bond": 1
}
]
}
</code></pre>
<p>Setting chart parameters</p>
<div class="highlight highlight-source-js"><pre> <span class="pl-k">var</span> options <span class="pl-k">=</span> {
domElement<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#container<span class="pl-pds">"</span></span>,
uniqueId<span class="pl-k">:</span> <span class="pl-c1">1</span>,
width<span class="pl-k">:</span> <span class="pl-c1">500</span>,
height<span class="pl-k">:</span> <span class="pl-c1">500</span>,
borderThickness<span class="pl-k">:</span> <span class="pl-c1">1</span>,
borderColor<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#ffffff<span class="pl-pds">"</span></span>,
background<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#ffffff<span class="pl-pds">"</span></span>,
charge<span class="pl-k">:</span> <span class="pl-k">-</span><span class="pl-c1">1000</span>,
friction<span class="pl-k">:</span> <span class="pl-c1">0.9</span>,
alpha<span class="pl-k">:</span> <span class="pl-c1">0.1</span>,
theta<span class="pl-k">:</span> <span class="pl-c1">0.8</span>,
linkStrength<span class="pl-k">:</span> <span class="pl-c1">1</span>,
gravity<span class="pl-k">:</span> <span class="pl-c1">0.1</span>,
maxAtomRadius<span class="pl-k">:</span> <span class="pl-c1">6</span>,
colorScheme<span class="pl-k">:</span>[<span class="pl-s"><span class="pl-pds">"</span>#2AA9CC<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>#FCF78A<span class="pl-pds">"</span></span>],
bondThickness<span class="pl-k">:</span> <span class="pl-c1">2</span>,
bondColor<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#000000<span class="pl-pds">"</span></span>,
atomBorderThickness<span class="pl-k">:</span> <span class="pl-c1">2</span>,
atomBorderColor<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#000000<span class="pl-pds">"</span></span>,
atomTextColor<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>#000000<span class="pl-pds">"</span></span>,
atomSizeBasis<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>Atomic Radius<span class="pl-pds">"</span></span>,
boundingBox<span class="pl-k">:</span> <span class="pl-c1">true</span>,
borderRadiusX<span class="pl-k">:</span> <span class="pl-c1">5</span>,
borderRadiusY<span class="pl-k">:</span> <span class="pl-c1">5</span>,
detailedTooltips<span class="pl-k">:</span> <span class="pl-c1">true</span>
};
<span class="pl-k">var</span> molecule <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">Molecule</span>(data,options);
<span class="pl-smi">molecule</span>.<span class="pl-en">render</span>();
</pre></div>
<h2><a href="#options" aria-hidden="true" class="anchor" id="user-content-options"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Options</h2>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Type</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>domElement</code></td>
<td>The DOM element to append the molecule to</td>
<td>string</td>
<td><code>'#container'</code></td>
</tr>
<tr>
<td><code>uniqueId</code></td>
<td>A Unique ID in case multiple molecules are added (as in the demo)</td>
<td>number</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>width</code></td>
<td>Width of the svg container</td>
<td>number</td>
<td><code>500</code></td>
</tr>
<tr>
<td><code>height</code></td>
<td>Height of the svg container</td>
<td>number</td>
<td><code>500</code></td>
</tr>
<tr>
<td><code>borderThickness</code></td>
<td>Thickness of the border of the svg container</td>
<td>number</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>borderColor</code></td>
<td>Color of the border of the svg container</td>
<td>string</td>
<td><code>'#000000'</code></td>
</tr>
<tr>
<td><code>background</code></td>
<td>Background color of the svg container</td>
<td>string</td>
<td><code>'#FFFFFF'</code></td>
</tr>
<tr>
<td><code>charge</code></td>
<td>The Repulsion/ Attraction force between atoms</td>
<td>number</td>
<td><code>-1000</code></td>
</tr>
<tr>
<td><code>friction</code></td>
<td>The friction parameter of a force directed graph</td>
<td>number</td>
<td><code>0.9</code></td>
</tr>
<tr>
<td><code>alpha</code></td>
<td>The alpha parameter of a force directed graph</td>
<td>number</td>
<td><code>0.1</code></td>
</tr>
<tr>
<td><code>theta</code></td>
<td>The theta parameter of a force directed graph</td>
<td>number</td>
<td><code>0.8</code></td>
</tr>
<tr>
<td><code>linkStrength</code></td>
<td>The linkStrength parameter of a force directed graph</td>
<td>number</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>gravity</code></td>
<td>The gravity parameter of a force directed graph</td>
<td>number</td>
<td><code>0.1</code></td>
</tr>
<tr>
<td><code>maxAtomRadius</code></td>
<td>Radius of the biggest atom in the molecule</td>
<td>number</td>
<td><code>6</code></td>
</tr>
<tr>
<td><code>colorScheme</code></td>
<td>Color scheme of the atoms</td>
<td>list</td>
<td><code>["#2AA9CC", "#FCF78A"]</code></td>
</tr>
<tr>
<td><code>bondThickness</code></td>
<td>Bond thickness</td>
<td>number</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>bondColor</code></td>
<td>Bond Color</td>
<td>string</td>
<td><code>'#000000'</code></td>
</tr>
<tr>
<td><code>atomBorderThickness</code></td>
<td>Atom border thickness</td>
<td>string</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>atomBorderColor</code></td>
<td>Atom border color</td>
<td>string</td>
<td><code>'#000000'</code></td>
</tr>
<tr>
<td><code>atomTextColor</code></td>
<td>Atom text color</td>
<td>string</td>
<td><code>'#000000'</code></td>
</tr>
<tr>
<td><code>atomSizeBasis</code></td>
<td>Basis on which the atom circle svgs be rendered</td>
<td>string</td>
<td><code>'Atomic Radius'</code></td>
</tr>
<tr>
<td><code>boundingBox</code></td>
<td>If the molecule should be constrained inside the svg container</td>
<td>boolean</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>borderRadiusX</code></td>
<td>SVG container's border (X) parameter</td>
<td>number</td>
<td><code>5</code></td>
</tr>
<tr>
<td><code>borderRadiusY</code></td>
<td>SVG container's border (Y) parameter</td>
<td>number</td>
<td><code>5</code></td>
</tr>
<tr>
<td><code>detailedTooltips</code></td>
<td>If detailed info about the element to be shown on hover or not</td>
<td>boolean</td>
<td><code>true</code></td>
</tr></tbody></table>
<h2><a href="#bond-types-include--" aria-hidden="true" class="anchor" id="user-content-bond-types-include--"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Bond Types include :-</h2>
<ul>
<li>Single</li>
<li>Double</li>
<li>Triple</li>
<li>Quadruple</li>
<li>Wedged</li>
<li>Wavy</li>
<li>Dotted</li>
<li>Dashed (Stripes)</li>
<li>Dashed (Gradient)</li>
<li>Arc</li>
</ul>
<h1><a href="#test-wip" aria-hidden="true" class="anchor" id="user-content-test-wip"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Test (WIP)</h1>
<ul>
<li>Unit test cases in the testrunner.html</li>
<li>Start a simple HTTP server and go to <a href="http://localhost" rel="nofollow">http://localhost</a>:/testrunner.html</li>
<li>The test cases will run for the demo example</li>
</ul>
<h2><a href="#author" aria-hidden="true" class="anchor" id="user-content-author"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Author</h2>
<p>Arpit Narechania
<a href="mailto:[email protected]">[email protected]</a></p>
<hr>
<h2><a href="#new-feature-of-organic-compounds-added-on-jan-2018" aria-hidden="true" class="anchor" id="user-content-new-feature-of-organic-compounds-added-on-jan-2018"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>New Feature of Organic Compounds (added on Jan-2018)</h2>
<ul>
<li>The new module IUPACname.js adds functionality of searching organic compounds using IUPAC names.</li>
<li>This library allows you to add the side groups including methyl, ethyl and propyl on the main chain.</li>
<li>Note that the library doesn't cover all names for organic compounds.</li>
</ul>
<h2><a href="#types-of-organic-compounds" aria-hidden="true" class="anchor" id="user-content-types-of-organic-compounds"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Types of organic compounds:</h2>
<table>
<thead>
<tr>
<th>Organic Compounds</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Alkanes</code></td>
</tr>
<tr>
<td><code>Alkenes</code></td>
</tr>
<tr>
<td><code>Alkynes</code></td>
</tr>
<tr>
<td><code>Alkyl halides</code></td>
</tr>
<tr>
<td><code>Alcohols</code></td>
</tr>
<tr>
<td><code>Ethers</code></td>
</tr>
<tr>
<td><code>Aldehydes</code></td>
</tr>
<tr>
<td><code>Ketones</code></td>
</tr>
<tr>
<td><code>Carboxylic Acids</code></td>
</tr>
<tr>
<td><code>Esters</code></td>
</tr>
<tr>
<td><code>Amines</code></td>
</tr>
<tr>
<td><code>Amides</code></td>
</tr></tbody></table>
<h2><a href="#limitations-for-iupac-name-search" aria-hidden="true" class="anchor" id="user-content-limitations-for-iupac-name-search"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Limitations for IUPAC name search:</h2>
<ul>
<li>The maximum number of carbon is 12.</li>
<li>The double bond, triple bond, -OH, -C=O- are at the end of the main chain.</li>
<li>The amide is always primary amide.</li>
<li>More diverse functionality will be updated.</li>
</ul>
<h2><a href="#examples-for-using-organic-compounds" aria-hidden="true" class="anchor" id="user-content-examples-for-using-organic-compounds"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Examples for using organic compounds</h2>
<table>
<thead>
<tr>
<th>Organic Compounds</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Alkanes</code></td>
<td><code>methane</code>, <code>2-methyl-4-ethyloctane</code></td>
</tr>
<tr>
<td><code>Alkenes</code></td>
<td><code>ethene,</code>2-methyl-4-ethyloctene</td>
</tr>
<tr>
<td><code>Alkynes</code></td>
<td><code>ethyne,</code>2-methyl-4-ethyloctyne</td>
</tr>
<tr>
<td><code>Alkyl halides</code></td>
<td><code>3-fluoro-4-ethyloctyne</code></td>
</tr>
<tr>
<td><code>Alcohols</code></td>
<td><code>ethanol</code></td>
</tr>
<tr>
<td><code>Ethers</code></td>
<td><code>ethyl methyl ether</code></td>
</tr>
<tr>
<td><code>Aldehydes</code></td>
<td><code>3-methylbutanal</code></td>
</tr>
<tr>
<td><code>Ketones</code></td>
<td><code>propanone</code></td>
</tr>
<tr>
<td><code>Carboxylic Acids</code></td>
<td><code>ethanoic acid</code></td>
</tr>
<tr>
<td><code>Esters</code></td>
<td><code>methyl propanoate</code></td>
</tr>
<tr>
<td><code>Amines</code></td>
<td><code>ethyl methyl amine</code></td>
</tr>
<tr>
<td><code>Amides</code></td>
<td><code>butamide</code></td>
</tr></tbody></table>
<h2><a href="#author-for-organic-compounds" aria-hidden="true" class="anchor" id="user-content-author-for-organic-compounds"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Author for Organic Compounds</h2>
<ul>
<li>Ying Wang <a href="mailto:[email protected]">[email protected]</a></li>
<li>Shivaram Sitaram <a href="mailto:[email protected]">[email protected]</a></li>
</ul>
<h2><a href="#license" aria-hidden="true" class="anchor" id="user-content-license"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>License</h2>
<p>MIT (<a href="https://opensource.org/licenses/MIT" rel="nofollow">https://opensource.org/licenses/MIT</a>.)</p>
</article>
</div>
</body>
</html>