User a18e201107
20-04-2010 14:53:30
Hello
We currently use chemaxon jchem tools for most of the processing for our compound registration system, and would like to do 100% of the processing using chemaxon (currently we bounce out to pipeline pilot for some additional processing). One of the items we bounce out is what we call our "ambiguity detector." This process takes a molecule and determines whether or not it has an undefined stereocenters and if so flags the molecule. Our registration system is such that compounds receive an "A" if there is stereochemistry undefined and a "K" otherwise.
In an attempt to replicate this behavior in chemaxon I have written some code (below) which determines the number of assymetric atoms in the molecule and then checks the chirality of each carbon (whether or not it is a R, S, niether, or UndefinedParity). If there are no assymetric atoms, the compound is given a K. If the count of R+S = assymetric atom count OR there are no Carbons with UndefinedParity (this is a "3" chirality flag) the compound is marked a K. Otherwise it is an "A."
This process seems to work pretty well except when the molecule has a assymetric nitrogen AND an adamante group. Here the adamantane gets flagged as having a few carbons with undefinedparity (3) and the assymetric atom count does not match R+S count. As you can see this logic is a bit clunky (and likely not the best way to proceed). I was wondering if
1) there is a way to ask whether or not an individual atom is assymetric so that we can get a count of Carbons only
2) if you are developing anything which looks at a structure and determines it does not have defined stereochemistry
One thing I did not mention is that we would like to look at double bond stereochemistry in compounds as well and see if that is defined. I believe I have a way of doing that which I did not describe here but I may wish to add this issue to this conversation.
I have attached an sdf with some examples of the kinds of compounds I have been testing against and the results of the code below. Thank you for any assistance you can provide.
public static boolean isAmbiguous(String smiles, String letter, List columns)
{
AssertUtil.a(StringUtils.isNotBlank(smiles), "smiles can't be blank");
Molecule molecule;
//convert smiles to molecule
molecule = MolImporter.importMol(smiles);
molecule.clean(2, null); // clean 2D
//use topologyanlyser plugin to calculate a couple properties of the molecule
TopologyAnalyser topologyPlugin = new TopologyAnalyser();
topologyPlugin.setMolecule(molecule);
int assymetricAtomCount = topologyPlugin.asymmetricAtomCount();
int chiralCenterCount = topologyPlugin.chiralCenterCount();
//call method to determine carbon ambiguity
boolean tetrahedralAmbiguous = isTetrahedralAmbiguous(molecule, assymetricAtomCount);
return tetrahedralAmbiguous;
private static boolean isTetrahedralAmbiguous(Molecule molecule, int assymetricAtomCount)
{
boolean undefinedParity = false;
int RandS_Count = 0;
if (assymetricAtomCount == 0)
{
return false;
}
else
{
int length = molecule.getAtomArray().length;
for (int i = 0; i < length; i++)
{
MolAtom molAtom = molecule.getAtom(i);
String symbol = molAtom.getSymbol();
if ("C".equals(symbol))
{
int chirality = molecule.getChirality(i);
if (chirality == 16 || chirality == 8)
{
++RandS_Count;
}
else if (chirality == 3)
{
undefinedParity = true;
}
}
}
}
if (RandS_Count == assymetricAtomCount || undefinedParity == false)
{
return false;
}
else
{
return true;
}
}