{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/57495888","id":57495888,"diff_hunk":"@@ -0,0 +1,236 @@\n+# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-\n+# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4\n+#\n+# MDAnalysis --- http://www.MDAnalysis.org\n+# Copyright (c) 2006-2015 Naveen Michaud-Agrawal, Elizabeth J. Denning, Oliver Beckstein\n+# and contributors (see AUTHORS for the full list)\n+#\n+# Released under the GNU Public Licence, v2 or any higher version\n+#\n+# Please cite your use of MDAnalysis in published work:\n+#\n+# N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein.\n+# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.\n+# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787\n+#\n+\"\"\"\n+Reading trajectories from memory --- :mod:`MDAnalysis.coordinates.array`\n+==========================================================================\n+\n+:Author: Wouter Boomsma\n+:Year: 2016\n+:Copyright: GNU Public License v2\n+:Maintainer: Wouter Boomsma <wb@bio.ku.dk>, wouterboomsma on github\n+\n+\n+.. versionadded:: 0.14.0\n+\n+The module contains a trajectory reader that operates on an array\n+in memory, rather than reading from file. This makes it possible to\n+use operate on raw coordinate using existing MDAnalysis tools. In\n+addition, it allows the user to make changes to the coordinates in\n+a trajectory (e.g. through AtomGroup.set_positions) without having\n+to write the entire state to file.\n+\n+\n+Examples\n+--------\n+\n+Constructing a Reader from an array\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+A simple example where a new universe is created from the\n+array extracted from a DCD timeseries\n+\n+    from MDAnalysis import Universe\n+    from MDAnalysisTests.datafiles import DCD, PDB_small\n+    from MDAnalysis.coordinates.array import ArrayReader\n+\n+    universe = Universe(PDB_small, DCD)\n+    coordinates = universe.trajectory.timeseries(universe.atoms)\n+\n+    universe2 = Universe(PDB_small, coordinates,\n+                         format=ArrayReader)\n+\n+\"\"\"\n+\n+import errno\n+import numpy as np\n+\n+from . import base\n+\n+\n+class ArrayReader(base.ProtoReader):\n+    \"\"\"\n+    A trajectory reader interface to a numpy array of the coordinates.\n+    For compatibility with the timeseries interface, support is provided for\n+    specifying the order of columns through the format option.\n+\n+    Parameter\n+    ---------\n+    filename : str\n+        filename of the trajectory\n+    n_atoms : int\n+        number of atoms to write\n+    convert_units : bool (optional)\n+        convert into MDAnalysis units\n+    precision : float (optional)\n+        set precision of saved trjactory to this number of decimal places.\n+    \"\"\"\n+\n+    format = 'array'\n+\n+    class ArrayTimestep(base.Timestep):\n+        \"\"\"\n+        Overrides the positions property in base.Timestep to\n+        use avoid duplication of the array.\n+        \"\"\"\n+\n+        @property\n+        def positions(self):\n+            return base.Timestep.positions.fget(self)\n+\n+        @positions.setter\n+        def positions(self, new):\n+            self.has_positions = True\n+            # Use reference to original rather than a copy\n+            self._pos = new\n+\n+    _Timestep = ArrayTimestep\n+\n+    def __init__(self, coordinate_array, format='afc', **kwargs):\n+        \"\"\"Constructor\n+\n+        :Arguments:","path":"package/MDAnalysis/coordinates/array.py","position":104,"original_position":104,"commit_id":"c539d54c586be1320fa171e1ff5b4b0ca03b0213","original_commit_id":"c539d54c586be1320fa171e1ff5b4b0ca03b0213","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":"NumPy style docs please.","created_at":"2016-03-25T21:57:33Z","updated_at":"2016-03-25T21:57:33Z","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/797#discussion_r57495888","pull_request_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/57495888"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/797#discussion_r57495888"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797"}}},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797","id":63853180,"html_url":"https://github.com/MDAnalysis/mdanalysis/pull/797","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/797.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/797.patch","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/797","number":797,"state":"open","locked":false,"title":"Inclusion of ENCORE into MDAnalysis","user":{"login":"mtiberti","id":3448904,"avatar_url":"https://avatars.githubusercontent.com/u/3448904?v=3","gravatar_id":"","url":"https://api.github.com/users/mtiberti","html_url":"https://github.com/mtiberti","followers_url":"https://api.github.com/users/mtiberti/followers","following_url":"https://api.github.com/users/mtiberti/following{/other_user}","gists_url":"https://api.github.com/users/mtiberti/gists{/gist_id}","starred_url":"https://api.github.com/users/mtiberti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtiberti/subscriptions","organizations_url":"https://api.github.com/users/mtiberti/orgs","repos_url":"https://api.github.com/users/mtiberti/repos","events_url":"https://api.github.com/users/mtiberti/events{/privacy}","received_events_url":"https://api.github.com/users/mtiberti/received_events","type":"User","site_admin":false},"body":"Fixes #\r\n\r\nChanges made in this Pull Request:\r\n- Added ArrayReader trajectory reader\r\n- Added encore module under MDAnalysis.analysis\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":"2016-03-23T09:34:02Z","updated_at":"2016-03-25T21:57:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b5e1f631b700918e47a17412cb9be2df3c26378","assignee":null,"milestone":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/8","html_url":"https://github.com/MDAnalysis/mdanalysis/milestones/0.15.0","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/8/labels","id":1591417,"number":8,"title":"0.15.0","description":"Fixes, enhancements and deprecations for the new topology system.","creator":{"login":"dotsdl","id":1326811,"avatar_url":"https://avatars.githubusercontent.com/u/1326811?v=3","gravatar_id":"","url":"https://api.github.com/users/dotsdl","html_url":"https://github.com/dotsdl","followers_url":"https://api.github.com/users/dotsdl/followers","following_url":"https://api.github.com/users/dotsdl/following{/other_user}","gists_url":"https://api.github.com/users/dotsdl/gists{/gist_id}","starred_url":"https://api.github.com/users/dotsdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotsdl/subscriptions","organizations_url":"https://api.github.com/users/dotsdl/orgs","repos_url":"https://api.github.com/users/dotsdl/repos","events_url":"https://api.github.com/users/dotsdl/events{/privacy}","received_events_url":"https://api.github.com/users/dotsdl/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":19,"state":"open","created_at":"2016-02-18T19:21:16Z","updated_at":"2016-03-23T13:08:27Z","due_on":"2016-04-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/797/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/c539d54c586be1320fa171e1ff5b4b0ca03b0213","head":{"label":"encore-similarity:feature-encore","ref":"feature-encore","sha":"c539d54c586be1320fa171e1ff5b4b0ca03b0213","user":{"login":"encore-similarity","id":12643350,"avatar_url":"https://avatars.githubusercontent.com/u/12643350?v=3","gravatar_id":"","url":"https://api.github.com/users/encore-similarity","html_url":"https://github.com/encore-similarity","followers_url":"https://api.github.com/users/encore-similarity/followers","following_url":"https://api.github.com/users/encore-similarity/following{/other_user}","gists_url":"https://api.github.com/users/encore-similarity/gists{/gist_id}","starred_url":"https://api.github.com/users/encore-similarity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/encore-similarity/subscriptions","organizations_url":"https://api.github.com/users/encore-similarity/orgs","repos_url":"https://api.github.com/users/encore-similarity/repos","events_url":"https://api.github.com/users/encore-similarity/events{/privacy}","received_events_url":"https://api.github.com/users/encore-similarity/received_events","type":"Organization","site_admin":false},"repo":{"id":50430108,"name":"mdanalysis","full_name":"encore-similarity/mdanalysis","owner":{"login":"encore-similarity","id":12643350,"avatar_url":"https://avatars.githubusercontent.com/u/12643350?v=3","gravatar_id":"","url":"https://api.github.com/users/encore-similarity","html_url":"https://github.com/encore-similarity","followers_url":"https://api.github.com/users/encore-similarity/followers","following_url":"https://api.github.com/users/encore-similarity/following{/other_user}","gists_url":"https://api.github.com/users/encore-similarity/gists{/gist_id}","starred_url":"https://api.github.com/users/encore-similarity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/encore-similarity/subscriptions","organizations_url":"https://api.github.com/users/encore-similarity/orgs","repos_url":"https://api.github.com/users/encore-similarity/repos","events_url":"https://api.github.com/users/encore-similarity/events{/privacy}","received_events_url":"https://api.github.com/users/encore-similarity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/encore-similarity/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":true,"url":"https://api.github.com/repos/encore-similarity/mdanalysis","forks_url":"https://api.github.com/repos/encore-similarity/mdanalysis/forks","keys_url":"https://api.github.com/repos/encore-similarity/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/encore-similarity/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/encore-similarity/mdanalysis/teams","hooks_url":"https://api.github.com/repos/encore-similarity/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/encore-similarity/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/encore-similarity/mdanalysis/events","assignees_url":"https://api.github.com/repos/encore-similarity/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/encore-similarity/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/encore-similarity/mdanalysis/tags","blobs_url":"https://api.github.com/repos/encore-similarity/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/encore-similarity/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/encore-similarity/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/encore-similarity/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/encore-similarity/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/encore-similarity/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/encore-similarity/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/encore-similarity/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/encore-similarity/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/encore-similarity/mdanalysis/subscription","commits_url":"https://api.github.com/repos/encore-similarity/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/encore-similarity/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/encore-similarity/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/encore-similarity/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/encore-similarity/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/encore-similarity/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/encore-similarity/mdanalysis/merges","archive_url":"https://api.github.com/repos/encore-similarity/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/encore-similarity/mdanalysis/downloads","issues_url":"https://api.github.com/repos/encore-similarity/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/encore-similarity/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/encore-similarity/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/encore-similarity/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/encore-similarity/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/encore-similarity/mdanalysis/releases{/id}","deployments_url":"https://api.github.com/repos/encore-similarity/mdanalysis/deployments","created_at":"2016-01-26T13:25:53Z","updated_at":"2016-01-26T13:25:58Z","pushed_at":"2016-03-24T20:09:37Z","git_url":"git://github.com/encore-similarity/mdanalysis.git","ssh_url":"git@github.com:encore-similarity/mdanalysis.git","clone_url":"https://github.com/encore-similarity/mdanalysis.git","svn_url":"https://github.com/encore-similarity/mdanalysis","homepage":"http://www.mdanalysis.org","size":237558,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"MDAnalysis:develop","ref":"develop","sha":"bddbd81c6e784aceb8d38b51b211ba1dce4c66bd","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}","deployments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/deployments","created_at":"2015-04-04T00:39:41Z","updated_at":"2016-03-25T12:06:21Z","pushed_at":"2016-03-25T17:22:34Z","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":261584,"stargazers_count":60,"watchers_count":60,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":101,"forks":47,"open_issues":101,"watchers":60,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/797"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/797"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/797/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/797/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/c539d54c586be1320fa171e1ff5b4b0ca03b0213"}}}}