Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera committed Oct 30, 2024
1 parent 5fd1d0a commit 461dc08
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions emmet-core/emmet/core/neb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime
from pathlib import Path
from pydantic import BaseModel, Field
from typing import Optional, Tuple, Union
from typing import Optional, Tuple, Union, Sequence
from typing_extensions import Self

from monty.os.path import zpath
Expand Down Expand Up @@ -37,7 +37,7 @@ class NebMethod(ValueEnum):
class NebTaskDoc(BaseModel, extra="allow"):
"""Define schema for VASP NEB tasks."""

endpoint_structures: tuple[Structure, Structure] = Field(
endpoint_structures: Sequence[Structure] = Field(
None,
description="The initial and final configurations (reactants and products) of the barrier.",
)
Expand Down Expand Up @@ -152,6 +152,12 @@ def from_directory(
else:
inputs["orig_inputs"] = OrigInputs(**vis)

neb_method = (
NebMethod.CLIMBING_IMAGE
if inputs["inputs"].incar.get("LCLIMB", False)
else NebMethod.STANDARD
)

return cls(
endpoint_structures=endpoint_structures,
image_calculations=image_calculations,
Expand All @@ -160,11 +166,7 @@ def from_directory(
orig_inputs=inputs["orig_inputs"],
inputs=inputs["inputs"],
image_objects=image_objects,
neb_method=(
NebMethod.CLIMBING_IMAGE
if inputs["inputs"].incar.get("LCLIMB")
else NebMethod.STANDARD
),
neb_method=neb_method,
state=task_state,
image_energies=[calc.output.energy for calc in image_calculations],
custodian=_parse_custodian(dir_name),
Expand Down

0 comments on commit 461dc08

Please sign in to comment.