📄 readme.tex
字号:
\begin{itemize}\item Wavefunctions (in reciprocal representation) are to be stored on a disk at theend of the band-structure run as a sequence of files \texttt{fort.20}, \texttt{fort.21},\texttt{fort.22}, etc; one file per each \textbf{k}-point in the same orderas they are given in the \texttt{fort.15} file.\item All eigenvalues ordered properly in ascending order should be delivered afterthe band-structure run to the file \texttt{band.out} which has the followingformat: {[}k-point number, five eigenvalues{]} on every line. Note that thisis compulsory as the utility \textbf{take} (see below) does it anyway. It isimportant to have, however, properly ordered eigenvalues on the last \textbf{CASTEP}iteration.\item The electronic density should be in \texttt{fort.16} file.\end{itemize}To compile the code you must prepare a standard file \texttt{param.inc} in your\emph{}\textit{\emph{working}} directory and then submit a shell-script \textbf{comp}(supplied). After the compilation is completed, you will find in your workingdirectory two executables: \textbf{castepx} which is the \textbf{CASTEP} itselfand \textbf{check} which is a check utility described below. \subsection{Utility \textit{check}}This utility simulates a run of \textbf{CASTEP}: it reads all the data includingpseudopotentials, density, etc., generates plane waves, etc. and then stopswhen all the preliminary work is done. If it reveals that some parameters setin the \texttt{param.inc} file are insufficient, it will give a FATAL messagewith an advice about the least values for them. At the same time it gives errormessages if it cannot open a file or cannot read it successfully. To compilethe utility, submit the shell-script \textbf{check.comp} from your current directory\subsection{Utility \textit{take}}This utility \textit{\emph{is used to assess the convergence of the band-structurerun of}} \textbf{\textit{\emph{CASTEP}}} \textit{\emph{and}} is compiled fromyour current working directory using a shell-script \textbf{take.comp}. Then,you can either run it with the name of the \textbf{CASTEP} output in the commandline or without it in which case you will be asked to specify this name explicitly:\begin{verbatim} take [name of the CASTEP output file]\end{verbatim} The utility gives the following information about each \textbf{CASTEP} band-structureiteration: \begin{itemize}\item actual iteration number \textit{in the file} and the \textbf{CASTEP} iterationnumber; the former number differs from the latter if you keep not all the outputin your output file (e.g., only several last iterations);\item then, for each \textbf{\( \mathbf{k} \)}-point (\texttt{NKP}) per line it gives\begin{equation}\label{9}delta=\frac{1}{{\texttt {NBANDS}}}\sum _{n=1}^{{\texttt {NBANDS}}}\left| \epsilon _{n\mathbf{k}}^{{\texttt {NKP}}}-\epsilon _{n\mathbf{k}}^{{\texttt {NKP-1}}}\right| \end{equation} which shows the convergence of the eigenvalues \( \epsilon _{n\mathbf{k}}^{{\texttt {NKP}}} \)on the current (\texttt{NKP}-th) iteration with respect to the previous one((\texttt{NKP-1})-th); it also compares the criteria with the previous iterationand checks if all the eigenvalues are properly ordered. If they are not orderedproperly, it tells you how many weird eigenvalues have been met. (Note thatif \textbf{CASTEP} does the subspace rotation, this information is redundant.) \end{itemize}Usually, \( delta=10^{-3} \) is fine.At the end of the output you are asked to produce a file \texttt{band.0} witheigenvalues (of the same format as \texttt{band.out}) from \textit{any} desirediteration. This option allows you to check the convergence of the DOS with theiteration number by preparing \texttt{band.out} files from different iterationsand subsequently running \textbf{lev00}.\subsection{Utilities \texttt{\textit{lev1}} \textit{(old) and} \texttt{\textit{lev2}}\textit{(new)}}Either utility is used to prepare data files for \textbf{lev00} for the calculationof the partial charge density as well as DOS/LDOS using \textbf{CASTEP} wavefunctions.To compile this utility you should run the shell-script \textbf{lev1.comp} fromthe current directory using the same \texttt{param.inc} file. \textbf{lev2}should be compiled in directories LEV2\_f77 (f77 version, compile every timeyou get a new \texttt{param.inc} file) or LEV\_f90 (f90 version, to be compiledonly once).First of all, run \textbf{CASTEP} in the band-structure mode to write the wavefunctions.Note that the \( \mathbf{k} \)-points mesh as given by \textbf{tetr} need tobe used for the DOS/LDOS calculation. Then you can run \textbf{lev1.} It isan interactive menu-driven program and five options are available: DOS, DOp,SRF and MAP, and at the end of the run a file \texttt{psi2.{[}option{]}}is producedneeded for the subsequent run of the plotter \textbf{lev00}. Note that the utility\textbf{lev1} needs the file \texttt{fort.14} which contains all informationnecessary to perform the Fast Fourier Transform (FFT) from the reciprocal tothe real space.All states available NBANDS can participate. However, it is possible to do asophisticated job by creating \emph{islands} of bands, each island being a continuousmanifold of states which can overlap, and then run the calculation for everyisland. This way I can do a specific job on particular states. If all statesare to be included, just specify one island with all states from 1 to NBANDS.The five options available are listed below:\begin{enumerate}\item \texttt{\large DOS}: \( s \)-projected DOS as in Eqs. (\ref{4}) and (\ref{6})(with \( l=0 \)) is calculated using conserving algorithm for the space integration.The projection is made either on a single Slater type AO, \begin{equation}\label{10}R(r)=N(\xi )r^{n-1}e^{-\xi r}\end{equation}or on a linear combination of Gaussians\begin{equation}\label{11}R(r)=\sum ^{N_{G}}_{i=1}C_{i}N(\alpha _{i})e^{-\alpha _{i}r^{2}}\end{equation}Here \( N \) is the normalisation of a single orbital which depends on theexponential, \( \xi \) or \( \alpha _{i} \). Noninteractive option. All theinformation needed should be provided in the file \texttt{fort.14.DOS} (seebelow). Up to \texttt{Ntask0} spheres (set in \texttt{dos\_task.inc}) can bedefined for one run of \textbf{lev1. }\item \texttt{\large PRO}: local DOS, Eqs. (\ref{4}) and (\ref{5}), and \( s,p,d \)-projectedDOS, Eqs. (\ref{4}) and (\ref{6}), are calculated using nonconserving algorithmfor the space integration. The projection is made on a single AO; its radialpart is made either of a single Slater type AO, or of a linear combination ofGaussians. Noninteractive option. All the information needed should be providedin the file \texttt{fort.14.PRO} (see below). Up to \texttt{Ntask0} spherescan be defined for one run of \textbf{lev1. }\item \texttt{\large DOp}: this is DOS projected on a layer, see Eqs. (\ref{4}) and(\ref{7}). Interactive option: you will be asked about each layer, its positionand thickness. Up to \texttt{Ntask0} layers can be specified for one run of\textbf{lev1.} Islands of bands \( n \) should be provided in the file \texttt{fort.14a}(see below).\item \texttt{\large MAP}: partial electronic density as in Eq. (\ref{1}) or (\ref{2}).Islands of bands \( n \) should be provided in the file \texttt{fort.14a} (seebelow).\item \texttt{\large SRF}: partial electronic density which is 2D integrated overthe plane parallel to the slab, i.e. \begin{equation}\label{12}\rho _{n}(i_{3})=\frac{1}{N_{1}N_{2}}\sum _{i_{1}=1}^{N_{1}}\sum _{i_{2}=1}^{N_{2}}\rho _{n}(i_{1},i_{2},i_{3})).\end{equation}where \( N_{1} \) and \( N_{2} \) are the number of grid points along vectors\( \mathbf{a}_{1} \) and \( \mathbf{a}_{2} \) of the cell and \( i_{3} \)runs from 1 to \( N_{3} \) (\( N_{1} \), \( N_{2} \), \( N_{3} \) correspondto NGX, NGY, NGZ in \texttt{param.inc}). You will be asked to provide islandsof bands (as in the file \texttt{fort.14.SRF}) and an output file \texttt{psi2.SRF}will be produced. Islands of bands \( n \) should be provided in the file \texttt{fort.14a}(see below).\end{enumerate}Formats of the input files mentioned in this section are provided below: \begin{itemize}\item \texttt{fort.14a}: islands of states are provided, i.e. \begin{itemize}\item number of islands of states (1 integer)\item the first and the last states for the 1st island (2 integers)\item the first and the last states for the 2nd island (2 integers)\item etc.\end{itemize}\item \texttt{fort.14.DOS}: \begin{itemize}\item islands of states as above;\item number of spheres (1 integer);\item then for each sphere:\begin{itemize}\item on 1 line: Cartesian coordinates of the sphere (in \AA), sphere radius (in \AA),1 or 0 (for Slater or Gaussian AO, respectively)\item if Slater, Eq. (\ref{10}), then on the next line: \( n \) and \( \xi \)(in \AA\( ^{-1} \))\item if Gaussian, Eq. (\ref{11}), then on the next line: \( N_{G} \) and on thefollowing line all the coefficients and exponentials (in \AA\( ^{-2} \)) areprovided as \( (C_{i},\, \alpha _{i},i=1,...,N_{G}) \).\end{itemize}\end{itemize}\item \texttt{fort.14.PRO}: \begin{itemize}\item islands of states as above;\item number of spheres (1 integer);\item then for each sphere:\begin{itemize}\item on 1 line: Cartesian coordinates of the sphere (in \AA), sphere radius (in \AA),1 or 0 (for Slater or Gaussian AO, respectively), one integer \( K \) correspondingto the fine grid \( K^{3} \) of the nonconserving method, and three flags (0for 'no' and 1 for 'yes') for whether to do \( s \), \( p \) and \( d \)projected DOS.\item then separately for every angular momenta with nonzero flag: specify the radialpart of the orbital \( R(r) \) (see \texttt{fort.14.DOS})\end{itemize}\end{itemize}\item \texttt{fort.14.DOp}: \begin{itemize}\item islands of states as in other cases;\item number of layers (1 integer);\item then for each layer you provide the following information (one line per layer):\begin{itemize}\item Cartesian position of the layer on the \( z \)-axis (in \AA);\item layer thickness (in \AA);\item 0 for conserving and 1 for non-conserving;\item numbers of grid points along each of the x,y,z directions necessary for thenon-conserving method (3 integers); note that in the case of the conservingmethod this data will be ignored.\end{itemize}\end{itemize}\end{itemize}\subsection{How to split a large job into a set of smaller jobs. Utility \texttt{\textit{sum}}}If your \textbf{CASTEP} job is been estimated to be too large to run with all\( \mathbf{k} \)-points simultaneously, you can split it into parts. Finalfiles \texttt{band.out} and \texttt{psi2.{[}option{]}} are then compiled togetherby a special utility \textbf{sum} (hopefully, it works although it has beenlong time ago!).Let us consider this case in detail: \begin{itemize}\item First of all, you should split the \textbf{k}-point sampling into subsets. Forexample, a 10 \textbf{k}-points job can be split into a set of 10 jobs with1 \textbf{k}-point each or into a set of 3 jobs with 3, 3 and 4 \textbf{k}-pointseach, etc.\item Run \textbf{CASTEP} for each \textbf{k}-point subset and then rename all theoutput files, namely \texttt{band.out} and \texttt{psi2.{[}option{]}}, as follows:\texttt{band.out.1, band.out.2,} etc. and \texttt{psi2.DOS.1}, \texttt{psi2.DOS.}2,etc.\item Compile the \textbf{sum} routine using a shell-script \textbf{sum.comp} (provided)from your working directory and then run it as \begin{verbatim} sum [number of subsets] \end{verbatim} The number of subsets is optional and will be asked if not given.To compile the \textbf{sum} utility you can use any of the \texttt{param.inc}files used to compile any of your CASTEP codes since the number of \textbf{k}-points,\texttt{NKPTS}, does not matter; only the grid size and the number of bandsdo matter.\end{itemize}In the case that the option MAP is on, you should be a bit more careful. Itis a good idea to refrain from running \textit{all} CASTEP jobs one after anotherbecause this may lead to a collection of very large \{\texttt{psi2.MAP.N}\}files. To save the disk space, you can run the first two jobs, then \textbf{sum}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -