From d93cb2edacc083d7d66f004ae13baf31f7350878 Mon Sep 17 00:00:00 2001 From: Calvin Condon <145710053+chcondon@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:52:43 -0400 Subject: [PATCH] Typo fixes (#126) * 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 * Update 06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb Co-authored-by: Joshua A. Anderson * Update 04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb Co-authored-by: Joshua A. Anderson * Update 06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb Co-authored-by: Joshua A. Anderson * Update 05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb Co-authored-by: Joshua A. Anderson --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Joshua A. Anderson --- 00-Introducing-HOOMD-blue/00-index.ipynb | 4 +-- .../01-The-Simulation-Object.ipynb | 8 ++--- ...ard-Particle-Monte-Carlo-Simulations.ipynb | 14 ++++---- .../03-Initializing-the-System-State.ipynb | 12 +++---- .../04-Randomizing-the-System.ipynb | 10 +++--- .../05-Compressing-the-System.ipynb | 12 +++---- .../06-Equilibrating-the-System.ipynb | 8 ++--- .../07-Analyzing-Trajectories.ipynb | 8 ++--- .../01-Molecular-Dynamics-Simulations.ipynb | 6 ++-- .../02-Initializing-a-Random-System.ipynb | 16 ++++----- .../03-Compressing-the-System.ipynb | 16 ++++----- 02-Logging/01-Logging-to-a-file.ipynb | 12 +++---- 02-Logging/02-Saving-Array-Quantities.ipynb | 14 ++++---- 02-Logging/03-Storing-Particle-Shape.ipynb | 8 ++--- 02-Logging/04-Writing-Formatted-Output.ipynb | 14 ++++---- .../00-index.ipynb | 2 +- .../01-Introduction-to-MPI.ipynb | 6 ++-- .../02-Domain-Decomposition.ipynb | 16 ++++----- ...ssing-System-Configurations-With-MPI.ipynb | 8 ++--- ...Multiple-Simulations-With-Partitions.ipynb | 2 +- .../01-What-are-Actions.ipynb | 8 ++--- .../02-An-Initial-Custom-Action.ipynb | 8 ++--- .../03-Custom-Action-Features.ipynb | 4 +-- .../04-Custom-Updater.ipynb | 4 +-- .../05-Custom-Writer.ipynb | 8 ++--- .../06-Improving-Performance.ipynb | 10 +++--- .../01-Organizing-Data.ipynb | 10 +++--- .../02-Executing-Simulations.ipynb | 6 ++-- .../03-Continuing-Simulations.ipynb | 16 ++++----- .../04-Submitting-Cluster-Jobs.ipynb | 16 ++++----- .../01-Introduction-to-Rigid-Bodies.ipynb | 12 +++---- .../02-Running-Rigid-Body-Simulations.ipynb | 18 +++++----- .../03-Preparing-a-General-Body.ipynb | 18 +++++----- .../01-Kern-Frenkel-Model.ipynb | 4 +-- ...ulating-a-System-of-Patchy-Particles.ipynb | 34 +++++++++---------- .../01-Barriers.ipynb | 10 +++--- .../02-Fixed-particles.ipynb | 14 ++++---- .../03-Wall-geometries.ipynb | 12 +++---- .../04-Wall-potential-MD.ipynb | 8 ++--- .../05-Wall-potential-HPMC.ipynb | 6 ++-- 40 files changed, 211 insertions(+), 211 deletions(-) diff --git a/00-Introducing-HOOMD-blue/00-index.ipynb b/00-Introducing-HOOMD-blue/00-index.ipynb index ad9d50c..083c8de 100644 --- a/00-Introducing-HOOMD-blue/00-index.ipynb +++ b/00-Introducing-HOOMD-blue/00-index.ipynb @@ -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", @@ -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." ] }, { diff --git a/00-Introducing-HOOMD-blue/01-The-Simulation-Object.ipynb b/00-Introducing-HOOMD-blue/01-The-Simulation-Object.ipynb index 233b443..fdc9ce0 100644 --- a/00-Introducing-HOOMD-blue/01-The-Simulation-Object.ipynb +++ b/00-Introducing-HOOMD-blue/01-The-Simulation-Object.ipynb @@ -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": [ @@ -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:" ] diff --git a/00-Introducing-HOOMD-blue/02-Performing-Hard-Particle-Monte-Carlo-Simulations.ipynb b/00-Introducing-HOOMD-blue/02-Performing-Hard-Particle-Monte-Carlo-Simulations.ipynb index 0dc835c..84e7475 100644 --- a/00-Introducing-HOOMD-blue/02-Performing-Hard-Particle-Monte-Carlo-Simulations.ipynb +++ b/00-Introducing-HOOMD-blue/02-Performing-Hard-Particle-Monte-Carlo-Simulations.ipynb @@ -20,7 +20,7 @@ "* Explain the integrator parameters.\n", "* Introduce **time steps**.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -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", @@ -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:" ] @@ -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", @@ -121,7 +121,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Setting the integrator" + "## Setting the Integrator" ] }, { @@ -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." ] }, diff --git a/00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb b/00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb index fa4e9a4..f51e64f 100644 --- a/00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb +++ b/00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb @@ -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" ] }, { @@ -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)." @@ -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", @@ -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." diff --git a/00-Introducing-HOOMD-blue/04-Randomizing-the-System.ipynb b/00-Introducing-HOOMD-blue/04-Randomizing-the-System.ipynb index b2eabf4..5b82c9b 100644 --- a/00-Introducing-HOOMD-blue/04-Randomizing-the-System.ipynb +++ b/00-Introducing-HOOMD-blue/04-Randomizing-the-System.ipynb @@ -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" ] }, { @@ -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", @@ -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:" ] @@ -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." @@ -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:" ] diff --git a/00-Introducing-HOOMD-blue/05-Compressing-the-System.ipynb b/00-Introducing-HOOMD-blue/05-Compressing-the-System.ipynb index e37c15e..ed78396 100644 --- a/00-Introducing-HOOMD-blue/05-Compressing-the-System.ipynb +++ b/00-Introducing-HOOMD-blue/05-Compressing-the-System.ipynb @@ -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" ] }, { @@ -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:" ] }, @@ -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", @@ -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", @@ -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", diff --git a/00-Introducing-HOOMD-blue/06-Equilibrating-the-System.ipynb b/00-Introducing-HOOMD-blue/06-Equilibrating-the-System.ipynb index d14eda2..88a8a82 100644 --- a/00-Introducing-HOOMD-blue/06-Equilibrating-the-System.ipynb +++ b/00-Introducing-HOOMD-blue/06-Equilibrating-the-System.ipynb @@ -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" ] }, { @@ -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", @@ -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", @@ -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", diff --git a/00-Introducing-HOOMD-blue/07-Analyzing-Trajectories.ipynb b/00-Introducing-HOOMD-blue/07-Analyzing-Trajectories.ipynb index a293346..ef35f87 100644 --- a/00-Introducing-HOOMD-blue/07-Analyzing-Trajectories.ipynb +++ b/00-Introducing-HOOMD-blue/07-Analyzing-Trajectories.ipynb @@ -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" ] }, { @@ -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", @@ -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." ] @@ -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", diff --git a/01-Introducing-Molecular-Dynamics/01-Molecular-Dynamics-Simulations.ipynb b/01-Introducing-Molecular-Dynamics/01-Molecular-Dynamics-Simulations.ipynb index b531c62..e5f9c3a 100644 --- a/01-Introducing-Molecular-Dynamics/01-Molecular-Dynamics-Simulations.ipynb +++ b/01-Introducing-Molecular-Dynamics/01-Molecular-Dynamics-Simulations.ipynb @@ -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" ] }, { @@ -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", @@ -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", diff --git a/01-Introducing-Molecular-Dynamics/02-Initializing-a-Random-System.ipynb b/01-Introducing-Molecular-Dynamics/02-Initializing-a-Random-System.ipynb index 527a324..e4b403d 100644 --- a/01-Introducing-Molecular-Dynamics/02-Initializing-a-Random-System.ipynb +++ b/01-Introducing-Molecular-Dynamics/02-Initializing-a-Random-System.ipynb @@ -21,7 +21,7 @@ "* Show how to use **ThermodynamicQuantities** to compute properties of the system.\n", "* Address the difference between **kinetic temperature** and **temperature**.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -184,9 +184,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Initial condition\n", + "## Initial Condition\n", "\n", - "The Lennard-Jones system self-assembles the the fcc structure at moderately high densities.\n", + "The Lennard-Jones system self-assembles the fcc structure at moderately high densities.\n", "To keep this tutorial's run time short, it simulates a small number of particles commensurate with the *fcc* structure (`4 * m**3`, where *m* is an integer)." ] }, @@ -298,7 +298,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Initialize the simulation\n", + "## Initialize the Simulation\n", "\n", "Configure this simulation to run on the CPU:" ] @@ -361,7 +361,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Setting random velocities\n", + "## Setting Random Velocities\n", "\n", "In HOOMD-blue, velocities default to 0:" ] @@ -397,7 +397,7 @@ "source": [ "When using the **ConstantVolume** or **ConstantPressure** method with a thermostat, you must specify non-zero initial velocities.\n", "The thermostat modifies particle velocities by a scale factor so it cannot scale a zero velocity to a non-zero one.\n", - "The ``thermalize_particle_momenta`` method will assign Gaussian distributed velocities consistent with the the canonical ensemble.\n", + "The ``thermalize_particle_momenta`` method will assign Gaussian distributed velocities consistent with the canonical ensemble.\n", "It also sets the velocity of the center of mass to 0:" ] }, @@ -435,7 +435,7 @@ "source": [ "**ThermodynamicQuantities** is a **Compute**, an **Operation** that computes properties of the system state.\n", "Some computations can only be performed during or after a simulation run has started.\n", - "Add the compute to the operations list and call `run(0)` to make all all properties available without changing the system state:" + "Add the compute to the operations list and call `run(0)` to make all properties available without changing the system state:" ] }, { @@ -561,7 +561,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Run the simulation\n", + "## Run the Simulation\n", "\n", "Run the simulation forward in time to randomize the particle positions.\n", "As the simulation progresses, it will move from the initial highly ordered state to a random fluid that fills the box." diff --git a/01-Introducing-Molecular-Dynamics/03-Compressing-the-System.ipynb b/01-Introducing-Molecular-Dynamics/03-Compressing-the-System.ipynb index 3b12383..14f9305 100644 --- a/01-Introducing-Molecular-Dynamics/03-Compressing-the-System.ipynb +++ b/01-Introducing-Molecular-Dynamics/03-Compressing-the-System.ipynb @@ -18,7 +18,7 @@ "* Show how to use **BoxResize** with a **Ramp variant** to slowly compress the system to the target volume.\n", "* Demonstrate the crystallization of Lennard-Jones particles\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -117,7 +117,7 @@ "\n", "`random.gsd`, generated by the previous section of this tutorial has particles randomly placed in a low density fluid state.\n", "To find the crystalline state, you need to compress the system to a higher density.\n", - "If you were to immediately scale the system to the target density, the particle's hard cores would overlap and the integrator would be become unstable.\n", + "If you were to immediately scale the system to the target density, the particle's hard cores would overlap and the integrator would become unstable.\n", "A more effective strategy gradually resizes the simulation box a little at a time over the course of a simulation, allowing any slight overlaps to relax." ] }, @@ -125,7 +125,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Initialize the simulation\n", + "## Initialize the Simulation\n", "\n", "Configure this simulation to run on the CPU." ] @@ -1113,7 +1113,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Gradually resize the simulation box\n", + "## Gradually Resize the Simulation Box\n", "\n", "Now, you need to determine the initial simulation box `box1` and final simulation box at the target density `box2`.\n", "This is the initial number density $\\rho$ of the current simulation box:" @@ -1214,7 +1214,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "At the half way point of the ramp, the variant is 0.5 and the current box lengths are half way between the initial and final ones:" + "At the halfway point of the ramp, the variant is 0.5 and the current box lengths are halfway between the initial and final ones:" ] }, { @@ -1349,7 +1349,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Equilibrating the system\n", + "## Equilibrating the System\n", "\n", "Run the simulation for a longer time and see if it self assembles the ordered fcc structure:\n", "
\n", @@ -1398,7 +1398,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Analyzing the simulation results\n", + "## Analyzing the Simulation Results\n", "\n", "Is this the fcc structure? Did the system reach equilibrium? These are topics covered in the Introducing HOOMD-blue tutorial. Consider it an exercise to modify this example and implement that analysis here. You will need to save a GSD file with the simulation trajectory, then use freud's **SolidLiquid** order parameter to identify when the ordered structure appears." ] @@ -1407,7 +1407,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This is the end of the introducing molecular dynamics tutorial! It described molecular dynamics simulations, demonstrated how to initialize, randomize, compress, and equilibrate a system of Lennard-Jones particles. See the other HOOMD-blue tutorials to learn about other concepts, or browse the reference documentation for more information." + "This is the end of the introducing molecular dynamics tutorial! It described molecular dynamics simulations, and demonstrated how to initialize, randomize, compress, and equilibrate a system of Lennard-Jones particles. See the other HOOMD-blue tutorials to learn about other concepts, or browse the reference documentation for more information." ] }, { diff --git a/02-Logging/01-Logging-to-a-file.ipynb b/02-Logging/01-Logging-to-a-file.ipynb index 127ef06..5597e4c 100644 --- a/02-Logging/01-Logging-to-a-file.ipynb +++ b/02-Logging/01-Logging-to-a-file.ipynb @@ -22,7 +22,7 @@ "* Explain how to read logged quantities from **HDF5** files.\n", "* Describe how **namespaces** appear in the names of the logged quantities.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -84,7 +84,7 @@ "## Define the Simulation\n", "\n", "This tutorial executes the Lennard-Jones particle simulation from a previous tutorial. \n", - "See [*Introducing Molecular Dyamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." + "See [*Introducing Molecular Dynamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." ] }, { @@ -119,7 +119,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Loggable quantities\n", + "## Loggable Quantities\n", "\n", "Many classes in HOOMD-blue provide special *properties* called **loggable quantities**.\n", "For example, the **Simulation** class provides `timestep`, `tps`, and others.\n", @@ -260,7 +260,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Add quantities to a Logger" + "## Add Quantities to a Logger" ] }, { @@ -319,7 +319,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Writing log quantities to a file\n", + "## Writing Log Quantities to a File\n", "\n", "Use the **HDF5Log** writer to store the quantities provided by `logger` to a HDF5 (`.h5`) file." ] @@ -378,7 +378,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Reading logged data from a HDF5 file" + "## Reading Logged Data From a HDF5 File" ] }, { diff --git a/02-Logging/02-Saving-Array-Quantities.ipynb b/02-Logging/02-Saving-Array-Quantities.ipynb index 3b6be9a..00f2da1 100644 --- a/02-Logging/02-Saving-Array-Quantities.ipynb +++ b/02-Logging/02-Saving-Array-Quantities.ipynb @@ -19,7 +19,7 @@ "* Explain how to read logged quantities from a **GSD** file.\n", "* Mention that OVITO reads these quantities.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -131,11 +131,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## General array quantities\n", + "## General Array Quantities\n", "\n", "You logged scalar and array quantities to a HDF5 file in the previous section. HDF5 is the ideal format to log this type of data, as it produces small files that can be read quickly.\n", "\n", - "## Array quantities coupled with a trajectory\n", + "## Array Quantities Coupled With a Trajectory\n", "\n", "You can also log scalar, array, per-particle (e.g. energy and force), and other quantities in a **GSD** file _along with the trajectory_.\n", "Then you can use utilize the data in your analysis and visualization workflow, such as using [OVITO](https://www.ovito.org/) to color particles by energy or display force vectors.\n", @@ -149,7 +149,7 @@ "## Define the Simulation\n", "\n", "This tutorial executes the Lennard-Jones particle simulation from a previous tutorial. \n", - "See [*Introducing Molecular Dyamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." + "See [*Introducing Molecular Dynamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." ] }, { @@ -182,7 +182,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Logging per-particle quantities\n", + "## Logging Per-Particle Quantities\n", "\n", "MD forces provide a number of loggable quantities including their contribution to the system energy, but also per-particle energy contributions (in `energies`) and per-particle forces, torques, and virials." ] @@ -234,7 +234,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Writing per-particle quantities to a GSD file\n", + "## Writing Per-Particle Quantities to a GSD File\n", "\n", "Create the **GSD** writer to write the simulation trajectory:" ] @@ -306,7 +306,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Reading logged data from a GSD file\n", + "## Reading Logged Data From a GSD File\n", "\n", "Use the `gsd` package to open the file:" ] diff --git a/02-Logging/03-Storing-Particle-Shape.ipynb b/02-Logging/03-Storing-Particle-Shape.ipynb index 1164c82..c432e47 100644 --- a/02-Logging/03-Storing-Particle-Shape.ipynb +++ b/02-Logging/03-Storing-Particle-Shape.ipynb @@ -10,14 +10,14 @@ "\n", "### Questions\n", "\n", - "* How can I store particle shape for use with visualization tools?\n", + "* How can I store particle shapes for use with visualization tools?\n", "\n", "### Objectives\n", "\n", "* Demonstrate logging **type_shapes** to a **GSD** file.\n", "* Explain that OVITO can read this information.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -97,7 +97,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Logging particle shape to a GSD file\n", + "## Logging Particle Shape to a GSD File\n", "\n", "The **type_shapes** loggable quantity is a representation of the particle shape for each type following the [**type_shapes** specification](https://gsd.readthedocs.io/en/stable/shapes.html) for the **GSD** file format.\n", "In HPMC simulations, the integrator provides **type_shapes**:" @@ -231,7 +231,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Reading logged shapes from a GSD file\n", + "## Reading Logged Shapes From a GSD File\n", "\n", "You can access the shape from scripts using the `gsd` package:" ] diff --git a/02-Logging/04-Writing-Formatted-Output.ipynb b/02-Logging/04-Writing-Formatted-Output.ipynb index 443fe35..8d6535a 100644 --- a/02-Logging/04-Writing-Formatted-Output.ipynb +++ b/02-Logging/04-Writing-Formatted-Output.ipynb @@ -20,7 +20,7 @@ "* Explain the use of **Table** to display status information during a simulation run.\n", "* Show that **Table** can write to a file.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -59,7 +59,7 @@ "## Define the Simulation\n", "\n", "This tutorial executes the Lennard-Jones particle simulation from a previous tutorial. \n", - "See [*Introducing Molecular Dyamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." + "See [*Introducing Molecular Dynamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code." ] }, { @@ -91,7 +91,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Formatted output\n", + "## Formatted Output\n", "\n", "The **Table** writer formats log quantities in human-readable text and writes them to `stdout` or a file.\n", "**Table** only supports `scalar` and `string` quantities due to the limitations of this format.\n", @@ -102,7 +102,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Add quantities to a Logger" + "## Add Quantities to a Logger" ] }, { @@ -125,7 +125,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Log the and simulation `timestep` and `tps` quantities:" + "Log the simulation `timestep` and `tps` quantities:" ] }, { @@ -198,7 +198,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Display quantities with Table" + "## Display Quantities with Table" ] }, { @@ -299,7 +299,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Save Table output to a file\n", + "## Save Table Output to a File\n", "\n", "**Table** writes to `stdout` by default.\n", "It can write to a file (or any Python file-like object with `write` and `flush` methods) instead." diff --git a/03-Parallel-Simulations-With-MPI/00-index.ipynb b/03-Parallel-Simulations-With-MPI/00-index.ipynb index 08c15ec..c72e513 100644 --- a/03-Parallel-Simulations-With-MPI/00-index.ipynb +++ b/03-Parallel-Simulations-With-MPI/00-index.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "source": [ "The system used in *Introducing Molecular Dynamics* is small. \n", - "Replicate the state of that system, as **MPI** parallel simulations require a minimum system size (this requirement is explained in more details in the next section)." + "Replicate the state of that system, as **MPI** parallel simulations require a minimum system size (this requirement is explained in more detail in the next section)." ] }, { diff --git a/03-Parallel-Simulations-With-MPI/01-Introduction-to-MPI.ipynb b/03-Parallel-Simulations-With-MPI/01-Introduction-to-MPI.ipynb index 825eaed..5bb6e4f 100644 --- a/03-Parallel-Simulations-With-MPI/01-Introduction-to-MPI.ipynb +++ b/03-Parallel-Simulations-With-MPI/01-Introduction-to-MPI.ipynb @@ -42,7 +42,7 @@ "## The Simulation Script\n", "\n", "This tutorial executes the Lennard-Jones particle simulation from a previous tutorial. \n", - "See [*Introducing Molecular Dyamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code.\n", + "See [*Introducing Molecular Dynamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb) for a complete description of this code.\n", "\n", "
\n", " You can also run HPMC and other types of simulations in HOOMD-blue using MPI. \n", @@ -100,7 +100,7 @@ "source": [ "`lj_performance.py` is a file in the same directory as this notebook. Due to the way **MPI** launches parallel jobs, the code **must** be in a file instead of a notebook cell. `%pycat` is an IPython magic command that displays the contents of a Python file with syntax highlighting.\n", "\n", - "Compare this script to the one used in [*Introducing Molecular Dyamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb).\n", + "Compare this script to the one used in [*Introducing Molecular Dynamics*](../01-Introducing-Molecular-Dynamics/00-index.ipynb).\n", "The only difference is the addition of `device.notice(f'{simulation.tps}')` which prints the performance in time steps per second.\n", "The same script can be run in serial or in parallel on different numbers of CPU cores." ] @@ -109,7 +109,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Run the simulation with MPI\n", + "## Run the Simulation with MPI\n", "\n", "Use the **MPI** launcher `mpirun` to execute this script in parallel on any number of CPU cores given by the `-n` option.\n", "\n", diff --git a/03-Parallel-Simulations-With-MPI/02-Domain-Decomposition.ipynb b/03-Parallel-Simulations-With-MPI/02-Domain-Decomposition.ipynb index 16bb1c0..63355d0 100644 --- a/03-Parallel-Simulations-With-MPI/02-Domain-Decomposition.ipynb +++ b/03-Parallel-Simulations-With-MPI/02-Domain-Decomposition.ipynb @@ -29,7 +29,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Ranks and processes\n", + "## Ranks and Processes\n", "\n", "When you call `mpirun -n 4 python3 script.py`, `mpirun` launches 4 separate instances of `python` all executing `script.py` at the same time.\n", "For example, a script that prints a message will repeat the output:" @@ -134,18 +134,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "`os.getpid` is Python method that returns the **process** id, a number assigned to every executing **process** by the operating system." + "`os.getpid` is a Python method that returns the **process** id, a number assigned to every executing **process** by the operating system." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Domain decomposition\n", + "## Domain Decomposition\n", "\n", "When you create the State object in an **MPI** simulation on more than 1 rank, HOOMD-blue splits the simulation box into *k* x *l* x *m* **domains**.\n", "The product of *k*, *l* and *m* is equal to the number of **ranks** you execute.\n", - "Chose **n** values that factorize given the constraints of your **HPC** system, such as the number of cores per node.\n", + "Choose **n** values that factorize given the constraints of your **HPC** system, such as the number of cores per node.\n", "The domains are defined by planes that split the box.\n", "By default, the planes are evenly spaced and chosen to minimize the surface area between the **domains**." ] @@ -327,14 +327,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Single program\n", + "## Single Program\n", "\n", "HOOMD-blue scripts must be written as a **single program**.\n", "All **ranks** must load the *same* input file, define the *same* operations with the *same* parameters and triggers, and run the *same* number of time steps.\n", - "HOOMD-blue requires this because it splits the system into smaller domains, one assigned to each **rank**, and executes same operations on each domain.\n", + "HOOMD-blue requires this because it splits the system into smaller domains, one assigned to each **rank**, and executes the same operations on each domain.\n", "\n", "While there are many **processes** executing the same Python script in parallel, they are not independent.\n", - "The **ranks** send messages back and forth as needed to combine the decomposed parts of simulation into a whole.\n", + "The **ranks** send messages back and forth as needed to combine the decomposed parts of the simulation into a whole.\n", "If your script does not follow the **single program** requirement, it is likely at least one **rank** will **deadlock** while it waits for a message to be sent from another **rank** that will never be sent.\n", "A **deadlock** means that the execution continues while waiting for a condition that will never be true.\n", "\n", @@ -458,7 +458,7 @@ "source": [ "## Summary\n", "\n", - "In this section, you have seen how MPI ranks run as independent processes, learned how HOOMD splits particles across domains, understand why that HOOMD-blue scripts need to execute all operations identically on all ranks, and identified how to to print output only once in MPI simulations without causing deadlock.\n", + "In this section, you have seen how MPI ranks run as independent processes, learned how HOOMD splits particles across domains and why HOOMD-blue scripts need to execute all operations identically on all ranks, and identified how to to print output only once in MPI simulations without causing deadlock.\n", "The next section of this tutorial shows you how to access the system configuration in MPI simulations." ] } diff --git a/03-Parallel-Simulations-With-MPI/03-Accessing-System-Configurations-With-MPI.ipynb b/03-Parallel-Simulations-With-MPI/03-Accessing-System-Configurations-With-MPI.ipynb index 2c364fd..c53918d 100644 --- a/03-Parallel-Simulations-With-MPI/03-Accessing-System-Configurations-With-MPI.ipynb +++ b/03-Parallel-Simulations-With-MPI/03-Accessing-System-Configurations-With-MPI.ipynb @@ -42,7 +42,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Writing GSD files in parallel jobs\n", + "## Writing GSD Files in Parallel Jobs\n", "\n", "You can write GSD files in parallel jobs just as you do in serial.\n", "Saving the simulation trajectory to a file is useful for visualization and analysis after the simulation completes.\n", @@ -116,11 +116,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Modifying particle properties with local snapshots\n", + "## Modifying Particle Properties With Local Snapshots\n", "\n", "Use snapshots when you need to modify particle properties during a simulation, or perform analysis where the results need to be known as the simulation progresses (e.g. umbrella sampling).\n", "**Local snapshots** provide high performance direct access to the particle data stored in HOOMD-blue.\n", - "The direct access comes with several costs.\n", + "This direct access comes with several costs.\n", "Your script can only access particles local to the **domain** of the current **rank**. \n", "These particles may appear in any order in the local snapshot and a given particle is only present on one rank.\n", "To access the properties of a specific particle, find the index given the particle's tag and handle the condition where it is not present on the rank.\n", @@ -200,7 +200,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Using global snapshots with MPI" + "## Using Global Snapshots With MPI" ] }, { diff --git a/03-Parallel-Simulations-With-MPI/04-Running-Multiple-Simulations-With-Partitions.ipynb b/03-Parallel-Simulations-With-MPI/04-Running-Multiple-Simulations-With-Partitions.ipynb index 3586747..6e8d563 100644 --- a/03-Parallel-Simulations-With-MPI/04-Running-Multiple-Simulations-With-Partitions.ipynb +++ b/03-Parallel-Simulations-With-MPI/04-Running-Multiple-Simulations-With-Partitions.ipynb @@ -44,7 +44,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Partitioning communicators\n", + "## Partitioning Communicators\n", "\n", "So far in this tutorial you have seen how executing `mpirun -n 4 python3 script.py` will use domain decomposition to run *1* simulation split across *4* ranks via **domain decomposition**.\n", "What if you wanted to run *2 different* simulations, each on *2* **ranks** with this command?\n", diff --git a/04-Custom-Actions-In-Python/01-What-are-Actions.ipynb b/04-Custom-Actions-In-Python/01-What-are-Actions.ipynb index 581f764..9870f63 100644 --- a/04-Custom-Actions-In-Python/01-What-are-Actions.ipynb +++ b/04-Custom-Actions-In-Python/01-What-are-Actions.ipynb @@ -28,7 +28,7 @@ "or composed by operations. For example, objects like\n", "`hoomd.update.BoxResize` and `hoomd.hpmc.tune.MoveSize` contain\n", "actions internally. In other words, the actions implement the logic \n", - "repsonsible for implementing the functionality of an operation\n", + "responsible for implementing the functionality of an operation\n", "(e.g. resizing the box for `hoomd.update.BoxResize`), while the\n", "operation handles some logistics like determining when the action\n", "will run using a `hoomd.Trigger` object.\n", @@ -68,8 +68,8 @@ " file or some other object (writers should not modify the simulation \n", " state). `hoomd.write.GSD` is an example of a writer; it does not\n", " change the simulation state, but writes it out to a GSD file.\n", - "* **Tuners** modify another object's hyperparameters (or object\n", - " attributes). Tuners should not modify state, but can modify another\n", + "* **Tuners** modify another object's attributes.\n", + " Tuners should not modify state, but can modify another\n", " object to improve performance. `hoomd.hpmc.tune.MoveSize` is an\n", " example of this type of action. `MoveSize` tunes the integrator's\n", " trial move sizes to reach a specific acceptance rate performance but\n", @@ -83,7 +83,7 @@ " - Updaters: modify simulation state\n", " - Writers: doesn't modify simulation state, writes out data\n", " - Tuners: doesn't modify simulation state, modifies object\n", - " hyperparameters\n", + " attributes.\n", "\n", "In the next section we start writing custom actions and using them\n", "in HOOMD-blue simulations." diff --git a/04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb b/04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb index b2fa3f5..5758816 100644 --- a/04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb +++ b/04-Custom-Actions-In-Python/02-An-Initial-Custom-Action.ipynb @@ -109,7 +109,7 @@ "custom action is, we must wrap it in a subclass of\n", "`hoomd.custom.CustomOperation`. We have three options as discussed in\n", "the previous section: an updater, writer, or tuner. Since our object\n", - "does not modify simulation state or an object's hyperparameters, but\n", + "does not modify the simulation state or an object's attributes, but\n", "writes the timestep to standard out, our action is a writer.\n", "`hoomd.write.CustomWriter` then is the correct class to wrap our custom\n", "action (`hoomd.update.CustomUpdater` and `hoomd.tune.CustomTuner` are\n", @@ -137,8 +137,8 @@ "\n", "## Using Custom Actions\n", "\n", - "To use a custom opeation we must add it to a `hoomd.Operations` object.\n", - "Thus, the steps to use a custom action in a simuluation are\n", + "To use a custom operation we must add it to a `hoomd.Operations` object.\n", + "Thus, the steps to use a custom action in a simulation are\n", "1. Instantiate the custom action object.\n", "2. Wrap the custom action in the appropriate custom operation class.\n", "3. Add the custom operation object to the appropriate container in a\n", @@ -225,7 +225,7 @@ "metadata": {}, "source": [ "In the next section we discuss some of the features of custom actions,\n", - "before getting into non-trival examples in later sections." + "before getting into non-trivial examples in later sections." ] } ], diff --git a/04-Custom-Actions-In-Python/03-Custom-Action-Features.ipynb b/04-Custom-Actions-In-Python/03-Custom-Action-Features.ipynb index 1ba3a96..b20bf7a 100644 --- a/04-Custom-Actions-In-Python/03-Custom-Action-Features.ipynb +++ b/04-Custom-Actions-In-Python/03-Custom-Action-Features.ipynb @@ -10,7 +10,7 @@ "\n", "### Questions\n", "\n", - "- How do I access simulation state information?\n", + "- How do I access the simulation state information?\n", "- How do I create loggable quantities in custom actions?\n", "- What are other features provided by the custom action/operation\n", " API?\n", @@ -49,7 +49,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## How do I access simulation state?\n", + "## How Do I Access the Simulation State?\n", "\n", "By the time that a custom action will have its `act` method called\n", "it will have an attribute `_state` accessible to it which is the\n", diff --git a/04-Custom-Actions-In-Python/04-Custom-Updater.ipynb b/04-Custom-Actions-In-Python/04-Custom-Updater.ipynb index 0a45230..4954990 100644 --- a/04-Custom-Actions-In-Python/04-Custom-Updater.ipynb +++ b/04-Custom-Actions-In-Python/04-Custom-Updater.ipynb @@ -14,7 +14,7 @@ "\n", "### Objectives\n", "\n", - "- Show an example of a non-trival custom updater.\n", + "- Show an example of a non-trivial custom updater.\n", "\n", "## Boilerplate Code" ] @@ -344,7 +344,7 @@ "metadata": {}, "source": [ "We could continue to improve upon this updater and the execution of\n", - "this operation. However, this suffices to showcase the ability of non-trivial updaters to affect the simulation state." + "this operation. However, this suffices to showcase the ability of non-trivial updaters to affect the simulation state." ] } ], diff --git a/04-Custom-Actions-In-Python/05-Custom-Writer.ipynb b/04-Custom-Actions-In-Python/05-Custom-Writer.ipynb index bab1868..e42fda5 100644 --- a/04-Custom-Actions-In-Python/05-Custom-Writer.ipynb +++ b/04-Custom-Actions-In-Python/05-Custom-Writer.ipynb @@ -148,7 +148,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We have run the simulation, and our HDF5 file has been written. Lets check the\n", + "We have run the simulation, and our HDF5 file has been written. Let's check the\n", "groups our file contains now." ] }, @@ -215,7 +215,7 @@ "use a tuple system where we signify the property we want to store using\n", "a tuple that nests into a snapshot object. For example to write images\n", "we will use the tuple `('particles', 'image')` to signify we want to \n", - "store images. We will let an user pass in a list of tuples of any length \n", + "store images. We will let a user pass in a list of tuples of any length \n", "to specify what they want to store. (Positions will always be stored, and \n", "we will move them to the _particles_ group)." ] @@ -366,10 +366,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We could continue add more features such as argument validation\n", + "We could continue to add more features such as argument validation\n", "in the\n", "constructor, support for the logging subsystem of HOOMD-blue,\n", - "a classmethod, or a number of other things. However, these\n", + "a class method, or a number of other things. However, these\n", "are left as exercises. This section has shown a non-trivial\n", "application of the custom action feature in HOOMD-blue for\n", "custom writers." diff --git a/04-Custom-Actions-In-Python/06-Improving-Performance.ipynb b/04-Custom-Actions-In-Python/06-Improving-Performance.ipynb index 86ff8b7..b26bda4 100644 --- a/04-Custom-Actions-In-Python/06-Improving-Performance.ipynb +++ b/04-Custom-Actions-In-Python/06-Improving-Performance.ipynb @@ -92,7 +92,7 @@ "that should help improve performance.\n", "\n", "* `State.get_snapshot` aggregates data across MPI ranks and is $O(n)$ to\n", - " construct and setting the state to a new snapshot $O(n)$ as well.\n", + " construct, and setting the state to a new snapshot is $O(n)$ as well.\n", " However, `hoomd.State.cpu_local_snaphshot` or\n", " `hoomd.State.gpu_local_snapshot` are on order $O(1)$ to construct\n", " and modifying data in a local snapshot is $O(1)$ as well.\n", @@ -113,7 +113,7 @@ "the `cpu_local_snapshot` to update particle velocity. \n", "We will use the `%%timeit` magic function for timing the\n", "simulation's run time before and after our optimization.\n", - "To highlight the differnce, we will run the updater every\n", + "To highlight the difference, we will run the updater every\n", "timestep." ] }, @@ -207,7 +207,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -245,7 +245,7 @@ " # We restrict the computation to the MPI\n", " # rank containing the particle if applicable.\n", " # By checking if multiple MPI ranks exist first\n", - " # we can avoid for checking inclusion of a tag id\n", + " # we can avoid checking the inclusion of a tag id\n", " # in an array.\n", " if self._comm.num_ranks <= 1 or part_tag in snap.particles.tag:\n", " i = snap.particles.rtag[part_tag]\n", @@ -306,7 +306,7 @@ "metadata": {}, "source": [ "As can be seen the simulation with the new\n", - "EnergyInsertUpdater about an order of magnitude faster\n", + "EnergyInsertUpdater is about an order of magnitude faster\n", "with a system size of $12^3 = 1728$,\n", "by virtue of the local snapshot modification having\n", "$O(1)$ time complexity. At larger system sizes this\n", diff --git a/05-Organizing-and-Executing-Simulations/01-Organizing-Data.ipynb b/05-Organizing-and-Executing-Simulations/01-Organizing-Data.ipynb index ed60958..3f21a1c 100644 --- a/05-Organizing-and-Executing-Simulations/01-Organizing-Data.ipynb +++ b/05-Organizing-and-Executing-Simulations/01-Organizing-Data.ipynb @@ -17,10 +17,10 @@ "\n", "* Define a **data space** that organizes simulation output into **directories** based on **state point** parameters.\n", "* Demonstrate how to use **signac** to create a **data space**.\n", - "* **Initialize** a **data space** with hard particle Monte Carlo simulations at a selected volume fractions.\n", + "* **Initialize** a **data space** with hard particle Monte Carlo simulations at selected volume fractions.\n", "* Show how to store computed results in the **job document**.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -60,7 +60,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Research question\n", + "## Research Question\n", "\n", "The [Introducing HOOMD-blue](../00-Introducing-HOOMD-blue/00-index.ipynb) tutorial shows how to execute a *single* simulation of hard octahedra and how they self-assemble into a crystal structure.\n", "You might want to answer the question \"At what volume fraction is the phase transition from fluid to crystal?\".\n", @@ -96,14 +96,14 @@ "metadata": {}, "source": [ "In your own research, you will execute different types of simulation with different parameters.\n", - "Follow the example provided in this tutorial and apply the same concepts organize and execute the simulations for your work." + "Follow the example provided in this tutorial and apply the same concepts to organize and execute the simulations for your work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Data space" + "## Data Space" ] }, { diff --git a/05-Organizing-and-Executing-Simulations/02-Executing-Simulations.ipynb b/05-Organizing-and-Executing-Simulations/02-Executing-Simulations.ipynb index 39ca2b3..e18a333 100644 --- a/05-Organizing-and-Executing-Simulations/02-Executing-Simulations.ipynb +++ b/05-Organizing-and-Executing-Simulations/02-Executing-Simulations.ipynb @@ -18,7 +18,7 @@ "* Demonstrate how to use **signac-flow** to define **workflow steps** and their associated **pre-conditions** and **post-conditions**.\n", "* Execute the **workflow** to randomize and compress all **state points** in the **data space**. \n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -36,7 +36,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Workflow steps\n", + "## Workflow Steps\n", "\n", "The [Introducing HOOMD-blue](../00-Introducing-HOOMD-blue/00-index.ipynb) tutorial employs distinct **workflow steps** that must be performed in sequence to complete the self-assembly study at a given **state point**.\n", "These are *initialization*, *randomization*, *compression*, *equilibration*, and *analysis*.\n", @@ -242,7 +242,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Run the workflow\n", + "## Run the Workflow\n", "\n", "Now that you have defined the **workflow steps**, check the status of the workflow:" ] diff --git a/05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb b/05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb index bd50613..a784695 100644 --- a/05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb +++ b/05-Organizing-and-Executing-Simulations/03-Continuing-Simulations.ipynb @@ -18,7 +18,7 @@ "* Describe what you need to consider when writing a **workflow step** that can **continue**.\n", "* Demonstrate how to **append** to trajectory files, write needed data to a **restart** file and limit the simulation run to a given **wall time**.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -37,9 +37,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Workflow steps from the previous section\n", + "## Workflow Steps From the Previous Section\n", "\n", - "The code in the next block collects the workflow steps the previous tutorial section to define the whole workflow." + "The code in the next block collects the workflow steps from the previous tutorial section to define the whole workflow." ] }, { @@ -141,7 +141,7 @@ "After several rounds of submissions, all **signac jobs** will be complete.\n", "\n", "This section of the tutorial teaches you how to write a **workflow step** that can limit its run time and **continue**.\n", - "The next section will cover effectively run **workflow steps** in **cluster jobs** on HPC resources." + "The next section will teach you how to run **workflow steps** in **cluster jobs** on HPC resources." ] }, { @@ -228,7 +228,7 @@ " # Run the simulation in chunks of 10,000 time steps.\n", " simulation.run(min(10_000, end_step - simulation.timestep))\n", "\n", - " # End the workflow step early if the next run would exceed the\n", + " # End the workflow step early if the next run exceeds the\n", " # alotted walltime. Use the walltime of the current run as\n", " # an estimate for the next.\n", " if (\n", @@ -257,7 +257,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "When this **workflow step** is executed, it stores the trial move sizes `a`, `d` and the current timestep in the job document as well as the the state of the simulation in `restart.gsd`.\n", + "When this **workflow step** is executed, it stores the trial move sizes `a`, `d` and the current timestep in the job document as well as the the state of the simulation in `restart.gsd`.\n", "It reads these when starting again to continue from where the previous execution stopped.\n", "This is a large code block, see the comments for more details on how this **workflow step** can **continue** from where it stopped.\n", "\n", @@ -345,7 +345,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "See that *equilibrate* step produced the `trajectory.gsd` file and the `'a'`, `'d'`, and `'timestep'` items in the **job document**:" + "See that the *equilibrate* step produced the `trajectory.gsd` file and the `'a'`, `'d'`, and `'timestep'` items in the **job document**:" ] }, { @@ -402,7 +402,7 @@ "source": [ "## Summary\n", "\n", - "In this section of the tutorial, you defined the **workflow step** to *equilibreate* the hard particle simulation.\n", + "In this section of the tutorial, you defined the **workflow step** to *equilibrate* the hard particle simulation.\n", "It stores dynamic parameters and the state of the system needed to **continue** execution when executed again.\n", "Now, the **directory** for each simulation contains **trajectory.gsd**, and would be ready for analysis after executed to completion." ] diff --git a/05-Organizing-and-Executing-Simulations/04-Submitting-Cluster-Jobs.ipynb b/05-Organizing-and-Executing-Simulations/04-Submitting-Cluster-Jobs.ipynb index 0ad796e..009f881 100644 --- a/05-Organizing-and-Executing-Simulations/04-Submitting-Cluster-Jobs.ipynb +++ b/05-Organizing-and-Executing-Simulations/04-Submitting-Cluster-Jobs.ipynb @@ -24,12 +24,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Cluster jobs\n", + "## Cluster Jobs\n", "\n", "On HPC resources, you submit **cluster jobs** to the queue which execute on the compute nodes.\n", "You can use **signac-flow** to generate **cluster job** submission scripts that execute the steps in your **workflow**.\n", "Use this to execute the expensive or time consuming **workflow steps** on HPC resources that provide access to many more CPU cores or GPUs than are available on the typical workstation.\n", - "You can use these resources for to increase **throughput** (number of simulations per unit time) by executing many simulations at the same time, reduce **latency** (time to complete a single simulation) by executing each simulation on more than one MPI rank with **domain decomposition**, or some combination of the two.\n", + "You can use these resources to increase **throughput** (number of simulations per unit time) by executing many simulations at the same time, reduce **latency** (time to complete a single simulation) by executing each simulation on more than one MPI rank with **domain decomposition**, or some combination of the two.\n", "\n", "This tutorial will demonstrate how to use **signac-flow** to submit HOOMD-blue workflow steps in **cluster jobs**.\n", "See [Parallel Simulations with MPI](../03-Parallel-Simulations-With-MPI/00-index.ipynb) to learn more about MPI **domain decomposition** in HOOMD-blue." @@ -39,10 +39,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Command line interface\n", + "## Command Line Interface\n", "\n", "Use the **command line interface** to submit **cluster jobs** on HPC resources.\n", - "Place the entire worfklow in a Python file and add a `__main__` entry point that calls `Project().main()`.\n", + "Place the entire workflow in a Python file and add a `__main__` entry point that calls `Project().main()`.\n", "`project.py` contains the **workflow step** code from the previous two tutorial sections and the additional code.\n", "\n", "Define parameters:\n", @@ -64,7 +64,7 @@ "**signac flow** directives set options for the generated **cluster job**.\n", "Here, `nranks` sets the number of MPI ranks that the **workflow step** uses and **waltime** sets the **cluster job walltime** in hours.\n", "\n", - "Execute the entrypoint:\n", + "Execute the entry point:\n", "```python\n", "if __name__ == '__main__':\n", " Project().main()\n", @@ -355,11 +355,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Partitioning jobs\n", + "## Partitioning Jobs\n", "\n", "Some HPC resources schedule jobs *only by full node* or limit the *number of cluster jobs* you can queue at one time.\n", "Or you may have many thousands of **signac jobs** and want to reduce time spent waiting in queue.\n", - "In these cases, use MPI to **partition** one **cluster job** to executes many **signac jobs** in parallel (see [Parallel Simulations with MPI](../03-Parallel-Simulations-With-MPI/00-index.ipynb) for an introduction to MPI **partitions**).\n", + "In these cases, use MPI to **partition** one **cluster job** to execute many **signac jobs** in parallel (see [Parallel Simulations with MPI](../03-Parallel-Simulations-With-MPI/00-index.ipynb) for an introduction to MPI **partitions**).\n", "You can use MPI partitions alone (one rank per **signac job**) or in combination with MPI **domain decomposition** (more than one rank per **signac job**).\n", "\n", "**Aggregate** operations in **signac-flow** are **workflow steps** that execute on a list of **signac jobs**.\n", @@ -603,7 +603,7 @@ "It generates only one **cluster job** that uses MPI to execute the **workflow step** on 6 ranks which `equilibrate` splits into 3 partitions that each execute one **signac job** on 2 ranks each.\n", "\n", "
\n", - " Esnure that your partitioned jobs set the product RANKS_PER_PARTITION * JOBS_PER_AGGREGATE to a number of CPU cores or GPUs equal to a whole number of cluster nodes on your HPC resource. Failure to do so will waste resources on HPC resources that schedule by node.\n", + " Ensure that your partitioned jobs set the product RANKS_PER_PARTITION * JOBS_PER_AGGREGATE to a number of CPU cores or GPUs equal to a whole number of cluster nodes on your HPC resource. Failure to do so will waste resources on HPC resources that schedule by node.\n", "
" ] }, diff --git a/06-Modelling-Rigid-Bodies/01-Introduction-to-Rigid-Bodies.ipynb b/06-Modelling-Rigid-Bodies/01-Introduction-to-Rigid-Bodies.ipynb index 16bafbd..c0f3f9d 100644 --- a/06-Modelling-Rigid-Bodies/01-Introduction-to-Rigid-Bodies.ipynb +++ b/06-Modelling-Rigid-Bodies/01-Introduction-to-Rigid-Bodies.ipynb @@ -22,7 +22,7 @@ "* Enumerate the properties of rigid bodies.\n", "* Demonstrate setting the properties of a rigid dimer and creating an initial condition.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -160,7 +160,7 @@ "response to the net force and torque on the body. The **constituent particles** follow the central\n", "particle.\n", "\n", - "## Coordinate systems\n", + "## Coordinate Systems\n", "\n", "You define the positions and orientations of the constituent particles in **body coordinates**,\n", "a coordinate system where the (0,0,0) is at the position of the central particle and the body\n", @@ -204,7 +204,7 @@ "id": "9", "metadata": {}, "source": [ - "To demonstrate, the following code block computes the global positions of the the dimer at the given central position and rotation (in 2D)." + "To demonstrate, the following code block computes the global positions of the dimer at the given central position and rotation (in 2D)." ] }, { @@ -1226,7 +1226,7 @@ "id": "13", "metadata": {}, "source": [ - "## Properties of rigid bodies\n", + "## Properties of Rigid Bodies\n", "\n", "The following rigid body properties are given by the properties of the central particle:\n", "\n", @@ -1250,7 +1250,7 @@ "id": "14", "metadata": {}, "source": [ - "## Defining properties of the rigid dimer\n", + "## Defining Properties of the Rigid Dimer\n", "\n", "Let each constituent particle in the dimer be a point particle of type *A* with mass 1 at the\n", "constituent positions previously defined in `dimer_positions`. Each dimer will be located at the\n", @@ -1481,7 +1481,7 @@ "id": "34", "metadata": {}, "source": [ - "## Placing constituent particles in the initial condition\n", + "## Placing Constituent Particles in the Initial Condition\n", "\n", "So far, our snapshot has only the dimer central particles:" ] diff --git a/06-Modelling-Rigid-Bodies/02-Running-Rigid-Body-Simulations.ipynb b/06-Modelling-Rigid-Bodies/02-Running-Rigid-Body-Simulations.ipynb index b934707..c897ea9 100644 --- a/06-Modelling-Rigid-Bodies/02-Running-Rigid-Body-Simulations.ipynb +++ b/06-Modelling-Rigid-Bodies/02-Running-Rigid-Body-Simulations.ipynb @@ -25,7 +25,7 @@ "* Run a rigid body MD simulation at constant temperature.\n", "* Demonstrate that rigid bodies equilibrate both translational and rotational degrees of freedom.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -123,7 +123,7 @@ "id": "4", "metadata": {}, "source": [ - "## Continuing the simulation from a GSD file.\n", + "## Continuing the Simulation From a GSD File.\n", "\n", "The previous section created an initial condition containing dimer particles in `lattice.gsd`. \n", "Initialize a new simulation from this file:" @@ -198,7 +198,7 @@ "id": "11", "metadata": {}, "source": [ - "## Integrating rigid body degrees of freedom\n", + "## Integrating Rigid Body Degrees of Freedom\n", "\n", "Create an Integrator with the option `integrate_rotational_dof=True`:" ] @@ -363,7 +363,7 @@ "id": "27", "metadata": {}, "source": [ - "## Compressing the system\n", + "## Compressing the System\n", "\n", "We have initialized the system state, added the integrator, set the rigid constraint, and defined\n", "the pairwise particle interactions. Before we run the simulation, we need to set initial velocities\n", @@ -386,8 +386,8 @@ "id": "29", "metadata": {}, "source": [ - "`thermalize_particle_momenta` assigns gaussian distributed momenta to each translational and \n", - "rotational degree of freedom for each particle given in the filter. In this case, it wil assign\n", + "`thermalize_particle_momenta` assigns Gaussian distributed momenta to each translational and \n", + "rotational degree of freedom for each particle given in the filter. In this case, it will assign\n", "momenta about the *y* and *z* axes, but not *x* because $I_{xx} = 0$." ] }, @@ -502,7 +502,7 @@ "id": "38", "metadata": {}, "source": [ - "## Thermodynamic properties of rigid bodies\n", + "## Thermodynamic Properties of Rigid Bodies\n", "\n", "Add the `ThermodynamicQuantities` compute to the simulation:" ] @@ -576,7 +576,7 @@ "id": "43", "metadata": {}, "source": [ - "These values are consistent (within exepected thermodynamic fluctuations) with the equipartition theorem:" + "These values are consistent (within expected thermodynamic fluctuations) with the equipartition theorem:" ] }, { @@ -634,7 +634,7 @@ "id": "46", "metadata": {}, "source": [ - "Note that the number of rotational degrees is freedom is 2 times the number of particles as we\n", + "Note that the number of rotational degrees of freedom is 2 times the number of particles as we\n", "assigned 2 non-zero moments of inertia." ] }, diff --git a/06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb b/06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb index 11b72cb..f0634ef 100644 --- a/06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb +++ b/06-Modelling-Rigid-Bodies/03-Preparing-a-General-Body.ipynb @@ -16,15 +16,15 @@ "\n", "### Questions\n", "\n", - "* How do I input arbitrary rigid body into HOOMD-blue?\n", + "* How do I prepare an arbitrary rigid body for use in HOOMD-blue?\n", "\n", "### Objectives\n", "\n", - "* Define an rigid body with an arbitrary inertia tensor.\n", + "* Define a rigid body with an arbitrary inertia tensor.\n", "* Diagonalize the moment of inertia.\n", "* Reorient the constituent particles in the diagonal body coordinates.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -117,7 +117,7 @@ "tags": [] }, "source": [ - "## Diagonalized bodies:\n", + "## Diagonalized Bodies:\n", "\n", "HOOMD-blue assumes bodies are provided in a coordinate system where the moment of inertia tensor is\n", "diagonal.\n", @@ -174,10 +174,10 @@ "id": "7", "metadata": {}, "source": [ - "## Step 1: Compute the inertia tensor\n", + "## Step 1: Compute the Inertia Tensor\n", "\n", "HOOMD-blue makes no assumptions about the distribution of mass in your body. For example, you can\n", - "compute the moment of inertia assuming that each consituent particle is a uniform density ball.\n", + "compute the moment of inertia assuming that each constituent particle is a uniform density ball.\n", "The moment of inertia of a single ball computed about the center of the ball is:" ] }, @@ -267,7 +267,7 @@ "id": "12", "metadata": {}, "source": [ - "## Step 2: Diagonalize the moment of inertia\n", + "## Step 2: Diagonalize the Moment of Inertia\n", "\n", "First, find the eigenvalues of the general moment of inertia:" ] @@ -390,7 +390,7 @@ "id": "21", "metadata": {}, "source": [ - "The rigid body has now been aligned its principle rotational axes with the *x*, *y*, and *z* body\n", + "The rigid body is now aligned to its principle rotational axes with the *x*, *y*, and *z* body\n", "axes. Use `diagonal_positions`as body coordinates along with `I_diagonal` as the central particle's\n", "`moment_inertia`." ] @@ -452,7 +452,7 @@ "id": "25", "metadata": {}, "source": [ - "This is the end of the introduction to the modelling rigid bodies tutorial! It described the\n", + "This is the end of the introduction to the modeling rigid bodies tutorial! It described the\n", "properties of rigid bodies, showed how to run a simulation of dimers, and demonstrated how to\n", "diagonalize the moment of inertia of general bodies. See the other HOOMD-blue tutorials to learn\n", "about other concepts, or browse the reference documentation for more information." diff --git a/07-Modelling-Patchy-Particles/01-Kern-Frenkel-Model.ipynb b/07-Modelling-Patchy-Particles/01-Kern-Frenkel-Model.ipynb index 94c296b..fbc3316 100644 --- a/07-Modelling-Patchy-Particles/01-Kern-Frenkel-Model.ipynb +++ b/07-Modelling-Patchy-Particles/01-Kern-Frenkel-Model.ipynb @@ -23,7 +23,7 @@ "id": "1", "metadata": {}, "source": [ - "## Patchy particles\n", + "## Patchy Particles\n", "In the [Introducing Molecular Dynamics](../01-Introducing-Molecular-Dynamics/00-index.ipynb) tutorial, you simulated a system of particles interacting through the Lennard-Jones pair potential.\n", "The Lennard-Jones pair potential is spherically symmetric, that is, the pair potential does not depend on the relative orientation of the interacting particles.\n", "\n", @@ -32,7 +32,7 @@ "Particles that interact with anisotropic pair potentials where some relative orientations are more attractive than others are known as **patchy particles**, since we can imagine that there are attractive **patches** on the surface of the particles.\n", "\n", "\n", - "## The Kern–Frenkel model\n", + "## The Kern–Frenkel Model\n", "\n", "One of the simplest patchy particle models is the Kern–Frenkel model, which was introduced in a [2003 Journal of Chemical Physics paper](https://doi.org/10.1063/1.1569473).\n", "The Kern–Frenkel model contains directional pairwise energetic interactions in addition to hard sphere-like volume exclusion.\n", diff --git a/07-Modelling-Patchy-Particles/02-Simulating-a-System-of-Patchy-Particles.ipynb b/07-Modelling-Patchy-Particles/02-Simulating-a-System-of-Patchy-Particles.ipynb index 38dcc77..a8faeac 100644 --- a/07-Modelling-Patchy-Particles/02-Simulating-a-System-of-Patchy-Particles.ipynb +++ b/07-Modelling-Patchy-Particles/02-Simulating-a-System-of-Patchy-Particles.ipynb @@ -16,7 +16,7 @@ "* Run a simulation of particles interacting through the Kern–Frenkel pair potential.\n", "* Log the potential energy during an HPMC simulation.\n", "\n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -65,10 +65,10 @@ "id": "3", "metadata": {}, "source": [ - "In the previous section, you learned about patchy particles and the the Kern–Frenkel model.\n", + "In the previous section, you learned about patchy particles and the Kern–Frenkel model.\n", "In this section, we will initialize a system of particles, add the Kern–Frenkel pair potential to the simulation, and run the simulation while logging the energy.\n", "\n", - "## Constructing the system\n", + "## Constructing the System\n", "Construct the system using the same code you used in [Introducing HOOMD-blue tutorial](../00-Introducing-HOOMD-blue/03-Initializing-the-System-State.ipynb) and then initialize a simulation." ] }, @@ -111,7 +111,7 @@ "id": "5", "metadata": {}, "source": [ - "### Define interaction parameters\n", + "### Define Interaction Parameters\n", "Define the parameters $\\delta$, $\\varepsilon$, $\\lambda$, and $\\sigma$ of the Kern–Frenkel model to simulate." ] }, @@ -133,7 +133,7 @@ "id": "7", "metadata": {}, "source": [ - "### Add HPMC integrator\n", + "### Add HPMC Integrator\n", "Now add an HPMC integrator to the system.\n", "Add the `Sphere` integrator because the cores of the particles are spherical.\n", "These particles also have an orientation, so tell HPMC to perform rotation moves on the particles via the `orientable` key of the shape dictionary." @@ -156,9 +156,9 @@ "id": "9", "metadata": {}, "source": [ - "## Add the pair potential\n", + "## Add the Pair Potential\n", "\n", - "### Write patch code\n", + "### Write Patch Code\n", "The `hoomd.hpmc.pair.user` classes use strings containing C++ code to evaluate pair potentials.\n", "The code you pass in is the body of the function with the following signature:\n", "```C++\n", @@ -308,7 +308,7 @@ "id": "19", "metadata": {}, "source": [ - "### Set cutoff distance for the patchy interaction\n", + "### Set Cutoff Distance for the Patchy Interaction\n", "\n", "Before creating the pair potential object to add to the `Simulation`, calculate `r_cut`.\n", "Similar to how HOOMD uses neighbor lists in MD to increase performance by only calculating interactions between nearby particles, the `hoomd.hpmc.pair.user` classes take an `r_cut` parameter, which is the center to center distance cutoff beyond which all pair interactions are 0.\n", @@ -330,7 +330,7 @@ "id": "21", "metadata": {}, "source": [ - "### Set variable parameters for patch kernel\n" + "### Set Variable Parameters for Patch Kernel\n" ] }, { @@ -349,7 +349,7 @@ "id": "23", "metadata": {}, "source": [ - "### Adding the patchy potential to the simulation\n", + "### Adding the Patchy Potential to the Simulation\n", "\n", "Now create a `hoomd.hpmc.pair.user.CPPPotential` object that will evaluate the Kern–Frenkel potential in the simulation. Use the `patch_code` string that you built up that serves as the body of the function that computes patch interaction energy. \n", "Initialize the temperature to $kT = 3$ to randomize the system on the first call to `Simulation.run()`." @@ -422,7 +422,7 @@ "id": "29", "metadata": {}, "source": [ - "### Log the patch energy\n", + "### Log the Patch Energy\n", "\n", "Create a logger and add the patchy potential to it, and then create a GSD writer to write the log values to file during the simulation.\n", "Also add the temperature to the logger so that later you can compare energies from parts of the simulation at different temperatures." @@ -458,9 +458,9 @@ "id": "31", "metadata": {}, "source": [ - "## Run the simulation\n", + "## Run the Simulation\n", "\n", - "### Randomize the system\n", + "### Randomize the System\n", "Run for a bit at the high initial temperature to randomize the system." ] }, @@ -479,9 +479,9 @@ "id": "33", "metadata": {}, "source": [ - "### Change the temperature\n", + "### Change the Temperature\n", "Now run for a bit at a lower temperature so that the patchy interactions cause the particles to cluster.\n", - "Recall, the `param_array` property of the patch potential is the effective temperature of the system." + "Recall that the `param_array` property of the patch potential is the effective temperature of the system." ] }, { @@ -539,7 +539,7 @@ "id": "39", "metadata": {}, "source": [ - "## Analyzing the results\n", + "## Analyzing the Results\n", "\n", "Plot the energy of the system to analyze the results.\n", "\n", @@ -562,7 +562,7 @@ "id": "41", "metadata": {}, "source": [ - "Recall, the the value of `patch_potential.energy` is really the energy divided by the thermal energy scale $kT$, so multiply the energy by $kT$ to get the actual energy." + "Recall that the value of `patch_potential.energy` is really the energy divided by the thermal energy scale $kT$, so multiply the energy by $kT$ to get the actual energy." ] }, { diff --git a/08-Placing-Barriers-in-the-Simulation-Box/01-Barriers.ipynb b/08-Placing-Barriers-in-the-Simulation-Box/01-Barriers.ipynb index 291a29b..30faf65 100644 --- a/08-Placing-Barriers-in-the-Simulation-Box/01-Barriers.ipynb +++ b/08-Placing-Barriers-in-the-Simulation-Box/01-Barriers.ipynb @@ -32,7 +32,7 @@ "tags": [] }, "source": [ - "## Barriers and the simulation box\n", + "## Barriers and the Simulation Box\n", "\n", "A **barrier** obstructs the motion of particles in a simulation. In typical cases, barriers split space into two regions - one where particles are allowed and one where particles are not.\n", "\n", @@ -44,7 +44,7 @@ "\n", "In the above example:\n", "1) A particle moving up from an allowed region wraps into a disallowed region on the bottom.\n", - "2) A particle moving left from from an allowed region wraps into a disallowed region on the right." + "2) A particle moving left from an allowed region wraps into a disallowed region on the right." ] }, { @@ -56,7 +56,7 @@ "\n", "![Example of a valid barrier](valid-barrier.svg)\n", "\n", - "In the above example, the barriers are half the interaction distance away from the edge of the primary box image. Therefore, a particle who's center is exactly on the edge of the allowed region can never interact with a particle in the allowed region on the opposite side of the box." + "In the above example, the barriers are half the interaction distance away from the edge of the primary box image. Therefore, a particle whose center is exactly on the edge of the allowed region can never interact with a particle in the allowed region on the opposite side of the box." ] }, { @@ -64,7 +64,7 @@ "id": "3", "metadata": {}, "source": [ - "## Preventing particles from crossing barriers\n", + "## Preventing Particles From Crossing Barriers\n", "\n", "To prevent particles from crossing a barrier, you must add **interactions** between particles and the barrier. There are many ways to achieve this goal. See the remaining sections of this tutorial for examples." ] @@ -82,7 +82,7 @@ "source": [ "## Conclusion\n", "\n", - "This section introduced the concept of barriers in the simulation box and explain that they must be placed carefully to take the always period box into account. The next section will show you how to make a barrier out of particles." + "This section introduced the concept of barriers in the simulation box and explained that they must be placed carefully to take the always period box into account. The next section will show you how to make a barrier out of particles." ] } ], diff --git a/08-Placing-Barriers-in-the-Simulation-Box/02-Fixed-particles.ipynb b/08-Placing-Barriers-in-the-Simulation-Box/02-Fixed-particles.ipynb index 128a72c..b01cf25 100644 --- a/08-Placing-Barriers-in-the-Simulation-Box/02-Fixed-particles.ipynb +++ b/08-Placing-Barriers-in-the-Simulation-Box/02-Fixed-particles.ipynb @@ -24,7 +24,7 @@ "* Show how to place particles to form arbitrary barriers.\n", "* Demonstrate the technique for HPMC and MD simulations.\n", " \n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -164,7 +164,7 @@ "tags": [] }, "source": [ - "## Placing barrier particles\n", + "## Placing Barrier Particles\n", "\n", "You can create arbitrarily shaped barriers out of particles. This contrived example places particles on a sine wave in a 2D box of length L:" ] @@ -248,7 +248,7 @@ "id": "11", "metadata": {}, "source": [ - "## Placing mobile particles\n", + "## Placing Mobile Particles\n", "\n", "You must place the mobile particles on the correct side of the barrier. This example places all particles on the line `y=0`:" ] @@ -279,7 +279,7 @@ "id": "13", "metadata": {}, "source": [ - "## Combine all particles in the simulation state\n", + "## Combine All Particles in the Simulation State\n", "\n", "Make a GSD file containing all the particles:" ] @@ -377,7 +377,7 @@ "id": "20", "metadata": {}, "source": [ - "## Perform HPMC simulations with barrier particles\n", + "## Perform HPMC Simulations with Barrier Particles\n", "\n", "Prepare a simulation of hard disks:" ] @@ -475,7 +475,7 @@ "id": "28", "metadata": {}, "source": [ - "## Perform MD simulations with barrier particles\n", + "## Perform MD Simulations With Barrier Particles\n", "\n", "In MD simulations, choose a pair potential interaction with a hard core to prevent the mobile particles from moving through the barrier:" ] @@ -595,7 +595,7 @@ "id": "38", "metadata": {}, "source": [ - "## Scaling the box\n", + "## Scaling the Box\n", "\n", "When the barrier is made of particles, operations such as `BoxResize` and `ConstantPressure` can scale the barrier particles along with the mobile particles. Choose the appropriate values for `filter` and `rescale_all` to achieve this behavior." ] diff --git a/08-Placing-Barriers-in-the-Simulation-Box/03-Wall-geometries.ipynb b/08-Placing-Barriers-in-the-Simulation-Box/03-Wall-geometries.ipynb index 0d20092..076e804 100644 --- a/08-Placing-Barriers-in-the-Simulation-Box/03-Wall-geometries.ipynb +++ b/08-Placing-Barriers-in-the-Simulation-Box/03-Wall-geometries.ipynb @@ -24,7 +24,7 @@ "* Show how to create **wall geometries**.\n", "* Explain that wall geometries are **surfaces**.\n", " \n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -48,7 +48,7 @@ "tags": [] }, "source": [ - "## Sphere, cylinder, and planar walls\n", + "## Sphere, Cylinder, and Planar Walls\n", "\n", "The previous section of this tutorial showed how to place particles to form barriers. You can use this technique to place arbitrarily shaped barriers with rough surfaces. To define a smooth surface, use one or more of the **wall geometry** classes: `Sphere`, `Cylinder`, and/or `Plane`.\n", "\n", @@ -68,7 +68,7 @@ "tags": [] }, "source": [ - "### Sphere wall geometry\n", + "### Sphere Wall Geometry\n", "\n", "The `Sphere` **wall geometry** defines a spherical surface. You can place a `Sphere` wall where particles are expected on the inside of the sphere:" ] @@ -112,7 +112,7 @@ "tags": [] }, "source": [ - "### Cylinder wall geometry\n", + "### Cylinder Wall Geometry\n", "\n", "The `Cylinder` **wall geometry** defines the surface of an infinite right circular cylinder along a given axis. Typically, you should align the cylinder to the x, y, or z axis to match the periodic boundary conditions:" ] @@ -156,7 +156,7 @@ "tags": [] }, "source": [ - "### Plane wall geometry\n", + "### Plane Wall Geometry\n", "\n", "The `Plane` wall geometry defines an infinite plane. The normal vector points _toward_ the region where the particles are expected:" ] @@ -182,7 +182,7 @@ "tags": [] }, "source": [ - "## Box size scaling\n", + "## Box Size Scaling\n", "\n", "**Wall geometries** are surfaces defined by the given parameters. They are not part of the system state and are not defined in proportion to the simulation box. No operations in HOOMD-blue scale or move **wall geometries**. For example, `BoxResize` will scale the **periodic box** and the **particle** positions but leave all **wall geometries** fixed with the parameters you defined. When needed, you should provide code that changes the parameters of your **wall geometries**." ] diff --git a/08-Placing-Barriers-in-the-Simulation-Box/04-Wall-potential-MD.ipynb b/08-Placing-Barriers-in-the-Simulation-Box/04-Wall-potential-MD.ipynb index 3f7852e..203bfce 100644 --- a/08-Placing-Barriers-in-the-Simulation-Box/04-Wall-potential-MD.ipynb +++ b/08-Placing-Barriers-in-the-Simulation-Box/04-Wall-potential-MD.ipynb @@ -23,7 +23,7 @@ "\n", "* Demonstrate the use of a wall potential class.\n", " \n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -220,9 +220,9 @@ "tags": [] }, "source": [ - "## Adding forces between particles and wall geometries\n", + "## Adding Forces Between Particles and Wall Geometries\n", "\n", - "In a molecular dynamics simulation, particles move in response to applied _forces_. Typically, this includes a pair forces between pairs of particles: " + "In a molecular dynamics simulation, particles move in response to applied _forces_. Typically, this includes pair forces between pairs of particles: " ] }, { @@ -330,7 +330,7 @@ "id": "18", "metadata": {}, "source": [ - "## Run the simulation" + "## Run the Simulation" ] }, { diff --git a/08-Placing-Barriers-in-the-Simulation-Box/05-Wall-potential-HPMC.ipynb b/08-Placing-Barriers-in-the-Simulation-Box/05-Wall-potential-HPMC.ipynb index 28f9b0d..eac13f6 100644 --- a/08-Placing-Barriers-in-the-Simulation-Box/05-Wall-potential-HPMC.ipynb +++ b/08-Placing-Barriers-in-the-Simulation-Box/05-Wall-potential-HPMC.ipynb @@ -23,7 +23,7 @@ "\n", "* Demonstrate the use of the wall potential class.\n", " \n", - "## Boilerplate code" + "## Boilerplate Code" ] }, { @@ -220,7 +220,7 @@ "tags": [] }, "source": [ - "## Adding the hard wall potential\n", + "## Adding the Hard Wall Potential\n", "\n", "Define the same wall surfaces used in the previous section of this tutorial:" ] @@ -274,7 +274,7 @@ "id": "13", "metadata": {}, "source": [ - "## Run the simulation" + "## Run the Simulation" ] }, {