{"action":"closed","number":885,"pull_request":{"url":"https://api.github.com/repos/rdkit/rdkit/pulls/885","id":67781840,"html_url":"https://github.com/rdkit/rdkit/pull/885","diff_url":"https://github.com/rdkit/rdkit/pull/885.diff","patch_url":"https://github.com/rdkit/rdkit/pull/885.patch","issue_url":"https://api.github.com/repos/rdkit/rdkit/issues/885","number":885,"state":"closed","locked":false,"title":"Dev/filtercatalog functional groups","user":{"login":"bp-kelley","id":9888416,"avatar_url":"https://avatars.githubusercontent.com/u/9888416?v=3","gravatar_id":"","url":"https://api.github.com/users/bp-kelley","html_url":"https://github.com/bp-kelley","followers_url":"https://api.github.com/users/bp-kelley/followers","following_url":"https://api.github.com/users/bp-kelley/following{/other_user}","gists_url":"https://api.github.com/users/bp-kelley/gists{/gist_id}","starred_url":"https://api.github.com/users/bp-kelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp-kelley/subscriptions","organizations_url":"https://api.github.com/users/bp-kelley/orgs","repos_url":"https://api.github.com/users/bp-kelley/repos","events_url":"https://api.github.com/users/bp-kelley/events{/privacy}","received_events_url":"https://api.github.com/users/bp-kelley/received_events","type":"User","site_admin":false},"body":"Implements #732 \r\n\r\nFilterHierarchyMatcher has beed added as a new FilterCatalog matcher.  It stores a hierarchy of smarts patterns that (in principle) should get more specific from the root to the leaves.  Fore each matching branch in the tree, it returns the most specific FilterMatch.  I.e.  Halogen->Halogen.Aromatic would return Halogen.Aromatic\r\n\r\nA new FilterCatalog has been added that holds all the hierarchies stored in Functional_Group_Hierarchy.txt.\r\n\r\nIt also supplies the flattened form of the recursive queries that can be used in addRecursiveQueries.\r\n\r\nExample:\r\n\r\n        fc = FilterCatalog.GetFunctionalGroupHierarchy()\r\n        \r\n        for mol, res in matches:\r\n           func_groups =  [match.filterMatch.GetName()\r\n                             for match in fc.GetFilterMatches(mol)]\r\n\r\nExample of getting queryDefs for addRecursive:\r\n\r\n      # keys need to be lower case for recursiveQueries, probably should make this\r\n      #  the default?\r\n      querydefs = {k.lower():v\r\n                 for k,v in FilterCatalog.GetFlattenedFunctionalGroupHierarchy().items()}\r\n    \r\n      rxn.AddRecursiveQueriesToReaction(querydefs, 'query')","created_at":"2016-04-25T20:22:29Z","updated_at":"2016-04-27T09:09:07Z","closed_at":"2016-04-27T09:09:07Z","merged_at":"2016-04-27T09:09:07Z","merge_commit_sha":"627168252754f2b1e75fb1167b8f80b2910603e2","assignee":null,"milestone":{"url":"https://api.github.com/repos/rdkit/rdkit/milestones/12","html_url":"https://github.com/rdkit/rdkit/milestones/2016_09_1","labels_url":"https://api.github.com/repos/rdkit/rdkit/milestones/12/labels","id":1660441,"number":12,"title":"2016_09_1","description":"","creator":{"login":"greglandrum","id":540511,"avatar_url":"https://avatars.githubusercontent.com/u/540511?v=3","gravatar_id":"","url":"https://api.github.com/users/greglandrum","html_url":"https://github.com/greglandrum","followers_url":"https://api.github.com/users/greglandrum/followers","following_url":"https://api.github.com/users/greglandrum/following{/other_user}","gists_url":"https://api.github.com/users/greglandrum/gists{/gist_id}","starred_url":"https://api.github.com/users/greglandrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglandrum/subscriptions","organizations_url":"https://api.github.com/users/greglandrum/orgs","repos_url":"https://api.github.com/users/greglandrum/repos","events_url":"https://api.github.com/users/greglandrum/events{/privacy}","received_events_url":"https://api.github.com/users/greglandrum/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":3,"state":"open","created_at":"2016-03-22T17:35:18Z","updated_at":"2016-04-27T09:09:07Z","due_on":"2016-09-29T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/rdkit/rdkit/pulls/885/commits","review_comments_url":"https://api.github.com/repos/rdkit/rdkit/pulls/885/comments","review_comment_url":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/885/comments","statuses_url":"https://api.github.com/repos/rdkit/rdkit/statuses/1199c9f2a8e51038af65cebf8a187ede9f23edb3","head":{"label":"bp-kelley:dev/filtercatalog-functional-groups","ref":"dev/filtercatalog-functional-groups","sha":"1199c9f2a8e51038af65cebf8a187ede9f23edb3","user":{"login":"bp-kelley","id":9888416,"avatar_url":"https://avatars.githubusercontent.com/u/9888416?v=3","gravatar_id":"","url":"https://api.github.com/users/bp-kelley","html_url":"https://github.com/bp-kelley","followers_url":"https://api.github.com/users/bp-kelley/followers","following_url":"https://api.github.com/users/bp-kelley/following{/other_user}","gists_url":"https://api.github.com/users/bp-kelley/gists{/gist_id}","starred_url":"https://api.github.com/users/bp-kelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp-kelley/subscriptions","organizations_url":"https://api.github.com/users/bp-kelley/orgs","repos_url":"https://api.github.com/users/bp-kelley/repos","events_url":"https://api.github.com/users/bp-kelley/events{/privacy}","received_events_url":"https://api.github.com/users/bp-kelley/received_events","type":"User","site_admin":false},"repo":{"id":29306451,"name":"rdkit","full_name":"bp-kelley/rdkit","owner":{"login":"bp-kelley","id":9888416,"avatar_url":"https://avatars.githubusercontent.com/u/9888416?v=3","gravatar_id":"","url":"https://api.github.com/users/bp-kelley","html_url":"https://github.com/bp-kelley","followers_url":"https://api.github.com/users/bp-kelley/followers","following_url":"https://api.github.com/users/bp-kelley/following{/other_user}","gists_url":"https://api.github.com/users/bp-kelley/gists{/gist_id}","starred_url":"https://api.github.com/users/bp-kelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp-kelley/subscriptions","organizations_url":"https://api.github.com/users/bp-kelley/orgs","repos_url":"https://api.github.com/users/bp-kelley/repos","events_url":"https://api.github.com/users/bp-kelley/events{/privacy}","received_events_url":"https://api.github.com/users/bp-kelley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bp-kelley/rdkit","description":"The official sources for the RDKit library","fork":true,"url":"https://api.github.com/repos/bp-kelley/rdkit","forks_url":"https://api.github.com/repos/bp-kelley/rdkit/forks","keys_url":"https://api.github.com/repos/bp-kelley/rdkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bp-kelley/rdkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bp-kelley/rdkit/teams","hooks_url":"https://api.github.com/repos/bp-kelley/rdkit/hooks","issue_events_url":"https://api.github.com/repos/bp-kelley/rdkit/issues/events{/number}","events_url":"https://api.github.com/repos/bp-kelley/rdkit/events","assignees_url":"https://api.github.com/repos/bp-kelley/rdkit/assignees{/user}","branches_url":"https://api.github.com/repos/bp-kelley/rdkit/branches{/branch}","tags_url":"https://api.github.com/repos/bp-kelley/rdkit/tags","blobs_url":"https://api.github.com/repos/bp-kelley/rdkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bp-kelley/rdkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bp-kelley/rdkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/bp-kelley/rdkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bp-kelley/rdkit/statuses/{sha}","languages_url":"https://api.github.com/repos/bp-kelley/rdkit/languages","stargazers_url":"https://api.github.com/repos/bp-kelley/rdkit/stargazers","contributors_url":"https://api.github.com/repos/bp-kelley/rdkit/contributors","subscribers_url":"https://api.github.com/repos/bp-kelley/rdkit/subscribers","subscription_url":"https://api.github.com/repos/bp-kelley/rdkit/subscription","commits_url":"https://api.github.com/repos/bp-kelley/rdkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/bp-kelley/rdkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/bp-kelley/rdkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/bp-kelley/rdkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/bp-kelley/rdkit/contents/{+path}","compare_url":"https://api.github.com/repos/bp-kelley/rdkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bp-kelley/rdkit/merges","archive_url":"https://api.github.com/repos/bp-kelley/rdkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bp-kelley/rdkit/downloads","issues_url":"https://api.github.com/repos/bp-kelley/rdkit/issues{/number}","pulls_url":"https://api.github.com/repos/bp-kelley/rdkit/pulls{/number}","milestones_url":"https://api.github.com/repos/bp-kelley/rdkit/milestones{/number}","notifications_url":"https://api.github.com/repos/bp-kelley/rdkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bp-kelley/rdkit/labels{/name}","releases_url":"https://api.github.com/repos/bp-kelley/rdkit/releases{/id}","deployments_url":"https://api.github.com/repos/bp-kelley/rdkit/deployments","created_at":"2015-01-15T16:29:44Z","updated_at":"2016-01-19T14:43:06Z","pushed_at":"2016-04-27T01:34:58Z","git_url":"git://github.com/bp-kelley/rdkit.git","ssh_url":"git@github.com:bp-kelley/rdkit.git","clone_url":"https://github.com/bp-kelley/rdkit.git","svn_url":"https://github.com/bp-kelley/rdkit","homepage":"","size":97848,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rdkit:master","ref":"master","sha":"ffe829d5da1011c3b8b9b929ac64d7d792bec3d5","user":{"login":"rdkit","id":2018047,"avatar_url":"https://avatars.githubusercontent.com/u/2018047?v=3","gravatar_id":"","url":"https://api.github.com/users/rdkit","html_url":"https://github.com/rdkit","followers_url":"https://api.github.com/users/rdkit/followers","following_url":"https://api.github.com/users/rdkit/following{/other_user}","gists_url":"https://api.github.com/users/rdkit/gists{/gist_id}","starred_url":"https://api.github.com/users/rdkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdkit/subscriptions","organizations_url":"https://api.github.com/users/rdkit/orgs","repos_url":"https://api.github.com/users/rdkit/repos","events_url":"https://api.github.com/users/rdkit/events{/privacy}","received_events_url":"https://api.github.com/users/rdkit/received_events","type":"Organization","site_admin":false},"repo":{"id":10009991,"name":"rdkit","full_name":"rdkit/rdkit","owner":{"login":"rdkit","id":2018047,"avatar_url":"https://avatars.githubusercontent.com/u/2018047?v=3","gravatar_id":"","url":"https://api.github.com/users/rdkit","html_url":"https://github.com/rdkit","followers_url":"https://api.github.com/users/rdkit/followers","following_url":"https://api.github.com/users/rdkit/following{/other_user}","gists_url":"https://api.github.com/users/rdkit/gists{/gist_id}","starred_url":"https://api.github.com/users/rdkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdkit/subscriptions","organizations_url":"https://api.github.com/users/rdkit/orgs","repos_url":"https://api.github.com/users/rdkit/repos","events_url":"https://api.github.com/users/rdkit/events{/privacy}","received_events_url":"https://api.github.com/users/rdkit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rdkit/rdkit","description":"The official sources for the RDKit library","fork":false,"url":"https://api.github.com/repos/rdkit/rdkit","forks_url":"https://api.github.com/repos/rdkit/rdkit/forks","keys_url":"https://api.github.com/repos/rdkit/rdkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rdkit/rdkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rdkit/rdkit/teams","hooks_url":"https://api.github.com/repos/rdkit/rdkit/hooks","issue_events_url":"https://api.github.com/repos/rdkit/rdkit/issues/events{/number}","events_url":"https://api.github.com/repos/rdkit/rdkit/events","assignees_url":"https://api.github.com/repos/rdkit/rdkit/assignees{/user}","branches_url":"https://api.github.com/repos/rdkit/rdkit/branches{/branch}","tags_url":"https://api.github.com/repos/rdkit/rdkit/tags","blobs_url":"https://api.github.com/repos/rdkit/rdkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rdkit/rdkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rdkit/rdkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/rdkit/rdkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rdkit/rdkit/statuses/{sha}","languages_url":"https://api.github.com/repos/rdkit/rdkit/languages","stargazers_url":"https://api.github.com/repos/rdkit/rdkit/stargazers","contributors_url":"https://api.github.com/repos/rdkit/rdkit/contributors","subscribers_url":"https://api.github.com/repos/rdkit/rdkit/subscribers","subscription_url":"https://api.github.com/repos/rdkit/rdkit/subscription","commits_url":"https://api.github.com/repos/rdkit/rdkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/rdkit/rdkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/rdkit/rdkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/rdkit/rdkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/rdkit/rdkit/contents/{+path}","compare_url":"https://api.github.com/repos/rdkit/rdkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rdkit/rdkit/merges","archive_url":"https://api.github.com/repos/rdkit/rdkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rdkit/rdkit/downloads","issues_url":"https://api.github.com/repos/rdkit/rdkit/issues{/number}","pulls_url":"https://api.github.com/repos/rdkit/rdkit/pulls{/number}","milestones_url":"https://api.github.com/repos/rdkit/rdkit/milestones{/number}","notifications_url":"https://api.github.com/repos/rdkit/rdkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rdkit/rdkit/labels{/name}","releases_url":"https://api.github.com/repos/rdkit/rdkit/releases{/id}","deployments_url":"https://api.github.com/repos/rdkit/rdkit/deployments","created_at":"2013-05-12T06:19:15Z","updated_at":"2016-04-26T06:28:52Z","pushed_at":"2016-04-27T09:09:07Z","git_url":"git://github.com/rdkit/rdkit.git","ssh_url":"git@github.com:rdkit/rdkit.git","clone_url":"https://github.com/rdkit/rdkit.git","svn_url":"https://github.com/rdkit/rdkit","homepage":"","size":103568,"stargazers_count":138,"watchers_count":138,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":132,"forks":96,"open_issues":132,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/885"},"html":{"href":"https://github.com/rdkit/rdkit/pull/885"},"issue":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/885"},"comments":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/885/comments"},"review_comments":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/885/comments"},"review_comment":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/885/commits"},"statuses":{"href":"https://api.github.com/repos/rdkit/rdkit/statuses/1199c9f2a8e51038af65cebf8a187ede9f23edb3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"greglandrum","id":540511,"avatar_url":"https://avatars.githubusercontent.com/u/540511?v=3","gravatar_id":"","url":"https://api.github.com/users/greglandrum","html_url":"https://github.com/greglandrum","followers_url":"https://api.github.com/users/greglandrum/followers","following_url":"https://api.github.com/users/greglandrum/following{/other_user}","gists_url":"https://api.github.com/users/greglandrum/gists{/gist_id}","starred_url":"https://api.github.com/users/greglandrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglandrum/subscriptions","organizations_url":"https://api.github.com/users/greglandrum/orgs","repos_url":"https://api.github.com/users/greglandrum/repos","events_url":"https://api.github.com/users/greglandrum/events{/privacy}","received_events_url":"https://api.github.com/users/greglandrum/received_events","type":"User","site_admin":false},"comments":2,"review_comments":8,"commits":6,"additions":616,"deletions":6,"changed_files":10}}