diff --git a/src/py/mat3ra/made/tools/build/perturbation/builders.py b/src/py/mat3ra/made/tools/build/perturbation/builders.py index 53db19b8..a9dee5a5 100644 --- a/src/py/mat3ra/made/tools/build/perturbation/builders.py +++ b/src/py/mat3ra/made/tools/build/perturbation/builders.py @@ -33,7 +33,7 @@ def _post_process( return [wrap_to_unit_cell(item) for item in items] def _update_material_name(self, material: Material, configuration: _ConfigurationType) -> Material: - perturbation_details = f"Perturbation: {configuration.perturbation_function_holder.get_json().get('function')}" + perturbation_details = f"Perturbation: {configuration.perturbation_function_holder.get_json().get('type')}" material.name = f"{material.name} ({perturbation_details})" return material diff --git a/src/py/mat3ra/made/tools/utils/perturbation.py b/src/py/mat3ra/made/tools/utils/perturbation.py index c06a0bb3..e66f4eed 100644 --- a/src/py/mat3ra/made/tools/utils/perturbation.py +++ b/src/py/mat3ra/made/tools/utils/perturbation.py @@ -129,7 +129,7 @@ def __init__( def get_json(self) -> dict: return { "type": self.__class__.__name__, - "function": "sine_wave", + "function": str(self.function), "variables": self.variables, "amplitude": self.amplitude, "wavelength": self.wavelength,