warp-pack Command Reference
CPU-first packer for building initial molecular coordinates from small molecule templates. Compatible with Packmol configuration format.Synopsis
Options
Path to configuration file (.json, .yaml, or .inp)
Output file path (overrides config setting)
Output format override:
pdb, xyz, mol2, cif, gro, lammps, crdConfiguration Format
JSON/YAML Config
Packmol .inp Format
warp-pack supports native Packmol input files:Configuration Parameters
Global Settings
Box configuration:
size: [x, y, z] dimensionsshape:orthorhombic(only supported shape)
Minimum inter-atomic distance (Angstrom)
Random seed for reproducibility
Add box dimensions to CRYST1 record
Fixed offset to add to each box side (Angstrom)
Enable periodic boundary conditions
Explicit PBC minimum bounds [x, y, z]
Explicit PBC maximum bounds [x, y, z]
Skip writing CONECT records in PDB output
Use hexadecimal atom indices for large systems
Relaxation Settings
Number of post-packing overlap relaxation steps
Step size for relaxation (Angstrom)
Optimizer Settings (GENCAN)
Maximum GENCAN iterations per call
GENCAN step size
Outer GENCAN loop count (default: 200 * num_structures)
Initial GENCAN loop count (default: 20 * num_structures)
Initial GENCAN radius scale (decays toward 1.0)
Spatial hashing cell size scale (cell = min_distance * fbins)
Restart Files
Read initial positions from Packmol restart file
Write final positions to Packmol restart file
Progress Output
Write periodic snapshots every N seconds
Write partial structure on failure
Output Settings
Output configuration:
path: Output file pathformat: Output formatscale: Coordinate scale factor
Optional additional .crd output path
Structure Definitions
List of molecule structures to pack (see Structure Parameters below)
Structure Parameters
Each structure in thestructures array:
Path to molecule template file
Number of copies to pack
Override input format detection
Enable random rotation
Assign unique chain IDs to each copy
Override per-atom radius
Per-atom radius scale factor
Short-distance penalty radius
Short-distance radius scale
Enable soft penalty zone between short_tol_dist and min_distance
Short tolerance distance threshold
Per-structure GENCAN loop count override
Per-structure initial GENCAN loop override
Fixed positions [[x,y,z], …] for each copy
Fixed Euler angles [[β,γ,θ], …] for each copy
Rotation constraints:
beta: [min, max]gamma: [min, max]theta: [min, max]
Per-structure restart file
Per-atom parameter overrides (array of objects with index, radius, etc.)
Spatial constraints (see Constraint Types below)
Constraint Types
Inside Sphere
Outside Sphere
Inside Box
Outside Box
Inside Cylinder
Over/Below Plane
Supported Input Formats
Protein Data Bank format
XYZ coordinate format
Tripos MOL2 format
Crystallographic Information File
GROMACS coordinate format
LAMMPS data file
Amber coordinate format
TINKER XYZ format
Amber restart/coordinate files (requires
topology for metadata)Supported Output Formats
pdb- Full CONECT, TER, CRYST1 supportxyz- Simple coordinate formatcif/mmcif/pdbx- Crystallographic formatgro- GROMACS formatlammps/lmp- LAMMPS data formatmol2- Tripos formatcrd- Amber coordinates
Examples
Basic Water Box
Mixed System with Constraints
Using Packmol .inp Format
With Restart Files
Using Bundled Water Models
warp-pack includes bundled single-molecule water templates:tip3p, tip4p, spce, opc, etc.
List all models:
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Configuration error or runtime failure |
Notes
- All distances are in Angstrom
- Restart files use Packmol format:
x y z beta gamma thetaper line - When initial placement satisfies constraints, GENCAN is skipped
- LAMMPS input supports
full,atomic,charge,molecularatom styles - Amber topology requires
prmtopwithATOM_NAME,RESIDUE_LABEL, etc. - Use
hexadecimal_indices=truefor systems > 99999 atoms (PDB limitation)
Packing Guide
Complete guide to molecule packing workflows
Python API
Python API for programmatic packing