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

Next revision
Previous revision
Next revisionBoth sides next revision
utilities [2013/02/28 13:31] – created danielutilities [2013/08/21 15:03] daniel
Line 1: Line 1:
-{{TOC_right}} +~~NOTOC~~ 
-The potfit/util directory contains a number of utility programs for the preparation of ''potfit'' input files and the postprocessing of ''potfit'' output files.+====== Utilities ====== 
 +---- 
 +The potfit/util directory contains a number of utility programs for the preparation of //potfit// input files and the postprocessing of //potfit// output files.
  
-;[[#force2poscar|force2poscar]] +[[#force2imd|force2imd]]\\ 
-:Converts force files (IMD output) to vasp POSCAR files. + Convert a potfit configuration into an IMD checkpoint 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 all configurations in a configuration file+
-;[[#potfit_setup|potfit_setup]] +
-:Creates a parameter file for ''potfit'' from scratch. +
-;[[Utilities/Awk_scripts|awk scripts]] +
-:A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting,... +
-;[[#potscale|potscale]] +
-:Performs gauge transformations of ''potfit'' EAM potentials.+
  
-=== force2poscar ===+[[#force2poscar|force2poscar]]\\ 
 + Convert a potfit configuration into a VASP POSCAR file.
  
-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/ VASPinput file POSCAR.+[[#list_config|list_config]]\\ 
 + Prints a brief list of all configurations in a potfit config file.
  
-Compilation: <tt>make force2poscar [-DSTRESS]</tt>+[[#makeapot|makeapot]]\\ 
 + Create an analytic potential file for potift.
  
-Usage:  +[[#plotapot|plotapot]]\\ 
- force2poscar input.force+ Plot an analytic potfit potential using gnuplot. 
 +  
 +[[#potfit_setup|potfit_setup]]\\ 
 + Creates a parameter file for //potfit// from scratch. 
 + 
 +[[#vasp2force|vasp2force]]\\ 
 + Converts vasp output (POSCAR, OUTCAR) to reference configuration data. 
 + 
 +[[Utilities/old|awk scripts]]\\ 
 +A series of awk scripts to handle various tasks with potential files, like combining, appending, creating from analytical functions, generating from scratch, plotting,... 
 + 
 +---- 
 + 
 + 
 +====  force2imd  ==== 
 + 
 +Converts a potfit configuration into an [[http://imd.itap.physik.uni-stuttgart.de/|IMD]] checkpoint file. 
 + 
 +<code> 
 +usage: force2imd [-h] [-n NUMBER] filename 
 + 
 +Convert a potfit configuration into an IMD checkpoint 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> 
 + 
 +The IMD checkpoint file is written to standard output. 
 + 
 +====  force2poscar  ==== 
 + 
 +Convert a potfit configuration into a [[http://cms.mpi.univie.ac.at/vasp/|VASP]] POSCAR file. 
 + 
 +<code> 
 +usage: force2poscar [-h] [-n NUMBER] filename 
 + 
 +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> 
 + 
 +The VASP POSCAR data is written to standard output. 
 + 
 +====  list_config  ==== 
 + 
 +Prints a brief list of all configurations in a potfit config file. 
 + 
 +<code> 
 +usage: list_config [-h] filename 
 + 
 +Prints a brief list of all configurations in a potfit config file. 
 + 
 +positional arguments: 
 +  filename    name of the potfit config file 
 + 
 +optional arguments: 
 +  -h, --help  show this help message and exit 
 +</code>
  
-The information is always written to a file called POSCAR residing in the local directoryUse compile option -DSTRESS if your force file includes stress tensor information.+Scans //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.
  
-=== vasp2force ===+====  vasp2force  ====
  
-Converts [http://cms.mpi.univie.ac.at/vasp/ VASP] output to force files.+Converts [[http://cms.mpi.univie.ac.at/vasp/|VASP]] output to force files.
  
-Compilation: <tt>make vasp2force</tt>+Compilation: ''make vasp2force''
  
 Usage:  Usage: 
- vasp2force [-c list] [-e file] [-f] [-l] [-r] [-s list] <OUTCAR files>+  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). 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).
-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.:+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.:
  
- # Al      Co        Ni +<code> 
- -0.000219 -0.993872 -0.855835+# Al      Co        Ni 
 +-0.000219 -0.993872 -0.855835 
 +</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.+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.
  
 Options: Options:
  
-<tt>-c <list></tt> +<code> 
-:list of chemical species to use (e.g. "vasp2force -c Al=0,Mn=1,Pd=2"). This will force all atom types in all configurations to be consistent. + -c <list>              list of chemical species to use 
-<tt>-e <file></tt> +                        (eg. "vasp2force.sh -c Al=0,Mn=1,Pd=2"
-:Specify file to read single atom energies fromif not found, "0" will be used for every atom type. + -e <file>              specify file to read single atom energies from 
-<tt>-f</tt> +                        if not found, "0" will be used for every atom type 
-:Uses only final configuration of multiple ionic steps. + -f                     only use the final configuration from OUTCAR 
-<tt>-l</tt> + -l                     list all chemical species found in OUTCAR and exit 
-:List all chemical species found in OUTCAR and exit. + -r                     scan recursively for OUTCAR files 
-<tt>-r</tt> + -s <list>              comma separated list of configurations to use 
-:Scan recursively for OUTCAR files in every subdirectory. + -w <weight           change weight for all configurations to <weight> 
-<tt>-s list</tt> +</code>
-:List is a comma separated list of ionic steps to use, e.g. "1,4,7,9". The sequence of the force data is always the same as in the OUTCAR file, independent of the sequence given in the list. Every configuration mentioned appears exactly once. +
-<tt>-w weight</tt> +
-:Assign this weight to all configurations.+
  
-=== pottrans ===+====  pottrans  ====
  
 Converts betweeen various potential models. Converts betweeen various potential models.
  
-Compilation:  <tt>make pottrans</tt>+Compilation:  ''make pottrans''
  
 Usage: Usage:
- pottrans <paramfile>+  pottrans <paramfile>
  
 required parameters in paramfile (here with example values) required parameters in paramfile (here with example values)
  
-<code><pre>+<code>
 ntypes               # number of atom types ntypes               # number of atom types
 ncols      3           # number of output potentials ncols      3           # number of output potentials
Line 83: Line 145:
 core_potential_file    phi.pot   # pair potential for EAM potentials core_potential_file    phi.pot   # pair potential for EAM potentials
  
-#optional parameters+# optional parameters
  
 reorder     0 1        # permutes order of potentials in final file, reorder     0 1        # permutes order of potentials in final file,
                        # ntypes parameters necessary                        # ntypes parameters necessary
 r_start   1.8 1.8 1.8  # minimal r for each column in output potential r_start   1.8 1.8 1.8  # minimal r for each column in output potential
-</pre></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.+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 parameter file.+To convert from //potfit// to IMD use //potfit// with ''opt 0'' in the parameter file.
  
-=== list_config === 
  
-Lists all configurations in a config file.+====  potfit_setup  ====
  
-Compilation:  <tt>make list_config</tt>+This utility generates a simple parameter file for //potfit//.
  
 Usage: Usage:
- list_config <config_file> +  potfit_setup [-c config file] [-p potential file] [-s prefix]
- +
-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. +
- +
-=== potfit_setup === +
- +
-This utility generates a simple parameter file for ''potfit''+
- +
-Usage: +
- potfit_setup [-c config file] [-p potential file] [-s prefix] +
- +
-<tt>-c <config file></tt> +
-:name of the configuration file +
-<tt>-p <potential file></tt> +
-:name of the potential file (for analytic potentials this can easily be created with the <tt>makeapot</tt> script from the awkscripts) +
-<tt>-s <prefix></tt> +
-:prefix for all files, overrides -c and -p  +
-:the following files will be checked: <tt><prefix>.pot</tt> and <tt><prefix>.config</tt> if they are not found, -c and -p will be read +
- +
-=== awk scripts === +
- +
-The awk scripts are listed on a [[Utilities/Awk_scripts|separate page]]. +
- +
-=== potscale === +
-'''<div style="color:red">Not maintained anymore !</div>''' +
- +
-potscale performs gauge transformations on EAM potentials. +
- +
-Compilation: <tt>make potscale</tt> +
- +
-Usage: +
- potscale <paramfile> +
- +
-Required parameters in paramfile: +
- +
-<code><pre> +
-ntypes # number of atom types (types vary in [0..ntypes-1])  +
-startpot # file name for starting potential (*) +
-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 +<code> 
-dummy_rho # dummy value of rho at dummy_r + -c <config file>       name of the configuration file 
-dummy_phi # vector (length ntypes) dummy values of phi_ii at dummy_r + -p <potential file>    name of the potential file 
-</pre></code>+                        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: 
 +                        <prefix>.pot and <prefix>.config 
 +                        if they are not found, -c and -p will be read 
 +</code>
  
-Prints the values of <math>\rho_0\,</math>(dummy_r) and <math>\Phi_{ii}\,</math>(dummy_r). +====  awk scripts  ====
  
-If dummy_phi is given, the potential is transformed so that <math>\rho_0</math>(dummy_r)=dummy_rho and <math>\Phi_{ii}</math>(dummy_r)=dummy_phi_ii+The awk scripts are listed on a [[utilities/Awk_scripts|separate page]].
  
-IMD potentials and potential plot files are also written.