Lattice input documentation =========================== Initialize from lattice vectors or lengths and angles. Either specify a lattice `system` with any required lengths, angles and modifications, or a set of `vectors`, or as the basis matrix `Rbasis`. Exactly one among `system`, `vectors` and `Rbasis` must be specified. Note that `vectors` amounts to specifying the vectors in rows in a way that may be common in other codes/interfaces, while `Rbasis` amounts to specifying them in columns, in the form they are stored internally. Optionally, `scale` lattice vectors by a single or separate factors. Used to initialize class :class:`qimpy.lattice.Lattice`. YAML template: -------------- .. parsed-literal:: :yamlparam:`qimpy.lattice.Lattice:system`: :yamlkey:`null` :yamlcomment:`# Specify crystal system and geometry parameters.` :yamlparam:`qimpy.lattice.Lattice:vectors`: :yamlkey:`null` :yamlcomment:`# Three lattice vectors, each with (x, y, z) in bohrs.` :yamlparam:`qimpy.lattice.Lattice:Rbasis`: :yamlkey:`null` :yamlcomment:`# Real-space basis vectors in columns.` :yamlparam:`qimpy.lattice.Lattice:scale`: 1.0 :yamlcomment:`# Scale factor for lattice vectors.` :yamlparam:`qimpy.lattice.Lattice:compute-stress`: :yamlkey:`no` :yamlcomment:`# Whether to compute and report stress.` :yamlparam:`qimpy.lattice.Lattice:movable`: :yamlkey:`no` :yamlcomment:`# Whether to move lattice during geometry relaxation / dynamics.` :yamlparam:`qimpy.lattice.Lattice:move-scale`: (1.0, 1.0, 1.0) :yamlcomment:`# Scale factor for moving each lattice vector.` :yamlparam:`qimpy.lattice.Lattice:periodic`: (:yamlkey:`yes`, :yamlkey:`yes`, :yamlkey:`yes`) :yamlcomment:`# Whether each lattice direction is periodic.` :yamlparam:`qimpy.lattice.Lattice:center`: (0.0, 0.0, 0.0) :yamlcomment:`# Center of cell for periodicity break along non-periodic directions.` Parameters: ----------- system ++++++ *Type:* :yamltype:`dict` or :yamltype:`null`, *Default:* :yamlkey:`null` Specify crystal system and geometry parameters. This must be a dictionary matching one of the following patterns (denoted using YAML input-file syntax, and where [ ] indicates optional): .. code-block:: text system: name: cubic # all angles are 90 degrees a: # each lattice vector length in bohrs [modification: body-centered | face-centered] system: name: tetragonal # all angles are 90 degrees a: # first two lattice vector lengths in bohrs c: # third lattice vector length in bohrs [modification: body-centered] system: name: orthorhombic # all angles are 90 degrees a: # first lattice vector length in bohrs b: # second lattice vector length in bohrs c: # third lattice vector length in bohrs [modification: body-centered | face-centered | base-centered] system: name: hexagonal # angles are 90, 90 and 120 degrees a: # first two lattice vector lengths in bohrs c: # third lattice vector length in bohrs system: name: rhombohedral a: # each lattice vector length in bohrs alpha: # in radians, all angles equal system: name: monoclinic a: # first lattice vector length in bohrs b: # second lattice vector length in bohrs c: # third lattice vector length in bohrs beta: # angle between a and c in radians, rest 90 degrees [modification: base-centered] system: name: triclinic a: # first lattice vector length in bohrs b: # second lattice vector length in bohrs c: # third lattice vector length in bohrs alpha: # angle between b and c in radians beta: # angle between a and c in radians gamma: # angle between a and b in radians Note that all lengths are in bohrs and angles are in radians. In the input file, use units like Angstrom or nm explicitly for lengths, and deg explicitly for angles, if needed. If the optional modification is unspecified or :yamlkey:`null` (null in yaml), the unmodified Bravais lattice is selected. vectors +++++++ *Type:* or or :yamltype:`float` or :yamltype:`list` of :yamltype:`float`, or :yamltype:`null`, *Default:* :yamlkey:`null` Three lattice vectors, each with (x, y, z) in bohrs. The input is essentially a 3 x 3 matrix, with the vectors in rows. Rbasis ++++++ *Type:* or or :yamltype:`float` or :yamltype:`list` of :yamltype:`float`, or :yamltype:`null`, *Default:* :yamlkey:`null` Real-space basis vectors in columns. Overall, the 3 x 3 transformation from fractional to Cartesian coordinates. scale +++++ *Type:* or or :yamltype:`float` or :yamltype:`list` of :yamltype:`float`, *Default:* 1.0 Scale factor for lattice vectors. Either a single number that uniformly scales all lattice vectors or separate factor :math:`[s_1, s_2, s_3]` for each lattice vector. compute-stress ++++++++++++++ *Type:* :yamltype:`bool`, *Default:* :yamlkey:`no` Whether to compute and report stress. Enable to report stress regardless of whether lattice is `movable`. (Stresses are always computed when lattice is `movable`.) movable +++++++ *Type:* :yamltype:`bool`, *Default:* :yamlkey:`no` Whether to move lattice during geometry relaxation / dynamics. move-scale ++++++++++ *Type:* or or :yamltype:`float` or :yamltype:`list` of :yamltype:`float`, *Default:* (1.0, 1.0, 1.0) 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). periodic ++++++++ *Type:* :yamltype:`bool` or :yamltype:`bool` or :yamltype:`bool`, *Default:* (:yamlkey:`yes`, :yamlkey:`yes`, :yamlkey:`yes`) Whether each lattice direction is periodic. Set to :yamlkey:`no` for some directions for lower-dimensional / no periodicity. center ++++++ *Type:* or or :yamltype:`float` or :yamltype:`list` of :yamltype:`float`, *Default:* (0.0, 0.0, 0.0) Center of cell for periodicity break along non-periodic directions. In fractional coordinates, and values along periodic directions are irrelevant.