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
|
22
|
23
|
|
24
(1) |
25
|
26
|
27
(3) |
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: Nikolay K. <ni...@un...> - 2015-05-27 13:32:47
|
Hi Yannick
I did some tests with your code and the same problem appears on ambit
version 2 as well.
Our code is a rapper of the CDK functionality and the exception is
throws from the CDK class so at this moment it is not clear to me what
is problem exactly.
Anyway, I would like to ask you: what is you task, what problem do you
want to solve with this code?
It may be possible to offer you an alternative solution based on ambit
functionality
Best regards
Nick
On 5/25/15 2:54 AM, Yannick .Djoumbou wrote:
> Hi all,
>
> I have tried to use the SmartsPatternCDK objects to return all
> occurences/hits of a SMARTS pattern in a molecule.I program in java
> and a sample of the code is below (with the ambit version 3.0.0 -
> SNAPSHOT). For some reason, I keep getting NullPointerException. I
> dhave use almost the same code with JRuby (with the ambit 2version
> .5.4) and did not get any error. Could you why I get errors here and
> how to fix it. I used a really simplistic approach and should not be
> getting this errors. Could you try this with the version 3.0.0 and see
> if you can reproduce the eror?
>
> -------
> Exception in thread "main" java.lang.NullPointerException
> at
> org.openscience.cdk.smiles.smarts.SMARTSQueryTool.getUniqueMatchingAtoms(SMARTSQueryTool.java:418)
> at
> ambit2.smarts.query.SmartsPatternCDK.getUniqueMatchingAtoms(SmartsPatternCDK.java:174)
>
> --------
>
>
> IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
> SmilesParser sp = new SmilesParser(builder);
>
> public List<List<Integer>> find_all_occurences(String
> smarts_string) throws SMARTSException{
> List<List<Integer>> matches = new ArrayList<List<Integer>>();
> SmartsPatternCDK smarts_pattern = new
> SmartsPatternCDK(smarts_string);
> matches = smarts_pattern.getUniqueMatchingAtoms();
>
> return matches;
> }
>
> try {
> IAtomContainer mol =
> sp.parseSmiles("[H]Oc1c([H])c([H])c([H])c([H])c1NC");
> try {
> List<List<Integer>> matches = find_all_occurences("[c;a][H]");
> System.out.println("matches\n"+matches);
> } catch (SMARTSException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
> } catch (InvalidSmilesException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
|
|
From: Nina J. <jel...@gm...> - 2015-05-27 11:20:49
|
And just noticed that you don't do any atom typing after parsing the
SMILES, this is most probably the reason for NPE. You have to do atom
typing at least, please refer to the related CDK 1.5.x guides.
Regards,
Nina
On 27 May 2015 at 14:18, Nina Jeliazkova <jel...@gm...> wrote:
> Hi Yannick,
>
> Haven't tested your code yet, but please have in mind as SmartsPatternCDK is
> a wratpper around CDK SMARTS matcher and the CDK SMARTS changed quite
> significantly in CDK 1.5.x , this class might not be in good shape yet.
>
> As you are already using Ambit SMARTS I would advice to
> use SmartsPatternAmbit instead.
>
> Best regards,
> Nina
>
> On 25 May 2015 at 02:54, Yannick .Djoumbou <y.d...@gm...> wrote:
>
>> Hi all,
>>
>> I have tried to use the SmartsPatternCDK objects to return all
>> occurences/hits of a SMARTS pattern in a molecule.I program in java and a
>> sample of the code is below (with the ambit version 3.0.0 - SNAPSHOT). For
>> some reason, I keep getting NullPointerException. I dhave use almost the
>> same code with JRuby (with the ambit 2version .5.4) and did not get any
>> error. Could you why I get errors here and how to fix it. I used a really
>> simplistic approach and should not be getting this errors. Could you try
>> this with the version 3.0.0 and see if you can reproduce the eror?
>>
>> -------
>> Exception in thread "main" java.lang.NullPointerException
>> at
>> org.openscience.cdk.smiles.smarts.SMARTSQueryTool.getUniqueMatchingAtoms(SMARTSQueryTool.java:418)
>> at
>> ambit2.smarts.query.SmartsPatternCDK.getUniqueMatchingAtoms(SmartsPatternCDK.java:174)
>>
>> --------
>>
>>
>> IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
>> SmilesParser sp = new SmilesParser(builder);
>>
>> public List<List<Integer>> find_all_occurences(String smarts_string)
>> throws SMARTSException{
>> List<List<Integer>> matches = new ArrayList<List<Integer>>();
>> SmartsPatternCDK smarts_pattern = new
>> SmartsPatternCDK(smarts_string);
>> matches = smarts_pattern.getUniqueMatchingAtoms();
>>
>> return matches;
>> }
>>
>> try {
>> IAtomContainer mol =
>> sp.parseSmiles("[H]Oc1c([H])c([H])c([H])c([H])c1NC");
>> try {
>> List<List<Integer>> matches = find_all_occurences("[c;a][H]");
>> System.out.println("matches\n"+matches);
>> } catch (SMARTSException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>>
>>
>> } catch (InvalidSmilesException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>>
>
>
|
|
From: Nina J. <jel...@gm...> - 2015-05-27 11:18:23
|
Hi Yannick,
Haven't tested your code yet, but please have in mind as SmartsPatternCDK is
a wratpper around CDK SMARTS matcher and the CDK SMARTS changed quite
significantly in CDK 1.5.x , this class might not be in good shape yet.
As you are already using Ambit SMARTS I would advice to
use SmartsPatternAmbit instead.
Best regards,
Nina
On 25 May 2015 at 02:54, Yannick .Djoumbou <y.d...@gm...> wrote:
> Hi all,
>
> I have tried to use the SmartsPatternCDK objects to return all
> occurences/hits of a SMARTS pattern in a molecule.I program in java and a
> sample of the code is below (with the ambit version 3.0.0 - SNAPSHOT). For
> some reason, I keep getting NullPointerException. I dhave use almost the
> same code with JRuby (with the ambit 2version .5.4) and did not get any
> error. Could you why I get errors here and how to fix it. I used a really
> simplistic approach and should not be getting this errors. Could you try
> this with the version 3.0.0 and see if you can reproduce the eror?
>
> -------
> Exception in thread "main" java.lang.NullPointerException
> at
> org.openscience.cdk.smiles.smarts.SMARTSQueryTool.getUniqueMatchingAtoms(SMARTSQueryTool.java:418)
> at
> ambit2.smarts.query.SmartsPatternCDK.getUniqueMatchingAtoms(SmartsPatternCDK.java:174)
>
> --------
>
>
> IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
> SmilesParser sp = new SmilesParser(builder);
>
> public List<List<Integer>> find_all_occurences(String smarts_string)
> throws SMARTSException{
> List<List<Integer>> matches = new ArrayList<List<Integer>>();
> SmartsPatternCDK smarts_pattern = new
> SmartsPatternCDK(smarts_string);
> matches = smarts_pattern.getUniqueMatchingAtoms();
>
> return matches;
> }
>
> try {
> IAtomContainer mol =
> sp.parseSmiles("[H]Oc1c([H])c([H])c([H])c([H])c1NC");
> try {
> List<List<Integer>> matches = find_all_occurences("[c;a][H]");
> System.out.println("matches\n"+matches);
> } catch (SMARTSException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
> } catch (InvalidSmilesException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
|
|
From: Yannick .D. <y.d...@gm...> - 2015-05-24 23:54:09
|
Hi all,
I have tried to use the SmartsPatternCDK objects to return all
occurences/hits of a SMARTS pattern in a molecule.I program in java and a
sample of the code is below (with the ambit version 3.0.0 - SNAPSHOT). For
some reason, I keep getting NullPointerException. I dhave use almost the
same code with JRuby (with the ambit 2version .5.4) and did not get any
error. Could you why I get errors here and how to fix it. I used a really
simplistic approach and should not be getting this errors. Could you try
this with the version 3.0.0 and see if you can reproduce the eror?
-------
Exception in thread "main" java.lang.NullPointerException
at
org.openscience.cdk.smiles.smarts.SMARTSQueryTool.getUniqueMatchingAtoms(SMARTSQueryTool.java:418)
at
ambit2.smarts.query.SmartsPatternCDK.getUniqueMatchingAtoms(SmartsPatternCDK.java:174)
--------
IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
SmilesParser sp = new SmilesParser(builder);
public List<List<Integer>> find_all_occurences(String smarts_string)
throws SMARTSException{
List<List<Integer>> matches = new ArrayList<List<Integer>>();
SmartsPatternCDK smarts_pattern = new
SmartsPatternCDK(smarts_string);
matches = smarts_pattern.getUniqueMatchingAtoms();
return matches;
}
try {
IAtomContainer mol =
sp.parseSmiles("[H]Oc1c([H])c([H])c([H])c([H])c1NC");
try {
List<List<Integer>> matches = find_all_occurences("[c;a][H]");
System.out.println("matches\n"+matches);
} catch (SMARTSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (InvalidSmilesException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
|