Name

FixStrain — The constraint of the strain on the unit-cell

Synopsis

Namespace: NanoLanguage
FixStrain(
x,
y,
z
)

Description

When used as input argument for a stress calculation the stress is set to zero for the indicated components of the stress tensor. When used as input argument for an optimization the strain is kept fixed along the indicated directions.

FixStrain Arguments

x

Indicating constraint along the x-axis.

Type: boolean

Default: False
y

Indicating constraint along the y-axis.

Type: boolean

Default: False
z

Indicating constraint along the z-axis.

Type: boolean

Default: False

Usage Examples

Only constrain the optimization of a bulk system along the x- and z-axis:

# Set up lattice
lattice = SimpleCubic(3.731*Angstrom)

# Define elements
elements = [Silver, Cerium]

# Define coordinates
cartesian_coordinates = [[ 0.    ,  0.    ,  0.    ],
                         [ 1.8655,  1.8655,  1.8655]]*Angstrom

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# Run the optimization
constraints = [FixStrain(x=True, y=False, z=True)]
bulk_configuration = OptimizeGeometry(
        bulk_configuration,
        constraints=constraints,
        )

fixstrain.py

Notes