I have automated code that processes a CRO compound collection database file containing SMILES. The code is written in C# and I am using the ChemScript RemoveSaltsAndSolvents method. Commonly the CRO file includes SMILES which represent the chemical structure of what would be shipped, i.e. the SMILES includes salt information. For most structures, there is one part of the SMILES which represents the base chemical structure for the compound and another part of the SMILES which represents the salt with the two parts separated by a period, assuming the compound is stored with a salt. However, for some compounds, the compound/salt ratio is not one-to-one and the SMILES representation may repeat either the compound and/or the salt part of the SMILES. One example SMILES I am currently working with is:
In this example there are two copies of the compound structure and one copy of the salt structure. The problem I have encountered is that when I attempt to salt strip this SMILES string using RemoveSaltsAndSolvents, I get an AccessViolationException in my C# code. It is inconsistent, but sometimes my code can handle the exception and sometimes my code crashes my application. I will continue debugging to determine why my code does not always properly handle the exception. However, I was wondering if I am doing something wrong with the salt stripping or if this is just a bug. My current code reads in the SMILES from a file and then uses the RemoveSaltsAndSolvents method of a SaltTable instance, populated with my desired salts, to attempt the salt stripping. Has anyone encountered this scenario themselves? Is there any advice on anything I can do to the SMILES prior to attempting the RemoveSaltsAndSolvents?
I am currently using version 19.0 of ChemScript.
Thank for any help you may be able to provide.
Please sign in to leave a comment.