Back to main menu
Program behaviour: setting up a configuration file
Syntax
none
Description
The default behaviour of Atomsk can be changed by setting up a configuration file.
When running on UNIX/Linux systems, the behaviour of the program can be set in a system-wide configuration file /etc/atomsk.conf
. Each user can also customize the behaviour of the program by setting up his own personal configuration file, which must be placed in the user's configuration directory (defined by the environment variable $XDG_CONFIG_HOME
or, if the latter is not defined, defined to be the hidden directory $HOME/.config/
) and named atomsk.conf
. Finally, a configuration file named atomsk.conf
may also exist in the current directory.
When running on Microsoft® Windows® environments, each user can customize the behaviour of the program by setting up a personal configuration file, which must be placed in the user's personal directory (defined by the %HOMEPATH%
environment variable) and named atomsk.ini
(text file). Finally, a configuration file named atomsk.ini
may also exist in the current directory
This configuration file has a pretty simple format. Empty lines and lines starting with the hash symbol (#) are ignored, and the following keywords can be used:
- format <format>: indicates a format that Atomsk must always activate for output; several formats can be indicated by using this keyword several times (one line per keyword);
- ignore <value>: if <value> is YES then conversion is skipped if output files already exist, otherwise Atomsk will ask; identical to the command-line option
-ignore
;
- overw <value>: if <value> is YES then existing files are always overwritten, otherwise Atomsk will ask; identical to the command-line option
-overw
;
- nthreads <n>: limits the maximum of OpenMP threads used by Atomsk to <n>; identical to the command-line option
-nthreads
;
- verbosity <n>: set the verbosity level to <n> ; identical to the command-line option
-verbosity
;
- lang <language>: set the language of the program to <language> ; identical to the command-line option
-lang
;
- colour <value>: if <value> is YES then Atomsk will display some messages in colour (not available on Microsoft® Windows® environments).
- colour_default <colour>: if option "colour" above was enabled, then the given <colour> will be used by default for all messages. The <colour> can be "black", "red", "green", "yellow", "blue", "magenta", "cyan", "grey", or "white". Additional attributes can be appended, like "bold", "italic", "underline", and/or "blink".
- colour_warning <colour>: if option "colour" above was enabled, then the given <colour> will be used by default for warning messages.
- colour_error <colour>: if option "colour" above was enabled, then the given <colour> will be used by default for error messages.
- progressbar <style>: customizes the style of progress bars. The <style> can be one of: "barrier", "bounce", "clock", "dots", "face", "inflate", "jump", "linear", "newton", "pacman", "rotate", "snail", "tunnel", "wave", "wheel", or "none". With the last one ("none"), no progress bar or percentage is displayed at all. With any other (invalid) <style>, only the percentage is displayed. If this keyword is not used, then by default progress bars are displayed with the style "linear".
Default
By default, no output format is active. The language is the one used by the operating system, or defaults to English. Atomsk does not ignore nor overwrite files, but prompts the user what to do. The number of threads is the one set by the operating system's environment variable OMP_NUM_THREADS, or takes the maximum value by default. Coloured messages are disabled. Progress bars are displayed with the style "linear".
These default parameters are successively replaced (overwritten) by those defined in:
- /etc/atomsk.conf
- ${HOME}/.config/atomsk.conf
- ./atomsk.conf
- command-line arguments
Example
~/.config/atomsk.conf
# This is a comment
# Always output to xsf and cfg
format xsf
format cfg
# If output files already exist,
# don't ask, just ignore them
overw no
ignore yes
# Always run in silent mode
verbosity 0
# Enable colours
colour yes
colour_error red bold blink
Back to main menu