Constraints

The Constraints keyword in the OPT section supports multiple clauses joined by ;.

Frozen Atoms/Components

SyntaxExampleDescription
freeze_atoms:i-j;kfreeze_atoms:1-3;6Freeze all components of atoms 1–3 and 6
freeze_x:ifreeze_x:2Freeze X component of atom 2
freeze_y:ifreeze_y:3Freeze Y component of atom 3
freeze_z:ifreeze_z:4Freeze Z component of atom 4
freeze_xy:ifreeze_xy:5Freeze X and Y of atom 5
freeze_xz:ifreeze_xz:6Freeze X and Z of atom 6
freeze_yz:ifreeze_yz:7Freeze Y and Z of atom 7

Geometric Targets

Append ! for hard constraint (enforced via null-space projection).

SyntaxExampleDescription
bond:i-j=valuebond:1-2=1.40angBond distance target
angle:i-j-k=valueangle:1-2-3=104.5degBond angle target
dihedral:i-j-k-l=valuedihedral:1-2-3-4=180deg!Dihedral angle target (hard)

Units: ang (Angstrom), bohr, deg (degrees), rad (radians).

Penalty Tuning

SyntaxDescription
kbond=valueBond force constant
kangle=valueAngle force constant
kdihedral=valueDihedral force constant
k=valueSet all three at once

Default penalty constants are used if not specified. Hard constraints (!) use null-space projection instead of quadratic penalties.

Examples

Freeze atom 1:

Constraints freeze_atoms:1

Freeze X component of atom 2:

Constraints freeze_x:2

Bond constraint with custom force constant:

Constraints bond:1-2=1.40ang;kbond=20.0

Angle constraint:

Constraints angle:1-2-3=109.5deg;kangle=2.0

Hard dihedral constraint:

Constraints dihedral:1-2-3-4=180deg!

Combined constraints:

Constraints freeze_atoms:1;bond:1-2=1.10ang!;k=0.5

Notes

  • Multiple clauses are joined by ;.
  • Hard constraints (!) are enforced via null-space projection rather than soft quadratic penalties.
  • Constraint indices are 1-based, matching the atom order in the GEOMETRY section.
  • Frozen atoms/components zero the corresponding gradient/step components.