From: Christoph S. <c.s...@un...> - 2004-11-01 07:55:54
|
Rajarshi Guha wrote: > On Thu, 2004-10-28 at 10:18, Rajarshi Guha wrote: >=20 >=20 >>2) When I supply a HIN file containing aromatic rings, the resultant 2D >>diagram shows the rings with just single bonds. I'm generating the 2D >>coords for the HIN file using StructureDiagramGenerator - could this >>cause the resultant Molecule object to lack aromatic bonds? Or is this >>something to do with the renderer? >=20 >=20 > I've been investigating this and the StructureDiagramGenerator also > fails to correctly draw a benzene ring which I specify as >=20 > c[0] =3D new Molecule(); > c[0].addAtom(new Atom("C")); > c[0].addAtom(new Atom("C")); > c[0].addAtom(new Atom("C")); > c[0].addAtom(new Atom("C")); > c[0].addAtom(new Atom("C")); > c[0].addAtom(new Atom("C")); > c[0].addBond(0,1,1.5); > c[0].addBond(1,2,1.5); > c[0].addBond(2,3,1.5); > c[0].addBond(3,4,1.5); > c[0].addBond(4,5,1.5); > c[0].addBond(5,0,1.5); >=20 > I call the structure diagram generator as: >=20 > StructureDiagramGenerator sdg =3D new StructureDiagramGenerator(); > sdg.setMolecule((Molecule)c[0]); > sdg.generateCoordinates(); >=20 > And then look at the bond orders of the bonds: >=20 > Molecule m =3D sdg.getMolecule(); > for (int k =3D 0; k < m.getBondCount(); k++) { > System.out.println(k+" "+m.getBondAt(k).getOrder()); > } >=20 > And I get 1.5 for all of them. So why does the renderer not display > them? Because the concept of representing aromaticity with bond order 1.5 has=20 more ore less been dropped. Or, I should say, never been properly supported. The renderer should, however, obey the aromaticity flag. (atom.setFlag(CDKConstants.ISAROMATIC, true)). I'm not quite sure though, if we loos anything by also supporting the=20 1.5 bond order value. Cheers, Chris --=20 Dr. habil. Christoph Steinbeck (c.s...@un...) Head of the Junior Research Group for Applied Bioinformatics Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Z=FClpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7426 Fax: +49 (0) 221-470-7786 What is man but that lofty spirit - that sense of enterprise. ... Kirk, "I, Mudd," stardate 4513.3.. |