Fixed molecules
fixed x y z beta gamma theta
center
centerofmassA structure with fixed is not packed: it is placed once, at the position (x, y, z) and with the rotation given by the Euler angles beta, gamma and theta (in radians, as in Fortran Packmol), and the other molecules are packed around it. number is optional (a fixed structure is a single molecule).
The rotation is applied to the coordinates of the structure file, about the origin of those coordinates, and then the molecule is translated by (x, y, z). With center the molecule is first centered at its geometric center, and with centerofmass at its center of mass (with the masses of the atoms; Fortran Packmol uses unit masses, that is, the geometric center), so that this center ends up at (x, y, z). fixed 0. 0. 0. 0. 0. 0. without center keeps the molecule exactly where it is in its file.
A fixed molecule takes no constraints. With periodic boundary conditions, its atoms must be inside the periodic cell.
In the Julia API, fixed = (position, angles) and center = :geometric or center = :mass are keyword arguments of structure_type.
Example
A protein fixed with its geometric center at the origin, surrounded by 5460 water molecules (about 1 g/mL) in a sphere with a radius of 35 Å:
structure protein.pdb
number 1
center
fixed 0. 0. 0. 0. 0. 0.
end structure
structure water.pdb
number 5460
inside sphere 0. 0. 0. 35.
end structureThe same system, packed with the Julia API and shown with the visualize function of PDBTools.jl:
using Packmol, PDBToolsprotein = structure_type("protein.pdb"; number = 1, fixed = ([0., 0., 0.], [0., 0., 0.]), center = :geometric,)water = structure_type("water.pdb"; number = 5460, constraints = [InsideSphere([0., 0., 0.], 35.)],)system = PackmolSystem([protein, water]; tolerance = 2.0, output = "fixed.pdb")packmol(system)visualize(get_atoms(system); water = true, rotate = [(:z, 30), (:x, -70)],)