Skip to content

Instantly share code, notes, and snippets.

View chemplexity's full-sized avatar

James Dillon chemplexity

  • Thermo Fisher Scientific
  • San Francisco, CA
View GitHub Profile
@chemplexity
chemplexity / d3.min.js
Last active November 30, 2017 17:19
molecules.js
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===bo||n[0]===_o?_o+n:n}function s(n){return(n+="")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[]
@chemplexity
chemplexity / index.html
Last active August 29, 2015 14:10
Trees in Providence, RI
<html>
<meta charset="utf-8">
<style>
body {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size:16pt;
position: relative;
}
@chemplexity
chemplexity / index.html
Last active August 29, 2015 14:10
Nitrogen Cycle
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
fill: none;
stroke: #666;
stroke-width: 2.8px;
}
@chemplexity
chemplexity / d3.v3.min.js
Last active August 29, 2015 14:09
Dynamic Molecules Generator
!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return ia+n in this}function c(n){return n=ia+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===oa&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===oa)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(n,
@chemplexity
chemplexity / index.html
Last active June 17, 2019 18:59
Metals in the Environment
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
stroke: #eee;
stroke-width: 2.0px;
}
.link {
@chemplexity
chemplexity / index.html
Last active August 29, 2015 14:09
Interactive Mass Spectrometer
<html>
<head>
<style>
body {
margin:10;
padding:10;
}
canvas {
@chemplexity
chemplexity / benzobfluoranthene.json
Last active August 29, 2015 14:09
Dynamic Molecules - Benzo[b]fluoranthene
{
"nodes": [
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
@chemplexity
chemplexity / cytosine.json
Last active August 29, 2015 14:08
Dynamic Molecules - Cytosine
{
"nodes": [
{"atom": "N", "size": 6, "color": "#0033CC"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "N", "size": 6, "color": "#0033CC"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "N", "size": 6, "color": "#0033CC"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "H", "size": 3, "color": "#E9E9E9"},
@chemplexity
chemplexity / alanine.json
Last active August 29, 2015 14:08
Dynamic Molecules - Alanine
{
"nodes": [
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "C", "size": 5, "color": "#272727"},
{"atom": "N", "size": 6, "color": "#0033CC"},
{"atom": "H", "size": 3, "color": "#E9E9E9"},
{"atom": "O", "size": 6, "color": "#FF1919"},
{"atom": "O", "size": 6, "color": "#FF1919"},
{"atom": "H", "size": 3, "color": "#E9E9E9"},