IMD |
File headersData files created by IMD all contain a header. This header can be used by postprocessing programs to obtain information about the contents and the format of the file. The header consists of several lines, each starting with a # character, directly followed by a key letter which determines the contents of the header line. The key letter of the very last header line must be E, which allows to avoid reading beyond the header. This works even if the rest of the file is binary. There are two types of data files, atom files and distribution files, and so there are atom file headers and distribution file headers, whose formats we described in the following. Atom file headersAtom files contain lists of atoms, each with various properties. The format header line (key F) must specify the format of the file, and the number and type of data it contains for each atom: #F f n t m c v dwhere f is a letter and the other values are integer numbers:
For the binary formats with capital format letters (B and L), the floating point data is given in doubles, and for lower case format letters (b and l) in floats. Atom number and atom type are always given in 32bit integers. The contents line (key C) specifies a string for each data column, describing its contents, like in the following example: #C number type mass x y z vx vy vz Epot The box lines (keys X, Y, and Z) specify the dimensions of the box: #X boxx.x boxx.y boxx.z #Y boxy.x boxy.y boxy.z #Z boxz.x boxz.y boxz.zIn two dimensions the z components are absent, of course. There can be any number of comment lines (key #), like the following one: ## Generated by imd_nve on Fri Oct 11 15:05:54 1583 Finally, the very last header line must have a key E (end of header): #E Example: #F A 1 1 1 3 3 1 #C number type mass x y z vx vy vz Epot #X 20 0 0 #Y 0 20 0 #Z 0 0 20 ## Generated by imd_nve on Fri Oct 11 15:05:54 1583 #E Distribution file headersA distribution file contains data on a regular, rectangular lattice. Here, the format line (key F) must be of the form #F f dim nc ndwhere f is a letter and the other values are numbers:
The contents line (key C) specifies a string for each data column, describing its contents, like in the following two examples: #C x y z Ekin #C Ekin The dimension line (key D) specifies the dimensions of the lattice: #D nx ny [nz]For two-dimensional data sets nz is not present. The size line (key S) specifies the size of each pixel or voxel: #S sx sy [sz]For two-dimensional data sets sz is not present. There can be any number of comment lines (key #), like the following one: ## Generated by imd_nve on Fri Oct 11 15:05:54 1583 The very last header line must have the key E (end of header): #E Example: #F A 3 0 1 #C Epot #D 2 20 15 #S 0.2 0.2 0.2 ## Generated by imd_nve on Fri Oct 11 15:05:54 1583 #E |