atomicdata:specs:paw-xml
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
atomicdata:specs:paw-xml [2014/11/03 20:43] – Add links in references Marc Torrent | atomicdata:specs:paw-xml [2015/05/17 22:25] (current) – Change def of N_c (factor 2 was missing) Marc Torrent | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== XML specification for atomic PAW datasets ====== | ||
+ | |||
+ | < | ||
+ | //Current version of the specification: | ||
+ | //Codes implementing the PAW XML format: | ||
+ | [[https:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Introduction ===== | ||
+ | < | ||
+ | |||
+ | This page contains information about the PAW-XML data format for the atomic datasets | ||
+ | necessary for doing Projector Augmented-Wave calculations [(BLOCHL1994)]. | ||
+ | We use the term //dataset// instead of // | ||
+ | the PAW method is not a pseudo-potential method. | ||
+ | |||
+ | An example XML file for nitrogen PAW dataset using LDA can be seen here: {{atomicdata: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== What defines a dataset? ===== | ||
+ | < | ||
+ | |||
+ | The following quantities define a minimum PAW dataset (the notation from Ref. [(BLOCHL2003)] is used here): | ||
+ | |||
+ | ^Quantity | ||
+ | |Z | ||
+ | |$E_\text{XC}[n]$ | ||
+ | |$E^\text{kin}_c$ | ||
+ | |$g_{\ell m}(\mathbf{r})$ | ||
+ | |$n_c(r)$ | ||
+ | |$\tilde{n}_c(r)$ | ||
+ | |$\tilde{n}_v(r)$ | ||
+ | |$\bar{v}(r)$ | ||
+ | |$\phi_i(\mathbf{r})$ | ||
+ | |$\tilde{\phi}_i(\mathbf{r})$|Pseudo partial waves | | ||
+ | |$\tilde{p}_i(\mathbf{r})$ | ||
+ | |$\Delta E^\text{kin}_{ij}$ | ||
+ | |||
+ | \\ | ||
+ | The following quantities can be optionally provided: | ||
+ | |||
+ | ^Quantity | ||
+ | |$r_{PAW}$ | ||
+ | |$v_H[\tilde{n}_{Zc}](r)$ | ||
+ | |$\tilde{Q}_{ij}(\mathbf{r})$|State-dependent shape function for compensation charge | ||
+ | |$\tau_c(r)$ | ||
+ | |$\tilde{\tau}_c(r)$ | ||
+ | |$X^{\text{core-core}}$ | ||
+ | |$X_{ij}^{\text{core-val}}$ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Specification of the elements ===== | ||
+ | < | ||
+ | |||
+ | An element looks like this: | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | or for an empty element: | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== The header ===== | ||
+ | < | ||
+ | |||
+ | The first two lines should look like this: | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | The first line must be present in all XML files. | ||
+ | Everything else is put inside an element with name '' | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== A comment ===== | ||
+ | < | ||
+ | |||
+ | It is recommended to put a comment giving the units and a link to this web page: | ||
+ | <code xml> | ||
+ | <!-- Nitrogen dataset for the Projector Augmented Wave method. --> | ||
+ | <!-- Units: Hartree and Bohr radii. | ||
+ | <!-- http:// | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== The '' | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | <atom symbol=" | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Exchange-correlation ===== | ||
+ | < | ||
+ | |||
+ | The '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | Taking the names from the [[http:// | ||
+ | < | ||
+ | |||
+ | < | ||
+ | Using one of the following pre-defined aliases: | ||
+ | |||
+ | ^'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | Examples: | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Generator ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | This element contains //character data// describing in words how the dataset was generated. | ||
+ | The '' | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Energies ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | | ||
+ | < | ||
+ | </ | ||
+ | The kinetic energy of the core electrons, $E^\text{kin}_c$, | ||
+ | The other energies are convenient to have for testing purposes and can also be useful for checking | ||
+ | the quality of the underlying atomic calculation. | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Valence states ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <state n=" | ||
+ | <state n=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | defined by a unique '' | ||
+ | For each of them it is also required to provide the energy '' | ||
+ | and the matching radius of the partial waves '' | ||
+ | The number of '' | ||
+ | $\tilde{\phi}_i$ and $\tilde{p}_i$) and is noted $n_{waves}$ in the rest of this document. | ||
+ | |||
+ | For this dataset, the first two lines describe bound eigenstates with occupation numbers | ||
+ | and principal quantum numbers. Notice, that the three additional unbound states should | ||
+ | have no '' | ||
+ | In this way, we know that only the first two bound states (with '' | ||
+ | should be used for constructing an initial guess for the wave functions. | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Radial grids ===== | ||
+ | < | ||
+ | |||
+ | There can be one or more definitions of radial grids. | ||
+ | |||
+ | Example: | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 | ||
+ | </ | ||
+ | < | ||
+ | 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | This defines one radial grid as $r_i = di$ where $i$ runs from 0 to 9. | ||
+ | Inside the '' | ||
+ | of the derivatives $dr_i/di$. | ||
+ | |||
+ | All functions (densities, potentials, ...) that use this grid are given as 10 numbers defining | ||
+ | the radial part of the function. The radial part of the function must be multiplied by a spherical | ||
+ | harmonics: $f_{\ell m}(\mathbf{r}) = f_\ell(r) Y_{\ell m}(\theta, \phi)$. | ||
+ | |||
+ | Each radial grid has a unique id: | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | and each numerical function must refer to one of these ids: | ||
+ | <code xml> | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | In this example, the '' | ||
+ | Each number must be separated by a '' | ||
+ | or '' | ||
+ | For numbers with scientific notation, use this format: '' | ||
+ | and not '' | ||
+ | |||
+ | A program can read the values for $r_i$ and $dr_i/di$ from the file or evaluate them from the '' | ||
+ | and associated parameter attributes. There are currently six types of radial grids: | ||
+ | |||
+ | ^'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | Although it is possible to define as radial grids as desired, | ||
+ | it is recommended to minimize the number of grids in the dataset. | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Shape function for the compensation charge ===== | ||
+ | < | ||
+ | |||
+ | The general formulation of the compensation charge uses an expansion over the partial waves //ij// and the spherical harmonics: | ||
+ | |||
+ | $$\sum_{\ell m} C_{\ell m \ell_i m_i \ell_j m_j} \hat{Q}^{\ell}_{i j}(r) Y_{\ell m}(\theta, \phi),$$ | ||
+ | |||
+ | where $C_{\ell m \ell_i m_i \ell_j m_j}$ is a //Gaunt coefficient// | ||
+ | |||
+ | The standard expression [(BLOCHL1994)] for the //shape function// $\hat{Q}^{\ell}_{i j}(\mathbf{r})$ | ||
+ | is a product of the multipole moment $Q^{\ell}_{i j}$ and a shape function $g_l(r)$: | ||
+ | |||
+ | $$\hat{Q}^{\ell}_{i j}(r) = Q^{\ell}_{i j} g_\ell(r), | ||
+ | |||
+ | |||
+ | Several formulations [(BLOCHL1994)] [(HOLZWARTH2001)] define $g_\ell(r) \propto r^\ell k(r)$, | ||
+ | where $k(r)$ is an $l$-independent shape function: | ||
+ | |||
+ | ^'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | Example: | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Another formulation [(KRESSE1999)] defines directly $g_l(r)$: | ||
+ | |||
+ | ^'' | ||
+ | |'' | ||
+ | |||
+ | For '' | ||
+ | must be determined from '' | ||
+ | |||
+ | Example: | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | There is also a more general formulation where $\hat{Q}^{\ell}_{i j}(r)$ is given in a numerical form. | ||
+ | Several //shape functions// can be set (with the '' | ||
+ | depending on $l$ and/or combinations of partial waves (specified using the optional '' | ||
+ | and '' | ||
+ | |||
+ | Example 1, defining numerically $g_l(r)$ in $\hat{Q}^{\ell}_{i j}(r)=Q^{\ell}_{i j} g_\ell(r)$: | ||
+ | <code xml> | ||
+ | < | ||
+ | ... ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Example 2, defining directly $\hat{Q}^{\ell}_{i j}(r)$ for states $i$='' | ||
+ | and $l$=0: | ||
+ | <code xml> | ||
+ | < | ||
+ | ... ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Radial functions ===== | ||
+ | < | ||
+ | |||
+ | Continuing, we have now reached the // | ||
+ | <code xml> | ||
+ | < | ||
+ | 6.801207147443e+02 6.801207147443e+02 6.665042896724e+02 | ||
+ | ... ... | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | The numbers inside the '' | ||
+ | '' | ||
+ | (resp. $\tilde{n}_c(\mathbf{r})$, | ||
+ | The radial part must be multiplied by $Y_{00} = (4\pi)^{-1/ | ||
+ | ($Y_{00}n_c(\mathbf{r})$ should integrate to the number of core electrons). | ||
+ | The //pseudo core density// and the //pseudo valence// density are defined similarly and | ||
+ | also have a '' | ||
+ | |||
+ | The '' | ||
+ | elements contain the radial parts of the $\phi_i(\mathbf{r})$, | ||
+ | $\tilde{\phi}_i(\mathbf{r})$ and $\tilde{p}_i(\mathbf{r})$ | ||
+ | functions for the states listed in the '' | ||
+ | (five states in the nitrogen example). | ||
+ | All functions must have an attribute '' | ||
+ | states listed in the '' | ||
+ | <code xml> | ||
+ | < | ||
+ | -8.178800366898029e+00 -8.178246914143839e+00 -8.177654917302689e+00 | ||
+ | ... ... | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Remember that the radial part of these functions must be multiplied by a spherical harmonics: | ||
+ | $$\phi_i(\mathbf{r}) = \phi_i(r) Y_{\ell_i m_i}(\theta, | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Zero potential ===== | ||
+ | < | ||
+ | |||
+ | The zero potential, $\bar{v}$ (see section VI.D of [(BLOCHL1994)]) | ||
+ | is defined similarly to the densities; the radial part must be multiplied by | ||
+ | $Y_{00} = (4\pi)^{-1/ | ||
+ | The '' | ||
+ | radius of $\bar{v}(\mathbf{r})$: | ||
+ | <code xml> | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== The Kresse-Joubert formulation ===== | ||
+ | < | ||
+ | |||
+ | The Kresse-Joubert formulation of the PAW method [(KRESSE1999)] | ||
+ | is very similar to the original formulation of Blöchl [(BLOCHL1994)] | ||
+ | . However, the Kresse-Joubert formulation does not use $\bar{v}$ directly, | ||
+ | but indirectly through the local ionic pseudopotential, | ||
+ | Therefore, the following transformation is necessary: | ||
+ | |||
+ | $$v_H[\tilde{n}_{Zc}] = v_H[\tilde{n}_c + | ||
+ | (N_c - Z - \tilde{N}_c) g_{00} Y_{00}] + \bar{v} + | ||
+ | v_{xc}[\tilde{n}_v + \tilde{n}_c] - | ||
+ | v_{xc}[\tilde{n}_v + \tilde{n}_c + | ||
+ | (N_v - \tilde{N}_v - \tilde{N}_c) g_{00} Y_{00}]$$ | ||
+ | |||
+ | where $N_c$ is the number of core electrons, $N_v$ is the number of valence electrons, | ||
+ | $\tilde{N}_c$ is the number of electrons contained in the pseudo core density and | ||
+ | $\tilde{N}_v$ is the number of electrons contained in the pseudo valence density. | ||
+ | The Hartree potential from the density n is defined as: | ||
+ | $$v_H[n](r_1) = 4\pi \int_0^\infty r_2^2 dr_2 \frac{n(r_2)}{r_> | ||
+ | |||
+ | where $r_>$ is the larger of $r_1$ and $r_2$. | ||
+ | |||
+ | < | ||
+ | < | ||
+ | In the Kresse-Joubert formulation, | ||
+ | what we here call $\tilde{n}_v$ and in the Blöchl formulation, | ||
+ | we have $\tilde{n} = \tilde{n}_c + \tilde{n}_v$. | ||
+ | </ | ||
+ | |||
+ | It is also possible to add an element '' | ||
+ | that contains the $v_H[\tilde{n}_{Zc}](r)$ function directly, so that no conversion is necessary: | ||
+ | <code xml> | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | specifying the matching radius. This matching radius corresponds to the maximum of all | ||
+ | the matching radii used in the formalism. | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Kinetic energy differences ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | 1.744042161013e+00 0.000000000000e+00 2.730637956456e+00 | ||
+ | ... ... | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | This element contains the symmetric $\Delta E^\text{kin}_{ij}$ matrix: | ||
+ | |||
+ | $$\Delta E^\text{kin}_{ij} = \langle \phi_i | \hat{T} | \phi_j \rangle | ||
+ | - \langle \tilde{\phi}_i | \hat{T} | \tilde{\phi}_j \rangle$$ | ||
+ | |||
+ | where $\hat{T}$ is the kinetic energy operator used by the generator.\\ | ||
+ | With $n_{waves}$ partial waves (see [[paw-xml# | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Meta-GGA ===== | ||
+ | < | ||
+ | |||
+ | Datasets for use with MGGA functionals must also include information on the | ||
+ | //core kinetic energy density// and //pseudo core kinetic energy density// ; | ||
+ | the latters are defined with these two elements: | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | These densities are defined similarly to the core and valence densities (see above). | ||
+ | The '' | ||
+ | attribute specifying its matching radius. | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Exact exchange integrals ===== | ||
+ | < | ||
+ | |||
+ | The core-core contribution to the exact exchange energy $X^{\text{core-core}}$ | ||
+ | and the symmetric core-valence PAW-correction matrix $X_{ij}^{\text{core-valence}}$ | ||
+ | are given as: | ||
+ | |||
+ | $$X^{\text{core-core}} = -\frac{1}{4}\sum_{cc' | ||
+ | \frac{\phi_c(\mathbf{r})\phi_{c' | ||
+ | {|\mathbf{r}-\mathbf{r}' | ||
+ | |||
+ | $$X_{ij}^{\text{core-valence}} = -\frac{1}{2}\sum_c \iint d\mathbf{r} d\mathbf{r}' | ||
+ | \frac{\phi_i(\mathbf{r})\phi_c(\mathbf{r}) \phi_j(\mathbf{r}' | ||
+ | {|\mathbf{r}-\mathbf{r}' | ||
+ | |||
+ | The $X_{ij}^{\text{core-valence}}$ coefficients depend only on pairs of the radial | ||
+ | basis functions $\phi_i(r)$ and can be evaluated by summing over radial | ||
+ | integrals times **3-j** symbols according to: | ||
+ | |||
+ | $$X_{ij}^{\text{core-valence}} = | ||
+ | -\delta_{l_i l_j} \delta_{m_i m_j} \sum_{c L} \frac{N_c}{2} | ||
+ | {\begin{pmatrix}l_c & L & l_i \\ 0 & 0 & 0\end{pmatrix}}^2 | ||
+ | \int r^2 dr \int {r'}^2 d{r'} | ||
+ | \frac{r^{L}_{< | ||
+ | \phi_i(r) \phi_c(r) \phi_j(r' | ||
+ | |||
+ | where\\ | ||
+ | $N_{c}$ is the number of core electrons corresponding to $l_{c}$, namely $N_{c}=2(2l_{c}+1)$, | ||
+ | $r_>$ (resp. $r_<$) is the larger (resp. smaller) of $r$ and $r'$. | ||
+ | |||
+ | $X^{\text{core-core}}$ can be specified in the '' | ||
+ | element.\\ | ||
+ | With $n_{waves}$ partial waves (see [[paw-xml# | ||
+ | $X_{ij}^{\text{core-valence}}$ is a $n_{waves} \times n_{waves}$ matrix. | ||
+ | It can be specified as $n_{waves}^2$ numbers inside the '' | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | ... ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Optional elements ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Although not necessary, it may be helpful to provide the following item(s) in the dataset: | ||
+ | |||
+ | * Radius of the PAW augmentation region '' | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== End of the dataset ===== | ||
+ | < | ||
+ | |||
+ | <code xml> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== How to use the datasets ===== | ||
+ | < | ||
+ | |||
+ | Most likely, the radial functions will be needed on some other type of radial grid than | ||
+ | the one used in the dataset. The idea is that one should read in the radial functions | ||
+ | and then transform them to the radial grids used by the specific implementation. | ||
+ | After the transformation, | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== Plotting the radial functions ===== | ||
+ | < | ||
+ | |||
+ | The first 10-20 lines of the XML-datasets, | ||
+ | and should give an overview of what kind of dataset it is and how it was generated. | ||
+ | The remaining part of the file contains numerical data for all the radial functions. | ||
+ | To get an overview of these functions, you can extract that data with the | ||
+ | '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | is very primitive and is only included in order to demonstrates how to parse XML using | ||
+ | SAX from a Python program. Parsing XML from Fortran or C code with SAX should be similar. | ||
+ | </ | ||
+ | |||
+ | <file python pawxml.py> | ||
+ | # | ||
+ | from __future__ import print_function | ||
+ | import os | ||
+ | import sys | ||
+ | import xml.sax | ||
+ | from optparse import OptionParser | ||
+ | from math import exp, log | ||
+ | |||
+ | class Reader(xml.sax.handler.ContentHandler): | ||
+ | def __init__(self, | ||
+ | self.list = list | ||
+ | self.name = name | ||
+ | self.state = state | ||
+ | self.grid = {} | ||
+ | xml.sax.handler.ContentHandler.__init__(self) | ||
+ | def read(self, filename): | ||
+ | if filename.endswith(' | ||
+ | import gzip | ||
+ | source = gzip.open(filename) | ||
+ | else: | ||
+ | source = open(filename) | ||
+ | xml.sax.parse(source, | ||
+ | def startElement(self, | ||
+ | if name == ' | ||
+ | print(attrs[' | ||
+ | elif name == ' | ||
+ | istart = int(attrs[' | ||
+ | iend = int(attrs[' | ||
+ | ii = range(istart, | ||
+ | id = attrs[' | ||
+ | eq = attrs[' | ||
+ | if eq == ' | ||
+ | a = float(attrs[' | ||
+ | d = float(attrs[' | ||
+ | self.grid[id] = [a * exp(d * i) for i in ii] | ||
+ | elif eq == ' | ||
+ | a = float(attrs[' | ||
+ | n = float(attrs[' | ||
+ | self.grid[id] = [a * i / (n - i) for i in ii] | ||
+ | elif eq == ' | ||
+ | a = float(attrs[' | ||
+ | d = float(attrs[' | ||
+ | self.grid[id] = [a * (exp(d * i) - 1.0) for i in ii] | ||
+ | elif eq == ' | ||
+ | d = float(attrs[' | ||
+ | self.grid[id] = [d * i for i in ii] | ||
+ | elif eq == ' | ||
+ | a = float(attrs[' | ||
+ | n = float(attrs[' | ||
+ | self.grid[id] = [(i / n + a)**5 / a - a**4 for i in ii] | ||
+ | else: | ||
+ | raise RuntimeError(' | ||
+ | elif name == self.name and attrs.get(' | ||
+ | self.r = self.grid[attrs[' | ||
+ | self.data = '' | ||
+ | else: | ||
+ | self.data = None | ||
+ | def characters(self, | ||
+ | if self.data is not None: | ||
+ | self.data += data | ||
+ | def endElement(self, | ||
+ | if self.data is not None: | ||
+ | for r, x in zip(self.r, self.data.split()): | ||
+ | print(r, x) | ||
+ | | ||
+ | op = OptionParser(usage=' | ||
+ | version=' | ||
+ | op.add_option(' | ||
+ | help=' | ||
+ | metavar='< | ||
+ | op.add_option(' | ||
+ | help=' | ||
+ | metavar='< | ||
+ | op.add_option(' | ||
+ | help=' | ||
+ | options, args = op.parse_args() | ||
+ | if len(args) != 1: | ||
+ | op.error(' | ||
+ | |||
+ | reader = Reader(options.list, | ||
+ | reader.read(args[0]) | ||
+ | </ | ||
+ | |||
+ | Usage: | ||
+ | |||
+ | It works like this: | ||
+ | < | ||
+ | $ pawxml.py [options] dataset[.gz] | ||
+ | </ | ||
+ | |||
+ | Options: | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | Examples: | ||
+ | < | ||
+ | [~]$ pawxml.py -x pseudo_core_density N.LDA | xmgrace - | ||
+ | [~]$ pawxml.py -x ae_partial_wave -s N2p N.LDA > N.ae.2p | ||
+ | [~]$ pawxml.py -x pseudo_partial_wave -s N2p N.LDA > N.ps.2p | ||
+ | [~]$ xmgrace N.??.2p | ||
+ | </ | ||
+ | |||
+ | \\ \\ | ||
+ | < | ||
+ | ===== References ===== | ||
+ | < | ||
+ | |||
+ | [(BLOCHL1994> | ||
+ | [(BLOCHL2003> | ||
+ | [(KRESSE1999> | ||
+ | [(HOLZWARTH2001> | ||
+ | [(LAASONEN1993> | ||
+ | |||
+ | < | ||
+ | refnote-id | ||
+ | reference-format | ||
+ | reference-base | ||
+ | multi-ref-id | ||
+ | note-id-format | ||
+ | note-id-base | ||
+ | back-ref-base | ||
+ | back-ref-format | ||
+ | back-ref-caret | ||
+ | notes-separator | ||
+ | </ | ||
+ | ~~REFNOTES~~ | ||
+ | |||