utilities
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
utilities [2013/03/01 09:29] – daniel | utilities [2013/08/29 11:22] – daniel | ||
---|---|---|---|
Line 3: | Line 3: | ||
---- | ---- | ||
The potfit/util directory contains a number of utility programs for the preparation of //potfit// input files and the postprocessing of //potfit// output files. | The potfit/util directory contains a number of utility programs for the preparation of //potfit// input files and the postprocessing of //potfit// output files. | ||
+ | |||
+ | [[# | ||
+ | | ||
[[# | [[# | ||
- | Converts force files (IMD output) to vasp POSCAR | + | Convert a potfit configuration into a VASP POSCAR |
- | + | ||
- | [[# | + | |
- | Converts vasp output (POSCAR, OUTCAR) to reference configuration data. | + | |
- | + | ||
- | [[# | + | |
- | Converts various IMD and //potfit// potential formats. | + | |
[[# | [[# | ||
- | List all configurations in a configuration | + | |
+ | [[# | ||
+ | | ||
+ | |||
+ | [[# | ||
+ | Plot an analytic potfit potential using gnuplot. | ||
+ | |||
[[# | [[# | ||
- | Creates a parameter file for //potfit// from scratch. | + | Creates a parameter file for //potfit// from scratch. |
+ | |||
+ | [[# | ||
+ | | ||
- | [[Utilities/ | + | [[Utilities/ |
A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting, | A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting, | ||
- | [[# | + | ---- |
- | Performs gauge transformations of //potfit// EAM potentials. | + | |
- | ==== force2poscar | ||
- | Converts force files produced by [[http:// | + | ==== force2imd |
- | Compilation: | + | Converts a potfit configuration into an [[http:// |
- | Usage: | + | < |
- | | + | usage: force2imd [-h] [-n NUMBER] filename |
- | The information is always written to a file called POSCAR residing in the local directory. Use compile option '' | + | Convert |
- | ==== vasp2force | + | positional arguments: |
+ | filename | ||
- | Converts [[http:// | + | optional arguments: |
+ | -h, --help | ||
+ | -n NUMBER, --number NUMBER | ||
+ | number of the configuration to convert | ||
+ | </code> | ||
- | Compilation: | + | The IMD checkpoint file is written to standard output. |
- | Usage: | + | ==== force2poscar |
- | vasp2force [-c list] [-e file] [-f] [-l] [-r] [-s list] <OUTCAR files> | + | |
- | Reads information from all OUTCAR files in the current directory. <OUTCAR files> is an optional list of files, if not given all files matching OUTCAR* will be scanned (it is possible to read gzipped files ending with .gz). | + | Convert a potfit configuration into a [[http:// |
- | An optional file can be specified, containing the energy of a single free atom calculated by [[http:// | + | |
< | < | ||
- | # Al Co Ni | + | usage: force2poscar [-h] [-n NUMBER] filename |
- | -0.000219 | + | |
+ | Convert a potfit configuration into a VASP POSCAR file. | ||
+ | |||
+ | positional arguments: | ||
+ | filename | ||
+ | |||
+ | optional arguments: | ||
+ | | ||
+ | -n NUMBER, --number NUMBER | ||
+ | number of the configuration to convert | ||
</ | </ | ||
- | Writes a force file to be used as a //potfit// reference configuration | + | The VASP POSCAR data is written |
- | Options: | + | ==== list_config |
+ | |||
+ | Prints a brief list of all configurations in a potfit config file. | ||
< | < | ||
- | -c < | + | usage: list_config [-h] filename |
- | (eg. " | + | |
- | -e < | + | |
- | if not found, " | + | |
- | | + | |
- | | + | |
- | | + | |
- | -s < | + | |
- | -w < | + | |
- | </ | + | |
- | ==== pottrans | + | Prints a brief list of all configurations in a potfit config file. |
- | Converts betweeen various potential models. | + | positional arguments: |
+ | filename | ||
- | Compilation: | + | optional arguments: |
+ | -h, --help | ||
+ | </ | ||
- | Usage: | + | Scans a //potfit// configuration file and lists all configurations found. |
- | | + | This includes the origin (if comment is found), the starting line, number of atoms and |
+ | weight of the configuration. | ||
- | required parameters in paramfile (here with example values) | + | ==== makeapot |
+ | |||
+ | Generate analytic potential files for //potfit// from scratch. | ||
< | < | ||
- | ntypes | + | usage: makeapot [-h] [-n N] [-co CUTOFF] [-g] [-r] [-i TYPE] [-l] [-cp] |
- | ncols 3 # number of output potentials | + | [-f [FUNCTIONS [FUNCTIONS |
- | infile | + | |
- | outfile | + | |
- | nsteps | + | |
- | atomic_e-density_file | + | |
- | embedding_energy_file | + | |
- | core_potential_file | + | |
- | # optional parameters | + | Create an analytic potential file for potift. |
- | reorder | + | optional arguments: |
- | # ntypes parameters necessary | + | -h, --help |
- | r_start | + | -n N number of atoms types, runs from 0 to N-1 |
+ | -co CUTOFF, --cutoff CUTOFF | ||
+ | | ||
+ | | ||
+ | -r, --random | ||
+ | -i TYPE, --type TYPE interaction type, e.g. pair, eam, adp, ... | ||
+ | -l, --list | ||
+ | -cp | ||
+ | -f [FUNCTIONS [FUNCTIONS ...]] | ||
+ | name of potential | ||
+ | where i=1,2,3,... | ||
</ | </ | ||
- | in.pot is converted to out.pot. in.pot can be of IMD potential format 1 or 2, out.pot is of //potfit// potential format. For EAM potentials, specify the appropriate number of columns in ncols and the required IMD format potential files. The order of the different atom types can be changed with the reorder parameter by specifying the desired sequence. | ||
- | To convert from //potfit// to IMD use //potfit// with '' | + | ==== plotapot |
- | ==== list_config | + | This utility plots an analytic potential with gnuplot. |
- | Lists all configurations in a config file. | + | < |
+ | usage: plotapot [-h] [-f] [-p] [-s size] [-t terminal] | ||
+ | pot_file [pair_dist_file] | ||
- | Compilation: | + | Plot an analytic potfit potential using gnuplot. |
- | Usage: | + | positional arguments: |
- | | + | |
+ | pair_dist_file | ||
- | Scans a //potfit// configuration file and lists all configurations found. This includes | + | optional arguments: |
+ | -h, --help | ||
+ | -f write plotfiles for gnuplot and exit | ||
+ | -p only create plots in png format but do not show them | ||
+ | -s size | ||
+ | -t terminal | ||
+ | in gnuplot for details) | ||
+ | </ | ||
==== potfit_setup | ==== potfit_setup | ||
This utility generates a simple parameter file for //potfit//. | This utility generates a simple parameter file for //potfit//. | ||
- | |||
- | Usage: | ||
- | potfit_setup [-c config file] [-p potential file] [-s prefix] | ||
< | < | ||
- | -c <config file> name of the configuration file | + | usage: potfit_setup [-h] [-c config file] [-p potential file] [-s prefix] |
- | -p <potential file> name of the potential file | + | |
- | for analytic potentials this can easily be created with | + | |
- | the makeapot script from the awkscripts | + | |
- | -s <prefix> prefix for all files, overrides -c and -p | + | |
- | the following files will be checked: | + | |
- | < | + | |
- | if they are not found, -c and -p will be read | + | |
- | </ | + | |
- | ==== awk scripts | + | Create a simple potfit parameter file from scratch. |
- | The awk scripts are listed on a [[utilities/ | + | optional arguments: |
+ | -h, --help | ||
+ | -c config file name of the potfit configuration file | ||
+ | -p potential file name of the potfit potential file | ||
+ | -s prefix | ||
- | ==== potscale | + | The prefix takes precedence over the -c and -p switches.If the < |
+ | and < | ||
+ | </ | ||
- | < | + | If the config file is given via the -c or -s option, the number of atom |
+ | types is automatically determined and adjusted in the output. | ||
+ | ==== vasp2force | ||
- | potscale performs gauge transformations on EAM potentials. | + | Converts [[http:// |
- | Compilation: '' | + | < |
+ | usage: vasp2force [-h] [-c C] [-e E] [-f] [-l] [-r] [-s CONFIGS] [-w WEIGHT] | ||
+ | [files [files ...]] | ||
- | Usage: | + | Converts vasp output data into potfit reference configurations. |
- | potscale < | + | |
- | Required parameters in paramfile: | + | positional arguments: |
+ | files list of OUTCAR files (plain or gzipped) | ||
- | < | + | optional arguments: |
- | ntypes # number | + | -h, --help |
- | startpot # | + | -c C list of chemical species to use, e.g. -c Mg=0,Zn=1 |
- | endpot # file name for final potential (*) | + | -e E |
- | imdpot # file name prefix for imd potential (*) | + | -f, --final use only the final configuration from OUTCAR |
- | plotfile # file name for plotting potential (*) | + | -l, --list |
- | plotpointfile # | + | -r, --recursive |
+ | -s CONFIGS, --configs CONFIGS | ||
+ | comma separated list of configurations to use | ||
+ | -w WEIGHT, --weight WEIGHT | ||
+ | set configuration weight | ||
+ | </ | ||
- | imdpotsteps # number | + | Reads information from all OUTCAR files in the current directory. <OUTCAR files> is an optional list of files, if not given all files matching OUTCAR* will be scanned (it is possible to read gzipped files ending with .gz). |
- | dummy_r # Distance, where dummy_rho and dummy_phi are used (ignored) | + | An optional file can be specified, containing the energy of a single free atom calculated by [[http:// |
- | # optional options | + | < |
- | dummy_rho # dummy value of rho at dummy_r | + | # Al Co Ni |
- | dummy_phi # vector (length ntypes) dummy values of phi_ii at dummy_r | + | -0.000219 -0.993872 -0.855835 |
</ | </ | ||
- | Prints the values of $\rho_0$(dummy_r) and $\Phi_{ii}$(dummy_r). | + | Writes a force file to be used as a //potfit// reference configuration to standard output. If no options are given, |
- | + | ||
- | If dummy_phi is given, | + | |
- | + | ||
- | IMD potentials and potential plot files are also written. | + |