pikashu -list <listfile> [<formats>]
or
pikashu -l <listfile> [<formats>]
In this mode, pikashu
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. The <listfile> is a text file that must comply to the following format:
all <format>
, makes this <format> the default one for the conversion of all lines below;<listfile>
is not found, then the program outputs a warning and goes on with the following files.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 specified in several ways (also check the list of supported formats):
<listfile>
with the all <format>
statement; that will convert all the files to the specified <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).
Here is an example of a list file:
------------------------
# This is a comment
------------------------
# The following will activate output to CFG for all following files
all cfg
# A list of files to convert
# Note that input files can have various formats
firstfile.gin
secondfile.xsf
thirdfile.xyz
# In addition to CFG, the following file will be converted to XSF
fourthfile.grs xsf
A quick and simple way to build a file list is to use the Unix/Linux commands. For instance, ls * >list.lst
will store all the file names of the current directory into the file list.lst
. Another example would be to use ls *xyz >list.lst
to obtain a list of all the XYZ files of the current directory. Your imagination is the only limit.
Note that you can use the List mode in combination with one or several options. These options will then be applied to all the files converted.
pikashu -list filelist.lst
This will convert all the files which names are specified in filelist.lst
. The output format is assumed to be specified in thefilelist.lst
(by the all <format>
statement for example).
pikashu -list filelist.lst xyz cfg
This will convert all the files which names are specified in filelist.lst
, into XYZ and CFG formats.
pikashu cfg -list filelist.lst xyz
Same as previous example. Note that the -list filelist.lst
statement cannot be broken; however output file formats can be specified before or after it.