Skip to content

Commit

Permalink
Merge pull request #3497 from jtkrogel/nx_ws21_syntax
Browse files Browse the repository at this point in the history
Nexus: fix syntax warnings
  • Loading branch information
ye-luo authored Sep 30, 2021
2 parents 34953ef + 278b8e4 commit a556925
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions nexus/lib/pwscf_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,14 +924,14 @@ def plot_bandstructure(self, filename=None, filepath=None, max_min_e = None, sho
#end if
#end for
for ln, li in enumerate(labels):
if li is not '':
if li != '':
axvline(x[ln], ymin=-100, ymax=100, linewidth=3, color='k')
if li == 'GAMMA':
labels[ln] = r'$\Gamma$'
elif li is not '':
elif li != '':
labels[ln] = '${0}$'.format(li)
#end if
if labels[ln-1] is not '' and ln > 0:
if labels[ln-1] != '' and ln > 0:
labels[ln] = labels[ln-1]+'|'+labels[ln]
labels[ln-1] = ''
#end if
Expand Down
2 changes: 1 addition & 1 deletion nexus/lib/qmcpack_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -5377,7 +5377,7 @@ def generate_jastrow1(function='bspline',size=8,rcut=None,coeff=None,cusp=0.,ena
corrs = []
for i in range(len(elements)):
element = elements[i]
if cusp is 'Z':
if cusp == 'Z':
QmcpackInput.class_error('need to implement Z cusp','generate_jastrow1')
else:
lcusp = cusp
Expand Down
12 changes: 7 additions & 5 deletions nexus/lib/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -5562,7 +5562,7 @@ def _getseekpath(
structure = structure.folded_structure
#end if
structure = structure.copy()
if structure.units is not 'A':
if structure.units != 'A':
structure.change_units('A')
#end if
axes = structure.axes
Expand Down Expand Up @@ -6783,10 +6783,12 @@ def __init__(self,
pos = []
if basis_vectors is None:
basis_vectors = axes
elif basis_vectors is 'primitive':
basis_vectors = axes_prim
elif basis_vectors is 'conventional':
basis_vectors = axes_conv
elif isinstance(basis_vectors,str):
if basis_vectors=='primitive':
basis_vectors = axes_prim
elif basis_vectors=='conventional':
basis_vectors = axes_conv
#end if
#end if
nbasis = len(atoms)
for point in points:
Expand Down

0 comments on commit a556925

Please sign in to comment.