ace

ACE descriptor class.

class ACE(params: Parameters | None = None)[source]

Bases: Descriptor

Class for calculation and parsing of ACE descriptors.

Parameters:

parameters (mala.common.parameters.Parameters) – Parameters object used to create this object.

couplings_yace_file

File which holds the coupling coefficients. Can be provided by users, in which case consistency will be checked. If no file is detected, a new file is computed.

Type:

str

static backconvert_units(array, out_units)[source]

Convert the units of a bispectrum descriptor.

Since these do not really have units this function does nothing yet.

Parameters:
  • array (numpy.array) – Data in MALA units.

  • out_units (string) – Desired units of output array.

Returns:

converted_array – Data in out_units.

Return type:

numpy.array

check_coupling_coeffs(coupling_file)[source]

Check the coupling coefficients for consistency.

This reads the first line of the coupling coefficients file, which contains a list of the elements the coupling coefficients have been computed for, and checks whether this is consistent with the elements for this calculation.

Parameters:

coupling_file (str) – Path to the coupling coefficients file.

Returns:

coupling_file – Path to the coupling coefficients file. None if the file was found incompatible.

Return type:

str

static convert_units(array, in_units='None')[source]

Convert the units of a bispectrum descriptor.

Since these do not really have units this function does nothing yet.

Parameters:
  • array (numpy.array) – Data for which the units should be converted.

  • in_units (string) – Units of array.

Returns:

converted_array – Data in MALA units.

Return type:

numpy.array

property data_name

Get a string that describes the target (for e.g. metadata).