potfit wiki

open source force-matching

User Tools

Site Tools


utilities

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
utilities [2013/03/01 09:53] danielutilities [2013/08/21 15:13] 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.
 +
 +[[#force2imd|force2imd]]\\
 + Convert a potfit configuration into an IMD checkpoint file.
  
 [[#force2poscar|force2poscar]]\\ [[#force2poscar|force2poscar]]\\
- Converts force files (IMD output) to vasp POSCAR files. + Convert a potfit configuration into a VASP POSCAR file.
- +
-[[#vasp2force|vasp2force]]\\ +
-Converts vasp output (POSCAR, OUTCAR) to reference configuration data. +
- +
-[[#pottrans|pottrans]]\\ +
-Converts various IMD and //potfit// potential formats.+
  
 [[#list_config|list_config]]\\ [[#list_config|list_config]]\\
-List all configurations in a configuration file.+ Prints a brief list of all configurations in a potfit config file.
  
 +[[#makeapot|makeapot]]\\
 + Create an analytic potential file for potift.
 +
 +[[#plotapot|plotapot]]\\
 + Plot an analytic potfit potential using gnuplot.
 + 
 [[#potfit_setup|potfit_setup]]\\ [[#potfit_setup|potfit_setup]]\\
-Creates a parameter file for //potfit// from scratch.+ Creates a parameter file for //potfit// from scratch.
  
-[[Utilities/Awk_scripts|awk scripts]]\\ +[[#vasp2force|vasp2force]]\\ 
-A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting,...+ Converts vasp output (POSCAR, OUTCAR) to reference configuration data.
  
-[[#potscale|potscale]]\\ +[[Utilities/old|awk scripts]]\\ 
-Performs gauge transformations of //potfit// EAM potentials.+A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting,...
  
 ---- ----
  
-====  force2poscar  ==== 
  
-Converts force files produced by [[http://imd.itap.physik.uni-stuttgart.de/|IMD]] and used by //potfit// to [[http://cms.mpi.univie.ac.at/vasp/|VASP]] input file POSCAR.+====  force2imd  ====
  
-Compilation: ''make force2poscar [-DSTRESS]''+Converts a potfit configuration into an [[http://imd.itap.physik.uni-stuttgart.de/|IMD]checkpoint file.
  
-Usage:  +<code> 
-  force2poscar input.force+usage: force2imd [-h] [-n NUMBER] filename
  
-The information is always written to a file called POSCAR residing in the local directory. Use compile option ''-DSTRESS'' if your force file includes stress tensor information.+Convert potfit configuration into an IMD checkpoint file.
  
-====  vasp2force  ====+positional arguments: 
 +  filename              name of the potfit config file
  
-Converts [[http://cms.mpi.univie.ac.at/vasp/|VASP]] output to force files.+optional arguments: 
 +  -h, --help            show this help message and exit 
 +  -n NUMBER, --number NUMBER 
 +                        number of the configuration to convert 
 +</code>
  
-Compilation: ''make vasp2force''+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://cms.mpi.univie.ac.at/vasp/|VASP]] POSCAR file.
-An optional file can be specified, containing the energy of single free atom calculated by [[http://cms.mpi.univie.ac.at/vasp/|VASP]] in a single line in the same order as in the OUTCAR file, e.g.:+
  
 <code> <code>
-# Al      Co        Ni +usage: force2poscar [-h] [-n NUMBER] filename 
--0.000219 -0.993872 -0.855835+ 
 +Convert a potfit configuration into a VASP POSCAR file. 
 + 
 +positional arguments: 
 +  filename              name of the potfit config file 
 + 
 +optional arguments: 
 +  -h, --help            show this help message and exit 
 +  -n NUMBER, --number NUMBER 
 +                        number of the configuration to convert
 </code> </code>
  
-Writes a force file to be used as a //potfit// reference configuration to standard output. If no options are given, force data is generated from each ionic step.+The VASP POSCAR data is written to standard output.
  
-Options:+====  list_config  ==== 
 + 
 +Prints a brief list of all configurations in a potfit config file.
  
 <code> <code>
- -c <list>              list of chemical species to use +usage: list_config [-h] filename
-                        (eg. "vasp2force.sh -c Al=0,Mn=1,Pd=2"+
- -e <file>              specify file to read single atom energies from +
-                        if not found, "0" will be used for every atom type +
- -f                     only use the final configuration from OUTCAR +
- -l                     list all chemical species found in OUTCAR and exit +
- -r                     scan recursively for OUTCAR files +
- -s <list>              comma separated list of configurations to use +
- -w <weight>            change weight for all configurations to <weight> +
-</code>+
  
-====  pottrans  ====+Prints a brief list of all configurations in a potfit config file.
  
-Converts betweeen various potential models.+positional arguments: 
 +  filename    name of the potfit config file
  
-Compilation:  ''make pottrans''+optional arguments: 
 +  -h, --help  show this help message and exit 
 +</code>
  
-Usage: +Scans a //potfit// configuration file and lists all configurations found.  
-  pottrans <paramfile>+This includes the origin (if comment is found), the starting line, number of atoms and  
 +weight of the configuration. 
 + 
 +====  makeapot  ====
  
-required parameters in paramfile (here with example values)+Generate analytic potential files for //potfit// from scratch.
  
 <code> <code>
-ntypes               # number of atom types +usage: makeapot [-h] [-n N] [-co CUTOFF] [-g] [-r] [-i TYPE] [-l] [-cp] 
-ncols      3           # number of output potentials +                [-f [FUNCTIONS [FUNCTIONS ...]]]
-infile     in.pot      # input potential file for pair potentials +
-outfile    out.pot     # output potential file +
-nsteps     20 20 20    # number of steps for the output potentials +
-atomic_e-density_file  rho.pot   # atomic density for EAM potentials +
-embedding_energy_file  embed.pot # embedding energy for EAM potentials +
-core_potential_file    phi.pot   # pair potential for EAM potentials+
  
-# optional parameters+Create an analytic potential file for potift.
  
-reorder     0 1        # permutes order of potentials in final file+optional arguments: 
-                       # ntypes parameters necessary +  -h, --help            show this help message and exit 
-r_start   1.8 1.8 1. # minimal r for each column in output potential+  -n N                  number of atoms types, runs from to N-1 
 +  -co CUTOFF--cutoff CUTOFF 
 +                        cutoff radius 
 +  -g                    use global cutoff parameter 
 +  -r, --random          randomize the starting potential 
 +  -i TYPE, --type TYPE  interaction type, e.gpair, eam, adp, ... 
 +  -l, --list            list options which are available 
 +  -cp                   enable chemical potentials (only for pair) 
 +  -f [FUNCTIONS [FUNCTIONS ...]] 
 +                        name of potential functions, either name or i*name, 
 +                        where i=1,2,3,...
 </code> </code>
  
-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 ''opt 0'' in the parameter file.+====  plotapot  ====
  
-====  list_config  ====+This utility plots an analytic potential with gnuplot.
  
-Lists all configurations in a config file.+<code> 
 +usage: plotapot [-h] [-f] [-p] [-s size] [-t terminal] 
 +                pot_file [pair_dist_file]
  
-Compilation:  ''make list_config''+Plot an analytic potfit potential using gnuplot.
  
-Usage+positional arguments
-  list_config <config_file>+  pot_file        potfit potential file 
 +  pair_dist_file  pair distribution file
  
-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.+optional arguments: 
 +  -h, --help      show this help message and exit 
 +  -f              write plotfiles for gnuplot and exit 
 +  -p              only create plots in png format but do not show them 
 +  -s size         window size of the gnuplot window (default: 640x480) 
 +  -t terminal     use this gnuplot terminal (see the 'help terminal' command 
 +                  in gnuplot for details) 
 +</code>
  
 ====  potfit_setup  ==== ====  potfit_setup  ====
Line 132: Line 158:
 </code> </code>
  
-====  awk scripts  ====+====  vasp2force  ====
  
-The awk scripts are listed on a [[utilities/Awk_scripts|separate page]].+Converts [[http://cms.mpi.univie.ac.at/vasp/|VASP]] output data into potfit reference configurations.
  
-====  potscale  ====+<code> 
 +usage: vasp2force [-h] [-c C] [-e E] [-f] [-l] [-r] [-s CONFIGS] [-w WEIGHT] 
 +                  [files [files ...]]
  
-<html><span style="color:red;font-size:150%;">Not maintained anymore !</span></html>+Converts vasp output data into potfit reference configurations.
  
-potscale performs gauge transformations on EAM potentials.+positional arguments: 
 +  files                 list of OUTCAR files (plain or gzipped)
  
-Compilation''make potscale''+optional arguments: 
 +  -h, --help            show this help message and exit 
 +  -c C                  list of chemical species to use, e.g. -c Mg=0,Zn=1 
 +  -e E                  file with single atom energies (NYI) 
 +  -f, --final           use only the final configuration from OUTCAR 
 +  -l, --list            list all chemical species and exit 
 +  -r, --recursive       scan recursively for OUTCAR files 
 +  -s CONFIGS, --configs CONFIGS 
 +                        comma separated list of configurations to use 
 +  -w WEIGHT, --weight WEIGHT 
 +                        set configuration weight for all configurations 
 +</code>
  
-Usage: +Reads information from all OUTCAR files in the current directory. <OUTCAR filesis 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). 
-  potscale <paramfile+An optional file can be specified, containing the energy of a single free atom calculated by [[http://cms.mpi.univie.ac.at/vasp/|VASP]] in a single line in the same order as in the OUTCAR file, e.g.:
- +
-Required parameters in paramfile:+
  
 <code> <code>
-ntypes number of atom types (types vary in [[0..ntypes-1]])  +Al      Co        Ni 
-startpot # file name for starting potential (*) +-0.000219 -0.993872 -0.855835
-endpot # file name for final potential (*) +
-imdpot # file name prefix for imd potential (*) +
-plotfile # file name for plotting potential (*) +
-plotpointfile # file name for plotting the sampling points (*) +
- +
-imdpotsteps # number of points in each function in imd file +
-dummy_r # Distance, where dummy_rho and dummy_phi are used (ignored) +
- +
-# optional options +
-dummy_rho # dummy value of rho at dummy_r +
-dummy_phi # vector (length ntypes) dummy values of phi_ii at dummy_r+
 </code> </code>
  
-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, force data is generated from each ionic step.
  
-If dummy_phi is given, the potential is transformed so that $\rho_0$(dummy_r)=dummy_rho and $\Phi_{ii}$(dummy_r)=dummy_phi_ii.  
  
-IMD potentials and potential plot files are also written.+====  awk scripts  ====
  
 +The awk scripts are listed on a [[utilities/Awk_scripts|separate page]].