From 63387ef7722052096d3b31ee63ad511958cfc691 Mon Sep 17 00:00:00 2001 From: Pablo Zubieta <8410335+pabloferz@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:48:16 -0500 Subject: [PATCH] Update uses of gsd API for all hoomd examples --- examples/hoomd-blue/harmonic_bias/Harmonic_Bias.ipynb | 2 +- examples/hoomd-blue/harmonic_bias/Harmonic_Bias.md | 2 +- examples/hoomd-blue/harmonic_bias/gen_gsd.py | 2 +- examples/hoomd-blue/string/gen_gsd.py | 2 +- .../hoomd-blue/umbrella_integration/Umbrella_Integration.ipynb | 2 +- .../hoomd-blue/umbrella_integration/Umbrella_Integration.md | 2 +- examples/hoomd-blue/umbrella_integration/gen_gsd.py | 2 +- examples/hoomd-blue/unbiased/gen_gsd.py | 2 +- examples/hoomd3/harmonic_bias/gen_gsd.py | 2 +- examples/hoomd3/string/gen_gsd.py | 2 +- examples/hoomd3/umbrella_integration/gen_gsd.py | 2 +- examples/hoomd3/unbiased/gen_gsd.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.ipynb b/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.ipynb index aa6c121a..db2e9027 100644 --- a/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.ipynb +++ b/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.ipynb @@ -258,7 +258,7 @@ "snap = get_snap(system)\n", "snap = post_process_pos(snap)\n", "snap.particles.validate()\n", - "with gsd.hoomd.open(\"harmonic_start.gsd\", \"wb\") as f:\n", + "with gsd.hoomd.open(\"harmonic_start.gsd\", \"w\") as f:\n", " f.append(snap)\n" ] }, diff --git a/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.md b/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.md index 30706af1..97955cd3 100644 --- a/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.md +++ b/examples/hoomd-blue/harmonic_bias/Harmonic_Bias.md @@ -158,7 +158,7 @@ system = System() snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() -with gsd.hoomd.open("harmonic_start.gsd", "wb") as f: +with gsd.hoomd.open("harmonic_start.gsd", "w") as f: f.append(snap) ``` diff --git a/examples/hoomd-blue/harmonic_bias/gen_gsd.py b/examples/hoomd-blue/harmonic_bias/gen_gsd.py index 5d9f17ab..f45014d7 100644 --- a/examples/hoomd-blue/harmonic_bias/gen_gsd.py +++ b/examples/hoomd-blue/harmonic_bias/gen_gsd.py @@ -48,7 +48,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd-blue/string/gen_gsd.py b/examples/hoomd-blue/string/gen_gsd.py index 639a9e80..98ace36b 100644 --- a/examples/hoomd-blue/string/gen_gsd.py +++ b/examples/hoomd-blue/string/gen_gsd.py @@ -56,7 +56,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.ipynb b/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.ipynb index d1c89611..79f24f99 100644 --- a/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.ipynb +++ b/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.ipynb @@ -302,7 +302,7 @@ "snap = get_snap(system)\n", "snap = post_process_pos(snap)\n", "snap.particles.validate()\n", - "with gsd.hoomd.open(\"start.gsd\", \"wb\") as f:\n", + "with gsd.hoomd.open(\"start.gsd\", \"w\") as f:\n", " f.append(snap)\n" ] }, diff --git a/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.md b/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.md index 211f9d8c..e4e1290d 100644 --- a/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.md +++ b/examples/hoomd-blue/umbrella_integration/Umbrella_Integration.md @@ -154,7 +154,7 @@ system = System() snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() -with gsd.hoomd.open("start.gsd", "wb") as f: +with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) ``` diff --git a/examples/hoomd-blue/umbrella_integration/gen_gsd.py b/examples/hoomd-blue/umbrella_integration/gen_gsd.py index 639a9e80..98ace36b 100644 --- a/examples/hoomd-blue/umbrella_integration/gen_gsd.py +++ b/examples/hoomd-blue/umbrella_integration/gen_gsd.py @@ -56,7 +56,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd-blue/unbiased/gen_gsd.py b/examples/hoomd-blue/unbiased/gen_gsd.py index 5d9f17ab..f45014d7 100644 --- a/examples/hoomd-blue/unbiased/gen_gsd.py +++ b/examples/hoomd-blue/unbiased/gen_gsd.py @@ -48,7 +48,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd3/harmonic_bias/gen_gsd.py b/examples/hoomd3/harmonic_bias/gen_gsd.py index 5d9f17ab..f45014d7 100644 --- a/examples/hoomd3/harmonic_bias/gen_gsd.py +++ b/examples/hoomd3/harmonic_bias/gen_gsd.py @@ -48,7 +48,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd3/string/gen_gsd.py b/examples/hoomd3/string/gen_gsd.py index 639a9e80..98ace36b 100644 --- a/examples/hoomd3/string/gen_gsd.py +++ b/examples/hoomd3/string/gen_gsd.py @@ -56,7 +56,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd3/umbrella_integration/gen_gsd.py b/examples/hoomd3/umbrella_integration/gen_gsd.py index 639a9e80..98ace36b 100644 --- a/examples/hoomd3/umbrella_integration/gen_gsd.py +++ b/examples/hoomd3/umbrella_integration/gen_gsd.py @@ -56,7 +56,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap) diff --git a/examples/hoomd3/unbiased/gen_gsd.py b/examples/hoomd3/unbiased/gen_gsd.py index 5d9f17ab..f45014d7 100644 --- a/examples/hoomd3/unbiased/gen_gsd.py +++ b/examples/hoomd3/unbiased/gen_gsd.py @@ -48,7 +48,7 @@ def main(argv): snap = get_snap(system) snap = post_process_pos(snap) snap.particles.validate() - with gsd.hoomd.open("start.gsd", "wb") as f: + with gsd.hoomd.open("start.gsd", "w") as f: f.append(snap)