Dear RDKit users: I tried reading a mol2 file using the function MolFromMol2 (). The goal of my script is to read the molecule and find 5 or 6 membered aromatic rings. First I got the following error:
Can't Kekulize mol
The code I used is as follows:
mol=Chem.MolFromMol2File("%s.lig.%d.mol2"%(name, i), sanitize = True, removeHs
= False)
As a work-around I tried removing the sanitize flag and did the following
mol=Chem.MolFromMol2File("%s.lig.%d.mol2"%(name, i), sanitize = False,
removeHs = False)
aromatic_6="[c,n]1[c,n][c,n][c,n][c,n][c,n]1"
aromatic_5="[c,n]1[c,n][c,n][c,n][c,n]1"
pattern6=Chem.MolFromSmarts(aromatic_6)
pattern5=Chem.MolFromSmarts(aromatic_5)
print "Pattern 6 "
lar = mol.GetSubstructMatch(pattern6)
print lar
print "Pattern 5 "
lar = mol.GetSubstructMatch(pattern5)
print lar
The output should 3 aromatic six-membered rings and 1 aromatic five-membered
ring. Instead I get only the first six-membered ring and no listing of the
five-membered ring.:
Pattern 6
(0, 1, 3, 5, 7, 9)
Pattern 5
()
So basically, I can not get around the kekulize function. I looked the mol2
file (attached) and it correctly lists the bond types as aromatic for all of
the rings. Is there a way to use the bond information from the mol2 file to
assign aromaticity?
Thanks!!
-Sergio
MIZOLASTINE.lig.30.mol2
Description: MIZOLASTINE.lig.30.mol2
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

