Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus: fix syntax warnings #3497

Merged
merged 2 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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