# Finding lattice constants¶

## Fcc Aluminium¶

Let’s try to converge the lattice constant with respect to number of plane-waves:

```
import numpy as np
from ase.build import bulk
from gpaw import GPAW, PW
a0 = 4.04
al = bulk('Al', 'fcc', a=a0)
cell0 = al.cell
for ecut in range(200, 501, 50):
al.calc = GPAW(mode=PW(ecut),
xc='PBE',
kpts=(8, 8, 8),
parallel={'band': 1},
basis='dzp',
txt='Al-%d.txt' % ecut)
for eps in np.linspace(-0.02, 0.02, 5):
al.cell = (1 + eps) * cell0
al.get_potential_energy()
```

Using a plane-wave cutoff energy of 400 eV, we now check convergence
with respect to number of **k**-points:

```
for k in range(4, 17):
al.calc.set(kpts=(k, k, k),
txt='Al-%02d.txt' % k)
for eps in np.linspace(-0.02, 0.02, 5):
al.cell = (1 + eps) * cell0
al.get_potential_energy()
```

(see also `analysis script`

).