Skip to content

Commit

Permalink
Merge pull request #1159 from openforcefield/doc-packmol
Browse files Browse the repository at this point in the history
Document why `tolerance` is removed from box edges
  • Loading branch information
mattwthompson authored Feb 5, 2025
2 parents acbd6e4 + d837bfa commit 523b20e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions openff/interchange/components/_packmol.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,15 @@ def pack_box(
Notes
-----
Returned topologies may have larger box vectors than what would be defined
by the target density.
Returned topologies may have smaller or larger box vectors than what would be defined by the
target density if the box size is determined by `target_density`. When calling Packmol, each
linear dimension of the box is scaled up by 10%. However, Packmol by default adds a small
buffer (defined by the `tolerance` argument which otherwise defines the minimum distance,
default 2 Angstrom) at the end of the packed box, which causes small voids when tiling copies of
each periodic image. This void is removed in hopes of faster equilibration times but the box
density is slightly increased as a result. These changes may cancel each other out or result in
larger or smaller densities than the target density, depending on argument values.
"""
# Make sure packmol can be found.
packmol_path = _find_packmol()
Expand Down

0 comments on commit 523b20e

Please sign in to comment.