atomsk --list <listfile> [<formats>] [options]
In this mode, Atomsk will convert a list of files. This is of course convenient when one has a lot of files to convert, typically snapshots of a molecular dynamics run.
The file <listfile> should contain a list of files to convert. A quick and simple way to build such a file is to list files in a directory and use the redirection symbol ">". For instance:
ls * > list.lst
In addition the <listfile> has the following specifications:
all <format>
activates this <format>.As a result, the minimal <listfile>
contains only one file name. A recommended, but not mandatory, extension for the <listfile>
, is .lst
.
The output format(s) can be activated in several ways (also check the list of supported formats):
<listfile>
with the statement all <format>
.<listfile>
, after the name of each file, one <format> can be specified.The output file names are automatically decided after the input file names and the active file format(s).
Note that you can use the mode --list
in combination with one or several options. These options will then be applied to all the files converted.
atomsk --list filelist.lst cfg
This will convert all the files which names are specified in filelist.lst
into the CFG format.
atomsk --list filelist.lst xyz cfg xsf
This will convert all the files which names are specified in filelist.lst
, into XYZ, CFG and XSF formats.
ls *lmc >list.lst && atomsk -L list.lst xyz cfg
This will list all LAMMPS custom files (LMC) in the current directory, and convert them to XYZ and CFG formats.