##This Readme file gives an overview on Hullq code written at BYU by Material Simulation Group (MSG).
######This readme is written by Chandramouli Nyshadham. You can mail me for any doubts you have while executing this code. ([email protected])
#####The folder in which this Readme is present should contain the following files and subfolders.
- Readme -- This is Readme file.
exe_hullq
-- This is an main executable to implement the hullq code (computes the convexhull for n-nary system).- gnuplot-plot-code -- This is a gnuplot code to generate the plot for convex hull (This code plots only ternary convexhulls, not binary).
hullq1.8
-- This is the c++ executable part of hullq code (We will discuss about it in detail later).qhull
-- This is executable file adapted from the code at qhull.org.- test_inp -- This is test input for you to learn and see how the code runs
getDataFromAFLOWLIB
-- This is a bash script file which collects only binary and ternary data of any alloy from AFLOWLIB. The Computer needs internet connection to execute this file.- hullq -- This is the folder containg all C++ source code which generates the hullq executable code in point 4.
###Let us first execute the code and get a feel for it. ###What we need ??
We need the following files:
exe_hullq
- gnuplot-plot-code
hullq1.8
qhull
getDataFromAFLOWLIB
- test_inp
Place all those files in the folder where you want all the calculations to be done.(Remember this code is specially designed for plotting convexhulls of ternary systems).
-
This code needs input in the format of ternary system as the folders are written in AFLOWLIB. ex: AlCoW_pv
-
we need to give W_pv not just W (Tungsten). So You need to know what sub shells are considered.
p
ors
for an element when AFLOW is picking them up from VASP POTCAR files.
Go ahead and write down an input in test_inp file: ex: AlCoW_pv , and save it (I have already written the example input in test_inp file).
Note: Make sure that the hullq1.8
and qhull
are executable on your computer, otherwise the code won't run. In case if your compiler is not able to execute the files, you need to make your own executables. Do it the following way:
-
Go to ~/hullq/hullq/HULLQ1.8/ folder and compile the c++ code with your g++ compiler. Here is the command in case you need
g++ -std=c++11 -o hullq1.8 *.cpp
-
Copy the
hullq1.8
into the main hulq folder. -
To get the qhull executable, go to: http://www.qhull.org/download/ and download the qhull code for unix and compile it as per their guidelines to get the
qhull
executable. -
Copy the
qhull
executable to the main folder. -
You are all set.
Execute exe_hullq: ./exe_hullq
(See if the bash is executable or do chmod +x exe_hullq
and then execute it)
Wait for 3-4 minutes. Make sure your internet connection is good. It takes time for the code to collect data from AFLOWLIB. There are so many structures there.
Neglect any errors such as Unary operator expected.. There is nothing wrong with the code. It just says some labels in AFLOWLIB does not have any data.
Once the executable finishes. Type in ls
.
You should see a folder with the name AlCoW_pv .. Go ahead do : cd AlCoW_pv
.
You should see the following files inside the folder...
- AP_AlCoW_pv.out
- AlCoW_pv.in
- getDataFromAflowlib.txt
- phaseDig_AlCoW_pv.pdf
- species_tmp1
- triPoints
- ErrorLog
- AlCoW_pv.out
- gnu_AlCoW_pv.out
- plot
- stdin
- M_AlCoW_pv.out
- normals.in
- polyinGNU
- terminalOut
You should be able to open the file phaseDig_AlCoW_pv.pdf and see the plot for convexhull. Good Job!!
###Now, Let us know what each file is all about.
-
AP_AlCoW_pv.out -- This has all the points (concentration space coordinates for different structures). For ternary system, the first coloumn is Concentration of Element A, second coloumn is concentration of element B and the third coloumn is formation enthalpy.
-
AlCoW_pv.in -- This is the input file for hullq1.7 code (C++ code). This file is generated by the executable 'getDataFromAFLOWLIB'. This file has all the info collected from AFLOWLIB.
-
getDataFromAflowlib.txt -- This just contains the system which 'getDataFromAFLOWLIB' used to get info for future reference (I had it for my own reasons. You can delete it if you want.)
-
phaseDig_AlCoW_pv.pdf : No explanation needed.
-
species_tmp1 : This has the species information in it.
-
triPoints : This is for gnuplot code. For plotting the convex hull triangle.
-
ErrorLog -- While getting data from AFLOWLIB, we have discarded the following keys (protos)
- Pure elements existing in binary and ternary library.
- Structures which do not have any info regarding enthalpy of formation.
-
AlCoW_pv.out -- This is the output file generated by hullq1.7 code with distance of each structure to convex hull. (Self explanatory. Just open and check it).
-
gnu_AlCoW_pv.out -- This file contains the vertices of convex hull. This file is input for gnuplot code to plot the convex hull.
-
plot : gnuplot code for plotting. You can change it as you want for better plots.
-
stdin --This is the input file for qhull code generated by
hullq1.7
. The file is written as per qhull code input requirements (standards).. If you want to know more about it refer qhull code manual in qhull.org -
M_AlCoW_pv.out -- This is input for mathematica. You can copy the contents in this file to mathematica and plot it for seeing the convex hull.
-
normals.in -- Contains the coefficients for planes of convexhull. Generated from qhull code.
-
polyinGNU -- This is the polygon coordinates for gnuplot code.
-
terminalOut -- It has the terminal output of
hullq1.7
executable code. All the errors which occurred while executing thehullq1.7
code are witten to this file so that we can check this file later for references.
Good!! Hope you executed the code successfully without any difficulties. Now if you are curious about how the code runs you can check the executable bash files and the hullq folder. Most of the code is commented.
Good Luck. !!