A fast and precise DFT wavelet code

Atomic positions file format

A fast and precise DFT wavelet code
Revision as of 12:44, 11 February 2019 by Deutsch (Talk | contribs)

Jump to: navigation, search

BigDFT supports atomic files which are of two types. The first one is a particular generalisation of the traditional .xyz format and can be obtained from this via simple modifications. The second one (.ascii) is peculiar of BigDFT and V_Sim. Both formats work with the two codes.


The .xyz format

By default the atomic input coordinates are in the file posinp.xyz. All the input and output files for atomic coordinates are in the .xyz format, i.e. they can be visualized with any standard visualization package and in particular with V_Sim.

The first line contains the number of atoms and then the units, which are specified by ’atomic’, ’atomicd0’ ’bohr’ or ’bohrd0’ if atomic units are used or by ’angstroem’ or ’angstroemd0’ if the angström unit is used. ’d0’ formats (1pe24.17 in Fortran) guarantee that not a single bit is lost during write and read of the numbers.

The second line contains the boundary conditions specified by the keywords ’free’ for free boundary conditions, ’periodic’ for periodic boundary conditions or ’surface’ for surface boundary conditions where the x and z direction have periodic boundary conditions and the y direction free boundary conditions. The keywords ’periodic and ’surface’ have to be followed by 3 real numbers giving the length of the orthorhombic periodic cell. In the case of surface boundary condition the second of these numbers is ignored.

The following lines contain the name of the chemical element followed by the 3 Cartesian coordinates. The 3 Cartesian coordinates can be followed by optional additional information.

Here is a simple example of an isolated water molecule:

3  angstroem
O   0.000000    0.000000   -0.065587 
H   0.000000   -0.757136    0.520545
H   0.000000    0.757136    0.520545

and an example for a periodic Ag bulk system:

4   angstroem           
periodic       4.08600000000000030E+00    4.08600000000000030E+00    4.08600000000000030E+00
Ag       0.00000000000000000E+00    0.00000000000000000E+00    0.00000000000000000E+00
Ag       2.04309999999999992E+00    2.04309999999999992E+00    0.00000000000000000E+00
Ag      -0.00000000000000000E+00    2.04309999999999992E+00    2.04309999999999992E+00
Ag       2.04309999999999992E+00   -0.00000000000000000E+00    2.04309999999999992E+00

In the case of spin-polarized calculation, the polarization in the region around the atom can be given by an integer. In addition the charge in the region around the atom can be specified. Finally it can be specified if the atom is fully or partially fixed during a geometry optimization. ’f’ or ’fxyz’ stands for completely frozen, ’fxz’ if the atom can only move along the y axis and ’fy’ if the atom can only move in the XZ plane. ’fx’, ’fz’, ’fxy’, ’fyz’ are also some possible choices. It also possible to specify a plane given by some positive Miller indices where the atom can move as ’f110’. Finally, it is also possible to specify two blocks of atoms (’fb1’ and ’fb2’) where only the center of mass can move. Below are some examples:

This hydrogen atom is frozen during the geometry optimization

  H  1.2  3.4  5.6   f

This hydrogen atom has a spin up polarization

  H  1.2  3.4  5.6   1

This chlorine atom has an additional electron and no spin polarization

  Cl  1.2  3.4  5.6   0  -1

Same as above, but also frozen

  Cl  1.2  3.4  5.6   0  -1   fz

For each atom, you can also add a dictionary specifying any property you like as for the Mn2 molecule:

2  atomicd0
Mn  0.0 0.0 0.00000 {IGmom: [0.0, 0.0, 1.0]}
Mn  0.0 0.0 5.19674  {IGmom: [0.0, 0.0, -1.0]}

The .ascii format

BigDFT can also use another text file format for input (and thus output) atomic positions. Here is its structure:

  • 1st line is arbitrary
  • 2nd line must contain dxx dyx dyy values
  • 3rd line must contain dzx dzy dzz values other lines may contain:
    • keywords, with the syntax [#!]keyword: followed by a list of keywords, separated by commas or blank spaces.
    • comments beginning with ’#’ or ’!’
    • x y z name [label] for atomic position and optional labels

dxx dyx dyy dzx dzy dzz values define the box that contains the atoms. The format allows non-orthogonal boxes, but BigDFT supports only orthorombic super-cells, so dyx, dzx and dzy must be zeros. When the keyword angdeg is used, the six values contains the three lengths of basis vectors in dxx dyx and dyy, and the three angles (bc, ac, ab) in dzx dzy and dzz.

After the three first mandatory lines, all subsequent lines can be comment lines (ignored), i.e. empty, containing only blanks, or beginning with ! or with #. A non comment line must contain ’x y z name’, giving the 3 coordinates and the name of the atom. The coordinates of the atoms are given in the orthonormal basis not in the box basis. In case the keyword reduced has been specified, the three coordinates x, y and z are given in the box basis.

The keywords can be positionned anywhere after the first three lines. The following list summurises all available keywords:

  • reduced: All atomic coordinates are given in reduced coordinates with respect to the box definition.
  • angdeg: The box definition contains three distances and three angles instead of the classical six projection values.
  • bohr or bohrd0: The units for the distance are Bohr.
  • angstroem or angstroemd0: The units for the distance are Angströms.
  • atomic or atomicd0: The units for the distance are Bohr.
  • periodic, surface or freeBC: The periodicity of the system is either 3D, 2D (free direction is y) or 0D.

Additional informations can be provided after the atom names, like for the .xyz format.

As for the posinp format, for each atom, you can also add a dictionary specifying any property you like.


in order to indicate different quantities as 'IGSpin' (Input Guess Spin with nspin=2) or 'IGmom' (Input Guess moment with nspin=4), it is possible to add a dictionary in yaml format at each atom as:

 2  atomicd0
Mn  0.0 0.0 0.00000 {IGmom: [0.0, 0.0, 1.0]}
Mn  0.0 0.0 5.19674  {IGmom: [0.0, 0.0, -1.0]}


Chemical elements are identified by their pseudopotential. If an element is for instance denoted by ’Si’ in the input file, the element will be described by the file ’psppar.Si’ which may be present in the working directory of the BigDFT run. A silicon atom could however also be denoted by ’Si_lda’ if there is file ’psppar.Si_lda. BigDFT supports the GTH and HGH pseudopotentials in the format which can be downloaded from the ABINIT website.

Pseudo-potentials files are not mandatory. If not present, some hard-coded values will be used. Hard-coded values are available for LDA and PBE only.

Personal tools