File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -671,15 +671,12 @@ def make_scale(jdata):
671671 for jj in scale :
672672 if skip_relax :
673673 pos_src = os .path .join (os .path .join (init_path , ii ), "POSCAR" )
674- assert os .path .isfile (pos_src )
675674 else :
676- try :
677- pos_src = os .path .join (os .path .join (init_path , ii ), "CONTCAR" )
678- assert os .path .isfile (pos_src )
679- except Exception :
680- raise RuntimeError (
681- "not file %s, vasp relaxation should be run before scale poscar"
682- )
675+ pos_src = os .path .join (os .path .join (init_path , ii ), "CONTCAR" )
676+ if not os .path .isfile (pos_src ):
677+ raise RuntimeError (
678+ f"file { pos_src } not found, vasp relaxation should be run before scale poscar"
679+ )
683680 scale_path = os .path .join (work_path , ii )
684681 scale_path = os .path .join (scale_path , f"scale-{ jj :.3f} " )
685682 create_path (scale_path )
You can’t perform that action at this time.
0 commit comments