@@ -89,7 +89,12 @@ def get_coords_from_log(loglines, natoms, stru_files=None):
8989 coord_direct .append (False )
9090 for k in range (2 , 2 + natoms ):
9191 coords [- 1 ].append (
92- list (map (lambda x : float (x ) * a0 * bohr2ang , loglines [i + k ].split ()[1 :4 ]))
92+ list (
93+ map (
94+ lambda x : float (x ) * a0 * bohr2ang ,
95+ loglines [i + k ].split ()[1 :4 ],
96+ )
97+ )
9398 )
9499 else :
95100 assert False , "Unrecongnized coordinate type, %s, line:%d" % ( # noqa: UP031
@@ -108,7 +113,12 @@ def get_coords_from_log(loglines, natoms, stru_files=None):
108113 cells .append ([])
109114 for k in range (1 , 4 ):
110115 cells [- 1 ].append (
111- list (map (lambda x : float (x ) * a0 * bohr2ang , loglines [i + k ].split ()[0 :3 ]))
116+ list (
117+ map (
118+ lambda x : float (x ) * a0 * bohr2ang ,
119+ loglines [i + k ].split ()[0 :3 ],
120+ )
121+ )
112122 )
113123
114124 elif line [1 :14 ] == "final etot is" or "#TOTAL ENERGY#" in line :
@@ -123,7 +133,9 @@ def get_coords_from_log(loglines, natoms, stru_files=None):
123133 # we should read cell and coord from STRU_ION*_D files
124134 if len (energy ) > 1 and len (coords ) == 1 :
125135 # the energies of all structrues are collected, but coords have only the first structure
126- if stru_files is not None and len (stru_files ) > 1 : # if stru_files are not only STRU_ION_D
136+ if (
137+ stru_files is not None and len (stru_files ) > 1
138+ ): # if stru_files are not only STRU_ION_D
127139 stru_file_name = [os .path .basename (i ) for i in stru_files ]
128140 coords = coords [:1 ] + [np .nan for i in range (len (energy ) - 1 )]
129141 coord_direct = coord_direct [:1 ] + [False for i in range (len (energy ) - 1 )]
0 commit comments