Neutralize using Standardiser affects subsequent MolSearch

User c2ffbfa8f8

15-09-2010 16:42:07

Hi,


Just wondered if it was possible to get an explanation of the following Standardizer behaviour.  We are using JChem 5304.  Basically, we standardize a SMILES and use the standardized SMILES as a target in a MolSearch, which subsequently does not produce any hits.  We then take the standardized SMILES and reimport it, try the search again, and it produces a hit (which seems a bit odd):


 


final String smartsString = "[$(C(=O)[OH])]";


final Molecule smarts = MolImporter.importMol( smartsString, "smarts" );


final Molecule smiles = MolImporter.importMol( "c1ccccc1CC([O-])=O" );


final MolSearch search = new MolSearch();


final Standardizer standardizer = new Standardizer("neutralize");


standardizer.standardize(smiles);


search.setQuery(smarts);


search.setTarget(smiles);


System.out.println( "Match count after standardize: " + search.getMatchCount() );


final Molecule reimportedSmiles = MolImporter.importMol( smiles.toFormat("smiles"), "smiles" );


search.setTarget(reimportedSmiles);


System.out.println( "Match count after re-importing: " + search.getMatchCount() ); 


 


Apologies if this has been posted about before, I couldn't find anything talking about the same issue.


Thanks muchly. 

ChemAxon d76e6e95eb

16-09-2010 15:11:22

Since we are just travelling, you will get an answer early next week only. I am sorry for the delay.

ChemAxon a3d59b832c

16-09-2010 22:00:35

Hi Derek,


 


It may be that the number of hydrogens are not updated during neutralize.


Could you check if adding a


smiles.valenceCheck();

call just after standardization would fix it? (It recalculates the number of implicit H-s for each atom.)


If it works ok, it will be a workaround for now, and we can add this directly into the neutralize action, too.


 


Thanks,


Szabolcs

ChemAxon e08c317633

17-09-2010 08:38:18

Hi Derek,


Szabolcs's workaround works, please apply it until we fix this in Standardizer.
Sorry for the inconvenience.


Zsolt

User c2ffbfa8f8

17-09-2010 10:08:40

Thanks guys, that seems to have done the trick.


D

ChemAxon e08c317633

21-09-2010 14:20:30

Standardizer neutralize action fix will be available in next release.


Zsolt