INSTRUCTIONS FOR DAY 1, EXERCISE 3
In this exercise, we will use PWSCF to obtain the equilibrium structure of a molecule.
Enter the directory ex3. You will see the following files:
- acetylene.scf.in this is an input file for scf calculations.
Self-consistent (scf) calculations for Acetylene
- Open and read the sample file acetylene.scf.in
- Acetylene is a molecule. PWSCF works with periodic boundary conditions, so we have placed the molecule in a supercell surrounded by vacuum. If the supercell is made sufficiently large we will obtain results for an isolated molecule.
Run the scf calculation:
pw.x < acetylene.scf.in > acetylene.scf.out
- Look at the atomic forces reported in the output file
- We can use Xcrysden to examine the strucutre and show the forces
xcrysden --pwo acetylene.scf.out
- Note that you will need to reduce the dimensionality to 0 (zero) to correctly display the structure as a molecule.
- Press 'F' to display the forces
- You may need to rescale the forces to get them to display correctly (shift-F brings up the appropriate dialogue)
Geometry Optimisation
- Copy acetylene.scf.in to acetylene.bfgs.in
- Edit acetylene.bfgs.in to perform a fixed-cell geometry optimisation by setting calculation='relax'.
- Add the follow IONS names list (after ELECTRONS)
&IONS ion_dynamics = 'bfgs', pot_extrapolation = 'second_order', wfc_extrapolation = 'second_order', upscale = 100, /
- Set conv_thr = 1.D-6 (the ions parameter upscale defines a variable SCF convergence criteria - close to the minimum conv_thr is set 100x smaller)
- Run the geometry optimisation
pw.x < acetylene.bfgs.in > acetylene.bfgs.out
- Examine the output file
- Now we can extract the values of the total energy and force during the minimisation:
grep ^! acetylene.bfgs.out | nl grep 'Total force' acetylene.bfgs.out | nl
- Now open the output file with Xcrysden (again select 0D then "all coordinates as animation"). You can follow the progress of the minimisation (note you can show the forces during the minimisation)
- What are the equilibrium bond lengths and angles? How do they compare to experiment? (typical experimental values are: C-C=1.20241 and C-H=1.0625 Ang)
Optional things if you have time
- Investiage the effect of cutoff energy on the bond lengths. As this is a molecule kpoint sampling is not relavent - instead you should converge with respect to the size of the supercell.
- Swap the pseudopotentials for LDA ones. Is the result better or worse in comparison to experiment?
- Investiage the effect of poor scf convergence: set conv_tol=1.D-3 and upscale=1 and see what happens
Keeping atoms fixed
Look at the coordiantes in the input file
ATOMIC_POSITIONS bohr C 0.000000000 0.000000000 0.000000000 0 0 0 C 2.100000000 0.000000000 0.000000000 1 1 1 H -1.600000000 0.400000000 0.000000000 1 1 1 H 3.600000000 -0.400000000 0.000000000 1 1 1
The final three columns determin which atoms are fixed. In the above case the first atoms has its x,y and z coordinates fixed (more precisely pwscf will multiply the forces on atom one by the numbers in the last three columns - so in this case set them to zero).
Perform a constrained calculation - allowing only the H atoms to move