User 870ab5b546
02-01-2009 15:43:03
The MolSearch invocation:
The query:
The target:
This is actually the behavior I want, but I didn't expect it. What is curious about it is that the algorithm is returning true, even though the query has two implicit H atoms that are not present in the target. When the charge and radical flags are set to "ignore", are implicit H atoms ignored also? If so, you should say so in the API and the Query Guide.
Code: |
MolSearch search = new MolSearch(); MolSearchOptions searchOpts = new MolSearchOptions(); searchOpts.setSearchType(SearchConstants.EXACT); searchOpts.setExactBondMatching(false); searchOpts.setChargeMatching(SearchConstants.CHARGE_MATCHING_IGNORE); searchOpts.setRadicalMatching(SearchConstants.RADICAL_MATCHING_IGNORE); searchOpts.setIsotopeMatching(SearchConstants.ISOTOPE_MATCHING_EXACT); searchOpts.setStereoSearchType(SearchConstants.STEREO_SPECIFIC); searchOpts.setStereoModel(SearchConstants.STEREO_MODEL_GLOBAL); search.setSearchOptions(searchOpts); search.setTarget(authMol); search.setQuery(respMol); boolean retValue = search.isMatching(); |
The query:
Code: |
<?xml version="1.0" ?> <cml> <MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7" elementType="C C O C C C C" mrvPseudo="0 0 0 PSEUDO_H PSEUDO_H PSEUDO_H PSEUDO_H" x2="-3.3687500953674316 -2.598750095367431 -1.0587500953674311 -3.3687500953674308 -2.035070973539396 -4.138750095367432 -4.702429217195467" y2="1.9731249809265137 0.6394458590984782 0.6394458590984782 -0.6942332627295575 2.743124980926514 3.3068041027545494 1.2031249809265134" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="1" /> <bond atomRefs2="a2 a4" order="1" /> <bond atomRefs2="a1 a5" order="1" /> <bond atomRefs2="a1 a6" order="1" /> <bond atomRefs2="a1 a7" order="1" /> </bondArray> </molecule> </MChemicalStruct> </MDocument> </cml> |
The target:
Code: |
<?xml version="1.0" ?> <cml> <MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7" elementType="C C O C C C C" formalCharge="0 1 -1 0 0 0 0" mrvPseudo="0 0 0 PSEUDO_H PSEUDO_H PSEUDO_H PSEUDO_H" x2="-2.983750104904175 -2.2137501049041743 -0.6737501049041743 -2.983750104904174 -1.6500709830761393 -3.7537501049041753 -4.3174292267322105" y2="1.6362500190734863 0.30257089724545083 0.30257089724545083 -1.0311082245825849 2.406250019073487 2.969929140901522 0.8662500190734861" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="1" /> <bond atomRefs2="a2 a4" order="1" /> <bond atomRefs2="a1 a5" order="1" /> <bond atomRefs2="a1 a6" order="1" /> <bond atomRefs2="a1 a7" order="1" /> </bondArray> </molecule> </MChemicalStruct> </MDocument> </cml> |
This is actually the behavior I want, but I didn't expect it. What is curious about it is that the algorithm is returning true, even though the query has two implicit H atoms that are not present in the target. When the charge and radical flags are set to "ignore", are implicit H atoms ignored also? If so, you should say so in the API and the Query Guide.