Rename files

parent e9a1eb58
# Creates: Al_conv_ecut.png, Al_conv_k.png
from myqueue.job import Job
def workflow():
return [
Job('al.py@8x12h'),
Job('al.agts.py', deps=['al.py'])]
if __name__ == '__main__':
import pylab as plt
from ase.eos import EquationOfState
from ase.io import read
def fit(filename):
configs = read(filename + '@:')
volumes = [a.get_volume() for a in configs]
energies = [a.get_potential_energy() for a in configs]
eos = EquationOfState(volumes, energies)
v0, e0, B = eos.fit()
return (4 * v0)**(1 / 3.0)
cutoffs = range(200, 501, 50)
a = [fit('Al-%d.txt' % ecut) for ecut in cutoffs]
plt.figure(figsize=(6, 4))
plt.plot(cutoffs, a, 'o-')
plt.axis(ymin=4.03, ymax=4.05)
plt.xlabel('Plane-wave cutoff energy [eV]')
plt.ylabel('lattice constant [Ang]')
plt.savefig('Al_conv_ecut.png')
kpoints = range(4, 17)
plt.figure(figsize=(6, 4))
a = [fit('Al-%02d.txt' % k) for k in kpoints]
plt.plot(kpoints, a, '-')
plt.xlabel('number of k-points')
plt.ylabel('lattice constant [Ang]')
plt.savefig('Al_conv_k.png')
return [Job('al.py@8x12h'),
Job('al_analysis.py', deps=['al.py'])]
......@@ -34,4 +34,4 @@ with respect to number of **k**-points:
.. image:: Al_conv_k.png
(see also :download:`analysis script <al.agts.py>`).
(see also :download:`analysis script <al_analysis.py>`).
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