~~NOTOC~~ ====== Configurations ====== ---- The atomic configurations used for fitting are read from the configuration file which is specified in the parameter file. The format of the configuration is very simple and explained below. There is a [[utilities:vasp2force|command line tool]] to generate configuration files from [[https://www.vasp.at/|VASP]] output. ==== Configuration Files ==== A //potfit// configuration file is a plain text file, consisting of a [[#Header|header]] and a [[#Body|body]], both of which are described below. ===== Header ===== The header consists of at least six lines starting with the number sign # and has the following format: #N natoms useforce #C type_0 type_1 type_2 ... #X boxx.x boxx.y boxx.z #Y boxy.x boxy.y boxy.z #Z boxz.x boxz.y boxz.z #B_S x y z r #B_O x y z #B_A x y z #B_B x y z #B_C x y z #W weight #E coh_eng #S stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz #F The lines starting with ''#N'', ''#X'', ''#Y'', ''#Z'', ''#E'' and ''#F'' are mandatory, while the lines starting with ''#C'', ''#W'', ''#B'' and ''#S'' are optional. All other lines are ignored. ''#N'' must head the first line specifying the number of atoms in the configuration and an integer flag to control whether to use or to ignore force and stress information in this configuration. ''#F'' signifies the last header line. All parameters except the //type_i// are numbers and have the following meaning: **natoms**\\    number of atoms in configuration **useforce**\\    if 0, forces from this configuration are ignored **boxi.j**\\    component j of box vector i **weight**\\    all contributions to the error sum from this configuration will be multiplied with this weight **coh_eng**\\    cohesive energy per atom **stress_ij**\\    components of stress tensor Lines beginning with ''#B'' describe the [[bocp|Box of Contributing Particles]] and are optional. The ''#C'' line contains information about the chemical elements and the corresponding atom types contained in this configuration. The elements are assigned to the corresponding atom types and have to be consistent throughout the configuration file. **Please note:** In all directions the sample should have a size of at least the potential cutoff distance. This distance is measured perpendicular to the corresponding face. If this is not the case, additional periodic copies of the configuration will be used for the simulation. === Deprecated header format === This "old" format is still read by //potfit//. Here, the header consists of six lines and has the following format: natoms boxx.x boxx.y boxx.z boxy.x boxy.y boxy.z boxz.x boxz.y boxz.z coh_eng stress_xx stress_yy stress_zz stress_yz stress_zx stress_xy The parameters have the same meaning as in the new header. The parameter useforce is assumed to be 1, i.e. the forces are used as reference data. ===== Body ===== Following the header, there is one line for each atom. The format of each line looks like this: type x y z f_x f_y f_z These items stand for: **type**\\    type of the atom; must be in the range [0,...,ntypes-1] **x, y, z**\\    absolute coordinates of the atom **f_x, f_y, f_z**\\    net force components on the atom Please note that the forces **cannot** be omitted, even when they are ignored. === Boundary Conditions === //potfit// uses **periodic boundary conditions**. If a particle coordinate is not within the simulation box, it is mapped back into the simulation box. ===== Multiple Configurations ===== Multiple configuration files can just be concatenated. //potfit// continues reading from a reference file until it reaches the end of file. Should this not coincide with the end of a single configuration, an error will result.