Banchmark: DeltaCodesDFT

Codes precision measured using the database of bulk systems from See the project page for details.

Key-value pairs

key description
kptdensity K-point density in point per Ang^-1
linspacestr Numpy’s linspace used for scaling the cell along the EOS
name Name of the elemental bulk system (H-Ba, Lu-Po, Rn)
project Name of the project: “dcdft”
width Electronic temperature
x Strain used to scale the cell along the EOS (see linspacestr)

Note that there are additional keys not explained above which are specific to the given calculator.

GPAW results for PAW datasets version 0.9

Running the following script writes the EOS parameters: V0 in Å**3/atom, bulk modulus (B0) in GPa, and pressure derivative of the bulk modulus B1 (dimensionless), in a file format expected by the script available from

import sys
import numpy as np
from numpy.linalg.linalg import LinAlgError
from ase.units import kJ
import ase.db
from ase.utils import prnt
from ase.test.tasks.dcdft import DeltaCodesDFTCollection as Collection
from ase.test.tasks.dcdft import FullEquationOfState as EquationOfState

collection = Collection()

if len(sys.argv) == 2 and '' not in sys.argv:
    db = sys.argv[1]
    db = 'dcdft_gpaw_pw_paw09.db'  # default db file

c = ase.db.connect(db)

def analyse(c, collection):

    A = []
    for name in collection.names:
        ve = []  # volume, energy pairs
        for row in
            except AttributeError:
                ve.append((np.nan, np.nan))

        # sort according to volume
        ves = sorted(ve, key=lambda x: x[0])

        # EOS
        eos = EquationOfState([t[0] for t in ves],
                              [t[1] for t in ves])
            v, e, B0, B1, R =
        except (ValueError, TypeError, LinAlgError):
            (v, e, B0, B1, R) = (np.nan, np.nan, np.nan, np.nan, np.nan)
        if not R: R = [np.nan]  # sometimes R is an empty array
        if not isinstance(R, list): R = [R]  # sometimes R is not a list
        e = e / len(collection[name])
        v = v / len(collection[name])
        B0 = B0 / kJ * 1.0e24  # GPa
        A.append((e, v, B0, B1, R[0]))
    return np.array(A).T

E, V, B0, B1, R = analyse(c, collection)

fd = open(db + '_raw.txt', 'w')
for name, e, v, b0, b1, r, in zip(collection.names, E, V, B0, B1, R):
    if not np.isnan(e):
        prnt('%2s %8.4f %8.4f %8.4f' % (name, v, b0, b1), file=fd)
fd = open(db + '_raw.csv', 'w')
for name, e, v, b0, b1, r, in zip(collection.names, E, V, B0, B1, R):
    if not np.isnan(e):
        prnt('%s, %8.4f, %8.4f, %8.4f' % (name, v, b0, b1), file=fd)

Results from other codes

Consists of two steps. First extract the data for the given code and insert it into a new database file. Then use the script above to write the formatted file using the data from the new database file.

# aims light basis relativistic atomic_zora scalar
ase-db dcdft.db project=dcdft,calculator=aims,basis=light,relativistic=scalar -i dcdft_aims_light.db
python dcdft_aims_light.db
# aims tight basis relativistic atomic_zora scalar
ase-db dcdft.db project=dcdft,calculator=aims,basis=tight,relativistic=scalar -i dcdft_aims_tight.db
python dcdft_aims_tight.db
# aims really_tight basis relativistic atomic_zora scalar
ase-db dcdft.db project=dcdft,calculator=aims,basis=really_tight,relativistic=scalar -i dcdft_aims_really_tight.db
python dcdft_aims_really_tight.db
# aims tier2 basis relativistic atomic_zora scalar
ase-db dcdft.db project=dcdft,calculator=aims,basis=tier2,relativistic=scalar -i dcdft_aims_tier2.db
python dcdft_aims_tier2.db
# aims tier2 basis relativistic zora scalar 1e-12
ase-db dcdft.db project=dcdft,calculator=aims,basis=tier2,relativistic=1.e-12 -i dcdft_aims_tier2_z12.db
python dcdft_aims_tier2_z12.db
# aims tier2 basis relativistic none
ase-db dcdft.db project=dcdft,calculator=aims,basis=tier2,relativistic=none -i dcdft_aims_tier2_nrel.db
python dcdft_aims_tier2_nrel.db
# espresso gbrv 1.2
ase-db dcdft.db project=dcdft,calculator=espresso,potentials=gbrv,potentials_version=1.2 -i dcdft_espresso_gbrv_1.2.db
python dcdft_espresso_gbrv_1.2.db
# espresso gbrv 1.4
ase-db dcdft.db project=dcdft,calculator=espresso,potentials=gbrv,potentials_version=1.4 -i dcdft_espresso_gbrv_1.4.db
python dcdft_espresso_gbrv_1.4.db
# espresso sg15_oncv
ase-db dcdft.db project=dcdft,calculator=espresso,potentials=sg15_oncv -i dcdft_espresso_sg15_oncv.db
python dcdft_espresso_sg15_oncv.db
# espresso sssp_accuracy
ase-db dcdft.db project=dcdft,calculator=espresso,potentials=sssp_accuracy -i dcdft_espresso_sssp_accuracy.db
python dcdft_espresso_sssp_accuracy.db
# abinit gbrv
ase-db dcdft.db project=dcdft,calculator=abinit,potentials=gbrv -i dcdft_abinit_gbrv.db
python dcdft_abinit_gbrv.db
# abinit hgh
ase-db dcdft.db project=dcdft,calculator=abinit,potentials=hgh -i dcdft_abinit_hgh.db
python dcdft_abinit_hgh.db
# abinit
ase-db dcdft.db project=dcdft,calculator=abinit, -i dcdft_abinit_hgh_sc.db
python dcdft_abinit_hgh_sc.db
# abinit jth
ase-db dcdft.db project=dcdft,calculator=abinit,potentials=jth -i dcdft_abinit_jth.db
python dcdft_abinit_jth.db
# abinit paw
ase-db dcdft.db project=dcdft,calculator=abinit,potentials=gpaw -i dcdft_abinit_paw09.db
python dcdft_abinit_paw09.db
# gpaw paw grid spacing 0.10 Angstrom, number of grid points fixed
ase-db dcdft.db project=dcdft,calculator=gpaw,mode=fd,e=0.10,potentials_version=09 -i dcdft_gpaw_fd10_paw09.db
python dcdft_gpaw_fd10_paw09.db
# gpaw paw grid spacing 0.08 Angstrom, number of grid points fixed
ase-db dcdft.db project=dcdft,calculator=gpaw,mode=fd,e=0.08,potentials_version=09 -i dcdft_gpaw_fd_paw09.db
python dcdft_gpaw_fd_paw09.db
# gpaw paw planewave cutoff 100 Rydberg, number of grid points and planewaves variable
ase-db dcdft.db project=dcdft,calculator=gpaw,mode=pw,e=1361.0,constant_basis=0,potentials_version=09 -i dcdft_gpaw_pw_variable_paw09.db
python dcdft_gpaw_pw_variable_paw09.db
# gpaw paw planewave cutoff 100 Rydberg, number of grid points and planewaves fixed
ase-db dcdft.db project=dcdft,calculator=gpaw,mode=pw,e=1361.0,constant_basis=1,potentials_version=09 -i dcdft_gpaw_pw_paw09.db
python dcdft_gpaw_pw_paw09.db

A typical example of analysing data could be a verification of the results stored against the database.

cd /tmp
svn co ase
cd ase
PYTHONPATH=.:$PYTHONPATH PATH=tools:$PATH ase-db dcdft.db calculator=aims,basis=tight,relativistic=scalar -i dcdft_aims_tight.db
python dcdft_aims_tight.db
unzip -p  history.tar.gz > history.tar.gz
tar zxf history.tar.gz
sed '1,/with tight/d;/with light/,$d'  history/AIMS-history.txt > web.txt
diff -w web.txt dcdft_aims_tight.db_raw.txt

Running the calculations again

Selected scripts used to obtain the results are available at