Piecewise Polynomial Potential Partitioning (P4) Software

Setting up a cluster expansion on an augmented lattice

This page demonstrates a simple example of setting up a cluster expansion on an augmented lattice, with a focus on practical aspects. For detailed information on the underlying thermodynamic modeling using an augmented lattice and cluster expansion, please refer to the "Piecewise Polynomial Potential Partitioning (P4)" method introduced here.

Background
The main different of a standard lattice and an augmented lattice is that the latter contains "groups" of sites. The Euclidean distance between the sites within a group is artificially close. The purpose of creating these groups is to simulate the anharmonic vibrations by the hopping of an atom among the sites within each group. Consequently, the entities occupying these sites should always consist of vacancies. Therefore, when setting up a cluster expansion (CE) on an augmented lattice, it is important to inform the CE model about the existence of these "groups". Additionally, the CE model should enforce the condition that each group of sites is occupied by one and only one atom, preventing non-physical configurations where two atoms are in very close proximity. Considering these practical aspects is crucial when setting up a cluster expansion on an augmented lattice. In the following sections, we demonstrate how to utilize the cluster expansion utilities of the ATAT toolkit (link here) and the augmented lattice output by the P4 toolkit (link here ) to establish a cluster expansion on an augmented lattice.

Consideration 1: Artificially large effective cluster interactions (ECIs)
The effective cluster interactions for clusters formed within a group of sites should be artificially set to large values instead of being fitted to energy data. Unlike other cluster interactions, which are fitted to available data such as the DFT-calculated total enthalpy of different configurations on a lattice, the clusters within a group should have artificially large interactions to discourage the occupation of more than one atom within the group. This specific setup is only required for clusters formed within a group of sites. On the other hand, clusters formed among sites from different groups should be treated in the same way as clusters formed on a standard lattice, meaning they should be fitted to available data.
In summary, the clusters formed within a group necessitate artificially large interactions to enforce the single-atom occupation within the group, while clusters formed among sites from different groups should be fitted to available data.

Consideration 2: The energy of the configuration should remain intact with the addition of artificially large ECIs
In consideration 1, we mentioned that the ECIs associated with clusters formed within a group should be manually set to artificially large values. However, it's important to clarify that this setup should not alter the total energy of physically realistic configurations that occur on the augmented lattice. Instead, it should only lead to very large energy values when two atoms occupy sites within a group. In other words, the artificially large ECIs should not impact the energy of configurations where each group is occupied by only one atom. In the following explanation, we provide detailed steps to enforce this condition by explicitly enforcing a concentration and setting up penalty ECIs for clusters in a group.

Example 1 : Setting up the cluster expansion for the ordered B2 phase of PtTi
In this paper we elaborate the application of the P4 method for the ordered B2 phase of PtTi. In the following example, we demonstrate how one can setup large ECIs for the clusters formed within a group on the augmented lattice of cubic B2 PtTi.
The augmented lattice for the cubic B2 PtTi consist of groups of close by sites where 8 corner sites surrounds each standard B2 lattice site at its center. Below is the lat.in file

1 0 0
0 1 0
0 0 1
3.15977533667 0 0
0 3.15977533667 0
0 0 3.15977533667
0.000000 0.000000 0.000000 Vac,Ti
-0.246462 -0.246462 -0.246462 Vac,Ti
-0.246462 -0.246462 0.246462 Vac,Ti
-0.246462 0.246462 -0.246462 Vac,Ti
-0.246462 0.246462 0.246462 Vac,Ti
0.246462 -0.246462 -0.246462 Vac,Ti
0.246462 -0.246462 0.246462 Vac,Ti
0.246462 0.246462 -0.246462 Vac,Ti
0.246462 0.246462 0.246462 Vac,Ti
1.579891 1.579891 1.579891 Vac,Pt
1.333428 1.333428 1.333428 Vac,Pt
1.333428 1.333428 1.826353 Vac,Pt
1.333428 1.826353 1.333428 Vac,Pt
1.333428 1.826353 1.826353 Vac,Pt
1.826353 1.333428 1.333428 Vac,Pt
1.826353 1.333428 1.826353 Vac,Pt
1.826353 1.826353 1.333428 Vac,Pt
1.826353 1.826353 1.826353 Vac,Pt
The bold lines indicate the standard B2 sites and other lines show the augmented sites added to the B2 lattice sites. See the manual page of auglat in the P4 toolkit to learn how to create an augmented lattice.

To create the short pairs (or two-body clusters) that form within a group of sites, use the following command
corrdump -clus -2=1
Note that the value set for -2 should be larger than the diagonal formed between the corner sites in each group. In this case, it should be larger than the distance between (-0.246462 -0.246462 -0.246462) and (0.246462 0.246462 0.246462). The cluster.out file output of the corrdump command is
1
0.00000
0

1
0.00000
1
3.15978 3.15978 3.15978 0 0

8
0.00000
1
2.91331 2.91331 2.91331 0 0

1
0.00000
1
1.57989 1.57989 1.57989 0 0

8
0.00000
1
1.33343 1.33343 1.33343 0 0

8
0.42688
2
1.82635 1.82635 1.82635 0 0
1.57989 1.57989 1.57989 0 0
8
0.42688
2
2.91331 0.24646 0.24646 0 0
3.15978 0.00000 0.00000 0 0

12
0.49292
2
0.24646 0.24646 0.24646 0 0
0.24646 0.24646 -0.24646 0 0

12
0.49292
2
1.82635 1.82635 1.82635 0 0
1.82635 1.82635 1.33343 0 0

12
0.69710
2
0.24646 0.24646 0.24646 0 0
0.24646 -0.24646 -0.24646 0 0

12
0.69710
2
1.82635 1.82635 1.82635 0 0
1.82635 1.33343 1.33343 0 0

4
0.85377
2
0.24646 0.24646 0.24646 0 0
-0.24646 -0.24646 -0.24646 0 0

4
0.85377
2
1.82635 1.82635 1.82635 0 0
1.33343 1.33343 1.33343 0 0
To learn about the format of the clusters.out file see ATAT page .
The clusters.out file indicates that there are 1 empty cluster, 1 bcc point cluster for Ti, 8 corner point cluster for Ti, 1 bcc point cluster for Pt, 8 corner point cluster for Pt. Additionally, the short pairs in each group consist of 8 half diagonal for Ti, 8 half diagonal fo Pt , 12 edge cluster for Ti, 12 edge cluster for Pt, 12 face cluster for Ti, 12 face cluster for Pt, 4 diagonal cluster for Ti, and 4 diagonal cluster for Pt.
If we label an atom (Ti or Pt) in this case as -1 and a vacancy as 1, then the correlation values associated with a random occupation of each group of site by one atom and 8 vacancies are shown below for each cluster
1 empty cluster -> 1
1 bcc point cluster for Ti -> -7/9
8 corner point cluster for Ti -> -7/9
1 bcc point cluster for Pt -> -7/9
8 corner point cluster for Pt -> -7/9
8 half diagonal for Ti -> 5/9
8 half diagonal fo Pt-> 5/9
12 edge cluster for Ti -> 5/9
12 edge cluster for Pt-> 5/9
12 face cluster for Ti-> 5/9
12 face cluster for Pt-> 5/9
4 diagonal cluster for Ti-> 5/9
4 diagonal cluster for Pt -> 5/9
See the derivation of these correlation values in the supplementary notes of “Free Energy Calculation of Mechanically Unstable but Dynamically Stabilized bcc Titanium” paper for the random correlation values. In the following eci.out file, we setup the artificially large-valued ECIs for the clusters in the clusters.out file. The first line, the ECI associated with the empty cluster, should be considered as a constant energy term to balance the total energy in the expansion.
-26000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
According to this eci.out, the energy associated with the random occupation of group of sites with 1 atom and 8 vacancies is zero.
1*(-26000)(1)+1*(1000)(-7/9)+8*(1000)(-7/9)+ 1*(1000)(-7/9)+8*(1000)(-7/9)+8*(1000)(5/9)+8*(1000)(5/9)+12*(1000)(5/9)+12*(1000)(5/9)+12*(1000)(5/9)+12*(1000)(5/9)+4*(1000)(5/9)+4*(1000)(5/9)=0
To confirm that the choice of ECIs in the eci.out ensure the occupation of each group of sites by only one atom and 8 vacancies, we run a "constrained" Monte Carlo simulation (see the memc2 command of ATAT). To constrain the memc2 simulation, we use the conccons.in file (see below).
memc2 -keV -n=10 -eq=1 -df=1 -is=gs_str.out -g2c
To ensures that the concentration of vacancies during the simulation is always 8 times more than the concentration of Ti or Pt atoms, we setup the conccons.in as below
8*Ti+8*Pt-1*Vac = 0.0
The output of memc2 simulation gives the average energy of the system and the correlation associated with each cluster during the simulation. See below for mcheader.out
1:T
2:mu(Pt)
3:mu(Ti)
4:mu(Vac)
5:F_lte
6:E_lte
7:lro_lte
8:x_lte(Pt)
9:x_lte(Ti)
10:x_lte(Vac)
11:F_mf
12:E_mf
13:lro_mf
14:x_mf(Pt)
15:x_mf(Ti)
16:x_mf(Vac)
17:F_mc
18:E_mc
19:lro_mc
20:x_mc(Pt)
21:x_mc(Ti)
22:x_mc(Vac)
23:use_mf
24:corr_0_0
25:corr_1_0
26:corr_1_0
27:corr_1_0
28:corr_1_0
29:corr_2_0.426881
30:corr_2_0.426887
31:corr_2_0.49292
32:corr_2_0.49292
33:corr_2_0.697094
34:corr_2_0.697094
35:corr_2_0.853762
36:corr_2_0.853762
Click here to see the mc.out file from this simulation. Use cat mc.out|cut -f 18 to see that the E_mc is always zero. This means that the artificial large ECIs do not interfere or affect the energy value in the expansion.
Use cat mc.out|cut -f 24-36 to see that the correlations associated with clusters in the cluster.out file. Te average of each cluster's correlation function is
1.0000 -0.7774 -0.7778 -0.7742 -0.7782 0.5524 0.5552 0.5557 0.5564 0.5557 0.5564 0.5557 0.5564
which are the same as the correlations associated with the random occupation of each group of sites with one atom (Ti or Pt) and 8 vacancies.

Example 2 : Setting up the cluster expansion for the chemically disordered B2 phase of NiTi
Unlike example 1, where the lattice sites for Pt and Ti were distinct, in a disordered phase each lattice site in the standard B2 phase can be occupied by both Ni and Ti. See more details in this paper . The augmented lattice associated with a disordered B2 NiTi is shown below:

1 0 0
0 1 0
0 0 1
1.510779 -1.510779 1.510779
-1.510779 1.510779 1.510779
1.510779 1.510779 -1.510779
0.000000 0.000000 0.000000 Vac,Ti,Ni
-0.144128 -0.144128 -0.144128 Vac,Ti,Ni
-0.144128 -0.144128 0.144128 Vac,Ti,Ni
-0.144128 0.144128 -0.144128 Vac,Ti,Ni
-0.144128 0.144128 0.144128 Vac,Ti,Ni
0.144128 -0.144128 -0.144128 Vac,Ti,Ni
0.144128 -0.144128 0.144128 Vac,Ti,Ni
0.144128 0.144128 -0.144128 Vac,Ti,Ni
0.144128 0.144128 0.144128 Vac,Ti,Ni

To create the short pairs (or two-body clusters) that form within a group of sites, use the following command
corrdump -clus -2=1
Note that the value set for -2 should be larger than the diagonal formed between the corner sites in each group. In this case, it should be larger than the distance between (-0.144128 -0.144128 -0.144128) and (0.144128 0.144128 0.144128 ). The cluster.out file output of the corrdump command is
1
0.00000
0

1
0.00000
1
1.51078 1.51078 1.51078 1 0

1
0.00000
1
1.51078 1.51078 1.51078 1 1

8
0.00000
1
1.36665 1.36665 1.36665 1 0

8
0.00000
1
1.36665 1.36665 1.36665 1 1

8
0.24964
2
2.87743 0.14413 0.14413 1 0
3.02156 0.00000 0.00000 1 0

8
0.24964
2
2.87743 0.14413 0.14413 1 1
3.02156 0.00000 0.00000 1 0

8
0.24964
2
2.87743 0.14413 0.14413 1 0
3.02156 0.00000 0.00000 1 1

8
0.24964
2
2.87743 0.14413 0.14413 1 1
3.02156 0.00000 0.00000 1 1

12
0.28826
2
0.14413 0.14413 2.87743 1 0
0.14413 0.14413 3.16569 1 0

24
0.28826
2
0.14413 0.14413 2.87743 1 1
0.14413 0.14413 3.16569 1 0

12
0.28826
2
0.14413 0.14413 2.87743 1 1
0.14413 0.14413 3.16569 1 1

12
0.40766
2
0.14413 0.14413 2.87743 1 0
0.14413 -0.14413 3.16569 1 0

24
0.40766
2
0.14413 0.14413 2.87743 1 1
0.14413 -0.14413 3.16569 1 0

12
0.40766
2
0.14413 0.14413 2.87743 1 1
0.14413 -0.14413 3.16569 1 1

4
0.49927
2
0.14413 0.14413 2.87743 1 0
-0.14413 -0.14413 3.16569 1 0

8
0.49927
2
0.14413 0.14413 2.87743 1 1
-0.14413 -0.14413 3.16569 1 0

4
0.49927
2
0.14413 0.14413 2.87743 1 1
-0.14413 -0.14413 3.16569 1 1
Note that in this case, unlike the ordered phase of example 1, the clusters are not distinguished between the two atoms, as expected for a chemically disordered phase.
We use a user-defined correlation function (as defined in table 4 of this paper ) instead of the default correlation function of ATAT. This choice is made only because of it makes it more convenient to setup the large ECIs associated with the clusters within each group. The user-defined correlation function is shown below
s=0 s=1 s=2 1 '0' 0 1/2 1 1 '1' 0 1 1/2
See below for the corrHalf.c++ files used for the user-defined correlation function.
#include "calccorr.h"

// This is a skeleton to show how to include user-defined cluster functions;
// look for XXXX and replace it by the (internal) name of this cluster function type;
// look for xxxx and replace it by the user-visible name of this cluster function type (it will be invoked by the -crf=xxxx option);
// look for myexpression and replace it by your own definition of the cluster functions;
// save this file under a new name, say corrXXXX.c++ ;
// add corrXXXX.o to the makefile on the line PLUGINCORR ;
// type "make";

class HALFCorrFuncTable: public CorrFuncTable {
public:
HALFCorrFuncTable(): CorrFuncTable() {}
void init(int comp) {
Array > > &table=*this;
table.resize(comp-1);
for (int m=2; m<=comp; m++) {
table(m-2).resize(m-1);
for (int t=0; t table(m-2)(t).resize(m);
}
for (int s=0; s for (int t=1; t<=(m/2); t++) {
table(m-2)(2*t-2)(s)=double(s)/double((m-1));//-cos(2*M_PI*s*t/m);
}
for (int t=1; t<=((m+1)/2-1); t++) {
table(m-2)(2*t-1)(s)=sin((s%2)*M_PI/2)+(ipow((Real)(s-1),s))*s/(2*(m-1));//-sin(2*M_PI*s*t/m);
}
}
}
}
};

SpecificPlugIn HALFCorrFuncPlugIn("half");
According to this definition, the occupation variable, s, associated with a vacancy, Ti atom, or Ni atom is 0, 1, or 2 respectively. Therefore, the correlations associated with the clusters in clusters.out for the random occupation of group of sites with 1 atom and 8 vacancies
1 empty cluster-> 1
1 bcc point cluster '1 0' -> (8/9)*(0)+(1/9)(0.5*1/2+0.5*1) =0.0833
1 bcc point cluster '1 1' -> (8/9)*(0)+(1/9)(0.5*1+0.5*1/2) =0.0833
8 corner point cluster '1 0' -> (8/9)*(0)+(1/9)(0.5*1/2+0.5*1) =0.0833
8 corner point cluster '1 1' -> (8/9)*(0)+(1/9)(0.5*1+0.5*1/2) =0.0833
8 half diagonal pair '1 0'&'1 0' -> (0)*(0.5*1/2+0.5*1) =0
8 half diagonal pair '1 1'&'1 0' -> (0)*(0.5*1/2+0.5*1) =0
8 half diagonal pair '1 0'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
8 half diagonal pair '1 1'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
12 edge pair for '1 0'&'1 0' -> (0)*(0.5*1/2+0.5*1) =0
24 edge pair for '1 0'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
12 edge pair for '1 1'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
12 face pair for '1 0'&'1 0' -> (0)*(0.5*1/2+0.5*1) =0
24 face pair for '1 0'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
12 face pair for '1 1'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
4 diagonal pair for '1 0'&'1 0' -> (0)*(0.5*1/2+0.5*1) =0
8 diagonal pair for '1 0'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
4 diagonal pair for '1 1'&'1 1' -> (0)*(0.5*1/2+0.5*1) =0
In the following eci.out file, we setup the artificially large-valued ECIs for the pair clusters form among the sites in a group.
0
0
0
0
0
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
Note that the above setting for eci.out does not penalize situations where all the sites in a group are occupied with vacancies. In fact, these situations have a very low energy and therefore the Monte Carlo simulations can get stuck in them. To avoid such situation, we explicitly enforce the concentration of vacancies in the conccons.in file during an memc2 simulation.
9*Vac = 8
Follow the instruction of example 1 to run a memc2 simulation on this CE setting. The only different for this example is to use the -crf option with memc2.
memc2 -crf="half" -keV -n=10 -eq=1 -df=1 -is=gs_str.out -g2c

Sample control.in file is
1200 0.0 0.0 0.0
1201 0.0 0.0 0.0 1000