@@ -99,8 +99,8 @@ def readtokensf(self,s=None,*formats):
9999 'number of tokens: {1}\n '
100100 'number of formats provided: {2}' .format (
101101 line ,len (stokens ),len (formats )
102+ )
102103 )
103- )
104104 #end if
105105 tokens = []
106106 if all_same :
@@ -138,7 +138,7 @@ def seek(self,pos,whence=0,start=None,end=None):
138138 self .error (
139139 'relative positioning must be either 0 (begin), 1 (current), or 2 (end)\n '
140140 'you provided: {0}' .format (whence )
141- )
141+ )
142142 #end if
143143 #end if
144144 if whence != 2 :
@@ -822,7 +822,7 @@ def validity_checks(self):
822822 return [(
823823 'xsf file must have animation, bands, structure, or data\n '
824824 'the current file is missing all of these'
825- )]
825+ )]
826826 #end if
827827 #end def validity_checks
828828
@@ -1409,7 +1409,7 @@ def read_poscar_chgcar(host,text):
14091409 error (
14101410 'read_poscar_chgcar must be used in conjunction with PoscarFile or ChgcarFile objects only\n '
14111411 'encountered object of type: {0}' .format (host .__class__ .__name__ )
1412- )
1412+ )
14131413 #end if
14141414
14151415 # read lines and remove fortran comments
@@ -1442,8 +1442,8 @@ def read_poscar_chgcar(host,text):
14421442 'file {0} must have at least {1} lines\n '
14431443 'only {2} lines found' .format (
14441444 host .filepath , min_lines , nlines
1445+ )
14451446 )
1446- )
14471447 #end if
14481448 description = lines [0 ]
14491449 dim = 3
@@ -1584,8 +1584,8 @@ def is_float(val):
15841584 'grid size: {1}\n '
15851585 'density size: {2}' .format (
15861586 grid , ng , density .size
1587+ )
15871588 )
1588- )
15891589 #end if
15901590 ndens = density .size // ng
15911591 if ndens == 1 :
@@ -1607,7 +1607,7 @@ def is_float(val):
16071607 ' 2) charge and collinear spin densities (2 densities)\n '
16081608 ' 3) charge and non-collinear spin densities (4 densities)\n '
16091609 'number of densities found: {0}' .format (ndens )
1610- )
1610+ )
16111611 #end if
16121612 else :
16131613 host .error ('file {0} is incomplete (missing density)' .format (host .filepath ))
0 commit comments