Skip to content

Commit

Permalink
Update qha.py
Browse files Browse the repository at this point in the history
Signed-off-by: Runze Liu <[email protected]>
  • Loading branch information
rul048 authored Sep 13, 2024
1 parent b8988c5 commit 916ebae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions matcalc/qha.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import copy
from dataclasses import dataclass
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 916ebae

Please sign in to comment.