Cluster Setup¶
set_up_clusters_and_dft() generates all non-equivalent clusters with the supercell program, creates the folder structure and prepares the DFT input files. See Step 1 for a minimal call.
Output¶
This step produces:
- All non-equivalent clusters
- The directory structure
S*/S*_i*_w*/, whereS*denotes the number of substituted atoms,i*the consecutive cluster index andw*the degeneracy of the corresponding cluster. Theiandwindices are generated by the supercell program; if the supercell program is called once per distribution of the substituted atoms (see Several Permutable Sites),iis renumbered continuously over all distributions of oneS*. Each cluster folder holds its CIF file and, unlesscreate_dft_folders=False(e.g. for an ML-only run), the three subfoldersvc-relax/,bands/, andphonons/. clusters_template.datinout_dir, the folder that holds theS*folders: one row per cluster (ID, n_j, Nat, x, g_j) with the energymissing, and the compound, the number of sites and the number of permutable sites n in the header. Every route (DFT, ML, EDDP) reads its cluster setup from this file, so keep it when you delete a run folder. For a tree set up before this file existed, it is written once fromDFT/clusters.dat, or from a scan of the cluster CIFs with n taken from the highestS*folder.DFT/clusters.dat, a copy of the template that the DFT energies are filled into, only ifcreate_dft_folders=Trueor one ofqe_par,aims_par,vasp_paris given.DFTis the DFT run folder; it may be renamed.EGQCAtakes the folder of itsdatafileas the run folder (volume.datis read and written there) and looks up the cluster folders indatafile.parent.parent, so a run folder must sit directly inout_dir.geometry.inandcontrol.infor each cluster ifaims_paris providedvc-relax.infor each cluster ifqe_paris providedPOSCAR,POTCAR,INCAR, andKPOINTSfor each cluster ifvasp_paris provided- There is also the option to create the input files for band-structure and phonon calculations for each cluster using
create_bands_in()andcreate_phonons_in(). More details are provided in DFT Input Files.
Several Permutable Sites¶
If the unit cell has more than one permutable site, all configurations over these sites are created. How the atoms are permuted is set with substitution_mode:
"independent"substitutes each site independently, so every distribution of the substituted atoms over the sites is included."coupled"substitutes one unit on every original site at a time, e.g. (AB)→(CC), and falls back to all distributions if the sites have different multiplicities."auto"(default) uses"independent"if all original atoms are of the same element and"coupled"otherwise.
CIF Files Only¶
With cif_only=True the cluster CIF files are written flat into out_dir, together with logs/log.out; neither the folder structure nor clusters_template.dat nor any DFT input is created.
Updating DFT Inputs¶
update_DFT_in() rewrites the relaxation inputs of an existing folder tree with new parameters. It also works on a tree set up without DFT (e.g. for an ML-only run): it creates the vc-relax/, bands/ and phonons/ folders and the DFT run folder DFT/clusters.dat as a copy of clusters_template.dat, if that file does not exist yet. An existing clusters.dat is never changed. With dft_folder_name="DFT_PBE" the run file goes into another folder, e.g. for a second DFT setup or a renamed DFT folder.