Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YutaYahagi committed Oct 21, 2024
1 parent fa00618 commit 29239d6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions run_automated_wannier.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def check_codes():
# will raise NotExistent error
try:
codes = dict(
pw_code=orm.Code.get_from_string(str_pw),
pw2wannier90_code=orm.Code.get_from_string(str_pw2wan),
projwfc_code=orm.Code.get_from_string(str_projwfc),
wannier90_code=orm.Code.get_from_string(str_wan),
pw_code=orm.load_code(str_pw),
pw2wannier90_code=orm.load_code(str_pw2wan),
projwfc_code=orm.load_code(str_projwfc),
wannier90_code=orm.load_code(str_wan),
)
except NotExistent as e:
print(e)
Expand All @@ -41,7 +41,7 @@ def parse_arugments():
"A script to run the AiiDA workflows to automatically compute the MLWF using the SCDM method and the automated protocol described in the Vitale et al. paper"
)
parser.add_argument(
"xsf", metavar="cif_fileNAME", help="path to an input XSF file"
"cif", metavar="cif_fileNAME", help="path to an input structure file (CIF, MCIF, XSF,...)"
)
parser.add_argument(
'-p',
Expand Down Expand Up @@ -91,7 +91,7 @@ def get_initial_moment(magmoms, threshold=1e-6):
init_mom={}
for i, mom in enumerate(magmoms):
num=str(i+1)
m = np.linalg.norm(mom,ord=2)
m = np.linalg.norm(mom[:3],ord=2)
if m > threshold:
mtheta=np.arccos(mom[2]/m)
mphi=np.arctan2(mom[1],mom[0])
Expand Down Expand Up @@ -226,6 +226,6 @@ def submit_workchain(
args = parse_arugments()

submit_workchain(
args.xsf, args.protocol, args.only_valence, args.do_disentanglement,
args.cif, args.protocol, args.only_valence, args.do_disentanglement,
args.do_mlwf, args.retrieve_hamiltonian, group_name
)

0 comments on commit 29239d6

Please sign in to comment.