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, annealing_parameters=None, max_iteration_annealing_parameters=1, select_from_different_cut_plane=False, log_filename_prefix=None, add_passivation=False, add_bridging_oxygen_atoms=True, defect_fuzz_factor=None)

Constructor for the MultilayerBuilder object. A multilayer builder is a multilayer configuration composed of crystalline, alloy, 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).

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 | AlloyLayer) – The list of layers to create the multilayer builder from.

  • 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 | list | None) – The calculators to use when relaxing the atomic positions at the interfaces. If a single calculator is given it is used for all interfaces. Giving a list of calculators allows a different calculator for each interface and skips optimization of each material. 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 | list of PhysicalQuantity of type length | None) – The distance around the interfacial plane that is relaxed with the relaxation calculator. Can be specified as one value, or a list of values for each interface.
    Default: 4.0 * Angstrom

  • interaction_length (PhysicalQuantity of type length | list of PhysicalQuantity of type length | None) – The distance around the interfacial plane within which atomic interactions will be included during the interface optimization. Can be specified as one value, or a list of values for each interface.
    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()

  • annealing_parameters (list of type AnnealingParameters) – The parameters for the interface annealing workflow. If None, no annealing MD is run.

  • max_iteration_annealing_parameters (list or single of type int) – The maximum iteration parameter which is used to run multiple interface annealing workflow. If provided one value then it will use it for different interface. If a list is provided then it will use according to the order of the interface. If nothing is provided then it is 1.
    Default: 1

  • select_from_different_cut_plane (Bool) – If True, the algorithm will scan over different cut-planes in the amorphous layer and use the one which results in the lowest number of coordination defects at the interface.
    Default: False

  • add_passivation (Bool) – If True, the algorithm will passivate Si atoms in Si and SiO2 layer.
    Default: False

  • 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_"

  • defect_fuzz_factor (float) – The fuzz factor used for the bond calculation to determine the coordination defects.
    Default: 1.15

Parm add_bridging_oxygen_atoms:

The parameter adds oxygen atoms between neighboring under-coordinated Silicon atoms.

addBridgingOxygenAtoms()
Returns:

If True, it adds oxygen atoms between neighboring under-coordinated Silicon atoms.

Return type:

bool

addPassivation()
Returns:

If true, the under coordinated silicon atoms is passivated with hydrogen.

Return type:

bool

blocks()
Returns:

A list of the block configurations.

Return type:

list of type BulkConfiguration

configuration()
Returns:

The multilayer builder configuration

Return type:

BulkConfiguration

defectFuzzFactor()
Returns:

The fuzz factor used for the bond calculation to determine the coordination defects.

Return type:

float

dependentStudies()
Returns:

The list of dependent studies.

Return type:

list of Study

filename()
Returns:

The filename where the study object is stored.

Return type:

str

interactionLength()
Returns:

The interaction length.

Return type:

list of 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 | AlloyLayer | 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 execute each task collaboratively.

Return type:

int | None | ProcessesPerNode

numberOfProcessesPerTaskResolved()
Returns:

The number of processes to be used to execute each task. Default values are resolved based on the current execution settings.

Return type:

int

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 calculators, with one calculator per interface.

Return type:

list

relaxationLength()
Returns:

The relaxation length.

Return type:

list of PhysicalQuantity of type length

saveToFileAfterUpdate()
Returns:

Whether the study is automatically saved after it is updated.

Return type:

bool

uniqueString()

Return a unique string representing the state of the object.

update()

Run the calculations for the study object.

Usage Example

Use the MultilayerBuilder object to generate a Si-SiO2-HfO2-TiN High-k metal gate (HKMG) stack:

from SMW import *

# Define each layer in the multilayer structure.
layers = []
annealing_parameters = []
relaxation_calculator = []
amorphous_method = MolecularDynamicsMeltQuench(
    melt_temperature=3500*Kelvin,
    melt_time=40.0*ps,
    quench_temperature=300*Kelvin,
    quench_rate=2*37*Kelvin/ps,
    time_step=1.0*fs,
    max_retries=30,
    random_seed=1234,
)

material = MaterialSpecificationsDatabase.HKMG_MATERIALS['Silicon']()
layer_0 = CrystalLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_0)

material = MaterialSpecificationsDatabase.HKMG_MATERIALS['Silica'](
    amorphous_density=2.200*gram/cm**3,
    elements_with_stoichiometry={Silicon: 1, Oxygen: 2},
    )
layer_1 = AmorphousLayer(
    material,
    length=10.0*Angstrom,
    method=amorphous_method,
    )
layers.append(layer_1)

material = MaterialSpecificationsDatabase.HKMG_MATERIALS['Hafnia (monoclinic)'](
    amorphous_density=9.390*gram/cm**3,
    elements_with_stoichiometry={Hafnium: 1, Oxygen: 2},
    )
layer_2 = AmorphousLayer(
    material,
    length=10.0*Angstrom,
    method=amorphous_method,
    )
layers.append(layer_2)

material = MaterialSpecificationsDatabase.HKMG_MATERIALS['Titanium nitride'](
    amorphous_density=5.210*gram/cm**3,
    elements_with_stoichiometry={Titanium: 1, Nitrogen: 1},
    )
layer_3 = AmorphousLayer(
    material,
    length=10.0*Angstrom,
    method=amorphous_method,
    )
layers.append(layer_3)


# -------------------------------------------------------------
# Setup annealing parameter used for optimizing interfaces.
# -------------------------------------------------------------
initial_velocity = MaxwellBoltzmannDistribution(
    temperature=600.0*Kelvin,
    remove_center_of_mass_momentum=True,
    random_seed=None,
    enforce_temperature=True,
)

method = Langevin(
    time_step=1*femtoSecond,
    reservoir_temperature=600*Kelvin,
    friction=0.05*femtoSecond**-1,
    initial_velocity=initial_velocity,
)
md_steps = 40000
annealing_parameters.append(
    AnnealingParameters(
        md_method=method,
        md_steps=md_steps
    )
)

initial_velocity = MaxwellBoltzmannDistribution(
    temperature=600.0*Kelvin,
    remove_center_of_mass_momentum=True,
    random_seed=None,
    enforce_temperature=True,
)

method = Langevin(
    time_step=1*femtoSecond,
    reservoir_temperature=600*Kelvin,
    friction=0.05*femtoSecond**-1,
    initial_velocity=initial_velocity,
    heating_rate=-50*Kelvin/picoSecond,
)
md_steps = 10000
annealing_parameters.append(
    AnnealingParameters(
        md_method=method,
        md_steps=md_steps
    )
)


Si_SiO2_calculator = TremoloXCalculator(QuantumATK_MTP_Si_SiO2_2022())
relaxation_calculator.append(Si_SiO2_calculator)
HfO2_SiO2_calculator = TremoloXCalculator(QuantumATK_MTP_HfO2_SiO2_2022())
relaxation_calculator.append(HfO2_SiO2_calculator)
HfO2_TiN_calculator = TremoloXCalculator(QuantumATK_MTP_HfO2_TiN_2022())
relaxation_calculator.append(HfO2_TiN_calculator)

surface_vectors = [[ 11.520042257735,   0.            ],
                   [  7.680028171823,  -7.680028171823]]*Angstrom


multilayer_builder = MultilayerBuilder(
    filename='HKMG_builder.hdf5',
    object_id='multilayer_builder',
    layers=layers,
    surface_vectors=surface_vectors,
    relaxation_calculator=relaxation_calculator,
    annealing_parameters=annealing_parameters,
    max_iteration_annealing_parameters=1,
    select_from_different_cut_plane=True,
)
multilayer_builder.update()
nlsave('HKMG_builder.hdf5', multilayer_builder.configuration())

HKMG_builder_example.py

Use the MultilayerBuilder object to generate a MgO-FeCo-Ta-FeCo-MgO Magnetoresistive RAM (MRAM) stack:

from SMW import *

# Define each layer in the multilayer structure.
layers = []
relaxation_calculator = []

material = MaterialSpecificationsDatabase.MRAM_MATERIALS['Magnesium oxide']()
layer_0 = CrystalLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_0)

material = MaterialSpecificationsDatabase.MRAM_MATERIALS['Iron cobalt (alloy)'](
    substitutional_percentage=30.000,
    substitutional_element=Cobalt,
    )
layer_1 = AlloyLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_1)

material = MaterialSpecificationsDatabase.MRAM_MATERIALS['Tantalum']()
layer_2 = CrystalLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_2)

material = MaterialSpecificationsDatabase.MRAM_MATERIALS['Iron cobalt (alloy)'](
    substitutional_percentage=30.000,
    substitutional_element=Cobalt,
    )
layer_3 = AlloyLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_3)

material = MaterialSpecificationsDatabase.MRAM_MATERIALS['Magnesium oxide']()
layer_4 = CrystalLayer(
    material,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    )
layers.append(layer_4)


FeCo_MgO_calculator = TremoloXCalculator(QuantumATK_MTP_FeCo_MgO_2022())
relaxation_calculator.append(FeCo_MgO_calculator)
FeCo_Ta_calculator = TremoloXCalculator(QuantumATK_MTP_FeCo_Ta_2022())
relaxation_calculator.append(FeCo_Ta_calculator)
FeCo_Ta_calculator = TremoloXCalculator(QuantumATK_MTP_FeCo_Ta_2022())
relaxation_calculator.append(FeCo_Ta_calculator)
FeCo_MgO_calculator = TremoloXCalculator(QuantumATK_MTP_FeCo_MgO_2022())
relaxation_calculator.append(FeCo_MgO_calculator)

surface_vectors = [[ 2.977768076933,  0.            ],
                   [ 0.            ,  2.977768076933]]*Angstrom


mram_builder = MultilayerBuilder(
    filename='MRAM_builder.hdf5',
    object_id='multilayer_builder',
    layers=layers,
    surface_vectors=surface_vectors,
    relaxation_calculator=relaxation_calculator,
    annealing_parameters=None,
    max_iteration_annealing_parameters=0,
)
mram_builder.update()
nlsave('MRAM_builder.hdf5', mram_builder.configuration())

MRAM_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. The following types of layers are supported: CrystalLayer, AlloyLayer, AmorphousLayer.

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 terminated in the middle of a geometry optimization.

The relaxation_length and interaction_length can be tuned according to the need of the interface. If the layer thickness is less than the relaxation_length then the optimization will not be done for the interface.

Since in particular the generation of amorphous layers and interfaces is stochastic, the recommended workflow is to create a series of candidate multilayer configurations, inspect these for structural defects, and use the best resulting configuration for further simulations.

To run the MultilayerBuilder efficiently in parallel we recommend using the OpenMP parallelization.

High-k metal gate (HKMG) stack

The HKMG 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 in a simulated melt-quench process. This protocol uses the amorphization_calculator specified in the MaterialSpecifications of the layer multiple times and picks the configuration which has the lowest number of defects. In the second step, the layers are combined to form interfaces. The atoms near the interfaces (layer boundaries) are optimized using the relaxation_calculator. Additionally, a series of annealing simulations can be run on the layer boundaries to reduce the number of coordination defects at the interfaces to create more realistic interface structures. In the third step the optimized interfaces are combined into the final gate stack configuration, which can be accessed using the configuration() method.

Magnetoresistive RAM (MRAM) stack

The MRAM configuration can be created, using a similar protocol as described above. The builder for this type of stack is primarily designed to work with CrystalLayer and AlloyLayer types. By default, interfaces are not annealed, but this can be activated if needed. The final MRAM stack configuration can be accessed using the configuration() method.

Note

To achieve both high accuracy and short simulation times the multilayer builder primarily uses the machine-learned moment tensor potentials (MTP). MTP calculators are used for amorphization as well as optimizing and annealing the alloy layer and interfaces. The implementation and supported materials are mainly targeted at HKMG stack configurations and MRAM stack configuration. For HKMG, pre-trained models for the amorphization of silica, hafnia and titanium nitride, as well as the interfaces between these materials are provided. For MRAM, pre-trained models of iron cobalt alloy with cobalt concentration up to 50% and the interfaces between MgO-FeCo, FeCo-Ta and Feco-W are provided. These models can be extended by other force fields in a custom script.