Trouble with Standardizer

User f05f6b8c05

19-05-2012 22:52:15


Hi,


 


I'm using jchem 5.8.3 API


 


I'm trying to standardize the following molecule:


 


[O-][N+]1=CC=CC=C1  =>  O=N1=CC=CC=C1


 


The following command does not standardize it:


 


Standardizer standardizer = new Standardizer("[!#1:1]-[N+:2](-[O-:3])=[*:4]>>[!#1:1]-[N:2](=[O:3])=[*:4]");


 


However, this command does:


 


Standardizer standardizer = new Standardizer("[N+:1]-[O-:2]>>[N:1]=[O:2]");


(but this command is too general, I would like to use the previous one)


 


Can you tell me what I'm doing wrong in the first standardizer command?


 


Thanks.


 


Andrew 


 


In case it is useful, the following search finds a match in the molecule as desired:


 


Molecule mol = MolImporter.importMol("[O-][N+]1=CC=CC=C1");


MolHandler mhl = new MolHandler("[!#1]-[N+]([O-])=*", true); // if true, import SMILES string as SMARTS


        Molecule query = mhl.getMolecule();


 


MolSearch s = new MolSearch();


         MolSearchOptions so = new MolSearchOptions(SearchConstants.SUBSTRUCTURE);


         so.setQueryAbsoluteStereo(true);


         so.setChargeMatching(SearchConstants.CHARGE_MATCHING_EXACT);


         so.setImplicitHMatching(SearchConstants.IMPLICIT_H_MATCHING_IGNORE); // we won't match H's at all here


         so.setDoubleBondStereoMatchingMode(StereoConstants.DBS_ALL);


         so.setExactBondMatching(true);


         so.setStereoSearchType(SearchConstants.STEREO_EXACT);


         so.setTautomerSearch(SearchConstants.TAUTOMER_SEARCH_OFF);


         s.setSearchOptions(so);


s.setTarget(mol);


         s.setQuery(query);


         SearchHit[] sh = s.findAllHits();


if (sh!=null) {


 


// match found


 


}


 


ChemAxon e08c317633

24-05-2012 13:18:20

 


Standardizer standardizer = new Standardizer("[!#1:1]-[N+:2](-[O-:3])=[*:4]>>[!#1:1]-[N:2](=[O:3])=[*:4]");

However, this command does:

Standardizer standardizer = new Standardizer("[N+:1]-[O-:2]>>[N:1]=[O:2]");
(but this command is too general, I would like to use the previous one)

Can you tell me what I'm doing wrong in the first standardizer command?

In first command the nitrogen is connected with double bond to the any atom and with single bond to the list atom, while in your input molecule ("[O-][N+]1=CC=CC=C1") these bonds are aromatic in reality.


These double and single bonds should be changed to aromatic or any bonds. These will work in Standardizer:


C:\>standardize -c "[!#1:1]-,:[#7+:2]([*:4])[O-:3]>>[!#1:1]-,:[#7:2]([*:4])=[O:3]" "[O-][N+]1=CC=CC=C1"
O=N1=CC=CC=C1

C:\> standardize -c "[!#1:1]~[N+:2](~[*:4])[O-:3]>>[!#1:1]~[N:2](~[*:4])=[O:3]" "[O-][N+]1=CC=CC=C1"
O=N1=CC=CC=C1

In first example I connected nitrogen to any atom and to list atom with "single or aromatic" bond, in second example I used any bonds.


Sorry for the late answer.


Zsolt

User f05f6b8c05

24-05-2012 13:39:26

Thank you for reply.  Very helpful.


I had also tried to match using this:  a:[n+]([O-]):a   .. but it did not find match to [O-][N+]1=CC=CC=C1


Can you tell me why that one doesn't find a match?


Thanks.

ChemAxon e08c317633

24-05-2012 17:19:41










awrk wrote:

I had also tried to match using this:  a:[n+]([O-]):a   .. but it did not find match to [O-][N+]1=CC=CC=C1


Can you tell me why that one doesn't find a match?



It works for me.


C:\>standardize -c "a:[n+]([O-]):a>>a:n(:a)=O" "[O-][N+]1=CC=CC=C1"
O=N1=CC=CC=C1

Zsolt

User f05f6b8c05

24-05-2012 18:54:43

Thank you for quick response.  When I try below in API, I get null search hits.  Do you also get null?


Molecule mol = MolImporter.importMol("[O-][N+]1=CC=CC=C1");


MolHandler mhl = new MolHandler("a:[n+]([O-]):a", true);


Molecule query = mhl.getMolecule();



MolSearch s = new MolSearch();


MolSearchOptions so = new MolSearchOptions(SearchConstants.SUBSTRUCTURE);



s.setSearchOptions(so);

s.setTarget(mol);

s.setQuery(query);

SearchHit[] sh = s.findAllHits();



ChemAxon e08c317633

25-05-2012 09:37:34

You have to use StandardizedMolSearch instead of MolSearch to make your code work. MolSearch does not handle aromatization by default, so the query having aromatic bonds will not be found in a target which has only single and double bonds. Standardizer uses StandardizedMolSearch internally as well.


Zsolt

User f05f6b8c05

25-05-2012 13:04:11

Thanks for the clarification, I will look at that class!