{"action":"created","comment":{"url":"https://api.github.com/repos/rdkit/rdkit/pulls/comments/92645724","pull_request_review_id":13165040,"id":92645724,"diff_hunk":"@@ -0,0 +1,131 @@\n+// $Id$\n+//\n+//  Copyright (C) 2001-2008 Greg Landrum and Rational Discovery LLC\n+//\n+//   @@ All Rights Reserved @@\n+//  This file is part of the RDKit.\n+//  The contents are covered by the terms of the BSD license\n+//  which is included in the file license.txt, found at the root\n+//  of the RDKit source tree.\n+//\n+#include \"AlignMolecules.h\"\n+#include <math.h>\n+#include <Geometry/Transform3D.h>\n+#include <Numerics/Vector.h>\n+#include <GraphMol/Substruct/SubstructMatch.h>\n+#include <GraphMol/Conformer.h>\n+#include <GraphMol/ROMol.h>\n+#include <Numerics/Alignment/AlignPoints.h>\n+#include <GraphMol/MolTransforms/MolTransforms.h>\n+\n+namespace RDKit {\n+namespace MolAlign {\n+\n+double getConformerRMS(ROMol &mol, unsigned int confId1, unsigned int confId2,\n+                       const std::vector<unsigned int> *atomIds,\n+                       bool prealigned) {\n+  if (!prealigned) {\n+    static const unsigned int confIds[] = {confId1, confId2};\n+    const std::vector<unsigned int> confIds2(\n+        confIds, confIds + sizeof(confIds) / sizeof(confIds[0]));\n+    MolAlign::alignMolConformers(mol, atomIds, &confIds2);\n+  }\n+\n+  const Conformer conf1 = mol.getConformer(confId1);\n+  const Conformer conf2 = mol.getConformer(confId2);\n+\n+  const size_t nAtoms = conf1.getNumAtoms();\n+  double ssr = 0.0;\n+  for (unsigned int i = 0; i < nAtoms; ++i) {\n+    RDGeom::Point3D v = conf1.getAtomPos(i) - conf2.getAtomPos(i);\n+    ssr += v.dotProduct(v);\n+  }\n+  ssr /= nAtoms;\n+  return sqrt(ssr);\n+}\n+\n+double getBestRMS(const ROMol &refMol, ROMol &prbMol, int refCid, int prbCid,\n+                  std::vector<MatchVectType> *atomMaps) {\n+  RDGeom::Point3DConstPtrVect refPoints, prbPoints;\n+\n+  if (!atomMaps || atomMaps->size() == 0) {","path":"Code/GraphMol/MolAlign/AlignMetrics.cpp","position":51,"original_position":51,"commit_id":"12755c305d56fcf86d86e475ecf4766ce5e4df07","original_commit_id":"12755c305d56fcf86d86e475ecf4766ce5e4df07","user":{"login":"gedeck","id":8720575,"avatar_url":"https://avatars.githubusercontent.com/u/8720575?v=3","gravatar_id":"","url":"https://api.github.com/users/gedeck","html_url":"https://github.com/gedeck","followers_url":"https://api.github.com/users/gedeck/followers","following_url":"https://api.github.com/users/gedeck/following{/other_user}","gists_url":"https://api.github.com/users/gedeck/gists{/gist_id}","starred_url":"https://api.github.com/users/gedeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gedeck/subscriptions","organizations_url":"https://api.github.com/users/gedeck/orgs","repos_url":"https://api.github.com/users/gedeck/repos","events_url":"https://api.github.com/users/gedeck/events{/privacy}","received_events_url":"https://api.github.com/users/gedeck/received_events","type":"User","site_admin":false},"body":"I have the second condition here, because of the way I solved the Python integration where I create an empty `std::vector<MatchVectType>` as default for missing atomMaps.","created_at":"2016-12-15T16:31:32Z","updated_at":"2016-12-15T16:43:52Z","html_url":"https://github.com/rdkit/rdkit/pull/1207#discussion_r92645724","pull_request_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1207","_links":{"self":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/comments/92645724"},"html":{"href":"https://github.com/rdkit/rdkit/pull/1207#discussion_r92645724"},"pull_request":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1207"}}},"pull_request":{"url":"https://api.github.com/repos/rdkit/rdkit/pulls/1207","id":98183485,"html_url":"https://github.com/rdkit/rdkit/pull/1207","diff_url":"https://github.com/rdkit/rdkit/pull/1207.diff","patch_url":"https://github.com/rdkit/rdkit/pull/1207.patch","issue_url":"https://api.github.com/repos/rdkit/rdkit/issues/1207","number":1207,"state":"open","locked":false,"title":"C++ implementation of GetBestRMS and GetConformerRMS","user":{"login":"gedeck","id":8720575,"avatar_url":"https://avatars.githubusercontent.com/u/8720575?v=3","gravatar_id":"","url":"https://api.github.com/users/gedeck","html_url":"https://github.com/gedeck","followers_url":"https://api.github.com/users/gedeck/followers","following_url":"https://api.github.com/users/gedeck/following{/other_user}","gists_url":"https://api.github.com/users/gedeck/gists{/gist_id}","starred_url":"https://api.github.com/users/gedeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gedeck/subscriptions","organizations_url":"https://api.github.com/users/gedeck/orgs","repos_url":"https://api.github.com/users/gedeck/repos","events_url":"https://api.github.com/users/gedeck/events{/privacy}","received_events_url":"https://api.github.com/users/gedeck/received_events","type":"User","site_admin":false},"body":"This is not a PR, but a request for comments. The Python tests still work, however the implementation is incomplete. I'll add a few comments where I have specific questions. ","created_at":"2016-12-15T16:26:21Z","updated_at":"2016-12-15T16:43:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff83f1fb6742ef4fe97680052de621442a00b43a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1207/commits","review_comments_url":"https://api.github.com/repos/rdkit/rdkit/pulls/1207/comments","review_comment_url":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/1207/comments","statuses_url":"https://api.github.com/repos/rdkit/rdkit/statuses/12755c305d56fcf86d86e475ecf4766ce5e4df07","head":{"label":"gedeck:gedeck-torsionFingerprints","ref":"gedeck-torsionFingerprints","sha":"12755c305d56fcf86d86e475ecf4766ce5e4df07","user":{"login":"gedeck","id":8720575,"avatar_url":"https://avatars.githubusercontent.com/u/8720575?v=3","gravatar_id":"","url":"https://api.github.com/users/gedeck","html_url":"https://github.com/gedeck","followers_url":"https://api.github.com/users/gedeck/followers","following_url":"https://api.github.com/users/gedeck/following{/other_user}","gists_url":"https://api.github.com/users/gedeck/gists{/gist_id}","starred_url":"https://api.github.com/users/gedeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gedeck/subscriptions","organizations_url":"https://api.github.com/users/gedeck/orgs","repos_url":"https://api.github.com/users/gedeck/repos","events_url":"https://api.github.com/users/gedeck/events{/privacy}","received_events_url":"https://api.github.com/users/gedeck/received_events","type":"User","site_admin":false},"repo":{"id":68383385,"name":"rdkit","full_name":"gedeck/rdkit","owner":{"login":"gedeck","id":8720575,"avatar_url":"https://avatars.githubusercontent.com/u/8720575?v=3","gravatar_id":"","url":"https://api.github.com/users/gedeck","html_url":"https://github.com/gedeck","followers_url":"https://api.github.com/users/gedeck/followers","following_url":"https://api.github.com/users/gedeck/following{/other_user}","gists_url":"https://api.github.com/users/gedeck/gists{/gist_id}","starred_url":"https://api.github.com/users/gedeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gedeck/subscriptions","organizations_url":"https://api.github.com/users/gedeck/orgs","repos_url":"https://api.github.com/users/gedeck/repos","events_url":"https://api.github.com/users/gedeck/events{/privacy}","received_events_url":"https://api.github.com/users/gedeck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gedeck/rdkit","description":"The official sources for the RDKit library","fork":true,"url":"https://api.github.com/repos/gedeck/rdkit","forks_url":"https://api.github.com/repos/gedeck/rdkit/forks","keys_url":"https://api.github.com/repos/gedeck/rdkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gedeck/rdkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gedeck/rdkit/teams","hooks_url":"https://api.github.com/repos/gedeck/rdkit/hooks","issue_events_url":"https://api.github.com/repos/gedeck/rdkit/issues/events{/number}","events_url":"https://api.github.com/repos/gedeck/rdkit/events","assignees_url":"https://api.github.com/repos/gedeck/rdkit/assignees{/user}","branches_url":"https://api.github.com/repos/gedeck/rdkit/branches{/branch}","tags_url":"https://api.github.com/repos/gedeck/rdkit/tags","blobs_url":"https://api.github.com/repos/gedeck/rdkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gedeck/rdkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gedeck/rdkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/gedeck/rdkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gedeck/rdkit/statuses/{sha}","languages_url":"https://api.github.com/repos/gedeck/rdkit/languages","stargazers_url":"https://api.github.com/repos/gedeck/rdkit/stargazers","contributors_url":"https://api.github.com/repos/gedeck/rdkit/contributors","subscribers_url":"https://api.github.com/repos/gedeck/rdkit/subscribers","subscription_url":"https://api.github.com/repos/gedeck/rdkit/subscription","commits_url":"https://api.github.com/repos/gedeck/rdkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/gedeck/rdkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/gedeck/rdkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/gedeck/rdkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/gedeck/rdkit/contents/{+path}","compare_url":"https://api.github.com/repos/gedeck/rdkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gedeck/rdkit/merges","archive_url":"https://api.github.com/repos/gedeck/rdkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gedeck/rdkit/downloads","issues_url":"https://api.github.com/repos/gedeck/rdkit/issues{/number}","pulls_url":"https://api.github.com/repos/gedeck/rdkit/pulls{/number}","milestones_url":"https://api.github.com/repos/gedeck/rdkit/milestones{/number}","notifications_url":"https://api.github.com/repos/gedeck/rdkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gedeck/rdkit/labels{/name}","releases_url":"https://api.github.com/repos/gedeck/rdkit/releases{/id}","deployments_url":"https://api.github.com/repos/gedeck/rdkit/deployments","created_at":"2016-09-16T13:46:05Z","updated_at":"2016-09-16T13:46:18Z","pushed_at":"2016-12-15T16:20:15Z","git_url":"git://github.com/gedeck/rdkit.git","ssh_url":"git@github.com:gedeck/rdkit.git","clone_url":"https://github.com/gedeck/rdkit.git","svn_url":"https://github.com/gedeck/rdkit","homepage":"","size":100638,"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":"0b173e583eeb3434576a122267e00f45500b5fb1","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-12-14T17:43:10Z","pushed_at":"2016-12-15T16:26:21Z","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":100515,"stargazers_count":192,"watchers_count":192,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":200,"forks":128,"open_issues":200,"watchers":192,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1207"},"html":{"href":"https://github.com/rdkit/rdkit/pull/1207"},"issue":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/1207"},"comments":{"href":"https://api.github.com/repos/rdkit/rdkit/issues/1207/comments"},"review_comments":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1207/comments"},"review_comment":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rdkit/rdkit/pulls/1207/commits"},"statuses":{"href":"https://api.github.com/repos/rdkit/rdkit/statuses/12755c305d56fcf86d86e475ecf4766ce5e4df07"}}}}
{"actor":{"display_login":"gedeck"}}