Phonon

Calculation class

class Phonon(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 phonon and quasiharmonic calculations using phonopy

property B0: float

bulk modulus estimated at the equilibrium structure from the volume scan

Type:

float

property B0prime: float

bulk prime modulus estimated at the equilibrium structure from the volume scan

Type:

float

property E0: float

energy estimated for the equilibrium structure from the volume scan

Type:

float

property V0: float

volume estimated for the equilibrium structure from the volume scan

Type:

float

property a_mult: int

Number of replicas along the a box vect to use

Type:

int

property b_mult: int

Number of replicas along the b box vect to use

Type:

int

property bandstructure: dict

band structure information

Type:

dict

build_model() DataModelDict

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

property c_mult: int

Number of replicas along the c box vect to use

Type:

int

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

Random max atomic displacement to use for phonon calculations

Type:

float

property dos: dict

density of states information

Type:

dict

property filenames: list

the names of each file used by the calculation.

Type:

list

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

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

Number of strain states to use for quasiharmonic method

Type:

int

property phonons: list

phonopy.Phonopy objects for each strain

Type:

list

property potential: LammpsPotential

LammpsPotential subset

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 qha

quasiharmonic approximation object

Type:

phonopy.PhonopyQHA

property queries: dict

Query objects and their associated parameter names.

Type:

dict

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.

  • strainrange (float, optional) – Strain step size to use for quasiharmonic method.

  • numstrains (int, optional) – The number of strain states to evaluate for the quasiharmonic method.

  • symmetryprecision (float, optional) – Tolerance used for identifying crystal symmetry elements

  • displacementdistance (float, optional) – Random max atomic displacement to use for phonon calculations

  • **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 sizemults: tuple

All three sets of size multipliers

Type:

tuple

property strainrange: float

Strain step size to use for quasiharmonic method

Type:

float

property symmetryprecision: float

Precision tolerance to use to identify symmetry elements

Type:

float

property system: AtommanSystemLoad

AtommanSystemLoad subset

property templatekeys: dict

The calculation-specific input keys and their descriptions.

Type:

dict

property thermal: dict

estimated properties vs temperature

Type:

dict

property units: Units

Units subset

property volumescan: dict

volume-energy scan used for quasiharmonic

Type:

dict