{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.avy5MbRx/b1/python-gsd_2.4.0-1_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.avy5MbRx/b2/python-gsd_2.4.0-1_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n- fb54d3990e972c9127f07c7ab5b13651 80348 doc optional python-gsd-doc_2.4.0-1_all.deb\n+ 8aca9278692afb5ba793ba9dc565cffe 80348 doc optional python-gsd-doc_2.4.0-1_all.deb\n ae6a3d7e63e6f640118bdd2e08bf2d86 240908 debug optional python3-gsd-dbgsym_2.4.0-1_armhf.deb\n 78fb4c91800da8d741e511d61bd88578 74736 python optional python3-gsd_2.4.0-1_armhf.deb\n"}, {"source1": "python-gsd-doc_2.4.0-1_all.deb", "source2": "python-gsd-doc_2.4.0-1_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2020-12-28 05:06:26.000000 debian-binary\n--rw-r--r-- 0 0 0 2360 2020-12-28 05:06:26.000000 control.tar.xz\n--rw-r--r-- 0 0 0 77796 2020-12-28 05:06:26.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 2364 2020-12-28 05:06:26.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 77792 2020-12-28 05:06:26.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "./usr/share/doc/python-gsd-doc/html/hoomd-examples.html", "source2": "./usr/share/doc/python-gsd-doc/html/hoomd-examples.html", "unified_diff": "@@ -271,23 +271,23 @@\n Out[15]: 5\n \n In [16]: snap.particles.N\n Out[16]: 9\n \n In [17]: snap.particles.position\n Out[17]: \n-array([[0.48177087, 0.0019721 , 0.6821456 ],\n- [0.8952125 , 0.6255473 , 0.02883342],\n- [0.4324867 , 0.71397847, 0.6837485 ],\n- [0.48239848, 0.06148845, 0.584769 ],\n- [0.91358054, 0.90127224, 0.83669275],\n- [0.71254784, 0.17851584, 0.36799958],\n- [0.39305127, 0.8323114 , 0.7881819 ],\n- [0.6811617 , 0.38293022, 0.16583234],\n- [0.899306 , 0.7256755 , 0.67697614]], dtype=float32)\n+array([[0.2047895 , 0.70605606, 0.07798767],\n+ [0.96794635, 0.9033231 , 0.8153699 ],\n+ [0.41904292, 0.32442886, 0.9867672 ],\n+ [0.48278466, 0.543924 , 0.40995002],\n+ [0.12609783, 0.06111464, 0.9033138 ],\n+ [0.3999571 , 0.0428344 , 0.02384735],\n+ [0.52714556, 0.8148939 , 0.9498546 ],\n+ [0.48973358, 0.27436677, 0.9293624 ],\n+ [0.19695702, 0.50833076, 0.52838415]], dtype=float32)\n \n \n
gsd.hoomd.HOOMDTrajectory
supports random indexing of frames in the file.\n Indexing into a trajectory returns a gsd.hoomd.Snapshot
.
In [22]: f = gsd.pygsd.GSDFile(open('test.gsd', 'rb'))\n \n In [23]: t = gsd.hoomd.HOOMDTrajectory(f);\n \n In [24]: t[3].particles.position\n Out[24]: \n-array([[0.88437366, 0.25044152, 0.28480613],\n- [0.304431 , 0.6978187 , 0.9323169 ],\n- [0.19105905, 0.00701067, 0.47030786],\n- [0.9418109 , 0.44126406, 0.20453954],\n- [0.5063586 , 0.18852428, 0.73964417],\n- [0.9421013 , 0.3941617 , 0.75893104],\n- [0.310962 , 0.7817279 , 0.42892203]], dtype=float32)\n+array([[0.7248003 , 0.2913952 , 0.06764258],\n+ [0.57350767, 0.5005179 , 0.8065427 ],\n+ [0.10758855, 0.6531324 , 0.4915261 ],\n+ [0.14974728, 0.8607226 , 0.15923217],\n+ [0.40866554, 0.49934256, 0.9564412 ],\n+ [0.00705034, 0.8974011 , 0.53028136],\n+ [0.3729126 , 0.8467917 , 0.359741 ]], dtype=float32)\n
You can use GSD without needing to compile C code to read GSD files\n using gsd.pygsd.GSDFile
in combination with gsd.hoomd.HOOMDTrajectory
. It\n only supports the rb
mode and does not read files as fast as the C\n implementation. It takes in a python file-like object, so it can be used with\n in-memory IO classes, and grid file classes that access data over the internet.