DislocationSDVPN
Calculation class
- class DislocationSDVPN(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 semi-discrete variational Peierls-Nabarro calcuations
- calc_inputs() dict
Builds calculation inputs from the class’s attributes
- property cutofflongrange: float
The cutoff to use for the long-range elastic energy term
- Type:
- property disregistries: list
The disregistry profiles for the solution after each minimization cycle
- Type:
- property energies: list
The total energies for the solution after each minimization cycle
- Type:
- isvalid() bool
Looks at the set attributes to determine if the associated calculation would be a valid one to run.
- Returns:
True if element combinations are valid, False if not.
- Return type:
- load_model(model: str | DataModelDict, name: str | None = None)
Loads record contents from a given model.
- load_parameters(params: dict | str | IOBase, key: str | None = None)
Reads in and sets calculation parameters.
- 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:
- 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 multikeys: list
Calculation key sets that can have multiple values during prepare.
- Type:
- property normalizedisreg: bool | None
Flag indicating if the total cumulative disregistry is normalized to the Burgers vector
- Type:
- 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.
- 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.
xnum (int, optional) – The number of x coordinates to use.
xmax (flaot, optional) – The maximum x coordinate to use.
xstep (float, optional) – The step size to use between the x coordinates.
xscale (bool, optional) – Flag indicating if xmax and/or xstep values are to be taken as absolute or relative to ucell’s a lattice parameter.
minimize_style (str, optional) – The scipy.minimize style to use.
minimize_options (dict, optional) – kwarg options to pass to scipy.minimize.
minimize_cycles (int, optional) – The number of mimimization cycles to perform.
cutofflongrange (float, optional) – The cutoff to use for the longrange energy term.
tau (array-like object, optional) – The applied stress values to use.
alpha (list, optional) – The non-local correction parameters to use.
beta (array-like object, optional) – The surface correction parameters to use.
cdiffelastic (bool, optional) – Flag if central difference is used for the elastic term.
cdiffsurface (bool, optional) – Flag if central difference is used for the surface term.
cdiffstress (bool, optional) – Flag if central difference is used for the stress term.
halfwidth (float, optional) – An initial arctan halfwidth guess.
normalizedisreg (bool, optional) – Flag indicating if the disregistry is normalized to the Burgers vector.
fullstress (bool, optional) – Flag that determines which stress term expression is used.
**kwargs (any, optional) – Any keyword parameters supported by the set_values() methods of the parent Calculation class and the subset classes.