ttadano / alamode

Ab initio simulator for thermal transport and lattice anharmonicity
http://sourceforge.net/projects/alamode
MIT License
132 stars 53 forks source link

Using different supercell size for FC2 and FC3 #181

Closed m-a-saleh closed 2 months ago

m-a-saleh commented 3 months ago

I want to use different supercell sizes for FC2 and FC3. For FC2 I want to use 2x4x1 supercell, while for FC3 I want to use 1x2x1 supercell.

I have followed these steps:

  1. Calculate FC2 using finite displacements of 2x4x1 supercell and save the force constants to super2x4x1_0.03.xml file.
  2. To calculate FC3, I use FC2 to generate 250 random displacements but for 1x2x1 supercell.
  3. Perform DFT on the random supercells, and generate DFSET_randomQ file.
  4. Perform optimization to get FC3 using the following &optimize block with FC2 fixed to the previously calculated values:
&optimize
 LMODEL = ols
 NDATA = 250
 DFSET = DFSET_randomQ
 FC2XML = super2x4x1_0.03.xml

 STANDARDIZE = 1
 CONV_TOL = 1.0e-8
/

The last step results in the following error:

ERROR in fix_forceconstants_to_file  MESSAGE: The number of harmonic force constants is not consistent.

How to make sure that the number of harmonic terms in the new computational condition is the same as that in the FC2XML file generated using larger supercell.

ttadano commented 3 months ago

In Step 4, you need to specify a FC2XML file that containts harmonic force constants calculated using the same supercell size as the input structure (1x2x1 supercell, in your case).

So, please generate supercell1x2x1_0.03.xml first using the finite displacement approach.