potfit wiki

open source force-matching

User Tools

Site Tools


utilities

This is an old revision of the document!


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
Converts force files (IMD output) to vasp POSCAR files.

vasp2force
Converts vasp output (POSCAR, OUTCAR) to reference configuration data.

pottrans
Converts various IMD and potfit potential formats.

list_config
List all configurations in a configuration file.

potfit_setup
Creates a parameter file for potfit from scratch.

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
Performs gauge transformations of potfit EAM potentials.


force2poscar

Converts force files produced by IMD and used by potfit to VASP input file POSCAR.

Compilation: make force2poscar [-DSTRESS]

Usage:

force2poscar input.force

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.

vasp2force

Converts VASP output to force files.

Compilation: make vasp2force

Usage:

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). An optional file can be specified, containing the energy of a single free atom calculated by VASP in a single line in the same order as in the OUTCAR file, e.g.:

# Al      Co        Ni
-0.000219 -0.993872 -0.855835

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:

 -c <list>              list of chemical species to use
                        (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>

pottrans

Converts betweeen various potential models.

Compilation: make pottrans

Usage:

pottrans <paramfile>

required parameters in paramfile (here with example values)

ntypes     2           # number of atom types
ncols      3           # number of output potentials
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

reorder     0 1        # permutes order of potentials in final file,
                       # ntypes parameters necessary
r_start   1.8 1.8 1.8  # minimal r for each column in output potential

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.

list_config

Lists all configurations in a config file.

Compilation: make list_config

Usage:

list_config <config_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.

potfit_setup

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
 -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:
                        <prefix>.pot and <prefix>.config
                        if they are not found, -c and -p will be read

awk scripts

The awk scripts are listed on a separate page.

potscale

<span style="color:red;font-size:150%;">Not maintained anymore !</span>

potscale performs gauge transformations on EAM potentials.

Compilation: make potscale

Usage:

potscale <paramfile>

Required parameters in paramfile:

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
dummy_rho 	# dummy value of rho at dummy_r
dummy_phi	# vector (length ntypes) dummy values of phi_ii at dummy_r

Prints the values of $\rho_0$(dummy_r) and $\Phi_{ii}$(dummy_r).

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.

utilities.1362128038.txt.gz · Last modified: 2013/03/01 09:53 by daniel