On 2012-10-08 19:11, Reinis Danne wrote: > On Mon, Oct 08, 2012 at 03:00:30PM +0200, David van der Spoel wrote: >> On 2012-10-08 14:45, David van der Spoel wrote: >>> On 2012-10-08 10:55, David van der Spoel wrote: >>>> Hi, >>>> >>> To answer my own question: I now installed trunk, the development >>> version. The gaussian files now work fine, but the fulvene.pdb file >>> still gives problems: > > Yes that is also what I observed in previous mail. Are you not > subscribed to the list? Yes I am. > >>> >>> % babel --version >>> No output file or format spec! >>> Open Babel 2.3.2 -- Oct 8 2012 -- 14:31:48 >>> >>> % babel -ipdb fulvene.pdb -oinchi ---errorlevel 2 >>> ============================== >>> *** Open Babel Information in NewPerceiveKekuleBonds >>> Kekulize: Huckel rule not satisfied for molecule fulvene.pdb >>> >>> ============================== >>> *** Open Babel Information in NewPerceiveKekuleBonds >>> Kekulize: Huckel rule not satisfied for molecule fulvene.pdb >>> Kekulize: Cannot get an even number of electron for molecule fulvene.pdb >>> >>> InChI=1S/C6H8/c1-6-4-2-3-5-6/h2-4H,5H2,1H3 >>> >>> It adds TWO H for InChi output, not for SDF output, but it only produces >>> two double bonds (out of three). I guess these are related? > > Yes, they are. It is bond order perception fail (together with > kekulization). More about it below. > >>> Thanks for reading, >>> >> Sorry for spamming but I have to correct this, the gaussian files >> produce the right inchi but not the correct bondorder! >> >> % wget http://folding.bmc.uu.se/fulvene-g4.log.gz >> % babel -ig09 fulvene-g4.log.gz -osdf fulvene.sdf >> % open fulvene.sdf (in Avogadro) >> Look at the bonds. > > Actually tetracene also is failing to properly set bond orders > in one of the cases. It looks like a kekulization algorithm > fails to find optimal solution or some rings are not found and > marked approprietly. > > As for the bond perception fail, the issue is that bond order > perception trigers kekulization which in turn relies on bond > orders to select some parameters. So it is a bit of chicken and > egg problem. > > I have a patch which tries to fix it by adding extra logic in > kekulization to make sure that it is working also in case when > bond perception has not finished, but it breaks canonstable test > in such a way that I have to ask if those tests were correct to > begin with. > > For example this one: > 4: ref = CCN(CCNc1ccc2c3c1c(=O)c1c(n3NN2)ccc(c1)[N+](=O)[O-])CC > 4: can = CCN(CCNc1ccc2c3c1c(=O)c1cc(ccc1n3[nH][nH]2)[N+](=O)[O-])CC > > First of all I'm not a SMILES expert, but I think there is a > confusion about which rings are aromatic. In contrast to what > reference SMILES suggest I think the 5member ring with 3 > nitrogens might be aromatic since in at least one resonance > structure it has 10 pi electrons (6 from Ns and 4 from Cs which > are part of pi system). Also the middle ringe has some resonance > structures where Huckels law (4n+2) holds and some where it > doesn't. So the quiestion is, which of these SMILES is correct > one or maybe both of them are wrong? Hm, not a smiles expert either, sorry. > > Also is fulvene aromatic? The cycle has 6 electrons if those > from adjasent double bond count. > > Below is the patch that seems to fix remaining original issues. > > Fulvene works with this patch, both pdb and gaussian. For Azulene and Tetracene pdb input work but not gaussian (double bonds in the wrong place).
Is the Gaussian parsing based on Z-matrix or coordinates? If it would be based on coordinates I don't see why pdb should work and gaussian not. If there is some other kind of tree algorithm based on the zmat that could explain the difference. Fulvene and Azulene are both resonant structures, but do not adhere to the (2n+2) rule, so not aromatic according to that definition. Cheers, -- David van der Spoel, Ph.D., Professor of Biology Dept. of Cell & Molec. Biol., Uppsala University. Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. sp...@xray.bmc.uu.se http://folding.bmc.uu.se ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss