{"action":"created","issue":{"url":"https://api.github.com/repos/rdkit/rdkit/issues/917","repository_url":"https://api.github.com/repos/rdkit/rdkit","labels_url":"https://api.github.com/repos/rdkit/rdkit/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/917/comments","events_url":"https://api.github.com/repos/rdkit/rdkit/issues/917/events","html_url":"https://github.com/rdkit/rdkit/issues/917","id":155443707,"number":917,"title":"Can't kekulize mol","user":{"login":"UnixJunkie","id":737920,"avatar_url":"https://avatars.githubusercontent.com/u/737920?v=3","gravatar_id":"","url":"https://api.github.com/users/UnixJunkie","html_url":"https://github.com/UnixJunkie","followers_url":"https://api.github.com/users/UnixJunkie/followers","following_url":"https://api.github.com/users/UnixJunkie/following{/other_user}","gists_url":"https://api.github.com/users/UnixJunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/UnixJunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnixJunkie/subscriptions","organizations_url":"https://api.github.com/users/UnixJunkie/orgs","repos_url":"https://api.github.com/users/UnixJunkie/repos","events_url":"https://api.github.com/users/UnixJunkie/events{/privacy}","received_events_url":"https://api.github.com/users/UnixJunkie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-18T08:27:23Z","updated_at":"2016-05-19T13:06:20Z","closed_at":null,"body":"Using the following script:\r\n\r\n    #!/usr/bin/env python2\r\n    \r\n    # output the MACCS bitstring of each molecule found in a MOL2 file\r\n    \r\n    import rdkit.Chem\r\n    import sys\r\n    \r\n    def RetrieveMol2Block(fileLikeObject, delimiter=\"@<TRIPOS>MOLECULE\"):\r\n        \"\"\"generator which retrieves one mol2 block at a time\r\n        \"\"\"\r\n        mol2 = []\r\n        for line in fileLikeObject:\r\n            if line.startswith(delimiter) and mol2:\r\n                yield \"\".join(mol2)\r\n                mol2 = []\r\n            mol2.append(line)\r\n        if mol2:\r\n            yield \"\".join(mol2)\r\n    \r\n    import sys\r\n    from rdkit.Chem import MACCSkeys\r\n    with open(sys.argv[1]) as in_file:\r\n        problem_mols = open('problem.mol2', 'w')\r\n        for mol2 in RetrieveMol2Block(in_file):\r\n            mol = rdkit.Chem.MolFromMol2Block(mol2)\r\n            try:\r\n                maccs = MACCSkeys.GenMACCSKeys(mol)\r\n                for bit in maccs:\r\n                    if bit:\r\n                        sys.stdout.write('1')\r\n                    else:\r\n                        sys.stdout.write('0')\r\n                sys.stdout.write('\\n')\r\n            except:\r\n                sys.stdout.write('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\n')\r\n                problem_mols.write(mol2)\r\n    \r\nand rdkit-Release_2016_03_1; I got all the following molecules in error:\r\nhttps://gist.github.com/UnixJunkie/c8c500f9b18d80daf59d0990c8bc964e\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rdkit/rdkit/issues/comments/220318173","html_url":"https://github.com/rdkit/rdkit/issues/917#issuecomment-220318173","issue_url":"https://api.github.com/repos/rdkit/rdkit/issues/917","id":220318173,"user":{"login":"UnixJunkie","id":737920,"avatar_url":"https://avatars.githubusercontent.com/u/737920?v=3","gravatar_id":"","url":"https://api.github.com/users/UnixJunkie","html_url":"https://github.com/UnixJunkie","followers_url":"https://api.github.com/users/UnixJunkie/followers","following_url":"https://api.github.com/users/UnixJunkie/following{/other_user}","gists_url":"https://api.github.com/users/UnixJunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/UnixJunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnixJunkie/subscriptions","organizations_url":"https://api.github.com/users/UnixJunkie/orgs","repos_url":"https://api.github.com/users/UnixJunkie/repos","events_url":"https://api.github.com/users/UnixJunkie/events{/privacy}","received_events_url":"https://api.github.com/users/UnixJunkie/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T13:06:20Z","updated_at":"2016-05-19T13:06:20Z","body":"Hmm. Let me think; maybe there was an additional pass with open babel to ensure the partial charges were Gasteiger ones."}}