FLAKE8

parent 322194fe
Pipeline #92488630 failed with stage
in 3 minutes and 9 seconds
......@@ -12,5 +12,5 @@ master:
- su user -c 'gpaw install-data --register gpaw-datasets'
- su user -c 'gpaw -P 1 info'
- su user -c 'gpaw test --range linalg/gemm_complex.py,lcao/dos.py'
- flake8 --ignore E722,E222,E701,E731,E114,E402,E502,E262,E266,E203,E305,E128,E221,E127,E202,E303,E302,E201,E241,E225,E251,E261,E265,E231,E226,W291,E501,E129,E741,W293,W504,W503,W605 --exclude "doc/platforms/*" gpaw doc
- flake8 --ignore E266,E722,E222,E701,E731,E203,E402,E262,E502,E305,E241,W291,E127,E221,E202,E303,E302,E201,E225,E128,E251,E261,E265,E501,E231,E226 --exclude "doc/platforms/*" gpaw doc
- python -We:invalid -m compileall -f -q gpaw/
# creates: lines.png
from __future__ import division
import datetime as dt
import os
import subprocess
......@@ -65,13 +64,13 @@ def count_lines():
print(year, month, hash)
subprocess.call(['git', 'checkout', hash])
c = count('c', '\*.[ch]')
py = count('.', '\*.py')
test = count('gpaw/test', '\*.py')
test += count('test', '\*.py')
doc = count('doc', '\*.py')
c = count('c', r'\*.[ch]')
py = count('.', r'\*.py')
test = count('gpaw/test', r'\*.py')
test += count('test', r'\*.py')
doc = count('doc', r'\*.py')
py -= test + doc # avoid double counting
rst = count('.', '\*.rst')
rst = count('.', r'\*.rst')
print(year, month, 0, c, py, test, doc, rst, file=fd)
month += 1
if month == 13:
......
......@@ -36,7 +36,7 @@ def plot(fname, fiteps):
# plt.ylim(fiteps_e.real.min(), fiteps_e.real.max())
plt.ylim(-70, 0)
plt.xlabel('Energy (eV)')
plt.ylabel('Real($\epsilon$)')
plt.ylabel(r'Real($\epsilon$)')
plt.legend(loc='best')
plt.subplot(1, 2, 2)
......@@ -46,7 +46,7 @@ def plot(fname, fiteps):
# plt.ylim(fiteps_e.imag.min(), fiteps_e.imag.max())
plt.ylim(0, 7)
plt.xlabel('Energy (eV)')
plt.ylabel('Imaginary($\epsilon$)')
plt.ylabel(r'Imaginary($\epsilon$)')
plt.tight_layout()
plt.savefig('%s.png' % fname)
......@@ -55,6 +55,8 @@ def plot(fname, fiteps):
# http://refractiveindex.info/?shelf=main&book=Au&page=Johnson
# Direct download link:
# wget http://refractiveindex.info/database/main/Au/Johnson.yml -O Au.yml
ymlfname = 'Au.yml'
# Fit to the permittivity
......
......@@ -99,7 +99,7 @@ def bondlengths(Ea, dE):
plt.plot(B, E0, 'g.', label='reference')
plt.legend(loc='lower right')
plt.xlabel('Bond length $\mathrm{\AA}$')
plt.xlabel(r'Bond length $\mathrm{\AA}$')
plt.ylabel('Energy [eV]')
plt.savefig('bondlengths.png')
......
# Creates: silicon_ABS.png
import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(7, 5))
d = np.loadtxt('si_abs.csv', delimiter=',')
plt.plot(d[:, 0], d[:, 3], '-k', label='$\mathrm{Re}\epsilon(\omega)$')
plt.plot(d[:, 0], d[:, 4], '-r', label='$\mathrm{Im}\epsilon(\omega)$')
plt.plot(d[:, 0], d[:, 3], '-k', label=r'$\mathrm{Re}\epsilon(\omega)$')
plt.plot(d[:, 0], d[:, 4], '-r', label=r'$\mathrm{Im}\epsilon(\omega)$')
plt.title('Dielectric function of Si')
plt.legend()
plt.xlabel('Energy (eV)', fontsize=14)
plt.ylabel('$\epsilon$', fontsize=18)
plt.ylabel(r'$\epsilon$', fontsize=18)
ax = plt.gca()
......@@ -20,7 +20,7 @@ def y(e):
i = (x < e).sum()
return d[i, 4]
# data from G.Kresse, PRB 73, 045112 (2006)
for name, e in zip("E_0 E_1 E_2 E_0' E_1'".split(),
[2.53, 2.71, 3.72, 3.08, 4.50]):
......
......@@ -5,14 +5,14 @@ import matplotlib.pyplot as plt
plt.figure(figsize=(5, 7))
Q = np.loadtxt('graphite_q_list')
for i, q in enumerate(Q):
filename = 'graphite_EELS_' + str(i + 1)
filename = 'graphite_EELS_' + str(i + 1)
d = np.loadtxt(filename, delimiter=',')
plt.plot(d[:, 0], d[:, 2] + 0.4 * (4 - i), '-',
label='%.2f Ang$^{-1}$' % q)
plt.xlabel('Energy [eV]')
plt.ylabel('Loss Function')
plt.title('EELS spectra of graphene: $\Gamma-\mathrm{M}$')
plt.title(r'EELS spectra of graphene: $\Gamma-\mathrm{M}$')
plt.legend(loc='best')
plt.savefig('graphite_EELS.png')
plt.show()
......@@ -18,8 +18,8 @@ for omega2 in [2.5, 5, 10, 15, 20, np.inf]:
label = '$\\omega_2 = %.1f\\, \\mathrm{eV}$' % omega2
plt.plot(x, y, '.', label=label)
plt.ylabel('Freq. no')
plt.xlabel('$\\omega\\, [\mathrm{eV}]$')
plt.xlabel(r'$\omega\, [\mathrm{eV}]$')
plt.axis(xmax=30, ymax=200)
plt.title('$\\Delta\\omega_0 = 0.2\\, \mathrm{eV}$')
plt.title(r'$\Delta\omega_0 = 0.2\, \mathrm{eV}$')
plt.legend(loc=2)
plt.savefig('nl_freq_grid.png', bbox_inches='tight')
......@@ -29,7 +29,7 @@ for name in ['zero', 'periodic', 'corrected', 'pwcorrected']:
r'$\phi$ = %.2f eV' % (v[-n] - efermi),
va='center', ha='right')
plt.xlabel('$z$, r$\AA$')
plt.xlabel(r'$z$, r$\AA$')
plt.ylabel('(Pseudo) electrostatic potential, V')
plt.xlim([0., z[-1]])
if name == 'pwcorrected':
......
......@@ -22,10 +22,10 @@ extrap_gap, slope = np.linalg.solve([[1, 1. / 300.**(3. / 2)],
[1, 1. / 400.**(3. / 2)]],
[direct_gap[2], direct_gap[3]])
xs = np.linspace(0, 1 / 400.**(3. / 2), 1000)
plt.plot(xs, extrap_gap + slope*xs, 'k--')
plt.plot(xs, extrap_gap + slope * xs, 'k--')
plt.xticks([1. / 100**(3. / 2), 1. / 200**(3. / 2), 1. / 400**(3. / 2), 0],
[100, 200, 400, '$\infty$'])
[100, 200, 400, r'$\infty$'])
plt.xlabel('Cutoff energy (eV)')
plt.ylabel('Direct band gap (eV)')
plt.title('non-selfconsistent [email protected]')
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
# flake8: noqa
# This file contains data for the test sg15_hydrogen.py.
pp_text = """<UPF version="2.0.1">
<PP_INFO>
......@@ -16,22 +17,22 @@ pp_text = """<UPF version="2.0.1">
Copyright 2015 The Regents of the University of California
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
This pseudopotential is part of the Schlipf-Gygi norm-conserving
pseudopotential library. Its construction parameters were tuned to
reproduce materials of a training set with very high accuracy and
should be suitable as a general purpose pseudopotential to treat a
variety of different compounds. For details of the construction and
This pseudopotential is part of the Schlipf-Gygi norm-conserving
pseudopotential library. Its construction parameters were tuned to
reproduce materials of a training set with very high accuracy and
should be suitable as a general purpose pseudopotential to treat a
variety of different compounds. For details of the construction and
testing of the pseudopotential please refer to:
[insert reference to paper here]
We kindly ask that you include this reference in all publications
We kindly ask that you include this reference in all publications
associated to this pseudopotential.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment