# Lattice input documentation

Initialize from lattice vectors or lengths and angles. Either specify a lattice system and optional modification, along with any corresponding required lengths (a, b, c) and angles (alpha, beta, gamma), or explicitly specity all three lattice vectors vector1, vector2 and vector3. Optionally, scale lattice vectors by a single or separate factors.

Used to initialize class `qimpy.lattice.Lattice`

.

## YAML template:

system: null # Specify crystal system and geometry parameters. modification: null # Specify modification of lattice. a: null # First lattice vector length in bohrs. b: null # Second lattice vector length in bohrs. c: null # Third lattice vector length in bohrs. alpha: null # Angle between b and c in degrees. beta: null # Angle between c and a in degrees. gamma: null # Angle between a and b in degrees. vector1: null # First lattice vector (x1, y1, z1) in bohrs. vector2: null # Second lattice vector (x2, y2, z2) in bohrs. vector3: null # Third lattice vector (x3, y3, z3) in bohrs. scale: null # Scale factor for lattice vectors. compute-stress: null # Whether to compute and report stress. movable: null # Whether to move lattice during geometry relaxation / dynamics. move-scale: null # Scale factor for moving each lattice vector. periodic: null # Whether each lattice direction is periodic. center: null # Center of cell for periodicity break along non-periodic directions.

## Parameters:

### system

*Type:* string or null, *Default:* null

Specify crystal system and geometry parameters. Options include:

cubic (specify a),

tetragonal (specify a, c)

orthorhombic (specify a, b, c)

hexagonal (specify a, c)

rhombohedral (specify a, alpha)

monoclinic (specify a, b, c, beta)

triclinic (specify a, b, c, alpha, beta, gamma)

### modification

*Type:* string or null, *Default:* null

Specify modification of lattice. Options include:

body-centered (only for orthorhombic, tetragonal or cubic)

face-centered (only for orthorhombic or cubic)

base-centered (only for monoclinic)

### a

*Type:* float or null, *Default:* null

First lattice vector length in bohrs.

### b

*Type:* float or null, *Default:* null

Second lattice vector length in bohrs.

### c

*Type:* float or null, *Default:* null

Third lattice vector length in bohrs.

### alpha

*Type:* float or null, *Default:* null

Angle between b and c in degrees.

### beta

*Type:* float or null, *Default:* null

Angle between c and a in degrees.

### gamma

*Type:* float or null, *Default:* null

Angle between a and b in degrees.

### vector1

*Type:* list of float, or null, *Default:* null

First lattice vector (x1, y1, z1) in bohrs.

### vector2

*Type:* list of float, or null, *Default:* null

Second lattice vector (x2, y2, z2) in bohrs.

### vector3

*Type:* list of float, or null, *Default:* null

Third lattice vector (x3, y3, z3) in bohrs.

### scale

*Type:* float or list of float, or null, *Default:* null

Scale factor for lattice vectors. Either a single number that uniformly scales all lattice vectors or separate factor \([s_1, s_2, s_3]\) for each lattice vector.

### compute-stress

*Type:* bool or null, *Default:* null

Whether to compute and report stress. Enable to report stress regardless of whether lattice is movable. Defaults to no if unspecified. (Stresses are always computed when lattice is movable.)

### movable

*Type:* bool or null, *Default:* null

Whether to move lattice during geometry relaxation / dynamics. Defaults to no if unspecified.

### move-scale

*Type:* list of float, or null, *Default:* null

Scale factor for moving each lattice vector. Set to zero for some directions to constrain lattice relaxation or dynamics. Can also adjust the magnitude to precondition lattice motion relative to the ions (internal coordinates). Defaults to (1, 1, 1) if unspecified.

### periodic

*Type:* list of bool, or null, *Default:* null

Whether each lattice direction is periodic. Set to no for some directions for lower-dimensional / no periodicity. Defaults to (yes, yes, yes) if unspecified.

### center

*Type:* list of float, or null, *Default:* null

Center of cell for periodicity break along non-periodic directions. In fractional coordinates, and values along periodic directions are irrelevant. Defaults to (0, 0, 0) if unspecified.