Defining systems in Julia

This page documents building and packing a system entirely from Julia code, without a text input file. See Input files for the text-file equivalent, and Constraints for the full list of constraint constructors (InsideBox, OutsideSphere, InsideCylinder, ...) used below.

A system is built from the bottom up: one structure_type per kind of molecule, collected into a PackmolSystem, then packed with packmol.

using Packmolwater = structure_type(    "water.pdb";    number = 1000,    constraints = [InsideBox([0.,0.,0.],[40.,40.,40.])],)sys = PackmolSystem([water]; output = "box.pdb", tolerance = 2.0, seed = 1234)packmol(sys)

This is equivalent to the input file:

tolerance 2.0
output box.pdb
seed 1234

structure water.pdb
    number 1000
    inside box 0. 0. 0. 40. 40. 40.
end structure