Skip to content

Instantly share code, notes, and snippets.

@rapodaca
Created March 10, 2016 02:33
Show Gist options
  • Save rapodaca/4070c58b466ce285a200 to your computer and use it in GitHub Desktop.
Save rapodaca/4070c58b466ce285a200 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<button onclick="onClick()">Click Me</button>
<script>
function onClick() {
console.log(InChI.fromMolfile(taxol));
}
</script>
<script>
var InChI = {
onRuntimeInitialized: function () {
InChI.fromMolfile = InChI.cwrap('get_inchi', 'string', ['string']);
console.log('ready');
},
memoryInitializerPrefixURL: '/js/'
};
var taxol = 'C47H51NO14\nAPtclcactv03091609172D 0 0.00000 0.00000\n \n113119 0 0 1 0 0 0 0 0999 V2000\n 5.1755 -3.0512 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 5.3274 -4.0817 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 6.0994 -2.6686 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 4.2517 -2.6686 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0\n 4.5059 -4.7222 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 6.4821 -1.7447 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0\n 3.4156 -3.2898 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0\n 4.2517 -0.8208 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 6.8804 -0.0398 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 8.0358 2.3403 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0\n 7.7770 3.3062 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0\n 9.4454 -4.0827 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.2208 -5.3075 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1526 -4.7898 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.9280 -6.0146 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.8938 -5.7557 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4500 3.7545 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.2253 4.9793 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1571 4.4616 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.9324 5.6864 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.8983 5.4276 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.3275 5.7557 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 4.8792 4.0827 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 4.3616 6.0146 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.9133 4.3415 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.6545 5.3074 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.3278 -2.2859 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.5571 -5.6590 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3971 0.2900 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.2102 -0.5232 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.6897 1.2088 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.0963 1.5593 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.7921 -1.2077 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0000 -3.2682 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 9.1622 1.4826 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3726 3.1267 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 8.4795 -4.3416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.4841 4.0134 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5863 4.7898 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.8690 -1.7447 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 7.9231 -4.5941 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 8.4796 -2.9274 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 4.7693 1.1111 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3628 1.8920 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 7.2593 5.2381 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9766 -4.9074 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5436 -4.3236 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.4821 -1.7447 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 2.4962 -2.8965 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 9.0017 2.0815 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 6.9327 -4.7322 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.7724 -3.6346 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.8034 0.8522 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.3287 1.6332 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.5522 4.5310 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3178 -3.9436 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 6.8065 -3.3757 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5446 -0.1137 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 7.5875 0.6673 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 5.1483 -5.5531 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 6.8111 3.5651 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 7.1552 -1.0030 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.8690 -1.7447 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9172 0.2350 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.0994 -0.8208 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.1755 -0.4381 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9608 -3.3765 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9785 -3.2766 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.9897 -5.3975 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3585 -5.3958 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.4645 -4.5248 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.3430 -2.6741 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5650 -1.7131 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.7550 -2.0486 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.0905 -2.8587 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.9243 -4.2934 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.4079 -4.9285 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.5297 -1.4971 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.7099 -0.7259 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.3726 -0.2127 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9825 -5.4262 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3243 -6.2336 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.1317 -5.8919 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.9959 0.1295 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.5575 0.8889 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.7982 0.4505 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.3707 -1.1220 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.8091 -0.3627 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.0498 0.0757 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.4806 -0.1954 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 9.6059 -3.4838 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.6220 -5.4681 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.2935 1.3498 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5487 1.8125 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.0860 1.0677 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 10.7515 -4.6293 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7676 -6.6134 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5347 1.9977 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.6579 1.9977 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.6579 1.1209 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 8.4742 2.7787 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 10.3323 -6.1941 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.3386 2.8678 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 9.6105 3.1557 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.6264 5.1397 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 10.7560 4.3012 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7719 6.2853 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 10.3367 5.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.7659 6.1941 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.0397 3.4838 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.2011 6.6134 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.4749 3.9031 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.0556 5.4679 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0 0\n 1 3 1 0 0 0 0\n 1 4 1 0 0 0 0\n 2 5 1 0 0 0 0\n 2 46 1 0 0 0 0\n 2 56 1 1 0 0 0\n 3 6 1 0 0 0 0\n 3 57 1 1 0 0 0\n 4 63 1 0 0 0 0\n 4 7 1 0 0 0 0\n 4 27 1 6 0 0 0\n 5 60 1 0 0 0 0\n 5 47 1 0 0 0 0\n 51 56 1 0 0 0 0\n 6 65 1 0 0 0 0\n 6 62 1 0 0 0 0\n 6 48 1 6 0 0 0\n 52 57 1 0 0 0 0\n 8 63 1 0 0 0 0\n 40 63 2 0 0 0 0\n 7 49 1 6 0 0 0\n 28 51 1 0 0 0 0\n 41 51 2 0 0 0 0\n 65 66 1 0 0 0 0\n 29 65 1 0 0 0 0\n 30 65 1 0 0 0 0\n 9 62 1 0 0 0 0\n 37 52 1 0 0 0 0\n 42 52 2 0 0 0 0\n 8 58 1 6 0 0 0\n 64 66 2 0 0 0 0\n 9 59 1 1 0 0 0\n 12 37 1 0 0 0 0\n 13 37 2 0 0 0 0\n 53 58 1 0 0 0 0\n 31 64 1 0 0 0 0\n 54 59 1 0 0 0 0\n 12 14 2 0 0 0 0\n 13 15 1 0 0 0 0\n 32 53 1 0 0 0 0\n 43 53 2 0 0 0 0\n 10 54 1 0 0 0 0\n 44 54 2 0 0 0 0\n 14 16 1 0 0 0 0\n 10 11 1 0 0 0 0\n 10 50 1 1 0 0 0\n 11 38 1 0 0 0 0\n 11 61 1 1 0 0 0\n 17 38 1 0 0 0 0\n 18 38 2 0 0 0 0\n 55 61 1 0 0 0 0\n 17 19 2 0 0 0 0\n 18 20 1 0 0 0 0\n 39 55 1 0 0 0 0\n 45 55 2 0 0 0 0\n 19 21 1 0 0 0 0\n 22 39 2 0 0 0 0\n 23 39 1 0 0 0 0\n 22 24 1 0 0 0 0\n 23 25 2 0 0 0 0\n 24 26 2 0 0 0 0\n 46 60 1 0 0 0 0\n 7 47 1 0 0 0 0\n 8 66 1 0 0 0 0\n 9 64 1 0 0 0 0\n 15 16 2 0 0 0 0\n 20 21 2 0 0 0 0\n 25 26 1 0 0 0 0\n 1 67 1 1 0 0 0\n 3 68 1 0 0 0 0\n 5 69 1 1 0 0 0\n 46 70 1 0 0 0 0\n 46 71 1 0 0 0 0\n 7 72 1 0 0 0 0\n 27 73 1 0 0 0 0\n 27 74 1 0 0 0 0\n 27 75 1 0 0 0 0\n 47 76 1 0 0 0 0\n 47 77 1 0 0 0 0\n 62 78 1 0 0 0 0\n 62 79 1 0 0 0 0\n 33 48 1 0 0 0 0\n 8 80 1 0 0 0 0\n 34 49 1 0 0 0 0\n 28 81 1 0 0 0 0\n 28 82 1 0 0 0 0\n 28 83 1 0 0 0 0\n 29 84 1 0 0 0 0\n 29 85 1 0 0 0 0\n 29 86 1 0 0 0 0\n 30 87 1 0 0 0 0\n 30 88 1 0 0 0 0\n 30 89 1 0 0 0 0\n 9 90 1 0 0 0 0\n 12 91 1 0 0 0 0\n 13 92 1 0 0 0 0\n 31 93 1 0 0 0 0\n 31 94 1 0 0 0 0\n 31 95 1 0 0 0 0\n 14 96 1 0 0 0 0\n 15 97 1 0 0 0 0\n 32 98 1 0 0 0 0\n 32 99 1 0 0 0 0\n 32100 1 0 0 0 0\n 10101 1 0 0 0 0\n 16102 1 0 0 0 0\n 11103 1 0 0 0 0\n 35 50 1 0 0 0 0\n 36 61 1 0 0 0 0\n 17104 1 0 0 0 0\n 18105 1 0 0 0 0\n 19106 1 0 0 0 0\n 20107 1 0 0 0 0\n 21108 1 0 0 0 0\n 22109 1 0 0 0 0\n 23110 1 0 0 0 0\n 24111 1 0 0 0 0\n 25112 1 0 0 0 0\n 26113 1 0 0 0 0\nM END'
</script>
<script src="js/inchi.js" async></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment