CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

Question on rcdk is.aromatic function being unable to recognize some heterocycles as aromatic #111

Open jun-li-2020 opened 3 years ago

jun-li-2020 commented 3 years ago

Hi,

I have noticed that when the SMILES string is not explicitly shown as aromatic with lower case, the rcdk is.aromatic function sometimes will fail to recognize the aromatic portion of the molecule. For example, when stavudine SMILES string "O=C1C(C)=CN(C(N1)=O)[C@@H]2OC@@HCO" was used, the thymidine ring atoms are shown as False after checking with the is.aromatic() function. Traditional aromatic ring such as phenanthroline (C1(C(N=CC=C2)=C2C=C3)=C3C=CC=N1) can be correctly done without a problem. I was comparing to the RDKit GetIsAromatic bool function on the same stavudine SMILES string. To my surprise, it recognized the aromatic portion without an issue. To further test the difference, I used a tetrazole (O=C(N)C@HC1=NN=NN1C). Here the rcdk is.aromatic function could not recognize the aromatic tetrazole ring until I used lower case such as O=C(N)C@HC1=nn=nn1C. On the contrary, the RDKit GetIsAromatic worked well to recognize the aromatic atoms without needing the lowercase. Looking at the is.aromatic function .jfield("org/openscience/cdk/CDKConstants", "I", "ISAROMATIC") in rcdk, I am wondering if there is any possibility to make this thing work in rcdk without explicitly using lower cases on SMILES to show aromaticity.

Thanks,

-Jun

Related sessionInfo: rcdk 3.5.0 and rcdklibs 2.3