.cst_ome file contains the matrix elements for electronic interband transitions that are required to generate the dielectric
function and other optical properties, based on the results of a CASTEP job. This is a binary file which contains the array of matrix elements;
M(band1,band2,coord,k,spin). The loop is over the number of bands (band1, band2), x, y, z components (coord), k-points (nk), and spins (ns).
do nk=1,num_kpoints do ns = 1, num_spins do indx=1,3 do na = 1,num_eigenvalues(ns) do nb = 1,num_eigenvalues(ns) write(output_file) matrix_elements_in_group(na,nb,indx,nk,ns) end do end do end do end do end do
CASTEP file formats