potfit wiki

open source force-matching

User Tools

Site Tools


utilities_awk_scripts

Differences

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

Link to this comparison view

Next revision
Previous revision
utilities_awk_scripts [2013/03/01 09:36] – created danielutilities_awk_scripts [2018/01/06 10:44] (current) – removed daniel
Line 1: Line 1:
-~~NOTOC~~ 
-====== Utilities / Awk scripts ====== 
----- 
- 
-There are several awk scripts to help with tasks concerning potential files. 
- 
-Compilation: ''make awkscripts'' 
- 
-Note: This command has to be run in the /util directory and not in the /util/awk directory! 
- 
-====  add_type.awk  ==== 
- 
-add_type adds potentials for another atom type to an existing EAM potential. 
- 
-Usage: 
-  add_type.awk orig_eam.pt add_eam.pt cross_pair1.pt ... 
- 
-''add_type.awk needs'' the following arguments: 
- 
-''orig_eam.pt'' - original EAM potential for n atom types.\\ 
-''add_eam.pt'' - EAM potential for additional atom type (3 columns).\\ 
-''cross_pair*.pt'' - old-new pair interaction potential, each 1 column. (1 file for each original atom type, n in total). 
- 
-The potentials are rearranged in the proper order. The resulting potential is written to standard output. 
- 
-====  combine_eam.awk  ==== 
- 
-combine_eam.awk combines single potentials from separate files into a single potential file. 
- 
-Usage: 
-  combine_eam.awk potential1.pt potential2.pt .... 
- 
-where ''potential1.pt'' ... are files containing a single potential. 
- 
-Combines all potentials into one single potential file written to standard output. Can be used to combine three potentials to form an EAM potential, but will combine any files containing only a single potential. 
- 
-====  genpot.awk  ==== 
- 
-genpot is an interactive AWK script that generates an interpolated representation of an analytic potential with an arbitrary number of parameters. 
- 
-Usage: 
-  genpot.awk 
- 
-genpot takes no parameters, however the parameters of the potentials are read from standard input and may of course be supplied through a pipe (one parameter on each line). The sequence of the parameters is as follows: 
- 
-''mindist'' - Minimal distance in table.\\ 
-''maxdist'' - Maximal distance in table.\\ 
-''nsamp'' - Number of sampling points.\\ 
-''type'' - Potential function to be used (s. below)\\ 
-''params'' - Space separated list of all parameters. 
- 
-genpot does not verify or validate any parameter or input value. 
- 
-Potential functions supported: 
- 
-<code> 
- f(r)=0 – Potential which is zero everywhere. 
- f(r)=a1*r-12 – Repulsive part of Lennard-Jones potential. 
- f(r)=a1*exp(-a2*r) – Exponential decay. 
- f(r)=a1*(r-a2)^2 + a3 – Parabola with vertex (a2,a3). 
-</code> 
- 
-====  lammpseam2potfit.awk  ==== 
- 
-Converts a [[http://lammps.sandia.gov|LAMMPS]] [[http://lammps.sandia.gov/doc/pair_eam.html|pair_style eam/alloy]] potential file to //potfit// format.  
- 
-Usage:  
-  lammpseam2potfit.awk <potential> 
- 
-''<potential>'' is a LAMMPS [[http://lammps.sandia.gov/doc/pair_eam.html|eam/alloy]] potential. 
-Command writes a //potfit// tabulated [[EAM]] [[Potential files#Format_3|potential (type 3)]] 
-to standard output. Atom types are sorted alphabetically.  
- 
-**ATTENTION: USE AT YOUR OWN RISK. VERIFY POTENTIALS, e.g. by comparing forces and energies!**   
- 
-In general, the resulting potential will have way too many sampling points to be used in a //potfit// optimization and needs to be downsampled considerably. However, the main purpose of this utility is to convert a LAMMPS potential (sampling points equidistant in //r//) to [[http://imd.itap.physik.uni-stuttgart.de/|IMD]] format (sampling points equidistant in //r<sup>2</sup>//) by using //potfit// potentials type 3 as an intermediate stage. A //potfit// run with ''opt=0'' can be used to convert the potential to [[IMD]] format, controlled  by the [[IMD|imd_file]] and ''imdpotsteps'' parameters. 
- 
-====  makeapot  ==== 
- 
-Generate analytic potential files for //potfit// from scratch. 
- 
-Usage: 
-  makeapot [[-h]] [[-r]] [[-cp]] [[-n|x identifier]] 
- 
-''-h'' - Apply global parameter h for cutoff function\\ 
-''-r'' - Use random starting values instead of fixed ones\\ 
-''-cp'' - Enable chemical potentials\\ 
-''-n x y'' - Write x times the potential of type y 
- 
-You can use more than one ''-n'' command. The type is the same as the identifier for the analytic potentials. 
- 
-The command 
- 
-  makeapot -n 6 eopp_sc -n 3 csw_sc -n 3 pohlong 
- 
-will generate a potential file with 6 eopp_sc, 3 csw_sc and 3 pohlong potentials and write it to the standard output. 
- 
-====  plotapot  ==== 
- 
-This utility plots an analytic potential with gnuplot. 
- 
-Usage: 
-  plotapot <potential file> <radial distribution file> 
- 
-There are no options, you have to give the potential file, the radial distribution file is optional. 
  
utilities_awk_scripts.1362126965.txt.gz · Last modified: 2013/03/01 09:36 by daniel