calc_dislocation_SDVPN.py
Calculation script functions

peierlsnabarro
(ucell, C, burgers, ξ_uvw, slip_hkl, gamma, m=[0, 1, 0], n=[0, 0, 1], cutofflongrange=1000.0, tau=array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]), alpha=[0.0], beta=array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]), cdiffelastic=False, cdiffsurface=True, cdiffstress=False, fullstress=True, halfwidth=1.0, normalizedisreg=True, xnum=None, xmax=None, xstep=None, xscale=False, min_method='Powell', min_options={}, min_cycles=10) Solves a PeierlsNabarro dislocation model.
 Parameters
ucell (atomman.System) – The unit cell to use as the seed for the dislocation system. Note that only box information is used and not atomic positions.
C (atomman.ElasticConstants) – The elastic constants associated with the bulk crystal structure for ucell.
burgers (arraylike object) – The dislocation’s Burgers vector given as a Miller or MillerBravais vector relative to ucell.
ξ_uvw (arraylike object) – The dislocation’s line direction given as a Miller or MillerBravais vector relative to ucell.
slip_hkl (arraylike object) – The dislocation’s slip plane given as a Miller or MillerBravais plane relative to ucell.
m (arraylike object, optional) – The m unit vector for the dislocation solution. m, n, and ξ (dislocation line) should be righthand orthogonal. Default value is [0,1,0] (yaxis).
n (arraylike object, optional) – The n unit vector for the dislocation solution. m, n, and ξ (dislocation line) should be righthand orthogonal. Default value is [0,0,1] (zaxis). n is normal to the dislocation slip plane.
cutofflongrange (float, optional) – The cutoff distance to use for computing the longrange energy. Default value is 1000 angstroms.
tau (numpy.ndarray, optional) – A (3,3) array giving the stress tensor to apply to the system using the stress energy term. Only the xy, yy, and yz components are used. Default value is all zeros.
alpha (list of float, optional) – The alpha coefficient(s) used by the nonlocal energy term. Default value is [0.0].
beta (numpy.ndarray, optional) – The (3,3) array of beta coefficient(s) used by the surface energy term. Default value is all zeros.
cdiffelastic (bool, optional) – Flag indicating if the dislocation density for the elastic energy component is computed with central difference (True) or simply neighboring values (False). Default value is False.
cdiffsurface (bool, optional) – Flag indicating if the dislocation density for the surface energy component is computed with central difference (True) or simply neighboring values (False). Default value is True.
cdiffstress (bool, optional) – Flag indicating if the dislocation density for the stress energy component is computed with central difference (True) or simply neighboring values (False). Only matters if fullstress is True. Default value is False.
fullstress (bool, optional) – Flag indicating which stress energy algorithm to use. Default value is True.
halfwidth (float, optional) – A dislocation halfwidth guess to use for generating the initial disregistry guess. Does not have to be accurate, but the better the guess the fewer minimization steps will likely be needed. Default value is 1 Angstrom.
normalizedisreg (bool, optional) – If True, the initial disregistry guess will be scaled such that it will have a value of 0 at the minimum x and a value of burgers at the maximum x. Default value is True. Note: the disregistry of end points are fixed, thus True is usually preferential.
xnum (int, optional) – The number of x value points to use for the solution. Two of xnum, xmax, and xstep must be given.
xmax (float, optional) – The maximum value of x to use. Note that the minimum x value will be xmax, thus the range of x will be twice xmax. Two of xnum, xmax, and xstep must be given.
xstep (float, optional) – The delta x value to use, i.e. the step size between the x values used. Two of xnum, xmax, and xstep must be given.
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. Default value is False, i.e. the x parameters are absolute and not scaled.
min_method (str, optional) – The scipy.optimize.minimize method to use. Default value is ‘Powell’.
min_options (dict, optional) – Any options to pass on to scipy.optimize.minimize. Default value is {}.
min_cycles (int, optional) – The number of minimization runs to perform on the system. Restarting after obtaining a solution can help further refine to the best pathway. Default value is 10.

process_input
(input_dict, UUID=None, build=True) Processes str input parameters, assigns default values if needed, and generates new, more complex terms as used by the calculation.
 Parameters
input_dict (dict) – Dictionary containing the calculation input parameters with string values. The allowed keys depends on the calculation style.
UUID (str, optional) – Unique identifier to use for the calculation instance. If not given and a ‘UUID’ key is not in input_dict, then a random UUID4 hash tag will be assigned.
build (bool, optional) – Indicates if all complex terms are to be built. A value of False allows for default values to be assigned even if some inputs required by the calculation are incomplete. (Default is True.)