pack-water a package for water packing, which relies on the Packmol package. It is ment to be used as input to LAMMPS for molecular dynamics simulations. The inputs include number of molecules, length of box/density of water and whether or not the packed water should support periodic boundary conditions. However, the package supports cubic shapes only.
NB: This package will no longer be updated. Instead, the functionality is included in the molecular builder, which is a more general python package for preparing systems for molecular dynamics simulations.
First download the contents:
$ git clone https://github.com/evenmn/pack-water.git
and then install pack-water:
$ cd pack-water
$ pip install .
The package is very straightforward to use:
from pack_water import PackWater
from pack_water.geometry import SphereGeometry, BoxGeometry
packer = PackWater()
packer.append(BoxGeometry(0, 0, 0, 40, 40, 20, density=0.998, side='in'))
packer.append(SphereGeometry(70, 20, 20, 20, number=2000, side='in'))
packer(pbc=3.0, outfile="data.out")