This program adds additional information to the model database table. The following functions in this file fill the indicated columns in the model table. The columns must have been created previously by the fillDbVasp.py function createTable.
Function | Column | Notes |
---|---|---|
addChemform | formula | Standard chemical formula: "H2 O". |
addChemform | sortedformula | Chemical formula: "H2 O", with atoms sorted in alphabetic order. |
addChemForm | chemtext | Structured formula, easier for parsing. Every token is surrounded by spaces, and single occurance atoms have the explicit “1” count: " H 2 O 1 ". |
addMinenergy | minenergyid | == mident having min energyperatom for this formula and finalspacegroupnum. |
Command line parameters:
Parameter | Type | Description |
---|---|---|
-bugLev | integer | Debug level. Normally 0. |
-useCommit | boolean | false/true: do we commit changes to the DB. |
-inSpec | string | JSON file containing DB parameters. See below. |
inSpec File Parameters:
Parameter | Description |
---|---|
dbhost | Database hostname. |
dbport | Database port number. |
dbuser | Database user name. |
dbpswd | Database password. |
dbname | Database database name. |
dbschema | Database schema name. |
dbtablemodel | Database name of the “model” table. |
inSpec file example::
{
"dbhost" : "scctest",
"dbport" : "6432",
"dbuser" : "x",
"dbpswd" : "x",
"dbname" : "cidlada",
"dbschema" : "satom",
"dbtablemodel" : "model"
}
Adds additional information to the model database table.
See documentation for the main() function.
Parameters:
bugLev (int): Debug level. Normally 0.
useCommit (bool): do we commit changes to the DB.
See description at main().
Returns
Calculates the min energyperatom for each formula.
minenergyid == the mident of the row having the min energyperatom for this formula.
Parameters:
Calculates the enthalpy of formation per atom, for all structures.
Parameters:
Calculates the enthalpy of formation per atom, for a single structure.
Parameters (using example magnetitie, Fe3 O4):
mident (int): The unique DB identifier.
typenames (str[]): List of unique type names, ex. [‘Fe’, ‘O’]
typenums (int[]): Number of each unique type, ex. [3, 4]
[‘PAW_PBE Fe 06Sep2000’, ‘PAW_PBE O_s 07Sep2000’]
energy (float): final total energy without entropy, per atom in cell
Returns
See: DOI: 10.1103/PhysRevB.85.115104
http://prb.aps.org/pdf/PRB/v85/i11/e115104 Correcting density functional theory for accurate predictions of compound enthalpies of formation: Fitted elemental-phase reference energies Vladan Stevanovic, Stephan Lany, Xiuwen Zhang, Alex Zunger
page 11, Table V: mu^{FERE}
Email from Stevanovic, Monday, August 12, 2013 5:45 PM For the enthalpy of formation calculations I will use the following example. So, if we have a ternary compound with the chemical formula A_mB_nX_l, where A, B and X represent the symbols of the elements forming the compound and if N=m+n+l the total number of atoms in the compound the enthalpy of formation can be calculated as:
dHf (eV/atom) = [Etot(eV/atom) * N - (m*musMap[‘A’] + n*musMap[‘B’] + l*musMap[‘X’] ) ] / N
where Etot(eV/atom) is the VASP total energy per atom which is currently listed in the database and musMap[‘A’], musMap[‘B’], and musMap[‘X’] you read from the attached dictionary.
This is the same as:
enthalpy = - sum_i( n_i * mus_i) / sum( n_i)
where n_i = number of element i, and mus_i = mus value for element i. We use this calculation for ALL structures, not just ternaries.