Packmol
Dense, overlap-free initial configurations for solvents and mixtures. The original Fortran code was rewritten in Julia and the m3g/packmol repository is archived in its favour.
Tool 035 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

What Packmol is
Packmol builds starting configurations for molecular simulations. Given one or more molecule types and a region of space, it places the requested number of copies so that no two atoms come closer than a chosen tolerance and every molecule respects its constraints. The problem is solved as an optimisation (packing) with the GENCAN method, which lets the code fill a box with thousands of solvent molecules. Packmol was written in Fortran; the current version is a rewrite in Julia, and the Fortran repository has been archived in its favour.
The input is a short text file listing a tolerance, an output name and, for each molecule type, a structure file (PDB, XYZ, MOL2 or Tinker format), the number of copies and constraints: inside or outside a box, sphere or cylinder, above or below a plane, or fixed at given coordinates. Atom-level constraints place a head group near a surface while its tail points away, which is how bilayers and micelles are built. The output is a single structure file ready for topology builders such as tleap, pdb2gmx or Moltemplate.
Packmol produces coordinates only. It assigns no force-field parameters and does not equilibrate the system.
Features
- Overlap-free packing by optimisation with user-set minimum distance
- Geometric constraints: box, sphere, cylinder, plane, ellipsoid, inside and outside
- Atom-level constraints for oriented molecules such as lipids and surfactants
- Reads and writes PDB, XYZ, MOL2 and Tinker structure files
- Fixed molecules such as a solute or a surface kept in place
- Command-line program and Julia package with the same input syntax
What it is for
- Solvate a protein or a nanoparticle in a box of water and ions
- Build liquid mixtures and electrolyte solutions at a target density
- Assemble lipid bilayers, micelles and vesicles from oriented molecules
- Fill a pore or a slab with gas or solvent molecules
Verified facts
| Family | Force fields, system building and free energy |
|---|---|
| Language or basis | Julia (Fortran version archived) |
| Repository | https://github.com/m3g/Packmol.jl (GitHub) |
| Licence | MIT (SPDX identifier as declared in the repository) |
| Main language on GitHub | Julia |
| Last commit | 2026-11-27 |
| Latest release | v100.2.0 (2026-11-27) |
| Stars | 46 on 2026-11-28 |
| Open issues and pull requests | 1 on 2026-11-28 |
| Repository created | 2021-06-08 |
| Verified | 2026-11-28 by MolForge's checking script, against the host's API |
Where Packmol fits
Build the system, parametrise the interactions, and extract thermodynamic quantities from the trajectories.
Packmol appears in this chain of the directory: Biomolecular molecular dynamics.
Successor of m3g/packmol.
Questions people ask
- Does Packmol create topology or force-field files?
- No. Packmol outputs coordinates only. The topology and parameters must be generated separately, for example with tleap for AMBER, pdb2gmx for GROMACS, Moltemplate for LAMMPS or the Open Force Field Toolkit for small molecules. Keeping molecule order consistent between the Packmol input and the topology builder is the main practical step.
- Is the Julia version compatible with the old Fortran Packmol?
- The Julia package Packmol.jl reads the same input files and produces equivalent output, and it can be run from the command line as before. The original Fortran repository is archived, so new development and fixes happen in the Julia version. Existing scripts generally work unchanged.
- How do I set the box size for a given density?
- Packmol does not compute densities. You compute the box volume from the desired density and the molecular masses, then specify the number of molecules and the box dimensions as constraints. A short equilibration at constant pressure in the MD engine afterwards corrects the remaining difference.
- Is Packmol open source?
- Yes. The repository declares the MIT licence (SPDX identifier read from the host on 2026-11-28). Read the licence text in the repository before redistributing or embedding it.
- Where is the Packmol source code?
- At https://github.com/m3g/Packmol.jl (GitHub). Successor of m3g/packmol.
- Is Packmol still maintained?
- The last commit was pushed on 2026-11-27 and the latest tagged release is v100.2.0 from 2026-11-27; the repository had 1 open issues and pull requests on 2026-11-28.
- Does MolForge use Packmol?
- No. MolForge runs nine of the hundred tools in this directory (RDKit, OpenMM, AutoDock Vina, Open Babel, MDTraj, pymbar and NGL, plus PySCF and xTB in MFsig); Packmol is listed because of its place in force fields, system building and free energy, not because we run it.
Our comments on Packmol
MolForge does not run Packmol in production. This page is a verified pointer, not a review: the facts above come from the repository on the date shown, the description is ours, and we make no claim about accuracy or speed that we have not measured. If you maintain Packmol and something here is wrong or out of date, write to hello@molforge.ai and we will correct the source file.
Test status
Not tested by MolForge. To check Packmol yourself: clone the repository, follow the installation section of its README, and run the test suite the project ships before trusting a result; the last-commit date and the open issue count above tell you how alive the project is.