{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/comments/296968866","pull_request_review_id":253721677,"id":296968866,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5Njk2ODg2Ng==","diff_hunk":"@@ -0,0 +1,158 @@\n+import numpy as np\n+import MDAnalysis as mda\n+import pmda\n+import dask\n+from dask.delayed import delayed\n+import time\n+from joblib import cpu_count\n+from pmda.parallel import ParallelAnalysisBase\n+from pmda.util import timeit\n+\n+class RMSF(ParallelAnalysisBase):\n+    \"\"\"Parallel RMSF analysis.\n+\n+    Attributes\n+    ----------\n+    Parameters\n+    ----------\n+\n+    Note\n+    ----\n+    At the moment, this class doesn't do anything.\n+    \"\"\"\n+\n+    def __init__(self, atomgroup):\n+        u = atomgroup.universe\n+        super(RMSF, self).__init__(u, (atomgroup,))\n+        self._atomgroup = atomgroup\n+        self._top = u.filename\n+        self._traj = u.trajectory.filename\n+\n+    def _prepare(self):\n+        self.sumsquares = np.zeros((self._atomgroup.n_atoms, 3))\n+        self.mean = np.zeros((self._atomgroup.n_atoms, 3))\n+\n+    def _single_frame(self, ts, agroups, frame_index, sumsquares, mean):\n+        \"\"\"\n+        Called for every frame.\n+\n+        Parameters\n+        ----------\n+        ts : int\n+            current time step\n+        agroups :\n+            tuple of atomgroups that are updated to the current frame\n+\n+        Returns result of RMSF function for a single frame.\n+        \"\"\"\n+        k = frame_index\n+        # self.sumsquares += (k / (k+1)) * (self.atomgroup.positions - self.mean) ** 2\n+        sumsquares += (k / (k+1)) * (agroups.positions - mean) ** 2\n+        mean = (k * mean + agroups.positions) / (k + 1)\n+        return sumsquares, mean\n+\n+    def run(self,\n+                start=None,\n+                stop=None,\n+                step=None,\n+                n_jobs=-1,\n+                n_blocks=1,\n+                cutoff=15.0):","path":"pmda/rmsf.py","position":60,"original_position":60,"commit_id":"6c4493a42fb7a6df867fae64d469080b4a633c32","original_commit_id":"6c4493a42fb7a6df867fae64d469080b4a633c32","user":{"login":"VOD555","id":27674287,"node_id":"MDQ6VXNlcjI3Njc0Mjg3","avatar_url":"https://avatars0.githubusercontent.com/u/27674287?v=4","gravatar_id":"","url":"https://api.github.com/users/VOD555","html_url":"https://github.com/VOD555","followers_url":"https://api.github.com/users/VOD555/followers","following_url":"https://api.github.com/users/VOD555/following{/other_user}","gists_url":"https://api.github.com/users/VOD555/gists{/gist_id}","starred_url":"https://api.github.com/users/VOD555/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VOD555/subscriptions","organizations_url":"https://api.github.com/users/VOD555/orgs","repos_url":"https://api.github.com/users/VOD555/repos","events_url":"https://api.github.com/users/VOD555/events{/privacy}","received_events_url":"https://api.github.com/users/VOD555/received_events","type":"User","site_admin":false},"body":"Remove `cutoff`, it's the input for `pmda.rdf`.","created_at":"2019-06-25T00:50:53Z","updated_at":"2019-06-25T00:52:07Z","html_url":"https://github.com/MDAnalysis/pmda/pull/92#discussion_r296968866","pull_request_url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/comments/296968866"},"html":{"href":"https://github.com/MDAnalysis/pmda/pull/92#discussion_r296968866"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92","id":291229788,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkxMjI5Nzg4","html_url":"https://github.com/MDAnalysis/pmda/pull/92","diff_url":"https://github.com/MDAnalysis/pmda/pull/92.diff","patch_url":"https://github.com/MDAnalysis/pmda/pull/92.patch","issue_url":"https://api.github.com/repos/MDAnalysis/pmda/issues/92","number":92,"state":"open","locked":false,"title":"Add rmsf","user":{"login":"nawtrey","id":46797896,"node_id":"MDQ6VXNlcjQ2Nzk3ODk2","avatar_url":"https://avatars0.githubusercontent.com/u/46797896?v=4","gravatar_id":"","url":"https://api.github.com/users/nawtrey","html_url":"https://github.com/nawtrey","followers_url":"https://api.github.com/users/nawtrey/followers","following_url":"https://api.github.com/users/nawtrey/following{/other_user}","gists_url":"https://api.github.com/users/nawtrey/gists{/gist_id}","starred_url":"https://api.github.com/users/nawtrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nawtrey/subscriptions","organizations_url":"https://api.github.com/users/nawtrey/orgs","repos_url":"https://api.github.com/users/nawtrey/repos","events_url":"https://api.github.com/users/nawtrey/events{/privacy}","received_events_url":"https://api.github.com/users/nawtrey/received_events","type":"User","site_admin":false},"body":"Fixes #90\r\n\r\nChanges made in this Pull Request:\r\n - Added parallel rmsf script\r\n\r\n\r\nPR Checklist\r\n------------\r\n - [ ] Tests?\r\n - [ ] Docs?\r\n - [ ] CHANGELOG updated?\r\n - [x] Issue raised/referenced?\r\n","created_at":"2019-06-24T17:35:36Z","updated_at":"2019-06-25T00:52:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"309fe57f4ac7e50269fb5fc84f2cf8a489b185ee","assignee":null,"assignees":[],"requested_reviewers":[{"login":"orbeckst","id":237980,"node_id":"MDQ6VXNlcjIzNzk4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/237980?v=4","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}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/pmda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/pmda/issues/92/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/pmda/statuses/6c4493a42fb7a6df867fae64d469080b4a633c32","head":{"label":"nawtrey:pRMSF","ref":"pRMSF","sha":"6c4493a42fb7a6df867fae64d469080b4a633c32","user":{"login":"nawtrey","id":46797896,"node_id":"MDQ6VXNlcjQ2Nzk3ODk2","avatar_url":"https://avatars0.githubusercontent.com/u/46797896?v=4","gravatar_id":"","url":"https://api.github.com/users/nawtrey","html_url":"https://github.com/nawtrey","followers_url":"https://api.github.com/users/nawtrey/followers","following_url":"https://api.github.com/users/nawtrey/following{/other_user}","gists_url":"https://api.github.com/users/nawtrey/gists{/gist_id}","starred_url":"https://api.github.com/users/nawtrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nawtrey/subscriptions","organizations_url":"https://api.github.com/users/nawtrey/orgs","repos_url":"https://api.github.com/users/nawtrey/repos","events_url":"https://api.github.com/users/nawtrey/events{/privacy}","received_events_url":"https://api.github.com/users/nawtrey/received_events","type":"User","site_admin":false},"repo":{"id":193548949,"node_id":"MDEwOlJlcG9zaXRvcnkxOTM1NDg5NDk=","name":"pmda","full_name":"nawtrey/pmda","private":false,"owner":{"login":"nawtrey","id":46797896,"node_id":"MDQ6VXNlcjQ2Nzk3ODk2","avatar_url":"https://avatars0.githubusercontent.com/u/46797896?v=4","gravatar_id":"","url":"https://api.github.com/users/nawtrey","html_url":"https://github.com/nawtrey","followers_url":"https://api.github.com/users/nawtrey/followers","following_url":"https://api.github.com/users/nawtrey/following{/other_user}","gists_url":"https://api.github.com/users/nawtrey/gists{/gist_id}","starred_url":"https://api.github.com/users/nawtrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nawtrey/subscriptions","organizations_url":"https://api.github.com/users/nawtrey/orgs","repos_url":"https://api.github.com/users/nawtrey/repos","events_url":"https://api.github.com/users/nawtrey/events{/privacy}","received_events_url":"https://api.github.com/users/nawtrey/received_events","type":"User","site_admin":false},"html_url":"https://github.com/nawtrey/pmda","description":"Parallel algorithms for MDAnalysis","fork":true,"url":"https://api.github.com/repos/nawtrey/pmda","forks_url":"https://api.github.com/repos/nawtrey/pmda/forks","keys_url":"https://api.github.com/repos/nawtrey/pmda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nawtrey/pmda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nawtrey/pmda/teams","hooks_url":"https://api.github.com/repos/nawtrey/pmda/hooks","issue_events_url":"https://api.github.com/repos/nawtrey/pmda/issues/events{/number}","events_url":"https://api.github.com/repos/nawtrey/pmda/events","assignees_url":"https://api.github.com/repos/nawtrey/pmda/assignees{/user}","branches_url":"https://api.github.com/repos/nawtrey/pmda/branches{/branch}","tags_url":"https://api.github.com/repos/nawtrey/pmda/tags","blobs_url":"https://api.github.com/repos/nawtrey/pmda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nawtrey/pmda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nawtrey/pmda/git/refs{/sha}","trees_url":"https://api.github.com/repos/nawtrey/pmda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nawtrey/pmda/statuses/{sha}","languages_url":"https://api.github.com/repos/nawtrey/pmda/languages","stargazers_url":"https://api.github.com/repos/nawtrey/pmda/stargazers","contributors_url":"https://api.github.com/repos/nawtrey/pmda/contributors","subscribers_url":"https://api.github.com/repos/nawtrey/pmda/subscribers","subscription_url":"https://api.github.com/repos/nawtrey/pmda/subscription","commits_url":"https://api.github.com/repos/nawtrey/pmda/commits{/sha}","git_commits_url":"https://api.github.com/repos/nawtrey/pmda/git/commits{/sha}","comments_url":"https://api.github.com/repos/nawtrey/pmda/comments{/number}","issue_comment_url":"https://api.github.com/repos/nawtrey/pmda/issues/comments{/number}","contents_url":"https://api.github.com/repos/nawtrey/pmda/contents/{+path}","compare_url":"https://api.github.com/repos/nawtrey/pmda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nawtrey/pmda/merges","archive_url":"https://api.github.com/repos/nawtrey/pmda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nawtrey/pmda/downloads","issues_url":"https://api.github.com/repos/nawtrey/pmda/issues{/number}","pulls_url":"https://api.github.com/repos/nawtrey/pmda/pulls{/number}","milestones_url":"https://api.github.com/repos/nawtrey/pmda/milestones{/number}","notifications_url":"https://api.github.com/repos/nawtrey/pmda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nawtrey/pmda/labels{/name}","releases_url":"https://api.github.com/repos/nawtrey/pmda/releases{/id}","deployments_url":"https://api.github.com/repos/nawtrey/pmda/deployments","created_at":"2019-06-24T17:23:33Z","updated_at":"2019-06-24T17:23:35Z","pushed_at":"2019-06-25T00:06:06Z","git_url":"git://github.com/nawtrey/pmda.git","ssh_url":"git@github.com:nawtrey/pmda.git","clone_url":"https://github.com/nawtrey/pmda.git","svn_url":"https://github.com/nawtrey/pmda","homepage":"https://www.mdanalysis.org/pmda/","size":821,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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":"master"}},"base":{"label":"MDAnalysis:master","ref":"master","sha":"29e98369e76cdb596d688a83a8a6b0add9dada38","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":106346721,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNDY3MjE=","name":"pmda","full_name":"MDAnalysis/pmda","private":false,"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},"html_url":"https://github.com/MDAnalysis/pmda","description":"Parallel algorithms for MDAnalysis","fork":false,"url":"https://api.github.com/repos/MDAnalysis/pmda","forks_url":"https://api.github.com/repos/MDAnalysis/pmda/forks","keys_url":"https://api.github.com/repos/MDAnalysis/pmda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MDAnalysis/pmda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MDAnalysis/pmda/teams","hooks_url":"https://api.github.com/repos/MDAnalysis/pmda/hooks","issue_events_url":"https://api.github.com/repos/MDAnalysis/pmda/issues/events{/number}","events_url":"https://api.github.com/repos/MDAnalysis/pmda/events","assignees_url":"https://api.github.com/repos/MDAnalysis/pmda/assignees{/user}","branches_url":"https://api.github.com/repos/MDAnalysis/pmda/branches{/branch}","tags_url":"https://api.github.com/repos/MDAnalysis/pmda/tags","blobs_url":"https://api.github.com/repos/MDAnalysis/pmda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MDAnalysis/pmda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MDAnalysis/pmda/git/refs{/sha}","trees_url":"https://api.github.com/repos/MDAnalysis/pmda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MDAnalysis/pmda/statuses/{sha}","languages_url":"https://api.github.com/repos/MDAnalysis/pmda/languages","stargazers_url":"https://api.github.com/repos/MDAnalysis/pmda/stargazers","contributors_url":"https://api.github.com/repos/MDAnalysis/pmda/contributors","subscribers_url":"https://api.github.com/repos/MDAnalysis/pmda/subscribers","subscription_url":"https://api.github.com/repos/MDAnalysis/pmda/subscription","commits_url":"https://api.github.com/repos/MDAnalysis/pmda/commits{/sha}","git_commits_url":"https://api.github.com/repos/MDAnalysis/pmda/git/commits{/sha}","comments_url":"https://api.github.com/repos/MDAnalysis/pmda/comments{/number}","issue_comment_url":"https://api.github.com/repos/MDAnalysis/pmda/issues/comments{/number}","contents_url":"https://api.github.com/repos/MDAnalysis/pmda/contents/{+path}","compare_url":"https://api.github.com/repos/MDAnalysis/pmda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MDAnalysis/pmda/merges","archive_url":"https://api.github.com/repos/MDAnalysis/pmda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MDAnalysis/pmda/downloads","issues_url":"https://api.github.com/repos/MDAnalysis/pmda/issues{/number}","pulls_url":"https://api.github.com/repos/MDAnalysis/pmda/pulls{/number}","milestones_url":"https://api.github.com/repos/MDAnalysis/pmda/milestones{/number}","notifications_url":"https://api.github.com/repos/MDAnalysis/pmda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MDAnalysis/pmda/labels{/name}","releases_url":"https://api.github.com/repos/MDAnalysis/pmda/releases{/id}","deployments_url":"https://api.github.com/repos/MDAnalysis/pmda/deployments","created_at":"2017-10-09T23:46:26Z","updated_at":"2019-06-21T08:25:38Z","pushed_at":"2019-06-25T00:06:07Z","git_url":"git://github.com/MDAnalysis/pmda.git","ssh_url":"git@github.com:MDAnalysis/pmda.git","clone_url":"https://github.com/MDAnalysis/pmda.git","svn_url":"https://github.com/MDAnalysis/pmda","homepage":"https://www.mdanalysis.org/pmda/","size":829,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":18,"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":8,"open_issues":18,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92"},"html":{"href":"https://github.com/MDAnalysis/pmda/pull/92"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/pmda/issues/92"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/pmda/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/pmda/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/pmda/statuses/6c4493a42fb7a6df867fae64d469080b4a633c32"}},"author_association":"NONE"}}
{"actor":{"display_login":"VOD555"}}