How to specify the aromatic method in structure search?

User f50dadc210

04-11-2010 18:13:22

I know there are tree aromatic method in JChem, i.e. basic,
general and loose. The following SQL returns 0.   I wonder if I can choose aromatic method ,
so that it returns 1. I didn't find the right APIs to specify the aromatic method in structure search.  Could you show me the Java codes?


Thanks


Bin


select jc_compare(


'CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1'


,


'C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1'


, 't:s')


from dual;

ChemAxon aa7c50abf8

05-11-2010 08:10:27

When you search in a  jc_idxtype-indexed column, the Standardizer configuration of the index (see the std_config index parameter) determines how the structures will be aromatized. The default is the Daylight-style aromatization: https://www.chemaxon.com/marvin/help/sci/aromatization-doc.html .


To change the default aromatization method for searches not operating on a jc_idxtype index, you have to use the jc_set_default_property function:


08:40:08 SQL>         select jc_compare('O=C1C=CNC=C1', 'n1ccccc1', 't:s') from dual;

JC_COMPARE('O=C1C=CNC=C1','N1CCCCC1','T:S')

-------------------------------------------

                                          0

Elapsed: 00:00:00.53

08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'aromatize');

Call completed.

Elapsed: 00:00:00.01

08:40:09 SQL>         select jc_compare('O=C1C=CNC=C1', 'n1ccccc1', 't:s') from dual;

JC_COMPARE('O=C1C=CNC=C1','N1CCCCC1','T:S')

-------------------------------------------

                                          1

Elapsed: 00:00:00.05

08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'aromatize:b');

Call completed.

Elapsed: 00:00:00.01


Obviously, default properties are not meant to be used on a search-by-search basis. Once you set a default property its impact will persist across database calls and sessions.


It appears that none of the available aromatization method will achieve what you would like to see for your example:


08:40:09 SQL>         select jc_compare('CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1',
08:40:09   2              'C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1', 't:s') from dual;
JC_COMPARE('CCOC1=NN(C(=O)C1=C1SC(=C2N(C)C3CCCCC3C2(C)C)C(=O)N1-C1CCCCC1)C1CCCCC
--------------------------------------------------------------------------------
                                                                               0
Elapsed: 00:00:00.10
08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'aromatize:');
Call completed.
Elapsed: 00:00:00.01
08:40:09 SQL>         select jc_compare('CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1',
08:40:09   2              'C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1', 't:s') from dual;
JC_COMPARE('CCOC1=NN(C(=O)C1=C1SC(=C2N(C)C3CCCCC3C2(C)C)C(=O)N1-C1CCCCC1)C1CCCCC
--------------------------------------------------------------------------------
                                                                               0
Elapsed: 00:00:00.03
08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'aromatize:b');
Call completed.
Elapsed: 00:00:00.01
08:40:09 SQL>         select jc_compare('CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1',
08:40:09   2              'C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1', 't:s') from dual;
JC_COMPARE('CCOC1=NN(C(=O)C1=C1SC(=C2N(C)C3CCCCC3C2(C)C)C(=O)N1-C1CCCCC1)C1CCCCC
--------------------------------------------------------------------------------
                                                                               0
Elapsed: 00:00:00.03
08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'aromatize:l');
Call completed.
Elapsed: 00:00:00.01
08:40:09 SQL>         select jc_compare('CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1',
08:40:09   2              'C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1', 't:s') from dual;
JC_COMPARE('CCOC1=NN(C(=O)C1=C1SC(=C2N(C)C3CCCCC3C2(C)C)C(=O)N1-C1CCCCC1)C1CCCCC
--------------------------------------------------------------------------------
                                                                               0
Elapsed: 00:00:00.02
08:40:09 SQL>         call jc_set_default_property('standardizerConfig', 'null');
Call completed.
Elapsed: 00:00:00.01



In terms Java API, the Molecule.aromatize(int, boolean) method can be used for aromatizing structures (or the Standardizer through the aromatize rule).




Peter

User f50dadc210

05-11-2010 17:27:56











Thank you very much for your help.  


 


When I used MarvinSketch to aromatize the target ( loose
method),  The 5-membered ring is not aromatic ring.(see 2nd picture)


If
It is not aromatic ring, then my sql should return 1.


I can prove it by replacing the first C with
"[#6]", ie the following sql returns 1. (see 1st picture)


select jc_compare(


'CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1',


'[#6]=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1'


, 't:s')


from dual;


 


I have two questions.


1. I am excepting your last sql (the one is using 'aromatize:l') returns 1

2. When I said that I cannot find the right APIs to specify the aromatic method 
in structure search. 
I meant that I want to know how to specify the aromatic method when I am using MolSearch
I guess that SearchConstants or StandardizedMolSearch may be helpful. 
Could you show me the java code?

 

I am coding a java program using JChem API to mimic a Pipeline Pilot program, 
Most results are identical,  0.1% cases are different.
I hope I can finally the get the same result as PP.

 

Thanks

 

Bin

ChemAxon aa7c50abf8

05-11-2010 20:44:29

We will get back to you on 1.


For 2.:


    public static void main(String[] args) {
       try {
            String target = "CCOC1=NN(C(=O)C1=c1sc(=C2N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1";
            String query = "C=!@[#6]1~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~[#7]-[#7]~[#6;X3](~[#8;$(O=C),$(O-C=N),$(O-cn)])~1";

            MolHandler targetMolHandler = new MolHandler(target, false);
            MolHandler queryMolHandler = new MolHandler(query, true);

            Molecule targetMolecule = targetMolHandler.getMolecule();
            Molecule queryMolecule = queryMolHandler.getMolecule();

            Standardizer standardizer = Pools.getCreateStandardizer("aromatize:l..removeexplicitH");
            targetMolecule = standardizer.standardize(targetMolecule);
            queryMolecule = standardizer.standardize(queryMolecule);
//            TableInfo.standardize(targetMolecule, standardizer, true);
//            TableInfo.standardize(queryMolecule, standardizer,
//                    false);

            MolSearchOptions molSearchOptions = new MolSearchOptions();
            molSearchOptions.setSearchType(SearchConstants.SUBSTRUCTURE);
            molSearchOptions.setTargetAbsoluteStereo(true);
            molSearchOptions.setQueryAbsoluteStereo(true);
            molSearchOptions.setStereoModel(SearchConstants.STEREO_MODEL_COMPREHENSIVE);

            MolSearch molSearch = new MolSearch();
            molSearch.setSearchOptions(molSearchOptions);
            molSearch.setQuery(queryMolecule);
            molSearch.setTarget(targetMolecule);
            System.err.println(molSearch.isMatching());
        } catch (Throwable throwable) {
            throwable.printStackTrace();
            System.exit(1);
        }
    }

User f50dadc210

05-11-2010 22:33:42

Is it Pools a helper clase? 
I replaced "Pools.getCreateStandardizer("aromatize:l..removeexplicitH")" with new Standardizer("aromatize:l..removeexplicitH")
it returns "false".(no matching)

I also noticed that it will return "true" if it calls targetMolecule.dearomatize() first.


 


Thanks


Bin

ChemAxon aa7c50abf8

06-11-2010 07:17:46

Is it Pools a helper clase?

It is a (bounded) pool of (pre-configured) Standardizer instances. If you run the code above as a stand-alone application, the pool is empty, so all it does is to create a Standardizer instance with the Standardizer configuration specified.


I replaced "Pools.getCreateStandardizer("aromatize:l..removeexplicitH")" with new Standardizer("aromatize:l..removeexplicitH") it returns "false".(no matching)

The code returns false either way in my environment (wether with Pool or direct Standardizer instantiation).


I also noticed that it will return "true" if it calls targetMolecule.dearomatize() first.

We will get back to you on this ASAP.


Peter

ChemAxon 42004978e8

11-11-2010 15:35:03

Hi Ben,


As you said in your query the carbon atom matching on an atom in the five-membered N,S ring is an aliphatic one. You expect this to match on your target in case of loose aromatization because then the five-membered ring is aliphatic.


However you specified the aromatic version created using general aromatiztaion:


kekule: CCOC1=NN(C(=O)C1=C1SC(C(=O)N1C1=CC=CC=C1)=C1N(C)C2=CC=CC=C2C1(C)C)C1=CC=CC=C1


general:


CCOC1=NN(C(=O)C1=c1s\c(=C2/N(C)c3ccccc3C2(C)C)c(=O)n1-c1ccccc1)c1ccccc1


loose-aromatized:


CCOC1=NN(C(=O)C1=C1SC(C(=O)N1c1ccccc1)=C1N(C)c2ccccc2C1(C)C)c1ccccc1


You can see here the sulphur is aliphatic (S) while for the general it was aromatic (s).


If you specify this loose aromatized target then you should get a hit. Please tell us if not.


 


You can obtain the loose aromatization result in msketch in the following way:


Insert the kekule representation.


structure > aromatic form > conversion method > loose


structure > aromatic form > convert to aromatic form


 


Bye,


Robert