{"action":"created","comment":{"url":"https://api.github.com/repos/rdkit/rdkit/pulls/comments/74642026","id":74642026,"diff_hunk":"@@ -92,10 +93,54 @@ std::vector<ROMOL_SPTR> replaceSubstructs(\n     \\return a copy of \\c mol with the non-matching atoms and bonds (if any)\n             removed and dummies at the connection points.\n */\n+\n+\n ROMol *replaceSidechains(const ROMol &mol, const ROMol &coreQuery,\n                          bool useChirality = false);\n \n //! \\brief Returns a copy of an ROMol with the atoms and bonds that\n+//!      are referenced by the MatchVector removed.\n+//!      MatchVector must be defined between mol and the specified core.\n+//!\n+//!   dummy atoms are left to indicate attachment points.\n+//!    These dummy atoms can be labeled either by the matching index\n+//!     in the query or by an arbitrary \"first match\" found.\n+//!    Additional matching options are given below.\n+//!\n+/*!\n+    Note that this is essentially identical to the replaceSidechains function,\n+   except we\n+    invert the query and replace the atoms that *do* match the query.\n+\n+    \\param mol            - the ROMol of interest\n+    \\param core           - the core being matched against\n+    \\param matchVect      - a matchVect of the type returned by Substructure Matching\n+    \\param replaceDummies - if set, atoms matching dummies in the core will also\n+   be replaced\n+    \\param labelByIndex  - if set, the dummy atoms at attachment points are\n+   labelled with the\n+                           index+1 of the corresponding atom in the core\n+    \\param requireDummyMatch - if set, only side chains that are connected to\n+   atoms in\n+                               the core that have attached dummies will be\n+   considered.\n+                               Molecules that have sidechains that are attached\n+                               at other points will be rejected (NULL returned).\n+    \\param useChirality - if set, match the coreQuery using chirality\n+\n+    \\return a copy of \\c mol with the non-matching atoms and bonds (if any)\n+            removed and dummies at the connection points. The client is\n+   responsible\n+            for deleting this molecule. If the core query is not matched, NULL\n+   is returned.\n+*/\n+ROMol *replaceCore(const ROMol &mol, const ROMol &core,","path":"Code/GraphMol/ChemTransforms/ChemTransforms.h","position":53,"original_position":53,"commit_id":"a590a4f9224b7adce56aaf6b17b5639d0e8b3db2","original_commit_id":"4d3cf5c7f13d3cd3fcf9b77db569d0ae078964a8","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":"Exactly ;) this logic is in the wrapper, should we support both in the main code?  Or just iterables over pairs or maps ( query-> atom )?","created_at":"2016-08-12T18:49:36Z","updated_at":"2016-08-12T18:49:37Z","html_url":"https://github.com/rdkit/rdkit/pull/1013#discussion_r74642026","pull_request_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1013","_links":{"self":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/comments/74642026"},"html":{"href":"https://github.com/rdkit/rdkit/pull/1013#discussion_r74642026"},"pull_request":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1013"}}},"pull_request":{"url":"https://api.github.com/repos/rdkit/rdkit/pulls/1013","id":80725285,"html_url":"https://github.com/rdkit/rdkit/pull/1013","diff_url":"https://github.com/rdkit/rdkit/pull/1013.diff","patch_url":"https://github.com/rdkit/rdkit/pull/1013.patch","issue_url":"https://api.github.com/repos/rdkit/rdkit/issues/1013","number":1013,"state":"open","locked":false,"title":"Adds replaceCore function that takes a matchVect","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":"","created_at":"2016-08-10T02:27:19Z","updated_at":"2016-08-12T18:49:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bfd4a0f0acb132b2b09000a241b3065a386c794","assignee":null,"assignees":[],"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":24,"closed_issues":33,"state":"open","created_at":"2016-03-22T17:35:18Z","updated_at":"2016-08-11T02:49:31Z","due_on":"2016-09-29T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1013/commits","review_comments_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1013/comments","review_comment_url":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/1013/comments","statuses_url":"https://api.github.com/repos/rdkit/rdkit/statuses/a590a4f9224b7adce56aaf6b17b5639d0e8b3db2","head":{"label":"bp-kelley:dev/replacecore-matchvect","ref":"dev/replacecore-matchvect","sha":"a590a4f9224b7adce56aaf6b17b5639d0e8b3db2","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-08-12T17:06:55Z","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":99046,"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":"dbe694bbee5b1a5a33e9cb5e87c382ed3e80e7e1","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-08-12T11:34:17Z","pushed_at":"2016-08-12T15:57:34Z","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":104767,"stargazers_count":158,"watchers_count":158,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":154,"forks":105,"open_issues":154,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1013"},"html":{"href":"https://github.com/rdkit/rdkit/pull/1013"},"issue":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/1013"},"comments":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/1013/comments"},"review_comments":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1013/comments"},"review_comment":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1013/commits"},"statuses":{"href":"https://api.github.com/repos/rdkit/rdkit/statuses/a590a4f9224b7adce56aaf6b17b5639d0e8b3db2"}}}}
{"actor":{"display_login":"bp-kelley"}}