Packmol creates an initial point for molecular dynamics simulations by packing molecules in defined regions of space. The packing guarantees that short range repulsive interactions do not disrupt the simulations.
The great variety of types of spatial constraints that can be attributed to the molecules, or atoms within the molecules, makes it easy to create ordered systems, such as lamellar, spherical or tubular lipid layers.
The user must provide only the coordinates of one molecule of each type, the number of molecules of each type and the spatial constraints that each type of molecule must satisfy.
The package is compatible with input files of PDB, TINKER, and XYZ.
If you are not familiar with compiling packages, you may find it easier to get the Julia interface for
packmol, which provides executables for all common platforms: https://github.com/m3g/Packmol.jl
Installation of the Julia programming language and of the Julia Packmol package are necessary, but
these follow simple instructions which are described in the link above.
Installation from the Python Package Index
Packmol is available for most platforms as a pre-build wheel from the Python Package Index.
this will compile and send the executable somewhere in your PATH.
By default (on Linux systems) it will be ~/.local/bin. Making it available
as a packmol command anywhere in your computer.
fpm will look for Fortran compilers automatically and will use gfortran
as default. To use another compiler modify the environment variable
FPM_FC=compiler, for example for ifort, use in bash, export FPM_FC=ifort.
References
Please always cite one of the following references in publications for which Packmol was useful:
L Martinez, R Andrade, EG Birgin, JM Martinez, Packmol: A package for building initial configurations for molecular dynamics simulations. Journal of Computational Chemistry, 30, 2157-2164, 2009. (https://doi.org/10.1002/jcc.21224)
JM Martinez, L Martinez, Packing optimization for the automated generation of complex system’s initial configurations for molecular dynamics and docking. Journal of Computational Chemistry, 24, 819-825, 2003.
(https://doi.org/10.1002/jcc.10216)
Packmol
Packmol - Creates Initial Configurations for Molecular Dynamics Simulations
https://m3g.github.io/packmol
What is Packmol
Packmol creates an initial point for molecular dynamics simulations by packing molecules in defined regions of space. The packing guarantees that short range repulsive interactions do not disrupt the simulations.
The great variety of types of spatial constraints that can be attributed to the molecules, or atoms within the molecules, makes it easy to create ordered systems, such as lamellar, spherical or tubular lipid layers.
The user must provide only the coordinates of one molecule of each type, the number of molecules of each type and the spatial constraints that each type of molecule must satisfy.
The package is compatible with input files of PDB, TINKER, and XYZ.
Usage
User guide, examples, and tutorials, are available at: https://m3g.github.io/packmol
Installation instructions
Multi-platform package provider with Julia
If you are not familiar with compiling packages, you may find it easier to get the Julia interface for
packmol, which provides executables for all common platforms: https://github.com/m3g/Packmol.jlInstallation of the Julia programming language and of the Julia
Packmolpackage are necessary, but these follow simple instructions which are described in the link above.Installation from the Python Package Index
Packmol is available for most platforms as a pre-build wheel from the Python Package Index.
or direclty as CLI command using uv
Manual compilation
Download the
.tar.gzor.zipfiles of the latest version from: https://github.com/m3g/packmol/releasesUnpack the files, for example with:
or
substituting the
21.0.0with the correct version number.Using
makeGo into the
packmoldirectory, and compile the package (we assumegfortranor other compiler is available):An executable called
packmolwill be created in the main directory. Add that directory to your path.Using the Fortran Package Manager (
fpm)Install the Fortran Package Manager from: https://fpm.fortran-lang.org/en/install/index.html#install
Go into the
packmoldirectory, and run:this will compile and send the executable somewhere in your
PATH. By default (on Linux systems) it will be~/.local/bin. Making it available as apackmolcommand anywhere in your computer.fpmwill look for Fortran compilers automatically and will usegfortranas default. To use another compiler modify the environment variableFPM_FC=compiler, for example forifort, use in bash,export FPM_FC=ifort.References
Please always cite one of the following references in publications for which Packmol was useful:
L Martinez, R Andrade, EG Birgin, JM Martinez, Packmol: A package for building initial configurations for molecular dynamics simulations. Journal of Computational Chemistry, 30, 2157-2164, 2009. (https://doi.org/10.1002/jcc.21224)
JM Martinez, L Martinez, Packing optimization for the automated generation of complex system’s initial configurations for molecular dynamics and docking. Journal of Computational Chemistry, 24, 819-825, 2003. (https://doi.org/10.1002/jcc.10216)