Thanks for your message.

You are right, the 'AtomTypeAwareSaturationChecker' solves these cases.
I'll use it until the new kekulisation process will be ready

Thanks

Oscar

2014-04-26 20:36 GMT+02:00 John May <john...@ebi.ac.uk>:

> Hi Oscar,
>
> I have an improved kekulisation almost done that handles a lot more cases
> but it's not ready yet I’m afraid.
>
> AtomTypeAwareSaturationChecker is probably your best bet but there are
> known issues with it.
>
> I thought it might be possible to go via SMILES and use the atom typer to
> add hydrogens. Unfortunately this doesn’t work as the atom type doesn’t
> seem to be defined and a hydrogen is added when it should not be.
>
> [nH+]1(ccccc1)[O-]
>
>
> when it should be
>
> [n+]1(ccccc1)[O-]
>
>
> J
>
> On 26 Apr 2014, at 11:03, Oscar Mora <oscarmorape...@gmail.com> wrote:
>
> Hi!
>
> I am experiencing a problem trying to kekulise a set of molecules with
> aromatic rings and atoms with formal charge defined.
>
> I use CDK 1.5.5 to read and process a set molecules (SDF/Mol). I would
> like to kekulise all the aromatic rings in order to transform those bonds
> which are specified (mis)using bond order = 4 to an alternate set of bonds
> with order 1 and 2. In order to do this I use the tool 'FixBondOrdersTool'.
>
> I use the same piece of code specified in
> http://blueobelisk.shapado.com/questions/detect-aromatic-rings-using-bond-order-4-in-a-sdf-file-with-cdk#answer52299d9597cfef16df00952f
>
>         String input = "C:\\Users\\Oscar\\Desktop\\problem.sdf";
>
>         String output = "C:\\Users\\Oscar\\Desktop\\problem2.sdf";
>
>         IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
>
>         IteratingSDFReader sdfr = new IteratingSDFReader(new
> FileReader(input),
>                 builder);
>
>         SDFWriter sdfw = new SDFWriter(new FileWriter(output));
>
>         FixBondOrdersTool fbot = new FixBondOrdersTool();
>
>         while (sdfr.hasNext()) {
>             IAtomContainer container = sdfr.next();
>
>             AtomContainerManipulator
>                     .percieveAtomTypesAndConfigureAtoms(container);
>
>             container = fbot.kekuliseAromaticRings(container);
>             sdfw.write(container);
>         }
>
>         sdfr.close();
>
>         sdfw.close();
>
>
> It works fine in most cases. But I have found that when one of the atoms
> of the ring has a formal charge specified in the input SDF/Mol, the
> transformation is not performed correctly. Example:
>
> Input molecule:
>
>   7  7  0  0  0  0            999 V2000
>    -0.2947    3.3589    0.0000 N   0  3  0  0  0  0  0  0  0  0  0  0
>     0.4198    2.9464    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>     0.4198    2.1214    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -0.2947    1.7089    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -1.0091    2.1214    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -1.0091    2.9464    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -0.2947    4.1839    0.0000 O   0  5  0  0  0  0  0  0  0  0  0  0
>   1  2  4  0  0  0  0
>   1  6  4  0  0  0  0
>   2  3  4  0  0  0  0
>   3  4  4  0  0  0  0
>   4  5  4  0  0  0  0
>   5  6  4  0  0  0  0
>   1  7  1  0  0  0  0
> M  CHG  2   1   1   7  -1
> M  END
> $$$$
>
> Processed molecule (using FixBondOrdersTool):
>
>
>   CDK     0426141124
>
>   7  7  0  0  0  0  0  0  0  0999 V2000
>    -0.2947    3.3589    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
>     0.4198    2.9464    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>     0.4198    2.1214    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -0.2947    1.7089    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -1.0091    2.1214    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -1.0091    2.9464    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
>    -0.2947    4.1839    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
>   1  2  0  0  0  0  0
>   1  6  0  0  0  0  0
>   2  3  0  0  0  0  0
>   3  4  0  0  0  0  0
>   4  5  0  0  0  0  0
>   5  6  0  0  0  0  0
>   1  7  1  0  0  0  0
> M  CHG  1   1   1
> M  CHG  1   7  -1
> M  END
> > <cdk:Title>
> null
>
> > <cdk:Remark>
> null
>
> $$$$
>
> As you can see the bond type of the bonds which belong to the ring are
> specified with bond order = 0.
>
> Am I doing something wrong ? How could I manage these cases in order to
> obtain a kekulised structure ?
>
> I have attached both SDF files.
>
> Thanks in advance
>
> Oscar
>
> <INPUT.sdf><PROCESSED.sdf>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>
> http://p.sf.net/sfu/ExoPlatform_______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to