dimethylether = cdk.fromSMILES( "COC" );You can see four of my favorite cheminformatics tools integrated: CDK is used to convert a SMILES into connection table with add explicit hydrogens, and to create initial 3D coordinates (with the code from Christian Hoppe, and thanx to Stefan for fixing that code in the CDK 1.1.x branch!). Then, CMLDOM is used to create and save a CML document, which is then opened into a Jmol editor in Bioclipse.
cdk.addExplicitHydrogens( dimethylether );
cdk.generate3dCoordinates( dimethylether );
// save as CML
cdk.saveCML( dimethylether, "/Virtual/dimethylether.cml" );
ui.open( "/Virtual/dimethylether.cml" ); // this should open a JmolEditor
jmol.minimize();
A variation of this script is visible in the following screenshot:
This and other Bioclipse2 scripts I will post in Gist, a sort of pastebin supporting version history, and I'll tag them with bioclipse gist on delicious, so that you can always browse them, comment on them, or add your own gists at http://delicious.com/tag/bioclipse+gist.
No comments:
Post a Comment