GitHub PullRequestReviewCommentEvent at 2014-10-29 19:50:38
Repository: mdtraj
Actor: kyleabeauchamp
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/comments/19566837","id":19566837,"diff_hunk":"@@ -0,0 +1,418 @@\n+##############################################################################\n+# MDTraj: A Python Library for Loading, Saving, and Manipulating\n+#         Molecular Dynamics Trajectories.\n+# Copyright 2012-2013 Stanford University and the Authors\n+#\n+# Authors: Christoph Klein\n+# Contributors:\n+#\n+# MDTraj is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU Lesser General Public License as\n+# published by the Free Software Foundation, either version 2.1\n+# of the License, or (at your option) any later version.\n+#\n+# This library is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU Lesser General Public License for more details.\n+#\n+# You should have received a copy of the GNU Lesser General Public\n+# License along with MDTraj. If not, see <http://www.gnu.org/licenses/>.\n+##############################################################################\n+\n+\n+##############################################################################\n+# Imports\n+##############################################################################\n+\n+from __future__ import print_function, division\n+\n+import os\n+import itertools\n+\n+import numpy as np\n+\n+from mdtraj.utils import ensure_type, cast_indices, in_units_of\n+from mdtraj.formats.registry import _FormatRegistry\n+from mdtraj.utils.six import string_types\n+from mdtraj.utils.six.moves import xrange\n+\n+__all__ = ['LAMMPSTrajectoryFile', 'load_lammpstrj']\n+\n+\n+class _EOF(IOError):\n+    pass\n+\n+\n+@_FormatRegistry.register_loader('.lammpstrj')\n+def load_lammpstrj(filename, top=None, stride=None, atom_indices=None,\n+                   frame=None, unit_set='real'):\n+    \"\"\"Load a LAMMPS trajectory file.\n+\n+    Parameters\n+    ----------\n+    filename : str\n+        String filename of LAMMPS trajectory file.\n+    top : {str, Trajectory, Topology}\n+        The lammpstrj format does not contain topology information. Pass in\n+        either the path to a pdb file, a trajectory, or a topology to supply\n+        this information.\n+    stride : int, default=None\n+        Only read every stride-th frame\n+    atom_indices : array_like, optional\n+        If not none, then read only a subset of the atoms coordinates from the\n+        file.\n+    frame : int, optional\n+        Use this option to load only a single frame from a trajectory on disk.\n+        If frame is None, the default, the entire trajectory will be loaded.\n+        If supplied, ``stride`` will be ignored.\n+    unit_set : str, optional\n+        The LAMMPS unit set that the simulation was performed in. See\n+        http://lammps.sandia.gov/doc/units.html for options. Currently supported\n+        unit sets: 'real'.\n+\n+    Returns\n+    -------\n+    trajectory : md.Trajectory\n+        The resulting trajectory, as an md.Trajectory object.\n+\n+    See Also\n+    --------\n+    mdtraj.LAMMPSTrajectoryFile :  Low level interface to lammpstrj files\n+    \"\"\"\n+    from mdtraj.core.trajectory import _parse_topology, Trajectory\n+\n+    # we make it not required in the signature, but required here. although this","path":"MDTraj/formats/lammpstrj.py","position":85,"original_position":85,"commit_id":"37cea735f64c4454f58f8eeb43c2e126748c06a1","original_commit_id":"37cea735f64c4454f58f8eeb43c2e126748c06a1","user":{"login":"kyleabeauchamp","id":1900459,"avatar_url":"https://avatars.githubusercontent.com/u/1900459?v=2","gravatar_id":"","url":"https://api.github.com/users/kyleabeauchamp","html_url":"https://github.com/kyleabeauchamp","followers_url":"https://api.github.com/users/kyleabeauchamp/followers","following_url":"https://api.github.com/users/kyleabeauchamp/following{/other_user}","gists_url":"https://api.github.com/users/kyleabeauchamp/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleabeauchamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleabeauchamp/subscriptions","organizations_url":"https://api.github.com/users/kyleabeauchamp/orgs","repos_url":"https://api.github.com/users/kyleabeauchamp/repos","events_url":"https://api.github.com/users/kyleabeauchamp/events{/privacy}","received_events_url":"https://api.github.com/users/kyleabeauchamp/received_events","type":"User","site_admin":false},"body":"Maybe say \"We make `top` required\" rather than \"it\"","created_at":"2014-10-29T19:50:38Z","updated_at":"2014-10-29T19:50:38Z","html_url":"https://github.com/pandegroup/mdtraj/pull/639#discussion_r19566837","pull_request_url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639","_links":{"self":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/comments/19566837"},"html":{"href":"https://github.com/pandegroup/mdtraj/pull/639#discussion_r19566837"},"pull_request":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639"}}},"pull_request":{"url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639","id":23479767,"html_url":"https://github.com/pandegroup/mdtraj/pull/639","diff_url":"https://github.com/pandegroup/mdtraj/pull/639.diff","patch_url":"https://github.com/pandegroup/mdtraj/pull/639.patch","issue_url":"https://api.github.com/repos/pandegroup/mdtraj/issues/639","number":639,"state":"open","locked":false,"title":"initial draft of lammpstrj file format","user":{"login":"ctk3b","id":3527431,"avatar_url":"https://avatars.githubusercontent.com/u/3527431?v=2","gravatar_id":"","url":"https://api.github.com/users/ctk3b","html_url":"https://github.com/ctk3b","followers_url":"https://api.github.com/users/ctk3b/followers","following_url":"https://api.github.com/users/ctk3b/following{/other_user}","gists_url":"https://api.github.com/users/ctk3b/gists{/gist_id}","starred_url":"https://api.github.com/users/ctk3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctk3b/subscriptions","organizations_url":"https://api.github.com/users/ctk3b/orgs","repos_url":"https://api.github.com/users/ctk3b/repos","events_url":"https://api.github.com/users/ctk3b/events{/privacy}","received_events_url":"https://api.github.com/users/ctk3b/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-28T18:36:29Z","updated_at":"2014-10-29T19:50:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb77990820e6940bc567221d4b8f31ce7b4eca17","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639/commits","review_comments_url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639/comments","review_comment_url":"https://api.github.com/repos/pandegroup/mdtraj/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pandegroup/mdtraj/issues/639/comments","statuses_url":"https://api.github.com/repos/pandegroup/mdtraj/statuses/37cea735f64c4454f58f8eeb43c2e126748c06a1","head":{"label":"ctk3b:master","ref":"master","sha":"37cea735f64c4454f58f8eeb43c2e126748c06a1","user":{"login":"ctk3b","id":3527431,"avatar_url":"https://avatars.githubusercontent.com/u/3527431?v=2","gravatar_id":"","url":"https://api.github.com/users/ctk3b","html_url":"https://github.com/ctk3b","followers_url":"https://api.github.com/users/ctk3b/followers","following_url":"https://api.github.com/users/ctk3b/following{/other_user}","gists_url":"https://api.github.com/users/ctk3b/gists{/gist_id}","starred_url":"https://api.github.com/users/ctk3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctk3b/subscriptions","organizations_url":"https://api.github.com/users/ctk3b/orgs","repos_url":"https://api.github.com/users/ctk3b/repos","events_url":"https://api.github.com/users/ctk3b/events{/privacy}","received_events_url":"https://api.github.com/users/ctk3b/received_events","type":"User","site_admin":false},"repo":{"id":24680772,"name":"mdtraj","full_name":"ctk3b/mdtraj","owner":{"login":"ctk3b","id":3527431,"avatar_url":"https://avatars.githubusercontent.com/u/3527431?v=2","gravatar_id":"","url":"https://api.github.com/users/ctk3b","html_url":"https://github.com/ctk3b","followers_url":"https://api.github.com/users/ctk3b/followers","following_url":"https://api.github.com/users/ctk3b/following{/other_user}","gists_url":"https://api.github.com/users/ctk3b/gists{/gist_id}","starred_url":"https://api.github.com/users/ctk3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctk3b/subscriptions","organizations_url":"https://api.github.com/users/ctk3b/orgs","repos_url":"https://api.github.com/users/ctk3b/repos","events_url":"https://api.github.com/users/ctk3b/events{/privacy}","received_events_url":"https://api.github.com/users/ctk3b/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ctk3b/mdtraj","description":"A modern, open library for the analysis of molecular dynamics trajectories","fork":true,"url":"https://api.github.com/repos/ctk3b/mdtraj","forks_url":"https://api.github.com/repos/ctk3b/mdtraj/forks","keys_url":"https://api.github.com/repos/ctk3b/mdtraj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctk3b/mdtraj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctk3b/mdtraj/teams","hooks_url":"https://api.github.com/repos/ctk3b/mdtraj/hooks","issue_events_url":"https://api.github.com/repos/ctk3b/mdtraj/issues/events{/number}","events_url":"https://api.github.com/repos/ctk3b/mdtraj/events","assignees_url":"https://api.github.com/repos/ctk3b/mdtraj/assignees{/user}","branches_url":"https://api.github.com/repos/ctk3b/mdtraj/branches{/branch}","tags_url":"https://api.github.com/repos/ctk3b/mdtraj/tags","blobs_url":"https://api.github.com/repos/ctk3b/mdtraj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctk3b/mdtraj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctk3b/mdtraj/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctk3b/mdtraj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctk3b/mdtraj/statuses/{sha}","languages_url":"https://api.github.com/repos/ctk3b/mdtraj/languages","stargazers_url":"https://api.github.com/repos/ctk3b/mdtraj/stargazers","contributors_url":"https://api.github.com/repos/ctk3b/mdtraj/contributors","subscribers_url":"https://api.github.com/repos/ctk3b/mdtraj/subscribers","subscription_url":"https://api.github.com/repos/ctk3b/mdtraj/subscription","commits_url":"https://api.github.com/repos/ctk3b/mdtraj/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctk3b/mdtraj/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctk3b/mdtraj/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctk3b/mdtraj/issues/comments/{number}","contents_url":"https://api.github.com/repos/ctk3b/mdtraj/contents/{+path}","compare_url":"https://api.github.com/repos/ctk3b/mdtraj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctk3b/mdtraj/merges","archive_url":"https://api.github.com/repos/ctk3b/mdtraj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctk3b/mdtraj/downloads","issues_url":"https://api.github.com/repos/ctk3b/mdtraj/issues{/number}","pulls_url":"https://api.github.com/repos/ctk3b/mdtraj/pulls{/number}","milestones_url":"https://api.github.com/repos/ctk3b/mdtraj/milestones{/number}","notifications_url":"https://api.github.com/repos/ctk3b/mdtraj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctk3b/mdtraj/labels{/name}","releases_url":"https://api.github.com/repos/ctk3b/mdtraj/releases{/id}","created_at":"2014-10-01T14:07:17Z","updated_at":"2014-10-28T17:36:16Z","pushed_at":"2014-10-28T19:14:49Z","git_url":"git://github.com/ctk3b/mdtraj.git","ssh_url":"git@github.com:ctk3b/mdtraj.git","clone_url":"https://github.com/ctk3b/mdtraj.git","svn_url":"https://github.com/ctk3b/mdtraj","homepage":"www.mdtraj.org","size":23511,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pandegroup:master","ref":"master","sha":"09e31cedf14fea93d5d17577c039f6e414773484","user":{"login":"pandegroup","id":2250873,"avatar_url":"https://avatars.githubusercontent.com/u/2250873?v=2","gravatar_id":"","url":"https://api.github.com/users/pandegroup","html_url":"https://github.com/pandegroup","followers_url":"https://api.github.com/users/pandegroup/followers","following_url":"https://api.github.com/users/pandegroup/following{/other_user}","gists_url":"https://api.github.com/users/pandegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/pandegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandegroup/subscriptions","organizations_url":"https://api.github.com/users/pandegroup/orgs","repos_url":"https://api.github.com/users/pandegroup/repos","events_url":"https://api.github.com/users/pandegroup/events{/privacy}","received_events_url":"https://api.github.com/users/pandegroup/received_events","type":"Organization","site_admin":false},"repo":{"id":6604361,"name":"mdtraj","full_name":"pandegroup/mdtraj","owner":{"login":"pandegroup","id":2250873,"avatar_url":"https://avatars.githubusercontent.com/u/2250873?v=2","gravatar_id":"","url":"https://api.github.com/users/pandegroup","html_url":"https://github.com/pandegroup","followers_url":"https://api.github.com/users/pandegroup/followers","following_url":"https://api.github.com/users/pandegroup/following{/other_user}","gists_url":"https://api.github.com/users/pandegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/pandegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandegroup/subscriptions","organizations_url":"https://api.github.com/users/pandegroup/orgs","repos_url":"https://api.github.com/users/pandegroup/repos","events_url":"https://api.github.com/users/pandegroup/events{/privacy}","received_events_url":"https://api.github.com/users/pandegroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pandegroup/mdtraj","description":"A modern, open library for the analysis of molecular dynamics trajectories","fork":false,"url":"https://api.github.com/repos/pandegroup/mdtraj","forks_url":"https://api.github.com/repos/pandegroup/mdtraj/forks","keys_url":"https://api.github.com/repos/pandegroup/mdtraj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pandegroup/mdtraj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pandegroup/mdtraj/teams","hooks_url":"https://api.github.com/repos/pandegroup/mdtraj/hooks","issue_events_url":"https://api.github.com/repos/pandegroup/mdtraj/issues/events{/number}","events_url":"https://api.github.com/repos/pandegroup/mdtraj/events","assignees_url":"https://api.github.com/repos/pandegroup/mdtraj/assignees{/user}","branches_url":"https://api.github.com/repos/pandegroup/mdtraj/branches{/branch}","tags_url":"https://api.github.com/repos/pandegroup/mdtraj/tags","blobs_url":"https://api.github.com/repos/pandegroup/mdtraj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pandegroup/mdtraj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pandegroup/mdtraj/git/refs{/sha}","trees_url":"https://api.github.com/repos/pandegroup/mdtraj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pandegroup/mdtraj/statuses/{sha}","languages_url":"https://api.github.com/repos/pandegroup/mdtraj/languages","stargazers_url":"https://api.github.com/repos/pandegroup/mdtraj/stargazers","contributors_url":"https://api.github.com/repos/pandegroup/mdtraj/contributors","subscribers_url":"https://api.github.com/repos/pandegroup/mdtraj/subscribers","subscription_url":"https://api.github.com/repos/pandegroup/mdtraj/subscription","commits_url":"https://api.github.com/repos/pandegroup/mdtraj/commits{/sha}","git_commits_url":"https://api.github.com/repos/pandegroup/mdtraj/git/commits{/sha}","comments_url":"https://api.github.com/repos/pandegroup/mdtraj/comments{/number}","issue_comment_url":"https://api.github.com/repos/pandegroup/mdtraj/issues/comments/{number}","contents_url":"https://api.github.com/repos/pandegroup/mdtraj/contents/{+path}","compare_url":"https://api.github.com/repos/pandegroup/mdtraj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pandegroup/mdtraj/merges","archive_url":"https://api.github.com/repos/pandegroup/mdtraj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pandegroup/mdtraj/downloads","issues_url":"https://api.github.com/repos/pandegroup/mdtraj/issues{/number}","pulls_url":"https://api.github.com/repos/pandegroup/mdtraj/pulls{/number}","milestones_url":"https://api.github.com/repos/pandegroup/mdtraj/milestones{/number}","notifications_url":"https://api.github.com/repos/pandegroup/mdtraj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pandegroup/mdtraj/labels{/name}","releases_url":"https://api.github.com/repos/pandegroup/mdtraj/releases{/id}","created_at":"2012-11-08T22:01:24Z","updated_at":"2014-10-28T22:28:29Z","pushed_at":"2014-10-28T23:16:18Z","git_url":"git://github.com/pandegroup/mdtraj.git","ssh_url":"git@github.com:pandegroup/mdtraj.git","clone_url":"https://github.com/pandegroup/mdtraj.git","svn_url":"https://github.com/pandegroup/mdtraj","homepage":"www.mdtraj.org","size":34145,"stargazers_count":33,"watchers_count":33,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":24,"mirror_url":null,"open_issues_count":49,"forks":24,"open_issues":49,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639"},"html":{"href":"https://github.com/pandegroup/mdtraj/pull/639"},"issue":{"href":"https://api.github.com/repos/pandegroup/mdtraj/issues/639"},"comments":{"href":"https://api.github.com/repos/pandegroup/mdtraj/issues/639/comments"},"review_comments":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639/comments"},"review_comment":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pandegroup/mdtraj/pulls/639/commits"},"statuses":{"href":"https://api.github.com/repos/pandegroup/mdtraj/statuses/37cea735f64c4454f58f8eeb43c2e126748c06a1"}}}}