@@ -204,7 +204,7 @@ def parseLines(self, lines):
204204 elif line .find ("A =" ) == 0 :
205205 xcfg_A = float (line [3 :].split (None , 1 )[0 ])
206206 elif line .find ("H0(" ) == 0 :
207- i , j = ( int (line [3 ])- 1 , int (line [5 ])- 1 )
207+ i , j = (int (line [3 ]) - 1 , int (line [5 ]) - 1 )
208208 xcfg_H0 [i ,j ] = float (line [10 :].split (None , 1 )[0 ])
209209 xcfg_H0_set [i ,j ] = True
210210 elif line .find (".NO_VELOCITY." ) == 0 :
@@ -279,7 +279,7 @@ def toLines(self, stru):
279279 emsg = "cannot convert empty structure to XCFG format"
280280 raise StructureFormatError (emsg )
281281 lines = []
282- lines .append ( "Number of particles = %i" % len (stru ) )
282+ lines .append ("Number of particles = %i" % len (stru ))
283283 # figure out length unit A
284284 allxyz = numpy .array ([a .xyz for a in stru ])
285285 lo_xyz = allxyz .min (axis = 0 )
@@ -293,7 +293,7 @@ def toLines(self, stru):
293293 hi_ucvect = max ([numpy .sqrt (numpy .dot (v ,v )) for v in stru .lattice .base ])
294294 if hi_ucvect * p_A < 3.5 :
295295 p_A = numpy .ceil (3.5 / hi_ucvect )
296- lines .append ( "A = %.8g Angstrom" % p_A )
296+ lines .append ("A = %.8g Angstrom" % p_A )
297297 # how much do we need to shift the coordinates?
298298 p_dxyz = numpy .zeros (3 , dtype = float )
299299 for i in range (3 ):
@@ -303,8 +303,8 @@ def toLines(self, stru):
303303 # H0 tensor
304304 for i in range (3 ):
305305 for j in range (3 ):
306- lines .append ( "H0(%i,%i) = %.8g A" % \
307- ( i + 1 , j + 1 , stru .lattice .base [i ,j ]) )
306+ lines .append ("H0(%i,%i) = %.8g A" %
307+ ( i + 1 , j + 1 , stru .lattice .base [i , j ]))
308308 # get out for empty structure
309309 if len (stru ) == 0 : return lines
310310 a_first = stru [0 ]
@@ -322,7 +322,7 @@ def toLines(self, stru):
322322 # add occupancy if any atom has nonunit occupancy
323323 for a in stru :
324324 if a .occupancy != 1.0 :
325- p_auxiliaries .append ( ('occupancy' , 'a.occupancy' ) )
325+ p_auxiliaries .append (('occupancy' , 'a.occupancy' ))
326326 break
327327 # add temperature factor with as many terms as needed
328328 # check whether all temperature factors are zero or isotropic
0 commit comments