4.5. Initialization and Neighbor Searching#

4.5.1. Initialization#

How to place particles in a box initially? Want to avoid too many overlaps or the simulation will likely blow up.

  • If density is low enough, random sequential addition may work:

    1. Choose a random position.

    2. Check if there are overlaps with existing particles (subject to PBCs).

    3. Accept if no overlaps; otherwise, choose a new location.

This procedure becomes inefficient once there are too many particles. A dense solid is an extreme case, but most liquids also cannot be initialized this way.

  • If density is very high or structure is ordered (e.g., crystal), use a lattice:

    • Examples:

      • Simple cubic

      • Face-centered cubic (FCC)

      • Body-centered cubic (BCC)

      • Hexagonal close-packed (HCP)

    • Choose lattice spacing so that:

      1. Particles don’t overlap.

      2. Lattice fits a periodic box.

  • If density is intermediate:

    • Use a lattice but randomly fill sites in it.

    • This strategy is effective for speeding up equilibration when:

      • Density is fairly high.

      • There are multiple particle types or sizes (e.g., fill big to small on different lattices).

  • Or, use a tool like Packmol:

    • Places particles at random.

    • Solves a large optimization problem to eliminate overlaps.

4.5.3. Additional Resorces#