You can subscribe to this list here.
| 2014 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2015 |
Jan
(4) |
Feb
|
Mar
|
Apr
(34) |
May
(4) |
Jun
(1) |
Jul
(3) |
Aug
(9) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2016 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
(1) |
22
(4) |
23
(8) |
24
(4) |
25
(1) |
|
26
(5) |
27
(3) |
28
(3) |
29
(4) |
30
(1) |
|
|
|
From: Nikolay K. <ni...@un...> - 2015-04-30 10:11:30
|
Hi Yannick On 2015-04-29 22:52, Yannick .Djoumbou wrote: > The SMIRKS Reaction I used was [C;X4:1][H:2]>>[C;X4:1][O][H:2] > > Regards, > > Yannick > > On Wed, Apr 29, 2015 at 1:51 PM, Yannick .Djoumbou > <y.d...@gm...> wrote: > >> Hi Nick, >> >> Thanks for the reply. So, there is no method to directly applying a >> transform at one atom A1. If the smirks contains only one atom within the reactants part, then the reaction is applied only for one atom e.g. [C:1]>>[C:1]=O >> Let's assume the left part of the smirks >> is matched at more than one region R1 and R2 of the molecule. Smarts >> matching could tell me ther are two matches: [A1,A2,A3], and [A4, >> A5, A6]. If I only want the result at for the first match, I should >> be able to submit the list [A1,A2,A3]. If you would like to apply the reaction only for a particular group of atoms you can use applyTransformation(IAtomContainer target, IAcceptable selection, SMIRKSReaction reaction) You have in this function additional input parameter 'selection' which is an implementation of the interface IAcceptable which defines the selected atoms. You have to provide such an implementation of IAcceptable. >> Is there a way to apply >> verify the other elements such as topology, etc... and generate the >> product based on transforming the molecule at the site [A1,A2,A3]. >> The topology check and all other checks are done by the SMIRKSManager internally: It performs substructure searching and finds all corrects locations (mappings) which correspond to the target SMIRKS string then you have various strategies concerning these found locations e.g. handling of overlapping, selected locations as mentioned above etc. If you want to directly tell at which location to apply reaction via calling applyTransformAtLocation(IAtomContainer target, List<IAtom> rMap, SMIRKSReaction reaction), then the rMap must be correct and you have to do it youself outside SMIRKSManager. But generally it is not needed since all this is done by the SMIRKSManager. Best regards Nick >> Regards, >> >> Yannick >> >> On Wed, Apr 29, 2015 at 12:09 AM, Nikolay Kochev >> <ni...@un...> wrote: >> >> Hi Yannick >> >> On 4/28/15 10:01 PM, Yannick .Djoumbou wrote: >> >> Hi all, >> >> I am using the function applyTransformAtLocation to transform >> molecules at a specific location. >> >> IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1); >> Vector<IAtom> va = new Vector<IAtom>(); >> va.add(ac.getAtom(1)); >> System.out.println(va); >> smrkMan.applyTransformAtLocation(ac,va,reaction); >> >> Typically function applyTransformAtLocation() is not expected to be >> called directly. Mainly it is used internally by SMIRKSManager. >> >> In order to use it correctly you must sent to it exact information >> for the atoms which are to be transformed. Internally this is done >> by the SMARTS mapping which defines all locations correctly. >> >> Particular location is defined not by one atom, but by all "mapped" >> atoms from the SMARTS searching. >> All reactant atoms and their topology (the left part of the smirks) >> must be represented correctly within the location description >> >> In the case above, your location (Vector<IAtom> va) is described by >> only one atom and I suppose that the smirks contains more atoms so >> that is the error: Array index out of range: 1. >> But even the atom count is made ok, then the topology, atoms types >> etc may be done not ok. That is why you have no reason to use this >> function directly except you know what are you doing. >> >> I hope this helps >> >> Best regards >> Nick >> >> This results in an error: >> >> [Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, >> MBO:SINGLE, BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, >> Element(1002243760, S:C, AN:6))))] >> >> Exception in thread "main" >> java.lang.ArrayIndexOutOfBoundsException: Array index out of range: >> 1 >> at java.util.Vector.get(Vector.java:744) >> at >> > ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596) >> >> Regards, >> >> Yannick |
|
From: Yannick .D. <y.d...@gm...> - 2015-04-29 19:52:42
|
The SMIRKS Reaction I used was [C;X4:1][H:2]>>[C;X4:1][O][H:2] Regards, Yannick On Wed, Apr 29, 2015 at 1:51 PM, Yannick .Djoumbou <y.d...@gm...> wrote: > Hi Nick, > > Thanks for the reply. So, there is no method to directly applying a > transform at one atom A1. Let's assume the left part of the smirks is > matched at more than one region R1 and R2 of the molecule. Smarts matching > could tell me ther are two matches: [A1,A2,A3], and [A4, A5, A6]. If I > only want the result at for the first match, I should be able to submit the > list [A1,A2,A3]. Is there a way to apply verify the other elements such as > topology, etc... and generate the product based on transforming the > molecule at the site [A1,A2,A3]. > > Regards, > > Yannick > > > On Wed, Apr 29, 2015 at 12:09 AM, Nikolay Kochev <ni...@un...> > wrote: > >> Hi Yannick >> >> >> >> On 4/28/15 10:01 PM, Yannick .Djoumbou wrote: >> >> Hi all, >> >> I am using the function applyTransformAtLocation to transform molecules >> at a specific location. >> >> IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1); >> Vector<IAtom> va = new Vector<IAtom>(); >> va.add(ac.getAtom(1)); >> System.out.println(va); >> smrkMan.applyTransformAtLocation(ac,va,reaction); >> >> >> Typically function applyTransformAtLocation() is not expected to be >> called directly. Mainly it is used internally by SMIRKSManager. >> >> In order to use it correctly you must sent to it exact information for >> the atoms which are to be transformed. Internally this is done by the >> SMARTS mapping which defines all locations correctly. >> >> Particular location is defined not by one atom, but by all "mapped" atoms >> from the SMARTS searching. >> All reactant atoms and their topology (the left part of the smirks) must >> be represented correctly within the location description >> >> In the case above, your location (Vector<IAtom> va) is described by only >> one atom and I suppose that the smirks contains more atoms so that is the >> error: Array index out of range: 1. >> But even the atom count is made ok, then the topology, atoms types etc >> may be done not ok. That is why you have no reason to use this function >> directly except you know what are you doing. >> >> I hope this helps >> >> Best regards >> Nick >> >> >> >> >> >> This results in an error: >> >> [Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, MBO:SINGLE, >> BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, Element(1002243760, >> S:C, AN:6))))] >> >> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: >> Array index out of range: 1 >> at java.util.Vector.get(Vector.java:744) >> at >> ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596) >> >> >> >> Regards, >> >> Yannick >> >> >> > |
|
From: Yannick .D. <y.d...@gm...> - 2015-04-29 19:51:08
|
Hi Nick, Thanks for the reply. So, there is no method to directly applying a transform at one atom A1. Let's assume the left part of the smirks is matched at more than one region R1 and R2 of the molecule. Smarts matching could tell me ther are two matches: [A1,A2,A3], and [A4, A5, A6]. If I only want the result at for the first match, I should be able to submit the list [A1,A2,A3]. Is there a way to apply verify the other elements such as topology, etc... and generate the product based on transforming the molecule at the site [A1,A2,A3]. Regards, Yannick On Wed, Apr 29, 2015 at 12:09 AM, Nikolay Kochev <ni...@un...> wrote: > Hi Yannick > > > > On 4/28/15 10:01 PM, Yannick .Djoumbou wrote: > > Hi all, > > I am using the function applyTransformAtLocation to transform molecules > at a specific location. > > IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1); > Vector<IAtom> va = new Vector<IAtom>(); > va.add(ac.getAtom(1)); > System.out.println(va); > smrkMan.applyTransformAtLocation(ac,va,reaction); > > > Typically function applyTransformAtLocation() is not expected to be > called directly. Mainly it is used internally by SMIRKSManager. > > In order to use it correctly you must sent to it exact information for the > atoms which are to be transformed. Internally this is done by the SMARTS > mapping which defines all locations correctly. > > Particular location is defined not by one atom, but by all "mapped" atoms > from the SMARTS searching. > All reactant atoms and their topology (the left part of the smirks) must > be represented correctly within the location description > > In the case above, your location (Vector<IAtom> va) is described by only > one atom and I suppose that the smirks contains more atoms so that is the > error: Array index out of range: 1. > But even the atom count is made ok, then the topology, atoms types etc may > be done not ok. That is why you have no reason to use this function > directly except you know what are you doing. > > I hope this helps > > Best regards > Nick > > > > > > This results in an error: > > [Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, MBO:SINGLE, > BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, Element(1002243760, > S:C, AN:6))))] > > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array > index out of range: 1 > at java.util.Vector.get(Vector.java:744) > at > ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596) > > > > Regards, > > Yannick > > > |
|
From: Nikolay K. <ni...@un...> - 2015-04-29 06:04:53
|
Hi Yannick On 4/28/15 10:01 PM, Yannick .Djoumbou wrote: > Hi all, > > I am using the function applyTransformAtLocation to transform > molecules at a specific location. > > IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1); > Vector<IAtom> va = new Vector<IAtom>(); > va.add(ac.getAtom(1)); > System.out.println(va); > smrkMan.applyTransformAtLocation(ac,va,reaction); > > Typically function applyTransformAtLocation() is not expected to be called directly. Mainly it is used internally by SMIRKSManager. In order to use it correctly you must sent to it exact information for the atoms which are to be transformed. Internally this is done by the SMARTS mapping which defines all locations correctly. Particular location is defined not by one atom, but by all "mapped" atoms from the SMARTS searching. All reactant atoms and their topology (the left part of the smirks) must be represented correctly within the location description In the case above, your location (Vector<IAtom> va) is described by only one atom and I suppose that the smirks contains more atoms so that is the error: Array index out of range: 1. But even the atom count is made ok, then the topology, atoms types etc may be done not ok. That is why you have no reason to use this function directly except you know what are you doing. I hope this helps Best regards Nick > > > > This results in an error: > > [Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, MBO:SINGLE, > BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, > Element(1002243760, S:C, AN:6))))] > > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: > Array index out of range: 1 > at java.util.Vector.get(Vector.java:744) > at > ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596) > > > > Regards, > > Yannick |
|
From: Nina J. <jel...@gm...> - 2015-04-29 03:58:00
|
Hi Yannick, Not an answer, but I think we've replaced Vector with List a while ago. Which ambit version do you get this error with? Also, in order to reproduce, please tell the reaction SMIRKS. Regards, Nina On 28 April 2015 at 22:01, Yannick .Djoumbou <y.d...@gm...> wrote: > Hi all, > > I am using the function applyTransformAtLocation to transform molecules at > a specific location. > > IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1); > Vector<IAtom> va = new Vector<IAtom>(); > va.add(ac.getAtom(1)); > System.out.println(va); > smrkMan.applyTransformAtLocation(ac,va,reaction); > > > > > > This results in an error: > > [Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, MBO:SINGLE, > BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, Element(1002243760, > S:C, AN:6))))] > > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array > index out of range: 1 > at java.util.Vector.get(Vector.java:744) > at > ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596) > > > > Regards, > > Yannick > |
|
From: Yannick .D. <y.d...@gm...> - 2015-04-28 19:01:51
|
Hi all,
I am using the function applyTransformAtLocation to transform molecules at
a specific location.
IAtomContainer ac = sp.parseSmiles(CC1CCC(CN)OC1);
Vector<IAtom> va = new Vector<IAtom>();
va.add(ac.getAtom(1));
System.out.println(va);
smrkMan.applyTransformAtLocation(ac,va,reaction);
This results in an error:
[Atom(1002243760, S:C, H:0, AtomType(1002243760, N:C.sp3, MBO:SINGLE,
BOS:4.0, FC:0, H:SP3, NC:4, EV:4, Isotope(1002243760, Element(1002243760,
S:C, AN:6))))]
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array
index out of range: 1
at java.util.Vector.get(Vector.java:744)
at
ambit2.smarts.SMIRKSManager.applyTransformAtLocation(SMIRKSManager.java:596)
Regards,
Yannick
|
|
From: Yannick .D. <y.d...@gm...> - 2015-04-28 18:58:05
|
Thanks Nick for the thorough explanation,
My comments below.
I will try to implement it, and then come back to you.
Regards,
Yannick
On Mon, Apr 27, 2015 at 11:20 PM, Nikolay Kochev <ni...@un...>
wrote:
> 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. If it is the case, then the
> function processProduct is called, which will clear aromaticity, since
> FlagClearAromaticityBeforeResultProcess is set to true by default. So, how
> would this work?
>
>
> 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...>
> 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...> 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
>>>
>>
>>
>
>
|
|
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
>
>
>
|
|
From: Yannick .D. <y.d...@gm...> - 2015-04-27 16:35:50
|
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.
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).
Regards,
Yannick
On Mon, Apr 27, 2015 at 6:17 AM, Nikolay Kochev <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...> 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
>>
>
>
|
|
From: Nikolay K. <ni...@un...> - 2015-04-27 12:34:23
|
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...> 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 |
|
From: Nina J. <jel...@gm...> - 2015-04-27 05:02:01
|
Hello Yannick, Nick is better qualified to answer these questions, leaving the floor to him. Regards, Nina On 27 April 2015 at 00:55, Yannick .Djoumbou <y.d...@gm...> 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. > > 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? 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...> 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 >> >> Best regards, >> Nina >> > > |
|
From: Yannick .D. <y.d...@gm...> - 2015-04-26 21:55:43
|
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.
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? 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...>
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
>
> Best regards,
> Nina
>
|
|
From: Nina J. <jel...@gm...> - 2015-04-26 07:16:50
|
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 Best regards, Nina |
|
From: Nina J. <jel...@gm...> - 2015-04-23 17:54:17
|
Thanks. One more inquiry - could you run mvn dependency:tree on your project with ambit 3.0.0 and tell which net.idea.modbcum-i version is required And possibly check if it is here http://ambit.uni-plovdiv.bg:8083/nexus/#nexus-search;gav~net.idea~modbcum-i~~~~kw,versionexpand Regards, Nina On 23 April 2015 at 20:42, Yannick .Djoumbou <y.d...@gm...> wrote: > Hi Nina, > > I got some help from John regarding kekulization and how to go around type > 4 bonds. I attached the class SmirksTest.java. Some included CDK classes > are not in this code though. > > I changed my code from the previous one, and I am adding implicit H > atoms., converting them to explicit ones, and I kekulize the molecule. > John suggested setting the flag of each bond to ISAROMATIC when its is set > to SINGLE_OR_DOUBLE, as well as seeting the flag for the 2 participant > atoms to ISAROMATIC. this is done before kekulaiation (from the > Kekulization class). > > Now, I get metabolites when the input structure is in aromatic (not > kekule) form (see MOL1, output_1, and mol1_metabolites). however, when I > submit the structure in kekule form (MOL2, output_2), I do not get any > metabolite. > > The SMIRKS I used is: [c:1][H:2]>>[c:1][OX2][H:2] (I also tried > [c;H1:1]>>[c:1][OX2H1]) > > Thank you for your help. > > Regards, > > > On Thu, Apr 23, 2015 at 11:07 AM, Nina Jeliazkova < > jel...@gm...> wrote: > >> Hi Yannick, >> >> On 23 April 2015 at 19:17, Yannick .Djoumbou <y.d...@gm...> >> wrote: >> >>> Hi Nina, >>> >>> You mentioned early that SMIRKS needs the structures to be kekulized. I >>> assumed that it means every bond of type 4 will be changed to type 1 or 2, >>> but still be labeled as aromatic. Am I right? >>> This means, I should not used the Aromatize function then. I should make >>> sure the structure is always kekulize. Therefore, I should use the >>> kekuliseAromaticRings() from FixBondOrdersTool, right? >>> >> >> No, FixBondOrdersTool is deprecated, don't use it. Use the new >> Kekulization class. John May may help with how to use it. >> >> >> http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/aromaticity/Kekulization.html >> >> >>> >>> Moreover, I have the following error when using ambit2 3.0.0. It >>> tdoesn't mattr whether I use CDK 1.5.6 (as I did before with ambit 2.5.6) >>> or 1.5.10. >>> >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> net/idea/modbcum/i/exceptions/AmbitException >>> at Metabolize.main(Metabolize.java:35) >>> Caused by: java.lang.ClassNotFoundException: >>> net.idea.modbcum.i.exceptions.AmbitException >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >>> ... 1 more >>> >>> Metabolize.java is the class where I call the main function that uses >>> the AMBIT and CDK modules. I did not have this error before moving to 3.0.0. >>> >> >> Can you give a piece of code we can test? It looks like a missing/ not >> loaded dependency. >> >> Regards, >> Nina >> >> >> >>> Please let me know. >>> >>> Regards, >>> >>> On Tue, Apr 21, 2015 at 10:54 PM, Yannick .Djoumbou < >>> y.d...@gm...> wrote: >>> >>>> Thanks for letting me know. >>>> Regards, >>>> >>>> Yannick >>>> >>>> On Tue, Apr 21, 2015 at 10:44 PM, Nina Jeliazkova < >>>> jel...@gm...> wrote: >>>> >>>>> Yannick, >>>>> >>>>> Just a warning, 3.0.0 is still being tested and not released yet, but >>>>> the SMIRKS package was tested by another group as well and appears to work >>>>> well. >>>>> >>>>> Best regards, >>>>> Nina >>>>> >>>>> >>>>> On 22 April 2015 at 07:38, Yannick .Djoumbou <y.d...@gm...> >>>>> wrote: >>>>> >>>>>> Thanks Nina, >>>>>> >>>>>> first of all, I am really happy that a new release of AMBIT was >>>>>> released and is working with CDK 1.5.10. I'll try that out and also use the >>>>>> aromaticity class. >>>>>> I a looking forward to reading Nick's reply. >>>>>> >>>>>> Regards, >>>>>> >>>>>> Yannick >>>>>> >>>>>> On Tue, Apr 21, 2015 at 10:32 PM, Nina Jeliazkova < >>>>>> jel...@gm...> wrote: >>>>>> >>>>>>> Yannick, >>>>>>> >>>>>>> Nick may reply later this week, but could you please try ambit >>>>>>> 3.0.0-SNAPSHOT (CDK 1.5.10) dependency >>>>>>> >>>>>>> >>>>>>> http://ambit.uni-plovdiv.bg:8083/nexus/#nexus-search;gav~ambit~~3.0.0-SNAPSHOT~~ >>>>>>> >>>>>>> The version you work with is quite outdated and there have been >>>>>>> number of improvements. >>>>>>> >>>>>>> Last but not least, the SMIRKS package expects Kekule structures. >>>>>>> You will NOT get same results if structures are not kekulized. Fortunately, >>>>>>> in CDK 1.5.10 the kekulization works quite well. >>>>>>> >>>>>>> In any case please do not use SMSD* package, it is already >>>>>>> deprecated in CDK as far as I know. Use the new Aromaticity class >>>>>>> >>>>>>> >>>>>>> http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/aromaticity/Aromaticity.html >>>>>>> >>>>>>> Best regards, >>>>>>> Nina >>>>>>> >>>>>>> >>>>>>> On 21 April 2015 at 21:07, Yannick .Djoumbou <y.d...@gm...> >>>>>>> wrote: >>>>>>> >>>>>>>> Hello guys, >>>>>>>> >>>>>>>> I am dealing with an issue here. I would like to apply a >>>>>>>> transformation on the attached molecules. Below is a function that I wrote >>>>>>>> to apply a transformation with single copy for each position (with >>>>>>>> smrkMan.applyTransformationWithSingleCopyForEachPos). Because CDK has >>>>>>>> issues dealing with bond type 4, I tried to transform the same molecule >>>>>>>> (aniline) using different bond types. >>>>>>>> In test1.sdf, the bond types in the benzene ring have type 1 and 2, >>>>>>>> alternatively. This, however produces 5 metabolites. In test2.sdf, >>>>>>>> the aromatic bonds of the molecule are of type 4. The transformation does >>>>>>>> not produce any product, which is wrong. >>>>>>>> >>>>>>>> Procedure: >>>>>>>> ---------- >>>>>>>> (1) I tested whether CDK viewed the input molecule as aromatic or >>>>>>>> not, by checking the bond types. For my own preference, I also >>>>>>>> added explicit hydrogen atoms in order to use my smirks pattern more >>>>>>>> efficiently. For test1, aniline is not first viewed as aromatic. >>>>>>>> Thus, I aromatized it using CDK's SMSDNormalizer.aromatizeMolecule. In >>>>>>>> test2, aniline is viewed as aromatic. Because the bonds in the benzene ring >>>>>>>> are of type 4, I decided to kekulize it, so that CDK with better >>>>>>>> deal with the molecule. Somehow, the resulting molecule still has bond type >>>>>>>> 4. The resulting molecules after these edits are stored in >>>>>>>> test1_after_aromatizing_and_adding_hydrogen.sdf and >>>>>>>> test2_after_kekulizing_and_adding_hydrogen.sdf. Somehow, the molecule in >>>>>>>> the later files does not have explicit hydrogen atoms attached to the >>>>>>>> benzene ring. >>>>>>>> >>>>>>>> (2) Following the first step, I ran >>>>>>>> smrkMan.applyTransformationWithSingleCopyForEachPos on the container >>>>>>>> obtained after the first step, where smrkMan is an instance of the SMRIKS >>>>>>>> Manager. As mentioned earlier, aniline in the first form (ring bonds with >>>>>>>> types 1 and 2) was transformed. the five products are in the file >>>>>>>> test1_metabolites.sdf. In the second file (ring bonds with type 4) >>>>>>>> is not transformed. >>>>>>>> I used the smirks: [c;H1:1]>>[c:1][OX2H1] and [c:1]>>[c:1][OX2H1] >>>>>>>> foe each molecule, which returned the same output. >>>>>>>> This procedure was implemented in the function transform_from_sdf >>>>>>>> below. >>>>>>>> >>>>>>>> >>>>>>>> Could you please help me here? How can I get the same results >>>>>>>> whether I submit my molecule in the kekule or the aromatic form? I have >>>>>>>> tried different things, but without success. by the way, I am using the >>>>>>>> AMBIT 2.6.0 and CDK version 1.5.6 versions. I really need help >>>>>>>> here. >>>>>>>> >>>>>>>> Thank you for your consideration. >>>>>>>> >>>>>>>> Best regards, >>>>>>>> >>>>>>>> Yannick >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> public LinkedHashMap<String, IAtomContainerSet> >>>>>>>> transform_from_sdf(File sdf_input, SMIRKSReaction reaction) throws >>>>>>>> Exception{ >>>>>>>> >>>>>>>> LinkedHashMap<String, IAtomContainerSet> sdf_metabolites = new >>>>>>>> LinkedHashMap<String, IAtomContainerSet>(); >>>>>>>> IteratingSDFReader reader = new IteratingSDFReader(new >>>>>>>> FileInputStream(sdf_input), DefaultChemObjectBuilder.getInstance()); >>>>>>>> SMIRKSManager smrkMan = new >>>>>>>> SMIRKSManager(SilentChemObjectBuilder.getInstance()); >>>>>>>> >>>>>>>> StringWriter writer=new StringWriter(); // >>>>>>>> http://www.programcreek.com/java-api-examples/index.php?api=org.openscience.cdk.AtomContainerSet >>>>>>>> >>>>>>>> StructureDiagramGenerator sdg = new >>>>>>>> StructureDiagramGenerator(); >>>>>>>> DeduceBondSystemTool dbst = new DeduceBondSystemTool(); >>>>>>>> FixBondOrdersTool kekulizer = new FixBondOrdersTool(); >>>>>>>> >>>>>>>> int i = 0; >>>>>>>> while (reader.hasNext()) { >>>>>>>> i = i+1; >>>>>>>> >>>>>>>> IAtomContainer molecule = (IAtomContainer)reader.next(); >>>>>>>> System.out.println("Query molecule: " + molecule); >>>>>>>> >>>>>>>> boolean aromatic_0 = false; >>>>>>>> for (IBond bond : molecule.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic_0 = true; break;} >>>>>>>> >>>>>>>> System.out.println("IS THE ORIGINAL MOLECULE AROMATIC?: " + >>>>>>>> aromatic_0); >>>>>>>> >>>>>>>> >>>>>>>> StringWriter w = new StringWriter(); >>>>>>>> MDLWriter mw = new MDLWriter(w); >>>>>>>> mw.write(molecule); >>>>>>>> System.out.println("ORIGINAL MOLECULE" + w.toString()); >>>>>>>> >>>>>>>> >>>>>>>> AtomContainerManipulator.convertImplicitToExplicitHydrogens(molecule); >>>>>>>> sdg.setMolecule(molecule); >>>>>>>> sdg.generateCoordinates(); >>>>>>>> IAtomContainer mol_with_hydrogen = sdg.getMolecule(); >>>>>>>> >>>>>>>> >>>>>>>> if(!aromatic_0){ >>>>>>>> SMSDNormalizer.aromatizeMolecule(mol_with_hydrogen); >>>>>>>> boolean aromatic = false; >>>>>>>> for (IBond bond : mol_with_hydrogen.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic = true; break;} >>>>>>>> System.out.println("HAS THE MOLECULE BEEN AROMATIZED?: >>>>>>>> " + aromatic); >>>>>>>> mw.write(mol_with_hydrogen); >>>>>>>> System.out.println("AROMATIZED MOLECULE WITH HYDROGEN >>>>>>>> EXPLICIT ATOMS" + w.toString()); >>>>>>>> >>>>>>>> } >>>>>>>> else{ >>>>>>>> >>>>>>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol_with_hydrogen); >>>>>>>> mol_with_hydrogen = >>>>>>>> kekulizer.kekuliseAromaticRings(mol_with_hydrogen); >>>>>>>> mw.write(mol_with_hydrogen); >>>>>>>> System.out.println(mol_with_hydrogen); >>>>>>>> System.out.println("AROMATIZED MOLECULE WITH HYDROGEN >>>>>>>> EXPLICIT ATOMS" + w.toString()); >>>>>>>> >>>>>>>> boolean aromatic_3 = false; >>>>>>>> for (IBond bond : mol_with_hydrogen.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic_3 = true; break;} >>>>>>>> System.out.println("IS AROMATIC AFTER HYDRO?? " + >>>>>>>> aromatic_3); >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> System.out.println(mol_with_hydrogen); >>>>>>>> SmilesGenerator sg = new SmilesGenerator(); >>>>>>>> System.out.println(sg.create(mol_with_hydrogen)); >>>>>>>> >>>>>>>> >>>>>>>> String name = (String) >>>>>>>> molecule.getProperty(CDKConstants.TITLE); >>>>>>>> IAtomContainerSet metabolites = >>>>>>>> generateAllMetabolitesFromAtomContainer(mol_with_hydrogen, reaction, >>>>>>>> smrkMan); >>>>>>>> System.out.println("METABOLITES" + metabolites); >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > |
|
From: Yannick .D. <y.d...@gm...> - 2015-04-23 17:44:09
|
Again, this is done with AMBIT 2 2.6 .0 and CDK 1.5.10. I get errors when using AMBIT2 3.0.0. Regards, On Thu, Apr 23, 2015 at 11:42 AM, Yannick .Djoumbou <y.d...@gm...> wrote: > Hi Nina, > > I got some help from John regarding kekulization and how to go around type > 4 bonds. I attached the class SmirksTest.java. Some included CDK classes > are not in this code though. > > I changed my code from the previous one, and I am adding implicit H > atoms., converting them to explicit ones, and I kekulize the molecule. > John suggested setting the flag of each bond to ISAROMATIC when its is set > to SINGLE_OR_DOUBLE, as well as seeting the flag for the 2 participant > atoms to ISAROMATIC. this is done before kekulaiation (from the > Kekulization class). > > Now, I get metabolites when the input structure is in aromatic (not > kekule) form (see MOL1, output_1, and mol1_metabolites). however, when I > submit the structure in kekule form (MOL2, output_2), I do not get any > metabolite. > > The SMIRKS I used is: [c:1][H:2]>>[c:1][OX2][H:2] (I also tried > [c;H1:1]>>[c:1][OX2H1]) > > Thank you for your help. > > Regards, > > > On Thu, Apr 23, 2015 at 11:07 AM, Nina Jeliazkova < > jel...@gm...> wrote: > >> Hi Yannick, >> >> On 23 April 2015 at 19:17, Yannick .Djoumbou <y.d...@gm...> >> wrote: >> >>> Hi Nina, >>> >>> You mentioned early that SMIRKS needs the structures to be kekulized. I >>> assumed that it means every bond of type 4 will be changed to type 1 or 2, >>> but still be labeled as aromatic. Am I right? >>> This means, I should not used the Aromatize function then. I should make >>> sure the structure is always kekulize. Therefore, I should use the >>> kekuliseAromaticRings() from FixBondOrdersTool, right? >>> >> >> No, FixBondOrdersTool is deprecated, don't use it. Use the new >> Kekulization class. John May may help with how to use it. >> >> >> http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/aromaticity/Kekulization.html >> >> >>> >>> Moreover, I have the following error when using ambit2 3.0.0. It >>> tdoesn't mattr whether I use CDK 1.5.6 (as I did before with ambit 2.5.6) >>> or 1.5.10. >>> >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> net/idea/modbcum/i/exceptions/AmbitException >>> at Metabolize.main(Metabolize.java:35) >>> Caused by: java.lang.ClassNotFoundException: >>> net.idea.modbcum.i.exceptions.AmbitException >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >>> ... 1 more >>> >>> Metabolize.java is the class where I call the main function that uses >>> the AMBIT and CDK modules. I did not have this error before moving to 3.0.0. >>> >> >> Can you give a piece of code we can test? It looks like a missing/ not >> loaded dependency. >> >> Regards, >> Nina >> >> >> >>> Please let me know. >>> >>> Regards, >>> >>> On Tue, Apr 21, 2015 at 10:54 PM, Yannick .Djoumbou < >>> y.d...@gm...> wrote: >>> >>>> Thanks for letting me know. >>>> Regards, >>>> >>>> Yannick >>>> >>>> On Tue, Apr 21, 2015 at 10:44 PM, Nina Jeliazkova < >>>> jel...@gm...> wrote: >>>> >>>>> Yannick, >>>>> >>>>> Just a warning, 3.0.0 is still being tested and not released yet, but >>>>> the SMIRKS package was tested by another group as well and appears to work >>>>> well. >>>>> >>>>> Best regards, >>>>> Nina >>>>> >>>>> >>>>> On 22 April 2015 at 07:38, Yannick .Djoumbou <y.d...@gm...> >>>>> wrote: >>>>> >>>>>> Thanks Nina, >>>>>> >>>>>> first of all, I am really happy that a new release of AMBIT was >>>>>> released and is working with CDK 1.5.10. I'll try that out and also use the >>>>>> aromaticity class. >>>>>> I a looking forward to reading Nick's reply. >>>>>> >>>>>> Regards, >>>>>> >>>>>> Yannick >>>>>> >>>>>> On Tue, Apr 21, 2015 at 10:32 PM, Nina Jeliazkova < >>>>>> jel...@gm...> wrote: >>>>>> >>>>>>> Yannick, >>>>>>> >>>>>>> Nick may reply later this week, but could you please try ambit >>>>>>> 3.0.0-SNAPSHOT (CDK 1.5.10) dependency >>>>>>> >>>>>>> >>>>>>> http://ambit.uni-plovdiv.bg:8083/nexus/#nexus-search;gav~ambit~~3.0.0-SNAPSHOT~~ >>>>>>> >>>>>>> The version you work with is quite outdated and there have been >>>>>>> number of improvements. >>>>>>> >>>>>>> Last but not least, the SMIRKS package expects Kekule structures. >>>>>>> You will NOT get same results if structures are not kekulized. Fortunately, >>>>>>> in CDK 1.5.10 the kekulization works quite well. >>>>>>> >>>>>>> In any case please do not use SMSD* package, it is already >>>>>>> deprecated in CDK as far as I know. Use the new Aromaticity class >>>>>>> >>>>>>> >>>>>>> http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/aromaticity/Aromaticity.html >>>>>>> >>>>>>> Best regards, >>>>>>> Nina >>>>>>> >>>>>>> >>>>>>> On 21 April 2015 at 21:07, Yannick .Djoumbou <y.d...@gm...> >>>>>>> wrote: >>>>>>> >>>>>>>> Hello guys, >>>>>>>> >>>>>>>> I am dealing with an issue here. I would like to apply a >>>>>>>> transformation on the attached molecules. Below is a function that I wrote >>>>>>>> to apply a transformation with single copy for each position (with >>>>>>>> smrkMan.applyTransformationWithSingleCopyForEachPos). Because CDK has >>>>>>>> issues dealing with bond type 4, I tried to transform the same molecule >>>>>>>> (aniline) using different bond types. >>>>>>>> In test1.sdf, the bond types in the benzene ring have type 1 and 2, >>>>>>>> alternatively. This, however produces 5 metabolites. In test2.sdf, >>>>>>>> the aromatic bonds of the molecule are of type 4. The transformation does >>>>>>>> not produce any product, which is wrong. >>>>>>>> >>>>>>>> Procedure: >>>>>>>> ---------- >>>>>>>> (1) I tested whether CDK viewed the input molecule as aromatic or >>>>>>>> not, by checking the bond types. For my own preference, I also >>>>>>>> added explicit hydrogen atoms in order to use my smirks pattern more >>>>>>>> efficiently. For test1, aniline is not first viewed as aromatic. >>>>>>>> Thus, I aromatized it using CDK's SMSDNormalizer.aromatizeMolecule. In >>>>>>>> test2, aniline is viewed as aromatic. Because the bonds in the benzene ring >>>>>>>> are of type 4, I decided to kekulize it, so that CDK with better >>>>>>>> deal with the molecule. Somehow, the resulting molecule still has bond type >>>>>>>> 4. The resulting molecules after these edits are stored in >>>>>>>> test1_after_aromatizing_and_adding_hydrogen.sdf and >>>>>>>> test2_after_kekulizing_and_adding_hydrogen.sdf. Somehow, the molecule in >>>>>>>> the later files does not have explicit hydrogen atoms attached to the >>>>>>>> benzene ring. >>>>>>>> >>>>>>>> (2) Following the first step, I ran >>>>>>>> smrkMan.applyTransformationWithSingleCopyForEachPos on the container >>>>>>>> obtained after the first step, where smrkMan is an instance of the SMRIKS >>>>>>>> Manager. As mentioned earlier, aniline in the first form (ring bonds with >>>>>>>> types 1 and 2) was transformed. the five products are in the file >>>>>>>> test1_metabolites.sdf. In the second file (ring bonds with type 4) >>>>>>>> is not transformed. >>>>>>>> I used the smirks: [c;H1:1]>>[c:1][OX2H1] and [c:1]>>[c:1][OX2H1] >>>>>>>> foe each molecule, which returned the same output. >>>>>>>> This procedure was implemented in the function transform_from_sdf >>>>>>>> below. >>>>>>>> >>>>>>>> >>>>>>>> Could you please help me here? How can I get the same results >>>>>>>> whether I submit my molecule in the kekule or the aromatic form? I have >>>>>>>> tried different things, but without success. by the way, I am using the >>>>>>>> AMBIT 2.6.0 and CDK version 1.5.6 versions. I really need help >>>>>>>> here. >>>>>>>> >>>>>>>> Thank you for your consideration. >>>>>>>> >>>>>>>> Best regards, >>>>>>>> >>>>>>>> Yannick >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> public LinkedHashMap<String, IAtomContainerSet> >>>>>>>> transform_from_sdf(File sdf_input, SMIRKSReaction reaction) throws >>>>>>>> Exception{ >>>>>>>> >>>>>>>> LinkedHashMap<String, IAtomContainerSet> sdf_metabolites = new >>>>>>>> LinkedHashMap<String, IAtomContainerSet>(); >>>>>>>> IteratingSDFReader reader = new IteratingSDFReader(new >>>>>>>> FileInputStream(sdf_input), DefaultChemObjectBuilder.getInstance()); >>>>>>>> SMIRKSManager smrkMan = new >>>>>>>> SMIRKSManager(SilentChemObjectBuilder.getInstance()); >>>>>>>> >>>>>>>> StringWriter writer=new StringWriter(); // >>>>>>>> http://www.programcreek.com/java-api-examples/index.php?api=org.openscience.cdk.AtomContainerSet >>>>>>>> >>>>>>>> StructureDiagramGenerator sdg = new >>>>>>>> StructureDiagramGenerator(); >>>>>>>> DeduceBondSystemTool dbst = new DeduceBondSystemTool(); >>>>>>>> FixBondOrdersTool kekulizer = new FixBondOrdersTool(); >>>>>>>> >>>>>>>> int i = 0; >>>>>>>> while (reader.hasNext()) { >>>>>>>> i = i+1; >>>>>>>> >>>>>>>> IAtomContainer molecule = (IAtomContainer)reader.next(); >>>>>>>> System.out.println("Query molecule: " + molecule); >>>>>>>> >>>>>>>> boolean aromatic_0 = false; >>>>>>>> for (IBond bond : molecule.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic_0 = true; break;} >>>>>>>> >>>>>>>> System.out.println("IS THE ORIGINAL MOLECULE AROMATIC?: " + >>>>>>>> aromatic_0); >>>>>>>> >>>>>>>> >>>>>>>> StringWriter w = new StringWriter(); >>>>>>>> MDLWriter mw = new MDLWriter(w); >>>>>>>> mw.write(molecule); >>>>>>>> System.out.println("ORIGINAL MOLECULE" + w.toString()); >>>>>>>> >>>>>>>> >>>>>>>> AtomContainerManipulator.convertImplicitToExplicitHydrogens(molecule); >>>>>>>> sdg.setMolecule(molecule); >>>>>>>> sdg.generateCoordinates(); >>>>>>>> IAtomContainer mol_with_hydrogen = sdg.getMolecule(); >>>>>>>> >>>>>>>> >>>>>>>> if(!aromatic_0){ >>>>>>>> SMSDNormalizer.aromatizeMolecule(mol_with_hydrogen); >>>>>>>> boolean aromatic = false; >>>>>>>> for (IBond bond : mol_with_hydrogen.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic = true; break;} >>>>>>>> System.out.println("HAS THE MOLECULE BEEN AROMATIZED?: >>>>>>>> " + aromatic); >>>>>>>> mw.write(mol_with_hydrogen); >>>>>>>> System.out.println("AROMATIZED MOLECULE WITH HYDROGEN >>>>>>>> EXPLICIT ATOMS" + w.toString()); >>>>>>>> >>>>>>>> } >>>>>>>> else{ >>>>>>>> >>>>>>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol_with_hydrogen); >>>>>>>> mol_with_hydrogen = >>>>>>>> kekulizer.kekuliseAromaticRings(mol_with_hydrogen); >>>>>>>> mw.write(mol_with_hydrogen); >>>>>>>> System.out.println(mol_with_hydrogen); >>>>>>>> System.out.println("AROMATIZED MOLECULE WITH HYDROGEN >>>>>>>> EXPLICIT ATOMS" + w.toString()); >>>>>>>> >>>>>>>> boolean aromatic_3 = false; >>>>>>>> for (IBond bond : mol_with_hydrogen.bonds()) if >>>>>>>> (bond.getFlag(CDKConstants.ISAROMATIC)) {aromatic_3 = true; break;} >>>>>>>> System.out.println("IS AROMATIC AFTER HYDRO?? " + >>>>>>>> aromatic_3); >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> System.out.println(mol_with_hydrogen); >>>>>>>> SmilesGenerator sg = new SmilesGenerator(); >>>>>>>> System.out.println(sg.create(mol_with_hydrogen)); >>>>>>>> >>>>>>>> >>>>>>>> String name = (String) >>>>>>>> molecule.getProperty(CDKConstants.TITLE); >>>>>>>> IAtomContainerSet metabolites = >>>>>>>> generateAllMetabolitesFromAtomContainer(mol_with_hydrogen, reaction, >>>>>>>> smrkMan); >>>>>>>> System.out.println("METABOLITES" + metabolites); >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > |