link to slides: http://slides.com/mbrgr/icce2014
// ChemDoodle Web Components 6.0.1
var ChemDoodle = function {
var ChemDoodle = {};
//make cool stuff!!!
return ChemDoodle;
}
var transform = new ChemDoodle.TransformCanvas('transformer', 350, 350, true);
ChemDoodle.io.file.content('assets/af.mol', function(fileContent){
transform.loadMolecule(ChemDoodle.readMOL(fileContent));
});
"Visualizations help make complex information cognitively tractable."
Uttal, D. H., and K. O. Doherty. 2008. "Visualization: Theory and practice in science education"
CWC installation
<script src="http://hub.chemdoodle.com/cwc/latest/ChemDoodleWeb.js">
</script>
See also: WordPress install tutorial
<script>
//1. Instantiate component
var viewer = new ChemDoodle.ViewerCanvas( 'viewer', 100, 100 );
//2. Optional: Set visual specifications (if different from defaults)
viewer.specs.backgroundColor = 'blue';
//3. Read and load data into the component
var methaneMolFile = 'Molecule Name\n CHEMDOOD07051400583D 0 0.00000 0.00000 0\n[Insert Comment Here]\n 1 0 0 0 0 0 0 0 0 0 1 V2000\n 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\nM END';
var molecule = ChemDoodle.readMOL( methaneMolFile );
viewer.loadMolecule( molecule );
//Component is generated!
</script>