Skip to main content

Module initial

Module initial 

Source
Expand description

Initialization procedures. Port of initial.f90, restmol.f90, cenmass.f90.

Call order matches Packmol’s initial.f90 exactly:

  1. compute_dmax
  2. restmol(type 0, solve=true) → sizemin/sizemax
  3. first random guess (within sizemin/sizemax)
  4. Phase 1: constraint-only GENCAN per type (reduced x!)
  5. Rescale sizemin/sizemax + compute cm_min/cm_max per type
  6. Setup cell grid + place fixed atoms
  7. Random initial point using cm_min/cm_max (restmol(false) only, up to 20 tries)
  8. Random angles
  9. Phase 2: constraint-only GENCAN per type (reduced x!)

Structs§

SwapState
Saved state for swaptype operations (mirrors swaptypemod.f90).

Functions§

compute_dmax
Compute maximum internal distance per molecule type.
init_xcart_from_x
Initialize xcart from x (COM + Euler angles).
initial
Full initialization procedure. Faithful port of initial.f90.
restmol
Run a single-molecule GENCAN solve (restmol). Port of restmol.f90.