Currently this Julia package serves as a multi-platform runner for packmol. In the future this will be an independent package with a faster and improved version of the Packmol package.
-
Install Julia in your system, with juliaup
-
Launch julia and install this package:
julia> import Pkg; Pkg.add("Packmol")
Run packmol in your input file with:
julia> using Packmol
julia> run_packmol()
This will open a file browser, from which you can choose the input file for packmol
.
Packmol will run immediately once the file is open.
Alternativelly, you can provide the path to the file explicitly, with:
julia> run_packmol(raw"C:\users\my_user\my_files\my_input_file.inp")
For command-line usage, we suggest the following procedure:
Start Julia and create an environment where packmol is installed:
julia> import Pkg
julia> Pkg.activate("Packmol", shared=true)
julia> Pkg.add("Packmol")
julia> exit()
Next, copy this into a packmol.jl
file:
import Pkg; Pkg.activate("Packmol", shared=true) # Activate Packmol environment
using Packmol
for input_file in ARGS
run_packmol(input_file)
end
This script can be executed from the command line with
julia packmol.jl packmol_input1.inp packmol_input2.inp
to run packmol
for one or more input files.
To keep Packmol up-to-date, use:
julia> import Pkg; Pkg.activate("Packmol"; shared=true); Pkg.update()
(or type ] activate @Packmol
and then ] up
, at the julia>
prompt).
Additionally, it is possible to disable the loading of the file-dialog machinery
by setting the system environment variable PACKMOL_GUI="false"
. This might be
important to run packmol through this interface in computers without a GUI.