File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,20 +69,15 @@ def load_cells(lines):
6969 if "Cell_Vectors=" in line :
7070 part = line .split ("Cell_Vectors=" )[1 ]
7171 parts = part .split ()
72- if len (parts ) < 9 :
73- raise RuntimeError ("Cell_Vectors does not contain enough elements." )
7472 values = list (map (float , parts [:9 ]))
7573 cell = [values [0 :3 ], values [3 :6 ], values [6 :9 ]]
7674 cells .append (cell )
7775 # Checking SCF converged or not
7876 for token in line .split ():
7977 if token .startswith ("scf_conv=" ):
80- try :
81- scf_conv = int (token .split ("=" )[1 ])
82- if scf_conv == 0 :
83- warnings .warn ("SCF not converged!" , stacklevel = 2 )
84- except (IndexError , ValueError ):
85- pass
78+ scf_conv = int (token .split ("=" )[1 ])
79+ if scf_conv == 0 :
80+ warnings .warn ("SCF not converged!" , stacklevel = 2 )
8681 cells = np .array (cells )
8782 return cells
8883
You can’t perform that action at this time.
0 commit comments