{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/191870141","pull_request_review_id":124529033,"id":191870141,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MTg3MDE0MQ==","diff_hunk":"@@ -1741,7 +1746,40 @@ def get_aux_descriptions(self, auxnames=None):\n             auxnames = self.aux_list\n         descriptions = [self._auxs[aux].get_description() for aux in auxnames]\n         return descriptions\n-\n+    \n+    def add_transformation(self, transname, transform):\n+        \"\"\" Add a transformation to be applied to the trajectory\n+        \n+        Documentation will be added here\n+        \n+        See Also\n+        --------\n+        :meth:`remove_transformation`\n+        \"\"\"\n+        self._transforms[transname] = transform\n+        self.ts = transform(self.ts)\n+        # call reader here to apply the newly added transformation on the\n+        # current loaded frame?\n+    \n+    def remove_transformation(self, transname):\n+        \"\"\" Remove a transformation from the workflow\n+        Documentation will be added here\n+        \n+        See Also\n+        --------\n+        :meth:`add_trasnformation`\n+        \"\"\"\n+        try:\n+            del self._transforms[transname]\n+        except:","path":"package/MDAnalysis/coordinates/base.py","position":null,"original_position":74,"commit_id":"c02ac13143bd4574f850f8da16ec95747c57751b","original_commit_id":"042c537fd8cea3bd1630292e031085757221c1b4","user":{"login":"davidercruz","id":37750297,"node_id":"MDQ6VXNlcjM3NzUwMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/37750297?v=4","gravatar_id":"","url":"https://api.github.com/users/davidercruz","html_url":"https://github.com/davidercruz","followers_url":"https://api.github.com/users/davidercruz/followers","following_url":"https://api.github.com/users/davidercruz/following{/other_user}","gists_url":"https://api.github.com/users/davidercruz/gists{/gist_id}","starred_url":"https://api.github.com/users/davidercruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidercruz/subscriptions","organizations_url":"https://api.github.com/users/davidercruz/orgs","repos_url":"https://api.github.com/users/davidercruz/repos","events_url":"https://api.github.com/users/davidercruz/events{/privacy}","received_events_url":"https://api.github.com/users/davidercruz/received_events","type":"User","site_admin":false},"body":"This file is outdated.","created_at":"2018-05-30T18:14:34Z","updated_at":"2018-05-30T18:14:34Z","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/1902#discussion_r191870141","pull_request_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/191870141"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/1902#discussion_r191870141"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902"}},"in_reply_to_id":189340632},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902","id":188799735,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg4Nzk5NzM1","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/1902","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/1902.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/1902.patch","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1902","number":1902,"state":"open","locked":false,"title":"barebones working prototype of trajectory transformations","user":{"login":"davidercruz","id":37750297,"node_id":"MDQ6VXNlcjM3NzUwMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/37750297?v=4","gravatar_id":"","url":"https://api.github.com/users/davidercruz","html_url":"https://github.com/davidercruz","followers_url":"https://api.github.com/users/davidercruz/followers","following_url":"https://api.github.com/users/davidercruz/following{/other_user}","gists_url":"https://api.github.com/users/davidercruz/gists{/gist_id}","starred_url":"https://api.github.com/users/davidercruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidercruz/subscriptions","organizations_url":"https://api.github.com/users/davidercruz/orgs","repos_url":"https://api.github.com/users/davidercruz/repos","events_url":"https://api.github.com/users/davidercruz/events{/privacy}","received_events_url":"https://api.github.com/users/davidercruz/received_events","type":"User","site_admin":false},"body":"WIP of #786 \r\n\r\nChanges made in this Pull Request:\r\n - transformations hooks are there\r\n - a simple translation of coordinates by a given vector\r\n\r\nHey, this is my first commit for my GSOC project. The transformations are alive :tada: \r\n\r\nFrom our talks, transformations would be given by name, for example:\r\n```Python\r\nimport MDAnalysis as mda\r\n\r\nu = mda.Universe(PSF, DCD)\r\nu.trajectory.add_transformation(translate(1, 2, 3))\r\n# u.trajectory.ts.positions are updated for that frame\r\n```\r\nIn this implementation I chose to do it as follows:\r\n```Python\r\nimport MDAnalysis as mda\r\n\r\nu = mda.Universe(PSF, DCD)\r\nu.trajectory.add_transformation(mda.transformations.translate, (1, 2, 3))\r\n```\r\nAlthough it is more keyboard intensive to the user, it helps the user know which transformations are implemented and it allows code auto-completion (when the editor allows it). The main disadvantage is that repeating types of transformations ( two translate routines for example) are not allowed, but that is a question of changing the OrderedDict to a list of lists and updating the code accordingly.\r\n\r\nThe translation routine needs some routines to repack the atoms in the unit cell.\r\n\r\nI need your input on checks that are missing, issues and your feedback on this approach to implement on-the-fly trajectory transformations.\r\n\r\nCheers\r\n\r\n\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-05-17T16:51:57Z","updated_at":"2018-05-30T18:14:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d23ed54b2d50e11318efeddaf7f299654335e1d8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":276200326,"node_id":"MDU6TGFiZWwyNzYyMDAzMjY=","url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Work%20in%20progress","name":"Work in progress","color":"e11d21","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1902/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/c02ac13143bd4574f850f8da16ec95747c57751b","head":{"label":"davidercruz:develop","ref":"develop","sha":"c02ac13143bd4574f850f8da16ec95747c57751b","user":{"login":"davidercruz","id":37750297,"node_id":"MDQ6VXNlcjM3NzUwMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/37750297?v=4","gravatar_id":"","url":"https://api.github.com/users/davidercruz","html_url":"https://github.com/davidercruz","followers_url":"https://api.github.com/users/davidercruz/followers","following_url":"https://api.github.com/users/davidercruz/following{/other_user}","gists_url":"https://api.github.com/users/davidercruz/gists{/gist_id}","starred_url":"https://api.github.com/users/davidercruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidercruz/subscriptions","organizations_url":"https://api.github.com/users/davidercruz/orgs","repos_url":"https://api.github.com/users/davidercruz/repos","events_url":"https://api.github.com/users/davidercruz/events{/privacy}","received_events_url":"https://api.github.com/users/davidercruz/received_events","type":"User","site_admin":false},"repo":{"id":126631190,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY2MzExOTA=","name":"mdanalysis","full_name":"davidercruz/mdanalysis","owner":{"login":"davidercruz","id":37750297,"node_id":"MDQ6VXNlcjM3NzUwMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/37750297?v=4","gravatar_id":"","url":"https://api.github.com/users/davidercruz","html_url":"https://github.com/davidercruz","followers_url":"https://api.github.com/users/davidercruz/followers","following_url":"https://api.github.com/users/davidercruz/following{/other_user}","gists_url":"https://api.github.com/users/davidercruz/gists{/gist_id}","starred_url":"https://api.github.com/users/davidercruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidercruz/subscriptions","organizations_url":"https://api.github.com/users/davidercruz/orgs","repos_url":"https://api.github.com/users/davidercruz/repos","events_url":"https://api.github.com/users/davidercruz/events{/privacy}","received_events_url":"https://api.github.com/users/davidercruz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidercruz/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":true,"url":"https://api.github.com/repos/davidercruz/mdanalysis","forks_url":"https://api.github.com/repos/davidercruz/mdanalysis/forks","keys_url":"https://api.github.com/repos/davidercruz/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidercruz/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidercruz/mdanalysis/teams","hooks_url":"https://api.github.com/repos/davidercruz/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/davidercruz/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/davidercruz/mdanalysis/events","assignees_url":"https://api.github.com/repos/davidercruz/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/davidercruz/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/davidercruz/mdanalysis/tags","blobs_url":"https://api.github.com/repos/davidercruz/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidercruz/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidercruz/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidercruz/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidercruz/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/davidercruz/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/davidercruz/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/davidercruz/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/davidercruz/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/davidercruz/mdanalysis/subscription","commits_url":"https://api.github.com/repos/davidercruz/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidercruz/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidercruz/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidercruz/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidercruz/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/davidercruz/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidercruz/mdanalysis/merges","archive_url":"https://api.github.com/repos/davidercruz/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidercruz/mdanalysis/downloads","issues_url":"https://api.github.com/repos/davidercruz/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/davidercruz/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/davidercruz/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/davidercruz/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidercruz/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/davidercruz/mdanalysis/releases{/id}","deployments_url":"https://api.github.com/repos/davidercruz/mdanalysis/deployments","created_at":"2018-03-24T19:01:05Z","updated_at":"2018-05-30T17:58:58Z","pushed_at":"2018-05-30T17:58:56Z","git_url":"git://github.com/davidercruz/mdanalysis.git","ssh_url":"git@github.com:davidercruz/mdanalysis.git","clone_url":"https://github.com/davidercruz/mdanalysis.git","svn_url":"https://github.com/davidercruz/mdanalysis","homepage":"https://mdanalysis.org","size":196587,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"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":"2e9db81a2ea2fb38b823cfbd33cdf37b9c898264","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-05-25T19:55:25Z","pushed_at":"2018-05-30T17:58:58Z","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":201566,"stargazers_count":203,"watchers_count":203,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":157,"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":115,"open_issues":157,"watchers":203,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/1902"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1902"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/1902/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/1902/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/c02ac13143bd4574f850f8da16ec95747c57751b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"davidercruz"}}