Skip to main content

General simulation data file format.

Project description

GSD

The GSD file format is the native file format for HOOMD-blue. GSD files store trajectories of the HOOMD-blue system state in a binary file with efficient random access to frames. GSD allows all particle and topology properties to vary from one frame to the next. Use the GSD Python API to specify the initial condition for a HOOMD-blue simulation or analyze trajectory output with a script. Read a GSD trajectory with a visualization tool to explore the behavior of the simulation.

Resources

HOOMD examples

Create a hoomd gsd file.

>>> s = gsd.hoomd.Frame()
>>> s.particles.N = 4
>>> s.particles.types = ['A', 'B']
>>> s.particles.typeid = [0,0,1,1]
>>> s.particles.position = [[0,0,0],[1,1,1], [-1,-1,-1], [1,-1,-1]]
>>> s.configuration.box = [3, 3, 3, 0, 0, 0]
>>> traj = gsd.hoomd.open(name='test.gsd', mode='w')
>>> traj.append(s)

Append frames to a gsd file:

>>> def create_frame(i):
...     s = gsd.hoomd.Frame();
...     s.configuration.step = i;
...     s.particles.N = 4+i;
...     s.particles.position = numpy.random.random(size=(4+i,3))
...     return s;
>>> with gsd.hoomd.open('test.gsd', 'a') as t:
...     t.extend( (create_frame(i) for i in range(10)) )
...     print(len(t))
11

Randomly index frames:

>>> with gsd.hoomd.open('test.gsd', 'r') as t:
...     frame = t[5]
...     print(frame.configuration.step)
4
...     print(frame.particles.N)
8
...     print(frame.particles.position)
[[ 0.56993282  0.42243481  0.5502916 ]
 [ 0.36892486  0.38167036  0.27310368]
 [ 0.04739023  0.13603486  0.196539  ]
 [ 0.120232    0.91591144  0.99463677]
 [ 0.79806316  0.16991436  0.15228257]
 [ 0.13724308  0.14253527  0.02505   ]
 [ 0.39287439  0.82519054  0.01613089]
 [ 0.23150323  0.95167434  0.7715748 ]]

Slice frames:

>>> with gsd.hoomd.open('test.gsd', 'r') as t:
...     for s in t[5:-2]:
...         print(s.configuration.step, end=' ')
4 5 6 7

File layer examples

with gsd.fl.open(name='file.gsd', mode='w') as f:
    f.write_chunk(name='position', data=numpy.array([[1,2,3],[4,5,6]], dtype=numpy.float32));
    f.write_chunk(name='angle', data=numpy.array([0, 1], dtype=numpy.float32));
    f.write_chunk(name='box', data=numpy.array([10, 10, 10], dtype=numpy.float32));
    f.end_frame()
with gsd.fl.open(name='file.gsd', mode='r') as f:
    for i in range(1,f.nframes):
        position = f.read_chunk(frame=i, name='position');
        do_something(position);

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gsd-3.2.0.tar.gz (178.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gsd-3.2.0-cp312-cp312-win_amd64.whl (248.6 kB view details)

Uploaded CPython 3.12Windows x86-64

gsd-3.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (645.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

gsd-3.2.0-cp312-cp312-macosx_11_0_arm64.whl (255.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

gsd-3.2.0-cp312-cp312-macosx_10_9_x86_64.whl (258.1 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

gsd-3.2.0-cp311-cp311-win_amd64.whl (251.4 kB view details)

Uploaded CPython 3.11Windows x86-64

gsd-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (643.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

gsd-3.2.0-cp311-cp311-macosx_11_0_arm64.whl (256.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gsd-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl (261.8 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

gsd-3.2.0-cp310-cp310-win_amd64.whl (251.2 kB view details)

Uploaded CPython 3.10Windows x86-64

gsd-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (607.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gsd-3.2.0-cp310-cp310-macosx_11_0_arm64.whl (256.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gsd-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl (261.3 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

gsd-3.2.0-cp39-cp39-win_amd64.whl (250.6 kB view details)

Uploaded CPython 3.9Windows x86-64

gsd-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (607.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

gsd-3.2.0-cp39-cp39-macosx_11_0_arm64.whl (255.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

gsd-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl (260.9 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

gsd-3.2.0-cp38-cp38-win_amd64.whl (251.8 kB view details)

Uploaded CPython 3.8Windows x86-64

gsd-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (632.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

gsd-3.2.0-cp38-cp38-macosx_11_0_arm64.whl (256.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

gsd-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl (261.4 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file gsd-3.2.0.tar.gz.

File metadata

  • Download URL: gsd-3.2.0.tar.gz
  • Upload date:
  • Size: 178.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0.tar.gz
Algorithm Hash digest
SHA256 cf3c8419ec66085b2b9853577058861d9e738bfe397b0170ead821b866ab49b9
MD5 9084d6f3cc2f65e58dc53fdeac5c188d
BLAKE2b-256 352c48ed80548e753c94a76f871ce242d93fad1b937f29a685907ede1c46e188

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 248.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8cba120c4d82fdbdd0f14f701ec469a222a571ed7e61ed6be77309ef6cef639b
MD5 a9e85e04eeae20719f7929a42aa5c8e8
BLAKE2b-256 d624b05cfb3081a219640c84baae6bf21573c5cc3d7493ce6df4ccc2a868d33c

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceb76fb3ad08e4b3c212ae89816b8e61b26d09bea3fc2648cc3e29b1fd4d1849
MD5 f4f3d52739bee27959c806c7e764146c
BLAKE2b-256 4c0c0e95ffcd472cb9c47c656918a4efdc2ce44fa30c6d056149eeafd4e63716

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 255.6 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 955c7fa00e2b6971c200736fa148b367e1a1d3b76dfca91c314435e5f04dce97
MD5 3a46474fd06ea251e4eda89df21c82c3
BLAKE2b-256 5a87564d58699ead30f4d7b6b06a59fcc30b8d0fa13ae8277ea9b3b22413f0d0

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5431372640368c25c37bd353464f40de68cc6946cc190c31f563a36687da490d
MD5 ee85fecfce717ab964003b26c4f95ea5
BLAKE2b-256 8886abc7d20af4f73e81a1bc9f8d50f75154fa394dfecc3e49775d1e156bfe37

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 251.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 55dda5373febd2f1d16b1df1303d9491864d3e45a07cd04be191dd65e673eb66
MD5 f11396922e85ddf6b523cef1d6e0dc2d
BLAKE2b-256 d8317828771023187a44d349081d9bf510f45a2e2eee7618d01fd155fe91dd90

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7300884e2cd0769409899a80ec1a9af4dd8886275dd5464835c5a3d841398d2
MD5 384012e27c7a867b13fe6c29bd43f825
BLAKE2b-256 7c080cd5462d5ff92c7d8118f71bbc9b7f9a1d0663d37aad05597c084cdb6ed2

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 256.6 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e303eaa950ab4b98142e39d3a887bcc007149393c4dc975748ddb5522fa30dbf
MD5 ab5f583f3ad776cf21e72097d3706580
BLAKE2b-256 a7221cfb8abb9928ff47a400eb480a4ff30acc8cc987f9e5636c309f2963b4fd

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 99fbae9c3f6078234f502bb69f2be4196da71ff27b3193241e9e133e9511085e
MD5 570003bf42ccef3d22a61aefc7bcb7a5
BLAKE2b-256 7213344963de2b7293b0096bc08f68d3bfac6daedfbda2ed0d1d6cd49640c9b2

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 251.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2391fc704766b67e76cb9b01cd2f10f0e2c5dae0e16f62fa88d50fa8e8f7bdc6
MD5 3623fe9cf6cc67ee2d92ec4d2b1e7710
BLAKE2b-256 bcd24d058292d4ea2f5cb0c04d47bf3957571ed3056afcd13f14d3bf2da721ab

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a806fa27282aea0e74f5aa48e95e185e3fcf7619d56be8a3f4b01bb704d1ce6
MD5 d245e7b82f710ea71af44ec6abd9629b
BLAKE2b-256 7312e98934a89f47475b9e99e454bd4e6665422a4305d0f291cdd1cace377fba

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 256.3 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c67d6fa4d4b9ece284f6c0adf309642c5ad857b3d0c3434a412279da0badd87
MD5 779b1ea15a21cd3d3028b31b44f597bc
BLAKE2b-256 4d143a5e27cc8ea90ddf947af594ece309650e8f436f47222a3ae521f0bf5375

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 45aa1d9c4023d9e9c0809430719367dc7040a5c0073df743e7fb7131fc965fae
MD5 2418c9ca6562c468d4f28374633d7767
BLAKE2b-256 ddcdd0e6e8a2f04897c19c29f830074337e00412190cd3d42611efcecea33082

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 250.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 19447ae4ad319e17a48aa6bfeb3827b8c9fa294baba52297ced4f65a3100d2ae
MD5 ac5bf398a5eff9e0f51fc95474fae162
BLAKE2b-256 817b415fbe4e495ae034d1b5de99c0a3c87afdc206193c144dfee7ac129d691f

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d6cf264ab98456515231a8454fa844cf0489e943b3fcf7eb56308dafc06384ac
MD5 bc348390ec44b372c3df1a459eb7150b
BLAKE2b-256 aacb71461d49da18c2baa6302bdd4933b9491533a5e370de3ad2247f487af444

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 255.8 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99c9224d3f55f9045349f9a86ca10fa68127bd2a332054e1300cb8b29b5347fa
MD5 20a1b066f3ce35240802e496a8efc3cb
BLAKE2b-256 35eaf6218e31b73f39c29f3d1d3874b0062758d15c9e2c4efeef0318e7a422a4

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 260.9 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1ce6fc7719c8a288dbfa877636b5b6135b2b12078619ef5b7fe80b2888b818f
MD5 7c851b19c0a38ac265c5ee48ed6065a2
BLAKE2b-256 f695092c851fc86d065e2614983db334d8630d9e264b4fedc878d4dd2a039baf

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 251.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 49004c22d3b7be39e01e46ad0017b4e4668347f112b5c45519e7fb666b10f632
MD5 c9366dfb80f2c0562568cd95fa7a9fa9
BLAKE2b-256 8235a0aefa40cc5db674bb69aa58d9d72b7e742bf069451e220a129895d5b8dc

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5ab6cec0e2b5d02c4da453b53860e5e65c39f277d57106c83e924a2cad8f89b
MD5 c4f7f16c5b4f9213364ed989670e71ce
BLAKE2b-256 276e4e07497b56c5d4293f1b9d79676c8927d65202a191fee67315601bc58543

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 256.7 kB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8000b4296388b43041260f63a062739a2623d61571a3f0a71d6b46c91a4f1417
MD5 6b621256994f2701a746261afd5f1192
BLAKE2b-256 9fddd211a9806b00670a3daefa5f65be63fadf86bb65a44cde6f6d155d47f7ea

See more details on using hashes here.

File details

Details for the file gsd-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsd-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 261.4 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gsd-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0092b6413b207c25cab5ec4396efe85f04bb2583ede9744599122764c422c9f
MD5 118975d9893d068fd1bc2390597410ed
BLAKE2b-256 11cfefb2e2e08e75dfc4f8f3221f75504fa380ba46544d9cab567f36d95fb640

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page