RelaxDynamic

Calculation class

class RelaxDynamic(model: str | Path | IOBase | DataModelDict | None = None, name: str | None = None, database=None, params: str | Path | IOBase | dict = None, **kwargs: any)

Bases: Calculation

Class for managing dynamic relaxations

build_model() DataModelDict

Generates and returns model content based on the values set to object.

calc_inputs() dict

Builds calculation inputs from the class’s attributes

property commands: LammpsCommands

LammpsCommands subset

property compare_fterms: dict

The terms to compare metadata values using a tolerance.

Type:

dict

property compare_terms: list

The terms to compare metadata values absolutely.

Type:

list

property dumpsteps: int

How often atomic configurations are dumped

Type:

int

property equilsteps: int

The number of MD steps to perform prior to runsteps

Type:

int

property filenames: list

the names of each file used by the calculation.

Type:

list

property final_box: Box

Relaxed unit cell box

Type:

atomman.Box

property final_dump: dict

Info about the final dump file

Type:

dict

property initial_dump: dict

Info about the initial dump file

Type:

dict

property integrator: str

MD integration scheme

Type:

str

load_model(model: str | DataModelDict, name: str | None = None)

Loads record contents from a given model.

Parameters:
  • model (str or DataModelDict) – The model contents of the record to load.

  • name (str, optional) – The name to assign to the record. Often inferred from other attributes if not given.

load_parameters(params: dict | str | IOBase, key: str | None = None)

Reads in and sets calculation parameters.

Parameters:
  • params (dict, str or file-like object) – The parameters or parameter file to read in.

  • key (str, optional) – A new key value to assign to the object. If not given, will use calc_key field in params if it exists, or leave the key value unchanged.

property lx_mean: float

Mean lx length used for final_box

Type:

float

property lx_std: float

Standard deviation for final_box’s lx length

Type:

float

property ly_mean: float

Mean ly length used for final_box

Type:

float

property ly_std: float

Standard deviation for final_box’s ly length

Type:

float

property lz_mean: float

Mean lz length used for final_box

Type:

float

property lz_std: float

Standard deviation for final_box’s lz length

Type:

float

master_prepare_inputs(branch: str = 'main', **kwargs: any) dict

Utility method that build input parameters for prepare according to the workflows used by the NIST Interatomic Potentials Repository. In other words, transforms inputs from master_prepare into inputs for prepare.

Parameters:
  • branch (str, optional) – Indicates the workflow branch to prepare calculations for. Default value is ‘main’.

  • **kwargs (any) – Any parameter modifications to make to the standard workflow prepare scripts.

Returns:

params – The full set of prepare parameters based on the workflow branch

Return type:

dict

property measured_pressure_xx: float

Measured relaxation pressure component xx

Type:

float

property measured_pressure_xx_std: float

Standard deviation for measured_pressure_xx

Type:

float

property measured_pressure_xy: float

Measured relaxation pressure component xy

Type:

float

property measured_pressure_xy_std: float

Standard deviation for measured_pressure_xy

Type:

float

property measured_pressure_xz: float

Measured relaxation pressure component xz

Type:

float

property measured_pressure_xz_std: float

Standard deviation for measured_pressure_xz

Type:

float

property measured_pressure_yy: float

Measured relaxation pressure component yy

Type:

float

property measured_pressure_yy_std: float

Standard deviation for measured_pressure_yy

Type:

float

property measured_pressure_yz: float

Measured relaxation pressure component yz

Type:

float

property measured_pressure_yz_std: float

Standard deviation for measured_pressure_yz

Type:

float

property measured_pressure_zz: float

Measured relaxation pressure component zz

Type:

float

property measured_pressure_zz_std: float

Standard deviation for measured_pressure_zz

Type:

float

property measured_temperature: float

Measured temperature for the relaxed system

Type:

float

property measured_temperature_std: float

Standard deviation for measured_temperature

Type:

float

metadata() dict

Generates a dict of simple metadata values associated with the record. Useful for quickly comparing records and for building pandas.DataFrames for multiple records of the same style.

property modelroot: str

The root element of the content

Type:

str

property multikeys: list

Calculation key sets that can have multiple values during prepare.

Type:

list

property numsamples: int

Number of measurement samples used in mean, std values

Type:

int

property potential: LammpsPotential

LammpsPotential subset

property potential_energy: float

Potential energy per atom for the relaxed system

Type:

float

property potential_energy_std: float

Standard deviation for potential_energy

Type:

float

property pressure_xx: float

Target relaxation pressure component xx

Type:

float

property pressure_xy: float

Target relaxation pressure component xy

Type:

float

property pressure_xz: float

Target relaxation pressure component xz

Type:

float

property pressure_yy: float

Target relaxation pressure component yy

Type:

float

property pressure_yz: float

Target relaxation pressure component yz

Type:

float

property pressure_zz: float

Target relaxation pressure component zz

Type:

float

process_results(results_dict: dict)

Processes calculation results and saves them to the object’s results attributes.

Parameters:

results_dict (dict) – The dictionary returned by the calc() method.

property queries: dict

Query objects and their associated parameter names.

Type:

dict

property randomseed: int

Random number generator seed

Type:

int

property restartsteps: int

How often restart files are dumped

Type:

int

property runsteps: int

The number of MD steps where properties are evaluated

Type:

int

set_values(name: str | None = None, **kwargs: any)

Set calculation values directly. Any terms not given will be set or reset to the calculation’s default values.

Parameters:
  • name (str, optional) – The name to assign to the calculation. By default, this is set as the calculation’s key.

  • pressure_xx (float, optional) – The target Pxx pressure component for the relaxation.

  • pressure_yy (float, optional) – The target Pyy pressure component for the relaxation.

  • pressure_zz (float, optional) – The target Pzz pressure component for the relaxation.

  • pressure_xy (float, optional) – The target Pxy pressure component for the relaxation.

  • pressure_xz (float, optional) – The target Pxz pressure component for the relaxation.

  • pressure_yz (float, optional) – The target Pyz pressure component for the relaxation.

  • temperature (float, optional) – The target temperature for the relaxation.

  • integrator (str, optional) – The integration scheme to use.

  • thermosteps (int, optional) – Indicates how often the thermo data is output.

  • dumpsteps (int, optional) – Indicates how often the atomic configuration is output to a LAMMPS dump file.

  • restartsteps (int, optional) – Indicates how often the atomic configuration is output to a LAMMPS restart file.

  • runsteps (int, optional) – The total number of integration steps.

  • equilsteps (int, optional) – The number of integration steps ignored to allow the system to get closer to equilibrium.

  • randomseed (int, optional) – A random number generator seed to use for constructing the initial atomic velocities.

  • **kwargs (any, optional) – Any keyword parameters supported by the set_values() methods of the parent Calculation class and the subset classes.

property singularkeys: list

Calculation keys that can have single values during prepare.

Type:

list

property system: AtommanSystemLoad

AtommanSystemLoad subset

property system_mods: AtommanSystemManipulate

AtommanSystemManipulate subset

property temperature: float

Target relaxation temperature

Type:

float

property templatekeys: dict

The calculation-specific input keys and their descriptions.

Type:

dict

property thermosteps: int

How often termo data is recorded

Type:

int

property total_energy: float

Total energy per atom for the relaxed system

Type:

float

property total_energy_std: float

Standard deviation for total_energy

Type:

float

property units: Units

Units subset

property xy_mean: float

Mean xy tilt used for final_box

Type:

float

property xy_std: float

Standard deviation for final_box’s xy tilt

Type:

float

property xz_mean: float

Mean xz tilt used for final_box

Type:

float

property xz_std: float

Standard deviation for final_box’s xz tilt

Type:

float

property yz_mean: float

Mean yz tilt used for final_box

Type:

float

property yz_std: float

Standard deviation for final_box’s yz tilt

Type:

float