Hi, As far as I understand, the molecule 'c1ccccc1' has 6 aromatic bonds, while 'C1=CC=CC=C1' has three double bonds, and three single bonds. I know that they are the same in some sense, but as far as the CDK is concerned, they are different.
That said, both will be drawn with a circle in the center if the renderer model has setShowAromaticity=true. I don't think there is a way to show aromatic circles AND the double bonds in aromatic systems... gilleain On Tue, May 26, 2009 at 3:53 PM, sebi <[email protected]> wrote: > Hi > > Again, I have a question regarding the new renderer. > > Is it possible to draw an aromatic ring from a smiles like "c1ccccc1" > with double bonds in Kekule style? I can't get it to work, only when I > explicit say "C1=CC=CC=C1". > I use the SmilesParser to build the molecule and pass it to the > renderer, code as in the earlier mail. > When I use HueckelAromaticityDetector, it says true on both formula. > > Greetings > Sebastian > > On Sam, 2009-05-23 at 12:32 +0200, sebi wrote: >> Hi >> >> 1) It's not really important. But people (end-users) are used to a >> convention how molecules are drawn. Just noticed that the old code was >> 'ugly' too, compared to what PubChem does. Anyway.. >> >> 2) Your code works fine. I didn't see that method. I think I need some >> coffee :) >> >> Thanks for the fast answer. >> >> Sebastian >> >> >> On Sam, 2009-05-23 at 11:05 +0100, gilleain torrance wrote: >> > Hi, >> > >> > 1) Yes, that's something that does have to be fixed - things like >> > sterols and cyclopentane will look odd upside-down. >> > 2) I hadn't thought of users accidentally using the Visitor >> > setRendererModel method; that won't work. What happens in the code you >> > post is that the renderer over-writes the model you are setting in the >> > visitor, and your settings are lost. Better to do: >> > >> > model = renderer.getRenderer2DModel >> > model.setAtomColorer Color::CPKAtomColors.new >> > ... >> > >> > that way, you only use the model that the renderer has. >> > >> > gilleain >> > >> > On Sat, May 23, 2009 at 10:40 AM, sebi <[email protected]> wrote: >> > > Hi >> > > >> > > I switched to the jchempaint-primary branch and it works well now. But I >> > > have two questions. >> > > >> > > 1) The pictures are flipped vertical compared to the old code and I >> > > couldn't find a method to flip it back. Not so important, just >> > > wondering. >> > > >> > > 2) I tried to make settings to the RendererModel, but without result. >> > > I'd like to change the bond width and more important, I'd like to use >> > > the CPKAtomColors. Not sure if I'm doing right, so here's my code. (It's >> > > Ruby with Java classes) >> > > >> > > ------------------------------------------------------------------- >> > > def self.draw( molecule, width, height ) >> > > # prepare molecule >> > > sdg = Layout::StructureDiagramGenerator.new >> > > sdg.setMolecule molecule >> > > sdg.generateCoordinates >> > > mol = sdg.getMolecule >> > > >> > > # prepare image >> > > area = Java::Awt::Rectangle.new width, height >> > > img = Java::Awt::Image::BufferedImage.new width, height, >> > > Java::Awt::Image::BufferedImage.TYPE_INT_RGB >> > > g2d = img.createGraphics >> > > g2d.setColor Java::Awt::Color.WHITE >> > > g2d.fillRect 0, 0, width, height >> > > >> > > # prepare renderer >> > > generators = Java::Util::ArrayList.new >> > > generators.add Generators::BasicBondGenerator.new >> > > generators.add Generators::BasicAtomGenerator.new >> > > font = Font::AWTFontManager.new >> > > renderer = Renderer.new generators, font >> > > visitor = Visitor::AWTDrawVisitor.new g2d >> > > >> > > # the lines below have no effect ??? >> > > model = RendererModel.new >> > > model.setAtomColorer Color::CPKAtomColors.new >> > > model.setForeColor Java::Awt::Color.GREEN >> > > visitor.setRendererModel model >> > > >> > > # paint >> > > renderer.paintMolecule mol, visitor, area, true >> > > img >> > > end >> > > ------------------------------------------------------------- >> > > >> > > On Sam, 2009-05-23 at 09:33 +0200, Egon Willighagen wrote: >> > >> Yes, I removed it, and the rendering code should have had to be >> > >> removed from 1.2.0 already, but I forgot this. Release 1.2.3 'Don't >> > >> use this Renderer' release will be made asap, but was slightly delayed >> > >> by panic in the Bioclipse camp. >> > >> >> > >> Egon >> > >> >> > > >> > > A note somewhere would have been useful, >> > > but you guys are nice and quick with answers :) >> > > >> > > Sebastian >> > > >> > > >> > > ------------------------------------------------------------------------------ >> > > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >> > > is a gathering of tech-side developers & brand creativity professionals. >> > > Meet >> > > the minds behind Google Creative Lab, Visual Complexity, Processing, & >> > > iPhoneDevCamp asthey present alongside digital heavyweights like >> > > Barbarian >> > > Group, R/GA, & Big Spaceship. http://www.creativitycat.com >> > > _______________________________________________ >> > > Cdk-user mailing list >> > > [email protected] >> > > https://lists.sourceforge.net/lists/listinfo/cdk-user >> > > >> > >> > ------------------------------------------------------------------------------ >> > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >> > is a gathering of tech-side developers & brand creativity professionals. >> > Meet >> > the minds behind Google Creative Lab, Visual Complexity, Processing, & >> > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian >> > Group, R/GA, & Big Spaceship. http://www.creativitycat.com >> > _______________________________________________ >> > Cdk-user mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/cdk-user >> >> >> ------------------------------------------------------------------------------ >> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >> is a gathering of tech-side developers & brand creativity professionals. Meet >> the minds behind Google Creative Lab, Visual Complexity, Processing, & >> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian >> Group, R/GA, & Big Spaceship. http://www.creativitycat.com >> _______________________________________________ >> Cdk-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/cdk-user > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://www.creativitycat.com > _______________________________________________ > Cdk-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cdk-user > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

