{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/196465975","pull_request_review_id":130020196,"id":196465975,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjQ2NTk3NQ==","diff_hunk":"@@ -43,3 +43,28 @@ def test_transform_StoR_fail():\n \n     with pytest.raises(TypeError, match='S must be of type float32'):\n         r = mda.lib.distances.transform_StoR(s, box)\n+\n+def test_capped_distance_withpbc():\n+\tbox = np.array([1., 1., 1., 90., 90., 90.], dtype=np.float32)\n+\tpoint1 = np.array([0.1, 0.1, 0.1], dtype=np.float32)","path":"testsuite/MDAnalysisTests/lib/test_distances.py","position":7,"original_position":7,"commit_id":"ee6e6bde4f86f046504320543585b0dd46656c23","original_commit_id":"ee6e6bde4f86f046504320543585b0dd46656c23","user":{"login":"richardjgowers","id":9249543,"node_id":"MDQ6VXNlcjkyNDk1NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/9249543?v=4","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":"these tests aren't suitable.  the coordinates are nearly always going to be arrays of coords (ie shape `(n, 3)`) not single points.  If you need to, generate ~100 random coords with a fixed seed, do it the slow way with `distance_array` then check that this new method agrees.  Use a seed which ensures that the pbc option makes a difference and the results have meaningful size (ie not always 0/all)","created_at":"2018-06-19T15:12:14Z","updated_at":"2018-06-19T15:13:28Z","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/1941#discussion_r196465975","pull_request_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/196465975"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/1941#discussion_r196465975"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941"}}},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941","id":195057576,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDU3NTc2","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/1941","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/1941.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/1941.patch","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1941","number":1941,"state":"open","locked":false,"title":"Introduce Capped distances to evaluate the indices of pairs within a fixed radius","user":{"login":"ayushsuhane","id":34154224,"node_id":"MDQ6VXNlcjM0MTU0MjI0","avatar_url":"https://avatars3.githubusercontent.com/u/34154224?v=4","gravatar_id":"","url":"https://api.github.com/users/ayushsuhane","html_url":"https://github.com/ayushsuhane","followers_url":"https://api.github.com/users/ayushsuhane/followers","following_url":"https://api.github.com/users/ayushsuhane/following{/other_user}","gists_url":"https://api.github.com/users/ayushsuhane/gists{/gist_id}","starred_url":"https://api.github.com/users/ayushsuhane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayushsuhane/subscriptions","organizations_url":"https://api.github.com/users/ayushsuhane/orgs","repos_url":"https://api.github.com/users/ayushsuhane/repos","events_url":"https://api.github.com/users/ayushsuhane/events{/privacy}","received_events_url":"https://api.github.com/users/ayushsuhane/received_events","type":"User","site_admin":false},"body":"As discussed with @richardjgowers  and @jbarnoud , the main idea is to create a functionality which opens up the method to evaluate the distances, as an optional keyword, whereas the default way would be to switch to the best method automatically based on the performance rules obtained from the benchmarks.  Here, an initial functionality of capped distances is included using brute force method. The rules could be as simple as ``if len(selection) > 1000 `` or more complicated based on the cutoff radius. \r\n\r\nPR Checklist\r\n------------\r\n - [ ] Tests?\r\n - [ ] Docs?\r\n - [ ] CHANGELOG updated?\r\n - [ ] Issue raised/referenced?\r\n","created_at":"2018-06-15T01:27:20Z","updated_at":"2018-06-19T15:13:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2bdcf62b76db919fc0032d39523d4fdb8661073c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1941/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/ee6e6bde4f86f046504320543585b0dd46656c23","head":{"label":"ayushsuhane:cappedfeature","ref":"cappedfeature","sha":"ee6e6bde4f86f046504320543585b0dd46656c23","user":{"login":"ayushsuhane","id":34154224,"node_id":"MDQ6VXNlcjM0MTU0MjI0","avatar_url":"https://avatars3.githubusercontent.com/u/34154224?v=4","gravatar_id":"","url":"https://api.github.com/users/ayushsuhane","html_url":"https://github.com/ayushsuhane","followers_url":"https://api.github.com/users/ayushsuhane/followers","following_url":"https://api.github.com/users/ayushsuhane/following{/other_user}","gists_url":"https://api.github.com/users/ayushsuhane/gists{/gist_id}","starred_url":"https://api.github.com/users/ayushsuhane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayushsuhane/subscriptions","organizations_url":"https://api.github.com/users/ayushsuhane/orgs","repos_url":"https://api.github.com/users/ayushsuhane/repos","events_url":"https://api.github.com/users/ayushsuhane/events{/privacy}","received_events_url":"https://api.github.com/users/ayushsuhane/received_events","type":"User","site_admin":false},"repo":{"id":131820466,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE4MjA0NjY=","name":"mdanalysis","full_name":"ayushsuhane/mdanalysis","owner":{"login":"ayushsuhane","id":34154224,"node_id":"MDQ6VXNlcjM0MTU0MjI0","avatar_url":"https://avatars3.githubusercontent.com/u/34154224?v=4","gravatar_id":"","url":"https://api.github.com/users/ayushsuhane","html_url":"https://github.com/ayushsuhane","followers_url":"https://api.github.com/users/ayushsuhane/followers","following_url":"https://api.github.com/users/ayushsuhane/following{/other_user}","gists_url":"https://api.github.com/users/ayushsuhane/gists{/gist_id}","starred_url":"https://api.github.com/users/ayushsuhane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayushsuhane/subscriptions","organizations_url":"https://api.github.com/users/ayushsuhane/orgs","repos_url":"https://api.github.com/users/ayushsuhane/repos","events_url":"https://api.github.com/users/ayushsuhane/events{/privacy}","received_events_url":"https://api.github.com/users/ayushsuhane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ayushsuhane/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":true,"url":"https://api.github.com/repos/ayushsuhane/mdanalysis","forks_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/forks","keys_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/teams","hooks_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/events","assignees_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/tags","blobs_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/subscription","commits_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/merges","archive_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/downloads","issues_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/releases{/id}","deployments_url":"https://api.github.com/repos/ayushsuhane/mdanalysis/deployments","created_at":"2018-05-02T08:22:15Z","updated_at":"2018-06-15T00:30:32Z","pushed_at":"2018-06-19T08:43:34Z","git_url":"git://github.com/ayushsuhane/mdanalysis.git","ssh_url":"git@github.com:ayushsuhane/mdanalysis.git","clone_url":"https://github.com/ayushsuhane/mdanalysis.git","svn_url":"https://github.com/ayushsuhane/mdanalysis","homepage":"https://mdanalysis.org","size":199859,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"MDAnalysis:develop","ref":"develop","sha":"44631d040deef932bdb2e1c52b3ac457dd89684b","user":{"login":"MDAnalysis","id":11445951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDQ1OTUx","avatar_url":"https://avatars1.githubusercontent.com/u/11445951?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkzMzM4OTE4Mw==","name":"mdanalysis","full_name":"MDAnalysis/mdanalysis","owner":{"login":"MDAnalysis","id":11445951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNDQ1OTUx","avatar_url":"https://avatars1.githubusercontent.com/u/11445951?v=4","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}","deployments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/deployments","created_at":"2015-04-04T00:39:41Z","updated_at":"2018-06-16T19:19:52Z","pushed_at":"2018-06-19T14:13:25Z","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":"https://mdanalysis.org","size":201895,"stargazers_count":206,"watchers_count":206,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":121,"mirror_url":null,"archived":false,"open_issues_count":166,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":121,"open_issues":166,"watchers":206,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/1941"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1941"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1941/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1941/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/ee6e6bde4f86f046504320543585b0dd46656c23"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"richardjgowers"}}