MultilayerBuilder

class MultilayerBuilder(filename, object_id, layers, surface_vectors, relaxation_calculator=None, kpoint_density=None, relaxation_length=None, interaction_length=None, optimize_geometry_parameters=None, log_filename_prefix=None)

Constructor for the MultilayerBuilder object. A multilayer builder is a multilayer configuration composed of crystalline, amorphous, or vacuum layers. The lateral dimensions (a and b unit cell vectors) are specially chosen to minimize the strain while meeting certain constraints (e.g. minimum and maximum sizes).

The first crystal layer is taken to be the substrate, which is the layer that is unstrained.

Parameters:
  • filename (str) – The full or relative path to save the results to. See nlsave().
  • object_id (str) – The object id to use when saving. See nlsave().
  • layers (list of type CrystalLayer | AmorphousLayer | VacuumLayer) – The list of layers to create the multilayer builder from. There must be either one or two instances of CrystalLayers in the list.
  • surface_vectors (PhysicalQuantity of type length) – The pair of vectors the define the lateral dimensions of the multilayer builder. The vectors may be given as 2d or 3d vectors, but the z components must be zero. If no surface vectors are given, then lowest strain surface vectors are selected automatically.
  • relaxation_calculator (Calculator | None) – The calculator (typically DFT) to use when relaxing the atomic positions at the interfaces. If no additional relaxation is desired, then None can be given.
    Default: None
  • kpoint_density (PhysicalQuantity of type length) – The target k-point sampling density.
    Default: 4.0 * Angstrom
  • relaxation_length (PhysicalQuantity of type length) – The distance around the interfacial plane that is relaxed with the relaxation calculator.
    Default: 4.0 * Angstrom
  • interaction_length (PhysicalQuantity of type length) – The distance around the interfacial plane within which atomic interactions will be included during the interface optimization.
    Default: 8.0 * Angstrom
  • optimize_geometry_parameters (OptimizeGeometryParameters) – The optimize geometry parameters to use when optimizing the atoms at each interface. Note that restart_strategy does not have any effect since the restart mechanism within OptimizeGeometry() is disabled.
    Default: OptimizeGeometryParameters()
  • log_filename_prefix (str or None) – Prefix for the filenames where the logging output for each calculation is stored. If a value of None is given then all logging output is done to stdout.
    Default: "multilayer_builder_"
blocks()
Returns:A list of the block configurations.
Return type:list of type BulkConfiguration
configuration()
Returns:The multilayer builder configuration
Return type:BulkConfiguration
filename()
Returns:The filename where the study object is stored.
Return type:str
interactionLength()
Returns:The interaction length.
Return type:PhysicalQuantity of type length
kpointDensity()
Returns:The k-point density of the relaxation calculator.
Return type:PhysicalQuantity of type length
layerIndices()
Returns:A list containing the indices of each layer.
Return type:list of type list of type int
layers()
Returns:The layers of the multilayer builder.
Return type:list of type CrystalLayer | AmorphousLayer | VacuumLayer
logFilenamePrefix()
Returns:The filename prefix for the logging output of the study.
Return type:str | LogToStdOut
materialSpecifications(**kwargs)
Parameters:kwargs (dict) – A list of keyword arguments to pass to MaterialSpecifications. By default the relaxation_calculator will be used for the formation_energy_calculator, relaxation_calculator, and phonon_calculator. The optimize_geometry_parameters will default to the values passed to MultilayerBuilder. The supercell_repetitions defaults to (1, 1, 1). The pristine_configuration will be the multilayer configuration.
Returns:The MaterialSpecifications for this multilayer configuration.
Return type:MaterialSpecifications
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the Study object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
numberOfProcessesPerTask()
Returns:The number of processes to be used to execute each task. If None, all available processes should execute each task collaboratively.
Return type:int | None
objectId()
Returns:The name of the study object in the file.
Return type:str
optimizeGeometryParameters()
Returns:The optimize geometry parameters.
Return type:OptimizeGeometryParameters
relaxationCalculator()
Returns:The relaxation calculator.
Return type:Calculator | None
relaxationLength()
Returns:The relaxation length.
Return type:PhysicalQuantity of type length
update()

Run the calculations for the study object.

Usage Example

Use the MultilayerBuilder object to generate a silicon-silica-hafnia-tungsten gate stack:

layers = [
    CrystalLayer(
        MaterialSpecificationsDatabase.MULTILAYER_MATERIALS['Si (110)'],
        length=10.0*Angstrom
    ),
    AmorphousLayer(
        MaterialSpecificationsDatabase.MULTILAYER_MATERIALS['Silica'],
        length=10.0*Angstrom
    ),
    AmorphousLayer(
        MaterialSpecificationsDatabase.MULTILAYER_MATERIALS['Hafnia'],
        length=12.0*Angstrom
    ),
    CrystalLayer(
        MaterialSpecificationsDatabase.MULTILAYER_MATERIALS['Tungsten (111)'],
        length=10.0*Angstrom
    )
]

surface_vectors = [[-7.680028171823,  16.2918],
                   [ 7.680028171823,  10.8612]]*Angstrom

# Setup calculator used for optimizing interfaces.
relaxation_calculator = LCAOCalculator()

multilayer_builder_example.py

Notes

Note

Study objects behave differently from analysis objects. See the Study object overview for more details.

The MultilayerBuilder class is designed to create an optimized multilayered material of low strain. Three types of layers are supported: CrystalLayer, AmorphousLayer, and VacuumLayer.

The configuration is created in three main steps. In the first step, a configuration is created for each layer. For crystal layers, the surface vectors and user given length are used to make a crystal of low strain. For amorphous layers, a random amorphous structure is generated (using the amorphization_calculator specified in the MaterialSpecifications of the layer). Each layer is then optimized using the relaxation calculator. In the second step, the layers are combined to form interfaces. The atoms near the interfaces (layer boundaries) are also optimized using the relaxation_calculator . In the third step the optimized interfaces are combined into the final gate stack configuration, which can be accessed using the configuration() method.

This study object supports resuming tasks from the geometry optimization step that they left off at. This means that a job should resume from the previous step in case it is aborted in the middle of a geometry optimization.

If the ultimate goal is to create a device configuration, then it is important to ensure that the first and last layer are CrystalLayer objects and that they are thicker than the relaxation_length.

Note

Multilayer builder calculations are potentially very time consuming. Optimizing each amorphous layer may take around a day on a 16 core machine and optimizing each interface may take between one and two days when using the default DFT-LCAO calculator.

The default DFT-LCAO calculator uses the PseudoDojo medium basis set. This is robust choice that should work well for most materials, however, it can require a significant amount of CPU time and memory to perform the required geometry optimizations. If the required time or memory needs to be decreased, it is recommended to use a DFT calculator with a smaller basis set or accuracy settings. The FHI DZDP or DZP basis sets may offer significant speedups at the expense of less accurate final geometries.

If a preview or very rough estimate of the structure is desired, then it is possible to set the relaxation_calculator to None. This will produce a multilayer configuration that has not been optimized with DFT.