diff --git a/matcalc/qha.py b/matcalc/qha.py index f315256..a3984a4 100644 --- a/matcalc/qha.py +++ b/matcalc/qha.py @@ -2,7 +2,6 @@ from __future__ import annotations -import copy from dataclasses import dataclass from typing import TYPE_CHECKING @@ -212,8 +211,8 @@ def _scale_structure(self, structure: Structure, scale_factor: float) -> Structu Returns: Pymatgen structure with scaled lattice constants. """ - struct = copy.deepcopy(structure) - struct.scale_lattice(struct.volume * scale_factor**3) + struct = structure.copy() + struct.apply_strain(scale_factor - 1) return struct def _calculate_energy(self, structure: Structure) -> float: