Back to main menu

Format: CSV

Name: Comma-Separated Values format

Extension: csv

Specification: no standard; recommendations at IETF web page

Visualization programs: none


A file in the Comma-Separated Values (CSV) format is a plain-text file containing values separated by commas (,), as its name suggests. Such files can be easily imported or produced in spreadsheets (like Microsoft Excel or LibreOffice Calc), and also in some Web applications.

When writing a CSV file, Atomsk writes the names of the fields in the first line (species,x,y,z, and so on), followed by lines containing values. All available informations are written in a CSV file: the atom species, coordinates (x,y,z), the shells coordinates if any, the auxiliary properties if any, the cell vectors, and the comments.

When reading CSV file, Atomsk will determine the field separator from the first line. By default, values are expected to be separated by commas (,). However, if the first line contains semicolons (;) or pipe (|) characters, then Atomsk will assume that these are the separators throughout the whole file.

Then, Atomsk will also look for keywords in the first line. If recognizable keywords are present, then they are used to determine in which column each data type is stored (atom species, x, y, z, etc.). If shells are present (in the sense of an ionic core-shell model potential), then their positions are also read. If auxiliary properties are present, they are not read (they are ignored).

If no recognizable keyword is present on the first line, then Atomsk will attempt to find numbers among the data, and interpret them as atom coordinates, assuming that each line contains data about one atom. All atoms are then considered as hydrogen atoms.

If the box vectors cannot be read from the CSV file, then Atomsk will construct a bounding box.


Back to main menu