StackingFaultStatic

Calculation class

class StackingFaultStatic(model=None, name=None, params=None, **kwargs)

Bases: iprPy.calculation.Calculation.Calculation

Class for managing stacking fault energy calculations

property a1

Fractional shift along the a1vect direction to apply

Type

float

property a2

Fractional shift along the a2vect direction to apply

Type

float

build_model()

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

calc_inputs()

Builds calculation inputs from the class’s attributes

cdcsquery(**kwargs)

Builds a CDCS-style query based on kwargs values for the record style.

Parameters

**kwargs (any) – Any extra query terms that are universal for all calculations or associated with one of the calculation’s subsets.

Returns

The CDCS-style query.

Return type

dict

property commands

LammpsCommands subset

property compare_fterms

The terms to compare metadata values using a tolerance.

Type

dict

property compare_terms

The terms to compare metadata values absolutely.

Type

list

property defect

StackingFault subset

property dumpfile_base

Name of the LAMMPS dump file of the 0 shift reference system

Type

str

property dumpfile_defect

Name of the LAMMPS dump file of the defect system

Type

str

property filenames

the names of each file used by the calculation.

Type

list

property gsf_displacement

Difference in planar displacement between reference and defect systems

Type

float

property gsf_energy

Generalized stacking fault energy associated with the defect system

Type

float

isvalid()

Looks at the set atttributes 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

bool

load_model(model, name=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, key=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='main', **kwargs)

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()

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 minimize

LammpsMinimize subset

property modelroot

The root element of the content

Type

str

mongoquery(**kwargs)

Builds a Mongo-style query based on kwargs values for the record style.

Parameters

**kwargs (any) – Any extra query terms that are universal for all calculations or associated with one of the calculation’s subsets.

Returns

The Mongo-style query.

Return type

dict

property multikeys

Calculation key sets that can have multiple values during prepare.

Type

list

pandasfilter(dataframe, **kwargs)

Parses a pandas dataframe containing the subset’s metadata to find entries matching the terms and values given. Ideally, this should find the same matches as the mongoquery and cdcsquery methods for the same search parameters.

Parameters
  • dataframe (pandas.DataFrame) – The metadata dataframe to filter.

  • kwargs (any) – Any extra query terms that are universal for all calculations or associated with one of the calculation’s subsets.

Returns

True for each entry where all filter terms+values match, False for all other entries.

Return type

pandas.Series of bool

property potential

LammpsPotential subset

property potential_energy_base

Potential energy of the 0 shift reference system

Type

float

property potential_energy_defect

Potential energy of the defect system

Type

float

process_results(results_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=None, **kwargs)

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.

  • a1 (float, optional) – The fractional shift to make along the a1 shift vector.

  • a2 (float, optional) – The fractional shift to make along the a2 shift vector.

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

property singularkeys

Calculation keys that can have single values during prepare.

Type

list

property system

AtommanSystemLoad subset

property templatekeys

The calculation-specific input keys and their descriptions.

Type

dict

property units

Units subset