RelaxLiquid

Calculation class

class RelaxLiquid(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

property E_pot: float

Mean potential energy during the energy equilibration stage

Type:

float

property E_pot_stderr: float

Standard error for the mean potential energy during the energy equilibration stage

Type:

float

property E_total: float

Total energy per atom during the nve stage

Type:

float

property E_total_stderr: float

Standard error for the mean total energy during the energy equilibration stage

Type:

float

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 coolsteps: int

Number of MD steps during the cooling stage

Type:

int

property dumpsteps: int

How often to dump configuration during the final run.

Type:

int

property equilenergysamples: int

Number of thermo samples from the energy equilibration run to use for averaging energies

Type:

int

property equilenergysteps: int

Number of MD steps during the energy equilibration stage

Type:

int

property equilenergystyle: str

Specifies the option to use for computing the target total energy during the energy equilibration run

Type:

str

property equilvolumesamples: int

Number of thermo samples from the volume equilibration run to use for averaging volume

Type:

int

property equilvolumesteps: int

Number of MD steps during the volume equilibration stage

Type:

int

property filenames: list

the names of each file used by the calculation.

Type:

list

property final_dump: dict

Info about the final dump file

Type:

dict

property lammps_output: Log

The simulation output

Type:

atomman.lammps.Log

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.

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: float

Mean measured pressure during the nve run

Type:

float

property measured_pressure_stderr: float

Standard error of the measured mean pressure

Type:

float

property measured_temperature: float

Mean measured temperature during the nve run

Type:

float

property measured_temperature_stderr: float

Standard error of the mean measured temperature

Type:

float

property meltsteps: int

Number of MD steps during the melting stage

Type:

int

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 msd_values: ndarray

Total mean squared displacements

Type:

numpy.array

property msd_x_values: ndarray

Mean squared displacements along the x direction

Type:

numpy.array

property msd_y_values: ndarray

Mean squared displacements along the y direction

Type:

numpy.array

property msd_z_values: ndarray

Mean squared displacements along the z direction

Type:

numpy.array

property multikeys: list

Calculation key sets that can have multiple values during prepare.

Type:

list

property potential: LammpsPotential

LammpsPotential subset

property pressure: float

Target relaxation pressure

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 seed.

Type:

int

property rdfcutoff: float

The cutoff distance for the RDF calculation.

Type:

float

property restartsteps: int

How often to dump restart files during the final run.

Type:

int

property runsteps: int

Number of MD steps during the nve analysis stage

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 (float, optional) – The hydrostatic pressure to relax the system to.

  • temperature (float) – The target temperature to relax to.

  • temperature_melt (float, optional) – The elevated temperature to first use to hopefully melt the initial configuration.

  • rdfcutoff (float, optional) – The cutoff distance to use for the RDF cutoff.

  • meltsteps (int, optional) – The number of npt integration steps to perform during the melting stage at the melt temperature to create an amorphous liquid structure.

  • coolsteps (int, optional) – The number of npt integration steps to perform during the cooling stage where the temperature is reduced from the melt temperature to the target temperature.

  • equilvolumesteps (int, optional) – The number of npt integration steps to perform during the volume equilibration stage where the system is held at the target temperature and pressure to obtain an estimate for the relaxed volume.

  • equilvolumesamples (int, optional) – The number of thermo samples from the end of the volume equilibration stage to use in computing the average volume. Cannot be larger than equilvolumesteps / 100. It is recommended to set smaller than the max to allow for some convergence time.

  • equilenergysteps (int, optional) – The number of nvt integration steps to perform during the energy equilibration stage where the system is held at the target temperature to obtain an estimate for the total energy.

  • equilenergysamples (int, optional) – The number of thermo samples from the end of the energy equilibrium stage to use in computing the target total energy. Cannot be larger than equilenergysteps / 100.

  • equilenergystyle (str, optional) – Indicates which scheme to use for computing the target total energy. Allowed values are ‘pe’ or ‘te’. For ‘te’, the average total energy from the equilenergysamples is used as the target energy. For ‘pe’, the average potential energy plus 3/2 N kB T is used as the target energy.

  • runsteps (int or None, optional) – The number of nve integration steps to perform on the system to obtain measurements of MSD and RDF of the liquid.

  • dumpsteps (int or None, optional) – Dump files will be saved every this many steps during the runsteps simulation.

  • restartsteps (int or None, optional) – Dump files will be saved every this many steps during the runsteps simulation.

  • randomseed (int or None, optional) – Random number seed used by LAMMPS in creating velocities and with the Langevin thermostat.

  • **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 time_values: ndarray

Time values associated with the msd values

Type:

numpy.array

property units: Units

Units subset

property volume: float

Mean volume identified from the volume equilibration stage

Type:

float

property volume_stderr: float

Standard error for the mean volume value

Type:

float