Packmol.jl

Packmol.jl is in very early stages of development.

See also

MolSimToolkit.jl/Packmol-Input-Creator

Reference

Packmol.run_packmolFunction
run_packmol()
run_packmol(input_file::String)

Runs the packmol executable with the input file input_file. This will run the classical http://m3g.iqm.unicamp.br/packmol program, which is a pre-compiled binary. The input file is a text file with the same syntax as the packmol input files.

If no input file is provided, a file explorer will be opened to choose the input file.

source
Packmol.pack_monoatomic!Function
pack_monoatomic!(positions::AbstractVector{<:SVector{N,T}}, unitcell, tol)

Pack a monoatomic system with iniital positions x and distance tolerance tol, into the unitcell defined by unitcell, considering periodic boundary conditions.

The unitcell can be a vector, in the case of orthorhombic cells, or a matrix, in the case of triclinic cells.

The coordinates and the unitcells can be two- or three-dimensional.

Example

julia> using Packmol, StaticArrays

julia> coordinates = 100 * rand(SVector{3,Float64}, 10^5);

julia> unitcell = [100.0, 100.0, 100.0]; tolerance = 2.0;

julia> pack_monoatomic!(coordinates, unitcell, tolerance)

After packing, the coordinates array will have updated positions for the atoms without overlaps.

source