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.Snapshot()
>>> 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='wb')
>>> traj.append(s)

Append frames to a gsd file:

>>> def create_frame(i):
...     s = gsd.hoomd.Snapshot();
...     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', 'ab') 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', 'rb') as t:
...     snap = t[5]
...     print(snap.configuration.step)
4
...     print(snap.particles.N)
8
...     print(snap.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', 'rb') 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='wb') 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='rb') 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-2.6.1.tar.gz (139.0 kB view details)

Uploaded Source

Built Distributions

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

gsd-2.6.1-cp310-cp310-win_amd64.whl (89.6 kB view details)

Uploaded CPython 3.10Windows x86-64

gsd-2.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gsd-2.6.1-cp310-cp310-macosx_11_0_arm64.whl (98.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gsd-2.6.1-cp310-cp310-macosx_10_9_x86_64.whl (105.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

gsd-2.6.1-cp39-cp39-win_amd64.whl (90.2 kB view details)

Uploaded CPython 3.9Windows x86-64

gsd-2.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (396.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

gsd-2.6.1-cp39-cp39-macosx_11_0_arm64.whl (95.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

gsd-2.6.1-cp39-cp39-macosx_10_9_x86_64.whl (103.5 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

gsd-2.6.1-cp38-cp38-win_amd64.whl (90.2 kB view details)

Uploaded CPython 3.8Windows x86-64

gsd-2.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (407.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

gsd-2.6.1-cp38-cp38-macosx_11_0_arm64.whl (95.3 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

gsd-2.6.1-cp38-cp38-macosx_10_9_x86_64.whl (101.9 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

gsd-2.6.1-cp37-cp37m-win_amd64.whl (88.9 kB view details)

Uploaded CPython 3.7mWindows x86-64

gsd-2.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (376.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

gsd-2.6.1-cp37-cp37m-macosx_10_9_x86_64.whl (101.2 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

gsd-2.6.1-cp36-cp36m-win_amd64.whl (94.3 kB view details)

Uploaded CPython 3.6mWindows x86-64

gsd-2.6.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.1 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

gsd-2.6.1-cp36-cp36m-macosx_10_9_x86_64.whl (101.4 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: gsd-2.6.1.tar.gz
  • Upload date:
  • Size: 139.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1.tar.gz
Algorithm Hash digest
SHA256 bbf8caa0b61e4233068b0e1bc2d54d58d129c685d9068e5a25a8b68b5f1fa49c
MD5 e3cc6ab995d44a41ff4d1ad1fccc1cea
BLAKE2b-256 0175c4a7e2bb1632abc0d0c000ea03c78ff3ea95c329147a43a90a50eaf6e5f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 89.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c1850c5dfa1890af8801c5f6c4663495d5179d55487411b6d677a6ee4a70cabf
MD5 a718bde458626dc68be91199fe0f28cd
BLAKE2b-256 03a536105002a841509499ba92da97dcdafba853c3f42f391ceb74055e10c87b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsd-2.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b21db4bf226b4b8f6c631a1e8c58dd01dab27131a576b8fae5b4b0d82805b75
MD5 3fdbe203a5ef3662feddfa5330118945
BLAKE2b-256 01b351b4b454ce008194f33f4e19429c795d2cd12be250be7d604536104c05f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 98.1 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af84685e776f433fcbadafa05adb7397d6020e7182b7b17f09d8d3a13c6e8da1
MD5 873a224d71b66b7fdc3be81716bf3c34
BLAKE2b-256 20287b4cea68ef5ddc87199f88c4462b030dde1c54af45bd00793889dacf4083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsd-2.6.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aa91697908051cf01fca1609851e9cd45f8e83177ed4c9832bb5808a3bf4988f
MD5 c1597495a553caf1c1036d569fbea554
BLAKE2b-256 8570e002b08f7606551d02ba7fb3a9489cfd28de1583d922c318a536725712e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 90.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 941b29c4bca64c009b7ebf92f3bf4787cca2ad147db88ab313d49893670a3683
MD5 57ef724538650de1ce8678c3d754823f
BLAKE2b-256 688ecf5e31e5111ea32b04002358a1733c39194456106facce669aecac9c44da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsd-2.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 80d24246b3ebd4bf86f3953febb4ef46f5a0a1c94396e160eb5989d7489a0b7c
MD5 4d05188cf415f5e15cc1f0c18ab9da53
BLAKE2b-256 7b19e6ac9424c5d186375ba3065476f3f8903373bf0d79f8b4c5df26e2541271

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 95.9 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c609c159c60aeaac6c81782309a722efc02a23f832b2ac0551b89d5fa888c1a9
MD5 b1b1335c1e0490f9112747c5134e0795
BLAKE2b-256 82908d35775459771057408064e878c711280691c85408e15548207f8748a0b1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gsd-2.6.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3248b9e576c2d4eab76c49b3da13bf7d0559fff0e4f9c5de67c97f6ee3a0841f
MD5 f84740ff0b2d7d2230f3a38ef36026e2
BLAKE2b-256 1689535b8c4c2b44fc4ae4144e3f82f625eddc09ae3e2c75a4122404bbfdba4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 90.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8a71ba15683276ffbb67de7df6d45639f0cd9d496a7b36dbb2f16a1152b09118
MD5 da880ca8897c6b9c40b48c2681b2d8b5
BLAKE2b-256 9a162d9b66dc98ebae584c383a23eb629dd7836afd2edfa13d7c81708c612d06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsd-2.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7153f69d5212c29f6d5234bc71fed0ee8eaaa5137364a1442c9ea13e773d8b6c
MD5 a01abd2336f4529333821b5bf81f7dac
BLAKE2b-256 ed6560c672a3f3d689f27725fbeaf35761a2b527e98412ce5dd91c53f9d52d61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsd-2.6.1-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 95.3 kB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 060121d585ebca39f81e294de44650c584b945eb3805ac4b3f2b12da8857b14c
MD5 d4f5a6aa507b81b01853f12f3aa4836b
BLAKE2b-256 5c776983f3015cd65f3001445f1de5242731946d0fdd2d38d38a9cee75161ce8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gsd-2.6.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be6533574d9ad0af29fe4b651b46ac5463ff1c141ba5b663ab8eb9bd0435aeaf
MD5 49fd9996d422e49e952772a7799947bb
BLAKE2b-256 970867a318a6ab8767f2670c5271ea2f176473f337e8e2bad78813a384cb4590

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: gsd-2.6.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7f8fa7459bc01b0e6b2a015bb9f373f17f30720350876341c15810b7fb9203a0
MD5 2b407ef1113755c16865989d6a5124c9
BLAKE2b-256 53a026854a87805da559f81e83af9ece27c98d02bf0941b37588c0643c0f975c

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-2.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc8cb603af6b51d67490ff144983a274e5982c110b6d85690669e047d86d009e
MD5 75708ab15124923cd6f66ce26337c062
BLAKE2b-256 5e1352d4959680721faa59b709c530c37ccf78f3089e30c7fad8a64dd2085035

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsd-2.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 101.2 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f63744ff0203de1a70d38558a53238b2af1f21f0ed0a28271a21adc0ad2bcdbb
MD5 5a7fca876ccc8dcbb35e5aca89c58783
BLAKE2b-256 b81d511a83c0ce44e8739b7713f90a370e1d39b4e4589df32b6c6fac43925b4f

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: gsd-2.6.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 94.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a0d10c413bd2ab39cb75f7019b18f4d52ea3e1e775c167fc13ac875dbf9783d5
MD5 dd5c933dd09c70e149b28ba4c699a823
BLAKE2b-256 6d4b3da197f753ce5ba8595fabeaf1546f05c519dfe587fa31bdccc28894ff33

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsd-2.6.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e853e4c6e77da021f7aaa2a498f11ad3922c3995ac85cb10286d77aa935cc9e6
MD5 404c882f71ca1e3c8ac74764807637a4
BLAKE2b-256 e796a6d5f18ad925945f6e405945b32beff6c0c646254b0110de49662aef267d

See more details on using hashes here.

File details

Details for the file gsd-2.6.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsd-2.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 101.4 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for gsd-2.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b398610fffcf6b0dd23486876b0fa9d658d2ae6471a3e0642ca0684851bea7a
MD5 14f08a6fd527f61d148f013576679a77
BLAKE2b-256 b5359ba8b7f804218fcdd860be8061b0c1af59043f1f2d47e0432d18b3ed0f49

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