PointDefectStatic

Calculation class

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

Bases: iprPy.calculation.Calculation.Calculation

Class for managing point defect formation calculations

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 centrosummation

sum of relative neighbor coordinates after relaxing

Type

numpy.NDArray

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 db_vect_shift

Change in dumbbell vector after relaxing

Type

numpy.NDArray

property defect

PointDefect subset

property dipole_tensor

The elastic dipole tensor for the point defect

Type

numpy.NDArray

property dumpfile_base

Name of the LAMMPS dump file of the base 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 formation_energy

Point defect formation energy

Type

float

property has_reconfigured

Flag for if checks indicate the defect has reconfigured

Type

bool

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.

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

property natoms_base

Number of atoms in the base system

Type

int

property natoms_defect

Number of atoms in the defect system

Type

int

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 position_shift

shift in defect’s position after relaxing

Type

numpy.NDArray

property potential

LammpsPotential subset

property potential_energy

Potential energy per atom for the base system

Type

float

property potential_energy_base

Potential energy of the base 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.

  • **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 symbols_base

Model symbols for the base system

Type

list

property symbols_defect

Model symbols for the defect system

Type

list

property system

AtommanSystemLoad subset

property system_base

The base system

Type

atomman.System

property system_defect

The defect system

Type

atomman.System

property system_mods

AtommanSystemManipulate subset

property units

Units subset