User f698d0529d
25-08-2005 10:05:23
Hi
Just to advise you that the problems I am having are preventing me from migrating one of our main applications to use the JChem cartridge. I am prepared to completely change my queries to make them JChem compatible. The problem is that working out what works with JChem is very difficult.
My latest bug discovery:
the filterQuery option in jc_compare does not work properly. And it produces inconsistent results.
So far so good. Queries B and C are equivalent, and produce the same results, although C is much faster. Since Jchem does not interact with the optimiser, this is understandable.
But
This should be equivalent to query A
However, it gets worse.
The result of query E seems to depend on which query you have run before. If you run C, then E, E gives 815 rows. You can see in the results that the molecular formulae do not match what was asked for. If you run D, then E, you get no rows again.
I notice that you have to precede the filterQuery SQL tablenames with the name of the owner schema, otherwise you get a “table or view does not exist” error. I figured this was because the filterQuery operation was connecting back to the database as the Jchem cartridge owner schema.
If you connect as jchem, and run this,
You get one row.
ISOSMILES MOLECULAR_FORMULA MOLECULAR_WEIGHT
[Na+].[Na+].Nc1cc(cc2cc(c(N=Nc3ccccc3)c(O)c12)S(=O)(=O)[O-])S(=O)(=O)[O-] C16H11N3Na2O7S2 467.389435
Just to advise you that the problems I am having are preventing me from migrating one of our main applications to use the JChem cartridge. I am prepared to completely change my queries to make them JChem compatible. The problem is that working out what works with JChem is very difficult.
My latest bug discovery:
the filterQuery option in jc_compare does not work properly. And it produces inconsistent results.
Code: |
A. select v.VERSION_ID, v.isosmiles from eoaiacd_v15.version v where v.MOLECULAR_WEIGHT >= 464 and v.MOLECULAR_WEIGHT <= 470 and v.MOLECULAR_FORMULA = 'C16H11N3Na2O7S2' and jchem.jc_contains(v.ISOSMILES, 'Nc1ccccc1') = 1; - 1 row, version id 94401, isosmiles [Na+].[Na+].Nc1cc(cc2cc(c(N=Nc3ccccc3)c(O)c12)S(=O)(=O)[O-])S(=O)(=O)[O-] B. select rowid, v.VERSION_ID from eoaiacd_v15.version v where v.MOLECULAR_WEIGHT >= 464 and v.MOLECULAR_WEIGHT <= 470 and jchem.jc_contains(v.ISOSMILES, 'Nc1ccccc1') = 1; - 815 rows C. select v.Parent_ID, v.VERSION_ID, v.ISOSMILES, v.MOLECULAR_FORMULA from version v where jchem.jc_compare(v.ISOSMILES, 'Nc1ccccc1', 'sep=! t:s!filterQuery: select rowid from eoaiacd_v15.version v where v.MOLECULAR_WEIGHT >= 464 and v.MOLECULAR_WEIGHT <= 470' ) = 1; - 815 rows. D select v.Parent_ID, v.VERSION_ID, v.ISOSMILES, v.MOLECULAR_FORMULA from version v where jchem.jc_compare(v.ISOSMILES, 'Nc1ccccc1', 'sep=! t:s!filterQuery: select rowid from eoaiacd_v15.version v where v.MOLECULAR_WEIGHT >= 460 and v.MOLECULAR_WEIGHT <= 470' ) = 1; - 1405 results. |
So far so good. Queries B and C are equivalent, and produce the same results, although C is much faster. Since Jchem does not interact with the optimiser, this is understandable.
But
Code: |
E. select v.Parent_ID, v.VERSION_ID, v.ISOSMILES, v.MOLECULAR_FORMULA from version v where jchem.jc_compare(v.ISOSMILES, 'Nc1ccccc1', 'sep=! t:s!filterQuery: select rowid from eoaiacd_v15.version v where v.MOLECULAR_WEIGHT >= 464 and v.MOLECULAR_WEIGHT <= 470 and v.MOLECULAR_FORMULA = ''C16H11N3Na2O7S2''' ) = 1; no rows returned. |
This should be equivalent to query A
However, it gets worse.
The result of query E seems to depend on which query you have run before. If you run C, then E, E gives 815 rows. You can see in the results that the molecular formulae do not match what was asked for. If you run D, then E, you get no rows again.
I notice that you have to precede the filterQuery SQL tablenames with the name of the owner schema, otherwise you get a “table or view does not exist” error. I figured this was because the filterQuery operation was connecting back to the database as the Jchem cartridge owner schema.
If you connect as jchem, and run this,
Code: |
select v.ISOSMILES, v.MOLECULAR_FORMULA, v.MOLECULAR_WEIGHT from eoaiacd_v15.version v where v.MOLECULAR_FORMULA = 'C16H11N3Na2O7S2'; |
You get one row.
ISOSMILES MOLECULAR_FORMULA MOLECULAR_WEIGHT
[Na+].[Na+].Nc1cc(cc2cc(c(N=Nc3ccccc3)c(O)c12)S(=O)(=O)[O-])S(=O)(=O)[O-] C16H11N3Na2O7S2 467.389435