# Help with Geometry Optimization in CASTEP

I am a beginner in CASTEP simulation and I need some guidance on the general steps for geometry optimization. I have tried the following three approaches:

(1) Build unit cell > geometry optimization > cleave > supercell > optimize again> band structure and optical calculation (2) Build unit cell > geometry optimization > cleave > supercell > band structure and optical calculation (3) Build unit cell > geometry optimization > band structure and optical calculation

However, I encountered some problems with each of them. For (1), the simulation runs indefinitely. For (2), after optimizing, cleaving and creating a supercell, I get an error message when I attempt to run band structure and optical calculation: "There are no CASTEP input or output files available. CASTEP input and output files from a previous run are required in order to perform a properties run." For (3), everything works fine but this is only for a unit structure and not a supercell.

• +1 Welcome to our forum.
– Camps
Commented Feb 19 at 11:11
• Why do you need to cleave the unit cell to create a supercell? Why do you need the supercell?
– Camps
Commented Feb 19 at 11:11
• @Camps thanks. As far as I have seen, supercell is required to get a more accurate simulation of the crystal lattice while the unit cell is just that. Cleaving is done to analyze surface properties and create a 3d vacuum slab. I could be wrong. Commented Feb 19 at 14:35

If you are running only geometry optimization for a single crystal periodic structure, the third step:

(3) Build unit cell > geometry optimization > band structure and optical calculation

will be ok.

There is no need to create a supercell for calculation related to the single crystal periodic system: there is no gain in accuracy, and you will face issues with band folding (that, for me, are hard to handle).

If you are running surface calculations, then you really need a supercell. Both steps you propose are valid:

(1) Build unit cell > geometry optimization > cleave > supercell > optimize again> band structure and optical calculation
(2) Build unit cell > geometry optimization > cleave > supercell > band structure and > optical calculation

But there is no need to run double optimization, i.e., optimizing the unit cell. There are some packages (like CIF2Cell) that create the supercell from the CIF file.

If a simulation runs indefinitely, this indicates two things:

• The converge criteria is too tight (a very lower value) or
• The number of steps for the self consistence calculations is too high.

Finally, the errors about band structure and optical calculation maybe related with you trying to do those calculations in bad converged structures (there can be a keyword to allow this), bad Brillouin path selection and/or invalid number of k points (as you move from single crystal to a supercell, the Brillouin path changed).

• +1 but just two additional reasons on why the simulation might run indefinitely: (1) if the memory available is too low than the memory required by the calculation (even though CASTEP usually throws a "Not enough memory" error), and (2) if the calculation accuracy is diverging/alternating due to the inconsistency of various convergence parameters. Commented Feb 20 at 9:58
• The band structure/optics errors are because Materials Studio requires you to have already obtained the ground state density, and method (2) omitted the ground state DFT calculation. CASTEP is actually fine with this, it will just do a ground state DFT calculation first and then do the band structure/optics calculation, so you can write the files and run CASTEP manually. Alternatively, run a ground state DFT calculation through Materials Studio, and then it will let you perform the band structure/optics calculations. Commented Feb 22 at 2:18