Skip to content

Commit

Permalink
Typo fixes (#126)
Browse files Browse the repository at this point in the history
* typo fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove uses of hyperparameter.

* Update 05-Organizing-and-Executing-Simulations/02-Executing-Simulations.ipynb

Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Update 06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb

Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Update 04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb

Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Update 06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb

Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Update 05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb

Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Joshua A. Anderson <joaander@umich.edu>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent a1587d7 commit d93cb2e
Show file tree
Hide file tree
Showing 40 changed files with 211 additions and 211 deletions.
4 changes: 2 additions & 2 deletions 00-Introducing-HOOMD-blue/00-index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Introducing HOOMD-blue\n",
"\n",
"HOOMD-blue is a Python package that performs Molecular Dynamics and hard particle Monte Carlo simulations. HOOMD-blue is general and can be used to model nanoparticles, bead-spring polymers, active mater, and many other types of systems. This tutorial introduces the core concepts in HOOMD-blue using hard particle self-assembly as an example. Later tutorials will expand on these concepts for other types of simulations.\n",
"HOOMD-blue is a Python package that performs Molecular Dynamics and hard particle Monte Carlo simulations. HOOMD-blue is general and can be used to model nanoparticles, bead-spring polymers, active matter, and many other types of systems. This tutorial introduces the core concepts in HOOMD-blue using hard particle self-assembly as an example. Later tutorials will expand on these concepts for other types of simulations.\n",
"\n",
"**Prerequisites:**\n",
"\n",
Expand Down Expand Up @@ -36,7 +36,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This tutorial is written with [jupyter](https://jupyter.org/). You can download the source from the [hoomd-examples](https://github.com/glotzerlab/hoomd-examples) repository."
"This tutorial is written with [Jupyter](https://jupyter.org/). You can download the source from the [hoomd-examples](https://github.com/glotzerlab/hoomd-examples) repository."
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions 00-Introducing-HOOMD-blue/01-The-Simulation-Object.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Core objects\n",
"## Core Objects\n",
"\n",
"HOOMD-blue is an object-oriented Python package. First, import the package:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,14 +42,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The **Simulation** object combines all the elements of a simulation together and provides an interface to run the simulation. It consists of the simulation **state** and **operations** which act on that state. The simulation **state** includes the current box, bonds, particle positions, velocities, orientations, and other particle properties. **Operations** examine or modify the state. A simulation has *one* state, and *any number* of operations."
"The **Simulation** object combines all the elements of a simulation and provides an interface to run the simulation. It consists of the simulation **state** and **operations** which act on that state. The simulation **state** includes the current box, bonds, particle positions, velocities, orientations, and other particle properties. **Operations** examine or modify the state. A simulation has *one* state, and *any number* of operations."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Selecting a device\n",
"## Selecting a Device\n",
"\n",
"You must specify a **device** when constructing a **Simulation**. The **device** tells the simulation where to store the **state** and what processor to use when executing operations. HOOMD-blue can execute on the CPU:"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"* Explain the integrator parameters.\n",
"* Introduce **time steps**.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand All @@ -36,9 +36,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Particle shape\n",
"## Particle Shape\n",
"\n",
"A hard particle Monte Carlo (HPMC) simulation represents particles as extended objects which are not allowed to overlap. \n",
"A hard particle Monte Carlo (HPMC) simulation represents particles as extended objects that are not allowed to overlap. \n",
"There are no attractive or repulsive forces in the system.\n",
"The **shape** of the particle alone controls how it interacts with other particles.\n",
"Formally, the potential energy of the system is zero when there are no overlaps and infinite when there are.\n",
Expand All @@ -48,7 +48,7 @@
"\n",
"![Octahedra self assembly](octahedra_assembly.png)\n",
"\n",
"## The integrator\n",
"## The Integrator\n",
"\n",
"The **ConvexPolyhedron** **integrator** implements HPMC simulations - Create one:"
]
Expand Down Expand Up @@ -92,7 +92,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Trial moves\n",
"## Trial Moves\n",
"\n",
"During each **time step**, HPMC attempts `nselect` trial moves on each particle in the system. \n",
"Each **trial move** is drawn from a pseudorandom number stream and may be either a *translation* or *rotation* move.\n",
Expand Down Expand Up @@ -121,7 +121,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setting the integrator"
"## Setting the Integrator"
]
},
{
Expand Down Expand Up @@ -157,7 +157,7 @@
"The `seed` value (passed to the simulation constructor above) selects the sequence of values in the pseudorandom number stream.\n",
"Given the same initial condition and `seed`, HPMC simulations will produce exactly the same results.\n",
"\n",
"All operations that generate psuedorandom numbers use the seed set in the simulation.\n",
"All operations that generate pseudorandom numbers use the seed set in the simulation.\n",
"Whenever you add operations that utilize random numbers, you should set the seed to a non-default value."
]
},
Expand Down
12 changes: 6 additions & 6 deletions 00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"* Demonstrate writing a system to a **GSD** file.\n",
"* Show how to initialize **Simulation state** from a **GSD** file.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand Down Expand Up @@ -136,12 +136,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Components of the system state\n",
"## Components of the System State\n",
"\n",
"You need to initialize the system **state** before you can run a simulation.\n",
"The **initial condition** describes the the **position** and **orientation** of every particle in the system and the **periodic box** at the start of the simulation.\n",
"The **initial condition** describes the **position** and **orientation** of every particle in the system and the **periodic box** at the start of the simulation.\n",
"\n",
"The hard regular octahedra system [self-assembles the the bcc structure](https://doi.org/10.1038/ncomms14038).\n",
"The hard regular octahedra system [self-assembles the bcc structure](https://doi.org/10.1038/ncomms14038).\n",
"Self-assembly is a process where particles will organize themselves into an ordered structure at equilibrium.\n",
"Most self-assembly studies run simulations of many thousands of particles for tens of hours.\n",
"To keep this tutorial short, it simulations a small number of particles commensurate with the *bcc* structure (`2 * m**3`, where *m* is an integer)."
Expand All @@ -161,7 +161,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Placing particles\n",
"## Placing Particles\n",
"\n",
"In hard particle Monte Carlo, valid particle configurations have no overlaps.\n",
"The octahedron particle in this tutorial sits inside a sphere of diameter 1, so place particles a little bit further than that apart on a *K*x*K*x*K* simple cubic lattice of width *L*.\n",
Expand Down Expand Up @@ -293,7 +293,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Writing the configuration to the file system\n",
"## Writing the Configuration to the File System\n",
"\n",
"[**GSD**](https://gsd.readthedocs.io/) files store the **periodic box**, particle **positions**, **orientations**, and other properties of the state.\n",
"Use the **GSD** Python package to write this file."
Expand Down
10 changes: 5 additions & 5 deletions 00-Introducing-HOOMD-blue/04-Randomizing-the-System.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"* Show how to use HPMC integrator properties to examine the **acceptance ratio**.\n",
"* Explain that short simulations at low density effectively randomize the system.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand Down Expand Up @@ -140,7 +140,7 @@
"\n",
"The previous section of this tutorial placed all the particles on a simple cubic lattice.\n",
"This is a convenient way to place non-overlapping particles, but it starts the simulation in a highly ordered state.\n",
"You should **randomize** the the system enough so that it forgets this initial state and self-assembly can proceed without influence by the initial condition.\n",
"You should **randomize** the system enough so that it forgets this initial state and self-assembly can proceed without influence from the initial condition.\n",
"\n",
"You cannot draw random numbers trivially for the particle positions, as that will result in overlaps between particles.\n",
"Instead, start from the lattice and use HPMC to move particles randomly while ensuring that they do not overlap.\n",
Expand All @@ -151,7 +151,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set up the simulation\n",
"## Set up the Simulation\n",
"\n",
"The following code block creates the **Simulation**, configures the HPMC **integrator**, and initializes the system **state** from `lattice.gsd` as has been discussed in previous sections in this tutorial:"
]
Expand Down Expand Up @@ -185,7 +185,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run the simulation\n",
"## Run the Simulation\n",
"\n",
"Save a snapshot of the current state of the system.\n",
"This tutorial uses this later to see how far particles have moved."
Expand Down Expand Up @@ -346,7 +346,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## The final configuration\n",
"## The Final Configuration\n",
"\n",
"Look at the final particle positions and orientations and see how they have changed:"
]
Expand Down
12 changes: 6 additions & 6 deletions 00-Introducing-HOOMD-blue/05-Compressing-the-System.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"* Demonstrate using the **QuickCompress** updater to achieve a target volume fraction.\n",
"* Demonstrate using the **MoveSize** tuner to adjust the trial move size.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand Down Expand Up @@ -136,12 +136,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Volume fraction\n",
"## Volume Fraction\n",
"\n",
"Self-assembly in hard particle systems typically occurs at a **volume fraction** above 0.5.\n",
"The **volume fraction** is the ratio of the volume occupied by the particles to the volume of the **periodic box**.\n",
"\n",
"So far, this tutorial as **randomized** a system of *N* octahedra in a box with a very low volume fraction and stored that in `random.gsd`.\n",
"So far, this tutorial has **randomized** a system of *N* octahedra in a box with a very low volume fraction and stored that in `random.gsd`.\n",
"Initialize a **Simulation** with this configuration and see what volume fraction it is at:"
]
},
Expand Down Expand Up @@ -239,7 +239,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## The QuickCompress updater\n",
"## The QuickCompress Updater\n",
"\n",
"An **Updater** is a type of **operation** in HOOMD-blue that makes changes to the **state**.\n",
"To use an **Updater**, first instantiate the object, assign a **Trigger**, and add it to the **Simulation**.\n",
Expand Down Expand Up @@ -289,7 +289,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## The MoveSize tuner\n",
"## The MoveSize Tuner\n",
"\n",
"A **Tuner** is another type of **operation**.\n",
"**Tuners** make changes to other **operations** to improve performance.\n",
Expand Down Expand Up @@ -324,7 +324,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run until complete\n",
"## Run Until Complete\n",
"\n",
"When the **QuickCompress** updater achieves the target box size and there are no overlaps between particles, the compression process is **complete**.\n",
"The number of time steps needed to achieve this varies based on parameters.\n",
Expand Down
8 changes: 4 additions & 4 deletions 00-Introducing-HOOMD-blue/06-Equilibrating-the-System.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"* Demonstrate using **GSD** to write the simulation **trajectory** to a file.\n",
"* Demonstrate best practices for move size tuning using **Before** and **And Triggers**.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand Down Expand Up @@ -192,7 +192,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Writing simulation trajectories\n",
"## Writing Simulation Trajectories\n",
"\n",
"Save the system **state** to a file periodically so that you can observe the equilibration process.\n",
"This tutorial previously used **GSD** files to store a single frame of the system **state** using either the **GSD** Python package or `GSD.write`.\n",
Expand All @@ -218,7 +218,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tuning the trial move size\n",
"## Tuning the Trial Move Size\n",
"\n",
"The previous section used the **MoveSize** tuner regularly during compression to adjust `d` and `a` to achieve a target **acceptance ratio** while the system density changed rapidly.\n",
"Use it again during the equilibration run to ensure that HPMC is working optimally.\n",
Expand Down Expand Up @@ -316,7 +316,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Equilibrating the system\n",
"## Equilibrating the System\n",
"\n",
"To equilibrate the system, **run** the simulation.\n",
"The length of the run needed is strongly dependent on the particular model, the system size, the density, and many other factors.\n",
Expand Down
8 changes: 4 additions & 4 deletions 00-Introducing-HOOMD-blue/07-Analyzing-Trajectories.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"* Describe how to access trajectory frames in **GSD**.\n",
"* Examine the trajectory with **freud** and **fresnel**.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand Down Expand Up @@ -173,7 +173,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Equilibration challenges\n",
"## Equilibration Challenges\n",
"\n",
"In the previous section, you ran the hard octahedra system for many time steps to **equilibrate** it and saved the trajectory in `trajectory.gsd`.\n",
"Is the final **state** you obtained actually an **equilibrium state**?\n",
Expand Down Expand Up @@ -201,7 +201,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Read the trajectory\n",
"## Read the Trajectory\n",
"\n",
"Use **GSD** to open the **trajectory** generated by the previous section of this tutorial."
]
Expand Down Expand Up @@ -289,7 +289,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simulation length\n",
"## Simulation Length\n",
"\n",
"How can you tell if you have run long enough to **equilibrate** the system?\n",
"The hard octahedra system forms the bcc structure [by nucleation and growth](https://doi.org/10.1038/ncomms14038).\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"* Define **forces**, **potential energy** and explain how HOOMD-blue evaluates **pair potentials** within a cutoff.\n",
"* Explain how the MD **Integrator** and **integration methods** solve the equations of motion and allow for different **thermodynamic ensembles**.\n",
"\n",
"## Boilerplate code"
"## Boilerplate Code"
]
},
{
Expand All @@ -43,7 +43,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Equations of motion\n",
"## Equations of Motion\n",
"\n",
"**Molecular dynamics** simulations model the movement of particles over time by solving the **equations of motion** numerically, advancing the state of the system forward by time `dt` on each time step.\n",
"You can use **molecular dynamics** to model dynamic, time dependent processes (like fluid flow) or thermodynamic equilibrium states (like crystals).\n",
Expand Down Expand Up @@ -810,7 +810,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Integration methods\n",
"## Integration Methods\n",
"\n",
"HOOMD-blue provides a number of **integration methods**, which define the **equations of motion** that apply to a subset of the particles in the system.\n",
"The **ConstantVolume** method implements Newton's laws while the thermostat scales the velocities to sample the canonical ensemble.\n",
Expand Down
Loading

0 comments on commit d93cb2e

Please sign in to comment.