Skip to content

Commit

Permalink
fix pyright error
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 10, 2024
1 parent 33ca614 commit 1697b7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fpop/abacus.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class PrepAbacus(PrepFp):
def prep_task(
self,
conf_frame,
abacus_inputs: AbacusInputs,
inputs: AbacusInputs,
prepare_image_config: Optional[Dict] = None,
optional_input: Optional[Dict] = None,
optional_artifact: Optional[Dict] = None,
Expand All @@ -547,9 +547,9 @@ def prep_task(
"""

element_list = conf_frame['atom_names']
pp, orb = abacus_inputs.write_pporb(element_list)
dpks = abacus_inputs.write_deepks()
mass = abacus_inputs.get_mass(element_list)
pp, orb = inputs.write_pporb(element_list)
dpks = inputs.write_deepks()
mass = inputs.get_mass(element_list)

# if conf_frame has the spins, then we will use it as the initial mag and write it to STRU
mag = conf_frame.data.get("spins",None)
Expand All @@ -558,16 +558,16 @@ def prep_task(

# if the constrain_elements is set, we will set the related flag in STRU
sc = None
c_eles = abacus_inputs.get_constrain_elements()
c_eles = inputs.get_constrain_elements()
if c_eles:
atom_names = conf_frame.data["atom_names"]
atom_types = [atom_names[i] for i in conf_frame.data["atom_types"]]
sc = [None if i not in c_eles else [1,1,1] for i in atom_types]

conf_frame.to('abacus/stru', 'STRU', pp_file=pp,numerical_orbital=orb,numerical_descriptor=dpks,mass=mass,mag=mag,sc=sc)

abacus_inputs.write_input("INPUT")
abacus_inputs.write_kpt("KPT")
inputs.write_input("INPUT")
inputs.write_kpt("KPT")

if optional_artifact:
for file_name, file_path in optional_artifact.items():
Expand Down

0 comments on commit 1697b7c

Please sign in to comment.