diff --git a/.github/workflows/docs_to_pages.yml b/.github/workflows/docs_to_pages.yml new file mode 100644 index 00000000..1611c871 --- /dev/null +++ b/.github/workflows/docs_to_pages.yml @@ -0,0 +1,40 @@ +# This is a basic workflow to help you get started with Actions + +name: Docs to Pages + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "photo_dev" branch + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout + uses: actions/checkout@v3 + - name: built + uses: wuppersaver/ford-build@v1.0 + with: + project_file: /optados/ + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v3 + with: + target_branch: gh-pages + build_dir: ./optados/auto_doc/ + verbose: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55e7fa7d..c6f74169 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,16 +16,16 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: pre-commit: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v3.5.3 + - uses: actions/setup-python@v4.7.0 + - uses: pre-commit/action@v3.0.0 build: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -50,11 +50,14 @@ jobs: matplotlib \ - name: build run: | - cd optados + cd optados + sed -i "s/.*BUILD :=.*/BUILD := fast/" make.system make make tools + sed -i "s/.*COMMS_ARCH :=.*/COMMS_ARCH := mpi/" make.system + make - name: run tests run: | cd optados/test-suite - ./run_tests -v --category=default + ./run_tests -n 1 -v --category=default diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fb193885..00000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -optados/src/build.f90 -optados/od2od* -optados/optados.* - -optados/volume/ -optados/de*/ -optados/m*/ -optados/original/ -optados/ph* diff --git a/optados/documents/photoemission/user_guide.tex b/optados/documents/photoemission/user_guide.tex index 1a54a4f4..fcaca50e 100644 --- a/optados/documents/photoemission/user_guide.tex +++ b/optados/documents/photoemission/user_guide.tex @@ -21,7 +21,7 @@ \renewcommand{\d}{\mathrm{d}} \newcommand{\e}{\mathrm{e}} -% Ensure that blank pages don't have numbers or heading on them +% Ensure that blank pages don't have numbers or heading on them \makeatletter \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{} @@ -105,12 +105,12 @@ \section{Photoemission model} \label{fermi_golden_rule} \end{equation} -where $E$ is the electronic state eigenvalue, $i$ and $j$ are the indices for the initial and final state respectively, $s$ is the spin index, $\bf{k}$ is the wavevector of the electron wavefunction, $M(i,j,{\bf{k}},s)$ is the photoemission matrix element and the Dirac delta function $\delta(E{(j,{\bf{k}},s)}-E{(i,{\bf{k}},s)}-\hbar \omega)$ ensure the energy conservation in the photoemission process. The Dirac delta function can be evaluated using the fixed-width Gaussian broadening, adaptive Gaussian broadening or linear extrapolative scheme implemented in the OptaDOS code. +where $E$ is the electronic state eigenvalue, $i$ and $j$ are the indices for the initial and final state respectively, $s$ is the spin index, $\bf{k}$ is the wavevector of the electron wavefunction, $M(i,j,{\bf{k}},s)$ is the photoemission matrix element and the Dirac delta function $\delta(E{(j,{\bf{k}},s)}-E{(i,{\bf{k}},s)}-\hbar \omega)$ ensure the energy conservation in the photoemission process. The Dirac delta function can be evaluated using the fixed-width Gaussian broadening, adaptive Gaussian broadening or linear extrapolative scheme implemented in the OptaDOS code. The photoemission matrix element $M(i,j,\bf{k},s)$ in Eq.~\ref{fermi_golden_rule} is \begin{equation} -M(i,j,{\bf{k}},s) = \left | \left \langle \psi_{{\bf{k}},j,s}\left | H' \right | \psi_{{\bf{k}},i,s} \right \rangle \right |^2 +M(i,j,{\bf{k}},s) = \left | \left \langle \psi_{{\bf{k}},j,s}\left | H' \right | \psi_{{\bf{k}},i,s} \right \rangle \right |^2 \label{matrix_elements} \end{equation} @@ -121,7 +121,7 @@ \section{Photoemission model} \label{matrix2} \end{equation} -where $p = - i \hbar \nabla $ is the momentum operator and here $A$ is the polarization vector of the incoming electromagnetic wave. The $A^2$ term can be neglected under the assumption of a weak field. The Hamiltonian can be simplify due to the Coulomb gauge, $\nabla \cdot A = 0$. The perturbation due to the light field is rewritten as +where $p = - i \hbar \nabla $ is the momentum operator and here $A$ is the polarization vector of the incoming electromagnetic wave. The $A^2$ term can be neglected under the assumption of a weak field. The Hamiltonian can be simplify due to the Coulomb gauge, $\nabla \cdot A = 0$. The perturbation due to the light field is rewritten as \begin{equation} H' = \frac{e}{2m_{0}} p \cdot A @@ -193,7 +193,7 @@ \subsection{Light decay} \label{dielectric} \end{equation} -where $e$ is the electron charge, $\epsilon_0$ is the permittivity of vacuum and $\Omega$ is the volume of the unit cell. The real part of the dielectric function $\epsilon_1$ is calculated using the Kramers-Kronig relation. The absorption coefficient is +where $e$ is the electron charge, $\epsilon_0$ is the permittivity of vacuum and $\Omega$ is the volume of the unit cell. The real part of the dielectric function $\epsilon_1$ is calculated using the Kramers-Kronig relation. The absorption coefficient is \begin{equation} \alpha(\omega,\mu) = \frac{2k(\omega, \mu)\omega}{c} @@ -260,7 +260,7 @@ \subsection{Parallel momentum conservation} Here ${\bf{k}_{\parallel}}(i,{\bf{k}},s)$ is the electron parallel momentum inside the crystal. -$\Theta'$ is a modified version of the Heavyside step function $\Theta$ in which $0$ is replaced by a Dirac delta function $\delta(E_v - E_f)$ evaluated with a Gaussian function is included to account for finite temperature broadening of electrons that do not strictly fulfill the parallel momentum conservation. +$\Theta'$ is a modified version of the Heavyside step function $\Theta$ in which $0$ is replaced by a Dirac delta function $\delta(E_v - E_f)$ evaluated with a Gaussian function is included to account for finite temperature broadening of electrons that do not strictly fulfill the parallel momentum conservation. \begin{equation} \delta(E_v - E(j,{\bf{k}},s)) = \frac{1}{\sigma \sqrt{2\pi}}exp \left (-\frac{1}{2}\frac{E_v - E(j,{\bf{k}},s)}{\sigma^2}\right ) @@ -279,7 +279,7 @@ \subsection{Projected, bulk and total quantum efficiency and mean transverse ene \end{equation} where $A$ is the surface area of the simulation cell. The atomic weighting of the contributions of the atomic sites allows the projected quantum efficiency to be defined as; - + \begin{equation} QE{(\omega ,\mu, T)}= \int_{BZ} QE{(\omega, {\bf{k}},\mu, T)}\frac{d{\bf{k}}}{8\pi^3} \label{projected_qe} @@ -294,7 +294,7 @@ \subsection{Projected, bulk and total quantum efficiency and mean transverse ene \label{QE_bulk} \end{equation} -where $N$ is the index of the atomic layer at the centre of the slab and +where $N$ is the index of the atomic layer at the centre of the slab and \begin{equation} \tau = \frac{10\lambda(\omega)}{d(\mu)} @@ -310,7 +310,7 @@ \subsection{Projected, bulk and total quantum efficiency and mean transverse ene \label{total_qe} \end{equation} -The mean transverse energy +The mean transverse energy \begin{equation} MTE(\omega, T) =\int_{BZ} \frac{\sum_{\mu}^N{QE(\omega,{\bf{k}},\mu, T)}\frac{\hbar^2}{m_e}\bf{k_{\parallel}}^2}{QE_{tot}( \omega , T)} \frac{d{\bf{k}}}{8\pi^3} @@ -330,17 +330,17 @@ \subsection{Field emission} % TODO: Rewrite the equations to reflect the current where $e$ is the electron charge, $\epsilon_0$ is the vacuum permittivity, $\phi$ is the potential barrier, $F$ is the external electric field and $z$ is the distance from the surface. The surface-vacuum potential barrier $B_{SN}$ can be plotted as a function of the distance from the surface for different external electric fields. -Electrons tunnel through this barrier with a probability; +Electrons tunnel through this barrier with a probability; \begin{equation} -D \approx \frac{exp^{-G}}{1+exp^{-G}} +D \approx \frac{exp^{-G}}{1+exp^{-G}} \label{tunneling} \end{equation} -where $G$ is known as the strength of the barrier, +where $G$ is known as the strength of the barrier, \begin{equation} -G = g_e \int B_{SN}^{1/2} dz +G = g_e \int B_{SN}^{1/2} dz \label{tunneling_barrier} \end{equation} @@ -348,7 +348,7 @@ \subsection{Field emission} % TODO: Rewrite the equations to reflect the current \chapter{Getting Started}\label{chap:getting_started} \section{Installation} -\optados\ is usually obtained in a gzipped tarball, \verb#optados-X.X.tar.gz#. Extract this ( \verb# tar -xzf optados-X.X.tar.gz#) in the desired directory. Inside the \verb#optados/# directory are a number of sub directories, \verb#documents/#, \verb#examples/# and \verb#tools/#. The code may be compiled using the \verb#Makefile# in the \verb#optados/# directory. The \verb#SYSTEM#, \verb#BUILD#, \verb#COMMS_ARCH# and \verb#PREFIX# flags must be set, either in the \verb#makefile.system#, or from the command line (for example \verb#make BUILD=fast#). +\optados\ is usually obtained in a gzipped tarball, \verb#optados-X.X.tar.gz#. Extract this ( \verb# tar -xzf optados-X.X.tar.gz#) in the desired directory. Inside the \verb#optados/# directory are a number of sub directories, \verb#documents/#, \verb#examples/# and \verb#tools/#. The code may be compiled using the \verb#Makefile# in the \verb#optados/# directory. The \verb#SYSTEM#, \verb#BUILD#, \verb#COMMS_ARCH# and \verb#PREFIX# flags must be set, either in the \verb#makefile.system#, or from the command line (for example \verb#make BUILD=fast#). \subsection[system]{\tt SYSTEM} @@ -375,7 +375,7 @@ \section{Installation} Whether to compile for serial or parallel execution. The valid values are: \begin{itemize} -\item[{\bf --}] \verb#serial# (default) +\item[{\bf --}] \verb#serial# (default) \item[{\bf --}] \verb#mpi# (not tested) \end{itemize} @@ -402,9 +402,9 @@ \chapter{Structure of the Module} \label{sec:structure} It contains: \begin{itemize} \item a sorting algorithm - \item identification of the maximum layer - \item identification of the maximum atom - \item identification of how many atoms belong to each layer + \item identification of the maximum layer + \item identification of the maximum atom + \item identification of how many atoms belong to each layer \end{itemize} \item {\bf schottky\_effect}: this subrotuine calculates @@ -420,30 +420,30 @@ \chapter{Structure of the Module} \label{sec:structure} \item {\bf calc\_electron\_esc}: this subroutine calculates the escape length and the probability for the emission of the electron from - a certain layer. + a certain layer. At the moment, only the constant value is available. -\item {\bf make\_pdos\_weights\_atoms}: this subroutine calculates the +\item {\bf make\_pdos\_weights\_atoms}: this subroutine calculates the PDOS on atoms, by summing the orbital contributions of a certain atom. It is taken from the {\it pdos\_merge} subroutine of pdos.F90, but only the sum on atoms is included. It contains: \begin{itemize} - \item the sum of the orbital contribution of the same atom + \item the sum of the orbital contribution of the same atom \item the sum of all atomic contribution at fixed {\bf k} and band indices. \end{itemize} \item {\bf make\_optical\_weight}s: the task of this subroutine is - calculating the optical matrix weights. - This is done by weigthing the optical matrix by the components of the direction of the light, + calculating the optical matrix weights. + This is done by weigthing the optical matrix by the components of the direction of the light, which are specified by optics\_geom and optics\_qdir parameters, see Section 5.6 (and 5.6.2) for details. For the photoemission calculation, the optics\_geom can be \begin{itemize} - \item {\bf polarized}: the three indices specify the - plane of oscillation of the electric field + \item {\bf polarized}: the three indices specify the + plane of oscillation of the electric field of the incoming radiation; \item {\bf unpolarized}: the three indices define the plane perpendicular to the direction @@ -469,7 +469,7 @@ \chapter{Structure of the Module} \label{sec:structure} % (write down the formula to split it % layer-by-layer). \item {\bf calc\_absorp\_photo}: this subroutine - calculates the absorption coefficient from the + calculates the absorption coefficient from the imaginary part of the refractive index. \item {\bf calc\_reflect\_photo}:this subroutine calculates the reflection coefficient from the @@ -477,9 +477,9 @@ \chapter{Structure of the Module} \label{sec:structure} \item {\bf calc\_absorp\_layer}: this subroutine calculates the portion of light absorbed by each layer. If there is only one layer, the thickness is fixed to one. - -\item {\bf write\_optics}: Write the layer by layer optical properties in the OptaDOS output file. - + +\item {\bf write\_optics}: Write the layer by layer optical properties in the OptaDOS output file. + \item {\bf calc\_angle}: Calculate the photoemission angles theta/phi and the transverse energy. \item {\bf QE calculation}: Calculates the layer-by-layer QE. @@ -503,7 +503,7 @@ \chapter{Parameters}\label{chap:parameters} \section{{\tt seedname.odi} File} The \optados\ input file {\tt seedname.odi} has a flexible free-form -structure. +structure. The ordering of the keywords is not significant. Case is ignored (so \verb#smearing_width# is the same as \verb#Smearing_Width#). Characters after !, or \# @@ -528,7 +528,7 @@ \section{{\tt seedname.odi} File} \section{General Parameters} \subsection[task]{\tt character(len=20) :: task} -Tells the code what to compute. +Tells the code what to compute. The specific option to run this module is: \begin{itemize} @@ -568,7 +568,7 @@ \section{General Parameters} \subsection[adaptive\_smearing]{\tt real(kind=dp) :: linear\_smearing} -Smear the linear broadening with a Gaussian of this width. +Smear the linear broadening with a Gaussian of this width. Default value is 0.0. @@ -577,7 +577,7 @@ \section{General Parameters} The valid options for this parameter are: \begin{itemize} -\item[{\bf --}] \verb#optados# (default) \optados\ recalculates the Fermi energy by performing a DOS calculation. +\item[{\bf --}] \verb#optados# (default) \optados\ recalculates the Fermi energy by performing a DOS calculation. \item[{\bf --}] \verb#file# Take the value from the output of the ab-initio calculation. \item[{\bf --}] \verb#insulator# Assume that the material is an insulator and counts filled bands to find the Fermi energy. \item[{\bf --}] \verb## User supplied value. @@ -586,7 +586,7 @@ \section{General Parameters} The default value is {\tt optados}. \subsection[finite\_bin\_correction]{\tt logical :: finite\_bin\_correction} -Force each Gaussian to be larger than a single energy bin. (Useful for adaptive smearing and semi-core states when \verb#numerical_intdos=TRUE#). +Force each Gaussian to be larger than a single energy bin. (Useful for adaptive smearing and semi-core states when \verb#numerical_intdos=TRUE#). Default value \verb#TRUE#. @@ -596,8 +596,8 @@ \section{General Parameters} Default value \verb#FALSE#. \subsection[hybrid\_linear]{\tt logical :: hybrid\_linear} -Switch from linear broadening scheme to adaptive broadening when band gradient less than \verb#hybrid_linear_grad_tol#. -This allows for a good description of very flat bands such as defect and semi-core states. May also be used in conjunction +Switch from linear broadening scheme to adaptive broadening when band gradient less than \verb#hybrid_linear_grad_tol#. +This allows for a good description of very flat bands such as defect and semi-core states. May also be used in conjunction with \verb#finite_bin_correction# further improving the DOS and band energy Default value \verb#FALSE#. @@ -614,32 +614,32 @@ \section{Optics Parameters} Specifies the geometry for the optics calculation. Possible options: \begin{itemize} \item[{\bf --}] \verb#polycrystalline# (Isotropic average) -\item[{\bf --}] \verb#polarized# -\item[{\bf --}] \verb#unpolarized# +\item[{\bf --}] \verb#polarized# +\item[{\bf --}] \verb#unpolarized# \item[{\bf --}] \verb#tensor# (Full dielectric tensor) \end{itemize} The default is polycrystalline. \subsection[optics\_qdir]{\tt real(kind=dp) :: optics\_qdir(3)} -Direction of polarisation. Must be specified if \verb#optics_geom = polarized# +Direction of polarisation. Must be specified if \verb#optics_geom = polarized# or \verb#optics_geom = unpolarized#. There is no default value \subsection[optics\_intraband]{\tt logical :: optics\_intraband} -If true, the intraband contribution to the dielectric function will be calculated. (Important for metals.) +If true, the intraband contribution to the dielectric function will be calculated. (Important for metals.) The default is FALSE. \subsection[optics\_drude\_broadening]{\tt real(kind=dp) :: optics\_drude\_broadening} -Value of broadening included in the Drude term expressed in $s^{-1}$. +Value of broadening included in the Drude term expressed in $s^{-1}$. -The default value is 1E-14. +The default value is 1E-14. \subsection[optics\_lossfn\_broadening]{\tt real(kind=dp) :: optics\_lossfn\_broadening} -FWHM of Gaussian used to broaden the loss function. +FWHM of Gaussian used to broaden the loss function. -The default value is 0 ($i.e.$ no broadening is used). +The default value is 0 ($i.e.$ no broadening is used). \section{Photoemission Parameters} @@ -691,7 +691,7 @@ \section{Photoemission Parameters} \chapter{Examples} \begin{itemize} -This is an example of using photoemission module for calculating the photoemission properties of Cu(111) surface using a 16 atomic layers slab. +This is an example of using photoemission module for calculating the photoemission properties of Cu(111) surface using a 16 atomic layers slab. \item \emph{Input Files}: \begin{itemize} \item \verb#examples/Cu_photo/Cu.cell# - The \castep\ cell file containing information about the simulation cell. @@ -704,14 +704,14 @@ \chapter{Examples} %%%% Step 1 %%%%% \item Perform a \castep\ calculation using the \verb#Cu.cell# and \verb#Cu.param# input files. Slab calculations are time consuming calculations, a high performing computer should be used. - \verb#$ castep Cu# + \verb#$ castep Cu# -More help can be found in the tutorials on the \castep\ website \verb#www.castep.org#. +More help can be found in the tutorials on the \castep\ website \verb#www.castep.org#. %%%% Step 2 %%%%% \item Perform an \optados\ calculation. - -\verb#$ optados....x86_64 Cu# + +\verb#$ optados....x86_64 Cu# This generates several files: \begin{itemize} @@ -865,7 +865,7 @@ \chapter{Interface with other codes} %\begin{landscape} \section{\texttt{.ome\_bin} file} -The \texttt{.ome\_bin} file is required for adaptive and linear broadening, and for optics calculations. +The \texttt{.ome\_bin} file is required for adaptive and linear broadening, and for optics calculations. % Note that a \texttt{.dome} file is just the diagonal elements of the \texttt{.ome}. % @@ -893,7 +893,7 @@ \section{\texttt{.ome\_bin} file} %\end{landscape} \section{\texttt{.fome\_bin} file} -The \texttt{.fome\_bin} file is required for the one step model. +The \texttt{.fome\_bin} file is required for the one step model. % Note that a \texttt{.dome} file is just the diagonal elements of the \texttt{.fome}. % @@ -948,7 +948,7 @@ \section{\texttt{.pdos\_bin} file} write(pdos_file) species(1_:num_popn_orb) write(pdos_file) ion(1:num_popn_orb) write(pdos_file) am_channel(1:num_popn_orb) - + do nk=1,num_kpoints write(pdos_file) nk, kpoint_positions(nk,:) do ns = 1,num_spins @@ -963,7 +963,7 @@ \section{\texttt{.pdos\_bin} file} %\end{landscape} \section{\texttt{.dome\_bin} file} -The \texttt{.dome\_bin} file contains the first derivative of a band with respect to k. Also known as electron velocity. +The \texttt{.dome\_bin} file contains the first derivative of a band with respect to k. Also known as electron velocity. The \texttt{.dome\_bin} file is an unformatted file. \begin{verbatim} @@ -987,7 +987,7 @@ \section{\texttt{.dome\_bin} file} \end{verbatim} \section{\texttt{.ddome\_bin} file} -The \texttt{.ddome\_bin} file contains the second derivative of a band with respect to k. Also known as effective mass. +The \texttt{.ddome\_bin} file contains the second derivative of a band with respect to k. Also known as effective mass. The \texttt{.ddome\_bin} file is an unformatted file. \begin{verbatim} diff --git a/optados/make.system b/optados/make.system index 9213ece6..6bbf5e71 100644 --- a/optados/make.system +++ b/optados/make.system @@ -39,7 +39,7 @@ ifeq ($(SYSTEM), gfortran) FFLAGS= -fconvert=big-endian -fPIC FFLAGS_PARALLEL= -DMPI FFLAGS_FAST= -O3 - FFLAGS_DEBUG= -O0 -g -fcheck=all -ffpe-trap=zero + FFLAGS_DEBUG= -O0 -g -fcheck=all -ffpe-trap=invalid EXTENSION=.gfortran endif diff --git a/optados/python/OptaPyDOS.py b/optados/python/OptaPyDOS.py deleted file mode 100644 index a7003873..00000000 --- a/optados/python/OptaPyDOS.py +++ /dev/null @@ -1,5374 +0,0 @@ -import _OptaPyDOS -import f90wrap.runtime -import logging - -class Od_Algorithms(f90wrap.runtime.FortranModule): - """ - Module od_algorithms - - - Defined at ../src/algorithms.f90 lines 35-345 - - """ - @staticmethod - def channel_to_am(no): - """ - channel_to_am = channel_to_am(no) - - - Defined at ../src/algorithms.f90 lines 52-70 - - Parameters - ---------- - no : int - - Returns - ------- - channel_to_am : str - - """ - channel_to_am = _OptaPyDOS.f90wrap_channel_to_am(no=no) - return channel_to_am - - @staticmethod - def gaussian(m, w, x): - """ - gaussian = gaussian(m, w, x) - - - Defined at ../src/algorithms.f90 lines 73-92 - - Parameters - ---------- - m : float - w : float - x : float - - Returns - ------- - gaussian : float - - ========================================================================= - ** Return value of Gaussian(mean=m,width=w) at position x - I don't know who's this function originally was, CJP? MIJP? - ========================================================================= - """ - gaussian = _OptaPyDOS.f90wrap_gaussian(m=m, w=w, x=x) - return gaussian - - @staticmethod - def heap_sort(num_items, weight): - """ - heap_sort(num_items, weight) - - - Defined at ../src/algorithms.f90 lines 95-170 - - Parameters - ---------- - num_items : int - weight : float array - - ========================================================================= - This subroutine sorts the list of weights into descending order. - On exit, if present, the array of indexes contains the original index - of each item. - This is a heap sort - ------------------------------------------------------------------------- - Arguments: - num_items (input) :: The number of items to sort - weight (in/out) :: The weights of each item. On exit these are - sorted into descending order. - ------------------------------------------------------------------------- - Parent module variables used: - None - ------------------------------------------------------------------------- - Modules used: - None - ------------------------------------------------------------------------- - Key Internal Variables: - None - ------------------------------------------------------------------------- - Necessary conditions: - None - ------------------------------------------------------------------------- - Written by Chris Pickard 22nd May 2009 - ========================================================================= - """ - _OptaPyDOS.f90wrap_heap_sort(num_items=num_items, weight=weight) - - @staticmethod - def utility_lowercase(string_bn): - """ - utility_lowercase = utility_lowercase(string_bn) - - - Defined at ../src/algorithms.f90 lines 173-203 - - Parameters - ---------- - string_bn : str - - Returns - ------- - utility_lowercase : str - - ========================================================================= - Takes a string and converts to lowercase characters - ========================================================================= - """ - utility_lowercase = _OptaPyDOS.f90wrap_utility_lowercase(string_bn=string_bn) - return utility_lowercase - - @staticmethod - def utility_frac_to_cart(frac, cart, real_lat): - """ - utility_frac_to_cart(frac, cart, real_lat) - - - Defined at ../src/algorithms.f90 lines 206-226 - - Parameters - ---------- - frac : float array - cart : float array - real_lat : float array - - ================================================================== - Convert from fractional to Cartesian coordinates - =================================================================== - """ - _OptaPyDOS.f90wrap_utility_frac_to_cart(frac=frac, cart=cart, real_lat=real_lat) - - @staticmethod - def utility_cart_to_frac(cart, frac, recip_lat): - """ - utility_cart_to_frac(cart, frac, recip_lat) - - - Defined at ../src/algorithms.f90 lines 229-254 - - Parameters - ---------- - cart : float array - frac : float array - recip_lat : float array - - ================================================================== - Convert from fractional to Cartesian coordinates - =================================================================== - """ - _OptaPyDOS.f90wrap_utility_cart_to_frac(cart=cart, frac=frac, \ - recip_lat=recip_lat) - - @staticmethod - def algorithms_erf(x): - """ - algorithms_erf = algorithms_erf(x) - - - Defined at ../src/algorithms.f90 lines 256-310 - - Parameters - ---------- - x : float - - Returns - ------- - algorithms_erf : float - - """ - algorithms_erf = _OptaPyDOS.f90wrap_algorithms_erf(x=x) - return algorithms_erf - - _dt_array_initialisers = [] - - -od_algorithms = Od_Algorithms() - -class Od_Cell(f90wrap.runtime.FortranModule): - """ - Module od_cell - - - Defined at ../src/cell.f90 lines 35-1124 - - """ - @staticmethod - def cell_find_mp_grid(kpoints, num_kpts, kpoint_grid_dim, kpoint_offset=None): - """ - cell_find_mp_grid(kpoints, num_kpts, kpoint_grid_dim[, kpoint_offset]) - - - Defined at ../src/cell.f90 lines 90-323 - - Parameters - ---------- - kpoints : float array - num_kpts : int - kpoint_grid_dim : int array - kpoint_offset : float array - - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_find_mp_grid(kpoints=kpoints, num_kpts=num_kpts, \ - kpoint_grid_dim=kpoint_grid_dim, kpoint_offset=kpoint_offset) - - @staticmethod - def cell_get_symmetry(): - """ - cell_get_symmetry() - - - Defined at ../src/cell.f90 lines 330-408 - - - ========================================================================= - Read in the cell symmetries - ------------------------------------------------------------------------- - Arguments: kpoints - an array of kpoints - num_kpts - size of the kpoint array - ------------------------------------------------------------------------- - Returns: kpint_grid_dim - the number of kpoints in each dimension - ------------------------------------------------------------------------- - Parent module variables used: None - ------------------------------------------------------------------------- - Modules used: None - ------------------------------------------------------------------------- - Key Internal Variables: - Described below - ------------------------------------------------------------------------- - Necessary conditions: None - -------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - JRY, April 2011 - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_get_symmetry() - - @staticmethod - def cell_read_cell(): - """ - cell_read_cell() - - - Defined at ../src/cell.f90 lines 413-712 - - - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_read_cell() - - @staticmethod - def cell_get_atoms(): - """ - cell_get_atoms() - - - Defined at ../src/cell.f90 lines 717-953 - - - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_get_atoms() - - @staticmethod - def cell_calc_lattice(): - """ - cell_calc_lattice() - - - Defined at ../src/cell.f90 lines 956-1013 - - - ========================================================================= - Begin with a real lattice. Convert from bohr. Calculate a reciprocal - lattice and the volume of the cell - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables used: real_lattice, recip_lattice, cell_volume - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by Andrew Morris from the LinDOS program 11/10/2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_calc_lattice() - - @staticmethod - def cell_report_parameters(): - """ - cell_report_parameters() - - - Defined at ../src/cell.f90 lines 1016-1063 - - - ========================================================================= - Begin with a real lattice. Convert from bohr. Calculate a reciprocal - lattice and the volume of the cell - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables used: real_lattice, recip_lattice, cell_volume - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by J R Yates, modified A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_cell_report_parameters() - - @staticmethod - def cell_dist(): - """ - cell_dist() - - - Defined at ../src/cell.f90 lines 1065-1124 - - - ------------------------------------------------------------------------- - """ - _OptaPyDOS.f90wrap_cell_dist() - - @property - def real_lattice(self): - """ - Element real_lattice ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 43 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__real_lattice(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - real_lattice = self._arrays[array_handle] - else: - real_lattice = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__real_lattice) - self._arrays[array_handle] = real_lattice - return real_lattice - - @real_lattice.setter - def real_lattice(self, real_lattice): - self.real_lattice[...] = real_lattice - - @property - def recip_lattice(self): - """ - Element recip_lattice ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 44 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__recip_lattice(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - recip_lattice = self._arrays[array_handle] - else: - recip_lattice = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__recip_lattice) - self._arrays[array_handle] = recip_lattice - return recip_lattice - - @recip_lattice.setter - def recip_lattice(self, recip_lattice): - self.recip_lattice[...] = recip_lattice - - @property - def cell_volume(self): - """ - Element cell_volume ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 45 - - """ - return _OptaPyDOS.f90wrap_od_cell__get__cell_volume() - - @cell_volume.setter - def cell_volume(self, cell_volume): - _OptaPyDOS.f90wrap_od_cell__set__cell_volume(cell_volume) - - @property - def kpoint_r(self): - """ - Element kpoint_r ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 51 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__kpoint_r(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - kpoint_r = self._arrays[array_handle] - else: - kpoint_r = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__kpoint_r) - self._arrays[array_handle] = kpoint_r - return kpoint_r - - @kpoint_r.setter - def kpoint_r(self, kpoint_r): - self.kpoint_r[...] = kpoint_r - - @property - def kpoint_r_cart(self): - """ - Element kpoint_r_cart ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 52 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__kpoint_r_cart(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - kpoint_r_cart = self._arrays[array_handle] - else: - kpoint_r_cart = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__kpoint_r_cart) - self._arrays[array_handle] = kpoint_r_cart - return kpoint_r_cart - - @kpoint_r_cart.setter - def kpoint_r_cart(self, kpoint_r_cart): - self.kpoint_r_cart[...] = kpoint_r_cart - - @property - def kpoint_weight(self): - """ - Element kpoint_weight ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 53 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__kpoint_weight(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - kpoint_weight = self._arrays[array_handle] - else: - kpoint_weight = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__kpoint_weight) - self._arrays[array_handle] = kpoint_weight - return kpoint_weight - - @kpoint_weight.setter - def kpoint_weight(self, kpoint_weight): - self.kpoint_weight[...] = kpoint_weight - - @property - def num_kpoints_on_node(self): - """ - Element num_kpoints_on_node ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 54 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__num_kpoints_on_node(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - num_kpoints_on_node = self._arrays[array_handle] - else: - num_kpoints_on_node = \ - f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__num_kpoints_on_node) - self._arrays[array_handle] = num_kpoints_on_node - return num_kpoints_on_node - - @num_kpoints_on_node.setter - def num_kpoints_on_node(self, num_kpoints_on_node): - self.num_kpoints_on_node[...] = num_kpoints_on_node - - @property - def nkpoints(self): - """ - Element nkpoints ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 57 - - """ - return _OptaPyDOS.f90wrap_od_cell__get__nkpoints() - - @nkpoints.setter - def nkpoints(self, nkpoints): - _OptaPyDOS.f90wrap_od_cell__set__nkpoints(nkpoints) - - @property - def kpoint_grid_dim(self): - """ - Element kpoint_grid_dim ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 58 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__kpoint_grid_dim(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - kpoint_grid_dim = self._arrays[array_handle] - else: - kpoint_grid_dim = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__kpoint_grid_dim) - self._arrays[array_handle] = kpoint_grid_dim - return kpoint_grid_dim - - @kpoint_grid_dim.setter - def kpoint_grid_dim(self, kpoint_grid_dim): - self.kpoint_grid_dim[...] = kpoint_grid_dim - - @property - def num_crystal_symmetry_operations(self): - """ - Element num_crystal_symmetry_operations ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 62 - - """ - return _OptaPyDOS.f90wrap_od_cell__get__num_crystal_symmetry_operations() - - @num_crystal_symmetry_operations.setter - def num_crystal_symmetry_operations(self, num_crystal_symmetry_operations): - \ - _OptaPyDOS.f90wrap_od_cell__set__num_crystal_symmetry_operations(num_crystal_symmetry_operations) - - @property - def crystal_symmetry_disps(self): - """ - Element crystal_symmetry_disps ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 63 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__crystal_symmetry_disps(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - crystal_symmetry_disps = self._arrays[array_handle] - else: - crystal_symmetry_disps = \ - f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__crystal_symmetry_disps) - self._arrays[array_handle] = crystal_symmetry_disps - return crystal_symmetry_disps - - @crystal_symmetry_disps.setter - def crystal_symmetry_disps(self, crystal_symmetry_disps): - self.crystal_symmetry_disps[...] = crystal_symmetry_disps - - @property - def crystal_symmetry_operations(self): - """ - Element crystal_symmetry_operations ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 64 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__crystal_symmetry_operations(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - crystal_symmetry_operations = self._arrays[array_handle] - else: - crystal_symmetry_operations = \ - f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__crystal_symmetry_operations) - self._arrays[array_handle] = crystal_symmetry_operations - return crystal_symmetry_operations - - @crystal_symmetry_operations.setter - def crystal_symmetry_operations(self, crystal_symmetry_operations): - self.crystal_symmetry_operations[...] = crystal_symmetry_operations - - @property - def atoms_pos_frac(self): - """ - Element atoms_pos_frac ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 67 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__atoms_pos_frac(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - atoms_pos_frac = self._arrays[array_handle] - else: - atoms_pos_frac = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__atoms_pos_frac) - self._arrays[array_handle] = atoms_pos_frac - return atoms_pos_frac - - @atoms_pos_frac.setter - def atoms_pos_frac(self, atoms_pos_frac): - self.atoms_pos_frac[...] = atoms_pos_frac - - @property - def atoms_pos_cart(self): - """ - Element atoms_pos_cart ftype=real(kind=dp) pytype=float - - - Defined at ../src/cell.f90 line 68 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__atoms_pos_cart(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - atoms_pos_cart = self._arrays[array_handle] - else: - atoms_pos_cart = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__atoms_pos_cart) - self._arrays[array_handle] = atoms_pos_cart - return atoms_pos_cart - - @atoms_pos_cart.setter - def atoms_pos_cart(self, atoms_pos_cart): - self.atoms_pos_cart[...] = atoms_pos_cart - - @property - def atoms_species_num(self): - """ - Element atoms_species_num ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 69 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__atoms_species_num(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - atoms_species_num = self._arrays[array_handle] - else: - atoms_species_num = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__atoms_species_num) - self._arrays[array_handle] = atoms_species_num - return atoms_species_num - - @atoms_species_num.setter - def atoms_species_num(self, atoms_species_num): - self.atoms_species_num[...] = atoms_species_num - - @property - def atoms_label(self): - """ - Element atoms_label ftype=character(len=maxlen) pytype=str - - - Defined at ../src/cell.f90 line 70 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__atoms_label(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - atoms_label = self._arrays[array_handle] - else: - atoms_label = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__atoms_label) - self._arrays[array_handle] = atoms_label - return atoms_label - - @atoms_label.setter - def atoms_label(self, atoms_label): - self.atoms_label[...] = atoms_label - - @property - def atoms_symbol(self): - """ - Element atoms_symbol ftype=character(len=2) pytype=str - - - Defined at ../src/cell.f90 line 71 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_cell__array__atoms_symbol(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - atoms_symbol = self._arrays[array_handle] - else: - atoms_symbol = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_cell__array__atoms_symbol) - self._arrays[array_handle] = atoms_symbol - return atoms_symbol - - @atoms_symbol.setter - def atoms_symbol(self, atoms_symbol): - self.atoms_symbol[...] = atoms_symbol - - @property - def num_atoms(self): - """ - Element num_atoms ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 72 - - """ - return _OptaPyDOS.f90wrap_od_cell__get__num_atoms() - - @num_atoms.setter - def num_atoms(self, num_atoms): - _OptaPyDOS.f90wrap_od_cell__set__num_atoms(num_atoms) - - @property - def num_species(self): - """ - Element num_species ftype=integer pytype=int - - - Defined at ../src/cell.f90 line 73 - - """ - return _OptaPyDOS.f90wrap_od_cell__get__num_species() - - @num_species.setter - def num_species(self, num_species): - _OptaPyDOS.f90wrap_od_cell__set__num_species(num_species) - - def __str__(self): - ret = ['{\n'] - ret.append(' real_lattice : ') - ret.append(repr(self.real_lattice)) - ret.append(',\n recip_lattice : ') - ret.append(repr(self.recip_lattice)) - ret.append(',\n cell_volume : ') - ret.append(repr(self.cell_volume)) - ret.append(',\n kpoint_r : ') - ret.append(repr(self.kpoint_r)) - ret.append(',\n kpoint_r_cart : ') - ret.append(repr(self.kpoint_r_cart)) - ret.append(',\n kpoint_weight : ') - ret.append(repr(self.kpoint_weight)) - ret.append(',\n num_kpoints_on_node : ') - ret.append(repr(self.num_kpoints_on_node)) - ret.append(',\n nkpoints : ') - ret.append(repr(self.nkpoints)) - ret.append(',\n kpoint_grid_dim : ') - ret.append(repr(self.kpoint_grid_dim)) - ret.append(',\n num_crystal_symmetry_operations : ') - ret.append(repr(self.num_crystal_symmetry_operations)) - ret.append(',\n crystal_symmetry_disps : ') - ret.append(repr(self.crystal_symmetry_disps)) - ret.append(',\n crystal_symmetry_operations : ') - ret.append(repr(self.crystal_symmetry_operations)) - ret.append(',\n atoms_pos_frac : ') - ret.append(repr(self.atoms_pos_frac)) - ret.append(',\n atoms_pos_cart : ') - ret.append(repr(self.atoms_pos_cart)) - ret.append(',\n atoms_species_num : ') - ret.append(repr(self.atoms_species_num)) - ret.append(',\n atoms_label : ') - ret.append(repr(self.atoms_label)) - ret.append(',\n atoms_symbol : ') - ret.append(repr(self.atoms_symbol)) - ret.append(',\n num_atoms : ') - ret.append(repr(self.num_atoms)) - ret.append(',\n num_species : ') - ret.append(repr(self.num_species)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_cell = Od_Cell() - -class Od_Comms(f90wrap.runtime.FortranModule): - """ - Module od_comms - - - Defined at ../src/comms.F90 lines 29-665 - - """ - @staticmethod - def comms_setup(): - """ - comms_setup() - - - Defined at ../src/comms.F90 lines 87-107 - - - """ - _OptaPyDOS.f90wrap_comms_setup() - - @staticmethod - def comms_end(): - """ - comms_end() - - - Defined at ../src/comms.F90 lines 109-122 - - - """ - _OptaPyDOS.f90wrap_comms_end() - - @staticmethod - def _comms_bcast_int(array, size_bn): - """ - _comms_bcast_int(array, size_bn) - - - Defined at ../src/comms.F90 lines 124-145 - - Parameters - ---------- - array : int - size_bn : int - - """ - _OptaPyDOS.f90wrap_comms_bcast_int(array=array, size_bn=size_bn) - - @staticmethod - def _comms_bcast_logical(array, size_bn): - """ - _comms_bcast_logical(array, size_bn) - - - Defined at ../src/comms.F90 lines 170-191 - - Parameters - ---------- - array : bool - size_bn : int - - """ - _OptaPyDOS.f90wrap_comms_bcast_logical(array=array, size_bn=size_bn) - - @staticmethod - def _comms_bcast_real(array, size_bn): - """ - _comms_bcast_real(array, size_bn) - - - Defined at ../src/comms.F90 lines 147-168 - - Parameters - ---------- - array : float - size_bn : int - - """ - _OptaPyDOS.f90wrap_comms_bcast_real(array=array, size_bn=size_bn) - - @staticmethod - def _comms_bcast_cmplx(array, size_bn): - """ - _comms_bcast_cmplx(array, size_bn) - - - Defined at ../src/comms.F90 lines 216-238 - - Parameters - ---------- - array : complex - size_bn : int - - """ - _OptaPyDOS.f90wrap_comms_bcast_cmplx(array=array, size_bn=size_bn) - - @staticmethod - def _comms_bcast_char(array, size_bn): - """ - _comms_bcast_char(array, size_bn) - - - Defined at ../src/comms.F90 lines 193-214 - - Parameters - ---------- - array : str - size_bn : int - - """ - _OptaPyDOS.f90wrap_comms_bcast_char(array=array, size_bn=size_bn) - - @staticmethod - def comms_bcast(*args, **kwargs): - """ - comms_bcast(*args, **kwargs) - - - Defined at ../src/comms.F90 lines 54-60 - - Overloaded interface containing the following procedures: - _comms_bcast_int - _comms_bcast_logical - _comms_bcast_real - _comms_bcast_cmplx - _comms_bcast_char - - """ - for proc in [_comms_bcast_int, _comms_bcast_logical, _comms_bcast_real, \ - _comms_bcast_cmplx, _comms_bcast_char]: - try: - return proc(*args, **kwargs) - except TypeError: - continue - - @staticmethod - def _comms_send_int(array, size_bn, to): - """ - _comms_send_int(array, size_bn, to) - - - Defined at ../src/comms.F90 lines 268-292 - - Parameters - ---------- - array : int - size_bn : int - to : int - - """ - _OptaPyDOS.f90wrap_comms_send_int(array=array, size_bn=size_bn, to=to) - - @staticmethod - def _comms_send_logical(array, size_bn, to): - """ - _comms_send_logical(array, size_bn, to) - - - Defined at ../src/comms.F90 lines 242-266 - - Parameters - ---------- - array : bool - size_bn : int - to : int - - """ - _OptaPyDOS.f90wrap_comms_send_logical(array=array, size_bn=size_bn, to=to) - - @staticmethod - def _comms_send_real(array, size_bn, to): - """ - _comms_send_real(array, size_bn, to) - - - Defined at ../src/comms.F90 lines 320-344 - - Parameters - ---------- - array : float - size_bn : int - to : int - - """ - _OptaPyDOS.f90wrap_comms_send_real(array=array, size_bn=size_bn, to=to) - - @staticmethod - def _comms_send_cmplx(array, size_bn, to): - """ - _comms_send_cmplx(array, size_bn, to) - - - Defined at ../src/comms.F90 lines 346-370 - - Parameters - ---------- - array : complex - size_bn : int - to : int - - """ - _OptaPyDOS.f90wrap_comms_send_cmplx(array=array, size_bn=size_bn, to=to) - - @staticmethod - def _comms_send_char(array, size_bn, to): - """ - _comms_send_char(array, size_bn, to) - - - Defined at ../src/comms.F90 lines 294-318 - - Parameters - ---------- - array : str - size_bn : int - to : int - - """ - _OptaPyDOS.f90wrap_comms_send_char(array=array, size_bn=size_bn, to=to) - - @staticmethod - def comms_send(*args, **kwargs): - """ - comms_send(*args, **kwargs) - - - Defined at ../src/comms.F90 lines 62-68 - - Overloaded interface containing the following procedures: - _comms_send_int - _comms_send_logical - _comms_send_real - _comms_send_cmplx - _comms_send_char - - """ - for proc in [_comms_send_int, _comms_send_logical, _comms_send_real, \ - _comms_send_cmplx, _comms_send_char]: - try: - return proc(*args, **kwargs) - except TypeError: - continue - - @staticmethod - def _comms_recv_int(array, size_bn, from_): - """ - _comms_recv_int(array, size_bn, from_) - - - Defined at ../src/comms.F90 lines 401-426 - - Parameters - ---------- - array : int - size_bn : int - from_ : int - - """ - _OptaPyDOS.f90wrap_comms_recv_int(array=array, size_bn=size_bn, from_=from_) - - @staticmethod - def _comms_recv_logical(array, size_bn, from_): - """ - _comms_recv_logical(array, size_bn, from_) - - - Defined at ../src/comms.F90 lines 374-399 - - Parameters - ---------- - array : bool - size_bn : int - from_ : int - - """ - _OptaPyDOS.f90wrap_comms_recv_logical(array=array, size_bn=size_bn, from_=from_) - - @staticmethod - def _comms_recv_real(array, size_bn, from_): - """ - _comms_recv_real(array, size_bn, from_) - - - Defined at ../src/comms.F90 lines 455-480 - - Parameters - ---------- - array : float - size_bn : int - from_ : int - - """ - _OptaPyDOS.f90wrap_comms_recv_real(array=array, size_bn=size_bn, from_=from_) - - @staticmethod - def _comms_recv_cmplx(array, size_bn, from_): - """ - _comms_recv_cmplx(array, size_bn, from_) - - - Defined at ../src/comms.F90 lines 482-509 - - Parameters - ---------- - array : complex - size_bn : int - from_ : int - - """ - _OptaPyDOS.f90wrap_comms_recv_cmplx(array=array, size_bn=size_bn, from_=from_) - - @staticmethod - def _comms_recv_char(array, size_bn, from_): - """ - _comms_recv_char(array, size_bn, from_) - - - Defined at ../src/comms.F90 lines 428-453 - - Parameters - ---------- - array : str - size_bn : int - from_ : int - - """ - _OptaPyDOS.f90wrap_comms_recv_char(array=array, size_bn=size_bn, from_=from_) - - @staticmethod - def comms_recv(*args, **kwargs): - """ - comms_recv(*args, **kwargs) - - - Defined at ../src/comms.F90 lines 70-76 - - Overloaded interface containing the following procedures: - _comms_recv_int - _comms_recv_logical - _comms_recv_real - _comms_recv_cmplx - _comms_recv_char - - """ - for proc in [_comms_recv_int, _comms_recv_logical, _comms_recv_real, \ - _comms_recv_cmplx, _comms_recv_char]: - try: - return proc(*args, **kwargs) - except TypeError: - continue - - @staticmethod - def _comms_reduce_int(array, size_bn, op): - """ - _comms_reduce_int(array, size_bn, op) - - - Defined at ../src/comms.F90 lines 528-571 - - Parameters - ---------- - array : int - size_bn : int - op : str - - """ - _OptaPyDOS.f90wrap_comms_reduce_int(array=array, size_bn=size_bn, op=op) - - @staticmethod - def _comms_reduce_real(array, size_bn, op): - """ - _comms_reduce_real(array, size_bn, op) - - - Defined at ../src/comms.F90 lines 573-620 - - Parameters - ---------- - array : float - size_bn : int - op : str - - """ - _OptaPyDOS.f90wrap_comms_reduce_real(array=array, size_bn=size_bn, op=op) - - @staticmethod - def _comms_reduce_cmplx(array, size_bn, op): - """ - _comms_reduce_cmplx(array, size_bn, op) - - - Defined at ../src/comms.F90 lines 622-663 - - Parameters - ---------- - array : complex - size_bn : int - op : str - - """ - _OptaPyDOS.f90wrap_comms_reduce_cmplx(array=array, size_bn=size_bn, op=op) - - @staticmethod - def comms_reduce(*args, **kwargs): - """ - comms_reduce(*args, **kwargs) - - - Defined at ../src/comms.F90 lines 78-83 - - Overloaded interface containing the following procedures: - _comms_reduce_int - _comms_reduce_real - _comms_reduce_cmplx - - """ - for proc in [_comms_reduce_int, _comms_reduce_real, _comms_reduce_cmplx]: - try: - return proc(*args, **kwargs) - except TypeError: - continue - - @property - def on_root(self): - """ - Element on_root ftype=logical pytype=bool - - - Defined at ../src/comms.F90 line 41 - - """ - return _OptaPyDOS.f90wrap_od_comms__get__on_root() - - @on_root.setter - def on_root(self, on_root): - _OptaPyDOS.f90wrap_od_comms__set__on_root(on_root) - - @property - def num_nodes(self): - """ - Element num_nodes ftype=integer pytype=int - - - Defined at ../src/comms.F90 line 42 - - """ - return _OptaPyDOS.f90wrap_od_comms__get__num_nodes() - - @num_nodes.setter - def num_nodes(self, num_nodes): - _OptaPyDOS.f90wrap_od_comms__set__num_nodes(num_nodes) - - @property - def my_node_id(self): - """ - Element my_node_id ftype=integer pytype=int - - - Defined at ../src/comms.F90 line 42 - - """ - return _OptaPyDOS.f90wrap_od_comms__get__my_node_id() - - @my_node_id.setter - def my_node_id(self, my_node_id): - _OptaPyDOS.f90wrap_od_comms__set__my_node_id(my_node_id) - - @property - def root_id(self): - """ - Element root_id ftype=integer pytype=int - - - Defined at ../src/comms.F90 line 43 - - """ - return _OptaPyDOS.f90wrap_od_comms__get__root_id() - - def __str__(self): - ret = ['{\n'] - ret.append(' on_root : ') - ret.append(repr(self.on_root)) - ret.append(',\n num_nodes : ') - ret.append(repr(self.num_nodes)) - ret.append(',\n my_node_id : ') - ret.append(repr(self.my_node_id)) - ret.append(',\n root_id : ') - ret.append(repr(self.root_id)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_comms = Od_Comms() - -class Od_Constants(f90wrap.runtime.FortranModule): - """ - Module od_constants - - - Defined at ../src/constants.f90 lines 32-65 - - """ - @property - def optados_version(self): - """ - Element optados_version ftype=character(len=6) pytype=str - - - Defined at ../src/constants.f90 line 37 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__optados_version() - - @property - def copyright(self): - """ - Element copyright ftype=character(len=14) pytype=str - - - Defined at ../src/constants.f90 line 38 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__copyright() - - @property - def dp(self): - """ - Element dp ftype=integer pytype=int - - - Defined at ../src/constants.f90 line 40 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__dp() - - @property - def pi(self): - """ - Element pi ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 42 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__pi() - - @property - def h2ev(self): - """ - Element h2ev ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 43 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__h2ev() - - @property - def bohr2ang(self): - """ - Element bohr2ang ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 44 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__bohr2ang() - - @property - def inv_sqrt_two_pi(self): - """ - Element inv_sqrt_two_pi ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 45 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__inv_sqrt_two_pi() - - @property - def twopi(self): - """ - Element twopi ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 46 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__twopi() - - @property - def sqrt_two(self): - """ - Element sqrt_two ftype=real(kind=dp) pytype=float - - - Defined at ../src/constants.f90 line 47 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__sqrt_two() - - @property - def cmplx_0(self): - """ - Element cmplx_0 ftype=complex(dp) pytype=complex - - - Defined at ../src/constants.f90 line 48 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__cmplx_0() - - @property - def cmplx_i(self): - """ - Element cmplx_i ftype=complex(dp) pytype=complex - - - Defined at ../src/constants.f90 line 49 - - """ - return _OptaPyDOS.f90wrap_od_constants__get__cmplx_i() - - def __str__(self): - ret = ['{\n'] - ret.append(' optados_version : ') - ret.append(repr(self.optados_version)) - ret.append(',\n copyright : ') - ret.append(repr(self.copyright)) - ret.append(',\n dp : ') - ret.append(repr(self.dp)) - ret.append(',\n pi : ') - ret.append(repr(self.pi)) - ret.append(',\n h2ev : ') - ret.append(repr(self.h2ev)) - ret.append(',\n bohr2ang : ') - ret.append(repr(self.bohr2ang)) - ret.append(',\n inv_sqrt_two_pi : ') - ret.append(repr(self.inv_sqrt_two_pi)) - ret.append(',\n twopi : ') - ret.append(repr(self.twopi)) - ret.append(',\n sqrt_two : ') - ret.append(repr(self.sqrt_two)) - ret.append(',\n cmplx_0 : ') - ret.append(repr(self.cmplx_0)) - ret.append(',\n cmplx_i : ') - ret.append(repr(self.cmplx_i)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_constants = Od_Constants() - -class Od_Core(f90wrap.runtime.FortranModule): - """ - Module od_core - - - Defined at ../src/core.f90 lines 26-747 - - """ - @staticmethod - def core_calculate(): - """ - core_calculate() - - - Defined at ../src/core.f90 lines 41-82 - - - """ - _OptaPyDOS.f90wrap_core_calculate() - - @property - def matrix_weights(self): - """ - Element matrix_weights ftype=real(kind=dp) pytype=float - - - Defined at ../src/core.f90 line 33 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_core__array__matrix_weights(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - matrix_weights = self._arrays[array_handle] - else: - matrix_weights = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_core__array__matrix_weights) - self._arrays[array_handle] = matrix_weights - return matrix_weights - - @matrix_weights.setter - def matrix_weights(self, matrix_weights): - self.matrix_weights[...] = matrix_weights - - @property - def weighted_dos(self): - """ - Element weighted_dos ftype=real(kind=dp) pytype=float - - - Defined at ../src/core.f90 line 34 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_core__array__weighted_dos(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - weighted_dos = self._arrays[array_handle] - else: - weighted_dos = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_core__array__weighted_dos) - self._arrays[array_handle] = weighted_dos - return weighted_dos - - @weighted_dos.setter - def weighted_dos(self, weighted_dos): - self.weighted_dos[...] = weighted_dos - - @property - def weighted_dos_broadened(self): - """ - Element weighted_dos_broadened ftype=real(kind=dp) pytype=float - - - Defined at ../src/core.f90 line 35 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_core__array__weighted_dos_broadened(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - weighted_dos_broadened = self._arrays[array_handle] - else: - weighted_dos_broadened = \ - f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_core__array__weighted_dos_broadened) - self._arrays[array_handle] = weighted_dos_broadened - return weighted_dos_broadened - - @weighted_dos_broadened.setter - def weighted_dos_broadened(self, weighted_dos_broadened): - self.weighted_dos_broadened[...] = weighted_dos_broadened - - def __str__(self): - ret = ['{\n'] - ret.append(' matrix_weights : ') - ret.append(repr(self.matrix_weights)) - ret.append(',\n weighted_dos : ') - ret.append(repr(self.weighted_dos)) - ret.append(',\n weighted_dos_broadened : ') - ret.append(repr(self.weighted_dos_broadened)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_core = Od_Core() - -class Od_Dos(f90wrap.runtime.FortranModule): - """ - Module od_dos - - - Defined at ../src/dos.f90 lines 24-323 - - """ - @staticmethod - def dos_calculate(): - """ - dos_calculate() - - - Defined at ../src/dos.f90 lines 35-153 - - - =============================================================================== - Main routine in dos module, drives the calculation of density of states for - both task : dos and also if it is required elsewhere. - ------------------------------------------------------------------------------- - Arguments: matrix_weigths (in) (opt) : LCAO or other weightings for DOS - weighted_dos (out)(opt) : Output DOS weigthed by matrix_weights - ------------------------------------------------------------------------------- - Parent Module Varables Used: mw, E, dos_adaptive, dos_fixed, dos_linear - intdos_adaptive, intdos_fixed, intdos_linear, efermi_fixed, efermi_adaptive - efermi_linear, delta_bins, calc_weighted_dos - ------------------------------------------------------------------------------- - Modules Used: see below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: One of linear, adaptive or fixed must be .true. - ------------------------------------------------------------------------------- - Known Worries: (1) If more than one of linear, adaptive or fixed are set it - uses the most complicated method. - (2) It should be possible to pass optioinal arguments to sub programs as - optional argumnets without checking whether they are there or not. g95 will - allow this behaviour. gfotran will not. - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_calculate() - - @staticmethod - def write_dos(e, dos, intdos, dos_name): - """ - write_dos(e, dos, intdos, dos_name) - - - Defined at ../src/dos.f90 lines 156-257 - - Parameters - ---------- - e : float array - dos : float array - intdos : float array - dos_name : str - - =============================================================================== - This routine receives an energy scale, a density of states and a file name - and writes out the DOS to disk - ------------------------------------------------------------------------------- - Arguments: E (in) : The energy scale - dos (in) : The density of states - intdos (in) : The integrated DOS - dos_name(in) : Name of the output file - ------------------------------------------------------------------------------- - Parent Module Varables Used: None - ------------------------------------------------------------------------------- - Modules Used: See below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: None - ------------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 - =============================================================================== - """ - _OptaPyDOS.f90wrap_write_dos(e=e, dos=dos, intdos=intdos, dos_name=dos_name) - - @staticmethod - def write_dos_xmgrace(dos_name, e, dos): - """ - write_dos_xmgrace(dos_name, e, dos) - - - Defined at ../src/dos.f90 lines 260-323 - - Parameters - ---------- - dos_name : str - e : float array - dos : float array - - =============================================================================== - """ - _OptaPyDOS.f90wrap_write_dos_xmgrace(dos_name=dos_name, e=e, dos=dos) - - _dt_array_initialisers = [] - - -od_dos = Od_Dos() - -class Od_Dos_Utils(f90wrap.runtime.FortranModule): - """ - Module od_dos_utils - - - Defined at ../src/dos_utils.f90 lines 34-1863 - - """ - @staticmethod - def dos_utils_calculate(): - """ - dos_utils_calculate() - - - Defined at ../src/dos_utils.f90 lines 92-297 - - - =============================================================================== - Main routine in dos module, drives the calculation of density of states for - both task : dos and also if it is required elsewhere. - ------------------------------------------------------------------------------- - Arguments: matrix_weigths (in) (opt) : LCAO or other weightings for DOS - weighted_dos (out)(opt) : Output DOS weigthed by matrix_weights - ------------------------------------------------------------------------------- - Parent Module Varables Used: mw, E, dos_adaptive, dos_fixed, dos_linear - intdos_adaptive, intdos_fixed, intdos_linear, efermi_fixed, efermi_adaptive - efermi_linear, delta_bins, calc_weighted_dos - ------------------------------------------------------------------------------- - Modules Used: see below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: One of linear, adaptive or fixed must be .true. - ------------------------------------------------------------------------------- - Known Worries: (1) If more than one of linear, adaptive or fixed are set it - uses the most complicated method. - (2) It should be possible to pass optioinal arguments to sub programs as - optional argumnets without checking whether they are there or not. g95 will - allow this behaviour. gfotran will not. - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_utils_calculate() - - @staticmethod - def dos_utils_set_efermi(): - """ - dos_utils_set_efermi() - - - Defined at ../src/dos_utils.f90 lines 300-393 - - - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_utils_set_efermi() - - @staticmethod - def dos_utils_compute_dos_at_efermi(): - """ - dos_utils_compute_dos_at_efermi() - - - Defined at ../src/dos_utils.f90 lines 396-460 - - - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_utils_compute_dos_at_efermi() - - @staticmethod - def dos_utils_compute_bandgap(): - """ - dos_utils_compute_bandgap() - - - Defined at ../src/dos_utils.f90 lines 463-749 - - - =============================================================================== - Modified from LINDOS -- AJM 3rd June 2011 - Rewritten 31/1/12 AJM - """ - _OptaPyDOS.f90wrap_dos_utils_compute_bandgap() - - @staticmethod - def dos_utils_compute_band_energies(): - """ - dos_utils_compute_band_energies() - - - Defined at ../src/dos_utils.f90 lines 856-929 - - - =============================================================================== - High-level subroutine to compute band energies of the DOS calculated. - Calculates using the band_energies directly and compares with the - function calc_band_energies which does the low level computation on the DOS. - ------------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------------- - Parent Module Varables Used: E,dos_fixed,dos_adaptive,dos_linear - ------------------------------------------------------------------------------- - Modules Used: See below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: E must be set - ------------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_utils_compute_band_energies() - - @staticmethod - def dos_utils_deallocate(): - """ - dos_utils_deallocate() - - - Defined at ../src/dos_utils.f90 lines 1113-1146 - - - """ - _OptaPyDOS.f90wrap_dos_utils_deallocate() - - @staticmethod - def doslin_sub_cell_corners(grad, step, energy, eigenv): - """ - doslin_sub_cell_corners(grad, step, energy, eigenv) - - - Defined at ../src/dos_utils.f90 lines 1333-1402 - - Parameters - ---------- - grad : float array - step : float array - energy : float - eigenv : float array - - =============================================================================== - A helper subroutine for calculated_dos, which is used for the linear - broadening method. This routine extrapolates the energies at the corner of the - sub cells by using the gradient at the centre of the cell - ------------------------------------------------------------------------------- - Arguments: grad (in) : The Gradient of the band at the centre of a sub-cell - step (in) : The directions to the edge of the sub_cell - energy (in) : The Band energy at the centre of the sub cell - EigenV (out): The Energies at the corners of the sub-cell - ------------------------------------------------------------------------------- - Parent Module Varables Used: None - ------------------------------------------------------------------------------- - Modules Used: See below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: None - ------------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 Heavliy modified from LinDOS - =============================================================================== - """ - _OptaPyDOS.f90wrap_doslin_sub_cell_corners(grad=grad, step=step, energy=energy, \ - eigenv=eigenv) - - @staticmethod - def doslin(e0, e1, e2, e3, e4, e): - """ - doslin, int_bn = doslin(e0, e1, e2, e3, e4, e) - - - Defined at ../src/dos_utils.f90 lines 1405-1542 - - Parameters - ---------- - e0 : float - e1 : float - e2 : float - e3 : float - e4 : float - e : float - - Returns - ------- - doslin : float - int_bn : float - - =============================================================================== - Return the DoS contribution for a linear band portion and a cubic cell - ------------------------------------------------------------------------------- - Arguments: e0 (in) : Energy at centre of sub cell - e1,e2,e3,e4 (in) : Energies of the four lowest corners of the sub cell - e (in) : Energy at which DOS is evaluated - int (out): Integrated DOS contribution for energy, E) - (The function itself returns the DOS couribution for energy, E) - ------------------------------------------------------------------------------- - Parent Module Varables Used: None - ------------------------------------------------------------------------------- - Modules Used: See below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: None - ------------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------------- - Written by : C J Pickard. From LinDOS. Extra Comments A J Morris Sept 2010 - =============================================================================== - """ - doslin, int_bn = _OptaPyDOS.f90wrap_doslin(e0=e0, e1=e1, e2=e2, e3=e3, e4=e4, \ - e=e) - return doslin, int_bn - - @staticmethod - def dos_utils_calculate_at_e(energy, dos_at_e, weighted_dos_at_e=None): - """ - dos_utils_calculate_at_e(energy, dos_at_e[, weighted_dos_at_e]) - - - Defined at ../src/dos_utils.f90 lines 1545-1670 - - Parameters - ---------- - energy : float - dos_at_e : float array - weighted_dos_at_e : float array - - =============================================================================== - Main routine in dos module, drives the calculation of density of states for - both task : dos and also if it is required elsewhere. - ------------------------------------------------------------------------------- - Arguments: matrix_weigths (in) (opt) : LCAO or other weightings for DOS - weighted_dos (out)(opt) : Output DOS weigthed by matrix_weights - ------------------------------------------------------------------------------- - Parent Module Varables Used: mw, E, dos_adaptive, dos_fixed, dos_linear - intdos_adaptive, intdos_fixed, intdos_linear, efermi_fixed, efermi_adaptive - efermi_linear, delta_bins, calc_weighted_dos - ------------------------------------------------------------------------------- - Modules Used: see below - ------------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------------- - Necessary Conditions: One of linear, adaptive or fixed must be .true. - ------------------------------------------------------------------------------- - Known Worries: (1) If more than one of linear, adaptive or fixed are set it - uses the most complicated method. - (2) It should be possible to pass optioinal arguments to sub programs as - optional argumnets without checking whether they are there or not. g95 will - allow this behaviour. gfotran will not. - ------------------------------------------------------------------------------- - Written by : A J Morris December 2010 - =============================================================================== - """ - _OptaPyDOS.f90wrap_dos_utils_calculate_at_e(energy=energy, dos_at_e=dos_at_e, \ - weighted_dos_at_e=weighted_dos_at_e) - - @property - def dos_adaptive(self): - """ - Element dos_adaptive ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 47 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_adaptive(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_adaptive = self._arrays[array_handle] - else: - dos_adaptive = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_adaptive) - self._arrays[array_handle] = dos_adaptive - return dos_adaptive - - @dos_adaptive.setter - def dos_adaptive(self, dos_adaptive): - self.dos_adaptive[...] = dos_adaptive - - @property - def dos_fixed(self): - """ - Element dos_fixed ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 48 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_fixed(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_fixed = self._arrays[array_handle] - else: - dos_fixed = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_fixed) - self._arrays[array_handle] = dos_fixed - return dos_fixed - - @dos_fixed.setter - def dos_fixed(self, dos_fixed): - self.dos_fixed[...] = dos_fixed - - @property - def dos_linear(self): - """ - Element dos_linear ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 49 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_linear(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_linear = self._arrays[array_handle] - else: - dos_linear = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__dos_linear) - self._arrays[array_handle] = dos_linear - return dos_linear - - @dos_linear.setter - def dos_linear(self, dos_linear): - self.dos_linear[...] = dos_linear - - @property - def intdos_adaptive(self): - """ - Element intdos_adaptive ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 51 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_adaptive(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - intdos_adaptive = self._arrays[array_handle] - else: - intdos_adaptive = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_adaptive) - self._arrays[array_handle] = intdos_adaptive - return intdos_adaptive - - @intdos_adaptive.setter - def intdos_adaptive(self, intdos_adaptive): - self.intdos_adaptive[...] = intdos_adaptive - - @property - def intdos_fixed(self): - """ - Element intdos_fixed ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 52 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_fixed(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - intdos_fixed = self._arrays[array_handle] - else: - intdos_fixed = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_fixed) - self._arrays[array_handle] = intdos_fixed - return intdos_fixed - - @intdos_fixed.setter - def intdos_fixed(self, intdos_fixed): - self.intdos_fixed[...] = intdos_fixed - - @property - def intdos_linear(self): - """ - Element intdos_linear ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 53 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_linear(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - intdos_linear = self._arrays[array_handle] - else: - intdos_linear = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__intdos_linear) - self._arrays[array_handle] = intdos_linear - return intdos_linear - - @intdos_linear.setter - def intdos_linear(self, intdos_linear): - self.intdos_linear[...] = intdos_linear - - @property - def e(self): - """ - Element e ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 55 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_dos_utils__array__e(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - e = self._arrays[array_handle] - else: - e = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_dos_utils__array__e) - self._arrays[array_handle] = e - return e - - @e.setter - def e(self, e): - self.e[...] = e - - @property - def efermi_fixed(self): - """ - Element efermi_fixed ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 57 - - """ - return _OptaPyDOS.f90wrap_od_dos_utils__get__efermi_fixed() - - @efermi_fixed.setter - def efermi_fixed(self, efermi_fixed): - _OptaPyDOS.f90wrap_od_dos_utils__set__efermi_fixed(efermi_fixed) - - @property - def efermi_adaptive(self): - """ - Element efermi_adaptive ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 58 - - """ - return _OptaPyDOS.f90wrap_od_dos_utils__get__efermi_adaptive() - - @efermi_adaptive.setter - def efermi_adaptive(self, efermi_adaptive): - _OptaPyDOS.f90wrap_od_dos_utils__set__efermi_adaptive(efermi_adaptive) - - @property - def efermi_linear(self): - """ - Element efermi_linear ftype=real(kind=dp) pytype=float - - - Defined at ../src/dos_utils.f90 line 59 - - """ - return _OptaPyDOS.f90wrap_od_dos_utils__get__efermi_linear() - - @efermi_linear.setter - def efermi_linear(self, efermi_linear): - _OptaPyDOS.f90wrap_od_dos_utils__set__efermi_linear(efermi_linear) - - def __str__(self): - ret = ['{\n'] - ret.append(' dos_adaptive : ') - ret.append(repr(self.dos_adaptive)) - ret.append(',\n dos_fixed : ') - ret.append(repr(self.dos_fixed)) - ret.append(',\n dos_linear : ') - ret.append(repr(self.dos_linear)) - ret.append(',\n intdos_adaptive : ') - ret.append(repr(self.intdos_adaptive)) - ret.append(',\n intdos_fixed : ') - ret.append(repr(self.intdos_fixed)) - ret.append(',\n intdos_linear : ') - ret.append(repr(self.intdos_linear)) - ret.append(',\n e : ') - ret.append(repr(self.e)) - ret.append(',\n efermi_fixed : ') - ret.append(repr(self.efermi_fixed)) - ret.append(',\n efermi_adaptive : ') - ret.append(repr(self.efermi_adaptive)) - ret.append(',\n efermi_linear : ') - ret.append(repr(self.efermi_linear)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_dos_utils = Od_Dos_Utils() - -class Od_Electronic(f90wrap.runtime.FortranModule): - """ - Module od_electronic - - - Defined at ../src/electronic.f90 lines 31-1078 - - """ - class Matrix_Weights_Array_Boundaries(f90wrap.runtime.FortranDerivedType): - """ - Type(name=matrix_weights_array_boundaries) - - - Defined at ../src/electronic.f90 lines 58-64 - - """ - def __init__(self, handle=None): - """ - self = Matrix_Weights_Array_Boundaries() - - - Defined at ../src/electronic.f90 lines 58-64 - - - Returns - ------- - this : Matrix_Weights_Array_Boundaries - Object to be constructed - - - Automatically generated constructor for matrix_weights_array_boundaries - """ - f90wrap.runtime.FortranDerivedType.__init__(self) - self._handle = _OptaPyDOS.f90wrap_matrix_weights_array_boundaries_initialise() - - def __del__(self): - """ - Destructor for class Matrix_Weights_Array_Boundaries - - - Defined at ../src/electronic.f90 lines 58-64 - - Parameters - ---------- - this : Matrix_Weights_Array_Boundaries - Object to be destructed - - - Automatically generated destructor for matrix_weights_array_boundaries - """ - if self._alloc: - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries_finalise(this=self._handle) - - @property - def norbitals(self): - """ - Element norbitals ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 59 - - """ - return \ - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__get__norbitals(self._handle) - - @norbitals.setter - def norbitals(self, norbitals): - \ - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__set__norbitals(self._handle, \ - norbitals) - - @property - def nbands(self): - """ - Element nbands ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 60 - - """ - return \ - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__get__nbands(self._handle) - - @nbands.setter - def nbands(self, nbands): - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__set__nbands(self._handle, \ - nbands) - - @property - def nkpoints(self): - """ - Element nkpoints ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 61 - - """ - return \ - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__get__nkpoints(self._handle) - - @nkpoints.setter - def nkpoints(self, nkpoints): - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__set__nkpoints(self._handle, \ - nkpoints) - - @property - def nspins(self): - """ - Element nspins ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 62 - - """ - return \ - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__get__nspins(self._handle) - - @nspins.setter - def nspins(self, nspins): - _OptaPyDOS.f90wrap_matrix_weights_array_boundaries__set__nspins(self._handle, \ - nspins) - - def __str__(self): - ret = ['{\n'] - ret.append(' norbitals : ') - ret.append(repr(self.norbitals)) - ret.append(',\n nbands : ') - ret.append(repr(self.nbands)) - ret.append(',\n nkpoints : ') - ret.append(repr(self.nkpoints)) - ret.append(',\n nspins : ') - ret.append(repr(self.nspins)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - class Orbitals(f90wrap.runtime.FortranDerivedType): - """ - Type(name=orbitals) - - - Defined at ../src/electronic.f90 lines 66-74 - - """ - def __init__(self, handle=None): - """ - self = Orbitals() - - - Defined at ../src/electronic.f90 lines 66-74 - - - Returns - ------- - this : Orbitals - Object to be constructed - - - Automatically generated constructor for orbitals - """ - f90wrap.runtime.FortranDerivedType.__init__(self) - self._handle = _OptaPyDOS.f90wrap_orbitals_initialise() - - def __del__(self): - """ - Destructor for class Orbitals - - - Defined at ../src/electronic.f90 lines 66-74 - - Parameters - ---------- - this : Orbitals - Object to be destructed - - - Automatically generated destructor for orbitals - """ - if self._alloc: - _OptaPyDOS.f90wrap_orbitals_finalise(this=self._handle) - - @property - def ion_no(self): - """ - Element ion_no ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 67 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__ion_no(self._handle) - if array_handle in self._arrays: - ion_no = self._arrays[array_handle] - else: - ion_no = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__ion_no) - self._arrays[array_handle] = ion_no - return ion_no - - @ion_no.setter - def ion_no(self, ion_no): - self.ion_no[...] = ion_no - - @property - def species_no(self): - """ - Element species_no ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 68 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__species_no(self._handle) - if array_handle in self._arrays: - species_no = self._arrays[array_handle] - else: - species_no = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__species_no) - self._arrays[array_handle] = species_no - return species_no - - @species_no.setter - def species_no(self, species_no): - self.species_no[...] = species_no - - @property - def rank_in_species(self): - """ - Element rank_in_species ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 69 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__rank_in_species(self._handle) - if array_handle in self._arrays: - rank_in_species = self._arrays[array_handle] - else: - rank_in_species = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__rank_in_species) - self._arrays[array_handle] = rank_in_species - return rank_in_species - - @rank_in_species.setter - def rank_in_species(self, rank_in_species): - self.rank_in_species[...] = rank_in_species - - @property - def am_channel(self): - """ - Element am_channel ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 70 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__am_channel(self._handle) - if array_handle in self._arrays: - am_channel = self._arrays[array_handle] - else: - am_channel = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__am_channel) - self._arrays[array_handle] = am_channel - return am_channel - - @am_channel.setter - def am_channel(self, am_channel): - self.am_channel[...] = am_channel - - @property - def shell(self): - """ - Element shell ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 71 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__shell(self._handle) - if array_handle in self._arrays: - shell = self._arrays[array_handle] - else: - shell = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__shell) - self._arrays[array_handle] = shell - return shell - - @shell.setter - def shell(self, shell): - self.shell[...] = shell - - @property - def am_channel_name(self): - """ - Element am_channel_name ftype=character(len=10) pytype=str - - - Defined at ../src/electronic.f90 line 72 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_orbitals__array__am_channel_name(self._handle) - if array_handle in self._arrays: - am_channel_name = self._arrays[array_handle] - else: - am_channel_name = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - self._handle, - _OptaPyDOS.f90wrap_orbitals__array__am_channel_name) - self._arrays[array_handle] = am_channel_name - return am_channel_name - - @am_channel_name.setter - def am_channel_name(self, am_channel_name): - self.am_channel_name[...] = am_channel_name - - def __str__(self): - ret = ['{\n'] - ret.append(' ion_no : ') - ret.append(repr(self.ion_no)) - ret.append(',\n species_no : ') - ret.append(repr(self.species_no)) - ret.append(',\n rank_in_species : ') - ret.append(repr(self.rank_in_species)) - ret.append(',\n am_channel : ') - ret.append(repr(self.am_channel)) - ret.append(',\n shell : ') - ret.append(repr(self.shell)) - ret.append(',\n am_channel_name : ') - ret.append(repr(self.am_channel_name)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - @staticmethod - def elec_report_parameters(): - """ - elec_report_parameters() - - - Defined at ../src/electronic.f90 lines 108-151 - - - ========================================================================= - Report the electronic properties in the calculation - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables nbands,num_electrons,nkpoints,kpoint_grid_dim - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_report_parameters() - - @staticmethod - def elec_read_band_gradient(): - """ - elec_read_band_gradient() - - - Defined at ../src/electronic.f90 lines 154-282 - - - ========================================================================= - Read the .cst_ome file in paralell if appropriate. These are the - gradients of the bands at each kpoint. - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables: band_gradient,nspins,nbands - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_read_band_gradient() - - @staticmethod - def elec_read_optical_mat(): - """ - elec_read_optical_mat() - - - Defined at ../src/electronic.f90 lines 285-429 - - - ========================================================================= - Read the .cst_ome file in paralell if appropriate. These are the - gradients of the bands at each kpoint. - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables: band_gradient,nspins,nbands - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_read_optical_mat() - - @staticmethod - def elec_read_band_energy(): - """ - elec_read_band_energy() - - - Defined at ../src/electronic.f90 lines 432-608 - - - ========================================================================= - Read the .bands file in the kpoint list, kpoint weights and band energies - also obtain, nkpoints, nspins, num_electrons(:),nbands, efermi_castep - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables: band_energy, efermi_castep, num_electrons - spin_polarised, electrons_per_state, nspins,nbands - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_read_band_energy() - - @staticmethod - def elec_read_elnes_mat(): - """ - elec_read_elnes_mat() - - - Defined at ../src/electronic.f90 lines 611-852 - - - ========================================================================= - Read the .bands file in the kpoint list, kpoint weights and band energies - also obtain, nkpoints, nspins, num_electrons(:),nbands, efermi_castep - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables: band_energy, efermi_castep, num_electrons - spin_polarised, electrons_per_state, nspins,nbands - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_read_elnes_mat() - - @staticmethod - def elec_pdos_read(): - """ - elec_pdos_read() - - - Defined at ../src/electronic.f90 lines 855-1015 - - - ========================================================================= - Read in the full pdos_weights. Write out any variables that we find on the - way. These will be checked for consistency in the dos module. We can't do it - yet as we haven't read the bands file. - ------------------------------------------------------------------------- - Arguments: None - ------------------------------------------------------------------------- - Parent module variables: pw, pdos_weights, pdos_orbital - ------------------------------------------------------------------------- - Modules used: See below - ------------------------------------------------------------------------- - Key Internal Variables: None - ------------------------------------------------------------------------- - Necessary conditions: None - ------------------------------------------------------------------------- - Known Worries: None - ------------------------------------------------------------------------- - Written by A J Morris Dec 2010 - ========================================================================= - """ - _OptaPyDOS.f90wrap_elec_pdos_read() - - @staticmethod - def elec_dealloc_pdos(): - """ - elec_dealloc_pdos() - - - Defined at ../src/electronic.f90 lines 1017-1034 - - - """ - _OptaPyDOS.f90wrap_elec_dealloc_pdos() - - @staticmethod - def elec_dealloc_elnes(): - """ - elec_dealloc_elnes() - - - Defined at ../src/electronic.f90 lines 1036-1052 - - - """ - _OptaPyDOS.f90wrap_elec_dealloc_elnes() - - @staticmethod - def elec_dealloc_band_gradient(): - """ - elec_dealloc_band_gradient() - - - Defined at ../src/electronic.f90 lines 1054-1064 - - - """ - _OptaPyDOS.f90wrap_elec_dealloc_band_gradient() - - @staticmethod - def elec_dealloc_optical(): - """ - elec_dealloc_optical() - - - Defined at ../src/electronic.f90 lines 1066-1078 - - - """ - _OptaPyDOS.f90wrap_elec_dealloc_optical() - - @property - def band_energy(self): - """ - Element band_energy ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 38 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__band_energy(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - band_energy = self._arrays[array_handle] - else: - band_energy = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__band_energy) - self._arrays[array_handle] = band_energy - return band_energy - - @band_energy.setter - def band_energy(self, band_energy): - self.band_energy[...] = band_energy - - @property - def band_gradient(self): - """ - Element band_gradient ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 39 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__band_gradient(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - band_gradient = self._arrays[array_handle] - else: - band_gradient = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__band_gradient) - self._arrays[array_handle] = band_gradient - return band_gradient - - @band_gradient.setter - def band_gradient(self, band_gradient): - self.band_gradient[...] = band_gradient - - @property - def optical_mat(self): - """ - Element optical_mat ftype=complex(kind=dp) pytype=complex - - - Defined at ../src/electronic.f90 line 40 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__optical_mat(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - optical_mat = self._arrays[array_handle] - else: - optical_mat = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__optical_mat) - self._arrays[array_handle] = optical_mat - return optical_mat - - @optical_mat.setter - def optical_mat(self, optical_mat): - self.optical_mat[...] = optical_mat - - @property - def elnes_mat(self): - """ - Element elnes_mat ftype=complex(kind=dp) pytype=complex - - - Defined at ../src/electronic.f90 line 41 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__elnes_mat(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - elnes_mat = self._arrays[array_handle] - else: - elnes_mat = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__elnes_mat) - self._arrays[array_handle] = elnes_mat - return elnes_mat - - @elnes_mat.setter - def elnes_mat(self, elnes_mat): - self.elnes_mat[...] = elnes_mat - - @property - def efermi(self): - """ - Element efermi ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 43 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__efermi() - - @efermi.setter - def efermi(self, efermi): - _OptaPyDOS.f90wrap_od_electronic__set__efermi(efermi) - - @property - def efermi_set(self): - """ - Element efermi_set ftype=logical pytype=bool - - - Defined at ../src/electronic.f90 line 44 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__efermi_set() - - @efermi_set.setter - def efermi_set(self, efermi_set): - _OptaPyDOS.f90wrap_od_electronic__set__efermi_set(efermi_set) - - @property - def unshifted_efermi(self): - """ - Element unshifted_efermi ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 45 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__unshifted_efermi() - - @unshifted_efermi.setter - def unshifted_efermi(self, unshifted_efermi): - _OptaPyDOS.f90wrap_od_electronic__set__unshifted_efermi(unshifted_efermi) - - @property - def efermi_castep(self): - """ - Element efermi_castep ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 46 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__efermi_castep() - - @efermi_castep.setter - def efermi_castep(self, efermi_castep): - _OptaPyDOS.f90wrap_od_electronic__set__efermi_castep(efermi_castep) - - @property - def num_electrons(self): - """ - Element num_electrons ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 48 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__num_electrons(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - num_electrons = self._arrays[array_handle] - else: - num_electrons = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__num_electrons) - self._arrays[array_handle] = num_electrons - return num_electrons - - @num_electrons.setter - def num_electrons(self, num_electrons): - self.num_electrons[...] = num_electrons - - @property - def nbands(self): - """ - Element nbands ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 51 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__nbands() - - @nbands.setter - def nbands(self, nbands): - _OptaPyDOS.f90wrap_od_electronic__set__nbands(nbands) - - @property - def nspins(self): - """ - Element nspins ftype=integer pytype=int - - - Defined at ../src/electronic.f90 line 51 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__nspins() - - @nspins.setter - def nspins(self, nspins): - _OptaPyDOS.f90wrap_od_electronic__set__nspins(nspins) - - @property - def electrons_per_state(self): - """ - Element electrons_per_state ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 52 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__electrons_per_state() - - @electrons_per_state.setter - def electrons_per_state(self, electrons_per_state): - _OptaPyDOS.f90wrap_od_electronic__set__electrons_per_state(electrons_per_state) - - @property - def spin_polarised(self): - """ - Element spin_polarised ftype=logical pytype=bool - - - Defined at ../src/electronic.f90 line 54 - - """ - return _OptaPyDOS.f90wrap_od_electronic__get__spin_polarised() - - @spin_polarised.setter - def spin_polarised(self, spin_polarised): - _OptaPyDOS.f90wrap_od_electronic__set__spin_polarised(spin_polarised) - - @property - def pdos_weights(self): - """ - Element pdos_weights ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 77 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__pdos_weights(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - pdos_weights = self._arrays[array_handle] - else: - pdos_weights = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__pdos_weights) - self._arrays[array_handle] = pdos_weights - return pdos_weights - - @pdos_weights.setter - def pdos_weights(self, pdos_weights): - self.pdos_weights[...] = pdos_weights - - @property - def all_kpoints(self): - """ - Element all_kpoints ftype=real(kind=dp) pytype=float - - - Defined at ../src/electronic.f90 line 82 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_electronic__array__all_kpoints(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - all_kpoints = self._arrays[array_handle] - else: - all_kpoints = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_electronic__array__all_kpoints) - self._arrays[array_handle] = all_kpoints - return all_kpoints - - @all_kpoints.setter - def all_kpoints(self, all_kpoints): - self.all_kpoints[...] = all_kpoints - - def __str__(self): - ret = ['{\n'] - ret.append(' band_energy : ') - ret.append(repr(self.band_energy)) - ret.append(',\n band_gradient : ') - ret.append(repr(self.band_gradient)) - ret.append(',\n optical_mat : ') - ret.append(repr(self.optical_mat)) - ret.append(',\n elnes_mat : ') - ret.append(repr(self.elnes_mat)) - ret.append(',\n efermi : ') - ret.append(repr(self.efermi)) - ret.append(',\n efermi_set : ') - ret.append(repr(self.efermi_set)) - ret.append(',\n unshifted_efermi : ') - ret.append(repr(self.unshifted_efermi)) - ret.append(',\n efermi_castep : ') - ret.append(repr(self.efermi_castep)) - ret.append(',\n num_electrons : ') - ret.append(repr(self.num_electrons)) - ret.append(',\n nbands : ') - ret.append(repr(self.nbands)) - ret.append(',\n nspins : ') - ret.append(repr(self.nspins)) - ret.append(',\n electrons_per_state : ') - ret.append(repr(self.electrons_per_state)) - ret.append(',\n spin_polarised : ') - ret.append(repr(self.spin_polarised)) - ret.append(',\n pdos_weights : ') - ret.append(repr(self.pdos_weights)) - ret.append(',\n all_kpoints : ') - ret.append(repr(self.all_kpoints)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_electronic = Od_Electronic() - -class Od_Io(f90wrap.runtime.FortranModule): - """ - Module od_io - - - Defined at ../src/io.f90 lines 36-187 - - """ - @staticmethod - def io_get_seedname(): - """ - io_get_seedname() - - - Defined at ../src/io.f90 lines 59-85 - - - ================================================================== - Get the seedname from the commandline - Note iargc and getarg are not standard - Some platforms require them to be external or provide - equivalent routines. Not a problem in f2003 - =================================================================== - """ - _OptaPyDOS.f90wrap_io_get_seedname() - - @staticmethod - def io_error(error_msg): - """ - io_error(error_msg) - - - Defined at ../src/io.f90 lines 88-105 - - Parameters - ---------- - error_msg : str - - ================================================================== - Aborts giving error message - =================================================================== - """ - _OptaPyDOS.f90wrap_io_error(error_msg=error_msg) - - @staticmethod - def io_date(): - """ - cdate, ctime = io_date() - - - Defined at ../src/io.f90 lines 108-130 - - - Returns - ------- - cdate : str - ctime : str - - ================================================================== - Returns two strings containing the date and the time - in human-readable format. Uses a standard f90 call. - =================================================================== - """ - cdate, ctime = _OptaPyDOS.f90wrap_io_date() - return cdate, ctime - - @staticmethod - def io_time(): - """ - io_time = io_time() - - - Defined at ../src/io.f90 lines 133-161 - - - Returns - ------- - io_time : float - - ================================================================== - Returns elapsed CPU time in seconds since its first call - uses standard f90 call - =================================================================== - """ - io_time = _OptaPyDOS.f90wrap_io_time() - return io_time - - @staticmethod - def io_file_unit(): - """ - io_file_unit = io_file_unit() - - - Defined at ../src/io.f90 lines 164-187 - - - Returns - ------- - io_file_unit : int - - ================================================================== - Returns an unused unit number - (so we can open a file on that unit - =================================================================== - """ - io_file_unit = _OptaPyDOS.f90wrap_io_file_unit() - return io_file_unit - - @property - def stdout(self): - """ - Element stdout ftype=integer pytype=int - - - Defined at ../src/io.f90 line 44 - - """ - return _OptaPyDOS.f90wrap_od_io__get__stdout() - - @stdout.setter - def stdout(self, stdout): - _OptaPyDOS.f90wrap_od_io__set__stdout(stdout) - - @property - def stderr(self): - """ - Element stderr ftype=integer pytype=int - - - Defined at ../src/io.f90 line 45 - - """ - return _OptaPyDOS.f90wrap_od_io__get__stderr() - - @stderr.setter - def stderr(self, stderr): - _OptaPyDOS.f90wrap_od_io__set__stderr(stderr) - - @property - def seedname(self): - """ - Element seedname ftype=character(len=50) pytype=str - - - Defined at ../src/io.f90 line 46 - - """ - return _OptaPyDOS.f90wrap_od_io__get__seedname() - - @seedname.setter - def seedname(self, seedname): - _OptaPyDOS.f90wrap_od_io__set__seedname(seedname) - - @property - def maxlen(self): - """ - Element maxlen ftype=integer pytype=int - - - Defined at ../src/io.f90 line 47 - - """ - return _OptaPyDOS.f90wrap_od_io__get__maxlen() - - @property - def filename_len(self): - """ - Element filename_len ftype=integer pytype=int - - - Defined at ../src/io.f90 line 48 - - """ - return _OptaPyDOS.f90wrap_od_io__get__filename_len() - - def __str__(self): - ret = ['{\n'] - ret.append(' stdout : ') - ret.append(repr(self.stdout)) - ret.append(',\n stderr : ') - ret.append(repr(self.stderr)) - ret.append(',\n seedname : ') - ret.append(repr(self.seedname)) - ret.append(',\n maxlen : ') - ret.append(repr(self.maxlen)) - ret.append(',\n filename_len : ') - ret.append(repr(self.filename_len)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_io = Od_Io() - -class Od_Jdos(f90wrap.runtime.FortranModule): - """ - Module od_jdos - - - Defined at ../src/jdos.f90 lines 24-206 - - """ - @staticmethod - def jdos_calculate(): - """ - jdos_calculate() - - - Defined at ../src/jdos.f90 lines 35-74 - - - =============================================================================== - """ - _OptaPyDOS.f90wrap_jdos_calculate() - - @staticmethod - def write_jdos(e, dos, dos_name): - """ - write_jdos(e, dos, dos_name) - - - Defined at ../src/jdos.f90 lines 77-149 - - Parameters - ---------- - e : float array - dos : float array - dos_name : str - - =============================================================================== - This routine receives an energy scale, a density of states and a file name - and writes out the DOS to disk - =============================================================================== - """ - _OptaPyDOS.f90wrap_write_jdos(e=e, dos=dos, dos_name=dos_name) - - @staticmethod - def write_jdos_xmgrace(dos_name, e, dos): - """ - write_jdos_xmgrace(dos_name, e, dos) - - - Defined at ../src/jdos.f90 lines 154-206 - - Parameters - ---------- - dos_name : str - e : float array - dos : float array - - =============================================================================== - """ - _OptaPyDOS.f90wrap_write_jdos_xmgrace(dos_name=dos_name, e=e, dos=dos) - - _dt_array_initialisers = [] - - -od_jdos = Od_Jdos() - -class Od_Jdos_Utils(f90wrap.runtime.FortranModule): - """ - Module od_jdos_utils - - - Defined at ../src/jdos_utils.f90 lines 31-465 - - """ - @staticmethod - def jdos_utils_calculate(matrix_weights=None): - """ - jdos_utils_calculate([matrix_weights]) - - - Defined at ../src/jdos_utils.f90 lines 64-184 - - Parameters - ---------- - matrix_weights : float array - - =============================================================================== - Main routine in dos module, drives the calculation of Density of states for - both task : dos and also if it is required elsewhere. - =============================================================================== - """ - _OptaPyDOS.f90wrap_jdos_utils_calculate(matrix_weights=matrix_weights) - - @staticmethod - def setup_energy_scale(): - """ - setup_energy_scale() - - - Defined at ../src/jdos_utils.f90 lines 187-243 - - - =============================================================================== - Sets up all broadening independent DOS concerns - Calls the relevant dos calculator. - =============================================================================== - """ - _OptaPyDOS.f90wrap_setup_energy_scale() - - @staticmethod - def jdos_deallocate(): - """ - jdos_deallocate() - - - Defined at ../src/jdos_utils.f90 lines 265-291 - - - =============================================================================== - =============================================================================== - """ - _OptaPyDOS.f90wrap_jdos_deallocate() - - @property - def jdos_adaptive(self): - """ - Element jdos_adaptive ftype=real(kind=dp) pytype=float - - - Defined at ../src/jdos_utils.f90 line 40 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_adaptive(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - jdos_adaptive = self._arrays[array_handle] - else: - jdos_adaptive = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_adaptive) - self._arrays[array_handle] = jdos_adaptive - return jdos_adaptive - - @jdos_adaptive.setter - def jdos_adaptive(self, jdos_adaptive): - self.jdos_adaptive[...] = jdos_adaptive - - @property - def jdos_fixed(self): - """ - Element jdos_fixed ftype=real(kind=dp) pytype=float - - - Defined at ../src/jdos_utils.f90 line 41 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_fixed(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - jdos_fixed = self._arrays[array_handle] - else: - jdos_fixed = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_fixed) - self._arrays[array_handle] = jdos_fixed - return jdos_fixed - - @jdos_fixed.setter - def jdos_fixed(self, jdos_fixed): - self.jdos_fixed[...] = jdos_fixed - - @property - def jdos_linear(self): - """ - Element jdos_linear ftype=real(kind=dp) pytype=float - - - Defined at ../src/jdos_utils.f90 line 42 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_linear(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - jdos_linear = self._arrays[array_handle] - else: - jdos_linear = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_jdos_utils__array__jdos_linear) - self._arrays[array_handle] = jdos_linear - return jdos_linear - - @jdos_linear.setter - def jdos_linear(self, jdos_linear): - self.jdos_linear[...] = jdos_linear - - @property - def jdos_nbins(self): - """ - Element jdos_nbins ftype=integer pytype=int - - - Defined at ../src/jdos_utils.f90 line 44 - - """ - return _OptaPyDOS.f90wrap_od_jdos_utils__get__jdos_nbins() - - @jdos_nbins.setter - def jdos_nbins(self, jdos_nbins): - _OptaPyDOS.f90wrap_od_jdos_utils__set__jdos_nbins(jdos_nbins) - - @property - def e(self): - """ - Element e ftype=real(kind=dp) pytype=float - - - Defined at ../src/jdos_utils.f90 line 46 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_jdos_utils__array__e(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - e = self._arrays[array_handle] - else: - e = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_jdos_utils__array__e) - self._arrays[array_handle] = e - return e - - @e.setter - def e(self, e): - self.e[...] = e - - @property - def delta_bins(self): - """ - Element delta_bins ftype=real(kind=dp) pytype=float - - - Defined at ../src/jdos_utils.f90 line 56 - - """ - return _OptaPyDOS.f90wrap_od_jdos_utils__get__delta_bins() - - @delta_bins.setter - def delta_bins(self, delta_bins): - _OptaPyDOS.f90wrap_od_jdos_utils__set__delta_bins(delta_bins) - - @property - def calc_weighted_jdos(self): - """ - Element calc_weighted_jdos ftype=logical pytype=bool - - - Defined at ../src/jdos_utils.f90 line 57 - - """ - return _OptaPyDOS.f90wrap_od_jdos_utils__get__calc_weighted_jdos() - - @calc_weighted_jdos.setter - def calc_weighted_jdos(self, calc_weighted_jdos): - _OptaPyDOS.f90wrap_od_jdos_utils__set__calc_weighted_jdos(calc_weighted_jdos) - - @property - def vb_max(self): - """ - Element vb_max ftype=integer pytype=int - - - Defined at ../src/jdos_utils.f90 line 58 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_jdos_utils__array__vb_max(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - vb_max = self._arrays[array_handle] - else: - vb_max = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_jdos_utils__array__vb_max) - self._arrays[array_handle] = vb_max - return vb_max - - @vb_max.setter - def vb_max(self, vb_max): - self.vb_max[...] = vb_max - - def __str__(self): - ret = ['{\n'] - ret.append(' jdos_adaptive : ') - ret.append(repr(self.jdos_adaptive)) - ret.append(',\n jdos_fixed : ') - ret.append(repr(self.jdos_fixed)) - ret.append(',\n jdos_linear : ') - ret.append(repr(self.jdos_linear)) - ret.append(',\n jdos_nbins : ') - ret.append(repr(self.jdos_nbins)) - ret.append(',\n e : ') - ret.append(repr(self.e)) - ret.append(',\n delta_bins : ') - ret.append(repr(self.delta_bins)) - ret.append(',\n calc_weighted_jdos : ') - ret.append(repr(self.calc_weighted_jdos)) - ret.append(',\n vb_max : ') - ret.append(repr(self.vb_max)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_jdos_utils = Od_Jdos_Utils() - -class Od_Optics(f90wrap.runtime.FortranModule): - """ - Module od_optics - - - Defined at ../src/optics.f90 lines 24-1421 - - """ - @staticmethod - def optics_calculate(): - """ - optics_calculate() - - - Defined at ../src/optics.f90 lines 78-155 - - - """ - _OptaPyDOS.f90wrap_optics_calculate() - - @property - def matrix_weights(self): - """ - Element matrix_weights ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 46 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__matrix_weights(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - matrix_weights = self._arrays[array_handle] - else: - matrix_weights = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__matrix_weights) - self._arrays[array_handle] = matrix_weights - return matrix_weights - - @matrix_weights.setter - def matrix_weights(self, matrix_weights): - self.matrix_weights[...] = matrix_weights - - @property - def dos_matrix_weights(self): - """ - Element dos_matrix_weights ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 47 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__dos_matrix_weights(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_matrix_weights = self._arrays[array_handle] - else: - dos_matrix_weights = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__dos_matrix_weights) - self._arrays[array_handle] = dos_matrix_weights - return dos_matrix_weights - - @dos_matrix_weights.setter - def dos_matrix_weights(self, dos_matrix_weights): - self.dos_matrix_weights[...] = dos_matrix_weights - - @property - def weighted_jdos(self): - """ - Element weighted_jdos ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 48 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__weighted_jdos(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - weighted_jdos = self._arrays[array_handle] - else: - weighted_jdos = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__weighted_jdos) - self._arrays[array_handle] = weighted_jdos - return weighted_jdos - - @weighted_jdos.setter - def weighted_jdos(self, weighted_jdos): - self.weighted_jdos[...] = weighted_jdos - - @property - def weighted_dos_at_e(self): - """ - Element weighted_dos_at_e ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 49 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__weighted_dos_at_e(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - weighted_dos_at_e = self._arrays[array_handle] - else: - weighted_dos_at_e = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__weighted_dos_at_e) - self._arrays[array_handle] = weighted_dos_at_e - return weighted_dos_at_e - - @weighted_dos_at_e.setter - def weighted_dos_at_e(self, weighted_dos_at_e): - self.weighted_dos_at_e[...] = weighted_dos_at_e - - @property - def dos_at_e(self): - """ - Element dos_at_e ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 50 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__dos_at_e(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_at_e = self._arrays[array_handle] - else: - dos_at_e = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__dos_at_e) - self._arrays[array_handle] = dos_at_e - return dos_at_e - - @dos_at_e.setter - def dos_at_e(self, dos_at_e): - self.dos_at_e[...] = dos_at_e - - @property - def epsilon(self): - """ - Element epsilon ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 52 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__epsilon(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - epsilon = self._arrays[array_handle] - else: - epsilon = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__epsilon) - self._arrays[array_handle] = epsilon - return epsilon - - @epsilon.setter - def epsilon(self, epsilon): - self.epsilon[...] = epsilon - - @property - def conduct(self): - """ - Element conduct ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 53 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__conduct(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - conduct = self._arrays[array_handle] - else: - conduct = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__conduct) - self._arrays[array_handle] = conduct - return conduct - - @conduct.setter - def conduct(self, conduct): - self.conduct[...] = conduct - - @property - def refract(self): - """ - Element refract ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 54 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__refract(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - refract = self._arrays[array_handle] - else: - refract = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__refract) - self._arrays[array_handle] = refract - return refract - - @refract.setter - def refract(self, refract): - self.refract[...] = refract - - @property - def loss_fn(self): - """ - Element loss_fn ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 55 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__loss_fn(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - loss_fn = self._arrays[array_handle] - else: - loss_fn = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__loss_fn) - self._arrays[array_handle] = loss_fn - return loss_fn - - @loss_fn.setter - def loss_fn(self, loss_fn): - self.loss_fn[...] = loss_fn - - @property - def absorp(self): - """ - Element absorp ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 56 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__absorp(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - absorp = self._arrays[array_handle] - else: - absorp = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__absorp) - self._arrays[array_handle] = absorp - return absorp - - @absorp.setter - def absorp(self, absorp): - self.absorp[...] = absorp - - @property - def reflect(self): - """ - Element reflect ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 57 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__reflect(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - reflect = self._arrays[array_handle] - else: - reflect = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__reflect) - self._arrays[array_handle] = reflect - return reflect - - @reflect.setter - def reflect(self, reflect): - self.reflect[...] = reflect - - @property - def intra(self): - """ - Element intra ftype=real(kind=dp) pytype=float - - - Defined at ../src/optics.f90 line 59 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_optics__array__intra(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - intra = self._arrays[array_handle] - else: - intra = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_optics__array__intra) - self._arrays[array_handle] = intra - return intra - - @intra.setter - def intra(self, intra): - self.intra[...] = intra - - def __str__(self): - ret = ['{\n'] - ret.append(' matrix_weights : ') - ret.append(repr(self.matrix_weights)) - ret.append(',\n dos_matrix_weights : ') - ret.append(repr(self.dos_matrix_weights)) - ret.append(',\n weighted_jdos : ') - ret.append(repr(self.weighted_jdos)) - ret.append(',\n weighted_dos_at_e : ') - ret.append(repr(self.weighted_dos_at_e)) - ret.append(',\n dos_at_e : ') - ret.append(repr(self.dos_at_e)) - ret.append(',\n epsilon : ') - ret.append(repr(self.epsilon)) - ret.append(',\n conduct : ') - ret.append(repr(self.conduct)) - ret.append(',\n refract : ') - ret.append(repr(self.refract)) - ret.append(',\n loss_fn : ') - ret.append(repr(self.loss_fn)) - ret.append(',\n absorp : ') - ret.append(repr(self.absorp)) - ret.append(',\n reflect : ') - ret.append(repr(self.reflect)) - ret.append(',\n intra : ') - ret.append(repr(self.intra)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_optics = Od_Optics() - -class Od_Parameters(f90wrap.runtime.FortranModule): - """ - Module od_parameters - - - Defined at ../src/parameters.f90 lines 35-1576 - - """ - @staticmethod - def param_read(): - """ - param_read() - - - Defined at ../src/parameters.f90 lines 143-458 - - - ================================================================== - Read parameters and calculate derived values - =================================================================== - """ - _OptaPyDOS.f90wrap_param_read() - - @staticmethod - def param_write_header(): - """ - param_write_header() - - - Defined at ../src/parameters.f90 lines 497-535 - - - """ - _OptaPyDOS.f90wrap_param_write_header() - - @staticmethod - def param_write_atomic_coord(): - """ - param_write_atomic_coord() - - - Defined at ../src/parameters.f90 lines 537-586 - - - ================================================================== - write atomic coodes to stdout - =================================================================== - """ - _OptaPyDOS.f90wrap_param_write_atomic_coord() - - @staticmethod - def param_write(): - """ - param_write() - - - Defined at ../src/parameters.f90 lines 589-804 - - - ================================================================== - write parameters to stdout - =================================================================== - """ - _OptaPyDOS.f90wrap_param_write() - - @staticmethod - def param_dealloc(): - """ - param_dealloc() - - - Defined at ../src/parameters.f90 lines 807-824 - - - ================================================================== - release memory from allocated parameters - =================================================================== - """ - _OptaPyDOS.f90wrap_param_dealloc() - - @staticmethod - def param_dist(): - """ - param_dist() - - - Defined at ../src/parameters.f90 lines 1501-1576 - - - ----------------------------------------------------- - Send the parameters from the root node to all others - ----------------------------------------------------- - """ - _OptaPyDOS.f90wrap_param_dist() - - @property - def output_format(self): - """ - Element output_format ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 45 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__output_format() - - @output_format.setter - def output_format(self, output_format): - _OptaPyDOS.f90wrap_od_parameters__set__output_format(output_format) - - @property - def devel_flag(self): - """ - Element devel_flag ftype=character(len=100) pytype=str - - - Defined at ../src/parameters.f90 line 46 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__devel_flag() - - @devel_flag.setter - def devel_flag(self, devel_flag): - _OptaPyDOS.f90wrap_od_parameters__set__devel_flag(devel_flag) - - @property - def iprint(self): - """ - Element iprint ftype=integer pytype=int - - - Defined at ../src/parameters.f90 line 47 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__iprint() - - @iprint.setter - def iprint(self, iprint): - _OptaPyDOS.f90wrap_od_parameters__set__iprint(iprint) - - @property - def energy_unit(self): - """ - Element energy_unit ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 48 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__energy_unit() - - @energy_unit.setter - def energy_unit(self, energy_unit): - _OptaPyDOS.f90wrap_od_parameters__set__energy_unit(energy_unit) - - @property - def length_unit(self): - """ - Element length_unit ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 49 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__length_unit() - - @length_unit.setter - def length_unit(self, length_unit): - _OptaPyDOS.f90wrap_od_parameters__set__length_unit(length_unit) - - @property - def legacy_file_format(self): - """ - Element legacy_file_format ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 50 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__legacy_file_format() - - @legacy_file_format.setter - def legacy_file_format(self, legacy_file_format): - _OptaPyDOS.f90wrap_od_parameters__set__legacy_file_format(legacy_file_format) - - @property - def kpoint_mp_grid(self): - """ - Element kpoint_mp_grid ftype=integer pytype=int - - - Defined at ../src/parameters.f90 line 51 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_parameters__array__kpoint_mp_grid(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - kpoint_mp_grid = self._arrays[array_handle] - else: - kpoint_mp_grid = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_parameters__array__kpoint_mp_grid) - self._arrays[array_handle] = kpoint_mp_grid - return kpoint_mp_grid - - @kpoint_mp_grid.setter - def kpoint_mp_grid(self, kpoint_mp_grid): - self.kpoint_mp_grid[...] = kpoint_mp_grid - - @property - def dos(self): - """ - Element dos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 55 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos() - - @dos.setter - def dos(self, dos): - _OptaPyDOS.f90wrap_od_parameters__set__dos(dos) - - @property - def compare_dos(self): - """ - Element compare_dos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 56 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__compare_dos() - - @compare_dos.setter - def compare_dos(self, compare_dos): - _OptaPyDOS.f90wrap_od_parameters__set__compare_dos(compare_dos) - - @property - def pdos(self): - """ - Element pdos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 57 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__pdos() - - @pdos.setter - def pdos(self, pdos): - _OptaPyDOS.f90wrap_od_parameters__set__pdos(pdos) - - @property - def jdos(self): - """ - Element jdos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 58 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__jdos() - - @jdos.setter - def jdos(self, jdos): - _OptaPyDOS.f90wrap_od_parameters__set__jdos(jdos) - - @property - def compare_jdos(self): - """ - Element compare_jdos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 59 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__compare_jdos() - - @compare_jdos.setter - def compare_jdos(self, compare_jdos): - _OptaPyDOS.f90wrap_od_parameters__set__compare_jdos(compare_jdos) - - @property - def optics(self): - """ - Element optics ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 60 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics() - - @optics.setter - def optics(self, optics): - _OptaPyDOS.f90wrap_od_parameters__set__optics(optics) - - @property - def core(self): - """ - Element core ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 61 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__core() - - @core.setter - def core(self, core): - _OptaPyDOS.f90wrap_od_parameters__set__core(core) - - @property - def fixed(self): - """ - Element fixed ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 64 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__fixed() - - @fixed.setter - def fixed(self, fixed): - _OptaPyDOS.f90wrap_od_parameters__set__fixed(fixed) - - @property - def adaptive(self): - """ - Element adaptive ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 65 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__adaptive() - - @adaptive.setter - def adaptive(self, adaptive): - _OptaPyDOS.f90wrap_od_parameters__set__adaptive(adaptive) - - @property - def linear(self): - """ - Element linear ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 66 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__linear() - - @linear.setter - def linear(self, linear): - _OptaPyDOS.f90wrap_od_parameters__set__linear(linear) - - @property - def quad(self): - """ - Element quad ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 67 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__quad() - - @quad.setter - def quad(self, quad): - _OptaPyDOS.f90wrap_od_parameters__set__quad(quad) - - @property - def compute_band_energy(self): - """ - Element compute_band_energy ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 70 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__compute_band_energy() - - @compute_band_energy.setter - def compute_band_energy(self, compute_band_energy): - _OptaPyDOS.f90wrap_od_parameters__set__compute_band_energy(compute_band_energy) - - @property - def adaptive_smearing(self): - """ - Element adaptive_smearing ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 71 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__adaptive_smearing() - - @adaptive_smearing.setter - def adaptive_smearing(self, adaptive_smearing): - _OptaPyDOS.f90wrap_od_parameters__set__adaptive_smearing(adaptive_smearing) - - @property - def fixed_smearing(self): - """ - Element fixed_smearing ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 72 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__fixed_smearing() - - @fixed_smearing.setter - def fixed_smearing(self, fixed_smearing): - _OptaPyDOS.f90wrap_od_parameters__set__fixed_smearing(fixed_smearing) - - @property - def linear_smearing(self): - """ - Element linear_smearing ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 73 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__linear_smearing() - - @linear_smearing.setter - def linear_smearing(self, linear_smearing): - _OptaPyDOS.f90wrap_od_parameters__set__linear_smearing(linear_smearing) - - @property - def dos_per_volume(self): - """ - Element dos_per_volume ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 74 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos_per_volume() - - @dos_per_volume.setter - def dos_per_volume(self, dos_per_volume): - _OptaPyDOS.f90wrap_od_parameters__set__dos_per_volume(dos_per_volume) - - @property - def efermi_user(self): - """ - Element efermi_user ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 75 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__efermi_user() - - @efermi_user.setter - def efermi_user(self, efermi_user): - _OptaPyDOS.f90wrap_od_parameters__set__efermi_user(efermi_user) - - @property - def efermi_choice(self): - """ - Element efermi_choice ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 76 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__efermi_choice() - - @efermi_choice.setter - def efermi_choice(self, efermi_choice): - _OptaPyDOS.f90wrap_od_parameters__set__efermi_choice(efermi_choice) - - @property - def finite_bin_correction(self): - """ - Element finite_bin_correction ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 77 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__finite_bin_correction() - - @finite_bin_correction.setter - def finite_bin_correction(self, finite_bin_correction): - \ - _OptaPyDOS.f90wrap_od_parameters__set__finite_bin_correction(finite_bin_correction) - - @property - def hybrid_linear(self): - """ - Element hybrid_linear ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 78 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__hybrid_linear() - - @hybrid_linear.setter - def hybrid_linear(self, hybrid_linear): - _OptaPyDOS.f90wrap_od_parameters__set__hybrid_linear(hybrid_linear) - - @property - def hybrid_linear_grad_tol(self): - """ - Element hybrid_linear_grad_tol ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 79 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__hybrid_linear_grad_tol() - - @hybrid_linear_grad_tol.setter - def hybrid_linear_grad_tol(self, hybrid_linear_grad_tol): - \ - _OptaPyDOS.f90wrap_od_parameters__set__hybrid_linear_grad_tol(hybrid_linear_grad_tol) - - @property - def numerical_intdos(self): - """ - Element numerical_intdos ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 80 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__numerical_intdos() - - @numerical_intdos.setter - def numerical_intdos(self, numerical_intdos): - _OptaPyDOS.f90wrap_od_parameters__set__numerical_intdos(numerical_intdos) - - @property - def compute_band_gap(self): - """ - Element compute_band_gap ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 81 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__compute_band_gap() - - @compute_band_gap.setter - def compute_band_gap(self, compute_band_gap): - _OptaPyDOS.f90wrap_od_parameters__set__compute_band_gap(compute_band_gap) - - @property - def set_efermi_zero(self): - """ - Element set_efermi_zero ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 83 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__set_efermi_zero() - - @set_efermi_zero.setter - def set_efermi_zero(self, set_efermi_zero): - _OptaPyDOS.f90wrap_od_parameters__set__set_efermi_zero(set_efermi_zero) - - @property - def dos_min_energy(self): - """ - Element dos_min_energy ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 84 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos_min_energy() - - @dos_min_energy.setter - def dos_min_energy(self, dos_min_energy): - _OptaPyDOS.f90wrap_od_parameters__set__dos_min_energy(dos_min_energy) - - @property - def dos_max_energy(self): - """ - Element dos_max_energy ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 85 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos_max_energy() - - @dos_max_energy.setter - def dos_max_energy(self, dos_max_energy): - _OptaPyDOS.f90wrap_od_parameters__set__dos_max_energy(dos_max_energy) - - @property - def dos_spacing(self): - """ - Element dos_spacing ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 86 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos_spacing() - - @dos_spacing.setter - def dos_spacing(self, dos_spacing): - _OptaPyDOS.f90wrap_od_parameters__set__dos_spacing(dos_spacing) - - @property - def dos_nbins(self): - """ - Element dos_nbins ftype=integer pytype=int - - - Defined at ../src/parameters.f90 line 87 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__dos_nbins() - - @dos_nbins.setter - def dos_nbins(self, dos_nbins): - _OptaPyDOS.f90wrap_od_parameters__set__dos_nbins(dos_nbins) - - @property - def pdos_string(self): - """ - Element pdos_string ftype=character(len=maxlen) pytype=str - - - Defined at ../src/parameters.f90 line 90 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__pdos_string() - - @pdos_string.setter - def pdos_string(self, pdos_string): - _OptaPyDOS.f90wrap_od_parameters__set__pdos_string(pdos_string) - - @property - def jdos_max_energy(self): - """ - Element jdos_max_energy ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 94 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__jdos_max_energy() - - @jdos_max_energy.setter - def jdos_max_energy(self, jdos_max_energy): - _OptaPyDOS.f90wrap_od_parameters__set__jdos_max_energy(jdos_max_energy) - - @property - def jdos_spacing(self): - """ - Element jdos_spacing ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 95 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__jdos_spacing() - - @jdos_spacing.setter - def jdos_spacing(self, jdos_spacing): - _OptaPyDOS.f90wrap_od_parameters__set__jdos_spacing(jdos_spacing) - - @property - def scissor_op(self): - """ - Element scissor_op ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 96 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__scissor_op() - - @scissor_op.setter - def scissor_op(self, scissor_op): - _OptaPyDOS.f90wrap_od_parameters__set__scissor_op(scissor_op) - - @property - def exclude_bands(self): - """ - Element exclude_bands ftype=integer pytype=int - - - Defined at ../src/parameters.f90 line 97 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_parameters__array__exclude_bands(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - exclude_bands = self._arrays[array_handle] - else: - exclude_bands = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_parameters__array__exclude_bands) - self._arrays[array_handle] = exclude_bands - return exclude_bands - - @exclude_bands.setter - def exclude_bands(self, exclude_bands): - self.exclude_bands[...] = exclude_bands - - @property - def num_exclude_bands(self): - """ - Element num_exclude_bands ftype=integer pytype=int - - - Defined at ../src/parameters.f90 line 99 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__num_exclude_bands() - - @num_exclude_bands.setter - def num_exclude_bands(self, num_exclude_bands): - _OptaPyDOS.f90wrap_od_parameters__set__num_exclude_bands(num_exclude_bands) - - @property - def optics_geom(self): - """ - Element optics_geom ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 102 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics_geom() - - @optics_geom.setter - def optics_geom(self, optics_geom): - _OptaPyDOS.f90wrap_od_parameters__set__optics_geom(optics_geom) - - @property - def optics_qdir(self): - """ - Element optics_qdir ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 103 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_parameters__array__optics_qdir(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - optics_qdir = self._arrays[array_handle] - else: - optics_qdir = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_parameters__array__optics_qdir) - self._arrays[array_handle] = optics_qdir - return optics_qdir - - @optics_qdir.setter - def optics_qdir(self, optics_qdir): - self.optics_qdir[...] = optics_qdir - - @property - def optics_intraband(self): - """ - Element optics_intraband ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 104 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics_intraband() - - @optics_intraband.setter - def optics_intraband(self, optics_intraband): - _OptaPyDOS.f90wrap_od_parameters__set__optics_intraband(optics_intraband) - - @property - def optics_drude_broadening(self): - """ - Element optics_drude_broadening ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 105 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics_drude_broadening() - - @optics_drude_broadening.setter - def optics_drude_broadening(self, optics_drude_broadening): - \ - _OptaPyDOS.f90wrap_od_parameters__set__optics_drude_broadening(optics_drude_broadening) - - @property - def optics_lossfn_gaussian(self): - """ - Element optics_lossfn_gaussian ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 106 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics_lossfn_gaussian() - - @optics_lossfn_gaussian.setter - def optics_lossfn_gaussian(self, optics_lossfn_gaussian): - \ - _OptaPyDOS.f90wrap_od_parameters__set__optics_lossfn_gaussian(optics_lossfn_gaussian) - - @property - def optics_lossfn_broadening(self): - """ - Element optics_lossfn_broadening ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 107 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__optics_lossfn_broadening() - - @optics_lossfn_broadening.setter - def optics_lossfn_broadening(self, optics_lossfn_broadening): - \ - _OptaPyDOS.f90wrap_od_parameters__set__optics_lossfn_broadening(optics_lossfn_broadening) - - @property - def core_geom(self): - """ - Element core_geom ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 111 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__core_geom() - - @core_geom.setter - def core_geom(self, core_geom): - _OptaPyDOS.f90wrap_od_parameters__set__core_geom(core_geom) - - @property - def core_qdir(self): - """ - Element core_qdir ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 112 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_parameters__array__core_qdir(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - core_qdir = self._arrays[array_handle] - else: - core_qdir = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_parameters__array__core_qdir) - self._arrays[array_handle] = core_qdir - return core_qdir - - @core_qdir.setter - def core_qdir(self, core_qdir): - self.core_qdir[...] = core_qdir - - @property - def core_lai_broadening(self): - """ - Element core_lai_broadening ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 113 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__core_lai_broadening() - - @core_lai_broadening.setter - def core_lai_broadening(self, core_lai_broadening): - _OptaPyDOS.f90wrap_od_parameters__set__core_lai_broadening(core_lai_broadening) - - @property - def core_type(self): - """ - Element core_type ftype=character(len=20) pytype=str - - - Defined at ../src/parameters.f90 line 114 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__core_type() - - @core_type.setter - def core_type(self, core_type): - _OptaPyDOS.f90wrap_od_parameters__set__core_type(core_type) - - @property - def lai_gaussian_width(self): - """ - Element lai_gaussian_width ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 115 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_gaussian_width() - - @lai_gaussian_width.setter - def lai_gaussian_width(self, lai_gaussian_width): - _OptaPyDOS.f90wrap_od_parameters__set__lai_gaussian_width(lai_gaussian_width) - - @property - def lai_gaussian(self): - """ - Element lai_gaussian ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 116 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_gaussian() - - @lai_gaussian.setter - def lai_gaussian(self, lai_gaussian): - _OptaPyDOS.f90wrap_od_parameters__set__lai_gaussian(lai_gaussian) - - @property - def lai_lorentzian_width(self): - """ - Element lai_lorentzian_width ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 117 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_lorentzian_width() - - @lai_lorentzian_width.setter - def lai_lorentzian_width(self, lai_lorentzian_width): - \ - _OptaPyDOS.f90wrap_od_parameters__set__lai_lorentzian_width(lai_lorentzian_width) - - @property - def lai_lorentzian_scale(self): - """ - Element lai_lorentzian_scale ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 118 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_lorentzian_scale() - - @lai_lorentzian_scale.setter - def lai_lorentzian_scale(self, lai_lorentzian_scale): - \ - _OptaPyDOS.f90wrap_od_parameters__set__lai_lorentzian_scale(lai_lorentzian_scale) - - @property - def lai_lorentzian_offset(self): - """ - Element lai_lorentzian_offset ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 119 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_lorentzian_offset() - - @lai_lorentzian_offset.setter - def lai_lorentzian_offset(self, lai_lorentzian_offset): - \ - _OptaPyDOS.f90wrap_od_parameters__set__lai_lorentzian_offset(lai_lorentzian_offset) - - @property - def lai_lorentzian(self): - """ - Element lai_lorentzian ftype=logical pytype=bool - - - Defined at ../src/parameters.f90 line 120 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lai_lorentzian() - - @lai_lorentzian.setter - def lai_lorentzian(self, lai_lorentzian): - _OptaPyDOS.f90wrap_od_parameters__set__lai_lorentzian(lai_lorentzian) - - @property - def lenconfac(self): - """ - Element lenconfac ftype=real(kind=dp) pytype=float - - - Defined at ../src/parameters.f90 line 122 - - """ - return _OptaPyDOS.f90wrap_od_parameters__get__lenconfac() - - @lenconfac.setter - def lenconfac(self, lenconfac): - _OptaPyDOS.f90wrap_od_parameters__set__lenconfac(lenconfac) - - def __str__(self): - ret = ['{\n'] - ret.append(' output_format : ') - ret.append(repr(self.output_format)) - ret.append(',\n devel_flag : ') - ret.append(repr(self.devel_flag)) - ret.append(',\n iprint : ') - ret.append(repr(self.iprint)) - ret.append(',\n energy_unit : ') - ret.append(repr(self.energy_unit)) - ret.append(',\n length_unit : ') - ret.append(repr(self.length_unit)) - ret.append(',\n legacy_file_format : ') - ret.append(repr(self.legacy_file_format)) - ret.append(',\n kpoint_mp_grid : ') - ret.append(repr(self.kpoint_mp_grid)) - ret.append(',\n dos : ') - ret.append(repr(self.dos)) - ret.append(',\n compare_dos : ') - ret.append(repr(self.compare_dos)) - ret.append(',\n pdos : ') - ret.append(repr(self.pdos)) - ret.append(',\n jdos : ') - ret.append(repr(self.jdos)) - ret.append(',\n compare_jdos : ') - ret.append(repr(self.compare_jdos)) - ret.append(',\n optics : ') - ret.append(repr(self.optics)) - ret.append(',\n core : ') - ret.append(repr(self.core)) - ret.append(',\n fixed : ') - ret.append(repr(self.fixed)) - ret.append(',\n adaptive : ') - ret.append(repr(self.adaptive)) - ret.append(',\n linear : ') - ret.append(repr(self.linear)) - ret.append(',\n quad : ') - ret.append(repr(self.quad)) - ret.append(',\n compute_band_energy : ') - ret.append(repr(self.compute_band_energy)) - ret.append(',\n adaptive_smearing : ') - ret.append(repr(self.adaptive_smearing)) - ret.append(',\n fixed_smearing : ') - ret.append(repr(self.fixed_smearing)) - ret.append(',\n linear_smearing : ') - ret.append(repr(self.linear_smearing)) - ret.append(',\n dos_per_volume : ') - ret.append(repr(self.dos_per_volume)) - ret.append(',\n efermi_user : ') - ret.append(repr(self.efermi_user)) - ret.append(',\n efermi_choice : ') - ret.append(repr(self.efermi_choice)) - ret.append(',\n finite_bin_correction : ') - ret.append(repr(self.finite_bin_correction)) - ret.append(',\n hybrid_linear : ') - ret.append(repr(self.hybrid_linear)) - ret.append(',\n hybrid_linear_grad_tol : ') - ret.append(repr(self.hybrid_linear_grad_tol)) - ret.append(',\n numerical_intdos : ') - ret.append(repr(self.numerical_intdos)) - ret.append(',\n compute_band_gap : ') - ret.append(repr(self.compute_band_gap)) - ret.append(',\n set_efermi_zero : ') - ret.append(repr(self.set_efermi_zero)) - ret.append(',\n dos_min_energy : ') - ret.append(repr(self.dos_min_energy)) - ret.append(',\n dos_max_energy : ') - ret.append(repr(self.dos_max_energy)) - ret.append(',\n dos_spacing : ') - ret.append(repr(self.dos_spacing)) - ret.append(',\n dos_nbins : ') - ret.append(repr(self.dos_nbins)) - ret.append(',\n pdos_string : ') - ret.append(repr(self.pdos_string)) - ret.append(',\n jdos_max_energy : ') - ret.append(repr(self.jdos_max_energy)) - ret.append(',\n jdos_spacing : ') - ret.append(repr(self.jdos_spacing)) - ret.append(',\n scissor_op : ') - ret.append(repr(self.scissor_op)) - ret.append(',\n exclude_bands : ') - ret.append(repr(self.exclude_bands)) - ret.append(',\n num_exclude_bands : ') - ret.append(repr(self.num_exclude_bands)) - ret.append(',\n optics_geom : ') - ret.append(repr(self.optics_geom)) - ret.append(',\n optics_qdir : ') - ret.append(repr(self.optics_qdir)) - ret.append(',\n optics_intraband : ') - ret.append(repr(self.optics_intraband)) - ret.append(',\n optics_drude_broadening : ') - ret.append(repr(self.optics_drude_broadening)) - ret.append(',\n optics_lossfn_gaussian : ') - ret.append(repr(self.optics_lossfn_gaussian)) - ret.append(',\n optics_lossfn_broadening : ') - ret.append(repr(self.optics_lossfn_broadening)) - ret.append(',\n core_geom : ') - ret.append(repr(self.core_geom)) - ret.append(',\n core_qdir : ') - ret.append(repr(self.core_qdir)) - ret.append(',\n core_lai_broadening : ') - ret.append(repr(self.core_lai_broadening)) - ret.append(',\n core_type : ') - ret.append(repr(self.core_type)) - ret.append(',\n lai_gaussian_width : ') - ret.append(repr(self.lai_gaussian_width)) - ret.append(',\n lai_gaussian : ') - ret.append(repr(self.lai_gaussian)) - ret.append(',\n lai_lorentzian_width : ') - ret.append(repr(self.lai_lorentzian_width)) - ret.append(',\n lai_lorentzian_scale : ') - ret.append(repr(self.lai_lorentzian_scale)) - ret.append(',\n lai_lorentzian_offset : ') - ret.append(repr(self.lai_lorentzian_offset)) - ret.append(',\n lai_lorentzian : ') - ret.append(repr(self.lai_lorentzian)) - ret.append(',\n lenconfac : ') - ret.append(repr(self.lenconfac)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_parameters = Od_Parameters() - -class Od_Pdos(f90wrap.runtime.FortranModule): - """ - Module od_pdos - - - Defined at ../src/pdos.F90 lines 23-926 - - """ - @staticmethod - def pdos_calculate(): - """ - pdos_calculate() - - - Defined at ../src/pdos.F90 lines 66-110 - - - """ - _OptaPyDOS.f90wrap_pdos_calculate() - - @property - def dos_partial(self): - """ - Element dos_partial ftype=real(kind=dp) pytype=float - - - Defined at ../src/pdos.F90 line 43 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_pdos__array__dos_partial(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - dos_partial = self._arrays[array_handle] - else: - dos_partial = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_pdos__array__dos_partial) - self._arrays[array_handle] = dos_partial - return dos_partial - - @dos_partial.setter - def dos_partial(self, dos_partial): - self.dos_partial[...] = dos_partial - - @property - def matrix_weights(self): - """ - Element matrix_weights ftype=real(kind=dp) pytype=float - - - Defined at ../src/pdos.F90 line 44 - - """ - array_ndim, array_type, array_shape, array_handle = \ - _OptaPyDOS.f90wrap_od_pdos__array__matrix_weights(f90wrap.runtime.empty_handle) - if array_handle in self._arrays: - matrix_weights = self._arrays[array_handle] - else: - matrix_weights = f90wrap.runtime.get_array(f90wrap.runtime.sizeof_fortran_t, - f90wrap.runtime.empty_handle, - _OptaPyDOS.f90wrap_od_pdos__array__matrix_weights) - self._arrays[array_handle] = matrix_weights - return matrix_weights - - @matrix_weights.setter - def matrix_weights(self, matrix_weights): - self.matrix_weights[...] = matrix_weights - - def __str__(self): - ret = ['{\n'] - ret.append(' dos_partial : ') - ret.append(repr(self.dos_partial)) - ret.append(',\n matrix_weights : ') - ret.append(repr(self.matrix_weights)) - ret.append('}') - return ''.join(ret) - - _dt_array_initialisers = [] - - -od_pdos = Od_Pdos() - -class Xmgrace_Utils(f90wrap.runtime.FortranModule): - """ - Module xmgrace_utils - - - Defined at ../src/xmgrace_utils.f90 lines 23-507 - - """ - @staticmethod - def xmgu_setup(unit): - """ - xmgu_setup(unit) - - - Defined at ../src/xmgrace_utils.f90 lines 45-131 - - Parameters - ---------- - unit : int - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_setup(unit=unit) - - @staticmethod - def xmgu_legend(unit): - """ - xmgu_legend(unit) - - - Defined at ../src/xmgrace_utils.f90 lines 137-160 - - Parameters - ---------- - unit : int - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_legend(unit=unit) - - @staticmethod - def xmgu_title(unit, min_x, max_x, min_y, max_y, title): - """ - xmgu_title(unit, min_x, max_x, min_y, max_y, title) - - - Defined at ../src/xmgrace_utils.f90 lines 167-207 - - Parameters - ---------- - unit : int - min_x : float - max_x : float - min_y : float - max_y : float - title : str - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_title(unit=unit, min_x=min_x, max_x=max_x, min_y=min_y, \ - max_y=max_y, title=title) - - @staticmethod - def xmgu_subtitle(unit, subtitle): - """ - xmgu_subtitle(unit, subtitle) - - - Defined at ../src/xmgrace_utils.f90 lines 213-231 - - Parameters - ---------- - unit : int - subtitle : str - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_subtitle(unit=unit, subtitle=subtitle) - - @staticmethod - def xmgu_axis(unit, axis, label): - """ - xmgu_axis(unit, axis, label) - - - Defined at ../src/xmgrace_utils.f90 lines 237-342 - - Parameters - ---------- - unit : int - axis : str - label : str - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_axis(unit=unit, axis=axis, label=label) - - @staticmethod - def xmgu_data(unit, field, x_data, y_data): - """ - xmgu_data(unit, field, x_data, y_data) - - - Defined at ../src/xmgrace_utils.f90 lines 347-376 - - Parameters - ---------- - unit : int - field : int - x_data : float array - y_data : float array - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_data(unit=unit, field=field, x_data=x_data, \ - y_data=y_data) - - @staticmethod - def xmgu_data_header(unit, field, colour, legend): - """ - xmgu_data_header(unit, field, colour, legend) - - - Defined at ../src/xmgrace_utils.f90 lines 379-469 - - Parameters - ---------- - unit : int - field : int - colour : int - legend : str - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_data_header(unit=unit, field=field, colour=colour, \ - legend=legend) - - @staticmethod - def xmgu_vertical_line(unit, x_coord, y_max, y_min): - """ - xmgu_vertical_line(unit, x_coord, y_max, y_min) - - - Defined at ../src/xmgrace_utils.f90 lines 472-507 - - Parameters - ---------- - unit : int - x_coord : float - y_max : float - y_min : float - - ================================================================== - """ - _OptaPyDOS.f90wrap_xmgu_vertical_line(unit=unit, x_coord=x_coord, y_max=y_max, \ - y_min=y_min) - - _dt_array_initialisers = [] - - -xmgrace_utils = Xmgrace_Utils() - -def my_dcopy(n, dx, incx, dy, incy): - """ - my_dcopy(n, dx, incx, dy, incy) - - - Defined at ../src/comms.F90 lines 667-730 - - Parameters - ---------- - n : int - dx : float array - incx : int - dy : float array - incy : int - - """ - _OptaPyDOS.f90wrap_my_dcopy(n=n, dx=dx, incx=incx, dy=dy, incy=incy) - -def my_zcopy(n, zx, incx, zy, incy): - """ - my_zcopy(n, zx, incx, zy, incy) - - - Defined at ../src/comms.F90 lines 732-777 - - Parameters - ---------- - n : int - zx : complex array - incx : int - zy : complex array - incy : int - - """ - _OptaPyDOS.f90wrap_my_zcopy(n=n, zx=zx, incx=incx, zy=zy, incy=incy) - -def my_icopy(n, zx, incx, zy, incy): - """ - my_icopy(n, zx, incx, zy, incy) - - - Defined at ../src/comms.F90 lines 779-821 - - Parameters - ---------- - n : int - zx : int array - incx : int - zy : int array - incy : int - - """ - _OptaPyDOS.f90wrap_my_icopy(n=n, zx=zx, incx=incx, zy=zy, incy=incy) - diff --git a/optados/src/build.f90 b/optados/src/build.f90 new file mode 100644 index 00000000..7d8e2bf2 --- /dev/null +++ b/optados/src/build.f90 @@ -0,0 +1,17 @@ +module od_build + implicit none + + private ! unless otherwise stated + + type, public :: build_info_type + character(len=20) :: build = '' + character(len=20) :: compiler = 'gfortran' + character(len=20) :: build_type = 'debug' + character(len=20) :: comms_arch = 'serial' + character(len=20) :: source_time = '16:47:50' + character(len=20) :: source_date = 'Mon 28 Aug 2023' + character(len=20) :: compile_date = 'Mon 28 Aug 2023' + character(len=20) :: compile_time = '16:49 BST' + end type build_info_type + type(build_info_type), public, save :: build_info +endmodule od_build diff --git a/optados/src/cell.f90 b/optados/src/cell.f90 index dc92fa04..19bdb09f 100644 --- a/optados/src/cell.f90 +++ b/optados/src/cell.f90 @@ -610,7 +610,7 @@ subroutine cell_read_cell allocate (atoms_pos_cart_photo(3, num_atoms), stat=ierr) if (ierr /= 0) call io_error('Error allocating atoms_pos_cart_photo in cell_get_atoms') - ! Making a copy to use in the photo.f90 subroutine "calc_layer" + ! Making a copy to use in the photo.f90 subroutine "analyse_geometry" atoms_pos_cart_photo = atoms_pos_cart_tmp do loop = 1, num_species @@ -1122,7 +1122,7 @@ subroutine cell_get_real_lattice use od_comms, only: on_root use od_io, only: io_file_unit, seedname, filename_len, stdout, io_time, & - io_error + io_error use od_constants, only: bohr2ang integer :: band_unit @@ -1159,7 +1159,7 @@ subroutine cell_calc_kpoint_r_cart use od_algorithms, only: utility_reciprocal_frac_to_cart use od_comms, only: my_node_id use od_io, only: io_file_unit, seedname, filename_len, stdout, io_time, & - io_error + io_error ! use od_electronic, only : elec_read_band_energy integer :: i, ik, loop, ierr diff --git a/optados/src/constants.f90 b/optados/src/constants.f90 index a57dfabf..93b6f0ce 100644 --- a/optados/src/constants.f90 +++ b/optados/src/constants.f90 @@ -88,4 +88,24 @@ module od_constants & 'Ac', 'Th', 'Pa', 'U ', 'Np', 'Pu', 'Am', 'Cm', 'Bk', 'Cf', 'Es', 'Fm', 'Md', 'No', 'Lr', & & 'Rf', 'Db', 'Sg', 'Bh', 'Hs', 'Mt'/) + ! Based on: S. Alvarez, Dalton Transactions, 2013, 42, 8617-8636. + ! If value == 1.0_dp then no value was supplied, subject to change + real(kind=dp), parameter, dimension(109), public :: periodic_table_vdw = (/ & + & 1.20_dp, 1.43_dp, & + & 2.12_dp, 1.98_dp, 1.91_dp, 1.77_dp, 1.66_dp, 1.50_dp, 1.46_dp, 1.58_dp, & + & 2.50_dp, 2.51_dp, 2.25_dp, 2.19_dp, 1.90_dp, 1.89_dp, 1.82_dp, 1.83_dp, & + & 2.73_dp, 2.62_dp, 2.58_dp, 2.46_dp, 2.42_dp, 2.45_dp, 2.45_dp, 2.44_dp, 2.40_dp, 2.40_dp, 2.38_dp, 2.39_dp, 2.32_dp, & + & 2.29_dp, 1.88_dp, 1.82_dp, 1.86_dp, 2.25_dp, & + & 3.21_dp, 2.84_dp, 2.75_dp, 2.52_dp, 2.56_dp, 2.45_dp, 2.44_dp, 2.46_dp, 2.44_dp, 2.15_dp, 2.53_dp, 2.49_dp, 2.43_dp, & + & 2.42_dp, 2.47_dp, 1.99_dp, 2.04_dp, 2.06_dp, & + & 3.48_dp, 3.03_dp, & + & 2.98_dp, 2.88_dp, 2.92_dp, 2.95_dp, 1.0_dp, 2.90_dp, 2.87_dp, 2.83_dp, 2.79_dp, 2.87_dp, 2.81_dp, 2.83_dp, 2.79_dp, & + & 2.80_dp, 2.74_dp, & + & 2.63_dp, 2.53_dp, 2.57_dp, 2.49_dp, 2.48_dp, 2.41_dp, 2.29_dp, 2.32_dp, 2.45_dp, 2.47_dp, 2.60_dp, 2.54_dp, 1.0_dp, & + & 1.0_dp, 1.0_dp, & + & 1.0_dp, 1.0_dp, & + & 2.8_dp, 2.93_dp, 2.88_dp, 2.71_dp, 2.82_dp, 2.81_dp, 2.83_dp, 3.05_dp, 3.4_dp, 3.05_dp, 2.7_dp, 1.0_dp, 1.0_dp, 1.0_dp,& + & 1.0_dp, & + & 1.0_dp, 1.0_dp, 1.0_dp, 1.0_dp, 1.0_dp, 1.0_dp/) + end module od_constants diff --git a/optados/src/core.f90 b/optados/src/core.f90 index d7903328..158cb46a 100644 --- a/optados/src/core.f90 +++ b/optados/src/core.f90 @@ -83,10 +83,10 @@ end subroutine core_calculate subroutine core_prepare_matrix_elements use od_electronic, only: elnes_mat, elnes_mwab, nbands, nspins, num_electrons, electrons_per_state, & - efermi, band_energy + efermi, band_energy use od_comms, only: my_node_id use od_cell, only: num_kpoints_on_node, cell_get_symmetry, & - num_crystal_symmetry_operations, crystal_symmetry_operations + num_crystal_symmetry_operations, crystal_symmetry_operations use od_parameters, only: core_geom, core_qdir, core_type, legacy_file_format, devel_flag use od_io, only: io_error @@ -176,8 +176,8 @@ subroutine write_core use od_constants, only: bohr2ang, periodic_table_name, pi use od_parameters, only: dos_nbins, core_LAI_broadening, LAI_gaussian, LAI_gaussian_width, & - LAI_lorentzian, LAI_lorentzian_scale, LAI_lorentzian_width, LAI_lorentzian_offset, output_format, & - set_efermi_zero, core_chemical_shift + LAI_lorentzian, LAI_lorentzian_scale, LAI_lorentzian_width, LAI_lorentzian_offset, output_format, & + set_efermi_zero, core_chemical_shift use od_electronic, only: elnes_mwab, elnes_orbital, efermi, efermi_set, nspins use od_io, only: seedname, io_file_unit, io_error use od_dos_utils, only: E, dos_utils_set_efermi, vbm_energy, cbm_energy @@ -698,7 +698,7 @@ subroutine core_lorentzian use od_constants, only: pi, dp use od_parameters, only: LAI_lorentzian_width, LAI_lorentzian_scale, LAI_lorentzian_offset, & - LAI_gaussian_width, dos_nbins, LAI_gaussian, adaptive, linear, fixed + LAI_gaussian_width, dos_nbins, LAI_gaussian, adaptive, linear, fixed use od_dos_utils, only: E use od_electronic, only: nspins, elnes_mwab, efermi use od_dos_utils, only: efermi_fixed, efermi_adaptive, efermi_linear diff --git a/optados/src/electronic.f90 b/optados/src/electronic.f90 index 826c4d7b..9d8388d4 100644 --- a/optados/src/electronic.f90 +++ b/optados/src/electronic.f90 @@ -1459,6 +1459,7 @@ subroutine elec_pdos_read do is = 1, pdos_mwab%nspins read (pdos_in_unit) dummyi ! this is the spin number read (pdos_in_unit) nbands_occ(ik, is) + if (full_debug_pdos_weights) write(nbands_occ(ik,is)) do ib = 1, nbands_occ(ik, is) if (full_debug_pdos_weights) then write (stdout, *) " ***** F U L L _ D E B U G _ P D O S _ W E I G H T S ***** " @@ -1479,8 +1480,15 @@ subroutine elec_pdos_read do is = 1, pdos_mwab%nspins read (pdos_in_unit) dummyi ! this is the spin number read (pdos_in_unit) nbands_occ(ik, is) + if (full_debug_pdos_weights) write (stdout,*) nbands_occ(ik,is) do ib = 1, nbands_occ(ik, is) + if (full_debug_pdos_weights) then + write (stdout, *) " ***** F U L L _ D E B U G _ P D O S _ W E I G H T S ***** " + write (stdout, *) ib, ik, is + write (stdout, *) " **** ***** ***** ***** ***** ***** ***** ***** ***** " + end if read (pdos_in_unit) pdos_weights(1:pdos_mwab%norbitals, ib, ik, is) + if (full_debug_pdos_weights) write (stdout, *) pdos_weights(1:pdos_mwab%norbitals, ib, ik, is) end do end do end do diff --git a/optados/src/io.f90 b/optados/src/io.f90 index 8a2291e2..089f2bcd 100644 --- a/optados/src/io.f90 +++ b/optados/src/io.f90 @@ -75,7 +75,7 @@ subroutine io_get_seedname() seedname = '--help' elseif (num_arg == 1) then call get_command_argument(1, seedname) - ! Added by F. Mildner to allow for multi_output runs + ! Added by F. Mildner to allow for multi_output runs elseif (num_arg == 3) then call get_command_argument(1, options) call get_command_argument(2, temp_dir) diff --git a/optados/src/jdos_utils.f90 b/optados/src/jdos_utils.f90 index 2bd76302..b5c04211 100644 --- a/optados/src/jdos_utils.f90 +++ b/optados/src/jdos_utils.f90 @@ -65,8 +65,9 @@ subroutine jdos_utils_calculate(matrix_weights, weighted_jdos) ! both task : dos and also if it is required elsewhere. !=============================================================================== use od_parameters, only: linear, fixed, adaptive, quad, iprint, dos_per_volume, photo, photo_slab_volume,& - &jdos_max_energy, jdos_spacing - use od_electronic, only: elec_read_band_gradient, band_gradient, nspins, efermi_set + &jdos_max_energy, jdos_spacing, photo + use od_electronic, only: elec_read_band_gradient, band_gradient, nspins, electrons_per_state, & + num_electrons, efermi_set use od_comms, only: on_root, comms_bcast use od_io, only: stdout, io_error, io_time, seedname use od_cell, only: cell_volume @@ -79,7 +80,7 @@ subroutine jdos_utils_calculate(matrix_weights, weighted_jdos) real(kind=dp), intent(out), allocatable, optional :: weighted_jdos(:, :, :) !I've added this real(kind=dp), intent(in), optional :: matrix_weights(:, :, :, :, :) !I've added this - integer :: N_geom, is, idos, wjdos_unit = 25 + integer :: N_geom, is, idos, wjdos_unit = 25, pjdos_unit = 26 logical :: print_weighted_jdos = .false. calc_weighted_jdos = .false. @@ -109,10 +110,9 @@ subroutine jdos_utils_calculate(matrix_weights, weighted_jdos) time0 = io_time() call setup_energy_scale(E) - if (fixed) then if (calc_weighted_jdos) then - call calculate_jdos('f', jdos_fixed, matrix_weights, weighted_jdos) + call calculate_jdos('f', jdos_fixed, matrix_weights, weighted_jdos=weighted_jdos) call jdos_utils_merge(jdos_fixed, weighted_jdos) else call calculate_jdos('f', jdos_fixed) @@ -122,7 +122,7 @@ subroutine jdos_utils_calculate(matrix_weights, weighted_jdos) end if if (adaptive) then if (calc_weighted_jdos) then - call calculate_jdos('a', jdos_adaptive, matrix_weights, weighted_jdos) + call calculate_jdos('a', jdos_adaptive, matrix_weights, weighted_jdos=weighted_jdos) call jdos_utils_merge(jdos_adaptive, weighted_jdos) else call calculate_jdos('a', jdos_adaptive) @@ -131,7 +131,7 @@ subroutine jdos_utils_calculate(matrix_weights, weighted_jdos) end if if (linear) then if (calc_weighted_jdos) then - call calculate_jdos('l', jdos_linear, matrix_weights, weighted_jdos) + call calculate_jdos('l', jdos_linear, matrix_weights, weighted_jdos=weighted_jdos) call jdos_utils_merge(jdos_linear, weighted_jdos) else call calculate_jdos('l', jdos_linear) @@ -270,6 +270,7 @@ subroutine allocate_jdos(jdos) !=============================================================================== use od_electronic, only: nspins use od_io, only: io_error + use od_parameters, only: photo implicit none real(kind=dp), allocatable, intent(out) :: jdos(:, :) @@ -318,11 +319,11 @@ subroutine calculate_jdos(jdos_type, jdos, matrix_weights, weighted_jdos) use od_comms, only: my_node_id, on_root use od_cell, only: num_kpoints_on_node, kpoint_grid_dim, kpoint_weight,& &recip_lattice - use od_parameters, only: adaptive_smearing, fixed_smearing, iprint, & + use od_parameters, only: adaptive_smearing, fixed_smearing, iprint, photo, & &finite_bin_correction, scissor_op, hybrid_linear_grad_tol, hybrid_linear, exclude_bands, num_exclude_bands use od_io, only: io_error, stdout use od_electronic, only: band_gradient, nbands, band_energy, nspins, electrons_per_state, & - & efermi + & efermi, elec_pdos_read, pdos_weights, pdos_mwab, elec_dealloc_pdos use od_dos_utils, only: doslin, doslin_sub_cell_corners use od_algorithms, only: gaussian implicit none @@ -340,41 +341,6 @@ subroutine calculate_jdos(jdos_type, jdos, matrix_weights, weighted_jdos) logical :: linear, fixed, adaptive, force_adaptive - ! ! - ! ! This relies on an IMPORTANT assumption: the bands file is ordered by energy - ! ! and not by band number (e.g. after being processed by CASTEP bands2orbitals) - ! integer, allocatable, dimension(:,:) :: min_index_unocc - - ! if (.not. allocated(min_index_unocc)) then - ! allocate(min_index_unocc(nspins, num_kpoints_on_node(my_node_id)), stat=ierr) - ! if (ierr /= 0) call io_error('Error: calculate_jdos - allocation of max_index_occ failed') - ! end if - - ! do ik = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints - ! do is = 1, nspins ! Loop over spins - ! do ib = 2, nbands ! Loop over bands - ! ! TODO: Test if this is the behaviour we want and or if we have to change the condition - ! if (band_energy(ib -1, is, ik) .gt. band_energy(ib, is, ik)) then - ! call io_error('Error: the band energies in the .bands file used are NOT ORDERED CORRECTLY (i.e. by increasing energy) & - ! & which will give WRONG RESULTS!') - ! end if - ! end do - ! end do - ! end do - - ! do ik = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints - ! do is = 1, nspins ! Loop over spins - ! do ib = 1, nbands ! Loop over bands - ! if (band_energy(ib, is, ik) .ge. efermi) then - ! min_index_unocc(is, ik) = ib - ! exit - ! end if - ! end do - ! end do - ! end do - - ! ! - linear = .false. fixed = .false. adaptive = .false. @@ -420,13 +386,11 @@ subroutine calculate_jdos(jdos_type, jdos, matrix_weights, weighted_jdos) &"Calculating k-point ", ik, " of", num_kpoints_on_node(my_node_id), 'on this node.', "<-- JDOS |" end if do is = 1, nspins - ! occ_states: do ib = 1, min_index_unocc(is,ik) - 1 occ_states: do ib = 1, nbands if (num_exclude_bands > 0) then if (any(exclude_bands == ib)) cycle end if if (band_energy(ib, is, ik) .ge. efermi) cycle occ_states - ! unocc_states: do jb = min_index_unocc(is,ik), nbands unocc_states: do jb = 1, nbands if (band_energy(jb, is, ik) .lt. efermi) cycle unocc_states if (linear .or. adaptive) grad(:) = band_gradient(jb, :, ik, is) - band_gradient(ib, :, ik, is) @@ -470,11 +434,6 @@ subroutine calculate_jdos(jdos_type, jdos, matrix_weights, weighted_jdos) end do end do - ! if (allocated(min_index_unocc)) then - ! deallocate(min_index_unocc, stat=ierr) - ! if (ierr /= 0) call io_error('Error: calculate_jdos - failed to deallocate min_index_unocc') - ! end if - if (iprint > 1 .and. on_root) then write (stdout, '(1x,a78)') '+----------------------------------------------------------------------------+' end if @@ -504,14 +463,15 @@ subroutine jdos_utils_merge(jdos, weighted_jdos) !=============================================================================== use od_comms, only: comms_reduce use od_electronic, only: nspins + use od_parameters, only: photo implicit none real(kind=dp), intent(inout), allocatable, optional :: weighted_jdos(:, :, :) ! bins.spins, orbitals real(kind=dp), allocatable, intent(inout) :: jdos(:, :) - + integer :: N_geom if (present(weighted_jdos)) N_geom = size(weighted_jdos, 3) - + call comms_reduce(jdos(1, 1), nspins*jdos_nbins, "SUM") if (present(weighted_jdos)) call comms_reduce(weighted_jdos(1, 1, 1), nspins*jdos_nbins*N_geom, "SUM") diff --git a/optados/src/od2od.f90 b/optados/src/od2od.f90 index 74912df9..76b433c7 100644 --- a/optados/src/od2od.f90 +++ b/optados/src/od2od.f90 @@ -1169,62 +1169,62 @@ program od2od ! Main case to decide what file format to read in. read_input:select case(trim(infile)) - case ("ome_fmt") +case ("ome_fmt") ome_conv = .true. call get_band_energy() call write_read_file() call read_ome_fmt() - case ("ome_bin") +case ("ome_bin") ome_conv = .true. call get_band_energy() call write_read_file() call read_ome_bin() - case ("fem_fmt") +case ("fem_fmt") fem_conv = .true. call get_band_energy() call write_read_file() call read_fem_fmt() - case ("fem_bin") +case ("fem_bin") fem_conv = .true. call get_band_energy() call write_read_file() call read_fem_bin() - case ("dome_fmt") +case ("dome_fmt") dome_conv = .true. call get_band_energy() call write_read_file() call read_dome_fmt() - case ("dome_bin") +case ("dome_bin") dome_conv = .true. call get_band_energy() call write_read_file() call read_dome_bin() - case ("pdos_fmt") +case ("pdos_fmt") pdos_conv = .true. call get_band_energy() call write_read_file() call read_pdos_fmt() - case ("pdos_bin") +case ("pdos_bin") pdos_conv = .true. call get_band_energy() call write_read_file() call read_pdos_bin() - case ("elnes_fmt") +case ("elnes_fmt") elnes_conv = .true. call get_band_energy() call write_read_file() call read_elnes_fmt() - case ("elnes_bin") +case ("elnes_bin") elnes_conv = .true. call get_band_energy() call write_read_file() call read_elnes_bin() - case ("dummy") +case ("dummy") dummy_conv = .true. call get_band_energy() call write_read_file() write (stdout, *) " Not reading any input file." - case default +case default call io_error('Unknown Input File format speccified') end select read_input write (stdout, *) "+----------------------------------------------------------------------------+" @@ -1232,47 +1232,47 @@ program od2od write (stdout, *) "+------------------------------- Write File ---------------------------------+" ! Main case to decide what file format to write. write_output:select case(trim(outfile)) - case ("ome_fmt") +case ("ome_fmt") if (.not. (dome_conv .or. ome_conv)) call io_error(' Input format '//trim(infile)//' not compatible with output format '& &//trim(outfile)) if (dome_conv) call pad_an_ome() call write_ome_fmt() - case ("ome_bin") +case ("ome_bin") if (.not. (dome_conv .or. ome_conv)) call io_error(' Input format '//trim(infile)//' not compatible with output format '& &//trim(outfile)) if (dome_conv) call pad_an_ome() call write_ome_bin() - case ("fem_fmt") +case ("fem_fmt") if (.not. (fem_conv)) call io_error(' Input format '//trim(infile)//' not compatible with output format '& &//trim(outfile)) call write_fem_fmt() - case ("fem_bin") +case ("fem_bin") if (.not. (fem_conv)) call io_error(' Input format '//trim(infile)//' not compatible with output format '& &//trim(outfile)) call write_fem_bin() - case ("dome_fmt") +case ("dome_fmt") if (.not. (dome_conv .or. ome_conv)) call io_error(' Input format '//trim(infile)//& &' not compatible with output format '//trim(outfile)) if (ome_conv) call slice_an_ome() call write_dome_fmt() - case ("dome_bin") +case ("dome_bin") if (.not. (dome_conv .or. ome_conv)) call io_error(' Input format '//trim(infile)//& &' not compatible with output format '//trim(outfile)) if (ome_conv) call slice_an_ome() call write_dome_bin() - case ("pdos_fmt") +case ("pdos_fmt") if (.not. pdos_conv) call io_error(' Input format '//trim(infile)//' not compatible with output format '//trim(outfile)) call write_pdos_fmt() - case ("pdos_bin") +case ("pdos_bin") if (.not. pdos_conv) call io_error(' Input format '//trim(infile)//' not compatible with output format '//trim(outfile)) call write_pdos_bin() - case ("elnes_fmt") +case ("elnes_fmt") if (.not. elnes_conv) call io_error(' Input format '//trim(infile)//' not compatible with output format '//trim(outfile)) call write_elnes_fmt() - case ("elnes_bin") +case ("elnes_bin") if (.not. elnes_conv) call io_error(' Input format '//trim(infile)//' not compatible with output format '//trim(outfile)) call write_elnes_bin() - case ("dummy") +case ("dummy") write (stdout, *) " Not writing any output file." if (dummy_conv) then write (stdout, *) @@ -1281,7 +1281,7 @@ program od2od write (stdout, *) write (stdout, *) " No point in taking up disk space unnecessarily, eh ?" end if - case default +case default call io_error('Unknown Output File format speccified') end select write_output diff --git a/optados/src/optados.f90 b/optados/src/optados.f90 index 838e1c4e..ff7b826b 100644 --- a/optados/src/optados.f90 +++ b/optados/src/optados.f90 @@ -38,8 +38,8 @@ program optados use od_io, only: io_get_seedname, io_time, io_date, io_file_unit,&! Functions & stdout, stderr, seedname, options, temp_dir ! Variables use od_parameters, only: param_read, param_write_header, param_Dist, param_write, & - param_dealloc, pdos, pdis, dos, jdos, core, optics, photo, iprint, param_write_atomic_coord, & - devel_flag, photo_photon_energy, photo_model + param_dealloc, pdos, pdis, dos, jdos, core, optics, photo, iprint, param_write_atomic_coord, & + devel_flag, photo_photon_energy, photo_model use od_cell, only: cell_calc_lattice, cell_report_parameters, cell_dist use od_electronic, only: elec_read_band_energy, elec_read_band_energy_ordered, elec_report_parameters use od_dos, only: dos_calculate diff --git a/optados/src/optics.f90 b/optados/src/optics.f90 index 7aff5521..651b54c5 100644 --- a/optados/src/optics.f90 +++ b/optados/src/optics.f90 @@ -36,9 +36,15 @@ module od_optics public :: calc_loss_fn public :: calc_absorp public :: calc_reflect + public :: write_epsilon + public :: write_conduct + public :: write_refract + public :: write_loss_fn + public :: write_absorp + public :: write_reflect type :: graph_labels - character(20) :: name + character(40) :: name character(40) :: title character(20) :: x_label character(20) :: y_label @@ -81,12 +87,12 @@ subroutine optics_calculate ! use od_electronic, only: optical_mat, elec_read_optical_mat, nbands, nspins, & - efermi, efermi_set, elec_dealloc_optical + efermi, efermi_set, elec_dealloc_optical use od_cell, only: cell_volume, num_kpoints_on_node, kpoint_r use od_jdos_utils, only: jdos_utils_calculate use od_comms, only: on_root, my_node_id use od_parameters, only: optics_geom, adaptive, linear, fixed, optics_intraband, & - optics_drude_broadening + optics_drude_broadening use od_dos_utils, only: dos_utils_calculate_at_e, dos_utils_set_efermi use od_io, only: stdout @@ -106,7 +112,7 @@ subroutine optics_calculate call make_weights(matrix_weights) ! Send matrix element to jDOS routine and get weighted jDOS back - call jdos_utils_calculate(matrix_weights, weighted_jdos) + call jdos_utils_calculate(matrix_weights, weighted_jdos=weighted_jdos) ! Calculate weighted DOS at Ef for intraband term if (optics_intraband) then @@ -141,13 +147,13 @@ subroutine optics_calculate end if ! Write everything out - call write_epsilon + call write_epsilon(0) if (.not. index(optics_geom, 'tensor') > 0) then call write_conduct - call write_refract + call write_refract(0) call write_loss_fn - call write_absorp - call write_reflect + call write_absorp(0) + call write_reflect(0) end if end if @@ -160,9 +166,9 @@ subroutine make_weights(matrix_weights) !*************************************************************** use od_constants, only: dp use od_electronic, only: nbands, nspins, optical_mat, num_electrons, & - electrons_per_state, band_energy, efermi + electrons_per_state, band_energy, efermi use od_cell, only: nkpoints, cell_volume, num_kpoints_on_node, cell_get_symmetry, & - num_crystal_symmetry_operations, crystal_symmetry_operations, kpoint_r + num_crystal_symmetry_operations, crystal_symmetry_operations, kpoint_r use od_parameters, only: optics_geom, optics_qdir, legacy_file_format, scissor_op, devel_flag use od_io, only: io_error, stdout use od_comms, only: my_node_id @@ -357,7 +363,7 @@ subroutine make_weights(matrix_weights) matrix_weights(n_eigen, n_eigen2, N, N_spin, N_geom) = (factor/3.0_dp)* & & (real(g(1)*conjg(g(1)), dp) + real(g(2)*conjg(g(2)), dp) + & & real(g(3)*conjg(g(3)), dp)) - write (*, *) matrix_weights(n_eigen, n_eigen2, N, N_spin, N_geom) + ! write (*, *) matrix_weights(n_eigen, n_eigen2, N, N_spin, N_geom) ! print *, n_eigen, n_eigen2, N, matrix_weights(n_eigen,n_eigen2,N,N_spin,N_geom) ! print *, band_energy(n_eigen2,N_spin,N), band_energy(n_eigen,N_spin,N) else @@ -496,7 +502,7 @@ subroutine make_weights(matrix_weights) end subroutine make_weights !*************************************************************** - subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e) + subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e, photo_atom_volume) !*************************************************************** ! This subroutine calculates epsilon_2 @@ -510,6 +516,7 @@ subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e) real(kind=dp), intent(in), allocatable, dimension(:, :, :) :: weighted_jdos real(kind=dp), intent(in), allocatable, dimension(:, :) :: weighted_dos_at_e + real(kind=dp), intent(in), optional :: photo_atom_volume integer :: N_energy integer :: N @@ -523,9 +530,11 @@ subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e) real(kind=dp) :: epsilon2_const dE = E(2) - E(1) - if (photo) then - epsilon2_const = (e_charge*pi*1E-20)/(photo_slab_volume*1E-30*epsilon_0) + if (present(photo_atom_volume)) then + epsilon2_const = (e_charge*pi*1E-20)/(photo_atom_volume*1E-30*epsilon_0) + write (stdout, '(1x,a33,1x,f15.8,3x,a25)') '+------------ Using atom_volume =', photo_atom_volume, '------------------------+' else + write (stdout, '(1x,a78)') '+----------------------------- Using cell_volume ----------------------------+' epsilon2_const = (e_charge*pi*1E-20)/(cell_volume*1E-30*epsilon_0) end if !epsilon2_const = (e_charge*pi*1E-20)/(cell_volume*1E-30*epsilon_0) @@ -538,9 +547,11 @@ subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e) intra(N) = intra(N) + weighted_dos_at_e(N_spin, N) end do end do - if (photo) then - intra = intra*e_charge/(photo_slab_volume*1E-10*epsilon_0) + if (present(photo_atom_volume)) then + write (stdout, '(1x,a33,1x,f15.8,3x,a25)') '+------------ Using atom_volume =', photo_atom_volume, '------------------------+' + intra = intra*e_charge/(photo_atom_volume*1E-10*epsilon_0) else + write (stdout, '(1x,a78)') '+----------------------------- Using cell_volume ----------------------------+' intra = intra*e_charge/(cell_volume*1E-10*epsilon_0) end if ! intra = intra*e_charge/(cell_volume*1E-10*epsilon_0) @@ -581,24 +592,14 @@ subroutine calc_epsilon_2(weighted_jdos, weighted_dos_at_e) x = x + ((N*(dE**2)*epsilon(N, 2, 1, 3))/((hbar**2)*E(N)*e_charge)) end if end do - if (photo) then - N_eff = (x*e_mass*photo_slab_volume*1E-30*epsilon_0*2)/(pi) + if (present(photo_atom_volume)) then + N_eff = (x*e_mass*photo_atom_volume*1E-30*epsilon_0*2)/(pi) else + write (stdout, '(1x,a78)') '+----------------------------- Using cell_volume ----------------------------+' N_eff = (x*e_mass*cell_volume*1E-30*epsilon_0*2)/(pi) end if ! N_eff = (x*e_mass*cell_volume*1E-30*epsilon_0*2)/(pi) end if - - if (iprint .eq. 4 .and. on_root) then - write (stdout, '(1x,a78)') '+----------------------------- Printing Epsilon-2 ---------------------------+' - if (.not. optics_intraband) then - write (stdout, '(99999(es13.5))') (((epsilon(jdos_bin, j, N2, 1), N2=1, N_geom), j=1, 2), jdos_bin=1, jdos_nbins) - else - write (stdout, '(99999(es13.5))') ((((epsilon(jdos_bin, j, N2, i), i=1, 3), N2=1, N_geom), j=1, 2), jdos_bin=1, jdos_nbins) - end if - write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' - end if - end subroutine calc_epsilon_2 !*************************************************************** @@ -658,16 +659,6 @@ subroutine calc_epsilon_1 end do end do - if (iprint .eq. 4 .and. on_root) then - write (stdout, '(1x,a78)') '+----------------------------- Printing Epsilon-1 ---------------------------+' - if (.not. optics_intraband) then - write (stdout, '(99999(es13.5))') (((epsilon(jdos_bin, j, N2, 1), N2=1, N_geom), j=1, 2), jdos_bin=1, jdos_nbins) - else - write (stdout, '(99999(es13.5))') ((((epsilon(jdos_bin, j, N2, i), i=1, 3), N2=1, N_geom), j=1, 2), jdos_bin=1, jdos_nbins) - end if - write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' - end if - end subroutine calc_epsilon_1 !*************************************************************** @@ -815,11 +806,11 @@ subroutine calc_refract refract = 0.0_dp if (.not. optics_intraband) then - do N_energy = 2, jdos_nbins + do N_energy = 1, jdos_nbins refract(N_energy, 1) = (0.5_dp*((((epsilon(N_energy, 1, 1, 1)**2) +& &(epsilon(N_energy, 2, 1, 1)**2))**0.5_dp) + epsilon(N_energy, 1, 1, 1)))**(0.5_dp) end do - do N_energy = 2, jdos_nbins + do N_energy = 1, jdos_nbins refract(N_energy, 2) = (0.5_dp*((((epsilon(N_energy, 1, 1, 1)**2) +& &(epsilon(N_energy, 2, 1, 1)**2))**0.5_dp) - epsilon(N_energy, 1, 1, 1)))**(0.5_dp) end do @@ -875,7 +866,7 @@ subroutine calc_reflect end subroutine calc_reflect !*************************************************************** - subroutine write_epsilon + subroutine write_epsilon(atom, photo_at_e, photo_volume) !*************************************************************** ! This subroutine writes out the dielectric function @@ -889,10 +880,18 @@ subroutine write_epsilon integer :: N, N2, N3 real(kind=dp) ::dE integer :: epsilon_unit + integer, intent(in), optional :: atom + real(kind=dp), intent(in), dimension(:, :), optional :: photo_at_e + real(kind=dp), intent(in), optional :: photo_volume + character(len=3) :: atom_char type(graph_labels) :: label - - label%name = "epsilon" + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + label%name = "epsilon_atom_"//trim(adjustl(atom_char)) + else + label%name = "epsilon" + end if label%title = "Dielectric Function" ! Dimensionless label%x_label = "Energy (eV)" label%y_label = "" @@ -903,8 +902,12 @@ subroutine write_epsilon ! Open the output file epsilon_unit = io_file_unit() - open (unit=epsilon_unit, action='write', file=trim(seedname)//'_epsilon.dat') - + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + open (unit=epsilon_unit, action='write', file=trim(seedname)//'_epsilon_atom_'//trim(adjustl(atom_char))//'.dat') + else + open (unit=epsilon_unit, action='write', file=trim(seedname)//'_epsilon.dat') + end if ! Write into the output file write (epsilon_unit, *) '#*********************************************' write (epsilon_unit, *) '# Dielectric function ' @@ -917,7 +920,11 @@ subroutine write_epsilon write (epsilon_unit, *) '# Number of electrons:', num_electrons(1), num_electrons(2) end if write (epsilon_unit, *) '# Number of bands:', nbands - write (epsilon_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + if (present(photo_volume)) then + write (epsilon_unit, *) '# Volume calculated for optics and photoemission (Ang^3):', photo_volume + else + write (epsilon_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + end if write (epsilon_unit, *) '#' write (epsilon_unit, '(1x,a,f10.6,1x,a,f10.6,1x,a)') & & '# Dielectric function calculated to', jdos_max_energy, 'eV in', dE, 'eV steps' @@ -934,9 +941,15 @@ subroutine write_epsilon write (epsilon_unit, *) '#' if (optics_intraband) then write (epsilon_unit, *) '# Calculation includes intraband term' - if (fixed) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(1, :) - if (adaptive) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(2, :) - if (linear) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(3, :) + if (present(photo_at_e)) then + if (fixed) write (epsilon_unit, *) '# DOS at Ef:', photo_at_e(1, :) + if (adaptive) write (epsilon_unit, *) '# DOS at Ef:', photo_at_e(2, :) + if (linear) write (epsilon_unit, *) '# DOS at Ef:', photo_at_e(3, :) + else + if (fixed) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(1, :) + if (adaptive) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(2, :) + if (linear) write (epsilon_unit, *) '# DOS at Ef:', dos_at_e(3, :) + end if do N = 1, N_geom write (epsilon_unit, *) '# Plasmon energy:', (intra(N)**0.5) end do @@ -946,19 +959,19 @@ subroutine write_epsilon write (epsilon_unit, *) '#' if (.not. optics_intraband) then do N = 1, jdos_nbins - write (epsilon_unit, *) E(N), epsilon(N, 1, 1, 1), epsilon(N, 2, 1, 1) + write (epsilon_unit, *) E(N), ',', epsilon(N, 1, 1, 1), ',', epsilon(N, 2, 1, 1) end do else write (epsilon_unit, *) '' write (epsilon_unit, *) '' do N = 1, jdos_nbins - write (epsilon_unit, *) E(N), epsilon(N, 1, 1, 1), epsilon(N, 2, 1, 1) + write (epsilon_unit, *) E(N), ',', epsilon(N, 1, 1, 1), ',', epsilon(N, 2, 1, 1) end do do N2 = 2, 3 write (epsilon_unit, *) '' write (epsilon_unit, *) '' - do N = 1, jdos_nbins - write (epsilon_unit, *) E(N), epsilon(N, 1, 1, N2), epsilon(N, 2, 1, N2)/(E(N)*e_charge) + do N = 2, jdos_nbins + write (epsilon_unit, *) E(N), ',', epsilon(N, 1, 1, N2), ',', epsilon(N, 2, 1, N2)/(E(N)*e_charge) end do end do end if @@ -1017,7 +1030,7 @@ subroutine write_loss_fn use od_cell, only: nkpoints, cell_volume use od_parameters, only: optics_geom, optics_qdir, jdos_max_energy, scissor_op, output_format, & - optics_intraband, optics_lossfn_broadening + optics_intraband, optics_lossfn_broadening use od_electronic, only: nbands, num_electrons, nspins use od_jdos_utils, only: jdos_nbins, E use od_io, only: seedname, io_file_unit, stdout @@ -1206,7 +1219,7 @@ subroutine write_conduct end subroutine write_conduct !*************************************************************** - subroutine write_refract + subroutine write_refract(atom, photo_volume) !*************************************************************** ! This subroutine writes out the refractive index @@ -1218,10 +1231,17 @@ subroutine write_refract integer :: N integer :: refract_unit + integer, intent(in), optional :: atom + real(kind=dp), intent(in), optional :: photo_volume + character(len=3) :: atom_char type(graph_labels) :: label - - label%name = "refractive_index" + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + label%name = "refractive_index_atom_"//trim(adjustl(atom_char)) + else + label%name = "refractive_index" + end if label%title = "Refractive Index" ! Dimensionless label%x_label = "Energy (eV)" label%y_label = "" @@ -1230,7 +1250,12 @@ subroutine write_refract ! Open the output file refract_unit = io_file_unit() - open (unit=refract_unit, action='write', file=trim(seedname)//'_refractive_index.dat') + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + open (unit=refract_unit, action='write', file=trim(seedname)//'_refractive_index_atom_'//trim(adjustl(atom_char))//'.dat') + else + open (unit=refract_unit, action='write', file=trim(seedname)//'_refractive_index.dat') + end if ! Write into the output file write (refract_unit, *) '#*********************************************' @@ -1246,7 +1271,11 @@ subroutine write_refract write (refract_unit, *) '# Number of electrons:', num_electrons(1), num_electrons(2) end if write (refract_unit, *) '# No of bands:', nbands - write (refract_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + if (present(photo_volume)) then + write (refract_unit, *) '# Volume calculated for optics and photoemission (Ang^3):', photo_volume + else + write (refract_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + end if write (refract_unit, *) '#' write (refract_unit, *) '# optics_geom: ', optics_geom if (index(optics_geom, 'polar') > 0) then @@ -1258,7 +1287,7 @@ subroutine write_refract end if write (refract_unit, *) '#' do N = 1, jdos_nbins - write (refract_unit, *) E(N), refract(N, 1), refract(N, 2) + write (refract_unit, *) E(N), ',', refract(N, 1), ',', refract(N, 2) end do ! Close output file @@ -1275,7 +1304,7 @@ subroutine write_refract end subroutine write_refract !*************************************************************** - subroutine write_absorp + subroutine write_absorp(atom, photo_volume) !*************************************************************** ! This subroutine writes out the absorption coefficient @@ -1287,10 +1316,17 @@ subroutine write_absorp integer :: N integer :: absorp_unit + integer, intent(in), optional :: atom + real(kind=dp), intent(in), optional :: photo_volume + character(len=3) :: atom_char type(graph_labels) :: label - - label%name = "absorption" + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + label%name = "absorption_atom_"//trim(adjustl(atom_char)) + else + label%name = "absorption" + end if label%title = "Absorption Coefficient (m-1)" ! per metre label%x_label = "Energy (eV)" label%y_label = "" @@ -1298,7 +1334,12 @@ subroutine write_absorp ! Open the output file absorp_unit = io_file_unit() - open (unit=absorp_unit, action='write', file=trim(seedname)//'_absorption.dat') + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + open (unit=absorp_unit, action='write', file=trim(seedname)//'_absorption_atom_'//trim(adjustl(atom_char))//'.dat') + else + open (unit=absorp_unit, action='write', file=trim(seedname)//'_absorption.dat') + end if ! Write into the output file write (absorp_unit, *) '#*********************************************' @@ -1313,7 +1354,11 @@ subroutine write_absorp write (absorp_unit, *) '# Number of electrons:', num_electrons(1), num_electrons(2) end if write (absorp_unit, *) '# No of bands:', nbands - write (absorp_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + if (present(photo_volume)) then + write (absorp_unit, *) '# Volume calculated for optics and photoemission (Ang^3):', photo_volume + else + write (absorp_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + end if write (absorp_unit, *) '#' write (absorp_unit, *) '# optics_geom: ', optics_geom if (index(optics_geom, 'polar') > 0) then @@ -1325,7 +1370,7 @@ subroutine write_absorp end if write (absorp_unit, *) '#' do N = 1, jdos_nbins - write (absorp_unit, *) E(N), absorp(N) + write (absorp_unit, *) E(N), ',', absorp(N) end do ! Close output file @@ -1342,7 +1387,7 @@ subroutine write_absorp end subroutine write_absorp !*************************************************************** - subroutine write_reflect + subroutine write_reflect(atom, photo_volume) !*************************************************************** ! This subroutine writes out the reflection coefficient @@ -1354,9 +1399,17 @@ subroutine write_reflect integer :: N integer :: reflect_unit + integer, intent(in), optional :: atom + real(kind=dp), intent(in), optional :: photo_volume + character(len=3) :: atom_char type(graph_labels) :: label - label%name = "reflection" + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + label%name = "reflection_atom_"//trim(adjustl(atom_char)) + else + label%name = "reflection" + end if label%title = "Reflection Coefficient" ! Dimensionless label%x_label = "Energy (eV)" label%y_label = "" @@ -1364,7 +1417,12 @@ subroutine write_reflect ! Open the output file reflect_unit = io_file_unit() - open (unit=reflect_unit, action='write', file=trim(seedname)//'_reflection.dat') + if (atom .gt. 0) then + write (atom_char, '(I3)') atom + open (unit=reflect_unit, action='write', file=trim(seedname)//'_reflection_atom_'//trim(adjustl(atom_char))//'.dat') + else + open (unit=reflect_unit, action='write', file=trim(seedname)//'_reflection.dat') + end if ! Write into the output file write (reflect_unit, *) '#*********************************************' @@ -1380,7 +1438,11 @@ subroutine write_reflect write (reflect_unit, *) '# Number of electrons:', num_electrons(1), num_electrons(2) end if write (reflect_unit, *) '# No of bands:', nbands - write (reflect_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + if (present(photo_volume)) then + write (reflect_unit, *) '# Volume calculated for optics and photoemission (Ang^3):', photo_volume + else + write (reflect_unit, *) '# Volume of the unit cell (Ang^3):', cell_volume + end if write (reflect_unit, *) '#' write (reflect_unit, *) '# optics_geom: ', optics_geom if (index(optics_geom, 'polar') > 0) then @@ -1392,7 +1454,7 @@ subroutine write_reflect end if write (reflect_unit, *) '#' do N = 1, jdos_nbins - write (reflect_unit, *) E(N), reflect(N) + write (reflect_unit, *) E(N), ',', reflect(N) end do ! Close output file diff --git a/optados/src/parameters.f90 b/optados/src/parameters.f90 index 657d3de5..1332c7ee 100644 --- a/optados/src/parameters.f90 +++ b/optados/src/parameters.f90 @@ -138,6 +138,7 @@ module od_parameters real(kind=dp), public, save :: photo_bulk_length real(kind=dp), public, save :: photo_temperature real(kind=dp), public, save :: photo_elec_field + integer, public, save :: photo_len_imfp_const real(kind=dp), dimension(:), allocatable, public, save :: photo_imfp_const ! real(kind=dp), dimension(:), allocatable, public, save :: photo_imfp_list ! logical, public, save :: photo_e_units @@ -497,34 +498,35 @@ subroutine param_read() call io_error('Error: please set volume of the slab for photoemission calculation') photo_layer_choice = 'optados' - call param_get_keyword('photo_layer_choice',found, c_value=photo_layer_choice) + call param_get_keyword('photo_layer_choice', found, c_value=photo_layer_choice) photo_max_layer = -1 - call param_get_keyword('photo_max_layer',found,i_value=photo_max_layer) - if (photo .and. index(photo_layer_choice,'user') .gt. 0 .and. .not. found) & - call io_error('Error: max # of layers was set to be supplied by user, but does not exist in input') - + call param_get_keyword('photo_max_layer', found, i_value=photo_max_layer) + if (photo .and. index(photo_layer_choice, 'user') .gt. 0 .and. .not. found) & + call io_error('Error: max # of layers was set to be supplied by user, but does not exist in input') photo_elec_field = 0.00_dp call param_get_keyword('photo_elec_field', found, r_value=photo_elec_field) call param_get_vector_length('photo_imfp_const', found, i_temp) if (found) then + photo_len_imfp_const = i_temp allocate (photo_imfp_const(i_temp), stat=ierr) if (ierr /= 0) call io_error('Error: param_read - allocation failed for photo_imfp_const') call param_get_keyword_vector('photo_imfp_const', found, i_temp, r_value=photo_imfp_const) else - allocate (photo_imfp_const(1),stat=ierr) + photo_len_imfp_const = 1 + allocate (photo_imfp_const(1), stat=ierr) if (ierr /= 0) call io_error('Error: param_read - allocation failed for photo_imfp_const') photo_imfp_const = 0.0_dp end if if (photo .and. .not. found) & - call io_error('Error: constant imfp, but photo_imfp_const is not set') + call io_error('Error: constant imfp, but photo_imfp_const is not set') num_atoms = 0 num_species = 0 num_crystal_symmetry_operations = 0 - if (pdos .or. pdis .or. core .or. optics .or. photo) then + if (pdos .or. pdis .or. core .or. optics .or. photo .or. jdos) then ! try to read in the atoms from the cell file. ! We don't need them otherwise, so let's not bother ! if(index(devel_flag,'old_filename')>0) then @@ -950,15 +952,15 @@ subroutine param_write write (stdout, '(1x,a46,1x,1f10.4,20x,a1)') '| Work Function (eV) :', photo_work_function, '|' write (stdout, '(1x,a46,1x,1f10.4,20x,a1)') '| Surface Area (Ang**2) :', photo_surface_area, '|' write (stdout, '(1x,a46,1x,1f10.4,20x,a1)') '| Slab Volume (Ang**3) :', photo_slab_volume, '|' - if (index(photo_layer_choice,'user') > 0) then - write (stdout, '(1x,a46,2x,I4,25x,a1)') '| User set maximal # of layers for calc. :',photo_max_layer,'|' + if (index(photo_layer_choice, 'user') > 0) then + write (stdout, '(1x,a46,2x,I4,25x,a1)') '| User set maximal # of layers for calc. :', photo_max_layer, '|' end if - if (size(photo_imfp_const,1) .eq. 1) then + if (size(photo_imfp_const, 1) .eq. 1) then write (stdout, '(1x,a46,1x,1f10.4,20x,a1)') '| IMFP Constant (Ang) :', photo_imfp_const(1), '|' else write (stdout, '(1x,a78)') '| IMFP Constant (Ang) : Layer values provided by user |' write (stdout, '(1x,a78)') '| values will be printed later |' - endif + end if if ((photo_elec_field .gt. 1.0E-4_dp) .or. (photo_elec_field .lt. 1.0E-25_dp)) then write (stdout, '(1x,a46,1x,1f10.4,20x,a1)') '| Electric Field Strength (V/Ang) :', photo_elec_field, '|' else @@ -1719,8 +1721,15 @@ subroutine param_dist call comms_bcast(photo_work_function, 1) call comms_bcast(photo_surface_area, 1) call comms_bcast(photo_slab_volume, 1) + call comms_bcast(photo_layer_choice, len(photo_layer_choice)) + call comms_bcast(photo_max_layer, 1) call comms_bcast(photo_elec_field, 1) - call comms_bcast(photo_imfp_const(1), size(photo_imfp_const,1)) + call comms_bcast(photo_len_imfp_const, 1) + if (.not. on_root) then + allocate (photo_imfp_const(photo_len_imfp_const), stat=ierr) + if (ierr /= 0) call io_error('Error: param_dist - allocation failed for photo_imfp_const') + end if + call comms_bcast(photo_imfp_const(1), photo_len_imfp_const) call comms_bcast(photo_bulk_length, 1) call comms_bcast(photo_temperature, 1) call comms_bcast(write_photo_output, len(write_photo_output)) diff --git a/optados/src/photo.f90 b/optados/src/photo.f90 index 451ad750..ad82093c 100644 --- a/optados/src/photo.f90 +++ b/optados/src/photo.f90 @@ -28,6 +28,7 @@ module od_photo implicit none private public :: photo_calculate + public :: make_pdos_weights_atoms real(kind=dp), allocatable, public, dimension(:, :, :, :) :: pdos_weights_atoms real(kind=dp), allocatable, public, dimension(:, :, :, :, :) :: matrix_weights @@ -35,7 +36,7 @@ module od_photo real(kind=dp), allocatable, public, dimension(:, :, :, :, :) :: foptical_matrix_weights real(kind=dp), allocatable, public, dimension(:, :, :) :: weighted_jdos real(kind=dp), allocatable, public, dimension(:, :) :: absorp_layer - real(kind=dp), allocatable, dimension(:, :, :) :: pdos_weights_k_band + real(kind=dp), allocatable, public, dimension(:, :, :) :: pdos_weights_k_band real(kind=dp), allocatable, dimension(:, :, :) :: imfp_val real(kind=dp), allocatable, dimension(:, :, :, :) :: electron_esc real(kind=dp), dimension(:, :), allocatable :: I_layer @@ -49,7 +50,10 @@ module od_photo real(kind=dp), dimension(:), allocatable :: thickness_atom real(kind=dp), dimension(:), allocatable :: thickness_layer + real(kind=dp), dimension(:), allocatable :: volume_layer + real(kind=dp), dimension(:), allocatable :: volume_atom real(kind=dp), dimension(:), allocatable :: atom_imfp + integer :: first_atom_second_l, last_atom_secondlast_l real(kind=dp), dimension(:, :), allocatable :: new_atoms_coordinates real(kind=dp), allocatable, dimension(:, :, :) :: phi_arpes real(kind=dp), allocatable, dimension(:, :, :) :: theta_arpes @@ -111,9 +115,9 @@ subroutine photo_calculate write (stdout, '(1x,a78)') '| |' end if - if (index(devel_flag,'geom_analysis')>0) then + if (index(devel_flag, 'geom_analysis') > 0) then write (stdout, '(1x,a78)') '+ Only performing the analysis of the supplied geometry! +' - call calc_layers + call analyse_geometry return end if @@ -123,8 +127,7 @@ subroutine photo_calculate end if !Identify layers - - call calc_layers + call analyse_geometry call calc_band_info call elec_read_optical_mat @@ -152,8 +155,8 @@ subroutine photo_calculate do i = 1, number_energies time_a = io_time() temp_photon_energy = photo_photon_min + (i - 1)*jdos_spacing - if (on_root) write (stdout, '(1x,a50,f8.4,a20S)') '+--------------- Starting Photoemission Sweep with', temp_photon_energy,& - &' eV ---------------+' + if (on_root) write (stdout, '(1x,a50,f8.4,a20)') '+--------------- Starting Photoemission Sweep with', temp_photon_energy,& + &' eV ---------------+' current_index = i current_energy_index = index_energy(i) !Calculate the photoemission angles theta/phi and transverse energy @@ -233,27 +236,32 @@ subroutine photo_calculate end subroutine photo_calculate !*************************************************************** - subroutine calc_layers + subroutine analyse_geometry !*************************************************************** !This subroutine identifies the layer of each atom - use od_constants, only: dp - use od_cell, only: num_atoms, atoms_pos_cart_photo, atoms_label_tmp + use od_constants, only: dp, periodic_table_name, periodic_table_vdw, deg_to_rad + use od_cell, only: num_atoms, atoms_pos_cart_photo, atoms_label_tmp, num_species, cell_volume, real_lattice use od_io, only: stdout, io_error use od_comms, only: on_root - use od_parameters, only: devel_flag, photo_max_layer, photo_layer_choice, photo_imfp_cons + use od_parameters, only: devel_flag, photo_max_layer, photo_layer_choice, photo_imfp_const implicit none integer :: atom_1, atom_2, i, atom_index, temp, first, ierr, atom, ic + real(kind=dp), allocatable, dimension(:) :: vdw_radii + real(kind=dp) :: z_temp, z_zero = 0.0_dp, cell_area, devel_volume allocate (atom_order(num_atoms), stat=ierr) - if (ierr /= 0) call io_error('Error: calc_layers - allocation of atom_order failed') + if (ierr /= 0) call io_error('Error: analyse_geometry - allocation of atom_order failed') + + allocate (vdw_radii(num_atoms), stat=ierr) + if (ierr /= 0) call io_error('Error: analyse_geometry - allocation of atom_order failed') allocate (layer(num_atoms), stat=ierr) - if (ierr /= 0) call io_error('Error: calc_layers - allocation of layer failed') + if (ierr /= 0) call io_error('Error: analyse_geometry - allocation of layer failed') do i = 1, num_atoms atom_order(i) = i end do - !SORTING ALGORITHM + !SORTING ALGORITHM to sort the atoms by z-coordinate do atom_1 = 1, num_atoms - 1 first = atom_order(atom_1) do atom_2 = atom_1 + 1, num_atoms @@ -271,8 +279,24 @@ subroutine calc_layers end do end do + ! Capitalise the first letter of the atomic label for later + do atom = 1, num_atoms + ic = ichar(atoms_label_tmp(atom_order(atom)) (1:1)) + if ((ic .ge. ichar('a')) .and. (ic .le. ichar('z'))) & + atoms_label_tmp(atom_order(atom)) (1:1) = char(ic + ichar('Z') - ichar('z')) + end do + + ! Retreive the van-der-Waals radii from the constants + do atom_1 = 1, num_atoms + do i = 1, 109 + if (atoms_label_tmp(atom_order(atom_1)) .eq. periodic_table_name(i)) then + vdw_radii(atom_1) = periodic_table_vdw(i) + end if + end do + end do + ! DEFINE THE LAYER FOR EACH ATOM - ! Assume that a new layer starts if the atom type changes or + ! Assume that a new layer starts if the atom type changes or ! the atom is more than 0.5 Angstrom lower than the current layer i = 1 layer(1) = 1 @@ -284,11 +308,6 @@ subroutine calc_layers layer(atom) = i end do - do atom = 1, num_atoms - ic = ichar(atoms_label_tmp(atom_order(atom)) (1:1)) - if ((ic .ge. ichar('a')) .and. (ic .le. ichar('z'))) & - atoms_label_tmp(atom_order(atom)) (1:1) = char(ic + ichar('Z') - ichar('z')) - end do if (on_root) then write (stdout, '(1x,a78)') '+------------------------------- Atomic Order ------------------------------+' write (stdout, '(1x,a78)') '| Atom | Atom Order | Layer | Atom Z-Coordinate (Ang) |' @@ -322,31 +341,130 @@ subroutine calc_layers if (index(devel_flag, 'layer_user') > 0) then write (stdout, '(1x,a78)') '| *** ATTENTION *** : The max_layer value was supplied by the user! |' end if - + write (stdout, '(1x,a78)') '+----------------------------------------------------------------------------+' end if - !CALCULATE HOW MANY ATOMS PER LAYER + allocate (thickness_atom(max_atoms), stat=ierr) + if (ierr /= 0) call io_error('Error: calc_absorp_layer - allocation of thickness_atom failed') + thickness_atom = 0.0_dp + + allocate (volume_atom(max_atoms), stat=ierr) + if (ierr /= 0) call io_error('Error: calc_absorp_layer - allocation of thickness_atom failed') + thickness_atom = 0.0_dp + + !CALCULATE HOW MANY ATOMS PER LAYER THERE ARE allocate (atoms_per_layer(max_layer), stat=ierr) - if (ierr /= 0) call io_error('Error: calc_layers - allocation of atoms_per_layer failed') + if (ierr /= 0) call io_error('Error: analyse_geometry - allocation of atoms_per_layer failed') atoms_per_layer = 1 do atom = 2, max_atoms if (layer(atom) .eq. layer(atom - 1)) then atoms_per_layer(layer(atom)) = atoms_per_layer(layer(atom)) + 1 end if end do + ! do i = 1, max_layer + ! write (stdout, *) 'Layer: ', i, atoms_per_layer(i), ' |' + ! end do + + ! Redefine z=0 (i.e. surface) to the top part of the atom sticking out of the surface the most + do atom = 1, max_atoms + if (layer(atom) .gt. 3) exit + z_temp = atoms_pos_cart_photo(3, atom_order(atom)) + vdw_radii(atom)*sin(45*deg_to_rad) + if (z_temp .gt. z_zero) then + z_zero = z_temp + end if + end do + + ! Calculate the thickness of each of the layers + if (max_layer .lt. 2) then + ! TODO: Check if this is a reasonable estimate for the single layer case + do atom_1 = 1, max_atoms + thickness_atom = vdw_radii(atom_1)*2 + end do + else + ! Setting thickness_atom for the first atom in layer # 1 and finding the first atom in the second layer + do atom = 2, max_atoms + if (layer(atom) .gt. 1) then + ! write (stdout, *) 'z_zero', z_zero, '1', atoms_pos_cart_photo(3, atom_order(1)), 'second layer', & + ! atoms_pos_cart_photo(3, atom_order(atom)) + thickness_atom(1) = z_zero - ((atoms_pos_cart_photo(3, atom_order(1)) + atoms_pos_cart_photo(3, atom_order(atom)))/2) + first_atom_second_l = atom + exit + end if + end do + ! Setting thickness_atom for the rest of the atoms in the first layer + do i = 2, first_atom_second_l - 1 + thickness_atom(i) = ((atoms_pos_cart_photo(3, atom_order(i)) - & + atoms_pos_cart_photo(3, atom_order(first_atom_second_l)))/2)*2 + end do + ! Setting thickness_atom for the last atom in the last layer and finding the last atom in the second to last layer + do i = 1, max_atoms + if (layer(max_atoms - i) .lt. layer(max_atoms)) then + thickness_atom(max_atoms) = (abs(atoms_pos_cart_photo(3, atom_order(max_atoms)) - & + atoms_pos_cart_photo(3, atom_order(max_atoms - i)))/2)*2 + last_atom_secondlast_l = max_atoms - i + exit + end if + end do + ! Setting thickness_atom for the atoms in the last layer, but not for the last atom + do i = last_atom_secondlast_l + 1, max_atoms - 1 + thickness_atom(i) = (abs(atoms_pos_cart_photo(3, atom_order(i)) - & + atoms_pos_cart_photo(3, atom_order(last_atom_secondlast_l)))/2)*2 + end do + ! Setting thickness_atom for the atoms in between the first and last layers + ! Formula -> abs( (z(last atom in n-1th layer) - z(atom) )/2 ) + abs( (z(first atom in n+1th layer) - z(atom) )/2 ) + do atom = first_atom_second_l, last_atom_secondlast_l + thickness_atom(atom) = abs((atoms_pos_cart_photo(3, atom_order(sum(atoms_per_layer(1:layer(atom) - 1)))) & + - atoms_pos_cart_photo(3, atom_order(atom)))/2) + & + abs((atoms_pos_cart_photo(3, atom_order(atom)) - & + atoms_pos_cart_photo(3, atom_order(sum(atoms_per_layer(1:layer(atom))) + 1)))/2) + end do + end if + + allocate (thickness_layer(max_layer), stat=ierr) + if (ierr /= 0) call io_error('Error: analyse_geometry - allocation of thickness_layer failed') + thickness_layer = 0.0_dp + + do atom = 1, max_atoms + thickness_layer(layer(atom)) = thickness_layer(layer(atom)) + thickness_atom(atom) + end do + ! write (stdout, *) thickness_layer(1:max_layer) do i = 1, max_layer - write (stdout, *) 'Layer: ', i, atoms_per_layer(i), ' |' + thickness_layer(i) = thickness_layer(i)/atoms_per_layer(i) end do + ! write (stdout, *) thickness_layer(1:max_layer) + cell_area = cell_volume/real_lattice(3, 3) + ! write (stdout, *) atoms_per_layer(1:max_layer) + do atom = 1, max_atoms + volume_atom(atom) = (thickness_layer(layer(atom))*cell_area)/atoms_per_layer(layer(atom)) + end do + ! write (stdout, *) volume_atom(1:max_atoms) + if (on_root) then + write (stdout, '(1x,a78)') '+--------------------- Geometric Analysis of Structure ----------------------+' + write (stdout, '(1x,a78)') '| Atom | Atom Order | Layer | Layer Thickness | used vdW-rad | calc. volume |' + ! Write out the atomic volumes + do atom = 1, max_atoms + write (stdout, 225) "|", trim(atoms_label_tmp(atom_order(atom))), atom_order(atom), & + layer(atom), thickness_layer(layer(atom)), vdw_radii(atom), volume_atom(atom), " |" +225 format(1x, a1, a4, 6x, I3, 8x, I3, 6x, E13.6E3, 4x, F11.4, 3x, F11.4, a5) + end do + write (stdout, '(1x,a78)') '+----------------------------------------------------------------------------+' + end if + + if (index(devel_flag, 'atom_vol') .gt. 0) then + i = len_trim(devel_flag) + read (devel_flag(i - 6:i), *) devel_volume + volume_atom = devel_volume + end if !TEST IF THE SUPPLIED IMFP LIST IS LONG ENOUGH - if (allocated(photo_imfp_const) .and. size(photo_imfp_const,1) .gt. 1 .and. size(photo_imfp_const,1) .lt. max_layer) then + if (allocated(photo_imfp_const) .and. size(photo_imfp_const, 1) .gt. 1 .and. size(photo_imfp_const, 1) .lt. max_layer) then call io_error('The supplied list of layer dependent imfp values is less than the calculated max_layer. Check input!') end if - end subroutine calc_layers + end subroutine analyse_geometry subroutine calc_band_info !=============================================================================== @@ -377,7 +495,7 @@ subroutine calc_band_info ! TODO: Test if this is the behaviour we want and or if we have to change the condition if (band_energy(n_eigen - 1, N_spin, N) .gt. band_energy(n_eigen, N_spin, N)) then call io_error('Error: the band energies in the .bands file used are NOT ORDERED CORRECTLY (i.e. by increasing energy) & - & which will give WRONG RESULTS!') + & which will give WRONG RESULTS with the current code!') end if end do end do @@ -406,7 +524,7 @@ end subroutine calc_band_info subroutine make_pdos_weights_atoms !*************************************************************** !This subroutine is equivalent to pdos_merge of pdos.F90, but only for atoms - use od_electronic, only: pdos_orbital, pdos_weights, pdos_mwab, nspins + use od_electronic, only: pdos_orbital, pdos_weights, pdos_mwab, nspins, nbands use od_cell, only: num_kpoints_on_node, num_atoms use od_comms, only: my_node_id, on_root use od_io, only: io_error, stdout @@ -441,7 +559,7 @@ subroutine make_pdos_weights_atoms end do end do i_max = i - do atom = 1, max_atoms + do atom = 1, num_atoms do N = 1, num_kpoints_on_node(my_node_id) do N_spin = 1, nspins do n_eigen = 1, pdos_mwab%nbands @@ -471,6 +589,20 @@ subroutine make_pdos_weights_atoms N=1, num_kpoints_on_node(my_node_id)), N_spin=1, nspins), n_eigen=1, pdos_mwab%nbands) write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' end if + ! write (stdout, '(1x,a78)') '+------------- Printing pDOS_weights_atoms/pDOS_weights_k_band --------------+' + ! do atom = 1, max_atoms ! Loop over atoms + ! do N = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints + ! do N_spin = 1, nspins ! Loop over spins + ! do n_eigen=1, nbands + ! if (pdos_weights_k_band(n_eigen, N_spin, N) .eq. 0.0_dp) cycle + ! write (stdout,'(I2,1x,I4,1x,I1,1x,I3)') atom, N, N_spin, n_eigen + ! write (stdout,'(99(ES22.15))') pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)),& + ! pdos_weights_k_band(n_eigen, N_spin, N), (pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom))/& + ! pdos_weights_k_band(n_eigen, N_spin, N)) + ! end do + ! end do ! Loop over spins + ! end do ! Loop over kpoints + ! end do end subroutine make_pdos_weights_atoms !*************************************************************** @@ -478,15 +610,15 @@ subroutine calc_photo_optics !*************************************************************** use od_optics, only: make_weights, calc_epsilon_2, calc_epsilon_1, calc_refract, calc_absorp, calc_reflect, & - & epsilon, refract, absorp, reflect, intra - use od_io, only: stdout, io_error, io_time + & epsilon, refract, absorp, reflect, intra, write_absorp, write_epsilon, write_reflect, write_refract + use od_io, only: stdout, io_error, io_time, seedname use od_electronic, only: elec_read_optical_mat, nbands, nspins, efermi, elec_dealloc_optical, elec_read_band_gradient,& & nbands, nspins, band_energy use od_cell, only: num_kpoints_on_node, num_kpoints_on_node - use od_jdos_utils, only: jdos_utils_calculate, jdos_nbins, setup_energy_scale, jdos_deallocate + use od_jdos_utils, only: jdos_utils_calculate, jdos_nbins, setup_energy_scale, jdos_deallocate, E use od_comms, only: comms_bcast, on_root, my_node_id use od_parameters, only: optics_intraband, jdos_spacing, photo_model, photo_photon_energy, photo_photon_sweep, & - photo_photon_min, photo_photon_max, devel_flag, iprint + photo_photon_min, photo_photon_max, devel_flag, iprint, jdos_max_energy use od_dos_utils, only: dos_utils_calculate_at_e use od_constants, only: epsilon_0, e_charge @@ -497,8 +629,9 @@ subroutine calc_photo_optics real(kind=dp), allocatable, dimension(:, :) :: dos_at_e integer :: N, N2, N_spin, n_eigen, n_eigen2, atom, ierr, energy - integer :: jdos_bin, i, s + integer :: jdos_bin, i, s, is, idos, wjdos_unit = 23 real(kind=dp) :: num_energies, temp, time0, time1 + character(len=2) :: atom_s time0 = io_time() @@ -516,13 +649,15 @@ subroutine calc_photo_optics if (ierr /= 0) call io_error('Error: calc_photo_optics - allocation of index_energy failed') do i = 1, number_energies temp = (i - 1)*jdos_spacing + photo_photon_min - index_energy(i) = int(temp/jdos_spacing) + ! Account for E = 0.0 + index_energy(i) = int(temp/jdos_spacing) + 1 end do else number_energies = 1 allocate (index_energy(number_energies), stat=ierr) if (ierr /= 0) call io_error('Error: calc_photo_optics - allocation of index_energy failed') - index_energy(number_energies) = int(photo_photon_energy/jdos_spacing) + ! Account for E = 0.0 + index_energy(number_energies) = int(photo_photon_energy/jdos_spacing) + 1 end if allocate (absorp_photo(max_atoms, number_energies), stat=ierr) @@ -563,6 +698,13 @@ subroutine calc_photo_optics do n_eigen2 = n_eigen, nbands ! Loop over state 2 if (band_energy(n_eigen, N_spin, N) > efermi .and. n_eigen /= n_eigen2) cycle if (band_energy(n_eigen2, N_spin, N) < efermi .and. n_eigen /= n_eigen2) cycle + if (pdos_weights_k_band(n_eigen, N_spin, N) .eq. 0.0_dp) then + ! write (stdout,'(I2,1x,I4,1x,I1,1x,I3)') atom, N, N_spin, n_eigen + ! write (stdout,'(99(ES19.12))') pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)),& + ! pdos_weights_k_band(n_eigen, N_spin, N) + ! call FLUSH() + cycle + end if projected_matrix_weights(n_eigen, n_eigen2, N, N_spin, N2) = & matrix_weights(n_eigen, n_eigen2, N, N_spin, N2)* & (pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom))/pdos_weights_k_band(n_eigen, N_spin, N)) @@ -585,7 +727,25 @@ subroutine calc_photo_optics end if ! Send matrix element to jDOS routine and get weighted jDOS back - call jdos_utils_calculate(projected_matrix_weights, weighted_jdos) + call jdos_utils_calculate(projected_matrix_weights, weighted_jdos=weighted_jdos) + + if (on_root) then + N_geom = size(matrix_weights, 5) + write (atom_s, '(I2)') atom + open (unit=wjdos_unit, action='write', file=trim(seedname)//'_weighted_jdos_'//trim(adjustl(atom_s))//'.dat') + write (wjdos_unit, '(1x,a28)') '############################' + write (wjdos_unit, '(1x,a19,1x,a99)') '# Weighted JDOS for', seedname + write (wjdos_unit, '(1x,a23,1x,F10.4,1x,a4)') '# maximum JDOS energy :', jdos_max_energy, '[eV]' + write (wjdos_unit, '(1x,a23,1x,F10.4,1x,a4)') '# JDOS step size :', jdos_spacing, '[eV]' + write (wjdos_unit, '(1x,a28)') '############################' + do is = 1, nspins + write (wjdos_unit, *) 'Spin Channel :', is + do idos = 1, jdos_nbins + write (wjdos_unit, *) E(idos), ' , ', sum(weighted_jdos(idos, is, 1:N_geom)) + end do + end do + close (unit=wjdos_unit) + end if if (index(devel_flag, 'print_qe_constituents') > 0 .and. on_root) then write (stdout, '(1x,a78)') '+------------------------ Printing Weighted Joint-DOS -----------------------+' @@ -615,7 +775,7 @@ subroutine calc_photo_optics end if if (on_root) then - if (index(devel_flag, 'print_qe_constituents') > 0) then + if (index(devel_flag, 'print_qe_constituents') > 0 .and. optics_intraband) then write (stdout, '(1x,a36,f8.4,a34)') '+------------------------ E_Fermi = ', efermi, '---------------------------------+' write (stdout, '(1x,a78)') '+------------------------ Printing DOS Matrix Weights -----------------------+' write (stdout, 125) shape(dos_matrix_weights) @@ -634,7 +794,7 @@ subroutine calc_photo_optics end if ! Calculate epsilon_2 - call calc_epsilon_2(weighted_jdos, weighted_dos_at_e) + call calc_epsilon_2(weighted_jdos, weighted_dos_at_e, volume_atom(atom)) ! Calculate epsilon_1 call calc_epsilon_1 @@ -644,6 +804,11 @@ subroutine calc_photo_optics call calc_absorp call calc_reflect + call write_epsilon(atom, photo_at_e=dos_at_e, photo_volume=volume_atom(atom)) + call write_refract(atom, photo_volume=volume_atom(atom)) + call write_absorp(atom, photo_volume=volume_atom(atom)) + call write_reflect(atom, photo_volume=volume_atom(atom)) + do energy = 1, number_energies absorp_photo(atom, energy) = absorp(index_energy(energy)) reflect_photo(atom, energy) = reflect(index_energy(energy)) @@ -657,7 +822,7 @@ subroutine calc_photo_optics write (stdout, '(9999(E17.8E3))') (((epsilon(jdos_bin, N, N2, 1), jdos_bin=1, jdos_nbins), N=1, 2), N2=1, N_geom) else write (stdout, '(9999(E17.8E3))') ((((epsilon(jdos_bin, N, N2, i), jdos_bin=1, jdos_nbins), N=1, 2), N2=1, N_geom),& - & i=1, 3) + & i=1, 3) end if write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' @@ -669,6 +834,13 @@ subroutine calc_photo_optics write (stdout, '(99(E17.8E3))') (reflect_photo(atom, energy), energy=1, number_energies) write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' end if + write (stdout, '(1x,a78)') '+----------------------------- Printing Absorption --------------------------+' + write (stdout, '(99(E17.8E3))') (absorp_photo(atom, energy), energy=1, number_energies) + write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' + + write (stdout, '(1x,a78)') '+----------------------------- Printing Reflection --------------------------+' + write (stdout, '(99(E17.8E3))') (reflect_photo(atom, energy), energy=1, number_energies) + write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' ! Deallocate extra arrays produced in the case of using optics_intraband deallocate (epsilon, stat=ierr) if (ierr /= 0) call io_error('Error: calc_photo_optics - failed to deallocate epsilon') @@ -729,58 +901,12 @@ subroutine calc_absorp_layer use od_comms, only: on_root implicit none real(kind=dp) :: I_0 - integer :: atom, i, ierr, first_atom_second_l, last_atom_secondlast_l, num_layer - - allocate (thickness_atom(max_atoms), stat=ierr) - if (ierr /= 0) call io_error('Error: calc_absorp_layer - allocation of thickness_atom failed') - thickness_atom = 0.0_dp + integer :: atom, i, ierr, num_layer allocate (I_layer(max_layer, number_energies), stat=ierr) if (ierr /= 0) call io_error('Error: calc_absorp_layer - allocation of I_layer failed') I_layer = 0.0_dp - ! Calculate the thickness of each of the layers - if (max_layer .lt. 2) then - ! TODO: Check if this is a reasonable estimate for the single layer case - thickness_atom = 1.5_dp - else - ! Setting thickness_atom for the first atom in layer # 1 and finding the first atom in the second layer - do atom = 2, max_atoms - if (layer(atom) .gt. 1) then - thickness_atom(1) = ((atoms_pos_cart_photo(3, atom_order(1)) - atoms_pos_cart_photo(3, atom_order(atom)))/2)*2 - first_atom_second_l = atom - exit - end if - end do - ! Setting thickness_atom for the rest of the atoms in the first layer - do i = 2, first_atom_second_l - 1 - thickness_atom(i) = ((atoms_pos_cart_photo(3, atom_order(i)) - & - atoms_pos_cart_photo(3, atom_order(first_atom_second_l)))/2)*2 - end do - ! Setting thickness_atom for the last atom in the last layer and finding the last atom in the second to last layer - do i = 1, max_atoms - if (layer(max_atoms - i) .lt. layer(max_atoms)) then - thickness_atom(max_atoms) = (abs(atoms_pos_cart_photo(3, atom_order(max_atoms)) - & - atoms_pos_cart_photo(3, atom_order(max_atoms - i)))/2)*2 - last_atom_secondlast_l = max_atoms - i - exit - end if - end do - ! Setting thickness_atom for the atoms in the last layer, but not for the last atom - do i = last_atom_secondlast_l + 1, max_atoms - 1 - thickness_atom(i) = (abs(atoms_pos_cart_photo(3, atom_order(i)) - & - atoms_pos_cart_photo(3, atom_order(last_atom_secondlast_l)))/2)*2 - end do - ! Setting thickness_atom for the atoms in between the first and last layers - ! Formula -> abs( (z(last atom in n-1th layer) - z(atom) )/2 ) + abs( (z(first atom in n+1th layer) - z(atom) )/2 ) - do atom = first_atom_second_l, last_atom_secondlast_l - thickness_atom(atom) = abs((atoms_pos_cart_photo(3, atom_order(sum(atoms_per_layer(1:layer(atom) - 1)))) & - - atoms_pos_cart_photo(3, atom_order(atom)))/2) + & - abs((atoms_pos_cart_photo(3, atom_order(atom)) - & - atoms_pos_cart_photo(3, atom_order(sum(atoms_per_layer(1:layer(atom))) + 1)))/2) - end do - end if - I_0 = 1.0_dp I_layer = 1.0_dp do i = 1, number_energies @@ -804,10 +930,14 @@ subroutine calc_absorp_layer if (ierr /= 0) call io_error('Error: calc_absorp_layer - failed to deallocate reflect_photo') end if - ! if (allocated(atoms_per_layer)) then - ! deallocate (atoms_per_layer, stat=ierr) - ! if (ierr /= 0) call io_error('Error: calc_absorp_layer - failed to deallocate atoms_per_layer') - ! end if + if (allocated(atoms_per_layer)) then + deallocate (atoms_per_layer, stat=ierr) + if (ierr /= 0) call io_error('Error: calc_absorp_layer - failed to deallocate atoms_per_layer') + end if + + write (stdout, '(1x,a78)') '+----------------------- Printing Intensity per Layer -----------------------+' + write (stdout, '(9999(es15.8))') ((I_layer(num_layer, i), num_layer=1, max_layer), i=1, number_energies) + write (stdout, '(1x,a78)') '+----------------------------- Finished Printing ----------------------------+' if (index(devel_flag, 'print_qe_constituents') > 0 .and. on_root) then write (stdout, '(1x,a78)') '+----------------------- Printing Intensity per Layer -----------------------+' @@ -1007,7 +1137,7 @@ subroutine calc_angle if (index(photo_momentum, 'crystal') > 0) call cell_calc_kpoint_r_cart if ((index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root) .or. (index(devel_flag, 'print_qe_matrix_full') > 0 .and.& - & on_root) .or. (index(devel_flag, 'print_qe_matrix_reduced') > 0 .and. on_root)) then + & on_root) .or. (index(devel_flag, 'print_qe_matrix_reduced') > 0 .and. on_root)) then call cell_calc_kpoint_r_cart write (stdout, '(a78)') "+---------------- Printing K-Points in Cartesian Coordinates ----------------+" do N = 1, num_kpoints_on_node(my_node_id) @@ -1151,12 +1281,9 @@ subroutine calc_electron_esc if (ierr /= 0) call io_error('Error: calc_electron_esc - allocation of electron_esc failed') electron_esc = 0.0_dp - if (size(photo_imfp_const,1) .gt. 1) then - allocate(thickness_layer(max_layer),stat=ierr) - if (ierr /= 0) call io_error('Error: calc_layers - allocation of thickness_layer failed') - thickness_layer = 0.0_dp + if (size(photo_imfp_const, 1) .gt. 1) then - allocate(atom_imfp(max_atoms), stat=ierr) + allocate (atom_imfp(max_atoms), stat=ierr) if (ierr /= 0) call io_error('Error: calc_electron_esc_list - allocation of new_atoms_coordinates failed') atom_imfp = 0.0_dp @@ -1165,22 +1292,26 @@ subroutine calc_electron_esc thickness_layer(layer(atom)) = thickness_layer(layer(atom)) + thickness_atom(atom) end do do i = 1, max_layer - thickness_layer(i) = thickness_layer(i) / atoms_per_layer(i) + thickness_layer(i) = thickness_layer(i)/atoms_per_layer(i) end do - write (stdout, '(1x,a78)') '+--------------- User Supplied and Calculated IMFP Constants ----------------+' - write (stdout, '(1x,a78)') '| Atom | Atom Order | Layer | Layer Thickness | User Input IMFP | Calc. IMFP |' + if (on_root) then + write (stdout, '(1x,a78)') '+--------------- User Supplied and Calculated IMFP Constants ----------------+' + write (stdout, '(1x,a78)') '| Atom | Atom Order | Layer | Layer Thickness | User Input IMFP | Calc. IMFP |' + end if ! Calculate the layer dependent imfp constant as a list do atom = 1, max_atoms do i = 1, layer(atom) atom_imfp(atom) = atom_imfp(atom) + thickness_layer(i)*photo_imfp_const(i) end do - atom_imfp(atom) = atom_imfp(atom) / sum(thickness_layer(1:i-1)) - write (stdout, 225) "|", trim(atoms_label_tmp(atom_order(atom))), atom_order(atom), & - layer(atom), thickness_layer(layer(atom)), photo_imfp_const(layer(atom)), atom_imfp(atom), " |" -225 format(1x, a1, a4, 6x, I3, 8x, I3, 6x,E13.6E3, 4x, F11.4, 3x, F11.4, a5) + atom_imfp(atom) = atom_imfp(atom)/sum(thickness_layer(1:i - 1)) + if (on_root) then + write (stdout, 225) "|", trim(atoms_label_tmp(atom_order(atom))), atom_order(atom), & + layer(atom), thickness_layer(layer(atom)), photo_imfp_const(layer(atom)), atom_imfp(atom), " |" +225 format(1x, a1, a4, 6x, I3, 8x, I3, 6x, E13.6E3, 4x, F11.4, 3x, F11.4, a5) + end if end do - write (stdout, '(1x,a78)') '+----------------------------------------------------------------------------+' + if (on_root) write (stdout, '(1x,a78)') '+----------------------------------------------------------------------------+' do N = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints do N_spin = 1, nspins ! Loop over spins @@ -1201,7 +1332,7 @@ subroutine calc_electron_esc end do deallocate (thickness_layer, stat=ierr) if (ierr /= 0) call io_error('Error: thickness_layer - failed to deallocate calc_elec_esc') - elseif (size(photo_imfp_const,1) .eq. 1) then + elseif (size(photo_imfp_const, 1) .eq. 1) then do N = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints do N_spin = 1, nspins ! Loop over spins do n_eigen = 1, nbands @@ -1236,7 +1367,6 @@ subroutine calc_electron_esc write (stdout, '(1x,a40,19x,f11.3,a8)') '+ Time to calculate Photoemission Escape', time1 - time0, ' (sec) +' end if - end subroutine calc_electron_esc !*************************************************************** @@ -1258,9 +1388,9 @@ subroutine bulk_emission real(kind=dp) :: exponent, time0, time1 time0 = io_time() - if (size(photo_imfp_const,1) .gt. 1) then + if (size(photo_imfp_const, 1) .gt. 1) then num_layers = int((atom_imfp(max_atoms)*photo_bulk_length)/thickness_atom(max_atoms)) - elseif (size(photo_imfp_const,1) .eq. 1) then + elseif (size(photo_imfp_const, 1) .eq. 1) then num_layers = int((photo_imfp_const(1)*photo_bulk_length)/thickness_atom(max_atoms)) end if @@ -1276,7 +1406,7 @@ subroutine bulk_emission if (ierr /= 0) call io_error('Error: bulk_emission - allocation of bulk_prob failed') bulk_prob = 0.0_dp - if (size(photo_imfp_const,1) .gt. 1) then + if (size(photo_imfp_const, 1) .gt. 1) then do i = 1, num_layers do N = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints do N_spin = 1, nspins ! Loop over spins @@ -1297,7 +1427,7 @@ subroutine bulk_emission deallocate (atom_imfp, stat=ierr) if (ierr /= 0) call io_error('Error: bulk_emission - failed to deallocate bulk_prob_tmp') - elseif (size(photo_imfp_const,1) .eq. 1) then + elseif (size(photo_imfp_const, 1) .eq. 1) then do i = 1, num_layers do N = 1, num_kpoints_on_node(my_node_id) ! Loop over kpoints do N_spin = 1, nspins ! Loop over spins @@ -1362,7 +1492,7 @@ subroutine calc_three_step_model use od_cell, only: num_kpoints_on_node, kpoint_weight use od_electronic, only: nbands, nspins, band_energy, efermi, electrons_per_state, elec_read_band_gradient, & - elec_read_band_curvature + elec_read_band_curvature use od_comms, only: my_node_id, on_root use od_parameters, only: photo_surface_area, scissor_op, photo_temperature, devel_flag, photo_photon_sweep, iprint use od_dos_utils, only: doslin, doslin_sub_cell_corners @@ -1429,9 +1559,8 @@ subroutine calc_three_step_model if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root .and. .not. photo_photon_sweep) then i = 16 ! Defines the number of columns printed in the loop - needed for reshaping the data array during postprocessing write (stdout, '(1x,a78)') '+------------ Printing list of values going into 3step QE Values ------------+' - write (stdout, '(1x,a261)') 'calced_qe_value - initial_state_energy - final_state_energy - matrix_weights - delta_temp -& - & electron_esc - electrons_per_state - kpoint_weight - I_layer - qe_factor - transverse_g - vac_g - fermi_dirac -& - & pdos_weights_atoms - pdos_weights_k_band - field_emission' + write (stdout, '(13(1x,a17))') 'calced_qe_value', 'initial_state_energy', 'final_state_energy', 'matrix_weights', 'delta_temp'& + &'electron_esc', 'kpoint_weight', 'I_layer', 'transverse_g', 'vac_g', 'fermi_dirac', 'pdos_weights_atoms', 'pdos_weights_k_band' write (stdout, '(1x,a11,6(1x,I4))') 'Array Shape', max_atoms, nbands, nbands, nspins, num_kpoints_on_node(my_node_id), i end if @@ -1452,7 +1581,7 @@ subroutine calc_three_step_model ! issues when computing fermi_dirac due to possible underflow. if (argument .gt. 575.0_dp) then fermi_dirac = 0.0_dp - exit + cycle elseif (argument .lt. -575.0_dp) then fermi_dirac = 1.0_dp else @@ -1485,15 +1614,14 @@ subroutine calc_three_step_model (pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom))/ & pdos_weights_k_band(n_eigen, N_spin, N)))* & (1.0_dp + field_emission(n_eigen, N_spin, N)) - ! if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root .and. .not. photo_photon_sweep) then - ! write (stdout, '(5(1x,I4))') atom, n_eigen, n_eigen2, N_spin, N - ! write (stdout, '(16(1x,E17.9E3))') qe_tsm(n_eigen, n_eigen2, N_spin, N, atom), band_energy(n_eigen, N_spin, N), & - ! band_energy(n_eigen2, N_spin, N), matrix_weights(n_eigen, n_eigen2, N, N_spin, 1), & - ! delta_temp(n_eigen, n_eigen2, N_spin, N), electron_esc(n_eigen, N_spin, N, atom), electrons_per_state, & - ! kpoint_weight(N), I_layer(layer(atom), current_index), qe_factor, transverse_g, vac_g, fermi_dirac, & - ! pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)), pdos_weights_k_band(n_eigen, N_spin, N), & - ! field_emission(n_eigen, N_spin, N) - ! end if + if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root) then + write (stdout, '(5(1x,I4))') n_eigen, n_eigen2, N_spin, N, atom + write (stdout, '(13(1x,E17.9E3))') qe_tsm(n_eigen, n_eigen2, N_spin, N, atom), band_energy(n_eigen, N_spin, N), & + band_energy(n_eigen2, N_spin, N), matrix_weights(n_eigen, n_eigen2, N, N_spin, 1), & + delta_temp(n_eigen, n_eigen2, N_spin, N), electron_esc(n_eigen, N_spin, N, atom), & + kpoint_weight(N), I_layer(layer(atom), current_index), transverse_g, vac_g, fermi_dirac, & + pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)), pdos_weights_k_band(n_eigen, N_spin, N) + end if end do end do end do @@ -1512,7 +1640,6 @@ subroutine calc_three_step_model ! issues when computing fermi_dirac due to possible underflow. if (argument .gt. 575.0_dp) then fermi_dirac = 0.0_dp - exit elseif (argument .lt. -575.0_dp) then fermi_dirac = 1.0_dp else @@ -1554,8 +1681,7 @@ subroutine calc_three_step_model if (ierr /= 0) call io_error('Error: calc_three_step_model - failed to deallocate delta_temp') end if - if ((index(devel_flag, 'print_qe_constituents') > 0 .and. on_root) .or. (index(devel_flag, 'print_qe_matrix_full') > 0 .and.& - & on_root)) then + if ((index(devel_flag, 'print_qe_matrix_full') > 0 .and. on_root)) then write (stdout, '(1x,a78)') '+----------------------- Printing Full 3step QE Matrix ----------------------+' write (stdout, '(5(1x,I4))') shape(qe_tsm) write (stdout, '(5(1x,I4))') nbands, nbands, num_kpoints_on_node(my_node_id), nspins, max_atoms + 1 @@ -1994,9 +2120,8 @@ subroutine calc_one_step_model if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root .and. .not. photo_photon_sweep) then i = 13 ! Defines the number of columns printed in the loop - needed for reshaping the data array during postprocessing write (stdout, '(1x,a78)') '+------------ Printing list of values going into 1step QE Values ------------+' - write (stdout, '(1x,a222)') 'calculated_QE foptical_matrix_weight selectron_esc electrons_per_state kpoint_weight & - & I_layer qe_factor transverse_g vac_g fermi_dirac pdos_weights_atoms pdos_weights_k_band& - & field_emission' + write (stdout, '(10(1x,a17))') 'calced_qe_value', 'foptical_matrix_weights', 'electron_esc', 'kpoint_weight',& + & 'I_layer', 'transverse_g', 'vac_g', 'fermi_dirac', 'pdos_weights_atoms', 'pdos_weights_k_band' write (stdout, '(1x,a11,6(1x,I4))') 'Array Shape', i, max_atoms, nbands, nspins, num_kpoints_on_node(my_node_id) end if do atom = 1, max_atoms @@ -2041,14 +2166,14 @@ subroutine calc_one_step_model (pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom))/ & pdos_weights_k_band(n_eigen, N_spin, N)))* & (1.0_dp + field_emission(n_eigen, N_spin, N)) - ! if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root .and. .not. photo_photon_sweep) then - ! write (stdout, '(4(1x,I4))') atom, n_eigen, N_spin, N - ! write (stdout, '(13(7x,E16.8E4))') qe_osm(n_eigen, N_spin, N, atom), & - ! foptical_matrix_weights(n_eigen, n_eigen2, N, N_spin, 1), & - ! electron_esc(n_eigen, N_spin, N, atom), electrons_per_state, kpoint_weight(N), I_layer(layer(atom),current_index),& - ! qe_factor, transverse_g, vac_g, fermi_dirac, pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)), & - ! pdos_weights_k_band(n_eigen, N_spin, N), field_emission(n_eigen, N_spin, N) - ! end if + if (index(devel_flag, 'print_qe_formula_values') > 0 .and. on_root) then + write (stdout, '(4(1x,I4))') atom, n_eigen, N_spin, N + write (stdout, '(10(7x,E17.9E3))') qe_osm(n_eigen, N_spin, N, atom), & + foptical_matrix_weights(n_eigen, n_eigen2, N, N_spin, 1), & + electron_esc(n_eigen, N_spin, N, atom), kpoint_weight(N), I_layer(layer(atom), current_index), & + transverse_g, vac_g, fermi_dirac, pdos_weights_atoms(n_eigen, N_spin, N, atom_order(atom)), & + pdos_weights_k_band(n_eigen, N_spin, N) + end if end do end do end do @@ -2385,9 +2510,7 @@ subroutine binding_energy_spread end if call comms_bcast(qe_norm, 1) ! Why do we need to normalise this array? - ! This does not make sense to me - it should only set a single element and keep the rest the same - ! Find out how to multiply an array with a constant and implement this - weighted_temp(e_scale, n_eigen, N_spin, N, atom) = weighted_temp(e_scale, n_eigen, N_spin, N, atom)*qe_norm + weighted_temp = weighted_temp*qe_norm elseif (index(photo_model, '1step') > 0) then do atom = 1, max_atoms + 1 @@ -2419,9 +2542,7 @@ subroutine binding_energy_spread end if call comms_bcast(qe_norm, 1) ! Why do we need to normalise this array? - ! This does not make sense to me - it should only set a single element and keep the rest the same - ! Find out how to multiply an array with a constant and implement this - weighted_temp(e_scale, n_eigen, N_spin, N, atom) = weighted_temp(e_scale, n_eigen, N_spin, N, atom)*qe_norm + weighted_temp = weighted_temp*qe_norm end if deallocate (binding_temp, stat=ierr) @@ -2436,14 +2557,14 @@ subroutine write_qe_output_files ! Victor Chang, 7 February 2020 ! Felix Mildner, April 2023 - use od_cell, only: num_kpoints_on_node, cell_calc_kpoint_r_cart, kpoint_r_cart - use od_electronic, only: nbands, nspins, band_energy + use od_cell, only: num_kpoints_on_node, cell_calc_kpoint_r_cart + use od_electronic, only: nbands, nspins use od_comms, only: my_node_id, on_root, num_nodes, comms_send, comms_recv, root_id, comms_reduce use od_io, only: io_error, seedname, io_file_unit, io_date, io_time, stdout - use od_parameters, only: write_photo_output, photo_model, photo_photon_sweep, photo_photon_energy, iprint, devel_flag + use od_parameters, only: write_photo_output, photo_model, iprint, devel_flag implicit none integer :: atom, ierr, e_scale, binding_unit, matrix_unit - integer :: N, N_spin, i, n_eigen, kpt_total, band_num + integer :: N, N_spin, n_eigen, kpt_total, band_num real(kind=dp), allocatable, dimension(:, :) :: qe_atom real(kind=dp) :: time0, time1 @@ -2460,41 +2581,36 @@ subroutine write_qe_output_files call write_distributed_qe_data(kpt_total) else matrix_unit = io_file_unit() - if ((photo_photon_sweep)) then - write (char_e, '(F7.3)') temp_photon_energy + write (char_e, '(F7.3)') temp_photon_energy + if (index(devel_flag, 'final') > 0 .and. index(photo_model, '3step') > 0) then + filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix_final.dat' else - write (char_e, '(F7.3)') photo_photon_energy + filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix.dat' end if - filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix.dat' open (unit=matrix_unit, action='write', file=filename) call io_date(cdate, ctime) write (matrix_unit, *) '## OptaDOS Photoemission: Printing QE Matrix on ', cdate, ' at ', ctime write (matrix_unit, *) '## Seedname: ', trim(seedname) write (matrix_unit, *) '## Photoemission Model: ', trim(photo_model) write (matrix_unit, *) '## Photon Energy: ', trim(adjustl(char_e)) - ! if (index(devel_flag, 'final') > 0 .and. index(photo_model, '3step') > 0) then - ! write (matrix_unit, *) '## Writing the sum over 3-step initial states contributions' - ! write (matrix_unit, *) '## The written values are contributions of final states to the total number' - ! elseif (index(devel_flag, 'final') .eq. 0 .and. index(photo_model, '3step') > 0) then - ! write (matrix_unit, *) '## Writing the sum over 3-step final states contributions' - ! write (matrix_unit, *) '## The written values are contributions of initial states to the total number' - ! end if - write (matrix_unit, '(1x,a31,4(1x,I5),1a)') '## (Reduced) QE Matrix Shape: (', nbands, kpt_total, nspins, max_atoms, ')' + if (index(devel_flag, 'final') > 0 .and. index(photo_model, '3step') > 0) then + write (matrix_unit, *) '## Writing the contributions of excitations into the !!FINAL!! states' + ! write (matrix_unit, *) '## The written values are contributions of final states to the total' + ! elseif (index(devel_flag, 'final') .eq. 0 .and. index(photo_model, '3step') > 0) then + ! write (matrix_unit, *) '## Writing the sum over 3-step final states contributions' + ! write (matrix_unit, *) '## The written values are contributions of initial states to the total' + end if + write (matrix_unit, *) '## Find band energies and fractional k-point coordinates in: ', trim(seedname), '.bands' + ! Printing out the info on root_node - do N = 1, num_kpoints_on_node(my_node_id) - write (matrix_unit, '(1x,a13,3(1x,F11.8),a1)') '## K-point: (', (kpoint_r_cart(i, N), i=1, 3), ')' - do N_spin = 1, nspins - write (matrix_unit, '(1x,a15,I1,a1)') '## Spin comp: (', N_spin, ')' - write (matrix_unit, '(4999(1x,SF17.8))') (band_energy(n_eigen, N_spin, N), n_eigen=1, nbands) - end do - end do if (index(photo_model, '3step') > 0) then - if (index(devel_flag, 'single') > 0 ) then + if (index(devel_flag, 'single') > 0) then n_eigen = len_trim(devel_flag) - read (devel_flag(n_eigen-2:n_eigen),*) band_num + read (devel_flag(n_eigen - 2:n_eigen), *) band_num write (matrix_unit, '(1x,a42,1x,I3)') '## Writing contributions into final band #', band_num - write (matrix_unit, '(1x,a14)') '## QE Matrix :' + write (matrix_unit, '(1x,a31,4(1x,I5),1x,1a)') '## (Reduced) QE Matrix Shape: (', nbands, nspins, kpt_total, max_atoms,& + & ')' do atom = 1, max_atoms + 1 if (atom .eq. max_atoms + 1) write (matrix_unit, *) '## Bulk Contribution:' do N = 1, num_kpoints_on_node(my_node_id) @@ -2503,9 +2619,24 @@ subroutine write_qe_output_files end do end do end do + else if (index(devel_flag, 'final') > 0) then + write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from each band' + write (matrix_unit, *) '## at a certain k-point, spin, and atom' + write (matrix_unit, '(1x,a31,4(1x,I5),1x,1a)') '## (Reduced) QE Matrix Shape: (', nbands, nspins, kpt_total, max_atoms,& + & ')' + do atom = 1, max_atoms + 1 + if (atom .eq. max_atoms + 1) write (matrix_unit, *) '## Bulk Contribution:' + do N = 1, num_kpoints_on_node(my_node_id) + do N_spin = 1, nspins + write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(1:nbands, n_eigen, N_spin, N, atom)), n_eigen=1, nbands) + end do + end do + end do else - write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from all bands' - write (matrix_unit, *) '## from an atom at a certain k-point and spin:' + write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from each band' + write (matrix_unit, *) '## at a certain k-point, spin, and atom' + write (matrix_unit, '(1x,a31,4(1x,I5),1x,1a)') '## (Reduced) QE Matrix Shape: (', nbands, nspins, kpt_total, max_atoms,& + & ')' do atom = 1, max_atoms + 1 if (atom .eq. max_atoms + 1) write (matrix_unit, *) '## Bulk Contribution:' do N = 1, num_kpoints_on_node(my_node_id) @@ -2516,6 +2647,10 @@ subroutine write_qe_output_files end do end if elseif (index(photo_model, '1step') > 0) then + write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from each band' + write (matrix_unit, *) '## at a certain k-point, spin, and atom' + write (matrix_unit, '(1x,a31,4(1x,I5),1x,1a)') '## (Reduced) QE Matrix Shape: (', nbands, nspins, kpt_total, max_atoms,& + & ')' do atom = 1, max_atoms + 1 if (atom .eq. max_atoms + 1) write (matrix_unit, *) '## Bulk Contribution:' do N = 1, num_kpoints_on_node(my_node_id) @@ -2548,18 +2683,21 @@ subroutine write_qe_output_files if (on_root) then binding_unit = io_file_unit() - if ((photo_photon_sweep)) then - write (char_e, '(F7.3)') temp_photon_energy - filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//& - &'_binding_energy.dat' - open (unit=binding_unit, action='write', file=filename) - else - open (unit=binding_unit, action='write', file=trim(seedname)//'_binding_energy.dat') - end if + write (char_e, '(F7.3)') temp_photon_energy + filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//& + &'_binding_energy.dat' + open (unit=binding_unit, action='write', file=filename) + call io_date(cdate, ctime) + write (binding_unit, *) '## OptaDOS Photoemission: Printing Binding Energy Spread on ', cdate, ' at ', ctime + write (binding_unit, *) '## Seedname: ', trim(seedname) + write (binding_unit, *) '## Photoemission Model: ', trim(photo_model) + write (binding_unit, *) '## Photon Energy: ', trim(adjustl(char_e)) + write (binding_unit, *) '## Transverse Energy (TE) [eV] | Total QE from sum(atoms + bulk) @ TE | Contributions from: atom1 & + &| atom2 | ... | bulk | ' do e_scale = 1, max_energy - write (binding_unit, *) t_energy(e_scale), sum(qe_atom(e_scale, 1:max_atoms + 1)), & - qe_atom(e_scale, 1:max_atoms + 1) + write (binding_unit, '(1x,ES13.6E2,2x,ES19.12E3,1x,999(1x,ES19.12E3))') t_energy(e_scale), & + &sum(qe_atom(e_scale, 1:max_atoms + 1)), qe_atom(e_scale, 1:max_atoms + 1) end do close (unit=binding_unit) @@ -2596,28 +2734,32 @@ subroutine write_distributed_qe_data(kpt_total) ! and writes its values/contents one after the other. ! F. Mildner, June 2023 - use od_cell, only: num_kpoints_on_node, cell_calc_kpoint_r_cart, kpoint_r_cart - use od_electronic, only: nbands, nspins, band_energy + use od_cell, only: num_kpoints_on_node, cell_calc_kpoint_r_cart + use od_electronic, only: nspins, nbands use od_comms, only: my_node_id, on_root, num_nodes, comms_send, comms_recv, root_id, comms_bcast use od_io, only: io_error, io_file_unit, io_date, io_time, seedname - use od_parameters, only: photo_model, photo_photon_sweep, photo_photon_energy + use od_parameters, only: photo_model, devel_flag implicit none - integer, intent(in) :: kpt_total + real(kind=dp), dimension(:, :, :), allocatable :: qe_mat_temp + real(kind=dp), dimension(:, :, :, :), allocatable :: tsm_reduced + integer, intent(in) :: kpt_total character(len=99) :: filename character(len=10) :: char_e character(len=9) :: ctime ! Temp. time string character(len=11) :: cdate ! Temp. date string - integer:: i, N, N_spin, n_eigen, atom, token, matrix_unit + integer:: N, N_spin, n_eigen, atom, token, matrix_unit, ierr, inode + + ! On root open file and write header if (on_root) then ! Writing header to output file - if ((photo_photon_sweep)) then - write (char_e, '(F7.3)') temp_photon_energy + write (char_e, '(F7.3)') temp_photon_energy + if (index(devel_flag, 'final') > 0 .and. index(photo_model, '3step') > 0) then + filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix_final.dat' else - write (char_e, '(F7.3)') photo_photon_energy + filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix.dat' end if - filename = trim(seedname)//'_'//trim(photo_model)//'_'//trim(adjustl(char_e))//'_qe_matrix.dat' matrix_unit = io_file_unit() open (unit=matrix_unit, action='write', file=filename) call io_date(cdate, ctime) @@ -2625,145 +2767,92 @@ subroutine write_distributed_qe_data(kpt_total) write (matrix_unit, *) '## Seedname: ', trim(seedname) write (matrix_unit, *) '## Photoemission Model: ', trim(photo_model) write (matrix_unit, *) '## Photon Energy: ', trim(adjustl(char_e)) - write (matrix_unit, '(1x,a31,4(1x,I5),1a)') '## (Reduced) QE Matrix Shape: (', nbands, kpt_total, nspins, max_atoms, ')' - close (unit=matrix_unit) - end if - call comms_bcast(filename, 99) - ! Write out the kpoints and band energies on non-root nodes - if (my_node_id .eq. 0) then - token = -1; - else - ! Receive the token to write to the output file - call comms_recv(token, 1, my_node_id - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) - do N = 1, num_kpoints_on_node(my_node_id) - write (matrix_unit, '(1x,a13,3(1x,F11.8),a1)') '## K-point: (', (kpoint_r_cart(i, N), i=1, 3), ')' - do N_spin = 1, nspins - write (matrix_unit, '(1x,a15,I1,a1)') '## Spin comp: (', N_spin, ')' - write (matrix_unit, '(4999(1x,SF17.8))') (band_energy(n_eigen, N_spin, N), n_eigen=1, nbands) - end do - end do - close (unit=matrix_unit) - end if - !Pass the token to the next node - call comms_send(token, 1, modulo(my_node_id + 1, num_nodes)) - ! Write out the kpoints and band energies on root node - if (my_node_id .eq. 0) then - call comms_recv(token, 1, num_nodes - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) - do N = 1, num_kpoints_on_node(my_node_id) - write (matrix_unit, '(1x,a13,3(1x,F11.8),a1)') '## K-point: (', (kpoint_r_cart(i, N), i=1, 3), ')' - do N_spin = 1, nspins - write (matrix_unit, '(1x,a15,I1,a1)') '## Spin comp: (', N_spin, ')' - write (matrix_unit, '(4999(1x,SF17.8))') (band_energy(n_eigen, N_spin, N), n_eigen=1, nbands) - end do - end do - write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from all bands' - write (matrix_unit, *) '## from an atom at a certain k-point and spin:' - close (unit=matrix_unit) + write (matrix_unit, *) '## Find band energies and fractional k-point coordinates in: ', trim(seedname), '.bands' + write (matrix_unit, *) '## (Reduced) QE Matrix where each row contains the contributions from each band' + write (matrix_unit, *) '## at a certain k-point, spin, and atom' + write (matrix_unit, '(1x,a31,4(1x,I5),1x,1a)') '## (Reduced) QE Matrix Shape: (', nbands, nspins, kpt_total, max_atoms, ')' + allocate (qe_mat_temp(nbands, nspins, num_kpoints_on_node(0)), stat=ierr) + if (ierr /= 0) call io_error('Error: write_distributed_qe_data - failed to allocate qe_mat_temp on root') + token = -1 end if - ! Write out the qe matrix for all atoms but the bulk contribution on non-root nodes - if (my_node_id .eq. 0) then - token = -1; - else - ! Receive the token to write to the output file - call comms_recv(token, 1, my_node_id - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) + ! allocate and sum the 3step qe matrix on non-root + if (.not. on_root) then if (index(photo_model, '3step') > 0) then - do atom = 1, max_atoms - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(n_eigen, 1:nbands, N_spin, N, atom)), n_eigen=1, nbands) - end do - end do - end do - elseif (index(photo_model, '1step') > 0) then - do atom = 1, max_atoms - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (qe_osm(n_eigen, N_spin, N, atom), n_eigen=1, nbands) - end do - end do - end do + allocate (tsm_reduced(nbands, nspins, num_kpoints_on_node(0), max_atoms + 1), stat=ierr) + if (ierr /= 0) call io_error('Error: write_distributed_qe_data - failed to allocate tsm_reduced') + if (index(devel_flag, 'final') > 0) then + tsm_reduced = sum(qe_tsm, dim=1) + else + tsm_reduced = sum(qe_tsm, dim=2) + end if end if - close (unit=matrix_unit) end if - !Pass the token to the next node - call comms_send(token, 1, modulo(my_node_id + 1, num_nodes)) - ! Write out the qe matrix for all atoms but the bulk contribution on root node - if (my_node_id .eq. 0) then - call comms_recv(token, 1, num_nodes - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) - if (index(photo_model, '3step') > 0) then - do atom = 1, max_atoms - do N = 1, num_kpoints_on_node(my_node_id) + ! For each atom until max_atoms+1 + do atom = 1, max_atoms + 1 + ! On non root nodes + if (.not. on_root) then + ! - wait for the token + call comms_recv(token, 1, 0) + ! - send the respective qe_matrix for that specific atom + if (index(photo_model, '3step') > 0) then + call comms_send(tsm_reduced(1, 1, 1, atom), nbands*nspins*num_kpoints_on_node(my_node_id), 0) + elseif (index(photo_model, '1step') > 0) then + call comms_send(qe_osm(1, 1, 1, atom), nbands*nspins*num_kpoints_on_node(my_node_id), 0) + end if + ! - send token back to root node + call comms_send(token, 1, 0) + ! On root node + elseif (on_root) then + do inode = 1, num_nodes - 1 + ! - send to the token to notes in turn + call comms_send(token, 1, inode) + ! - receive the qe_matrix from the other notes and write it to the file + call comms_recv(qe_mat_temp(1, 1, 1), nbands*nspins*num_kpoints_on_node(inode), inode) + ! write out the qe_matrix to the file + do N = 1, num_kpoints_on_node(inode) do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(n_eigen, 1:nbands, N_spin, N, atom)), n_eigen=1, nbands) + write (matrix_unit, '(9999(ES16.8E3))') (qe_mat_temp(n_eigen, N_spin, N), n_eigen=1, nbands) end do end do + ! - receive the token from a node + call comms_recv(token, 1, inode) end do - elseif (index(photo_model, '1step') > 0) then - do atom = 1, max_atoms + ! - write root qe_matrix elements + if (index(photo_model, '3step') > 0) then + if (index(devel_flag, 'final') > 0) then + do N = 1, num_kpoints_on_node(my_node_id) + do N_spin = 1, nspins + write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(1:nbands, n_eigen, N_spin, N, atom)), n_eigen=1, nbands) + end do + end do + else + do N = 1, num_kpoints_on_node(my_node_id) + do N_spin = 1, nspins + write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(n_eigen, 1:nbands, N_spin, N, atom)), n_eigen=1, nbands) + end do + end do + end if + elseif (index(photo_model, '1step') > 0) then do N = 1, num_kpoints_on_node(my_node_id) do N_spin = 1, nspins write (matrix_unit, '(9999(ES16.8E3))') (qe_osm(n_eigen, N_spin, N, atom), n_eigen=1, nbands) end do end do - end do - end if - write (matrix_unit, *) '## Bulk Contribution:' - close (unit=matrix_unit) - end if - - ! Write out the qe matrix of the bulk contribution on non-root nodes - if (my_node_id .eq. 0) then - token = -1; - else - ! Receive the token to write to the output file - call comms_recv(token, 1, my_node_id - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) - if (index(photo_model, '3step') > 0) then - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(n_eigen, 1:nbands, N_spin, N, max_atoms + 1)), n_eigen=1, nbands) - end do - end do - elseif (index(photo_model, '1step') > 0) then - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (qe_osm(n_eigen, N_spin, N, max_atoms + 1), n_eigen=1, nbands) - end do - end do + end if + ! Write header for bulk contrib using root node + if (atom .eq. max_atoms) write (matrix_unit, '(1x,a21)') '## Bulk Contribution:' end if + end do + if (on_root) then close (unit=matrix_unit) - end if - !Pass the token to the next node - call comms_send(token, 1, modulo(my_node_id + 1, num_nodes)) - ! Write out the qe matrix of the bulk contribution on root node - if (my_node_id .eq. 0) then - call comms_recv(token, 1, num_nodes - 1) - matrix_unit = io_file_unit() - open (unit=matrix_unit, access='append', action='write', file=filename) + deallocate (qe_mat_temp, stat=ierr) + if (ierr /= 0) call io_error('Error: write_distributed_qe_data - failed to deallocate qe_mat_temp') + elseif (.not. on_root) then if (index(photo_model, '3step') > 0) then - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (sum(qe_tsm(n_eigen, 1:nbands, N_spin, N, max_atoms + 1)), n_eigen=1, nbands) - end do - end do - elseif (index(photo_model, '1step') > 0) then - do N = 1, num_kpoints_on_node(my_node_id) - do N_spin = 1, nspins - write (matrix_unit, '(9999(ES16.8E3))') (qe_osm(n_eigen, N_spin, N, max_atoms + 1), n_eigen=1, nbands) - end do - end do + deallocate (tsm_reduced, stat=ierr) + if (ierr /= 0) call io_error('Error: write_distributed_qe_data - failed to deallocate tsm_reduced') end if - close (unit=matrix_unit) end if end subroutine write_distributed_qe_data diff --git a/optados/src/projection_utils.f90 b/optados/src/projection_utils.f90 index a109f3b4..70602044 100644 --- a/optados/src/projection_utils.f90 +++ b/optados/src/projection_utils.f90 @@ -30,7 +30,7 @@ ! - matrix_weights: weights of desired projectors by (projector, band, kpoint, spin). ! - proj_{symbol,am,sites}: array of projections split by OptaDOS shortcuts. ! -! as well as a few global variables, and . +! as well as a few global variables, `num_proj` and `shortcut`. !------------------------------------------------------------------------------- module od_projection_utils diff --git a/optados/test-suite/tests/testopt_core_absorb/.gitignore b/optados/test-suite/tests/testopt_core_absorb/.gitignore index 6edfc020..1a9cc17e 100644 --- a/optados/test-suite/tests/testopt_core_absorb/.gitignore +++ b/optados/test-suite/tests/testopt_core_absorb/.gitignore @@ -3,4 +3,5 @@ Si2.odo Si2.log Si2.dome_bin Si2.elnes_bin +Si2.elnes_fmt Si2_core_edge.dat diff --git a/optados/test-suite/tests/testopt_core_all/.gitignore b/optados/test-suite/tests/testopt_core_all/.gitignore index 45bb93b8..77033ed4 100644 --- a/optados/test-suite/tests/testopt_core_all/.gitignore +++ b/optados/test-suite/tests/testopt_core_all/.gitignore @@ -3,3 +3,4 @@ Si2.odo Si2.log Si2.dome_bin Si2.elnes_bin +Si2.elnes_fmt diff --git a/optados/test-suite/tests/testopt_core_chemical_shift/.gitignore b/optados/test-suite/tests/testopt_core_chemical_shift/.gitignore index ef49c8a3..06663f72 100644 --- a/optados/test-suite/tests/testopt_core_chemical_shift/.gitignore +++ b/optados/test-suite/tests/testopt_core_chemical_shift/.gitignore @@ -3,3 +3,4 @@ *.elnes_bin *.log *.odo +*.elnes_fmt \ No newline at end of file diff --git a/optados/test-suite/tests/testopt_core_emisson/.gitignore b/optados/test-suite/tests/testopt_core_emisson/.gitignore index 45bb93b8..49bdddbe 100644 --- a/optados/test-suite/tests/testopt_core_emisson/.gitignore +++ b/optados/test-suite/tests/testopt_core_emisson/.gitignore @@ -3,3 +3,4 @@ Si2.odo Si2.log Si2.dome_bin Si2.elnes_bin +Si2.elnes_fmt \ No newline at end of file diff --git a/optados/test-suite/tests/testopt_core_polarised/.gitignore b/optados/test-suite/tests/testopt_core_polarised/.gitignore index 45bb93b8..77033ed4 100644 --- a/optados/test-suite/tests/testopt_core_polarised/.gitignore +++ b/optados/test-suite/tests/testopt_core_polarised/.gitignore @@ -3,3 +3,4 @@ Si2.odo Si2.log Si2.dome_bin Si2.elnes_bin +Si2.elnes_fmt diff --git a/optados/test-suite/tests/testopt_dos_adaptive/.gitignore b/optados/test-suite/tests/testopt_dos_adaptive/.gitignore index 17133f58..37561255 100644 --- a/optados/test-suite/tests/testopt_dos_adaptive/.gitignore +++ b/optados/test-suite/tests/testopt_dos_adaptive/.gitignore @@ -3,3 +3,4 @@ Si2.adaptive.dat Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt diff --git a/optados/test-suite/tests/testopt_dos_adaptive_dat/.gitignore b/optados/test-suite/tests/testopt_dos_adaptive_dat/.gitignore index 814f47ae..8a2ac9e9 100644 --- a/optados/test-suite/tests/testopt_dos_adaptive_dat/.gitignore +++ b/optados/test-suite/tests/testopt_dos_adaptive_dat/.gitignore @@ -3,3 +3,4 @@ Si2.odo Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt diff --git a/optados/test-suite/tests/testopt_dos_adaptive_no_spin/.gitignore b/optados/test-suite/tests/testopt_dos_adaptive_no_spin/.gitignore index 814f47ae..8a2ac9e9 100644 --- a/optados/test-suite/tests/testopt_dos_adaptive_no_spin/.gitignore +++ b/optados/test-suite/tests/testopt_dos_adaptive_no_spin/.gitignore @@ -3,3 +3,4 @@ Si2.odo Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt diff --git a/optados/test-suite/tests/testopt_dos_linear/.gitignore b/optados/test-suite/tests/testopt_dos_linear/.gitignore index a57132ef..f4700804 100644 --- a/optados/test-suite/tests/testopt_dos_linear/.gitignore +++ b/optados/test-suite/tests/testopt_dos_linear/.gitignore @@ -3,3 +3,4 @@ Si2.linear.dat Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt diff --git a/optados/test-suite/tests/testopt_dos_linear_dome/.gitignore b/optados/test-suite/tests/testopt_dos_linear_dome/.gitignore index 96b60e8c..fc6d98d4 100644 --- a/optados/test-suite/tests/testopt_dos_linear_dome/.gitignore +++ b/optados/test-suite/tests/testopt_dos_linear_dome/.gitignore @@ -4,3 +4,4 @@ Si2.bands Si2.odo Si2.log Si2.dome_bin +Si2.dome_fmt diff --git a/optados/test-suite/tests/testopt_jdos_adaptive_dome/.gitignore b/optados/test-suite/tests/testopt_jdos_adaptive_dome/.gitignore index 9e3eae67..45c32e30 100644 --- a/optados/test-suite/tests/testopt_jdos_adaptive_dome/.gitignore +++ b/optados/test-suite/tests/testopt_jdos_adaptive_dome/.gitignore @@ -1,5 +1,6 @@ Si2.bands Si2.dome_bin +Si2.dome_fmt Si2.jadaptive.agr Si2.log Si2.odo diff --git a/optados/test-suite/tests/testopt_jdos_linear_no_spin/.gitignore b/optados/test-suite/tests/testopt_jdos_linear_no_spin/.gitignore index 11122f80..494de10e 100644 --- a/optados/test-suite/tests/testopt_jdos_linear_no_spin/.gitignore +++ b/optados/test-suite/tests/testopt_jdos_linear_no_spin/.gitignore @@ -3,3 +3,4 @@ Si2.jlinear.agr Si2.log Si2.odo Si2.ome_bin +Si2.ome_fmt diff --git a/optados/test-suite/tests/testopt_optics_conductivity/.gitignore b/optados/test-suite/tests/testopt_optics_conductivity/.gitignore index 2202d36d..049807af 100644 --- a/optados/test-suite/tests/testopt_optics_conductivity/.gitignore +++ b/optados/test-suite/tests/testopt_optics_conductivity/.gitignore @@ -1,6 +1,7 @@ Al4.bands Al4.log Al4.ome_bin +Al4.ome_fmt Al4_absorption.agr Al4_absorption.dat Al4_conductivity.agr diff --git a/optados/test-suite/tests/testopt_optics_drude/.gitignore b/optados/test-suite/tests/testopt_optics_drude/.gitignore index a82e360b..3beb0697 100644 --- a/optados/test-suite/tests/testopt_optics_drude/.gitignore +++ b/optados/test-suite/tests/testopt_optics_drude/.gitignore @@ -1,6 +1,7 @@ Al4.bands Al4.log Al4.ome_bin +Al4.ome_fmt Al4_absorption.agr Al4_absorption.dat Al4_conductivity.agr diff --git a/optados/test-suite/tests/testopt_optics_intraband/.gitignore b/optados/test-suite/tests/testopt_optics_intraband/.gitignore index d71ed291..224b1130 100644 --- a/optados/test-suite/tests/testopt_optics_intraband/.gitignore +++ b/optados/test-suite/tests/testopt_optics_intraband/.gitignore @@ -1,6 +1,7 @@ Al4.bands Al4.log Al4.ome_bin +Al4.ome_fmt Al4_absorption.agr Al4_absorption.dat Al4_conductivity.agr diff --git a/optados/test-suite/tests/testopt_optics_polar/.gitignore b/optados/test-suite/tests/testopt_optics_polar/.gitignore index 08082ae3..02de0ab6 100644 --- a/optados/test-suite/tests/testopt_optics_polar/.gitignore +++ b/optados/test-suite/tests/testopt_optics_polar/.gitignore @@ -1,6 +1,7 @@ Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt Si2_absorption.agr Si2_absorption.dat Si2_conductivity.agr diff --git a/optados/test-suite/tests/testopt_optics_poly/.gitignore b/optados/test-suite/tests/testopt_optics_poly/.gitignore index 68da7661..9d707375 100644 --- a/optados/test-suite/tests/testopt_optics_poly/.gitignore +++ b/optados/test-suite/tests/testopt_optics_poly/.gitignore @@ -1,6 +1,7 @@ Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt Si2_absorption.agr Si2_absorption.dat Si2_conductivity.agr diff --git a/optados/test-suite/tests/testopt_optics_tensor/.gitignore b/optados/test-suite/tests/testopt_optics_tensor/.gitignore index 404220b4..9b2c6466 100644 --- a/optados/test-suite/tests/testopt_optics_tensor/.gitignore +++ b/optados/test-suite/tests/testopt_optics_tensor/.gitignore @@ -1,4 +1,5 @@ Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt Si2.odo diff --git a/optados/test-suite/tests/testopt_optics_unpolar/.gitignore b/optados/test-suite/tests/testopt_optics_unpolar/.gitignore index f434ae5f..72463f57 100644 --- a/optados/test-suite/tests/testopt_optics_unpolar/.gitignore +++ b/optados/test-suite/tests/testopt_optics_unpolar/.gitignore @@ -1,6 +1,7 @@ Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt Si2_absorption.agr Si2_absorption.dat Si2_conductivity.agr diff --git a/optados/test-suite/tests/testopt_pdos_angular/.gitignore b/optados/test-suite/tests/testopt_pdos_angular/.gitignore index 0942b221..5220452d 100644 --- a/optados/test-suite/tests/testopt_pdos_angular/.gitignore +++ b/optados/test-suite/tests/testopt_pdos_angular/.gitignore @@ -1,5 +1,6 @@ Si2.log Si2.ome_bin +Si2.ome_fmt Si2.pdos.proj-0001-0001.dat Si2.bands Si2.odo diff --git a/optados/test-suite/tests/testopt_pdos_string1/.gitignore b/optados/test-suite/tests/testopt_pdos_string1/.gitignore index 99a6f840..799cc9a5 100644 --- a/optados/test-suite/tests/testopt_pdos_string1/.gitignore +++ b/optados/test-suite/tests/testopt_pdos_string1/.gitignore @@ -3,4 +3,5 @@ Si2.pdos.proj-0001-0001.dat Si2.bands Si2.odo Si2.pdos_bin +Si2.pdos_fmt Si2.ome_bin diff --git a/optados/test-suite/tests/testopt_pdos_string2/.gitignore b/optados/test-suite/tests/testopt_pdos_string2/.gitignore index 908756c6..d7efbb30 100644 --- a/optados/test-suite/tests/testopt_pdos_string2/.gitignore +++ b/optados/test-suite/tests/testopt_pdos_string2/.gitignore @@ -1,5 +1,6 @@ Si2.bands Si2.dome_bin +Si2.dome_fmt Si2.log Si2.odo Si2.pdos_bin diff --git a/optados/test-suite/tests/testopt_pdos_string3/.gitignore b/optados/test-suite/tests/testopt_pdos_string3/.gitignore index 269c7f12..27422078 100644 --- a/optados/test-suite/tests/testopt_pdos_string3/.gitignore +++ b/optados/test-suite/tests/testopt_pdos_string3/.gitignore @@ -2,4 +2,5 @@ Si2.bands Si2.log Si2.odo Si2.ome_bin +Si2.ome_fmt Si2.pdos_bin diff --git a/optados/test-suite/tests/testopt_pdos_string4/.gitignore b/optados/test-suite/tests/testopt_pdos_string4/.gitignore index 73f960c8..71c7e235 100644 --- a/optados/test-suite/tests/testopt_pdos_string4/.gitignore +++ b/optados/test-suite/tests/testopt_pdos_string4/.gitignore @@ -1,5 +1,6 @@ Si2.bands Si2.log Si2.ome_bin +Si2.ome_fmt Si2.pdos.proj-0001-0001.dat Si2.pdos_bin diff --git a/optados/test-suite/tests/testopt_photo_general/.gitignore b/optados/test-suite/tests/testopt_photo_general/.gitignore index b3095768..8ed8794b 100644 --- a/optados/test-suite/tests/testopt_photo_general/.gitignore +++ b/optados/test-suite/tests/testopt_photo_general/.gitignore @@ -2,4 +2,5 @@ *.pdos_bin *.fem_bin *.dome_bin +*.dome_fmt *.bands diff --git a/optados/test-suite/tests/testopt_photo_mpi/.gitignore b/optados/test-suite/tests/testopt_photo_mpi/.gitignore index b3095768..8ed8794b 100644 --- a/optados/test-suite/tests/testopt_photo_mpi/.gitignore +++ b/optados/test-suite/tests/testopt_photo_mpi/.gitignore @@ -2,4 +2,5 @@ *.pdos_bin *.fem_bin *.dome_bin +*.dome_fmt *.bands diff --git a/optados/test-suite/tests/testopt_photo_mpi_qemat/.gitignore b/optados/test-suite/tests/testopt_photo_mpi_qemat/.gitignore index ee268bb3..86ba210b 100644 --- a/optados/test-suite/tests/testopt_photo_mpi_qemat/.gitignore +++ b/optados/test-suite/tests/testopt_photo_mpi_qemat/.gitignore @@ -2,5 +2,6 @@ *.pdos_bin *.fem_bin *.dome_bin +*.dome_fmt *.bands *.odo diff --git a/optados/test-suite/tests/testopt_photo_mpi_qemat/C2.odi b/optados/test-suite/tests/testopt_photo_mpi_qemat/C2.odi index 0abbe65d..a295957c 100644 --- a/optados/test-suite/tests/testopt_photo_mpi_qemat/C2.odi +++ b/optados/test-suite/tests/testopt_photo_mpi_qemat/C2.odi @@ -19,6 +19,6 @@ photo_momentum : crystal photo_temperature : 300 photo_theta_lower : 59 photo_theta_upper : 61 -write_photo_matrix : qe_matrix +write_photo_output : qe_matrix iprint : 1 \ No newline at end of file diff --git a/optados/test-suite/tests/testopt_photo_mpi_qemat/Makefile b/optados/test-suite/tests/testopt_photo_mpi_qemat/Makefile index 3c6bb226..de774ec5 100644 --- a/optados/test-suite/tests/testopt_photo_mpi_qemat/Makefile +++ b/optados/test-suite/tests/testopt_photo_mpi_qemat/Makefile @@ -1,8 +1,5 @@ all: $(patsubst %.bands.bz2, %.bands, $(wildcard *.bands.bz2)) $(patsubst %.dome_fmt.bz2, %.dome_bin, $(wildcard *.dome_fmt.bz2)) $(patsubst %.fem_fmt.bz2, %.fem_bin, $(wildcard *.fem_fmt.bz2)) $(patsubst %.ome_fmt.bz2, %.ome_bin, $(wildcard *.ome_fmt.bz2)) $(patsubst %.pdos_fmt.bz2, %.pdos_bin, $(wildcard *.pdos_fmt.bz2)) $(patsubst %=C2.odi.bz2, %.odi, $(wildcard *=C2.odi.bz2)) -%.odi.bz2: %=C2.odi.bz2 - bunzip2 benchmark.out.default.inp=C2.odi.bz2 - %.dome_bin: %.dome_fmt.bz2 %.bands $(eval SEEDNAME:=$(patsubst %.dome_fmt.bz2, %, $<)) echo $(SEEDNAME) diff --git a/optados/test-suite/tests/testopt_photo_mpi_qemat/benchmark.out.default.inp=C2.odi b/optados/test-suite/tests/testopt_photo_mpi_qemat/benchmark.out.default.inp=C2.odi index 173cf0de..e8b8e280 100644 --- a/optados/test-suite/tests/testopt_photo_mpi_qemat/benchmark.out.default.inp=C2.odi +++ b/optados/test-suite/tests/testopt_photo_mpi_qemat/benchmark.out.default.inp=C2.odi @@ -1,45 +1,15 @@ - ## OptaDOS Photoemission: Printing QE Matrix on 26 Apr 2023 at 21:28:58 - ## Seedname: Graphene_prim + ## OptaDOS Photoemission: Printing QE Matrix on 20 Jul 2023 at 04:25:44 + ## Seedname: C2 ## Photoemission Model: 1step ## Photon Energy: 5.000 - ## (Reduced) QE Matrix Shape: ( 23 11 1 2) - ## K-point: ( 0.00000000 0.00000000 0.00000000) - ## Spin comp: ( 1) - -22.22980390 -10.26265190 -5.70345154 -5.70339984 0.58129175 1.31603230 1.52131198 2.48939613 2.94213206 4.62337895 5.25973402 5.70124062 5.70128361 7.59620517 8.39567589 8.86330977 9.79618729 11.34807153 12.33959693 15.83302454 17.08813082 19.81307359 20.97979267 - ## K-point: ( 0.14715505 0.00000000 0.00000000) - ## Spin comp: ( 1) - -22.17063356 -10.19342750 -5.95000110 -5.83111647 0.66165758 1.39743080 1.60351485 2.57073450 3.02348811 4.70396355 5.33645406 5.73196418 5.95289966 7.67539710 8.47740310 8.66467239 9.90461649 11.42456736 12.42041991 15.90271806 17.16822916 20.01013870 21.01778602 - ## K-point: ( 0.29431010 0.00000000 0.00000000) - ## Spin comp: ( 1) - -21.99274595 -9.98153354 -6.62338080 -6.17882843 0.90283370 1.64178902 1.85014278 2.81492374 3.26761394 4.94593262 5.55596231 5.79734932 6.69043128 7.91161721 8.06907126 8.72155424 10.25185415 11.65387687 12.66218380 16.10743120 17.40675707 20.55016575 21.04645730 - ## K-point: ( 0.44146515 0.00000000 0.00000000) - ## Spin comp: ( 1) - -21.69729917 -9.63187298 -7.62041650 -6.66232464 1.30471454 2.04849172 2.26119902 3.22130616 3.67437977 5.34770080 5.69546908 6.02665829 7.14076770 7.80743762 8.31004221 9.12562751 10.85230190 12.03151454 13.06320394 16.42257875 17.79975231 20.55881543 21.23473395 - ## K-point: ( 0.58862020 0.00000000 0.00000000) - ## Spin comp: ( 1) - -21.28489623 -9.14476092 -8.81323701 -7.19422528 1.86698200 2.61644989 2.83665393 3.78828417 4.24288163 5.58283409 5.85437241 6.03956764 6.57148951 8.86154130 9.21255754 9.68802884 11.64718722 12.54985684 13.62160575 16.76715868 18.34229369 19.41261373 21.13357971 - ## K-point: ( 0.73577525 0.00000000 0.00000000) - ## Spin comp: ( 1) - -20.75838453 -10.10441879 -8.53167457 -7.71464761 2.58852203 3.33723264 3.57631158 4.45595900 4.73363920 4.96299796 5.40785347 6.64319422 7.29317458 9.56426984 10.40805810 10.81291124 12.50297625 13.18643804 14.33426535 16.78703333 18.56098260 18.99218751 19.24142528 - ## K-point: ( 0.88293030 0.00000000 0.00000000) - ## Spin comp: ( 1) - -20.12232117 -11.43365133 -8.18092637 -7.80410286 3.22226046 3.46671011 4.27276871 4.47895589 5.16662265 5.42624156 5.89007592 7.52066038 8.17777448 10.40935200 11.28401077 12.52054093 13.14757855 13.86438544 15.19378996 16.01992919 17.19221382 17.77110471 17.81263554 - ## K-point: ( 1.03008535 0.00000000 0.00000000) - ## Spin comp: ( 1) - -19.37798561 -12.75012310 -8.56464497 -6.98013782 1.84179895 4.48618459 4.99479855 5.30870771 5.55342893 6.47461535 6.94003531 8.55192120 9.22201458 11.37341894 12.31089327 12.97598846 14.03084427 14.23150863 15.18915640 15.31549124 15.97878585 16.02695571 16.21311205 - ## K-point: ( 1.17724040 0.00000000 0.00000000) - ## Spin comp: ( 1) - -18.53835470 -14.01623094 -8.85130928 -6.11697614 0.54354249 4.80843785 5.71944558 6.51364246 6.78354401 7.68132673 8.15574441 9.72314921 10.42107657 11.71641162 12.22895490 12.92103861 13.33142736 13.49211358 13.98805084 14.45681508 15.29416187 15.79424505 16.21225027 - ## K-point: ( 1.32439544 0.00000000 0.00000000) - ## Spin comp: ( 1) - -17.63231060 -15.18346977 -9.02288168 -5.34631493 -0.50260759 4.72415386 7.05090320 7.86922569 8.17881776 9.03696003 9.52913014 10.11671317 10.81960606 11.18757335 11.45945834 11.77173835 12.19415208 12.72307580 13.50130803 14.33463161 14.77471860 14.83179311 16.03245269 - ## K-point: ( 1.47155049 0.00000000 0.00000000) - ## Spin comp: ( 1) - -16.98273188 -15.91858910 -9.07878365 -4.98826156 -0.94718417 4.69518679 8.44992913 8.60793230 9.28496648 9.42556362 9.67961427 9.79823630 10.50345577 10.59917426 10.99957099 11.11858760 12.28164539 12.70014939 13.19275054 13.31564503 14.57424063 15.64516640 16.07061828 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 3.12940448E-076 1.64084751E-079 1.54419966E-091 3.15938498E-099 2.20289131E-115 6.52937439E-135 9.36625739E-156 1.07371499E-151 1.07190551E-151 1.06610314E-184 4.98133943E-208 4.95182474E-215 1.73087136E-231 1.34578737E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 5.87616988E-067 7.07888877E-081 5.14213567E-083 1.36306084E-100 1.02747061E-108 2.90263784E-136 1.44031160E-147 3.00701850E-152 6.30178098E-156 5.00618438E-186 2.53115788E-202 8.70437128E-210 2.13991207E-225 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 2.07723090E-070 5.63054768E-085 1.48997365E-086 1.08417521E-104 3.36128435E-112 2.52142892E-140 2.50321041E-150 1.70710271E-153 2.50320639E-168 5.39935876E-190 1.04100640E-194 1.82144985E-205 2.95504179E-230 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 8.22820903E-077 8.48707643E-092 4.21529437E-093 1.63494464E-111 1.15102896E-118 4.56568291E-147 5.96608921E-152 2.14763529E-158 1.30453635E-179 4.20194910E-187 1.12199778E-196 1.35406435E-211 4.85481043E-240 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + ## Find band energies and fractional k-point coordinates in: C2.bands + ## (Reduced) QE Matrix where each row contains the contributions from each band + ## at a certain k-point, spin, and atom + ## (Reduced) QE Matrix Shape: ( 23 1 11 2 ) + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 2.33495081E-076 1.22428988E-079 1.15217776E-091 2.35732024E-099 1.64364910E-115 4.87177932E-135 6.98847030E-156 8.01133794E-152 7.99783684E-152 7.95454342E-185 3.71673992E-208 3.69471804E-215 1.29145961E-231 1.00413587E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 4.38440211E-067 5.28178993E-081 3.83671524E-083 1.01702418E-100 7.66629351E-109 2.16575282E-136 1.07466349E-147 2.24363463E-152 4.70196445E-156 3.73527754E-186 1.88857949E-202 6.49461548E-210 1.59665823E-225 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.54988977E-070 4.20113538E-085 1.11171797E-086 8.08938508E-105 2.50796395E-112 1.88132041E-140 1.86772698E-150 1.27372504E-153 1.86772398E-168 4.02863778E-190 7.76728847E-195 1.35904318E-205 2.20485312E-230 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 6.13933528E-077 6.33248470E-092 3.14516870E-093 1.21988555E-111 8.58820269E-119 3.40660502E-147 4.45149386E-152 1.60242078E-158 9.73357147E-180 3.13521135E-187 8.37159158E-197 1.01031160E-211 3.62233250E-240 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 @@ -47,10 +17,10 @@ 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 3.12940448E-076 1.64084751E-079 1.54419966E-091 3.15938498E-099 2.20289131E-115 6.52937439E-135 9.36625739E-156 1.07371499E-151 1.07190551E-151 1.06610314E-184 4.98133943E-208 4.95182474E-215 1.73087136E-231 1.34578737E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 5.87616988E-067 7.07888877E-081 5.14213567E-083 1.36306084E-100 1.02747061E-108 2.90263784E-136 1.44031160E-147 3.00701850E-152 6.30178098E-156 5.00618438E-186 2.53115788E-202 8.70437128E-210 2.13991207E-225 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 2.07723090E-070 5.63054768E-085 1.48997365E-086 1.08417521E-104 3.36128435E-112 2.52142892E-140 2.50321041E-150 1.70710271E-153 2.50320639E-168 5.39935876E-190 1.04100640E-194 1.82144985E-205 2.95504179E-230 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 8.22820903E-077 8.48707643E-092 4.21529437E-093 1.63494464E-111 1.15102896E-118 4.56568291E-147 5.96608921E-152 2.14763529E-158 1.30453635E-179 4.20194910E-187 1.12199778E-196 1.35406435E-211 4.85481043E-240 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 2.33495081E-076 1.22428988E-079 1.15217776E-091 2.35732024E-099 1.64364910E-115 4.87177932E-135 6.98847030E-156 8.01133794E-152 7.99783684E-152 7.95454342E-185 3.71673992E-208 3.69471804E-215 1.29145961E-231 1.00413587E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 4.38440211E-067 5.28178993E-081 3.83671524E-083 1.01702418E-100 7.66629351E-109 2.16575282E-136 1.07466349E-147 2.24363463E-152 4.70196445E-156 3.73527754E-186 1.88857949E-202 6.49461548E-210 1.59665823E-225 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.54988977E-070 4.20113538E-085 1.11171797E-086 8.08938508E-105 2.50796395E-112 1.88132041E-140 1.86772698E-150 1.27372504E-153 1.86772398E-168 4.02863778E-190 7.76728847E-195 1.35904318E-205 2.20485312E-230 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 6.13933528E-077 6.33248470E-092 3.14516870E-093 1.21988555E-111 8.58820269E-119 3.40660502E-147 4.45149386E-152 1.60242078E-158 9.73357147E-180 3.13521135E-187 8.37159158E-197 1.01031160E-211 3.62233250E-240 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 @@ -59,10 +29,10 @@ 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 ## Bulk Contribution: - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.88360736E-075 9.87635976E-079 9.29463055E-091 1.90165280E-098 1.32593351E-114 3.93006967E-134 5.63760659E-155 6.46275503E-151 6.45186367E-151 6.41693882E-184 2.99829813E-207 2.98053306E-214 1.04182187E-230 8.10037500E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 3.47209058E-066 4.19343330E-080 3.04793534E-082 8.09782416E-100 6.10930357E-108 1.73000428E-135 8.59018118E-147 1.79409275E-151 3.76060253E-155 2.99126538E-185 1.51311807E-201 5.20397504E-209 1.28013651E-224 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.16291413E-069 3.18341756E-084 8.44356098E-086 6.19826491E-104 1.92801180E-111 1.45972221E-139 1.45286087E-149 9.91708626E-153 1.45859081E-167 3.15681645E-189 6.08874921E-194 1.06694309E-204 1.73609668E-229 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 - 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 4.22991466E-076 4.45554078E-091 2.22406228E-092 8.78905202E-111 6.23169525E-118 2.52163479E-146 3.30576236E-151 1.19339964E-157 7.30968657E-179 2.36438558E-186 6.33139850E-196 7.67273156E-211 2.77093437E-239 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.06081039E-075 5.56217040E-079 5.23455202E-091 1.07097323E-098 7.46739519E-115 2.21333748E-134 3.17498848E-155 3.63969576E-151 3.63356196E-151 3.61389298E-184 1.68858218E-207 1.67857725E-214 5.86733462E-231 4.56197093E-247 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 1.96659781E-066 2.37331250E-080 1.72469358E-082 4.57899605E-100 3.45366419E-108 9.77277256E-136 4.85157832E-147 1.01315375E-151 2.12354548E-155 1.68844934E-185 8.53969615E-202 2.93691339E-209 7.22322339E-225 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 6.69378273E-070 1.82710842E-084 4.84284676E-086 3.54579640E-104 1.10186091E-111 8.31926240E-140 8.27383447E-150 5.64608055E-153 8.29660526E-168 1.79378889E-189 3.45938820E-194 6.05920254E-205 9.85047408E-230 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 + 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 2.49365963E-076 2.61172279E-091 1.30189021E-092 5.11810319E-111 3.62163900E-118 1.45717429E-146 1.90851550E-151 6.88415135E-158 4.20641380E-179 1.35893325E-186 3.63593264E-196 4.40084226E-211 1.58592505E-239 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 0.00000000E+000 diff --git a/optados/test-suite/tests/testopt_photo_sweep/.gitignore b/optados/test-suite/tests/testopt_photo_sweep/.gitignore index b3095768..8ed8794b 100644 --- a/optados/test-suite/tests/testopt_photo_sweep/.gitignore +++ b/optados/test-suite/tests/testopt_photo_sweep/.gitignore @@ -2,4 +2,5 @@ *.pdos_bin *.fem_bin *.dome_bin +*.dome_fmt *.bands diff --git a/optados/test-suite/tests/userconfig b/optados/test-suite/tests/userconfig index 9e94c709..2a54f294 100644 --- a/optados/test-suite/tests/userconfig +++ b/optados/test-suite/tests/userconfig @@ -48,7 +48,7 @@ tolerance = (1.0e-3, 5.0e-3, 'fermi_lb'),(2.0e-69,1.0e-3,'qe_bulk'),(2.9e-69,1.0 [OPTADOS_MPI_PHOTO_QEMAT_OK] exe = ../../optados.mpi extract_fn = tools parsers.parse_photo_qemat.parse -tolerance = (1.0e-3, 5.0e-3, 'band_energies') +tolerance = (5.0e-3, 'matrix') [OPTADOS_MPI_PHOTO_ODO_FAIL] exe = ../../optados.mpi diff --git a/optados/test-suite/tools/parsers/parse_photo_qemat.py b/optados/test-suite/tools/parsers/parse_photo_qemat.py index 997f52a6..00ae17d8 100644 --- a/optados/test-suite/tools/parsers/parse_photo_qemat.py +++ b/optados/test-suite/tools/parsers/parse_photo_qemat.py @@ -9,9 +9,6 @@ from . import show_output -band_energies = re.compile(" ## Spin comp:") -kpoints = re.compile(" ## K-point: \( ([0-9]*\.[0-9]+(\s+[0-9]*\.[0-9]+)+)\)") - def parse(fname): """ Open the file, parses it and return the values @@ -26,14 +23,8 @@ def parse(fname): lines = f.readlines() for lno, l in enumerate(lines): - - match = band_energies.search(l) - if match: - retdict["band_energies"].append([float(a) for a in lines[lno+1].split()]) - continue - match = kpoints.search(l) - if match: - retdict["kpoints"].append([float(a) for a in match.groups()[0].split()]) + if '##' not in l: + retdict["matrix"].append([float(a) for a in l.split()]) continue ###############################################################