{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/44553773","id":44553773,"diff_hunk":"@@ -63,12 +67,20 @@ def mindist(a, b, box):\n             return np.linalg.norm(x - np.rint(x / box) * box)\n \n         ref = mindist(a, b, box)\n-        val = MDAnalysis.lib.distances.distance_array(np.array([a]), np.array([b]), box)[0, 0]\n+        val = MDAnalysis.lib.distances.distance_array(np.array([a]), np.array([b]),\n+                                                      box=box, mode=self.mode)[0, 0]\n \n-        assert_almost_equal(val, ref, decimal=6, err_msg=\"Issue 151 not correct (PBC in distance array)\")\n+        assert_almost_equal(val, ref, decimal=6,\n+                            err_msg=\"Issue 151 not correct (PBC in distance array)\")\n \n+class TestDistanceArray_Serial(_TestDistanceArray):\n+    mode = \"serial\"\n \n-class TestDistanceArrayDCD(TestCase):\n+class TestDistanceArray_OpenMP(_TestDistanceArray):","path":"testsuite/MDAnalysisTests/test_distances.py","position":53,"original_position":53,"commit_id":"9c147cafb85c09b5b9161635ab24fbad75fc9b6e","original_commit_id":"9c147cafb85c09b5b9161635ab24fbad75fc9b6e","user":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"body":"I'm not 100% sure that travis will a) build in openmp and b) run with more than one thread (and find race conditions)\r\n\r\nBut it's still good to have the tests obviously","created_at":"2015-11-11T16:40:31Z","updated_at":"2015-11-11T16:40:31Z","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/529#discussion_r44553773","pull_request_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/44553773"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/529#discussion_r44553773"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529"}}},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529","id":50356182,"html_url":"https://github.com/MDAnalysis/mdanalysis/pull/529","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/529.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/529.patch","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/529","number":529,"state":"open","locked":false,"title":"enabled selecting between serial and OpenMP distance functions","user":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"body":"- all functions in lib.distances acquired the mode=<mode> keyword;\r\n  - \"serial\" selects the standard serial C/Cython code from lib._distances;\r\n  - \"OpenMP\" selects the OpenMP parallelized C/Cython code from\r\n    lib._distances_openmp\r\n- on systems without an OpenMP capable compiler, this will likely just mean\r\n  that the OpenMP versions are actually serial (the OpenMP pragma should\r\n  get ignored) --- need to be confirmed/tested\r\n- tests in test_distances were refactored so that both serial and OpenMP\r\n  versions are tested\r\n- the current implementation is not very pretty (see lib.distances.select())\r\n  but will make it very easy to add additional acceleration schemes such as\r\n  CUDA or numba as long as the call signatures of the calc_* functions remain\r\n  the same.","created_at":"2015-11-11T07:43:11Z","updated_at":"2015-11-11T16:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f14d35a049e0bd80dadb79bba2c7dcab9bdf05c4","assignee":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/529/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/9c147cafb85c09b5b9161635ab24fbad75fc9b6e","head":{"label":"MDAnalysis:feature-selectparallel","ref":"feature-selectparallel","sha":"9c147cafb85c09b5b9161635ab24fbad75fc9b6e","user":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"repo":{"id":33389183,"name":"mdanalysis","full_name":"MDAnalysis/mdanalysis","owner":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MDAnalysis/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":false,"url":"https://api.github.com/repos/MDAnalysis/mdanalysis","forks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/forks","keys_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/teams","hooks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/events","assignees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/tags","blobs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscription","commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/merges","archive_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/downloads","issues_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/releases{/id}","created_at":"2015-04-04T00:39:41Z","updated_at":"2015-11-06T15:54:37Z","pushed_at":"2015-11-11T07:43:11Z","git_url":"git://github.com/MDAnalysis/mdanalysis.git","ssh_url":"git@github.com:MDAnalysis/mdanalysis.git","clone_url":"https://github.com/MDAnalysis/mdanalysis.git","svn_url":"https://github.com/MDAnalysis/mdanalysis","homepage":"http://www.mdanalysis.org","size":202927,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":70,"forks":23,"open_issues":70,"watchers":42,"default_branch":"develop"}},"base":{"label":"MDAnalysis:develop","ref":"develop","sha":"d66927039e1357da34dfc10631d66254c2c2fff7","user":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"repo":{"id":33389183,"name":"mdanalysis","full_name":"MDAnalysis/mdanalysis","owner":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MDAnalysis/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":false,"url":"https://api.github.com/repos/MDAnalysis/mdanalysis","forks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/forks","keys_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/teams","hooks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/events","assignees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/tags","blobs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscription","commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/merges","archive_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/downloads","issues_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/releases{/id}","created_at":"2015-04-04T00:39:41Z","updated_at":"2015-11-06T15:54:37Z","pushed_at":"2015-11-11T07:43:11Z","git_url":"git://github.com/MDAnalysis/mdanalysis.git","ssh_url":"git@github.com:MDAnalysis/mdanalysis.git","clone_url":"https://github.com/MDAnalysis/mdanalysis.git","svn_url":"https://github.com/MDAnalysis/mdanalysis","homepage":"http://www.mdanalysis.org","size":202927,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":70,"forks":23,"open_issues":70,"watchers":42,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/529"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/529"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/9c147cafb85c09b5b9161635ab24fbad75fc9b6e"}}}}