New feature request

User 7b0ee04e66

26-02-2007 11:39:37

Hi,


I am currently looking at Library Enumeration and using an example similar to your website





SELECT jcf_react4(reaction_smart,


'SELECT cd_smiles, molecule_id FROM amol',


'SELECT cd_smiles, molecule_id FROM amol',


null,


null,


'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '


|| 'productTable:jcprods productTableJcpt:jchemproperties '


|| 'productIdColName:synthesis_id reactionId:amide')


FROM dual;





But, in my case the molecule Ids are kept in a Number Column in Oracle, which leads to the error below





ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: The following exception has been thrown by the servlet:


Exception: Cannot handle type in field "ID": java.math.BigDecimal


ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 323


ORA-06512: at "JCHEM.JCTF_REACT4", line 11





I have converted my Molecule ID Column to Varchar and it works fine.





Would it be possible to offer us the flexibility to have a different datatype for the molecule ID.





I have tried to substitute "reaction_smart" with a SQL statement which retrieves the Smarts from a database table.


But it gave me an error message.





It would give us a lot of extra flexibility if we could also select the reaction from a table.





Thanks


Catherine

User 7b0ee04e66

27-02-2007 08:24:49

Good morning,





I think I understand now why the reactant id needs to be in a text column - so that it can be combined further when you have multiple reactions.





I am trying to remove a BOC group group an amine and have noticed the following





With JChem 3.1.7





Code:
SELECT jc_react('[*;$([NX3;R]([C,N,O])([CX4])C(=O)OC(C)(C)C):1]C(=O)OC(C)(C)C>>[*:1][H]',


                    'CC(C)(C)OC(=O)N1CCCCC1', 'method:n mappingStyle:p') products FROM DUAL






I get the correct product.
Code:
C1CCNCC1






My test server is set up with Jchem 3.2 and I have read in the doc, that Mapping Style is now deprecated. So





Code:
SELECT jc_react('[*;$([NX3;R]([C,N,O])([CX4])C(=O)OC(C)(C)C):1]C(=O)OC(C)(C)C>>[*:1][H]',


                    'CC(C)(C)OC(=O)N1CCCCC1', 'method:n') products FROM DUAL






but I get my starting material back
Code:
CC(C)(C)OC(=O)N1CCCCC1



If I add the same mapping style in the SQL statement, it works fine as well.





Does this mean that I now have to map all atoms that disappear? I thought only the atoms that changed / reacted had to be mapped, in my case only the N reacts.





Thanks


Catherine

ChemAxon aa7c50abf8

27-02-2007 11:05:37

Hi Catherine,
Quote:
I have tried to substitute "reaction_smart" with a SQL statement which retrieves the Smarts from a database table.


But it gave me an error message.





It would give us a lot of extra flexibility if we could also select the reaction from a table.


You mean something like:


Code:
SELECT jcf_react4('SELECT reaction_smart FROM rsmarts',


'SELECT cd_smiles, molecule_id FROM amol',


'SELECT cd_smiles, molecule_id FROM amol',


null,


null,


'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '


|| 'productTable:jcprods productTableJcpt:jchemproperties '


|| 'productIdColName:synthesis_id reactionId:amide')


FROM dual;



This will not work indeed.





What about executing something like:


Code:
SELECT jcf_react4(reaction_smart,


'SELECT cd_smiles, molecule_id FROM amol',


'SELECT cd_smiles, molecule_id FROM amol',


null,


null,


'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '


|| 'productTable:jcprods productTableJcpt:jchemproperties '


|| 'productIdColName:synthesis_id reactionId:amide')


FROM rsmarts;



Is it not a suitable equivalent?


Quote:
I think I understand now why the reactant id needs to be in a text column - so that it can be combined further when you have multiple reactions.
Yes, this is exactly the idea. Is it a problem to convert the ids on the fly (to_char)? It would be probably not too difficult to change the code in JChem Cartridge so as to accept numeric types as well on the input side (reactants), but on the output side (products) we surely cannot fit the ids (which are synthesis codes following a character based pattern) into a numeric column. So ultimately you'd have to deal with character type compound ids anyway. (Admittedly, depending on your intended usage pattern, this might not be a problem for you.) Let me know if you still feel this would make things easier for you and I will make the necessary changes to accept numeric reactant IDs.
Quote:
I have read in the doc, that Mapping Style is now deprecated [...] I get my starting material back
This is not the intended behaviour. There is a bug in JChem Cartridge related to this deprecation. It will be fixed in the next release. Thank you for reporting it.





Let me know if I overlooked any of the issues you raised.





Thanks


Peter

User 7b0ee04e66

28-02-2007 11:26:26

Hi Peter,


Thanks for your suggestions.
Quote:
Is it a problem to convert the ids on the fly (to_char)?
No it isn't, and works fine. I will try and see if it makes a difference in speed for large sets.
Quote:
SELECT jcf_react4(reaction_smart,


'SELECT cd_smiles, molecule_id FROM amol',


'SELECT cd_smiles, molecule_id FROM amol',


null,


null,


'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '


|| 'productTable:jcprods productTableJcpt:jchemproperties '


|| 'productIdColName:synthesis_id reactionId:amide')


FROM rsmarts;
Yes, this is exactly what we would like to do but we also need a where clause to specify which reaction we would like to enumerate. I haven't been able to make this work on s table with a single row and single column. I have tried to index the smarts table to see if it makes a difference but it keeps failing.


Does it works for you or is it what a new command line could look like?
Quote:
'SELECT cd_smiles, molecule_id FROM amol'
It would also be very useful to be able to have a where clause in the statement above in order to use a subset of our reagents table.





Thanks


Catherine

ChemAxon aa7c50abf8

28-02-2007 15:02:33

Hi Catherine,





The following statement works for me (populates the jcprods table with the products as expected):
Code:



SELECT jcf_react4(reaction_smart,


'SELECT cd_smiles, molecule_id FROM amol',


'SELECT cd_smiles, molecule_id FROM amol',


null,


null,


'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '


|| 'productTable:jcprods productTableJcpt:jchemproperties '


|| 'productIdColName:synthesis_id reactionId:amide')


FROM rsmarts where id = 1






Note that this syntax assumes that the product table jcprods is a JChem-table. (For a regular structure [non-JChem] table, you have to omit the productTableJcpt option and have to specify the productColName option.)





Also note that in case of "regular" (non-JChem) product tables, the generated products will be much faster stored, if the structure column (of the product table) is not indexed with jc_idxtype. If the structure column of the product table is required to be indexed (for example because you want to be able to execute structure search simultaneously as products are being generated using jc_react4), you might prefer the product table to be a JChem-table for performance reasons. If the product table does not need to be jc_idxtype-indexed during product generation with jc_react4, a regular (non-JChem) table will be faster to insert into.





What error message do you get?





Thanks


Peter

User 7b0ee04e66

28-02-2007 17:06:45

Hi Peter,





I have got it working!


Basically TOAD does not seem to like the "||" symbols in this case....





Thanks


Catherine

ChemAxon aa7c50abf8

15-03-2007 08:18:18

Quote:
Quote:
I have read in the doc, that Mapping Style is now deprecated [...] I get my starting material back


This is not the intended behaviour. There is a bug in JChem Cartridge related to this deprecation. It will be fixed in the next release.
JChem 3.2.4 has been released and includes the fix for the mapping style deprecation problem in jc_react.





Peter