From: Nikolay K. <ni...@un...> - 2015-04-28 05:16:33
|
Hi Yannick On 4/27/15 7:35 PM, Yannick .Djoumbou wrote: > Hi Nick, > > Thanks for the quick reply. I will follow your advice. > I have followed the example that Nina provided on GitHub, which some > adjustments. I found that I could not apply transformations targeting > atoms in an aromatic ring, unless I aromatize the molecule. However, I > was told that AMBIT works with the kekule form. I ended up trying to > aromatize every single molecule (not matter whether it was an aromatic > or aliphatic one). This had the effect that I could apply > transformtion both on aliphatic and aromatic molecules. This is the > only way I found to go around this issue. I am not sure though if > kekulizing and aromatizing a molecule makes much sense. The aromaticity makes a lot of sense because especially for reaction transformations. When one applies SMIRKS reactions must know in detail what happens to the molecule, how it is handle within CDK package. Technically the SMIRKS transformations can work both for aromatic and kekulized structures but working with aromatic structures brings a lot of side effects and for each reaction one must chemically reason whether the obtained molecule is correct and eventually apply specific CDK based post processing of the reaction products. The side effects are due to the facts that the reacitons mainly change the bond orders and when the molecule is represented as aromatic form some bond orders may not be defined explicitly. That is way we recommend following approach: (1) Convert structure to Kekule form (aromaticity must be present detected before that) (2) Apply reaction (3) Detect aromaticity again (4) Eventually if one interested convert to aromatic form (KEKULE --> aromatic) We have a nice feature in the SMIRKS manager called FlagProcessResultStructures. By defaults it is false. I recommend you that you set it to true. It will configure the resulting molecules and detect aromaticity for the product. Then if interested step (4) may be done > > For every bond in the molecule, I appy this > > for (IBond bond : molecule.bonds()){ > if (bond.getFlag(CDKConstants.SINGLE_OR_DOUBLE)){ > bond.setFlag(CDKConstants.ISAROMATIC, true); > bond.getAtom(0).setFlag(CDKConstants.ISAROMATIC, true); > bond.getAtom(1).setFlag(CDKConstants.ISAROMATIC, true); > } > } > Then, I kekulize the molecule. I can apply transformations targeting > atoms in the aliphatic parts of the molecule only. But when I > aromatize, I can apply any transformation to the molecule (as long as > the targeted pattern is present). > When reaction is applied it is good that the molecule is in Kekule form but it has the aromatic flags set as well. Also bear in mind that: [C] is aliphatic cartbon, [c] is aromatic carbon and [#6] is any carbon. So this [#7:1][C:2]([H]) would be applied only for aliphatic carbon (or if the molecule is not configured well for C atom which do not have aromatic flags set) Nick > Regards, > > Yannick > > > > On Mon, Apr 27, 2015 at 6:17 AM, Nikolay Kochev <ni...@un... > <mailto:ni...@un...>> wrote: > > Hello Yannick > > > On 2015-04-27 00:55, Yannick .Djoumbou wrote: > > Hello Nina, > > Thanks a lot for the help. This is great stuff. I still have > an issue > because, I cannot generate aromatic transformation (e.g.: aromatic > hydroxylation) when the molecule is just kekulized. I have to > apply > the aromaticity.apply(molecule) if I am targeting aromatic atoms. > Moreover, in some cases, e.g.: N-dealkylation, one ends up > often with > more than one moiety. For example, applying: > - the smirks: [#7:1][C:2]([H])>>[#7:1][H].[C:2]=[O] > - to the molecule "OCCNC1=CC=CC=C1" > - using the function applyTransformationWithSingleCopyForEachPos > > will return the following AtomContainer: C=1(C=CC=CC1)N.C(CO)=O. > > > Yes that is exactly the expected result. You have two fragments > (molecules) within the result atom container. > > > These are actually two different molecles representing two > different > products. Is there a way to change this so that ambit returns each > moiety as an actual molecule? > > > If you need each molecule as a different IAtomContanier object you > can use a code like this > > > IAtomContainerSet ms = > ConnectivityChecker.partitionIntoMolecules(mol); > > where the mol is the result from the reaction. > > The you iterate ms (container/molecule set) > > > Best regards > Nick > > > > So far, one could go around by applying > > two smirks, each of which has one of the two products smarts: > [#7:1][C:2]([H])>>[#7:1][H] > [#7:1][C:2]([H])>>[C:2]=[O] > > > > > > However, if would be awesome if the resulting AtomContainerSet > from > applyTransformationWithSingleCopyForEachPos would actually contain > each moiety as a separate AtomContainer. > > Thanks a lot for the great assistance. > > Regards, > > Yannick > > On Sun, Apr 26, 2015 at 1:16 AM, Nina Jeliazkova > <jel...@gm... <mailto:jel...@gm...>> > wrote: > > Yannick, All, > > I've added a small Maven project demonstrating how to use > the SMIRKS > code and configure the dependencies. > > > https://github.com/ideaconsult/examples-ambit/tree/master/smirks-example > > [1] > > Best regards, > Nina > > > > > Links: > ------ > [1] > https://github.com/ideaconsult/examples-ambit/tree/master/smirks-example > > > |