File tree 1 file changed +5
-8
lines changed
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):
671
671
for jj in scale :
672
672
if skip_relax :
673
673
pos_src = os .path .join (os .path .join (init_path , ii ), "POSCAR" )
674
- assert os .path .isfile (pos_src )
675
674
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
+ )
683
680
scale_path = os .path .join (work_path , ii )
684
681
scale_path = os .path .join (scale_path , f"scale-{ jj :.3f} " )
685
682
create_path (scale_path )
You can’t perform that action at this time.
0 commit comments