Dear all, I've been playing around with some image/file generation from CDK, starting with examples from Rajarshi's site.
Highlights: - There is an ExportFormat class to adjust the properties of the Renderer2DModel class via a name/value pair string. The names closely correspond to the methods of the Renderer2DModel class. Pairs are separated by ',' and delimited by ':' so they can easily be used in a Url. - You can highlight a portion of the molecule. - You can use ExportFormatHandler instances to register lots of different image types. Implemented are those from javax.imageio (jpeg, png, bmp, wbmp, gif) and org.freehep.vectorgrahics (emf, pdf, svg, swf, ps), and also structure file based export for Molfiles and Smiles (mol and smi). - There is a Servlet example that you can GET/POST to. Examples below. - LGPL'd Code is available as a maven based eclipse project: http://chemutils.florida.scripps.edu:8080/cdkexporter/cdkexporter.zip I hope you find this interesting. Best regards, ~Mark. Examples: A png image, with width and height specified http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&highlight=C 1=CC=CC=C1&export=format:png,width:350,height:350 A Molfile: http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&export=form at:mol An Extended MetaFile http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&highlight=C 1=CC=CC=C1&export=format:emf,width:350,height:350,BondWidth:2.5 A PubChem CID: http://chemutils.florida.scripps.edu:8080/cdkexporter?id=123456&type=cid A PubChem SID: http://chemutils.florida.scripps.edu:8080/cdkexporter?id=123456&type=sid ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

