pyiron_contrib.atomistics.atomicrex.fit_properties module

class pyiron_contrib.atomistics.atomicrex.fit_properties.ARFitProperty(*args, **kwargs)[source]

Bases: DataContainer

Class to describe properties that can be fitted using atomicrex. Property and target value have to be given, the other parameters control details of the fitting procedure. For more information what they do visit the atomicrex documentation.

Direct interaction with this class shouldn’t be necessary. To conveniently create ARFitProperty objects use the ARFitPropertList add_fit_property method.

property prop
property residual_style
to_xml_element()[source]
class pyiron_contrib.atomistics.atomicrex.fit_properties.ARFitPropertyList(*args, **kwargs)[source]

Bases: DataContainer

DataContainer of ARFitProperties that additionally provides utility functions that allow convenient addition of fit properties to a structure. Also provides internal functionality.

add_FitProperty(prop, target_value, fit=True, relax=False, relative_weight=1, residual_style='squared', output=True, tolerance=None, min_val=None, max_val=None, output_all=True)[source]

Adds a fittable property to the fit properties of an atomicrex structure. Default values should be ok for most cases, but it is strongly recommended to check the purpose of each argument in the atomicrex documentation.

Parameters
  • prop (string) – property to be fitted

  • target_value (float) –

  • fit (bool, optional) – Include the property in the fit procedure. Defaults to True.

  • relax (bool, optional) – Calculate before or after structure relaxation. Defaults to False.

  • relative_weight (int, optional) – Weight for the objective function. Defaults to 1.

  • residual_style (str, optional) – See atomicrex documentation. Defaults to “squared-relative”.

  • output (bool, optional) – Determines if the value is written to output.

  • True. (Could cause parsing problems if False. Defaults to) –

  • tolerance (float, optional) – See atomicrex documentation. Defaults to None.

  • min_val (float, optional) – Only scalar properties, if relaxation enabled. Defaults to None.

  • max_val (float, optional) – Only scalar properties, if relaxation enabled. Defaults to None.

  • output_all (bool, optional) – Only vector properties. Determines if full vector is written to output. Defaults to True.

to_xml_element()[source]

Internal helper function converting the list into an atomicrex xml element.

class pyiron_contrib.atomistics.atomicrex.fit_properties.FlattenedARProperty(num_chunks=1, num_elements=1, **kwargs)[source]

Bases: FlattenedStorage

Class to read and write scalar properties of a structure, f.e. the energy.

property fit
from_hdf(hdf, group_name)[source]

Read object to HDF.

If group_name is given descend into subgroup in hdf first.

Parameters
  • hdf (ProjectHDFio) – HDF group to read from

  • group_name (str, optional) – name of subgroup

property relative_weight
property residual_style
property tolerance
class pyiron_contrib.atomistics.atomicrex.fit_properties.FlattenedARScalarProperty(num_chunks=1, num_elements=1, **kwargs)[source]

Bases: FlattenedARProperty

property final_val
property target_val
to_xml_element(index, prop)[source]
class pyiron_contrib.atomistics.atomicrex.fit_properties.FlattenedARVectorProperty(num_chunks=1, num_elements=1, **kwargs)[source]

Bases: FlattenedARProperty

Like AR property, but for vector properties, i.e. forces

property final_val
property target_val
to_xml_element(index, prop)[source]