Skip to content

Commit

Permalink
Replace calculations import with py4vasp import
Browse files Browse the repository at this point in the history
  • Loading branch information
sudarshanv01 committed Oct 6, 2023
1 parent 786a2cc commit 83296f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/py4vasp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright © VASP Software GmbH,
# Licensed under the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from py4vasp._analysis.mlff import MLFFErrorAnalysis
from py4vasp._calculation import Calculation
from py4vasp._calculations import Calculations
from py4vasp._analysis.mlff import MLFFErrorAnalysis
from py4vasp._third_party.graph import plot
from py4vasp._third_party.interactive import set_error_handling

Expand Down
11 changes: 8 additions & 3 deletions src/py4vasp/_analysis/mlff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import numpy as np

from py4vasp import Calculations, exception
import py4vasp
from py4vasp import exception


class MLFFErrorAnalysis:
Expand Down Expand Up @@ -71,7 +72,9 @@ def from_paths(cls, dft_data, mlff_data):
Path to the MLFF data. Accepts wildcards.
"""
mlff_error_analysis = cls(_internal=True)
calculations = Calculations.from_paths(dft_data=dft_data, mlff_data=mlff_data)
calculations = py4vasp.Calculations.from_paths(
dft_data=dft_data, mlff_data=mlff_data
)
mlff_error_analysis._calculations = calculations
set_appropriate_attrs(mlff_error_analysis)
return mlff_error_analysis
Expand All @@ -92,7 +95,9 @@ def from_files(cls, dft_data, mlff_data):
Path to the MLFF data. Accepts wildcards.
"""
mlff_error_analysis = cls(_internal=True)
calculations = Calculations.from_files(dft_data=dft_data, mlff_data=mlff_data)
calculations = py4vasp.Calculations.from_files(
dft_data=dft_data, mlff_data=mlff_data
)
mlff_error_analysis._calculations = calculations
set_appropriate_attrs(mlff_error_analysis)
return mlff_error_analysis
Expand Down

0 comments on commit 83296f3

Please sign in to comment.