diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..97082ab93 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +## Summary + +Please write summary of major changes + +* Feature 1 +* Feature 2 +* Fix 1 +* Fix 2 diff --git a/.github/workflows/abipy-lint.yml b/.github/workflows/abipy-lint.yml new file mode 100644 index 000000000..fefcb54d1 --- /dev/null +++ b/.github/workflows/abipy-lint.yml @@ -0,0 +1,41 @@ +name: AbiPy linting + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + - name: Lint with pycodestyle + run: | + pip install pycodestyle + pycodestyle abipy + #- name: Lint with mypy + # run: | + # pip install mypy + # mypy abipy + - name: Lint with flake8 + run: | + pip install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 --count --show-source --statistics abipy + # exit-zero treats all errors as warnings. + #flake8 --count --exit-zero --max-complexity=20 --statistics abipy + #- name: Lint with pylint + # run: | + # pip install pylint + # # stop the build if there are Python syntax errors or undefined names + # pylint --exit-zero abipy diff --git a/.gitignore b/.gitignore index caf0c4586..af30b2900 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,9 @@ Profile.prof abipy/examples/flows/flow_* abipy/examples/flows/develop/flow_* _debug -__abinb_workdir__ -abinb_*.ipynb -*.pickle +#__abinb_workdir__ +#abinb_*.ipynb +$*.pickle # cython generated code abipy/extensions/*.c @@ -79,3 +79,4 @@ Untitled.ipynb .pydevproject gallery/ modules/ +style.log diff --git a/.travis.yml b/.travis.yml index 82fe8fc4e..2526353de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,42 +1,34 @@ language: python -cache: pip - -#dist: precise -sudo: false +#cache: pip env: global: - - ABINIT_VERSION=8.8.2 - - ABIPY_PYTEST=yes - - OPENBLAS_NUM_THREADS=1 - - OMP_NUM_THREADS=1 + - ABINIT_VERSION=8.10.1 + - ABIPY_PYTEST=yes + - OPENBLAS_NUM_THREADS=1 + - OMP_NUM_THREADS=1 matrix: include: - - os: linux - python: 2.7 - env: - - ABIPY_INSTALLER=conda - - os: linux - python: 3.6 - env: - - ABIPY_INSTALLER=conda ABIPY_COVERALLS=yes - os: linux python: 3.6 - env: - - ABIPY_INSTALLER=pip ABIPY_SPHINX=yes ABIPY_PYTEST=no - #- os: osx - # python: 3.6 - # language: generic - # env: - # - ABIPY_INSTALLER=conda ABIPY_PYTEST=no + env: + - ABIPY_INSTALLER=pip ABIPY_PYTEST=no - os: linux python: 3.7 - # https://github.com/travis-ci/travis-ci/issues/9815 dist: xenial + env: + - ABIPY_INSTALLER=pip ABIPY_COVERALLS=yes + - os: linux + python: 3.7 + dist: xenial # https://github.com/travis-ci/travis-ci/issues/9815 sudo: true - env: - - ABIPY_INSTALLER=pip + env: + - ABIPY_INSTALLER=conda ABIPY_SPHINX=yes +#- os: linux +# python: 3.8 +# env: +# - ABIPY_INSTALLER=conda ABIPY_PYTEST=no install: #- set -ev # exit on first error, print each command @@ -47,15 +39,12 @@ install: if [ "${ABIPY_INSTALLER}" == "pip" ]; then # pip-based installation. source dev_scripts/conda_get.sh # Needed for Abinit - echo "Installing abinit from abinit channel ..." - conda config --add channels conda-forge - conda install -y -c abinit abinit=${ABINIT_VERSION} - abinit --version - abinit --build - + # We are gonna use the github version sed -i '/pymatgen/d' requirements.txt travis_wait pip install -r requirements.txt travis_wait pip install -r requirements-optional.txt + conda install -y -c conda-forge graphviz python-graphviz + #pip install graphviz #travis_wait pip uninstall -y pymatgen elif [ "${ABIPY_INSTALLER}" == "conda" ]; then @@ -67,7 +56,7 @@ install: fi - if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mock; fi - #- pip install graphviz + - pip install coverage>=4.4 -U --upgrade-strategy=eager # Mayavi (optional requirement) #- if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mayavi; fi @@ -82,7 +71,7 @@ install: #- git clone --depth=50 https://github.com/materialsproject/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../ - python setup.py install - - mkdir -p ${HOME}/.abinit/abipy + - mkdir -p ${HOME}/.abinit/abipy - cp abipy/data/managers/travis_scheduler.yml ${HOME}/.abinit/abipy/scheduler.yml - cp abipy/data/managers/travis_manager.yml ${HOME}/.abinit/abipy/manager.yml - ./dev_scripts/pyclean.py . @@ -91,10 +80,7 @@ before_script: # This to run tests requiring a graphical user e.g. mayavi # https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - sleep 3 # give xvfb some time to start - # https://github.com/travis-ci/travis-ci/issues/6307 - - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head || true; fi + - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head || true; fi # command to run tests script: ./dev_scripts/runtests.sh @@ -113,12 +99,3 @@ notifications: - gmatteo@gmail.com on_success: change on_failure: always - -# https://docs.travis-ci.com/user/deployment/pages/ -#deploy: -# provider: pages -# skip_cleanup: true -# github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard -# local_dir: ${TRAVIS_BUILD_DIR}/yourfolder -# on: -# branch: master diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fe4cbe93a..00ce8270e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,24 +1,46 @@ -* :release:`0.3.0 <2017-12-26>` -* :feature:`0` Add :ref:`abiview.py` script for a quick visualization of results. -* :feature:`0` :ref:`abicheck.py` accepts ``-with-flow`` options -* :feature:`0` Add AbinitInput.set_spell_check to activate/deactivate spell-checker -* :feature:`0` Improve coverage -* :bug:`0 major` Fix bug in in `SigresFile.get_dataframe` if QP states do not start with the same band index. -* :bug:`0 major` Fix bug in thermodinamical properties (zero-point energy was included twice) -* :feature:`0` Add ``mpirunner_options`` and ``shell_runner_options`` to |TaskManager|. -* :feature:`0` Autodetect presence in |DdbFile| of data required for the LO-TO splitting. -* :feature:`0` Solve problem with visualize in jupyter_ notebooks (files should be produced in workdir) -* :feature:`0` Change default value of ``shifts`` in :func:`abipy.abio.factories.g0w0_with_ppmodel_inputs`. -* :feature:`0` Add interface with phononwebsite_: `abiview.py phbands out_PHBST.nc -web`. -* :feature:`0` Add robots for comparing/analyzing multiple files of the same type (|DdbRobot|, |GsrRobot| ...) - Some of the robot capabilities are exposed via the :ref:`abicomp.py` and the :ref:`abirun.py` scripts. -* :feature:`0` Add several new options to :ref:`abirun.py`, :ref:`abicomp.py` and :ref:`abistruct.py` scripts. -* :support:`0` Significant improvements to the documentation and the website: add :ref:`plot-gallery` with matplotlib plots - and :ref:`flow-gallery` with AbiPy flows are now automatically generated. -* :feature:`0`: Add Shankland-Koelling-Wood Fourier interpolation scheme. - For the theoretical background see :cite:`Euwema1969,Koelling1986,Pickett1988,Madsen2006`. -* :release:`0.2.0 <2017-03-10>` -* :feature:`0` This is the first official release in which we have reached a relatively stable API - and a well-defined interface with the netcdf files produced by Abinit. - We recommend Abinit >= 8.0.8b, version 8.2.2 is required to analyze the electronic fatbands - saved in the FATBANDS.nc_ file. +Release 0.8.0: xxxx-xx-xx + + * Add abicheck.py --create-config option to install predefined yaml configuration files + * Add support for NSCF calculations with meta-GGA. + * Preliminary support for panel dashboards exposed via `abiopen FILE --panel` and `abistruct panel FILE`. + Note that not all Abinit files are supported at present. + * Add examples and flows for effective mass calculations + * Add examples for quasi-harmonic calculations and post-processing tools + * Add support for JSON files (including MSONable format) to abiopen.py + Supports `--notebook`, `--panel` options such as `abiopen.py FILE.json --panel` + * Improved support for EPH calculations. + * Add `primitive` command to `abistruct.py` to get primitive structure from spglib + +Release 0.7.0: 2019-10-18 + + * Remove support for py2. Now Abipy requires py >= 3.6 (3.8 is not yet supported) + * AbiPy now requires pymatgen >= 2019.10.16 + * Move workflow code from pymatgen to abipy.flowtk + * Improved support for EPH calculations. + +Release:0.3.0 2017-12-26 + + * Add ``abiview.py`` script for a quick visualization of results. + * ``abicheck.py`` accepts ``-with-flow`` option + * Add AbinitInput.set_spell_check to activate/deactivate spell-checker + * Improve coverage + * Fix bug in in ``SigresFile.get_dataframe`` if QP states do not start with the same band index. + * Fix bug in thermodinamical properties (zero-point energy was included twice) + * Add ``mpirunner_options`` and ``shell_runner_options`` to TaskManager. + * Autodetect presence in DdbFile of data required for the LO-TO splitting. + * Solve problem with visualize in jupyter notebooks (files should be produced in workdir) + * Change default value of ``shifts`` in ``abipy.abio.factories.g0w0_with_ppmodel_inputs``. + * Add interface with phononwebsite: ``abiview.py phbands out_PHBST.nc -web``. + * Add robots for comparing/analyzing multiple files of the same type (``DdbRobot``, ``GsrRobot`` ...) + Some of the robot capabilities are exposed via the ``abicomp.py`` and the ``abirun.py`` scripts. + * Add several new options to ``abirun.py``, ``abicomp.py`` and ``abistruct.py`` scripts. + * Significant improvements to the documentation and the website: add ``plot-gallery`` with matplotlib plots + and ``flow-gallery`` with AbiPy flows are now automatically generated. + * Add Shankland-Koelling-Wood Fourier interpolation scheme. + +Release 0.2.0 <2017-03-10> + + This is the first official release in which we have reached a relatively stable API + and a well-defined interface with the netcdf files produced by Abinit. + We recommend Abinit >= 8.0.8b, version 8.2.2 is required to analyze the electronic fatbands + saved in the FATBANDS.nc file. diff --git a/README.rst b/README.rst index 9077e5d5c..fa468a098 100644 --- a/README.rst +++ b/README.rst @@ -10,7 +10,7 @@ * - Continuous Integration - |travis-status| |coverage-status| * - Documentation - - |docs-stable| |docs-devel| |launch-nbviewer| |launch-binder| + - |docs-github| |launch-nbviewer| |launch-binder| About ===== @@ -23,8 +23,7 @@ ab-initio calculations and typical convergence studies. AbiPy is interfaced with pymatgen_ and this allows users to benefit from the different tools and python objects available in the pymatgen ecosystem. -The official documentation of the stable version is available at the `abipy docpage`_, -while the documentation of the **developmental** version is hosted on `github pages `_. +The official documentation is hosted on `github pages `_. AbiPy can be used in conjunction with matplotlib_, pandas_, scipy_, seaborn_, ipython_ and jupyter_ notebooks thus providing a powerful and user-friendly environment for data analysis and visualization. @@ -44,9 +43,24 @@ Please report any bugs and issues at AbiPy's `Github page `_ (Introduction to AbiPy for newcomers). + +* `New features of AbiPy v0.7. Louvain-la-Neuve, Belgium, 20 May 2019 `_ (How to use the AbiPy command line interface in the terminal) + +* `Automatize a DFT code: high-throughput workflows for Abinit + `_ + + Getting AbiPy ============= @@ -78,14 +92,13 @@ Create a new conda_ environment (let's call it ``abienv``) based on python3.6 wi and activate it with:: - source activate abipy3.6 + source activate abienv You should see the name of the conda environment in the shell prompt. -Now add ``conda-forge``, ``matsci`` and ``abinit`` to your conda channels with:: +Now add ``conda-forge``, and ``abinit`` to your conda channels with:: conda config --add channels conda-forge - conda config --add channels matsci conda config --add channels abinit These are the channels from which we will download pymatgen, abipy and abinit. @@ -113,15 +126,15 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_ (see `Installing conda`_ to install conda itself), create a new environment (``abienv``) based on python3.6 with:: +If you are using conda_ (see `Installing conda`_ to install conda itself), create a new environment (``abienv``) +based on python3.6 with:: conda create -n abienv python=3.6 - source activate abipy3.6 + source activate abienv -Add ``conda-forge``, ``matsci`` and ``abinit`` to your channels with:: +Add ``conda-forge``, and ``abinit`` to your channels with:: conda config --add channels conda-forge - conda config --add channels matsci conda config --add channels abinit and install the AbiPy dependencies with:: @@ -245,6 +258,11 @@ to check that the python installation is OK:: then quit the interpreter. +For general information about how to troubleshoot problems that may occur at this level, +see the :ref:`troubleshooting` section. + +.. _anaconda_howto: + The Abinit executables are placed inside the anaconda directory associated to the ``abienv`` environment:: which abinit @@ -428,6 +446,75 @@ Source your ``.bashrc`` file to activate the changes done by ``miniconda`` to yo source ~/.bashrc +.. _troubleshooting: + +Troubleshooting +=============== + +GLIBC error +----------- + +The python interpreter may raise the following exception when importing one of the pymatgen modules:: + + from pymatgen.util.coord import pbc_shortest_vectors + File "/python3.6/site-packages/pymatgen/util/coord.py", line 11, in + from . import coord_cython as cuc + ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /python3.6/site-packages/pymatgen/util/coord_cython.cpython-36m-x86_64-linux-gnu.so)` + +This means that the pre-compiled version of pymatgen is not compatible with the GLIBC version available on your machine. +To solve the problem, we suggest to build and install pymatgen from source using the local version of GLIBC and the gcc compiler. +In the example below, we use a conda environment to install most of the dependencies with the exception of pymatgen and abipy. + +Let's start by creating a conda environment with:: + + conda create -n glibc_env python=3.6 + source activate glibc_env + conda config --add channels conda-forge + +Use pip to install spglib:: + + pip install spglib + +and try to ``import spglib`` inside the python terminal. + +Download the pymatgen repository from github with:: + + git clone https://github.com/materialsproject/pymatgen.git + cd pymatgen + +If git is not installed, use ``conda install git`` + +Now use conda to install the pymatgen requirements listed in ``requirements.txt`` +but before that make sure that ``gcc`` is in ``$PATH``. +If you are working on a cluster, you may want to issue:: + + module purge + +to avoid compiling C code with the intel compiler (it's possible to use ``icc`` but ``gcc`` is less problematic). + +Remove the line:: + + enum34==1.1.6; python_version < '3.4' + +from ``requirements.txt`` as this syntax is not supported by conda then issue:: + + conda install -y --file requirements.txt + +At this point, we can build pymatgen and the C extensions:: + + python setup.py install + +then ``cd`` to another directory (important) and test the build inside the python terminal with:: + + import spglib + import pymatgen + +Finally, we can install Abipy from source with:: + + git clone https://github.com/abinit/abipy.git + cd abipy && conda install -y --file ./requirements.txt + + License ======= @@ -436,8 +523,7 @@ AbiPy is released under the GNU GPL license. For more details see the LICENSE fi .. _Python: http://www.python.org/ .. _Abinit: https://www.abinit.org .. _abinit-channel: https://anaconda.org/abinit -.. _pymatgen: http://www.pymatgen.org -.. _`abipy docpage` : http://pythonhosted.org/abipy +.. _pymatgen: http://pymatgen.org .. _matplotlib: http://matplotlib.org .. _pandas: http://pandas.pydata.org .. _scipy: https://www.scipy.org/ @@ -485,10 +571,6 @@ AbiPy is released under the GNU GPL license. For more details see the LICENSE fi :target: https://requires.io/github/abinit/abipy/requirements/?branch=develop :alt: Requirements Status -.. |docs-stable| image:: https://img.shields.io/badge/docs-stable_version-blue.svg - :alt: Documentation stable version - :target: http://pythonhosted.org/abipy/ - -.. |docs-devel| image:: https://img.shields.io/badge/docs-devel_version-ff69b4.svg - :alt: Documentation development version +.. |docs-github| image:: https://img.shields.io/badge/docs-ff69b4.svg + :alt: AbiPy Documentation :target: http://abinit.github.io/abipy diff --git a/TODO.rst b/TODO.rst index ab4cd2f76..f67aa250a 100644 --- a/TODO.rst +++ b/TODO.rst @@ -2,14 +2,9 @@ TODO List ========= #. Rationalize the different readers defined in pymatgen and abipy. - Try to integrate some method of abipy.core.Structure in pymatgen.core.Structure. + Try to integrate some method of abipy.core.Structure in pymatgen.core.Structure. See the hack used in iotools.__init__.py -#. Move unit conversion to NetcdfReader e.g reader.read_value(varname, unit=None) - -#. Use different and cleaner rules for file extensions in ABINIT. Why _DEN12 and _1WF13 instead - of the simpler syntax 12_1DEN, 13_1WF in which the extension is preserved? - #. split long lines in the abinit input (e.g. typat 1 1 1 2 --> typat 3*1 2) #. Better support for PBS diff --git a/abipy/__init__.py b/abipy/__init__.py index 2b4e8e8a7..bb295d185 100644 --- a/abipy/__init__.py +++ b/abipy/__init__.py @@ -20,8 +20,8 @@ # Release data __author__ = '' for author, email in release.authors.values(): - __author__ += author + ' <' + email + '>\n' + __author__ += author + ' <' + email + '>\n' del author, email -__license__ = release.license -__version__ = release.version +__license__ = release.license +__version__ = release.version diff --git a/abipy/abilab.py b/abipy/abilab.py index a20ea4cdf..6f5a37635 100644 --- a/abipy/abilab.py +++ b/abipy/abilab.py @@ -1,9 +1,6 @@ """ This module gathers the most important classes and helper functions used for scripting. """ -from __future__ import print_function, division, unicode_literals - -import sys import os import collections @@ -11,6 +8,7 @@ ### Monty import ### #################### from monty.os.path import which +from monty.termcolor import cprint ####################### ### Pymatgen import ### @@ -23,7 +21,7 @@ #################### ### Abipy import ### #################### -from abipy.flowtk import Pseudo, PseudoTable, Mrgscr, Mrgddb, Mrggkk, Flow, Work, TaskManager, AbinitBuild, flow_main +from abipy.flowtk import Pseudo, PseudoTable, Mrgscr, Mrgddb, Flow, Work, TaskManager, AbinitBuild, flow_main from abipy.core.release import __version__, min_abinit_version from abipy.core.globals import enable_notebook, in_notebook, disable_notebook from abipy.core import restapi @@ -35,16 +33,16 @@ from abipy.abio.robots import Robot from abipy.abio.inputs import AbinitInput, MultiDataset, AnaddbInput, OpticInput from abipy.abio.abivars import AbinitInputFile -from abipy.abio.outputs import AbinitLogFile, AbinitOutputFile, OutNcFile, AboRobot #, CubeFile +from abipy.abio.outputs import AbinitLogFile, AbinitOutputFile, OutNcFile, AboRobot from abipy.tools.printing import print_dataframe -from abipy.tools.notebooks import print_source -from abipy.tools.plotting import get_ax_fig_plt, get_axarray_fig_plt, get_ax3d_fig_plt #, plot_array, ArrayPlotter +from abipy.tools.notebooks import print_source, print_doc +from abipy.tools.plotting import get_ax_fig_plt, get_axarray_fig_plt, get_ax3d_fig_plt from abipy.abio.factories import * from abipy.electrons.ebands import (ElectronBands, ElectronBandsPlotter, ElectronDos, ElectronDosPlotter, dataframe_from_ebands) from abipy.electrons.gsr import GsrFile, GsrRobot +from abipy.electrons.eskw import EskwFile from abipy.electrons.psps import PspsFile -from abipy.electrons.ddk import DdkFile from abipy.electrons.gw import SigresFile, SigresRobot from abipy.electrons.bse import MdfFile, MdfRobot from abipy.electrons.scissors import ScissorsBuilder @@ -57,12 +55,18 @@ from abipy.dfpt.phonons import (PhbstFile, PhbstRobot, PhononBands, PhononBandsPlotter, PhdosFile, PhononDosPlotter, PhdosReader, phbands_gridplot) from abipy.dfpt.ddb import DdbFile, DdbRobot -from abipy.dfpt.anaddbnc import AnaddbNcFile +from abipy.dfpt.anaddbnc import AnaddbNcFile, AnaddbNcRobot from abipy.dfpt.gruneisen import GrunsNcFile from abipy.dynamics.hist import HistFile, HistRobot from abipy.waves import WfkFile from abipy.eph.a2f import A2fFile, A2fRobot from abipy.eph.sigeph import SigEPhFile, SigEPhRobot +from abipy.eph.eph_plotter import EphPlotter +from abipy.eph.v1sym import V1symFile +from abipy.eph.gkq import GkqFile, GkqRobot +from abipy.eph.v1qnu import V1qnuFile +from abipy.eph.v1qavg import V1qAvgFile +from abipy.eph.transportfile import TransportFile from abipy.wannier90 import WoutFile, AbiwanFile, AbiwanRobot from abipy.electrons.lobster import CoxpFile, ICoxpFile, LobsterDoscarFile, LobsterInput, LobsterAnalyzer @@ -75,6 +79,7 @@ def _straceback(): import traceback return traceback.format_exc() + # Abinit text files. Use OrderedDict for nice output in show_abiopen_exc2class. ext2file = collections.OrderedDict([ (".abi", AbinitInputFile), @@ -103,9 +108,9 @@ def _straceback(): # Abinit files require a special treatment. abiext2ncfile = collections.OrderedDict([ ("GSR.nc", GsrFile), + ("ESKW.nc", EskwFile), ("DEN.nc", DensityNcFile), ("OUT.nc", OutNcFile), - ("DDK.nc", DdkFile), ("VHA.nc", VhartreeNcFile), ("VXC.nc", VxcNcFile), ("VHXC.nc", VhxcNcFile), @@ -126,6 +131,11 @@ def _straceback(): ("OPTIC.nc", OpticNcFile), ("A2F.nc", A2fFile), ("SIGEPH.nc", SigEPhFile), + ("TRANSPORT.nc",TransportFile), + ("V1SYM.nc", V1symFile), + ("GKQ.nc", GkqFile), + ("V1QNU.nc", V1qnuFile), + ("V1QAVG.nc", V1qAvgFile), ("ABIWAN.nc", AbiwanFile), ]) @@ -212,6 +222,21 @@ def abiopen(filepath): Args: filepath: string with the filename. """ + # Handle ~ in filepath. + filepath = os.path.expanduser(filepath) + + # Handle zipped files by creating temporary file with correct extension. + root, ext = os.path.splitext(filepath) + if ext in (".bz2", ".gz", ".z"): + from monty.io import zopen + with zopen(filepath, "rt") as f: + import tempfile + _, tmp_path = tempfile.mkstemp(suffix=os.path.basename(root), text=True) + cprint("Creating temporary file: %s" % tmp_path, "yellow") + with open(tmp_path, "wt") as t: + t.write(f.read()) + filepath = tmp_path + if os.path.basename(filepath) == "__AbinitFlow__.pickle": return Flow.pickle_load(filepath) @@ -253,6 +278,35 @@ def display_structure(obj, **kwargs): return nbjsmol_display(structure.to(fmt="cif"), ext=".cif", **kwargs) +def mjson_load(filepath, **kwargs): + """ + Read JSON file in MSONable format with MontyDecoder. Return dict with python objects. + """ + import json + from monty.json import MontyDecoder + with open(filepath, "rt") as fh: + return json.load(fh, cls=MontyDecoder, **kwargs) + + +def mjson_loads(string, **kwargs): + """ + Read JSON string in MSONable format with MontyDecoder. Return dict with python objects. + """ + import json + from monty.json import MontyDecoder + return json.loads(string, cls=MontyDecoder, **kwargs) + + +def mjson_write(d, filepath, **kwargs): + """ + Write dictionary d to filepath in JSON format using MontyDecoder + """ + import json + from monty.json import MontyEncoder + with open(filepath, "wt") as fh: + json.dump(d, fh, cls=MontyEncoder, **kwargs) + + def software_stack(): """ Import all the hard dependencies. Returns ordered dict: package --> string with version info. @@ -290,7 +344,7 @@ def abicheck(verbose=0): can be found in $PATH and whether the python modules needed at run-time can be imported. Return string with error messages, empty if success. """ - from monty.termcolor import cprint + err_lines = [] app = err_lines.append @@ -333,6 +387,115 @@ def abicheck(verbose=0): return "\n".join(err_lines) +def install_config_files(workdir=None, force_reinstall=False): + """ + Install pre-defined configuration files for the TaskManager and the Scheduler + in the workdir directory. + + Args: + workdir: Directory when configuration files should be produced. Use ~/abinit/abipy/ if None + force_reinstall: Allow overwrite pre-existent configuration files. By default, the function + raises RuntimeError if configuration files are already present. + """ + workdir = os.path.join(os.path.expanduser("~"), ".abinit", "abipy") if workdir is None else workdir + print("Installing configuration files in directory:", workdir) + from monty.os import makedirs_p + makedirs_p(workdir) + + scheduler_path = os.path.join(workdir, "scheduler.yaml") + scheduler_yaml = """ +# The launcher will stop submitting jobs when the +# number of jobs in the queue is >= Max number of jobs +max_njobs_inqueue: 2 + +# Maximum number of cores that can be used by the scheduler. +max_ncores_used: 2 + +# number of hours to wait. +#hours: 0 + +# number of minutes to wait. +#minutes: 0 + +# number of seconds to wait. +seconds: 2 + +# Send mail to the specified address (accepts string or list of strings). +# PRO TIP: the scheduler WILL try to send and email after a default time of 4 days. If you +# comment out the mailto address, this will cause the scheduler to terminate, with +# potentially nefarious effects on your running jobs. If you do not wish to receive +# emails, a work around is to set the variable `remindme_s` below to something very +# large (say, 100 days). +#mailto: nobody@nowhere.com + +# verbosity level (int, default 0) +#verbose: 0 + +# The scheduler will shutdown when the number of python exceptions is > max_num_pyexcs +#max_num_pyexcs: 2 + +# The scheduler will shutdown when the number of Abinit errors is > max_num_abierrs +#max_num_abierrs: 0 + +# The scheduler will shutdow when the total number of tasks launched is > safety_ratio * tot_num_tasks. +#safety_ratio: 5 + +# Send an e-mail to mailto every remindme_s seconds. +#remindme_s: 345600 +""" + + manager_path = os.path.join(workdir, "manager.yaml") + manager_yaml = """ +qadapters: + - + priority: 1 + queue: + qname: abipy + qtype: shell + job: + mpi_runner: mpirun + pre_run: + - export OMP_NUM_THREADS=1 + # IMPORTANT: Change the below line so that the abinit executable is in PATH + #- export PATH=$HOME/git_repos/abinit/_build/src/98_main:$PATH + #- ulimit -s unlimited; ulimit -n 2048 + + limits: + min_cores: 1 + max_cores: 2 + timelimit: 0:10:0 + hardware: + num_nodes: 1 + sockets_per_node: 1 + cores_per_socket: 2 + mem_per_node: 4 Gb +""" + + # Write configuration files. + if not os.path.isfile(scheduler_path) or force_reinstall: + with open(scheduler_path, "wt") as fh: + fh.write(scheduler_yaml) + print("Scheduler configuration file written to:", scheduler_path) + else: + raise RuntimeError("Configuration file: %s already exists.\nUse force_reinstall option to overwrite it" % scheduler_path) + + if not os.path.isfile(manager_path) or force_reinstall: + with open(manager_path, "wt") as fh: + fh.write(manager_yaml) + print("Manager configuration file written to:", manager_path) + else: + raise RuntimeError("Configuration file: %s already exists.\nUse force_reinstall option to overwrite it" % manager_path) + + print(""" +Configuration files installed successfully. +Please edit the configuration options according to your installation. +In particular, edit the `pre_run` section in manager.yml +so that the abinit executable is in $PATH. +""") + + return 0 + + def abipy_logo1(): """http://www.text-image.com/convert/pic2ascii.cgi""" return r""" @@ -382,3 +545,4 @@ def abipy_logo3(): ` ..` `:- :+ /: --` `-` ` `.` ..` """ + diff --git a/abipy/abio/abivar_database/README.md b/abipy/abio/abivar_database/README.md new file mode 100644 index 000000000..6767ebbd7 --- /dev/null +++ b/abipy/abio/abivar_database/README.md @@ -0,0 +1,6 @@ +To update the python modules using the more recent version available in the Abinit repository use vimdiff: + + vimdiff ABINIT_REPO/abimkdocs/variables_abinit.py variables_abinit.py + +and patch the file manually! +Do not change the initial part of the module since it's needed by AbiPy. diff --git a/abipy/abio/abivar_database/variables.py b/abipy/abio/abivar_database/variables.py index 8ffe7030c..4e1f90f9f 100644 --- a/abipy/abio/abivar_database/variables.py +++ b/abipy/abio/abivar_database/variables.py @@ -941,8 +941,11 @@ class InputVariables(OrderedDict): @classmethod def from_pyfile(cls, filepath): """Initialize the object from python file.""" - import imp - module = imp.load_source(filepath, filepath) + #import imp + #module = imp.load_source(filepath, filepath) + from importlib.machinery import SourceFileLoader + module = SourceFileLoader(filepath, filepath).load_module() + vlist = [Variable(**d) for d in module.variables] new = cls() new.executable = module.executable @@ -1257,4 +1260,4 @@ def node_kwargs(var): graph.node(ovar.name, **node_kwargs(ovar)) graph.edge(var.name, ovar.name, **edge_kwargs) #, label=edge_label, color=self.color_hex - return graph \ No newline at end of file + return graph diff --git a/abipy/abio/abivar_database/variables_abinit.py b/abipy/abio/abivar_database/variables_abinit.py index 853731753..a0d674eef 100644 --- a/abipy/abio/abivar_database/variables_abinit.py +++ b/abipy/abio/abivar_database/variables_abinit.py @@ -3,9 +3,10 @@ executable = "abinit" +#from abimkdocs.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions +Variable = dict -Variable=dict variables = [ Variable( abivarname="accuracy", @@ -15,7 +16,7 @@ dimensions="scalar", defaultval=0, mnemonics="ACCURACY", - text=""" + text=r""" Allows to tune the accuracy of a calculation by setting automatically the variables according to the following table: @@ -40,16 +41,15 @@ [[prtden]] | 0 | 0 | 1 | 1 | 1 | 1 +[[accuracy]] = 4 corresponds to the default tuning of ABINIT. It is already a very accurate tuning. For a parallel calculation, [[timopt]] is enforced to be 0. E_min, E_med and E_max may be read from the pseudopotential file (available only for XML PAW atomic data files). If E_min, E_med and E_max are not given in the pseudopotential file, [[ecut]] must be given in the input file and E_max=E_med=E_max=ecut. -The values in bold font are the default values of ABINIT. [[accuracy]]=4 -corresponds to the default tuning of ABINIT. It is already a very accurate tuning. -If the user wants to modify one of the input variable automatically tuned by -[[accuracy]], he must put it in the input file. The other input variables -automatically tuned by [[accuracy]] will not be affected. -[[accuracy]]=0 means that this input variable is deactivated. +If the user wants to modify one of the input variable automatically tuned by [[accuracy]], +they must put it in the input file. The other input variables automatically tuned +by [[accuracy]] will not be affected. +[[accuracy]] = 0 means that this input variable is deactivated. """, ), @@ -63,14 +63,13 @@ mnemonics="CELL lattice vector scaling", characteristics=['[[EVOLVING]]', '[[LENGTH]]'], commentdims="represented internally as acell(3,[[nimage]])", - text=""" + text=r""" Gives the length scales by which dimensionless primitive translations (in [[rprim]]) are to be multiplied. By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), although Angstrom can be specified, if preferred, since [[acell]] has the '[[LENGTH]]' characteristics. See further description of [[acell]] related to the [[rprim]] input variable, the -[[scalecart]] input variable, and the associated internal [[rprimd]] input -variable. +[[scalecart]] input variable, and the associated internal [[rprimd]] input variable. Note that [[acell]] is NOT the length of the conventional orthogonal basis vectors, but the scaling factors of the primitive vectors. Use [[scalecart]] @@ -86,15 +85,15 @@ dimensions="scalar", defaultval=0, mnemonics="ADiabatic Path-Integral Molecular Dynamics", - requires="[[imgmov]]==9 or [[imgmov]]==13", - text=""" + requires="[[imgmov]] == 9 or [[imgmov]] == 13", + text=r""" Controls whether adiabatic Path-Integral Molecular Dynamics is performed or not. The corresponding adiabaticity parameter is given by [[adpimd_gamma]]. If equal to 0, no adiabatic Path-Integral Molecular Dynamics (standard PIMD) is performed. If equal to 1, adiabatic Path-Integral Molecular Dynamics is activated. -Only relevant with [[pitransform]]=1 (normal mode transformation). In that case, -- the mass associated with to the zero-frequency mode is the true mass [[amu]], +Only relevant with [[pitransform]] = 1 (normal mode transformation). In that case, +- the mass associated with the zero-frequency mode is the true mass [[amu]], - the mass associated to the other higher frequency modes of the polymer chains is equal to the normal mode mass divided by [[adpimd_gamma]] (adiabaticity parameter), - the equation of motion on the zero-frequency mode is not thermostated. @@ -110,8 +109,8 @@ dimensions="scalar", defaultval=1, mnemonics="ADiabatic Path-Integral Molecular Dynamics: GAMMA factor", - requires="[[adpimd]]==1 and [[imgmov]] in [9,13]", - text=""" + requires="[[adpimd]] == 1 and [[imgmov]] in [9,13]", + text=r""" Adiabaticity parameter to be used in adiabatic Path-Integral Molecular Dynamics. NOT YET USABLE """, @@ -123,9 +122,9 @@ vartype="integer", topics=['AtomTypes_expert'], dimensions=['[[ntypalch]]'], - defaultval=MultipleValue(number=None, value=1), + defaultval=MultipleValue(number='[[ntypalch]]', value=1), mnemonics="ALGorithm for generating ALCHemical pseudopotentials", - text=""" + text=r""" Used for the generation of alchemical pseudopotentials, that is, when [[ntypalch]] is non-zero. @@ -141,7 +140,7 @@ proportion of the corresponding type of atom that is present in [[mixalch]] * the characteristic radius for the core charge is a linear combination of the characteristic radii of the core charges, build with the [[mixalch]] mixing coefficients - * the core charge function f(r/rc) is a linear combination of the core charge functions, + * the core charge function $f(r/r_c)$ is a linear combination of the core charge functions, build with the [[mixalch]] mixing coefficients Later, other algorithms for the mixing might be included. @@ -161,23 +160,23 @@ mnemonics="Atomic Mass Units", characteristics=['[[EVOLVING]]'], commentdefault="provided by a database of atomic masses.", - text=""" -Gives the masses in atomic mass units for each kind of atom in cell. These + text=r""" +Gives the masses in atomic mass units for each kind of atom in the input cell. These masses are used in performing molecular dynamical atomic motion if -[[ionmov]]=1, 6, 7 or 8. They are also used in phonon calculations, in the +[[ionmov]] = 1, 6, 7 or 8. They are also used in phonon calculations during the diagonalization of the dynamical matrix. Note that one may set all masses to 1 for certain cases in which merely structural relaxation is desired and not actual molecular dynamics. -Using 1986 recommended values, 1 atomic mass unit = 1.6605402e-27 kg. In this +Using the recommended values of [[cite:Martin1987]], 1 atomic mass unit = 1.6605402e-27 kg. In this unit the mass of Carbon 12 is exactly 12. -A database of atomic masses is provided, giving default values. Note that the +A database of atomic masses is provided which provides the default values. Note that the default database uses mixed isotope masses (for Carbon the natural occurrence of Carbon 13 is taken into account). The values are those recommended by the commission on Atomic Weights and Isotopic Abundances, Inorganic Chemistry -Division, IUPAC, in _Pure Appl. Chem._ **60**, 841 (1988). For Tc, Pm, Po to -Ac, Pa and beyond U, none of the isotopes has a half-life greater than 3.0d10 +Division, IUPAC [[cite:Martin1987]]. For Tc, Pm, Po to +Ac, Pa and beyond U, none of the isotopes have a half-life greater than 3.0d10 years, and the values provided in the database do not come from that source. For alchemical pseudoatoms, the masses of the constituents atoms are mixed, @@ -200,7 +199,7 @@ mnemonics="ANGles in DEGrees", characteristics=['[[INPUT_ONLY]]'], commentdefault="deduced from '[[rprim]]'", - text=""" + text=r""" Gives the angles between directions of primitive vectors of the unit cell (in degrees), as an alternative to the input array [[rprim]]. Will be used to set up [[rprim]], that, together with the array [[acell]], will be used to define @@ -238,7 +237,7 @@ dimensions="scalar", defaultval=1, mnemonics="Acoustic Sum Rule", - text=""" + text=r""" Govern the imposition of the Acoustic Sum Rule (ASR) in phonon calculations. Same meaning as the corresponding anaddb variable. """, @@ -254,11 +253,11 @@ mnemonics="ATomic potential (V) energy SHIFTs", characteristics=['[[DEVELOP]]'], requires="[[usepawu]] /= 0 and [[natvshift]] in [5,7]", - text=""" + text=r""" Defines for each atom and each spin channel (at present, can only be used with -[[nsppol]]=1 or 2, like the +U scheme), a possible potential shift, for the d -(with [[lpawu]]=2, [[natvshift]]=5), or f states (with [[lpawu]]=3, -[[natvshift]]=7). In the case of d states, and 2 spin channels, a set of 10 +[[nsppol]] = 1 or 2, like the +U scheme), a possible potential shift, for the d +(with [[lpawu]] = 2, [[natvshift]] = 5), or f states (with [[lpawu]] = 3, +[[natvshift]] = 7). In the case of d states, and 2 spin channels, a set of 10 numbers for each atom must be defined. The first set of 5 numbers corresponds to real spherical harmonics m=-2 to m=+2 for the spin-up channel, the second set of 5 numbers corresponds to real spherical harmonics m=-2 to m=+2 for the @@ -280,7 +279,7 @@ defaultval=0, mnemonics="AUTOmatisation of the PARALlelism", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" This input variable is used only when running ABINIT in parallel and for Ground-State calculations. It controls the automatic determination of parameters related to parallel work distribution (if not imposed in input file). Given a total number of @@ -299,20 +298,20 @@ * 2 --> The number of processors per parallelization level is first determined by mean of a simple (but relatively efficient) heuristic method (see 1 above). Then the code performs a series of - small benchmarks using the scheme applied for the LOBPCG algorithm (see [[wfoptalg]]=4 or 14). + small benchmarks using the scheme applied for the LOBPCG algorithm (see [[wfoptalg]] = 4 or 14). The parallel distribution is then changed according to the benchmarks. Possibly concerned parameters: [[npimage]], [[npkpt]], [[npspinor]], [[npfft]], [[npband]], [[bandpp]]. - * 3 --> Same as [[autoparal]]=1, plus automatic determination of Linear Algebra routines parameters. + * 3 --> Same as [[autoparal]] = 1, plus automatic determination of Linear Algebra routines parameters. In addition, the code performs a series of small benchmarks using the Linear Algebra routines (ScaLapack or Cuda-GPU). The parameters used to optimize Linear Algebra work distribution are then changed according to the benchmarks. Possibly concerned parameters (in addition to those modified for - [[autoparal]]=1): [[use_slk]], [[np_slk]], [[gpu_linalg_limit]] + [[autoparal]] = 1): [[use_slk]], [[np_slk]], [[gpu_linalg_limit]] - * 4 --> combination of [[autoparal]]=2 and [[autoparal]]=3. + * 4 --> combination of [[autoparal]] = 2 and [[autoparal]] = 3. -Note that [[autoparal]]=1 can be used on every set of processors; +Note that [[autoparal]] = 1 can be used on every set of processors; [[autoparal]] > 1 should be used on a sufficiently large number of MPI process. Also note that [[autoparal]] can be used simultaneously with [[max_ncpus]]; in this case, ABINIT performs an optimization of process distribution for each @@ -329,15 +328,15 @@ topics=['Hybrids_useful'], dimensions="scalar", defaultval=1, - mnemonics="AUXiliary XC functional for hybrid functional, IXC number", - text=""" + mnemonics="AUxiliary XC functional for hybrid functional, IXC number", + text=r""" Specification of an auxiliary exchange-correlation functional, thanks to its [[ixc]] value, to possibly replace the heavy evaluation of an hybrid functional at specific occasions, e.g. when the Fock operator is frozen during -the self-consistent cycle, thanks to [[fockoptmix]]==11, or when evaluating +the self-consistent cycle, thanks to [[fockoptmix]] == 11, or when evaluating the correction to forces due to the density residual. This auxiliary exchange- correlation functional might be rescaled, thanks to [[auxc_scal]] when -[[fockoptmix]]==11. If [[gwcalctyp]]==5, 15 or 25, [[auxc_ixc]] refers to +[[fockoptmix]] == 11. If [[gwcalctyp]] == 5, 15 or 25, [[auxc_ixc]] refers to [[ixc_sigma]] instead of [[ixc]]. """, ), @@ -349,11 +348,11 @@ topics=['Hybrids_useful'], dimensions="scalar", defaultval=1.0, - mnemonics="AUXiliary xc functional for hybrid functional- SCALing factor", - text=""" + mnemonics="AUxiliary XC functional for hybrid functional- SCALing factor", + text=r""" Possible scaling factor for the auxiliary exchange-correlation functional defined by [[auxc_ixc]] that has the goal to replace the Fock operator or -hybrid functional when [[fockoptmix]] = 11. +hybrid functional when [[fockoptmix]] == 11. The default value 1.0 corresponds to the unmodified xc functional. When the auxiliary functional is used to replace the hybrid functional in SCF loops, a @@ -369,20 +368,20 @@ dimensions="scalar", defaultval=1, mnemonics=r"evaluate the Adler-Wiser expression of $\chi^{0}_{KS}$ assuming Time-Reversal", - requires="[[optdriver]]==3", + requires="[[optdriver]] == 3", text=r""" This input variable defines whether the irreducible polarizability $\chi^{0}_{KS}$ is evaluated taking advantage of time-reversal symmetry or not. * 0 --> Use the "standard" Adler-Wiser expression without assuming time-reversal symmetry. In this case, the irreducible polarizability is calculated summing over all possible - electronic transitions (both resonant and antiresonant). + electronic transitions (both resonant and anti-resonant). * 1 --> Take advantage of time-reversal symmetry to halve the number of transitions to be explicitly considered. - This method leads to a decrease in the CPU time by a factor two with respect to the [[awtr]]=0 case. + This method leads to a decrease in the CPU time by a factor two with respect to the [[awtr]] = 0 case. !!! important - Note that the parallel algorithm [[gwpara]]=2 is not compatible with the choice [[awtr]]=0. + Note that the parallel algorithm [[gwpara]] = 2 is not compatible with the choice [[awtr]] = 0. """, ), @@ -395,33 +394,33 @@ defaultval=1, mnemonics="BAND Per Processor", characteristics=['[[DEVELOP]]'], - requires="[[paral_kgb]]==1", - text=""" + requires="[[paral_kgb]] == 1", + text=r""" Control the size of the block in the LOBPCG algorithm. This keyword works only -with [[paral_kgb]]=1 and has to be either 1 or a multiple of 2. +with [[paral_kgb]] = 1 and has to be either 1 or a multiple of 2. -With [[npband]] == 1: +With [[npband]] = 1: * 1 --> band-per-band algorithm -* n --> The minimization is performed using [[nband]]/n blocks of n bands. +* n --> The minimization is performed using [[nband]] blocks of n bands. !!! warning - [[nband]]/n has to be an integer. + [[nband]] has to be an integer. -With [[npband]] /= 1: +With [[npband]] $\\ne$ 1: * 1 --> The minimization is performed using [[nband]]/[[npband]] blocks of [[npband]] bands. -* n --> The minimization is performed using [[nband]]/([[npband]]*n) blocks of [[npband]]*n bands. +* n --> The minimization is performed using [[nband]]/([[npband]] $\\times$ n) blocks of [[npband]] $\\times$ n bands. !!! warning - [[nband]] / ([[npband]]*n) has to be an integer. + [[nband]] / ([[npband]] $\\times$ n) has to be an integer. By minimizing a larger number of bands together in LOBPCG, we increase the convergence of the residual. The better minimization procedure (as concerns the convergence, but not as concerns the speed) is generally performed by -using [[bandpp]]*[[npband]]=[[nband]]. Put [[bandpp]]=2 when [[istwfk]]=2 +using [[bandpp]] $\\times$ [[npband]] = [[nband]]. Put [[bandpp]] = 2 when [[istwfk]] = 2 (the time spent in FFTs is divided by two). """, ), @@ -435,7 +434,7 @@ defaultval=MultipleValue(number=4, value=0), mnemonics="BanD limits for BERRY phase", requires="[[berryopt]] in [1, 2, 3] and [[nberry]] > 0", - text=""" + text=r""" Give the lower band and the upper band of the set of bands for which the Berry phase must be computed. Irrelevant if [[nberry]] is not positive. When [[nsppol]] is 1 (no spin-polarisation), only the two first numbers, giving the @@ -445,9 +444,11 @@ fourth numbers give the lowest and highest bands for spin down. Their occupation number is assumed to be 1. -Presently, [[bdberry]] MUST be initialized by the user in case of a Berry -phase calculation with [[berryopt]] = 1, 2, or 3: the above-mentioned default -will cause an early exit. +!!! important + + Presently, [[bdberry]] MUST be initialized by the user in case of a Berry + phase calculation with [[berryopt]] = 1, 2, or 3: the above-mentioned default + will cause an early exit. """, ), @@ -460,14 +461,13 @@ defaultval=-1, mnemonics="BanD for second-order EIGenvalues from Response-Function", requires="[[ieig2rf]] in [1,2,3,4,5]", - text=""" -that is, if the user is performing second-order eigenvalue calculations using response-functions. + text=r""" The variable [[bdeigrf]] is the maximum number of bands for which the second- order eigenvalues must be calculated: the full number of bands is still used during the computation of these corrections. -If [[bdeigrf]] is set to -1, the code will automatically set [[bdeigrf]] equal to nband. +If [[bdeigrf]] is set to -1, the code will automatically set [[bdeigrf]] equal to [[nband]]. """, ), @@ -480,26 +480,26 @@ defaultval=MultipleValue(number=None, value=0), mnemonics="BanDs for GW calculation", requires="[[optdriver]] in [4, 7]", - text=""" -For each k-point with number *ikptgw* in the range (1:[[nkptgw]]) and each spin -index isppol, **bdgw(1,ikptgw,isppol)** is the number of the lowest band for + text=r""" +For each k-point with number `ikptgw` in the range (1:[[nkptgw]]) and each spin +index `isppol`, [[bdgw]](1,`ikptgw`,`isppol`) is the number of the lowest band for which the self-energy computation must be done. -**bdgw(2,ikptgw,isppol)** gives the index of the highest band for which the self-energy computation must be done. +[[bdgw]](2,`ikptgw`,`isppol`) gives the index of the highest band for which the self-energy computation must be done. !!! note - Tthe initial values given in the input file might be changed inside + The initial values given in the input file might be changed inside the code so that all the degenerate states at a given k-point and spin are - included. This might happen when [[symsigma]]=1 is used or in the case of + included. This might happen when [[symsigma]] = 1 is used or in the case of self-consistent GW calculations. When [[symsigma]] == 1, indeed, the diagonal matrix elements of the self-energy are obtained by averaging the unsymmetrized results in the subspace spanned by the degenerate states. -When [[gwcalctyp]] >= 20, the quasiparticle wavefunctions are computed and +When [[gwcalctyp]] >= 20, the quasi-particle wavefunctions are computed and represented as linear combination of Kohn-Sham wavefunctions. In this case [[bdgw]] designates the range of KS wavefunctions used as basis set. For each -k-point, indeed, the quasiparticle wavefunctions are expanded considering only -the KS states between **bdgw(1,ikptgw,isppol)** and **bdgw(2,ikptgw,isppol)**. +k-point, indeed, the quasi-particle wavefunctions are expanded considering only +the KS states between [[bdgw]](1,`ikptgw`,`isppol`) and [[bdgw]](2,`ikptgw`,`isppol`). For self-consistent calculations, on the other hand, the basis set used to expand the GW wavefunctions should include all the degenerate states belonging @@ -526,14 +526,18 @@ * 2 --> the computation of derivatives with respect to the wavevector, thanks to the Berry phase finite-difference formula, is activated (uderiv routine) * 3 --> same as option 1 and 2 together -**Note that options 1 to 3 require the use of a serial build of Abinit.** + +!!! note + Note that options 1 to 3 require the use of a serial build of Abinit.** * -1 --> alternative computation of Berry phases (berryphase_new routine) * -2 --> alternative computation of derivatives with respect to the wavevector, thanks to the Berry phase finite-difference formula (berryphase_new routine) * -3 --> same as option -1 and -2 together -**Options -1 to -3 permit use of a parallel build and will be preferred by -most users.** + +!!! note + Options -1 to -3 permit use of a parallel build and will be preferred by + most users. * 4 --> finite electric field calculation (unreduced E-field) * 6 --> finite electric displacement field calculation (unreduced D-field) @@ -544,27 +548,30 @@ Other related input variables are: - * in case of [[berryopt]]=1,2, or 3: [[bdberry]] and [[kberry]]; also, [[nberry]] must be larger than 0; - * in case of [[berryopt]]=-1,-2, or -3: the variable [[rfdir]] must be used to specify the primitive vector along which the projection of the polarization or the ddk will be computed. For example if [[berryopt]]=-1 and [[rfdir]]=1 0 0, the projection of the polarization along the reciprocal lattice vector G_1 is computed. In case [[rfdir]]=1 1 1, ABINIT computes the projection of P along G_1, G_2 and G_3 and transforms the results to cartesian coordinates; + * in case of [[berryopt]] = 1,2, or 3: [[bdberry]] and [[kberry]]; also, [[nberry]] must be larger than 0; + * in case of [[berryopt]] = -1,-2, or -3: the variable [[rfdir]] must be used to specify the primitive vector along which the projection of the polarization or the ddk will be computed. For example if [[berryopt]] = -1 and [[rfdir]] = 1 0 0, the projection of the polarization along the reciprocal lattice vector $G_1$ is computed. In case [[rfdir]] = 1 1 1, ABINIT computes the projection of P along $G_1$, $G_2$ and $G_3$ and transforms the results to cartesian coordinates; * in cases where [[berryopt]] is negative, [[berrystep]] allow a computation of multiple-step Berry phase in order to accelerate the convergence. - * [[efield]] and [[rfdir]] in case of [[berryopt]]=4; + * [[efield]] and [[rfdir]] in case of [[berryopt]] = 4; -The cases [[berryopt]]=-1,-2,-3, 4, 6, 7, 14, 16, and 17 have to be used with [[occopt]]=1. +The cases [[berryopt]] = -1,-2,-3, 4, 6, 7, 14, 16, and 17 have to be used with [[occopt]] = 1. -The cases [[berryopt]]=-1 and 4, 6, 7, 14, 16, 17 are compatible with PAW, +The cases [[berryopt]] = -1 and 4, 6, 7, 14, 16, 17 are compatible with PAW, howevever, if in these cases one uses [[kptopt]] /= 3, one must also use only symmorphic symmetries (either because the space group is symmorphic or the variable [[symmorphi]] is set to zero). For a phonon calculation under a finite electric field, respect the following procedure. - * 1. Run a scf ground-state calculation at zero electric field to get wavefunctions to initialize the ground-state calculation in finite electric fields. - * 2. Run a scf ground-state calculation in finite electric field. The electric field is controlled by the input variable [[efield]]. [[berryopt]] should be 4. The input variable [[kptopt]] should be set to be 2. - * 3. Based on the wave functions obtained in step (2), perform phonon calculation by setting [[berryopt]]=4, [[kptopt]]=3 and The same value of [[efield]] than in step 2. [[nsym]] should be set to 1 currently but this restriction may be removed later. The other parameters are the same as phonon calculation at zero electric field. - * Note: the choice of k-point sampling N x N x N should be the same in the three runs and N should be an even number. + * a) Run a scf ground-state calculation at zero electric field to get wavefunctions to initialize the ground-state calculation in finite electric fields. + * b) Run a scf ground-state calculation in finite electric field. The electric field is controlled by the input variable [[efield]]. [[berryopt]] should be 4. The input variable [[kptopt]] should be set to be 2. + * c) Based on the wave functions obtained in step (2), perform phonon calculation by setting [[berryopt]] = 4, [[kptopt]] = 3 and The same value of [[efield]] than in step 2. [[nsym]] should be set to 1 currently but this restriction may be removed later. The other parameters are the same as phonon calculation at zero electric field. + +!!! important + + The choice of k-point sampling N x N x N should be the same in the three runs and N should be an even number. In case of finite electric and displacement field calculations -([[berryopt]]=4,6,7,14,16,17), see also the input variables [[berrysav]], +([[berryopt]] = 4,6,7,14,16,17), see also the input variables [[berrysav]], [[dfield]], [[red_dfield]], [[red_efield]], [[ddamp]] """, ), @@ -577,15 +584,18 @@ dimensions="scalar", defaultval=0, mnemonics="BERRY SAVe", - text=""" - * 0 --> for finite electric field calculation ([[berryopt]]=4/14), - the polarization branch will be chosen on each iteration from (-pi, pi); - for finite electric displacement field calculation([[berryopt]]=6/7/16/17), + text=r""" + * 0 --> for finite electric field calculation ([[berryopt]] = 4/14), + the polarization branch will be chosen on each iteration from (-pi, pi). + For finite electric displacement field calculation([[berryopt]] = 6/7/16/17), the polarization will be chosen to minimize the internal energy. * 1 --> the polarization will be kept in the same branch on each iteration. At the end of the run, a file "POLSAVE" will be saved containing the reduced polarization in atomic units. - Note: Make sure that "POLSAVE" is empty or it does not exist before the calculation, or else that - it specifies the desired polarization branch. + + !!! note + + Make sure that "POLSAVE" is empty or it does not exist before the calculation, or else that + it specifies the desired polarization branch. """, ), @@ -598,13 +608,13 @@ defaultval=1, mnemonics="BERRY phase: multiple STEP", requires="0 > [[berryopt]]", - text=""" + text=r""" If [[berryopt]] is negative, this variable is used to compute berry phases using multiple discrete steps, in order to accelerate convergence. The single- step berry phase is the standard calculation using strings of k-points based -on overlap of Bloch function separated by dk, while the two-step berry phase -use strings use overlaps based on dk and 2*dk, the three-step use overlaps -based on dk, 2*dk and 3*dk... +on overlap of Bloch function separated by $dk$, while the two-step berry phase +use strings use overlaps based on dk and $2*dk$, the three-step use overlaps +based on dk, $2*dk$ and $3*dk$... The default value of this variable is 1, meaning that only the single-step berry phase calculation is done. If a larger value is set, ABINIT will compute @@ -623,9 +633,12 @@ dimensions=[3], defaultval=MultipleValue(number=3, value=0.0), mnemonics="finite B FIELD calculation", - text=""" + text=r""" Perform finite magnetic field calculation. -**THIS CODE IS UNDER DEVELOPMENT AND IS NOT READY FOR USE.** + +!!! important + + THIS CODE IS UNDER DEVELOPMENT AND IS NOT READY FOR USE. """, ), @@ -637,8 +650,8 @@ dimensions="scalar", defaultval=10, mnemonics="Barostat MASS", - text=""" -bmass is the mass of the barostat when [[ionmov]]=13 (constant pressure molecular dynamics) + text=r""" +bmass is the mass of the barostat when [[ionmov]] = 13 (constant pressure molecular dynamics) """, ), @@ -650,13 +663,13 @@ dimensions=[3], defaultval=[0.5, 0.5, 0.5], mnemonics="BOX CENTER", - text=""" + text=r""" Defines the center of the box, in reduced coordinates. At present, this information is only used in the case of Time-Dependent DFT computation of the -oscillator strength. One must take boxcenter such as to be roughly the center +oscillator strength. One must take [[boxcenter]] such as to be roughly the center of the cluster or molecule. The default is sensible when the vacuum surrounding the cluster or molecule has xred 0 or 1. On the contrary, when the -cluster or molecule is close to the origin, it is better to take [[boxcenter]]=(0 0 0). +cluster or molecule is close to the origin, it is better to take [[boxcenter]] = [0.0, 0.0, 0.0]. """, ), @@ -668,15 +681,16 @@ dimensions="scalar", defaultval=2.0, mnemonics="BOX CUT-off MINimum", - text=""" + text=r""" The box cut-off ratio is the ratio between the wavefunction plane wave sphere radius, and the radius of the sphere that can be inserted in the FFT box, in reciprocal space. -In order for the density to be exact (in the case of plane wave, not PAW), +In order for the density to be exact (in the case of the plane wave part, not the PAW on-site terms), this ratio should be at least two. If one uses a smaller ratio, one will gain speed, at the expense of accuracy. -In the case of pure ground state calculation (e.g. for the determination of geometries), this is -sensible. However, the wavefunctions that are obtained CANNOT be used for -starting response function calculation. +In the case of pure ground state calculation (e.g. for the determination of geometries), this is sensible. + +Prior to v8.9, the use of boxcutmin for DFPT calculations was forbidden. However, after testing, it was seen that +the deterioration in phonon band structures could be alleviated to a large extent by the imposition of the Acoustic Sum Rule [[asr]]. """, ), @@ -689,13 +703,13 @@ defaultval=0, mnemonics="BRaVais LaTTice type", requires="[[spgroup]] != 0", - text=""" + text=r""" Set the type of Bravais lattice. The cell defined by [[acell]] and [[rprim]] or [[angdeg]] should be the CONVENTIONAL cell. If brvltt=0, the code will assign brvltt from the space group information [[spgroup]], and produce the symmetry operations for the conventional unit -cell. If the conventional cell is not primitive, the user should set [[chkprim]]=0. +cell. If the conventional cell is not primitive, the user should set [[chkprim]] = 0. If brvltt=-1, the code will assign brvltt from the space group information, then reduce the unit cell to a primitive unit cell. The echo of [[acell]] and @@ -719,7 +733,7 @@ consistent with [[spgroup]]. The space groups 146, 148, 155, 160, 161, 166, 167, when used with -[[spgaxor]]=1 (hexagonal axes) will have [[brvltt]]=7 and two associated +[[spgaxor]] = 1 (hexagonal axes) will have [[brvltt]] = 7 and two associated translations: (2/3, 1/3, 1/3) and (1/3, 2/3, 2/3). For more details see the [[help:spacegroup]]. """, @@ -734,26 +748,27 @@ defaultval=2, mnemonics="Bethe-Salpeter ALGORITHM", requires="[[optdriver]] == 99", - text=""" -The bs_algorithm input variable defines the algorithm employed to calculate -the macroscopic dielectric function. Possible values are 1, 2 or 3: + text=r""" +This input variable defines the algorithm employed to calculate the macroscopic dielectric function. +Possible values are in [1, 2, 3]: * 1 --> The macroscopic dielectric is obtained by performing a direct diagonalization of the excitonic Hamiltonian. Advantages: It gives direct access to the excitonic eigenvalues as well as to the oscillator strengths. Drawbacks: It is a very CPU- and memory-consuming approach - as the size of the Hamiltonian scales as (nk*nc*nv)**2 where nk is the number of k-point - in the FULL Brillouin zone, and nc and nv are the number of conduction and valence states, respectively. - Pros: It can be used both for resonant-only and resonant+coupling calculations (non Tamm-Dancoff approximation). + as the size of the Hamiltonian scales as $(n_k * n_c * n_v)^2$ where $n_k$ is the number of k-point + in the **full** Brillouin zone, and $n_c$ and $n_v$ are the number of conduction and valence states, respectively. + Pros: It can be used both for resonant-only and resonant + coupling calculations (non Tamm-Dancoff approximation). * 2 --> Haydock iterative method. The macroscopic dielectric function is obtained by iterative applications of the Hamiltonian on a set of vectors in the electron-hole space. Advantages: It is less memory demanding and usually faster than the direct diagonalization provided that [[zcut]] is larger than the typical energy spacing of the eigenvalues. Drawbacks: - It is an iterative method therefore the convergence with respect to bs_haydock_niter should be checked. + It is an iterative method therefore the convergence with respect to [[bs_haydock_niter]] should be checked. It is not possible to have direct information on the exciton spectrum, oscillator strengths and excitonic wave functions. - For the time being [[bs_algorithm]]=2 cannot be used for calculations in which the coupling + For the time being [[bs_algorithm]] = 2 cannot be used for calculations in which the coupling term is included (Tamm-Dancoff approximation). -* 3 --> Conjugate-gradient method. This method allows to find the few first excitonic eigenvalues. + +* 3 --> Conjugate-gradient method. This method allows one to find the few first excitonic eigenvalues. Only available for resonant calculations (Tamm-Dancoff approximation). """, ), @@ -768,10 +783,10 @@ mnemonics="Bethe-Salpeter CALCulation TYPE", requires="[[optdriver]] == 99", text=r""" -Possible values are 1,2,3. +Possible values are in [1, 2, 3]. -* 1 --> use the KS eigenvalues and wave functions stored in the KSS file to construct the transition space -* 2 --> The transition space is constructed with Kohn-Sham orbitals but the energies are read from the external GW file +* 1 --> use the KS eigenvalues and wave functions stored in the WFK file to construct the transition space +* 2 --> The transition space is constructed with Kohn-Sham orbitals but the energies are read from an external GW file * 3 --> QP amplitudes and energies will be read from the QPS file and used to construct H_ex. Not coded yet because <\psi|r|\psj>^QP should be calculated taking into account the non-locality of the self-energy in the commutator [H,r]. @@ -787,23 +802,27 @@ defaultval=11, mnemonics="Bethe-Salpeter COULOMB TERM", requires="[[optdriver]] == 99", - text=""" + text=r""" This variable governs the choice among the different options that are available for the treatment of Coulomb term of the Bethe-Salpeter Hamiltonian. -[[bs_coulomb_term]] is the concatenation of two digits, labelled (A) and (B). +**bs_coulomb_term** is the concatenation of two digits, labelled (A) and (B). -The first digit (A) can assume the values 0,1,2: +The first digit (A) can assume the values 0, 1, 2: * 0 --> The Coulomb term is not computed. This choice is equivalent to computing the RPA spectrum but using the representation in transition space instead of the more efficient approach based on the sum over states. - * 1 --> The Coulomb term is computed using the screened interaction read from an external SCR file (standard excitonic calculation). + + * 1 --> The Coulomb term is computed using the screened interaction read + from an external SCR file (standard excitonic calculation). + * 2 --> The Coulomb term is computed using a model screening function (useful for convergence studies or for reproducing published results). The second digit (B) can assume the values 0,1: - * 0 --> Use a diagonal approximation for W_GG' (mainly used for accelerating convergence studies). - * 1 --> The Coulomb term is correctly evaluated using the truly non-local W(r,r'). + * 0 --> Use a diagonal approximation for $W_{\GG\GG'}$ (mainly used for accelerating convergence studies). + + * 1 --> The Coulomb term is correctly evaluated using the truly non-local screening $W(\rr,\rr')$. """, ), @@ -817,13 +836,14 @@ mnemonics="Bethe-Salpeter COUPLING", requires="[[optdriver]] == 99", text=r""" -The [[bs_coupling]] input variable defines the treatment of the coupling block -of the Bethe-Salpeter Hamiltonian. Possible values are 0,1. +The **bs_coupling** input variable defines the treatment of the coupling block +of the Bethe-Salpeter Hamiltonian. Possible values are 0, 1. * 0 --> The coupling block is neglected (the so-called Tamm-Dancoff approximation). The code runs faster and the Hamiltonian matrix requires less memory (factor 4). - It is a good approximation for the absorption spectrum which only requires the knowledge of Im(\epsilon). + It is a good approximation for the absorption spectrum which only requires the knowledge of $\Im(\epsilon)$. The reliability of this approximation should be tested in the case of EELF calculations. + * 1 --> The coupling term is included (non Tamm-Dancoff approximation). """, ), @@ -837,9 +857,9 @@ defaultval=["-inf", "inf"], mnemonics="Bethe-Salpeter Electron-Hole CUTOFF", requires="[[optdriver]] == 99", - text=""" -It is used to define a cutoff in the e-h basis set. Only those transitions -whose energy is between bs_eh_window(1) and bs_eh_window(2) will be considered + text=r""" +Used to define a cutoff in the e-h basis set. Only those transitions +whose energy is between bs_eh_cutoff(1) and bs_eh_cutoff(2) will be considered in the construction of the e-h Hamiltonian. """, ), @@ -853,7 +873,7 @@ defaultval=1, mnemonics="Bethe-Salpeter EXCHANGE TERM", requires="[[optdriver]] == 99", - text=""" + text=r""" * 0 --> The exchange term is not calculated. This is equivalent to neglecting local field effects in the macroscopic dielectric function. * 1 --> The exchange term is calculated and added to the excitonic Hamiltonian. @@ -870,14 +890,13 @@ mnemonics="Bethe-Salpeter FREQuency MESH", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 99", - text=""" + text=r""" **bs_freq_mesh(1)** defines the first frequency for the calculation of the macroscopic dielectric function. **bs_freq_mesh(2)** gives the last frequency for the calculation of the macroscopic dielectric function. If zero, **bs_freq_mesh(2)** is set automatically to MAX(resonant_energy) + 10%. -**bs_freq_mesh(3)** gives the step of the linear mesh used for evaluating the -macroscopic dielectric function. +**bs_freq_mesh(3)** gives the step of the linear mesh used for evaluating the macroscopic dielectric function. """, ), @@ -889,17 +908,17 @@ dimensions="scalar", defaultval=1, mnemonics="Bethe-Salpeter HAYdock TERMinator", - requires="[[optdriver]] == 99 and [[bs_algorithm]]==2", - text=""" -Defines how to terminate the continued fraction expression for the dielectric -function. The terminator reduces the number of iterations needed to converge + requires="[[optdriver]] == 99 and [[bs_algorithm]] == 2", + text=r""" +Defines how to terminate the continued fraction expression for the dielectric function. +The terminator reduces the number of iterations needed to converge by smoothing the oscillation in the high energy part of the spectrum * 0 --> No terminator. The contribution given by the terms missing in the Lanczos chain are set to zero. * 1 --> Use the terminator function. The particular expression depends on the type of calculation: - In the resonant-only case, the a_i and b_i coefficients for i > niter, are replaced by their values at i=niter. - Even the coupling block is included, the terminator function described in - D. Rocca, R. Gebauer, Y. Saad, S. Baroni, J. Chem. Phys. 128, 154105 (2008) is used. + In the resonant-only case, the $a_i$ and $b_i$ coefficients for $i > \text{niter}$, are replaced + by their values at $i = \text{niter}$. + If the coupling block is included, the terminator function is the one described in [[cite:Rocca2008]]. """, ), @@ -911,12 +930,12 @@ dimensions="scalar", defaultval=100, mnemonics="Bethe-Salpeter HAYDOCK Number of ITERations", - requires="[[optdriver]] == 99 and [[bs_algorithm]]==2", - text=""" -[[bs_haydock_niter]] defines the maximum number of iterations used to -calculate the macroscopic dielectric function. The iterative algorithm stops -when the difference between two consecutive evaluations of the optical spectra -is less than [[bs_haydock_tol]]. + requires="[[optdriver]] == 99 and [[bs_algorithm]] == 2", + text=r""" +**bs_haydock_niter** defines the maximum number of iterations used to +calculate the macroscopic dielectric function. +The iterative algorithm stops when the difference between two consecutive +evaluations of the optical spectra is less than [[bs_haydock_tol]]. """, ), @@ -926,24 +945,25 @@ vartype="real", topics=['BSE_expert'], dimensions=[2], - defaultval=[0.02, 0], + defaultval=[0.02, 0.0], mnemonics="Bethe-Salpeter HAYDOCK TOLerance", - requires="[[optdriver]] == 99 and [[bs_algorithm]]==2", - text=""" -Defines the convergence criterion for the Haydock iterative method. The -iterative algorithm stops when the difference between two consecutive -evaluations of the macroscopic dielectric function is less than -**bs_haydock_tol(1)**. The sign of **bs_haydock_tol(1)** defines how to -estimate the convergence error. A negative value signals that the converge -should be reached for each frequency (strict criterion), while a positive -value indicates that the converge error is estimated by averaging over the -entire frequency range (mild criterion). + requires="[[optdriver]] == 99 and [[bs_algorithm]] == 2", + text=r""" +Defines the convergence criterion for the Haydock iterative method. +The iterative algorithm stops when the difference between two consecutive +evaluations of the macroscopic dielectric function is less than **bs_haydock_tol(1)**. +The sign of **bs_haydock_tol(1)** defines how to estimate the convergence error. + +A negative value signals that the converge should be reached for each frequency (strict criterion), while a positive +value indicates that the converge error is estimated by averaging over the entire frequency range (mild criterion). **bs_haydock_tol(2)** defines the quantity that will be checked for convergence: - * 0 --> both the real and the imaginary part must converge - * 1 --> only the real part - * 2 --> only the imaginary part + * 0.0 --> both the real and the imaginary part must converge + * 1.0 --> only the real part + * 2.0 --> only the imaginary part + +(The latter are real numbers, tolerance is 1.0d-6). """, ), @@ -955,11 +975,10 @@ dimensions=[3], defaultval=[0, 0, 0], mnemonics="Bethe-Salpeter INTERPolation K-point MULTiplication factors", - requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]]==2 and [[bs_coupling]]==0", - text=""" -[[bs_interp_kmult]] defines the number of divisions used to generate the dense -mesh in the interpolation. [[ngkpt]] of the dense mesh = -**bs_interp_kmult(:)** * [[ngkpt]] of the coarse mesh. + requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", + text=r""" +**bs_interp_kmult** defines the number of divisions used to generate the dense mesh in the interpolation. +[[ngkpt]] of the dense mesh = **bs_interp_kmult(:)** * [[ngkpt]] of the coarse mesh. """, ), @@ -971,8 +990,8 @@ dimensions="scalar", defaultval=1.0, mnemonics="Bethe-Salpeter INTERPolation Method3 WIDTH", - requires="[[bs_interp_mode]] ==3 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", - text=""" + requires="[[bs_interp_mode]] == 3 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", + text=r""" Defines the width of the region where divergence treatment is applied for BSE interpolation """, ), @@ -985,12 +1004,12 @@ dimensions="scalar", defaultval=1, mnemonics="Bethe-Salpeter INTERPolation METHOD", - requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]]==2 and [[bs_coupling]]==0", - text=""" -[[bs_interp_method]] selects the method of interpolation: + requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", + text=r""" +*bs_interp_method* selects the interpolation method:: - * 0 --> Interpolate using Y. Gillet technique with 8 neighbours (see Comput. Phys. Commun. 203, 83 (2016)) - * 1 --> Interpolation using Rohlfing & Louie technique (see above-mentioned article and Phys. Rev. B 62, 4927 (2000)) + * 0 --> Interpolate using Y. Gillet technique with 8 neighbours (see [[cite:Gillet2016]]). + * 1 --> Interpolation using Rohlfing & Louie technique (see above-mentioned article and [[cite:Rohlfing2000]]) """, ), @@ -1003,8 +1022,8 @@ defaultval=0, mnemonics="Bethe-Salpeter INTERPolation MODE", requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", - text=""" -[[bs_interp_mode]] selects the mode of interpolation: + text=r""" +*bs_interp_mode* selects the mode of interpolation: * 0 --> No interpolation. Standard Bethe-Salpeter computation is performed * 1 --> Simple interpolation @@ -1022,10 +1041,9 @@ defaultval=0, mnemonics="Bethe-Salpeter INTERPolation PREParation", requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]] == 2 and [[bs_coupling]] == 0", - text=""" -[[bs_interp_prep]] allows to trigger the preparation of the interpolation with -method 2 or method 3. It generates the decomposition of BSR in a,b,c -coefficients used for the interpolation. + text=r""" +*bs_interp_prep* allows one to trigger the preparation of the interpolation with method 2 or method 3. +It generates the decomposition of BSR in a, b, c coefficients used for the interpolation. """, ), @@ -1037,9 +1055,9 @@ dimensions="scalar", defaultval=1, mnemonics="Bethe-Salpeter INTERPolation Rohlfing & Louie NeighBour", - requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]]==2 and [[bs_interp_method]] == 1 and [[bs_coupling]] == 0", - text=""" -Gives the index of the neighbour that is used for Rohlfing & Louie method + requires="[[bs_interp_mode]] > 0 and [[bs_algorithm]] == 2 and [[bs_interp_method]] == 1 and [[bs_coupling]] == 0", + text=r""" +Gives the index of the neighbour that is used in the Rohlfing and Louie method ([[cite:Rohlfing2000]]) """, ), @@ -1052,11 +1070,11 @@ defaultval=0, mnemonics="Bethe-Salpeter Lowest Occupied BAND", requires="[[optdriver]] == 99", - text=""" + text=r""" This variable defines the index of the lowest occupied band used for the construction of the electron-hole basis set. For spin polarized calculations, -one must provide two separated indices for spin up and spin down. An -additional cutoff energy can be applied by means of the bs_eh_window input variable. +one must provide two separated indices for spin up and spin down. +An additional cutoff energy can be applied by means of the [[bs_eh_cutoff]] input variable. """, ), @@ -1069,10 +1087,10 @@ defaultval=0, mnemonics="Bethe-Salpeter Number of STATES", requires="[[optdriver]] == 99 and [[bs_algorithm]] in [2, 3]", - text=""" -[[bs_nstates]] defines the maximum number of excitonic states calculated in -the direct diagonalization of the excitonic matrix or in the conjugate- -gradient method. The number of states should be sufficiently large for a + text=r""" +**bs_nstates** defines the maximum number of excitonic states calculated in +the direct diagonalization of the excitonic matrix or in the conjugate-gradient method. +The number of states should be sufficiently large for a correct description of the optical properties in the frequency range of interest. """, ), @@ -1086,14 +1104,14 @@ defaultval=0, mnemonics="BUIT-IN TEST number", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" When [[builtintest]] is non-zero, the input file is a special one, that runs very quickly, and that is accompanied by a specific analysis by ABINIT, at the end of the run, against a hard-coded value of total energy (and possibly stresses, forces ...). The echo of the analysis is done in the STATUS file. In particular, such built-in tests can be used to check quickly whether ABINIT -fallbacks have been connected or not (bigdft, etsf_io, libxc, wannier90). At -present, [[builtintest]]=1... 7 are allowed. See more information in tests/built-in/README. +fallbacks have been connected or not (bigdft, libxc, wannier90). At +present, [[builtintest]] = 1... 7 are allowed. See more information in tests/built-in/README. """, ), @@ -1106,7 +1124,7 @@ defaultval=2.0, mnemonics="BoX CuT-off MINimum for the Double Grid (PAW)", requires="[[usepaw]] == 1", - text=""" + text=r""" The box cut-off ratio is the ratio between the wavefunction plane wave sphere radius, and the radius of the sphere that can be inserted in the FFT box, in reciprocal space. @@ -1134,7 +1152,7 @@ defaultval=0, mnemonics="Contour Deformation CUSTOM IMaginary FReQuencieS", requires="([[optdriver]] ==3 or [[optdriver]] ==4) and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + text=r""" [[cd_customnimfrqs]] lets the user define the grid points along the imaginary axis by hand. Set this to the number of frequencies you want. The frequencies are specified with [[cd_imfrqs]]. @@ -1164,23 +1182,27 @@ The integration to be performed for each matrix element of the self energy along the imaginary axis is of the form: -![](variables_assets/self_energy_cd.png) +$$ \langle i|\Sigma(\omega)|j \rangle \propto + \sum_s C_s \int_0^\infty d(i\omega^\prime) + \frac{(\omega - \epsilon_s)}{(\omega-\epsilon_s)^2 + i{\omega^\prime}^2} + f(i\omega^\prime), +$$ -Where _ ω _ is the frequency point along the real axis, _ ε s _ is an -eigenvalue, and _i ω' _ is the variable along the imaginary axis. Thus the +where $\omega$ is the frequency point along the real axis, $\epsilon_s$ is an +eigenvalue, and $i\omega^\prime$ is the variable along the imaginary axis. Thus the function to be integrated is a Lorentzian weight function centred on the -origin (whose FWHM is decided by | _ ω \- ε s _ |), times a function. The +origin (whose FWHM is decided by $|\omega-\epsilon_s|$), times a function. The function is related to the inverse dielectric matrix. It might have a peaked structure near the origin and is very smooth otherwise. the function decays -asymptotically as 1 / _i ω' _, so the whole integral converges as this to +asymptotically as $1/i\omega^\prime$, so the whole integral converges as this to the third power. - * **cd_frqim_method = 1 - Histogram:** This is the **default** method where the function _f(i ω') _ is approximated by a histogram, and the Lorentzian is integrated analytically in each sub-interval. See the section on grids below for a description of the default grid. This method combined with the default grid is the fastest and optimised for the use of few points along the imaginary axis. - * **cd_frqim_method = 2 - Trapezoid:** The next step up from the histogram approximation in the previous method. The integration region is transformed _[0, ∞[ -> [0,1] _ with a proper weight depending on the width of the Lorentzian. In this space _f(i ω') _ is approximated by a linear function between grid points (trapezoids), and the integrand is integrated analytically in each sub-interval. This method tends to slightly overestimate contributions while the default method tends to slightly underestimate them, so the results from methods 1 and 2 should bracket the converged values. The asymptotic behaviour is explicitly taken into account by a fit using the last two grid points. - * **cd_frqim_method = 3, 4, 5 - Natural Spline:** The function is transformed _[0, ∞[ -> [0,1] _ . In this space _f(i ω') _ is approximated by a natural spline function whose starting and ending sections are linear. This transform is chosen so that the function should approach a linear function asymptotically as the integration interval approaches 1, so that the asymptotic behaviour is automatically taken into account. For each Lorentzian width (determined by | _ ω \- ε s _ |) the integrand is appropriately scaled in the interval _[0,1]_, and a nested Gauss-Kronrod (GK) numerical integration rule is performed. The integrand is evaluated at the GK nodes by means of a spline-fit. The order of the GK rule is controlled by the index of the method: - * **3 --> Gauss 7 point, Kronrod 15 point rule ** - * **4 --> Gauss 11 point, Kronrod 23 point rule ** - * **5 --> Gauss 15 point, Kronrod 31 point rule ** + * **cd_frqim_method = 1 - Histogram:** This is the **default** method where the function $f(i\omega^\prime)$ is approximated by a histogram, and the Lorentzian is integrated analytically in each sub-interval. See the section on grids below for a description of the default grid. This method combined with the default grid is the fastest and optimised for the use of few points along the imaginary axis. + * **cd_frqim_method = 2 - Trapezoid:** The next step up from the histogram approximation in the previous method. The integration region is transformed $[0, \infty] \rightarrow [0,1]$ with a proper weight depending on the width of the Lorentzian. In this space $f(i\omega^\prime)$ is approximated by a linear function between grid points (trapezoids), and the integrand is integrated analytically in each sub-interval. This method tends to slightly overestimate contributions while the default method tends to slightly underestimate them, so the results from methods 1 and 2 should bracket the converged values. The asymptotic behaviour is explicitly taken into account by a fit using the last two grid points. + * **cd_frqim_method = 3, 4, 5 - Natural Spline:** The function is transformed $[0, \infty] \rightarrow [0,1]$. In this space $f(i\omega^\prime)$ is approximated by a natural spline function whose starting and ending sections are linear. This transform is chosen so that the function should approach a linear function asymptotically as the integration interval approaches 1, so that the asymptotic behaviour is automatically taken into account. For each Lorentzian width (determined by $|\omega-\epsilon_s|$) the integrand is appropriately scaled in the interval $[0,1]$, and a nested Gauss-Kronrod (GK) numerical integration rule is performed. The integrand is evaluated at the GK nodes by means of a spline-fit. The order of the GK rule is controlled by the index of the method: + * 3 --> Gauss 7 point, Kronrod 15 point rule. + * 4 --> Gauss 11 point, Kronrod 23 point rule. + * 5 --> Gauss 15 point, Kronrod 31 point rule. There is rarely any difference to machine precision between these rules, and the code will issue a warning if a higher-order rule is recommended. @@ -1196,44 +1218,42 @@ * **Default** - The default grid is an exponentially increasing grid given by the formula: -![](variables_assets/cd_default_grid.png) +$$ i\omega^\prime_k = \frac{\omega_p}{\alpha-2}\left[ e^{\frac{2k}{N+1} \ln(\alpha-1)} -1 \right]. $$ -Here _ ω p _ is the plasma frequency (by default determined by the average -density of the system, but this can be overridden by setting [[ppmfrq]]). _N_ -is the total number of grid points (set by [[nfreqim]]). _ α _ is a parameter +Here $\omega_p$ is the plasma frequency (by default determined by the average +density of the system, but this can be overridden by setting [[ppmfrq]]). $N$ +is the total number of grid points (set by [[nfreqim]]). $\alpha$ is a parameter which determines how far out the final grid point will lie. The final point -will be at _ α*ω p _ (the default is _ α = 5 _, and was hard-coded in +will be at $\alpha*\omega_p$ (the default is $\alpha = 5$, and was hard-coded in older versions of ABINIT). This grid is designed so that approximately half the grid points are always distributed to values lower than the plasma frequency, in order to resolve any peaked structure. If one seeks to increase the outermost reach by increasing [[ppmfrq]] one must simultaneously take care to increase [[nfreqim]] in order to have the appropriate resolution for the low-frequency region. In more recent versions of ABINIT one can also simply -adjust the parameter _ α _ by using [[freqim_alpha]]. This grid is optimised +adjust the parameter $\alpha$ by using [[freqim_alpha]]. This grid is optimised for speed and accurate results with few grid points for **cd_frqim_method = 1**. * **Inverse z transform** - This grid is activated by the use of the variable [[gw_frqim_inzgrid]]. - This is the standard _[0, ∞[ -> [0,1] _ transform using the formula: + This is the standard $[0, \infty] \rightarrow [0,1]$ transform using the formula: -![](variables_assets/cd_inzgrid.png) +$$ i\omega^\prime = \omega_p \frac{z}{1-z}. $$ -Here _ ω p _ is the plasma frequency (default can be overridden by setting +Here $\omega_p$ is the plasma frequency (default can be overridden by setting [[ppmfrq]]). The grid points are then picked by an equidistant grid (number of -points set by [[nfreqim]]) in the interval _z ⊂ [0,1] _ . This grid can +points set by [[nfreqim]]) in the interval $z \subset [0,1]$. This grid can easily be uniquely converged by just increasing [[nfreqim]]. Again the points -are distributed so that approximately half of them lie below the plasma -frequency. +are distributed so that approximately half of them lie below the plasma frequency. * **User defined** - The user can also define their own grid using the variables [[cd_customnimfrqs]] and [[cd_imfrqs]]. _With great power comes great responsibility!_ -The **Mrgscr** utility is handy in optimising the numerical effort expended in +The **mrgscr** utility is handy in optimising the numerical effort expended in convergence studies. By estimating the densest grid one can afford to calculate in the SCR file, and successively removing frequencies from a single file (using the utility), one only needs to perform the screening calculation **once** on the dense mesh for a given convergence study. One can also use the -utility to merge independent screening calculations over q-points and -frequency sections. +utility to merge independent screening calculations over q-points and frequency sections. """, ), @@ -1246,12 +1266,11 @@ defaultval=0, mnemonics="Contour Deformation FULL GRID in complex plane", requires="[[optdriver]] == 3 and [[gwcalctyp]] in [2, 9, 12, 19, 22, 29]", - text=""" + text=r""" [[cd_full_grid]] enables the calculation of the screening [both chi0 and epsilon^(-1)] on a grid in the first quadrant of the complex plane. The grid is determined by the (tensor) product of the grid in real frequency and the -grid in imaginary frequency. In the SUS and SCR files the grid points are -stored as follows: +grid in imaginary frequency. In the SUS and SCR files the grid points are stored as follows: **Index:** 1 . . . nfreqre nfrqre+1 . . . nfreqre+nfreqim nfreqre+nfreqim+1 . . . nfreqre*nfreqim @@ -1275,8 +1294,8 @@ defaultval=ValueWithUnit(units='eV', value=100.0), mnemonics="Contour Deformation tangent grid HALFWAY FREQuency", characteristics=['[[ENERGY]]'], - requires="([[optdriver]] == 3 or [[optdriver]]==4) and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + requires="([[optdriver]] == 3 or [[optdriver]] == 4) and [[gwcalctyp]] in [2,9,12,19,22,29]", + text=r""" [[cd_halfway_freq]] determines the frequency where half of the number of points defined in [[nfreqre]] are used up. The tangent transformed grid is approximately linear up to this point. To be used in conjunction with [[gw_frqre_tangrid]]. @@ -1290,10 +1309,10 @@ topics=['FrequencyMeshMBPT_expert'], dimensions=['[[cd_customnimfrqs]]'], mnemonics="Contour Deformation IMaginary FReQuencieS", - requires="[[optdriver]]==3 and [[gwcalctyp]] in [2,9,12,19,22,29] and [[cd_customnimfrqs]] != 0", - text=""" + requires="[[optdriver]] == 3 and [[gwcalctyp]] in [2,9,12,19,22,29] and [[cd_customnimfrqs]] != 0", + text=r""" [[cd_imfrqs]] specifies the grid points for the imaginary axis. The number of -frequencies is set by the value of [[cd_customnimfrqs]]. Example: +frequencies is set by the value of [[cd_customnimfrqs]]. For example, cd_customnimfrqs 5 nfreqim 5 @@ -1302,7 +1321,7 @@ If [[nfreqim]] is not equal to [[cd_customnimfrqs]] a warning will be issued. **Use at own risk!** The use of a custom grid makes it your responsibility -that the SUS and SCR files are valid in self-energy (i.e. [[optdriver]]=4) +that the SUS and SCR files are valid in self-energy (i.e. [[optdriver]] = 4) calculations, so caution is advised. Note that frequencies have to be strictly increasing, and the point at zero frequency is **not** considered to be part of the imaginary grid, but rather the grid along the real axis. The @@ -1319,8 +1338,8 @@ defaultval=ValueWithUnit(units='eV', value=1000.0), mnemonics="Contour Deformation grid MAXimum FREQuency", characteristics=['[[ENERGY]]'], - requires="([[optdriver]]==3 or [[optdriver]]==4) and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + requires="([[optdriver]] == 3 or [[optdriver]] == 4) and [[gwcalctyp]] in [2,9,12,19,22,29]", + text=r""" [[cd_max_freq]] determines the frequency where all the points defined in [[nfreqre]] are used up. To be used in conjunction with [[gw_frqre_tangrid]]. """, @@ -1334,12 +1353,12 @@ dimensions=[2], defaultval=[1, '[[nfreqre]]'], mnemonics="Contour Deformation grid calculate SUBSET of FREQuencies", - requires="[[optdriver]]==3 and [[gwcalctyp]] in [2,9,12,19,22,29] and [[gw_frqre_tangrid]]==0", - text=""" + requires="[[optdriver]] == 3 and [[gwcalctyp]] in [2,9,12,19,22,29] and [[gw_frqre_tangrid]] == 0", + text=r""" [[cd_subset_freq]] Specifies that only a subset of the frequencies defined by [[nfreqre]] are to be calculated. The first index is the start and the second the end, with index number 1 always being the origin. For example a -calculation with **[[nfreqre]]=100** could be separated into two datasets with: +calculation with **[[nfreqre]] = 100** could be separated into two datasets with: subset_freq1 1 50 subset_freq2 51 100 @@ -1357,7 +1376,7 @@ dimensions="scalar", defaultval=0, mnemonics="CHARGE", - text=""" + text=r""" Used to establish charge balance between the number of electrons filling the bands and the nominal [[charge]] associated with the atomic cores. The code adds up the number of valence electrons provided by the @@ -1366,9 +1385,9 @@ Then, if [[iscf]] is positive, the code adds up the band occupancies (given in array [[occ]]) for all bands at each k point, then multiplies by the k point weight [[wtk]] at each k point. Call this sum "nelect_occ" (for the number of -electrons from occupation numbers). It is then required that: nelect_occ = nelect +electrons from occupation numbers). It is then required that: nelect_occ = [[nelect]]. To treat a neutral system, which is desired in nearly all cases, one must use -[[charge]]=0. To treat a system missing one electron per unit cell, set [[charge]]=+1. +[[charge]] = 0. To treat a system missing one electron per unit cell, set [[charge]] = +1. """, ), @@ -1381,7 +1400,7 @@ defaultval=0.0, mnemonics="spatially varying CHEMical POTential", requires="[[nzchempot]] /= 0", - text=""" + text=r""" For each type of atoms, from 1 to [[ntypat]], specifies the spatially varying chemical potential, through the specification of [[nzchempot]] triplets of real numbers. They give data for [[nzchempot]] delimiting planes, all parallel @@ -1417,12 +1436,12 @@ dimensions="scalar", defaultval=1, mnemonics="CHecK DILATMX", - text=""" -If 0, will not stop the execution if the [[dilatmx]] threshold is exceeded, -but simply issue a warning. There will be no rescaling. If 1, after tentative -rescaling as described in [[dilatmx]], will stop the execution. -Also, the use of [[chkdilatmx]]=0 allows one to set [[dilatmx]] to a larger value than 1.15 , -otherwise forbidden, as being a waste of CPU and memory. + text=r""" +If 0, the code will not stop execution if the threshold of [[dilatmx]] is exceeded, +it will simply issue a warning. There will be no rescaling. If 1, after tentative +rescaling as described in [[dilatmx]], the code will stop execution. +Also, the use of [[chkdilatmx]] = 0 allows one to set [[dilatmx]] to a larger value than 1.15, +otherwise forbidden as being a waste of CPU and memory. """, ), @@ -1434,17 +1453,15 @@ dimensions="scalar", defaultval=0, mnemonics="CHecK whether the user want to EXIT", - text=""" + text=r""" If [[chkexit]] is 1 or 2, ABINIT will check whether the user wants to interrupt the run (using the keyword "exit" on the top of the input file or -creating a file named "abinit.exit": see the [[chkexit|end of section 3.2]] -of the [[help:abinit]]). - -If [[chkexit]]=0, the check is not performed at all +creating a file named "abinit.exit": see the end of section 3.2 +of the [[help:abinit#parameters]]). -If [[chkexit]]=1, the check is not performed frequently (after each SCF step) - -If [[chkexit]]=2, the check is performed frequently (after a few bands, at each k point) + * 0 --> the check is not performed at all + * 1 --> the check is not performed frequently (after each SCF step) + * 2 --> the check is performed frequently (after a few bands, at each k point) In all cases, the check is performed at most every 2 seconds of CPU time. """, @@ -1458,13 +1475,13 @@ dimensions="scalar", defaultval=1, mnemonics="CHecK whether the cell is PRIMitive", - text=""" + text=r""" If the symmetry finder is used (see [[nsym]]), a non-zero value of [[chkprim]] -will make the code stop if a non-primitive cell is used. If [[chkprim]]=0, a +will make the code stop if a non-primitive cell is used. If [[chkprim]] = 0, a warning is issued, but the run does not stop. If you are generating the atomic and cell geometry using [[spgroup]], you -might generate a PRIMITIVE cell using [[brvltt]]=-1. +might generate a PRIMITIVE cell using [[brvltt]] = -1. """, ), @@ -1477,27 +1494,29 @@ defaultval=1, mnemonics="CHecK SYMmetry BREAKing", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" This variable governs the behaviour of the code when there are potential source of symmetry breaking, related e.g. to the k point grid or the presence -of non-symmorphic translations which might not be coherent with the exchange- -correlation grid. +of non-symmorphic translations which might not be coherent with the exchange-correlation grid. -When [[chksymbreak]]=1, the code stops (or issue a warning) if: +When [[chksymbreak]] = 1, the code stops (or issue a warning) if: * (1) The k point grid is non-symmetric, in case [[kptopt]] =1, 2, or 4; * (2) The non-symmorphic translation part of the symmetry operations has components that are not zero, or simple fractions, with 2, 3, 4, 6, 8 or 12 as denominators. -When [[chksymbreak]] is zero, there is no such check. -When [[chksymbreak]] is minus 1, the code stops if the condition (1) is met, +Note that the check is disabled when the number of k-points in the BZ is greater than 40 ** 3. + +When [[chksymbreak]] = 0, there is no such check. + +When [[chksymbreak]] = -1, the code stops if the condition (1) is met, but in case the condition (2) is met, there will be a trial to shift the atomic coordinates such as to obtain symmetry operations with the adequate non-symmorphic part. Explanation: In the ground-state calculation, such breaking of the symmetry is usually harmless. However, if the user is doing a calculation of phonons using DFPT -([[rfphon]]=1), the convergence with respect to the number of k points will be +([[rfphon]] = 1), the convergence with respect to the number of k points will be much worse with a non-symmetric grid than with a symmetric one. Also, if the user is doing a GW calculation, the presence of non-symmorphic translations that are not coherent with the FFT grid might cause problems. In the GW part, @@ -1508,7 +1527,7 @@ implementation, the symmetrisation of the wavefunctions is done in real space on the FFT mesh that, therefore, has to be coherent both with the rotational part as well as with the fractional translation of each symmetry operation. If -the condition (2) is met, the GW code will not be able to find a symmetry- +the condition (2) is met, the GW code will not be able to find a symmetry preserving FFT mesh. So, it was decided to warn the user about these possible problems already at @@ -1516,7 +1535,7 @@ If you encounter a problem outlined above, you have two choices: change your atomic positions (translate them) such that the origin appears as the most -symmetric point; or ignore the problem, and set [[chksymbreak]]=0. +symmetric point; or ignore the problem, and set [[chksymbreak]] = 0. """, ), @@ -1528,7 +1547,7 @@ dimensions="scalar", defaultval=0, mnemonics="CHarge NEUTrality treatment", - text=""" + text=r""" Set the treatment of the Charge Neutrality requirement for the effective charges. Same meaning as the corresponding anaddb variable. """, @@ -1543,16 +1562,62 @@ defaultval=7, mnemonics="Climbing-Image Nudged Elastic Band: STARTing iteration", requires="[[imgmov]] == 5 and [[neb_algo]] == 2", - text=""" + text=r""" Gives the index of the first CI-NEB iteration. The CI-NEB method constitutes a small modification to the NEB method allowing a rigorous convergence to the saddle point. As the image with the highest energy has to be identified, the calculation begins with several iterations of the standard NEB algorithm. The effective CI-NEB begins at the [[cineb_start]] -iteration. See: J. Chem. Phys. 113, 9901 (2000). +iteration. See [[cite:Henkelman2000a]] for additional details of this method. +""", +), + +Variable( + abivarname="constraint_kind", + varset="gstate", + vartype="integer", + topics=['ConstrainedDFT_basic'], + dimensions=['[[ntypat]]'], + defaultval=0, + mnemonics="CONSTRAINT KIND in constrained DFT", + requires="[[iscf]] > 1 and [[iscf]] < 10 and [[ionmov]] /= 4", + text=r""" +If [[constraint_kind]] is non-zero for at least one type of atom, +the constrained DFT algorithm is activated. +[[constraint_kind]] defines, for each type of atom, the kind of constraint(s) imposed by constrained DFT. +When [[constraint_kind]] is zero for an atom type, there is not constraint applied to this atom type. +Otherwise, different constraints can be imposed on the total charge (ion+electronic) and/or magnetization, computed +inside a sphere of radius [[ratsph]], possibly smeared within a width [[ratsm]]. +Such integrated ion+electronic charge might be imposed to be equal to [[chrgat]], while the magnetization might be compared to [[spinat]]. +The first digit of [[constraint_kind]] defines the constraint on the charge, while the second digit defines the constraint on the +magnetization. + +When [[constraint_kind]] is 10 or above, the charge constraint will be imposed. + +When [[constraint_kind]]=1 or 11, the exact value (vector in the non-collinear case, amplitude and sign in the collinear case) of the magnetization is constrained; +When [[constraint_kind]]=2 or 12, only the direction is constrained (only meaningful in the non-collinear case); +When [[constraint_kind]]=3 or 13, only the magnitude is constrained. + +For the algorithm, see [[topic:ConstrainedDFT]]. It makes important use of the potential residual, +so the algorithm works only with [[iscf]] between 2 and 9. +The balance between the potential residual, and the density/magnetization constraint is governed by [[magcon_lambda]]. The spherical integral is governed by [[ratsph]] and [[ratsm]]. + +Note that while a spherical integral around an atom might reasonably well capture the magnetization of an atom within a solid or within a molecule, + so that the sum of such magnetizations might be reasonably close to the total magnetization of the solid, +such a procedure hardly gives the total charge of the solid: the space between the spheres is too large when the spheres do not overlap, +while overlapping spheres will not deliver the correct total charge of the system. + +Note that [[constraint_kind]] defines constraints for types of atoms, not for specific atoms. +Atoms of the same type are supposed to incur the same constraint. +If the user wants to impose different constraints on atoms of the same type (in principle), it is possible (and easy) to pretend +that they belong to different types, even if the same pseudopotential file is used for these atoms. There is an example +in test [[test:v8_24]], the hydrogen dimer, where the charge around the first atom is constrained, and the charge around the second atom is left free. + +Incidentally, [[ionmov]]==4 is not allowed in the present implementation of constrained DFT because the motion of atoms and simultaneous computation of constraints would be difficult to handle. """, ), + Variable( abivarname="cpuh", varset="gstate", @@ -1561,16 +1626,29 @@ dimensions="scalar", defaultval=0.0, mnemonics="CPU time limit in Hours", - characteristics=['[[INPUT_ONLY]]'], - excludes="specified([[cpum]]) or specified([[cpus]])", - text=""" + characteristics=['[[NO_MULTI]]', '[[INPUT_ONLY]]'], + excludes="[[cpum]] or [[cpus]]", + text=r""" Only one of the three real parameters [[cpus]], [[cpum]] and [[cpuh]] can be defined in the input file to set up a CPU time limit. When the job reaches that limit, it will try to end smoothly. However, note that this might still take some time. If the user want a firm CPU time limit, the present parameter must be reduced sufficiently. Intuition about the actual margin to be taken -into account should come with experience... +into account should come with experience. A zero value has no action of the job. + +!!! tip + + One can pass the timelimit to abinit via the command line option: + + abinit --timelimit hours:minutes:seconds + + This approach is much more powerful especially when the job must be submitted + to the queue via a submission script e.g. a Slurm script. + In this case, indeed, one can define a shell variable for the time limit + and use this variable to pass the time limit to Slurm and Abinit at the same time. + + Use `abinit --help` for further information. """, ), @@ -1582,9 +1660,9 @@ dimensions="scalar", defaultval=0.0, mnemonics="CPU time limit in Minutes", - characteristics=['[[INPUT_ONLY]]'], - excludes="specified([[cpum]]) or specified([[cpus]])", - text=""" + characteristics=['[[NO_MULTI]]', '[[INPUT_ONLY]]'], + excludes="[[cpuh]] or [[cpus]]", + text=r""" Only one of the three real parameters [[cpus]], [[cpum]] and [[cpuh]] can be defined in the input file to set up a CPU time limit. When the job reaches that limit, it will try to end smoothly. However, note that this might still @@ -1603,19 +1681,41 @@ dimensions="scalar", defaultval=0.0, mnemonics="CPU time limit in seconds", - characteristics=['[[NO_MULTI]]'], - excludes="specified([[cpum]]) or specified([[cpus]])", - text=""" + characteristics=['[[NO_MULTI]]', '[[INPUT_ONLY]]'], + excludes="[[cpuh]] or [[cpum]]", + text=r""" Only one of the three real parameters [[cpus]], [[cpum]] and [[cpuh]] can be defined in the input file to set up a CPU time limit. When the job reaches that limit, it will try to end smoothly. However, note that this might still take some time. If the user want a firm CPU time limit, the present parameter must be reduced sufficiently. Intuition about the actual margin to be taken -into account should come with experience... +into account should come with experience. A zero value has no action of the job. """, ), +Variable( + abivarname="dvdb_qcache_mb", + varset="eph", + vartype="real", + topics=['ElPhonInt_useful'], + dimensions="scalar", + defaultval=1024, + mnemonics="DVDB Q-CACHE size in Megabytes", + text=r""" +This variable activates a caching mechanism for the DFPT potentials. +The code will store in memory multiple q-points up to this size in Megabytes in order +to reduce the number of IO operations required to read the potentials from the DVDB file. + +This option leads to a **significant speedup** of calculations requiring integrations +in q-space ([[eph_task]] == 4) at the price of an increase of the memory requirements. +The speedup is important especially if the QP corrections are computed for several k-points. + +A negative value signals to the code that all the q-points in the DVDB should be stored in memory. +A zero value disables the cache. +""", +), + Variable( abivarname="d3e_pert1_atpol", varset="dfpt", @@ -1625,7 +1725,7 @@ defaultval=[1, 1], mnemonics="3rd Derivative of Energy, mixed PERTurbation 1: limits of ATomic POLarisations", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Controls the range of atoms for which displacements will be considered in non- linear computations (using the 2n+1 theorem), for the 1st perturbation. May take values from 1 to [[natom]], with **d3e_pert1_atpol** (1)<= @@ -1642,7 +1742,7 @@ defaultval=[0, 0, 0], mnemonics="3rd Derivative of Energy, mixed PERTurbation 1: DIRections", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Gives the directions to be considered in non-linear computations (using the 2n+1 theorem), for the 1st perturbation. The three elements corresponds to the three primitive vectors, either in real @@ -1660,7 +1760,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 1: ELectric FielD", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on electric field perturbation in non-linear computation, as 1st perturbation. Actually, such calculations requires first the non-self- consistent calculation of derivatives with respect to k, independently of the @@ -1677,7 +1777,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 1: PHONons", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on atomic displacement perturbation in non-linear computation, as 1st perturbation. See [[rfphon]] for additional details. """, @@ -1692,7 +1792,7 @@ defaultval=[1, 1], mnemonics="3rd Derivative of Energy, mixed PERTurbation 2: limits of ATomic POLarisations", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Controls the range of atoms for which displacements will be considered in non- linear computations (using the 2n+1 theorem), for the 2nd perturbation. May take values from 1 to [[natom]], with **d3e_pert2_atpol** (1) <= **d3e_pert2_atpol** (2). @@ -1709,7 +1809,7 @@ defaultval=[0, 0, 0], mnemonics="3rd Derivative of Energy, mixed PERTurbation 2: DIRections", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Gives the directions to be considered in non-linear computations (using the 2n+1 theorem), for the 2nd perturbation. The three elements corresponds to the three primitive vectors, either in real @@ -1727,7 +1827,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 2: ELectric FielD", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on electric field perturbation in non-linear computation, as 2nd perturbation. Actually, such calculations requires first the non-self- consistent calculation of derivatives with respect to k, independently of the @@ -1744,7 +1844,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 2: PHONons", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on atomic displacement perturbation in non-linear computation, as 2nd perturbation. See [[rfphon]] for additional details. """, @@ -1759,7 +1859,7 @@ defaultval=[1, 1], mnemonics="3rd Derivative of Energy, mixed PERTurbation 3: limits of ATomic POLarisations", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Controls the range of atoms for which displacements will be considered in non- linear computations (using the 2n+1 theorem), for the 3rd perturbation. May take values from 1 to [[natom]], with **d3e_pert3_atpol** (1)<= **d3e_pert3_atpol** (2). @@ -1776,7 +1876,7 @@ defaultval=[0, 0, 0], mnemonics="3rd Derivative of Energy, mixed PERTurbation 3: DIRections", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Gives the directions to be considered in non-linear computations (using the 2n+1 theorem), for the 3rd perturbation. The three elements corresponds to the three primitive vectors, either in real @@ -1794,7 +1894,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 3: ELectric FielD", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on electric field perturbation in non-linear computation, as 3rd perturbation. Actually, such calculations requires first the non-self- consistent calculation of derivatives with respect to k, independently of the @@ -1812,7 +1912,7 @@ defaultval=0, mnemonics="3rd Derivative of Energy, mixed PERTurbation 3: PHONons", requires="[[optdriver]] == 5 (non-linear response computations)", - text=""" + text=r""" Turns on atomic displacement perturbation in non-linear computation, as 3rd perturbation. See [[rfphon]] for additional details. """, @@ -1827,13 +1927,13 @@ defaultval=0.1, mnemonics="electric Displacement field DAMPing parameter", requires="[[berryopt]] in [6, 16]", - text=""" -In case [[berryopt]]=6, the electric field is updated after each SCF iteration -according to E_{n+1}= [[ddamp]]*(D - 4*pi*P_{n}) + (1-[[ddamp]])*E_{n} where -P_{n} and E_{n} are the polarization and electric field after nth SCF + text=r""" +In case [[berryopt]] = 6, the electric field is updated after each SCF iteration +according to $E_{n+1}=$[[ddamp]]$(D-4 \pi P_{n})+(1-$[[ddamp]]$)E_{n}$, where +$P_{n}$ and $E_{n}$ are the polarization and electric field after $n_{th}$ SCF iteration. [[ddamp]] is a damping parameter used to control the convergence speed. -In case [[berryopt]]=16, the electric field is updated after each SCF -iteration according to e_{n+1}= [[ddamp]]*(d - p_{n}) + (1-[[ddamp]])*e_{n} +In case [[berryopt]] = 16, the electric field is updated after each SCF +iteration according to $e_{n+1}=$[[ddamp]]$(d-p_{n})+(1-$[[ddamp]]$)e_{n}$. If you have difficulty getting convergence, try to reduce this value or reduce maxestep. This parameter is used in finite electric displacement field calculations (berryopt=6,16,17). @@ -1844,12 +1944,12 @@ abivarname="ddb_ngqpt", varset="eph", vartype="integer", - topics=['ElPhonInt_expert'], + topics=['ElPhonInt_basic'], dimensions=[3], defaultval=[0, 0, 0], mnemonics="Derivative DataBase: Number of Grid points for Q-PoinTs", - text=""" -This variable is mandatory when [[optdriver]]==7. It defines the number of + text=r""" +This variable is mandatory when [[optdriver]] == 7. It defines the number of divisions in the (homogeneous) q-mesh used to generate the DDB file. See also the description of the [[getddb]] input variable. """, @@ -1863,8 +1963,8 @@ dimensions=[3], defaultval=[0.0, 0.0, 0.0], mnemonics="Derivative DataBase: SHIFT of the Q-points", - text=""" -Only relevant when [[optdriver]]==7. It defines the shift in the q-mesh used + text=r""" +Only relevant when [[optdriver]] == 7. It defines the shift in the q-mesh used to generate the DDB file, which is defined by the [[ddb_ngqpt]] input variable. See [[shiftk]] for more information on the definition. """, @@ -1878,10 +1978,33 @@ dimensions="scalar", defaultval=0, mnemonics="DELAY between trials to PERMUTE atoms", - text=""" + text=r""" Delay (number of time steps) between trials to permute two atoms, in view of -accelerated search of minima. Still in development. See the routine -moldyn.F90. See also [[signperm]]. When [[delayperm]] is zero, there is not permutation trials. +accelerated search of minima. Still in development. + +See the routine moldyn.F90 and [[signperm]] for additional information. + +When [[delayperm]] is zero, there are no permutation trials. +""", +), + +Variable( + abivarname="chrgat", + varset="gstate", + vartype="real", + topics=['ConstrainedDFT_useful'], + dimensions=ValueWithConditions({'[[natrd]]<[[natom]]': '[ [[natrd]] ]', 'defaultval': '[ [[natom]] ]'}), + defaultval=0.0, + mnemonics="CHARGE of the AToms", + text=r""" +Gives the target integrated charge in case of constrained DFT calculations, see [[constraint_kind]]. +Given in atomic unit of charge (=minus the charge of the electron). +Note that this number is the net positive charge inside the sphere: one subtract from the +nucleus charge [[ziontypat]] the integrated valence electron density in a sphere defined by [[ratsph]]. +The latter has indeed a negative value. Note that if the sphere radius [[ratsph]] is not sufficiently large, +the amount of electrons will be smaller than expected based on chemical intuition. This means that there +is in this case a bias toward too positive integrated charges. By contrast, if the sphere radius is too large, +the spheres will overlap, and the electrons in the interatomic region will be double counted. """, ), @@ -1891,15 +2014,15 @@ vartype="integer", topics=['SCFAlgorithms_expert', 'MolecularDynamics_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[paral_kgb]]==1': '6', 'defaultval': 2}), + defaultval=ValueWithConditions({'[[paral_kgb]] == 1': '6', 'defaultval': 2}), mnemonics="DENSity and FORces PREDictor", characteristics=['[[DEVELOP]]'], requires="[[iscf]] > 0", text=r""" -Used when [[iscf]]>0, to define: +Used when [[iscf]] > 0, to define: -- the way a change of density is derived from a change of atomic position, -- the way forces are corrected when the SCF cycle is not converged. + - the way a change of density is derived from a change of atomic position, + - the way forces are corrected when the SCF cycle is not converged. Supported values: @@ -1907,46 +2030,50 @@ * 1 --> density not changed, forces corrected with rigid ion hypothesis (atomic charge moved with atom) * 2 --> density changed and forces corrected with rigid ion hypothesis (atomic charge moves with atom) * 3 --> density changed and forces corrected with a different implementation of the rigid ion hypothesis - * 4 --> density not changed, forces corrected with the use of Harris functional formula (*) - * 5 --> density changed using D. Alfe 2nd-order algorithm (**), forces not corrected - * 6 --> density changed using D. Alfe 2nd-order algorithm (**) and forces corrected with the use of Harris functional formula (*) + * 4 --> density not changed, forces corrected with the use of Harris functional formula (see note) + * 5 --> density changed using D. Alfe 2nd-order algorithm (see notes), forces not corrected + * 6 --> density changed using D. Alfe 2nd-order algorithm (see notes) and forces corrected with the use of Harris functional formula Similar negative values are also allowed (see the meaning later), for development purposes only. No meaning for RF calculations. For the time being, -- [[densfor_pred]]=3 must be used with [[ionmov]]=4 and [[iscf]]=5. -- [[densfor_pred]]=4, 5 or 6 must be used when band-FFT parallelism is selected. - Otherwise, use [[densfor_pred]]=2 - -**(*)** _Note concerning the correction of forces (use of [[densfor_pred]]=1, -2, 3, 4 or 6)_: -The force on the atom located at R is corrected by the addition of the following term: -_F_residual=Int[dr.V_residual.dRho_atomic/dR]_, where Rho_atomic is an atomic (spherical) density. - -- When such an atomic density (Rho_atomic) is found in the pseudopotential or -PAW file, it is used. If not, a gaussian density (defined by [[densty]] parameter) is used. -- When SCF mixing is done on the density ([[iscf]] >=10), the potential -residual (V_residual) is obtained from the density residual with the first -order formula _V_residual=dV/drho.Rho_residual_ and uses the exchange- -correlation kernel _dVxc/drho=Kxc_ whose computation is time-consuming for GGA -functionals. By default (positive values of [[densfor_pred]]), the local- -density part of the GGA exchange-correlation kernel is used (even for GGA, for -which it seems to give a reasonable accuracy). Using the full GGA exchange -correlation kernel (so, including derivatives with respect to the gradient of -the density) is always possible by giving a negative value to -[[densfor_pred]]. In case of hybrid functionals, a similar correction term is -added, although in the density mixing scheme, the related GGA kernel is used -instead of the hybrid functional kernel. - -**(**)** _Note concerning the use of [[densfor_pred]]=5 or 6 (density prediction)_: -The algorithm is described in _Computer Physics Communications **118** (1999) -31-33 _. It uses an atomic (spherical) density. When such an atomic density -is found in the pseudopotential or PAW file, it is used. If not, a gaussian -density (defined by [[densty]] parameter) is used. -Also note that, to be efficient, this algorithm requires a minimum convergence -of the SCF cycle; Typically, vres2 (or nres2) has to be small enough (10 -4 ...10 -5 ). + - [[densfor_pred]] = 3 must be used with [[ionmov]] = 4 and [[iscf]] = 5. + - [[densfor_pred]] = 4, 5 or 6 must be used when band-FFT parallelism is selected. + Otherwise, use [[densfor_pred]] = 2 + + +!!! note "concerning the correction of forces (use of [[densfor_pred]] = 1, 2, 3, 4 or 6)" + + The force on the atom located at R is corrected by the addition of the following + term: $F_{residual}=\int dr V_{residual} \frac{d \rho_{atomic}}{dR}$, + where $\rho_{atomic}$ is an atomic (spherical) density. + + - When such an atomic density ($\rho_{atomic}$) is found in the pseudopotential or + PAW file, it is used. If not, a gaussian density (defined by [[densty]] parameter) is used. + - When SCF mixing is done on the density ([[iscf]] >= 10), the potential + residual ($V_residual$) is obtained from the density residual with the first + order formula $V_{residual}=\frac{dV}{d \rho} \rho_{residual}$ + and uses the exchange-correlation kernel + $ \frac{dV_{xc}}{d\rho}=K_{xc}$ whose computation is time-consuming for GGA + functionals. By default (positive values of [[densfor_pred]]), the local- + density part of the GGA exchange-correlation kernel is used (even for GGA, for + which it seems to give a reasonable accuracy). Using the full GGA exchange + correlation kernel (so, including derivatives with respect to the gradient of + the density) is always possible by giving a negative value to + [[densfor_pred]]. In case of hybrid functionals, a similar correction term is + added, although in the density mixing scheme, the related GGA kernel is used + instead of the hybrid functional kernel. + +!!! note "concerning the use of [[densfor_pred]] = 5 or 6 (density prediction)" + + The algorithm is described in [[cite:Alfe1999]]. + It uses an atomic (spherical) density. When such an atomic density + is found in the pseudopotential or PAW file, it is used. If not, a gaussian + density (defined by [[densty]] parameter) is used. + Also note that, to be efficient, this algorithm requires a minimum convergence + of the SCF cycle; Typically, vres2 (or nres2) has to be small enough (10 -4 ...10 -5 ). """, ), @@ -1959,7 +2086,7 @@ defaultval=0.0, mnemonics="initial DENSity for each TYpe of atom", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives a rough description of the initial GS density, for each type of atom. This value is only used to create the first exchange and correlation potential, and is not used anymore afterwards. For the time being, it @@ -1978,8 +2105,8 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="Displacement FIELD", requires="[[berryopt]] == 6 and [[efield]]", - text=""" -In case [[berryopt]]=6, [[dfield]] specifies the (unreduced) finite electric + text=r""" +In case [[berryopt]] = 6, [[dfield]] specifies the (unreduced) finite electric displacement field vector, in atomic units, that is to be imposed as a constraint during the calculation. """, @@ -1994,13 +2121,13 @@ defaultval=0, mnemonics="DFPT SCISSor operator", characteristics=['[[ENERGY]]'], - text=""" + text=r""" It is the value of the "scissors operator", the shift of conduction band eigenvalues, used in response function calculations. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **ecut** has the -'[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) -Typical use is for response to electric field ([[rfelfd]]=3), but NOT for d/dk -([[rfelfd]]=2) and phonon responses. +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[ecut]] has the +'[[ENERGY]]' characteristics (1 Ha = 27.2113845 eV). +Typical use is for response to electric field ([[rfelfd]] = 3), but NOT for d/dk +([[rfelfd]] = 2) and phonon responses. """, ), @@ -2013,19 +2140,22 @@ defaultval=2.2, mnemonics="DIElectric matrix energy CUToff", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Kinetic energy cutoff that controls the number of planewaves used to represent the dielectric matrix: -(1/2)[(2 Pi)*(Gmax)] 2 =[[ecut]] for Gmax. +$(1/2) [ 2 \pi \GG_{diel,max}]^2$ =[[diecut]] with $\GG_{diel,max}$ being the maximum +length of the reciprocal space planewave wavevectors for the dielectric matrix. Can be specified in Ha (the default), Ry, eV or Kelvin, since [[diecut]] has -the '[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) -All planewaves inside this "basis sphere" centered at G=0 are included in the -basis. This is useful only when [[iprcel]]>=21, which means that a +the '[[ENERGY]]' characteristics. (1 Ha = 27.2113845 eV) +All planewaves inside this "basis sphere" centered at $\GG$=0 are included in the +basis. This is useful only when [[iprcel]] > =21, which means that a preconditioning scheme based on the dielectric matrix is used. + NOTE: a negative [[diecut]] will define the same dielectric basis sphere as the corresponding positive value, but the FFT grid will be identical to the one used for the wavefunctions. The much smaller FFT grid, used when [[diecut]] is positive, gives exactly the same results. + No meaning for RF calculations yet. """, ), @@ -2039,12 +2169,13 @@ defaultval=0.1, mnemonics="DIElectric matrix GAP", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Gives a rough estimation of the dielectric gap between the highest energy level computed in the run, and the set of bands not represented. Used to extrapolate dielectric matrix when [[iprcel]] >= 21. Can be specified in Ha (the default), Ry, eV or Kelvin, since [[diegap]] has -the '[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +the '[[ENERGY]]' characteristics. (1 Ha = 27.2113845 eV). + No meaning for RF calculations yet. """, ), @@ -2058,9 +2189,10 @@ defaultval=0.5, mnemonics="DIElectric matrix LAMbda", requires="[[iprcel]] >= 21", - text=""" + text=r""" Gives the amount of occupied states with mean energy given by the highest level computed in the run, included in the extrapolation of the dielectric matrix. + No meaning for RF calculations yet. """, ), @@ -2073,29 +2205,28 @@ dimensions="scalar", defaultval="1.0774841d0", mnemonics="model DIElectric screening LeNGth", - text=""" + characteristics=['[[LENGTH]]'], + text=r""" Used for screening length (in Bohr) of the model dielectric function, diagonal in reciprocal space. By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstrom), although Angstrom can be specified, if preferred, since [[dielng]] has the '[[LENGTH]]' characteristics. -This model dielectric function is as follows (K being a wavevector): - - - ( 1 + [[dielng]]2* K2 ) - diel(K)= ------------------------------------ - ( 1/[[diemac]] + [[dielng]]2 * K2 ) * [[diemix]] +This model dielectric function is as follows (${\bf K}$ being a wavevector): +\begin{equation} +\epsilon({\bf K}) = \frac{ 1 + [[dielng]]^2 {\bf K}^2 }{ \left( 1/[[diemac]] + [[dielng]]^2 {\bf K}^2 \right) [[diemix]] } \nonumber +\end{equation} The inverse of this model dielectric function will be applied to the residual, -to give the preconditioned change of potential. Right at K=0, diel(K) is imposed to be 1. +to give the preconditioned change of potential. Right at ${\bf K}$=0, $\epsilon({\bf K})$ is imposed to be 1. If the preconditioning were perfect, the change of potential would lead to an exceedingly fast solution of the self-consistency problem (two or three steps). The present model dielectric function is excellent for rather homogeneous unit cells. -When K->0, it tends to the macroscopic dielectric constant, eventually +When ${\bf K}$->0, it tends to the macroscopic dielectric constant, eventually divided by the mixing factor [[diemix]] (or [[diemixmag]] for magnetization). -For metals, simply put [[diemac]] to a very large value (10^6 is OK) +For metals, simply put [[diemac]] to a very large value ($10^6$ is OK) The screening length [[dielng]] governs the length scale to go from the macroscopic regime to the microscopic regime, where it is known that the dielectric function should tend to 1. It is on the order of 1 Bohr for metals @@ -2114,18 +2245,19 @@ dimensions="scalar", defaultval=1000000.0, mnemonics="model DIElectric MACroscopic constant", - text=""" + text=r""" A rough knowledge of the macroscopic dielectric constant [[diemac]] of the system is a useful help to speed-up the SCF procedure: a model dielectric function, see the keyword [[dielng]], is used for that purpose. It is especially useful for speeding up the treatment of rather homogeneous unit cells. Some hint: -The value of [[diemac]] should usually be bigger than 1.0d0, on physical grounds. -For metals, simply put [[diemac]] to a very large value (the default 10^6 is OK) -For silicon, use 12.0. A similar value is likely to work well for other semiconductors -For wider gap insulators, use 2.0 ... 4.0 -For molecules in an otherwise empty big box, try 1.5 ... 3.0 +The value of [[diemac]] should usually be bigger than 1.0, on physical grounds. + + * For metals, simply put [[diemac]] to a very large value (the default $10^6$ is OK) + * For silicon, use 12.0. A similar value is likely to work well for other semiconductors + * For wider gap insulators, use 2.0 ... 4.0 + * For molecules in an otherwise empty big box, try 1.5 ... 3.0 Systems that combine a highly polarisable part and some vacuum are rather badly treated by the model dielectric function. One has to use the @@ -2144,26 +2276,25 @@ vartype="real", topics=['SCFAlgorithms_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[usepaw]]==0 or [[iprcel]] !=0': 1.0, - '[[usepaw]]==1 or [[iprcel]]==0': 0.7, + defaultval=ValueWithConditions({'[[usepaw]] == 0 or [[iprcel]] !=0': 1.0, + '[[usepaw]] == 1 or [[iprcel]] == 0': 0.7, 'defaultval': None}), mnemonics="model DIElectric MIXing factor", requires="[[diemix]] >= 0.0 and [[diemix]] <= 1.0", - text=""" + text=r""" Gives overall factor of the preconditioned residual density/potential to be transferred in the SCF cycle. It should be between 0.0 and 1.0. If the model dielectric function were perfect, [[diemix]] should be 1.0. By -contrast, if the model dielectric function does nothing (when [[diemac]]=1.0d0 +contrast, if the model dielectric function does nothing (when [[diemac]] = 1.0 or [[dielng]] is larger than the size of the cell), [[diemix]] can be used to damp the amplifying factor inherent to the SCF loop. For molecules, a value on the order 0.5 or 0.33 is rather usual. When mod([[iscf]],10)=3, 4,5 or 7, [[diemix]] is only important at the few first iterations when anharmonic effects are important, since these schemes compute their own mixing factor for self-consistency. -Also note that a different value of diemix can be used for the magnetization -(see [[diemixmag]]). +Also note that a different value of diemix can be used for the magnetization (see [[diemixmag]]). """, ), @@ -2174,23 +2305,23 @@ topics=['spinpolarisation_useful'], dimensions="scalar", defaultval=ValueWithConditions({'70 < [[iprcel]] and [[iprcel]] < 80': '[[diemix]]', - '[[iprcel]]==0': '[[diemix]]', + '[[iprcel]] == 0': '[[diemix]]', '[[iscf]]<10': '[[diemix]]', 'defaultval': '-[[diemix]]'}), mnemonics="model DIElectric MIXing factor for the MAGgnetization", - text=""" + text=r""" Gives overall factor of the preconditioned residual magnetization/magnetic field to be transferred in the SCF cycle (see [[diemix]] for further information). -For the time being, apply only when the SCF mixing is done on the density ([[iscf]]>=10). +For the time being, apply only when the SCF mixing is done on the density ([[iscf]] > =10). -A negative value of diemixmag means that magnetization is only preconditionned -by ABS(diemixmag), without the use of any preconditionner. +A negative value of [[diemixmag]] means that magnetization is only preconditioned +by ABS([[diemixmag]]), without the use of any preconditioner. When SCF cycle has some difficulties to converge, changing the value of [[diemixmag]] can have a positive effect. -In particular [[diemixmag]]=-4 is a good choice (i.e. diemixmag=4, no other -preconditionner on magnetization). +In particular [[diemixmag]] = -4 is a good choice (i.e. [[diemixmag]] = 4, no other +preconditioner on magnetization). """, ), @@ -2202,9 +2333,9 @@ dimensions="scalar", defaultval=8, mnemonics="Direct Inversion in the Iterative Subspace MEMORY", - text=""" + text=r""" Gives the maximum number of "time" steps for which the forces and stresses are -stored, and taken into account in the DIIS algorithm ([[ionmov]]=20) to find +stored, and taken into account in the DIIS algorithm ([[ionmov]] = 20) to find zero-force and stress configurations. """, ), @@ -2217,26 +2348,26 @@ dimensions="scalar", defaultval=1.0, mnemonics="lattice DILATation: MaXimal value", - text=""" + text=r""" [[dilatmx]] is an auxiliary variable used to book additional memory (see detailed description later) for possible on-the-flight variations the plane wave basis set, due to cell optimization by ABINIT. -Usefull only when [[ionmov]]==2 and [[optcell]]/=0, that is, cell optimization. +Useful only when [[ionmov]] == 2 or 22 and [[optcell]]/=0, that is, cell optimization. -In the default mode ([[chkdilatmx]]=1), when the [[dilatmx]] threshold is exceeded, +In the default mode ([[chkdilatmx]] = 1), when the [[dilatmx]] threshold is exceeded, ABINIT will rescale uniformly the tentative new primitive vectors to a value that leads at most to 90% of the maximal allowed [[dilatmx]] deviation from 1. It will do this three times (to prevent the geometry optimization algorithms to have taken a too large trial -step), but afterwards will exit. Setting [[chkdilatmx]]==0 allows the -booking of a larger planewave basis, but will not rescale the tentative new primitive vectors -nor lead to an exit when the [[dilatmx]] treshold is exceeded. +step), but afterwards will exit. Setting [[chkdilatmx]] == 0 allows one to +book a larger planewave basis, but will not rescale the tentative new primitive vectors +nor lead to an exit when the [[dilatmx]] threshold is exceeded. The obtained optimized primitive vectors will not be exactly the ones corresponding to the planewave basis set determined using [[ecut]] at the latter primitive vectors. Still, as an intermediate step in a geometry search -this might be sufficiently accurate. In such case, [[dilatmx]] might even be let at its default value 1.0 . +this might be sufficiently accurate. In such case, [[dilatmx]] might even be let at its default value 1.0. -Detailed explanation : The memory space for the planewave basis set is defined +Detailed explanation: The memory space for the planewave basis set is defined by multiplying [[ecut]] by [[dilatmx]] squared (the result is an "effective ecut", called -internally "ecut_eff". Other uses of [[ecut]] are not modified when [[dilatmx]]>1.0. +internally "ecut_eff". Other uses of [[ecut]] are not modified when [[dilatmx]] > 1.0. Still, operations (like scalar products) are taking into account these fake non-used planewaves, thus slowing down the ABINIT execution. Using [[dilatmx]]<1.0 is equivalent to changing [[ecut]] in all its uses. This @@ -2244,14 +2375,13 @@ Setting [[dilatmx]] to a large value leads to waste of CPU time and memory. By default, ABINIT will not accept that you define [[dilatmx]] bigger than 1.15. -This behaviour will be overcome by using [[chkdilatmx]]==0 . +This behaviour will be overcome by using [[chkdilatmx]] == 0. Supposing you think that the optimized [[acell]] values might be 10% larger than your input values, use simply [[dilatmx]] 1.1. This will already lead to an increase of the number of planewaves by a factor (1.1) 3 =1.331, and a corresponding increase in CPU time and memory. It is possible to use [[dilatmx]] when [[optcell]] =0, but a value larger than 1.0 will be a waste. - """, ), @@ -2263,7 +2393,7 @@ dimensions="scalar", defaultval=1, mnemonics="DIPole-DIPole interaction", - text=""" + text=r""" This variable defines the treatment of the dipole-dipole interaction. Same meaning as the corresponding anaddb variable [[dipdip@anaddb]] """, @@ -2281,7 +2411,7 @@ defaultval=MultipleValue(number=None, value=-10.0), mnemonics="initial Density MATrix for PAW+U", requires="[[usepaw]] == 1 and [[usepawu]] == 1 and [[usedmatpu]] != 0", - text=""" + text=r""" For Ground state calculations only. Gives the value of an initial density matrix used in LDA+U and kept fixed during the first abs([[usedmatpu]]) SCF iterations. @@ -2289,56 +2419,53 @@ Restriction: In order to use dmatpawu, [[lpawu]] must be identical for all atom types (or -1). The occupation matrix is in the basis of real spherical harmonics Slm (note -that this differs from the choice made when [[prtdosm]]=1, that is in the +that this differs from the choice made when [[prtdosm]] = 1, that is in the basis of complex spherical harmonics). They are ordered by increasing m, and are defined e.g. in [[cite:Blancoa1997]]. For the case l=2 (d states), the five columns corresponds respectively to (the normalisation factor has been dropped) - * m=-2, xy - * m=-1, yz - * m=0, 3z^2-r^2 - * m=1, xz - * m=2, x^2-y^2 + * m=-2, $xy$ + * m=-1, $yz$ + * m=0, $3z^{2}-r^{2}$ + * m=1, $xz$ + * m=2, $x^{2}-y^{2}$ [[dmatpawu]] must always be given as a "spin-up" occupation matrix (and eventually a "spin-down" matrix). Be aware that its physical meaning depends on the magnetic properties imposed to the system (with [[nsppol]], [[nspinor]], [[nspden]]): - * **Non-magnetic system** ([[nsppol]]=1, [[nspinor]]=1, [[nspden]]=1): + * **Non-magnetic system** ([[nsppol]] = 1, [[nspinor]] = 1, [[nspden]] = 1): One (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrix is given for each atom on which +U is applied. It contains the "spin-up" occupations. - * **Ferromagnetic spin-polarized (collinear) system** ([[nsppol]]=2, [[nspinor]]=1, [[nspden]]=2): + * **Ferromagnetic spin-polarized (collinear) system** ([[nsppol]] = 2, [[nspinor]] = 1, [[nspden]] = 2): Two (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrices are given for each atom on which +U is applied. They contain the "spin-up" and "spin-down" occupations. - * **Anti-ferromagnetic spin-polarized (collinear) system** ([[nsppol]]=1, [[nspinor]]=1, [[nspden]]=2): -One (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrix is given for each atom on which -+U is applied. + * **Anti-ferromagnetic spin-polarized (collinear) system** ([[nsppol]] = 1, [[nspinor]] = 1, [[nspden]] = 2): +One (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrix is given for each atom on which +U is applied. It contains the "spin-up" occupations. - * **Non-collinear magnetic system** ([[nsppol]]=1, [[nspinor]]=2, [[nspden]]=4): + * **Non-collinear magnetic system** ([[nsppol]] = 1, [[nspinor]] = 2, [[nspden]] = 4): Two (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrices are given for each atom on which +U is applied. They contains the "spin-up" and "spin-down" occupations (defined as n_up=(n+|m|)/2 and n_dn=(n-|m|)/2), where m is the integrated magnetization vector). -The direction of the magnetization (which is also the direction of n_up and -n_dn) is given by [[spinat]]. +The direction of the magnetization (which is also the direction of n_up and n_dn) is given by [[spinat]]. _Warning: unlike collinear case, atoms having the same magnetization magnitude with different directions must be given the same occupation matrix; the magnetization will be oriented by the value of [[spinat]] (this is the case for antiferro-magnetism). _ - * **Non-collinear magnetic system with zero magnetization** ([[nsppol]]=1, [[nspinor]]=2, [[nspden]]=1): + * **Non-collinear magnetic system with zero magnetization** ([[nsppol]] = 1, [[nspinor]] = 2, [[nspden]] = 1): Two (2lpawu+1)x(2lpawu+1) [[dmatpawu]] matrices are given for each atom on which +U is applied. They contain the "spin-up" and "spin-down" occupations; -But, as "spin-up" and "spin-down" are constrained identical, the "spin-down" -one is ignored by the code. +But, as "spin-up" and "spin-down" are constrained identical, the "spin-down" one is ignored by the code. """, ), @@ -2350,19 +2477,19 @@ dimensions="scalar", defaultval=2, mnemonics="Density MATrix for PAW+U OPTion", - requires="[[usepaw]]==1 and [[usepawu]]==1", - text=""" + requires="[[usepaw]] == 1 and [[usepawu]] == 1", + text=r""" This option governs the way occupations of localized atomic levels are computed: - * [[dmatpuopt]]=1: atomic occupations are projections on atomic orbitals (Eq. (6) of PRB 77, 155104 (2008)). + * [[dmatpuopt]] = 1: atomic occupations are projections on atomic orbitals (Eq. (6) of [[cite:Amadon2008a]]). - * [[dmatpuopt]]=2: atomic occupations are integrated values in PAW spheres of angular-momentum-decomposed charge densities (Eq. (7) of PRB 77, 155104 (2008)). + * [[dmatpuopt]] = 2: atomic occupations are integrated values in PAW spheres of angular-momentum-decomposed charge densities (Eq. (7) of [[cite:Amadon2008a]]). - * [[dmatpuopt]]=3: only for tests + * [[dmatpuopt]] = 3: only for tests - * [[dmatpuopt]]=4: Extrapolations of occupancies outside the PAW-sphere. This Definition gives normalized operator for occupation. + * [[dmatpuopt]] = 4: Extrapolations of occupancies outside the PAW-sphere. This Definition gives normalized operator for occupation. -In the general case [[dmatpuopt]]=2 is suitable. The use of [[dmatpuopt]]=1 is +In the general case [[dmatpuopt]] = 2 is suitable. The use of [[dmatpuopt]] = 1 is restricted to PAW datasets in which the first atomic wavefunction of the correlated subspace is a normalized atomic eigenfunction. """, @@ -2376,8 +2503,8 @@ dimensions="scalar", defaultval=0, mnemonics="Density MATrix for paw+U, DIAGonalization", - requires="[[usepaw]]==1 and [[usepawu]]==1 and [[nspden]] != 4", - text=""" + requires="[[usepaw]] == 1 and [[usepawu]] == 1 and [[nspden]] != 4", + text=r""" Relevant only for Ground-State calculations. This option can be used to diagonalize the occupation matrix Nocc_{m,m_prime}. Relevant values are: @@ -2389,6 +2516,19 @@ """, ), +Variable( + abivarname="dmft_charge_prec", + varset="dmft", + vartype="real", + topics=['DMFT_expert'], + dimensions="scalar", + defaultval=1, + mnemonics="Dynamical Mean Field Theory: charge density precision", + text=r""" +Precision to achieve in determining the charge density in the computation of the fermi level. +""", +), + Variable( abivarname="dmft_dc", varset="dmft", @@ -2396,9 +2536,9 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=1, - mnemonics="Dynamical Mean Fied Theory: Double Counting", + mnemonics="Dynamical Mean Field Theory: Double Counting", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Value of double counting used for DMFT. Only value 1 is activated for the moment and is the FLL double counting. @@ -2412,12 +2552,12 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: ENTROPY", - requires="[[usedmft]]==1 and [[dmft_solv]]==5", - text=""" -If 1, enable the calculation of the entropy within the DMFT framework and so -allows the calculation of the total energy (free energy). In the current -implementation, this is only possible with [[dmft_solv]]=5 (Continuous Time + mnemonics="Dynamical Mean Field Theory: ENTROPY", + requires="[[usedmft]] == 1 and [[dmft_solv]] == 5", + text=r""" +If 1, enables the calculation of the entropy within the DMFT framework and so +allows one the calculation of the total energy (free energy). In the current +implementation, this is only possible with [[dmft_solv]] = 5 (Continuous Time Quantum Monte Carlo). See also the input variable [[dmft_nlambda]]. """, ), @@ -2429,9 +2569,9 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: number of ITERation", + mnemonics="Dynamical Mean Field Theory: number of ITERation", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Number of iterations for the DMFT inner loop. """, ), @@ -2443,10 +2583,10 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=0.3, - mnemonics="Dynamical Mean Fied Theory: MiXing parameter for the SelF energy", + mnemonics="Dynamical Mean Field Theory: MiXing parameter for the SelF energy", characteristics=['[[DEVELOP]]'], - text=""" -Mixing parameter for the simple mixing of the self-energy. + text=r""" +Mixing parameter for the simple mixing of the self-energy (should be between 0.3 and 0.8). """, ), @@ -2457,12 +2597,12 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=6, - mnemonics="Dynamical Mean Fied Theory: Number of LAMBDA points", + mnemonics="Dynamical Mean Field Theory: Number of LAMBDA points", characteristics=['[[DEVELOP]]'], - requires="[[usedmft]]==1 and [[dmft_entropy]]==1", - text=""" + requires="[[usedmft]] == 1 and [[dmft_entropy]] == 1", + text=r""" [[dmft_nlambda]] gives the number of integration points for the -thermodynamical integration in case of free energy calculation within DMFT. +thermodynamic integration in case of free energy calculation within DMFT. Its value must be greater or equal to 3. """, ), @@ -2474,9 +2614,9 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Number of frequency omega (W) in the LInear mesh", + mnemonics="Dynamical Mean Field Theory: Number of frequency omega (W) in the LInear mesh", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Number of Matsubara frequencies (linear mesh) """, ), @@ -2488,13 +2628,27 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Number of frequency omega (W) in the LOg mesh", + mnemonics="Dynamical Mean Field Theory: Number of frequency omega (W) in the LOg mesh", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Number of frequencies in the log mesh. """, ), +Variable( + abivarname="dmft_occnd_imag", + varset="dmft", + vartype="integer", + topics=['DMFT_expert'], + dimensions="scalar", + defaultval=1, + mnemonics="Dynamical Mean Field Theory: Occupation non-diagonal imaginary part", + characteristics=['[[DEVELOP]]'], + text=r""" +When 0 force non-diagonal occupations imaginary parts to be null. Do not use this, it is only for compatibility with old tests. +""", +), + Variable( abivarname="dmft_read_occnd", varset="dev", @@ -2502,9 +2656,9 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: READ OCCupations (Non Diagonal)", + mnemonics="Dynamical Mean Field Theory: READ OCCupations (Non Diagonal)", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Flag to read/write Occupations as computed in DMFT. This flag is useful to restart a DFT+DMFT calculation with self-consistency over electronic density. The occupations are written each time a DMFT loop is finished. So if the @@ -2517,7 +2671,7 @@ * 2 --> Occupations are read from O_DMFTOCCND, where O is the root for output files. An alternative and more simple way to restart a DFT+DMFT calculation is to use -the density file (obtained with [[prtden]]=1 or [[prtden]]=-1) and the self-energy (see [[dmft_rslf]]). +the density file (obtained with [[prtden]] = 1 or [[prtden]] = -1) and the self-energy (see [[dmft_rslf]]). """, ), @@ -2528,10 +2682,11 @@ topics=['DMFT_basic'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Read SeLF energy", + mnemonics="Dynamical Mean Field Theory: Read SeLF energy", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Flag to read/write Self-Energy. If put to one, self-energy is written and read at each DFT iteration. +If self-energy file is missing, the self-energy is initialized to the double counting at the first iteration. """, ), @@ -2542,9 +2697,9 @@ topics=['DMFT_basic'], dimensions="scalar", defaultval=5, - mnemonics="Dynamical Mean Fied Theory: choice of SOLVer", + mnemonics="Dynamical Mean Field Theory: choice of SOLVer", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Choice of solver for the Impurity model. * 0 --> No solver and U=0, J=0 (see [[upawu]] and [[jpawu]]). @@ -2553,22 +2708,17 @@ * 5 --> Use the Continuous Time Quantum Monte Carlo (CTQMC) solver CT-Hyb of ABINIT in the density density representation, CTQMC calculations are much more time consuming that Hubbard I calculations. Nevertheless, the calculation is fully parallelised. * 6 --> Continuous Time Quantum Monte Carlo (CTQMC) solver CT-Hyb of TRIQS in the density density representation. * 7 --> Continuous Time Quantum Monte Carlo (CTQMC) solver CT-Hyb of TRIQS with the rotationally invariant formulation. + * 9 --> Python invocation. Give a symbolic link to your python interpreter as an input like 'input-tag'_TRIQS_python_lib and the python script as an input like 'input-tag'_TRIQS_script.py. The inputs for the script will be written in dft_for_triqs.nc and the output as triqs_for_dft.nc. -The CT Hyb algorithm is described in [ Phys. Rev. Lett 97, 076405, (2006) -](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.97.076405). For a +The CT Hyb algorithm is described in [[cite:Werner2006]]. For a discussion of density-density approximation with respect with the -rotationnally invariant formulation, see e.g. [ Phys. Rev. B 86, 155107 (2012) -](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.86.155107). -The ABINIT/CT Hyb implementation is discussed in [ -http://dx.doi.org/10.1016/j.cpc.2016.04.003 -](http://dx.doi.org/10.1016/j.cpc.2016.04.003). -The TRIQS/CT Hyb implementation is described in [ Comp. Phys. Comm. 200, 274 -(2016) ](http://dx.doi.org/10.1016/j.cpc.2015.10.023). Before using it, it has -to be installed following instructions available [here](https://triqs.ipht.cnrs.fr/1.x/install.html). -Starting from release 8.6.0, the -interface is valid only for TRIQS 1.4 and TRIQS/CTHYB 1.4. An example of a -config.ac file to compile ABINIT with TRIQS can be found in -~/doc/build/config-examples/ubu_gnu_4.9_triqs.ac. +rotationnally invariant formulation, see e.g. [[cite:Antipov2012]]. +The ABINIT/CT Hyb implementation is discussed in [[cite:Gonze2016]]. +The TRIQS/CT Hyb implementation is described in [[cite:Seth2016]]. +Before using it, it has to be installed following instructions available [here](https://triqs.github.io/triqs/2.1.x). +Until release 8.10 included, the +interface was valid only for TRIQS 1.4 and TRIQS/CTHYB 1.4. It has then been upgraded to TRIQS 2.1 afterwards. +An example of a config.ac file to compile ABINIT with TRIQS can be found in [[ac:higgs_gnu_7.3_triqs2.ac]]. See the useful variables for CT-QMC solver: [[dmftctqmc_basis]], [[dmftctqmc_check]], [[dmftctqmc_correl]], [[dmftctqmc_gmove]], [[dmftctqmc_grnns]], [[dmftctqmc_meas]], [[dmftctqmc_mrka]], @@ -2584,12 +2734,12 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: t2g orbitals", + mnemonics="Dynamical Mean Field Theory: t2g orbitals", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Can be set to 1 only if in cubic symmetry. It enables one to carry a DFT+DMFT -calculations only on t2g orbitals. +calculations only on _t2g_ orbitals. """, ), @@ -2600,9 +2750,9 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0.0001, - mnemonics="Dynamical Mean Fied Theory: TOLerance on DFT correlated electron occupation matrix for the definition of the FREQuency grid", + mnemonics="Dynamical Mean Field Theory: TOLerance on DFT correlated electron occupation matrix for the definition of the FREQuency grid", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" The LDA occupation matrix for correlated electrons can be computed directly. It can be compared to the calculation of the same quantity using LDA Green's @@ -2620,9 +2770,9 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=1e-05, - mnemonics="Dynamical Mean Fied Theory: TOLerance on Local Charge for convergence of the DMFT loop", + mnemonics="Dynamical Mean Field Theory: TOLerance on Local Charge for convergence of the DMFT loop", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Tolerance for the variation of Local Charge during iterations of the DMFT Loop. The default value is good for fast calculations. However, to obtain good convergence of the DFT Loop, the DMFT Loop needs a better convergence criterion. @@ -2638,11 +2788,10 @@ defaultval=0, mnemonics="Dynamical Mean Field Theory: BAND: Final", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" [[dmftbandf]] is the last band taken into account in the Projected Local Orbitals scheme of DFT+DMFT. With [[dmftbandi]], they define the energy window -used to define Wannier Functions. (see Amadon, B., Lechermann, F., Georges, -A., Jollet, F., Wehling, T. O., and Lichtenstein, A. I. Phys. Rev. B 77(20), (2008).) +used to define Wannier Functions (see [[cite:Amadon2008]]). """, ), @@ -2655,11 +2804,10 @@ defaultval=0, mnemonics="Dynamical Mean Field Theory: BAND: Initial", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" [[dmftbandi]] is the first band taken into account in the Projected Local Orbitals scheme of LDA+DMFT. With [[dmftbandf]], they define the energy window -used to define Wannier Functions. (see Amadon, B., Lechermann, F., Georges, -A., Jollet, F., Wehling, T. O., and Lichtenstein, A. I. Phys. Rev. B 77(20), (2008).) +used to define Wannier Functions (see [[cite:Amadon2008]]). """, ), @@ -2670,10 +2818,10 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: CHECKs", + mnemonics="Dynamical Mean Field Theory: CHECKs", characteristics=['[[DEVELOP]]'], - text=""" -Only for developer purposes. (Introduced by B. Amadon, v6.1.0) + text=r""" +Only for developer purposes. """, ), @@ -2684,15 +2832,19 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=1, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo BASIS", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo BASIS", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Choose the basis to perform CTQMC calculation. - * 0 --> Use the local basis in the spherical harmonics basis. Can be useful if the Hamiltonian has weak off diagonal terms and for this reason, one want to keep the original basis for simplicity and for physical insight. - * 1 --> Default value, diagonalize the local Hamiltonian (but only if it is not diagonal). The best choice in general. - * 2 --> Diagonalise the local correlated occupation matrix. Can lead to non diagonal Hamiltonian that cannot be handled by CTQMC. This option should be thus avoided. + * 0 --> Use the local basis in the spherical harmonics basis. + Can be useful if the Hamiltonian has weak off diagonal terms and for this reason, + one want to keep the original basis for simplicity and for physical insight. + * 1 --> Default value, diagonalize the local Hamiltonian (but only if it is not diagonal). + The best choice in general. + * 2 --> Diagonalise the local correlated occupation matrix. Can lead to non + diagonal Hamiltonian that cannot be handled by CTQMC. This option should be thus avoided. """, ), @@ -2703,10 +2855,10 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo CHECK", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo CHECK", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Check the fast calculations during the Monte Carlo simulation with very slow but robust methods. Should only be used for debugging. @@ -2724,10 +2876,10 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo CORRELations", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo CORRELations", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Flag to compute statistics about segments and anti-segments during the simulation. Slow down the simulation. @@ -2743,10 +2895,10 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo Global MOVEs", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo Global MOVEs", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Default is no global moves. The value of this variable is the modulo used to try a global move. A value of 5000 means that a global move is tried every 5000 Monte Carlo sweep. """, @@ -2759,10 +2911,10 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo GReeNs NoiSe", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo GReeNs NoiSe", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Compute the statistical noise for each time slice of each green function. This is a good approximation only if there is enough Monte Carlo sweeps per cpu. @@ -2778,10 +2930,10 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=1, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo MEASurements", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo MEASurements", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" The modulo used to measure the interaction energy and the number of electrons. Example: 2 means the measure is perform every two sweeps. """, @@ -2794,10 +2946,10 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo MOVie", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo MOVie", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Print a latex file per cpu displaying the full simulation. This option should only be use with very small number (<1000) of Monte Carlo sweeps since it requires a lot of I/O band width. @@ -2814,10 +2966,10 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo MARKov Analysis", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo MARKov Analysis", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Measure the time evolution of the number of electrons for each orbital and perform a fourier transform. The result can be plotted using the "Markov_id.dat" file @@ -2833,10 +2985,10 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo perturbation ORDER", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo perturbation ORDER", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]]==5", - text=""" + requires="[[dmft_solv]] == 5", + text=r""" Print a file containing the statistic distribution of the number of segments per orbital. The maximal order taken into account [[dmftctqmc_order]]: 50 means that we have the statistic distribution from 0 to 50 segments. The @@ -2851,15 +3003,14 @@ topics=['DMFT_expert'], dimensions="scalar", defaultval=30, - mnemonics="Dynamical Mean Fied Theory: Continuous Time Quantum Monte Carlo perturbation of TRIQS, Number of LEGendre polynomials", + mnemonics="Dynamical Mean Field Theory: Continuous Time Quantum Monte Carlo perturbation of TRIQS, Number of LEGendre polynomials", characteristics=['[[DEVELOP]]'], requires="[[dmft_solv]] in [6, 7]", - text=""" + text=r""" Specify the number of Legendre polynomials used for the calculation of Green's function in CTQMC code from the library TRIQS. Default is 30. The value of coefficients are given in file whose name ending is -"Legendre_coefficient.dat". -(see also [Phys. Rev. B 84, 075145 (2010))](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.84.075145) +"Legendre_coefficient.dat" (see also [[cite:Boehnke2011]]). """, ), @@ -2870,10 +3021,10 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=0, - mnemonics="Dynamical Mean Fied Theory: Quantum Monte Carlo time sLices", + mnemonics="Dynamical Mean Field Theory: Quantum Monte Carlo time sLices", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]] >= 4", - text=""" + requires="[[dmft_solv]] >= 5", + text=r""" Number of time slices used to represent the time green function. This value should be carefully chosen according to Niquist frequency and the [[tsmear]] value. """, @@ -2886,11 +3037,11 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=0.0, - mnemonics="Dynamical Mean Fied Theory: Quantum Monte Carlo Number of sweeps", + mnemonics="Dynamical Mean Field Theory: Quantum Monte Carlo Number of sweeps", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]] >= 4", - text=""" -Number of Monte Carlo sweeps. Should be at least 10^6. + requires="[[dmft_solv]] >= 5", + text=r""" +Number of Monte Carlo sweeps. Should be at least 106<\sup>. """, ), @@ -2901,13 +3052,13 @@ topics=['DMFT_useful'], dimensions="scalar", defaultval="[[jdtset]]", - mnemonics="Dynamical Mean Fied Theory: Quantum Monte Carlo SEED", + mnemonics="Dynamical Mean Field Theory: Quantum Monte Carlo SEED", characteristics=['[[DEVELOP]]'], - requires="[[dmft_solv]] >= 4", - text=""" -Seed to initilize the random number generator. + requires="[[dmft_solv]] >= 5", + text=r""" +Seed to initialize the random number generator. Should not be relevant except for testing purpose. -NOTE: If the CT-QMC ([[dmft_solv]]=5) is used on many CPUs, each CPU +NOTE: If the CT-QMC ([[dmft_solv]] = 5) is used on many CPUs, each CPU initializes its random number generator with dmftqmc_seed+rank where rank is the rank of the cpu in the MPI communicator. """, @@ -2920,10 +3071,10 @@ topics=['DMFT_compulsory'], dimensions="scalar", defaultval=1000, - mnemonics="Dynamical Mean Fied Theory: Quantum Monte Carlo THERMalization", + mnemonics="Dynamical Mean Field Theory: Quantum Monte Carlo THERMalization", characteristics=['[[DEVELOP]]'], requires="[[dmft_solv]] == 5", - text=""" + text=r""" Number of Monte Carlo sweeps for the thermalization """, ), @@ -2937,14 +3088,14 @@ defaultval=0.0, mnemonics="DOS DELTA in Energy", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Defines the linear grid resolution (energy increment) to be used for the computation of the Density-Of-States, when [[prtdos]] is non-zero. If [[dosdeltae]] is set to zero (the default value), the actual increment is -0.001 Ha if [[prtdos]]=1, and the much smaller value 0.00005 Ha if -[[prtdos]]=2. This different default value arises because the [[prtdos]]=1 +0.001 Ha if [[prtdos]] = 1, and the much smaller value 0.00005 Ha if +[[prtdos]] = 2. This different default value arises because the [[prtdos]] = 1 case, based on a smearing technique, gives a quite smooth DOS, while the DOS -from the tetrahedron method, [[prtdos]]=2, is rapidly varying. +from the tetrahedron method, [[prtdos]] = 2, is rapidly varying. """, ), @@ -2952,12 +3103,12 @@ abivarname="dtion", varset="rlx", vartype="real", - topics=['PIMD_compulsory', 'MolecularDynamics_compulsory'], + topics=['PIMD_compulsory', 'MolecularDynamics_compulsory', "GeoOpt_compulsory"], dimensions="scalar", defaultval=100, mnemonics="Delta Time for IONs", - text=""" -Used for controlling ion time steps. If [[ionmov]] is set to 1, 6 or 7, then + text=r""" +Used for controlling ion time steps. If [[ionmov]] is set to 1, 6, 7 and 15, then molecular dynamics is used to update atomic positions in response to forces. The parameter [[dtion]] is a time step in atomic units of time. (One atomic time unit is 2.418884e-17 seconds, which is the value of Planck's constant in @@ -2972,8 +3123,10 @@ A typical good value for [[dtion]] is about 100. The user must try several values for [[dtion]] in order to establish the stable and efficient choice for the accompanying amu, atom types and positions, and [[vis]] (viscosity). -For quenched dynamics ([[ionmov]]=7), a larger time step might be taken, for +For quenched dynamics ([[ionmov]] = 7), a larger time step might be taken, for example 200. No meaning for RF calculations. +It is also used in geometric relaxation calculation with the FIRE algorithm +([[ionmov]]=15), where the time is virtual. A small dtion should be set, for example 0.03. """, ), @@ -2984,13 +3137,13 @@ topics=['PIMD_expert', 'TransPath_expert'], dimensions=['[[nimage]]'], defaultval=MultipleValue(number=None, value=1), - mnemonics="DYNamics of the IMAGE", + mnemonics="list of DYNamic IMAGEs", commentdefault="if [[imgmov]] in [2,5] (String Method, NEB), dynimage(1)=0 and dynimage([[nimage]])=0.", - text=""" + text=r""" This input variable is relevant when sets of images are activated (see [[imgmov]]). Not all images might be required to evolve from one time step to the other. Indeed, in the String Method or the Nudged Elastic Band, one might -impose that the extremal configurations of the string are fixed. In case the +impose that the extremal configurations of the string are fixed. In case [[dynimage]](iimage)=0, the image with index "iimage" will be consider as fixed. Thus, there is no need to compute forces and stresses for this image at each time step. The purpose of defining extremal images is to make the input/output easier. @@ -3008,13 +3161,15 @@ dimensions="scalar", mnemonics="Energy CUToff", characteristics=['[[ENERGY]]'], - text=""" -Used for kinetic energy cutoff which controls number of planewaves at given k point by: -(1/2)[(2 Pi)*(k+Gmax)] 2 =[[ecut]] for Gmax. + text=r""" +Used to define the kinetic energy cutoff which controls the number of planewaves at given k point. The allowed +plane waves are those with kinetic energy lower than [[ecut]], which translates to the following constraint +on the planewave vector $\vec{G}$ in reciprocal space +$\frac{1}{2}(2\pi)^2 (\vec{k}+\vec{G})^2<$[[ecut]]. All planewaves inside this "basis sphere" centered at k are included in the basis (except if [[dilatmx]] is defined). Can be specified in Ha (the default), Ry, eV or Kelvin, since [[ecut]] has the -'[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +'[[ENERGY]]' characteristics. (1 Ha = 27.2113845 eV) This is the single parameter which can have an enormous effect on the quality of a calculation; basically the larger [[ecut]] is, the better converged the calculation is. For fixed geometry, the total energy MUST always decrease as @@ -3069,7 +3224,7 @@ mnemonics="Energy CUT-off for SIGma eXchange", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 4", - text=""" + text=r""" [[ecutsigx]] determines the cut-off energy of the planewave set used to generate the exchange part of the self-energy operator. For norm-conserving calculations, it is pointless to have [[ecutsigx]] bigger than 4*[[ecut]], @@ -3088,7 +3243,7 @@ defaultval=0.0, mnemonics="Energy CUToff SMearing", characteristics=['[[ENERGY]]'], - text=""" + text=r""" This input variable is important when performing relaxation of unit cell size and shape (non-zero [[optcell]]). Using a non-zero [[ecutsm]], the total energy curves as a function of [[ecut]], or [[acell]], can be smoothed, @@ -3099,18 +3254,18 @@ thing to do), use a very small [[ecutsm]], on the order of one microHartree. Technical information: -See Bernasconi et al, J. Phys. Chem. Solids 56, 501 (1995) for a related method. -[[ecutsm]] allows to define an effective kinetic energy for plane waves, close -to, but lower than the maximal kinetic energy [[ecut]]. For kinetic energies +See Appendix B of [[cite:Laflamme2016]]. +[[ecutsm]] allows one to define an effective kinetic energy for plane waves, close +to, but lower than, the maximal kinetic energy [[ecut]]. For kinetic energies less than [[ecut]]-[[ecutsm]], nothing is modified, while between -[[ecut]]-[[ecutsm]] and [[ecut]], the kinetic energy is multiplied by: -1.0 / ( x 2 (3+x-6x 2 +3x 3 )) -where x = ([[ecut]] - kinetic_energy)/[[ecutsm]] -Note that x 2 ( 3+x-6x 2 +3x 3 ) is 0 at x=0, with vanishing derivative, +[[ecut]]-[[ecutsm]] and [[ecut]], the kinetic energy is multiplied by +$1.0 / ( x^2(3+x-6x^2+3x^3 ))$, +where x = ([[ecut]] - kinetic_energy)/[[ecutsm]]. +Note that $x^2(3+x-6x^2+3x^3)$ is 0 at x=0, with vanishing derivative, and that at x=1, it is 1, with also vanishing derivative. If [[ecutsm]] is zero, the unmodified kinetic energy is used. [[ecutsm]] can be specified in Ha (the default), Ry, eV or Kelvin, since -[[ecutsm]] has the '[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV). +[[ecutsm]] has the '[[ENERGY]]' characteristics. (1 Ha = 27.2113845 eV). A few test for Silicon (diamond structure, 2 k-points) have shown 0.5 Ha to be largely enough for [[ecut]] between 2Ha and 6Ha, to get smooth curves. It is likely that this value is OK as soon as [[ecut]] is larger than 4Ha. @@ -3130,12 +3285,12 @@ text=r""" [[ecutwfn]] determines the cut-off energy of the planewave set used to represent the wavefunctions in the formula that generates the independent- -particle susceptibility $\chi^{0}_{KS}$ (for [[optdriver]]=3), or the self- -energy (for [[optdriver]]=4). +particle susceptibility $\chi^{0}_{KS}$ (for [[optdriver]] = 3), or the self- +energy (for [[optdriver]] = 4). Usually, [[ecutwfn]] is smaller than [[ecut]], so that the wavefunctions are filtered, and some components are ignored. As a side effect, the wavefunctions are no more normalized, and also, no more orthogonal. Also, the set of plane -waves can be much smaller for [[optdriver]]=3, than for [[optdriver]]=4, +waves can be much smaller for [[optdriver]] = 3, than for [[optdriver]] = 4, although a convergence study is needed to choose correctly both values. The size of this set of planewaves is [[npwwfn]]. @@ -3151,8 +3306,8 @@ defaultval=1, mnemonics="EFFective MASS for the FREE electron", characteristics=['[[DEVELOP]]'], - text=""" -This parameter allows to change the free electron mass, with respect to its experimental value. + text=r""" +This parameter allows one to change the free electron mass, with respect to its experimental value. The electron mass is simply changed in the Schrodinger equation. Only for testing purposes, of course. """, @@ -3167,25 +3322,27 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="Electric FIELD", requires="[[berryopt]] in [4, 6]", - text=""" -In case [[berryopt]]=4, a finite electric field calculation is performed. The + text=r""" +In case [[berryopt]] = 4, a finite electric field calculation is performed. The value of this electric field, and its direction is determined by [[efield]]. It must be given in atomic units (1 a.u. of electric field= 514220624373.482 V/m, see note below), in cartesian coordinates. References for the calculation under electric field (based on multi k point Berry phase): - * Nunes and Vanderbilt, PRL 73, 712 (1994): real-space version of the finite-field Hamiltonian - * Nunes and Gonze, PRB 63, 155107 (2001): reciprocal-space version of the finite-field Hamiltonian (the one presently implemented), and extensive theoretical analysis - * Souza, Iniguez and Vanderbilt, PRL 89, 117602 (2003): implementation of the finite-field Hamiltonian (reciprocal-space version) - * Zwanziger, Galbraith, Kipouros, Torrent, Giantomassi and Gonze, Comp. Mater. Sci. 58, 113 (2012): extension to PAW formalism + * [[cite:Nunes1994]]: real-space version of the finite-field Hamiltonian + * [[cite:Nunes2001]]: reciprocal-space version of the finite-field Hamiltonian (the one presently implemented), and extensive theoretical analysis + * [[cite:Souza2002]]: implementation of the finite-field Hamiltonian (reciprocal-space version) + * [[cite:Zwanziger2012]]: extension to PAW formalism + +See also [[cite:Umari2003]]. -See also Umari, Gonze, Pasquarello, PRL 90, 027401 (2003). +!!! note -The atomic unit of electric field strength is: e_Cb/(4 pi eps0 a0**2), where -e_Cb is the electronic charge in Coulomb (1.60217653e-19), eps0 is the -electric constant (8.854187817d-12 F/m), and a0 is the Bohr radius in meter -(0.5291772108e-10). + The atomic unit of electric field strength is: $\\frac{e_{Cb}}{4\pi\\varepsilon_0a_0^2}$, where + $e_{Cb}$ is the electronic charge in Coulomb (1.60217653$^{-19}$), $\\varepsilon_0$ is the + electric constant (8.854187817d-12 F/m), and $a_0$ is the Bohr radius in meter + (0.5291772108$^{-10}$). """, ), @@ -3193,23 +3350,24 @@ abivarname="efmas", varset="dfpt", vartype="integer", - topics=['EffMass_compulsory'], + topics=['EffectiveMass_compulsory'], dimensions="scalar", defaultval=0, mnemonics="EFfective MASs", - text=""" + text=r""" Turns on effective mass tensor calculations. Such calculations requires the non-self-consistent calculation of derivatives with respect to k, in the same -dataset. It must therefore be used with [[rfelfd]]=2 (or 1). +dataset. It must therefore be used with [[rfelfd]] = 2 (or 1). * 0 --> no effective mass tensor calculation * 1 --> effective mass tensor calculation -At the present time, both norm-conserving (NC) and PAW calculations are -supported. Also, for PAW calculations only, [[nspinor]]==2 and -[[pawspnorb]]==1 (i.e. spin-orbit (SO) calculations) is supported. NC SO -calculations are NOT currently supported. Also, for both NC and PAW, -[[nspden]]/=1 and [[nsppol]]/=1 are NOT supported. +!!! note + At the present time, both norm-conserving (NC) and PAW calculations are + supported. Also, for PAW calculations only, [[nspinor]] == 2 and + [[pawspnorb]] == 1 (i.e. spin-orbit (SO) calculations) is supported. NC SO + calculations are NOT currently supported. Also, for both NC and PAW, + [[nspden]]/=1 and [[nsppol]]/=1 are NOT supported. """, ), @@ -3217,12 +3375,12 @@ abivarname="efmas_bands", varset="dfpt", vartype="integer", - topics=['EffMass_useful'], + topics=['EffectiveMass_useful'], dimensions=[2, '[[nkpt]]'], defaultval="The full range of band available in the calculation for each k-point.", mnemonics="EFfective MASs, BANDS to be treated.", requires="[[efmas]] == 1", - text=""" + text=r""" This variable controls the range of bands for which the effective mass is to be calculated. If a band is degenerate, all other bands of the degenerate group will automatically be treated, even if they were not part of the user specified range. @@ -3233,12 +3391,12 @@ abivarname="efmas_calc_dirs", varset="dfpt", vartype="integer", - topics=['EffMass_useful'], + topics=['EffectiveMass_useful'], dimensions="scalar", defaultval=0, mnemonics="EFfective MASs, CALCulate along DIRectionS", requires="[[efmas]] == 1", - text=""" + text=r""" Allows the user to calculate the scalar effective mass of all bands specified by [[efmas_bands]] along specific directions in reciprocal space. This is particularly useful when considering degenerate bands, which are usually @@ -3246,13 +3404,12 @@ expressed as a tensor. This allows the user to see the more complex angular behavior of effective masses in these cases, for instance. -When [[efmas_calc_dirs]]==0, no directions are read from the input file (using -[[efmas_dirs]]) and the effective masses along the 3 cartesian directions are -output by default. +When [[efmas_calc_dirs]] == 0, no directions are read from the input file (using +[[efmas_dirs]]) and the effective masses along the 3 cartesian directions are output by default. -When [[efmas_calc_dirs]]==1, 2 or 3, [[efmas_n_dirs]] directions are read from -[[efmas_dirs]], assuming cartesian, reduced or angular (theta,phi) -coordinates, respectively. In the case [[efmas_calc_dirs]]==3, 2 real values +When [[efmas_calc_dirs]] == 1, 2 or 3, [[efmas_n_dirs]] directions are read from +[[efmas_dirs]], assuming cartesian, reduced or angular ($\\theta$,$\phi$) +coordinates, respectively. In the case [[efmas_calc_dirs]] == 3, 2 real values per directions are read, whereas 3 real values are read in the two other cases. """, ), @@ -3261,15 +3418,17 @@ abivarname="efmas_deg", varset="dfpt", vartype="integer", - topics=['EffMass_useful'], + topics=['EffectiveMass_expert'], dimensions="scalar", defaultval=1, mnemonics="EFfective MASs, activate DEGenerate formalism", requires="[[efmas]] > 0", - text=""" -Activate (==1) or not (==0) the treatment of degenerate bands (within a -criterion [[efmas_deg_tol]]). Also computed the transport equivalent effective mass -(see [[cite:Mecholsky2014]]). + text=r""" +Activate (==1) or not (==0) the treatment of degenerate bands +(criterion [[efmas_deg_tol]] is used to determine whether bands are degenerate). +Also compute the transport equivalent effective mass (see [[cite:Mecholsky2014]]). + +[[efmas]] = 0 should only be used for testing purposes. """, ), @@ -3277,14 +3436,14 @@ abivarname="efmas_deg_tol", varset="dfpt", vartype="real", - topics=['EffMass_useful'], + topics=['EffectiveMass_useful'], dimensions="scalar", defaultval=1e-05, mnemonics="EFfective MASs, DEGeneracy TOLerance", requires="[[efmas_deg]] == 1", - text=""" + text=r""" Energy difference below which 2 bands are considered degenerate (and treated -using the formalism activated with [[efmas_deg]]==1). [[efmas_deg_tol]] has +using the formalism activated with [[efmas_deg]] == 1). [[efmas_deg_tol]] has the '[[ENERGY]]' characteristics. """, ), @@ -3293,12 +3452,12 @@ abivarname="efmas_dim", varset="dfpt", vartype="integer", - topics=['EffMass_useful'], + topics=['EffectiveMass_useful'], dimensions="scalar", defaultval=3, mnemonics="EFfective MASs, DIMension of the effective mass tensor", requires="[[efmas]] == 1", - text=""" + text=r""" For 2D or 1D systems, the band dispersion goes to 0 perpendicular to the system, which causes the inverse effective mass to be singular, i.e. the effective mass to be NaN. This keyword circumvents the problem by eliminating @@ -3310,7 +3469,7 @@ equivalent' effective mass does not determine the scale of the transport tensors (conductivity and others). Therefore, for this specific case, the factor by which these transport tensors should be scaled once determined from -the 'transport equivatlent' effective mass tensor is output separately on the +the 'transport equivalent' effective mass tensor is output separately on the line immediately after the effective mass. """, ), @@ -3319,15 +3478,15 @@ abivarname="efmas_dirs", varset="dfpt", vartype="real", - topics=['EffMass_basic'], + topics=['EffectiveMass_basic'], dimensions=['3 or 2', '[[efmas_n_dirs]]'], defaultval=0, mnemonics="EFfective MASs, DIRectionS to be calculated", requires="[[efmas_calc_dirs]] > 0", - text=""" + text=r""" List of [[efmas_n_dirs]] directions to be considered according to the value of [[efmas_calc_dirs]]. The directions are specified by 3 real values if -[[efmas_calc_dirs]]==1 or 2 and by 2 real values if [[efmas_calc_dirs]]==3. +[[efmas_calc_dirs]] == 1 or 2 and by 2 real values if [[efmas_calc_dirs]] == 3. """, ), @@ -3335,12 +3494,12 @@ abivarname="efmas_n_dirs", varset="dfpt", vartype="integer", - topics=['EffMass_basic'], + topics=['EffectiveMass_basic'], dimensions="scalar", defaultval=0, mnemonics="EFfective MASs, Number of DIRectionS", requires="[[efmas_calc_dirs]] > 0", - text=""" + text=r""" Number of directions in [[efmas_dirs]], to be considered according to [[efmas_calc_dirs]]. """, ), @@ -3349,18 +3508,18 @@ abivarname="efmas_ntheta", varset="dfpt", vartype="integer", - topics=['EffMass_basic'], + topics=['EffectiveMass_basic'], dimensions="scalar", defaultval=1000, mnemonics="EFfective MASs, Number of points for integration w/r to THETA", requires="[[efmas]] == 1 and [[efmas_bands]] == (degenerate band index)", - text=""" + text=r""" When a band is degenerate, the usual definition of effective mass becomes invalid. However, it is still possible to define a 'transport equivalent mass tensor' that reproduces the contribution of the band to the conductivity tensor. To obtain this tensor, an integration over the solid sphere is required. The angular variables are sampled using [[efmas_ntheta]] points for the theta coordinate, -and twice [[efmas_ntheta]] points for the phi coordinate. +and twice [[efmas_ntheta]] points for the phi coordinate. The default value gives a tensor accurate to the 4th decimal in Ge. """, ), @@ -3373,19 +3532,18 @@ dimensions=[4], defaultval=[0, 0, 0, 0], mnemonics="Electron bands INTERPolation", - text=""" + text=r""" This variable activates the interpolation of the electronic eigenvalues. It can be used to interpolate KS eigenvalues at the end of the GS run or to interpolate GW energies in sigma calculations ([[optdriver]] = 4). The k-path -can be specified with [[kptbounds]] and [[nkpath]]. einterp consists of 4 -entries. The first element specificies the interpolation method. +can be specified with [[kptbounds]] and [[nkpath]]. +einterp consists of 4 entries. +The first element specifies the interpolation method. * 0 --> No interpolation (default) * 1 --> Star-function interpolation (Shankland-Koelling-Wood Fourier interpolation scheme, see [[cite:Pickett1988]] - * 2 --> B-spline interpolation. -The meaning of the other entries depend on the interpolation technique -selected. +The meaning of the other entries depend on the interpolation technique selected. In the case of star-function interpolation: * einterp(2): Number of star-functions per ab-initio k-point @@ -3394,8 +3552,6 @@ the lattice vectors included in the star expansion * einterp(4): Used if einterp(2) /= 0. It defines rsigma in Eq 9 -For B-spline interpolation: einterp(2:4): Order of B-spline for the three -reduced directions. Cubic spline (3) is the recommended value. """, ), @@ -3409,16 +3565,14 @@ mnemonics="ELectron-PHonon interaction at 2nd order: IMAGinary shift of the DENominator", characteristics=['[[ENERGY]]'], requires="[[ieig2rf]] != 0", - text=""" -that is, if the user is performing performing second-order eigenvalue -calculations using response-functions. + text=r""" The variable [[elph2_imagden]] determines the imaginary shift of the -denominator of the sum-over-states in the perturbation denominator, -(e_{nk}-e_{n'k'}+i [[elph2_imagden]]). One should use a width comparable with +denominator of the sum-over-states in the perturbation, +$(e_{nk}-e_{n'k'}+i$[[elph2_imagden]]). One should use a width comparable with the Debye frequency or the maximum phonon frequency. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **ecut** has the -'[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[ecut]] has the +'[[ENERGY]]' characteristics (1 Ha = 27.2113845 eV). """, ), @@ -3430,7 +3584,7 @@ dimensions="scalar", defaultval=0, mnemonics="ENergy UNITs", - text=""" + text=r""" Governs the units to be used for output of eigenvalues (and eventual phonon frequencies) * 0 --> print eigenvalues in hartree; @@ -3453,7 +3607,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="Electron-PHonon: EXTRA ELectrons", - text=""" + text=r""" Number of electrons per unit cell to be added to the initial value computed from the pseudopotentials and unit cell. """, @@ -3468,13 +3622,32 @@ defaultval=0.0, mnemonics="Electron-PHonon: FERMI Energy", characteristics=['[[ENERGY]]'], - text=""" + text=r""" This variable can be used to change the value of the Fermi level when -performing electron-phonon calculations with [[optdriver]]==7. This variable +performing electron-phonon calculations with [[optdriver]] == 7. This variable has effect only if set to a non-zero value. See also [[eph_extrael]]. """, ), +Variable( + abivarname="eph_frohlichm", + varset="eph", + vartype="integer", + topics=['ElPhonInt_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="Electron-PHonon: FROHLICH Model", + text=r""" +Only relevant for [[optdriver]]=7 and [[eph_task]]=6. +If set to 1, use the dynamical matrix at Gamma, the Born effective charges, the dielectric tensor, as well as +the effective masses (must give a _EFMAS file as input, see [[prtefmas]] and [[getefmas]] or [[irdefmas]]), +as the parameters of a Frohlich Hamiltonian. +Then use these to compute the change of electronic eigenvalues due to electron-phonon interaction, +using second-order time-dependent perturbation theory. Can deliver (approximate) zero-point renormalisation +as well as temperature dependence. +""", +), + Variable( abivarname="eph_fsewin", varset="eph", @@ -3484,9 +3657,9 @@ defaultval="0.01 Hartree", mnemonics="Electron-Phonon: Fermi Surface Energy WINdow", characteristics=['[[ENERGY]]'], - text=""" + text=r""" This variable defines the energy window around the Fermi level used for e-ph -calculations ([[optdriver]] = 7). Only the states located in the energy range +calculations ([[optdriver]] = 7). Only states located in the energy range [efermi - eph_fsewin, efermi + eph_fsewin] are included in the e-ph calculation. Related input variables: [[eph_intmeth]], [[eph_fsmear]], [[eph_extrael]] and [[eph_fermie]]. @@ -3503,7 +3676,7 @@ mnemonics="Electron-PHonon: Fermi surface SMEARing", characteristics=['[[ENERGY]]'], requires="[[eph_intmeth]] == 1", - text=""" + text=r""" This variable defines the gaussian broadening used for the integration over the Fermi surface when [[eph_intmeth]] == 1. """, @@ -3517,14 +3690,24 @@ dimensions="scalar", defaultval=2, mnemonics="Electron-Phonon: INTegration METHod", - text=""" -This variable defines the technique for the integration on the Fermi surface -of electron-phonon quantities. + text=r""" +This variable defines the technique for the integration over the Brillouin zone. -* 1 --> Gaussian technique with broadening factor [[eph_fsmear]]. +* 1 --> Gaussian technique with broadening factor * 2 --> Tetrahedron method. -See also [[eph_fsewin]], [[eph_extrael]] and [[eph_fermie]]. +Note that the default value depends on the value of [[eph_task]] i.e. on the physical properties +we are computing. + +Phonon linewidths in metals (**eph_task** = 1): + +: The default approach for the integration of the double-delta over the Fermi surface is 2 (tetrahedron). + When the gaussian method is used, the broadening is given by [[eph_fsmear]]. + See also [[eph_fsewin]]. + +Electron-phonon self-energy + +: The default is gaussian method with broadening specified by [[zcut]]. """, ), @@ -3536,7 +3719,7 @@ dimensions="scalar", defaultval=0.1, mnemonics="Electron-PHonon: MU STAR (electron-electron interaction strength)", - text=""" + text=r""" Average electron-electron interaction strength, for the computation of the superconducting Tc using Mc-Millan's formula. """, @@ -3546,7 +3729,7 @@ abivarname="eph_ngqpt_fine", varset="eph", vartype="integer", - topics=['ElPhonInt_expert'], + topics=['ElPhonInt_useful'], dimensions=[3], defaultval=[0, 0, 0], mnemonics="Electron-PHonon: Number of Grid Q-PoinTs in FINE grid.", @@ -3557,13 +3740,13 @@ If eph_nqgpt_fine differs from [0, 0, 0], the code will use the Fourier transform to interpolate the DFPT potentials on this fine q-mesh starting from the irreducible set of q-points read from the DVDB file. This approach is similar to the one used to -interpolate the interatomic force constants in q-space. If eph_ngqpt_fine is +interpolate the interatomic force constants in q-space. If **eph_ngqpt_fine** is not given, the EPH code uses the list of irreducible q-points reported in the DDB file i.e. [[ddb_ngqpt]] (default behavior). !!! important - The computation of the electron-phonon matrix elements requires the knowledge of $\psi_{\bf k}$ + The computation of the e-ph matrix elements requires the knowledge of $\psi_{\bf k}$ and $\psi_{\bf k + q}$. This means that the k-mesh for electrons found in the WFK must be compatible with the one given in *eph_ngqpt_fine*. The code can interpolate DFPT potentials but won't try to interpolate KS wavefunctions. @@ -3575,20 +3758,32 @@ abivarname="eph_task", varset="eph", vartype="integer", - topics=['ElPhonInt_expert'], + topics=['ElPhonInt_basic'], dimensions="scalar", defaultval=1, + requires="[[optdriver]] == 7", mnemonics="Electron-PHonon: Task", - text=""" -When [[optdriver]]==7, select the task to be performed. + text=r""" +Select the electron-phonon task to be performed when [[optdriver]] == 7. The choice is among: - 0 --> No computation (mainly used to access the post-processing tools) - 1 --> Compute phonon linewidths in metals. - 2 --> Compute electron-phonon matrix elements - 3 --> Compute phonon self-energy. - 4 --> Compute EPH self-energy (Fan-Migdal + Debye-Waller) - 5 --> Interpolate DFPT potentials. +* 0 --> No computation (mainly used to access the post-processing tools) +* 1 --> Compute phonon linewidths in metals and superconducting properties (isotropic formalism). +* 2 --> Compute e-ph matrix elements. Save results in GKK.nc file. +* -2 --> Compute e-ph matrix elements. Save results in GKQ.nc file that can be post-processed with AbiPy. +* 3 --> Compute phonon self-energy. +* 4 --> Compute electron self-energy (Fan-Migdal + Debye-Waller) and QP corrections. Generate SIGEPH.nc file. +* -4 --> Compute electron lifetimes due to e-ph interaction (imaginary part of Fan-Migdal self-energy). Generate SIGEPH.nc file. +* 5 --> Interpolate DFPT potentials to produce a new DVDB file on the [[eph_ngqpt_fine]] q-mesh that can be read with [[getdvdb]] +* -5 --> Interpolate DFPT potentials on the q-path specified by [[ph_qpath]] and [[ph_nqpath]]. Note that, in this case, + the user has to provide the full list of q-points in the input, [[ph_ndivsm]] is not used to generate the q-path. +* 6 --> Estimate correction to the ZPR in polar materials using the Frohlich model. Requires EFMAS.nc file. +* 7 --> Compute phonon limited transport in semiconductors using lifetimes taken from SIGEPH.nc file. +* 15, -15 --> Write the average in r-space of the DFPT potentials to the V1QAVG.nc file. + In the first case (+15) the q-points are specified via [[ph_nqpath]] and [[ph_qpath]]. The code assumes the + input DVDB contains q-points in the IBZ and the potentials along the path are interpolated with Fourier transform. + An array D(R) with the decay of the W(R,r) as a function of R is computed and saved to file + In the second case (-15) the q-points are taken directly from the DVDB file. """, ), @@ -3600,10 +3795,10 @@ dimensions="scalar", defaultval=0, mnemonics="Electron-PHonon: TRANSPORT flag", - text=""" + text=r""" NB - this does not work yet. This variable can be used to turn on the -calculation of transport quantities in the eph module of abinit. Value of 1 -corresponds to elastic LOVA as in the PRB by [[cite:Savrasov1996]]. +calculation of transport quantities in the eph module of abinit. +Value of 1 corresponds to elastic LOVA as in [[cite:Savrasov1996]]. """, ), @@ -3617,11 +3812,11 @@ mnemonics="Energy SHIFT", characteristics=['[[DEVELOP]]', '[[ENERGY]]'], requires="[[wfoptalg]] == 3", - text=""" + text=r""" [[eshift]] gives the shift of the energy used in the shifted Hamiltonian squared. The algorithm will determine eigenvalues and eigenvectors centered on [[eshift]]. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **ecut** has the -'[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[eshift]] has the +'[[ENERGY]]' characteristics. (1 Ha = 27.2113845 eV) """, ), @@ -3636,15 +3831,12 @@ characteristics=['[[ENERGY]]'], requires="[[smdelta]] != 0", text=r""" -that is, if the user is performing simulations of the electronic lifetimes -induced by the electron-phonon coupling. - The variable [[esmear]] determines the width of the functions approximating the delta function, $\delta(e_{nk}-e_{n'k'})$, present in the expression of the lifetimes. One should use a width comparable with the Debye frequency or the maximum phonon frequency. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **ecut** has the -'[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[ecut]] has the +'[[ENERGY]]' characteristics (1 Ha = 27.2113845 eV). """, ), @@ -3658,8 +3850,8 @@ mnemonics="EXCHange MIXing", characteristics=['[[DEVELOP]]'], requires="[[useexexch]] == 1", - text=""" -[[exchmix]] allows to tune the ratio of exact exchange when [[useexexch]] is + text=r""" +[[exchmix]] allows one to tune the ratio of exact exchange when [[useexexch]] is used. The default value of 0.25 corresponds to PBE0. """, ), @@ -3673,11 +3865,11 @@ defaultval=0, mnemonics="EXCHange N2 and N3 Dimensions", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" If [[exchn2n3d]] is 1, the internal representation of the FFT arrays in reciprocal space will be array(n1,n3,n2), where the second and third dimensions have been switched. This is to allow to be coherent with the -[[exchn2n3d]]=4xx FFT treatment. +[[exchn2n3d]] = 4xx FFT treatment. """, ), @@ -3691,11 +3883,10 @@ mnemonics="flag - EXTRAPolation of the Wave-Functions", characteristics=['[[DEVELOP]]'], requires="[[densfor_pred]] in [5, 6]", - text=""" + text=r""" This flag activates the extrapolation of wave-functions from one Molecular Dynamics (or Structural Relaxation) step to another. The wave functions are -extrapolated using 2nd-order algorithm of Arias, Payne and Joannopoulos (PRB -45, 1538 (1992)). +extrapolated using 2nd-order algorithm of [[cite:Arias1992]]. Note that, when activated, this extrapolation requires non-negligible additional memory resources as the wave functions are stored for the two previous time steps. Also, it can only be activated if a consistent density @@ -3710,10 +3901,12 @@ vartype="real", topics=['DFT+U_expert'], dimensions="scalar", - defaultval=['0.625 for d electron', '0.6681 for f electron'], + defaultval=ValueWithConditions({'d electrons': 0.625, + 'f electrons': 0.6681, + 'defaultval': 0}), mnemonics="F4 Over F2 ratio of Slater integrals", - requires="[[usepaw]]==1 and ([[usepawu]]==1 or [[usedmft]]==1)", - text=""" + requires="[[usepaw]] == 1 and ([[usepawu]] == 1 or [[usedmft]] == 1)", + text=r""" This gives the ratio of Slater Integrals F4 and F2. It is used in DFT+U or DFT+DMFT for the calculation of the orbital dependent screened coulomb interaction. """, @@ -3727,10 +3920,10 @@ dimensions="scalar", defaultval=0.4943, mnemonics="F6 Over F2 ratio of Slater integrals", - requires="([[usepawu]]==1 or [[usedmft]]==1) and [[lpawu]]=3", - text=""" + requires="([[usepawu]] == 1 or [[usedmft]] == 1) and [[lpawu]] == 3", + text=r""" Gives the ratio of Slater Integrals F6 and F2. It is used with -[[f4of2_sla]]==3 in DFT+U or DFT+DMFT for the calculation of the orbital +[[f4of2_sla]] == 3 in DFT+U or DFT+DMFT for the calculation of the orbital dependent screened coulomb interaction. """, ), @@ -3741,27 +3934,28 @@ vartype="real", topics=['BandOcc_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[occopt]]==1': 0.125, - '[[occopt]]>2': 0.5, - '[[usewvl]]==1': 0.0, + defaultval=ValueWithConditions({'[[occopt]] == 1': 0.125, + '[[occopt]] > 2': 0.5, + '[[usewvl]] == 1': 0.0, 'defaultval': 0.0}), mnemonics="Factor for the number of BANDs", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Governs the number of bands to be used in the code in the case the parameter [[nband]] is not defined in the input file (which means that [[occopt]] is not equal to 0 or 2). -In case [[fband]] is 0.0d0, the code computes from the pseudopotential files +In case [[fband]] is 0.0, the code computes from the pseudopotential files and the geometry data contained in the input file, the number of electrons present in the system. Then, it computes the minimum number of bands that can accommodate them, and use that value for [[nband]]. + In case [[fband]] differs from zero, other bands will be added, just larger than [[fband]] times the number of atoms. This parameter is not echoed in the top of the main output file, but only the parameter [[nband]] that it allowed to compute. It is also not present in the dtset array (no internal). The default values are chosen such as to give naturally some conduction bands. -This improves the robustness of the code, since this allows to identify lack +This improves the robustness of the code, since this allows one to identify lack of convergence coming from (near-)degeneracies at the Fermi level. In the metallic case, the number of bands generated might be too small if the smearing factor is large. The occupation numbers of the higher bands should be @@ -3778,9 +3972,9 @@ dimensions="scalar", defaultval=0, mnemonics="FERMI Energy for printing the NESTing function", - text=""" -This input variable is only effective when [[prtnest]]=1. -The energy is relative to the calculated fermi energy. + text=r""" +This input variable is only effective when [[prtnest]] = 1. +The energy is relative to the calculated Fermi energy. """, ), @@ -3790,36 +3984,36 @@ vartype="integer", topics=['TuningSpeed_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[FFTW3]] and [[usedmft]]==0': 312, - '[[paral_kgb]]==1': 401, + defaultval=ValueWithConditions({'[[FFTW3]] and [[usedmft]] == 0': 312, + '[[paral_kgb]] == 1': 401, 'defaultval': 112}), mnemonics="Fast Fourier Transform ALGorithm", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" This keyword is **irrelevant** when Fast Fourier Transforms are done using -**Graphics Processing Units** (GPU), i.e. when [[use_gpu_cuda]]=1 +**Graphics Processing Units** (GPU), i.e. when [[use_gpu_cuda]] = 1 (in that case, it is ignored). Allows to choose the algorithm for Fast Fourier Transforms. These have to be -used when applied to wavefunctions (routine fourwf.F90), as well as when -applied to densities and potentials (routine fourdp.F90). Presently, it is the +used when applied to wavefunctions (routine `fourwf`), as well as when +applied to densities and potentials (routine `fourdp.F90`). Presently, it is the concatenation of three digits, labelled (A), (B) and (C). The first digit (A) is to be chosen among 1, 2, 3, 4 or 5: * 1 --> use FFT routines written by S. Goedecker. * 2 --> not available anymore - * 3 --> use serial or multi-threaded FFTW3 fortran routines ([http://www.fftw.org ](http://www.fftw.org) ). - Currently implemented with [[fftalg]]=312. + * 3 --> use serial or multi-threaded FFTW3 Fortran routines ([http://www.fftw.org ](http://www.fftw.org)). + Currently implemented with [[fftalg]] = 312. * 4 --> use FFT routines written by S. Goedecker, 2002 version, that will be suited for MPI and OpenMP parallelism. - * 5 --> use serial or multi-threaded MKL routines Currently implemented with [[fftalg]]=512. + * 5 --> use serial or multi-threaded MKL routines Currently implemented with [[fftalg]] = 512. -The second digit (B) is related to fourdp.f: +The second digit (B) is related to `fourdp`: * 0 --> only use Complex-to-complex FFT * 1 --> real-to-complex is also allowed (only coded for A==1, A==3 and A==5) -The third digit (C) is related to fourwf.f: +The third digit (C) is related to `fourwf`: * 0 --> no use of zero padding * 1 --> use of zero padding (only coded for A==1, A==4) @@ -3841,7 +4035,7 @@ mnemonics="Fast Fourier Transform CACHE size", characteristics=['[[DEVELOP]]'], commentdefault="todo: Not yet machine-dependent", - text=""" + text=r""" Gives the cache size of the current machine, in Kbytes. Internal representation as [[ngfft]](8). """, @@ -3856,11 +4050,11 @@ defaultval=21, mnemonics="FFT for GW calculation", requires=" [[optdriver]] in [3, 4]", - text=""" + text=r""" The basic ingredients needed to perform both a screening and a sigma calculation are the so-called oscillator matrix elements defined as -< **k-q**, b1 | e^{-i ( **q+G** ). **r** } | **k** b2 > +$$ \langle \mathbf{k-q},b_1 | e^{-i (\mathbf{q+G)} \mathbf{r}} | \mathbf{k}, b_2 \rangle $$ In reciprocal space, this expression is evaluated by a convolution in which the number of reciprocal lattice vectors employed to describe the @@ -3874,8 +4068,7 @@ [[fftgw]] is the concatenation of two digits, labelled (A) and (B) whose value is internally used to define the value of [[ngfft]](1:3) (see the setmesh.F90 routine). -The first digit (A) defines the augmentation of the FFT grid. Possible values -are 1, 2 and 3. +The first digit (A) defines the augmentation of the FFT grid. Possible values are 1, 2 and 3. * 0 --> Use the FFT grid specified by the user through [[ngfft]](1:3) * 1 --> Use a coarse FFT grid which encloses a sphere in reciprocal space whose radius @@ -3904,7 +4097,7 @@ defaultval="3*1", mnemonics="FOCK operator, k-grid DOWNSAMPLING", requires="[[usefock]] == 1", - text=""" + text=r""" The k wavevector grid used to compute the Fock operator in the full Brillouin Zone might be a subset of the full Brillouin Zone of the k point grid used for the wavefunctions (see [[kptopt]] for its definition). [[fockdownsampling]] @@ -3920,12 +4113,12 @@ Conventionally, if [[fockdownsampling]] is 3*0, then the Fock operator is obtained solely from the Gamma point. Also, as soon as [[fockdownsampling]] is not 3*1 or 3*0, the k point grid from which a subset will be taken is obtained -by imposing [[nshiftk]]=1. +by imposing [[nshiftk]] = 1. A more accurate description is now given, as one can achieve a better control than described above, with differing values of [[fockdownsampling]] and also with negative numbers. One starts from the k point grid defined by -[[kptrlatt]], with [[nshiftk]]=1. The absolute value of each of the three +[[kptrlatt]], with [[nshiftk]] = 1. The absolute value of each of the three numbers of [[fockdownsampling]] is used to sample the corresponding axis (in reduced coordinate), as described above. Moreover, the obtained k grid might even be further downsampled by specifying negative numbers: if all three are @@ -3948,7 +4141,7 @@ defaultval=0, mnemonics="FOCK operator: OPTions for MIXing", requires="[[usefock]] == 1", - text=""" + text=r""" Governs the mixing algorithm at the level of the Fock operator, i.e. how to mix it, and how the underlying SCF calculation is to be performed. It is the most relevant when the Fock operator is not updated at each SCF step ([[nnsclohf]]/=0). @@ -3956,14 +4149,14 @@ The last digit of [[fockoptmix]] governs what happens at the level of the SCF algorithm, when the Fock operator is updated. - 1. If [[fockoptmix]]==0: the SCF algorithm is not restarted + 1. If [[fockoptmix]] == 0: the SCF algorithm is not restarted (it continues to use the previous potential/density pairs without worrying). - 2. If [[fockoptmix]]==1: the SCF algorithm is restarted (the previous potential/density pairs are discarted). + 2. If [[fockoptmix]] == 1: the SCF algorithm is restarted (the previous potential/density pairs are discarded). The second-to-last (dozen) digit governs the possible modification of the XC functional inside the SCF loop to take into account the lack of update of the Fock operator. Irrelevant when the unit digit is 0. If the value 1 is used -(so, e.g. [[fockoptmix]]==11), an auxiliary xc functional is used inside the +(so, e.g. [[fockoptmix]] == 11), an auxiliary xc functional is used inside the SCF loop, for a frozen ACE Fock operator. This auxiliary functional is specified thanks to [[auxc_ixc]] and [[auxc_scal]]. @@ -3981,16 +4174,15 @@ defaultval=5.0, mnemonics="FREQuencies along the IMaginary axis ALPHA parameter", requires="[[optdriver]] == 4", - text=""" + text=r""" [[freqim_alpha]] is used only for numerical integration of the GW self-energy -([[gwcalctyp]]= 2, 12, 22, 9, 19, 29). +([[gwcalctyp]] = 2, 12, 22, 9, 19, 29). [[freqim_alpha]] determines the location of the maximum frequency point along the imaginary axis if the default grid is used in Contour Deformation -(numerical integration) calculations. It is set as _ α*ω p _, where _ ω p -_ is the plasma frequency determined by the average density of the system +(numerical integration) calculations. It is set as $\alpha*\omega_p$, where $\omega_p$ +is the plasma frequency determined by the average density of the system (this can be set by hand by using the variable [[ppmfrq]]). See the section on grids in the descriptive text for [[cd_frqim_method]] for a detailed -description of the formula. """, ), @@ -4004,13 +4196,12 @@ mnemonics="FREQuencies along the Real axis MAXimum", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 3", - text=""" + text=r""" [[freqremax]] is used only for numerical integration of the GW self-energy -([[gwcalctyp]]= 2, 12, 22, 9, 19, 29). +([[gwcalctyp]] = 2, 12, 22, 9, 19, 29). [[freqremax]] sets the maximum real frequency used to calculate the dielectric matrix in order to perform the numerical integration of the GW self-energy. -[[freqremax]], [[freqremin]] and [[nfreqre]] define the spacing of the -frequency mesh along the real axis. +[[freqremax]], [[freqremin]] and [[nfreqre]] define the spacing of the frequency mesh along the real axis. """, ), @@ -4024,14 +4215,14 @@ mnemonics="FREQuencies along the Real axis MINimum", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 3", - text=""" + text=r""" [[freqremin]] is used only for numerical integration of the GW self-energy -([[gwcalctyp]]= 2, 12, 22, 9, 19, 29). +([[gwcalctyp]] = 2, 12, 22, 9, 19, 29). [[freqremin]] sets the minimum real frequency used to calculate the dielectric matrix in order to perform the numerical integration of the GW self-energy. [[freqremin]] can be used to split a wide frequency interval into smaller subintervals that can be calculated independently. The different subintervals -can then be merged together with the **Mrgscr** utility thus obtaining a +can then be merged together with the **mrgscr** utility thus obtaining a single screening file that can used for self-energy calculations. Note that [[freqremax]], [[freqremin]] and [[nfreqre]] define the spacing of the frequency mesh along the real axis. @@ -4048,7 +4239,7 @@ mnemonics="FREQuencies for the SPectral function MAXimum", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 4", - text=""" + text=r""" [[freqspmax]] sets the maximum real frequency used to calculate the spectral function from the GW Green's function. [[freqspmin]], [[freqspmax]] and [[nfreqsp]] define the spacing of an equidistant frequency mesh along the real @@ -4067,7 +4258,7 @@ mnemonics="FREQuencies for the SPectral function MINimum", characteristics=['[[ENERGY]]'], requires="[[optdriver]] == 4", - text=""" + text=r""" [[freqspmin]] sets the minimum real frequency used to calculate the spectral function from the GW Green's function. [[freqspmin]] is set to -[[freqspmax]] if left undefined. [[freqspmin]], [[freqspmax]], and [[nfreqsp]] define the @@ -4084,17 +4275,14 @@ dimensions="scalar", defaultval=0.001, mnemonics="internal FRICTION coefficient", - text=""" + text=r""" Gives the internal friction coefficient (atomic units) for Langevin dynamics -(when [[ionmov]]=9): fixed temperature simulations with random forces. +(when [[ionmov]] = 9): fixed temperature simulations with random forces. The equation of motion is: - - M I d 2 R I /dt 2 = F I - [[friction]] M I dR I /dt - F_random I - -where F_random I is a Gaussian random force with average zero, and variance 2 [[friction]] M I kT. -The atomic unit of friction is hartrees*electronic mass*(atomic time -units)/Bohr 2. See J. Chelikowsky, J. Phys. D: Appl Phys. 33(2000)R33. +$M_I \frac{d^2 R_I}{dt^2}= F_I -$[[friction]]$*M_I \frac{d R_I}{dt} - F_{random,I}$, +where $F_{random,I}$ is a Gaussian random force with average zero and variance [[friction]]$*2M_IkT$. +The atomic unit of [[friction]] is Hartree*Electronic mass*(atomic unit of Time)/Bohr^2. See [[cite:Chelikowsky2000]] for additional information. """, ), @@ -4106,10 +4294,10 @@ dimensions="scalar", defaultval=0, mnemonics="FReeZe FERMI energy", - text=""" + text=r""" Can be used to suppress artificially the first-order change of Fermi energy, -in case of Response Function calculation for metals at Q=0. The input variable -[[frzfermi]], if set to 1, allows to suppress this contribution, but this is incorrect. +in case of Response Function calculation for metals at Q=0. If the input variable +[[frzfermi]] is set to 1, this contribution is suppressed, even though this is incorrect. """, ), @@ -4121,10 +4309,10 @@ dimensions="scalar", defaultval=ValueWithUnit(units='(Bohr^2)/Hartree', value=1), mnemonics="Forces to (X) CARTesian coordinates FACTOR", - text=""" + text=r""" The forces multiplied by [[fxcartfactor]] will be treated like difference in cartesian coordinates in the process of optimization. This is a simple preconditioner. -TO BE UPDATED See ([[ionmov]]=2, non-zero [[optcell]]). For example, the +TO BE UPDATED See ([[ionmov]] = 2 or 22, non-zero [[optcell]]). For example, the stopping criterion defined by [[tolmxf]] relates to these scaled stresses. """, ), @@ -4137,7 +4325,7 @@ dimensions="scalar", defaultval=1, mnemonics="Genetic Algorithm - ALGOrithm selection", - text=""" + text=r""" Choosing method to make the structure selection. Only the enthalpy is used now but we plan to include, energy, electronic band gap and alchemical potentials. Right now only value of 1 (enthalpy) works. @@ -4152,7 +4340,7 @@ dimensions="scalar", defaultval=1, mnemonics="Genetic Algorithm FITNESS function selection", - text=""" + text=r""" Different methodologies to perform the roulette-wheel selection of parents. Even though, the objective function is the crystalline enthalpy (H_i), the weight of the population elements to be chosen from in a roulette-wheel @@ -4172,7 +4360,7 @@ dimensions="scalar", defaultval=1, mnemonics="Genetic Algorithm Number of RULES", - text=""" + text=r""" Different genetic rules have been implemented and the user has the change to choose between any of them. Right now we have 4 rules. See [[ga_rules]] """, @@ -4186,9 +4374,8 @@ dimensions="scalar", defaultval=0.2, mnemonics="Genetic Algorithm OPTimal PERCENT", - text=""" -Percentage of the population that according to the fitness function passes to -the following iteration. + text=r""" +Percentage of the population that according to the fitness function passes to the following iteration. """, ), @@ -4200,7 +4387,7 @@ dimensions="scalar", defaultval=1, mnemonics="Genetic Algorithm RULES", - text=""" + text=r""" Different genetic rules have been implemented and the user has the change to choose between any of them. The chosen number of rules have been defined in [[ga_n_rules]] @@ -4212,7 +4399,7 @@ direction and creating the spring offs from the pieces of the two parents. 2) Vector flip mutation. From the coordinates from a given parent, a piece of it is inverted. -3) random strain. A random anisotropic deformation is given to the unit cell. +3) Random strain. A random anisotropic deformation is given to the unit cell. 4) Coordinates mutation of 1/4 of the whole coordinates. """, ), @@ -4225,20 +4412,16 @@ dimensions=[3], defaultval=MultipleValue(number=3, value=0), mnemonics="GENerator of the translation for Anti-FerroMagnetic space group", - text=""" + text=r""" This input variable might be used to define a Shubnikov type IV magnetic space -group (anti-ferromagnetic space group). The user is advised to consult "The -mathematical theory of symmetry in solids, Representation theory for point -groups and space groups, 1972, C.J. Bradley and A.P. Cracknell, Clarendon -Press, Oxford." +group (anti-ferromagnetic space group). The user is advised to consult [[cite:Bradley1972]] A Shubnikov type IV magnetic space group might be defined by its Fedorov space group (set of spatial symmetries, that do not change the magnetization), and one translation associated with a change of magnetization. [[genafm]] is precisely this translation, in reduced coordinates (like [[xred]]) Thus, one way to specify a Shubnikov IV magnetic space group, is to define both [[spgroup]] and [[genafm]]. Alternatively, one might define [[spgroup]] -and [[spgroupma]], or define by hand the set of symmetries, using [[symrel]], -[[tnons]] and [[symafm]] +and [[spgroupma]], or define by hand the set of symmetries, using [[symrel]], [[tnons]] and [[symafm]]. """, ), @@ -4250,7 +4433,7 @@ dimensions="scalar", defaultval=0, mnemonics="GET the first-order density from _1DEN file", - text=""" + text=r""" Relevant only for non self consistent RF calculations (e.g. to get electron phonon matrix elements) or for non linear RF calculations (to get mixed higher order derivatives you need several perturbed densities and wave functions). @@ -4274,44 +4457,14 @@ dimensions="scalar", defaultval=0, mnemonics="GET the first-order wavefunctions from _1WF file", - text=""" -Eventually used when [[ndtset]]>0 (in the multi-dataset mode), to indicate -starting wavefunctions, as an alternative to [[irdwfk]], [[irdwfq]], -[[ird1wf]], [[irdddk]]. One should first read the explanations given for these -latter variables. -The **getwfk**, **getwfq**, [[get1wf]] and **getddk** variables are -typically used to chain the calculations in the multi-dataset mode, since they + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to [[ird1wf]]. +One should first read the explanations given for these latter variables. +This variable is typically used to chain the calculations in the multi-dataset mode, since they describe from which dataset the OUTPUT wavefunctions are to be taken, as INPUT wavefunctions of the present dataset. - -We now focus on the **getwfk** input variable (the only one used in ground- -state calculations), but the rules for **getwfq** and [[get1wf]] are similar, -with _WFK replaced by _WFQ or _1WF. -If **getwfk** ==0, no use of previously computed output wavefunction file -appended with _DSx_WFK is done. -If **getwfk** is positive, its value gives the index of the dataset for which -the output wavefunction file appended with _WFK must be used. -If **getwfk** is -1, the output wf file with _WFK of the previous dataset must -be taken, which is a frequently occurring case. -If **getwfk** is a negative number, it indicates the number of datasets to go -backward to find the needed wavefunction file. In this case, if one refers to -a non existent data set (prior to the first), the wavefunctions are not -initialised from a disk file, so that it is as if **getwfk** =0 for that -initialisation. Thanks to this rule, the use of **getwfk** -1 is rather -straightforward: except for the first wavefunctions, that are not initialized -by reading a disk file, the output wavefunction of one dataset is input of the -next one. -In the case of a ddk calculation in a multi dataset run, in order to compute -correctly the localisation tensor, it is mandatory to declare give getddk the -value of the current dataset (i.e. getddk3 3 ) - this is a bit strange and -should be changed in the future. -NOTE: a negative value of a "get" variable indicates the number of datasets -to go backwards; it is not the number to be subtracted from the current -dataset to find the proper dataset. As an example: - - ndtset 3 jdtset 1 2 4 getXXX -1 - -refers to dataset 2 when dataset 4 is initialized. +See also discussion in [[getwfk]]. """, ), @@ -4323,21 +4476,20 @@ dimensions="scalar", defaultval=0, mnemonics="GET the Bethe-Salpeter COUPling block from...", - text=""" -Eventually used when [[ndtset]]>0 (multi-dataset mode) and, in the case of a + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode) and, in the case of a Bethe-Salpeter calculation to indicate that the starting coupling block of the excitonic Hamiltonian will be taken from the output of a previous dataset. It is used to chain the calculations, since it describes from which dataset the OUTPUT coupling block is to be taken, as INPUT of the present dataset. -If [[getbscoup]]==0, no such use of previously computed coupling block file is done. -If [[getbscoup]] is positive, its value gives the index of the dataset to be -used as input. +If [[getbscoup]] == 0, no such use of previously computed coupling block file is done. +If [[getbscoup]] is positive, its value gives the index of the dataset to be used as input. If [[getbscoup]] is -1, the output of the previous dataset must be taken, -which is a frequently occuring case. +which is a frequently occurring case. If [[getbscoup]] is a negative number, it indicates the number of datasets to go backward to find the needed file. In this case, if one refers to a non existent data set (prior to the first), the coupling block is not initialised -from a disk file, so that it is as if [[getbscoup]]=0 for that initialisation. +from a disk file, so that it is as if [[getbscoup]] = 0 for that initialisation. """, ), @@ -4349,13 +4501,13 @@ dimensions="scalar", defaultval=0, mnemonics="GET the Bethe-Salpeter EIGenstates from...", - text=""" -Eventually used when [[ndtset]]>0 (multi-dataset mode) and, in the case of a + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode) and, in the case of a Bethe-Salpeter calculation to indicate that the starting excitonic eigenstates are to be taken from the output of a previous dataset. It is used to chain the calculations, since it describes from which dataset the OUTPUT eigenstates are to be taken, as INPUT eigenstates of the present dataset. -If [[getbseig]]==0, no such use of previously computed output eigenstates file is done. +If [[getbseig]] == 0, no such use of previously computed output eigenstates file is done. If [[getbseig]] is positive, its value gives the index of the dataset from which the output states is to be used as input. If [[getbseig]] is -1, the output eigenstates of the previous dataset must be @@ -4363,7 +4515,7 @@ If [[getbseig]] is a negative number, it indicates the number of datasets to go backward to find the needed file. In this case, if one refers to a non existent data set (prior to the first), the eigenstates are not initialised -from a disk file, so that it is as if [[getbseig]]=0 for that initialisation. +from a disk file, so that it is as if [[getbseig]] = 0 for that initialisation. """, ), @@ -4375,20 +4527,20 @@ dimensions="scalar", defaultval=0, mnemonics="GET the Bethe-Salpeter RESOnant block from...", - text=""" -Eventually used when [[ndtset]]>0 (multi-dataset mode) and, in the case of a + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode) and, in the case of a Bethe-Salpeter calculation to indicate that the starting resonant block of the excitonic Hamiltonian will be taken from the output of a previous dataset. It is used to chain the calculations, since it describes from which dataset the OUTPUT resonant block is to be taken, as INPUT of the present dataset. -If [[getbsreso]]==0, no such use of previously computed resonant block file is done. +If [[getbsreso]] == 0, no such use of previously computed resonant block file is done. If [[getbsreso]] is positive, its value gives the index of the dataset to be used as input. If [[getbsreso]] is -1, the output of the previous dataset must be taken, which is a frequently occurring case. If [[getbsreso]] is a negative number, it indicates the number of datasets to go backward to find the needed file. In this case, if one refers to a non existent data set (prior to the first), the resonant block is not initialised -from a disk file, so that it is as if [[getbsreso]]=0 for that initialisation. +from a disk file, so that it is as if [[getbsreso]] = 0 for that initialisation. """, ), @@ -4400,18 +4552,18 @@ dimensions="scalar", defaultval=0, mnemonics="GET CELL parameters from...", - text=""" + text=r""" This variable is typically used to chain the calculations, in the multi- -dataset mode ([[ndtset]]>0), since it describes from which dataset [[acell]] +dataset mode ([[ndtset]] > 0), since it describes from which dataset [[acell]] and [[rprim]] are to be taken, as input of the present dataset. The cell parameters are [[EVOLVING]] variables, for which such a chain of calculations is useful. -If ==0, no use of previously computed values must occur. -If it is positive, its value gives the index of the dataset from which the -data are to be used as input data. It must be the index of a dataset already +If 0, no previously computed values are used. +If >0, the value must be the index of the dataset from which the +cell data is to be used as input data. It must be the index of a dataset already computed in the SAME run. If equal to -1, the output data of the previous dataset must be taken, which is a frequently occurring case. However, if the first dataset is treated, -1 -is equivalent to 0, since no dataset has yet been computed in the same run. +is equivalent to 0, since no dataset has been computed in the same run. If another negative number, it indicates the number of datasets to go backward to find the needed data (once again, going back beyond the first dataset is equivalent to using a null get variable). @@ -4422,27 +4574,29 @@ abivarname="getddb", varset="files", vartype="integer", - topics=['ElPhonInt_expert', 'TDepES_useful'], + topics=['ElPhonInt_basic', 'TDepES_useful'], dimensions="scalar", defaultval=0, mnemonics="GET the DDB from...", - text=""" -This variable should be used when performing electron-phonon or temperature- -dependence calculations. The Born effective charge as well as the dielectric + text=r""" +This variable should be used when performing electron-phonon or temperature-dependent calculations in semiconductors +with the legacy implementation that computes the e-ph matrix elements at the end of the DFPT run +(for the new EPH code, see [[eph_task]]). + +More detailed explanation: + +The Born effective charge as well as the dielectric tensor will be read from a previous DFPT calculations of the electric field at q=Gamma. The use of this variable will trigger the cancellation of a residual dipole that leads to an unphysical divergence of the GKK with vanishing q-points. The use of this variable greatly improves the k-point convergence speed as the density of the k-point grid required to obtain the fulfillment of the charge neutrality sum rule is usually prohibitively large. -If [[getddb]]==0, no such use of previously computed Born effective charge and -dielectric tensor is done. -If [[getddb]] is positive, its value gives the index of the dataset from which -the output density is to be used as input. -If [[getddb]] is -1, the output density of the previous dataset must be taken, -which is a frequently occurring case. -If [[getddb]] is a negative number, it indicates the number of datasets to go -backward to find the needed file. +If [[getddb]] == 0, no such use of previously computed Born effective charge and dielectric tensor is done. +If [[getddb]] is positive, its value gives the index of the dataset from which the output density is to be used as input. +If [[getddb]] is -1, the output density of the previous dataset must be taken, which is a frequently occurring case. +If [[getddb]] is a negative number, it indicates the number of datasets to go backward to find the needed file. + NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4450,6 +4604,8 @@ ndtset 3 jdtset 1 2 4 getXXX -1 refers to dataset 2 when dataset 4 is initialized. + +Note also that, starting Abinit v9, one can also use [[getddb_path]] to specify the path of the file directly. """, ), @@ -4461,8 +4617,8 @@ dimensions="scalar", defaultval=0, mnemonics="GET the DDK wavefunctions from _1WF file", - text=""" -Eventually used when [[ndtset]]>0 (in the multi-dataset mode), to indicate + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate starting wavefunctions, as an alternative to [[irdwfk]],[[irdwfq]],[[ird1wf]],[[irdddk]]. One should first read the explanations given for these latter variables. @@ -4503,39 +4659,44 @@ ), Variable( - abivarname="getden", + abivarname="getdelfd", varset="files", vartype="integer", topics=['multidtset_useful'], dimensions="scalar", defaultval=0, - mnemonics="GET the DENsity from...", - text=""" -Eventually used when [[ndtset]]>0 (multi-dataset mode) and, in the case of a -ground-state calculation, if [[iscf]]<0 (non-SCF calculation), to indicate -that the starting density is to be taken from the output of a previous -dataset. It is used to chain the calculations, since it describes from which -dataset the OUTPUT density are to be taken, as INPUT density of the present dataset. - -If [[getden]]==0, no such use of previously computed output density file is done. - -If [[getden]] is positive, its value gives the index of the dataset from which -the output density is to be used as input. - -If [[getden]] is -1, the output density of the previous dataset must be taken, -which is a frequently occurring case. + mnemonics="GET the 1st derivative of wavefunctions with respect to ELectric FielD, from _1WF file", + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to +[[irdwfk]],[[irdwfq]],[[ird1wf]],[[irdddk]]. One should first read the +explanations given for these latter variables. +The **getwfk**, **getwfq**, **get1wf** and [[getddk]] variables are +typically used to chain the calculations in the multi-dataset mode, since they +describe from which dataset the OUTPUT wavefunctions are to be taken, as INPUT +wavefunctions of the present dataset. -If [[getden]] is a negative number, it indicates the number of datasets to go -backward to find the needed file. In this case, if one refers to a non -existent data set (prior to the first), the density is not initialised from a -disk file, so that it is as if [[getden]]=0 for that initialisation. Thanks to -this rule, the use of [[getden]] -1 is rather straightforward: except for the -first density, that is not initialized by reading a disk file, the output -density of one dataset is input of the next one. -Be careful: the output density file of a run with non-zero [[ionmov]] does -not have the proper name (it has a "TIM" indication) for use as an input of an -[[iscf]]<0 calculation. -One should use the output density of a [[ionmov]]==0 run. +We now focus on the **getwfk** input variable (the only one used in ground- +state calculations), but the rules for **getwfq** and **get1wf** are similar, +with _WFK replaced by _WFQ or _1WF. +If **getwfk** ==0, no use of previously computed output wavefunction file +appended with _DSx_WFK is done. +If **getwfk** is positive, its value gives the index of the dataset for which +the output wavefunction file appended with _WFK must be used. +If **getwfk** is -1, the output wf file with _WFK of the previous dataset must +be taken, which is a frequently occurring case. +If **getwfk** is a negative number, it indicates the number of datasets to go +backward to find the needed wavefunction file. In this case, if one refers to +a non existent data set (prior to the first), the wavefunctions are not +initialised from a disk file, so that it is as if **getwfk** =0 for that +initialisation. Thanks to this rule, the use of **getwfk** -1 is rather +straightforward: except for the first wavefunctions, that are not initialized +by reading a disk file, the output wavefunction of one dataset is input of the +next one. +In the case of a ddk calculation in a multi dataset run, in order to compute +correctly the localisation tensor, it is mandatory to declare give getddk the +value of the current dataset (i.e. getddk3 3 ) - this is a bit strange and +should be changed in the future. NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4547,74 +4708,248 @@ ), Variable( - abivarname="getgam_eig2nkq", - varset="dev", - vartype="integer", - topics=['multidtset_useful', 'TDepES_useful'], - dimensions="scalar", - defaultval=0, - mnemonics="GET the GAMma phonon data EIG2NKQ from dataset", - requires="[[ieig2rf]] != 0 and [[qpt]] != (0.0, 0.0, 0.0)", - text=""" -Relevant for second-order eigenvalue calculations using response-functions -([[ieig2rf]] != 0), and only for non-zero wavevectors [[qpt]]. -From the electron-phonon matrix elements at some wavevector only, it is not -possible to determine the Debye-Waller contribution: one has to know also the -q=Gamma electron-phonon matrix elements. -The variable [[getgam_eig2nkq]] allows to transmit the information about the -second-order derivatives of the eigenvalues for q=Gamma from the dataset where -the calculation at Gamma was done, to the datasets for other wavevectors. -""", -), - -Variable( - abivarname="gethaydock", + abivarname="getdkdk", varset="files", vartype="integer", topics=['multidtset_useful'], dimensions="scalar", defaultval=0, - mnemonics="GET the HAYDOCK restart file from...", - text=""" -Eventually used when [[ndtset]]>0 (multi-dataset mode) and, in the case of a -Bethe-Salpeter calculation to indicate that the Haydock iterative technique -will be restarted from the output of a previous dataset. -If [[gethaydock]]==0, no such use of previously computed coupling block file is done. -If [[gethaydock]] is positive, its value gives the index of the dataset to be used as input. -If [[gethaydock]] is -1, the output of the previous dataset must be taken, -which is a frequently occuring case. -If [[gethaydock]] is a negative number, it indicates the number of datasets to -go backward to find the needed file. In this case, if one refers to a non -existent data set (prior to the first), the coupling block is not initialised -from a disk file, so that it is as if [[gethaydock]]=0 for that initialisation. + mnemonics="GET the 2nd derivative of wavefunctions with respect to K, from _1WF file", + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to +[[irdwfk]],[[irdwfq]],[[ird1wf]],[[irdddk]]. One should first read the +explanations given for these latter variables. +The **getwfk**, **getwfq**, **get1wf** and [[getddk]] variables are +typically used to chain the calculations in the multi-dataset mode, since they +describe from which dataset the OUTPUT wavefunctions are to be taken, as INPUT +wavefunctions of the present dataset. + +We now focus on the **getwfk** input variable (the only one used in ground- +state calculations), but the rules for **getwfq** and **get1wf** are similar, +with _WFK replaced by _WFQ or _1WF. +If **getwfk** ==0, no use of previously computed output wavefunction file +appended with _DSx_WFK is done. +If **getwfk** is positive, its value gives the index of the dataset for which +the output wavefunction file appended with _WFK must be used. +If **getwfk** is -1, the output wf file with _WFK of the previous dataset must +be taken, which is a frequently occurring case. +If **getwfk** is a negative number, it indicates the number of datasets to go +backward to find the needed wavefunction file. In this case, if one refers to +a non existent data set (prior to the first), the wavefunctions are not +initialised from a disk file, so that it is as if **getwfk** =0 for that +initialisation. Thanks to this rule, the use of **getwfk** -1 is rather +straightforward: except for the first wavefunctions, that are not initialized +by reading a disk file, the output wavefunction of one dataset is input of the +next one. +In the case of a ddk calculation in a multi dataset run, in order to compute +correctly the localisation tensor, it is mandatory to declare give getddk the +value of the current dataset (i.e. getddk3 3) - this is a bit strange and +should be changed in the future. +NOTE: a negative value of a "get" variable indicates the number of datasets +to go backwards; it is not the number to be subtracted from the current +dataset to find the proper dataset. As an example: + + ndtset 3 jdtset 1 2 4 getXXX -1 + +refers to dataset 2 when dataset 4 is initialized. """, ), Variable( - abivarname="getocc", + abivarname="getdkde", varset="files", vartype="integer", topics=['multidtset_useful'], dimensions="scalar", defaultval=0, - mnemonics="GET OCC parameters from...", - text=""" -This variable is typically used to chain the calculations, in the multi- -dataset mode ([[ndtset]]>0), since it describes from which dataset the array -[[occ]] is to be taken, as input of the present dataset. The occupation -numbers are [[EVOLVING]] variables, for which such a chain of calculations is useful. -If [[getocc]]==0, no such use of previously computed output occupations is done. -If [[getocc]] is positive, its value gives the index of the dataset from which -the data are to be used as input data. It must be the index of a dataset -already computed in the SAME run. -If [[getocc]] is -1, the output data of the previous dataset must be taken, -which is a frequently occurring case. -If [[getocc]] is a negative number, it indicates the number of datasets to go -backward to find the needed data. In this case, if one refers to a non -existent data set (prior to the first), the date is not initialised from a -disk file, so that it is as if [[getocc]]==0 for that initialisation. -NOTE that a non-zero [[getocc]] MUST be used with [[occopt]]==2, so that the -number of bands has to be initialized for each k point. Of course, these + mnemonics="GET the mixed 2nd derivative of wavefunctions with respect to K and electric field, from _1WF file", + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to +[[irdwfk]],[[irdwfq]],[[ird1wf]],[[irdddk]]. One should first read the +explanations given for these latter variables. +The **getwfk**, **getwfq**, **get1wf** and [[getddk]] variables are +typically used to chain the calculations in the multi-dataset mode, since they +describe from which dataset the OUTPUT wavefunctions are to be taken, as INPUT +wavefunctions of the present dataset. + +We now focus on the **getwfk** input variable (the only one used in ground- +state calculations), but the rules for **getwfq** and **get1wf** are similar, +with _WFK replaced by _WFQ or _1WF. +If **getwfk** ==0, no use of previously computed output wavefunction file +appended with _DSx_WFK is done. +If **getwfk** is positive, its value gives the index of the dataset for which +the output wavefunction file appended with _WFK must be used. +If **getwfk** is -1, the output wf file with _WFK of the previous dataset must +be taken, which is a frequently occurring case. +If **getwfk** is a negative number, it indicates the number of datasets to go +backward to find the needed wavefunction file. In this case, if one refers to +a non existent data set (prior to the first), the wavefunctions are not +initialised from a disk file, so that it is as if **getwfk** =0 for that +initialisation. Thanks to this rule, the use of **getwfk** -1 is rather +straightforward: except for the first wavefunctions, that are not initialized +by reading a disk file, the output wavefunction of one dataset is input of the +next one. +In the case of a ddk calculation in a multi dataset run, in order to compute +correctly the localisation tensor, it is mandatory to declare give getddk the +value of the current dataset (i.e. getddk3 3 ) - this is a bit strange and +should be changed in the future. +NOTE: a negative value of a "get" variable indicates the number of datasets +to go backwards; it is not the number to be subtracted from the current +dataset to find the proper dataset. As an example: + + ndtset 3 jdtset 1 2 4 getXXX -1 + +refers to dataset 2 when dataset 4 is initialized. +""", +), + +Variable( + abivarname="getden", + varset="files", + vartype="integer", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET the DENsity from...", + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode) and, in the case of a +ground-state calculation, if [[iscf]]<0 (non-SCF calculation), to indicate +that the starting density is to be taken from the output of a previous +dataset. It is used to chain the calculations, since it describes from which +dataset the OUTPUT density are to be taken, as INPUT density of the present dataset. + +If [[getden]] == 0, no such use of previously computed output density file is done. + +If [[getden]] is positive, its value gives the index of the dataset from which +the output density is to be used as input. + +If [[getden]] is -1, the output density of the previous dataset must be taken, +which is a frequently occurring case. + +If [[getden]] is a negative number, it indicates the number of datasets to go +backward to find the needed file. In this case, if one refers to a non +existent data set (prior to the first), the density is not initialised from a +disk file, so that it is as if [[getden]] = 0 for that initialisation. Thanks to +this rule, the use of [[getden]] -1 is rather straightforward: except for the +first density, that is not initialized by reading a disk file, the output +density of one dataset is input of the next one. +Be careful: the output density file of a run with non-zero [[ionmov]] does +not have the proper name (it has a "TIM" indication) for use as an input of an [[iscf]]<0 calculation. +One should use the output density of a [[ionmov]] == 0 run. +NOTE: a negative value of a "get" variable indicates the number of datasets +to go backwards; it is not the number to be subtracted from the current +dataset to find the proper dataset. As an example: + + ndtset 3 jdtset 1 2 4 getXXX -1 + +refers to dataset 2 when dataset 4 is initialized. +""", +), + +Variable( + abivarname="getdvdb", + varset="files", + vartype="integer", + topics=['ElPhonInt_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET the DVDB from...", + text=r""" +This variable can be used when performing electron-phonon calculations with [[optdriver]] = 7 +to read a DVDB file produced in a previous dataset. +For example, one can concatenate a dataset in which an initial set of DFPT potentials +on a relatively coarse q-mesh is interpolated on a denser q-mesh using [[eph_task]] = 5 and [[eph_ngqpt_fine]]. + +Note also that, starting Abinit v9, one can also use [[getdvdb_path]] to specify the path of the file directly. +""" +), + +Variable( + abivarname="getefmas", + varset="files", + vartype="integer", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET the EFfective MASses from...", + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode). +Only relevant for [[optdriver]]=7 and [[eph_task]]=6. +If set to 1, take the data from a _EFMAS file as input. The latter must have been produced using [[prtefmas]]. +""", +), + +Variable( + abivarname="getgam_eig2nkq", + varset="dev", + vartype="integer", + topics=['multidtset_useful', 'TDepES_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET the GAMma phonon data EIG2NKQ from dataset", + requires="[[ieig2rf]] != 0 and [[qpt]] != (0.0, 0.0, 0.0)", + text=r""" +Relevant for second-order eigenvalue calculations using response-functions +([[ieig2rf]] != 0), and only for non-zero wavevectors [[qpt]]. +From the electron-phonon matrix elements at some wavevector only, it is not +possible to determine the Debye-Waller contribution: one has to know also the +q=Gamma electron-phonon matrix elements. +The variable [[getgam_eig2nkq]] allows one to transmit the information about the +second-order derivatives of the eigenvalues for q=Gamma from the dataset where +the calculation at Gamma was done, to the datasets for other wavevectors. +""", +), + +Variable( + abivarname="gethaydock", + varset="files", + vartype="integer", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET the HAYDOCK restart file from...", + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode) and, in the case of a +Bethe-Salpeter calculation to indicate that the Haydock iterative technique +will be restarted from the output of a previous dataset. +If [[gethaydock]] == 0, no such use of previously computed coupling block file is done. +If [[gethaydock]] is positive, its value gives the index of the dataset to be used as input. +If [[gethaydock]] is -1, the output of the previous dataset must be taken, +which is a frequently occurring case. +If [[gethaydock]] is a negative number, it indicates the number of datasets to +go backward to find the needed file. In this case, if one refers to a non +existent data set (prior to the first), the coupling block is not initialised +from a disk file, so that it is as if [[gethaydock]] = 0 for that initialisation. +""", +), + +Variable( + abivarname="getocc", + varset="files", + vartype="integer", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="GET OCC parameters from...", + text=r""" +This variable is typically used to chain the calculations, in the multi- +dataset mode ([[ndtset]] > 0), since it describes from which dataset the array +[[occ]] is to be taken, as input of the present dataset. The occupation +numbers are [[EVOLVING]] variables, for which such a chain of calculations is useful. +If [[getocc]] == 0, no such use of previously computed output occupations is done. +If [[getocc]] is positive, its value gives the index of the dataset from which +the data are to be used as input data. It must be the index of a dataset +already computed in the SAME run. +If [[getocc]] is -1, the output data of the previous dataset must be taken, +which is a frequently occurring case. +If [[getocc]] is a negative number, it indicates the number of datasets to go +backward to find the needed data. In this case, if one refers to a non +existent data set (prior to the first), the date is not initialised from a +disk file, so that it is as if [[getocc]] == 0 for that initialisation. +NOTE that a non-zero [[getocc]] MUST be used with [[occopt]] == 2, so that the +number of bands has to be initialized for each k point. Of course, these numbers of bands must be identical to the numbers of bands of the dataset from which [[occ]] will be copied. The same is true for the number of k points. NOTE: a negative value of a "get" variable indicates the number of datasets @@ -4635,12 +4970,12 @@ dimensions="scalar", defaultval=0, mnemonics="GET QuasiParticle Structure", - text=""" -Used when [[ndtset]]>0 (multi-dataset mode) and [[optdriver]]=3, or 4 + text=r""" +Used when [[ndtset]] > 0 (multi-dataset mode) and [[optdriver]] = 3, or 4 (screening or sigma step of a GW calculation), to indicate that the eigenvalues and possibly the wavefunctions have to be taken from a previous -quasiparticle calculation (instead of the usual LDA starting point). This is -to achieve quasiparticle self-consistency. See also [[irdqps]] +quasi-particle calculation (instead of the usual LDA starting point). This is +to achieve quasi-particle self-consistency. See also [[irdqps]] NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4659,13 +4994,15 @@ dimensions="scalar", defaultval=0, mnemonics="GET SCReening (the inverse dielectric matrix) from...", - text=""" -Used when [[ndtset]]>0 (multi-dataset mode) and [[optdriver]]=4 (sigma step of + text=r""" +Used when [[ndtset]] > 0 (multi-dataset mode) and [[optdriver]] = 4 (sigma step of a GW calculation), to indicate that the dielectric matrix (_SCR file) is to be taken from the output of a previous dataset. It is used to chain the calculations, since it describes from which dataset the OUTPUT dielectric matrix is to be taken, as INPUT of the present dataset. -If [[getscr]]==0, no such use of previously computed output _SCR file is done. +Note also that, starting Abinit v9, one can also use [[getscr_path]] to specify the path of the file directly. + +If [[getscr]] == 0, no such use of previously computed output _SCR file is done. If [[getscr]] is positive, its value gives the index of the dataset from which the output _SCR file is to be used as input. If [[getscr]] is -1, the output _SCR file of the previous dataset must be @@ -4673,7 +5010,7 @@ If [[getscr]] is a negative number, it indicates the number of datasets to go backward to find the needed file. In this case, if one refers to a non existent data set (prior to the first), the _SCR file is not initialised from -a disk file, so that it is as if [[getscr]]=0 for that initialisation. +a disk file, so that it is as if [[getscr]] = 0 for that initialisation. NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4692,8 +5029,8 @@ dimensions="scalar", defaultval=0, mnemonics="GET SUSCEPtibility (the irreducible polarizability) from...", - text=""" -Used when [[ndtset]]>0 (multi-dataset mode) and [[optdriver]]=4 (sigma step of + text=r""" +Used when [[ndtset]] > 0 (multi-dataset mode) and [[optdriver]] = 4 (sigma step of a GW calculation), to indicate that the irreducible polarizability (_SUSC file) is to be taken from the output of a previous dataset. It is used to chain the calculations, since it describes from which dataset the OUTPUT @@ -4705,7 +5042,7 @@ to apply a cutoff to the Coulomb interaction in order to facilitate the convergence of the GW correction with respect to the size of the supercell (see [[vcutgeo]] and [[icutcoul]]) -If [[getsuscep]]==0, no such use of previously computed output _SUSC file is done. +If [[getsuscep]] == 0, no such use of previously computed output _SUSC file is done. If [[getsuscep]] is positive, its value gives the index of the dataset from which the output _SUSC file is to be used as input. If [[getsuscep]] is -1, the output _SUSC file of the previous dataset must be @@ -4713,7 +5050,7 @@ If [[getsuscep]] is a negative number, it indicates the number of datasets to go backward to find the needed file. In this case, if one refers to a non existent data set (prior to the first), the _SUSC file is not initialised from -a disk file, so that it is as if [[getsuscep]]=0 for that initialisation. +a disk file, so that it is as if [[getsuscep]] = 0 for that initialisation. NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4732,26 +5069,24 @@ dimensions="scalar", defaultval=0, mnemonics="GET VEL from...", - text=""" + text=r""" These variables are typically used to chain the calculations, in the multi- -dataset mode ([[ndtset]]>0) since they describe from which dataset the +dataset mode ([[ndtset]] > 0) since they describe from which dataset the corresponding output variables are to be taken, as input of the present dataset. The atomic positions and velocities are [[EVOLVING]] variables, for which such a chain of calculation is useful. -Note that the use of **getxcart** and **getxred** differs when [[acell]] and +Note that the use of [[getxcart]] and [[getxred]] differs when [[acell]] and [[rprim]] are different from one dataset to the other. -If ==0, no use of previously computed values must occur. -If it is positive, its value gives the index of the dataset from which the -data are to be used as input data. It must be the index of a dataset already -computed in the SAME run. -If equal to -1, the output data of the previous dataset must be taken, which +If 0, no previously computed values are used. +If >0, the integer should correspond to the index of the dataset from which the VEL data should be used. It must be the index of a dataset already computed in the SAME run. +If equal to -1, the output data of the previous dataset is taken, which is a frequently occurring case. However, if the first dataset is treated, -1 is equivalent to 0, since no dataset has yet been computed in the same run. If another negative number, it indicates the number of datasets to go backward to find the needed data (once again, going back beyond the first dataset is equivalent to using a null get variable). -Note: **getxred** and **getxcart** cannot be simultaneously non-zero for the -same dataset. On the other hand the use of [[getvel]] with **getxred** is +Note: [[getxred]] and [[getxcart]] cannot be simultaneously non-zero for the +same dataset. On the other hand the use of [[getvel]] with [[getxred]] is allowed, despite the different coordinate system. """, ), @@ -4764,20 +5099,18 @@ dimensions="scalar", defaultval=0, mnemonics="GET the wavefunctions from _WFK file", - text=""" -Eventually used when [[ndtset]]>0 (in the multi-dataset mode), to indicate -starting wavefunctions, as an alternative to [[irdwfk]],[[irdwfq]],[[ird1wf]], -or [[irdddk]]. One should first read the explanations given for these latter variables. + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to [[irdwfk]],. +Note also that, starting Abinit v9, one can also use [[getwfk_path]] to specify the path of the file directly. + The [[getwfk]], **getwfq**, **get1wf** and **getddk** variables are typically used to chain the calculations in the multi-dataset mode, since they describe -from which dataset the OUTPUT wavefunctions are to be taken, as INPUT -wavefunctions of the present dataset. +from which dataset the OUTPUT wavefunctions are to be taken, as INPUT wavefunctions of the present dataset. -We now focus on the [[getwfk]] input variable (the only one used in ground- -state calculations), but the rules for **getwfq** and **get1wf** are similar, -with _WFK replaced by _WFQ or _1WF. -If [[getwfk]]==0, no use of previously computed output wavefunction file -appended with _DSx_WFK is done. +We now focus on the [[getwfk]] input variable (the only one used in ground-state calculations), +but the rules for **getwfq** and **get1wf** are similar, with _WFK replaced by _WFQ or _1WF. +If [[getwfk]] == 0, no use of previously computed output wavefunction file appended with _DSx_WFK is done. If [[getwfk]] is positive, its value gives the index of the dataset for which the output wavefunction file appended with _WFK must be used. If [[getwfk]] is -1, the output wf file with _WFK of the previous dataset must @@ -4785,15 +5118,11 @@ If [[getwfk]] is a negative number, it indicates the number of datasets to go backward to find the needed wavefunction file. In this case, if one refers to a non existent data set (prior to the first), the wavefunctions are not -initialised from a disk file, so that it is as if [[getwfk]]=0 for that +initialised from a disk file, so that it is as if [[getwfk]] = 0 for that initialisation. Thanks to this rule, the use of [[getwfk]] -1 is rather straightforward: except for the first wavefunctions, that are not initialized by reading a disk file, the output wavefunction of one dataset is input of the next one. -In the case of a ddk calculation in a multi dataset run, in order to compute -correctly the localisation tensor, it is mandatory to declare give getddk the -value of the current dataset (i.e. getddk3 3 ) - this is a bit strange and -should be changed in the future. NOTE: a negative value of a "get" variable indicates the number of datasets to go backwards; it is not the number to be subtracted from the current dataset to find the proper dataset. As an example: @@ -4812,14 +5141,14 @@ dimensions="scalar", defaultval=0, mnemonics="GET the fine grid wavefunctions from _WFK file", - text=""" -Eventually used when [[ndtset]]>0 (in the multi-dataset mode), to indicate + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate starting wavefunctions, as an alternative to [[irdwfkfine]]. One should first read the explanations given for these latter variables. The [[getwfkfine]] variables is typically used to chain the calculations in the multi-dataset mode, since they describe from which dataset the OUTPUT wavefunctions are to be taken, as INPUT wavefunctions of the present dataset. -If [[getwfkfine]]==0, no use of previously computed output wavefunction file +If [[getwfkfine]] == 0, no use of previously computed output wavefunction file appended with _DSx_WFK is done. If [[getwfkfine]] is positive, its value gives the index of the dataset for which the output wavefunction file appended with _WFK must be used. @@ -4828,7 +5157,7 @@ If [[getwfkfine]] is a negative number, it indicates the number of datasets to go backward to find the needed wavefunction file. In this case, if one refers to a non existent data set (prior to the first), the wavefunctions are not -initialised from a disk file, so that it is as if [[getwfkfine]]=0 for that +initialised from a disk file, so that it is as if [[getwfkfine]] = 0 for that initialisation. Thanks to this rule, the use of [[getwfkfine]] -1 is rather straightforward: except for the first wavefunctions, that are not initialized by reading a disk file, the output wavefunction of one dataset is input of the @@ -4844,7 +5173,8 @@ * one and only one of [[getwfkfine]] or [[irdwfkfine]] MUST be non-zero * if [[getwfkfine]] = 1: read ground state k -wavefunctions from a disk file appended with _WFK, produced in a previous ground state calculation. - * Reading the fine grid wavefunction will trigger the k-points interpolation technique of the temperature dependent calculations. + * Reading the fine grid wavefunction will trigger the k-points interpolation + technique of the temperature dependent calculations. Bethe-Salpeter calculation: @@ -4867,44 +5197,15 @@ dimensions="scalar", defaultval=0, mnemonics="GET the wavefunctions from _WFQ file", - text=""" -Eventually used when [[ndtset]]>0 (in the multi-dataset mode), to indicate -starting wavefunctions, as an alternative to [[irdwfk]],[[irdwfq]],[[ird1wf]] -or [[irdddk]]. One should first read the explanations given for these latter -variables. + text=r""" +Eventually used when [[ndtset]] > 0 (in the multi-dataset mode), to indicate +starting wavefunctions, as an alternative to [[irdwfq]]. +Note also that, starting Abinit v9, one can also use [[getwfq_path]] to specify the path of the file directly. + The **getwfk**, [[getwfq]], **get1wf** and **getddk** variables are typically used to chain the calculations in the multi-dataset mode, since they describe -from which dataset the OUTPUT wavefunctions are to be taken, as INPUT -wavefunctions of the present dataset. - -We now focus on the **getwfk** input variable (the only one used in ground- -state calculations), but the rules for [[getwfq]] and **get1wf** are similar, -with _WFK replaced by _WFQ or _1WF. -If **getwfk** ==0, no use of previously computed output wavefunction file -appended with _DSx_WFK is done. -If **getwfk** is positive, its value gives the index of the dataset for which -the output wavefunction file appended with _WFK must be used. -If **getwfk** is -1, the output wf file with _WFK of the previous dataset must -be taken, which is a frequently occurring case. -If **getwfk** is a negative number, it indicates the number of datasets to go -backward to find the needed wavefunction file. In this case, if one refers to -a non existent data set (prior to the first), the wavefunctions are not -initialised from a disk file, so that it is as if **getwfk** =0 for that -initialisation. Thanks to this rule, the use of **getwfk** -1 is rather -straightforward: except for the first wavefunctions, that are not initialized -by reading a disk file, the output wavefunction of one dataset is input of the -next one. -In the case of a ddk calculation in a multi dataset run, in order to compute -correctly the localisation tensor, it is mandatory to declare give getddk the -value of the current dataset (i.e. getddk3 3 ) - this is a bit strange and -should be changed in the future. -NOTE: a negative value of a "get" variable indicates the number of datasets -to go backwards; it is not the number to be subtracted from the current -dataset to find the proper dataset. As an example: - - ndtset 3 jdtset 1 2 4 getXXX -1 - -refers to dataset 2 when dataset 4 is initialized. +from which dataset the OUTPUT wavefunctions are to be taken, as INPUT wavefunctions of the present dataset. +See discussion in [[getwfk]] """, ), @@ -4916,16 +5217,16 @@ dimensions="scalar", defaultval=0, mnemonics="GET XCART from...", - text=""" + text=r""" These variables are typically used to chain the calculations, in the multi- -dataset mode ([[ndtset]]>0) since they describe from which dataset the +dataset mode ([[ndtset]] > 0) since they describe from which dataset the corresponding output variables are to be taken, as input of the present dataset. The atomic positions and velocities are [[EVOLVING]] variables, for which such a chain of calculation is useful. -Note that the use of [[getxcart]] and **getxred** differs when [[acell]] and +Note that the use of [[getxcart]] and [[getxred]] differs when [[acell]] and [[rprim]] are different from one dataset to the other. -If ==0, no use of previously computed values must occur. -If it is positive, its value gives the index of the dataset from which the +If 0, no previously computed values are used. +If >0, the integer must correspond to the index of the dataset from which the data are to be used as input data. It must be the index of a dataset already computed in the SAME run. If equal to -1, the output data of the previous dataset must be taken, which @@ -4934,8 +5235,8 @@ If another negative number, it indicates the number of datasets to go backward to find the needed data (once again, going back beyond the first dataset is equivalent to using a null get variable). -Note: **getxred** and [[getxcart]] cannot be simultaneously non-zero for the -same dataset. On the other hand the use of **getvel** with **getxred** is +Note: [[getxred]] and [[getxcart]] cannot be simultaneously non-zero for the +same dataset. On the other hand the use of [[getvel]] with [[getxred]] is allowed, despite the different coordinate system. """, ), @@ -4948,16 +5249,16 @@ dimensions="scalar", defaultval=0, mnemonics="GET XRED from...", - text=""" + text=r""" These variables are typically used to chain the calculations, in the multi- -dataset mode ([[ndtset]]>0) since they describe from which dataset the +dataset mode ([[ndtset]] > 0) since they describe from which dataset the corresponding output variables are to be taken, as input of the present dataset. The atomic positions and velocities are [[EVOLVING]] variables, for which such a chain of calculation is useful. -Note that the use of **getxcart** and [[getxred]] differs when [[acell]] and +Note that the use of [[getxcart]] and [[getxred]] differs when [[acell]] and [[rprim]] are different from one dataset to the other. -If ==0, no use of previously computed values must occur. -If it is positive, its value gives the index of the dataset from which the +If 0, no use of previously computed values must occur. +If >0, the integer must correspond to the index of the dataset from which the data are to be used as input data. It must be the index of a dataset already computed in the SAME run. If equal to -1, the output data of the previous dataset must be taken, which @@ -4966,8 +5267,8 @@ If another negative number, it indicates the number of datasets to go backward to find the needed data (once again, going back beyond the first dataset is equivalent to using a null get variable). -Note: [[getxred]] and **getxcart** cannot be simultaneously non-zero for the -same dataset. On the other hand the use of **getvel** with [[getxred]] is +Note: [[getxred]] and [[getxcart]] cannot be simultaneously non-zero for the +same dataset. On the other hand the use of [[getvel]] with [[getxred]] is allowed, despite the different coordinate system. """, ), @@ -4980,13 +5281,13 @@ dimensions="scalar", defaultval=0, mnemonics="Geometry Optimization PRECONditioner equations", - text=""" + text=r""" Set the kind of preconditioner to be used for Geometry Optimization (Note: Under development now (2011.05.20)) - * [[goprecon]]=0: No preconditioner - * [[goprecon]]=[1-9]: Linear preconditioner - * [[goprecon]]=[11-19]: Non-linear preconditioner + * [[goprecon]] = 0: No preconditioner + * [[goprecon]] = [1-9]: Linear preconditioner + * [[goprecon]] = [11-19]: Non-linear preconditioner """, ), @@ -4998,8 +5299,8 @@ dimensions=[3], defaultval=0, mnemonics="Geometry Optimization PREconditioner PaRaMeters equations", - text=""" -Set the paramenters use by the preconditioner to be used for Geometry + text=r""" +Set the parameters use by the preconditioner to be used for Geometry Optimization (Note: Under development now (2011.06.06)) """, @@ -5014,7 +5315,7 @@ defaultval=[-1, -1, -1, -1, -1], mnemonics="GPU: choice of DEVICES on one node", requires="[[use_gpu_cuda]] == 1 (CUDA functionality)", - text=""" + text=r""" To be used when several GPU devices are present on each node, assuming the same number of devices on all nodes. Allows to choose in which order the GPU devices are chosen and distributed @@ -5049,14 +5350,14 @@ defaultval=2000000, mnemonics="GPU (Cuda): LINear ALGebra LIMIT", requires="[[use_gpu_cuda]] == 1 (CUDA functionality)", - text=""" + text=r""" Use of linear algebra and matrix algebra on GPU is only efficient if the size of the involved matrices is large enough. The [[gpu_linalg_limit]] parameter defines the threshold above which linear (and matrix) algebra operations are done on the Graphics Processing Unit. The considered matrix size is equal to: -* SIZE=([[mpw]]*[[nspinor]]/ [[npspinor]])* ([[npband]]*[[bandpp]])**2 +* SIZE=([[mpw]] $\\times$ [[nspinor]] / [[npspinor]]) $\\times$ ([[npband]] $\\times$ [[bandpp]]) $^2$ When SIZE>=[[gpu_linalg_limit]], [[wfoptalg]] parameter is automatically set to 14 which corresponds to the use of LOBPCG algorithm for the calculation of @@ -5072,12 +5373,11 @@ dimensions="scalar", defaultval=0, mnemonics="GW CUSTOM FREQuencies for SPectral function", - requires="[[optdriver]]==4 and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + requires="[[optdriver]] == 4 and [[gwcalctyp]] in [2,9,12,19,22,29]", + text=r""" [[gw_customnfreqsp]] lets the user define the grid points along the real frequency axis by hand for the calculation of the self-energy along the real -axis. Set this to the number of frequencies you want. The frequencies are -specified with [[gw_freqsp]]. +axis. Set this to the number of frequencies you want. The frequencies are specified with [[gw_freqsp]]. """, ), @@ -5089,10 +5389,10 @@ dimensions=['[[gw_customnfreqsp]]'], defaultval=Range({'start': 1, 'stop': '[[gw_customnfreqsp]]'}), mnemonics="GW SPectral FREQuencies", - requires="[[optdriver]]==4 and [[gw_customnfreqsp]] > 0", - text=""" + requires="[[optdriver]] == 4 and [[gw_customnfreqsp]] > 0", + text=r""" [[gw_freqsp]] specifies the grid points for the real frequency axis when the -real and imaginary (spectral funtion) parts of sigma are calculated explicitly +real and imaginary (spectral function) parts of sigma are calculated explicitly for post-processing or plotting. Only activated if [[gw_customnfreqsp]] is not equal to 0. The number of frequencies is set by the value of [[gw_customnfreqsp]]. Example: @@ -5114,14 +5414,14 @@ defaultval=0, mnemonics="GW Contour Deformation FReQuencies on IMaginary axis Inverse Z Grid", requires="[[optdriver]] in [3,4] and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" -[[gw_frqim_inzgrid]] creates gridpoints along the **imaginary** frequency axis -by using an equidistant grid in the variable _z ⊂ [0,1] _ where the transform + text=r""" +[[gw_frqim_inzgrid]] creates grid points along the **imaginary** frequency axis +by using an equidistant grid in the variable $z \subset [0,1]$ where the transform is: -![](variables_assets/cd_inzgrid.png) +$$ i\omega^\prime = w_p \\frac{z}{1-z}. $$ -Here _ ω p _ is the plasma frequency (default can be overridden by setting +Here $\omega_p$ is the plasma frequency (default can be overridden by setting [[ppmfrq]]). The equidistant grid in z is determined uniquely by [[nfreqim]]) and the points are distributed so that half of them lie below the plasma frequency. """, @@ -5136,18 +5436,17 @@ defaultval=0, mnemonics="GW Contour Deformation FReQuencies on REal axis Inverse Z Grid", requires="[[optdriver]] in [3,4] and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + text=r""" [[gw_frqre_inzgrid]] creates grid points along the **real** frequency axis by -using an equidistant grid in the variable _z ⊂ [0,1] _ where the transform -is: +using an equidistant grid in the variable $z \subset [0,1]$ where the transform is: -![](variables_assets/cd_inzgrid_re.png) +$$ \omega = \omega_p \\frac{z}{1-z}. $$ -Here _ ω p _ is the plasma frequency (default can be overridden by setting +Here $\omega_p$ is the plasma frequency (default can be overridden by setting [[ppmfrq]]). The equidistant grid in z is determined uniquely by [[nfreqre]] ) and the points are distributed so that half of them lie below the plasma -frequency. This is useful in conjuction with [[gw_frqim_inzgrid]] if one needs -to use a grid which maps _[0, ∞[ -> [0,1] _. Note that typically _many_ more +frequency. This is useful in conjunction with [[gw_frqim_inzgrid]] if one needs +to use a grid which maps $[0, \infty] \\rightarrow [0,1]$. Note that typically _many_ more points are needed along the real axis in order to properly resolve peak structures. In contrast, both the screening and self-energy are very smooth along the imaginary axis. Also, please note that this is **not** an efficient @@ -5167,14 +5466,13 @@ defaultval=0, mnemonics="GW Contour Deformation FReQencies on REal axis - Use Tangent Grid", requires="[[optdriver]] in [3,4] and [[gwcalctyp]] in [2,9,12,19,22,29]", - text=""" + text=r""" [[gw_frqre_tangrid]] defines a nonuniform grid to be used in frequency, with -stepsize increasing proportional to tan(x). This makes the grid approximately +stepsize increasing proportional to $\\tan(x)$. This makes the grid approximately linear to start with, with a rapid increase towards the end. Also, this is the grid which gives equal importance to each point used in the integration of a -function which decays as 1/x^2. To be used in conjunction with [[nfreqre]], -[[cd_max_freq]] and [[cd_halfway_freq]] which determine the parameters of the -transformed grid. +function which decays as $1/x^2$. To be used in conjunction with [[nfreqre]], +[[cd_max_freq]] and [[cd_halfway_freq]] which determine the parameters of the transformed grid. """, ), @@ -5187,13 +5485,13 @@ defaultval=0, mnemonics="GW treatment of INVALID FREQuency for Hybertsen-Louie PPM", requires="[[optdriver]] in [3,4] and [[ppmodel]] in [2]", - text=""" + text=r""" [[gw_invalid_freq]] sets the procedure to follow when a PPM frequency is invalid (negative or imaginary). - * [[gw_invalid_freq]]=0: Drop them as proposed in Appendix B of PRB 34, 8, 5390, 1986. - * [[gw_invalid_freq]]=1: Set them to 1 hartree, as done for the PPM of Godby-Needs. - * [[gw_invalid_freq]]=2: Set them to infinity. + * [[gw_invalid_freq]] = 0: Drop them as proposed in Appendix B of [[cite:Hybertsen1986]]. + * [[gw_invalid_freq]] = 1: Set them to 1 hartree, as done for the PPM of Godby-Needs [[cite:Godby1989]]. + * [[gw_invalid_freq]] = 2: Set them to infinity. """, ), @@ -5206,29 +5504,29 @@ defaultval=1, mnemonics="GW, Number of Q-points for the Long Wave-Length Limit", requires="[[optdriver]] in [3,4,99]", - text=""" -Only relevant if [[optdriver]]=3,4,99 that is, screening, sigma or Bethe- + text=r""" +Only relevant if [[optdriver]] = 3,4,99 that is, screening, sigma or Bethe- Salpeter calculations, although the actual meaning of the variable depends on the particular run-level (see discussion below). [[gw_nqlwl]] defines the number of directions in reciprocal space used to -describe the non-analytical behaviour of the heads (G = G'=0) and the wings -(G=0 or G'=0) of the dielectric matrix in the optical limit (i.e. for q +describe the non-analytical behaviour of the heads ($G = G'=0$) and the wings +($G=0$ or $G'=0$) of the dielectric matrix in the optical limit (i.e. for $q$ tending to zero). The number of directions is specified by the additional variable [[gw_qlwl]]. -When [[optdriver]]=3, [[gw_nqlwl]] and **gw_qlwl** define the set of "small" q +When [[optdriver]] = 3, [[gw_nqlwl]] and **gw_qlwl** define the set of "small" $q$ that will be calculated and stored in the final SCR file. Therefore, the two variables can be used to analyze how the optical spectra depend on the direction of the incident phonon (useful especially in anisotropic systems). -When [[optdriver]]=4, [[gw_nqlwl]] and **gw_qlwl** can be used to specify the +When [[optdriver]] = 4, [[gw_nqlwl]] and **gw_qlwl** can be used to specify the heads and the wings to be used to perform the quadrature of the correlated part of the self-energy in the small region around the origin. (NB: not yet available, at present the quadrature is performed using a single direction in q-space) -When [[optdriver]]=99, [[gw_nqlwl]] and **gw_qlwl** define the set of +When [[optdriver]] = 99, [[gw_nqlwl]] and **gw_qlwl** define the set of directions in q-space along which the macroscopic dielectric function is evaluated. By default the Bethe-Salpeter code calculates the macroscopic dielectric function using six different directions in q-space (the three basis @@ -5244,9 +5542,9 @@ dimensions="scalar", defaultval=30, mnemonics="GW Number of self-consistent STEPs", - requires="[[optdriver]]==8", - text=""" -Gives the maximum number of self-consistent GW cycles (or "iterations"). in + requires="[[optdriver]] == 8", + text=r""" +Gives the maximum number of self-consistent GW cycles (or "iterations") in which G and/or W will be updated until the quasi-particle energies are converged within [[gw_toldfeig]]. [[gwcalctyp]] and [[gw_sctype]] are used to define the type of self-consistency. @@ -5262,8 +5560,8 @@ defaultval=[1e-05, 2e-05, 3e-05], mnemonics="GW, Q-points for the Long Wave-Length limit", requires="[[optdriver]] in [3,4,99]", - text=""" -When [[optdriver]]=3, [[gw_qlwl]] defines the set of q-points around Gamma + text=r""" +When [[optdriver]] = 3, [[gw_qlwl]] defines the set of q-points around Gamma that are considered during the evaluation of the non-analytical behaviour of the dielectric matrix. Optical spectra (with and without non-local field effects) are evaluated for each direction specified by [[gw_qlwl]]. @@ -5278,8 +5576,8 @@ dimensions="scalar", defaultval=0, mnemonics="GW QuasiParticle RANGE policy", - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" [[gw_qprange]] is active only when [[nkptgw]] is equal to zero (default value). This variable simplifies the specification of the list of kpoints and of the bands to be used for the computation of the quasi-particle corrections. @@ -5299,7 +5597,7 @@ Positive values are useful if we do not know the position of the GW HOMO, LOMO and we want to investigate the effect of the GW corrections on the states close to the gap Negative values are usually used for self-consistent -calculations Note that, in the case of self-consistency or symsigma=1, the +calculations Note that, in the case of self-consistency or [[symsigma]] == 1, the code might change the bands range so that all the degenerate states are included. Note also that [[kptgw]], and [[bdgw]] are ignored when this options is used. If you want to select manually the list of k-points and bands, you @@ -5316,7 +5614,7 @@ defaultval=1, mnemonics="GW, Self-Consistency TYPE", requires="[[optdriver]] in [3,4]", - text=""" + text=r""" This variable is used to partially define the kind of self-consistency for GW calculations. The other piece of information is given by [[gwcalctyp]] that defines the particular approximation for the self-energy operator as well as @@ -5348,9 +5646,9 @@ dimensions="scalar", defaultval=0, mnemonics="GW, SIGma (self-energy) for the CORE contribution", - requires="[[optdriver]]==4 and [[usepaw]]==1", - text=""" -Only available for PAW and relevant if [[optdriver]]=4 that is, sigma + requires="[[optdriver]] == 4 and [[usepaw]] == 1", + text=r""" +Only available for PAW and relevant if [[optdriver]] = 4 that is, sigma calculations. Theoretical introduction: GW calculations performed on top of electronic @@ -5385,12 +5683,12 @@ defaultval=ValueWithUnit(units='eV', value=0.1), mnemonics="GW TOLerance on the DiFference of the EIGenvalues", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==8", - text=""" + requires="[[optdriver]] == 8", + text=r""" Sets a tolerance for absolute differences of QP energies that will cause one self-consistent GW cycle to stop. Can be specified in Ha (the default), Ry, eV or Kelvin, since **toldfe** has -the '[[ENERGY]]' characteristics (1 Ha=27.2113845 eV) +the '[[ENERGY]]' characteristics (1 Ha = 27.2113845 eV) """, ), @@ -5398,27 +5696,27 @@ abivarname="gwcalctyp", varset="gw", vartype="integer", - topics=['GW_basic', 'SelfEnergy_basic'], + topics=['GW_basic', 'SelfEnergy_basic', 'RPACorrEn_compulsory'], dimensions="scalar", defaultval=0, mnemonics="GW CALCulation TYPe", requires="[[optdriver]] in [3,4]", - text=""" + text=r""" [[gwcalctyp]] governs the choice between the different capabilities of the GW code. - * 0 <= [[gwcalctyp]] <= 9: standard "1 shot" quasiparticle method - * 10 <= [[gwcalctyp]] <= 19: self-consistent quasiparticle method on energies only - * 20 <= [[gwcalctyp]] <= 29: self-consistent quasiparticle method on energies and wavefunctions + * 0 <= [[gwcalctyp]] <= 9: standard "1 shot" quasi-particle method. + * 10 <= [[gwcalctyp]] <= 19: self-consistent quasi-particle method on energies only. + * 20 <= [[gwcalctyp]] <= 29: self-consistent quasi-particle method on energies and wavefunctions. - * [[gwcalctyp]] = 0, 10, or 20: standard Plasmon-Pole model GW calculation - * [[gwcalctyp]] = 1: GW calculation where the self-energy along the real axis is obtained by performing the analytic continuation from the imaginary axis to the full complex plane via the Pade approximant. Only available for standard "1 shot" quasiparticle method. - * [[gwcalctyp]] = 2, 12, or 22: GW calculation using numerical integration (contour deformation method, see e.g. S. Lebegue _et al._ PRB **67**, 155208 (2003).) - * [[gwcalctyp]] = 5, 15, or 25: Hybrid functional or Hartree-Fock calculation, with the identifier of the functional given by [[ixc_sigma]]. See the latter for the definition of other related variables. - * [[gwcalctyp]] = 6, 16, or 26: Screened Exchange calculation - * [[gwcalctyp]] = 7, 17, or 27: COHSEX calculation - * [[gwcalctyp]] = 8, 18, or 28: model GW calculation following S. Faleev _et al._ PRL **93**, 126406 (2004) using a Plasmon-Pole model - * [[gwcalctyp]] = 9, 19, or 29: model GW calculation following S. Faleev _et al._ PRL **93**, 126406 (2004) using numerical integration (contour deformation method) + * [[gwcalctyp]] = 0, 10, or 20: standard Plasmon-Pole model GW calculation. + * [[gwcalctyp]] = 1: GW calculation where the self-energy along the real axis is obtained by performing the analytic continuation from the imaginary axis to the full complex plane via the Pade approximant. Only available for standard "1 shot" quasi-particle method. + * [[gwcalctyp]] = 2, 12, or 22: GW calculation using numerical integration (contour deformation method, see e.g. [[cite:Lebegue2003]]). + * [[gwcalctyp]] = 5, 15, or 25: Hybrid functional or Hartree-Fock calculation, with the identifier of the functional given by [[ixc_sigma]]. See the latter for the definition of other related variables. + * [[gwcalctyp]] = 6, 16, or 26: Screened Exchange calculation. + * [[gwcalctyp]] = 7, 17, or 27: COHSEX calculation. + * [[gwcalctyp]] = 8, 18, or 28: model GW calculation following [[cite:Faleev2004]] using a Plasmon-Pole model. + * [[gwcalctyp]] = 9, 19, or 29: model GW calculation following [[cite:Faleev2004]] using numerical integration (contour deformation method). """, ), @@ -5431,13 +5729,13 @@ defaultval=0, mnemonics="GW COMPleteness", requires="[[optdriver]] in [3,4]", - text=""" -[[gwcomp]] governs the use of an extrapolar approximation. If [[gwcomp]]==1, + text=r""" +[[gwcomp]] governs the use of an extrapolar approximation. If [[gwcomp]] == 1, one improves the completeness in a truncated sum over states. In practice, this permits one to reduce quite much the number of bands required in the calculation of the screening or of the self-energy. The energy parameter -needed in the extrapolar approximation is set by [[gwencomp]]. See F. -Bruneval, X. Gonze, Phys. Rev. B 78, 085125 (2008) for a description of the methodology. +needed in the extrapolar approximation is set by [[gwencomp]]. See +[[cite:Bruneval2008]] for a description of the methodology. """, ), @@ -5449,13 +5747,13 @@ dimensions="scalar", defaultval=2.0, mnemonics="GW ENergy for COMPleteness", - requires="[[optdriver]] in [3,4] and [[gwcomp]]==1", - text=""" + requires="[[optdriver]] in [3,4] and [[gwcomp]] == 1", + text=r""" [[gwencomp]] sets the energy parameter used in the extrapolar approximation used to improve completeness and make the convergence against the number of bands much faster. -See F. Bruneval, X. Gonze, Phys. Rev. B 78, 085125 (2008) for a description of the methodology. +See [[cite:Bruneval2008]] for a description of the methodology. """, ), @@ -5467,8 +5765,8 @@ dimensions="scalar", defaultval=0, mnemonics="GW GAMMA", - requires="[[optdriver]]=3 or 4 (Sigma calculations)", - text=""" + requires="[[optdriver]] = 3 or 4 (Sigma calculations)", + text=r""" If [[gwgamma]] is 1, the vertex correction will be included leading to what is known as "GW-Gamma" approximation. see R. Del Sole, L. Reining, and R. W. Godby, Phys. Rev. B 49, 8024 (1994). Note that, in order to include the vertex @@ -5476,14 +5774,15 @@ susceptibility file_SUSC instead of the _SCR file (see [[getsuscep]] and [[irdsuscep]] ) Not available for PAW calculations. -[[gwgamma]]=-4 activates the bootstrap kernel of Sharma et al. [Phys. Rev. -Lett. 107, 186401 (2011)] in the test-charge-test-charge dielectric function -[cf. Chen and Pasquarello, Phys. Rev. B 92, 041115(R) (2015)]. A cheaper one- -shot variant can be achieved with [[gwgamma]]=-6 using only the head of the -kernel. +[[gwgamma]] = -4 activates the bootstrap kernel of Sharma et al. [[cite:Sharma2011]] +in the test-charge-test-charge dielectric function [[cite:Chen2015]]. -[[gwgamma]]=-8 uses the RPA bootstrap-like kernel (one-shot) [Phys. Rev. Lett. -115, 137402 (2015), ibid. 114, 146402 (2015)]. +[[gwgamma]] = -6 uses the same bootstrap kernel as with [[gwgamma]] = -4 +but with only the head of the kernel. As such, the self-consistent iteration in the kernel +can be disregarded [[cite:Chen2016]]. + +[[gwgamma]] = -8 activates the RPA bootstrap-like kernel (one-shot) (see [[cite:Berger2015]] +and [[cite:Rigamonti2015]]). """, ), @@ -5495,10 +5794,10 @@ dimensions="scalar", defaultval=1, mnemonics="GWLS BAND INDEX", - requires="[[optdriver]]==66", - text=""" -Governs the DFT eigenstate |e> in which the self-energy will be evaluated, as -shown in eq. (7) of Phys. Rev. B 91, 125120 (2015). That is, it is the state + requires="[[optdriver]] == 66", + text=r""" +Governs the DFT eigenstate $|e\\rangle$ in which the self-energy will be evaluated, as +shown in Eq. (7) of [[cite:Laflamme2015]]. That is, it is the state to be corrected in the G0W0 scheme. """, ), @@ -5511,18 +5810,18 @@ dimensions="scalar", defaultval=3, mnemonics="GWLS CORRELATION", - requires="[[optdriver]]==66", - text=""" -Governs the use of a dielectric model (as explained in section V of Phys. Rev. -B 91, 125120 (2015). and the use of the Lanczos scheme to solve eqs. (30) and + requires="[[optdriver]] == 66", + text=r""" +Governs the use of a dielectric model (as explained in Sec. V of +[[cite:Laflamme2015]] and the use of the Lanczos scheme to solve Eqs. (30) and (35) of the same reference at all external [[gw_freqsp]] and integration (as generated from [[gwls_npt_gauss_quad]]) frequencies. The different choices are: - * [[gwls_correlation]] == 1: GWLS calculation WITH the dielectric model and WITHOUT the shift Lanczos technique, - * [[gwls_correlation]] == 2: GWLS calculation WITHOUT the dielectric model and WITHOUT the shift Lanczos technique, - * [[gwls_correlation]] == 3: GWLS calculation WITH the dielectric model and WITH the shift Lanczos technique, - * [[gwls_correlation]] == 4: GWLS calculation WITHOUT the dielectric model and WITH the shift Lanczos technique, + * [[gwls_correlation]] == 1: GWLS calculation **with** the dielectric model and **without** the shift Lanczos technique, + * [[gwls_correlation]] == 2: GWLS calculation **without** the dielectric model and **without** the shift Lanczos technique, + * [[gwls_correlation]] == 3: GWLS calculation **with** the dielectric model and **with** the shift Lanczos technique, + * [[gwls_correlation]] == 4: GWLS calculation **without** the dielectric model and **with** the shift Lanczos technique, * [[gwls_correlation]] == 5: Not a GWLS calculation; just calculate and print the eigenvalues of the (static) dielectric matrix (for debugging purposes). The default, ([[gwls_correlation]] == 3), is the most performant option and @@ -5539,8 +5838,8 @@ dimensions="scalar", defaultval=2, mnemonics="GWLS dielectric model", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" Not used yet. """, ), @@ -5553,11 +5852,11 @@ dimensions="scalar", defaultval=1, mnemonics="GWLS exact EXCHANGE", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" Governs whether the exact exchange for the state to be corrected -([[gwls_band_index]]) is calculated ([[gwls_exchange]]==1) or not -([[gwls_exchange]]==0). +([[gwls_band_index]]) is calculated ([[gwls_exchange]] == 1) or not +([[gwls_exchange]] = =0). """, ), @@ -5569,17 +5868,17 @@ dimensions="scalar", defaultval="[[gwls_band_index]]", mnemonics="GWLS FIRST SEED vector", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" This variable sets the band index to be used to generate the first seed vector to be used in the construction of the Lanczos basis for the (static) -dielectric matrix in a GWLS calculation. See section IV of Phys. Rev. B 91, -125120 (2015). Together with [[gwls_nseeds]], defines the seeds for the +dielectric matrix in a GWLS calculation. See Sec. IV of [[cite:Laflamme2015]]. +Together with [[gwls_nseeds]], this defines the seeds for the Lanczos procedure. That is, the states associated to band index [[gwls_first_seed]] to [[gwls_first_seed]]+[[gwls_nseeds]]-1 are used to generate the seed vectors. -The default [[gwls_first_seed]]==[[gwls_band_index]] and [[gwls_nseeds]]==1 +The default [[gwls_first_seed]] == [[gwls_band_index]] and [[gwls_nseeds]] == 1 has been thoroughly tested and seems to be the most performant. Users should therefore keep the default value. """, @@ -5593,10 +5892,10 @@ dimensions="scalar", defaultval=8, mnemonics="GWLS KMAX for the ANALYTIC term", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" Governs the number of iterations to be done in the shift Lanczos solution of -eq. (35) of Phys. Rev. B 91, 125120 (2015) to solve it at all external +Eq. (35) of [[cite:Laflamme2015]] to solve it at all external frequencies requested by the user ([[gw_freqsp]]). The default value is converged to a few 10s of meV for all molecules studied so far. """, @@ -5610,22 +5909,22 @@ dimensions="scalar", defaultval=1, mnemonics="GWLS KMAX for the COMPLEMENT space.", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" The G0W0 formalism involves the calculation of a summation conceptually linked -to the trace of the dielectric matrix (see eq. (38) of Phys. Rev. B 91, 125120 -(2015). Since the eigenvalues spectrum of the dielectric matrix of formed by a +to the trace of the dielectric matrix [see Eq. (38) of [[cite:Laflamme2015]]\]. +Since the eigenvalues spectrum of the dielectric matrix of formed by a few large discrete eigenvalues and an integrable divergence in the density of eigenvalues around 0, it is expensive to sample accurately this divergence using the exact dielectric operator. It this becomes interesting to calculate the 'trace' of the 'exact - model' dielectric matrix in a small basis and add -it to the 'trace' of the 'model' dielectric matrix obtained in a large bais. +it to the 'trace' of the 'model' dielectric matrix obtained in a large basis. In the context where the model dielectric matrix is used in the calculations, [[gwls_stern_kmax]] determines the size of the 'small' basis and [[gwls_kmax_complement]] determines the size of the 'large' basis. For more information on the exact role of these bases and on the model -dielectric operator used, see section V of Phys. Rev. B 91, 125120 (2015). +dielectric operator used, see Sec. V of [[cite:Laflamme2015]]. """, ), @@ -5637,10 +5936,10 @@ dimensions="scalar", defaultval=16, mnemonics="GWLS KMAX for the NUMERIC term", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" Governs the number of iterations to be done in the shift Lanczos solution of -eq. (30) of Phys. Rev. B 91, 125120 (2015) to solve it simultaneously at all +Eq. (30) of [[cite:Laflamme2015]] to solve it simultaneously at all integration frequencies (generated automatically by the number of points [[gwls_npt_gauss_quad]] to use in the gaussian quadrature) and all external frequencies requested by the user ([[gw_freqsp]]). The default value is @@ -5656,13 +5955,13 @@ dimensions="scalar", defaultval=4, mnemonics="GWLS KMAX for the calculation of the POLES residue", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" The contour deformation technique, in the G0W0 context, will involve the calculation of pole residues associated to states lying between the one -corrected ([[gwls_band_index]]) and the fermi level. These residues take the +corrected ([[gwls_band_index]]) and the Fermi level. These residues take the form of a matrix element of the inverse dielectric matrix at a real frequency -(see eq. (11) of Phys. Rev. B 91, 125120 (2015)). Therefore, the dielectric +[see Eq. (11) of [[cite:Laflamme2015]]\]. Therefore, the dielectric matrix must be constructed in some basis at these frequencies and inverted to calculate the matrix element. The present input variable sets the size of the Lanczos basis to be constructed for this purpose. The default value has proven @@ -5670,7 +5969,7 @@ the default value by the user. For more information on the Lanczos basis constructed for the calculation of -the residues, see section IV of Phys. Rev. B 91, 125120 (2015). +the residues, see Sec. IV of [[cite:Laflamme2015]]. """, ), @@ -5682,14 +5981,14 @@ dimensions=['[[gwls_n_proj_freq]]'], defaultval="*0.0", mnemonics="GWLS LIST of the PROJection FREQuencies", - requires="[[optdriver]]==66", + requires="[[optdriver]] == 66", text=r""" This variable sets the frequencies to be used to construct the basis in which the Hamiltonian is projected to accelerate the solution of the Sternheimer equations involved by the construction of the dielectric matrix at finite -frequencies. See section VI of Phys. Rev. B 91, 125120 (2015). For most cases, -since the frequencies $\infty$ and (if [[gwls_recycle]]>0) 0.0 are used at no -computational cost, [[gwls_n_proj_freq]]==0 (which means no ADDITIONAL +frequencies. See Sec. VI of [[cite:Laflamme2015]]. For most cases, +since the frequencies $\infty$ and 0.0 (if [[gwls_recycle]] > 0) are used at no +computational cost, [[gwls_n_proj_freq]] == 0 (which means no ADDITIONAL frequency is to be used) is fine and no frequencies need to be picked up. """, ), @@ -5703,23 +6002,23 @@ defaultval=1.0, mnemonics="GWLS MODEL PARAMETER", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==66", + requires="[[optdriver]] == 66", text=r""" This is the width of the lorentzian, in Ha, used to model the frequency -dependence of the dielectric matrix in the GWLS calculation (see eqs. (12), -(13), (14), (15), (16) and (34) of Phys. Rev. B 91, 125120 (2015)). More -precisely, this parameter is the value of $\alpha$ used in eq. (34). This model +dependence of the dielectric matrix in the GWLS calculation [see Eqs. (12-16) +and (34) of [[cite:Laflamme2015]]\]. More +precisely, this parameter is the value of $\alpha$ used in Eq. (34). This model is then used to separate the integration over frequencies into a 'model' part -(second term of eq. (12)) and a 'exact - model' part (first term of eq. (12)). -Since the 'model' part can be integrated analytically (see eqs. (15), (16) and -(34)), only the the 'exact - model' part needs to be integrated numerically. +[second term of Eq. (12)] and an 'exact - model' part [first term of Eq. (12)]. +Since the 'model' part can be integrated analytically [see Eqs. (15), (16) and +(34)], only the 'exact - model' part needs to be integrated numerically. The only effect of this model is therefore to alleviate the numerical cost of the integration over frequencies in the G0W0 calculation. The value of the associated parameter has thus an impact on the convergence rate of the GWLS calculation with respect to the number of frequencies of integration ([[gwls_npt_gauss_quad]]), but no impact on the converged result of the GWLS -calculation. Typically, the default ([[gwls_model_parameter]]==1.0) is optimal. +calculation. Typically, the default ([[gwls_model_parameter]] == 1.0) is optimal. """, ), @@ -5731,15 +6030,14 @@ dimensions="scalar", defaultval=0, mnemonics="GWLS Number of PROJection FREQuencies", - excludes="", - requires="[[optdriver]]==66", + requires="[[optdriver]] == 66", text=r""" -This variable sets the number of frequencies, on top of $\infty$ and (if -[[gwls_recycle]]>0) 0.0, to be used for the construction of the basis in which -the hamiltonian is projected to accelerate the solution of the Sternheimer +This variable sets the number of frequencies, on top of $\infty$ and 0.0 (if +[[gwls_recycle]] > 0), to be used for the construction of the basis in which +the Hamiltonian is projected to accelerate the solution of the Sternheimer equations involved in the construction of the dielectric matrix at finite -frequencies. See section VI of Phys. Rev. B 91, 125120 (2015). For most cases, -the default ([[gwls_n_proj_freq]]==0) is fine. +frequencies. See Sec. VI of [[cite:Laflamme2015]]. For most cases, +the default ([[gwls_n_proj_freq]] == 0) is fine. """, ), @@ -5751,12 +6049,11 @@ dimensions="scalar", defaultval=10, mnemonics="GWLS Number of PoinTs to use for the GAUSSian QUADrature", - excludes="", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" This variable defines the number of points used for the numerical integration -of the self-energy over frequencies in GWLS computations (see eq. (12) of -Phys. Rev. B 91, 125120 (2015)). The default is fine for most cases. +of the self-energy over frequencies in GWLS computations [see Eq. (12) of +[[cite:Laflamme2015]]\]. The default is fine for most cases. """, ), @@ -5768,11 +6065,11 @@ dimensions="scalar", defaultval=1, mnemonics="GWLS Number of SEED vectorS", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" This variable sets the number of seed vectors to be used in the construction of the Lanczos basis for the (static) dielectric matrix in a GWLS calculation. -See section IV of Phys. Rev. B 91, 125120 (2015). Only [[gwls_nseeds]]==1 has +See Sec. IV of [[cite:Laflamme2015]]. Only [[gwls_nseeds]] == 1 has been tested for now and users should keep this value. """, ), @@ -5785,8 +6082,8 @@ dimensions="scalar", defaultval=0, mnemonics="GWLS PRINT level for DEBUGging", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" Influences the level of verbosity for debugging purposes in a GWLS calculation. Users should keep its value at the default. """, @@ -5800,21 +6097,21 @@ dimensions="scalar", defaultval=2, mnemonics="GWLS RECYCLE", - requires="[[optdriver]]==66", + requires="[[optdriver]] == 66", text=r""" This variable let the user choose if and how he wants to recycle the solutions of the Sternheimer equations involved in the construction of the static dielectric matrix. - * [[gwls_recycle]]==0: No recycling of the solutions - * [[gwls_recycle]]==1: Recycle the solutions. To do so, store them in RAM. - * [[gwls_recycle]]==2: Recycle the solutions. To do so, store them on disk. + * [[gwls_recycle]] = 0: No recycling of the solutions. + * [[gwls_recycle]] = 1: Recycle the solutions. To do so, store them in RAM. + * [[gwls_recycle]] = 2: Recycle the solutions. To do so, store them on disk. If the user choose to recycle the solutions, they are used to construct the -basis in which the hamiltonian is projected for the solution of the +basis in which the Hamiltonian is projected for the solution of the Sternheimer equations involved by the calculation of the dielectric matrix at -finite frequencies. The other solutions used will be those at $\omega \to \Infty$ -(alwyas used) and those at \omega=[[gwls_list_proj_freq]]. For more -information of the basis constructed, see section IV of Phys. Rev. B 91, 125120 (2015). +finite frequencies. The other solutions used will be those at $\omega \to \infty$ +(always used) and those at $\omega=$[[gwls_list_proj_freq]]. For more +information of the basis constructed, see Sec. IV of [[cite:Laflamme2015]]. It is important to note that the solutions rapidly take much space to store. Therefore, it is often not possible to store them in RAM in production @@ -5834,12 +6131,12 @@ dimensions="scalar", defaultval=1, mnemonics="GWLS Kmax", - requires="[[optdriver]]==66", - text=""" + requires="[[optdriver]] == 66", + text=r""" This variable sets the dimension of the dielectric matrix used in a GWLS -calculation (see section IV of Phys. Rev. B 91, 125120 (2015)). Typically +calculation [see Sec. IV of [[cite:Laflamme2015]]\]. Typically converged at a value of a few hundreds to a few thousands for a convergence -criterion of 50meV on the eigenenergies. +criterion of 50 meV on the eigenenergies. """, ), @@ -5852,7 +6149,7 @@ defaultval=11, mnemonics="GW MEMory", requires="[[optdriver]] in [3,4]", - text=""" + text=r""" [[gwmem]] governs the memory strategy during a screening and/or a sigma run. * [[gwmem]] = 1x, the screening matrix are read for all q-vectors and stored in the memory. @@ -5877,16 +6174,16 @@ mnemonics="GW PARAllelization level", commentdefault="The default value has been changed in v8. From 1 to 2", requires="[[optdriver]] in [3,4]", - text=""" + text=r""" gwpara is used to choose between the two different parallelization levels available in the GW code. The available options are: - * 1 --> parallelisation on k points - * 2 --> parallelisation on bands + * 1 --> parallelisation on k points. + * 2 --> parallelisation on bands. In the present status of the code, only the parallelization over bands -([[gwpara]]=2) allows to reduce the memory allocated by each processor. -Using [[gwpara]]=1, indeed, requires the same amount of memory as a sequential +([[gwpara]] = 2) allows one to reduce the memory allocated by each processor. +Using [[gwpara]] = 1, indeed, requires the same amount of memory as a sequential run, irrespectively of the number of CPUs used. """, ), @@ -5895,33 +6192,61 @@ abivarname="gwrpacorr", varset="gw", vartype="integer", - topics=['RPACorrEn_expert'], + topics=['RPACorrEn_compulsory'], dimensions="scalar", defaultval=0, mnemonics="GW RPA CORRelation energy", - requires="[[optdriver]]==3 and [[gwcalctyp]] in [1,11,21]", - text=""" + requires="[[optdriver]] == 3 and [[gwcalctyp]] in [1,11,21]", + text=r""" [[gwrpacorr]] governs the calculation of the RPA correlation energy. - * [[gwrpacorr]] = 0, no RPA correlation energy is calculated + * [[gwrpacorr]] = 0, no RPA correlation energy is calculated. * [[gwrpacorr]] = 1, the RPA correlation energy is calculated using an exact integration - over the coupling constant: it requires one diagonalization of the polarizability matrix - * [[gwrpacorr]] = _n_ > 1, the RPA correlation energy is calculated using _n_ values - for the coupling constant: it requires _n_ inversions of the polarizability matrix + over the coupling constant: it requires one diagonalization of the polarizability matrix. + * [[gwrpacorr]] = $n$ > 1, the RPA correlation energy is calculated using $n$ values + for the coupling constant: it requires $n$ inversions of the polarizability matrix. """, ), Variable( - abivarname="hyb_mixing", - varset="gstate", + abivarname="hmctt", + varset="rlx", + vartype="integer", + topics=['MolecularDynamics_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="Hybrid Monte Carlo Trial Trajectory", + requires="[[ionmov]] == 25", + text=r""" +Number of steps per MC trial trajectory, for the Hybrid Monte Carlo algorithm [[ionmov]]=25. +""", +), + +Variable( + abivarname="hmcsst", + varset="rlx", + vartype="integer", + topics=['MolecularDynamics_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="Hybrid Monte Carlo Strain Step Trajectory", + requires="[[ionmov]] == 25", + text=r""" +Number of strain teps per MC trial trajectory, for the Hybrid Monte Carlo algorithm [[ionmov]]=25. +""", +), + +Variable( + abivarname="hyb_mixing", + varset="gstate", vartype="real", topics=['Hybrids_expert'], dimensions="scalar", defaultval="-999.0d0", mnemonics="HYBrid MIXING coefficient for unscreened fock operator", commentdefault="With the default, [[hyb_mixing]] is initialized from [[ixc]].", - requires="[[usefock]]>0", - text=""" + requires="[[usefock]] > 0", + text=r""" Mixing coefficient for the unscreened Fock operator in case of hybrid functionals. Hartree-Fock corresponds to 1.0, PBE0 to 0.25. @@ -5938,8 +6263,8 @@ defaultval="-999.0d0", mnemonics="HYBrid MIXING coefficient for Short-Range screened fock operator", commentdefault="With the default, [[hyb_mixing_sr]] is initialized from [[ixc]].", - requires="[[usefock]]>0", - text=""" + requires="[[usefock]] > 0", + text=r""" Mixing coefficient for the screened Fock operator in case of hybrid functionals. HSE has 0.25, B3LYP has 0.2. @@ -5957,19 +6282,19 @@ defaultval="-999.0d0 or [[hyb_range_fock]] if it is defined by the user", mnemonics="HYBrid RANGE for the DFT leftover from the screened fock operator", commentdefault="With the default=-999.0d0, [[hyb_range_dft]] is initialized from [[ixc]].", - requires="[[usefock]]>0", - text=""" + requires="[[usefock]] > 0", + text=r""" Range of the DFT leftover from the screened Fock operator in case of hybrid functionals (actually, coefficient of the distance appearing in the erf function, thus it has the dimension of an inverse distance). As described in the LibXC sources (and copied in the ABINIT doc, see -[[ixc]]=-428), there is a mess due to an error in the original publication. +[[ixc]] = -428), there is a mess due to an error in the original publication. ABINIT knows the LibXC value from [[ixc]], that might not agree with the definitions from other codes. Usually, [[hyb_range_dft]] is the same as [[hyb_range_fock]], see the latter for the different values. However, there is a noticeable exception, the HSE03 from the original paper (not the HSE03 from VASP), -for which [[hyb_range_dft]]=0.188988 while [[hyb_range_fock]]=0.106066. +for which [[hyb_range_dft]] = 0.188988 while [[hyb_range_fock]] = 0.106066. """, ), @@ -5982,21 +6307,21 @@ defaultval="-999.0d0 or [[hyb_range_dft]] if it is defined by the user", mnemonics="HYBrid RANGE for the screened FOCK operator", commentdefault="With the default=-999.0d0, [[hyb_range_fock]] is initialized from [[ixc]].", - requires="[[usefock]]>0", - text=""" + requires="[[usefock]] > 0", + text=r""" Range of the screened Fock operator in case of hybrid functionals (actually, coefficient of the distance appearing in the erf function, thus it has the dimension of an inverse distance). As described in the LibXC sources (and copied in the ABINIT doc, see -[[ixc]]=-428), there is a mess due to an error in the original publication. +[[ixc]] = -428), there is a mess due to an error in the original publication. ABINIT knows the LibXC value from [[ixc]], that might not agree with the definitions from other codes. Usually, [[hyb_range_dft]] is the same as [[hyb_range_fock]], with one exception explained in [[hyb_range_dft]]. -The HSE06 value from LibCX is 0.11, the one of Espresso is 0.106, the one of -VASP is 0.105835 (=0.2 Angstrom$^-1$). -The HSE03 value from LibCX is 0.106066 (=0.15/sqrt(2)), the one of VASP is -0.1587531 (=0.3 Angstrom$^-1$). +The HSE06 value from LibCX is 0.11, the one of Quantum Espresso is 0.106, the one of +VASP is 0.105835 (=0.2 $\AA^{-1}$). +The HSE03 value from LibCX is 0.106066 ($=0.15/\sqrt{2})$), the one of VASP is +0.1587531 (=0.3 $\AA^{-1}$). """, ), @@ -6009,12 +6334,11 @@ defaultval=0, mnemonics="Indices of AToms in CONstraint equations", characteristics=['[[NO_MULTI]]', '[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the indices of the atoms appearing in each of the [[nconeq]] independent equations constraining the motion of atoms during structural optimization or molecular dynamics (see [[nconeq]], [[natcon]], and [[wtatcon]]). -(Note: combined with wtatcon to give internal representation of the latter - -this should be described) +(Note: combined with [[wtatcon]] to give internal representation of the latter) """, ), @@ -6026,7 +6350,7 @@ dimensions=['[[natfix]]'], mnemonics="Indices of AToms that are FIXed", requires="[[natfix]] > 0", - text=""" + text=r""" Give the index (in the range 1 to [[natom]] ) of each atom which is to be held fixed for structural optimization or molecular dynamics. The variable [[iatfix]] lists those fixed in the three directions, while the variables @@ -6061,7 +6385,7 @@ mnemonics="Indices of AToms that are FIXed along the X direction", characteristics=['[[INPUT_ONLY]]'], requires="[[natfixx]] > 0", - text=""" + text=r""" Give the index (in the range 1 to [[natom]] ) of each atom which is to be held fixed ALONG THE X direction for structural optimization or molecular dynamics. The variable [[iatfix]] lists those fixed in the three directions, while the @@ -6080,7 +6404,7 @@ mnemonics="Indices of AToms that are FIXed along the Y direction", characteristics=['[[INPUT_ONLY]]'], requires="[[natfixy]] > 0", - text=""" + text=r""" Give the index (in the range 1 to [[natom]] ) of each atom which is to be held fixed ALONG THE Y direction for structural optimization or molecular dynamics. The variable [[iatfix]] lists those fixed in the three directions, while the @@ -6099,7 +6423,7 @@ mnemonics="Indices of AToms that are FIXed along the Z direction", characteristics=['[[INPUT_ONLY]]'], requires="[[natfixz]] > 0", - text=""" + text=r""" Give the index (in the range 1 to [[natom]] ) of each atom which is to be held fixed ALONG THE Z direction for structural optimization or molecular dynamics. The variable [[iatfix]] lists those fixed in the three directions, while the @@ -6115,14 +6439,14 @@ vartype="integer", topics=['printing_prdos', 'ElecBandStructure_useful', 'ElecDOS_useful'], dimensions=['[[natsph]]'], - defaultval=Range({'start': 1, 'stop': '[[natsph]]'}), + defaultval=Range(start=1, stop='[[natsph]]'), mnemonics="Index for the ATomic SPHeres of the atom-projected density-of-states", requires="[[prtdos]] == 3 or [[pawfatbnd]] in [1,2]", - text=""" + text=r""" [[iatsph]] gives the number of the [[natsph]] atoms around which the sphere -for atom-projected density-of-states will be build, in the [[prtdos]]=3 case. +for atom-projected density-of-states will be build, in the [[prtdos]] = 3 case. The radius of these spheres is given by [[ratsph]]. -If [[pawfatbnd]]=1 or 2, it gives the number of the [[natsph]] atoms around +If [[pawfatbnd]] = 1 or 2, it gives the number of the [[natsph]] atoms around which atom-projected band structure will be built. """, ), @@ -6135,7 +6459,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer governing the internal use of BOXCUT - not a very good choice of variable name", - text=""" + text=r""" Concern all summations in the reciprocal space and is allowed in PAW and norm-conserving. * if set to 0 all reciprocal space summations are done in a sphere contained in the FFT box. @@ -6150,13 +6474,13 @@ topics=['Coulomb_useful'], dimensions="scalar", defaultval=0, - mnemonics="Index for the Coulomb TReaTMenT", - text=""" + mnemonics="Index for the COULOMB treatment", + text=r""" Defines the type of computation used for Hartree potential, local part of pseudo-potential and ion-ion interaction: - * [[icoulomb]]=0: usual reciprocal space computation, using 1 / g^2 for the Hartree potential and using Ewald correction. - * [[icoulomb]]=1: free boundary conditions are used when the Hartree potential is computed, + * [[icoulomb]] = 0: usual reciprocal space computation, using $1/\GG^2$ for the Hartree potential and using Ewald correction. + * [[icoulomb]] = 1: free boundary conditions are used when the Hartree potential is computed, real space expressions of pseudo-potentials are involved (restricted to GTH pseudo-potentials) and simple coulomb interaction gives the ion-ion energy. """, @@ -6171,12 +6495,12 @@ defaultval=6, mnemonics="Integer that governs the CUT-off for COULomb interaction", requires="[[optdriver]] in [3,4]", - text=""" + text=r""" Many-body calculations for isolated systems present a slow convergence with respect to the size of the supercell due to the long ranged Coulomb interaction and the high degree of non-locality of the operators involved. A similar issue also occurs in fully periodic systems due to the presence of the -integrable Coulomb singularity at G=0 that hinders the convergence with +integrable Coulomb singularity at $\mathbf{G}=0$ that hinders the convergence with respect to the number of q-points used to sample the Brillouin zone. The convergence can be accelerated by replacing the true bare Coulomb interaction with other expressions. @@ -6186,19 +6510,21 @@ of the system. Possible values of [[icutcoul]] are from 0 to 6. The corresponding influential variables are [[vcutgeo]] and [[rcut]]. - * 0 --> sphere (molecules but also 3D-crystals) - * 1 --> cylinder (nanowires, nanotubes) - * 2 --> surface - * 3 --> 3D crystal (no cut-off, integration in a spherical mini-Brillouin Zone, legacy value) - * 4 --> ERF, long-range only Coulomb interaction - * 5 --> ERFC, short-range only Coulomb interaction (e.g. as used in the HSE functional) - * 6 --> auxiliary function integration for 3D systems from P. Carrier _et al._, PRB **75**,205126 (2007). - * 7 --> auxiliary function for 3D systems of Gygi and Baldereschi - [cf. Phys. Rev. B **34**, 4405 (1986) and Massidda et al., ibid. **48**, 5058 (1993)]. - -Note that Spencer and Alavi PRB **77**, 193110 (2008) showed that the -spherical cutoff can efficiently be used also for 3D systems. In the latter -case, use a negative value for the cutoff radius of the sphere ([[rcut]]<0), + * 0 --> sphere (molecules but also 3D-crystals). + * 1 --> cylinder (nanowires, nanotubes). + * 2 --> surface. + * 3 --> 3D crystal (no cut-off, integration in a spherical mini-Brillouin Zone, legacy value). + * 4 --> ERF, long-range only Coulomb interaction. + * 5 --> ERFC, short-range only Coulomb interaction (e.g. as used in the HSE functional). + * 6 --> auxiliary function integration for 3D systems from [[cite:Carrier2007]]. + * 7 --> auxiliary function for 3D systems of Gygi and Baldereschi [[cite:Gygi1986]]. + * 14 --> Monte-Carlo integration in the mini-Brillouin zone for ERF, long-range only Coulomb interaction. + * 15 --> Monte-Carlo integration in the mini-Brillouin zone for ERFC, short-range only Coulomb interaction. + * 16 --> Monte-Carlo integration in the mini-Brillouin zone for Full Coulomb interaction. + +Note that Spencer and Alavi showed that the +spherical cutoff can efficiently be used also for 3D systems [[cite:Spencer2008]]. +In the latter case, use a negative value for the cutoff radius of the sphere ([[rcut]]<0), which is automatically calculated so that the volume enclosed in the sphere is equal to the volume of the solid. """, @@ -6212,33 +6538,41 @@ dimensions="scalar", defaultval=0, mnemonics="Integer for second-order EIGenvalues from Response-Function", - text=""" + text=r""" If [[ieig2rf]] is greater then 0, the code will produce a file, named with the trailing suffix _EIGR2D, containing the second-order electronic eigenvalues for the perturbation. These files are used in the calculation of the thermal correction to the electronic eigenvalues. -If [[ieig2rf]] is set to 1, the second-order electronic eigenvalues will be -calculated from the DFPT method (Sternheimer). -If [[ieig2rf]] is set to 2, the second-order electronic eigenvalues will be -calculated from the Allen-Cardona method. (sum over states) -If [[ieig2rf]] is set to 3, the second-order electronic eigenvalues will be -calculated from the DFPT method (sum over states) but using a different part -of the code. This is equivalent to [[ieig2rf]] = 1 [debuging] -If [[ieig2rf]] is set to 4, the second-order electronic eigenvalues will be -calculated from the dynamical DFPT method (Sternheimer). The code will -generate _EIGR2D.nc files that contain the electron-phonon matrix element -squared on the space orthogonal to the active space. The code will also -produce _FAN.nc files that contain the electron-phonon matrix elements -squared. Note that [[ieig2rf]]=4 can only be used if Abinit is compiled with NETCDF support. -If [[ieig2rf]] is set to 5, the second-order electronic eigenvalues will be -calculated from the dynamical DFPT method (Sternheimer). The code will -generate _EIGR2D.nc files that contain the electron-phonon matrix element -square on the space orthogonal to the active space. The code will also produce -_GKK.nc files that contain electron-phonon matrix elements. This option is -preferable for large system to [[ieig2rf]]=4 as the GKK files take less much -less disk space and memory (but run a little bit slower). Note that -[[ieig2rf]]=5 can only be used if Abinit is compiled with NETCDF support. + * If [[ieig2rf]] is set to 1, the second-order electronic eigenvalues will be + calculated from the DFPT method (Sternheimer). + + * If [[ieig2rf]] is set to 2, the second-order electronic eigenvalues will be + calculated from the Allen-Cardona method (sum over states). + + * If [[ieig2rf]] is set to 3, the second-order electronic eigenvalues will be + calculated from the DFPT method (sum over states) but using a different part + of the code. This is equivalent to [[ieig2rf]] = 1 [debuging]. + + * If [[ieig2rf]] is set to 4, the second-order electronic eigenvalues will be + calculated from the dynamical DFPT method (Sternheimer). The code will + generate _EIGR2D.nc files that contain the electron-phonon matrix element + squared on the space orthogonal to the active space. The code will also + produce _FAN.nc files that contain the electron-phonon matrix elements + squared. + + * If [[ieig2rf]] is set to 5, the second-order electronic eigenvalues will be + calculated from the dynamical DFPT method (Sternheimer). The code will + generate _EIGR2D.nc files that contain the electron-phonon matrix element + square on the space orthogonal to the active space. The code will also produce + _GKK.nc files that contain electron-phonon matrix elements. This option is + preferable for large system to [[ieig2rf]] = 4 as the GKK files take much + less disk space and memory (but run a little bit slower). + +!!! note + [[ieig2rf]] = 4 and 5 can only be used if Abinit is compiled with NETCDF support. + + Related variables: [[bdeigrf]],[[elph2_imagden]],[[getgam_eig2nkq]],[[smdelta]] """, @@ -6248,16 +6582,16 @@ abivarname="imgmov", varset="rlx", vartype="integer", - topics=['PIMD_compulsory', 'TransPath_compulsory'], + topics=['CrossingBarriers_useful', 'PIMD_compulsory', 'TransPath_compulsory'], dimensions="scalar", defaultval=0, mnemonics="IMaGe MOVEs", - text=""" + text=r""" Control the collective changes of images (see [[nimage]],[[npimage]], [[dynimage]], [[ntimimage]], [[tolimg]], [[istatimg]], [[prtvolimg]]). -Similar to [[ionmov]] in spirit, although here, a population of self- -consistent calculations for different geometries is managed, while with -[[ionmov]], only one geometry for self-consistent calculation is managed. +Similar to [[ionmov]] in spirit, although here, a population of self-consistent +calculations for possibly different (evolving) geometries is managed, while with +[[ionmov]], only self-consistent calculation for one (evolving) geometry is managed. In this respect the maximal number of time step for image propagation is [[ntimimage]], corresponding to the input variable [[ntime]] of the single geometry case. Also, the stopping criterion is governed by [[tolimg]], @@ -6289,11 +6623,11 @@ enddo ``` - * = 0 --> simply **copy** images from previous timimage step. + * = 0 --> simply **copy** images from previous itimimage step. * = 1 --> move images according to **Steepest Descent** following the (scaled) forces, the scaling factor being [[fxcartfactor]]. - * = 2 --> **String Method** for finding Minimal Energy Path (MEP) connecting to minima - (see PRB 66, 052301 (2002)); the algorithm variant can be selected with the [[string_algo]] keyword + * = 2 --> **String Method** for finding Minimal Energy Path (MEP) connecting two minima + (see [[cite:Weinan2002]]), or even two configurations that are not local minima; the algorithm variant can be selected with the [[string_algo]] keyword (Simplified String Method by default). The solver for the Ordinary Differential Equation (ODE) can be selected with [[mep_solver]] (steepest-descent by default). See also [[mep_mxstep]] keyword. * = 3 --> (tentatively, not yet coded) **Metadynamics**. @@ -6302,18 +6636,51 @@ the algorithm variant can be selected with the [[neb_algo]] keyword (NEB+improved tangent by default). The solver for the Ordinary Differential Equation (ODE) can be selected with [[mep_solver]] (steepest-descent by default). The spring constant connecting images along the path is defined by [[neb_spring]]. See also [[mep_mxstep]] keyword. - * = 9 or 13 --> **Path-Integral Molecular Dynamics** (see e.g. [D. Marx and M. Parrinello, J. Chem. Phys. 104, 4077 (1996)]). + * = 6 --> **Linear Combination of Constrained DFT Energies**. The images can have different electronic structure ([[occ]] can differ), + and their total energies are combined linearly using the factors in [[mixesimgf]], giving the actual total energy of the ensemble + of constrained DFT images. The geometry is the same for all images, forces and stresses are computed, and all usual + algorithms for MD or geometry optimization are allowed, using [[ionmov]] (instead of [[imgmov]], this is the exception to the rule) + and related variables. + * = 9 or 13 --> **Path-Integral Molecular Dynamics** (see e.g. [[cite:Marx1996]]). Will use 9 for **Langevin thermostat** (associated friction coefficient given by [[vis]]) and 13 for **Nose-Hoover thermostat chains** (associated input variables are the number of thermostats in the chains, [[nnos]], and the masses of these thermostats [[qmass]]). [[nimage]] is the Trotter number (no use of [[dynimage]]); possible transformations of coordinates are defined by [[pitransform]]; Fictitious masses of the atoms (possibly different from the true masses given by [[amu]]) can be specified by [[pimass]]. - At present, it is only possible to perform calculations in the (N,V,T) ensemble ([[optcell]]=0). + At present, it is only possible to perform calculations in the (N,V,T) ensemble ([[optcell]] = 0). No meaning for RF calculations. """, ), +Variable( + abivarname="imgwfstor", + varset="rlx", + vartype="integer", + topics=['CrossingBarriers_useful', 'PIMD_useful', 'TransPath_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="IMaGe WaveFunction STORage", + requires="[[extrapwf]] == 0 and [[ntimimage]] > 0", + text=r""" +Govern the storage of wavefunctions at the level of the loop over images, see [[ntimimage]]. +Possible values of [[imgwfstor]] are 0 or 1. +If [[imgwfstor]] is 1, the wavefunctions for each image are stored in a big array of +size [[nimage]] more than the storage needed for one set of wavefunctions. +When the specific computation (optimization/SCF cycle etc) for this image is started, +the past wavefunctions are used, to speed up the computation. If [[imgwfstor]]==0, +the wavefunctions are reinitialised, either at random or from the initial wavefunction file (so, without +any modification to take into account the computations at the previous value of itimimage. + +If [[nimage]] is large, the increase of memory need can be problematic, unless the wavefunctions +are spread over many processors, which happens when [[paral_kgb]] == 1. +For some algorithms, e.g. when some geometry optimization +is performed, [[imgmov]]==2 or 5, the gain in speed of choosing [[imgwfstor]]=1 can be quite large, e.g. two to four. +For algorithms of the molecular dynamics type, [[imgmov]]==9 or 13, the expected gain is smaller. +Of course, with adequate memory resources, [[imgwfstor]]==1 should always be preferred. +""", +), + Variable( abivarname="inclvkb", varset="gw", @@ -6323,21 +6690,21 @@ defaultval=2, mnemonics="INCLude VKB", requires="[[optdriver]] in [3,99]", - text=""" + text=r""" Possible values of [[inclvkb]] are 0,1,2. If [[inclvkb]] is 1 or 2, the commutator of the non-local part of the pseudopotential with the position operator is correctly included in the q --> 0 contribution. This is unfortunately time-consuming and in particular when the old algorithm -implemented by inclvkb==1 is used (inclvkb=2 is the recommended option). When +implemented by [[inclvkb]] = 1 is used ([[inclvkb]] = 2 is the recommended option). When [[inclvkb]] is 0, this contribution is incorrectly omitted, but the computation is much faster. The importance of this contribution depends on the number of k points. Turning -off [[inclvkb]] is let to the choice of the user. +off [[inclvkb]] is to let to the choice of the user. -In general, the use of [[inclvkb]]=0 is fine for GW calculations in +In general, the use of [[inclvkb]] = 0 is fine for GW calculations in crystalline systems provided that the k-point sampling is sufficiently converged. -The use of [[inclvkb]]=2 is strongly recommended for the calculation of optical properties. +The use of [[inclvkb]] = 2 is strongly recommended for the calculation of optical properties. """, ), @@ -6350,21 +6717,21 @@ defaultval=0, mnemonics="INTerpolation for eXchange-Correlation", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" * 0 --> do "usual" xc quadrature on fft grid * 1 --> do higher accuracy xc quadrature using fft grid and additional points at the centers of each cube (doubles number of grid points)--the high accuracy version is only valid for boxcut>=2. If boxcut < 2, the code stops. -For RF calculations only [[intxc]]=0 is allowed yet. Moreover, the GS +For RF calculations only [[intxc]] = 0 is allowed yet. Moreover, the GS preparation runs (giving the density file and zero-order wavefunctions) must -be done with [[intxc]]=0 +be done with [[intxc]] = 0 -Prior to ABINITv2.3, the choice [[intxc]]=1 was favoured (it was the default), +Prior to ABINITv2.3, the choice [[intxc]] = 1 was favoured (it was the default), but the continuation of the development of the code lead to prefer the default -[[intxc]]=0. Indeed, the benefit of [[intxc]]=1 is rather small, while making +[[intxc]] = 0. Indeed, the benefit of [[intxc]] = 1 is rather small, while making it available for all cases is a non-negligible development effort. Other -targets are prioritary... You will notice that many automatic tests use -[[intxc]]=1. Please, do not follow this historical choice for your production runs. +targets are prioritary. You will notice that many automatic tests use +[[intxc]] = 1. Please, do not follow this historical choice for your production runs. """, ), @@ -6374,10 +6741,10 @@ vartype="integer", topics=['parallelism_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[MPI_IO]] and [[paral_kgb]]==1': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[MPI_IO]] and [[paral_kgb]] == 1': 1, 'defaultval': 0}), mnemonics="Input-Output MODE", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" This option selects the format used to produce the output wavefunction files and the files containing densities and potentials. It mainly affects the creation of the output files since several parts of Abinit are able to read @@ -6386,12 +6753,12 @@ * 0 --> Use standard Fortran IO (ok for sequential runs, not suitable for large parallel runs) * 1 --> Use MPI/IO routines (ok both for sequential and large parallel runs) - * 3 --> Use NetCDF library to produce files according to the ETSF specification + * 3 --> Use NetCDF library to produce files according to the ETSF specification [[cite:Gonze2008]] (ok for sequential, requires netcdf4 + hdf5 + MPI-IO support for large parallel runs) By default, Abinit produces Fortran files and uses parallel MPI-IO under the hood when these operations cannot be implemented in terms of simple Fortran -write/read statements. For example, [[paral_kgb]]=1 uses the MPI-IO API +write/read statements. For example, [[paral_kgb]] = 1 uses the MPI-IO API provided by your MPI library. In a nutshell, use the default value and make sure that your MPI library @@ -6405,17 +6772,14 @@ format because you need data in this format. In this case, you have to use iomode==3 in the input file to override the default behaviour. Note however that you still need parallel IO capabilities enabled in the netcdf library if -you want to produce netcdf files in parallel with [[paral_kgb]]=1 (i.e. +you want to produce netcdf files in parallel with [[paral_kgb]] = 1 (i.e. netcdf4 + hdf5 + MPI-IO). At present, the internal fallbacks provided by Abinit do not support netcdf4 so you have to link against an external netcdf library that supports hdf5+MPI-IO and is compatible with the mpif90 used to -compile Abinit. See ~abinit/doc/build/config-examples/ubu_gnu_4.9_mpich.ac for a typical configuration file. - -References: +compile Abinit. See ~abinit/doc/build/config-examples/ubu_intel_17.0_openmpi.ac for a typical configuration file. - * "Specification of an extensible and portable file format for electronic structure and crystallographic data", X. Gonze, C.-O. Almbladh, A. Cucca, D. Caliste, C. Freysoldt, M. Marques, V. Olevano, Y. Pouillon, M.J. Verstraete, Comput. Mat. Science 43, 1056 (2008) - * "Sharing electronic structure and crystallographic data with ETSF_IO", D. Caliste, Y. Pouillon, M.J. Verstraete, V. Olevano, X. Gonze, Comput. Physics Communications 179, 748 (2008) - * see also [ http://www.etsf.eu/fileformats ](http://www.etsf.eu/fileformats). +Additional note: The use of the ETSF_IO library [[cite:Caliste2008]] has been disabled, and replaced by direct NetCDF calls. +The ETSF_IO library is not maintained anymore. """, ), @@ -6427,82 +6791,90 @@ dimensions="scalar", defaultval=0, mnemonics="IONic MOVEs", - text=""" + text=r""" Choice of algorithm to control the displacements of ions, and eventually (see [[optcell]]) changes of cell shape and size. * 0 --> Do not move ions; - * 1 --> Move atoms using molecular dynamics with optional viscous damping (friction linearly proportional to velocity). The viscous damping is controlled by the parameter "[[vis]]". If actual undamped molecular dynamics is desired, set [[vis]] to 0. The implemented algorithm is the generalisation of the Numerov technique (6th order), but is NOT invariant upon time-reversal, so that the energy is not conserved. The value [[ionmov]]=6 will usually be preferred, although the algorithm that is implemented is lower-order. The time step is governed by [[dtion]]. -**Purpose:** Molecular dynamics (if [[vis]]=0), Structural optimization (if + * 1 --> Move atoms using molecular dynamics with optional viscous damping (friction linearly proportional to velocity). The viscous damping is controlled by the parameter "[[vis]]". If actual undamped molecular dynamics is desired, set [[vis]] to 0. The implemented algorithm is the generalisation of the Numerov technique (6th order), but is NOT invariant upon time-reversal, so that the energy is not conserved. The value [[ionmov]] = 6 will usually be preferred, although the algorithm that is implemented is lower-order. The time step is governed by [[dtion]]. +**Purpose:** Molecular dynamics (if [[vis]] = 0), Structural optimization (if [[vis]] >0) -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** Viscous parameter [[vis]], time step [[dtion]], index of atoms fixed [[iatfix]] - * 2 --> Conduct structural optimization using the Broyden-Fletcher-Goldfarb-Shanno minimization (BFGS). This is much more efficient for structural optimization than viscous damping, when there are less than about 10 degrees of freedom to optimize. + * 2 --> Conduct structural optimization using the Broyden-Fletcher-Goldfarb-Shanno minimization (BFGS). This is much more efficient for structural optimization than viscous damping, when there are less than about 10 degrees of freedom to optimize. Another version of the BFGS is available with [[ionmov]]==22, and is apparently more robust and efficient than [[ionmov]]==2. **Purpose:** Structural optimization **Cell optimization:** Yes (if [[optcell]]/=0) **Related variables:** * 3 --> Conduct structural optimization using the Broyden-Fletcher-Goldfarb-Shanno minimization (BFGS), modified to take into account the total energy as well as the gradients (as in usual BFGS). -See the paper by [Schlegel, J. Comp. Chem. 3, 214 (1982)]. Might be better -than [[ionmov]]=2 for few degrees of freedom (less than 3 or 4). Can be very +See [[cite:Schlegel1982]]. Might be better than [[ionmov]] = 2 for few degrees of freedom (less than 3 or 4). Can be very unstable - use with caution! **Purpose:** Structural optimization **Cell optimization:** Yes (if [[optcell]]/=0) **Related variables:** - * 4 --> Conjugate gradient algorithm for simultaneous optimization of potential and ionic degrees of freedom. It can be used with [[iscf]]=2 and [[iscf]] =5 or 6 (WARNING: this is under development, and does not work very well in many cases). + * 4 --> Conjugate gradient algorithm for simultaneous optimization of potential and ionic degrees of freedom. It can be used with [[iscf]] = 2 and [[iscf]] =5 or 6 (WARNING: this is under development, and does not work very well in many cases). **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** - * 5 --> Simple relaxation of ionic positions according to (converged) forces. Equivalent to [[ionmov]]=1 with zero masses, albeit the relaxation coefficient is not [[vis]], but [[iprcfc]]. + * 5 --> Simple relaxation of ionic positions according to (converged) forces. Equivalent to [[ionmov]] = 1 with zero masses, albeit the relaxation coefficient is not [[vis]], but [[iprcfc]]. **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** - * 6 --> Molecular dynamics using the Verlet algorithm, see [Allen & Tildesley "Computer simulation of liquids" 1987, p 81]. The only related parameter is the time step ([[dtion]]). + * 6 --> Molecular dynamics using the Verlet algorithm, see [[cite:Allen1987a]] p 81]. The only related parameter is the time step ([[dtion]]). **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step [[dtion]], index of atoms fixed [[iatfix]] * 7 --> Quenched Molecular dynamics using the Verlet algorithm, and stopping each atom for which the scalar product of velocity and force is negative. The only related parameter is the time step ([[dtion]]). The goal is not to produce a realistic dynamics, but to go as fast as possible to the minimum. For this purpose, it is advised to set all the masses to the same value (for example, use the Carbon mass, i.e. set [[amu]] to 12 for all type of atoms). **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step [[dtion]], index of atoms fixed [[iatfix]] * 8 --> Molecular dynamics with Nose-Hoover thermostat, using the Verlet algorithm. **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step ([[dtion]]), Temperatures ([[mdtemp]]), and thermostat mass ([[noseinert]]). * 9 --> Langevin molecular dynamics. **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step ([[dtion]]), temperatures ([[mdtemp]]) and friction coefficient ([[friction]]). - * 10 --> Delocalized internal coordinates. with BFGS simple + * 10 --> Delocalized internal coordinates with BFGS simple **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** - * 11 --> Delocalized internal coordinates. with BFGS using total energy + * 11 --> Delocalized internal coordinates with BFGS using total energy **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** - * 12 --> Isokinetic ensemble molecular dynamics. The equation of motion of the ions in contact with a thermostat are solved with the algorithm proposed by Zhang [J. Chem. Phys. 106, 6102 (1997)], as worked out by Minary et al [J. Chem. Phys. 188, 2510 (2003)]. The conservation of the kinetic energy is obtained within machine precision, at each step. -~~Related parameters: the time step ([[dtion]]), the temperatures -([[mdtemp]]), and the friction coefficient ([[friction]]).~~ + * 12 --> Isokinetic ensemble molecular dynamics. +The equation of motion of the ions in contact with a thermostat are solved with the algorithm proposed in [[cite:Zhang1997]], +as worked out in [[cite:Minary2003]]. +The conservation of the kinetic energy is obtained within machine precision, at each step. +As in [[cite:Evans1983]], when there is no fixing of atoms, the number of degrees of freedom in which the +microscopic kinetic energy is hosted is 3*natom-4. Indeed, the total kinetic energy is constrained, which accounts for +minus one degree of freedom (also mentioned in [[cite:Minary2003]]), but also there are three degrees of freedom +related to the total momentum in each direction, that cannot be counted as microscopic degrees of freedom, since the +total momentum is also preserved (but this is not mentioned in [[cite:Minary2003]]). When some atom is fixed in one or more direction, +e.g. using [[natfix]], [[natfixx]], [[natfixy]], or [[natfixz]], the number of degrees of freedom is decreased accordingly, +albeit taking into account that the total momentum is not preserved +anymore (e.g. fixing the position of one atom gives 3*natom-4, like in the non-fixed case). **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) -**Related variables:** +**Cell optimization:** No (Use [[optcell]] = 0 only) +**Related variables:** time step ([[dtion]]) and the first temperature in [[mdtemp]] in case the velocities [[vel]] are not initialized, or all initialized to zero. - * 13 --> Isothermal/isenthalpic ensemble. The equation of motion of the ions in contact with a thermostat and a barostat are solved with the algorithm proposed by Martyna, Tuckermann Tobias and Klein [Mol. Phys., 1996, p. 1117]. + * 13 --> Isothermal/isenthalpic ensemble. The equation of motion of the ions in contact with a thermostat and a barostat are solved with the algorithm proposed in [[cite:Martyna1996]]. If optcell=1 or 2, the mass of the barostat ([[bmass]]) must be given in addition. **Purpose:** Molecular dynamics @@ -6511,22 +6883,33 @@ ([[mdtemp]]), the number of thermostats ([[nnos]]), and the masses of thermostats ([[qmass]]). - * 14 --> Simple molecular dynamics with a symplectic algorithm proposed by S.Blanes and P.C.Moans [called SRKNa14 in Practical symplectic partitioned Runge--Kutta and Runge--Kutta--Nystrom methods, Journal of Computational and Applied Mathematics archive, volume 142, issue 2 (May 2002), pages 313 - 330] of the kind first published by H. Yoshida [Construction of higher order symplectic integrators, Physics Letters A, volume 150, number 5 to 7, pages 262 - 268]. This algorithm requires at least 14 evaluation of the forces (actually 15 are done within Abinit) per time step. At this cost it usually gives much better energy conservation than the verlet algorithm ([[ionmov]] 6) for a 30 times bigger value of [[dtion]]. Notice that the potential energy of the initial atomic configuration is never evaluated using this algorithm. + * 14 --> Simple molecular dynamics with a symplectic algorithm proposed in [[cite:Blanes2002]] (called SRKNa14] of the kind first published in [[cite:Yoshida1990]]This algorithm requires at least 14 evaluation of the forces (actually 15 are done within Abinit) per time step. At this cost it usually gives much better energy conservation than the verlet algorithm ([[ionmov]] 6) for a 30 times bigger value of [[dtion]]. Notice that the potential energy of the initial atomic configuration is never evaluated using this algorithm. **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** + * 15 --> Fast inertial relaxation engine (FIRE) algorithm proposed by +Erik Bitzek, Pekka Koskinen, Franz Gähler, Michael Moseler, and Peter Gumbsch in [[cite:Bitzek2006]]. +According to the authors, the efficiency of this method is nearly the same as L-bfgs ([[ionmov]]=22). +It is based on conventional molecular dynamics with additional velocity modifications and adaptive time steps. +The initial time step is set with [[dtion]]. Note that the physical meaning and unit of [[dtion]] are different from the default ones. +The purpose of this algorithm is relaxation, not molecular dynamics. [[dtion]] governs the ion position changes, but the cell parameter changes as well. +The positions are in reduced coordinates instead of in cartesian coordinates. The suggested first guess of dtion is 0.03. +**Purpose:** Relaxation +**Cell optimization:** Yes (if [[optcell]]/=0) +**Related variables:** The initial time step [[dtion]] + * 20 --> Direct inversion of the iterative subspace. Given a starting point [[xred]] that is a vector of length 3*[[natom]] (reduced nuclei coordinates), and unit cell parameters ([[rprimd]]) this routine uses the DIIS (direct inversion of the iterative subspace) to minimize the gradient (forces) on atoms. The preconditioning used to compute errors from gradients is using an inverse hessian matrix obtained by a BFGS algorithm. This method is known to converge to the nearest point where gradients vanish. This is efficient to refine positions around a saddle point for instance. **Purpose:** Structural optimization -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** DIIS memory [[diismemory]] - * 22 --> Conduct structural optimization using the Limited-memory Broyden-Fletcher-Goldfarb-Shanno minimization (L-BFGS). The working routines were based on the original implementation of J. Nocera available on netlib.org. This algorithm can be much better than the native implementation of BFGS in ABINIT ([[ionmov]]=2) when one approaches convergence, perhaps because of better treatment of numerical details. + * 22 --> Conduct structural optimization using the Limited-memory Broyden-Fletcher-Goldfarb-Shanno minimization (L-BFGS) [[cite:Nocedal1980]]. The working routines were based on the original implementation of J. Nocedal available on netlib.org. This algorithm can be much better than the native implementation of BFGS in ABINIT ([[ionmov]] = 2) when one approaches convergence, perhaps because of better treatment of numerical details. **Purpose:** Structural optimization **Cell optimization:** Yes (if [[optcell]]/=0) **Related variables:** - * 23 --> Use of Learn on The Fly method (LOTF) for Molecular Dynamics. In the framework of isokinetic MD, the atomic forces and positions are computed by using LOTF interpolation. A SCF computation is performed only any [[lotf_nitex]] steps. The results of the SCF are used to compute the parameters of a short range classical potential (for the moment only the glue potential for gold is implemented). Then these parameters are continuously tuned to compute atomic trajectories. LOTF has to be enabled at configure time. If LOTF is not enabled and [[ionmov]]=23, abinit will set automatically [[ionmov]]=12. + * 23 --> Use of Learn on The Fly method (LOTF) for Molecular Dynamics. In the framework of isokinetic MD, the atomic forces and positions are computed by using LOTF interpolation. A SCF computation is performed only any [[lotf_nitex]] steps. The results of the SCF are used to compute the parameters of a short range classical potential (for the moment only the glue potential for gold is implemented). Then these parameters are continuously tuned to compute atomic trajectories. LOTF has to be enabled at configure time. If LOTF is not enabled and [[ionmov]] = 23, abinit will set automatically [[ionmov]] = 12. The LOTF cycle is divided in the following steps: a) Initialization (SFC at t=0) and computation of potential parameters. b) Extrapolation of the atomic forces and positions for [[lotf_nitex]] time @@ -6535,20 +6918,22 @@ c) SFC at t=[[lotf_nitex]]. Computation of the potential parameters. d) LOTF interpolation, linear interpolation of the potential parameters and computation of the atomic forces and positions between t=0 and t=lotf_nitex. - **Purpose:** Molecular Dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** [[dtion]], [[lotf_classic]], [[lotf_nitex]], [[lotf_nneigx]], [[lotf_version]]. - * 24 --> Simple constant energy molecular dynamics using the velocity Verlet symplectic algorithm (second order), see e.g. [E. Hairer et al. Acta Numerica. 12, 399 (2003)]. The only related parameter is the time step ([[dtion]]). + * 24 --> Simple constant energy molecular dynamics using the velocity Verlet symplectic algorithm (second order), see [[cite:Hairer2003]]. The only related parameter is the time step ([[dtion]]). **Purpose:** Molecular dynamics -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step [[dtion]] - * 25 --> Hybrid Monte Carlo sampling of the ionic positions at fixed temperature and unit cell geometry (NVT ensemle). The underlying molecular dynamics corresponds to ionmov=24. The related parameters are the time step ([[dtion]]) and thermostat temperature ([[mdtemp]]). + * 25 --> Hybrid Monte Carlo sampling of the ionic positions at fixed temperature and unit cell geometry (NVT ensemble). The underlying molecular dynamics corresponds to [[ionmov]]=24. The related parameters are the time step ([[dtion]]) and thermostat temperature ([[mdtemp]]). +Within the HMC algorithm [[cite:Duane1987]], the trial states are generated via short $NVE$ trajectories (ten [[ionmov]]=24 steps in current implementation). + The initial momenta for each trial are randomly sampled from Boltzmann distribution, and the final trajectory state is either accepted or rejected based on the Metropolis criterion. + Such strategy allows to simultaneously update all reduced coordinates, achieve higher acceptance ratio than classical Metropolis Monte Carlo and better sampling efficiency for shallow energy landscapes [[cite:Prokhorenko2018]]. **Purpose:** Monte Carlo sampling -**Cell optimization:** No (Use [[optcell]]=0 only) +**Cell optimization:** No (Use [[optcell]] = 0 only) **Related variables:** time step [[dtion]], thermostat temperature [[mdtemp]], No meaning for RF calculations. @@ -6564,14 +6949,14 @@ defaultval=0, mnemonics="Integer for PReConditioning of ELectron response", text=r""" -Used when [[iscf]]>0, to define the SCF preconditioning scheme. Potential- +Used when [[iscf]] > 0, to define the SCF preconditioning scheme. Potential- based preconditioning schemes for the SCF loop (electronic part) are still a subject of active research. The present parameter (electronic part) describes the way the change of potential is derived from the residual. The possible values of [[iprcel]] correspond to: * 0 --> model dielectric function described by [[diemac]], [[dielng]] and [[diemix]]. - * larger or equal to 21 --> will compute the dielectric matrix according to [[diecut]], [[dielam]], [[diegap]]. This methodology is described in P.-M. Anglade, X. Gonze, Phys. Rev. B 78, 045126 (2008). + * larger or equal to 21 --> will compute the dielectric matrix according to [[diecut]], [[dielam]], [[diegap]]. This methodology is described in [[cite:Anglade2008]]. * Between 21 and 29 --> for the first few steps uses the same as option 0 then compute RPA dielectric function, and use it as such. * Between 31 and 39 --> for the first few steps uses the same as option 0 then compute RPA dielectric function, and use it, with the mixing factor [[diemix]]. * Between 41 and 49 --> compute the RPA dielectric matrix at the first step, and recompute it at a later step, and take into account the mixing factor [[diemix]]. @@ -6582,7 +6967,7 @@ * 141 to 169 --> same as Between 41 and 69 (but, the dielectric matrix is also recomputed every iprcel modulo 10 step). The computation of the dielectric matrix (for 0 [100]< [[iprcel]] < 70 [100]) -is based on the **extrapolar** approximation. This approximation can be tuned +is based on the **extrapolar** approximation, see [[cite:Anglade2008]]. This approximation can be tuned with [[diecut]], [[dielam]], and [[diegap]]. Yet its accuracy mainly depends on the number of conduction bands included in the system. Having 2 to 10 empty bands in the calculation is usually enough (use [[nband]]). @@ -6590,12 +6975,12 @@ NOTES: * The step at which the dielectric matrix is computed or recomputed is determined by modulo([[iprcel]],10). The recomputation happens just once in the calculation for [[iprcel]] < 100. - * For non-homogeneous relatively large cells [[iprcel]]=45 will likely give a large improvement over [[iprcel]]=0. - * In case of PAW and [[iprcel]]>0, see [[pawsushat]] input variable. By default, an approximation (which can be suppressed) is done for the computation of susceptibility matrix. + * For non-homogeneous relatively large cells [[iprcel]] = 45 will likely give a large improvement over [[iprcel]] = 0. + * In case of PAW and [[iprcel]] > 0, see [[pawsushat]] input variable. By default, an approximation (which can be suppressed) is done for the computation of susceptibility matrix. * For extremely large inhomogeneous cells where computation of the full dielectric matrix takes too many weeks, 70 < [[iprcel]] < 80 is advised. - * For [[nsppol]]=2 or [[nspinor]]=2 with metallic [[occopt]], only **mod(iprcel,100)** <50 is allowed. + * For [[nsppol]] = 2 or [[nspinor]] = 2 with metallic [[occopt]], only **mod(iprcel,100)** <50 is allowed. * No meaning for RF calculations yet. - * The exchange term in the full dielectric matrix diverges for vanishing densities. Therefore the values of [[iprcel]] beyond 60 must not be used for cells containing vacuum, unless ones computes this matrix for every step ([[iprcel]]=161). + * The exchange term in the full dielectric matrix diverges for vanishing densities. Therefore the values of [[iprcel]] beyond 60 must not be used for cells containing vacuum, unless ones computes this matrix for every step ([[iprcel]] = 161). """, ), @@ -6608,8 +6993,8 @@ defaultval=0, mnemonics="Integer for PReConditioner of Force Constants", characteristics=['[[DEVELOP]]'], - text=""" -Used when [[iscf]]>0, to define the SCF preconditioning scheme. Potential- + text=r""" +Used when [[iscf]] > 0, to define the SCF preconditioning scheme. Potential- based preconditioning schemes for the SCF loop are still under development. The present parameter (force constant part) describes the way a change of force is derived from a change of atomic position. @@ -6634,16 +7019,16 @@ defaultval=0, mnemonics="Index for QPoinT generation", characteristics=['[[INPUT_ONLY]]'], - text=""" -Only used if [[nqpt]]=1, and [[qptopt]]=1 to 4. + text=r""" +Only used if [[nqpt]] = 1, and [[qptopt]] = 1 to 4. Defines the index of the Q point to be selected in the list of q points generated by [[ngqpt]], [[qptrlatt]], [[nshiftq]], and [[shiftq]]. -If [[iqpt]]=0, then the q point is Gamma (0 0 0). +If [[iqpt]] = 0, then the q point is Gamma (0 0 0). The usual working mode is to define a series of values for [[iqpt]], starting -with [[iqpt]]=0 or 1 (so through the definition of **iqpt:** ), and increasing +with [[iqpt]] = 0 or 1 (so through the definition of **iqpt:** ), and increasing it by one for each dataset (thanks to **iqpt+** ). """, ), @@ -6657,17 +7042,19 @@ defaultval=3, mnemonics="Integer for the choice of the RANDOM number generator", characteristics=['[[DEVELOP]]'], - text=""" -For the time being, only used when [[imgmov]]=9 (Langevin Path-Integral Molecular Dynamics). + text=r""" +For the time being, only used when [[imgmov]] = 9 (Langevin Path-Integral Molecular Dynamics). [[irandom]] defines the random number generator. Supported values: * 1 --> "uniformrandom", delivered with ABINIT package (initially comes from numerical recipes). * 2 --> intrinsic Fortran 90 random number generator. - * 3 --> "ZBQ" non-deterministic random number generator by R. Chandler and P. Northrop. (Available at [). + * 3 --> "ZBQ" non-deterministic random number generator by R. Chandler and P. Northrop. + [Documentation](http://www.ucl.ac.uk/~ucakarc/work/software/randgen.txt) and + [Source code](http://www.ucl.ac.uk/~ucakarc/work/software/randgen.f) -[[irandom]]=3 is strongly advised when performing Molecular Dynamics restarts (avoids bias). +[[irandom]] = 3 is strongly advised when performing Molecular Dynamics restarts (avoids bias). """, ), @@ -6679,9 +7066,9 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[iscf]] < 0': 1, 'defaultval': 0}), mnemonics="Integer that governs the ReaDing of 1st-order DEN file", - text=""" + text=r""" If first order density is needed in single dataset mode (for example in -nonlinear optical response), use [[ird1den]]=1 to read first-order densities +nonlinear optical response), use [[ird1den]] = 1 to read first-order densities from _DENx files produced in other calculations. In multi-dataset mode use [[get1den]]. When [[iscf]] < 0, the reading of a DEN file is always enforced. @@ -6699,7 +7086,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of _1WF files", - text=""" + text=r""" Indicates eventual starting wavefunctions. As alternative, one can use the input variables [[getwfk]], [[getwfq]], [[get1wf]] or [[getddk]]. @@ -6742,7 +7129,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of COUPling block", - text=""" + text=r""" Start the Bethe-Salpeter calculation from the BSC file containing the coupling block produced in a previous run. """, ), @@ -6755,7 +7142,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of BS_EIG file", - text=""" + text=r""" Start the Bethe-Salpeter calculation from the BS_EIG containing the exciton eigenvectors produced in a previous run. """, ), @@ -6768,7 +7155,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of RESOnant block", - text=""" + text=r""" Start the Bethe-Salpeter calculation from the BSR file containing the resonant block produced in a previous run. """, @@ -6782,7 +7169,7 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[iscf]] < 0': '1', 'defaultval': 0}), mnemonics="Integer that governs the ReaDing of DDB file", - text=""" + text=r""" This variable should be used when performing electron-phonon or temperature- dependence calculations. The Born effective charge as well as the dielectric tensor will be read from a previous DFPT calculations of the electric field at @@ -6794,7 +7181,9 @@ A non-zero value of [[irdddb]] is treated in the same way as other "ird" variables. For further information about the *files file*, consult the [[help:abinit#files-file]]. +Note also that, starting Abinit v9, one can also use [[getddb_path]] to specify the path of the DDB file directly. """, + ), Variable( @@ -6805,7 +7194,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of DDK wavefunctions, in _1WF files", - text=""" + text=r""" Indicates eventual starting wavefunctions. As alternative, one can use the input variables [[getwfk]], [[getwfq]], [[get1wf]] or [[getddk]]. @@ -6848,15 +7237,43 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[iscf]] < 0': '1', 'defaultval': 0}), mnemonics="Integer that governs the ReaDing of DEN file", - text=""" + text=r""" Start the ground-state calculation from the density file of a previous run. -When iscf < 0, the reading of a DEN file is always enforced. +When [[iscf]] < 0, the reading of a DEN file is always enforced. A non-zero value of [[irdden]] is treated in the same way as other "ird" variables. For further information about the *files file*, consult the [[help:abinit#files-file]]. """, ), +Variable( + abivarname="irddvdb", + varset="files", + vartype="integer", + topics=['ElPhonInt_useful'], + dimensions="scalar", + mnemonics="Integer that governs the ReaDing of DVDB file", + text=r""" +This variable can be used when performing electron-phonon calculations with [[optdriver]] = 7 +to read an *input* DVDB file. See also [[getdvdb]] +""", +), + +Variable( + abivarname="irdefmas", + varset="files", + vartype="integer", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="Integer to ReaD the EFfective MASses from...", + text=r""" +Eventually used when [[ndtset]] > 0 (multi-dataset mode). +Only relevant for [[optdriver]]=7 and [[eph_task]]=6. +If set to 1, take the data from a _EFMAS file as input. The latter must have been produced using [[prtefmas]] in another run. +""", +), + Variable( abivarname="irdhaydock", varset="files", @@ -6865,7 +7282,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of the HAYDOCK restart file", - text=""" + text=r""" Used to re-start the Haydock iterative technique from the HAYDR_SAVE file produced in a previous run. """, ), @@ -6878,10 +7295,10 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of QuasiParticle Structure", - text=""" -Relevant only when [[optdriver]]=3 or 4. Indicate the file from which the + text=r""" +Relevant only when [[optdriver]] = 3 or 4. Indicate the file from which the eigenvalues and possibly the wavefunctions must be obtained, in order to -achieve a self-consistent quasiparticle calculations. See also [[getqps]] +achieve a self-consistent quasi-particle calculations. See also [[getqps]] """, ), @@ -6893,10 +7310,10 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of the SCReening", - text=""" -Relevant only when [[optdriver]]=4. Indicate the file from which the + text=r""" +Relevant only when [[optdriver]] = 4. Indicate the file from which the dielectric matrix must be obtained. As alternative, one can use the input variable [[getscr]]. -When [[optdriver]]=4, at least one of [[irdscr]] or [[getscr]] (alternatively, +When [[optdriver]] = 4, at least one of [[irdscr]] or [[getscr]] (alternatively, [[irdsuscep]] or [[getsuscep]]) must be non-zero. A non-zero value of [[irdscr]] is treated in the same way as other "ird" variables. @@ -6912,11 +7329,11 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of the SUSCEPtibility", - text=""" -Relevant only when [[optdriver]]=4. Indicate the file from which the + text=r""" +Relevant only when [[optdriver]] = 4. Indicate the file from which the irreducible polarizability must be obtained. As alternative, one can use the input variable [[getsuscep]]. -When [[optdriver]]=4, at least one of [[irdsuscep]] or [[getsuscep]] +When [[optdriver]] = 4, at least one of [[irdsuscep]] or [[getsuscep]] (alternatively, [[irdscr]] or [[getscr]]) must be non-zero. A non-zero value of [[irdsuscep]] is treated in the same way as other "ird" variables. @@ -6933,12 +7350,12 @@ defaultval=0, mnemonics="Integer that governs the ReaDing of _VDW files", characteristics=['[[DEVELOP]]'], - text=""" -Used when [[vdw_xc]]>0, to read previously calculated vdW-DF variables. + text=r""" +Used when [[vdw_xc]] > 0, to read previously calculated vdW-DF variables. Supported values: - * 0 --> do not read vdW-DF variables - * 1 --> read vdW-DF variables + * 0: do not read vdW-DF variables + * 1: read vdW-DF variables """, ), @@ -6950,7 +7367,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of _WFK files", - text=""" + text=r""" Indicates eventual starting wavefunctions. As alternative, one can use the input variables [[getwfk]], [[getwfq]], [[get1wf]] or [[getddk]]. @@ -6993,7 +7410,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of the grid _WFK file on the FINE grid", - text=""" + text=r""" Indicates eventual starting wavefunctions. As alternative, one can use the input variables [[getwfkfine]]. Ground-state calculation: @@ -7031,7 +7448,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integer that governs the ReaDing of _WFQ files", - text=""" + text=r""" Indicates eventual starting wavefunctions. As alternative, one can use the input variables [[getwfk]], [[getwfq]], [[get1wf]] or [[getddk]]. @@ -7072,7 +7489,7 @@ vartype="integer", topics=['SCFAlgorithms_basic', 'TDDFT_compulsory', 'ElecBandStructure_basic'], dimensions="scalar", - defaultval=ValueWithConditions({'[[usepaw]]==1': 17, '[[usewvl]]==1': 0, 'defaultval': 7}), + defaultval=ValueWithConditions({'[[usepaw]] == 1': 17, '[[usewvl]] == 1': 0, 'defaultval': 7}), mnemonics="Integer for Self-Consistent-Field cycles", text=r""" Controls the self-consistency. @@ -7081,19 +7498,21 @@ determined self-consistently. The choice between different algorithms for SCF is possible: - *=0 --> SCF cycle, direct minimization scheme on the gradient of the wavefunctions. This algorithm is faster than diagonalisation and mixing but is working only for systems with a gap. It is implemented only on the wavelet basis set, when [[usewvl]]=1. + * 0 --> SCF cycle, direct minimization scheme on the gradient of the wavefunctions. This algorithm is faster than diagonalisation and mixing but is working only for systems with a gap. It is implemented only on the wavelet basis set, when [[usewvl]] = 1. * 1 --> get the largest eigenvalue of the SCF cycle -([[DEVELOP]] option, used with [[irdwfk]]=1 or [[irdwfq]]=1) +([[DEVELOP]] option, used with [[irdwfk]] = 1 or [[irdwfq]] = 1) * 2 --> SCF cycle, simple mixing of the potential with the preconditioned potential residual (in the usual case, the latter is defined by [[diemix]], [[diemac]] and [[dielng]]) * 3 --> SCF cycle, Anderson mixing of the potential * 4 --> SCF cycle, Anderson mixing of the potential based on the two previous iterations * 5 --> SCF cycle, CG based on the minim. of the energy with respect to the potential + * 6 --> SCF cycle, CG based on the minim. of the energy with respect to the potential (alternate algo., [[DEVELOP]]) * 7 --> SCF cycle, Pulay mixing of the potential based on the [[npulayit]] previous iterations * 12 --> SCF cycle, simple mixing of the density * 13 --> SCF cycle, Anderson mixing of the density * 14 --> SCF cycle, Anderson mixing of the density based on the two previous iterations * 15 --> SCF cycle, CG based on the minim. of the energy with respect to the density + * 16 --> SCF cycle, CG based on the minim. of the energy with respect to the potential (alternate algo., [[DEVELOP]]) * 17 --> SCF cycle, Pulay mixing of the density based on the [[npulayit]] previous iterations !!! warning @@ -7102,21 +7521,20 @@ Such algorithms for treating the "SCF iteration history" should be coupled with accompanying algorithms for the SCF "preconditioning". See the input -variable [[iprcel]]. The default value [[iprcel]]=0 is often a good choice, -but for inhomogeneous systems, you might gain a lot with [[iprcel]]=45. +variable [[iprcel]]. The default value [[iprcel]] = 0 is often a good choice, +but for inhomogeneous systems, you might gain a lot with [[iprcel]] = 45. -(Warning: if [[iscf]]>10, at present (v4.6), the energy printed at each SCF +(Warning: if [[iscf]] > 10, at present (v4.6), the energy printed at each SCF cycle is not variational - this should not affect the other properties, and at convergence, all values are OK) -- In the norm-conserving case, the default option is [[iscf]]=7, which is a -compromise between speed and reliability. The value [[iscf]]= 2 is safer but +- In the norm-conserving case, the default option is [[iscf]] = 7, which is a +compromise between speed and reliability. The value [[iscf]] = 2 is safer but slower. -- In the PAW case, default option is [[iscf]]=17. In PAW you have the -possibility to mix density/potential on the fine or coarse FFT grid (see -[[pawmixdg]]). -- Note that a Pulay mixing ([[iscf]]=7 or 17) with [[npulayit]] =1 (resp. 2) -is equivalent to an Anderson mixing with [[iscf]]=3 or 13 (resp. 4 or 14). +- In the PAW case, default option is [[iscf]] = 17. In PAW you have the +possibility to mix density/potential on the fine or coarse FFT grid (see [[pawmixdg]]). +- Note that a Pulay mixing ([[iscf]] = 7 or 17) with [[npulayit]] =1 (resp. 2) +is equivalent to an Anderson mixing with [[iscf]] = 3 or 13 (resp. 4 or 14). - Also note that: * when mixing is done on potential (iscf <10), total energy is computed by "direct" decomposition. * when mixing is done on density (iscf >=10), total energy is computed by "double counting" decomposition. @@ -7128,27 +7546,27 @@ Other (negative) options: - * = -2 --> a non-self-consistent calculation is to be done; in this case an electron density rho(r) on a real space grid (produced in a previous calculation) will be read from a disk file (automatically if [[ndtset]]=0, or according to the value of [[getden]] if [[ndtset]]/=0). + * -2 --> a non-self-consistent calculation is to be done; in this case an electron density rho(r) on a real space grid (produced in a previous calculation) will be read from a disk file (automatically if [[ndtset]] = 0, or according to the value of [[getden]] if [[ndtset]]/=0). The name of th density file must be given as indicated [[help:abinit#files-file|here]]. -[[iscf]]=-2 would be used for band structure calculations, to permit +[[iscf]] = -2 would be used for band structure calculations, to permit computation of the eigenvalues of occupied and unoccupied states at arbitrary k points in the fixed self consistent potential produced by some integration grid of k points. Due to this typical use, ABINIT insist that either -[[prtvol]]>2 or [[prteig]] does not vanish when there are more than 50 k points. +[[prtvol]] > 2 or [[prteig]] does not vanish when there are more than 50 k points. To compute the eigenvalues (and wavefunctions) of unoccupied states in a separate (non-selfconsistent) run, the user should save the self-consistent -rho(r) and then run [[iscf]]=-2 for the intended set of k-points and bands. -To prepare a run with [[iscf]]=-2, a density file can be produced using the +rho(r) and then run [[iscf]] = -2 for the intended set of k-points and bands. +To prepare a run with [[iscf]] = -2, a density file can be produced using the parameter [[prtden]] (see its description). When a self-consistent set of -wavefunctions is already available, abinit can be used with [[nstep]]=0 (see +wavefunctions is already available, abinit can be used with [[nstep]] = 0 (see Test_v2/t47.in), and the adequate value of [[prtden]]. - * = -3 --> like -2, but initialize [[occ]] and [[wtk]], directly or indirectly (using [[ngkpt]] or [[kptrlatt]]) depending on the value of [[occopt]]. + * -3 --> like -2, but initialize [[occ]] and [[wtk]], directly or indirectly (using [[ngkpt]] or [[kptrlatt]]) depending on the value of [[occopt]]. For GS, this option might be used to generate Density-of-states (thanks to [[prtdos]]), or to produce STM charge density map (thanks to [[prtstm]]). For RF, this option is needed to compute the response to ddk perturbation. - * = -1 --> like -2, but the non-self-consistent calculation is followed by the determination of excited states within TDDFT. This is only possible for [[nkpt]]=1, with [[kpt]]=0 0 0. Note that the oscillator strength needs to be defined with respect to an origin of coordinate, thanks to the input variable [[boxcenter]]. The maximal number of Kohn-Sham excitations to be used to build the excited state TDDFT matrix can be defined by [[td_mexcit]], or indirectly by the maximum Kohn-Sham excitation energy [[td_maxene]]. + * -1 --> like -2, but the non-self-consistent calculation is followed by the determination of excited states within TDDFT. This is only possible for [[nkpt]] = 1, with [[kpt]] = 0 0 0. Note that the oscillator strength needs to be defined with respect to an origin of coordinate, thanks to the input variable [[boxcenter]]. The maximal number of Kohn-Sham excitations to be used to build the excited state TDDFT matrix can be defined by [[td_mexcit]], or indirectly by the maximum Kohn-Sham excitation energy [[td_maxene]]. """, ), @@ -7161,17 +7579,17 @@ defaultval=0, mnemonics="Integer for level of SECURity choice", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" In the presently used algorithms, there is a compromise between speed and robustness, that can be tuned by using [[isecur]]. If [[isecur]] =0, an extrapolation of out-of-line data is allowed, and might save one non-SCF calculation every two line minimisation when some stability conditions are fulfilled (since there are 2 non-SCF calculations per line minimisation, 1 out of 4 is saved) -Using [[isecur]]=1 or higher integers will raise gradually the threshold to make extrapolation. -Using [[isecur]]=-2 will allow to save 2 non-SCF calculations every three line +Using [[isecur]] = 1 or higher integers will raise gradually the threshold to make extrapolation. +Using [[isecur]] = -2 will allow to save 2 non-SCF calculations every three line minimisation, but this can make the algorithm unstable. Lower values of -[[isecur]] allows for more (tentative) savings. In any case, there must be one +[[isecur]] allows one for more (tentative) savings. In any case, there must be one non-SCF computation per line minimisation. No meaning for RF calculations yet. """, @@ -7185,14 +7603,14 @@ dimensions="scalar", defaultval=1, mnemonics="Integer governing the computation of STATic IMaGes", - text=""" + text=r""" This input variable is relevant when sets of images are activated (see [[imgmov]]). Not all images might be required to evolve from one time step to the other (see[[dynimage]]): these are static images. -If [[istatimg]]=0, the total energy of static images is not computed (but +If [[istatimg]] = 0, the total energy of static images is not computed (but static images are used to make the dynamic images evolve). This can be useful to save CPU time. -If [[istatimg]]=1, the total energy of static images is computed. +If [[istatimg]] = 1, the total energy of static images is computed. """, ), @@ -7206,11 +7624,11 @@ mnemonics="Integer for STATus file rate", characteristics=['[[DEVELOP]]', '[[NO_MULTI]]'], commentdefault="Values lower than 10 may not work on some machines.", - text=""" + text=r""" Govern the rate of output of the status file. This status file is written when the number of the call to the status subroutine is equal to [[istatshft]] modulo [[istatr]], so that it is written once every [[istatr]] call. -When [[istatr]]=0, there is no writing of a status file (which is the default). +When [[istatr]] = 0, there is no writing of a status file (which is the default). """, ), @@ -7223,7 +7641,7 @@ defaultval=1, mnemonics="Integer for STATus file SHiFT", characteristics=['[[DEVELOP]]', '[[NO_MULTI]]'], - text=""" + text=r""" Govern the rate of output of the status file. This status file is written when the number of the call to the status subroutine is equal to '[[istatshft]]' modulo ' **istatr** ', so that it is written once every ' **istatr** ' call. @@ -7239,8 +7657,8 @@ dimensions=['[[nkpt]]'], defaultval=MultipleValue(number=None, value=0), mnemonics="Integer for choice of STorage of WaveFunction at each k point", - commentdefault="For RF calculations, the Default is not used: istwfk is forced to be 1 deep inside the code, for all k points. For spin-orbit calculations ([[nspinor]]=2), istwfk is also forced to be 1, for all k points.", - text=""" + commentdefault="For RF calculations, the Default is not used: istwfk is forced to be 1 deep inside the code, for all k points. For spin-orbit calculations ([[nspinor]] = 2), istwfk is also forced to be 1, for all k points.", + text=r""" Control the way the wavefunction for each k-point is stored inside ABINIT, in reciprocal space. For the GS calculations, in the "cg" array containing the wavefunction coefficients, there is for each k-point and each band, a segment @@ -7267,7 +7685,7 @@ * 8 --> use time-reversal symmetry for k=( 0 1/2 1/2) * 9 --> use time-reversal symmetry for k=(1/2 1/2 1/2) * 0 --> (preprocessed) for each k point, choose automatically the appropriate time-reversal - option when it is allowed, and chose [[istwfk]]=1 for all the other k points. + option when it is allowed, and chose [[istwfk]] = 1 for all the other k points. """, ), @@ -7287,15 +7705,14 @@ functionals from the ETSF LibXC library (by M. Marques), available at the [ LibXC home page ](http://octopus-code.org/wiki/Libxc) Note that the choice made here should preferably agree with the choice made in -generating the original pseudopotential, except for [[ixc]]=0 (usually only +generating the original pseudopotential, except for [[ixc]] = 0 (usually only used for debugging). A warning is issued if this is not the case. Unfortunately, pseudopotential (or PAW) generators for hybrid functionals and mGGA are currently under development, so that one usually uses GGA or LDA pseudopotentials instead. The error should be limited when GGA or LDA pseudopotentials with semi-core states are used. Still this is a non- -controlled error.. Moreover, the choices [[ixc]]=1, 2, 3 and 7 are fits to the -same data, from Ceperley-Alder, and are rather similar, at least for spin- -unpolarized systems. +controlled error. Moreover, the choices [[ixc]] = 1, 2, 3 and 7 are fits to the +same data, from Ceperley-Alder, and are rather similar, at least for spin-unpolarized systems. The choice between the non-spin-polarized and spin-polarized case is governed by the value of [[nsppol]] (see below). @@ -7307,43 +7724,44 @@ modified, by including a zeta rescaled by 1.d0-1.d-6. This should affect total energy at the level of 1.d-6Ha, and should have an even smaller effect on differences of energies, or derivatives. -The value [[ixc]]=10 is used internally: gives the difference between -[[ixc]]=7 and [[ixc]]=9, for use with an accurate RPA correlation energy. +The value [[ixc]] = 10 is used internally: gives the difference between +[[ixc]] = 7 and [[ixc]] = 9, for use with an accurate RPA correlation energy. - * 0 --> NO xc; + * 0 --> NO xc. - * 1 --> LDA or LSD, Teter Pade parametrization (4/93, published in [[cite:Goedecker1996]], which reproduces Perdew-Wang (which reproduces Ceperley-Alder!). + * 1 --> LDA or LSD, Teter Pade parametrization (4/93, published in [[cite:Goedecker1996]], which reproduces Perdew-Wang 92 [[cite:Perdew1992a]] (which reproduces Ceperley-Alder [[cite:Ceperley1980]]!). * 2 --> LDA, Perdew-Zunger-Ceperley-Alder (no spin-polarization) [[cite:Perdew1981]] - * 3 --> LDA, old Teter rational polynomial parametrization (4/91) fit to Ceperley-Alder data (no spin-polarization) + * 3 --> LDA, old Teter rational polynomial parametrization (4/91) fit to Ceperley-Alder data (no spin-polarization) [[cite:Ceperley1980]] * 4 --> LDA, Wigner functional (no spin-polarization) - * 5 --> LDA, Hedin-Lundqvist functional (no spin-polarization) + * 5 --> LDA, Hedin-Lundqvist functional (no spin-polarization) [[cite:Hedin1971]] * 6 --> LDA, "X-alpha" functional (no spin-polarization) - * 7 --> LDA or LSD, Perdew-Wang 92 functional - * 8 --> LDA or LSD, x-only part of the Perdew-Wang 92 functional - * 9 --> LDA or LSD, x- and RPA correlation part of the Perdew-Wang 92 functional - - * 11 --> GGA, Perdew-Burke-Ernzerhof GGA functional - * 12 --> GGA, x-only part of Perdew-Burke-Ernzerhof GGA functional - * 13 --> GGA potential of van Leeuwen-Baerends, while for energy, Perdew-Wang 92 functional - * 14 --> GGA, revPBE of Y. Zhang and W. Yang, Phys. Rev. Lett. 80, 890 (1998) - * 15 --> GGA, RPBE of B. Hammer, L.B. Hansen and J.K. Norskov, Phys. Rev. B 59, 7413 (1999) - * 16 --> GGA, HTCH93 of F.A. Hamprecht, A.J. Cohen, D.J. Tozer, N.C. Handy, J. Chem. Phys. 109, 6264 (1998) - * 17 --> GGA, HTCH120 of A.D. Boese, N.L. Doltsinis, N.C. Handy, and M. Sprik, J. Chem. Phys 112, 1670 (1998) - The usual HCTH functional. - * 18 --> (NOT AVAILABLE: used internally for GGA BLYP pseudopotentials from M. Krack, see Theor. Chem. Acc. 114, 145 (2005), available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/potentials/Goedecker/abinit/blyp) \- use the LibXC instead, with [[ixc]]=-106131. - * 19 --> (NOT AVAILABLE: used internally for GGA BP86 pseudopotentials from M. Krack, see Theor. Chem. Acc. 114, 145 (2005), available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/potentials/Goedecker/abinit/bp) \- use the LibXC instead, with [[ixc]]=-106132. - - * 20 --> Fermi-Amaldi xc ( -1/N Hartree energy, where N is the number of electrons per cell; G=0 is not taken into account however), for TDDFT tests. No spin-pol. Does not work for RF. - * 21 --> same as 20, except that the xc-kernel is the LDA ([[ixc]]=1) one, for TDDFT tests. + * 7 --> LDA or LSD, Perdew-Wang 92 functional [[cite:Perdew1992a]] + * 8 --> LDA or LSD, x-only part of the Perdew-Wang 92 functional [[cite:Perdew1992a]] + * 9 --> LDA or LSD, x- and RPA correlation part of the Perdew-Wang 92 functional [[cite:Perdew1992a]] + + * 11 --> GGA, Perdew-Burke-Ernzerhof GGA functional [[cite:Perdew1996]] + * 12 --> GGA, x-only part of Perdew-Burke-Ernzerhof GGA functional [[cite:Perdew1996]] + * 13 --> GGA potential of van Leeuwen-Baerends [[cite:VanLeeuwen1994]], while for energy, Perdew-Wang 92 functional [[cite:Perdew1992a]] + * 14 --> GGA, revPBE of [[cite:Zhang1998]] + * 15 --> GGA, RPBE of [[cite:Hammer1999]] + * 16 --> GGA, HTCH93 of [[cite:Hamprecht1998]] + * 17 --> GGA, HTCH120 of [[cite:Boese2000]] - The usual HCTH functional. + * 18 --> (NOT AVAILABLE: used internally for GGA BLYP pseudopotentials from [[cite:Krack2005]], available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/data/POTENTIAL) \- use the LibXC instead, with [[ixc]] = -106131. + * 19 --> (NOT AVAILABLE: used internally for GGA BP86 pseudopotentials from [[cite:Krack2005]], available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/data/POTENTIAL) \- use the LibXC instead, with [[ixc]] = -106132. + + * 20 --> Fermi-Amaldi xc ( -1/N Hartree energy, where N is the number of electrons per cell; G=0 is not taken into account however), + for TDDFT tests. No spin-pol. Does not work for RF. + * 21 --> same as 20, except that the xc-kernel is the LDA ([[ixc]] = 1) one, for TDDFT tests. * 22 --> same as 20, except that the xc-kernel is the Burke-Petersilka-Gross hybrid, for TDDFT tests. - * 23 --> GGA of Z. Wu and R.E. Cohen, Phys. Rev. 73, 235116 (2006). - * 24 --> GGA, C09x exchange of V. R. Cooper, PRB 81, 161104(R) (2010). - * 26 --> GGA, HTCH147 of A.D. Boese, N.L. Doltsinis, N.C. Handy, and M. Sprik, J. Chem. Phys 112, 1670 (1998). - * 27 --> GGA, HTCH407 of A.D. Boese, and N.C. Handy, J. Chem. Phys 114, 5497 (2001). - * 28 --> (NOT AVAILABLE: used internally for GGA OLYP pseudopotentials from M. Krack, see Theor. Chem. Acc. 114, 145 (2005), available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/potentials/Goedecker/abinit/olyp) \- use the LibXC instead, with [[ixc]]=-110131. + * 23 --> GGA of [[cite:Wu2006]]. + * 24 --> GGA, C09x exchange of [[cite:Cooper2010]]. + * 26 --> GGA, HTCH147 of [[cite:Boese2000]]. + * 27 --> GGA, HTCH407 of [[cite:Boese2001]]. + * 28 --> (NOT AVAILABLE: used internally for GGA OLYP pseudopotentials from [[cite:Krack2005]], available from the [ CP2K repository ](https://github.com/cp2k/cp2k/tree/master/data/POTENTIAL) \- use the LibXC instead, with [[ixc]] = -110131. * 40 --> Hartree-Fock - * 41 --> PBE0, J.P. Perdew, M. Ernzerhof and K. Burke, J. Chem. Phys. 105, 9982 (1996) - * 42 --> PBE0-1/3, C.A. Guido, E. Bremond, C. Adamo and P. Cortona, J. Chem. Phys. 138, 021104 (2013) + * 41 --> PBE0, [[cite:Adamo1999]]. + * 42 --> PBE0-1/3, [[cite:Guido2013]]. **ETSF Lib XC functionals** @@ -7359,193 +7777,239 @@ (let us represent its identifier by XXX) and correlation functional (let us represent its identified by CCC), a six-digit number will have to be specified for [[ixc]], by concatenation, be it XXXCCC or CCCXXX. As an example, -[[ixc]]=-020 gives access to the Teter93 LDA, while [[ixc]]=-101130 gives +[[ixc]] = -020 gives access to the Teter93 LDA, while [[ixc]] = -101130 gives access to the PBE GGA. In version 0.9 of LibXC (December 2008), there are 16 three-dimensional (S)LDA functionals (1 for X, 14 for C, 1 for combined XC), and there are 41 three-dimensional GGA (23 for X, 8 for C, 10 for combined XC). Note that for a meta-GGA, the kinetic energy density is needed. -This means having [[usekden]]=1. - -(S)LDA functionals (do not forget to add a minus sign, as discussed above) - - * 001 --> XC_LDA_X [PAM Dirac, Proceedings of the Cambridge Philosophical Society 26, 376 (1930); F Bloch, Zeitschrift fuer Physik 57, 545 (1929) ] - * 002 --> XC_LDA_C_WIGNER Wigner parametrization [EP Wigner, Trans. Faraday Soc. 34, 678 (1938) ] - * 003 --> XC_LDA_C_RPA Random Phase Approximation [M Gell-Mann and KA Brueckner, Phys. Rev. 106, 364 (1957) ] - * 004 --> XC_LDA_C_HL Hedin & Lundqvist [L Hedin and BI Lundqvist, J. Phys. C 4, 2064 (1971) ] - * 005 --> XC_LDA_C_GL ! Gunnarson & Lundqvist [O Gunnarsson and BI Lundqvist, PRB 13, 4274 (1976) ] - * 006 --> XC_LDA_C_XALPHA ! Slater's Xalpha ] - * 007 --> XC_LDA_C_VWN ! Vosko, Wilk, & Nussair [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - * 008 --> XC_LDA_C_VWN_RPA ! Vosko, Wilk, & Nussair (RPA) [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - * 009 --> XC_LDA_C_PZ ! Perdew & Zunger [[cite:Perdew1981]] - * 010 --> XC_LDA_C_PZ_MOD ! Perdew & Zunger (Modified) [[cite:Perdew1981]] Modified to improve the matching between the low and high rs part ] - * 011 --> XC_LDA_C_OB_PZ ! Ortiz & Ballone (PZ) [G Ortiz and P Ballone, Phys. Rev. B 50, 1391 (1994); G Ortiz and P Ballone, Phys. Rev. B 56, 9970(E) (1997); [[cite:Perdew1981]] ] - * 012 --> XC_LDA_C_PW ! Perdew & Wang [JP Perdew and Y Wang, Phys. Rev. B 45, 13244 (1992) ] - * 013 --> XC_LDA_C_PW_MOD ! Perdew & Wang (Modified) [JP Perdew and Y Wang, Phys. Rev. B 45, 13244 (1992); Added extra digits to some constants as in the PBE routine see [ https://www.chem.uci.edu/~kieron/dftold2/pbe.php ](https://www.chem.uci.edu/~kieron/dftold2/pbe.php) (at some point it was available at http://dft.uci.edu/pbe.php) ] - * 014 --> XC_LDA_C_OB_PW ! Ortiz & Ballone (PW) [G Ortiz and P Ballone, Phys. Rev. B 50, 1391 (1994); G Ortiz and P Ballone, Phys. Rev. B 56, 9970(E) (1997); JP Perdew and Y Wang, Phys. Rev. B 45, 13244 (1992) ] - * 017 --> XC_LDA_C_vBH ! von Barth & Hedin [U von Barth and L Hedin, J. Phys. C: Solid State Phys. 5, 1629 (1972) ] - * 020 --> XC_LDA_XC_TETER93 ! Teter 93 parametrization [S Goedecker, M Teter, J Hutter, PRB 54, 1703 (1996) ] - * 022 --> XC_LDA_C_ML1 ! Modified LSD (version 1) of Proynov and Salahub [EI Proynov and D Salahub, Phys. Rev. B 49, 7874 (1994) ] - * 023 --> XC_LDA_C_ML2 ! Modified LSD (version 2) of Proynov and Salahub [EI Proynov and D Salahub, Phys. Rev. B 49, 7874 (1994) ] - * 024 --> XC_LDA_C_GOMBAS ! Gombas parametrization [P. Gombas, Pseudopotentials (Springer-Verlag, New York, 1967) ] - * 025 --> XC_LDA_C_PW_RPA ! Perdew & Wang fit of the RPA [JP Perdew and Y Wang, Phys. Rev. B 45, 13244 (1992) ] - * 027 --> XC_LDA_C_RC04 ! Ragot-Cortona [S Ragot and P Cortona, J. Chem. Phys. 121, 7671 (2004) ] - * 028 --> XC_LDA_C_VWN_1 ! Vosko, Wilk, & Nussair (1) [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - * 029 --> XC_LDA_C_VWN_2 ! Vosko, Wilk, & Nussair (2) [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - * 030 --> XC_LDA_C_VWN_3 ! Vosko, Wilk, & Nussair (3) [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - * 031 --> XC_LDA_C_VWN_4 ! Vosko, Wilk, & Nussair (4) [SH Vosko, L Wilk, and M Nusair, Can. J. Phys. 58, 1200 (1980) ] - -GGA functionals (do not forget to add a minus sign, as discussed above) - - * 84 --> XC_GGA_C_OP_XALPHA ! one-parameter progressive functional (G96 version) [T Tsuneda, T Suzumura, and K Hirao, J. Chem. Phys. 111, 5656 (1999) ] - * 85 --> XC_GGA_C_OP_G96 ! one-parameter progressive functional (G96 version) [T Tsuneda, T Suzumura, and K Hirao, J. Chem. Phys. 111, 5656 (1999) ] - * 86 --> XC_GGA_C_OP_PBE ! one-parameter progressive functional (PBE version) [T Tsuneda, T Suzumura, and K Hirao, J. Chem. Phys. 111, 5656 (1999) ] - * 87 --> XC_GGA_C_OP_B88 ! one-parameter progressive functional (B88 version) [T Tsuneda, T Suzumura, and K Hirao, J. Chem. Phys. 111, 5656 (1999) ] - * 88 --> XC_GGA_C_FT97 ! Filatov & Thiel correlation [M Filatov & W Thiel, Int. J. Quant. Chem. 62, 603-616 (1997); M Filatov & W Thiel, Mol Phys 91, 847 (1997) ] WARNING: this functional is not tested. Use at your own risks. - * 89 --> XC_GGA_C_SPBE ! PBE correlation to be used with the SSB exchange [M Swart, M Sola, and FM Bickelhaupt, J. Chem. Phys. 131, 094103 (2009) ] - * 90 --> XC_GGA_X_SSB_SW ! Swarta, Sola and Bickelhaupt correction to PBE [M Swart, M Sola, and FM Bickelhaupt, J. Comp. Meth. Sci. Engin. 9, 69 (2009) ] - * 91 --> XC_GGA_X_SSB ! WARNING: This functional gives NaN on IBM (XG20130608). Swarta, Sola and Bickelhaupt [M Swart, M Sola, and FM Bickelhaupt, J. Chem. Phys. 131, 094103 (2009) ] - * 92 --> XC_GGA_X_SSB_D ! WARNING: This functional gives NaN on IBM (XG20130608). Swarta, Sola and Bickelhaupt dispersion [M Swart, M Sola, and FM Bickelhaupt, J. Chem. Phys. 131, 094103 (2009) ] - * 93 --> XC_GGA_XC_HCTH_407P ! HCTH/407+ [AD Boese, A Chandra, JML Martin, and Dominik Marx, J. Chem. Phys. 119, 5965 (2003) ] - * 94 --> XC_GGA_XC_HCTH_P76 ! HCTH p=7/6 [G Menconi, PJ Wilson, and DJ Tozer, J. Chem. Phys. 114, 3958 (2001) ] - * 95 --> XC_GGA_XC_HCTH_P14 ! HCTH p=1/4 [G Menconi, PJ Wilson, and DJ Tozer, J. Chem. Phys. 114, 3958 (2001) ] - * 96 --> XC_GGA_XC_B97_GGA1 ! Becke 97 GGA-1 [AJ Cohen and NC Handy, Chem. Phys. Lett. 316, 160-166 (2000) ] - * 97 --> XC_GGA_XC_HCTH_A ! HCTH-A [FA Hamprecht, AJ Cohen, DJ Tozer, and NC Handy, J. Chem. Phys. 109, 6264 (1998) ] - * 98 --> XC_GGA_X_BPCCAC ! BPCCAC (GRAC for the energy) [E Bremond, D Pilard, I Ciofini, H Chermette, C Adamo, and P Cortona, Theor Chem Acc 131, 1184 (2012) ] - * 99 --> XC_GGA_C_REVTCA ! Tognetti, Cortona, Adamo (revised) [V Tognetti, P Cortona, and C Adamo, Chem. Phys. Lett. 460, 536-539 (2008) ] - * 100 --> XC_GGA_C_TCA ! Tognetti, Cortona, Adamo [V Tognetti, P Cortona, and C Adamo, J. Chem. Phys. 128, 034101 (2008) ] - * 101 --> XC_GGA_X_PBE ! Perdew, Burke & Ernzerhof exchange [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996); JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 78, 1396(E) (1997) ] - * 102 --> XC_GGA_X_PBE_R ! Perdew, Burke & Ernzerhof exchange (revised) [Y Zhang and W Yang, Phys. Rev. Lett 80, 890 (1998) ] - * 103 --> XC_GGA_X_B86 ! Becke 86 Xalfa,beta,gamma [AD Becke, J. Chem. Phys 84, 4524 (1986) ] - * 104 --> XC_GGA_X_HERMAN ! Herman Xalphabeta GGA [F Herman, JP Van Dyke, and IB Ortenburger, Phys. Rev. Lett. 22, 807 (1969); F Herman, IB Ortenburger, and JP Van Dyke, Int. J. Quantum Chem. Symp. 3, 827 (1970) ] - * 105 --> XC_GGA_X_B86_MGC ! Becke 86 Xalfa,beta,gamma (with mod. grad. correction) [AD Becke, J. Chem. Phys 84, 4524 (1986); AD Becke, J. Chem. Phys 85, 7184 (1986) ] - * 106 --> XC_GGA_X_B88 ! Becke 88 [AD Becke, Phys. Rev. A 38, 3098 (1988) ] - * 107 --> XC_GGA_X_G96 ! Gill 96 [PMW Gill, Mol. Phys. 89, 433 (1996) ] - * 108 --> XC_GGA_X_PW86 ! Perdew & Wang 86 [JP Perdew and Y Wang, Phys. Rev. B 33, 8800 (1986) ] - * 109 --> XC_GGA_X_PW91 ! Perdew & Wang 91 [JP Perdew, in Proceedings of the 21st Annual International Symposium on the Electronic Structure of Solids, ed. by P Ziesche and H Eschrig (Akademie Verlag, Berlin, 1991), p. 11.; JP Perdew, JA Chevary, SH Vosko, KA Jackson, MR Pederson, DJ Singh, and C Fiolhais, Phys. Rev. B 46, 6671 (1992); JP Perdew, JA Chevary, SH Vosko, KA Jackson, MR Pederson, DJ Singh, and C Fiolhais, Phys. Rev. B 48, 4978(E) (1993) ] - * 110 --> XC_GGA_X_OPTX ! Handy & Cohen OPTX 01 [NC Handy and AJ Cohen, Mol. Phys. 99, 403 (2001) ] - * 111 --> XC_GGA_X_DK87_R1 ! dePristo & Kress 87 (version R1) [AE DePristo and JD Kress, J. Chem. Phys. 86, 1425 (1987) ] - * 112 --> XC_GGA_X_DK87_R2 ! dePristo & Kress 87 (version R2) [AE DePristo and JD Kress, J. Chem. Phys. 86, 1425 (1987) ] - * 113 --> XC_GGA_X_LG93 ! Lacks & Gordon 93 [DJ Lacks and RG Gordon, Phys. Rev. A 47, 4681 (1993) ] - * 114 --> XC_GGA_X_FT97_A ! Filatov & Thiel 97 (version A) [M Filatov and W Thiel, Mol. Phys 91, 847 (1997) ] - * 115 --> XC_GGA_X_FT97_B ! Filatov & Thiel 97 (version B) [M Filatov and W Thiel, Mol. Phys 91, 847 (1997) ] - * 116 --> XC_GGA_X_PBE_SOL ! Perdew, Burke & Ernzerhof exchange (solids) [JP Perdew, et al, Phys. Rev. Lett. 100, 136406 (2008) ] - * 117 --> XC_GGA_X_RPBE ! Hammer, Hansen & Norskov (PBE-like) [B Hammer, LB Hansen and JK Norskov, Phys. Rev. B 59, 7413 (1999) ] - * 118 --> XC_GGA_X_WC ! Wu & Cohen [Z Wu and RE Cohen, Phys. Rev. B 73, 235116 (2006) ] - * 119 --> XC_GGA_X_mPW91 ! Modified form of PW91 by Adamo & Barone [C Adamo and V Barone, J. Chem. Phys. 108, 664 (1998) ] - * 120 --> XC_GGA_X_AM05 ! Armiento & Mattsson 05 exchange [R Armiento and AE Mattsson, Phys. Rev. B 72, 085108 (2005); AE Mattsson, R Armiento, J Paier, G Kresse, JM Wills, and TR Mattsson, J. Chem. Phys. 128, 084714 (2008) ] - * 121 --> XC_GGA_X_PBEA ! Madsen (PBE-like) [G Madsen, Phys. Rev. B 75, 195108 (2007) ] - * 122 --> XC_GGA_X_MPBE ! Adamo & Barone modification to PBE [C Adamo and V Barone, J. Chem. Phys. 116, 5933 (2002) ] - * 123 --> XC_GGA_X_XPBE ! xPBE reparametrization by Xu & Goddard [X Xu and WA Goddard III, J. Chem. Phys. 121, 4068 (2004) ] - * 125 --> XC_GGA_X_BAYESIAN ! Bayesian best fit for the enhancement factor [JJ Mortensen, K Kaasbjerg, SL Frederiksen, JK Norskov, JP Sethna, and KW Jacobsen, Phys. Rev. Lett. 95, 216401 (2005) ] - * 126 --> XC_GGA_X_PBE_JSJR ! PBE JSJR reparametrization by Pedroza, Silva & Capelle [LS Pedroza, AJR da Silva, and K. Capelle, Phys. Rev. B 79, 201106(R) (2009) ] - * 130 --> XC_GGA_C_PBE ! Perdew, Burke & Ernzerhof correlation [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996); JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 78, 1396(E) (1997) ] - * 131 --> XC_GGA_C_LYP ! Lee, Yang & Parr [C Lee, W Yang and RG Parr, Phys. Rev. B 37, 785 (1988) B Miehlich, A Savin, H Stoll and H Preuss, Chem. Phys. Lett. 157, 200 (1989) ] - * 132 --> XC_GGA_C_P86 ! Perdew 86 [JP Perdew, Phys. Rev. B 33, 8822 (1986) ] - * 133 --> XC_GGA_C_PBE_SOL ! Perdew, Burke & Ernzerhof correlation SOL [JP Perdew, et al, Phys. Rev. Lett. 100, 136406 (2008) ] - * 134 --> XC_GGA_C_PW91 ! Perdew & Wang 91 [JP Perdew, JA Chevary, SH Vosko, KA Jackson, MR Pederson, DJ Singh, and C Fiolhais, Phys. Rev. B 46, 6671 (1992) ] - * 135 --> XC_GGA_C_AM05 ! Armiento & Mattsson 05 correlation [ R Armiento and AE Mattsson, Phys. Rev. B 72, 085108 (2005); AE Mattsson, R Armiento, J Paier, G Kresse, JM Wills, and TR Mattsson, J. Chem. Phys. 128, 084714 (2008) ] - * 136 --> XC_GGA_C_XPBE ! xPBE reparametrization by Xu & Goddard [X Xu and WA Goddard III, J. Chem. Phys. 121, 4068 (2004) ] - * 137 --> XC_GGA_C_LM ! Langreth and Mehl correlation [DC Langreth and MJ Mehl, Phys. Rev. Lett. 47, 446 (1981) ] - * 138 --> XC_GGA_C_PBE_JRGX ! JRGX reparametrization by Pedroza, Silva & Capelle [LS Pedroza, AJR da Silva, and K. Capelle, Phys. Rev. B 79, 201106(R) (2009) ] - * 139 --> XC_GGA_X_OPTB88_VDW ! Becke 88 reoptimized to be used with vdW functional of Dion et al [J Klimes, DR Bowler, and A Michaelides, J. Phys.: Condens. Matter 22, 022201 (2010) ] - * 140 --> XC_GGA_X_PBEK1_VDW ! PBE reparametrization for vdW [J Klimes, DR Bowler, and A Michaelides, J. Phys.: Condens. Matter 22, 022201 (2010) ] - * 141 --> XC_GGA_X_OPTPBE_VDW ! PBE reparametrization for vdW [J Klimes, DR Bowler, and A Michaelides, J. Phys.: Condens. Matter 22, 022201 (2010) ] - * 142 --> XC_GGA_X_RGE2 ! Regularized PBE [A Ruzsinszky, GI Csonka, and G Scuseria, J. Chem. Theory Comput. 5, 763 (2009) ] - * 143 --> XC_GGA_C_RGE2 ! Regularized PBE [A Ruzsinszky, GI Csonka, and G Scuseria, J. Chem. Theory Comput. 5, 763 (2009) ] - * 144 --> XC_GGA_X_RPW86 ! refitted Perdew & Wang 86 [ED Murray, K Lee and DC Langreth, J. Chem. Theory Comput. 5, 2754-2762 (2009) ] - * 145 --> XC_GGA_X_KT1 ! Keal and Tozer version 1 [TW Keal and DJ Tozer, J. Chem. Phys. 119, 3015 (2003) ] - * 146 --> XC_GGA_XC_KT2 ! WARNING: This functional gives NaN on IBM (XG20130608). Keal and Tozer version 2 [TW Keal and DJ Tozer, J. Chem. Phys. 119, 3015 (2003) ] - * 147 --> XC_GGA_C_WL ! Wilson & Levy [LC Wilson and M Levy, Phys. Rev. B 41, 12930 (1990) ] - * 148 --> XC_GGA_C_WI ! Wilson & Ivanov [LC Wilson & S Ivanov, Int. J. Quantum Chem. 69, 523-532 (1998) ] - * 149 --> XC_GGA_X_MB88 ! Modified Becke 88 for proton transfer [V Tognetti and C Adamo, J. Phys. Chem. A 113, 14415-14419 (2009) ] - * 150 --> XC_GGA_X_SOGGA ! Second-order generalized gradient approximation [Y Zhao and DG Truhlar, J. Chem. Phys. 128, 184109 (2008); http://comp.chem.umn.edu/mfm/index.html ] - * 151 --> XC_GGA_X_SOGGA11 ! Second-order generalized gradient approximation 2011 [R Peverati, Y Zhao, and DG Truhlar, J. Phys. Chem. Lett. 2, 1911-1997 (2011); http://comp.chem.umn.edu/mfm/index.html ] - * 152 --> XC_GGA_C_SOGGA11 ! Second-order generalized gradient approximation 2011 [R Peverati, Y Zhao, and DG Truhlar, J. Phys. Chem. Lett. 2, 1911-1997 (2011); http://comp.chem.umn.edu/mfm/index.html ] - * 153 --> XC_GGA_C_WI0 ! Wilson & Ivanov initial version [LC Wilson & S Ivanov, Int. J. Quantum Chem. 69, 523-532 (1998) ] - * 154 --> XC_GGA_XC_TH1 ! Tozer and Handy v. 1 [DJ Tozer and NC Handy, J. Chem. Phys. 108, 2545 (1998) ] WARNING: this functional is not tested. Use at your own risks. - * 155 --> XC_GGA_XC_TH2 ! Tozer and Handy v. 2 [DJ Tozer and NC Handy, J. Phys. Chem. A 102, 3162 (1998) ] - * 156 --> XC_GGA_XC_TH3 ! Tozer and Handy v. 3 [DJ Tozer and NC Handy, Mol. Phys. 94, 707 (1998) ] - * 157 --> XC_GGA_XC_TH4 ! Tozer and Handy v. 4 [DJ Tozer and NC Handy, Mol. Phys. 94, 707 (1998) ] - * 158 --> XC_GGA_X_C09X ! C09x to be used with the VdW of Rutgers-Chalmers [VR Cooper, PRB 81, 161104(R) (2010) ] - * 159 --> XC_GGA_C_SOGGA11_X ! To be used with hyb_gga_x_SOGGA11-X [R Peverati and DG Truhlar, J. Chem. Phys. 135, 191102 (2011); http://comp.chem.umn.edu/mfm/index.html ] - * 161 --> XC_GGA_XC_HCTH_93 ! HCTH functional fitted to 93 molecules [FA Hamprecht, AJ Cohen, DJ Tozer, and NC Handy, J. Chem. Phys. 109, 6264 (1998) ] - * 162 --> XC_GGA_XC_HCTH_120 ! HCTH functional fitted to 120 molecules [AD Boese, NL Doltsinis, NC Handy, and M Sprik, J. Chem. Phys. 112, 1670 (2000) ] - * 163 --> XC_GGA_XC_HCTH_147 ! HCTH functional fitted to 147 molecules [AD Boese, NL Doltsinis, NC Handy, and M Sprik, J. Chem. Phys. 112, 1670 (2000) ] - * 164 --> XC_GGA_XC_HCTH_407 ! HCTH functional fitted to 407 molecules [AD Boese, and NC Handy, J. Chem. Phys. 114, 5497 (2001) ] - * 165 --> XC_GGA_XC_EDF1 ! Empirical functionals from Adamson, Gill, and Pople [RD Adamson, PMW Gill, and JA Pople, Chem. Phys. Lett. 284 6 (1998) ] - * 166 --> XC_GGA_XC_XLYP ! XLYP functional [X Xu and WA Goddard, III, PNAS 101, 2673 (2004) ] - * 167 --> XC_GGA_XC_B97 ! Becke 97 [AD Becke, J. Chem. Phys. 107, 8554-8560 (1997) ] - * 168 --> XC_GGA_XC_B97_1 ! Becke 97-1 [FA Hamprecht, AJ Cohen, DJ Tozer, and NC Handy, J. Chem. Phys. 109, 6264 (1998); AD Becke, J. Chem. Phys. 107, 8554-8560 (1997) ] - * 169 --> XC_GGA_XC_B97_2 ! Becke 97-2 [AD Becke, J. Chem. Phys. 107, 8554-8560 (1997) ] - * 170 --> XC_GGA_XC_B97_D ! Grimme functional to be used with C6 vdW term [S Grimme, J. Comput. Chem. 27, 1787 (2006) ] - * 171 --> XC_GGA_XC_B97_K ! Boese-Martin for Kinetics [AD Boese and JML Martin, J. Chem. Phys., Vol. 121, 3405 (2004) ] - * 172 --> XC_GGA_XC_B97_3 ! Becke 97-3 [TW Keal and DJ Tozer, J. Chem. Phys. 123, 121103 (2005) ] - * 173 --> XC_GGA_XC_PBE1W ! Functionals fitted for water [EE Dahlke and DG Truhlar, J. Phys. Chem. B 109, 15677 (2005) ] - * 174 --> XC_GGA_XC_MPWLYP1W ! Functionals fitted for water [EE Dahlke and DG Truhlar, J. Phys. Chem. B 109, 15677 (2005) ] - * 175 --> XC_GGA_XC_PBELYP1W ! Functionals fitted for water [EE Dahlke and DG Truhlar, J. Phys. Chem. B 109, 15677 (2005) ] - * 176 --> XC_GGA_XC_SB98_1a ! Schmider-Becke 98 parameterization 1a [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 177 --> XC_GGA_XC_SB98_1b ! Schmider-Becke 98 parameterization 1b [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 178 --> XC_GGA_XC_SB98_1c ! Schmider-Becke 98 parameterization 1c [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 179 --> XC_GGA_XC_SB98_2a ! Schmider-Becke 98 parameterization 2a [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 180 --> XC_GGA_XC_SB98_2b ! Schmider-Becke 98 parameterization 2b [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 181 --> XC_GGA_XC_SB98_2c ! Schmider-Becke 98 parameterization 2c [HL Schmider and AD Becke, J. Chem. Phys. 108, 9624 (1998) ] - * 183 --> XC_GGA_X_OL2 ! Exchange form based on Ou-Yang and Levy v.2 [P Fuentealba and O Reyes, Chem. Phys. Lett. 232, 31-34 (1995); H Ou-Yang, M Levy, Int. J. of Quant. Chem. 40, 379-388 (1991) ] - * 184 --> XC_GGA_X_APBE ! mu fixed from the semiclassical neutral atom [LA Constantin, E Fabiano, S Laricchia, and F Della Sala, Phys. Rev. Lett. 106, 186406 (2011) ] - * 186 --> XC_GGA_C_APBE ! mu fixed from the semiclassical neutral atom [LA Constantin, E Fabiano, S Laricchia, and F Della Sala, Phys. Rev. Lett. 106, 186406 (2011) ] - * 191 --> XC_GGA_X_HTBS! Haas, Tran, Blaha, and Schwarz [P Haas, F Tran, P Blaha, and K Schwarz, Phys. Rev. B 83, 205117 (2011) ] - * 192 --> XC_GGA_X_AIRY ! Constantin et al based on the Airy gas [LA Constantin, A Ruzsinszky, and JP Perdew, Phys. Rev. B 80, 035125 (2009) ] - * 193 --> XC_GGA_X_LAG ! Local Airy Gas [L Vitos, B Johansson, J Kollar, and HL Skriver, Phys. Rev. B 62, 10046-10050 (2000) ] - * 194 --> XC_GGA_XC_MOHLYP ! Functional for organometallic chemistry [NE Schultz, Y Zhao, DGJ Truhlar, Phys. Chem. A, 109, 11127 (2005) ] - * 195 --> XC_GGA_XC_MOHLYP2 ! Functional for barrier heights [J Zheng, Y Zhao, DGJ Truhlar, Chem. Theory. Comput. 5, 808 (2009) ] - * 196 --> XC_GGA_XC_TH_FL ! Tozer and Handy v. FL [DJ Tozer, NC Handy, amd WH Green, Chem. Phys. Lett. 273, 183-194 (1997) ] - * 197 --> XC_GGA_XC_TH_FC ! Tozer and Handy v. FC [DJ Tozer, NC Handy, amd WH Green, Chem. Phys. Lett. 273, 183-194 (1997) ] - * 198 --> XC_GGA_XC_TH_FCFO ! Tozer and Handy v. FCFO [DJ Tozer, NC Handy, amd WH Green, Chem. Phys. Lett. 273, 183-194 (1997) ] - * 199 --> XC_GGA_XC_TH_FCO ! Tozer and Handy v. FCO [DJ Tozer, NC Handy, amd WH Green, Chem. Phys. Lett. 273, 183-194 (1997) ] - * 200 --> XC_GGA_C_OPTC ! Optimized correlation functional of Cohen and Handy [AJ Cohen and NC Handy, Mol. Phys. 99, 607-615 (2001) ] - * 524 --> XC_GGA_X_WPBEH ! short-range version of the PBE [J Heyd, GE Scuseria, and M Ernzerhof, J. Chem. Phys. 118, 8207 (2003) ] - * 525 --> XC_GGA_X_HJS_PBE ! HJS screened exchange PBE version [TM Henderson, BG Janesko, and GE Scuseria, J. Chem. Phys. 128, 194105 (2008) ] - * 526 --> XC_GGA_X_HJS_PBE_SOL ! HJS screened exchange PBE_SOL version [TM Henderson, BG Janesko, and GE Scuseria, J. Chem. Phys. 128, 194105 (2008) ] - * 527 --> XC_GGA_X_HJS_B88 ! HJS screened exchange B88 version [TM Henderson, BG Janesko, and GE Scuseria, J. Chem. Phys. 128, 194105 (2008) ] WARNING: this functional is not tested. Use at your own risks. - * 528 --> XC_GGA_X_HJS_B97X ! HJS screened exchange B97x version [TM Henderson, BG Janesko, and GE Scuseria, J. Chem. Phys. 128, 194105 (2008) ] - * 529 --> XC_GGA_X_ITYH ! short-range recipe for exchange GGA functionals [H Iikura, T Tsuneda, T Yanai, and K Hirao, J. Chem. Phys. 115, 3540 (2001) ] WARNING: this functional is not tested. Use at your own risks. - -MetaGGA functionals (do not forget to add a minus sign, as discussed above). -See Sun et al, PRB 84, 035117 (2011) for the formulas. - - * 202 --> XC_MGGA_X_TPSS ! Tao, Perdew, Staroverov & Scuseria [J Tao, JP Perdew, VN Staroverov, and G Scuseria, Phys. Rev. Lett. 91, 146401 (2003); JP Perdew, J Tao, VN Staroverov, and G Scuseria, J. Chem. Phys. 120, 6898 (2004) ] - * 203 --> XC_MGGA_X_M06L ! Zhao, Truhlar exchange [Y Zhao and DG Truhlar, JCP 125, 194101 (2006); Y Zhao and DG Truhlar, Theor. Chem. Account 120, 215 (2008) ] - * 204 --> XC_MGGA_X_GVT4 ! GVT4 (X part of VSXC) from van Voorhis and Scuseria [T Van Voorhis and GE Scuseria, JCP 109, 400 (1998) ] - * 205 --> XC_MGGA_X_TAU_HCTH ! tau-HCTH from Boese and Handy [AD Boese and NC Handy, JCP 116, 9559 (2002) ] - * 207 --> XC_MGGA_X_BJ06 ! Becke & Johnson correction to Becke-Roussel 89 [AD Becke and ER Johnson, J. Chem. Phys. 124, 221101 (2006) ] WARNING: this Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92. - * 208 --> XC_MGGA_X_TB09 ! Tran-blaha - correction to Becke & Johnson correction to Becke-Roussel 89 [F Tran and P Blaha, Phys. Rev. Lett. 102, 226401 (2009) ] WARNING: this Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92. - * 209 --> XC_MGGA_X_RPP09 ! Rasanen, Pittalis, and Proetto correction to Becke & Johnson [E Rasanen, S Pittalis & C Proetto, arXiv:0909.1477 (2009) ] WARNING: this Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92. - * 232 --> XC_MGGA_C_VSXC ! VSxc from Van Voorhis and Scuseria (correlation part) [T Van Voorhis and GE Scuseria, JCP 109, 400 (1998) ] - -Hybrid functionals (do not forget to add a minus sign, as discussed above). - - * 402 --> XC_HYB_GGA_XC_B3LYP ! The (in)famous B3LYP [PJ Stephens, FJ Devlin, CF Chabalowski, MJ Frisch, J. Phys. Chem. 98 11623 (1994) ] - * 406 --> XC_HYB_GGA_XC_PBEH ! PBEH (PBE0) [C Adamo and V Barone, J. Chem. Phys. 110, 6158 (1999); M. Ernzerhof, G. E. Scuseria, J. Chem. Phys. 110, 5029 (1999) ] - * 427 --> XC_HYB_GGA_XC_HSE03 ! The 2003 version of the screened hybrid HSE (in this case one should use omega^HF = 0.15/sqrt(2) and omega^PBE = 0.15*(2.0)**1/3) -428 --> XC_HYB_GGA_XC_HSE06 ! The 2006 version of the screened hybrid HSE (in -this case one should use omega^HF = omega^PBE = 0.11) -(The following section is taken from the LibXC sources. In ABINIT, we stick to -the LibXC choice.) Note that there is an enormous mess in the literature -concerning the values of omega in HSE. This is due to an error in the original -paper that stated that they had used omega=0.15. This was in fact not true, -and the real value used was omega^HF = 0.15/sqrt(2) ~ 0.1061 and omega^PBE = -0.15*(2.0)**1/3 ~ 0.1890. In 2006 Krukau et al [JCP 125, 224106 (2006)] tried -to clarify the situation, and called HSE03 to the above choice of parameters, -and called HSE06 to the functional where omega^HF=omega^PBE. By testing -several properties for atoms they reached the conclusion that the best value -for omega=0.11. Of course, codes are just as messy as the papers. In espresso -HSE06 has the value omega=0.106. VASP, on the other hand, uses for HSE03 the -same value omega^HF = omega^PBE = 0.3 (A^-1) ~ 0.1587 and for HSE06 omega^HF = -omega^PBE = 0.2 (A^-1) ~ 0.1058. [J Heyd, GE Scuseria, and M Ernzerhof, J. -Chem. Phys. 118, 8207 (2003); J Heyd, GE Scuseria, and M Ernzerhof, J. Chem. -Phys. 124, 219906 (2006); AV Krukau, OA Vydrov, AF Izmaylov, and GE Scuseria, -J. Chem. Phys. 125, 224106 (2006) ] - - * 456 --> XC_HYB_GGA_XC_PBE0_13 ! PBE0-1/3 [P Cortona, J. Chem. Phys. 136, 086101 (2012) ] +This means having [[usekden]] = 1. + +==(S)LDA functionals== (do not forget to add a minus sign, as discussed above) + + * 001 --> XC_LDA_X [[cite:Dirac1930]], [[cite:Bloch1929]] + * 002 --> XC_LDA_C_WIGNER Wigner parametrization [[cite:Wigner1938]] + * 003 --> XC_LDA_C_RPA Random Phase Approximation [[cite:GellMann1957]] + * 004 --> XC_LDA_C_HL Hedin & Lundqvist [[cite:Hedin1971]] + * 005 --> XC_LDA_C_GL Gunnarson & Lundqvist [[cite:Gunnarsson1976]] + * 006 --> XC_LDA_C_XALPHA Slaters Xalpha + * 007 --> XC_LDA_C_VWN [[cite:Vosko1980]] + * 008 --> XC_LDA_C_VWN_RPA [[cite:Vosko1980]] + * 009 --> XC_LDA_C_PZ Perdew & Zunger [[cite:Perdew1981]] + * 010 --> XC_LDA_C_PZ_MOD Perdew & Zunger (Modified) [[cite:Perdew1981]] Modified to improve the matching between the low and high rs part + * 011 --> XC_LDA_C_OB_PZ Ortiz & Ballone (PZ) [[cite:Ortiz1994]] [[cite:Ortiz1997]] [[cite:Perdew1981]] + * 012 --> XC_LDA_C_PW Perdew & Wang [[cite:Perdew1992a]] + * 013 --> XC_LDA_C_PW_MOD Perdew & Wang (Modified) [[cite:Perdew1992a]]; Added extra digits to some constants as in the PBE routine. + * 014 --> XC_LDA_C_OB_PW Ortiz & Ballone (PW) [[cite:Ortiz1994]] [[cite:Ortiz1997]] [[cite:Perdew1992a]] + * 017 --> XC_LDA_C_vBH von Barth & Hedin [[cite:Barth1972]] + * 020 --> XC_LDA_XC_TETER93 Teter 93 parametrization [[cite:Goedecker1996]] + * 022 --> XC_LDA_C_ML1 Modified LSD (version 1) of Proynov and Salahub [[cite:Proynov1994]] + * 023 --> XC_LDA_C_ML2 Modified LSD (version 2) of Proynov and Salahub [[cite:Proynov1994]] + * 024 --> XC_LDA_C_GOMBAS Gombas parametrization [[cite:Gombas1967]] + * 025 --> XC_LDA_C_PW_RPA Perdew & Wang fit of the RPA [[cite:Perdew1992a]] + * 027 --> XC_LDA_C_RC04 Ragot-Cortona [[cite:Ragot2004]] + * 028 --> XC_LDA_C_VWN_1 Vosko, Wilk, & Nussair (1) [[cite:Vosko1980]] + * 029 --> XC_LDA_C_VWN_2 Vosko, Wilk, & Nussair (2) [[cite:Vosko1980]] + * 030 --> XC_LDA_C_VWN_3 Vosko, Wilk, & Nussair (3) [[cite:Vosko1980]] + * 031 --> XC_LDA_C_VWN_4 Vosko, Wilk, & Nussair (4) [[cite:Vosko1980]] + +==GGA functionals== (do not forget to add a minus sign, as discussed above) + + * 084 --> XC_GGA_C_OP_XALPHA one-parameter progressive functional (G96 version) [[cite:Tsuneda1999]] + * 085 --> XC_GGA_C_OP_G96 one-parameter progressive functional (G96 version) [[cite:Tsuneda1999]] + * 086 --> XC_GGA_C_OP_PBE one-parameter progressive functional (PBE version) [[cite:Tsuneda1999]] + * 087 --> XC_GGA_C_OP_B88 one-parameter progressive functional (B88 version) [[cite:Tsuneda1999]] + * 088 --> XC_GGA_C_FT97 Filatov & Thiel correlation [[cite:Filatov1997a]] [[cite:Filatov1997]] + +!!! warning + this functional is not tested. Use at your own risks. + + * 089 --> XC_GGA_C_SPBE PBE correlation to be used with the SSB exchange [[cite:Swart2009]] + * 090 --> XC_GGA_X_SSB_SW Swart, Sola and Bickelhaupt correction to PBE [[cite:Swart2009a]] + * 091 --> XC_GGA_X_SSB [[cite:Swart2009]] + +!!! warning + This functional gives NaN on IBM (XG20130608). + + * 092 --> XC_GGA_X_SSB_D [[cite:Swart2009]] + +!!! warning + This functional gives NaN on IBM (XG20130608). + + * 093 --> XC_GGA_XC_HCTH_407P HCTH/407+ [[cite:Boese2003]] + * 094 --> XC_GGA_XC_HCTH_P76 HCTH p=7/6 [[cite:Menconi2001]] + * 095 --> XC_GGA_XC_HCTH_P14 HCTH p=1/4 [[cite:Menconi2001]] + * 096 --> XC_GGA_XC_B97_GGA1 Becke 97 GGA-1 [[cite:Cohen2000]] + * 097 --> XC_GGA_XC_HCTH_A HCTH-A [[cite:Hamprecht1998]] + * 098 --> XC_GGA_X_BPCCAC BPCCAC (GRAC for the energy) [[cite:Bremond2012]] + * 099 --> XC_GGA_C_REVTCA Tognetti, Cortona, Adamo (revised) [[cite:Tognetti2008]] + * 100 --> XC_GGA_C_TCA Tognetti, Cortona, Adamo [[cite:Tognetti2008a]] + * 101 --> XC_GGA_X_PBE Perdew, Burke & Ernzerhof exchange [[cite:Perdew1996]] [[cite:Perdew1997]] + * 102 --> XC_GGA_X_PBE_R Perdew, Burke & Ernzerhof exchange (revised) [[cite:Zhang1998]] + * 103 --> XC_GGA_X_B86 Becke 86 Xalfa,beta,gamma [[cite:Becke1986]] + * 104 --> XC_GGA_X_HERMAN Herman Xalphabeta GGA [[cite:Herman1969]] [[cite:Herman2009]] + * 105 --> XC_GGA_X_B86_MGC Becke 86 Xalfa,beta,gamma (with mod. grad. correction) [[cite:Becke1986]] [[cite:Becke1986a]] + * 106 --> XC_GGA_X_B88 Becke 88 [[cite:Becke1988]] + * 107 --> XC_GGA_X_G96 Gill 96 [[cite:Gill1996]] + * 108 --> XC_GGA_X_PW86 Perdew & Wang 86 [[cite:Perdew1986a]] + * 109 --> XC_GGA_X_PW91 Perdew & Wang 91 [JP Perdew, in Proceedings of the 21st Annual International Symposium on the Electronic Structure of Solids, ed. by P Ziesche and H Eschrig (Akademie Verlag, Berlin, 1991), p. 11. ] [[cite:Perdew1992]] [[cite:Perdew1993]] + * 110 --> XC_GGA_X_OPTX Handy & Cohen OPTX 01 [[cite:Handy2001]] + * 111 --> XC_GGA_X_DK87_R1 dePristo & Kress 87 (version R1) [[cite:DePristo1987]] + * 112 --> XC_GGA_X_DK87_R2 dePristo & Kress 87 (version R2) [[cite:DePristo1987]] + * 113 --> XC_GGA_X_LG93 Lacks & Gordon 93 [[cite:Lacks1993]] + * 114 --> XC_GGA_X_FT97_A Filatov & Thiel 97 (version A) [[cite:Filatov1997a]] + * 115 --> XC_GGA_X_FT97_B Filatov & Thiel 97 (version B) [[cite:Filatov1997a]] + * 116 --> XC_GGA_X_PBE_SOL Perdew, Burke & Ernzerhof exchange (solids) [[cite:Perdew2008]] + * 117 --> XC_GGA_X_RPBE Hammer, Hansen & Norskov (PBE-like) [[cite:Hammer1999]] + * 118 --> XC_GGA_X_WC Wu & Cohen [[cite:Wu2006]] + * 119 --> XC_GGA_X_mPW91 Modified form of PW91 by Adamo & Barone [[cite:Adamo1998]] + * 120 --> XC_GGA_X_AM05 Armiento & Mattsson 05 exchange [[cite:Armiento2005]] [[cite:Mattsson2008]] + * 121 --> XC_GGA_X_PBEA Madsen (PBE-like) [[cite:Madsen2007]] + * 122 --> XC_GGA_X_MPBE Adamo & Barone modification to PBE [[cite:Adamo2002]] + * 123 --> XC_GGA_X_XPBE xPBE reparametrization by Xu & Goddard [[cite:Xu2004]] + * 125 --> XC_GGA_X_BAYESIAN Bayesian best fit for the enhancement factor [[cite:Mortensen2005]] + * 126 --> XC_GGA_X_PBE_JSJR PBE JSJR reparametrization by Pedroza, Silva & Capelle [[cite:Pedroza2009]] + * 130 --> XC_GGA_C_PBE Perdew, Burke & Ernzerhof correlation [[cite:Perdew1996]] [[cite:Perdew1997]] + * 131 --> XC_GGA_C_LYP Lee, Yang & Parr [[cite:Lee1988]] [[cite:Miehlich1989]] + * 132 --> XC_GGA_C_P86 Perdew 86 [[cite:Perdew1986]] + * 133 --> XC_GGA_C_PBE_SOL Perdew, Burke & Ernzerhof correlation SOL [[cite:Perdew2008]] + * 134 --> XC_GGA_C_PW91 Perdew & Wang 91 [[cite:Perdew1992]] + * 135 --> XC_GGA_C_AM05 Armiento & Mattsson 05 correlation [[cite:Armiento2005]] [[cite:Mattsson2008]] + * 136 --> XC_GGA_C_XPBE xPBE reparametrization by Xu & Goddard [[cite:Xu2004]] + * 137 --> XC_GGA_C_LM Langreth and Mehl correlation [[cite:Langreth1981]] + * 138 --> XC_GGA_C_PBE_JRGX JRGX reparametrization by Pedroza, Silva & Capelle [[cite:Pedroza2009]] + * 139 --> XC_GGA_X_OPTB88_VDW Becke 88 reoptimized to be used with vdW functional of Dion et al [[cite:Klimes2011]] + * 140 --> XC_GGA_X_PBEK1_VDW PBE reparametrization for vdW [[cite:Klimes2011]] + * 141 --> XC_GGA_X_OPTPBE_VDW PBE reparametrization for vdW [[cite:Klimes2011]] + * 142 --> XC_GGA_X_RGE2 Regularized PBE [[cite:Ruzsinszky2009]] + * 143 --> XC_GGA_C_RGE2 Regularized PBE [[cite:Ruzsinszky2009]] + * 144 --> XC_GGA_X_RPW86 refitted Perdew & Wang 86 [[cite:Murray2009]] + * 145 --> XC_GGA_X_KT1 Keal and Tozer version 1 [[cite:Keal2003]] + * 146 --> XC_GGA_XC_KT2 Keal and Tozer version 2 [[cite:Keal2003]] + +!!! warning + This functional gives NaN on IBM (XG20130608). + + * 147 --> XC_GGA_C_WL Wilson & Levy [[cite:Wilson1990]] + * 148 --> XC_GGA_C_WI Wilson & Ivanov [[cite:Wilson1998]] + * 149 --> XC_GGA_X_MB88 Modified Becke 88 for proton transfer [[cite:Tognetti2009]] + * 150 --> XC_GGA_X_SOGGA Second-order generalized gradient approximation [[cite:Zhao2008]] + * 151 --> XC_GGA_X_SOGGA11 Second-order generalized gradient approximation 2011 [[cite:Peverati2011]] + * 152 --> XC_GGA_C_SOGGA11 Second-order generalized gradient approximation 2011 [[cite:Peverati2011]] + * 153 --> XC_GGA_C_WI0 Wilson & Ivanov initial version [[cite:Wilson1998]] + * 154 --> XC_GGA_XC_TH1 Tozer and Handy v. 1 [[cite:Tozer1998]] + +!!! warning + This functional is not tested. Use at your own risks. + + * 155 --> XC_GGA_XC_TH2 Tozer and Handy v. 2 [[cite:Tozer1998a]] + * 156 --> XC_GGA_XC_TH3 Tozer and Handy v. 3 [[cite:Handy1998]] + * 157 --> XC_GGA_XC_TH4 Tozer and Handy v. 4 [[cite:Handy1998]] + * 158 --> XC_GGA_X_C09X C09x to be used with the VdW of Rutgers-Chalmers [[cite:Cooper2010]] + * 159 --> XC_GGA_C_SOGGA11_X To be used with hyb_gga_x_SOGGA11-X [[cite:Peverati2011a]] + * 161 --> XC_GGA_XC_HCTH_93 HCTH functional fitted to 93 molecules [[cite:Hamprecht1998]] + * 162 --> XC_GGA_XC_HCTH_120 HCTH functional fitted to 120 molecules [[cite:Boese2000]] + * 163 --> XC_GGA_XC_HCTH_147 HCTH functional fitted to 147 molecules [[cite:Boese2000]] + * 164 --> XC_GGA_XC_HCTH_407 HCTH functional fitted to 407 molecules [[cite:Boese2001]] + * 165 --> XC_GGA_XC_EDF1 Empirical functionals from Adamson, Gill, and Pople [[cite:Adamson1998]] + * 166 --> XC_GGA_XC_XLYP XLYP functional [[cite:Xu2004a]] + * 167 --> XC_GGA_XC_B97 Becke 97 [[cite:Becke1997]] + * 168 --> XC_GGA_XC_B97_1 Becke 97-1 [[cite:Hamprecht1998]] [[cite:Becke1997]] + * 169 --> XC_GGA_XC_B97_2 Becke 97-2 [[cite:Becke1997]] + * 170 --> XC_GGA_XC_B97_D Grimme functional to be used with C6 vdW term [[cite:Grimme2006]] + * 171 --> XC_GGA_XC_B97_K Boese-Martin for Kinetics [[cite:Boese2004]] + * 172 --> XC_GGA_XC_B97_3 Becke 97-3 [[cite:Keal2005]] + * 173 --> XC_GGA_XC_PBE1W Functionals fitted for water [[cite:Dahlke2005]] + * 174 --> XC_GGA_XC_MPWLYP1W Functionals fitted for water [[cite:Dahlke2005]] + * 175 --> XC_GGA_XC_PBELYP1W Functionals fitted for water [[cite:Dahlke2005]] + * 176 --> XC_GGA_XC_SB98_1a Schmider-Becke 98 parameterization 1a [[cite:Schmider1998]] + * 177 --> XC_GGA_XC_SB98_1b Schmider-Becke 98 parameterization 1b [[cite:Schmider1998]] + * 178 --> XC_GGA_XC_SB98_1c Schmider-Becke 98 parameterization 1c [[cite:Schmider1998]] + * 179 --> XC_GGA_XC_SB98_2a Schmider-Becke 98 parameterization 2a [[cite:Schmider1998]] + * 180 --> XC_GGA_XC_SB98_2b Schmider-Becke 98 parameterization 2b [[cite:Schmider1998]] + * 181 --> XC_GGA_XC_SB98_2c Schmider-Becke 98 parameterization 2c [[cite:Schmider1998]] + * 183 --> XC_GGA_X_OL2 Exchange form based on Ou-Yang and Levy v.2 [[cite:Fuentealba1995]] [[cite:OuYang1991]] + * 184 --> XC_GGA_X_APBE mu fixed from the semiclassical neutral atom [[cite:Constantin2011]] + * 186 --> XC_GGA_C_APBE mu fixed from the semiclassical neutral atom [[cite:Constantin2011]] + * 191 --> XC_GGA_X_HTBS Haas, Tran, Blaha, and Schwarz [[cite:Haas2011]] + * 192 --> XC_GGA_X_AIRY Constantin et al based on the Airy gas [[cite:Constantin2009]] + * 193 --> XC_GGA_X_LAG Local Airy Gas [[cite:Vitos2000]] + * 194 --> XC_GGA_XC_MOHLYP Functional for organometallic chemistry [[cite:Schultz2005]] + * 195 --> XC_GGA_XC_MOHLYP2 Functional for barrier heights [[cite:Zheng2009]] + * 196 --> XC_GGA_XC_TH_FL Tozer and Handy v. FL [[cite:Tozer1997]] + * 197 --> XC_GGA_XC_TH_FC Tozer and Handy v. FC [[cite:Tozer1997]] + * 198 --> XC_GGA_XC_TH_FCFO Tozer and Handy v. FCFO [[cite:Tozer1997]] + * 199 --> XC_GGA_XC_TH_FCO Tozer and Handy v. FCO [[cite:Tozer1997]] + * 200 --> XC_GGA_C_OPTC Optimized correlation functional of Cohen and Handy [[cite:Cohen2001]] + * (for MetaGGA and Hybrid functionals, with indices in the 200-499 range, see the later sections) + * 524 --> XC_GGA_X_WPBEH short-range version of the PBE [[cite:Heyd2003]] + * 525 --> XC_GGA_X_HJS_PBE HJS screened exchange PBE version [[cite:Henderson2008]] + * 526 --> XC_GGA_X_HJS_PBE_SOL HJS screened exchange PBE_SOL version [[cite:Henderson2008]] + * 527 --> XC_GGA_X_HJS_B88 HJS screened exchange B88 version [[cite:Henderson2008]] + +!!! warning + This functional is not tested. Use at your own risks. + + * 528 --> XC_GGA_X_HJS_B97X HJS screened exchange B97x version [[cite:Henderson2008]] + * 529 --> XC_GGA_X_ITYH short-range recipe for exchange GGA functionals [[cite:Iikura2001]] + +!!! warning + This functional is not tested. Use at your own risks. + + +==MetaGGA functionals== (do not forget to add a minus sign, as discussed above). +See [[cite:Sun2011]] for the formulas. + + * 202 --> XC_MGGA_X_TPSS Tao, Perdew, Staroverov & Scuseria [[cite:Tao2003]] [[cite:Perdew2004]] + * 203 --> XC_MGGA_X_M06L Zhao, Truhlar exchange [[cite:Zhao2006]] [[cite:Zhao2007]] + * 204 --> XC_MGGA_X_GVT4 GVT4 (X part of VSXC) from van Voorhis and Scuseria [[cite:Voorhis1998]] + * 205 --> XC_MGGA_X_TAU_HCTH tau-HCTH from Boese and Handy [[cite:Boese2002]] + * 207 --> XC_MGGA_X_BJ06 Becke & Johnson correction to Becke-Roussel 89 [[cite:Becke2006]] + +!!! warning + This Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92 [[cite:Perdew1992a]]. + + * 208 --> XC_MGGA_X_TB09 Tran-blaha - correction to Becke & Johnson correction to Becke-Roussel 89 [[cite:Tran2009]] + +!!! warning + This Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92 [[cite:Perdew1992a]]. + + * 209 --> XC_MGGA_X_RPP09 Rasanen, Pittalis, and Proetto correction to Becke & Johnson [[cite:Rasanen2010]] + +!!! warning + This Vxc-only mGGA can only be used with a LDA correlation, typically Perdew-Wang 92 [[cite:Perdew1992a]]. + + * 232 --> XC_MGGA_C_VSXC VSxc from Van Voorhis and Scuseria (correlation part) [[cite:Voorhis1998]] + +==Hybrid functionals== (do not forget to add a minus sign, as discussed above). + + * 402 --> XC_HYB_GGA_XC_B3LYP The (in)famous B3LYP [[cite:Stephens1994]] + * 406 --> XC_HYB_GGA_XC_PBEH PBEH (PBE0) [[cite:Adamo1999]] [[cite:Ernzerhof1999]] + * 427 --> XC_HYB_GGA_XC_HSE03 The 2003 version of the screened hybrid HSE + (this case corresponds to [[hyb_range_fock]]=$\omega^{HF} = 0.15/\sqrt{2}$ + and [[hyb_range_dft]]=$\omega^{PBE} = 0.15*(2.0)^{1/3}$ ) + * 428 --> XC_HYB_GGA_XC_HSE06 The 2006 version of the screened hybrid HSE + (this case corresponds to [[hyb_range_fock]]=[[hyb_range_dft]]=$\omega^{HF} = \omega^{PBE} = 0.11$) + [[cite:Heyd2003]] [[cite:Heyd2006]] [[cite:Krukau2006]] + +!!! warning + (The following section is taken from the LibXC sources. In ABINIT, we stick to the LibXC choice.) + + Note that there is an enormous mess in the literature + concerning the values of omega in HSE. This is due to an error in the original + paper that stated that they had used $\omega=0.15$. This was in fact not true, + and the real value used was $\omega^{HF} = 0.15 / \sqrt{2} \sim 0.1061$ + and $\omega^{PBE} = 0.15 * (2.0)^{1/3} \sim 0.1890$. + + In 2006 Krukau et al [[cite:Krukau2006]] tried + to clarify the situation, called HSE03 the above choice of parameters, + and called HSE06 to the functional where $\omega^{HF}=\omega^{PBE}$. By testing + several properties for atoms they reached the conclusion that the best value + for $\omega=0.11$. Of course, codes are just as messy as the papers. In Quantum Espresso + HSE06 has the value $\omega=0.106.$ VASP, on the other hand, uses for HSE03 the + same value $\omega^{HF} = \omega^{PBE} = 0.3 (A^{-1}) \sim 0.1587$, + and for HSE06 $\omega^{HF} = \omega^{PBE} = 0.2 (A^{-1}) \sim 0.1058$. + + * 456 --> XC_HYB_GGA_XC_PBE0_13 PBE0-1/3 [[cite:Cortona2012]] """, ), @@ -7559,8 +8023,8 @@ mnemonics="Index of eXchange-Correlation functional used for self-energy calculations (SIGMA)", commentdefault="Default corresponds to Teter parametrization.", requires="mod([[gwcalctyp]],10)==5", - text=""" -When [[gwcalctyp]]==5, 15 or 25, [[ixc_sigma]] gives the identifier of the + text=r""" +When [[gwcalctyp]] == 5, 15 or 25, [[ixc_sigma]] gives the identifier of the advanced functional (usually a hybrid) that is used perturbatively or self- consistently to obtain the improved electronic structure. @@ -7568,12 +8032,12 @@ so we refer to the latter for the list of possible values. This input variable is introduced because in such calculation with -[[gwcalctyp]]==5, 15 or 25, there is an underlying primary exchange- +[[gwcalctyp]] == 5, 15 or 25, there is an underlying primary exchange- correlation functional, that was used to obtain the starting wavefunctions and eigenenergies, whose identified is [[ixc]]. The definition of both [[ixc]] and [[ixc_sigma]] allows one to bypass possible sources of confusion. -Note however that in the case where [[gwcalctyp]]==5, 15 or 25, the values of +Note however that in the case where [[gwcalctyp]] == 5, 15 or 25, the values of the input variables [[auxc_ixc]], [[hyb_mixing]], [[hyb_mixing_sr]], [[hyb_range_fock]] and [[hyb_range_dft]] refers to the advanced functional, and not the primary one. Also, [[icutcoul]] and [[rcut]] have precedence over @@ -7591,41 +8055,34 @@ defaultval=1, mnemonics="Integer for the eXchange-Correlation applied to the electron-POSITRON interaction", commentdefault="(Teter parameterization). However, if all the pseudopotentials have the same value of pspxc, the initial value of ixc will be that common value", - text=""" + requires="[[positron]]/=0", + text=r""" Relevant only when [[positron]]/=0. Define the type of electron-positron correlation that is used in case of a electron-positron two-component DFT calculation. Define also the analytical formula of the enhancement factor used to compute -the electron-positron annhilation rate: +the electron-positron annihilation rate: Electron-positron correlation functional: -**ixcpositron=1**: LDA zero positron density limit parametrized by Arponen & -Pajanne and provided by Boronski & Nieminen [1,2] -**ixcpositron=11**: LDA zero positron density limit parametrized by Arponen -& Pajanne and fitted by Sterne & Kaiser [1,3] -**ixcpositron=2**: LDA electron-positron correlation provided by Puska, -Seitsonen, and Nieminen [1,4] -**ixcpositron=3**: GGA zero positron density limit parametrized by Arponen & -Pajanne and provided by Boronski & Nieminen [1,2,5] -**ixcpositron=31**: GGA zero positron density limit parametrized by Arponen -& Pajanne and fitted by Sterne & Kaiser [1,3,5] + * ixcpositron=1: LDA zero positron density limit parametrized by +Arponen & Pajanne and provided by Boronski & Nieminen [[cite:Arponen1979a]],[[cite:Boronski1986]] + * ixcpositron=11: LDA zero positron density limit parametrized by +Arponen & Pajanne and fitted by Sterne & Kaiser [[cite:Arponen1979a]],[[cite:Sterne1991]] + * ixcpositron=2: LDA electron-positron correlation provided by +Puska, Seitsonen, and Nieminen [[cite:Arponen1979a]],[[cite:Puska1995]] + * ixcpositron=3: GGA zero positron density limit parametrized by +Arponen & Pajanne and provided by Boronski & Nieminen [[cite:Arponen1979a]],[[cite:Boronski1986]],[[cite:Barbiellini1995]] + * ixcpositron=31: GGA zero positron density limit parametrized +by Arponen & Pajanne and fitted by Sterne & Kaiser [[cite:Arponen1979a]],[[cite:Sterne1991]],[[cite:Barbiellini1995]] Annihilation rate enhancement factor: -**ixcpositron=1**: Boronski and Nieminen full modelisation and RPA limit [1] -**ixcpositron=11**: Sterne and Kaiser [2] -**ixcpositron=2**: Puska, Seitsonen and Nieminen [3] -**ixcpositron=3**: Boronski and Nieminen full modelisation and RPA limit [1], -with GGA corrections -**ixcpositron=31**: Sterne and Kaiser [2], with GGA corrections - -References: -**[1]** J. Arponen and E. Pajanne, Ann. Phys. (N.Y.) 121, 343 (1979). -**[2]** Boronski and R.M. Nieminen, Phys. Rev. B 34, 3820 (1986). -**[3]** P.A. Sterne and J.H. Kaiser, Phys. Rev. B 43, 13892 (1991). -**[4]** M.J. Puska, A.P. Seitsonen and R.M. Nieminen, Phys. Rev. B 52, 10947 (1994). -**[5]** B. Barbiellini, M.J. Puska, T. Torsti and R.M.Nieminen, Phys. Rev. B 51, 7341 (1994) + * ixcpositron=1: Boronski and Nieminen full modelisation and RPA limit [[cite:Arponen1979a]] + * ixcpositron=11: Sterne and Kaiser [[cite:Boronski1986]] + * ixcpositron=2: Puska, Seitsonen and Nieminen [[cite:Sterne1991]] + * ixcpositron=3: Boronski and Nieminen full modelisation and RPA limit [[cite:Arponen1979a]], with GGA corrections + * ixcpositron=31: Sterne and Kaiser [[cite:Boronski1986]], with GGA corrections """, ), @@ -7637,21 +8094,22 @@ dimensions="scalar", defaultval=3, mnemonics="Index of the XC ROTation method used to calculate first-order exchange-correlation potential in non-collinear DFPT calculations", - characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Method of calculation of the 1st order XC potential in non-collinear DFPT -calculations. The possible values are 1,2 and 3 correspond to the following +calculations. The possible values 1,2 and 3 correspond to the following methods - * If ixcrot=1, the spinor rotation matrix U at each fft point is not calculated explicitly. Instead the needed expressions involving U are derived based on the general properties of the U matrix. + * If ixcrot=1, the spinor rotation matrix U at each FFT point is not calculated explicitly. Instead the needed expressions involving U are derived based on the general properties of the U matrix. * If ixcrot=2, U is computed explicitly * If ixcrot=3, the brute force evaluation of the 1st order XC potential as a functional derivative is used. Rotation matrices are not computed. In theory, all methods give identical results. However, due to different implementation approaches, the round-off errors can lead to slight differences intermediate and final results obtained using methods 1,2 and 3. The choice of -the method can also affect the convergence. Note that for non-zero -perturbation wavector, only ixcrot=3 implementation is currently available. +the method can also affect the convergence. For more details, see [[cite:Ricci2019]]. + +!!! note + For non-zero perturbation wavevector, only ixcrot=3 implementation is currently available. """, ), @@ -7664,7 +8122,7 @@ defaultval=Range({'start': 1, 'stop': '[[ndtset]]'}), mnemonics="index -J- for DaTaSETs", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Gives the dataset index of each of the datasets. This index will be used: * to determine which input variables are specific to each dataset, since the variable names for this dataset will be made from the bare variable name concatenated with this index, and only if such a composite variable name does not exist, the code will consider the bare variable name, or even, the Default; @@ -7673,7 +8131,7 @@ The allowed index values are between 1 and 9999. An input variable name appended with 0 is not allowed. -When [[ndtset]]==0, this array is not used, and moreover, no input variable +When [[ndtset]] == 0, this array is not used, and moreover, no input variable name appended with a digit is allowed. This array might be initialized thanks to the use of the input variable [[udtset]]. In this case, [[jdtset]] cannot be used. """, @@ -7687,11 +8145,11 @@ dimensions="scalar", defaultval=0, mnemonics="include a JELLium SLAB in the cell", - text=""" + text=r""" If set to 1, a slab of uniform positive background charge density, that is, a jellium slab, is included in the calculation cell. A portion of the unit cell is filled with such positive charge density distribution which is equal to a -bulk-mean value n bulk between two edges and zero in the vacuum region if present. +bulk-mean value $n_{bulk}$ between two edges and zero in the vacuum region if present. For the sake of convenience the unit cell is supposed to have the third crystal primitive lattice vector orthogonal to the other ones so that the portion of the cell filled by the jellium slab can be defined through its edges along z. @@ -7710,24 +8168,24 @@ defaultval=MultipleValue(number=3, value=0), mnemonics="electric/displacement FIELD DIRection", requires="[[berryopt]] = 17", - text=""" -When specifying mixed electric field boundary conditions ( [[berryopt]]=17), -jfielddir controls whether reduced electric field ([[jfielddir]]=1) or reduced -electric displacement field ([[jfielddir]]=2) is chosen to be fixed, in each + text=r""" +When specifying mixed electric field boundary conditions ( [[berryopt]] = 17), +[[jfielddir]] controls whether reduced electric field ([[jfielddir]] = 1) or reduced +electric displacement field ([[jfielddir]] = 2) is chosen to be fixed, in each of the three lattice directions (i.e., in the reduced, not the Cartesian, -frame). For example, [[jfielddir]]=(1 1 2) tells the code to use fixed ebar_1 -and ebar_2 along the first two lattice directions and fixed d_3 along the third. +frame). For example, [[jfielddir]] = (1 1 2) tells the code to use fixed $\\bar{e}_1$ +and $\\bar{e}_2$ along the first two lattice directions and fixed $d_3$ along the third. For the case of mixed electric field boundary conditions, [[red_efieldbar]] -and [[red_dfield]] are used to control ebar and d, respectively. For example, +and [[red_dfield]] are used to control $\\bar{e}$ and $d$, respectively. For example, for electric boundary conditions corresponding to a material in a parallel- -plate capacitor, if you want to control d_3=d0, while fixing ebar_1=ebar_2=0, -then the input files should have [[berryopt]]=17, [[jfielddir]]=(1 1 2), -[[red_efieldbar]]=(0.0 0.0 a), and [[red_dfield]]=(b c d0). Here a, b, and c +plate capacitor, if you want to control $d_3=d_0$, while fixing $\\bar{e}_1=\\bar{e}_1=0$, +then the input files should have [[berryopt]] = 17, [[jfielddir]] = (1 1 2), +[[red_efieldbar]] = (0.0 0.0 a), and [[red_dfield]] = ($b\ c\ d_0$). Here a, b, and c are the starting values. They can be chosen in this way: do a single run for -fixed d calculation ([[red_dfield]]=0,0,d0), from the final results you will -have ebar_3, which is a good guess for a. Then do another single run for fixed -ebar calculation ([[red_efieldbar]]=(0 0 0)), from the final results you will -have d_1,d_2, these are good guesses for b, c. +fixed d calculation ([[red_dfield]] = 0,0,$d_0$), from the final results you will +have $\\bar{e}_3$, which is a good guess for a. Then do another single run for fixed +ebar calculation ([[red_efieldbar]] = (0 0 0)), from the final results you will +have $d_1$,$d_2$, these are good guesses for b, c. """, ), @@ -7740,8 +8198,8 @@ defaultval=MultipleValue(number=None, value=0), mnemonics="value of J for PAW+U", characteristics=['[[ENERGY]]'], - requires="[[usepaw]]==1 and [[usepawu]]==1", - text=""" + requires="[[usepaw]] == 1 and [[usepawu]] == 1", + text=r""" Gives the value of the screened exchange interaction between correlated electrons corresponding to [[lpawu]] for each species. In the case where [[lpawu]] =-1, the value is not used. @@ -7757,7 +8215,7 @@ defaultval=MultipleValue(number=None, value=0), mnemonics="K wavevectors for BERRY phase computation", requires="[[berryopt]] = 1, 2, or 3", - text=""" + text=r""" Used for values of [[berryopt]] = 1, 2, or 3. This array defines, for each Berry phase calculation (the number of such @@ -7765,7 +8223,7 @@ points for which the overlap matrix must be computed. The polarisation vector will be projected on the direction of that wavevector, and the result of the computation will be the magnitude of this projection. Doing more than one -wavevector, with different independent direction, allows to find the full +wavevector, with different independent direction, allows one to find the full polarisation vector. However, note that converged results need oriented grids, denser along the difference wavevector than usual Monkhorst-Pack grids. @@ -7777,7 +8235,7 @@ it is suggested to make a preliminary calculation of the wavefunctions on the irreducible part of the grid, with [[kptopt]] equal to 1, and then use these converged wavefunctions in the entire Brillouin zone, by reading them to -initialize the [[kptopt]]=3 computation. +initialize the [[kptopt]] = 3 computation. """, ), @@ -7790,10 +8248,10 @@ defaultval=[0, 0, 0], mnemonics="K - PoinTs", commentdefault="Adequate for one molecule in a supercell", - text=""" + text=r""" Contains the k points in terms of reciprocal space primitive translations (NOT in cartesian coordinates!). -Needed ONLY if [[kptopt]]=0, otherwise deduced from other input variables. +Needed ONLY if [[kptopt]] = 0, otherwise deduced from other input variables. It contains dimensionless numbers in terms of which the cartesian coordinates would be: @@ -7822,7 +8280,7 @@ dimensions=[3, 'abs([[kptopt]])+1)'], mnemonics="K PoinT BOUNDarieS", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" It is used to generate the circuit to be followed by the band structure, when [[kptopt]] is negative (it is not read if [[kptopt]] is zero or positive). @@ -7886,10 +8344,16 @@ The lengths of segments (this information is useful to draw the band structure, with the correct relative scale between special points) can be found using the conventional cartesian coordinates: -l(L-Gamma)=sqrt(3)/4=0.433...; l(Gamma-X)=1/2=0.5; l(X-W)=1/4=0.25; -l(W-K)=sqrt(2)/8=0.177...; l(K-L)=sqrt(6)/8=0.306...; -l(L-W)=sqrt(2)/4=0.354...; l(W-X)=1/4=0.25; l(X-K)=sqrt(2)/8=0.177...; -l(K-Gamma)=sqrt(2).3/8=0.530... + +$l$(L-Gamma)=$\sqrt{3}/4=$0.433... \n +$l$(Gamma-X)=$1/2$=0.5 \n +$l$(X-W)=$1/4$=0.25 \n +$l$(W-K)=$\sqrt{2}/8$=0.177... \n +$l$(K-L)=$\sqrt{6}/8$=0.306... \n +$l$(L-W)=$\sqrt{2}/4$=0.354... \n +$l$(W-X)=$1/4$=0.25 \n +$l$(X-K)=$\sqrt{2}/8$=0.177... \n +$l$(K-Gamma)=$3\sqrt{2}/8$=0.530... \n B. **BCC lattice** @@ -7912,10 +8376,15 @@ The lengths of segments (this information is useful to draw the band structure, with the correct relative scale between special points) can be -found using the conventional cartesian coordinates: l(Gamma-H)=1/2=0.5; -l(H-N)=sqrt(2)/4=0.354...; l(N-Gamma)=sqrt(2)/4=0.354...; -l(Gamma-P)=sqrt(3)/4=0.433...; l(P-N)=1/4=0.25; l(N-P)=1/4=0.25; -l(P-H)=sqrt(3)/4=0.433... +found using the conventional cartesian coordinates: + +$l$(Gamma-H)=$1/2$=0.5 \n +$l$(H-N)=$\sqrt{2}/4$=0.354... \n +$l$(N-Gamma)=$\sqrt{2}/4$=0.354... \n +$l$(Gamma-P)=$\sqrt{3}/4$=0.433... \n +$l$(P-N)=$1/4$=0.25 \n +$l$(N-P)=$1/4$=0.25 \n +$l$(P-H)=$\sqrt{3}/4$=0.433... \n C. **Hexagonal lattices** @@ -7940,41 +8409,54 @@ In order to find the lengths of segments (this information is useful to draw the band structure, with the correct relative scale between special points) one needs to know the a and c lattice parameters. Also, in what follows, we -omit the 2*pi factor sometimes present in the definition of the reciprocal -space vectors. The reciprocal vectors are (1/a 1/(sqrt(3)*a) 0), (0 -2/(sqrt(3)*a) 0), (0 0 1/c). The lengths of the above-mentioned segments can -be computed as: l(K-Gamma)=2/(3*a)=0.666.../a; -l(Gamma-M)=1/(sqrt(3)*a)=0.577.../a; l(M-K)=1/(3*a)=0.333.../a; -l(K-H)=1/(2*c)=0.5.../c; l(H-A)=2/(3*a)=0.666.../a; -l(A-L)=1/(sqrt(3)*a)=0.577.../a; l(L-H)=1/(3*a)=0.333.../a; -l(H-L)=1/(3*a)=0.333.../a; l(L-M)=1/(2*c)=0.5.../c; -l(M-Gamma)=-1/(sqrt(3)*a)=0.577.../a; l(Gamma-A)=1/(2*c)=0.5.../c +omit the 2$\pi$ factor sometimes present in the definition of the reciprocal +space vectors. The reciprocal vectors are $(1/a\: 1/(\sqrt{3}a)\: 0)$, $(0\: 2/(\sqrt{3}a)\: 0)$, + $(0\: 0\: 1/c)$. The lengths of the above-mentioned segments can +be computed as: + +$l$(K-Gamma)=$2/(3a)$=0.666.../a \n +$l$(Gamma-M)=$1/(\sqrt{3}a)$=0.577.../a \n +$l$(M-K)=$1/(3a)$=0.333.../a \n +$l$(K-H)=$1/(2c)$=0.5.../c \n +$l$(H-A)=$2/(3a)$=0.666.../a \n +$l$(A-L)=$1/(\sqrt{3}a)$=0.577.../a \n +$l$(L-H)=$1/(3a)$=0.333.../a \n +$l$(H-L)=$1/(3a)$=0.333.../a \n +$l$(L-M)=$1/(2c)$=0.5.../c \n +$l$(M-Gamma)=$1/(\sqrt{3}a)$=0.577.../a \n +$l$(Gamma-A)=$1/(2c)$=0.5.../c \n D. **Rhombohedral lattices** Rhombohedral lattices are characterised by two parameters, the length of the -primitive vectors, that we will denote a0, and the angle they form, alpha. +primitive vectors, that we will denote a0, and the angle they form, $\gamma$. These can be directly input of ABINIT, as [[acell]] and [[angdeg]] This will generate the primitive vectors in real space, with - [[acell]] a0 a0 a0 and [[rprim]] a 0 c -a/2 a*sqrt(0.75) c -a/2 -a*sqrt(0.75) c + acell a0 a0 a0 and rprim a 0 c -a/2 a*sqrt(0.75) c -a/2 -a*sqrt(0.75) c -with a^2+c^2=1, a^2=(1-cos(alpha))*2/3, c^2=(1+2*cos(alpha))*1/3, -(a/c)^2=2*(1-cos(alpha))/(1+2*cos(alpha)) and also -cos(alpha)=(1-(a/c)^2/2)/(1+(a/c)^2). Alternatively, these values of rprim +with, + + * $a^2+c^2=1$, + * $a^2=2/3(1-\cos(\gamma))$, + * $c^2=1/3(1+2\cos(\gamma))$, + * $(a/c)^2=2(1-\cos(\gamma))/(1+2\cos(\gamma))$, and also + * $\cos(\gamma)=(1-(a/c)^2/2)/(1+(a/c)^2)$. + +Alternatively, these values of [[rprim]] might directly be the input of ABINIT (then, the balance of the scaling factor might be adjusted between [[acell]] and [[rprim]]). Unlike for the simple cubic, FCC, BCC, hexagonal (and some other) Bravais -lattice, the topology of the Brillouin zone will depend on the alpha (or a/c) -value. We give below information concerning the case when cos(alpha) is -positive, that is, (a/c)^2 lower than 2. +lattice, the topology of the Brillouin zone will depend on the $\gamma$ (or $a/c$) +value. We give below information concerning the case when $\cos(\gamma)$ is +positive, that is, $(a/c)^2$ lower than 2. The coordinates of several special points with respect to primitive vectors in -reciprocal space will not depend on the a/c ratio, but some others will depend +reciprocal space will not depend on the $a/c$ ratio, but some others will depend on it. So, some care has to be exercised. Notations for the Brillouin Zone -special points are the same as in Phys. Rev. B 41, 11827 (1990). +special points are the same as in [[cite:Gonze1990]]. L (1/2 0 0) or (0 1/2 0) or (0 0 1/2) (or with negative signs) T (1/2 1/2 1/2) @@ -7994,14 +8476,18 @@ In order to find the lengths of segments (this information is useful to draw the band structure, with the correct relative scale between special points) one needs to know the a and c lattice parameters. Also, in what follows, we -omit the 2*pi factor sometimes present in the definition of the reciprocal -space vectors. The reciprocal vectors are (2/(3*a) 0 1/(3*c)), -(1/(3*a) -1/(sqrt(3)*a) 1/(3*c), -(1/(3*a) -1/(sqrt(3)*a) 1/(3*c) ). The lengths of the +omit the $2\pi$ factor sometimes present in the definition of the reciprocal +space vectors. The reciprocal vectors are $( 2/(3a)\: 0\: 1/(3c) )$, $( -1/(3a)\: +1/(\sqrt{3}a)\: 1/(3c) )$, $( -1/(3a)\: -1/(\sqrt{3}a)\: 1/(3c) )$. The lengths of the above-mentioned segments can be computed as: -l(X-Gamma)=2/(sqrt(3)*a)=1.155.../a, with -l(K-Gamma)=(1+(a/c)^2/4)*4/(3*sqrt(3)*a); l(Gamma-T)=1/(2*c); -l(T-L)=2/(sqrt(3)*a)=1.155.../a, with l(T-W)=(1-(a/c)^2/2)*4/(3*sqrt(3)*a); -l(L-Gamma)=sqrt(4/(a^2)+1/(c^2))/3 l(Gamma-X)=sqrt(1/(a^2)+1/(c^2))*2/3 + +$l$(X-Gamma)=$2/(\sqrt{3}a)$=1.155.../a \n +$l$(K-Gamma)=$4(1+(a/c)^2/4)/(3\sqrt{3}a)$ \n +$l$(Gamma-T)=$1/(2c)$ \n +$l$(T-L)=$2/(\sqrt{3}a)$=1.155.../a \n +$l$(T-W)=$4(1-(a/c)^2/2)/(3\sqrt{3}a)$ \n +$l$(L-Gamma)=$\sqrt{4/(a^2)+1/(c^2)}/3$ \n +$l$(Gamma-X)=$2\sqrt{1/(a^2)+1/(c^2)}/3$ \n """, ), @@ -8014,7 +8500,7 @@ defaultval=MultipleValue(number=None, value=0.0), mnemonics="K-PoinTs for GW calculations", requires="[[optdriver]] in [4, 7]", - text=""" + text=r""" For each k-point with number igwpt in the range (1:[[nkptgw]]), [[kptgw]](1,igwpt) is the reduced coordinate of the k-point where the self-energy corrections are required while [[bdgw]] (1:2,igwpt) specifies the range of @@ -8022,7 +8508,7 @@ At present, not all k-points are possible. Only those corresponding to the k-point grid defined with the same repetition parameters ( [[kptrlatt]], or -[[ngkpt]] ) than the GS one, but WITHOUT any shift, are allowed. +[[ngkpt]] ) than the GS one, but **without** any shift, are allowed. """, ), @@ -8034,7 +8520,7 @@ dimensions="scalar", defaultval=1, mnemonics="K - PoinTs NoRMalization", - text=""" + text=r""" Establishes a normalizing denominator for each k point. Needed only if [[kptopt]]<=0, otherwise deduced from other input variables. The k point coordinates as fractions of reciprocal lattice translations are @@ -8052,12 +8538,13 @@ dimensions=[3, '[[nkpt]]'], mnemonics="K-PoinTs re-Normalized and Shifted", characteristics=['[[INTERNAL_ONLY]]'], - text=""" -If [[nqpt]]=0, or if one is doing a reponse calculation, this internal + text=r""" +If [[nqpt]] = 0, or if one is doing a reponse calculation, this internal variable is derived from [[kpt]] and [[kptnrm]]: [[kptns]](1:3,:)= [[kpt]](1:3,:)/ [[kptnrm]], so that it is [[kpt]] renormalized by [[kptnrm]]. -If [[nqpt]]=1 and one is not doing a ground-state calculation, this internal -variable is derived from [[kpt]],[[kptnrm]] and [[qptn]] [[kptns]](1:3,:)= + +If [[nqpt]] = 1 and one is not doing a ground-state calculation, this internal +variable is derived from [[kpt]], [[kptnrm]] and [[qptn]]: [[kptns]](1:3,:)= [[kpt]](1:3,:)/ [[kptnrm]]+ [[qptn]](1:3), so that it is [[kpt]] renormalized by [[kptnrm]], then shifted by [[qptn]](1:3). """, @@ -8071,7 +8558,7 @@ dimensions=[3, '[[nkpthf]]'], mnemonics="K-PoinTs re-Normalized and Shifted, for the Hartree-Fock operator", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" [[kptns_hf]] is the subset of the full Brillouin Zone k point grid for wavefunctions, used to build the Fock operator, see [[fockdownsampling]]. """, @@ -8083,9 +8570,9 @@ vartype="integer", topics=['k-points_basic', 'ElecBandStructure_basic'], dimensions="scalar", - defaultval=ValueWithConditions({'[[nspden]]==4': 4, 'defaultval': 1}), + defaultval=ValueWithConditions({'[[nspden]] == 4': 4, 'defaultval': 1}), mnemonics="KPoinTs OPTion", - text=""" + text=r""" Controls the set up of the k-points list. The aim will be to initialize, by straight reading or by a preprocessing approach based on other input variables, the following input variables, giving the k points, their number, @@ -8115,10 +8602,10 @@ * 4 --> rely on [[ngkpt]] or [[kptrlatt]], as well as on [[nshiftk]] and [[shiftk]] to set up the k points. Take into account all the symmetries EXCEPT the time-reversal symmetry to generate the k points in the Irreducible Brillouin Zone, with the appropriate weights. - This has to be used when performing calculations with non-collinear magnetism allowed ([[nspden]]=4) + This has to be used when performing calculations with non-collinear magnetism allowed ([[nspden]] = 4) - * A negative value --> rely on [[kptbounds]], and [[ndivk]] to set up a band structure calculation - along different lines (allowed only for [[iscf]]==-2). The absolute value of [[kptopt]] gives + * A negative value --> rely on [[kptbounds]], and [[ndivk]] ([[ndivsm]]) to set up a band structure calculation + along different lines (allowed only for [[iscf]] == -2). The absolute value of [[kptopt]] gives the number of segments of the band structure. Weights are usually irrelevant with this option, and will be left to their default value. @@ -8135,20 +8622,20 @@ dimensions=[3, 3], defaultval=MultipleValue(number=None, value=0), mnemonics="K - PoinTs grid: Real space LATTice", - excludes="specified([[ngkpt]])", - text=""" + excludes="[[ngkpt]]", + text=r""" This input variable is used only when [[kptopt]] is positive. It partially defines the k point grid. The other piece of information is contained in [[shiftk]]. [[kptrlatt]] cannot be used together with [[ngkpt]]. -The values kptrlatt(1:3,1), kptrlatt(1:3,2), kptrlatt(1:3,3) are the +The values [[kptrlatt]](1:3,1), [[kptrlatt]](1:3,2), [[kptrlatt]](1:3,3) are the coordinates of three vectors in real space, expressed in the [[rprimd]] coordinate system (reduced coordinates). They defines a super-lattice in real space. The k point lattice is the reciprocal of this super-lattice, possibly shifted (see [[shiftk]]). If neither [[ngkpt]] nor [[kptrlatt]] are defined, ABINIT will automatically generate a set of k point grids, and select the best combination of -[[kptrlatt]] and [[shiftk]] that allows to reach a sufficient value of +[[kptrlatt]] and [[shiftk]] that allows one to reach a sufficient value of [[kptrlen]]. See this latter variable for a complete description of this procedure. """, ), @@ -8161,7 +8648,7 @@ dimensions="scalar", defaultval=30.0, mnemonics="K - PoinTs grid: Real space LENgth", - text=""" + text=r""" This input variable is used only when [[kptopt]] is positive and non-zero. Preliminary explanation: @@ -8182,11 +8669,11 @@ On the other hand, when neither [[ngkpt]] nor [[kptrlatt]] are defined, ABINIT will automatically generate a large set of possible k point grids, and select among this set, the grids that give a length of smallest vector LARGER than -[[kptrlen]], and among these grids, the one that, when used with [[kptopt]]=1, +[[kptrlen]], and among these grids, the one that, when used with [[kptopt]] = 1, reduces to the smallest number of k points. Note that this procedure can be time-consuming. It is worth doing it once for a given unit cell and set of symmetries, but not use this procedure by default. The best is then to set -[[prtkpt]]=1, in order to get a detailed analysis of the set of grids. +[[prtkpt]] = 1, in order to get a detailed analysis of the set of grids. If some layer of vacuum is detected in the unit cell (see the input variable [[vacuum]]), the computation of [[kptrlen]] will ignore the dimension related @@ -8205,13 +8692,13 @@ dimensions="scalar", defaultval=1, mnemonics="Kohn Sham Structure file FORMat", - text=""" + text=r""" Governs the choice of the format for the file that contains the Kohn-Sham electronic structure information, for use in GW calculations, see the input variables [[optdriver]] and [[nbandkss]]. - * [[kssform]]=1, a single file.kss (double precision) containing complete information on the Kohn Sham Structure (eigenstates and the pseudopotentials used) will be generated through full diagonalization of the complete Hamiltonian matrix. The file has at the beginning the standard abinit header. - * [[kssform]]=3, a single file.kss (double precision) containing complete information on the Kohn Sham Structure (eigenstates and the pseudopotentials used) will be generated through the usual conjugate gradient algorithm (so, a restricted number of states). The file has at the beginning the standard abinit header. + * [[kssform]] = 1, a single file.kss (double precision) containing complete information on the Kohn Sham Structure (eigenstates and the pseudopotentials used) will be generated through full diagonalization of the complete Hamiltonian matrix. The file has at the beginning the standard abinit header. + * [[kssform]] = 3, a single file.kss (double precision) containing complete information on the Kohn Sham Structure (eigenstates and the pseudopotentials used) will be generated through the usual conjugate gradient algorithm (so, a restricted number of states). The file has at the beginning the standard abinit header. !!! warning @@ -8227,10 +8714,10 @@ dimensions=['[[ntypat]]'], defaultval=MultipleValue(number=None, value=0), mnemonics="LDA minus half", - text=""" -For each type of atom, gives whether a LDA-1/2 calculation is to be performed. -[[ldaminushalf]] =0: the LDA-1/2 approach is not used. -[[ldaminushalf]] =1: the LDA-1/2 approach is used. + text=r""" +For each type of atom, gives whether a LDA-${\\frac{1}{2}}$ calculation is to be performed. +[[ldaminushalf]] =0: the LDA-$\\frac{1}{2}$ approach is not used. +[[ldaminushalf]] =1: the LDA-$\\frac{1}{2}$ approach is used. """, ), @@ -8242,8 +8729,8 @@ dimensions=['[[ntypat]]'], defaultval=-1, mnemonics="value of angular momentum L for EXact EXCHange", - requires="[[useexexch]]==1", - text=""" + requires="[[useexexch]] == 1", + text=r""" Give for each species the value of the angular momentum (only values 2 or 3 are allowed) on which to apply the exact exchange correction. """, @@ -8258,24 +8745,23 @@ defaultval=1, mnemonics="LOCAL ReaD WaveFunctions", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" This input variable is used only when running abinit in parallel. If -[[localrdwf]]=1, the input wavefunction disk file or the KSS/SCR file in case +[[localrdwf]] = 1, the input wavefunction disk file or the KSS/SCR file in case of GW calculations, is read locally by each processor, while if -[[localrdwf]]=0, only one processor reads it, and broadcast the data to the -other processors. +[[localrdwf]] = 0, only one processor reads it, and broadcast the data to the other processors. -The option [[localrdwf]]=0 is NOT allowed when parallel I/O are activated -(MPI-IO access), i.e. when [[iomode]]==1. +The option [[localrdwf]] = 0 is NOT allowed when parallel I/O are activated +(MPI-IO access), i.e. when [[iomode]] == 1. In the case of a parallel computer with a unique file system, both options are as convenient for the user. However, if the I/O are slow compared to -communications between processors,, [[localrdwf]]=0 should be much more -efficient; if you really need temporary disk storage, switch to localrdwf=1 ). +communications between processors,, [[localrdwf]] = 0 should be much more +efficient; if you really need temporary disk storage, switch to localrdwf=1). In the case of a cluster of nodes, with a different file system for each machine, the input wavefunction file must be available on all nodes if -[[localrdwf]]=1, while it is needed only for the master node if [[localrdwf]]=0. +[[localrdwf]] = 1, while it is needed only for the master node if [[localrdwf]] = 0. """, ), @@ -8288,7 +8774,7 @@ defaultval=5, mnemonics="LOTF CLASSIC model for glue model", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Glue model used in LOTF. For the moment it is imposed to be 5. """, ), @@ -8302,7 +8788,7 @@ defaultval=10, mnemonics="LOTF Number of ITerations", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Set the number of Molecular Dynamics iterations which are computed by LOTF. """, ), @@ -8316,7 +8802,7 @@ defaultval=5, mnemonics="LOTF max Number of NEIGhbours", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Set the max number of Neighbours used in the LOTF method. For the moment it is imposed to be 40. """, @@ -8331,7 +8817,7 @@ defaultval=2, mnemonics="LOTF VERSION of MD algorithm", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Set the MD algorithm in the LOTF method. For the moment it is imposed to be 2. """, ), @@ -8344,8 +8830,8 @@ dimensions=['[[ntypat]]'], defaultval=MultipleValue(number=None, value=-1), mnemonics="value of angular momentum L for PAW+U", - requires="[[usepawu]]==1 or [[usepawu]]== 2", - text=""" + requires="[[usepawu]] == 1 or 2", + text=r""" Give for each species the value of the angular momentum (only values 2 or 3 are allowed) on which to apply the LDA+U correction. @@ -8363,16 +8849,16 @@ defaultval=0, mnemonics="MACRO variable that activates the determination of the U and J parameter (for the PAW+U calculations)", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Sets proper input values for the determination of U and J i.e. for [[pawujat]] (first atom treated with PAW+U), [[irdwfk]] (=1), [[tolvrs]] (=10^(-8)), [[nstep]] (=255), [[diemix]] (=0.45), [[atvshift]] ([[pawujat]]) [[pawujv]]). -Do not overwrite these variables manually unless you know what you do. +Do not overwrite these variables manually unless you know what you are doing. - * [[macro_uj]]=1 (and [[nsppol]]=2) Standard procedure to determine U on atom pawujat through a shift of the potential on both spin channels. - * [[macro_uj]]=1 (and [[nsppol]]=1) Non standard procedure to determine U from potential shift on atom pawujat (experimental). - * [[macro_uj]]=2 (and [[nsppol]]=2) Non standard procedure to determine U from potential shift on atom pawujat through a shift on spin channel 1 on this atom and the response on this channel (experimental). - * [[macro_uj]]=3 (and [[nsppol]]=2) Standard procedure to determine J from potential shift on spin channel 1 on atom pawujat and response on spin channel 2 (experimental). + * [[macro_uj]] = 1 (and [[nsppol]] = 2) Standard procedure to determine U on atom pawujat through a shift of the potential on both spin channels. + * [[macro_uj]] = 1 (and [[nsppol]] = 1) Non standard procedure to determine U from potential shift on atom pawujat (experimental). + * [[macro_uj]] = 2 (and [[nsppol]] = 2) Non standard procedure to determine U from potential shift on atom pawujat through a shift on spin channel 1 on this atom and the response on this channel (experimental). + * [[macro_uj]] = 3 (and [[nsppol]] = 2) Standard procedure to determine J from potential shift on spin channel 1 on atom pawujat and response on spin channel 2 (experimental). Determination of U and J can be done only if the symmetry of the atomic arrangement is reduced and the atom pawujat is not connected to any other atom @@ -8390,15 +8876,15 @@ dimensions="scalar", defaultval=0.01, mnemonics="MAGnetization CONstraint LAMBDA parameter", - text=""" -This variable gives the amplitude of the constraint imposed on the + text=r""" +This variable gives the amplitude of the penalty function imposed on the magnetization vectors on each atom (turned on with flag variable -[[magconon]]). Typical values for lambda are 0.001 to 0.1. The SCF convergence -will be difficult if lambda is too large. If lambda is too small, the -constraint will not be very effective and it will give magnetization not close +[[magconon]]=1 to 3). Typical values for [[magcon_lambda]] are 0.001 to 0.1. The SCF convergence +will be difficult if [[magcon_lambda]] is too large. If [[magcon_lambda]] is too small, the +penalty will not be very effective and it will give magnetization not close to the desired [[spinat]] target. In case of convergence problem, it can help -to start with a small value of lambda and to increase it by reading the -wavefunction obtained with a lower lambda value. See variable [[magconon]] for more details. +to start with a small value of [[magcon_lambda]] and to increase it by reading the +wavefunction obtained with a lower [[magcon_lambda]] value. See variable [[magconon]] for more details. """, ), @@ -8410,14 +8896,18 @@ dimensions="scalar", defaultval=0, mnemonics="turn MAGnetization CONstraint ON", - text=""" -Turns on the imposition of a Lagrangian constraint on the magnetization. For + text=r""" +Turns on the imposition of a constraint on the magnetization, using a penalty function. For each atom, the magnetization is calculated in a sphere (radius [[ratsph]]) and -a constraint is applied to bring it closer to the input values of [[spinat]]. -The constraint can be either on the direction only (magconon 1) or on the full -vector (magconon 2). The Lagrangian constraint has an amplitude -[[magcon_lambda]] which should be neither too big (bad or impossible -convergence) nor too small (no effect). +a penalty function is applied to bring it to the input values of [[spinat]]. +The constraint can be either on the direction only ([[magconon]] = 1) or on the full +vector ([[magconon]] = 2). The penalty function has an amplitude +[[magcon_lambda]] that should be neither too big (bad or impossible convergence) nor too small (no effect). +The penalty function is documented in [[cite:Ma2015]] as being a Lagrange +approach, which is a misnomer for the algorithm that they describe. It has the drawback of being unable to deliver +the exact sought value for the magnetization. So, the true Lagrange approach has to be preferred, except for testing purposes. +This is provided by the algorithm governed by the input variable [[constraint_kind]], which is actually also much more flexible +than the implementation corresponding to [[magconon]]. """, ), @@ -8429,7 +8919,7 @@ dimensions="scalar", defaultval=0, mnemonics="MAXimum Number of CPUS", - text=""" + text=r""" If [[autoparal]] > 1 and [[max_ncpus]] is greater than 0, ABINIT analyzes the efficiency of the process distribution for each possible number of processors from 2 to [[max_ncpus]]. After having printed out the efficiency, the code stops. @@ -8445,11 +8935,11 @@ defaultval=0.005, mnemonics="MAXimum Electric field STEP", requires="[[berryopt]] = 6, 16, or 17", - text=""" + text=r""" This variable controls the maximum change of electric field when updating the electric field after each SCF iteration. When the calculation is difficult to converge, try reducing this value or reducing [[ddamp]]. This variable is used -in finite electric displacement field calculations ([[berryopt]]=6,16,17). +in finite electric displacement field calculations ([[berryopt]] = 6,16,17). """, ), @@ -8462,8 +8952,8 @@ defaultval=384, mnemonics="MAXimum Number of SYMetries", characteristics=['[[DEVELOP]]'], - text=""" -Gives the maximum number of spatial symetries allowed in the memory. + text=r""" +Gives the maximum number of spatial symmetries allowed in the memory. The default value is sufficient for most applications. It might have to be increased in the case of the use of a supercell (unit cell identically repeated). @@ -8478,7 +8968,7 @@ dimensions="scalar", mnemonics="Maximum number of BANDs", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable derives the maximum number of bands over all k-points and spin-polarisation from [[nband]](1:nkpt*nsppol). """, @@ -8494,8 +8984,8 @@ mnemonics="Many Body Perturbation Theory SCISSor operator", characteristics=['[[ENERGY]]'], requires="[[optdriver]] in [3,4,99]", - text=""" -The Scissors operator energy added to the conductions states. In some cases, + text=r""" +The scissor operator energy added to the conductions states. In some cases, it mimics a second iteration self-consistent GW calculation. """, ), @@ -8508,12 +8998,12 @@ dimensions="scalar", defaultval=0.0, mnemonics="Model Dielectric Function, EPSilon INFinity", - requires="[[optdriver]]==99 and [[bs_coulomb_term]] in [20,21] (Bethe-Salpeter calculas with a model dielectric function", - text=""" + requires="[[optdriver]] == 99 and [[bs_coulomb_term]] in [20,21] (Bethe-Salpeter calculations with a model dielectric function", + text=r""" [[mdf_epsinf]] specifies the value of the macroscopic dielectric function used -to model the screening function (see Solid State Commun. **84**, 765 (1992)). -The proper spatial symmetry of the screening W(r,r_prime) is enforced using -Eq. (7) of Phys. Rev. B **37**, (1988) +to model the screening function (see [[cite:Bechstedt1992]]). +The proper spatial symmetry of the screening $W(\mathbf{r},\mathbf{r}^\prime)$ is enforced using +Eq. (7) of [[cite:vonderLinden1988]]. """, ), @@ -8525,11 +9015,14 @@ dimensions=[2], defaultval=[300, 300], mnemonics="Molecular Dynamics TEMPeratures", - text=""" + text=r""" Give the initial and final temperature of the Nose-Hoover thermostat -([[ionmov]]=8) and Langevin dynamics ([[ionmov]]=9), in Kelvin. This +([[ionmov]] = 8) and Langevin dynamics ([[ionmov]] = 9), in Kelvin. This temperature will change linearly from the initial temperature **mdtemp(1)** at itime=1 to the final temperature **mdtemp(2)** at the end of the [[ntime]] timesteps. + +In the case of the isokinetic molecular dynamics ([[ionmov]] = 12), **mdtemp(1)** allows ABINIT +to generate velocities ([[vel]]) to start the run if they are not provided by the user or if they all vanish. However **mdtemp(2)** is not used (even if it must be defined to please the parser). If some velocities are non-zero, **mdtemp** is not used, the kinetic energy computed from the velocities is kept constant during the run. """, ), @@ -8542,9 +9035,9 @@ defaultval=10000.0, mnemonics="Molecular Dynamics WALL location", commentdefault="the walls are extremely far away", - text=""" + text=r""" Gives the location (atomic units) of walls on which the atoms will bounce -back. when [[ionmov]]=6, 7, 8 or 9. For each cartesian direction idir=1, 2 or +back when [[ionmov]] = 6, 7, 8 or 9. For each cartesian direction idir=1, 2 or 3, there is a pair of walls with coordinates xcart(idir)=-wall and xcart(idir)=rprimd(idir,idir)+wall. Supposing the particle will cross the wall, its velocity normal to the wall is reversed, so that it bounces back. @@ -8563,9 +9056,8 @@ defaultval=1, mnemonics="MEMory TEST", characteristics=['[[DEVELOP]]'], - text=""" -This variable controls the memory test done in the memana routine. Possible -values: + text=r""" +This variable controls the memory test done in the `memana` routine. Possible values: * 0 no test on the available memory is performed * 1 the routine tries to allocate the estimated memory, for testing purposes, and if a failure occurs, the routine stops. @@ -8579,16 +9071,16 @@ vartype="real", topics=['TransPath_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[imgmov]]==5': 0.4, 'defaultval': 100.0}), + defaultval=ValueWithConditions({'[[imgmov]] == 5': 0.4, 'defaultval': 100.0}), mnemonics="Minimal Energy Path search: MaXimum allowed STEP size", characteristics=['[[LENGTH]]'], - text=""" -Relevant only when [[imgmov]]=1 (Steepest-Descent), 2 (String Method) or 5 + text=r""" +Relevant only when [[imgmov]] = 1 (Steepest-Descent), 2 (String Method) or 5 (Nudged Elastic Band). The optimizer used to solve the Ordinary Differential Equation (ODE) can be constrained with a maximum allowed step size for each image. By default this feature is only activated for Nudged Elastic Band (NEB) and the value is -inspired by _J. Chem. Phys. 128, 134106 (2008)_. +inspired by [[cite:Sheppard2008]]. Note that the step size is defined for each image as _step = SQRT[SUM(R_i dot R_i)]_ where the _R_i_ are the positions of the atoms in the cell. """, @@ -8601,8 +9093,8 @@ topics=['TransPath_basic'], dimensions="scalar", mnemonics="Minimal Energy Path ordinary differential equation SOLVER", - text=""" -Relevant only when [[imgmov]]=2 (String Method) or 5 (Nudged Elastic Band). + text=r""" +Relevant only when [[imgmov]] = 2 (String Method) or 5 (Nudged Elastic Band). Gives the algorithm used to solve the Ordinary Differential Equation (ODE) when searching for a Minimal Energy Path (MEP). Possible values can be: @@ -8611,27 +9103,51 @@ Compatible with all MEP search methods. * 1 --> **Quick-min optimizer** following the (scaled) forces, the scaling factor being [[fxcartfactor]]. The "quick minimizer" improves upon the steepest-descent method by accelerating the system in the direction of the forces. The velocity (of the image) is projected long the force and cancelled if antiparallel to it. -Compatible only with Nudged Elastic Band ([[imgmov]]=5). -_See, for instance: J. Chem. Phys. 128, 134106 (2008)._ +Compatible only with Nudged Elastic Band ([[imgmov]] = 5). +See [[cite:Sheppard2008]]. * 2 --> **Local Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) algorithm**; each image along the band is minimized with a different instance of the BFGS optimizer. -Compatible only with Nudged Elastic Band ([[imgmov]]=5). -_See, for instance: J. Chem. Phys. 128, 134106 (2008)._ +Compatible only with Nudged Elastic Band ([[imgmov]] = 5). +See [[cite:Sheppard2008]]. IN [[DEVELOP]]PMENT - NOT RELIABLE * 3 --> **Global Broyden-Fletcher-Goldfarb-Shanno (GL-BFGS) algorithm**; all images along the band are minimized with a single instance of the BFGS optimizer. -Compatible only with Nudged Elastic Band ([[imgmov]]=5). -_See, for instance: J. Chem. Phys. 128, 134106 (2008)._ +Compatible only with Nudged Elastic Band ([[imgmov]] = 5). +See [[cite:Sheppard2008]]. IN [[DEVELOP]]PMENT - NOT RELIABLE * 4 --> **Fourth-order Runge-Kutta method**; the images along the band are moved every four steps (1 <=istep<=[[ntimimage]]) following the Runge-Kutta algorithm, the time step being [[fxcartfactor]]. -Compatible only with Simplified String Method ([[imgmov]]=2 and -[[string_algo]]=1 or 2). -_See: J. Chem. Phys. 126, 164103 (2007)._ +Compatible only with Simplified String Method ([[imgmov]] = 2 and +[[string_algo]] = 1 or 2). +See [[cite:Weinan2007]]. All of the optimizers can be constrained with a maximum allowed step size for each image; see [[mep_mxstep]]. This is by default the case of the Nudged -Elastic Band ([[imgmov]]=5). +Elastic Band ([[imgmov]] = 5). +""", +), + +Variable( + abivarname="mixprec", + varset="dev", + vartype="integer", + topics=['TuningSpeed_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="MIXed PRECision", + characteristics=['[[DEVELOP]]'], + text=r""" +This variable activates FFT transforms in single precision. +The code thus works in mixed-precision mode in the sense that all the high-level +operations are done in double-precision while the FFT of wavefunctions densities and potentials +are done with workspace arrays in single precision. + +This option **requires** the linkage with external FFT libraries (FFTW3 or MKL-DFTI, see also [[fftalg]]) +Tests showed a speedup of ~25% in calculations in which FFTs (in particular fourwf%pot) represent the dominant part. +Typical examples are EPH calculation with [[optdriver]] = 7. + +At present (|today|), only selected kernels support mixed-precision, in particular MPI-FFTs +in mixed precision **are not yet supported**. """, ), @@ -8643,7 +9159,7 @@ dimensions="scalar", mnemonics="Maximum of nGFFT", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable contains the maximum of [[ngfft]](1:3). """, ), @@ -8656,7 +9172,7 @@ dimensions="scalar", mnemonics="Maximum of nGFFT for the Double Grid", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable contains the maximum of [[ngfftdg]](1:3). """, ), @@ -8669,11 +9185,10 @@ dimensions=['[[npspalch]]', '[[ntypalch]]'], mnemonics="MIXing coefficients for ALCHemical potentials", characteristics=['[[EVOLVING]]'], - text=""" -Used for the generation of alchemical pseudoatoms, that is, when [[ntypalch]] -is non-zero. + text=r""" +Used for the generation of alchemical pseudoatoms, that is, when [[ntypalch]] is non-zero. -This array gives, for each type of alchemical pseudatom (there are +This array gives, for each type of alchemical pseudo-atom (there are [[ntypalch]] such pseudoatoms), the mixing coefficients of the basic [[npspalch]] pseudopotentials for alchemical use. For each type of alchemical pseudoatom, the sum of the mixing coefficients must equal 1. @@ -8682,7 +9197,7 @@ [[algalch]]. Note that the masses of the atoms, [[amu]] are also mixed according to the value of [[mixalch]], by default. -Example 1. Suppose that we want to describe Ba(0.25) Sr(0.75) Ti O3. +Example 1. Suppose that we want to describe Ba(0.25) Sr(0.75) Ti O$_3$. The input variables related to the construction of the alchemical Ba(0.25) Sr(0.75) potential will be: @@ -8692,14 +9207,14 @@ ! are mentioned at the end of the series. ntypat 3 ! There will be three types of atoms. ntypalch 1 ! One pseudoatom will be alchemical. - ! Hence, there will be ntyppure=2 pure pseudoatoms, + ! Hence, there will be ntyppure=2 pure pseudo-atoms, ! with znucl 8 (O) and 40 (Ti), corresponding to ! the two first pseudopotentials. Out of the ! four pseudopotentials, npspalch=2 are left ! for alchemical purposes, with znucl 56 (Ba) ! and 38 (Sr). - mixalch 0.25 0.75 ! For that unique pseudoatom to be - ! generated, here are the mixing coeeficients, + mixalch 0.25 0.75 ! For that unique pseudo-atom to be + ! generated, here are the mixing coefficients, ! to be used to combine the Ba and Sr pseudopotentials. @@ -8731,6 +9246,22 @@ """, ), +Variable( + abivarname="mixesimgf", + varset="rlx", + vartype="real", + topics=['CrossingBarriers_useful'], + dimensions=['[[nimage]]'], + mnemonics="MIXing Electronic Structure IMAGE Factors", + text=r""" +Used in the algorithm Linear Combination of Constrained DFT Energies, that is, when [[imgmov]]==6. + +This array gives, for each one of the [[nimage]] images, the factor +by which the total energies for systems with same geometry but different electronic structures (occupation numbers) are linearly combined. +The sum of these factors must equal 1. +""", +), + Variable( abivarname="mpw", varset="internal", @@ -8739,7 +9270,7 @@ dimensions="scalar", mnemonics="Maximum number of Plane Waves", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable gives the maximum of the number of plane waves over all k-points. It is computed from [[ecut]] and the description of the cell, provided by [[acell]], [[rprim]], and/or [[angdeg]]. @@ -8755,7 +9286,7 @@ defaultval=3001, mnemonics="Maximum number of Q-space GRID points for pseudopotentials", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Govern the size of the one-dimensional information related to pseudopotentials, in reciprocal space: potentials, or projector functions. """, @@ -8770,10 +9301,10 @@ defaultval=3001, mnemonics="Maximum number of Q-wavevectors for the 1-dimensional GRID for the Double Grid in PAW", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Maximum number of wavevectors used to sample the local part of the potential, in PAW. Actually referred to as mqgrid_vl internally. Should change name to -the latter... See also [[mqgrid]] +the latter. See also [[mqgrid]]. """, ), @@ -8786,7 +9317,7 @@ defaultval=0, mnemonics="Number of AToms in CONstraint equations", characteristics=['[[NO_MULTI]]', '[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the number of atoms appearing in each of the [[nconeq]] independent equations constraining the motion of atoms during structural optimization or molecular dynamics (see [[nconeq]], [[iatcon]], and [[wtatcon]]). @@ -8803,7 +9334,7 @@ mnemonics="Number of Atoms that are FIXed", characteristics=['[[INPUT_ONLY]]'], commentdefault="(no atoms held fixed)", - text=""" + text=r""" Gives the number of atoms (not to exceed [[natom]]) which are to be held fixed during a structural optimization or molecular dynamics. When [[natfix]] > 0, [[natfix]] entries should be provided in array [[iatfix]] @@ -8820,11 +9351,10 @@ defaultval=0, mnemonics="Number of Atoms that are FIXed along the X direction", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the number of atoms (not to exceed [[natom]]) which are to be held fixed along the X direction during a structural optimization or molecular dynamics. -When [[natfixx]] > 0, [[natfixx]] entries should be provided in array -[[iatfixx]]. +When [[natfixx]] > 0, [[natfixx]] entries should be provided in array [[iatfixx]]. """, ), @@ -8837,7 +9367,7 @@ defaultval=0, mnemonics="Number of Atoms that are FIXed along the Y direction", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the number of atoms (not to exceed [[natom]]) which are to be held fixed along the Y direction during a structural optimization or molecular dynamics. When [[natfixy]] > 0, [[natfixy]] entries should be provided in array [[iatfixy]] @@ -8853,7 +9383,7 @@ defaultval=0, mnemonics="Number of Atoms that are FIXed along the Z direction", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the number of atoms (not to exceed [[natom]]) which are to be held fixed along the Z direction during a structural optimization or molecular dynamics. When [[natfixz]] > 0, [[natfixz]] entries should be provided in array [[iatfixz]]. @@ -8868,12 +9398,12 @@ dimensions="scalar", defaultval=1, mnemonics="Number of ATOMs", - text=""" + text=r""" Gives the total number of atoms in the unit cell. Default is 1 but you will obviously want to input this value explicitly. Note that [[natom]] refers to all atoms in the unit cell, not only to the irreducible set of atoms in the unit cell (using symmetry operations, this set -allows to recover all atoms). If you want to specify only the irreducible set +allows one to recover all atoms). If you want to specify only the irreducible set of atoms, use the symmetriser, see the input variable [[natrd]]. """, ), @@ -8886,8 +9416,8 @@ dimensions="scalar", mnemonics="Number of AToms on which PAW+U is applied", characteristics=['[[INTERNAL_ONLY]]'], - requires="[[usepawu]]==1", - text=""" + requires="[[usepawu]] == 1", + text=r""" This internal variable gives the number of atoms on which the LDA/GGA+U method is applied. This value is determined from [[lpawu]]. """, @@ -8901,11 +9431,10 @@ dimensions="scalar", defaultval="[[natom]]", mnemonics="Number of AToms ReaD", - text=""" + text=r""" Gives the number of atoms to be read from the input file, in the case the atom manipulator or the smart symmetriser is used. In this case, [[natrd]] is also -used to dimension the array [[typat]], and the arrays [[xred]], [[xangst]] and -[[xcart]]. +used to dimension the array [[typat]], and the arrays [[xred]], [[xangst]] and [[xcart]]. Must take into account the vacancies (see [[vacnum]] and [[vaclst]]). Despite possible vacancies, cannot be bigger than [[natom]]. """, @@ -8920,14 +9449,12 @@ defaultval="[[natom]]", mnemonics="Number of ATomic SPHeres for the atom-projected density-of-states", requires="[[prtdos]] == 3 or [[pawfatbnd]] in [1,2]", - text=""" -[[natsph]] gives the number of atoms around which the sphere for atom- -projected density-of-states will be built, in the [[prtdos]]=3 case. The -indices of these atoms are given by [[iatsph]]. The radius of these spheres is -given by [[ratsph]]. -If [[pawfatbnd]]=1 or 2, it gives the number of atoms around which atom- -projected band structure will be built (the indices of these atoms are given -by [[iatsph]]). + text=r""" +[[natsph]] gives the number of atoms around which the sphere for atom-projected +density-of-states will be built, in the [[prtdos]] = 3 case. The +indices of these atoms are given by [[iatsph]]. The radius of these spheres is given by [[ratsph]]. +If [[pawfatbnd]] = 1 or 2, it gives the number of atoms around which atom-projected +band structure will be built (the indices of these atoms are given by [[iatsph]]). """, ), @@ -8940,13 +9467,13 @@ defaultval=0, mnemonics="Number of ATomic SPHeres for the l-projected density-of-states in EXTRA set", requires="[[prtdos]] == 3 or [[pawfatbnd]] in [1,2]", - text=""" + text=r""" [[natsph_extra]] gives the number of extra spheres for which the angular- -momentum-projected density-of-states will be built, in the [[prtdos]]=3 case. +momentum-projected density-of-states will be built, in the [[prtdos]] = 3 case. The radius of these spheres is given by [[ratsph_extra]]. This simulates the STS signal for an STM tip atom placed at the sphere position, according to the chemical nature of the tip (s- p- d- wave etc...). -If [[pawfatbnd]]=1 or 2, it gives the number of spheres in which l-projected +If [[pawfatbnd]] = 1 or 2, it gives the number of spheres in which $l$-projected band structure will be built. The position of the spheres is given by the [[xredsph_extra]] variable. """, @@ -8961,10 +9488,10 @@ defaultval=0, mnemonics="Number of ATomic potential (V) energy SHIFTs (per atom)", requires="[[usepawu]] /= 0, [[atvshift]]", - text=""" + text=r""" Number of atomic potential energy shifts (per atom), to be used to define the array [[atvshift]]. If non-zero, only two possibilities exist: 5 for d states -(with [[lpawu]]=2), and 7 for f states (with [[lpawu]]=3). If non-zero, one +(with [[lpawu]] = 2), and 7 for f states (with [[lpawu]] = 3). If non-zero, one should define [[usepawu]], [[lpawu]] and [[atvshift]]. """, ), @@ -8973,11 +9500,11 @@ abivarname="nband", varset="basic", vartype="integer", - topics=['BandOcc_basic'], + topics=['BandOcc_basic', 'GW_basic', 'RPACorrEn_basic', 'Susceptibility_basic'], dimensions="scalar", mnemonics="Number of BANDs", commentdefault=" the estimated number of occupied bands +1 (TODO provide the mathematical formulation)", - text=""" + text=r""" Gives number of bands, occupied plus possibly unoccupied, for which wavefunctions are being computed along with eigenvalues. Note: if the parameter [[occopt]] (see below) is not set to 2, [[nband]] is a @@ -8991,7 +9518,7 @@ If [[nspinor]] is 2, nband must be even for each k point. -In the case of a GW calculation ([[optdriver]]=3 or 4), [[nband]] gives the +In the case of a GW calculation ([[optdriver]] = 3 or 4), [[nband]] gives the number of bands to be treated to generate the screening (susceptibility and dielectric matrix), as well as the self-energy. However, to generate the _KSS file (see [[kssform]]) the relevant number of bands is given by [[nbandkss]]. @@ -9006,7 +9533,7 @@ dimensions="scalar", mnemonics="Number of BANDs for (Hartree)-Fock exact exchange", commentdefault="the estimated number of occupied bands (TODO: provide the mathematical formulation)", - text=""" + text=r""" Gives the maximum number of occupied bands with which Fock exact exchange is being computed for the wavefunctions. """, @@ -9022,19 +9549,19 @@ mnemonics="Number of BANDs in the KSS file", text=r""" This input variable is used for the preparation of a GW calculation: it is -used in a GS run (where [[optdriver]]=0) to generate a _KSS file. In this run, +used in a GS run (where [[optdriver]] = 0) to generate a _KSS file. In this run, [[nbandkss]] should be non-zero. The generated _KSS file can be subsequently used to calculate the irreducible polarizabilty $\chi^{(0)}_{KS}$ using -[[optdriver]]=3 or to calculate GW corrections setting [[optdriver]]=4. +[[optdriver]] = 3 or to calculate GW corrections setting [[optdriver]] = 4. - * If [[nbandkss]]=0, no _KSS file is created - * If [[nbandkss]]=-1, all the available eigenstates (energies and eigenfunctions) are stored in the abo_KSS file at the end of the ground state calculation. The number of states is forced to be the same for all k-points: it will be the minimum of the number of plane waves over all k-points. + * If [[nbandkss]] = 0, no _KSS file is created. + * If [[nbandkss]] = -1, all the available eigenstates (energies and eigenfunctions) are stored in the abo_KSS file at the end of the ground state calculation. The number of states is forced to be the same for all k-points: it will be the minimum of the number of plane waves over all k-points. * If [[nbandkss]] is greater than 0, abinit stores (about) [[nbandkss]] eigenstates in the abo_KSS file. This number of states is forced to be the same for all k-points. See [[npwkss]] for the selection of the number of the planewave components of the eigenstates to be stored. The input variable [[iomode]] can be used to read and write KSS files -according to different fileformat (presently only [[iomode]]=0 and 3 are +according to different fileformat (presently only [[iomode]] = 0 and 3 are available in the GW part). The precision of the KSS file can be tuned through the input variable [[kssform]]. For more details about the format of the abo_KSS file, see the routine outkss.F90. @@ -9054,11 +9581,11 @@ defaultval=1, mnemonics="Number of BanDs in a BLOCK", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" In case of non-standard, blocked algorithms for the optimization of the -wavefunctions (that is, if [[wfoptalg]]=4): +wavefunctions (that is, if [[wfoptalg]] = 4): - * if [[wfoptalg]]=4, [[nbdblock]] defines the number of blocks (the number of bands in the block is then [[nband]]/[[nbdblock]] ). + * if [[wfoptalg]] = 4, [[nbdblock]] defines the number of blocks (the number of bands in the block is then [[nband]]/[[nbdblock]] ). """, ), @@ -9068,11 +9595,11 @@ vartype="integer", topics=['SCFControl_useful', 'BandOcc_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[optdriver]]==0 and [[iscf]]<0': '2*[[nspinor]]', - '[[optdriver]]==1 and 3<=[[occopt]] and [[occopt]]<= 8': '2*[[nspinor]]', + defaultval=ValueWithConditions({'[[optdriver]] == 0 and [[iscf]]<0': '2*[[nspinor]]', + '[[optdriver]] == 1 and 3<=[[occopt]] and [[occopt]]<= 8': '2*[[nspinor]]', 'defaultval': 0}), mnemonics="Number of BanDs for the BUFfer", - text=""" + text=r""" [[nbdbuf]] gives the number of bands, the highest in energy, that, among the [[nband]] bands, are to be considered as part of a buffer. This concept is useful in three situations: in non-self-consistent calculations, for the @@ -9122,7 +9649,7 @@ defaultval=1, mnemonics="Number of BERRY phase computations", requires="[[berryopt]] = 1, 2, or 3", - text=""" + text=r""" Gives the number of Berry phase computations of polarisation, or finite- difference estimations of the derivative of wavefunctions with respect to the wavevector, each of which might be characterized by a different change of @@ -9150,23 +9677,23 @@ vartype="integer", topics=['Planewaves_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[usepaw]]==0': 0, '[[usepaw]]==1': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[usepaw]] == 0': 0, '[[usepaw]] == 1': 1, 'defaultval': 0}), mnemonics="Norm-Conserving pseudopotentials - use XC Core-Correction in G-SPACE", characteristics=['[[DEVELOP]]'], - commentdefault="0 when [[usepaw]]=0, 1 when [[usepaw]]=1", - text=""" + commentdefault="0 when [[usepaw]] = 0, 1 when [[usepaw]] = 1", + text=r""" Historically, Abinit treats the model core charge used for the non-linear core correction in real space. Alternatively, it is possible to instruct the code to compute the core charge in G-space following the same approach used in the PAW code. The G-space formalism is more accurate than the interpolation in real space, especially when derivatives of the model core charge are needed, e.g. DFPT. Preliminary tests showed that the violation of the acoustic sum -rule is reduced when [[nc_xccc_gspace]]==1, especially for LDA. It is worth -stressing, however, that [[nc_xccc_gspace]]==1 should be used only in -conjunction with NC pseudos whose model core charge that decays quickly in +rule is reduced when [[nc_xccc_gspace]] == 1, especially for LDA. It is worth +stressing, however, that [[nc_xccc_gspace]] == 1 should be used only in +conjunction with NC pseudos with a model core charge that decays quickly in G-space. Several NC pseudos available in the Abinit table are not optimized for the G-space formalism and users are strongly invited to perform -convergence studies with respect to ecut before using this option. +convergence studies with respect to [[ecut]] before activating this option in production runs. """, ), @@ -9179,10 +9706,9 @@ defaultval=0, mnemonics="Number of CONstraint EQuations", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Gives the number of independent equations constraining the motion of atoms -during structural optimization or molecular dynamics (see [[natcon]], -[[iatcon]], and [[wtatcon]]). +during structural optimization or molecular dynamics (see [[natcon]], [[iatcon]], and [[wtatcon]]). """, ), @@ -9195,11 +9721,11 @@ defaultval=0, mnemonics="NetCdf TIME between output of molecular dynamics informations", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" When [[nctime]] is non-zero, the molecular dynamics information is output in -NetCDF format, every [[nctime]] time step. Here is the content of an example -file: +NetCDF format, every [[nctime]] time step. Here is the content of an example file: +``` netcdf md32.outH_moldyn1 { dimensions: time = UNLIMITED; // (11 currently) @@ -9225,6 +9751,7 @@ double Cell_Volume(DimScalar); Cell_Volume:units = "Bohr^3"; } +``` """, ), @@ -9237,18 +9764,18 @@ mnemonics="Number of DIVisions of K lines", characteristics=['[[INPUT_ONLY]]'], commentdefault="Will be generated automatically from [[ndivsm]] if the latter is defined.", - excludes="specified([[ndivsm]])", + excludes="[[ndivsm]]", requires="[[kptopt]] < 0", - text=""" + text=r""" Gives the number of divisions of each of the segments of the band structure, whose path is determined by [[kptopt]] and [[kptbounds]]. In this case, the absolute value of [[kptopt]] is the number of such segments. -For example, suppose that the number of segment is just one ([[kptopt]]=-1), a -value [[ndivk]]=4 will lead to the computation of points with relative +For example, suppose that the number of segment is just one ([[kptopt]] = -1), a +value [[ndivk]] = 4 will lead to the computation of points with relative coordinates 0.0, 0.25, 0.5, 0.75 and 1.0, along the segment in consideration. -Now, suppose that there are two segments ([[kptopt]]=-2), with [[ndivk]](1)=4 +Now, suppose that there are two segments ([[kptopt]] = -2), with [[ndivk]](1)=4 and [[ndivk]](2)=2, the computation of the eigenvalues will be done at 7 points, 5 belonging to the first segment, with relative coordinates 0.0, 0.25, 0.5, 0.75 and 1.0, the last one being also the starting point of the next @@ -9256,7 +9783,7 @@ coordinates 0.5 and 1.0. It is easy to compute disconnected circuits (non-chained segments), by -separating the circuits with the value [[ndivk]]=1 for the intermediate +separating the circuits with the value [[ndivk]] = 1 for the intermediate segment connecting the end of one circuit with the beginning of the next one (in which case no intermediate point is computed along this segment). @@ -9274,7 +9801,7 @@ dimensions="scalar", mnemonics="Number of DIVisions for the SMallest segment", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" This variable defines the number of divisions used to sample the smallest segment of the circuit employed in a band structure calculations (see related input variables [[kptopt]] and [[kptbounds]]). If [[ndivsm]] is given in the @@ -9296,13 +9823,12 @@ defaultval=0, mnemonics="Number of DaTaSETs", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Gives the number of data sets to be treated. If 0, means that the multi-data set treatment is not used, so that the root filenames will not be appended with _DSx, where 'x' is the dataset index defined by the input variable [[jdtset]], and also that input names with a -dataset index are not allowed. Otherwise, [[ndtset]]=0 is equivalent to -[[ndtset]]=1. +dataset index are not allowed. Otherwise, [[ndtset]] = 0 is equivalent to [[ndtset]] = 1. """, ), @@ -9314,7 +9840,7 @@ dimensions="scalar", mnemonics="Number of DYNamical IMAGEs", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable gives the number of dynamical images, immediately deduced from the number of non-zero values present in [[dynimage]]. It is used to dimension many memory-consuming arrays (one copy for each image), e.g. the @@ -9330,19 +9856,18 @@ dimensions="scalar", defaultval=1, mnemonics="Nudged Elastic Band ALGOrithm", - requires="[[imgmov]]==5", - text=""" + requires="[[imgmov]] == 5", + text=r""" Gives the variant of the NEB method used. Possible values can be: * 0 --> **Original NEB method**. -_See: Classical and Quantum Dynamics in Condensed Phase Simulations, edited by -Berne, Ciccotti, Coker (World Scientific, Singapore, 1998), pp. 385-404_ +See [[cite:Berne1998]] pp. 385-404 * 1 --> **NEB + improved tangent**. The Improved Tangent Method builds on the NEB with an improved estimate of the tangent direction and a resulting change of the component of the spring force acting on the images. -_See: J. Chem. Phys. 113, 9978 (2000)._ +See [[cite:Henkelman2000]] * 2 --> **Climbing-Image NEB (CI-NEB)**. The CI-NEB method constitutes a small modification to the NEB method. @@ -9351,7 +9876,7 @@ variable (see [[neb_spring]]). As the image with the highest energy has to be identified, the calculation begins with several iterations of the standard NEB algorithm. The effective CI-NEB begins at the [[cineb_start]] iteration. -_See: J. Chem. Phys. 113, 9901 (2000)._ +See [[cite:Henkelman2000a]] Note that, in all cases, it is possible to define the value of the spring constant connecting images with [[neb_spring]], keeping it constant or @@ -9365,16 +9890,16 @@ vartype="real", topics=['TransPath_useful'], dimensions=[2], - defaultval=ValueWithConditions({'[[neb_algo]]==2': [0.02, 0.15], 'defaultval': [0.05, 0.05]}), + defaultval=ValueWithConditions({'[[neb_algo]] == 2': ValueWithUnit(units='Hartree/Bohr^2', value=[0.02, 0.15]), 'defaultval': ValueWithUnit(units='Hartree/Bohr^2', value=[0.05, 0.05])}), mnemonics="Nudged Elastic Band: SPRING constant", - requires="[[imgmov]]==5", - text=""" -Gives the minimal and maximal values of the spring constant connecting images + requires="[[imgmov]] == 5", + text=r""" +Gives the minimal and maximal values (in Hartree/Bohr^2) of the spring constant connecting images for the NEB method. In the standard "Nudged Elastic Band" method, the spring constant is constant along the path, but, in order to have higher resolution close to the saddle point, it can be better to have stronger springs close to it. -_See: J. Chem. Phys. 113, 9901 (2000)._ +See [[cite:Henkelman2000a]] """, ), @@ -9387,11 +9912,11 @@ defaultval="[[AUTO_FROM_PSP]]", mnemonics="Number of ELECTrons", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable gives the number of electrons per unit cell, as computed from the sum of the valence electrons related to each atom (given in the pseudopotential, where it is called "zion"), and the input variable [[charge]]: -[[nelect]]=zion-[[charge]]. +[[nelect]] = zion-[[charge]]. """, ), @@ -9403,12 +9928,13 @@ dimensions="scalar", mnemonics="Number of FFT points", characteristics=['[[INTERNAL_ONLY]]'], - text=""" -If space parallelisation is not used (that is, if [[paral_kgb]]==0), this + text=r""" +If space parallelization is not used (that is, if [[paral_kgb]] == 0), this internal variable gives the number of Fast Fourier Transform points in the grid generated by [[ngfft]](1:3). It is simply the product of the three components of [[ngfft]]. -If space parallelisation is used (that is, if [[paral_kgb]]==1), then it + +If space parallelisation is used (that is, if [[paral_kgb]] == 1), then it becomes the number of Fast Fourier Transform points attributed to the particular processor. It is no longer the above-mentioned simple product, but a number usually close to this product divided by the number of processors on @@ -9424,12 +9950,13 @@ dimensions="scalar", mnemonics="Number of FFT points for the Double Grid", characteristics=['[[INTERNAL_ONLY]]'], - text=""" -If space parallelisation is not used (that is, if [[paral_kgb]]==0), this + text=r""" +If space parallelisation is not used (that is, if [[paral_kgb]] == 0), this internal variable gives the number of Fast Fourier Transform points in the (double) grid generated by [[ngfftdg]](1:3). It is simply the product of the three components of [[ngfftdg]]. -If space parallelisation is used (that is, if [[paral_kgb]]==1), then it + +If space parallelisation is used (that is, if [[paral_kgb]] == 1), then it becomes the number of Fast Fourier Transform points attributed to the particular processor. It is no longer the above-mentioned simple product, but a number usually close to this product divided by the number of processors on @@ -9441,12 +9968,12 @@ abivarname="nfreqim", varset="gw", vartype="integer", - topics=['FrequencyMeshMBPT_basic'], + topics=['FrequencyMeshMBPT_basic', 'RPACorrEn_compulsory'], dimensions="scalar", defaultval=0, mnemonics="Number of FREQuencies along the IMaginary axis", - requires="[[optdriver]]==3 and [[gwcalctyp]] in [2,12,22,9,19,29]", - text=""" + requires="[[optdriver]] == 3 and [[gwcalctyp]] in [2,12,22,9,19,29]", + text=r""" [[nfreqim]] sets the number of pure imaginary frequencies used to calculate the dielectric matrix in order to perform the numerical integration of the GW self-energy. """, @@ -9459,16 +9986,16 @@ topics=['FrequencyMeshMBPT_basic'], dimensions="scalar", mnemonics="Nth FREQuency Moment of the Imaginary part of the Dielectric Matrix", - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" depending on the value of [[nfreqmidm]] will calculate the frequency moment of -the Dielectric matrix or its inverse, +the dielectric matrix or its inverse, - * if [[nfreqmidm]] is positive: calculate (nth=[[nfreqmidm]]) frequency moment of the Dielectric matrix - * if [[nfreqmidm]] is negative: calculate (nth=[[nfreqmidm]]) frequency moment of the inverse Dielectric matrix - * if [[nfreqmidm]] = 0: calculate first frequency moment of the full polarizability + * if [[nfreqmidm]] is positive: calculate (nth=[[nfreqmidm]]) frequency moment of the dielectric matrix. + * if [[nfreqmidm]] is negative: calculate (nth=[[nfreqmidm]]) frequency moment of the inverse dielectric matrix. + * if [[nfreqmidm]] = 0: calculate first frequency moment of the full polarizability. -see M. Taut, J. Phys. C: Solid State Phys. 18 (1985) 2677-2690. +See [[cite:Taut1985]]. """, ), @@ -9480,19 +10007,19 @@ dimensions="scalar", defaultval=0, mnemonics="Number of FREQuencies along the REal axis", - requires="[[optdriver]]==3 and [[gwcalctyp]] in [2,12,22,9,19,29]", + requires="[[optdriver]] == 3 and [[gwcalctyp]] in [2,12,22,9,19,29]", text=r""" [[nfreqre]] sets the number of real frequencies used to calculate the dielectric matrix in order to perform the numerical integration of the GW self-energy. -It can be used also in case of GW calculations with plasmon-pole models, _i.e_ -[[gwcalctyp]] <10, to reduce the number of frequencies used to evaluate the +It can be used also in case of GW calculations with plasmon-pole models, _i.e._ +[[gwcalctyp]]<10, to reduce the number of frequencies used to evaluate the dielectric matrix from the (default) two to one frequency (omega=0) by setting -[[nfreqre]]=1. This might be a good idea in case one is planning to use -ppmodel>1\. This will force the calculation of the screening on a single -frequency (omega=0) and hence reduce memory and disk space requirement. The +[[nfreqre]] = 1. This might be a good idea in case one is planning to use +[[ppmodel]] > 1. This will force the calculation of the screening on a single +frequency ($\omega=0$) and hence reduce memory and disk space requirement. The only draw back is that the user will not be able to perform self energy -calculation using [[ppmodel]]=1, since in the last case the dielectric matrix +calculation using [[ppmodel]] = 1, since in the last case the dielectric matrix calculated on two frequencies is required. If the user is not sure which ppmodel to use, then s/he is not advised to use this input variable. Using the default values, one must be able to get a screening file that can be used with any [[ppmodel]]. @@ -9507,8 +10034,8 @@ dimensions="scalar", defaultval=0, mnemonics="Number of FREQuencies for the SPectral function", - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" [[nfreqsp]] defines the number of real frequencies used to calculate the spectral function of the GW Green's function. """, @@ -9523,43 +10050,43 @@ defaultval=[0, 0, 0], mnemonics="Number of Grid points for Fast Fourier Transform", commentdefault="(automatic selection of optimal values)", - text=""" -gives the size of fast Fourier transform (fft) grid in three dimensions. Each + text=r""" +Gives the size of fast Fourier transform (FFT) grid in three dimensions. Each number must be composed of the factors 2, 3, and 5 to be consistent with the -radices available in our fft. +radices available in our FFT. If no [[ngfft]] is provided or if [[ngfft]] is set to 0 0 0, the code will automatically provide an optimal set of [[ngfft]] values, based on [[acell]], [[rprim]] and [[ecut]] (see also [[boxcutmin]] for speed/accuracy concerns). This is the recommended procedure, of course. -The total number of FFT points is the product: [[ngfft]](1)*[[ngfft]](2)*[[ngfft]](3)=nfft. +The total number of FFT points is the product: [[ngfft]](1) x [[ngfft]](2) x [[ngfft]](3)=[[nfft]]. When [[ngfft]] is made smaller than recommended values (e.g. by setting [[boxcutmin]] to a value smaller than 2.0 or by setting [[ngfft]] manually), the code runs faster and the equations in effect are approximated by a low pass Fourier filter. The code reports to standard output (unit 06) a parameter -"boxcut" which is the smallest ratio of the fft box side to the G vector basis +"boxcut" which is the smallest ratio of the FFT box side to the $\GG$ vector basis sphere diameter. When boxcut is less than 2 the Fourier filter approximation is being used. When boxcut gets less than about 1.5 the approximation may be too severe for realistic results and should be tested against larger values of [[ngfft]]. When boxcut is larger than 2, [[ngfft]] could be reduced without loss of accuracy. In this case, the small variations that are observed are -solely due to the xc quadrature, that may be handled with [[intxc]]=1 to even +solely due to the xc quadrature, that may be handled with [[intxc]] = 1 to even reduce this effect. Internally, [[ngfft]] is an array of size 18. The present components are stored in [[ngfft]](1:3), while - * ngfft(4:6) contains slightly different (larger) values, modified for efficiency of the FFT - * ngfft(7) is [[fftalg]] - * ngfft(8) is [[fftcache]] - * ngfft(9) is set to 0 if the parallelization of the FFT is not activated, while it is set to 1 if it is activated. - * ngfft(10) is the number of processors of the FFT group - * ngfft(11) is the index of the processor in the group of processors - * ngfft(12) is n2proc, the number of x-z planes, in reciprocal space, treated by the processor - * ngfft(13) is n3proc, the number of x-y planes, in real space, treated by the processor - * ngfft(14) is mpi_comm_fft, the handle on the MPI communicator in charge of the FFT parallelisation - * ngfft(15:18) are not yet used + * [[ngfft]](4:6) contains slightly different (larger) values, modified for efficiency of the FFT + * [[ngfft]](7) is [[fftalg]] + * [[ngfft]](8) is [[fftcache]] + * [[ngfft]](9) is set to 0 if the parallelization of the FFT is not activated, while it is set to 1 if it is activated. + * [[ngfft]](10) is the number of processors of the FFT group + * [[ngfft]](11) is the index of the processor in the group of processors + * [[ngfft]](12) is n2proc, the number of x-z planes, in reciprocal space, treated by the processor + * [[ngfft]](13) is n3proc, the number of x-y planes, in real space, treated by the processor + * [[ngfft]](14) is mpi_comm_fft, the handle on the MPI communicator in charge of the FFT parallelisation + * [[ngfft]](15:18) are not yet used The number of points stored by this processor in real space is n1*n2*n3proc, while in reciprocal space, it is n1*n2proc*n3. @@ -9574,8 +10101,8 @@ dimensions=[3], defaultval=[0, 0, 0], mnemonics="Number of Grid points for Fast Fourier Transform: Double Grid", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" This variable has the same meaning as ngfft (gives the size of fast Fourier transform (fft) grid in three dimensions) but concerns the "double grid" only used for PAW calculations. @@ -9591,19 +10118,19 @@ defaultval=[0, 0, 0], mnemonics="Number of Grid points for K PoinTs generation", characteristics=['[[INPUT_ONLY]]'], - excludes="specified([[kptrlatt]])", + excludes="[[kptrlatt]]", requires="[[kptopt]] >=0,", - text=""" -Used when [[kptopt]]>=0, if [[kptrlatt]] has not been defined ([[kptrlatt]] + text=r""" +Used when [[kptopt]] >= 0, if [[kptrlatt]] has not been defined ([[kptrlatt]] and [[ngkpt]] are exclusive of each other). Its three positive components give the number of k points of Monkhorst-Pack grids (defined with respect to primitive axis in reciprocal space) in each of the three dimensions. [[ngkpt]] will be used to generate the corresponding -[[kptrlatt]] input variable. The use of [[nshiftk]] and [[shiftk]], allows to +[[kptrlatt]] input variable. The use of [[nshiftk]] and [[shiftk]], allows one to generate shifted grids, or Monkhorst-Pack grids defined with respect to conventional unit cells. -When [[nshiftk]]=1, [[kptrlatt]] is initialized as a diagonal (3x3) matrix, +When [[nshiftk]] = 1, [[kptrlatt]] is initialized as a diagonal (3x3) matrix, whose diagonal elements are the three values [[ngkpt]](1:3). When [[nshiftk]] is greater than 1, ABINIT will try to generate [[kptrlatt]] on the basis of the primitive vectors of the k-lattice: the number of shifts might be reduced, @@ -9622,16 +10149,16 @@ topics=['q-points_basic'], dimensions=[3], defaultval=[0, 0, 0], - mnemonics="Number of Grid pointsfor Q PoinTs generation", + mnemonics="Number of Grid points for Q PoinTs generation", characteristics=['[[INPUT_ONLY]]'], - excludes="specified([[qptrlatt]])", - requires="[[nqpt]]==1 and [[kptopt]]>=0", - text=""" + excludes="[[qptrlatt]]", + requires="[[nqpt]] == 1 and [[kptopt]] >= 0", + text=r""" At variance with [[ngkpt]], note that only one q point is selected per dataset (see [[iqpt]]). Its three positive components give the number of q points of Monkhorst-Pack grids (defined with respect to primitive axis in reciprocal space) in each of -the three dimensions. The use of [[nshiftq]] and [[shiftq]], allows to +the three dimensions. The use of [[nshiftq]] and [[shiftq]], allows one to generate shifted grids, or Monkhorst-Pack grids defined with respect to conventional unit cells. @@ -9647,7 +10174,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of IMAGEs", - text=""" + text=r""" Give the number of images (or replicas) of the system, for which the forces and stresses might be computed independently, in the context of the string method, the genetic algorithm, hyperdynamics or Path-Integral Molecular @@ -9711,7 +10238,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of K-points defining the PATH", - text=""" + text=r""" This variable is used to define the number of high-symmetry k-points in the [[kptbounds]] array when [[kptopt]] > 0. Historically, [[kptbounds]] is used in conjuction with a negative value of [[kptopt]] when performing a NSCF band @@ -9733,9 +10260,9 @@ vartype="integer", topics=['k-points_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[kptopt]]==0': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[kptopt]] == 0': 1, 'defaultval': 0}), mnemonics="Number of K - Points", - text=""" + text=r""" If non-zero, [[nkpt]] gives the number of k points in the k point array [[kpt]]. These points are used either to sample the Brillouin zone, or to build a band structure along specified lines. @@ -9757,7 +10284,7 @@ number of k points to the minimal set needed for each particular perturbation. If [[kptopt]] is negative, [[nkpt]] will be the sum of the number of points on -the different lines of the band structure. For example, if [[kptopt]]=-3, one +the different lines of the band structure. For example, if [[kptopt]] = -3, one will have three segments; supposing [[ndivk]] is 10 12 17, the total number of k points of the circuit will be 10+12+17+1(for the final point)=40. """, @@ -9771,10 +10298,10 @@ dimensions="scalar", defaultval=0, mnemonics="Number of K-PoinTs for GW corrections", - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" [[nkptgw]] gives the number of k-points for which the GW calculation must be -done. It is used to dimension [[kptgw]] +done. It is used to dimension [[kptgw]]. """, ), @@ -9785,7 +10312,7 @@ topics=['Hybrids_expert'], dimensions="scalar", mnemonics="Number of K - Points for (Hartree) Fock exact exchange", - text=""" + text=r""" [[nkpthf]] gives the number of k points used to sample the full Brillouin zone for the Fock exact exchange contribution. It is obtained from the specification of the wavefunction k point grid (see [[kptopt]]), possibly @@ -9801,15 +10328,15 @@ dimensions="scalar", defaultval=4, mnemonics="Number of LINE minimisations", - text=""" + text=r""" Gives maximum number of line minimizations allowed in preconditioned conjugate -gradient minimization for each band. The Default, 4, is fine. +gradient minimization for each band. The default, 4, is fine. Special cases, with degeneracies or near-degeneracies of levels at the Fermi -energy may require a larger value of [[nline]] (5 or 6 ?) Line minimizations +energy may require a larger value of [[nline]] (5 or 6 ?). Line minimizations will be stopped anyway when improvement gets small (governed by [[tolrde]]). With the input variable [[nnsclo]], governs the convergence of the wavefunctions for fixed potential. -Note that [[nline]]=0 can be used to diagonalize the Hamiltonian matrix in the +Note that [[nline]] = 0 can be used to diagonalize the Hamiltonian matrix in the subspace spanned by the input wavefunctions. """, ), @@ -9825,18 +10352,18 @@ characteristics=['[[DEVELOP]]'], text=r""" Allows to choose the algorithm for non-local operator application. On super- -scalar architectures, the default [[nloc_alg]]=4 is the best. +scalar architectures, the default [[nloc_alg]] = 4 is the best. More detailed explanations: -- [[nloc_alg]]=2: Should be efficient on vector machines. It is indeed the +- [[nloc_alg]] = 2: Should be efficient on vector machines. It is indeed the fastest algorithm for the NEC, but actual tests on Fujitsu machine did not gave better performances than the other options. -- [[nloc_alg]]=3: same as [[nloc_alg]]==2, but the loop order is inverted. -- [[nloc_alg]]=4: same as [[nloc_alg]]==3, but maximal use of registers has +- [[nloc_alg]] = 3: same as [[nloc_alg]] == 2, but the loop order is inverted. +- [[nloc_alg]] = 4: same as [[nloc_alg]] == 3, but maximal use of registers has been coded. This should be especially efficient on scalar and super-scalar machines. This has been confirmed by tests. -Note: internally, [[nloc_alg]] is stored in _nloalg(1)_. See also +Note: internally, [[nloc_alg]] is stored in `dtset%nloalg(1)`. See also [[nloc_mem]] for the tuning of the memory used in the non-local operator application. """, ), @@ -9847,24 +10374,24 @@ vartype="integer", topics=['TuningSpeed_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[usepaw]]==1': 2, 'defaultval': 1}), + defaultval=ValueWithConditions({'[[usepaw]] == 1': 2, 'defaultval': 1}), mnemonics="Non LOCal MEMOry", characteristics=['[[DEVELOP]]'], text=r""" Controls the memory use for the application of the non-local operator. More detailed explanations: -- [[nloc_mem]]==1: (k+G) vectors are not precomputed, in order to save memory space. -- [[nloc_mem]]==2: (k+G) vectors are precomputed, once per k-point. -- [[nloc_mem]]==-1 or -2: Negative values of [[nloc_mem]] correspond +- [[nloc_mem]] == 1: (k+G) vectors are not precomputed, in order to save memory space. +- [[nloc_mem]] == 2: (k+G) vectors are precomputed, once per k-point. +- [[nloc_mem]] == -1 or -2: Negative values of [[nloc_mem]] correspond positive ones, where the phase precomputation has been suppressed, in order to - save memory space, as an array _double precision: ph3d(2,npw,[[natom]])_ is + save memory space, as an array `double precision: ph3d(2,npw,[[natom]])` is saved (typically half the space needed for the wavefunctions at 1 k point - this corresponds to the silicon case). However, the computation of phases inside nonlop is somehow time-consuming. -Note: internally, sign([[nloc_mem]]) is stored in _nloalg(2)_ and -abs([[nloc_mem]])-1 is stored in _nloalg(3)_. See also [[nloc_alg]] for the +Note: internally, sign([[nloc_mem]]) is stored in `dtset%nloalg(2)` and +abs([[nloc_mem]])-1 is stored in `dtset%nloalg(3)`. See also [[nloc_alg]] for the algorithm for the non-local operator application. """, ), @@ -9877,11 +10404,10 @@ dimensions="scalar", defaultval=0, mnemonics="Number of NOSe masses", - text=""" -Gives the number of thermostats in the Martyna et al. chain of oscillators -thermostats. The thermostat chains can be used either to perform Molecular -Dynamics (MD) ([[ionmov]]=13) or to perform Path Integral Molecular Dynamics -(PIMD) ([[imgmov]]=13). + text=r""" +Gives the number of thermostats in the chain of oscillators +thermostats as proposed in [[cite:Martyna1996]]. The thermostat chains can be used either to perform Molecular Dynamics (MD) ([[ionmov]] = 13) or to perform Path Integral Molecular Dynamics +(PIMD) ([[imgmov]] = 13). The mass of these thermostats is given by [[qmass]]. """, ), @@ -9895,17 +10421,24 @@ defaultval=0, mnemonics="Number of Non-Self Consistent LOops", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the maximum number of non-self-consistent loops of [[nline]] line minimisations, in the SCF case (when [[iscf]] >0). In the case [[iscf]] <=0, the number of non-self-consistent loops is determined by [[nstep]]. -The Default value of 0 -- for standard plane-wave calculations -- corresponds -to make the two first fixed potential determinations of wavefunctions have 2 -non-self consistent loops, and the next ones to have only 1 non-self -consistent loop. -The Default value of 0 -- for wavelets calculations ([[usewvl]]=1) -- -corresponds to make 2 steps with 3 non-self consistent loops, 2 steps with 2 -non-self consistent loops, then the next ones with 1 non-self consistent loop. + + * The Default value of 0 -- for standard plane-wave calculations -- corresponds + to make the two first fixed potential determinations of wavefunctions have 2 + non-self consistent loops, and the next ones to have only 1 non-self + consistent loop. + + * The Default value of 0 -- for wavelets calculations ([[usewvl]] = 1) -- + corresponds to make 2 steps with 3 non-self consistent loops, 2 steps with 2 + non-self consistent loops, then the next ones with 1 non-self consistent loop. + + * A negative value corresponds to make the abs([[nnsclo]]) first fixed potential determinations + of wavefunctions have 5 non-self consistent loops, and the next ones to have only 1 non-self + consistent loop. + """, ), @@ -9915,15 +10448,14 @@ vartype="integer", topics=['Hybrids_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[usefock]]==1': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[usefock]] == 1': 1, 'defaultval': 0}), mnemonics="Number of Non-Self Consistent LOops for (Hartree)-Fock exact exchange", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the maximum number of loops with non-self-consistent occupied states used to calculate Fock exact exchange, in the SCF case. The Default value is 0 when [[usefock]] = 0. Default value is 1 when -[[usefock]] = 1 and correspond to update occupied wavefunctions at each self- -consistent loop. +[[usefock]] = 1 and correspond to update occupied wavefunctions at each self-consistent loop. """, ), @@ -9936,7 +10468,7 @@ defaultval=0, mnemonics="Number of OBJects", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the number of 'objects' to be used by the atom manipulator in order to find the full set of atoms. At present, only one or two objects can be defined, identified as objects 'a' and 'b'. @@ -9945,7 +10477,7 @@ [[objbn]], [[objbat]], [[objbrf]], [[objbtr]], [[objbro]], [[objbax]]. More detailed explanation: when the atom manipulator is used (i.e. when -[[nobj]]==1 or [[nobj]]==2), the code will be given a primitive set of atoms, +[[nobj]] == 1 or [[nobj]] == 2), the code will be given a primitive set of atoms, from which it will have to deduce the full set of atoms. An object will be specified by the number of atoms it includes ([[objan]] or [[objbn]] ), and the list of these atoms ([[objaat]] or [[objbat]] ). @@ -9976,15 +10508,14 @@ defaultval=0, mnemonics="Number of OMEGA to evaluate the Spectral Function", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==3 and [[spmeth]]!=0", + requires="[[optdriver]] == 3 and [[spmeth]]!=0", text=r""" [[nomegasf]] defines the number of real frequencies used to describe the spectral function associated to the irreducible polarizability $\chi^{(0)}_{KS}$. The frequency mesh will cover the interval between 0 and the maximum (positive) transition energy between occupied and empty states. The delta function entering the expression defining the spectral function is -approximated using two different methods according to the value of the -[[spmeth]] input variable. +approximated using two different methods according to the value of the [[spmeth]] input variable. It is important to notice that an accurate description of the imaginary part of $\chi^{(0)}_{KS}$ requires an extremely dense frequency mesh. It should be @@ -10000,11 +10531,11 @@ dimensions="scalar", defaultval=12, mnemonics="Number of OMEGA(S) along the Imaginary axis", - requires="[[optdriver]]==4 and [[gwcalctyp]]==1", - text=""" + requires="[[optdriver]] == 4 and [[gwcalctyp]] == 1", + text=r""" [[nomegasi]] defines the number of frequency points used to sample the self- energy along the imaginary axis. The frequency mesh is linear and covers the -interval between OMEGASIMIN=0.01 Hartree and [[omegasimax]]. +interval between `omegasimin`=0.01 Hartree and [[omegasimax]]. """, ), @@ -10016,14 +10547,42 @@ dimensions="scalar", defaultval=9, mnemonics="Number of OMEGA to evaluate the Sigma Real axis Derivative", - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" The number of real frequencies around the KS energy where the self-energy -Sigma is evaluated. From these values, the derivative of Sigma at the KS +$\Sigma$ is evaluated. From these values, the derivative of $\Sigma$ at the KS energy is numerically estimated through linear interpolation. """, ), +Variable( + abivarname="nonlinear_info", + varset="dfpt", + vartype="integer", + topics=['nonlinear_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="Output NON-LINEAR INFOrmation", + requires="[[optdriver]] == 5 and [[usepead]] == 0, or [[rf2_dkdk]]/=0 or [[rf2_dkde]]/=0", + text=r""" +Control the output of the non-linear implementation (only when [[usepead]] == 0). +The default value, [[nonlinear_info]] == 0 does nothing. If [[nonlinear_info]] == 1, +different contributions of 3rd derivatives of the energy are written in the +output file (non time consuming). + +Higher values activate some internal tests for +checking the implementation correctness (time consuming, not useable in parallel). +If [[nonlinear_info]] == 2, same effect than 1 and tests are done in non-linear +([[optdriver]]==5 and [[usepead]] == 0). +If [[nonlinear_info]] == 3, same effect than 1 and tests are done in rf2_init +([[rf2_dkdk]]/=0 or [[rf2_dkde]]/=0). +If [[nonlinear_info]] == 4, same effect than 1 and tests are done in both non-linear and rf2_init. +A line containining "NOT PASSED" (and other information) is added to the output file +for each test that does not pass, otherwise nothing is printed. However, more information concerning +the tests is always printed in the **standard** output file. +""", +), + Variable( abivarname="normpawu", varset="dev", @@ -10033,12 +10592,12 @@ defaultval=0, mnemonics="NORMalize atomic PAW+U projector", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Defines whether the atomic wave function (used as projectors in PAW+U) should be renormalized to 1 within PAW sphere. - * [[normpawu]]=0: leave projector - * [[normpawu]]=1: renormalize + * [[normpawu]] = 0: leave projector + * [[normpawu]] = 1: renormalize """, ), @@ -10050,9 +10609,9 @@ dimensions="scalar", defaultval=100000, mnemonics="NOSE thermostat INERTia factor", - requires="[[ionmov]]==8", - text=""" -Give the inertia factor WT of the Nose-Hoover thermostat (when [[ionmov]]=8), + requires="[[ionmov]] == 8", + text=r""" +Give the inertia factor WT of the Nose-Hoover thermostat (when [[ionmov]] = 8), in atomic units of weight*length2, that is (electron mass)*(Bohr)2. The equations of motion are: MI d2RI/dt2= FI - dX/dt MI dRI/dt and WT d2X/dt2= Sum(I) MI (dRI/dt)2 - 3NkBT where I represent each nucleus, MI is the mass of @@ -10071,8 +10630,8 @@ defaultval=1000000, mnemonics="Number of mpi Processors used for ScaLapacK calls", characteristics=['[[DEVELOP]]'], - requires="[[optdriver]]==1 and [[paral_kgb]]==1 (Ground-state calculations with LOBPCG algorithm)", - text=""" + requires="[[optdriver]] == 1 and [[paral_kgb]] == 1 (Ground-state calculations with LOBPCG algorithm)", + text=r""" When using Scalapack (or any similar Matrix Algebra library), the efficiency of the eigenproblem resolution saturates as the number of CPU cores increases. It is better to use a smaller number of CPU cores for the LINALG calls. @@ -10080,9 +10639,16 @@ A large number for [[np_slk]] (i.e. 1000000) means that all cores are used for the Linear Algebra calls. np_slk must divide the number of processors involved in diagonalizations -([[npband]]*[[npfft]]*[[npspinor]]). -Note: an optimal value for this parameter can be automatically found by using +([[npband]] $\\times$ [[npfft]] $\\times$ [[npspinor]]). +Note (bef v8.8): an optimal value for this parameter can be automatically found by using the [[autoparal]] input keyword. +Note (since v8.8 and only for LOBPCG ([[wfoptalg]] == 114) with [[paral_kgb]] = 1): +* If set to ***0*** then scalapack is disabled. +* If set to its ***default value***, then abinit uses between 2 and [[npband]]*[[npfft]]*[[npspinor]] cpus according to the system size (default auto behaviour). + See [[slk_rankpp]] for more customization. +* If set to a number ***>1** then forces abinit to use exactly this number of cpus. + Due to legacy behaviour, although it is not mandatory in theory, this value *must* divide [[npband]]*[[npfft]]*[[npspinor]]. +See also [[slk_rankpp]] for a better tuning instead of this variable. """, ), @@ -10094,10 +10660,9 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the BAND level", - requires="[[paral_kgb]]==1", - text=""" -Relevant only for the band/FFT parallelisation (see the [[paral_kgb]] input -variable). + requires="[[paral_kgb]] == 1", + text=r""" +Relevant only for the band/FFT parallelisation (see the [[paral_kgb]] input variable). [[npband]] gives the number of processors among which the work load over the band level is shared. [[npband]], [[npfft]], [[npkpt]] and [[npspinor]] are combined to give the total number of processors (nproc) working on the @@ -10118,8 +10683,8 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the FFT level", - requires="[[paral_kgb]]==1", - text=""" + requires="[[paral_kgb]] == 1", + text=r""" Relevant only for the band/FFT/k-point parallelisation (see the [[paral_kgb]] input variable). [[npfft]] gives the number of processors among which the work load over the @@ -10145,7 +10710,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors for (Hartree)-Fock exact exchange", - text=""" + text=r""" Relevant only for the k-point/fock parallelisation (option [[paral_kgb]] input variable). [[nphf]] gives the number of processors among which the work load over the @@ -10153,7 +10718,7 @@ the total number of processors (nproc) working on the parallelisation. Note: [[nphf]] should be a divisor or equal to the number of k-point times -the number of bands for exact exchange ([[nkpthf]]*[[nbandhf]]) in order to +the number of bands for exact exchange ([[nkpthf]] $\\times$ [[nbandhf]]) in order to have the better load-balancing and efficiency. """, ), @@ -10166,7 +10731,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the IMAGE level", - text=""" + text=r""" Relevant only when sets of images are activated (see [[imgmov]] and [[nimage]] ). [[npimage]] gives the number of processors among which the work load over the @@ -10175,8 +10740,8 @@ Note: an optimal value for this parameter can be automatically found by using the [[autoparal]] input keyword. -_See [[paral_kgb]], [[npkpt]], [[npband]], [[npfft]] and [[npspinor]] for the -additional information on the use of k-point/band/FFT parallelisation._ +See [[paral_kgb]], [[npkpt]], [[npband]], [[npfft]] and [[npspinor]] for the +additional information on the use of k-point/band/FFT parallelisation. """, ), @@ -10188,8 +10753,8 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the K-Point Level", - requires="[[paral_kgb]]==1", - text=""" + requires="[[paral_kgb]] == 1", + text=r""" Relevant only for the band/FFT/k-point parallelisation (see the [[paral_kgb]] input variable). [[npkpt]] gives the number of processors among which the work load over the @@ -10200,7 +10765,7 @@ information on the use of band/FFT/k-point parallelisation. [[npkpt]] should be a divisor or equal to with the number of k-point/spin- -components ([[nkpt]]*[[nsppol]]) in order to have the better load-balancing +components ([[nkpt]] $\\times$ [[nsppol]]) in order to have the better load-balancing and efficiency. Note: an optimal value for this parameter can be automatically found by using the [[autoparal]] input keyword. @@ -10215,10 +10780,10 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the PERTurbation level", - requires="[[paral_rf]]==1", - text=""" + requires="[[paral_rf]] == 1", + text=r""" This parameter is used in connection to the parallelization over -perturbations(see [[paral_rf]] ), for a linear response calculation. +perturbations (see [[paral_rf]] ), for a linear response calculation. [[nppert]] gives the number of processors among which the work load over the perturbation level is shared. It can even be specified separately for each dataset. @@ -10234,7 +10799,7 @@ defaultval="[[ntypat]]", mnemonics="Number of PSeudoPotentials", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Usually, the number of pseudopotentials to be read is equal to the number of type of atoms. However, in the case an alchemical mixing of pseudopotential is to be used, often the number of pseudopotentials to be read will not equal the @@ -10242,9 +10807,9 @@ Alchemical pseudopotentials will be present when [[ntypalch]] is non-zero. See [[ntypalch]] to understand how to use alchemical potentials in ABINIT. The -input variables ([[ntypalch]], [[algalch]],[[mixalch]]) are active, and +input variables ([[ntypalch]], [[algalch]], [[mixalch]]) are active, and generate alchemical potentials from the available pseudopotentials. Also, the -inner variables ([[ntyppure]],[[npspalch]]) become active. See these input +inner variables ([[ntyppure]], [[npspalch]]) become active. See these input variables, especially [[mixalch]], to understand how to use alchemical potentials in ABINIT. """, @@ -10260,11 +10825,10 @@ mnemonics='Number of PSeudoPotentials that are "ALCHemical"', characteristics=['[[INTERNAL_ONLY]]'], requires="[[ntypalch]]/=0", - text=""" -Gives the number of pseudopotentials that are used for alchemical mixing (when -[[ntypalch]] is non-zero): + text=r""" +Gives the number of pseudopotentials that are used for alchemical mixing (when [[ntypalch]] is non-zero): -[[npspalch]]=[[npsp]]-[[ntyppure]] +[[npspalch]] = [[npsp]]-[[ntyppure]] """, ), @@ -10276,9 +10840,9 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Processors at the SPINOR level", - requires="[[paral_kgb]]==1", - text=""" -Can be 1 or 2 (if [[nspinor]]=2). + requires="[[paral_kgb]] == 1", + text=r""" +Can be 1 or 2 (if [[nspinor]] = 2). Relevant only for the band/FFT/k-point parallelisation (see the [[paral_kgb]] input variable). [[npspinor]] gives the number of processors among which the work load over the @@ -10288,8 +10852,8 @@ Note: an optimal value for this parameter can be automatically found by using the [[autoparal]] input keyword. -_See [[npkpt]], [[npband]], [[npfft]], and [[paral_kgb]] for the additional -information on the use of band/FFT/k-point parallelisation._ +See [[npkpt]], [[npband]], [[npfft]], and [[paral_kgb]] for the additional +information on the use of band/FFT/k-point parallelisation. """, ), @@ -10303,7 +10867,7 @@ mnemonics="Number of PULAY ITerations for SC mixing", characteristics=['[[DEVELOP]]'], requires="[[iscf]] in [7,17]", - text=""" + text=r""" Gives the number of previous iterations involved in Pulay mixing (mixing during electronic SC iterations). """, @@ -10317,13 +10881,13 @@ dimensions="scalar", defaultval=0, mnemonics="Number of Particle VELocities", - requires="[[optdriver]]==3", - text=""" + requires="[[optdriver]] == 3", + text=r""" In the context of the electronic stopping power of impinging ion in matter, [[npvel]] sets the number of the ion velocities to be calculated via linear response. -When [[npvel]]=0, no stopping power calculation is performed. +When [[npvel]] = 0, no stopping power calculation is performed. The direction and the velocity maximum are set with the input variable -[[pvelmax]]. Note that the results are output for a Z=1 impinging ion, i.e. a proton. +[[pvelmax]]. Note that the results are output for a $Z=1$ impinging ion, i.e. a proton. """, ), @@ -10351,22 +10915,22 @@ dimensions="scalar", defaultval=0, mnemonics="Number of PlaneWaves in the KSS file", - text=""" + text=r""" This input variable is used for the preparation of a GW calculation: the GS -run (where [[optdriver]]=1 and **nbandkss** /=0) should be followed with a run -where [[optdriver]]=3. Also, if [[nbandkss]]=0, no use of [[npwkss]]. +run (where [[optdriver]] = 1 and [[nbandkss]]/=0) should be followed with a run +where [[optdriver]] = 3. Also, if [[nbandkss]] = 0, no use of [[npwkss]]. [[npwkss]] defines the number of planewave components of the Kohn-Sham states to build the Hamiltonian, in the routine outkss.F90, and so, the size of the matrix, the size of eigenvectors, and the number of available states, to be stored in the abo_KSS file. If it is set to 0, then, the planewave basis set defined by the usual Ground State input variable [[ecut]] is used to generate -the superset of all planewaves used for all k-points. Note that this (large) -planewave basis is the same for all k-points. +the superset of all planewaves used for all k points. Note that this (large) +planewave basis is the same for all k points. !!! warning - For the time being, [[istwfk]] must be 1 for all the k-points. + For the time being, [[istwfk]] must be 1 for all the k points. """, ), @@ -10378,10 +10942,10 @@ dimensions="scalar", mnemonics="Number of PlaneWaves for SIGma eXchange", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" [[npwsigx]] determines the cut-off energy of the planewave set used to generate the exchange part of the self-energy operator. -It is an internal variable, determed from [[ecutsigx]]. +It is an internal variable, determined from [[ecutsigx]]. """, ), @@ -10408,9 +10972,10 @@ dimensions="scalar", defaultval=0, mnemonics="Number of Q - POINTs", - text=""" + text=r""" Determines whether one q point must be read (See the variable [[qptn]]). Can be either 0 or 1. + If 1 and used in ground-state calculation, a global shift of all the k-points is applied, to give calculation at k+q. In this case, the output wavefunction will be appended by _WFQ instead of _WFK @@ -10428,9 +10993,9 @@ dimensions="scalar", defaultval=0, mnemonics="Number of Q-PoinTs for the Dielectric Matrix", - requires="[[optdriver]]==3", - text=""" -If [[nqptdm]] is equal to 0, the set of q-points for computing the dielectric + requires="[[optdriver]] == 3", + text=r""" +If [[nqptdm]] is equal to 0, the set of q points for computing the dielectric matrix is determined automatically considering all the possible differences between the k-points contained in the _KSS file. When [[nqptdm]] is non-zero, the list of q points is read from [[qptdm]]. This allows one to split the big @@ -10449,9 +11014,9 @@ dimensions="scalar", defaultval=16, mnemonics="Nth - SCaling Function ORDER", - text=""" + text=r""" This variable controls the order of used scaling functions when the Hartree -potential is computed using the Poisson solver (see [[icoulomb]] imput +potential is computed using the Poisson solver (see [[icoulomb]] input variable). This variable is of seldom use since the default value is large enough. Nonetheless, possible values are 8, 14, 16, 20, 24, 30, 40, 50, 60, 100. Values greater than 20 are included in ABINIT for test purposes only. @@ -10466,7 +11031,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of SHIFTs for K point grids", - text=""" + text=r""" This parameter gives the number of shifted grids to be used concurrently to generate the full grid of k points. It can be used with primitive grids defined either from [[ngkpt]] or [[kptrlatt]]. The maximum allowed value of @@ -10483,7 +11048,7 @@ defaultval=1, mnemonics="Number of SHIFTs for Q point grids", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" This parameter gives the number of shifted grids to be used concurrently to generate the full grid of q points. It can be used with primitive grids defined either from [[ngqpt]] or [[qptrlatt]]. The maximum allowed value of @@ -10499,26 +11064,27 @@ dimensions="scalar", defaultval="[[nsppol]]", mnemonics="Number of SPin-DENsity components", - text=""" -If [[nspden]]=1, no spin-magnetization the density matrix is diagonal, with -same values spin-up and spin-down (compatible with [[nsppol]]=1 only, for both -[[nspinor]]=1 or 2) + text=r""" +If [[nspden]] = 1, no spin-magnetization the density matrix is diagonal, with +same values spin-up and spin-down (compatible with [[nsppol]] = 1 only, for both +[[nspinor]] = 1 or 2) -If [[nspden]]=2, scalar magnetization (the axis is arbitrarily fixed in the z +If [[nspden]] = 2, scalar magnetization (the axis is arbitrarily fixed in the z direction) the density matrix is diagonal, with different values for spin-up -and spin-down (compatible with [[nspinor]]=1, either with [[nsppol]]=2 --general collinear magnetization- or [[nsppol]]=1 -antiferromagnetism) +and spin-down (compatible with [[nspinor]] = 1, either with [[nsppol]] = 2 +-general collinear magnetization- or [[nsppol]] = 1 -antiferromagnetism) -If [[nspden]]=4, vector magnetization: the density matrix is full, with -allowed x, y and z magnetization (useful only with [[nspinor]]=2 and -[[nsppol]]=1, either because there is spin-orbit without time-reversal +If [[nspden]] = 4, vector magnetization: the density matrix is full, with +allowed x, y and z magnetization (useful only with [[nspinor]] = 2 and +[[nsppol]] = 1, either because there is spin-orbit without time-reversal symmetry - and thus spontaneous magnetization, or with spin-orbit, if one -allows for spontaneous non-collinear magnetism). Not yet available for -response functions. Also note that, with [[nspden]]=4, time-reversal symmetry +allows for spontaneous non-collinear magnetism). Available for +response functions [[cite:Ricci2019]]. Also note that, with [[nspden]] = 4, time-reversal symmetry is not taken into account (at present; this has to be checked) and thus [[kptopt]] has to be different from 1 or 2. -The default ([[nspden]]=[[nsppol]]) does not suit the case of vector magnetization. +The default ([[nspden]] = [[nsppol]]) does not suit the case of vector magnetization. +Note that the choice of [[nspden]] has an influence on the treatment of symmetries. See [[symafm]]. """, ), @@ -10528,14 +11094,14 @@ vartype="integer", topics=['spinpolarisation_basic'], dimensions="scalar", - defaultval=ValueWithConditions({'[[pawspnorb]]==1': 2, 'defaultval': 1}), + defaultval=ValueWithConditions({'[[pawspnorb]] == 1': 2, 'defaultval': 1}), mnemonics="Number of SPINORial components of the wavefunctions", - text=""" -If [[nspinor]]=1, usual case: scalar wavefunction (compatible with -([[nsppol]]=1, [[nspden]]=1) as well as ([[nsppol]]=2, [[nspden]]=2) ) + text=r""" +If [[nspinor]] = 1, usual case: scalar wavefunction (compatible with +([[nsppol]] = 1, [[nspden]] = 1) as well as ([[nsppol]] = 2, [[nspden]] = 2) ) -If [[nspinor]]=2, the wavefunction is a spinor (compatible with [[nsppol]]=1, -with [[nspden]]=1 or 4, but not with [[nsppol]]=2) +If [[nspinor]] = 2, the wavefunction is a spinor (compatible with [[nsppol]] = 1, +with [[nspden]] = 1 or 4, but not with [[nsppol]] = 2) When [[nspinor]] is 2, the values of [[istwfk]] are automatically set to 1. Also, the number of bands, for each k-point, should be even. @@ -10550,26 +11116,26 @@ dimensions="scalar", defaultval=1, mnemonics="Number of SPin POLarization", - text=""" + text=r""" Give the number of INDEPENDENT spin polarisations, for which there are non- related wavefunctions. Can take the values 1 or 2. -If [[nsppol]]=1, one has an unpolarized calculation ([[nspinor]]=1, -[[nspden]]=1) or an antiferromagnetic system ([[nspinor]]=1, [[nspden]]=2), or +If [[nsppol]] = 1, one has an unpolarized calculation ([[nspinor]] = 1, +[[nspden]] = 1) or an antiferromagnetic system ([[nspinor]] = 1, [[nspden]] = 2), or a calculation in which spin up and spin down cannot be disentangled -([[nspinor]]=2), that is, either non-collinear magnetism or presence of spin- +([[nspinor]] = 2), that is, either non-collinear magnetism or presence of spin- orbit coupling, for which one needs spinor wavefunctions. -If [[nsppol]]=2, one has a spin-polarized (collinear) calculation with +If [[nsppol]] = 2, one has a spin-polarized (collinear) calculation with separate and different wavefunctions for up and down spin electrons for each -band and k point. Compatible only with [[nspinor]]=1, [[nspden]]=2. If -[[nsppol]]=2, one usually uses a metallic value for [[occopt]], in order to -let ABINIT find the magnetization. On the contrary, if [[occopt]]==1 is used, +band and k point. Compatible only with [[nspinor]] == 1, [[nspden]] == 2. If +[[nsppol]] = 2, one usually uses a metallic value for [[occopt]], in order to +let ABINIT find the magnetization. On the contrary, if [[occopt]] == 1 is used, the user has to impose the magnetization, using [[spinmagntarget]], except for the case of a single isolated Hydrogen atom. -In the present status of development, with [[nsppol]]=1, all values of [[ixc]] -are allowed, while with [[nsppol]]=2, some values of [[ixc]] might not be +In the present status of development, with [[nsppol]] = 1, all values of [[ixc]] +are allowed, while with [[nsppol]] = 2, some values of [[ixc]] might not be allowed (e.g. 2, 3, 4, 5, 6, 20, 21, 22 are not allowed). See also the input variable [[nspden]] for the components of the density @@ -10585,11 +11151,11 @@ dimensions="scalar", defaultval=30, mnemonics="Number of (non-)self-consistent field STEPS", - text=""" + text=r""" Gives the maximum number of cycles (or "iterations") in a SCF or non-SCF run. Full convergence from random numbers is usually achieved in 12-20 SCF iterations. Each can take from minutes to hours. In certain difficult cases, -usually related to a small or zero bandgap or magnetism, convergence +usually related to a small or zero band gap or magnetism, convergence performance may be much worse. When the convergence tolerance [[tolwfr]] on the wavefunctions is satisfied, iterations will stop, so for well converged calculations you should set [[nstep]] to a value larger than you think will be @@ -10598,17 +11164,16 @@ For non-self-consistent runs ( [[iscf]] < 0) nstep governs the number of cycles of convergence for the wavefunctions for a fixed density and Hamiltonian. -NOTE that a choice of [[nstep]]=0 is permitted; this will either read -wavefunctions from disk (with [[irdwfk]]=1 or [[irdwfq]]=1, or non-zero +NOTE that a choice of [[nstep]] = 0 is permitted; this will either read +wavefunctions from disk (with [[irdwfk]] = 1 or [[irdwfq]] = 1, or non-zero [[getwfk]] or [[getwfq]] in the case of multi-dataset) and compute the density, the total energy and stop, or else (with all of the above vanishing) will initialize randomly the wavefunctions and compute the resulting density and total energy. This is provided for testing purposes. -Also NOTE that [[nstep]]=0 with [[irdwfk]]=1 will exactly give the same result -as the previous run only if the latter is done with [[iscf]]<10 (potential -mixing). +Also NOTE that [[nstep]] = 0 with [[irdwfk]] = 1 will exactly give the same result +as the previous run only if the latter is done with [[iscf]]<10 (potential mixing). One can output the density by using [[prtden]]. -The forces and stress tensor are computed with [[nstep]]=0. +The forces and stress tensor are computed with [[nstep]] = 0. """, ), @@ -10620,7 +11185,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of SYMmetry operations", - text=""" + text=r""" Gives number of space group symmetries to be applied in this problem. Symmetries will be input in array "[[symrel]]" and (nonsymmorphic) translations vectors will be input in array "[[tnons]]". If there is no @@ -10634,7 +11199,7 @@ from those already computed. **Symmetry finder mode** (Default mode). -If [[nsym]] is 0, all the atomic coordinates must be explicitely given (one +If [[nsym]] is 0, all the atomic coordinates must be explicitly given (one cannot use the atom manipulator neither the smart symmetrizer): the code will then find automatically the symmetry operations that leave the lattice and each atomic sublattice invariant. It also checks whether the cell is primitive @@ -10669,13 +11234,13 @@ dimensions="scalar", defaultval=0, mnemonics="Number of TIME steps", - text=""" + text=r""" Gives the number of molecular dynamics time steps or Broyden structural optimization steps to be done if [[ionmov]] is non-zero. -Note that at the present the option [[ionmov]]=1 is initialized with four +Note that at the present the option [[ionmov]] = 1 is initialized with four Runge-Kutta steps which costs some overhead in the startup. By contrast, the initialisation of other [[ionmov]] values is only one SCF call. -[[ntime]] is ignored if [[ionmov]]=0. +[[ntime]] is ignored if [[ionmov]] = 0. """, ), @@ -10687,14 +11252,13 @@ dimensions="scalar", defaultval=1, mnemonics="Number of TIME steps for IMAGE propagation", - text=""" + text=r""" Gives the maximal number of molecular dynamics time steps or structural optimization steps to be done for the set of images, referred to as 'image- timesteps'. At each image-timestep, all the images are propagated simultaneously, each according to the algorithm determined by [[imgmov]] and the usual accompanying input variables, and then the next positions and -velocities for each image are determined from the set of results obtained for -all images. +velocities for each image are determined from the set of results obtained for all images. """, ), @@ -10706,17 +11270,17 @@ dimensions="scalar", defaultval=0, mnemonics='Number of TYPe of atoms that are "ALCHemical"', - text=""" + text=r""" Used for the generation of alchemical pseudopotentials: when [[ntypalch]] is non-zero, alchemical mixing will be used. Among the [[ntypat]] types of atoms, the last [[ntypalch]] will be -"alchemical" pseudoatoms, while only the first **ntyppure** will be uniquely -associated with a pseudopotential (the **ntyppure** first of these, actually). +"alchemical" pseudoatoms, while only the first [[ntyppure]] will be uniquely +associated with a pseudopotential (the [[ntyppure]] first of these, actually). The [[ntypalch]] types of alchemical pseudoatoms are to be made from the remaining [[npspalch]] pseudopotentials. -In this case, the input variables [[algalch]],[[mixalch]] are active, and +In this case, the input variables [[algalch]], [[mixalch]] are active, and generate alchemical potentials from the available pseudopotentials. See these input variables, especially [[mixalch]], to understand how to use alchemical potentials in ABINIT. @@ -10732,7 +11296,7 @@ defaultval=1, mnemonics="Number of TYPes of AToms", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Gives the number of types of atoms. E.g. for a homopolar system (e.g. pure Si) [[ntypat]] is 1. @@ -10740,8 +11304,7 @@ pseudopotential is assigned type number 1, and so on... There is an exception in the case of alchemical mixing of potentials, for -which there is a different number of pseudopotentials atomic types. See -[[mixalch]]. +which there is a different number of pseudopotentials atomic types. See [[mixalch]]. """, ), @@ -10752,9 +11315,9 @@ topics=['AtomTypes_internal'], dimensions="scalar", defaultval="[[ntypat]]-[[ntypalch]]", - mnemonics='Number of TYPe of atoms that are "PURe"', + mnemonics='Number of TYPe of atoms that are "PURE"', characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" Gives the number of type of atoms that are "pure" when alchemical mixing is used ([[ntypalch]] /= 0): @@ -10771,11 +11334,15 @@ defaultval=0.0, mnemonics="NUClear DIPole MOMents", requires="[[usepaw]] = 1; [[pawcpxocc]] = 2; [[kptopt]] > 2", - text=""" -Places an array of nuclear magnetic dipole moments on the atomic positions, -useful for computing the magnetization in the presence of nuclear dipoles and -thus the chemical shielding by the converse method. The presence of these -dipoles breaks time reversal symmetry and lowers the overall spatial symmetry. + text=r""" +Places an array of nuclear magnetic dipole moments on the atomic +positions, useful for computing the magnetization in the presence of +nuclear dipoles and thus the chemical shielding by the converse method +[[cite:Thonhauser2009]]. The presence of these dipoles breaks time +reversal symmetry and lowers the overall spatial symmetry. The dipole +moment values are entered in atomic units. For reference, note that +one Bohr magneton has value $1/2$ in atomic units, while one nuclear +Bohr magneton has value $2.7321\times 10^{-4}$ in atomic units. """, ), @@ -10787,12 +11354,12 @@ dimensions="scalar", defaultval=0, mnemonics="Number of WaveFunctionS HISTory", - text=""" + text=r""" In the wavelet basis set, the ground state is found by direct minimisation. -The algorithm used can be either the steepest descent or the DIIS (Direct -Inversion of Iteration Space). When [[nwfshist]] = 0, the steepest descent is -used ( _i.e._ there is no history storage of the previous iterations). If -[[nwfshist]] is strictly positive, a DIIS is used. A typical value is 6. Using +The algorithm used can be either the steepest descent or the DIIS (Direct Inversion of Iteration Space). +When [[nwfshist]] = 0, the steepest descent is used ( _i.e._ there is no history storage of the previous iterations). + +If [[nwfshist]] is strictly positive, a DIIS is used. A typical value is 6. Using a DIIS increases the memory required by the program since N previous wavefunctions are stored during the electronic minimisation. """, @@ -10805,7 +11372,7 @@ topics=['Artificial_expert'], dimensions="scalar", mnemonics="Number of Z reduced coordinates that define the spatial CHEMical POTential", - text=""" + text=r""" Defines the number of z reduced coordinates that defines the spatially varying chemical potential. See the input variable [[chempot]], of which [[nzchempot]] is the second dimension. @@ -10820,8 +11387,8 @@ dimensions=['[[objan]]'], mnemonics="OBJect A: list of AToms", characteristics=['[[INPUT_ONLY]]'], - requires="'[[nobj]]==1'", - text=""" + requires="'[[nobj]] == 1'", + text=r""" Gives the list of atoms in object a. This list is specified by giving, for each atom, its index in the list of coordinates ([[xred]], [[xangst]] or [[xcart]]), that also corresponds to a type of atom (given by the array type). @@ -10839,9 +11406,9 @@ dimensions=[6], mnemonics="OBJect A: AXis", characteristics=['[[INPUT_ONLY]]', '[[LENGTH]]'], - commentdefault="""[[objaax]] must be provided if ([[nobj]]==1 and one component of [[objaro]] != 0). Moreover, + commentdefault="""[[objaax]] must be provided if ([[nobj]] == 1 and one component of [[objaro]] != 0). Moreover, [[objaax]] AND [[objbax]] must be provided if ( [[nobj]] == 2 and one component of [[objbro]] != 0 ).""", - text=""" + text=r""" Gives, for each object, the cartesian coordinates of two points (first point: [[objaax]](1:3) second point: [[objaax]](4:6). By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), although Angstrom can be @@ -10863,9 +11430,9 @@ dimensions="scalar", mnemonics="OBJect A: Number of atoms", characteristics=['[[INPUT_ONLY]]'], - commentdefault=""" [[objan]] MUST be provided if [[nobj]]==1. - [[objan]] and [[objbn]] MUST be provided if [[nobj]]==2.""", - text=""" + commentdefault=""" [[objan]] MUST be provided if [[nobj]] == 1. + [[objan]] and [[objbn]] MUST be provided if [[nobj]] == 2.""", + text=r""" Gives the number of atoms in object a. The list of atoms is given by the variables [[objaat]]. """, ), @@ -10879,15 +11446,15 @@ defaultval=[1, 1, 1], mnemonics="OBJect A: Repetition Factors", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives three repetition factors of the objects a. This gives the opportunity to generate a three-dimensional set of repeated objects, although a simple one-dimensional repetition will be easily obtained -through the specification of 'nrep' 1 1 -where 'nrep' is the 1D repetition factor. +through the specification of `nrep 1 1` +where `nrep` is the 1D repetition factor. The initial rotation and translation of the object, as well as the increment of rotation or translation from one object to the next are specified by the -variables [[objaro]] and [[objatr]], for object a, +variable [[objaro]]. Note that the atom manipulator will generate the full set of atoms from the primitive set of atoms using the following order: it will process each atom in the primitive list one by one, determine whether it belongs to either @@ -10898,7 +11465,7 @@ 1 in the primitive list, then those generated from atom 2 in the primitive list, and so on. If the atom manipulator is only used to rotate or translate an object, without -repeating it, simply use 1 1 1, which is also the Default value. +repeating it, simply use `1 1 1`, which is also the Default value. """, ), @@ -10912,17 +11479,17 @@ mnemonics="OBJect A: ROtations", characteristics=['[[INPUT_ONLY]]'], commentdefault="(no rotation)", - text=""" + text=r""" Give, for each object, the angles of rotation in degrees to be applied to the corresponding object. The rotation is applied before the translation, and the axis is defined by the -variables [[objaax]] and [[objbax]]. See the latter variables for the +variable [[objaax]]. See the latter variable for the definition of the sign of the rotation. -The first component [[objaro]](1) and **objbro** (1) gives the angle of +The first component [[objaro]](1) gives the angle of rotation to be applied to the first instance of the object. The second, third or fourth component (resp.) gives the increment of rotation angle from one instance to the next instance, defined by the first, second or third -repetition factor (resp.). This allows to generate 3D arrays of molecules +repetition factor (resp.). This allows one to generate 3D arrays of molecules with different rotation angles. """, ), @@ -10937,17 +11504,17 @@ mnemonics="OBJect A: TRanslations", characteristics=['[[INPUT_ONLY]]', '[[LENGTH]]'], commentdefault="(no translation)", - text=""" + text=r""" Give, for each object, the vectors of translations, in cartesian coordinates, to be applied to the corresponding object. By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), although Angstrom can be specified, if preferred, since these variables have the '[[LENGTH]]' characteristics. The translation is applied after the rotation. -The first vector [[objatr]](3,1) and [[objbtr]](3,1) gives the translation to +The first vector [[objatr]](3,1) gives the translation to be applied to the first instance of the object. The second, third or fourth component (resp.) gives the increment of translation from one instance to the -next instance, defined by the first, second or third repetition factor (resp.) -. This allows to generate 3D arrays of molecules. +next instance, defined by the first, second or third repetition factor (resp.). +This allows one to generate 3D arrays of molecules. In general, when the objects are repeated, a translation vector must be given, since otherwise, the repeated objects pack in the same region of space. As an exception, one can have a set of molecules regularly spaced on a circle, in @@ -10964,8 +11531,8 @@ dimensions=['[[objbn]]'], mnemonics="OBJect B: list of AToms", characteristics=['[[INPUT_ONLY]]'], - requires="[[nobj]]==2", - text=""" + requires="[[nobj]] == 2", + text=r""" Gives the list of atoms in object b. This list is specified by giving, for each atom, its index in the list of coordinates ([[xred]], [[xangst]] or [[xcart]]), that also corresponds to a type of atom (given by the array type). @@ -10984,9 +11551,9 @@ dimensions=[6], mnemonics="OBJect B: AXis", characteristics=['[[INPUT_ONLY]]', '[[LENGTH]]'], - commentdefault="""[[objbax]] must be provided if ([[nobj]]==1 and one component of [[objaro]] != 0). Moreover, + commentdefault="""[[objbax]] must be provided if ([[nobj]] == 1 and one component of [[objaro]] != 0). Moreover, [[objaax]] AND [[objbax]] must be provided if ( [[nobj]] == 2 and one component of [[objbro]] != 0 ).""", - text=""" + text=r""" Gives, for each object, the cartesian coordinates of two points (first point: [[objbax]](1:3) second point: [[objbax]](4:6). By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), although Angstrom can be @@ -11008,8 +11575,8 @@ dimensions="scalar", mnemonics="OBJect B: Number of atoms", characteristics=['[[INPUT_ONLY]]'], - commentdefault=" [[objan]] and [[objbn]] MUST be provided if [[nobj]]==2.", - text=""" + commentdefault=" [[objan]] and [[objbn]] MUST be provided if [[nobj]] == 2.", + text=r""" Gives the number of atoms in either object b. The list of atoms is given by the variables [[objbat]]. """, @@ -11024,12 +11591,12 @@ defaultval=[1, 1, 1], mnemonics="OBJect B: Repetition Factors", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives three repetition factors of the objects a or b. This gives the opportunity to generate a three-dimensional set of repeated objects, although a simple one-dimensional repetition will be easily obtained through the specification of -nrep 1 1 where nrep is the 1D repetition factor. +`nrep 1 1` where `nrep` is the 1D repetition factor. The initial rotation and translation of the object, as well as the increment of rotation or translation from one object to the next are specified by the variables [[objbro]] and [[objbtr]], for object b. @@ -11043,7 +11610,7 @@ 1 in the primitive list, then those generated from atom 2 in the primitive list, and so on. If the atom manipulator is only used to rotate or translate an object, without -repeating it, simply use 1 1 1, which is also the Default value. +repeating it, simply use `1 1 1`, which is also the Default value. """, ), @@ -11057,17 +11624,17 @@ mnemonics="OBJect B: ROtations", characteristics=['[[INPUT_ONLY]]'], commentdefault="(no rotation)", - text=""" + text=r""" Give, for each object, the angles of rotation in degrees to be applied to the corresponding object. The rotation is applied before the translation, and the axis is defined by the -variables [[objaax]] and [[objbax]]. See the latter variables for the +variable [[objbax]]. See the latter variable for the definition of the sign of the rotation. -The first component [[objaro]](1) and **objbro** (1) gives the angle of +The first component [[objbro]](1) gives the angle of rotation to be applied to the first instance of the object. The second, third or fourth component (resp.) gives the increment of rotation angle from one instance to the next instance, defined by the first, second or third -repetition factor (resp.). This allows to generate 3D arrays of molecules +repetition factor (resp.). This allows one to generate 3D arrays of molecules with different rotation angles. """, ), @@ -11082,7 +11649,7 @@ mnemonics="OBJect B: TRanslations", characteristics=['[[INPUT_ONLY]]', '[[LENGTH]]'], commentdefault="(no translation)", - text=""" + text=r""" Give, for each object, the vectors of translations, in cartesian coordinates, to be applied to the corresponding object. By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), although Angstrom can be specified, if @@ -11091,8 +11658,8 @@ The first vector [[objatr]](3,1) and [[objbtr]](3,1) gives the translation to be applied to the first instance of the object. The second, third or fourth component (resp.) gives the increment of translation from one instance to the -next instance, defined by the first, second or third repetition factor (resp.) -. This allows to generate 3D arrays of molecules. +next instance, defined by the first, second or third repetition factor (resp.). +This allows one to generate 3D arrays of molecules. In general, when the objects are repeated, a translation vector must be given, since otherwise, the repeated objects pack in the same region of space. As an exception, one can have a set of molecules regularly spaced on a circle, in @@ -11105,17 +11672,19 @@ varset="gstate", vartype="real", topics=['BandOcc_basic'], - dimensions=['[[nband]]'], + dimensions=['[[nband]]', "[[mband]]", "[[nsppol]]"], defaultval=MultipleValue(number=None, value=0), mnemonics="OCCupation numbers", characteristics=['[[EVOLVING]]'], - text=""" -Gives occupation numbers for all bands in the problem. Needed if [[occopt]]==0 -or [[occopt]]==2. Ignored otherwise. Also ignored when [[iscf]]=-2. + text=r""" +Gives occupation numbers for all bands in the problem. Needed if [[occopt]] == 0 +or [[occopt]] == 2. Ignored otherwise. Also ignored when [[iscf]] = -2. Typical band occupancy is either 2 or 0, but can be 1 for half-occupied band or other choices in special circumstances. + If [[occopt]] is not 2, then the occupancies must be the same for each k point. -If [[occopt]]=2, then the band occupancies must be provided explicitly for + +If [[occopt]] = 2, then the band occupancies must be provided explicitly for each band, EACH k POINT, and EACH SPIN-POLARIZATION, in an array which runs over all bands, k points, and spin-polarizations. The order of entries in the array would correspond to all bands at the first k @@ -11135,83 +11704,86 @@ dimensions="scalar", defaultval=1, mnemonics="OCCupation OPTion", - text=""" + text=r""" Controls how input parameters [[nband]], [[occ]], and [[wtk]] are handled. - * [[occopt]]=0: -All k points have the same number of bands and the same occupancies of bands. -[[nband]] is given as a single number, and [[occ]]([[nband]]) is an array of -[[nband]] elements, read in by the code. + * [[occopt]] = 0: +All k points and spins have the same number of bands. All k points have the same occupancies of bands for a given spin +(but these occupancies may differ for spin up and spin down - typical for ferromagnetic insulators). +[[nband]] is given as a single number, and [[occ]]([[nband]] * [[nsppol]]) is an array of +[[nband]] * [[nsppol]] elements, read in by the code. The k point weights in array [[wtk]]([[nkpt]]) are automatically normalized by -the code to add to 1. +the code to add to 1. They cannot differ for differing spins. - * [[occopt]]=1: -Same as [[occopt]]=0, except that the array [[occ]] is automatically generated + * [[occopt]] = 1: +Same as [[occopt]] = 0, except that the array [[occ]] is automatically generated by the code, to give a semiconductor. An error occurs when filling cannot be done with occupation numbers equal to 2 or 0 in each k-point (non-spin-polarized case), or with occupation numbers -equal to 1 or 0 in each k-point (spin-polarized case). If [[nsppol]]=2 and -[[occopt]]==1 is used, the user has to impose the magnetization, using +equal to 1 or 0 in each k-point (spin-polarized case). If [[nsppol]] = 2 and +[[occopt]] == 1 is used, the user has to impose the magnetization, using [[spinmagntarget]], except for the case of a single isolated Hydrogen atom. - * [[occopt]]=2: + * [[occopt]] = 2: k points may optionally have different numbers of bands and different -occupancies. [[nband]]([[nkpt]]*[[nsppol]]) is given explicitly as an array of -[[nkpt]]*[[nsppol]] elements. [[occ]]() is given explicitly for all bands at +occupancies. [[nband]]([[nkpt]] * [[nsppol]]) is given explicitly as an array of +[[nkpt]] * [[nsppol]] elements. [[occ]]() is given explicitly for all bands at each k point, and eventually for each spin -- the total number of elements is the sum of [[nband]](ikpt) over all k points and spins. The k point weights [[wtk]] ([[nkpt]]) are NOT automatically normalized under this option. - * [[occopt]]=3, 4, 5, 6 and 7 + * [[occopt]] = 3, 4, 5, 6 and 7: Metallic occupation of levels, using different occupation schemes (see below). The corresponding thermal broadening, or cold smearing, is defined by the input variable [[tsmear]] (see below: the variable xx is the energy in Ha, divided by [[tsmear]]) -Like for [[occopt]]=1, the variable [[occ]] is not read +Like for [[occopt]] = 1, the variable [[occ]] is not read. All k points have the same number of bands, [[nband]] is given as a single number, read by the code. The k point weights in array [[wtk]]([[nkpt]]) are automatically normalized by the code to add to 1. - * [[occopt]]=3: + * [[occopt]] = 3: Fermi-Dirac smearing (finite-temperature metal) Smeared delta function: 0.25d0/(cosh(xx/2.0d0)**2) - * [[occopt]]=4: + * [[occopt]] = 4: "Cold smearing" of N. Marzari (see his thesis work), with a=-.5634 (minimization of the bump) Smeared delta function: exp(-xx 2 )/sqrt(pi) * (1.5d0+xx*(-a*1.5d0+xx*(-1.0d0+a*xx))) - * [[occopt]]=5: + * [[occopt]] = 5: "Cold smearing" of N. Marzari (see his thesis work), with a=-.8165 (monotonic function in the tail) -Same smeared delta function as [[occopt]]=4, with different a. +Same smeared delta function as [[occopt]] = 4, with different a. - * [[occopt]]=6: + * [[occopt]] = 6: Smearing of Methfessel and Paxton [[cite:Methfessel1989]] with Hermite polynomial of degree 2, corresponding to "Cold smearing" of N. Marzari with a=0 (so, same -smeared delta function as [[occopt]]=4, with different a). +smeared delta function as [[occopt]] = 4, with different a). - * [[occopt]]=7: + * [[occopt]] = 7: Gaussian smearing, corresponding to the 0 order Hermite polynomial of Methfessel and Paxton. Smeared delta function: 1.0d0*exp(-xx**2)/sqrt(pi) - * [[occopt]]=8: + * [[occopt]] = 8: Uniform smearing (the delta function is replaced by a constant function of value one over ]-1/2,1/2[ (with one-half value at the boundaries). Used for testing purposes only. -WARNING: one can use metallic occupation of levels in the case of a molecule, -in order to avoid any problem with degenerate levels. However, it is advised -NOT to use [[occopt]]=6 (and to a lesser extent [[occopt]]=4 and 5), since the -associated number of electron versus the Fermi energy is NOT guaranteed to be -a monotonic function. For true metals, AND a sufficiently dense sampling of -the Brillouin zone, this should not happen, but be cautious ! As an indication -of this problem, a small variation of input parameters might lead to a jump of -total energy, because there might be two or even three possible values of the -Fermi energy, and the bissection algorithm finds one or the other. +!!! note + + One can use metallic occupation of levels in the case of a molecule, + in order to avoid any problem with degenerate levels. However, it is advised + NOT to use [[occopt]] = 6 (and to a lesser extent [[occopt]] = 4 and 5), since the + associated number of electron versus the Fermi energy is NOT guaranteed to be + a monotonic function. For true metals, AND a sufficiently dense sampling of + the Brillouin zone, this should not happen, but be cautious ! As an indication + of this problem, a small variation of input parameters might lead to a jump of + total energy, because there might be two or even three possible values of the + Fermi energy, and the bisection algorithm finds one or the other. """, ), @@ -11224,8 +11796,8 @@ defaultval=ValueWithUnit(units='eV', value=50), mnemonics="OMEGA to evaluate Sigma along the Imaginary axis D: MAXimal value", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==4 and [[gwcalctyp]]==1", - text=""" + requires="[[optdriver]] == 4 and [[gwcalctyp]] == 1", + text=r""" [[omegasimax]] defines the maximum frequency along the imaginary the axis. In conjunction with [[nomegasi]], [[omegasimax]] uniquely defines the linear mesh employed to sample the self-energy along the imaginary axis. @@ -11241,8 +11813,8 @@ defaultval=ValueWithUnit(units='eV', value=1.0), mnemonics="OMEGA to evaluate the Sigma Real axis Derivative: MAXimal value", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==4", - text=""" + requires="[[optdriver]] == 4", + text=r""" The maximum distance from the KS energy where to evaluate Sigma. Sigma is evaluated at [ KS_energy - [[omegasrdmax]], KS_energy + [[omegasrdmax]] ] sampled [[nomegasrd]] times. @@ -11258,19 +11830,19 @@ defaultval=0, mnemonics="OPTimize the CELL shape and dimensions", text=r""" -Allows to optimize the unit cell shape and dimensions, when [[ionmov]]>=2 or +Allows one to optimize the unit cell shape and dimensions, when [[ionmov]] >= 2 or 3. The configuration for which the stress almost vanishes is iteratively determined, by using the same algorithms as for the nuclei positions. Will eventually modify [[acell]] and/or [[rprim]]. The ionic positions are ALWAYS updated, according to the forces. A target stress tensor might be defined, see [[strtarget]]. - * [[optcell]]=0: modify nuclear positions, since [[ionmov]]=2 or 3, but no cell shape and dimension optimisation. - * [[optcell]]=1: optimisation of volume only (do not modify [[rprim]], and allow an homogeneous dilatation of the three components of [[acell]]) - * [[optcell]]=2: full optimization of cell geometry (modify [[acell]] and [[rprim]] \- normalize the vectors of [[rprim]] to generate the [[acell]]). This is the usual mode for cell shape and volume optimization. It takes into account the symmetry of the system, so that only the effectively relevant degrees of freedom are optimized. - * [[optcell]]=3: constant-volume optimization of cell geometry (modify [[acell]] and [[rprim]] under constraint \- normalize the vectors of [[rprim]] to generate the [[acell]]) - * [[optcell]]=4, 5 or 6: optimize [[acell]](1), [[acell]](2), or [[acell]](3), respectively (only works if the two other vectors are orthogonal to the optimized one, the latter being along its cartesian axis). - * [[optcell]]=7, 8 or 9: optimize the cell geometry while keeping the first, second or third vector unchanged (only works if the two other vectors are orthogonal to the one left unchanged, the latter being along its cartesian axis). + * [[optcell]] = 0: modify nuclear positions, since [[ionmov]] = 2 or 3, but no cell shape and dimension optimisation. + * [[optcell]] = 1: optimisation of volume only (do not modify [[rprim]], and allow an homogeneous dilatation of the three components of [[acell]]) + * [[optcell]] = 2: full optimization of cell geometry (modify [[acell]] and [[rprim]] \- normalize the vectors of [[rprim]] to generate the [[acell]]). This is the usual mode for cell shape and volume optimization. It takes into account the symmetry of the system, so that only the effectively relevant degrees of freedom are optimized. + * [[optcell]] = 3: constant-volume optimization of cell geometry (modify [[acell]] and [[rprim]] under constraint \- normalize the vectors of [[rprim]] to generate the [[acell]]) + * [[optcell]] = 4, 5 or 6: optimize [[acell]](1), [[acell]](2), or [[acell]](3), respectively (only works if the two other vectors are orthogonal to the optimized one, the latter being along its cartesian axis). + * [[optcell]] = 7, 8 or 9: optimize the cell geometry while keeping the first, second or third vector unchanged (only works if the two other vectors are orthogonal to the one left unchanged, the latter being along its cartesian axis). A few details require attention when performing unit cell optimisation: @@ -11280,7 +11852,7 @@ * if all the reduced coordinates of atoms are fixed by symmetry, one cannot use [[toldff]] to stop the SCF cycle. (Suggestion: use [[toldfe]] with a small value, like 1.0d-10) It is STRONGLY suggested first to optimize the ionic positions without cell -shape and size optimization ([[optcell]]=0), then start the cell shape and +shape and size optimization ([[optcell]] = 0), then start the cell shape and size optimization from the cell with relaxed ionic positions. Presently (v3.1), one cannot restart ([[restartxf]]) a calculation with a non-zero [[optcell]] value from the (x,f) history of another run with a different non- @@ -11303,25 +11875,21 @@ dimensions="scalar", defaultval=0, mnemonics="OPTions for the DRIVER", - text=""" -For each dataset, choose the task to be done, at the level of the "driver" -routine. + text=r""" +For each dataset, choose the task to be done, at the level of the "driver" routine. The choice is among: - * [[optdriver]]=0: ground-state calculation (GS), routine "gstate" - * [[optdriver]]=1: response-function calculation (RF), routine "respfn" - * [[optdriver]]=2: susceptibility calculation (SUS), routine "suscep" - * [[optdriver]]=3: susceptibility and dielectric matrix calculation (SCR), routine "screening" - (see the input variables [[ecutwfn]], [[ecuteps]], [[ppmfrq]], [[getwfk]], as - well as [[nbandkss]] and [[nband]]) - * [[optdriver]]=4: self-energy calculation (SIG), routine "sigma" - * [[optdriver]]=5: non-linear response functions (NONLINEAR), using the 2n+1 - theorem, routine "nonlinear" - * [[optdriver]] =7: electron-phonon coupling (EPH) - * [[optdriver]] =66: GW using Lanczos-Sternheimer, see input variables whose - name start with gwls_*. - * [[optdriver]]=99: Bethe-Salpeter calculation (BSE), routine "bethe_salpeter" + * 0 --> ground-state calculation (GS), routine *gstate* + * 1 --> response-function calculation (RF), routine *respfn* + * 2 --> susceptibility calculation (SUS), routine *suscep* + * 3 --> susceptibility and dielectric matrix calculation (SCR), routine *screening* + * 4 --> self-energy calculation (SIG), routine *sigma*. + * 5 --> non-linear response functions (NONLINEAR), using the 2n+1 theorem, routine *nonlinear*. + * 7 --> electron-phonon coupling (EPH) + * 8 --> Post-processing of WFK file, routine *wfk_analyze*. See also [[wfk_task]] input variable. + * 66 --> GW using Lanczos-Sternheimer, see input variables whose name start with `gwls_*`. + * 99 --> Bethe-Salpeter calculation (BSE), routine *bethe_salpeter* If one of [[rfphon]], [[rfddk]], [[rfelfd]], or [[rfstrs]] is non-zero, while [[optdriver]] is not defined in the input file, ABINIT will set [[optdriver]] @@ -11339,12 +11907,12 @@ defaultval=ValueWithConditions({'[[toldff]] or [[tolrff]] != 0': 1, 'defaultval': 2}), mnemonics="OPTions for the calculation of FORCES", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Allows to choose options for the calculation of forces. - * [[optforces]]=0: the forces are set to zero, and many steps of the computation of forces are skipped - * [[optforces]]=1: calculation of forces at each SCF iteration, allowing to use forces as criterion to stop the SCF cycles - * [[optforces]]=2: calculation of forces at the end of the SCF iterations (like the stresses) + * [[optforces]] = 0: the forces are set to zero, and many steps of the computation of forces are skipped + * [[optforces]] = 1: calculation of forces at each SCF iteration, allowing to use forces as criterion to stop the SCF cycles + * [[optforces]] = 2: calculation of forces at the end of the SCF iterations (like the stresses) """, ), @@ -11357,12 +11925,13 @@ defaultval=1, mnemonics="OPTion for the calculation of Non-Linear eXchange-Correlation Core Correction", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Allows to choose options for the calculation of non-linear XC correction. At present, only relevant for the FHI type of pseudopotentials, with pspcod=6. - * [[optnlxccc]]=1: uses the old psp6cc.f routine, with inconsistent treatment of real-space derivatives of the core function (computed in this routine, while splined in the other parts of the code) - * [[optnlxccc]]=2: consistent calculation derivatives, in the psp6cc_dhr.f routine from DHamann. + * [[optnlxccc]] = 1: uses the old `psp6cc.f` routine, with inconsistent treatment of real-space derivatives of the core + function (computed in this routine, while splined in the other parts of the code) + * [[optnlxccc]] = 2: consistent calculation derivatives, in the `psp6cc_dhr.f` routine from DHamann. """, ), @@ -11374,10 +11943,10 @@ dimensions="scalar", defaultval=1, mnemonics="OPTion for the computation of STRESS", - text=""" + text=r""" If set to 1, the computation of stresses is done, in the SCF case (under the -conditions [[iscf]] > 0, [[prtstm]]==0, [[positron]]==0, and either -[[nstep]] >0, or [[usepaw]]==0 or [[irdwfk]]==1). +conditions [[iscf]] > 0, [[prtstm]] == 0, [[positron]] == 0, and either +[[nstep]] >0, or [[usepaw]] == 0 or [[irdwfk]] == 1). Otherwise, to save CPU time, if no optimization of the cell is required, one can skip the computation of stresses. The CPU time saving might be interesting for some PAW calculations. @@ -11393,12 +11962,28 @@ defaultval=0, mnemonics="ORBital MAGnetization", characteristics=['[[DEVELOP]]'], - requires="""[[usepaw]]==1 -[[kptopt]]==3 -[[NPROC]]==1""", - text=""" -Compute quantities related to orbital magnetization. Currently only the Chern -number calculated. + requires="""[[usepaw]] == 1; +[[usexcnhat]] == 0; +[[nspinor]] == 1; +[[paral_atom]] == 0; +[[paral_kgb]] == 0; +[[kptopt]] > 2 """, + text=r""" +Compute quantities related to orbital magnetization. The + implementation assumes an insulator, so no empty or partially + filled bands, and currently restricted to [[nspinor]] 1. Such + insulators have orbital magnetization zero, except in the presence + of nonzero nuclear dipole moments, see [[nucdipmom]]. [[orbmag]] + is parallelized over k points only. The implementation follows the + theory outlined in [[cite:Gonze2011a]] extended to the PAW case; + see also [[cite:Ceresoli2006]]. The computed results are returned in the + standard output file, search for "Orbital magnetization" and "Chern number". + +* [[orbmag]] = 1: Compute Chern number [[cite:Ceresoli2006]]. This computation is + faster than the full [[orbmag]] calculation, and a nonzero value indicates a circulating + electronic current. +* [[orbmag]] = 2: Compute electronic orbital magnetization. +* [[orbmag]] = 3: Compute both Chern number and electronic orbital magnetization. """, ), @@ -11411,7 +11996,7 @@ defaultval=ValueWithConditions({'[[wfoptalg]] >= 10 ': -2, 'defaultval': 2}), mnemonics="ORThogonalisation ALGorithm", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Allows to choose the algorithm for orthogonalisation. Positive or zero values make two projections per line minimisation, one before the preconditioning, one after. This is the clean application of the band-by- @@ -11419,13 +12004,12 @@ Negative values make only one projection per line minimisation. The orthogonalisation step is twice faster, but the convergence is less good. This actually calls to a better understanding of this effect. -[[ortalg]]=0, 1 or -1 is the conventional coding. -[[ortalg]]=2 or -2 try to make better use of existing registers on the +[[ortalg]] = 0, 1 or -1 is the conventional coding. +[[ortalg]] = 2 or -2 try to make better use of existing registers on the particular machine one is running. -More demanding use of registers is provided by [[ortalg]]=3 or -3, and so on. +More demanding use of registers is provided by [[ortalg]] = 3 or -3, and so on. The maximal value is presently 4 and -4. -Tests have shown that [[ortalg]]=2 or -2 is suitable for use on the available -platforms. +Tests have shown that [[ortalg]] = 2 or -2 is suitable for use on the available platforms. """, ), @@ -11437,7 +12021,7 @@ dimensions="scalar", defaultval=0, mnemonics="PAPI OPTion", - text=""" + text=r""" [PAPI](http://icl.cs.utk.edu/papi/index.html) aims to provide the tool designer and application engineer with a consistent interface and methodology for use of the performance counter hardware found in most major @@ -11445,7 +12029,7 @@ the relation between software performance and processor events. This option can be used only when ABINIT has been compiled with the ` --enable-papi ` configure option. -If [[papiopt]]=1, then PAPI counters are used instead of the usual time() +If [[papiopt]] = 1, then PAPI counters are used instead of the usual time() routine. All the timing output of ABINIT is then done with PAPI values. The measurements are more accurate and give also access to the flops of the calculation. """, @@ -11459,7 +12043,7 @@ dimensions="scalar", defaultval=1, mnemonics="activate PARALelization over (paw) ATOMic sites", - text=""" + text=r""" Relevant only for PAW calculations. This keyword controls the parallel distribution of memory over atomic sites. Calculations are also distributed using the "kpt-band" communicator. @@ -11475,7 +12059,7 @@ dimensions="scalar", defaultval=0, mnemonics="activate PARALelization over K-point, G-vectors and Bands", - text=""" + text=r""" **If paral_kgb is not explicitely put in the input file**, ABINIT automatically detects if the job has been sent in sequential or in parallel. In this last case, it detects the number of processors on which the job has @@ -11497,25 +12081,22 @@ HOWTO fix the number of processors along one level of parallelisation: At first, try to parallelise over the k point and spin (see [[npkpt]],[[npspinor]]). Otherwise, for unpolarized calculation at the gamma -point, parallelise over the two other levels: the band and FFT ones. For nproc -<=50, the best speed-up is achieved for [[npband]]=nproc and [[npfft]]=1 -(which is not yet the default). For nproc>=50, the best speed-up is achieved -for [[npband]] >=4*[[npfft]]. +point, parallelise over the two other levels: the band and FFT ones. For nproc $\leq$ 50, the best speed-up is achieved for [[npband]] = nproc and [[npfft]] = 1 +(which is not yet the default). For nproc $\geq$ 50, the best speed-up is achieved +for [[npband]] $\geq$ 4 $\\times$ [[npfft]]. For additional information, download F. Bottin presentation at the [ABINIT workshop 2007](https://www.abinit.org/sites/default/files/oldsites/workshop_07/program.html) Suggested acknowledgments: -F. Bottin, S. Leroux, A. Knyazev and G. Zerah, _Large scale ab initio -calculations based on three levels of parallelization_, Comput. Mat. Science -**42**, 329 (2008), also available on arXiv, http://arxiv.org/abs/0707.3405. +[[cite:Bottin2008]], also available on arXiv, http://arxiv.org/abs/0707.3405. If the total number of processors used is compatible with the four levels of parallelization, the values for [[npkpt]], [[npspinor]], [[npfft]], [[npband]] and [[bandpp]] will be filled automatically, although the repartition may not be optimal. To optimize the repartition use: -**If paral_kgb=1** and **max_ncpus = n /= 0** ABINIT will test automatically +**If paral_kgb=1** and **max_ncpus = n $\\ne$ 0** ABINIT will test automatically if all the processor numbers between 2 and n are convenient for a parallel calculation and print the possible values in the log file. A weight is attributed to each possible processors repartition. It is adviced to select a @@ -11537,7 +12118,7 @@ dimensions="scalar", defaultval=0, mnemonics="activate PARALlelization over Response Function perturbations", - text=""" + text=r""" This parameter activates the parallelization over perturbations which can be used during RF-Calculation. It is possible to use this type of parallelization in combination to the parallelization over k-points. @@ -11558,29 +12139,28 @@ vartype="integer", topics=['PAW_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[optdriver]]==0 and [[ionmov]]<6 and [[pawspnorb]]==1 and [[iscf]]>=10 and ([[kptopt]] !=1 or [[kptopt]]!=2) and [[usepaw]]==1': 2, + defaultval=ValueWithConditions({'[[optdriver]] == 0 and [[ionmov]] < 6 and [[pawspnorb]] == 1 and [[iscf]] >= 10 and ([[kptopt]] !=1 or [[kptopt]]!=2) and [[usepaw]] == 1': 2, 'defaultval': 1}), mnemonics="PAW - use ComPleX rhoij OCCupancies", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" The only possible values for [[pawcpxocc]] are 1 or 2. -When **[[pawcpxocc]]==1**, "direct" decomposition of total energy cannot be +When [[pawcpxocc]] == 1, "direct" decomposition of total energy cannot be printed out. -When **[[pawcpxocc]]==2**, PAW augmentation occupancies are treated as +When [[pawcpxocc]] == 2, PAW augmentation occupancies are treated as COMPLEX; else they are considered as REAL. This is needed when time-reversal symmetry is broken (typically when spin- orbit coupling is activated). -Note for ground-state calculations ([[optdriver]]=0): +Note for ground-state calculations ([[optdriver]] == 0): The imaginary part of PAW augmentation occupancies is only used for the computation of the total energy by "direct scheme"; this is only necessary when SCF mixing on potential is chosen ([[iscf]] <10). -When SCF mixing on density is chosen ([[iscf]]>=10), the "direct" +When SCF mixing on density is chosen ([[iscf]] >= 10), the "direct" decomposition of energy is only printed out without being used. It is thus -possible to use [[pawcpxocc]]=1 in the latter case. -In order to save CPU time, when molecular dynamics is selected ([[ionmov]]>=6) -and SCF mixing done on density ([[iscf]]>=10), [[pawcpxocc]]=2 is (by default) -set to **1** +possible to use [[pawcpxocc]] = 1 in the latter case. +In order to save CPU time, when molecular dynamics is selected ([[ionmov]] >= 6) +and SCF mixing done on density ([[iscf]] >= 10), [[pawcpxocc]] = 2 is (by default) set to **1**. """, ), @@ -11592,8 +12172,8 @@ dimensions="scalar", defaultval=0, mnemonics="PAW - add CROSS term in oscillator strengths", - requires="([[optdriver]]==3 or [[optdriver]]==4) and [[usepaw]]==1", - text=""" + requires="([[optdriver]] == 3 or [[optdriver]] == 4) and [[usepaw]] == 1", + text=r""" When **pawcross=1**, the overlap between the plane-wave part of one band and the on-site part of an other is taken into account in the computation of the oscillator strengths. Hence, the completeness of the on-site basis is no longer assumed. @@ -11610,10 +12190,10 @@ mnemonics="PAW - Energy CUToff for the Double Grid", characteristics=['[[ENERGY]]'], commentdefault="pawecutdg MUST be specified for PAW calculations.", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Define the energy cut-off for the fine FFT grid (the "double grid", that -allows to transfer data from the normal, coarse, FFT grid to the spherical +allows one to transfer data from the normal, coarse, FFT grid to the spherical grid around each atom). [[pawecutdg]] must be larger or equal to [[ecut]]. If it is equal to it, then no fine grid is used. The results are not very accurate, but the computations @@ -11622,7 +12202,7 @@ [[pawecutdg]] must be tested according to what you want to do. For calculations that do not require a high accuracy (molecular dynamics for instance) a value of 20 Ha is enough. For calculations that require a high -accuracy (response fonctions for instance) it should be on the order of 30 Ha. +accuracy (response functions for instance) it should be on the order of 30 Ha. Choosing a larger value should not increase the accuracy, but does not slow down the computation either, only the memory. The choice made for this variable DOES have a bearing on the numerical accuracy of the results, and, as @@ -11641,8 +12221,8 @@ dimensions="scalar", defaultval=0, mnemonics="PAW: print band structure in the FAT-BaND representation", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" For Ground-State calculations and non self-consistent calculations only. This option can be used to plot band structure. For each atom (specified by [[natsph]] and [[iatsph]]), each angular momentum, and each spin polarisation, @@ -11651,7 +12231,7 @@ contribution of angular momentum L, and projection of angular momentum M, (for the corresponding wavefunction) to the PAW density inside the PAW sphere as a function of the index of the k-point. The output can be readily plotted with -the software [ xmgrace ](http://plasma-gate.weizmann.ac.il/Grace/) (e.g +the software [xmgrace](http://plasma-gate.weizmann.ac.il/Grace/) (e.g xmgrace FATBANDS_at0001_Ni_is2_l2_m-1). Relevant values are: * 0: desactivated. @@ -11667,9 +12247,9 @@ topics=['PAW_expert'], dimensions="scalar", defaultval=10, - mnemonics="PAW - L angular momentum used to CUT the development in moments of the Densitites", - requires="[[usepaw]]==1", - text=""" + mnemonics="PAW - L angular momentum used to CUT the development in moments of the Densities", + requires="[[usepaw]] == 1", + text=r""" The expansion of the densities in angular momenta is performed up to l=[[pawlcutd]]. Note that, for a given system, the maximum value of [[pawlcutd]] is @@ -11691,8 +12271,8 @@ dimensions="scalar", defaultval=10, mnemonics="PAW - maximum L used in the spherical part MIXing", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" The choice made for this variable determine how the spherical part of the density is mixed during electronic iterations. @@ -11710,9 +12290,9 @@ vartype="integer", topics=['PAW_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[npfft]]==1': 0, 'defaultval': 1}), + defaultval=ValueWithConditions({'[[npfft]] == 1': 0, 'defaultval': 1}), mnemonics="PAW - MIXing is done (or not) on the (fine) Double Grid", - requires="[[usepaw]]==1", + requires="[[usepaw]] == 1", text=r""" The choice made for this variable determines the grid on which the density (or potential) is mixed during the SCF cycle. @@ -11729,9 +12309,9 @@ stored for previous iterations and are REAL arrays of size [[nfftdg]]. If **pawmixdg=0**, density and corresponding residual are stored for previous iterations and are COMPLEX arrays of size [[nfft]]. The memory saving is -particularly efficient when using the Pulay mixing ([[iscf]]=7 or 17). +particularly efficient when using the Pulay mixing ([[iscf]] = 7 or 17). -In **wavelet** calculations [[usewvl]]=1: +In **wavelet** calculations [[usewvl]] = 1: - pawmixdg is set to 1 by default. - A value of 0 is not allowed. @@ -11747,15 +12327,15 @@ dimensions="scalar", defaultval=1, mnemonics="PAW - Flag for exact computation of gradients of NHAT density in eXchange-Correlation.", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Relevant only when a GGA exchange-correlation functional is used. When this flag is activated, the gradients of compensation charge density (n_hat) are exactly computed (i.e. analytically); when it is deactivated, they are computed with a numerical scheme in reciprocal space (which can produce inaccurate results if the compensation charge density is highly localized). As analytical treatment of compensation charge density gradients is CPU time -demanding, it is possible to bypass it with [[pawnhatxc]]=0; but the numerical +demanding, it is possible to bypass it with [[pawnhatxc]] = 0; but the numerical accuracy can be affected by this choice. It is recommended to test the validity of this approximation before use. """, @@ -11769,11 +12349,10 @@ dimensions="scalar", defaultval=13, mnemonics="PAW - Number of PHI angles used to discretize the sphere around each atom.", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Number of phi angles (longitude) used to discretize the data on the atomic -spheres. This discretization is completely defined by [[pawnphi]] and -[[pawntheta]]. +spheres. This discretization is completely defined by [[pawnphi]] and [[pawntheta]]. """, ), @@ -11785,11 +12364,10 @@ dimensions="scalar", defaultval=12, mnemonics="PAW - Number of THETA angles used to discretize the sphere around each atom.", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Number of theta angles (latitude) used to discretize the data on the atomic -spheres. This discretization is completely defined by [[pawntheta]] and -[[pawnphi]]. +spheres. This discretization is completely defined by [[pawntheta]] and [[pawnphi]]. """, ), @@ -11801,8 +12379,8 @@ dimensions="scalar", defaultval=1, mnemonics="PAW - only compute Non-Zero LM-moments of the contributions to the density from the spheres", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Concerns the computation of the contributions to the density from the spheres (named rho_1 - rho_tild_1). If set to 0, all lm-moments of the sphere contributions to the density are @@ -11822,23 +12400,23 @@ dimensions="scalar", defaultval=0, mnemonics="PAW - OPTion for the MIXing of the spherical part", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" In the case of PAW computations, during the self-consistent cycle, ABINIT -mixes the density ρ(r)= ∼ρ(r) +∧ρ(r) and the occupancy matrix ρij. (∼ρ(r) is -the pseudo density, ∧ρ(r) is the compensation charge density). It can be -redundant as ρij is contained in ∧ρ(r). +mixes the density $\\rho(r)= \\tilde{\\rho}(r) +\\hat{\\rho}(r)$ and the occupancy matrix $\\rho_{ij}$. ($\\tilde{\\rho}(r)$ is +the pseudo density, $\\hat{\\rho}(r)$ is the compensation charge density). It can be +redundant as $\\rho_{ij}$ is contained in $\\hat{\\rho}(r)$. * If **pawoptmix** =0: -ABINIT mixes ρ(r) and ρij but the residual used to control the mixing -algorithm is only based on ρ(r). +ABINIT mixes $\\rho(r)$ and $\\rho_{ij}$ but the residual used to control the mixing +algorithm is only based on $\\rho(r)$. * If **pawoptmix** =1: -ABINIT mixes ρ(r) and ρij and the residual used to control the mixing -algorithm is based on ρ(r) and ρij. +ABINIT mixes $\\rho(r)$ and $\\rho_{ij}$ and the residual used to control the mixing +algorithm is based on $\\rho(r)$ and $\\rho_{ij}$. This has only an influence on the efficiency of the mixing algorithm. -In cas of mixing problems, the first suggestion is to increase the size of the +In case of mixing problems, the first suggestion is to increase the size of the history (see [[npulayit]]). Then it is also possible to play with the parameters of the Kerker mixing: [[diemix]], [[diemac]], etc... """, @@ -11852,17 +12430,17 @@ dimensions="scalar", defaultval=0, mnemonics="PAW - OPTion for the computation of the OSCillator matrix elements", - text=""" + text=r""" Only relevant for GW or Bethe-Salpeter calculations with PAW. This variable defines the approach used for the evaluation of the oscillator matrix elements within the PAW formalism. Possible values are 0,1,2. -If [[pawoptosc]]=0 the code uses its internal default value (2 for SCREENING +If [[pawoptosc]] = 0 the code uses its internal default value (2 for SCREENING calculations, 1 for SIGMA calculations, 2 for Bethe-Salpeter -If [[pawoptosc]]=1 the matrix elements are computed with the expression given -by Arnaud and Alouani in PRB 62. 4464 The equation is exact provided that the +If [[pawoptosc]] = 1 the matrix elements are computed with the expression given +by [[cite:Arnaud2000]]. The equation is exact provided that the set of PAW partial waves is complete. -If [[pawoptosc]]=2 the matrix elements are computed with the approximated -expression proposed by Shishkin and Kresse in PRB 74. 035101 +If [[pawoptosc]] = 2 the matrix elements are computed with the approximated +expression proposed by [[cite:Shishkin2006]]. """, ), @@ -11874,8 +12452,8 @@ dimensions="scalar", defaultval=5.0, mnemonics="PAW - spheres OVerLaP allowed (in percentage)", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" When PAW is activated, a localized atomic basis is added to describe wave functions. Spheres around atoms are defined and they are IN PRINCIPLE not allowed to overlap. However, a small overlap can be allowed without @@ -11902,11 +12480,10 @@ defaultval=0, mnemonics="PAW PRinT band", characteristics=['[[DEVELOP]]'], - text=""" -Forces the output of the all-electron wavefunction for only a single band. To -be used in conjuction with: ** -[[pawprtwf]]=1 ** and [[pawprt_k]]. The indexing of the bands start with one -for the lowest occupied band and goes up from there. + text=r""" +Forces the output of the all-electron wavefunction for only a single band. +To be used in conjunction with: [[pawprtwf]] = 1 and [[pawprt_k]]. +The indexing of the bands start with one for the lowest occupied band and goes up from there. """, ), @@ -11919,11 +12496,11 @@ defaultval=0, mnemonics="PAW PRinT K-point", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Forces the output of the all-electron wavefunction for only a single k-point. -To be used in conjuction with: ** -[[pawprtwf]]=1 ** and [[pawprt_b]]. The indexing follows the order in ouptput -of the internal variable **kpt** in the beginning of the run. +To be used in conjunction with: [[pawprtwf]] = 1 and [[pawprt_b]]. +The indexing follows the order in output of the internal variable **kpt** in +the beginning of the run. """, ), @@ -11935,8 +12512,8 @@ dimensions="scalar", defaultval=0, mnemonics="PAW: PRinT total physical electron DENsity", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" **Deprecated:** See the [[prtden]]. """, ), @@ -11949,14 +12526,16 @@ dimensions="scalar", defaultval=0, mnemonics="PAW: PRinT partial DOS contributions", - requires="[[usepaw]]==1 and [[prtdos]]==3", - text=""" + requires="[[usepaw]] == 1 and [[prtdos]] == 3", + text=r""" This input variable controls the computation and/or printing of contributions to the PAW partial DOS in _DOS file(s): -* + Plane-waves contribution -* + "on-site" all-electron contribution (phi) -* - "on-site" pseudo contribution (phi_tild). +* Plane-waves contribution + + $+$ "on-site" all-electron contribution ($\\phi$) + + $-$ "on-site" pseudo contribution ($\\tilde{\\phi}$). If **pawprtdos=0:** @@ -11984,23 +12563,22 @@ dimensions="scalar", defaultval=0, mnemonics="PAW: PRinT VOLume", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" Control print volume and debugging output for PAW in log file or standard output. If set to 0, the print volume is at its minimum. -[[pawprtvol]] can have values from -3 to 3: +**pawprtvol** can have values from -3 to 3: -- [[pawprtvol]]=-1 or 1: matrices rho_ij (atomic occupancies) and D_ij (psp +- **pawprtvol** = -1 or 1: matrices $\\rho_{ij}$ (atomic occupancies) and $D_{ij}$ (psp strength) are printed at each SCF cycle with details about their contributions. -- [[pawprtvol]]=-2 or 2: like -1 or 1 plus additional printing: moments of +- **pawprtvol** = -2 or 2: like -1 or 1 plus additional printing: moments of "on-site" densities, details about local exact exchange. -- [[pawprtvol]]=-3 or 3: like -2 or 2 plus additional printing: details about - PAW+U, rotation matrices of sphercal harmonics. +- **pawprtvol** = -3 or 3: like -2 or 2 plus additional printing: details about + PAW+U, rotation matrices of spherical harmonics. -When [[pawprtvol]]>=0, up to 12 components of rho_ij and D_ij matrices for the +When **pawprtvol** >= 0, up to 12 components of $\\rho_{ij}$ and $D_{ij}$ matrices for the 1st and last atom are printed. -When [[pawprtvol]]<0, all components of rho_ij and D_ij matrices for all atoms -are printed. +When **pawprtvol** < 0, all components of $\\rho_{ij}$ and $D_{ij}$ matrices for all atoms are printed. """, ), @@ -12012,22 +12590,23 @@ dimensions="scalar", defaultval=0, mnemonics="PAW: PRinT WaveFunctions", - requires="[[usepaw]]==1", - text=""" -This input variable controls the output of the full PAW wave functions -including the on-site contribution inside each PAW sphere needed to -reconstruct the correct nodal shape in the augmentation region. **pawprtwf=1** -causes the generation of a file _AE_WFK that contains the full wavefunctions -in real space on the fine FFT grid defined by [[pawecutdg]] or [[ngfftdg]]. -Limitations: At present (v6.0), **pawprtwf=1** is not compatible neither with -the k-point parallelism nor with the parallelism over G-vectors. Therefore the -output of the _AE_WFK has to be done in sequential. Moreover, in order to use -this feature, one has to enable the support for ETSF-IO at configure-time as -the _AW_WFK file is written using the NETCDF file format following the ETSF-IO -specification for wavefunctions in real space. If the code is run entirely in -serial, additional output is made of various contributions to the all-electron + requires="[[usepaw]] == 1", + text=r""" +This input variable controls the output of the **full** PAW wave functions +including the on-site contributions inside each PAW sphere needed to +reconstruct the correct nodal shape in the augmentation region. +**pawprtwf = 1** causes the generation of a file _PAWAVES.nc containing the full wavefunctions +in **real space** on the fine FFT grid defined by [[pawecutdg]] or [[ngfftdg]]. + +Limitations: At present (v8.0), **pawprtwf = 1** is not compatible with [[nspinor]] =2 and parallel executions +Therefore the output of the _AE_WFK has to be done in sequential. +Moreover, in order to use this feature, one has to enable the support for netcdf at configure-time +as the _PAWAVES file is written using the NETCDF file format following the ETSF-IO +specifications for wavefunctions in real space. + +If the code is run entirely in serial, additional output is made of various contributions to the all-electron wavefunction. By default the full available set of bands and k-points are -ouput, but a single band and k-point index can be requested by using the +output, but a single band and k-point index can be requested by using the variables [[pawprt_b]] and [[pawprt_k]]. """, ), @@ -12038,30 +12617,31 @@ vartype="integer", topics=['PAW_useful', 'spinpolarisation_useful'], dimensions="scalar", - defaultval=ValueWithConditions({'[[nspinor]]==2': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[nspinor]] == 2': 1, 'defaultval': 0}), mnemonics="PAW - option for SPiN-ORBit coupling", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" When PAW is activated, the **spin-orbit coupling** can be added without the use of specific PAW datasets (pseudopotentials). -If [[pawspnorb]]=1, spin-orbit will be added. -If the wavefunction is spinorial (that is, if [[nspinor]]=2), there is no +If [[pawspnorb]] = 1, spin-orbit will be added. +If the wavefunction is spinorial (that is, if [[nspinor]] = 2), there is no reason not to include the spin-orbit interaction, so that the default value of -[[pawspnorb]] becomes 1 when [[nspinor]]=2. +[[pawspnorb]] becomes 1 when [[nspinor]] = 2. Note that only the all-electron "on-site" contribution to the Hamiltonian is taken into account; this is a very good approximation but requires the -following conditions to be fullfilled: +following conditions to be fulfilled: + +1- the $\\tilde{\\phi}_{i}$ basis is complete enough -1- the ~ φ i basis is complete enough 2- the electronic density is mainly contained in the PAW sphere Also note that, when spin-orbit coupling is activated and there is some -magnetization [[nspden]]=4, the time-reversal symmetry is broken. -The use of [[kptopt]]=1 or [[kptopt]]=2 is thus forbidden. It is advised to -use [[kptopt]]=3 (no symmetry used to generate k-points) or [[kptopt]]=4 (only +magnetization [[nspden]] = 4, the time-reversal symmetry is broken. +The use of [[kptopt]] = 1 or [[kptopt]] = 2 is thus forbidden. It is advised to +use [[kptopt]] = 3 (no symmetry used to generate k-points) or [[kptopt]] = 4 (only spatial symmetries used to generate k-points). -Be careful if you choose to use [[kptopt]]=0 (k-points given by hand); Time- +Be careful if you choose to use [[kptopt]] = 0 (k-points given by hand); Time- reversal symmetry has to be avoided. An artificial scaling of the spin-orbit can be introduced thanks to the [[spnorbscl]] input variable. @@ -12076,24 +12656,25 @@ dimensions="scalar", defaultval=1, mnemonics="PAW - option for the STorage of G_l(r).YLM(r)", - requires="[[usepaw]]=1", + requires="[[usepaw]] = 1", text=r""" When PAW is activated, the computation of compensation charge density (so -called "hat" density) requires the computation of g_l(r).Y_lm(r) factors (and +called "hat" density) requires the computation of $g_{l}(r).Y_{lm}(r)$ factors (and cartesian derivatives) at each point of real space contained in PAW spheres. The number of atoms, of (l,m) quantum numbers and the sharpness of the real -FFT grid can lead to a very big {g_l.Y_lm} datastructure. One can save memory -by putting [[pawstgylm]]=0; but, in that case, g_l(r).Y_lm(r) factors a re- +FFT grid can lead to a very big {$g_{l}.Y_{lm}$} datastructure. One can save memory +by putting [[pawstgylm]] = 0; but, in that case, $g_{l}(r).Y_{lm}(r)$ factors a re- computed each time they are needed and CPU time increases. Possible choices: -- [[pawstgylm]]=0: g_l(r).Y_lm(r) are not stored in memory and recomputed. -- [[pawstgylm]]=1: g_l(r).Y_lm(r) are stored in memory. +- [[pawstgylm]] = 0: $g_{l}(r).Y_{lm}(r)$ are not stored in memory and recomputed. +- [[pawstgylm]] = 1: $g_{l}(r).Y_{lm}(r)$ are stored in memory. Note: -g_l(r) are shape functions (analytically known) -Y_lm(r) are real spherical harmonics +$g_{l}(r)$ are shape functions (analytically known) + +$Y_{lm}(r)$ are real spherical harmonics """, ), @@ -12105,23 +12686,23 @@ dimensions="scalar", defaultval=0, mnemonics="PAW - SUSceptibility, inclusion of HAT (compensation charge) contribution", - requires="[[usepaw]]==1 and [[optdriver]]==0", + requires="[[usepaw]] == 1 and [[optdriver]] == 0", text=r""" Ground-State calculation only. When a sophisticated preconditioning scheme is selected for the SCF cycle of a -Ground-State calculation ([[iprcel]]>0), the computation of the susceptibility +Ground-State calculation ([[iprcel]] > 0), the computation of the susceptibility matrix is required several times during the cycle. This computation is computer time consuming, especially -- within PAW -- because of the inclusion of additional terms due to the compensation charge density. As only a crude valuation of the susceptibilty matrix is needed (to evaluate a preconditioning matrix), the compensation charge contribution can be neglected to save CPU -time (select [[pawsushat]]=0). This approximation could be unfavourable in -some cases; in the latter, we advise to put [[pawsushat]]=1. +time (select [[pawsushat]] = 0). This approximation could be unfavourable in +some cases; in the latter, we advise to put [[pawsushat]] = 1. Possible choices: -- [[pawsushat]]=0: only plane-wave contribution to suscep. matrix is computed. -- [[pawsushat]]=1: the whole suscep. matrix (PW + PAW on-site) is computed. +- [[pawsushat]] = 0: only plane-wave contribution to suscep. matrix is computed. +- [[pawsushat]] = 1: the whole suscep. matrix (PW + PAW on-site) is computed. """, ), @@ -12135,7 +12716,7 @@ mnemonics="PAW+macro_UJ, ATom number", characteristics=['[[DEVELOP]]'], commentdefault=" i.e. the first atom treated with PAW+U.", - text=""" + text=r""" Determines the atom for which U (or J) should be determined. See also [[macro_uj]]. """, ), @@ -12149,7 +12730,7 @@ defaultval=ValueWithUnit(units='a.u.', value=20), mnemonics="PAW+macro_UJ, sphere RADius", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" The sphere radius serves to extrapolate the U value calculated at r_paw to a larger sphere radius. See also [[macro_uj]]. As most projector functions are localized within r_paw to ≈80%, 20 a.u. contains ≈100% of the wavefunction and @@ -12166,7 +12747,7 @@ defaultval=ValueWithUnit(units='eV', value=0.1), mnemonics="PAW+macro_UJ, potential shift (V)", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Amplitude of the potential shift for the determination of U (or J). See also [[macro_uj]]. """, ), @@ -12179,16 +12760,14 @@ dimensions="scalar", defaultval=1, mnemonics="PAW - option for the USE of CPrj in memory (cprj=WF projected with NL projector)", - requires="[[usepaw]]==1", - text=""" -When PAW is activated, the computation of cprj arrays is memory and time -consuming. -When [[pawusecp]]=0, then the cprj are never kept in memory, they are -recomputed when needed (this is CPU-time consuming). When [[pawusecp]]=1, then + requires="[[usepaw]] == 1", + text=r""" +When PAW is activated, the computation of cprj arrays is memory and time consuming. +When [[pawusecp]] = 0, then the cprj are never kept in memory, they are +recomputed when needed (this is CPU-time consuming). When [[pawusecp]] = 1, then the cprj are computed once and then kept in memory. -Change the value of the keyword only if you are an experienced user -(developper). -Remember: cprj = (WF_n .dot. p_i) (WF_n=wave function, p_i=non-local projector). +Change the value of the keyword only if you are an experienced user (developer). +Remember: $cprj = <\\tilde{\\psi}_{m}.p_{i}>$ ($\\tilde{\\psi}_{n}$=wave function, $p_{i}$=non-local projector). For the time being, only activated for RF calculations. """, @@ -12202,14 +12781,13 @@ dimensions="scalar", defaultval=1, mnemonics="PAW - choice for eXchange-Correlation DEVelopment (spherical part)", - requires="[[usepaw]]==1", - text=""" - * If set to 0, the exchange-correlation term in the spherical part of energy is totally computed on the angular mesh + requires="[[usepaw]] == 1", + text=r""" + * If set to 0, the exchange-correlation term in the spherical part of energy is totally computed on the angular mesh (time consuming but exact!) * If set to 1, the exchange-correlation term in the spherical part of energy is developed onto lm-moments at order 1 * If set to 2, the exchange-correlation term in the spherical part of energy is developed onto lm-moments at order 2 - (can be memory/CPU consuming) -Be careful: GGA requires [[pawxcdev]] > 0 +Be careful: Response function (DFPT) + PAW + GGA requires [[pawxcdev]] = 0. But if you plan to do DFPT calculations, it is better to use this option also in the preliminary ground state calculation. """, ), @@ -12221,13 +12799,12 @@ dimensions="scalar", defaultval=2, mnemonics="PHonons: INTegration METHod", - text=""" + text=r""" Select the integration technique for computing the phonon DOS and the -Eliashberg function a2fF(w). +Eliashberg function $\alpha^2F(\omega)$. -1 for Gaussian scheme (see also [[ph_smear]]). - -2 for tetrahedron method (no other input is needed but requires at least 4 q-points in the BZ) + * 1 --> Gaussian scheme (see also [[ph_smear]]). + * 2 --> tetrahedron method (no other input is needed but requires at least 4 q-points in the BZ) """, ), @@ -12239,7 +12816,7 @@ dimensions="scalar", defaultval=20, mnemonics="PHonons: Number of DIVisions for sampling the SMallest segment", - text=""" + text=r""" This variable is used in conjunction with [[ph_nqpath]] and [[ph_qpath]] to define the q-path used for phonon band structures and phonon linewidths. It gives the number of points used to sample the smallest segment in the q-path @@ -12255,7 +12832,7 @@ dimensions=[3], defaultval=[20, 20, 20], mnemonics="PHonons: Number of Grid points for Q-PoinT mesh.", - text=""" + text=r""" This variable defines the q-mesh used to compute the phonon DOS and the Eliashberg function via Fourier interpolation. Related input variables: [[ph_qshift]] and [[ph_nqshift]]. @@ -12270,7 +12847,7 @@ dimensions="scalar", defaultval=0, mnemonics="PHonons: Number of Q-points defining the PATH", - text=""" + text=r""" This integer defines the number of points in the [[ph_qpath]] array. """, ), @@ -12283,7 +12860,7 @@ dimensions="scalar", defaultval=1, mnemonics="PHonons: Number of Q-SHIFTs", - text=""" + text=r""" This variable defines the number of shifts in the q-mesh used for the phonon DOS and for the Eliashberg functions (see [[ph_ngqpt]]). If not given, the code assumes a Gamma-centered mesh. The shifts are specified by [[ph_qshift]]. @@ -12299,10 +12876,10 @@ defaultval="None", mnemonics="Phonons: Q-PATH", requires="specified([[ph_nqpath]])", - text=""" + text=r""" This array contains the list of special q-points used to construct the q-path used to (Fourier) interpolate phonon band structures and phonon linewidths. -See also [[ph_nqpath]] and [[[ph_ndivsm]]. +See also [[ph_nqpath]] and [[ph_ndivsm]]. """, ), @@ -12315,9 +12892,9 @@ defaultval=[0, 0, 0], mnemonics="PHonons: Q-SHIFTs for mesh.", requires="[[ph_nqshift]]", - text=""" + text=r""" This array gives the shifts to be used to construct the q-mesh for computing -the phonon DOS and the Eliashberg functions (see also [[ph_nqshift]]. +the phonon DOS and the Eliashberg functions (see also [[ph_nqshift]]). If not given, a Gamma-centered mesh is used. """, ), @@ -12331,8 +12908,8 @@ defaultval="0.00002 Hartree", mnemonics="PHonons: SMEARing factor", characteristics=['[[ENERGY]]'], - requires="[[ph_intmeth]]==1", - text=""" + requires="[[ph_intmeth]] == 1", + text=r""" The gaussian broadening used for the integration of the phonon DOS and the Eliashberg function. See also [[ph_intmeth]] and [[ph_ngqpt]]. """, @@ -12347,7 +12924,7 @@ defaultval="0.1 meV", mnemonics="PHonons: frequency(W) STEP.", characteristics=['[[ENERGY]]'], - text=""" + text=r""" The step used to generate the (linear) frequency mesh for the phonon DOS and the Eliashberg function. The extrema of the mesh are automatically computed by the code. """, @@ -12361,18 +12938,16 @@ dimensions=['[[ntypat]]'], defaultval="[[ntypat]]", mnemonics="Path Integral fictitious MASSes", - requires="[[imgmov]]=9 or 13", - text=""" -Only relevant if [[imgmov]]=9 or 13 (Path-Integral Molecular Dynamics). -Gives the fictitious masses ( _D. Marx and M. Parrinello, J. Chem. Phys. 104, -4077 (1996)_ ) in atomic mass units for each kind of atom in cell. These -masses are the inertial masses used in performing Path Integral Molecular + requires="[[imgmov]] = 9 or 13", + text=r""" +Only relevant if [[imgmov]] = 9 or 13 (Path-Integral Molecular Dynamics). +Gives the fictitious masses ( [[cite:Marx1996]]) in atomic mass units for each kind of atom in cell. These masses are the inertial masses used in performing Path Integral Molecular Dynamics (PIMD), they are different from the true masses ([[amu]]) used to define the quantum spring that relates the different beads in PIMD. They can be chosen arbitrarily, but an appropriate choice will lead the different variables to move on the same time scale in order to optimize the sampling efficiency of the PIMD trajectory. -If [[pitransform]]=1 (normal mode transformation), or [[pitransform]]=2 +If [[pitransform]] = 1 (normal mode transformation), or [[pitransform]] = 2 (staging transformation), [[pimass]] is automatically set to its optimal value. """, ), @@ -12385,26 +12960,25 @@ dimensions="scalar", defaultval=0, mnemonics="Path-Integral Molecular Dynamics: CONSTRAINT to be applied on a reaction coordinate", - requires="[[imgmov]]=9 or 13", - text=""" + requires="[[imgmov]] = 9 or 13", + text=r""" Only relevant for Path-Integral Molecular Dynamics. Selects a constraint to be applied during the PIMD trajectory. The constraint -is holonomic (it is a relation between the position variables).In practice, +is holonomic (it is a relation between the position variables). In practice, the total forces applied to the atomic positions are modified so as to respect the constraint. + To date, the available constraints are: * **0**: no constraint * **1**: _"Blue Moon Ensemble" method_. The constraint is a linear combination of the positions of atomic centroids (this linear combination is kept constant during the simulation). -Sum[W_i * X_i]=constant +Sum[W_i * X_i] = constant The X_i are the coordinates of the atomic centroids. The weights W_i have to be specified with the [[wtatcon]](3,[[natcon]],[[nconeq]]), -[[iatcon]]([[natcon]]) and [[natcon]] input parameters (where [[nconeq]] is -fixed to 1). -More details on the implementation in: [Y. Komeiji,Chem-Bio Informatics -Journal 7, 12-23 (2007)](http://doi.org/10.1273/cbij.7.12). +[[iatcon]]([[natcon]]) and [[natcon]] input parameters (where [[nconeq]] is fixed to 1). +More details on the implementation in [[cite:Komeiji2007]]. """, ), @@ -12416,20 +12990,18 @@ dimensions="scalar", defaultval=0, mnemonics="Path Integral coordinate TRANSFORMation", - text=""" -Only relevant if [[imgmov]]=9 or 13 (Path-Integral Molecular Dynamics). + text=r""" +Only relevant if [[imgmov]] = 9 or 13 (Path-Integral Molecular Dynamics). Coordinate transformation used in the integration of the Path Integral Molecular Dynamics equations of motion. The transformation, with an appropriate choice of fictitious masses ([[pimass]]), is used to force the different modes to move on the same time scale, and thus optimize the efficiency of the statistical sampling in the corresponding statistical -ensemble. Available with a Langevin thermostat ([[imgmov]]=9) or with Nose- -Hoover chains ([[imgmov]]=13). See M. Tuckerman et al, J. Chem. Phys. 104, -5579 (1996). +ensemble. Available with a Langevin thermostat ([[imgmov]] = 9) or with Nose- +Hoover chains ([[imgmov]] = 13). See [[cite:Tuckerman1996]]. If equal to 0, no transformation is applied (primitive coordinates). -If equal to 1, normal mode transformation (in that case, [[nimage]] must be -absolutely EVEN). +If equal to 1, normal mode transformation (in that case, [[nimage]] must be absolutely EVEN). If equal to 2, staging transformation. """, ), @@ -12443,7 +13015,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions BAND Final", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the upper band to include in the calculation of Wannier functions """, @@ -12458,7 +13030,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions BAND Initial", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the lower band to include in the calculation of Wannier functions """, ), @@ -12472,7 +13044,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions COMPUTATION", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Activate computation of Projected Local Orbital Wannier functions (PLO Wannier) and corresponding band structure. Variables [[plowan_bandi]], @@ -12482,13 +13054,13 @@ * 0 --> Default value: do not activate calculation of PLO Wannier. * 1 --> Compute PLO Wannier and band structure - * 2 --> Compute PLO Wannier and band structure. In this case, the coupling in k-space between blocks of Wannier functions belonging to different angular momenta or atoms is removed. + * 2 --> Compute PLO Wannier and band structure. In this case, the + coupling in k-space between blocks of Wannier functions belonging to + different angular momenta or atoms is removed. Other related variables are [[plowan_realspace]], [[plowan_nt]], -[[plowan_it]]. The implementation is not symetrized over k-point and not -parallelized. (The calculation of projections is detailed in [ Phys. Rev. B -77, 205112, (2008) -](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.77.205112) ) +[[plowan_it]]. The implementation is not symmetrized over k-point and not +parallelized. (The calculation of projections is detailed in [[cite:Amadon2008]] ) """, ), @@ -12501,7 +13073,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions, Index of ATOM", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the indices of the [[plowan_natom]] atoms on which the projections will be done. """, @@ -12516,7 +13088,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions, Index of Translation.", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Requires [[plowan_realspace]] to be greater than 0 and [[plowan_nt]] to be greater than 0. Precise a given set of selected real space translation by using the real space vectors basis. These atoms are used to define Wannier @@ -12534,7 +13106,7 @@ defaultval=-1, mnemonics="Projected Local Orbital WANnier functions, L values to use for CALCulation", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the [[plowan_nbl]] values of angular momenta for each atom, in the order of the atoms as given in [[plowan_iatom]]. """, @@ -12549,7 +13121,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions, Number of ATOMs", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the number of atoms on which the projection will be done """, ), @@ -12563,7 +13135,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions, NumBer of L values", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the total number of angular momenta (over all atoms) to compute the projections. """, ), @@ -12578,7 +13150,7 @@ mnemonics="""Projected Local Orbital WANnier functions, Number of Translation on which the real space values of energy are computed""", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Requires [[plowan_realspace]] to be greater than 0. Gives a number of selected atoms. These atoms are used to define Wannier functions in real space. These real space Wannier functions are used as a basis to compute the Hamiltonian. @@ -12594,10 +13166,10 @@ defaultval=-1, mnemonics="Projected Local Orbital WANnier functions, PROJectors values to use for CALCulation", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Gives the [[plowan_nbl]] values of projectors for each atom, in the order of the atoms as given in [[plowan_iatom]]. The index i for the projectors refers -to the ith number on line orbitals of the PAW atomic data file. +to the i-th number on line orbitals of the PAW atomic data file. """, ), @@ -12610,7 +13182,7 @@ defaultval=0, mnemonics="Projected Local Orbital WANnier functions, activate REAL SPACE calculation.", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Can take the following values: * 0 --> Default value: do not activate calculation of real space Wannier functions. @@ -12629,12 +13201,11 @@ dimensions=[3], defaultval=MultipleValue(number=3, value=0), mnemonics="POLarization for CENtrosymmetric geometry", - text=""" + text=r""" When doing a finite electric displacement field calculation, if the structure is centrosymmetric but the polarization is non-zero (such as for AlAs), this non-zero polarization should be specified as [[polcen]] (in REDUCED -coordinates, in atomic units) in the input file. See Eq.(24) in the Suppl. of -Nat. Phys. (M. Stengel, N.A. Spaldin and D. Vanderbilt, Nat. Phys. 5,304 (2009)) +coordinates, in atomic units) in the input file. See Eq.(24) in the Suppl. of [[cite:Stengel2009]] """, ), @@ -12646,17 +13217,16 @@ dimensions="scalar", defaultval=0, mnemonics="POSitron computation of DOPPLER broadening", - text=""" -Relevant only when [[positron]]<>0. + text=r""" +Relevant only when [[positron]]/=0. This input parameter activates the calculation of the Doppler broadening of the electron-positron annihilation radiation. -An output file containing the momentum distributions of annihilating electron- -positron pairs is created. +An output file containing the momentum distributions of annihilating electron-positron pairs is created. Such a computation needs a core wave-function file (per atom type) to be -provided. This core WF file should be named '.corewf' (where - is the name of the pseudo-potential (or PAW) file) or -'corewf.abinit' (where is the index of the atom type). Core WF -files can be obtained with the atompaw tool by the use of 'prtcorewf' keyword. +provided. This core WF file should be named '**psp_file_name**.corewf' (where +**pspfile_name** is the name of the pseudo-potential (or PAW) file) or +'corewf.abinit**ityp**' (where **ityp** is the index of the atom type). Core WF +files can be obtained with the atompaw tool by the use of **prtcorewf** keyword. """, ), @@ -12668,19 +13238,19 @@ dimensions="scalar", defaultval=0, mnemonics="POSITRON calculation", - text=""" + text=r""" This input parameter can be positive or negative. Negative values for [[positron]] are only relevant for PAW calculations. Electron-positron correlation functional is defined by [[ixcpositron]]. Other relevant input parameter: [[posocc]] (occupation number for the positron). -_Positive values for [[positron]]:_ -_For **[[positron]]=1 or 2**, will perform the calculation of positron -lifetime (and annihilation rate)._ +Positive values for [[positron]]: +For [[positron]] = 1 or 2, will perform the calculation of positron +lifetime (and annihilation rate). - * [[positron]]=1**: -Starting from a previous electronic GS density (with **[[positron]]=0** ), a + * [[positron]] = 1:\n +Starting from a previous electronic GS density (with [[positron]] = 0), a positronic ground-state calculation is performed, considering that the electrons are not perturbed by the presence of the positron. This is almost correct for a positron in a perfect bulk material. But this @@ -12691,14 +13261,14 @@ At the end of the SCF cycle, the positron lifetime and annihilation rate are printed out. -_Additional information for the use of pseudopotentials: +Additional information for the use of pseudopotentials: - * PAW datasets: nothing to do; simply use usual electronic PAW datasets - * Norm-conserving pseudopotentials: One has to use specific pseudopotentials for the positron calculation. They must be of the FHI type (pspcod=6), and must contain at their end, the all-electrons core density generated with FHI98PP. They must have lmax=lloc=0 (check that this works for the electronic GS !! No ghost, etc...). Otherwise, their are similar to an usual FHI pseudopotential. -_ + PAW datasets: nothing to do; simply use usual electronic PAW datasets + Norm-conserving pseudopotentials: One has to use specific pseudopotentials for the positron calculation. They must be of the FHI type (pspcod=6), and must contain at their end, the all-electrons core density generated with FHI98PP. They must have lmax=lloc=0 (check that this works for the electronic GS !! No ghost, etc...). Otherwise, their are similar to an usual FHI pseudopotential. - * **positron=2**: -Starting from a previous positronic GS density (with **positron=1** ), an + + * [[positron]] = 2:\n +Starting from a previous positronic GS density (with [[positron]] = 1 ), an electronic ground-state calculation is performed, keeping the positronic density constant. The positronic density will be automatically read from a _DEN file (with or @@ -12706,103 +13276,92 @@ At the end of the SCF cycle, the positron lifetime and annihilation rate are printed out. -_Additional information for the use of pseudopotentials: +Additional information for the use of pseudopotentials: + + PAW datasets: nothing to do; simply use usual electronic PAW datasets + Norm-conserving pseudopotentials: One has to use specific pseudopotentials for the electron calculation. They must be of the FHI type (pspcod=6), and must contain at their end, the all-electrons core density generated with FHI98PP. - * PAW datasets: nothing to do; simply use usual electronic PAW datasets - * Norm-conserving pseudopotentials: One has to use specific pseudopotentials for the electron calculation. They must be of the FHI type (pspcod=6), and must contain at their end, the all-electrons core density generated with FHI98PP. -_ - * **Typical use**: + * **Typical use**:\n The calculation is done in several steps: -The first one is a normal GS calculation for the electrons, with **positron** -=0. The only specific thing to do is to set [[prtden]]=1 (this is the defaut +The first one is a normal GS calculation for the electrons, with [[positron]] = 0. +The only specific thing to do is to set [[prtden]] = 1 (this is the default for ABINIT v6.x+). This will create the associated _DEN file which will be used as input file for the positronic GS calculation. The second step is the GS calculation of the positron and subsequently its -lifetime, with **positron** =1. One has to define also [[ixcpositron]]. +lifetime, with [[positron]] =1. One has to define also [[ixcpositron]]. Then, it is possible to perform an additional step, computing the GS -electronic density in presence of the positron, with **positron** =2. -and so on... +electronic density in presence of the positron, with [[positron]] = 2 and so on... This procedure can be automated (for PAW only) by the use of a negative value -for **positron**. +for [[positron]]. At the end, a converged value of the positron lifetime (decomposed in several contributions) is printed. See also [[posdoppler]] keyword for the calculation of Doppler broadening. -_Negative values for **positron**:_ -_For **positron <0**, will perform an automatic calculation of electrons and +Negative values for [[positron]]:\n +For [[positron]]<0, will perform an automatic calculation of electrons and positron densities in the two-component DFT context; then will compute -positron lifetime (and annihilation rate)._ +positron lifetime (and annihilation rate). - * **positron=-1**: -Starting from scratch, will first perform an usual electronic ground-state + * [[positron]] = -1:\n +Starting from scratch, will first perform a usual electronic ground-state calculation until convergence (controlled by the use of one of the _tolerance_ keywords). Then will perform a positronic ground state calculation in presence of the electrons and ions; then an electronic ground state calculation in presence of -the positron and the ions... -and so on... until the total energy is converged. +the positron and the ions and so on until the total energy is converged. The convergence of the total energy of the ions+electrons+positron system is controlled by the use of the [[postoldfe]], [[postoldff]] and [[posnstep]] input keywords. -With **positron=-1**, at the beginning of each new electronic/positronic +With [[positron]] = -1, at the beginning of each new electronic/positronic step, the wave functions are unknown. - * **positron=-10**: -Same as **positron=-1** except that the electronic/positronic wave functions + * [[positron]] = -10:\n +Same as [[positron]] = -1 except that the electronic/positronic wave functions are stored in memory. Consequently, the total number of iterations to reach the convergence -(diff_Etotal <[[postoldfe]] or diff_Forces<[[postoldff]]) is smaller. +($\Delta$Etotal<[[postoldfe]] or $\Delta$Forces<[[postoldff]]) is smaller. But, this can increase the total amount of memory needed by the code. - * **positron=-2**: -Same as **positron=-1** except that the two-component DFT cycle is forced to + * [[positron]] = -2:\n +Same as [[positron]] = -1 except that the two-component DFT cycle is forced to stop at the end of an electronic step. - * **positron=-20**: -Same as **positron=-10** except that the two-component DFT cycle is forced to + * [[positron]] = -20:\n +Same as [[positron]] = -10 except that the two-component DFT cycle is forced to stop at the end of an electronic step. -_Advice for use:_ +Advice for use: There are two typical cases which have to be differently treated: - * **A positron in a perfect _bulk_ system**: + * **A positron in a perfect _bulk_ system**:\n In that case, the positron is delocalized in the whole crystal. Its density is almost zero. Thus, the "zero density positron limit" has to be used. [[ixcpositron]] has to -be choosen accordingly. -In order to have the zero density positron limit it is adviced to follow these +be chosen accordingly. +In order to have the zero density positron limit it is advised to follow these points: -1- Put a small positronic charge (by setting a [[posocc]] to a small value) -**OR** use a big supercell. -2- Use only k=gamma wave vector for the positronic calculation. -3- Use the manual procedure in 2 steps: first **positron** =0 and then -**positron** =1; avoid the **positron=2** step and the automatic procedure ( -**positron** <0). + + * 1- Put a small positronic charge (by setting a [[posocc]] to a small value) **OR** use a big supercell. + * 2- Use only k=$\Gamma$ wave vector for the positronic calculation. + * 3- Use the manual procedure in 2 steps: first [[positron]] = 0 and then [[positron]] = 1; avoid the [[positron]] = 2 step and the automatic procedure ([[positron]]<0). + In principle, the positron lifetime should converge with the value of [[posocc]] or the size of the supercell. - * **A positron trapped in a _default_ (vacancy...)**: + * **A positron trapped in a _default_ (vacancy)**:\n In that case, the positron is localized in the default. Its density can be localized in the simulation cell (provided that the cell is sufficiently large) and influences the electronic density. -So, it is advised to use the automatic procedure ( **positron** <0) or the -manual procedure with several **positron** =0,1,2,1,... steps. +So, it is advised to use the automatic procedure ([[positron]]<0) or the +manual procedure with several [[positron]] = 0,1,2,1,... steps. K-points can be used as in usual electronic calculations. Also note that it is possible to use forces and stresses to perform structural minimization. -References: - -**[1]** J. Arponen and E. Pajanne, Ann. Phys. (N.Y.) 121, 343 (1979). -**[2]** Boronski and R.M. Nieminen, Phys. Rev. B 34, 3820 (1986). -**[3]** P.A. Sterne and J.H. Kaiser, Phys. Rev. B 43, 13892 (1991). -**[4]** M.J. Puska, A.P. Seitsonen and R.M. Nieminen, Phys. Rev. B 52, 10947 -(1994). -**[5]** B. Barbiellini, M.J. Puska, T. Torsti and R.M.Nieminen, Phys. Rev. B -51, 7341 (1994) +References: [[cite:Arponen1979a]], [[cite:Boronski1986]], [[cite:Sterne1991]], [[cite:Puska1995]], [[cite:Barbiellini1995]] """, ), @@ -12814,13 +13373,13 @@ dimensions="scalar", defaultval=50, mnemonics="POSitron calculation: max. Number of STEPs for the two-component DFT", - text=""" + text=r""" Relevant only when [[positron]]<0. Sets the maximum number of electronic/positronic iterations that, when reached, will cause the two-component DFT SCF cycle to stop. The code will first compute the electronic ground-state, then the positronic -ground state in the electronic density, then the electronic ground-state in -the positronic density until diff_Etotal<[[postoldfe]] or diff_Forces<[[postoldff]] or the number +ground state in the electronic density, then the electronic ground state in +the positronic density until $\Delta$Etotal<[[postoldfe]] or $\Delta$Forces<[[postoldff]] or the number of electronic/positronic steps is [[posnstep]]. """, ), @@ -12833,7 +13392,7 @@ dimensions="scalar", defaultval=1, mnemonics="POSitron calculation: OCCupation number for the positron", - text=""" + text=r""" Relevant only when [[positron]]/=0. Sets the occupation number for the positron. Has to be <=1. Changing [[posocc]] is only useful for bulk calculation when one wants to @@ -12849,19 +13408,19 @@ vartype="real", topics=['positron_basic'], dimensions="scalar", - defaultval=ValueWithConditions({'[[postoldff]]=0': 1e-06, 'defaultval': 0.0}), + defaultval=ValueWithConditions({'[[postoldff]] = 0': 1e-06, 'defaultval': 0.0}), mnemonics="POSitron calculation: TOLerance on the DiFference of total Energy", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Relevant only when [[positron]]<0. Sets a tolerance for absolute difference of total energy (of _ions+electrons+positron_ system) that, when reached, will cause the SCF cycle to stop before the number of steps is [[nstep]] or the number of electronic/positronic steps is [[posnstep]]. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **toldfe** has +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[postoldfe]] has the [[ENERGY]] characteristics. -Only one and only one of [[postoldfe]] or [[postoldff]] can be set. +One and only one of [[postoldfe]] or [[postoldff]] can be set. """, ), @@ -12873,13 +13432,13 @@ dimensions="scalar", defaultval=0, mnemonics="POSitron calculation: TOLerance on the DiFference of Forces", - text=""" -Relevant only when [[positron]]<0. -Sets a tolerance for absolute difference of maximum force acting on ions (due + text=r""" +Relevant only when [[positron]] < 0. +Sets a tolerance for absolute difference of maximum force (in hartree/Bohr) acting on ions (due to _ions+electrons+positron_ system) that, when reached, will cause the SCF cycle to stop before the number of SCF steps is [[nstep]] or the number of electronic/positronic steps is [[posnstep]]. -Only one and only one of [[postoldfe]] or [[postoldff]] can be set. +One and only one of [[postoldfe]] or [[postoldff]] can be set. """, ), @@ -12893,11 +13452,11 @@ mnemonics="Plasmon Pole Model FReQuency", characteristics=['[[ENERGY]]'], requires="[[optdriver]] in [3,4]", - text=""" + text=r""" **In plasmon-pole calculations** Usually only effective if GW corrections are evaluated using the plasmon-pole -model of Godby-Needs ([[ppmodel]]==1). +model of Godby-Needs ([[ppmodel]] == 1). In the present status of the GW code, the convolution in frequency space defining the self-energy operator can be evaluated using two different @@ -12909,7 +13468,7 @@ Alternatively, it is possible to approximate the dynamical behaviour of the screened interaction through simple analytical expressions, the so-called plasmon-pole models. In the plasmon-pole model proposed by Godby-Needs -([[ppmodel]]=1), the screening must be available at zero frequency, as well as +([[ppmodel]] = 1), the screening must be available at zero frequency, as well as at another imaginary frequency, of the order of the plasmon frequency (the peak in the EELS spectrum). This information is used to model the behaviour of the dielectric matrix for all frequencies. During the calculation of the @@ -12943,19 +13502,19 @@ defaultval=1, mnemonics="Plasmon Pole MODEL", requires="[[optdriver]] in [3,4]", - text=""" - * [[ppmodel]]=1: PP model of Godby and Needs, See Phys Rev Lett 62, 1169 (1989) - * [[ppmodel]]=2: PP model of Hybertsen and Louie, See Phys Rev B 34, 5390 (1986) - * [[ppmodel]]=3: PP model of W. von der Linden and P. Horsh see Phys Rev B 37, 8351 (1988) - * [[ppmodel]]=4: PP model of Farid and Engel. See Phys Rev B47,15931 (1993) - * [[ppmodel]]=0: no PP model, numerical integration (contour deformation method, see e.g. S. Lebegue et al. PRB 67, 155208 (2003).) + text=r""" + * [[ppmodel]] = 1: PP model of Godby and Needs [[cite:Godby1989]]. + * [[ppmodel]] = 2: PP model of Hybertsen and Louie [[cite:Hybertsen1986]]. + * [[ppmodel]] = 3: PP model of W. von der Linden and P. Horsh [[cite:vonderLinden1988]]. + * [[ppmodel]] = 4: PP model of Farid and Engel [[cite:Engel1993]]. + * [[ppmodel]] = 0: no PP model, numerical integration (contour deformation method [[cite:Lebegue2003]]). Please note the difference between [[ppmodel]] 1 and [[ppmodel]] 2,3,4. In the -first case ([[ppmodel]]=1), the plasmon-pole parameters are determined in +first case ([[ppmodel]] = 1), the plasmon-pole parameters are determined in order to reproduce the behaviour of the dielectric matrix at two calculated -frequencies: the static limit (omega=0) and the imaginary frequency defined by +frequencies: the static limit ($\omega=0$) and the imaginary frequency defined by [[ppmfrq]]. In the last three cases, instead, the plasmon-pole parameters are -found by using the dielectric matrix calculated only at omega=0 and enforcing +found by using the dielectric matrix calculated only at $\omega=0$ and enforcing the so-called f-sum rule. See also [[nfreqre]]. Please note also that in the case of [[ppmodel]] 4, the plasmon energies are @@ -12969,16 +13528,18 @@ abivarname="prepanl", varset="dfpt", vartype="integer", - topics=['nonlinear_basic'], + topics=['nonlinear_compulsory'], dimensions="scalar", defaultval=0, mnemonics="PREPAre Non-Linear response calculation", - text=""" + text=r""" The computation of third-order derivatives from the 2n+1 theorem requires the first-order wavefunctions and densities obtained from a linear response -calculation. The standard approach in a linear response calculation is (i) to -compute only the irreducible perturbations, and (ii) to use symmetries to -reduce the number of k-points for the k-point integration. +calculation. The standard approach in a linear response calculation is: + + * compute only the irreducible perturbations; + * use symmetries to reduce the number of k-points for the k-point integration. + This approach cannot be applied, presently (v4.1), if the first-order wavefunctions are to be used to compute third-order derivatives. First, for electric fields, the code needs the derivatives along the three directions. @@ -12986,9 +13547,13 @@ Second, for both electric fields and phonons, the wavefunctions must be available in half the BZ (kptopt=2), or the full BZ (kptopt=3). During the linear response calculation, in order to prepare a non-linear -calculation, one should put [[prepanl]] to 1 in order to force ABINIT (i) to +calculation, one should put [[prepanl]] to 1 in order to force ABINIT to compute the electric field perturbation along the three directions explicitly, -and (ii) to keep the full number of k-points. +and to keep the full number of k-points. + +In the case of a 2nd derivative of wavefunction ([[rf2_dkdk]] or [[rf2_dkde]]), +[[prepanl]] == 1 can be used in order to skip directions of perturbations that +will not be used by the non-linear routine (see [[rf2_dkdk]] for more details). """, ), @@ -13000,7 +13565,7 @@ dimensions="scalar", defaultval=0, mnemonics="PREPAre GKK calculation", - text=""" + text=r""" The calculation of electron-phonon coupling quantities requires the presence of all the perturbations (all atoms in all directions) for the chosen set of (irreducible) q-points. To impose this and prevent ABINIT from using symmetry @@ -13018,7 +13583,7 @@ defaultval=0, mnemonics="PREPare Self-Consistent PHONon calculation", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Print PCINFO, PHFREQ, and PHVEC files, for use with self-consistent phonon runs, after a perturbation calculation. Only prints out files for the present q-point, and there is presently no tool to symmetrize or merge these files, so @@ -13035,7 +13600,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT 1-DiMensional potential and density", - text=""" + text=r""" If set >= 1, provide one-dimensional projection of potential and density, for each of the three axis. This corresponds to averaging the potential or the density on bi-dimensional slices of the FFT grid. @@ -13051,12 +13616,12 @@ defaultval=0, mnemonics="PRinT by ATom LIST of ATom", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" This is an array of the numbers associated to the index atoms that the user want to print in the output or log files, this is useful when you have a large number of atoms and you are only interested to follow specific atoms, the numbers associated should be consistent with the list in [[xcart]] or -[[xred]]. This input varible does not affect the contents of the "OUT.nc" or +[[xred]]. This input variable does not affect the contents of the "OUT.nc" or "HIST.nc", those are NetCDF files containing the information about all the atoms. """, ), @@ -13069,10 +13634,9 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT Band-By-Band decomposition", - text=""" + text=r""" If [[prtbbb]] is 1, print the band-by-band decomposition of Born effective -charges and localization tensor, in case they are computed. See Ph. Ghosez and -X. Gonze, J. Phys.: Condens. Matter 12, 9179 (2000). +charges and localization tensor, in case they are computed. See [[cite:Ghosez2000]]. """, ), @@ -13085,11 +13649,9 @@ defaultval=0, mnemonics="PRinT output for BoLTZTRaP code", characteristics=['[[DEVELOP]]'], - text=""" -Print out geometry (_BLZTRP_GEOM) and eigenenergy (_BLZTRP_EIGEN) files for -the [ BoltzTraP -code](https://www.imc.tuwien.ac.at/forschungsbereich_theoretische_chemie/forschungsgruppen/prof_dr_gkh_madsen_theoretical_materials_chemistry/boltztrap/) -by Georg Madsen. + text=r""" +Print out geometry _BLZTRP_GEOM and eigenenergy _BLZTRP_EIGEN files for +the [BoltzTraP code](https://www.imc.tuwien.ac.at/forschungsbereich_theoretische_chemie/forschungsgruppen/prof_dr_gkh_madsen_theoretical_materials_chemistry/boltztrap/) by Georg Madsen. """, ), @@ -13102,7 +13664,7 @@ defaultval=0, mnemonics="PRinT Crystallographic Information File", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" If set to 1, a CIF file is output with the crystallographic data for the present run (cell size shape and atomic positions). """, @@ -13114,18 +13676,18 @@ vartype="integer", topics=['printing_prden'], dimensions="scalar", - defaultval=ValueWithConditions({'[[nimage]]>1': 0, 'defaultval': 1}), + defaultval=ValueWithConditions({'[[nimage]] > 1': 0, 'defaultval': 1}), mnemonics="PRinT the DENsity", - text=""" + text=r""" If set to 1 or a larger value, provide output of electron density in real space rho(r), in units of electrons/Bohr^3. -If [[ionmov]]==0, the name of the density file will be the root output name, +If [[ionmov]] == 0, the name of the density file will be the root output name, followed by _DEN. -If [[ionmov]]==1 or 2, density files will be output at each time step, with +If [[ionmov]] /= 0, density files will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _DEN The file structure of this unformatted output file is described in [[help:abinit#denfile|this section]]. @@ -13136,11 +13698,11 @@ * followed by _DEN_x, where x is 0000 or 0001 alternatively. * The most recent of the two files should be used for restart, and copied to root input name_DS2_DEN * To perform a restart, in a multidataset mode, use ndtset 2 and jdtset 2 3 (that is 2 datasets, numbered 2 and 3) - * In the dataset 2, get the density you just copied (getden2 -1), perform a non selfconsistent calculation and print the wave function (prtwf2 1) + * In the dataset 2, get the density you just copied (getden2 -1), perform a non self-consistent calculation and print the wave function (prtwf2 1) * In the dataset 3, get the previous wf(getwfk3 -1), and continue the calculation * This complicated procedure is due to the fact that reading the density is only allowed for a non sc calculation, and also for a dataset different of 0 or the previous one, the option we choose here. -Please note that in the case of PAW ([[usepaw]]=1) calculations, the _DEN +Please note that in the case of PAW ([[usepaw]] = 1) calculations, the _DEN density output is not the full physical electron density. If what is wanted is the full physical electron density, say for post-processing with [[help:aim|AIM]] or visualization, prtden > 1 will produce physical electron density or other interesting quantities (see below). @@ -13149,7 +13711,7 @@ is necessary to use the _DEN files and **not** one of the other files produced with prtden > 1, i.e. _PAWDEN, ATMDEN_xxx or else. Note that the usual _DEN file is always generated as soon as prtden >= 1. Options 2 to 6 for prtden are -relevant only for [[usepaw]]=1 and control the output of the full electron +relevant only for [[usepaw]] = 1 and control the output of the full electron density in the PAW case: @@ -13195,7 +13757,7 @@ dimensions="scalar", defaultval=ValueWithConditions({'defaultval': 1}), mnemonics="PRinT integral of DENsity inside atomic SPHeres", - text=""" + text=r""" When this flag is activated, values of integral(s) of total density inside sphere(s) around each atom are printed in output file (for each spin component). Spheres around atoms are defined by a radius given by [[ratsph]] keyword. @@ -13210,7 +13772,7 @@ sphere, in which case a sudden jump occurs. However, since the purpose of this output is to get a rough idea of the repartition of the density, this is not a real problem. If you are interested in a more accurate estimation of the -density within a sphere, you should use the cut3d postprocessor. +density within a sphere, you should use the cut3d postprocessor ([[help:cut3d]]). """, ), @@ -13223,7 +13785,7 @@ defaultval=0, mnemonics="PRinT DIPOLE", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Print out dipole of unit cell, calculated in real space for the primitive cell only. Under development. """, @@ -13237,79 +13799,81 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Density Of States", - text=""" + text=r""" Provide output of Density of States if set to 1, 2 or 3. Can either use a -smearing technique ([[prtdos]]=1), or the tetrahedron method ([[prtdos]]=2). -If [[prtdos]]=3, provide output of Local Density of States inside a sphere +smearing technique ([[prtdos]] = 1), or the tetrahedron method ([[prtdos]] = 2). +If [[prtdos]] = 3, provide output of Local Density of States inside a sphere centered on an atom, as well as the angular-momentum projected DOS, in the same sphere. The resolution of the linear grid of energies for which the DOS is computed can be tuned thanks to [[dosdeltae]]. -If [[prtdos]]=1, the smeared density of states is obtained from the +If [[prtdos]] = 1, the smeared density of states is obtained from the eigenvalues, properly weighted at each k point using [[wtk]], and smeared according to [[occopt]] and [[tsmear]]. All levels that are present in the -calculation are taken into account (occupied and unoccupied). Note that -[[occopt]] must be between 3 and 7. Also note that the sampling of the -Brillouin Zone that is needed to get a converged DOS is usually much finer -than the sampling needed to converge the total energy or the geometry of the -system, unless [[tsmear]] is very large (hence the DOS is not obtained -properly).. A separate convergence study is needed. -In order to compute the DOS of an insulator with [[prtdos]]=1, compute its +calculation are taken into account (occupied and unoccupied). +In order to compute the DOS of an insulator with [[prtdos]] = 1, compute its density thanks to a self-consistent calculation (with a non-metallic -[[occopt]] value, 0, 1 or 2), then use [[prtdos]]=1, together with -[[iscf]]=-3, and a metallic [[occopt]], between 3 and 7, providing the needed -smearing. If [[prtdos]]=1, the name of the DOS file is the root name for the +[[occopt]] value, 0, 1 or 2), then use [[prtdos]] = 1, together with +[[iscf]] = -3, and a metallic [[occopt]], between 3 and 7, providing the needed +smearing. If [[prtdos]] = 1, the name of the DOS file is the root name for the output files, followed by "_DOS". -If [[prtdos]]=2, the DOS is computed using the tetrahedron method. As in the -case of [[prtdos]]=1, all levels that are present in the calculation are taken + * Note 1: [[occopt]] must be between 3 and 7. + * Note 2: The sampling of the Brillouin Zone that is needed to get a converged DOS + is usually much finer than the sampling needed to converge the total energy or the geometry of the +system, unless [[tsmear]] is very large (hence the DOS is not obtained +properly). A separate convergence study is needed. + + +If [[prtdos]] = 2, the DOS is computed using the tetrahedron method. As in the +case of [[prtdos]] = 1, all levels that are present in the calculation are taken into account (occupied and unoccupied). In this case, the k-points must have been defined using the input variable [[ngkpt]] or the input variable [[kptrlatt]]. There must be at least two non-equivalent points in the -Irreducible Brillouin Zone to use [[prtdos]]=2. It is strongly advised to use -a non-shifted k-point grid ([[shiftk]] 0 0 0): such grids contain naturally +Irreducible Brillouin Zone to use [[prtdos]] = 2. It is strongly advised that you use +a non-shifted k-point grid ([[shiftk]] 0 0 0): such grids naturally contain more extremal points (band minima and maxima at Gamma or at the zone- boundaries) than shifted grids, and lead to more non-equivalent points than shifted grids, for the same grid spacing. There is no need to take care of the [[occopt]] or [[tsmear]] input variables, and there is no subtlety to be taken into account for insulators. The computation can be done in the self- -consistent case as well as in the non-self-consistent case, using [[iscf]]=-3. -This allows to refine the DOS at fixed starting density. -In that case, if [[ionmov]]==0, the name of the potential file will be the -root output name, followed by _DOS (like in the [[prtdos]]=1 case). -However, if [[ionmov]]==1 or 2, potential files will be output at each time +consistent case as well as in the non-self-consistent case, using [[iscf]] = -3. +This allows one to refine the DOS at fixed starting density. +In that case, if [[ionmov]] == 0, the name of the potential file will be the +root output name, followed by _DOS (like in the [[prtdos]] = 1 case). +However, if [[ionmov]] /= 0, potential files will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _DOS. -If [[prtdos]]=3, the same tetrahedron method as for [[prtdos]]=2 is used, but +If [[prtdos]] = 3, the same tetrahedron method as for [[prtdos]] = 2 is used, but the DOS inside a sphere centered on some atom is delivered, as well as the angular-momentum projected (l=0,1,2,3,4) DOS in the same sphere. The preparation of this case, the parameters under which the computation is to be -done, and the file denomination is similar to the [[prtdos]]=2 case. However, +done, and the file denomination is similar to the [[prtdos]] = 2 case. However, three additional input variables might be provided, describing the atoms that are the center of the sphere (input variables [[natsph]] and [[iatsph]]), as well as the radius of this sphere (input variable [[ratsph]]). -In case of PAW, [[ratsph]] radius has to be greater or equal to largest PAW +In case of PAW, [[ratsph]] radius has to be greater or equal to the largest PAW radius of the atom types considered (which is read from the PAW atomic data -file; see rc_sph or r_paw). Additional printing and/or approximations in PAW +file; see rc_sph or r_paw). Additionally, printing and/or approximations in PAW mode can be controlled with [[pawprtdos]] keyword (in -particular,[[pawprtdos]]=2 can be used to compute quickly a very good +particular,[[pawprtdos]] = 2 can be used to compute quickly a very good approximation of the DOS). -Note 1: when [[prtdos]]=3, it is possible to output m-decomposed LDOS in _DOS + * Note 1: when [[prtdos]] = 3, it is possible to output m-decomposed LDOS in _DOS file; simply use [[prtdosm]] keyword. -Note 2: the integrated total DOS in spheres around atoms can be obtained when + * Note 2: the integrated total DOS in spheres around atoms can be obtained when [[prtdensph]] flag is activated. It can be compared to the integrated DOS -provided in _DOS file when [[prtdos]]=3. +provided in _DOS file when [[prtdos]] = 3. -[[prtdos]]=4 delivers the sphere-projected DOS (like [[prtdos]]=3), on the -basis of a smearing approach (like [[prtdos]]=1) +[[prtdos]] = 4 delivers the sphere-projected DOS (like [[prtdos]] = 3), on the +basis of a smearing approach (like [[prtdos]] = 1) -[[prtdos]]=5 delivers the spin-spin DOS in the [[nspinor]]==2 case, using the -tetrahedron method (as [[prtdos]]=2). +[[prtdos]] = 5 delivers the spin-spin DOS in the [[nspinor]] == 2 case, using the +tetrahedron method (as [[prtdos]] = 2). """, ), @@ -13321,8 +13885,8 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Density Of States with M decomposition", - text=""" -Relevant only when [[prtdos]]=3. + text=r""" +Relevant only when [[prtdos]] = 3. If set to 1, the m-decomposed LDOS is delivered in DOS file. Note that [[prtdosm]] computes the M-resolved partial dos for complex spherical harmonics,giving e.g. DOS(L,M) == DOS(L,-M) (without spin-orbit). In @@ -13342,14 +13906,14 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[nimage]] > 1': 0, 'defaultval': 1}), mnemonics="PRinT Electron BANDS", - text=""" + text=r""" This option activates the output of the electron eigenvalues. Possible values: - * 0 Disable the output of the band energies. - * 1 Write eigenvalues in xmgrace format. A file with extension `EBANDS.agr` is produced at the end of the run. + * 0- Disable the output of the band energies. + * 1- Write eigenvalues in xmgrace format. A file with extension `EBANDS.agr` is produced at the end of the run. Use `xmgrace file_EBANDS.agr` to visualize the band energies - * 2 Write eigenvalues in gnuplot format. The code produces a `EBANDS.dat` file with the eigenvalues - and a `EBANDS.gnuplot` script. Use `gnuplot file_EBANDS.gnuplot` to visualize the band energies. + * 2- Write eigenvalues in gnuplot format. The code produces a `EBANDS.dat` file with the eigenvalues + and a `file_EBANDS.gnuplot` script. Use `gnuplot file_EBANDS.gnuplot` to visualize the band energies. """, ), @@ -13361,14 +13925,38 @@ dimensions="scalar", defaultval=0, mnemonics="PRint Electric Field Gradient", - requires="[[usepaw]]==1, [[quadmom]]", - text=""" - * If nonzero, calculate the electric field gradient at each atomic site in the unit cell. Using this option requires [[quadmom]] to be set as well. Values will be written to main output file (search for Electric Field Gradient). If prtefg=1, only the quadrupole coupling in MHz and asymmetry are reported. If prtefg=2, the full electric field gradient tensors in atomic units are also given, showing separate contributions from the valence electrons, the ion cores, and the PAW reconstruction. If prtefg=3, then in addition to the prtefg=2 output, the EFGs are computed using an ionic point charge model. This is useful for comparing the accurate PAW-based results to those of simple ion-only models. Use of prtefg=3 requires that the variable [[ptcharge]] be set as well. + requires="[[usepaw]] == 1, [[quadmom]]", + text=r""" +If nonzero, calculate the electric field gradient at each atomic site in the unit cell. +Using this option requires [[quadmom]] to be set as well. +Values will be written to main output file (search for Electric Field Gradient). +If prtefg=1, only the quadrupole coupling in MHz and asymmetry are reported. +If prtefg=2, the full electric field gradient tensors in atomic units are also given, +showing separate contributions from the valence electrons, the ion cores, and the PAW reconstruction. +If prtefg=3, then in addition to the prtefg=2 output, the EFGs are computed using an ionic point charge model. +This is useful for comparing the accurate PAW-based results to those of simple ion-only models. +Use of prtefg=3 requires that the variable [[ptcharge]] be set as well. The option prtefg is compatible with spin polarized calculations (see [[nspden]]) and also LDA+U (see [[usepawu]]). """, ), +Variable( + abivarname="prtefmas", + varset="dfpt", + vartype="integer", + topics=['printing_prngs', 'EffectiveMass_useful'], + dimensions="scalar", + defaultval=1, + mnemonics="PRint EFfective MASs data", + requires="[[efmas]] == 1", + text=r""" +If 1, at the end of an effective mass calculation ([[efmas]] = 1), create a file *_EFMAS, that +contains the generalized second-order k-derivatives, see Eq.(66) in [[cite:Laflamme2016]], +in view of further processing. +""", +), + Variable( abivarname="prteig", varset="files", @@ -13377,7 +13965,7 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[nimage]] > 1': 0, 'defaultval': 1}), mnemonics="PRinT EIGenenergies", - text=""" + text=r""" If set to 1, a file *_EIG, containing the k-points and one-electron eigenvalues is printed. """, ), @@ -13390,7 +13978,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT Electron Localization Function (ELF)", - text=""" + text=r""" If set to 1 or a larger value, provide output of ELF in real space elf(r). This is a dimensionless quantity bounded between 0 and 1. The name of the ELF file will be the root output name, followed by _ELF. @@ -13411,7 +13999,7 @@ /doc/theory/ELF of your ABINIT repository) Please note that ELF is **not** yet implemented in the case of PAW -([[usepaw]]=1) calculations. +([[usepaw]] = 1) calculations. """, ), @@ -13423,26 +14011,41 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT Fermi Contact term", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" * If set to 1, print the Fermi contact interaction at each nuclear site, that is, the electron density at each site. The result appears in the main output file (search for FC). Note that this calculation is different than what is done by cut3d, because it also computes the PAW on-site corrections in addition to the contribution from the valence pseudo-wavefunctions. """, ), Variable( - abivarname="prtfsurf", - varset="files", + abivarname="prtfull1wf", + varset="dfpt", vartype="integer", - topics=['printing_prfermi'], + topics=['DFPT_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="PRinT FULL 1st-order WaveFunction", + text=r""" +If set to 1, the output _1WF files will contain the full 1st-order wavefunctions, for both valence and conduction bands. +Otherwise, the _1WF files are not really 1st-order perturbed wavefunctions, but merely a set of perturbed wavefunctions that yield the correct perturbed density. +This is used when one expect to perform post-processing of the 1st-order wavefunctions. +""", +), + +Variable( + abivarname="prtfsurf", + varset="files", + vartype="integer", + topics=['printing_prfermi'], dimensions="scalar", defaultval=0, mnemonics="PRinT Fermi SURFace file", - text=""" + text=r""" If set to 1, provide Fermi surface file in the BXSF format (Xcrysden) If -[[prtfsurf]]=1, a _BXSF file readable by [ XCrySDen ](http://www.xcrysden.org) +[[prtfsurf]] = 1, a _BXSF file readable by [XCrySDen](http://www.xcrysden.org) will be produced at the end of the calculation. The file contains information on the band structure of the system and can be used to visualize the Fermi -surface or any other energy isosurface. [[prtfsurf]]=1 is compatible only with +surface or any other energy isosurface. [[prtfsurf]] = 1 is compatible only with SCF calculations ([[iscf]] > 1) or NSCF runs in which the occupation factors and Fermi level are recalculated once convergence is achieved ([[iscf]] = -3). The two methods should produce the same Fermi surface provided that the @@ -13461,12 +14064,11 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Gradient of electron DENsity", - text=""" + text=r""" If set to 1 or a larger value, provide output of gradient of electron density in real space grho(r), in units of Bohr^-(5/2). The names of the gradient of electron density files will be the root output -name, followed by _GDEN1, _GDEN2, GDEN3 for each principal direction (indeed -it is a vector). +name, followed by _GDEN1, _GDEN2, GDEN3 for each principal direction (indeed it is a vector). Like a _DEN file, it can be analyzed by cut3d. The file structure of this unformatted output file is described in [[help:abinit#denfile|this section]]. """, @@ -13480,24 +14082,24 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the GEOmetry analysis", - text=""" + text=r""" If set to 1 or a larger value, provide output of geometrical analysis (bond lengths and bond angles). The value of [[prtgeo]] is taken by the code to be the maximum coordination number of atoms in the system. It will deduce a maximum number of "nearest" and "next-nearest" neighbors accordingly, and compute corresponding bond lengths. It will compute bond angles for the "nearest" neighbours only. -If [[ionmov]]==0, the name of the file will be the root output name, followed by _GEO. -If [[ionmov]]==1 or 2, one file will be output at each time step, with the +If [[ionmov]] == 0, the name of the file will be the root output name, followed by _GEO. +If [[ionmov]] /= 0, one file will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _GEO The content of the file should be rather self-explanatory. No output is provided by [[prtgeo]] is lower than or equal to 0. -If [[prtgeo]]>0, the maximum number of atoms ([[natom]]) is 9999. +If [[prtgeo]] > 0, the maximum number of atoms ([[natom]]) is 9999. """, ), @@ -13509,12 +14111,12 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the GKK matrix elements file", - text=""" + text=r""" If set to 1, provide output of electron-phonon "gkk" matrix elements, for further treatment by mrggkk utility or anaddb utility. Note that symmetry will be disabled for the calculation of the perturbation, forcing the inclusion of all k-points and all perturbation directions. Additional information on -electron-phonon treatment in ABINIT is given in the tutorial [[lesson:eph]]. +electron-phonon treatment in ABINIT is given in the tutorial [[tutorial:eph]]. """, ), @@ -13526,7 +14128,7 @@ dimensions="scalar", defaultval="prtgsr = 0", mnemonics="PRinT the GSR file", - text=""" + text=r""" If set to 1, ABINIT will produce a GSR file at the end of the GS calculation. The GSR file contains the most important GS results (band structure, forces, stresses, electronic density). The GSR file can be read by AbiPy and used for further post-processing. @@ -13540,9 +14142,9 @@ vartype="integer", topics=['printing_prden'], dimensions="scalar", - defaultval=0, + defaultval="1 if [[usekden]] == 1 and [[nimage]] == 1 else 0", mnemonics="PRinT the Kinetic energy DENsity", - text=""" + text=r""" If set to 1 or a larger value, provide output of kinetic energy density in real space tau(r), in units of Bohr^-5. The name of the kinetic energy density file will be the root output name, followed by _KDEN. @@ -13551,7 +14153,7 @@ Note that the computation of the kinetic energy density must be activate, thanks to the input variable [[usekden]]. Please note that kinetic energy density is **not** yet implemented in the case -of PAW ([[usepaw]]=1) calculations. +of PAW ([[usepaw]] = 1) calculations. """, ), @@ -13563,7 +14165,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the K-PoinTs sets", - text=""" + text=r""" If set /= 0, proceeds to a detailed analysis of different k point grids. Works only if [[kptopt]] is positive, and neither [[kptrlatt]] nor [[ngkpt]] are defined. ABINIT will stop after this analysis. @@ -13572,13 +14174,13 @@ In each set, ABINIT increases the length of vectors of the supercell (see [[kptrlatt]]) by integer steps. The different sets are labelled by "iset". For each k point grid, [[kptrlen]] and [[nkpt]] are computed (the latter always -invoking [[kptopt]]=1, that is, full use of symmetries). A series is finished +invoking [[kptopt]] = 1, that is, full use of symmetries). A series is finished when the computed [[kptrlen]] is twice larger than the input variable [[kptrlen]]. After the examination of the different sets, ABINIT summarizes, for each [[nkpt]], the best possible grid, that is, the one with the largest computed [[kptrlen]]. -Note that this analysis is also performed when [[prtkpt]]=0, as soon as +Note that this analysis is also performed when [[prtkpt]] = 0, as soon as neither [[kptrlatt]] nor [[ngkpt]] are defined. But, in this case, no analysis report is given, and the code selects the grid with the smaller [[ngkpt]] for the desired [[kptrlen]]. However, this analysis takes some times (well @@ -13586,7 +14188,7 @@ [[kptrlen]]), and it is better to examine the full analysis for a given cell and set of symmetries, [[shiftk]] for all the production runs. -if set to -2, the code stops in invars1 after the computation of the +If set to -2, the code stops in invars1 after the computation of the irreducible set and a file named kpts.nc with the list of the k-points and the corresponding weights is produced """, @@ -13600,7 +14202,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Laplacian of electron DENsity", - text=""" + text=r""" If set to 1 or a larger value, provide output of Laplacian of electron density in real space grho(r), in units of Bohr^-(7/2). The name of the Laplacian of electron density file will be the root output name, followed by _LDEN. @@ -13617,9 +14219,9 @@ dimensions="scalar", defaultval=0, mnemonics="PRint NABLA", - requires="[[usepaw]]==1", - text=""" - * If set to 1, calculate the matrix elements and write it in file _OPT to be read by the code conducti. + requires="[[usepaw]] == 1", + text=r""" + * If set to 1, calculate the matrix elements and write it in file _OPT to be read by the code conducti (see [[cite:Mazevet2010]]). """, ), @@ -13632,7 +14234,7 @@ defaultval=0, mnemonics="PRinT NESTing function", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" If set to 1, the nesting function for the k-point grid is printed. For the moment the path in q space for the nesting function is fixed, but will become an input as well. @@ -13647,14 +14249,14 @@ dimensions="scalar", defaultval=1, mnemonics="PRinT PHonon BANDS", - text=""" + text=r""" This option activates the output of the phonon frequencies in the EPH code. Possible values: * 0 Disable the output of the phonon frequencies. - * 1 Write frequencies in xmgrace format. A file with extension `PHBANDS.agr` is produced. + * 1 Write frequencies in |xmgrace| format. A file with extension `PHBANDS.agr` is produced. Use `xmgrace file_PHBANDS.agr` to visualize the data - * 2 Write frequencies in gnuplot format. The code produces a `PHBANDS.dat` file + * 2 Write frequencies in |gnuplot| format. The code produces a `PHBANDS.dat` file with the eigenvalues and a `PHBANDS.gnuplot` script. Use `gnuplot file_PHBANDS.gnuplot` to visualize the phonon band structure. """, @@ -13669,8 +14271,11 @@ defaultval=1, mnemonics="PRinT the PHonon Density Of States", characteristics=['[[DEVELOP]]'], - text=""" -Print the phonon density of states. It is activated by default when [[optdriver]]==7. + text=r""" +Print the phonon density of states. It is activated by default when [[optdriver]] == 7. + +Note also that this variable activates the computation of the generalized Eliashberg function +associated to the electron-phonon self-energy when [[eph_task]] in [-4, 4]. """, ), @@ -13682,12 +14287,12 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT PHonon iso-SURFace", - text=""" + text=r""" Print a bxsf file (Xcrysden format) with the (interpolated) phonon frequencies computed of the q-mesh determined by [[ph_ngqpt]]. The file can be use to -visualize isosurfaces with Xcrysden or other similar tools supporting the bxsf -format. Note that the (dense) q-mesh must be Gamma-centered, shifted meshs are -not supported by Xcrysden. This variable requires [[optdriver]]==7. +visualize iso-surfaces with Xcrysden or other similar tools supporting the bxsf +format. Note that the (dense) q-mesh must be Gamma-centered, shifted meshes are +not supported by Xcrysden. This variable requires [[optdriver]] == 7. """, ), @@ -13700,10 +14305,10 @@ defaultval=0, mnemonics="PRinT POSCAR file", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Print out VASP-style POSCAR and FORCES files, for use with PHON or frophon codes for frozen phonon calculations. See the associated script in -~abinit/extras/post_processing/phondisp2abi.py for further details on +{% modal ../scripts/post_processing/phondisp2abi.py %} for further details on interfacing with PHON, PHONOPY, etc... """, ), @@ -13716,17 +14321,17 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT total POTential", - text=""" + text=r""" If set >=1, provide output of the total (Kohn-Sham) potential (sum of local pseudo-potential, Hartree potential, and xc potential). -If [[ionmov]]==0, the name of the potential file will be the root output name, +If [[ionmov]] == 0, the name of the potential file will be the root output name, followed by _POT. -If [[ionmov]]==1 or 2, potential file will be output at each time step, with +If [[ionmov]] /= 0, potential file will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _POT. The file structure of this unformatted output file is described in [[help:abinit#localpotfile|this section]]. @@ -13742,10 +14347,10 @@ dimensions="scalar", defaultval=0, mnemonics="PRint the PSPS file", - text=""" + text=r""" If set to 1, the code produces a netcdf file (PSPS.nc) with the internal tables used by Abinit to apply the pseudopotential part of the KS Hamiltonian. -The data can be visualized with AbiPy. if prtpsps is set to -1, the code will +The data can be visualized with AbiPy. If prtpsps is set to -1, the code will exit after the output of the PSPS.nc file. """, ), @@ -13758,7 +14363,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the SPin CURrent density", - text=""" + text=r""" If set to 1 or a larger value, provide output of the current density of different direction spins (x,y,z) in the whole unit cell. Should require spinorial wave functions [[nspinor]] = 2. Experimental: this does not work yet. @@ -13773,7 +14378,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the STM density", - text=""" + text=r""" If set to 1 or a larger value, provide output of the electron density in real space rho(r), made only from the electrons close to the Fermi energy, in a range of energy (positive or negative), determined by the (positive or @@ -13791,15 +14396,15 @@ For the STM charge density to be generated, one must give, as an input file, the converged wavefunctions obtained from a previous run, at exactly the same k-points and cut-off energy, self-consistently determined, using the -occupation numbers from [[occopt]]=7. +occupation numbers from [[occopt]] = 7. In the run with positive [[prtstm]], one has to use: * positive [[iscf]] - * [[occopt]]=7, with specification of [[tsmear]] - * [[nstep]]=1 + * [[occopt]] = 7, with specification of [[tsmear]] + * [[nstep]] = 1 * the [[tolwfr]] convergence criterion - * [[ionmov]]=0 (this is the default value) - * [[optdriver]]=0 (this is the default value) + * [[ionmov]] = 0 (this is the default value) + * [[optdriver]] = 0 (this is the default value) Note that you might have to adjust the value of [[nband]] as well, for the treatment of unoccupied states, because the automatic determination of @@ -13819,7 +14424,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the SUSCEPtibility file (the irreducible polarizability)", - text=""" + text=r""" If set to 0, no _SUSC file will be produced after the screening calculation, only the _SCR file will be output. """, @@ -13833,7 +14438,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT V CouLoMB", - text=""" + text=r""" If set >= 0 outputs a file with the Coulomb potential, defined as Hartree + local Pseudopotential. @@ -13853,7 +14458,7 @@ defaultval=0, mnemonics="PRinT Van Der Waals file", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Print out a NetCDF file containing a vdW-DF kernel. """, ), @@ -13866,16 +14471,16 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT V_HArtree", - text=""" + text=r""" If set >=1, provide output of the Hartree potential. -If [[ionmov]]==0, the name of the potential file will be the root output name, +If [[ionmov]] == 0, the name of the potential file will be the root output name, followed by _VHA. -If [[ionmov]]==1 or 2, potential files will be output at each time step, with +If [[ionmov]] /= 0, potential files will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _VHA. The file structure of this unformatted output file is described in [[help:abinit#localpotfile|this section]]. @@ -13891,16 +14496,16 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT V_HXC", - text=""" + text=r""" If set >=1, provide output of the sum of the Hartree potential and xc potential. -If [[ionmov]]==0, the name of the potential file will be the root output name, +If [[ionmov]] == 0, the name of the potential file will be the root output name, followed by _VHXC. -If [[ionmov]]==1 or 2, potential files will be output at each time step, with +If [[ionmov]] /= 0, potential files will be output at each time step, with the name being made of * the root output name, - * followed by _TIMx, where x is related to the timestep (see later) + * followed by _TIMx, where x is related to the time step (see later) * then followed by _VHXC. The file structure of this unformatted output file is described in [[help:abinit#localpotfile|this section]]. @@ -13916,21 +14521,22 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT VOLume", - text=""" + text=r""" Control the volume of printed output. In particular, this concerns the explicit echo of eigenenergies and residuals for all bands and k points in the main output file. Also, the analysis of the value and location of the maximal density (and magnetization). -Standard choice is 0. Positive values print more in the output and log files, +Standard choice is 0. Positive values (all are allowed) generally print more and more in the output and log files, while negative values are for debugging (or preprocessing only), and cause the code to stop at some point. - * 0 --> The eigenenergies and residuals for all bands and k points are not echoed in the main output file. There are exceptions: the eigenvalues of the first k point are printed at the end of the SCF loop, and also, if [[iscf]]=-2 and [[kptopt]]<=0, the eigenvalues for all the k points are printed anyway, for a maximum of 50 k-points. Due to some subtlety, if for **some** dataset [[prtvol]] is non-zero, the limit for input and output echoes cannot be enforced, so it is like if [[prtvol]]=1 for **all** the datasets for which [[prtvol]] was set to 0. - * 1 --> the eigenvalues for the first 50 k-points are printed in all cases, at the end of the SCF loop. + * 0 --> The eigenenergies and residuals for all bands and k points are not echoed in the main output file. There are exceptions: the eigenvalues of the first k point are printed at the end of the SCF loop, and also, if [[iscf]] = -2 and [[kptopt]]<=0, the eigenvalues for all the k points are printed anyway, for a maximum of 50 k-points. Due to some subtlety, if for **some** dataset [[prtvol]] is non-zero, the limit for input and output echoes cannot be enforced, so it is like if [[prtvol]] = 1 for **all** the datasets for which [[prtvol]] was set to 0. + * 1 --> the eigenvalues for the first k-point are printed in all cases, at the end of the SCF loop. * 2 --> all the eigenvalues and the residuals are printed at the end of the SCF loop. Also, the analysis of the value and location of the maximal density (and magnetization) is printed. - * 3 --> Print memory information for lobpcg - * 4 --> Like 3 and prints information of lobpcg algorithm convergence - * 10 --> the eigenvalues are printed for every SCF iteration, as well as other additions (to be specified in the future...) + * 3 --> Print memory information for lobpcg. + * 4 --> Like 3 and prints information of lobpcg algorithm convergence. + * 10 --> the eigenvalues are printed for every SCF iteration, as well as other additions. + * 11 --> even more information ... Debugging options: @@ -13958,9 +14564,9 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT VOLume for IMaGes", - text=""" + text=r""" Control the volume of printed output when an algorithm using images of the -cell is used ([[nimage]]>1). +cell is used ([[nimage]] > 1). When such an algorithm is activated, the printing volume (in output file) can be large and difficult to read. Using **prtvolimg=1**, the printing volume, for each image, is reduced to @@ -13979,11 +14585,11 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT V_PSeudoPotential", - text=""" + text=r""" If set >=1, provide output of the local pseudo potential. -If [[ionmov]]==0, the name of the potential file will be the root output name, followed by _VPSP. -If [[ionmov]]==1 or 2, potential files will be output at each time step, with the name being made of +If [[ionmov]] == 0, the name of the potential file will be the root output name, followed by _VPSP. +If [[ionmov]] /= 0, potential files will be output at each time step, with the name being made of * the root output name, * followed by _TIMx, where x is related to the timestep (see later) @@ -14002,12 +14608,12 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT V_XC", - text=""" + text=r""" If set >=1, provide output of the exchange-correlation potential. -If [[ionmov]]==0, the name of the potential file will be the root output name, +If [[ionmov]] == 0, the name of the potential file will be the root output name, followed by _VXC. -If [[ionmov]]==1 or 2, potential files will be output at each time step, with +If [[ionmov]] /= 0, potential files will be output at each time step, with the name being made of * the root output name, @@ -14030,12 +14636,12 @@ text=r""" Flag used to indicate that either the Wannier90 or the WanT interfaces will be used. - * [[prtwant]]=1 --> Use the **ABINIT- WanT** interface. + * [[prtwant]] = 1 --> Use the **ABINIT- WanT** interface. Provide an output file that can be used by the WanT postprocessing program -(see http://www.wannier-transport.org). The value of the prtwant indicates the +(see [http://www.wannier-transport.org](http://www.wannier-transport.org)). The value of the prtwant indicates the version of the WanT code that can read it. Currently only the value -[[prtwant]]=1 is implemented, corresponding to WanT version 1.0.1, available +[[prtwant]] = 1 is implemented, corresponding to WanT version 1.0.1, available since Oct. 22, 2004. Notes: Several requirements must be fulfilled by the wavefunction. Among @@ -14063,36 +14669,36 @@ 1/2 1/2 1/2 istwfk 8*1 -Also, in order to use WanT as a postprocessing program for ABINIT you might +Also, in order to use WanT as a post-processing program for ABINIT you might have to recompile it with the appropriate flags (see ABINIT makefile). Up to now only the -convert big-endian was found to be mandatory, for machines with little-endian default choice. - * [[prtwant]]=2 --> Use the **ABINIT- Wannier90** interface. + * [[prtwant]] = 2 --> Use the **ABINIT- Wannier90** interface. ABINIT will produce the input files required by Wannier90 and it will run Wannier90 to produce the Maximally-locallized Wannier functions (see [ http://www.wannier.org ](http://www.wannier.org) ). -Notes: +!!! Notes * The files that are created can also be used by Wannier90 in stand-alone mode. - * In order to use Wannier90 as a postprocessing program for ABINIT you might have to recompile it with the appropriate flags (see ABINIT makefile). You might use ./configure --enable-wannier90 + * In order to use Wannier90 as a post-processing program for ABINIT you might have to recompile it with the appropriate flags (see ABINIT makefile). You might use ./configure --enable-wannier90 * There are some other variables related to the interface of Wannier90 and ABINIT. See [[varset:w90]]. - * [[prtwant]]=3 --> Use the **ABINIT- Wannier90** interface after converting the input wavefunctions to **quasiparticle** wavefunctions. + * [[prtwant]] = 3 --> Use the **ABINIT- Wannier90** interface after converting the input wavefunctions to **quasi-particle** wavefunctions. ABINIT will produce the input files required by Wannier90 and it will run Wannier90 to produce the Maximally-localized Wannier functions (see [ http://www.wannier.org ](http://www.wannier.org) ). -Additional Notes: +!!! Notes * An input file of LDA wave functions is required which is completely consistent with the _KSS file used in the self-consistent GW calculation. This means that [[kssform]] 3 must be used to create the _KSS file and the output _WFK file from the same run must be used as input here. - * Wannier90 requires [[nshiftk]]=1, and [[shiftk]]= 0 0 0 is recommended. The k-point set used for the GW calculation, typically the irreducible BZ set created using [[kptopt]]=1, and that for the Abinit- Wannier90 interface must be consistent. - * Full-BZ wavefunctions should be generated in the run calling the interface by setting [[kptopt]]=3, [[iscf]]=-2, and [[nstep]]=3. This will simply use symmetry to transform the input IBZ wavefunctions to the full BZ set, still consistent with the GW _KSS input. + * Wannier90 requires [[nshiftk]] = 1, and [[shiftk]] = 0 0 0 is recommended. The k-point set used for the GW calculation, typically the irreducible BZ set created using [[kptopt]] = 1, and that for the Abinit- Wannier90 interface must be consistent. + * Full-BZ wavefunctions should be generated in the run calling the interface by setting [[kptopt]] = 3, [[iscf]] = -2, and [[nstep]] = 3. This will simply use symmetry to transform the input IBZ wavefunctions to the full BZ set, still consistent with the GW _KSS input. * The final _QPS file created by the self-consistent GW run is required as input. - * Any value of [[gwcalctyp]] between between 20 and 29 should be suitable, so, for example, Hartree-Fock maximally-localized Wannier functions could be generated setting [[gwcalctyp]]=25. + * Any value of [[gwcalctyp]] between between 20 and 29 should be suitable, so, for example, Hartree-Fock maximally-localized Wannier functions could be generated setting [[gwcalctyp]] = 25. """, ), @@ -14104,30 +14710,30 @@ dimensions="scalar", defaultval=ValueWithConditions({'[[nimage]] > 1': 0, 'defaultval': 1}), mnemonics="PRinT the WaveFunction", - text=""" -If [[prtwf]]=1, provide output of wavefunction and eigenvalue file + text=r""" +If [[prtwf]] = 1, provide output of wavefunction and eigenvalue file The file structure of this unformatted output file is described in [[help:abinit#wfkfile|this section]]. For a standard ground-state calculation, the name of the wavefunction file -will be the root output name, followed by _WFK. If [[nqpt]]=1, the root name +will be the root output name, followed by _WFK. If [[nqpt]] = 1, the root name will be followed by _WFQ. For response-function calculations, the root name will be followed by _1WFx, where x is the number of the perturbation. The dataset information will be added as well, if relevant. -No wavefunction output is provided by [[prtwf]]=0. -If [[prtwf]]=-1, the code writes the wavefunction file only if convergence is +No wavefunction output is provided by [[prtwf]] = 0. +If [[prtwf]] = -1, the code writes the wavefunction file only if convergence is not achieved in the self-consistent cycle. -If [[prtwf]]=2, a file pwfn.data is produced, to be used as input for the +If [[prtwf]] = 2, a file pwfn.data is produced, to be used as input for the CASINO QMC code. See more explanation at the end of this section. -If [[prtwf]]=3, the file that is created is nearly the same as with -[[prtwf]]=1, except that the records that should contain the wavefunction is +If [[prtwf]] = 3, the file that is created is nearly the same as with +[[prtwf]] = 1, except that the records that should contain the wavefunction is empty (so, such records exist, but store nothing). This is useful to generate size-reduced DDK files, to perform an optic run. Indeed, in the latter case, only matrix elements are needed [so, no wavefunction], but possibly a large number of conduction bands, so that the DDK file might be huge if it contains the wavefunctions. -Further explanation for the [[prtwf]]=2 case. To produce a wave function +Further explanation for the [[prtwf]] = 2 case. To produce a wave function suitable for use as a CASINO trial wave function, certain ABINIT parameters must be set correctly. Primarily, CASINO (and QMC methods generally) can only take advantage of time-reversal symmetry, and not the full set of symmetries @@ -14167,7 +14773,7 @@ that there will be an input variable to control whether or not a CASINO pwfn.data file is written. -Other issues related to [[prtwf]]=2. +Other issues related to [[prtwf]] = 2. The exporter does not currently work when ABINIT is used in parallel mode on multiple processors if k-point parallelism is chosen. ABINIT does not store the full wave function on each processor but rather splits the k-points @@ -14196,7 +14802,7 @@ defaultval=0, mnemonics="PRinT Wavefunction file on the FULL mesh", requires="[[prtwf]] == 1", - text=""" + text=r""" If set to 1 in a ground-state calculation, the code will output another WFK file (with extension FULL_WFK) containing the wavefunctions in the full BZ as well as a text file with the tables used for the tetrahedron method. Note that @@ -14215,7 +14821,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT an XML output", - text=""" + text=r""" Create an XML output with common values. The corresponding DTD is distributed in sources as extras/post_processing/abinitRun.dtd. All the DTD is not yet implemented and this one is currently restricted to ground-state computations @@ -14231,9 +14837,9 @@ dimensions=['[[ntypat]]'], defaultval=MultipleValue(number=None, value=0), mnemonics="PoinT CHARGEs", - requires="[[usepaw]]==1 and [[prtefg]]>=3", - text=""" - * Array of point charges, in atomic units, of the nuclei. In the normal computation of electric field gradients (see [[prtefg]]) the ionic contribution is calculated from the core charges of the atomic sites. Thus for example in a PAW data set for oxygen where the core is 1s2, the core charge is +6 (total nuclear charge minus core electron charge). In point charge models, which are much less accurate than PAW calculations, all atomic sites are treated as ions with charges determined by their valence states. In such a case oxygen almost always would have a point charge of -2. The present variable taken together with [[prtefg]] performs a full PAW computation of the electric field gradient and also a simple point charge computation. The user inputs whatever point charges he/she wishes for each atom type. + requires="[[usepaw]] == 1 and [[prtefg]]>=3", + text=r""" + * Array of point charges, in atomic units, of the nuclei. In the normal computation of electric field gradients (see [[prtefg]]) the ionic contribution is calculated from the core charges of the atomic sites. Thus for example in a PAW data set for oxygen where the core is $1s^{2}$, the core charge is +6 (total nuclear charge minus core electron charge). In point charge models, which are much less accurate than PAW calculations, all atomic sites are treated as ions with charges determined by their valence states. In such a case oxygen almost always would have a point charge of -2. The present variable taken together with [[prtefg]] performs a full PAW computation of the electric field gradient and also a simple point charge computation. The user inputs whatever point charges he/she wishes for each atom type. """, ), @@ -14246,12 +14852,13 @@ defaultval=0, mnemonics="PoinT GROUP number for the MAgnetic space group", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable characterizes a Shubnikov type III magnetic space group -(anti-ferromagnetic space group). The user is advised to consult "The -mathematical theory of symmetry in solids, Representation theory for point -groups and space groups, 1972, C.J. Bradley and A.P. Cracknell, Clarendon -Press, Oxford." +(anti-ferromagnetic space group). The user is advised to consult [[cite:Bradley1972]]. +In a Shubnikov type III magnetic space group, the primitive cell is the same if one takes +into account the spin-flipping operations or if one does not take into account such +spin-flipping operations. Explicitely, there is no pure translation with a spin-flip. + A Shubnikov type III magnetic space group might be defined by its Fedorov space group (set of all spatial symmetries, irrespective of their magnetic action), and the halving space group (only the symmetries that do not change @@ -14259,8 +14866,12 @@ The specification of the halving space group might be done by specifying, for each point symmetry, the magnetic action. See Table 7.1 of the above-mentioned reference. Magnetic point groups are numbered from 1 to 58. +The halving space group is the group of the symmetry operations for which [[symafm]]=1, +namely those operations that are not accompanied with a spin flip.. +Note that the definition of a spin flip is different for the [[nspden]]=2 and the [[nspden]]=4 cases, +see the description of [[symafm]]. -Related input variables: [[spgroup]], [[spgroupma]], [[genafm]] +Related input variables: [[spgroup]], [[spgroupma]], [[genafm]], [[symafm]]. """, ), @@ -14272,8 +14883,8 @@ dimensions=[3], defaultval=MultipleValue(number=3, value=1.0), mnemonics="Particle VELocity MAXimum", - requires="[[optdriver]]==3", - text=""" + requires="[[optdriver]] == 3", + text=r""" When [[npvel]] is larger than 0, it performs electronic stopping power calculations on a velocity grid along the direction determined by [[pvelmax]]. The vector [[pvelmax]] defines both the direction and the maximum velocity. @@ -14289,8 +14900,8 @@ dimensions="scalar", defaultval="40%", mnemonics="Plane Wave UNBALancing: THRESHold for balancing procedure", - requires="[[paral_kgb]]==1", - text=""" + requires="[[paral_kgb]] == 1", + text=r""" This parameter (in %) activates a load balancing procedure when the distribution of plane wave components over MPI processes is not optimal. The balancing procedure is activated when the ratio between the number of plane @@ -14307,17 +14918,16 @@ dimensions=['[[nnos]]'], defaultval=MultipleValue(number=None, value=10.0), mnemonics="Q thermostat MASS", - text=""" + text=r""" This are the masses of the chains of [[nnos]] thermostats to be used when -[[ionmov]]=13 (Molecular Dynamics) or [[imgmov]]=13 (Path Integral Molecular +[[ionmov]] = 13 (Molecular Dynamics) or [[imgmov]] = 13 (Path Integral Molecular Dynamics). -If [[ionmov]]=13 (Molecular Dynamics), this temperature control can be used -with [[optcell]] =0, 1 (homogeneous cell deformation) or 2 (full cell -deformation). -If [[imgmov]]=13 (Path Integral Molecular Dynamics), this temperature control +If [[ionmov]] = 13 (Molecular Dynamics), this temperature control can be used +with [[optcell]] =0, 1 (homogeneous cell deformation) or 2 (full cell deformation). +If [[imgmov]] = 13 (Path Integral Molecular Dynamics), this temperature control can be used with [[optcell]] =0 (NVT ensemble) or 2 (fully flexible NPT -ensemble). In that case, [[optcell]]=2 iS NOT USABLE yet. +ensemble). In that case, [[optcell]] = 2 is NOT USABLE yet. """, ), @@ -14331,10 +14941,9 @@ mnemonics="Q-wavevector of the PERTurbation", characteristics=['[[DEVELOP]]'], requires="[[vprtrb]]", - text=""" + text=r""" Gives the wavevector, in units of reciprocal lattice primitive translations, -of a perturbing potential of strength [[vprtrb]]. See [[vprtrb]] for more -explanation. +of a perturbing potential of strength [[vprtrb]]. See [[vprtrb]] for more info. """, ), @@ -14347,11 +14956,11 @@ defaultval=[0, 0, 0], mnemonics="Q PoinT", characteristics=['[[INPUT_ONLY]]'], - text=""" -Only used if [[nqpt]]=1. + text=r""" +Only used if [[nqpt]] = 1. Combined with [[qptnrm]], define the q vector [[qptn]](1:3) in the case -[[qptopt]]=0. +[[qptopt]] = 0. This input variable is not internal ([[qptn]](1:3) is used instead), but is used to echo the value of [[qptn]](1:3), with renormalisation factor one. @@ -14366,13 +14975,12 @@ dimensions=[3, '[[nqptdm]]'], defaultval=MultipleValue(number=None, value=0.0), mnemonics="Q-PoinTs for the Dielectric Matrix", - requires="[[optdriver]]==3 and [[nqptdm]]!=0", - text=""" -[[qptdm]] contains the set of q-points used in the screening part of ABINIT, -instead of the automatic generation of the q points when [[nqptdm]]=0. These q -points are given in terms of reciprocal space primitive translations (NOT in -cartesian coordinates!). For further explanation, see the input variable -[[nqptdm]]. + requires="[[optdriver]] == 3 and [[nqptdm]]!=0", + text=r""" +[[qptdm]] contains the set of q points used in the screening part of ABINIT, +instead of the automatic generation of the q points when [[nqptdm]] = 0. These q +points are given in terms of reciprocal space primitive translations (**not** in +cartesian coordinates!). For further explanation, see the input variable [[nqptdm]]. """, ), @@ -14385,18 +14993,21 @@ defaultval=MultipleValue(number=3, value=0), mnemonics="Q-PoinT re-Normalized", characteristics=['[[INTERNAL_ONLY]]'], - requires="[[nqpt]]==1", - text=""" -Only used if [[nqpt]]=1. + requires="[[nqpt]] == 1", + text=r""" +Only used if [[nqpt]] = 1. + In ground-state calculation, the vector [[qptn]](1:3) is added to each renormalized k point (whatever the value of [[kptopt]] that was used) to generate the normalized, shifted, set of k-points [[kptns]](1:3,1: **nkpt** ). In response-function calculations, [[qptn]](1:3) is the wavevector of the phonon-type calculation. + [[qptn]](1:3) can be produced on the basis of the different methods described in [[qptopt]], like using [[qpt]](1:3) with renormalisation provided by [[qptnrm]], or using the other possibilities defined by [[iqpt]], [[ngqpt]], -[[nshiftq]], [[qptrlatt]], [[shiftq]], +[[nshiftq]], [[qptrlatt]], [[shiftq]]. + For insulators, there is no restriction on the q-points to be used for the perturbations. By contrast, for metals, for the time being, it is advised to take q points for which the k and k+q grids are the same (when the periodicity @@ -14414,8 +15025,8 @@ defaultval=1.0, mnemonics="Q PoinTs NoRMalization", characteristics=['[[INPUT_ONLY]]'], - text=""" -Only used if [[nqpt]]=1 and [[qptopt]]=0 + text=r""" +Only used if [[nqpt]] = 1 and [[qptopt]] = 0 Provides re-normalization of [[qpt]]. Must be positive, non-zero. The actual q vector (renormalized) is [[qptn]](1:3)= [[qpt]](1:3)/[[qptnrm]]. @@ -14431,27 +15042,27 @@ defaultval=0, mnemonics="QPoinTs OPTion", characteristics=['[[INPUT_ONLY]]'], - text=""" -Only used if [[nqpt]]=1. + text=r""" +Only used if [[nqpt]] = 1. Controls the set up to generate the Q point [[qptn]](1:3) to be used for the specific dataset, either as a shift of k-point grid in ground-state calculations, or as a stand-alone phonon wavevector. There are two basic techniques to generate the Q point: either by specifying -it directly, possibly with a renormalisation factor ([[qptopt]]=0), or -extracting it from a grid a Q points ([[qptopt]]=1 to 4), using the index +it directly, possibly with a renormalisation factor ([[qptopt]] = 0), or +extracting it from a grid a Q points ([[qptopt]] = 1 to 4), using the index [[iqpt]]. At variance with the similar generation of k points, only ONE q point can be used per dataset. -With [[qptopt]]=1 to 4, rely on [[ngqpt]] or [[qptrlatt]], as well as on +With [[qptopt]] = 1 to 4, rely on [[ngqpt]] or [[qptrlatt]], as well as on [[nshiftq]] and [[shiftq]] to set up a q point grid, from which the q point -with number [[iqpt]] will be selected. The values [[qptopt]]=1 to 4 differ by +with number [[iqpt]] will be selected. The values [[qptopt]] = 1 to 4 differ by the treatment of symmetries. Note that the symmetries are recomputed starting -from the values of [[rprimd]] [[xred]] and [[spinat]]. So, the explicit value +from the values of [[rprimd]], [[xred]] and [[spinat]]. So, the explicit value of [[symrel]] are not used. This is to allow doing calculations with -[[nsym]]=1, sometimes needed for T-dependent electronic structure, still -decreasing the number of q points in the case [[qptopt]]=1 or [[qptopt]]=3. +[[nsym]] = 1, sometimes needed for T-dependent electronic structure, still +decreasing the number of q points in the case [[qptopt]] = 1 or [[qptopt]] = 3. * 0 --> read directly [[qpt]], and its (eventual) renormalisation factor [[qptnrm]]. @@ -14480,8 +15091,8 @@ defaultval=MultipleValue(number=None, value=0), mnemonics="Q - PoinTs grid: Real space LATTice", characteristics=['[[INPUT_ONLY]]'], - excludes="specified([[ngqpt]])", - text=""" + excludes="[[ngqpt]]", + text=r""" This input variable is used only when [[qptopt]] is positive. It partially defines the q point grid. The other piece of information is contained in [[shiftq]]. [[qptrlatt]] cannot be used together with [[ngqpt]]. @@ -14494,7 +15105,7 @@ If neither [[ngqpt]] nor [[qptrlatt]] are defined, ABINIT will automatically generate a set of k point grids, and select the best combination of -[[qptrlatt]] and [[shiftq]] that allows to reach a sufficient value of +[[qptrlatt]] and [[shiftq]] that allows one to reach a sufficient value of [[kptrlen]]. See this latter variable for a complete description of this procedure. """, ), @@ -14507,9 +15118,9 @@ dimensions=['[[ntypat]]'], defaultval=MultipleValue(number=None, value=0), mnemonics="QUADrupole MOMents", - requires="[[usepaw]]==1 and [[prtefg]]>=1", - text=""" - * Array of quadrupole moments, in barns, of the nuclei. These values are used in conjunction with the electric field gradients computed with [[prtefg]] to calculate the quadrupole couplings in MHz, as well as the asymmetries. Note that the electric field gradient at a nuclear site is independent of the nuclear quadrupole moment, thus the quadrupole moment of a nucleus can be input as 0, and the option [[prtefg]]=2 used to determine the electric field gradient at the site. + requires="[[usepaw]] == 1 and [[prtefg]]>=1", + text=r""" + * Array of quadrupole moments, in barns, of the nuclei. These values are used in conjunction with the electric field gradients computed with [[prtefg]] to calculate the quadrupole couplings in MHz, as well as the asymmetries. Note that the electric field gradient at a nuclear site is independent of the nuclear quadrupole moment, thus the quadrupole moment of a nucleus can be input as 0, and the option [[prtefg]] = 2 used to determine the electric field gradient at the site. """, ), @@ -14521,7 +15132,7 @@ dimensions="scalar", defaultval=0, mnemonics="RANDOM ATomic POSitions", - text=""" + text=r""" Control the inner coordinates, which can be generated randomly by using 4 different methods depending ont its value (0) if zero, no random generation and xred are taken as they have been introduced by the user @@ -14533,46 +15144,66 @@ """, ), +Variable( + abivarname="ratsm", + varset="gstate", + vartype="real", + topics=['printing_prdos', 'MagMom_useful', 'ConstrainedDFT_useful'], + dimensions="scalar", + defaultval=ValueWithConditions({'any([[constraint_kind]] > 1)': 0.05, 'defaultval': 0.00}), + mnemonics="Radii of the ATomic spheres SMearing", + text=r""" +Smearing width for the atomic spheres whose radius is determined by [[ratsph]]. +For each spherical zone around each atom, the integrating function goes +from 1.0 to 0.0 in an interval from [[ratsph]]-[[ratsm]] to [[ratsph]]. +The function is the same as the one used to smear the kinetic energy, see [[ecutsm]]. +""", +), + + Variable( abivarname="ratsph", varset="gstate", vartype="real", - topics=['printing_prdos', 'MagMom_useful', 'ElecBandStructure_useful', 'ElecDOS_useful'], + topics=['printing_prdos', 'MagMom_useful', 'ElecBandStructure_useful', 'ElecDOS_useful', 'ConstrainedDFT_basic'], dimensions=['[[ntypat]]'], - defaultval=ValueWithConditions({'defaultval': 2.0, 'usepaw==1': ['[[AUTO_FROM_PSP]]']}), + defaultval=ValueWithConditions({'[[usepaw]] == 1': '[[AUTO_FROM_PSP]]', 'defaultval': 2.00}), mnemonics="Radii of the ATomic SPHere(s)", - text=""" -Relevant only when [[prtdos]]=3 or [[prtdensph]]=1. + text=r""" +Relevant only when [[prtdensph]] = 1, or [[magconon]]/=0, or any([[constraint_kind]](:)/=0) (that is, constrained DFT), or [[prtdos]] = 3. +In most cases (see later for [[prtdos]] = 3), provides the radius of the spheres around each atom in which the total +charge density or magnetization will be integrated. +The integral within the sphere is obtained by a sum over real space FFT points +inside the sphere, multiplied by a function that is one inside the sphere, except in a small boundary zone determined by [[ratsm]], +where this fonction goes smoothly from 1 to 0. +In case of PAW, [[ratsph]] radius has to be greater or equal to PAW radius of +considered atom type (which is read from the PAW dataset file; see **rc_sph** or **r_paw**). +In case of constrained DFT, note that the sphere for different atoms are not allowed to overlap. + +When [[prtdos]] = 3: -When [[prtdos]]=3: Provides the radius of the spheres around the [[natsph]] atoms of indices [[iatsph]], in which the local DOS and its angular-momentum projections will -be analysed. The choice of this radius is quite arbitrary. In a plane-wave +be analysed. + +The choice of this radius is quite arbitrary. In a plane-wave basis set, there is no natural definition of an atomic sphere. However, it -might be wise to use the following well-defined and physically motivated -procedure (in version 4.2, this procedure is NOT implemented, unfortunately): +might be wise to use the following well-defined and physically motivated procedure: from the Bader analysis, one can define the radius of the sphere that contains the same charge as the Bader volume. This "Equivalent Bader charge atomic radius" might then be used to perform the present analysis. See the [[help:aim]] for more explanations. Another physically motivated choice would be to rely on another charge partitioning, like the Hirshfeld one (see the -cut3d utility). The advantage of using charge partitioning schemes comes from +cut3d utility [[help:cut3d]]). The advantage of using charge partitioning schemes comes from the fact that the sum of atomic DOS, for all angular momenta and atoms, integrated on the energy range of the occupied states, gives back the total charge. If this is not an issue, one could rely on the half of the nearest- -neighbour distances, or any scheme that allows to define an atomic radius. +neighbour distances, or any scheme that allows one to define an atomic radius. Note that the choice of this radius is however critical for the balance between the s, p and d components. Indeed, the integrated charge within a given radius, behave as a different power of the radius, for the different channels s, p, d. At the limit of very small radii, the s component dominates -the charge contained in the sphere... - -When [[prtdensph]]=1: -Provides the radius of the spheres around (all) atoms in which the total -charge density will be integrated. - -In case of PAW, [[ratsph]] radius has to be greater or equal to PAW radius of -considered atom type (which is read from the PAW dataset file; see rc_sph or r_paw). +the charge contained in the sphere. """, ), @@ -14585,7 +15216,7 @@ defaultval=ValueWithUnit(units='Bohr', value=2.0), mnemonics="Radii of the ATomic SPHere(s) in the EXTRA set", characteristics=['[[LENGTH]]'], - text=""" + text=r""" Radius for extra spheres the DOS is projected into. See [[natsph_extra]] and [[xredsph_extra]] for the number and positions of the spheres. """, @@ -14599,7 +15230,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="Radius of the CUT-off for coulomb interaction", - text=""" + text=r""" Truncation of the Coulomb interaction in real space. The meaning of [[rcut]] is governed by the cutoff shape option [[icutcoul]]. @@ -14617,8 +15248,8 @@ defaultval=0, mnemonics="RECursion - initial guess of the FERMI Energy", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). In the first SCF calculation it + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). In the first SCF calculation it fixes the initial guess for the Fermi energy. """, ), @@ -14632,9 +15263,9 @@ defaultval=1, mnemonics="RECursion - Grid RATIO", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). It represents the ratio of the two -grid step: [[recgratio]]=fine_step/coarse_step and it is bigger or equal than + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). It represents the ratio of the two +grid step: [[recgratio]] = fine_step/coarse_step and it is bigger or equal than 1. It introduces a double-grid system which permits to compute the electronic density on a coarse grid, using a fine grid (defined by [[ngfft]]) in the discretisation of the green kernel (see [[recptrott]]). Successively the @@ -14653,8 +15284,8 @@ defaultval=500, mnemonics="RECursion - Number of point for PATH integral calculations", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). Determine the number of + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). Determine the number of discretisation points to compute some path integral in the recursion method; those path integrals are used to compute the entropy and the eigenvalues energy. during the latest SFC cycles. @@ -14670,8 +15301,8 @@ defaultval=10, mnemonics="RECursion - Number of RECursions", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). Determine the maximum order of + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). Determine the maximum order of recursion, that is the dimension of the krylov space we use to compute density. If the precision set by [[rectolden]] is reached before that order, the recursion method automatically stops. @@ -14687,15 +15318,23 @@ defaultval=0, mnemonics="RECursion - TROTTer parameter", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). Determine the trotter parameter + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). Determine the trotter parameter used to compute the exponential of the hamiltonian in the recursion method: -exp(-beta*(-Delta + V)) ~ (exp(-beta/(4*recptrott) V) exp(-beta/(4*recptrott) -Delta) exp(-beta/(4*recptrott) V))^(2*recptrott). If set to 0, we use -recptrott = 1/2 in the above formula. Increasing [[recptrott]] improve the + +$$ e^{-\beta(-\Delta + V)} \approx +\left( + e^{-\frac{\beta}{4c} V} + e^{-\frac{\beta}{4c} \Delta} + e^{-\frac{\beta}{4c} V} +\right)^{2c} $$ + +where $c$=[[recptrott]]. +If set to 0, we use [[recptrott]] = $1/2$ in the above formula. +Increasing [[recptrott]] improve the accuracy of the trotter formula, but increase the dicretisation error: it may be necessary to increase [[ngfft]]. The discretisation error is essentially -the discretisation error of the green kernel exp((recptrott/beta*|r|^2)) on +the discretisation error of the green kernel $e^{\frac{c}{\beta|r|^2}}$ on the ngfft grid. """, ), @@ -14709,8 +15348,8 @@ defaultval=0, mnemonics="RECursion - CUTing Radius", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). Used to improve the computational + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). Used to improve the computational time in the case of the recursion method in a large cell: the density at a point will be computed with taking account only of a sphere of radius [[recrcut]]. """, @@ -14725,8 +15364,8 @@ defaultval=0, mnemonics="RECursion - TEST on Electron Gas", characteristics=['[[DEVELOP]]'], - text=""" -Used in Recursion method ([[tfkinfunc]]=2). It is used to test an electron gas + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). It is used to test an electron gas by putting the ion potential equal to zero. """, ), @@ -14741,12 +15380,11 @@ mnemonics="RECursion - TOLerance on the difference of electronic DENsity", characteristics=['[[DEVELOP]]'], commentdefault="Default value to be changed.", - text=""" -Used in Recursion method ([[tfkinfunc]]=2). Sets a tolerance for differences + text=r""" +Used in Recursion method ([[tfkinfunc]] = 2). Sets a tolerance for differences of electronic density that, reached TWICE successively, will cause one SCF cycle to stop. That electronic density difference is computed in the infinity -norm (that is, it is computed point-by-point, and then the maximum difference -is computed). +norm (that is, it is computed point-by-point, and then the maximum difference is computed). """, ), @@ -14759,13 +15397,12 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="REDuced Displacement FIELD", requires="[[berryopt]] = 16, [[red_efield]]", - text=""" -In case [[berryopt]]=16, a reduced finite electric displacement field + text=r""" +In case [[berryopt]] = 16, a reduced finite electric displacement field calculation is performed. The value of this displacement field, and its direction is determined by [[red_dfield]]. It must be given in atomic units. -[[red_dfield]] is defined via Eq.(26) in the Supplement of M. Stengel, N.A. -Spaldin and D. Vanderbilt, Nat. Phys. 5,304 (2009). +[[red_dfield]] is defined via Eq.(26) in the Supplement of [[cite:Stengel2009]]. """, ), @@ -14778,13 +15415,12 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="REDuced Electric FIELD", requires="[[berryopt]] = 16", - text=""" -In case [[berryopt]]=16, a reduced finite electric displacement field -calculation is performed. In this case, the parameter red_efield specifies the + text=r""" +In case [[berryopt]] = 16, a reduced finite electric displacement field +calculation is performed. In this case, the parameter [[red_efield]] specifies the initial electric field used on the first iteration, in atomic units. -[[red_efield]] is defined via Eq.(25) in the Supplement of M. Stengel, N.A. -Spaldin and D. Vanderbilt, Nat. Phys. 5,304 (2009). +[[red_efield]] is defined via Eq.(25) in the Supplement [[cite:Stengel2009]]. """, ), @@ -14797,13 +15433,12 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="REDuced Electric FIELD BAR", requires="[[berryopt]] = 14", - text=""" -In case [[berryopt]]=14, a reduced finite electric field calculation is + text=r""" +In case [[berryopt]] = 14, a reduced finite electric field calculation is performed. The magnitude and direction of this electric field are determined -by red_efieldbar. It must be given in atomic units. +by [[red_efieldbar]]. It must be given in atomic units. -[[red_efieldbar]] is defined via Eq.(28) in the Supplement of M. Stengel, N.A. -Spaldin and D. Vanderbilt, Nat. Phys. 5,304 (2009). +[[red_efieldbar]] is defined via Eq.(28) in the Supplement of [[cite:Stengel2009]]. """, ), @@ -14815,7 +15450,7 @@ dimensions="scalar", defaultval=0, mnemonics="RESTART from (X,F) history", - text=""" + text=r""" Control the restart of a molecular dynamics or structural optimization job. **restartxf >0 (Deprecated) **:The code reads from the input wf file, the @@ -14823,9 +15458,9 @@ continue the work done by the job that produced this wf file. If [[optcell]]/=0, the history of [[acell]] and [[rprim]] variables is also taken into account. The code will take into consideration the whole history (if -[[restartxf]]=1), or discard the few first (x,f) pairs, and begin only at the +[[restartxf]] = 1), or discard the few first (x,f) pairs, and begin only at the pair whose number corresponds to [[restartxf]]. -Works only for [[ionmov]]=2 (Broyden) and when an input wavefunction file is +Works only for [[ionmov]] = 2 or 22 (Broyden) and when an input wavefunction file is specified, thanks to the appropriate values of [[irdwfk]] or [[getwfk]]. NOTES: @@ -14850,9 +15485,11 @@ calculation using those values. The original atomic coordinates and cell parameters are irrelevant in that case. +**restartxf=-3 (New)**:Read **ONLY** the last require the atomic positions and cell parameters in the HIST file to restart the Molecular dynamics or structural optimization. + NOTES: -* You can use **restartxf=-1 or -2** for all predictiors that make no use of random numbers. -* You can use **restartxf=-1 or -2** to restart a calculation that was not completed. The HIST file is written on each iteration. So you always have something to recover from. +* You can use **restartxf=-1, -2 or -3** for all predictors that make no use of random numbers. +* You can use **restartxf=-1, -2 or -3** to restart a calculation that was not completed. The HIST file is written on each iteration. So you always have something to recover from. * You can take advantage of the appropriate values of [[irdwfk]] or [[getwfk]] to get a good wave function to continue your job. """, ), @@ -14865,19 +15502,73 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function: 2nd Derivative of wavefunctions with respect to K", - text=""" -UNUSABLE (in development) - -Activates computation of second derivatives of wavefunctions with respect to -wavevectors. This is not strictly a response function but is a needed + text=r""" +If is equal to 1, activates computation of second derivatives of wavefunctions with respect to +wavevectors (ipert = natom+10 is activated). This is not strictly a response function but is a needed auxiliary quantity in the calculations of 3rd-order derivatives of the energy -(non-linear response). The directions for the derivatives are determined by -[[rfdir]] (TO BE CORRECTED!). +(non-linear response) if [[usepead]] == 0. The directions for the derivatives are determined by +[[rf2_pert1_dir]] and [[rf2_pert2_dir]] and [[prepanl]] as the following: - * 0 --> no derivative calculation - * 1 --> calculation along diagonal directions (d2/(dk_i dk_i), natom+10 is activated) - * 2 --> calculation along off-diagonal directions (d2/(dk_i dk_j), natom+11 is activated) - * 3 --> calculation along all directions (both natom+10 and natom+11 are activated) +The computation of the 2nd derivative of wavefunction with respect to "lambda_1" and "lambda_2" is computed if +if rf2_pert1_dir[idir1] AND rf2_pert2_dir[idir2] are equal to 1, where "idir1" ("idir2") is direction of +the perturbation "lambda_1" ("lambda_2"). +If ALL directions are activated (default behavior) AND [[prepanl]] == 1, then the code automatically selects +only the directions that will be used by the non-linear routine ([[optdriver]] == 5) using crystal symmetries. +""", +), + +Variable( + abivarname="rf2_dkde", + varset="dfpt", + vartype="integer", + topics=['DFPT_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="Response Function: mixed 2nd Derivative of wavefunctions with respect to K and electric field", + text=r""" +If is equal to 1, activates computation of mixed second derivatives of wavefunctions with respect to +wavevector and electric field (ipert = natom+11 is activated). This is not strictly a response function +but is a needed auxiliary quantity in the calculations of 3rd-order derivatives of the energy +(non-linear response) if [[usepead]] == 0. The directions for the derivatives are determined by +[[rf2_pert1_dir]], [[rf2_pert2_dir]] and [[prepanl]] in the same way than [[rf2_dkdk]]. +""", +), + +Variable( + abivarname="rf2_pert1_dir", + varset="dfpt", + vartype="integer", + topics=['DFPT_useful'], + dimensions=[3], + defaultval=[1, 1, 1], + mnemonics="Response Function (2nd order Sternheimer equation): 1st PERTurbation DIRection", + text=r""" +Gives the directions of the 1st perturbation to be considered when solving the 2nd order Sternheimer equation. +The three elements corresponds to the three primitive vectors, either in real +space (phonon calculations), or in reciprocal space ($\,d/ \,d k$, homogeneous +electric field, homogeneous magnetic field calculations). +If equal to 1, the 2nd order wavefunctions, as defined by [[rf2_dkdk]] or [[rf2_dkde]], are computed for the +corresponding direction. If 0, this direction is not considered. +See [[rf2_dkdk]] for more details. +""", +), + +Variable( + abivarname="rf2_pert2_dir", + varset="dfpt", + vartype="integer", + topics=['DFPT_useful'], + dimensions=[3], + defaultval=[1, 1, 1], + mnemonics="Response Function (2nd order Sternheimer equation): 2nd PERTurbation DIRection", + text=r""" +Gives the directions of the 2nd perturbation to be considered when solving the 2nd order Sternheimer equation. +The three elements corresponds to the three primitive vectors, either in real +space (phonon calculations), or in reciprocal space ($\,d/ \,d k$, homogeneous +electric field, homogeneous magnetic field calculations). +If equal to 1, the 2nd order wavefunctions, as defined by [[rf2_dkdk]] or [[rf2_dkde]], are computed for the +corresponding direction. If 0, this direction is not considered. +See [[rf2_dkdk]] for more details. """, ), @@ -14889,7 +15580,7 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function: Acoustic Sum Rule", - text=""" + text=r""" Control the evaluation of the acoustic sum rule in effective charges and dynamical matrix at Gamma within a response function calculation (not active at the level of producing the DDB, but at the level of the phonon @@ -14915,9 +15606,9 @@ dimensions=[2], defaultval=[1, 1], mnemonics="Response Function: ATomic POLarisation", - text=""" + text=r""" Control the range of atoms for which displacements will be considered in -phonon calculations (atomic polarizations), using the 2n+1 theorem. +phonon calculations (atomic polarizations). These values are only relevant to phonon response function calculations. May take values from 1 to [[natom]], with [[rfatpol]](1)<=[[rfatpol]](2). The atoms to be moved will be defined by the @@ -14931,7 +15622,7 @@ [[rfdir]]. The name 'iatpol' is used for the part of the internal variable ipert when it runs from 1 to [[natom]]. The internal variable ipert can also assume values larger than [[natom]], denoting perturbations of electric field -or stress type (see [help:respfn|the response function help file]). +or stress type (see [the DFPT help file](../guide/respfn)). """, ), @@ -14943,14 +15634,14 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function with respect to Derivative with respect to K", - text=""" + text=r""" Activates computation of derivatives of ground state wavefunctions with respect to wavevectors. This is not strictly a response function but is a -needed auxiliary quantity in the electric field calculations (see [[rfelfd]]) +needed auxiliary quantity in the electric field calculations (see [[rfelfd]]). The directions for the derivatives are determined by [[rfdir]]. * 0 --> no derivative calculation - * 1 --> calculation of first derivatives of wavefunctions with respect to k points (d/dk calculation). + * 1 --> calculation of first derivatives of wavefunctions with respect to k points ($\,d/ \,d k$ calculation). The exact same functionality is provided by [[rfelfd]] = 2. """, ), @@ -14963,12 +15654,12 @@ dimensions=[3], defaultval=[0, 0, 0], mnemonics="Response Function: DIRections", - text=""" + text=r""" Gives the directions to be considered for response function calculations (also for the Berry phase computation of the polarization, see the [[berryopt]] input variable). The three elements corresponds to the three primitive vectors, either in real -space (phonon calculations), or in reciprocal space (d/dk, homogeneous +space (phonon calculations), or in reciprocal space ($\,d/ \,d k$, homogeneous electric field, homogeneous magnetic field calculations). So, they generate a basis for the generation of the dynamical matrix or the macroscopic dielectric tensor or magnetic susceptibility and magnetic shielding, or the effective charge tensors. @@ -14982,26 +15673,26 @@ abivarname="rfelfd", varset="dfpt", vartype="integer", - topics=['EffMass_compulsory', 'DFPT_basic'], + topics=['EffectiveMass_compulsory', 'DFPT_basic'], dimensions="scalar", defaultval=0, mnemonics="Response Function with respect to the ELectric FielD", - text=""" + text=r""" Turns on electric field response function calculations. Actually, such calculations requires first the non-self-consistent calculation of derivatives with respect to k, independently of the electric field perturbation itself. * 0 --> no electric field perturbation - * 1 --> full calculation, with first the derivative of ground-state wavefunction with respect to k (d/dk calculation), by a non-self-consistent calculation, then the generation of the first-order response to an homogeneous electric field + * 1 --> full calculation, with first the derivative of ground-state wavefunction with respect to k ($\,d / \,d k$ calculation), by a non-self-consistent calculation, then the generation of the first-order response to an homogeneous electric field * 2 --> only the derivative of ground-state wavefunctions with respect to k * 3 --> only the generation of the first-order response to the electric field, assuming that the data on derivative of ground-state wavefunction with respect to k is available on disk. -(Note: because the tolerances to be used for derivatives or homogeneous -electric field are different, one often does the calculation of derivatives in -a separate dataset, followed by calculation of electric field response as well -as phonon. -The options 2 and 3 proves useful in that context; also, in case a scissor -shift is to be used, it is usually not applied for the d/dk response). +!!! note + Because the tolerances to be used for derivatives or homogeneous + electric field are different, one often does the calculation of derivatives in + a separate dataset, followed by calculation of electric field response as well as phonon. + The options 2 and 3 proves useful in that context; also, in case a scissor + shift is to be used, it is usually not applied for the $\,d / \,d k$ response). """, ), @@ -15013,10 +15704,10 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function with respect to MAGNetic B-field perturbation", - text=""" -It must be equal to 1 to run response function calculations with respect to -external magnetic field. Currently, orbital magnetism is not taken into -account and the perturbing potential has Zeeman form. + text=r""" +[[rfmagn]] allows one to run response function calculations with respect to +external magnetic field if set to 1. Currently, orbital magnetism is not taken into +account and the perturbing potential has Zeeman form. For more details, see [[cite:Ricci2019]]. """, ), @@ -15028,9 +15719,17 @@ dimensions="scalar", defaultval=1, mnemonics="Response Function METHod", - text=""" -Selects method used in response function calculations. Presently, only 1 is -allowed. + text=r""" +Selects method used in response function calculations. Presently, only abs([[rfmeth]]) = 1 is +allowed. This corresponds to storing matrix elements of the 2DTE computed using non-stationary expressions, +instead of stationary ones. + +The difference between positive and negative values is rather technical. Very often, the symmetries can be used in such a way that +some matrix elements can be proven to be zero even without doing any computation. Positive values of [[rfmeth]] activate +this use of symmetries, while it is denied when [[rfmeth]] is negative. There is an indirect additional outcome of this, +as a symmetrization of the whole 2DTE is sometimes rendered possible when the additional knowledge of the zero matrix elements +is available. Thus, the results obtained for positive and negative values of [[rfmeth]] might slightly differ for non-zero elements of the 2DTE, +if they are computed in both cases. """, ), @@ -15042,7 +15741,7 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function with respect to PHONons", - text=""" + text=r""" It must be equal to 1 to run phonon response function calculations. """, ), @@ -15055,7 +15754,7 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function with respect to STRainS", - text=""" + text=r""" Used to run strain response-function calculations (e.g. needed to get elastic constants). Define, with [[rfdir]], the set of perturbations. @@ -15076,24 +15775,25 @@ dimensions="scalar", defaultval=0, mnemonics="Response Function, USER-defined", - text=""" -Available to the developpers, to activate the use of ipert=natom+6 and -ipert=natom+7, two sets of perturbations that the developpers can define. + text=r""" +Available to the developers, to activate the use of ipert=natom+6 and +ipert=natom+7, two sets of perturbations that the developers can define. * 0 --> no computations for ipert=natom+6 or ipert=natom+7 * 1 --> response with respect to perturbation natom+6 will be computed * 2 --> response with respect to perturbation natom+7 will be computed * 3 --> responses with respect to perturbations natom+6 and natom+7 will be computed -In order to define and use correctly the new perturbations, the developper -might have to include code lines or additional routines at the level of the -following routines: dfpt_cgwf.F90, dfpt_dyout.F90, dfpt_symph.F90, -dfpt_dyout.F90, dfpt_etot.F90, littlegroup_pert.F90, dfpt_looppert.F90, -dfpt_mkcor.F90, dfpt_nstdy.F90, dfpt_nstwf.F90, respfn.F90, dfpt_scfcv.F90, -irreducible_set_pert.F90, dfpt_vloca.F90, dfpt_vtorho.F90, dfpt_vtowfk.F90. In -these routines, the developper should pay a particular attention to the rfpert -array, defined in the routine respfn.F90, as well as to the ipert local -variable. +!!! important + + In order to define and use correctly the new perturbations, the developer + might have to include code lines or additional routines at the level of the + following routines: dfpt_cgwf.F90, dfpt_dyout.F90, dfpt_symph.F90, + dfpt_dyout.F90, dfpt_etot.F90, littlegroup_pert.F90, dfpt_looppert.F90, + dfpt_mkcor.F90, dfpt_nstdy.F90, dfpt_nstwf.F90, respfn.F90, dfpt_scfcv.F90, + irreducible_set_pert.F90, dfpt_vloca.F90, dfpt_vtorho.F90, dfpt_vtowfk.F90. In + these routines, the developer should pay a particular attention to the rfpert + array, defined in the routine respfn (in m_respfn_driver.F90), as well as to the ipert local variable. """, ), @@ -15105,7 +15805,7 @@ dimensions="scalar", defaultval=1.0, mnemonics="RHO QuasiParticle MIXing", - text=""" + text=r""" For self-consistent GW runs, [[rhoqpmix]] sets the mixing coefficient between the new and the previous electronic densities. This mixing damps the spurious oscillations in the Hartree potential when achieving self-consistency. @@ -15124,23 +15824,25 @@ mnemonics="Real space PRIMitive translations", characteristics=['[[EVOLVING]]'], commentdims="Internally, it is represented as rprim(3,3,[[nimage]])", - text=""" -Give, in columnwise entry, the three dimensionless primitive translations in + text=r""" +Give the three dimensionless primitive translations in real space, to be rescaled by [[acell]] and [[scalecart]]. -It is [[EVOLVING]] only if [[ionmov]]==2 and [[optcell]]/=0, otherwise it is +The three first numbers are the coordinates of the first vector, the next three numbers are the coordinates +of the second, and the last three the coordinates of the third. +It is [[EVOLVING]] only if [[ionmov]] == 2 or 22 and [[optcell]]/=0, otherwise it is fixed. If the Default is used, that is, [[rprim]] is the unity matrix, the three dimensionless primitive vectors are three unit vectors in cartesian -coordinates. Each will be (possibly) multiplied by the corresponding [[acell]] +coordinates. The coordinates (and hence the length) of each vector will be (possibly) multiplied by the corresponding [[acell]] value, then (possibly) stretched along the cartesian coordinates by the corresponding [[scalecart]] value, to give the dimensional primitive vectors, called [[rprimd]]. In the general case, the dimensional cartesian coordinates of the crystal primitive translations R1p, R2p and R3p, see [[rprimd]], are - * R1p(i)=[[scalecart]](i)[[rprim]](i,1)*[[acell]](1) - * R2p(i)=[[scalecart]](i)[[rprim]](i,2)*[[acell]](2) - * R3p(i)=[[scalecart]](i)[[rprim]](i,3)*[[acell]](3) + * R1p(i) = [[scalecart]](i) x [[rprim]](i,1) x [[acell]](1) + * R2p(i) = [[scalecart]](i) x [[rprim]](i,2) x [[acell]](2) + * R3p(i) = [[scalecart]](i) x [[rprim]](i,3) x [[acell]](3) where i=1,2,3 is the component of the primitive translation (i.e. x, y, and z). @@ -15151,11 +15853,12 @@ translations in real space in cartesian coordinates. Presently, it is requested that the mixed product (R1xR2).R3 is positive. If this is not the case, simply exchange a pair of vectors. -To be more specific, keeping the default value of [[scalecart]]=1 to simplify + +To be more specific, keeping the default value of [[scalecart]] = 1 to simplify the matter, [[rprim]] 1 2 3 4 5 6 7 8 9 corresponds to input of the three primitive translations R1=(1,2,3) (to be multiplied by [[acell]](1)), R2=(4,5,6) (to be multiplied by [[acell]](2)), and R3=(7,8,9) (to be -multiplied by [[acell](3)). +multiplied by [[acell]](3)). Note carefully that the first three numbers input are the first column of [[rprim]], the next three are the second, and the final three are the third. This corresponds with the usual Fortran order for arrays. The matrix whose @@ -15177,6 +15880,13 @@ angdeg 90 90 120 +Note that the following might work as well: + + + rprim sqrt(0.75) 0.5 0.0 + -sqrt(0.75) 0.5 0.0 + 0.0 0.0 1.0 + Although the use of [[scalecart]] or [[acell]] is rather equivalent when the primitive vectors are aligned with the cartesian directions, it is not the case for non-orthogonal primitive vectors. In particular, beginners often make @@ -15237,15 +15947,15 @@ mnemonics="Real space PRIMitive translations, Dimensional", characteristics=['[[INTERNAL_ONLY]]', '[[EVOLVING]]'], commentdims="Internally, it is represented as rprimd(3,3,[[nimage]]).", - text=""" + text=r""" This internal variable gives the dimensional real space primitive vectors, computed from [[acell]], [[scalecart]], and [[rprim]]. - * R1p(i)=[[rprimd]](i,1)=[[scalecart]](i)*[[rprim]](i,1)*[[acell]](1) for i=1,2,3 (x,y,and z) - * R2p(i)=[[rprimd]](i,2)=[[scalecart]](i)*[[rprim]](i,2)*[[acell]](2) for i=1,2,3 - * R3p(i)=[[rprimd]](i,3)=[[scalecart]](i)*[[rprim]](i,3)*[[acell]](3) for i=1,2,3 + * R1p(i) = [[rprimd]](i,1) = [[scalecart]](i) x [[rprim]](i,1) x [[acell]](1) for i=1,2,3 (x,y,and z) + * R2p(i) = [[rprimd]](i,2) = [[scalecart]](i) x [[rprim]](i,2) x [[acell]](2) for i=1,2,3 + * R3p(i) = [[rprimd]](i,3) = [[scalecart]](i) x [[rprim]](i,3) x [[acell]](3) for i=1,2,3 -It is [[EVOLVING]] only if [[ionmov]]==2 and [[optcell]]/=0, otherwise it is fixed. +It is [[EVOLVING]] only if [[ionmov]] == 2 or 22 and [[optcell]]/=0, otherwise it is fixed. """, ), @@ -15258,9 +15968,10 @@ defaultval=MultipleValue(number=3, value=1), mnemonics="SCALE CARTesian coordinates", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the scaling factors of cartesian coordinates by which dimensionless -primitive translations (in "[[rprim]]") are to be multiplied. [[rprim]] input +primitive translations (in "[[rprim]]") are to be multiplied. +See the [[rprim]] input variable, the [[acell]] input variable, and the associated internal [[rprimd]] internal variable. Especially useful for body-centered and face-centered tetragonal lattices, as @@ -15279,13 +15990,12 @@ dimensions=[3], defaultval=[1, 1, 1], mnemonics="Self Consistent PHONon SUPERCELL", - text=""" + text=r""" Give extent, in number of primitive unit cells, of the supercell being used for a self-consistent phonon calculation. Presumes the phonon frequencies and eigenvectors have been calculated in the original primitive unit cell, on a -grid of q-points which corresponds to the supercell in the present -calculation. TO BE IMPROVED: should contain a tutorial on how to do self- -consistent phonon calculations, David Waroquiers 090831 +grid of q-points which corresponds to the supercell in the present calculation. +Experimental. """, ), @@ -15298,9 +16008,9 @@ defaultval=0.0, mnemonics="Self Consistent PHONon TEMPerature", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Temperature which is imposed on phonon distribution, in the self-consistent -scheme of Souvatzis et al. PRL **100**, 095901. Determines the extent of the +scheme of [[cite:Souvatzis2008]]. Determines the extent of the finite displacements used, and consequent anharmonic effects. Experimental. """, ), @@ -15313,8 +16023,8 @@ dimensions=[3, '[[nshiftk]]'], defaultval=ValueWithConditions({'[[nshiftk]]>1': None, 'defaultval': [0.5, 0.5, 0.5]}), mnemonics="SHIFT for K points", - text=""" -It is used only when [[kptopt]]>=0, and must be defined if [[nshiftk]] is + text=r""" +It is used only when [[kptopt]] >= 0, and must be defined if [[nshiftk]] is larger than 1. [[shiftk]](1:3,1:[[nshiftk]]) defines [[nshiftk]] shifts of the homogeneous grid of k points based on [[ngkpt]] or [[kptrlatt]]. @@ -15332,12 +16042,12 @@ 1) When the primitive vectors of the lattice do NOT form a FCC or a BCC lattice, the default (shifted) Monkhorst-Pack grids are formed by using -[[nshiftk]]=1 and [[shiftk]] 0.5 0.5 0.5. This is often the preferred k point +[[nshiftk]] = 1 and [[shiftk]] 0.5 0.5 0.5. This is often the preferred k point sampling, as the shift improves the sampling efficiency. However, it can also break symmetry, if the 111 direction is not an axis of rotation, e.g. in tetragonal or hexagonal systems. Abinit will complain about this breaking, and you should adapt [[shiftk]]. For a non-shifted Monkhorst-Pack grid, use -[[nshiftk]]=1 and [[shiftk]] 0.0 0.0 0.0, which will be compatible with all +[[nshiftk]] = 1 and [[shiftk]] 0.0 0.0 0.0, which will be compatible with all symmetries, and is necessary for some features such as k-point interpolation. 2) When the primitive vectors of the lattice form a FCC lattice, with [[rprim]] @@ -15347,7 +16057,7 @@ 0.5 0.5 0.0 the (very efficient) usual Monkhorst-Pack sampling will be generated by using -[[nshiftk]]= 4 and [[shiftk]] +[[nshiftk]] = 4 and [[shiftk]] 0.5 0.5 0.5 0.5 0.0 0.0 @@ -15360,13 +16070,13 @@ 0.5 -0.5 0.5 0.5 0.5 -0.5 -the usual Monkhorst-Pack sampling will be generated by using [[nshiftk]]= 2 +the usual Monkhorst-Pack sampling will be generated by using [[nshiftk]] = 2 and [[shiftk]] 0.25 0.25 0.25 -0.25 -0.25 -0.25 -However, the simple sampling [[nshiftk]]=1 and [[shiftk]] 0.5 0.5 0.5 is excellent. +However, the simple sampling [[nshiftk]] = 1 and [[shiftk]] 0.5 0.5 0.5 is excellent. 4) For hexagonal lattices with hexagonal axes, e.g. [[rprim]] @@ -15374,7 +16084,7 @@ -0.5 sqrt(3)/2 0.0 0.0 0.0 1.0 -one can use [[nshiftk]]= 1 and [[shiftk]] 0.0 0.0 0.5 +one can use [[nshiftk]] = 1 and [[shiftk]] 0.0 0.0 0.5 In rhombohedral axes, e.g. using [[angdeg]] 3*60., this corresponds to [[shiftk]] 0.5 0.5 0.5, to keep the shift along the symmetry axis. @@ -15390,8 +16100,8 @@ defaultval=ValueWithConditions({'[[nshiftq]]>1': None, 'defaultval': [0.5, 0.5, 0.5]}), mnemonics="SHIFT for Q points", characteristics=['[[INPUT_ONLY]]'], - text=""" -It is used only when [[qptopt]]>=0, and must be defined if [[nshiftq]] is larger than 1. + text=r""" +It is used only when [[qptopt]] >= 0, and must be defined if [[nshiftq]] is larger than 1. [[shiftq]](1:3,1:[[nshiftq]]) defines [[nshiftq]] shifts of the homogeneous grid of q points based on [[ngqpt]] or [[qptrlatt]]. @@ -15408,7 +16118,7 @@ dimensions="scalar", defaultval=1, mnemonics="SIGN of PERMutation potential", - text=""" + text=r""" +1 favors alternation of species -1 favors segregation """, ), @@ -15422,20 +16132,22 @@ defaultval=0.0, mnemonics="jellium SLAB Wigner-Seitz RADius", characteristics=['[[LENGTH]]'], - text=""" -Fix the bulk-mean positive charge density nbulk of a jellium slab (if the -latter is employed, e.g. [[jellslab]] ≠ 0). Often called "rs" [see for example -N. D. Lang and W. Kohn PRB 1, 4555 (1970)], [[slabwsrad]] is the radius of a + text=r""" +Fix the bulk-mean positive charge density $n_{bulk}$ of a jellium slab (if the +latter is employed, e.g. [[jellslab]]/=0). Often called $r_s$ (see for example +[[cite:Lang1970]]), [[slabwsrad]] is the radius of a sphere which has the same volume as the average volume per particle in a -homogeneous electron gas with density nbulk, so: +homogeneous electron gas with density $n_{bulk}$, so: - 1/nbulk = 4/3 Pi * [[slabwsrad]]3 +\begin{equation} + \frac{1}{n_{bulk}} = \frac{4 \pi}{3} [[slabwsrad]]^3 \nonumber +\end{equation} -For example, the bulk aluminum fcc lattice constant is a=4.0495 Angstroms -(webelements.com), each cubic centered cell includes 4 Al atoms and each atom -has 3 valence electrons, so the average volume per electron is a3/12=37.34 -Bohr3 which has to be equal to 4/3 Pi*rs3. Consequently Al has approximately -rs =2.07 Bohr, while for example magnesium has rs =2.65 Bohr, sodium 3.99 Bohr. +For example, the bulk aluminum fcc lattice constant is $a$=4.0495 Angstroms +[WebElements](https://www.webelements.com/), each cubic centered cell includes 4 Al atoms and each atom +has 3 valence electrons, so the average volume per electron is $a^3/12$=37.34 +Bohr$^3$ which has to be equal to $\frac{4 \pi}{3} r_s^3$. Consequently Al has approximately +$r_s$=2.07 Bohr, while for example magnesium has $r_s$=2.65 Bohr, sodium 3.99 Bohr. By default, given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms). """, ), @@ -15446,23 +16158,25 @@ vartype="real", topics=['Artificial_expert'], dimensions="scalar", - defaultval=[0.0, 0.0], - mnemonics="jellium SLAB BEGinning edge along the Z direction", - text=""" -Define the edges of the jellium slab (if used, so if [[jellslab]] ≠ 0) along + defaultval=0.0, + mnemonics="jellium SLAB BEGinning edge along the z-direction", + text=r""" +Define the edges of the jellium slab (if used, so if [[jellslab]]/=0) along z, namely the slab starts at a point along z which is expressed in Bohr by -**slabzbeg** and it ends at a point expressed in Bohr by [[slabzend]]. The z -direction is parallel to the third crystal primitive lattice vector which has +[[slabzbeg]] and it ends at a point expressed in Bohr by [[slabzend]]. +The z-direction is parallel to the third crystal primitive lattice vector which has to be orthogonal to the other ones, so the length of the cell along z is -[[rprimd]](3,3). In addition **slabzbeg** and [[slabzend]] have to be such that: +[[rprimd]](3,3). In addition [[slabzbeg]] and [[slabzend]] have to be such that: - 0 ≤ **slabzbeg** < [[slabzend]] ≤ [[rprimd]](3,3) + 0 ≤ [[slabzbeg]] < [[slabzend]] ≤ [[rprimd]](3,3) Together with [[slabwsrad]] they define the jellium positive charge density -distribution n+(x,y,z) in this way: +distribution $n_{+}(x,y,z)$ in this way: - n+(x,y,z) = nbulk if **slabzbeg** ≤ z ≤ [[slabzend]] - = 0 otherwise, +\begin{eqnarray} + n_{+}(x,y,z) &=& n_{bulk} \quad \text{if} \quad [[slabzbeg]] \leq z \leq [[slabzend]] \nonumber\\ + &=& 0 \quad \text{otherwise} \nonumber +\end{eqnarray} so the positive charge density is invariant along the xy plane as well as the electrostatic potential generated by it. @@ -15475,29 +16189,54 @@ vartype="real", topics=['Artificial_expert'], dimensions="scalar", - defaultval=[0.0, 0.0], - mnemonics="jellium SLAB ENDing edge along the Z direction", - text=""" -Define the edges of the jellium slab (if used, so if [[jellslab]] ≠ 0) along + defaultval=0.0, + mnemonics="jellium SLAB ENDing edge along the z-direction", + text=r""" +Define the edges of the jellium slab (if used, so if [[jellslab]]/=0) along z, namely the slab starts at a point along z which is expressed in Bohr by -[[slabzbeg]] and it ends at a point expressed in Bohr by **slabzend**. The z -direction is parallel to the third crystal primitive lattice vector which has +[[slabzbeg]] and it ends at a point expressed in Bohr by [[slabzend]]. +The z-direction is parallel to the third crystal primitive lattice vector which has to be orthogonal to the other ones, so the length of the cell along z is -[[rprimd]](3,3). In addition [[slabzbeg]] and **slabzend** have to be such that: +[[rprimd]](3,3). In addition [[slabzbeg]] and [[slabzend]] have to be such that: - 0 ≤ [[slabzbeg]] < **slabzend** ≤ [[rprimd]](3,3) + 0 ≤ [[slabzbeg]] < [[slabzend]] ≤ [[rprimd]](3,3) Together with [[slabwsrad]] they define the jellium positive charge density -distribution n+(x,y,z) in this way: +distribution $n_{+}(x,y,z)$ in this way: - n+(x,y,z) = nbulk if [[slabzbeg]] ≤ z ≤ **slabzend** - = 0 otherwise, +\begin{eqnarray} + n_{+}(x,y,z) &=& n_{bulk} \quad \text{if} \quad [[slabzbeg]] \leq z \leq [[slabzend]] \nonumber \\ + &=& 0 \quad \text{otherwise} \nonumber +\end{eqnarray} so the positive charge density is invariant along the xy plane as well as the electrostatic potential generated by it. """, ), +Variable( + abivarname="slk_rankpp", + varset="gstate", + vartype="integer", + topics=['parallelism_expert'], + dimensions="scalar", + defaultval=[1000], + mnemonics="ScaLapacK matrix RANK Per Process", + text=r""" +This variable controls how the number of processes to be used in Scalapack diagonalization algorithm: [[np_slk]] will be calculated according to this value. +This value is the matrix rank that each process will hold for the diagonalization. +For a 1000x1000 matrix with default value, scalapack won't be used (Lapack will be used). +For a 2000x2000 matrix with default value, scalapack will be used with 2000/1000=2 MPI processes. +For a 2000x2000 matrix with a slk_rank=500, scalapack will be used with 2000/500=4 MPI processes. +In case of hybrid MPI+OpenMP, the number of thread is also taken into account. + +***WARNING*** None of the available scalapack library are thread-safe (2018). Therefore using both scalapack *and* OpenMP is highly unpredictable. +Furthermore, using multithreaded linear algebra library (MKL ACML...) is more efficient than pure MPI scalapack. + +Usually it is better to define this variable and let the code do the rest. +""", +), + Variable( abivarname="smdelta", varset="dfpt", @@ -15506,16 +16245,16 @@ dimensions="scalar", defaultval=0, mnemonics="SMeared DELTA function", - text=""" + text=r""" When [[smdelta]] in non-zero, it will trigger the calculation of the imaginary part of the second-order electronic eigenvalues, which can be related to the electronic lifetimes. The delta function is evaluated using: - * when [[smdelta]] == 1, Fermi-Dirac smearing: 0.25_dp/(cosh(xx/2.0_dp)**2 - * when [[smdelta]] == 2, Cold smearing by Marzari using the parameter a=-.5634 (minimization of the bump): exp(-xx2)/sqrt(pi) * (1.5d0+xx*(-a*1.5d0+xx*(-1.0d0+a*xx))) - * when [[smdelta]] == 3, Cold smearing by Marzari using the parameter a=-.8165 (monotonic function in the tail): as 2 but different a - * when [[smdelta]] == 4, Smearing of Methfessel and Paxton (PRB40,3616(1989)) with Hermite polynomial of degree 2, corresponding to "Cold smearing" of N. Marzari with a=0 (so, same smeared delta function as smdelta=2, with different a). - * when [[smdelta]] == 5, Gaussian smearing: 1.0d0*exp(-xx**2)/sqrt(pi) + * when [[smdelta]] == 1, Fermi-Dirac smearing: $\frac{0.25}{(cosh(\frac{x}{2.0}))^2}$ + * when [[smdelta]] == 2, Cold smearing by Marzari using the parameter $a=-0.5634$ (minimization of the bump): $\frac{e^{-x^2}}{\sqrt{\pi}}\left(1.5+x(-a\ 1.5+x(-1.0+a\ x))\right)$ + * when [[smdelta]] == 3, Cold smearing by Marzari using the parameter $a=-0.8165$ (monotonic function in the tail): as 2 but different $a$ + * when [[smdelta]] == 4, Smearing of Methfessel and Paxton ([[cite:Methfessel1989]]) with Hermite polynomial of degree 2, corresponding to "Cold smearing" of N. Marzari with $a=0$ (so, same smeared delta function as smdelta=2, with different $a$). + * when [[smdelta]] == 5, Gaussian smearing: $\frac{e^{-x^2}}{\sqrt{\pi}}$ """, ), @@ -15527,32 +16266,31 @@ dimensions=['[[npsp]]'], defaultval=MultipleValue(number='[[npsp]]', value=1), mnemonics="Spin-Orbit treatment for each PSeudoPotential", - requires="[[nspinor]]==2 and [[usepaw]]==0", - text=""" -For each type of atom (each pseudopotential), specify the treatment of spin- -orbit interaction (if [[nspinor]]==2 and Norm-conserving pseudopotentials -[[usepaw]]==0) -If 0: no spin-orbit interaction, even if [[nspinor]]=2 -If 1: treat spin-orbit as specified in the pseudopotential file. -If 2: treat spin-orbit in the HGH form (usual form, although not allowed for -all pseudopotentials) -If 3: treat spin-orbit in the HFN form (Hemstreet-Fong-Nelson) (actually, not implemented...). + requires="[[nspinor]] == 2 and [[usepaw]] == 0", + text=r""" +For each type of atom (each pseudopotential), specify the treatment of spin-orbit +interaction (if [[nspinor]] == 2 and Norm-conserving pseudopotentials i.e. [[usepaw]] == 0) +For PAW calculations with SOC, please refer to [[pawspnorb]]. + + * If 0: no spin-orbit interaction, even if [[nspinor]] = 2 + * If 1: treat spin-orbit as specified in the pseudopotential file. + * If 2: treat spin-orbit in the HGH form (usual form, although not allowed for all pseudopotentials) + * If 3: treat spin-orbit in the HFN form (Hemstreet-Fong-Nelson) (actually, not implemented). For typical usage, the default value is OK. If the spin-orbit needs to be turned off for one atom, 0 might be relevant. Note however, that the code will -stop if [[nspinor]]=2 is used and one of the pseudopotential does not contain +stop if [[nspinor]] == 2 is used and one of the pseudopotential does not contain the information about the spin-orbit interaction (this is the case for some old pseudopotentials). Indeed, for spinorial calculations, turning off the -spin-orbit interaction is unphysical, and also does not save CPU time... It -should only be done for test purposes +spin-orbit interaction is unphysical, and also does not save CPU time. +It should only be done for test purposes -Note that if [[nspinor]]==1, the spin-orbit cannot be treated anyhow, so the -value of [[so_psp]] is irrelevant. In case [[usepaw]]=1, please refer to -[[pawspnorb]]. +Note that if [[nspinor]] == 1, the spin-orbit cannot be treated anyhow, so the +value of [[so_psp]] is irrelevant. Prior to v5.4, the input variable **so_typat** was used, in place of [[so_psp]]. Because the values 0 and 1 have been switched between [[so_psp]] -and so_typat, it was dangerous to continue to allow the use of so_typat. +and **so_typat**, it was dangerous to continue to allow the use of **so_typat**. """, ), @@ -15565,11 +16303,11 @@ defaultval=0.0, mnemonics="SPectral BROADening", characteristics=['[[ENERGY]]'], - requires="[[optdriver]]==3 and [[spmeth]]==2", - text=""" -When a screening calculation ([[optdriver]]==3) uses a spectral representation + requires="[[optdriver]] == 3 and [[spmeth]] == 2", + text=r""" +When a screening calculation ([[optdriver]] == 3) uses a spectral representation of the irreducible polarizability in which the delta function is replaced by -the gaussian approximant ([[spmeth]]==2), the standard deviation of the +the gaussian approximant ([[spmeth]] == 2), the standard deviation of the gaussian is given by [[spbroad]]. """, ), @@ -15582,7 +16320,7 @@ dimensions="scalar", defaultval=1, mnemonics="SPace Group: AXes ORientation", - text=""" + text=r""" It is taken into account only when [[spgroup]]/=0; it allows one to define the axes orientation for the specific space groups for which this is needed. Trigonal groups (number 146,148,155,160,161,166,167): @@ -15612,11 +16350,16 @@ * _c marks the orientation of the two-fold axis or of the mirror plane, * C2/c represents the parent space group. -How to determine which spgaxor you need: +How to determine which [[spgaxor]] you need: - 1. check the reduced positions you have, for more symmetric positions, e.g. 1/2 1/4 3/4 etc... Let us say your symmetric positions are in the first coordinate (a axis) and you are using spgroup 62. - 2. look up the raw space group Wyckoff positions on [ the Bilbao server ](http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list) to see where they put the corresponding symmetric positions. For spgroup 62 Bilbao puts the 1/4 3/4 in the second coordinate, ie along the b axis. - 3. in this case you need to swap the axes from the original abc order to a new order where the Bilbao axis (b) is in the first position. In this case you have 2 possibilities, spgaxor 3 or 5. If you have more than one highly symmetric coordinate you may have only a single possibility. + 1. check the reduced positions you have, for more symmetric positions, e.g. 1/2 1/4 3/4 etc... + Let us say your symmetric positions are in the first coordinate (a axis) and you are using spgroup 62. + 2. look up the raw space group Wyckoff positions on + [the Bilbao server](http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list) to see where they put + the corresponding symmetric positions. For spgroup 62 Bilbao puts the 1/4 3/4 in the second coordinate, ie along the b axis. + 3. in this case you need to swap the axes from the original abc order to a new order where the + Bilbao axis (b) is in the first position. In this case you have 2 possibilities, [[spgaxor]] 3 or 5. + If you have more than one highly symmetric coordinate you may have only a single possibility. """, ), @@ -15629,7 +16372,7 @@ defaultval=1, mnemonics="SPace Group: ORIGin", requires="[[spgroup]]!=0", - text=""" + text=r""" Gives the choice of origin for the axes system. It is defined according to the origin choice in the International Tables of Crystallography. @@ -15647,19 +16390,22 @@ dimensions="scalar", defaultval=0, mnemonics="SPace GROUP number", - text=""" -Gives the number of the space group. -If [[spgroup]] is 0, the code assumes that all the symmetries are input + text=r""" +Gives the Fedorov space group number of the system. +It should be between 1 and 230, see [[help:spacegroup]]. +Alternatively, if [[spgroup]] is 0, the code assumes that all the symmetries are input through the [[symrel]] matrices and the [[tnons]] vectors, or obtained from -the symmetry finder (the default when [[nsym]]==0). -It should be between 1 and 230. This option can be used to obtain all the -atoms in the unit cell, starting from the asymmetric unit cell. -The references for computing the symmetry corresponding to the space groups are: +the symmetry finder (the default when [[nsym]] == 0). Then, ABINIT computes the value of [[spgroup]]. - * International Tables for Crystallography, 1983, Ed. Theo Hahn, D. Reidel Publishing Company - * The mathematical theory of symmetry in solids, Representation theory for point groups and space groups, 1972, C.J. Bradley and A.P. Cracknell, Clarendon Press, Oxford. +The list of symmetry operations that is available when [[spgroup]] is defined can be used to obtain all the +atoms in the unit cell, starting from the asymmetric unit cell, see [[natrd]]. -For more details see the [[help:spacegroup]]. +The references for the numbering of space groups, and their list of symmetry operations is: + + * International Tables for Crystallography [[cite:Hahn1983]] + * The mathematical theory of symmetry in solids, Representation theory for point groups and space groups [[cite:Bradley1972]] + +Related input variables: [[symrel]], [[tnons]], [[symafm]], [[spgroupma]], """, ), @@ -15672,26 +16418,34 @@ defaultval=0, mnemonics="SPace GROUP number defining a MAgnetic space group", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" This input variable might be used to define a Shubnikov magnetic space group -(anti-ferromagnetic space group). The user is advised to consult "The -mathematical theory of symmetry in solids, Representation theory for point -groups and space groups, 1972, C.J. Bradley and A.P. Cracknell, Clarendon -Press, Oxford." -A Shubnikov type IV magnetic space group might be defined by its Fedorov space +(anti-ferromagnetic space group). The user is advised to consult [[cite:Bradley1972]]. + +A Shubnikov type IV magnetic space group contains a specific type of symmetry operation, +which is a translation in real space followed by a spin flip. +Such a Shubnikov type IV magnetic space group might be defined by its Fedorov space group (set of spatial symmetries that do not change the magnetization), and an additional magnetic space group number [[spgroupma]]. -A Shubnikov type III magnetic space group might be defined by its Fedorov + +A Shubnikov type III magnetic space group does not contain a translation in real space +wollowed by a spin flip. It might be defined by its Fedorov space group (set of all spatial symmetries, irrespective of their magnetic action), and an additional magnetic space group number [[spgroupma]]. For the additional number [[spgroupma]], we follow the definition of Table 7.4 -of the above-mentioned Bradley and Cracknell textbook. -Thus, one way to specify a Shubnikov IV magnetic space group, is to define +of the above-mentioned [[cite:Bradley1972]]. + +Thus, one way to specify a Shubnikov type IV magnetic space group, is to define both [[spgroup]] and [[spgroupma]]. -For example, the group P2_1/c_prime has [[spgroup]]=14 and [[spgroupma]]=78. -Alternatively, for Shubnikov IV magnetic groups, one might define [[spgroup]] -and [[genafm]]. For both the type III and IV, one might define by hand the set +For example, the group P2_1/c_prime has [[spgroup]] = 14 and [[spgroupma]] = 78. +Alternatively, for Shubnikov type IV magnetic groups, one might define [[spgroup]] +and [[genafm]]. For both the types III and IV, one might define by hand the set of symmetries, using [[symrel]], [[tnons]] and [[symafm]]. + +Note that the meaning of the spin-flip operation of symmetry is different in the [[nspden]]=2 or in the [[nspden]]=4 +case, see detailed explanations in the section on the [[symafm]] input variable. Thus, the same atomic +positions and [[spinat]] vectors might yield different [[symafm]] values depending on [[nspden]], +and thus different Shubnikov magnetic space groups. """, ), @@ -15699,41 +16453,43 @@ abivarname="spinat", varset="gstate", vartype="real", - topics=['spinpolarisation_basic', 'crystal_useful', 'MagMom_useful'], - dimensions=ValueWithConditions({'[[natrd]]<[[natom]]': [3, '[[natrd]]'], 'defaultval': [3, '[[natom]]']}), + topics=['spinpolarisation_basic', 'crystal_useful', 'MagMom_useful', 'ConstrainedDFT_useful'], + dimensions=ValueWithConditions({'[[natrd]]<[[natom]]': '[3, [[natrd]] ]', 'defaultval': '[3, [[natom]] ]'}), defaultval=0.0, mnemonics="SPIN for AToms", - text=""" -Gives the initial electronic spin-magnetization for each atom, in unit of h-bar/2. + text=r""" +Gives the initial electronic spin-magnetization for each atom, in unit of $\hbar/2$, +as well as, in case of fixed magnetization calculations (see [[constraint_kind]] and [[magconon]]), the target value of the magnetization. -Note that if [[nspden]]=2, the z-component must be given for each atom, in +Note that if [[nspden]] = 2, the z-component must be given for each atom, in triplets (0 0 z-component). For example, the electron of an hydrogen atom can be spin up (0 0 1.0) or spin down (0 0 -1.0). This value is only used to create the first exchange and correlation -potential, and is not used anymore afterwards. +potential. It is not checked against the initial occupation numbers [[occ]] for each spin channel. It is meant to give an easy way to break the spin symmetry, and to allow to find stable local spin fluctuations, for example: antiferromagnetism, or the -spontaneous spatial spin separation of elongated H2 molecule. +spontaneous spatial spin separation of elongated H$_2$ molecule. -* If the atom manipulator is used, [[spinat]] will be related to the preprocessed set of atoms, + * If the atom manipulator is used, [[spinat]] will be related to the preprocessed set of atoms, generated by the atom manipulator. The user must thus foresee the effect of this atom manipulator (see [[objarf]]). -* If the atom manipulator is not used, and the symmetries are not specified by the user ([[nsym]]=0), spinat will be used, if present, to determine the anti-ferromagnetic characteristics of the symmetry operations, see [[symafm]]. -In case of collinear antiferromagnetism ([[nsppol]]=1, [[nspinor]]=1, -[[nspden]]=2), these symmetries are used to symmetrize the density. -In case of non-collinear magnetism ([[nsppol]]=1, [[nspinor]]=1, -[[nspden]]=4), they are also used to symmetrize the density. In the latter + * If the atom manipulator is not used, and the symmetries are not specified by the user ([[nsym]] = 0), +spinat will be used, if present, to determine the anti-ferromagnetic characteristics of the symmetry operations, see [[symafm]]. +In case of collinear antiferromagnetism ([[nsppol]] = 1, [[nspinor]] = 1, +[[nspden]] = 2), these symmetries are used to symmetrize the density. +In case of non-collinear magnetism ([[nsppol]] = 1, [[nspinor]] = 2, +[[nspden]] = 4), they are also used to symmetrize the density. In the latter case, this strongly constrains the magnetization (imposing its direction). If the user want to let all degrees of freedom of the magnetization evolve, it is -then recommended to put [[nsym]]=1. +then recommended to put [[nsym]] = 1. * If the symmetries are specified, and the irreducible set of atoms is specified, the anti-ferromagnetic characteristics of the symmetry operations [[symafm]] will be used to generate [[spinat]] for all the non-irreducible atoms. -* In the case of PAW+U calculations using the [[dmatpawu]] initial occupation matrix, and if [[nspden]]=4, [[spinat]] is also used to determine the direction of the integrated magnetization matrix. +* In the case of PAW+U calculations using the [[dmatpawu]] initial occupation matrix, and if [[nspden]] = 4, [[spinat]] is also used to determine the direction of the integrated magnetization matrix. """, ), @@ -15745,28 +16501,29 @@ dimensions="scalar", defaultval=-99.99, mnemonics="SPIN-MAGNetization TARGET", - text=""" -This input variable is active only in the [[nsppol]]=2 case. If -[[spinmagntarget]] is not the "magic" value of -99.99d0, the spin- + text=r""" +This input variable is active only in the [[nsppol]] = 2 case. If +[[spinmagntarget]] is not the "magic" value of -99.99, the spin- magnetization of the primitive cell will be fixed (or optimized, if it is not possible to impose it) to the value of [[spinmagntarget]], in Bohr magneton -units, e.g. for an Hydrogen atom, it is 1. +units (for an Hydrogen atom, it is 1). If [[occopt]] is a metallic one, the Fermi energies for spin up and spin down are adjusted to give the target spin-polarisation (this is equivalent to an -exchange splitting). If [[occopt]]=1 and [[nsppol]]=2, the occupation numbers +exchange splitting). If [[occopt]] = 1 and [[nsppol]] = 2, the occupation numbers for spin up and spin down will be adjusted to give the required spin- magnetization (occupation numbers are identical for all k-points, with -[[occopt]]=1). The definition of [[spinmagntarget]] is actually requested in +[[occopt]] = 1). The definition of [[spinmagntarget]] is actually requested in this case, except for the single isolated Hydrogen atom. If [[spinmagntarget]] is the default one, the spin-magnetization will not be constrained, and will be determined self-consistently, by having the same spin up and spin down Fermi energy in the metallic case, while for the other cases, there will be no spin-magnetization, except for an odd number of electrons if -[[occopt]]=1 and [[nsppol]]=2. +[[occopt]] = 1 and [[nsppol]] = 2. -Note: for the time being, only the spin down Fermi energy is written out in -the main output file. In the fixed magnetic moment case, it differs from the -spin up Fermi energy. +!!! note + For the time being, only the spin down Fermi energy is written out in + the main output file. In the fixed magnetic moment case, it differs from the + spin up Fermi energy. """, ), @@ -15778,17 +16535,16 @@ dimensions="scalar", defaultval=0, mnemonics="SPectral METHod", - requires="[[optdriver]]==4", + requires="[[optdriver]] == 4", text=r""" The [[spmeth]] input variable defines the method used to calculate the irreducible polarizability $\chi^{(0)}_{KS}$. By default $\chi^{(0)}_{KS}$ is calculated employing the Adler-Wiser -expression ([[spmeth]]=0) with a CPU effort that scales linearly with the +expression ([[spmeth]] = 0) with a CPU effort that scales linearly with the number of frequencies. This approach is convenient when few frequencies are required, and is usually used in conjunction with plasmon-pole models in which -only one or two frequencies are calculated, according to the value of -[[ppmodel]]. +only one or two frequencies are calculated, according to the value of [[ppmodel]]. Unfortunately a calculation based on the Adler-Wiser expression might be quite CPU demanding if the matrix elements of the self-energy operator are evaluated by performing numerically the convolution defining the self-energy. The @@ -15796,11 +16552,11 @@ screened interaction has to be evaluated on a dense frequency mesh in order to obtain accurate results. -In the spectral method ([[spmeth]]=1 or 2) the irreducible polarizability is +In the spectral method ([[spmeth]] = 1 or 2) the irreducible polarizability is expressed as the Hilbert transform of the imaginary part. The advantage in using this approach consists in the fact that, once the spectral function is known, the irreducible polarizability for an arbitrary frequency can be easily -obtained through inexpensive integrations. On the other hand an accurate +obtained through inexpensive integrations. On the other hand, an accurate evaluation of the imaginary part requires a dense frequency mesh due to the presence of delta functions. Two different approaches can be used to approximate these delta functions thus allowing the use of affordable @@ -15822,8 +16578,8 @@ dimensions="scalar", defaultval=1.0, mnemonics="SPin-ORBit SCaLing", - requires="[[usepaw]]==1 and [[pawspnorb]]>= 1", - text=""" + requires="[[usepaw]] == 1 and [[pawspnorb]] >= 1", + text=r""" Scaling of the spin-orbit interaction. The default values gives the first- principles value, while other values are used for the analysis of the effect of the spin-orbit interaction, but are not expected to correspond to any @@ -15840,10 +16596,10 @@ defaultval=0.0, mnemonics="Scanning Tunneling Microscopy BIAS voltage", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Gives, in Hartree, the bias of the STM tip, with respect to the sample, in order to generate the STM density map. -Used with positive [[iscf]], [[occopt]]=7 (metallic, gaussian), [[nstep]]=1, +Used with positive [[iscf]], [[occopt]] = 7 (metallic, gaussian), [[nstep]] = 1, and positive [[prtstm]], this value is used to generate a charge density map from electrons close to the Fermi energy, in a (positive or negative) energy range. Positive [[stmbias]] will lead to the inclusion of occupied (valence) @@ -15851,7 +16607,7 @@ unoccupied (conduction) states only. Can be specified in Ha (the default), Ry, eV or Kelvin, since [[stmbias]] has the '[[ENERGY]]' characteristics (0.001 Ha = 27.2113845 meV = 315.773 Kelvin). -With [[occopt]]=7, one has also to specify an independent broadening [[tsmear]]. +With [[occopt]] = 7, one has also to specify an independent broadening [[tsmear]]. """, ), @@ -15863,9 +16619,9 @@ dimensions="scalar", defaultval=100, mnemonics="STRess FACTor", - text=""" + text=r""" The stresses multiplied by [[strfact]] will be treated like forces in the -process of optimization ([[ionmov]]=2, non-zero [[optcell]]). +process of optimization ([[ionmov]] = 2 or 22, non-zero [[optcell]]). For example, the stopping criterion defined by [[tolmxf]] relates to these scaled stresses. """, @@ -15879,26 +16635,25 @@ dimensions="scalar", defaultval=1, mnemonics="STRING method ALGOrithm", - text=""" -Relevant only when [[imgmov]]=2 (String Method). + text=r""" +Relevant only when [[imgmov]] = 2 (String Method). Gives the variant of the String Method method used. Possible values can be: * 0 --> **Original String Method**. -NOT YET IMPLEMENTED -_See: Phys. Rev. B 66, 052301 (2002)_ +NOT YET IMPLEMENTED. +See [[cite:Weinan2002]] * 1 --> **Simplified String Method** with parametrization by **equal arc length**. -Instead of using the normal force (wr the band), the full force is used; the +Instead of using the normal force (wrt the band), the full force is used; the reparametrization is enforced by keeping the points of the string equally spaced. -_See: J. Chem. Phys. 126, 164103 (2007)_ +See [[cite:Weinan2007]] * 2 --> **Simplified String Method** with parametrization by **energy-weighted arc length**. -A variant of the Simplified String Method (like 2-); the reparametrization is -done by using energy-weight arc-lengths, giving a finer distribution near the -saddle point.. -_See: J. Chem. Phys. 126, 164103 (2007) and J. Chem. Phys. 130, 244108 (2009)_ +A variant of the Simplified String Method (like 1-); the reparametrization is +done by using energy-weight arc-lengths, giving a finer distribution near the saddle point. +See [[cite:Weinan2007]] and [[cite:Goodrow2009]] """, ), @@ -15910,7 +16665,7 @@ dimensions="scalar", defaultval=1.0, mnemonics="STRess PRECONditioner", - text=""" + text=r""" This is a scaling factor to initialize the part of the Hessian related to the treatment of the stresses (optimisation of the unit cell). In case there is an instability, decrease the default value, e.g. set it to 0.1. @@ -15925,11 +16680,11 @@ dimensions=[6], defaultval=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], mnemonics="STRess TARGET", - text=""" + text=r""" The components of the stress tensor must be stored according to: (1,1) -->1; (2,2) --> 2; (3,3) --> 3; (2,3) --> 4; (3,1) --> 5; (1,2) -->6. The conversion factor between Ha/Bohr**3 and GPa is: 1 Ha/Bohr**3 = 29421.033d0 GPa. -Not used if [[optcell]]==0. +Not used if [[optcell]] == 0. """, ), @@ -15941,25 +16696,56 @@ dimensions=['[[nsym]]'], defaultval=MultipleValue(number='[[nsym]]', value=1), mnemonics="SYMmetries, Anti-FerroMagnetic characteristics", - text=""" -In case the material is magnetic (well, this is only interesting in the case -of antiferromagnetism, collinear or not), additional symmetries might appear, -that change the sign of the magnetization. They have been introduced by -Shubnikov (1951). They can be used by ABINIT to decrease the CPU time, by -using them to decrease the number of k-points. + text=r""" +In case the material is magnetic, [[nspden]]=2 or 4, additional symmetry operations might appear, +that change the sign of the magnetization (spin-flip). They have been introduced by +Shubnikov in 1951 [[cite:Bradley1972]]. They can be used by ABINIT to decrease the CPU time, either +by decreasing the number of k-points or by suppressing the explicit treatment of one spin channel, +or by decreasing the number of perturbations in DFPT. + [[symafm]] should be set to +1 for all the usual symmetry operations, that do not change the sign of the magnetization, while it should be set to -1 for the -magnetization-changing symmetries. +magnetization-changing operations (spin-flip). If the symmetry operations are not specified by the user in the input file, -that is, if [[nsym]]=0, then ABINIT will use the values of [[spinat]] to +that is, if [[nsym]] = 0, then ABINIT will use the values of [[spinat]] to determine the content of [[symafm]]. -The symmetries found as "antiferro magnetic" ([[symafm]]=-1) are used to -symmetrize density and magnetization in the following cases: -- antiferromagnetism ([[nsppol]]=1, [[nspinor]]=1, [[nspden]]=2) -- non-collinear magnetism ([[nsppol]]=1, [[nspinor]]=1, [[nspden]]=4) +The symmetries that can act on the magnetization can yield decreased CPU time (and usually also memory decrease) +in the following cases: + + * antiferromagnetism ([[nsppol]] = 1, [[nspinor]] = 1, [[nspden]] = 2) + * non-collinear magnetism ([[nsppol]] = 1, [[nspinor]] = 2, [[nspden]] = 4) + +Also in the case [[nsppol]] = 2, [[nspinor]] = 1, [[nspden]] = 2 they might simply yield better accuracy (or faster convergence), +but there is no automatic gain of CPU time or memory, although it is not as clear cut as in the above cases. + +IMPORTANT : The meaning of [[symafm]] is different in the [[nspden]] = 2 case (collinear magnetism), +and in the [[nspden]] = 4 case (non-collinear magnetism, with explicit treatment of magnetization as a vector). +Indeed in the first case, it is supposed that the magnetization vector is not affected by the real space symmetry operations +(so-called black and white symmetry groups). +By contrast, in the second case, the real space symmetry operations act on the magnetization vector. +The rationale for such different treatment comes from the fact that the treatment of spin-orbit coupling is incompatible with collinear magnetism [[nspden]]=2, +so there is no need to worry about it in this case. On the contrary, many calculations with [[nspden]]=2 +will include spin-orbit coupling. The symmetry operations should thus act coherently on the spin-orbit coupling, which implies +that the real space operations should act also on the magnetization vector in the [[nspden]]=4 case. So, with +[[nspden]]=4, even with [[symafm]]=1, +symmetry operations might change the magnetization vector, e.g. possibly reverse it from one atom to another atom. +Still, when real space operations also act on the magnetization vector, nothing prevents to have ADDITIONAL "spin-flip" operations, which +is indeed then the meaning of [[symafm]]=-1 in the [[nspden]]=4 case. + +Let's illustrate this with an example. Take an H$_2$ system, with the two H atoms quite distant from each other. +The electron on the first H atom might be 1s spin up, and the electron on the second atom might be 1s spin down. +With [[nspden]]=2, the inversion symmetry centered in the middle of the segment joining the two atoms will NOT act on the spin, +so that the actual symmetry operation that leaves the system invariant is an inversion ([[symrel]]= -1 0 0 0 -1 0 0 0 -1) accompanied +by a spin-flip with [[symafm]]=-1. +By contrast, with [[nspden]]=4, the inversion symmetry centered in the middle of the segment joining the two atoms will reverse the spin direction as well, +so that the proper symmetry operation is [[symrel]]= -1 0 0 0 -1 0 0 0 -1 but no additional spin-flip is needed to obtain a symmetry operation that leaves the system invariant, so that [[symafm]]=1. + +Although this might seem confusing, ABINIT is able to recognise the correct symmetry operations from the available atomic coordinates, from [[spinat]], +and from [[nspden]], so that the user should hardly be affected by such different conventions. However, the use of [[ptgroupma]] and [[spgroupma]] to define +the antiferromagnetic operations of symmetry should be done carefully. -In other cases they are not used. +Related variables: [[symrel]], [[tnons]], [[ptgroupma]], [[spgroupma]]. """, ), @@ -15970,20 +16756,20 @@ topics=['Susceptibility_expert'], dimensions="scalar", defaultval=1, - mnemonics=r"SYMmetryze $\chi_o$", + mnemonics=r"SYMmetryze $\chi_0$", characteristics=['[[DEVELOP]]'], - requires="[[optdriver]]==3", - text=""" -The evaluation of the irreducible polarizability for a given q-point requires + requires="[[optdriver]] == 3", + text=r""" +The evaluation of the irreducible polarizability for a given q point requires an integration over the Brillouin zone (BZ) which is approximated by a -discrete sum over k-points. In principle the integrand function should be +discrete sum over k points. In principle the integrand function should be evaluated for each k-point in the BZ, however it is possible to reduce the number of points to be explicitly considered by taking advantage of symmetry properties. The development input variable [[symchi]] is used to choose between these two equivalent methods: - * 0 --> the summation over k-points is performed considering ALL the points in the BZ (useful for testing and debugging). - * 1 --> the summation is restricted to the k-points belonging to the irreducible wedge defined by the little group associated to the external vector q. + * 0 --> the summation over k points is performed considering **all** the points in the BZ (useful for testing and debugging). + * 1 --> the summation is restricted to the k points belonging to the irreducible wedge defined by the little group associated to the external vector q. """, ), @@ -15995,10 +16781,10 @@ dimensions="scalar", defaultval=1, mnemonics="SYMmetrize the DYNamical MATrix", - text=""" + text=r""" If symdynmat is equal to 1, the dynamical matrix is symmetrized before the diagonalization (same meaning as the corresponding anaddb variable). Note that -symdynmat==1 will automatically enable the symmetrization of the electron- +[[symdynmat]] == 1 will automatically enable the symmetrization of the electron- phonon linewidths. """, ), @@ -16012,19 +16798,19 @@ defaultval=1, mnemonics="SYMMORPHIc symmetry operation selection", characteristics=['[[DEVELOP]]'], - text=""" -With [[symmorphi]]=1, symmetry operations with a non-symmorphic vector are -allowed. With [[symmorphi]]=0, they are not allowed. In the latter case, if + text=r""" +With [[symmorphi]] = 1, symmetry operations with a non-symmorphic vector are +allowed. With [[symmorphi]] = 0, they are not allowed. In the latter case, if the symmetry operations are specified in the input file, the code will stop and print an error message if a non-symmorphic vector is encountered. By contrast, if the symmetry operations are to be determined automatically (if -[[nsym]]=0), then the set of symmetries will not include the non-symmorphic +[[nsym]] = 0), then the set of symmetries will not include the non-symmorphic operations. Note: this feature exist because in a previous status of the GW calculations, non-symmorphic symmetry operations could not be exploited. Thus, the k points were restricted to the IBZ. In order to prepare GW calculations, and to -perform GW calculations, [[symmorphi]]=0 was to be used, together with [[nsym]]=0. +perform GW calculations, [[symmorphi]] = 0 was to be used, together with [[nsym]] = 0. """, ), @@ -16034,15 +16820,15 @@ vartype="integer", topics=['crystal_useful'], dimensions=[3, 3, '[[nsym]]'], - defaultval=ValueWithConditions({'[[nsym]]==1': [[1, 0, 0], [0, 1, 0], [0, 0, 1]], 'defaultval': None}), + defaultval=ValueWithConditions({'[[nsym]] == 1': [[1, 0, 0], [0, 1, 0], [0, 0, 1]], 'defaultval': None}), mnemonics="SYMmetry in REaL space", - text=""" + text=r""" Gives "[[nsym]]" 3x3 matrices expressing space group symmetries in terms of their action on the direct (or real) space primitive translations. It turns out that these can always be expressed as integers. Always give the identity matrix even if no other symmetries hold, e.g. -[[symrel]] 1 0 0 0 1 0 0 0 1 -Also note that for this array as for all others the array elements are filled +[[symrel]] 1 0 0 0 1 0 0 0 1. +Also note that for this array, as for all others, the array elements are filled in a columnwise order as is usual for Fortran. The relation between the above symmetry matrices [[symrel]], expressed in the basis of primitive translations, and the same symmetry matrices expressed in @@ -16051,6 +16837,8 @@ Then [[symrel]] = R(inverse) * S * R where matrix multiplication is implied. When the symmetry finder is used (see [[nsym]]), [[symrel]] will be computed automatically. +Also see the accompanying input variables [[tnons]] and [[symafm]], for the full definition of the symmetry operations. +Such variables are used to infer [[spgroup]], [[spgroupma]] and [[genafm]] if they are not user-defined. """, ), @@ -16063,22 +16851,22 @@ defaultval=0, mnemonics="SYMmetrization of SIGMA matrix elements", requires="[[optdriver]] in [4, 7]", - text=""" -This option activates the symmetrization of the self-energy matrix elements (*symsigma=1*). + text=r""" +This option activates the symmetrization of the self-energy matrix elements ([[symsigma]] = 1). In this case the BZ integration defining the self-energy matrix elements is reduced to an appropriate irreducible wedge defined by the point group of the wave-vector k specified in the [[kptgw]] list. The symmetrized expression leads to a considerable speedup of the run, especially -for high-symmetry k-points e.g. $\Gamma$. +for high-symmetry k points e.g. $\Gamma$. Unfortunately, this option is not yet compatible with self-consistent GW calculations (see [[gwcalctyp]]). The code constructs a symmetric invariant for the diagonal matrix elements of the self-energy by averaging the self-energy matrix -elements within the degenerate subspace. Therefore particular care has to be -taken in the presence of accidental degeneracies. since calculations -performed with *symsigma=1* won't be able to remove the initial +elements within the degenerate subspace. Therefore, particular care has to be +taken in the presence of accidental degeneracies. Since calculations +performed with [[symsigma]] = 1 will not be able to remove the initial accidental degeneracy. This is the reason why this option is not activated by default. """, ), @@ -16091,17 +16879,13 @@ dimensions="scalar", defaultval=0.0, mnemonics="Time-Dependent dft: MAXimal kohn-sham ENErgy difference", - text=""" -The Matrix to be diagonalized in the Casida framework (see "Time-Dependent -Density Functional Response Theory of Molecular systems: Theory, Computational -Methods, and Functionals", by M.E. Casida, in Recent Developments and -Applications of Modern Density Functional Theory, edited by J.M. Seminario -(Elsevier, Amsterdam, 1996).) is a NxN matrix, where, by default, N is the -product of the number of occupied states by the number of unoccupied states. -The input variable [[td_maxene]] allows to diminish N: it selects only the -pairs of occupied and unoccupied states for which the Kohn-Sham energy -difference is less than [[td_maxene]]. The default value 0.0 means that all -pairs are taken into account. + text=r""" +The Matrix to be diagonalized in the Casida framework (see [[cite:Casida1995]]) +is a NxN matrix, where, by default, N is the product of the number of occupied +states by the number of unoccupied states. The input variable [[td_maxene]] +allows one to diminish N: it selects only the pairs of occupied and unoccupied +states for which the Kohn-Sham energy difference is less than [[td_maxene]]. +The default value 0.0 means that all pairs are taken into account. See [[td_mexcit]] for an alternative way to decrease N. """, ), @@ -16114,17 +16898,13 @@ dimensions="scalar", defaultval=0, mnemonics="Time-Dependent dft: Maximal number of EXCITations", - text=""" -The Matrix to be diagonalized in the Casida framework (see "Time-Dependent -Density Functional Response Theory of Molecular systems: Theory, Computational -Methods, and Functionals", by M.E. Casida, in Recent Developments and -Applications of Modern Density Functional Theory, edited by J.M. Seminario -(Elsevier, Amsterdam, 1996).) is a NxN matrix, where, by default, N is the -product of the number of occupied states by the number of unoccupied states. -The input variable [[td_mexcit]] allows to diminish N: it selects the first -[[td_mexcit]] pairs of occupied and unoccupied states, ordered with respect to -increasing Kohn-Sham energy difference. However, when [[td_mexcit]] is zero, -all pairs are allowed. + text=r""" +The Matrix to be diagonalized in the Casida framework (see [[cite:Casida1995]]) +is a NxN matrix, where, by default, N is the product of the number of occupied +states by the number of unoccupied states. The input variable [[td_mexcit]] +allows one to diminish N: it selects the first [[td_mexcit]] pairs of occupied and +unoccupied states, ordered with respect to increasing Kohn-Sham energy difference. +However, when [[td_mexcit]] is zero, all pairs are allowed. See [[td_maxene]] for an alternative way to decrease N. """, ), @@ -16138,14 +16918,14 @@ defaultval=0, mnemonics="Thomas-Fermi KINetic energy FUNCtional", characteristics=['[[DEVELOP]]'], - text=""" - * [[tfkinfunc]]=1: Thomas-Fermi kinetic functional (explicit functional of the density) is used instead of Kohn-Sham kinetic energy functional (implicit functional of the density through Kohn-Sham wavefunctions). -See Perrot F., Phys. Rev. A20,586-594 (1979)). + text=r""" + * [[tfkinfunc]] = 1: Thomas-Fermi kinetic functional (explicit functional of the density) is used instead of Kohn-Sham kinetic + energy functional (implicit functional of the density through Kohn-Sham wavefunctions). See [[cite:Perrot1979]]. - * [[tfkinfunc]]=11: Thomas-Fermi-Weizsacker kinetic functional with Gradient Corrections is used. + * [[tfkinfunc]] = 11: Thomas-Fermi-Weizsacker kinetic functional with Gradient Corrections is used. The convergence of a calculation with this functional needs to be initialized from a calculation without Gradient Correction. This is automatically done -with [[tfkinfunc]]=11. For the initialization steps, the [[tfw_toldfe]] +with [[tfkinfunc]] = 11. For the initialization steps, the [[tfw_toldfe]] criterion is used. When it is reached, then the Gradient Correction is added and the SCF cycle continues. Note: to obtain the convergence of a Molecular Dynamics simulation with TFW, @@ -16153,8 +16933,18 @@ ([[diemix]], [[diemac]], [[dielng]]) and the best value of [[npulayit]] (if the default Pulay mixing is used). - * [[tfkinfunc]]=12: same as **tfkinfunc** =11, but without the initialization steps. Gradient correction is directly added. - * [[tfkinfunc]]=2: the Recursion Method is used in order to compute electronic density, entropy, Fermi energy and eigenvalues energy. This method computes the density without computing any orbital, is efficient at high temperature, with a efficient parallelization (almost perfect scalability). When that option is in use, the [[ecut]] input variable is no longer a convergence parameter; [[ngfft]] becomes the main convergence parameter: you should adapt ecut for the ngfft grid you need (it is not yet automatically computed). Other convergence parameter are for the energetic values: [[recnrec]], [[recptrott]], [[recnpath]]. + * [[tfkinfunc]] = 12: same as **tfkinfunc** =11, but without the initialization steps. + Gradient correction is directly added. + + * [[tfkinfunc]] = 2: the Recursion Method is used in order to compute electronic density, + entropy, Fermi energy and eigenvalues energy. This method computes the density + without computing any orbital, is efficient at high temperature, with a efficient + parallelization (almost perfect scalability). + When that option is in use, the [[ecut]] input variable is no longer a convergence + parameter; [[ngfft]] becomes the main convergence parameter: you should adapt ecut + for the ngfft grid you need (it is not yet automatically computed). + Other convergence parameter are for the energetic values: [[recnrec]], [[recptrott]], [[recnpath]]. + Since the convergence of the self-consistent cycle is determined directly by the convergence of the density: [[toldfe]], [[toldff]], [[tolrff]], [[tolvrs]], [[tolwfr]] are not used, and are replaced by [[rectolden]]; the @@ -16162,10 +16952,10 @@ latest SFC cycle: the output file will show a jump of the total energy at the end, but it is not because of a bad convergence behavior. Computational speed can be improved by the use of [[recrcut]] and [[recgratio]]. The recursion -method has not be tested in the case of non cubic cell or with the use of +method has not been tested in the case of non cubic cell or with the use of symmetries. -In the recursion method the following variables are set to: [[useylm]]=1, -[[userec]]=1. +In the recursion method the following variables are set to: [[useylm]] = 1, +[[userec]] = 1. """, ), @@ -16178,10 +16968,10 @@ defaultval="1.0E-6 or [[toldfe]] is present", mnemonics="Thomas-Fermi-Weizsacker: TOLerance on the DiFference of total Energy, for initialization steps", characteristics=['[[ENERGY]]'], - requires="[[tfkinfunc]]=11", - text=""" + requires="[[tfkinfunc]] = 11", + text=r""" This input variable has the same definition as [[toldfe]] and is only relevant -when [[tfkinfunc]]=11. +when [[tfkinfunc]] = 11. It sets a tolerance for absolute differences of total energy that, reached TWICE successively, will cause the initialization steps (without gradient correction) to stop and the gradient correction to be added. @@ -16199,7 +16989,7 @@ defaultval=0, mnemonics="TIMe 1st order REVersal", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Allowed values are 0 or 1. If tim1rev is equal to 1, the Sternheimer equation is solved simultaneously at @@ -16219,30 +17009,30 @@ defaultval=ValueWithConditions({'[[SEQUENTIAL]]': 1, 'defaultval': 0}), mnemonics="TIMing OPTion", characteristics=['[[NO_MULTI]]'], - text=""" -This input variable allows to modulate the use of the timing routines. + text=r""" +This input variable allows one to modulate the use of the timing routines. -If 0 --> as soon as possible, suppresses all calls to timing routines -If 1 --> usual timing behaviour, with short analysis, appropriate for + * If 0 --> as soon as possible, suppresses all calls to timing routines + * If 1 --> usual timing behaviour, with short analysis, appropriate for sequential execution -If 2 --> close to [[timopt]]=1, except that the analysis routine does not time + * If 2 --> close to [[timopt]] = 1, except that the analysis routine does not time the timer, appropriate for parallel execution. -If 3 --> close to [[timopt]]=1, except that the different parts of the lobpcg + * If 3 --> close to [[timopt]] = 1, except that the different parts of the lobpcg routine are timed in detail. -If 4 --> close to [[timopt]]=1, except that the different parts of the lobpcg + * If 4 --> close to [[timopt]] = 1, except that the different parts of the lobpcg routine are timed in detail. A different splitting of lobpcg than for -[[timopt]]=-3 is provided. -If -1 --> a full analysis of timings is delivered -If -2 --> a full analysis of timings is delivered, except timing the timer -If -3 --> a full analysis of timings is delivered, including the detailed +[[timopt]] = -3 is provided. + * If -1 --> a full analysis of timings is delivered + * If -2 --> a full analysis of timings is delivered, except timing the timer + * If -3 --> a full analysis of timings is delivered, including the detailed timing of the different parts of the lobpcg routine. (this takes time, and is discouraged for too small runs - the timing would take more time than the run !). The timer is timed. -If -4 --> a full analysis of timings is delivered, including the detailed + * If -4 --> a full analysis of timings is delivered, including the detailed timing of the different parts of the lobpcg routine. A different splitting of -lobpcg than for [[timopt]]=-3 is provided (this takes time, and is discouraged +lobpcg than for [[timopt]] = -3 is provided (this takes time, and is discouraged for too small runs - the timing would take more time than the run !). The -timer is timed. The sum of the independent parts is closer to 100% than for [[timopt]]=-3. +timer is timed. The sum of the independent parts is closer to 100% than for [[timopt]] = -3. """, ), @@ -16253,11 +17043,10 @@ topics=['Wavelets_expert'], dimensions="scalar", defaultval=30, - mnemonics="TaiL maximum Number of PReConditionner Conjugate Gradient iterations", - text=""" -This variable is similar to [[wvl_nprccg]] but for the preconditionner -iterations during the tail corrections (see [[tl_radius]] ). TO BE IMPROVED: -all tl_* and wvl_* variables should contain a link to a tutorial, David Waroquiers 090831. + mnemonics="TaiL maximum Number of PReConditioner Conjugate Gradient iterations", + text=r""" +This variable is similar to [[wvl_nprccg]] but for the preconditioner +iterations during the tail corrections (see [[tl_radius]]). """, ), @@ -16270,7 +17059,7 @@ defaultval=0.0, mnemonics="TaiL expansion RADIUS", characteristics=['[[LENGTH]]'], - text=""" + text=r""" In the wavelet computation case, the linkage between the grid and the free boundary conditions can be smoothed using an exponential decay. This means a correction on the energy at the end on each wavefunction optimisation run. If @@ -16288,7 +17077,7 @@ topics=['crystal_useful'], dimensions=[3, '[[nsym]]'], mnemonics="Translation NON-Symmorphic vectors", - text=""" + text=r""" Gives the (nonsymmorphic) translation vectors associated with the symmetries expressed in "[[symrel]]". These may all be 0, or may be fractional (nonprimitive) translations expressed @@ -16297,6 +17086,8 @@ leave 0 0 0 invariant, then these are all 0. When the symmetry finder is used (see [[nsym]]), [[tnons]] is computed automatically. + +See also [[symafm]] for the complete description of the symmetry operation. """, ), @@ -16310,12 +17101,12 @@ mnemonics="TOLerance on the DiFference of total Energy", characteristics=['[[ENERGY]]'], commentdefault="The default value implies that this stopping condition is ignored. For the SCF case, one and only one of the input tolerance criteria [[tolwfr]], [[toldff]], [[tolrff]], [[toldfe]] or [[tolvrs]] must differ from zero.", - excludes="specified([[tolwfr]]) or specified([[toldff]]) or specified([[tolrff]]) or specified([[tolvrs]])", - text=""" + excludes="[[tolwfr]] or [[toldff]] or [[tolrff]] or [[tolvrs]]", + text=r""" Sets a tolerance for absolute differences of total energy that, reached TWICE successively, will cause one SCF cycle to stop (and ions to be moved). Can be specified in Ha (the default), Ry, eV or Kelvin, since [[toldfe]] has -the '[[ENERGY]]' characteristics. (1 Ha=27.2113845 eV) +the '[[ENERGY]]' characteristics (1 Ha = 27.2113845 eV). If set to zero, this stopping condition is ignored. Effective only when SCF cycles are done ([[iscf]]>0). Because of machine precision, it is not worth to try to obtain differences in @@ -16346,15 +17137,15 @@ defaultval=0.0, mnemonics="TOLerance on the DiFference of Forces", commentdefault="The default value implies that this stopping condition is ignored. For the SCF case, one and only one of the input tolerance criteria [[tolwfr]], [[toldff]], [[tolrff]], [[toldfe]] or [[tolvrs]] must differ from zero.", - excludes="specified([[tolwfr]]) or specified([[toldfe]]) or specified([[tolrff]]) or specified([[tolvrs]])", - text=""" + excludes="[[tolwfr]] or [[toldfe]] or [[tolrff]] or [[tolvrs]]", + text=r""" Sets a tolerance for differences of forces (in hartree/Bohr) that, reached TWICE successively, will cause one SCF cycle to stop (and ions to be moved). If set to zero, this stopping condition is ignored. Effective only when SCF cycles are done ([[iscf]]>0). This tolerance applies to any particular cartesian component of any atom, INCLUDING fixed ones. This is to be used when trying to equilibrate a structure to its lowest energy -configuration ([[ionmov]]=2), or in case of molecular dynamics ([[ionmov]]=1) +configuration (select [[ionmov]]), or in case of molecular dynamics ([[ionmov]] = 1) A value ten times smaller than [[tolmxf]] is suggested (for example 5.0d-6 hartree/Bohr). This stopping criterion is not allowed for RF calculations. @@ -16363,8 +17154,7 @@ input variable at reading. Hence, it is forbidden that two of these input variables have non-zero values for the same dataset, or generically (for all datasets). However, a non-zero value for one such variable for one dataset -will have precedence on the non-zero value for another input variable defined -generically. +will have precedence on the non-zero value for another input variable defined generically. """, ), @@ -16377,15 +17167,14 @@ defaultval=5e-05, mnemonics="TOLerance on the mean total energy for IMaGes", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Sets a maximal absolute energy tolerance (in hartree, averaged over dynamic images) below which iterations on images (the one governed by the [[ntimimage]] input variable) will stop. This is to be used when trying to optimize a population of structures to their lowest energy configuration, taking into account the particular algorithm defined by [[imgmov]] -A value of about 5.0d-5 hartree or smaller is suggested (this corresponds to -about 3.7d-7 eV). +A value of about 5.0d-5 hartree or smaller is suggested (this corresponds to about 3.7d-7 eV). No meaning for RF calculations. """, ), @@ -16399,7 +17188,7 @@ defaultval=0.0, mnemonics="TOLerance on the MaXimal Difference in Energy", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Sets a maximal difference in energy with respect to the two previous steps below which BFGS structural relaxation iterations will stop. A value of about 0.0005 eV/atom or smaller is suggested. @@ -16416,7 +17205,7 @@ dimensions="scalar", defaultval=5e-05, mnemonics="TOLerance on the MaXimal Force", - text=""" + text=r""" Sets a maximal absolute force tolerance (in hartree/Bohr) below which BFGS structural relaxation iterations will stop. Can also control tolerance on stresses, when [[optcell]] /=0, using the @@ -16424,7 +17213,7 @@ cartesian component of any atom, excluding fixed ones. See the parameter [[ionmov]]. This is to be used when trying to equilibrate a structure to its lowest energy -configuration ( [[ionmov]] =2). +configuration. A value of about 5.0d-5 hartree/Bohr or smaller is suggested (this corresponds to about 2.5d-3 eV/Angstrom). No meaning for RF calculations. @@ -16439,7 +17228,7 @@ dimensions="scalar", defaultval=0.005, mnemonics="TOLerance on the Relative Difference of Eigenenergies", - text=""" + text=r""" Sets a tolerance for the ratio of differences of eigenenergies in the line minimisation conjugate-gradient algorithm. It compares the decrease of the eigenenergy due to the last line minimisation, with the one observed for the @@ -16461,8 +17250,8 @@ defaultval=0.0, mnemonics="TOLerance on the Relative diFference of Forces", commentdefault="The default value implies that this stopping condition is ignored. For the SCF case, one and only one of the input tolerance criteria [[tolwfr]], [[toldff]], [[tolrff]], [[toldfe]] or [[tolvrs]] must differ from zero.", - excludes="specified([[tolwfr]]) or specified([[toldfe]]) or specified([[toldff]]) or specified([[tolvrs]])'", - text=""" + excludes="[[tolwfr]] or [[toldfe]] or [[toldff]] or [[tolvrs]]'", + text=r""" Sets a tolerance for the ratio of differences of forces (in hartree/Bohr) to maximum force, that, reached TWICE successively, will cause one SCF cycle to stop (and ions to be moved): diffor < tolrff * maxfor. @@ -16470,7 +17259,7 @@ Effective only when SCF cycles are done ([[iscf]]>0). This tolerance applies to any particular cartesian component of any atom, INCLUDING fixed ones. This is to be used when trying to equilibrate a structure to its lowest energy -configuration ([[ionmov]]=2), or in case of molecular dynamics ([[ionmov]]=1) +configuration (select [[ionmov]]), or in case of molecular dynamics ([[ionmov]] = 1) A value of 0.02 is suggested. This stopping criterion is not allowed for RF calculations. Since [[toldfe]], [[toldff]], [[tolrff]], [[tolvrs]] and [[tolwfr]] are aimed @@ -16491,7 +17280,7 @@ dimensions="scalar", defaultval=1e-08, mnemonics="TOLERANCE for SYMmetries", - text=""" + text=r""" Gives the tolerance on the atomic positions (reduced coordinates), primitive vectors, or magnetization, to be considered equivalent, thanks to symmetry operations. This is used in the recognition of the set of symmetries of the @@ -16500,12 +17289,12 @@ 0.01 is considered to be unacceptable, whatever the value of [[tolsym]] (so, it is not worth to set [[tolsym]] bigger than 0.01). -Note: ABINIT needs the atomic positions to be symmmetric to each others -within 1.e-8, irrespective of [[tolsym]]. +Note: ABINIT needs the atomic positions to be symmetric to each others +within 1.e-8, irrespective of [[tolsym]]. So, if [[tolsym]] is set to a larger value than 1.e-8, then the input atomic coordinates will be nevertheless automatically symmetrized by the symmetry -operations that will have been found. -""" +operations that will have been found. +""" ), Variable( @@ -16517,14 +17306,14 @@ defaultval=0.0, mnemonics="TOLerance on the potential V(r) ReSidual", commentdefault="The default value implies that this stopping condition is ignored. For the SCF case, one and only one of the input tolerance criteria [[tolwfr]], [[toldff]], [[tolrff]], [[toldfe]] or [[tolvrs]] must differ from zero.", - excludes="specified([[tolwfr]]) or specified([[toldfe]]) or specified([[toldff]]) or specified([[tolrff]])'", - text=""" + excludes="[[tolwfr]] or [[toldfe]] or [[toldff]] or [[tolrff]]'", + text=r""" Sets a tolerance for potential residual that, when reached, will cause one SCF cycle to stop (and ions to be moved). If set to zero, this stopping condition is ignored. Effective only when SCF cycles are done ([[iscf]]>0). To get accurate stresses may be quite demanding. For simple materials with -internal positions determined by symmetries, a value of [[tolvrs]]=10^-12 +internal positions determined by symmetries, a value of [[tolvrs]] = 10^-12 empirically leads to a very approximate 10^-6 atomic unit accuracy for the optimized lattice parameter. @@ -16556,8 +17345,8 @@ defaultval=0.0, mnemonics="TOLerance on WaveFunction squared Residual", commentdefault="The default value implies that this stopping condition is ignored. For the SCF case, one and only one of the input tolerance criteria [[tolwfr]], [[toldff]], [[tolrff]], [[toldfe]] or [[tolvrs]] must differ from zero.", - excludes="specified([[toldfe]]) or specified([[toldff]]) or specified([[tolrff]]) or specified([[tolvrs]])", - text=""" + excludes="[[toldfe]] or [[toldff]] or [[tolrff]] or [[tolvrs]]", + text=r""" The signification of this tolerance depends on the basis set. In plane waves, it gives a convergence tolerance for the largest squared "residual" (defined below) for any given band. The squared residual is: @@ -16570,7 +17359,7 @@ bands and k points must be less than [[tolwfr]] for iterations to halt due to successful convergence. Note that if [[iscf]]>0, this criterion should be replaced by those based on -[[toldfe]] (preferred for [[ionmov]]==0), [[toldff]] [[tolrff]] (preferred for +[[toldfe]] (preferred for [[ionmov]] == 0), [[toldff]] [[tolrff]] (preferred for [[ionmov]]/=0), or [[tolvrs]] (preferred for theoretical reasons!). When [[tolwfr]] is 0.0, this criterion is ignored, and a finite value of [[toldfe]], [[toldff]] or [[tolvrs]] must be specified. This also imposes a @@ -16581,8 +17370,8 @@ highly converged. Typical values for these preparatory runs are [[tolwfr]] between 1.0d-16 and 1.0d-22. -Note that [[tolwfr]] is often used in the test cases, but this is _tolwfr_ -purely for historical reasons: except when [[iscf]] <0, other critera should be used. +Note that [[tolwfr]] is often used in the test cases, but this is [[tolwfr]] +purely for historical reasons: except when [[iscf]] <0, other criteria should be used. In the wavelet case (see [[usewvl]] = 1), this criterion is the favoured one. It is based on the norm 2 of the gradient of the wavefunctions. Typical values @@ -16606,15 +17395,15 @@ defaultval=0.0, mnemonics="Temperature (PHYSical) of the ELectrons", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Gives, in Hartree, the physical temperature of the system, in case -[[occopt]]=4, 5, 6, or 7. -Can be specified in Ha (the default), Ry, eV or Kelvin, since **ecut** has the +[[occopt]] = 4, 5, 6, or 7. + +Can be specified in Ha (the default), Ry, eV or Kelvin, since [[tphysel]] has the '[[ENERGY]]' characteristics (0.001 Ha = 27.2113845 meV = 315.773 Kelvin). One has to specify an independent broadening [[tsmear]]. The combination of the -two parameters [[tphysel]] and [[tsmear]] is described in a paper by M. -Verstraete and X. Gonze, Phys. Rev. B 65, 035111 (2002). Note that the -signification of the entropy is modified with respect to the usual entropy. +two parameters [[tphysel]] and [[tsmear]] is described in [[cite:Verstraete2002]]. +Note that the signification of the entropy is modified with respect to the usual entropy. The choice has been made to use [[tsmear]] as a prefactor of the entropy, to define the entropy contribution to the free energy. """, @@ -16629,23 +17418,22 @@ defaultval=0.01, mnemonics="Temperature of SMEARing", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Gives the broadening of occupation numbers [[occ]], in the metallic cases -([[occopt]]=3, 4, 5, 6 and 7). Can be specified in Ha (the default), eV, Ry, +([[occopt]] = 3, 4, 5, 6 and 7). Can be specified in Ha (the default), eV, Ry, or Kelvin, since [[tsmear]] has the '[[ENERGY]]' characteristics (0.001 Ha = 27.2113845 meV = 315.773 Kelvin). -Default is 0.01 Ha. This should be OK using gaussian like smearings (occopt -4,5,6,7) for a free-electron metal like Al. For d-band metals, you may need to +Default is 0.01 Ha. This should be OK using gaussian like smearings ([[occopt]] = 4,5,6,7) +for a free-electron metal like Al. For d-band metals, you may need to use less. Always check the convergence of the calculation with respect to this parameter, and simultaneously, with respect to the sampling of k-points (see [[nkpt]]) -If [[occopt]]=3, [[tsmear]] is the physical temperature, as the broadening is -based on Fermi-Dirac statistics. However, if [[occopt]]=4, 5, 6, or 7, the +If [[occopt]] = 3, [[tsmear]] is the physical temperature, as the broadening is +based on Fermi-Dirac statistics. However, if [[occopt]] = 4, 5, 6, or 7, the broadening is not based on Fermi-Dirac statistics, and [[tsmear]] is only a convergence parameter. It is still possible to define a physical temperature, -thanks to the input variable [[tphysel]]. See the paper by M. Verstraete and -X. Gonze, Phys. Rev. B (2002). +thanks to the input variable [[tphysel]] (See also [[cite:Verstraete2002]]). """, ), @@ -16655,9 +17443,9 @@ vartype="integer", topics=['crystal_basic', 'AtomTypes_basic'], dimensions=ValueWithConditions({'[[natrd]]<[[natom]]': [3, '[[natrd]]'], 'defaultval': [3, '[[natom]]']}), - defaultval=ValueWithConditions({'[[natom]]==1': 1, 'defaultval': None}), + defaultval=ValueWithConditions({'[[natom]] == 1': 1, 'defaultval': None}), mnemonics="TYPe of AToms", - text=""" + text=r""" Array giving an integer label to every atom in the unit cell to denote its type. The different types of atoms are constructed from the pseudopotential files. @@ -16673,7 +17461,11 @@ be ordered to agree with the atoms identified in [[typat]]. The nuclear charge of the elements, given by the array [[znucl]], also must agree with the type of atoms designated in "[[typat]]". -The array [[typat]] is not constrained to be increasing. An internal +The array [[typat]] is not constrained to be increasing, so + + typat 3 3 2 3 1 + +is permitted. An internal representation of the list of atoms, deep in the code (array atindx), groups the atoms of same type together. This should be transparent to the user, while keeping efficiency. @@ -16689,11 +17481,12 @@ defaultval=0, mnemonics="calculation of the screened interaction U with the Constrained RPA method", requires="[[nspinor]] == 1", - text=""" -When equal to one or two, this variable allows for the calculation of U with -the cRPA method. An explicit test is shown in automatic tests v7/t23-t24-t25 -and in v7/t68-t69. The present implementation is parallelized (as for usual GW -calculations), use symetry over k-points only for calculations involving one + text=r""" +When equal to one or two, this variable allows one to calculate U with +the cRPA method. An explicit test is shown in automatic tests +[[test:v7_23]], [[test:v7_24]], [[test:v7_25]], [[test:v7_68]], and [[test:v7_69]]. +The present implementation is parallelized (as for usual GW +calculations), use symmetry over k points only for calculations involving one correlated atom, and can be use when correlated bands are entangled or not. The constrained calculation of the polarisability can be done by eliminating transition betweens correlated bands (and not orbitals) with the variable @@ -16707,13 +17500,12 @@ For [[ucrpa]] = 2, the ucrpa_bands should be equal to the [[dmftbandi]] and [[dmftbandf]] values, and the polarisability of the correlated subspace is -constructed with a band and k-point dependent weight. +constructed with a band and k point dependent weight. The implementation is restricted to the case of [[nspinor]] = 1 (collinear case). A short presentation of the method and some aspect of the implementation can -be found in Section II and Appendix A of -[B. Amadon, T. Applencourt and F. Bruneval Phys. Rev. B 89, 125110 (2014)](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.89.125110). +be found in Sec. II and Appendix A of [[cite:Amadon2014]]. """, ), @@ -16726,7 +17518,7 @@ defaultval=[-1, -1], mnemonics="For the calculation of U with the Constrained RPA method, gives correlated BANDS", commentdefault="That is, the default includes no band.", - text=""" + text=r""" Gives the first and last correlated bands for the cRPA calculation of the polarisability. """, ), @@ -16740,7 +17532,7 @@ defaultval=[-1, -1], mnemonics="For the calculation of U with the Constrained RPA method, gives energy WINDOW", commentdefault="That is, the energy window is empty by default.", - text=""" + text=r""" Specify a window of energy for the cRPA calculation of the polarisability. The transition inside this window will not be taken into account in the constrained polarisabilty calculations. @@ -16758,7 +17550,7 @@ dimensions=[2], mnemonics="Upper limit on DaTa SETs", commentdefault="It is not used when it is not defined", - text=""" + text=r""" Used to define the set of indices in the multi-data set mode, when a double loop is needed (see later). The values of [[udtset]](1) must be between 1 and 999, the values of @@ -16791,8 +17583,8 @@ defaultval=MultipleValue(number=None, value=0), mnemonics="value of U for PAW+U", characteristics=['[[ENERGY]]'], - requires="[[usepaw]]==1 and [[usepawu]]==1", - text=""" + requires="[[usepaw]] == 1 and [[usepawu]] == 1", + text=r""" Gives the value of the screened coulomb interaction between correlated electrons corresponding to [[lpawu]] for each species. In the case where [[lpawu]] =-1, the value is not used. @@ -16800,7 +17592,7 @@ be REMOVED from the self energy. In particular, for G0 W0 calculations (perturbative calculations), the energy eigenvalues obtained after an underlying DFT+U calculation will be -E_GW = E_DFT+U + < phi | Self-energy - U | phi> +$E_{GW} = E_{DFT+U} + < \\phi | Self-energy - U | \\phi>$ Actually, in order to perform a GW @ DFT+U calculation, one should define the same value of U in the self-energy calculation, than the one defined in the DFT calculation. The easiest is actually to define the value of U for the @@ -16808,9 +17600,9 @@ screening, even if the U value does not play explicitly a role in the computation of the latter (well, the input wavefunctions will be different anyhow). -It is possible to perform calculations of the type GW+U_prime @ DFT+U, so -keeping a U interaction (usually smaller than the initial U) in the GW -calculation, by defining a smaller U than the one used in the DFT calculation. +It is possible to perform calculations of the type GW+$U^{'}$ @ DFT+U, so +keeping a $U^{'}$ interaction (usually smaller than the initial U) in the GW +calculation. This value will be subtracted in the GW correction calculation, as outlined above. Explicitly, in order to do a calculation of a material with a DFT U value of @@ -16834,9 +17626,9 @@ mnemonics="USE the GEMM routine for the application of the NON-Local OPerator", characteristics=['[[DEVELOP]]'], commentdefault="because it is not usually worth using it unless bandpp is large and it requires additional memory", - text=""" + text=r""" This keyword tells abinit to use a BLAS routine to speed up the computation of -the non-local operator. This requires the precomputation of a large matrix, +the non-local operator. This requires the pre-computation of a large matrix, and has a significant memory overhead. In exchange, it provides improved performance when used on several bands at once (Chebyshev or LOBPCG algorithm with [[bandpp]] @@ -16857,14 +17649,12 @@ vartype="integer", topics=['parallelism_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[optdriver]]==0 and [[CUDA]]': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[optdriver]] == 0 and [[CUDA]]': 1, 'defaultval': 0}), mnemonics="activate USE of GPU accelerators with CUDA (nvidia)", - text=""" + text=r""" Only available if ABINIT executable has been compiled with cuda nvcc compiler. -This parameter activates the use of NVidia graphic accelerators (GPU) if -present. -If [[use_gpu_cuda]] = 1, some parts of the computation are transmitted to the -GPUs. +This parameter activates the use of NVidia graphic accelerators (GPU) if present. +If [[use_gpu_cuda]] = 1, some parts of the computation are transmitted to the GPUs. If [[use_gpu_cuda]] = 0, no computation is done on GPUs, even if present. Note that, while running ABINIT on GPUs, it is recommended to use MAGMA @@ -16884,7 +17674,7 @@ mnemonics="USE NON-SCF calculation of GKK matrix elements (electron phonon)", characteristics=['[[DEVELOP]]'], commentdefault="Default is 0 for the moment. Do not use non-scf method.", - text=""" + text=r""" When this flag is activated during a phonon calculation with abinit, all of the perturbations are cycled through, but only the symmetry-irreducible ones are calculated self-consistently. For the others the perturbed density is @@ -16915,11 +17705,23 @@ defaultval=0, mnemonics="USE ScaLapacK", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" If set to 1, enable the use of ScaLapack within LOBPCG. """, ), +Variable( + abivarname="use_yaml", + varset="dev", + vartype="integer", + topics=[], + dimensions="scalar", + defaultval=0, + mnemonics="USE YAML", + characteristics=['[[DEVELOP]]'], + text="If set to 1, enable the printing of YAML document in ouput.", +), + Variable( abivarname="usedmatpu", varset="paw", @@ -16928,8 +17730,8 @@ dimensions="scalar", defaultval=0, mnemonics="USE of an initial Density MATrix in Paw+U", - requires="[[usepaw]]==1 and [[usepawu]]==1", - text=""" + requires="[[usepaw]] == 1 and [[usepawu]] == 1", + text=r""" When [[usedmatpu]]/=0, an initial density matrix (given by [[dmatpawu]] keyword) is used and kept fixed during the first ABS([[usedmatpu]]) SCF steps. This starting value of the density matrix can be useful to find the correct @@ -16956,29 +17758,26 @@ defaultval=0, mnemonics="USE Dynamical Mean Field Theory", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" If set to 1, enable the use of DFT+DMFT, see in particular the important variables [[dmft_solv]], [[dmftbandi]], [[dmftbandf]], [[dmft_nwli]], [[dmft_nwlo]], [[dmft_tollc]], [[dmft_tolfreq]], and [[dmft_iter]]. -The current implementation uses Wannier functions obtained from [ projected -local orbitals -](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.77.205112) as -correlated orbitals (see [[dmftbandi]] and [[dmftbandf]] input variables to -define them). +The current implementation uses Wannier functions obtained from +[[ cite:Amadon2008 | projected local orbitals ]] as +correlated orbitals (see [[dmftbandi]] and [[dmftbandf]] input variables to define them). The Green functions are computed on a mesh of linear Matsubara frequencies. However, most of the code uses logarithmic Matsubara grid to lower the -computational cost. Both [[dmft_nwli]] and [[dmft_nwlo]] are thus convergence -parameters. +computational cost. Both [[dmft_nwli]] and [[dmft_nwlo]] are thus convergence parameters. -DMFT is currently available for collinear ([[nspinor]]=1) polarized or -unpolarized calculations ([[nspden]]=[[nsppol]]=2 or [[nspden]]=[[nsppol]]=1) -and for non collinear calculations ([[nspinor]]=2,[[nspden]]=4,[[nsppol]]=1). +DMFT is currently available for collinear ([[nspinor]] = 1) polarized or +unpolarized calculations ([[nspden]] = [[nsppol]] = 2 or [[nspden]] = [[nsppol]] = 1) +and for non collinear calculations ([[nspinor]] = 2,[[nspden]] = 4,[[nsppol]] = 1). However it is not yet available for collinear antiferromagnetic calculations -([[nspden]]=2,[[nsppol]]=1) and non collinear non magnetic calculations -([[nspden]]=1, [[nsppol]]=1,[[nspinor]]=2). CTQMC calculations -([[dmft_solv]]=5) are not yet possible if [[nspinor]]=2. +([[nspden]] = 2,[[nsppol]] = 1) and non collinear non magnetic calculations +([[nspden]] = 1, [[nsppol]] = 1,[[nspinor]] = 2). CTQMC calculations +([[dmft_solv]] = 5) are not yet possible if [[nspinor]] = 2. Only static calculations without relaxation or dynamics are possible (forces and stress are not computed in the scheme: so the computed values should NOT @@ -16990,25 +17789,22 @@ Relevant direct output quantities from converged DMFT calculations are total energy and occupation of correlated orbitals. For Hubbard I calculation -([[dmft_solv]]=2), total and partial spectral functions can be obtained with +([[dmft_solv]] = 2), total and partial spectral functions can be obtained with prtdos=1 and can be found in files OUTSpFunc* (where OUT is the root for -output files). For CTQMC calculations ([[dmft_solv]]=5), imaginary time +output files). For CTQMC calculations ([[dmft_solv]] = 5), imaginary time impurity Green function are output of the calculations and can be used to produce spectral function using an external Maximum Entropy Code. A typical DFT+DMFT calculation involves two runs. First, a DFT calculation is fully converged (even unoccupied wavefunctions have to be converged). Then, the DFT+DMFT calculation is started using DFT wavefunctions or density files. -As DFT+DMFT calculations (with CTQMC) are computationnally expensive, it is +As DFT+DMFT calculations (with CTQMC) are computationally expensive, it is convenient to use prtden=-1, to write DEN file at each DFT iteration, in order to be able to restart the calculation easily. -For details of the implementation see, [ B. Amadon, F. Lechermann, A. Georges, -F. Jollet, T. O. Wehling, and A. I. Lichtenstein, Phys. Rev. B 77(20), (2008) -](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.77.205112), for -Wannier functions and B. Amadon, J. Phys.: Condens. Matter 24 075604 (2012) -(doi:10.1088/0953-8984/24/7/075604), for self-consistency and Hubbard I -implementation. If [[usedmft]]=1 and [[nbandkss]]/=0, then, the DFT+DMFT +For details of the implementation with Wannier functions see [[cite:Amadon2008]], +for self-consistency and Hubbard I +implementation see [[cite:Amadon2012]]. If [[usedmft]] = 1 and [[nbandkss]]/=0, then, the DFT+DMFT calculation is not done and only projections are computed at the end of the calculation. They can be used by an external code or used to compute the screened interaction (see variable [[ucrpa]]). @@ -17023,9 +17819,9 @@ dimensions="scalar", defaultval=0, mnemonics="USE of EXact EXCHange", - requires="[[usepaw]]==1", - text=""" -When [[useexexch]]=1, the hybrid functional PBE0 is used in PAW, inside PAW + requires="[[usepaw]] == 1", + text=r""" +When [[useexexch]] = 1, the hybrid functional PBE0 is used in PAW, inside PAW spheres only, and only for correlated orbitals given by [[lexexch]]. To change the ratio of exact exchange, see also [[exchmix]]. """, @@ -17040,7 +17836,7 @@ defaultval=0, mnemonics="USE FOCK exact exchange", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable is automatically set to 1 when the value of [[ixc]] refers to an Hartree-Fock calculation or hybrid functionals. @@ -17057,12 +17853,12 @@ dimensions="scalar", defaultval=0, mnemonics="USE Kinetic energy DENsity", - text=""" -If [[usekden]]=1 the kinetic energy density will be computed during the self- -consistency loop, in a way similar to the computation of the density. This is -needed if a meta-GGA is to be used as XC functional. Otherwise -([[usekden]]=0), the kinetic energy density is not computed during the self- -consistency loop. + text=r""" +If [[usekden]] = 1 the kinetic energy density will be computed during +the self-consistent loop, in a way similar to the computation of the density. +This is needed if a meta-GGA is to be used as XC functional. By default +([[usekden]] = 0), the kinetic energy density is not computed during the self- +consistent loop. """, ), @@ -17075,11 +17871,11 @@ defaultval="[[AUTO_FROM_PSP]]", mnemonics="USE Projector Augmented Waves method", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This variable is determined by the pseudopotentials files. PAW calculations -(see [[lesson:paw1]]) can only be performed with PAW atomic data input files, -while pseudopotential calculations are performed in ABINIT with norm- -conserving pseudopotential input files. Most functionalities in ABINIT are +(see [[tutorial:paw1]]) can only be performed with PAW atomic data input files, +while pseudopotential calculations are performed in ABINIT with norm-conserving +pseudopotential input files. Most functionalities in ABINIT are available with either type of calculation. """, ), @@ -17092,25 +17888,29 @@ dimensions="scalar", defaultval=0, mnemonics="USE PAW+U (spherical part)", - requires="[[usepaw]]==1", + requires="[[usepaw]] == 1", text=r""" Must be non-zero if a DFT+U calculation is done, or if a GW calculation following a DFT+U calculation is done (important!). * If set to 0, the LDA+U method is not used. - * If set to 1 or 2, the LDA+U method (cf [1]) is used. The full rotationally invariant formulation is used (see Eq. (3) of Ref [2]) for the interaction term of the energy. Two choices are allowed concerning the double counting term: + * If set to 1, 2 or 4, the LDA+U method (cf [[cite:Anisimov1991a]]) is used. +The full rotationally invariant formulation is used (see Eq. (3) of [[cite:Liechtenstein1995]]) for the interaction term of the energy. +Three choices are allowed concerning the double counting term: + + * If [[usepawu]] = 1, the Full Localized Limit (FLL) (or Atomic limit) double counting is used (cf Eq. (4) of [[cite:Liechtenstein1995]] or Eq. (8) of [[cite:Czyzyk1994]]). - * If [[usepawu]]=1, the Full Localized Limit (FLL) (or Atomic limit) double counting is used (cf Eq. (4) of Ref.[2] or Eq. (8) of Ref[3]). + * If [[usepawu]] = 2, the Around Mean Field (AMF) double counting is used (cf Eq. (7) of [[cite:Czyzyk1994]]). Not valid if nspinor=2. - * If [[usepawu]]=2, the Around Mean Field (AMF) double counting is used (cf Eq. (7) of Ref [3]). Not valid if nspinor=2. + * If [[usepawu]] = 4, the FLL double counting is used. However, and in comparison to usepaw=1, the calculation is done without + polarization in the exchange correlation functional (cf [[cite:Park2015]] and [[cite:Chen2016a]]). In this case, one must use [[iscf]]<10. -If LDA+U is activated ([[usepawu]]=1 or 2), the [[lpawu]], [[upawu]] and +If LDA+U is activated ([[usepawu]] = 1 or 2), the [[lpawu]], [[upawu]] and [[jpawu]] input variables are read. -The implementation is done inside PAW augmentation regions only (cf Ref [4]). +The implementation is done inside PAW augmentation regions only (cf [[cite:Bengone2000]]). The initial density matrix can be given in the input file (see [[usedmatpu]]). -The expression of the density matrix is chosen thanks to [[dmatpuopt]]. See -also [How_to_use_LDA_plus_U.txt](../../guide/legacy/How_to_use_LDA_plus_U.txt). for further information. +The expression of the density matrix is chosen thanks to [[dmatpuopt]]. In the case of a GW calculation on top of a DFT+U, the absence of definition of a U value in the self-energy will LEAVE the underlying U from the DFT calculation. Thus, the code will actually do a GW+U @ DFT+U calculation. Note @@ -17124,35 +17924,56 @@ datasets), including the screening, even if the U value does not play explicitly a role in the computation of the latter (well, the input wavefunctions will be different anyhow). -It is possible to perform calculations of the type GW+U_prime @ DFT+U, so +It is possible to perform calculations of the type GW+$U^{'}$ @ DFT+U, so keeping a smaller U interaction in the GW calculation, by subtracting a smaller U than the one used in the DFT calculation. See the description of the [[upawu]] input variable. -References: -[1] V. I. Anisimov, J. Zaanen, and O. K. Andersen PRB 44, 943 (1991) -[2] A.I. Lichtenstein, V.I. Anisimov and J. Zaanen PRB 52, 5467 (1995) -[3] M. T. Czyzyk and G. A. Sawatzky PRB 49, 14211 (1994) -[4] O. Bengone, M. Alouani, P. Blochl, and J. Hugel PRB 62, 16392 (2000) +Suggested acknowledgment:[[cite:Amadon2008a]]. -Suggested acknowledgment: -- B. Amadon, F. Jollet and M. Torrent, Phys. Rev. B 77, 155104 (2008). +""", +), + +Variable( + abivarname="usepead", + varset="dfpt", + vartype="integer", + topics=['nonlinear_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="USE of PEAD formalism", + requires="[[optdriver]] == 5 (non-linear response computations)", + text=r""" +Determine which non-linear implementation is used. If [[usepead]]=1, the Perturbation +Expansion After Discretization formalism is used, as in [[cite:Veithen2005]]. +In that method, the electric field is treated numerically, i.e the k-space +gradient operator appearing in the expression of the electric field potential +is discretized (see Eq.7 and 10 of [[cite:Veithen2005]]). +If [[usepead]]=0, the electric field is treated analytically, leading to a better +k-points convergence. Furthermore, the current implementation is compatible with PAW +pseudopentials, while [[usepead]]=1 is not. The drawback of the analytical method +is one has to solve a second order Sternheimer equation before actually computing +third derivatives of the energy, using [[rf2_dkdk]] and [[rf2_dkde]]. +This is not the most time-consumming part though. +Look at the inputs of related tests in the testsuite to see examples of the workflow. """, ), Variable( abivarname="usepotzero", - varset="paw", + varset="dev", vartype="integer", topics=['Coulomb_useful'], dimensions="scalar", defaultval=0, mnemonics="USE POTential ZERO", - text=""" - * [[usepotzero]]=0, the usual convention: the smooth potential is set to zero averarage value. - * [[usepotzero]]=1, the new convention: the physical potential is set to zero average value. - * [[usepotzero]]=2, the PWscf convention: the potential of equivalent point charges is set to zero average value (convention also valid for NC pseudopotentials). + text=r""" +Fix the convention for the choice of the average value of the Hartree potential, as described in [[cite:Bruneval2014]]. + * [[usepotzero]] = 0, the usual convention: the smooth potential is set to zero average value. + * [[usepotzero]] = 1, the new convention: the all-electron physical potential is set to zero average value. + * [[usepotzero]] = 2, the PWscf convention: the potential of equivalent point charges is set to + zero average value (convention also valid for NC pseudopotentials). """, ), @@ -17165,7 +17986,7 @@ defaultval=0, mnemonics="USE RECursion", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" This internal variable is set to 1 when the recursion method is activated (see [[tfkinfunc]]). """, ), @@ -17178,12 +17999,12 @@ dimensions="scalar", defaultval=0, mnemonics="USER Integer variable A", - text=""" + text=r""" These are user-definable integers which the user may input and then utilize in subroutines of his/her own design. They are not used in the official versions of the ABINIT code, and should ease independent developments (hopefully integrated in the official version afterwards). -Internally, they are available in the dtset structured datatype, e.g. dtset%useria. +Internally, they are available in the dtset structured datatype, e.g. `dtset%useria`. """, ), @@ -17195,12 +18016,12 @@ dimensions="scalar", defaultval=0, mnemonics="USER Integer variable B", - text=""" + text=r""" These are user-definable integers which the user may input and then utilize in subroutines of his/her own design. They are not used in the official versions of the ABINIT code, and should ease independent developments (hopefully integrated in the official version afterwards). -Internally, they are available in the dtset structured datatype, e.g. dtset%useria. +Internally, they are available in the dtset structured datatype, e.g. `dtset%useria`. """, ), @@ -17212,12 +18033,12 @@ dimensions="scalar", defaultval=0, mnemonics="USER Integer variable C", - text=""" + text=r""" These are user-definable integers which the user may input and then utilize in subroutines of his/her own design. They are not used in the official versions of the ABINIT code, and should ease independent developments (hopefully integrated in the official version afterwards). -Internally, they are available in the dtset structured datatype, e.g. dtset%useria. +Internally, they are available in the dtset structured datatype, e.g. `dtset%useria`. """, ), @@ -17229,12 +18050,12 @@ dimensions="scalar", defaultval=0, mnemonics="USER Integer variable D", - text=""" + text=r""" These are user-definable integers which the user may input and then utilize in subroutines of his/her own design. They are not used in the official versions of the ABINIT code, and should ease independent developments (hopefully integrated in the official version afterwards). -Internally, they are available in the dtset structured datatype, e.g. dtset%useria. +Internally, they are available in the dtset structured datatype, e.g. `dtset%useria`. """, ), @@ -17246,12 +18067,12 @@ dimensions="scalar", defaultval=0, mnemonics="USER Integer variable E", - text=""" + text=r""" These are user-definable integers which the user may input and then utilize in subroutines of his/her own design. They are not used in the official versions of the ABINIT code, and should ease independent developments (hopefully integrated in the official version afterwards). -Internally, they are available in the dtset structured datatype, e.g. dtset%useria. +Internally, they are available in the dtset structured datatype, e.g. `dtset%useria`. """, ), @@ -17263,7 +18084,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="USER Real variable A", - text=""" + text=r""" These are user-definable with the same purpose as [[useria]] and cie. """, ), @@ -17276,7 +18097,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="USER Real variable B", - text=""" + text=r""" These are user-definable with the same purpose as [[useria]] and cie. """, ), @@ -17289,7 +18110,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="USER Real variable C", - text=""" + text=r""" These are user-definable with the same purpose as [[useria]] and cie. """, ), @@ -17302,7 +18123,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="USER Real variable D", - text=""" + text=r""" These are user-definable with the same purpose as [[useria]] and cie. """, ), @@ -17315,7 +18136,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="USER Real variable E", - text=""" + text=r""" These are user-definable with the same purpose as [[useria]] and cie. """, ), @@ -17329,7 +18150,7 @@ defaultval=0, mnemonics="Use WaVeLet basis set", commentdefault="use plane-wave basis set", - text=""" + text=r""" Used to define if the calculation is done on a wavelet basis set or not. The values of [[usewvl]] must be 0 or 1. Putting [[usewvl]] to 1, makes [[icoulomb]] mandatory to 1. The number of band ([[nband]]) must be set @@ -17339,7 +18160,7 @@ In wavelet case, the system must be isolated systems (molecules or clusters). All geometry optimization are available (see [[ionmov]], especially the geometry optimisation and the molecular dynamics). -The spin computation is not currently possible with wavelets and metalic +The spin computation is not currently possible with wavelets and metallic systems may be slow to converge. """, ), @@ -17352,18 +18173,18 @@ dimensions="scalar", defaultval=-1, mnemonics="USE eXchange-Correlation with NHAT (compensation charge density)", - requires="[[usepaw]]==1", - text=""" + requires="[[usepaw]] == 1", + text=r""" This flag determines how the exchange-correlation terms are computed for the pseudo-density. -When [[usexcnhat]]=0, exchange-correlation potential does not include the -compensation charge density, i.e. Vxc=Vxc(tild_Ncore + tild_Nvalence). -When [[usexcnhat]]=1, exchange-correlation potential includes the compensation -charge density, i.e. Vxc=Vxc(tild_Ncore + tild_Nvalence + hat_N). -When [[usexcnhat]]=-1,the value of [[usexcnhat]] is determined from the +When [[usexcnhat]] = 0, exchange-correlation potential does not include the +compensation charge density, i.e. $V_{xc}=V_{xc}(\\tilde{n}_{core} + \\tilde{n}_{valence})$. +When [[usexcnhat]] = 1, exchange-correlation potential includes the compensation +charge density, i.e. $V_{xc}=V_{xc}(\\tilde{n}_{core} + \\tilde{n}_{valence}+\\hat{n})$. +When [[usexcnhat]] = -1,the value of [[usexcnhat]] is determined from the reading of the PAW dataset file (pseudopotential file). When PAW datasets with -different treatment of Vxc are used in the same run, the code stops. +different treatment of $V_{xc}$ are used in the same run, the code stops. """, ), @@ -17373,17 +18194,17 @@ vartype="integer", topics=['TuningSpeed_expert'], dimensions="scalar", - defaultval=ValueWithConditions({'[[tfkinfunc]]==1': 1, '[[usepaw]]==1': 1, 'defaultval': 0}), + defaultval=ValueWithConditions({'[[tfkinfunc]] == 1': 1, '[[usepaw]] == 1': 1, 'defaultval': 0}), mnemonics="USE YLM (the spherical harmonics)", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" When this flag is activated, the non-local operator is applied using an algorithm based on spherical harmonics. Non-local projectors are used with their usual form: -P lmn (r)=Y lm (r)*p ln (r) +$$P_{lmn}(r) = Y_{lm}(r) p_{ln}(r)$$ -When [[useylm]]=0, the sum over Y_lm can be reduced to a Legendre polynomial form. +When [[useylm]] = 0, the sum over $Y_{lm}$ can be reduced to a Legendre polynomial form. """, ), @@ -17395,7 +18216,7 @@ dimensions=['[[vacnum]]'], mnemonics="VACancies LiST", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the identification number(s) of atoms to be subtracted from the set of atoms that are obtained after having rotated, translated and repeated the objects. Useful to created vacancies. @@ -17410,7 +18231,7 @@ dimensions="scalar", defaultval=0, mnemonics="VACancies NUMber", - text=""" + text=r""" Gives the number of atoms to be subtracted from the list of atoms after the rotations, translations and repetitions have been done. The list of these atoms is contained in [[vaclst]]. @@ -17425,11 +18246,11 @@ dimensions=[3], mnemonics="VACUUM identification", characteristics=['[[INPUT_ONLY]]'], - text=""" -Establishes the presence (if 1) or absence (if 0) of a vacuum layer, along the + text=r""" +Establishes the presence (if [[vacuum]] = 1) or absence (if [[vacuum]] = 0) of a vacuum layer, along the three possible directions normal to the primitive axes. -This information might be used to generate k-point grids, if [[kptopt]]=0 and +This information might be used to generate k-point grids, if [[kptopt]] = 0 and neither [[ngkpt]] nor [[kptrlatt]] are defined (see explanations with the input variable [[prtkpt]]). It will allow to select a zero-, one-, two- or three-dimensional grid of k @@ -17451,7 +18272,7 @@ defaultval=10.0, mnemonics="VACuum WIDTH", characteristics=['[[INPUT_ONLY]]', '[[LENGTH]]'], - text=""" + text=r""" Give a minimum "projected" distance between atoms to be found in order to declare that there is some [[vacuum]] present for each of the three directions. By default, given in Bohr atomic units (1 Bohr=0.5291772108 @@ -17471,26 +18292,29 @@ defaultval=MultipleValue(number=3, value=0.0), mnemonics="V (potential) CUT-off GEOmetry", requires="[[icutcoul]] in [1,2]", - text=""" + text=r""" [[vcutgeo]] is used in conjunction with [[icutcoul]] to specify the geometry used to truncate the Coulomb interaction, as well as the particular approach to be used. It has a meaning only for the cylindrical symmetry -([[icutcoul]]=1) or in the case of surfaces ([[icutcoul]]=2). For each +([[icutcoul]] = 1) or in the case of surfaces ([[icutcoul]] = 2). For each geometry, two different definitions of the cutoff region are available (see Phys. Rev. B 73, 233103 and Phys. Rev. B 73, 205119 for a complete description of the methods) -In Beigi method (Phys. Rev. B 73, 233103), the cutoff region is given by the +In the method of Ismail-Beigi [[cite:Ismail-Beigi2006]], the cutoff region is given by the Wigner-Seitz cell centered on the axis of the cylinder. The cutoff region is thus automatically defined by the unit cell and there is no need to specify When [[rcut]]. -To define a cylinder along the z-axis use the following lines. icutcoul 1 -vcutgeo 0 0 1 +To define a cylinder along the z-axis use the following lines: +``` +icutcoul 1 +vcutgeo 0 0 1 +``` -Please note that Beigi method is implemented only in the case if an -orthorhombic Bravais lattic. For hexagonal lattices, one has to use the method -of Rozzi (Phys. Rev. B 73, 205119) In this case, the interaction is truncated +Please note that the method of Ismail-Beigi is implemented only in the case if an +orthorhombic Bravais lattice. For hexagonal lattices, one has to use the method +of Rozzi [[cite:Rozzi2006]]. In this case, the interaction is truncated in a finite cylinder. Contrarily to the first approach, here one has to specify both the radius of the cylinder with [[rcut]] as well as the length of the cylinder along the periodic dimension that should always be smaller than @@ -17498,17 +18322,32 @@ in terms of the fraction of the primitive vector along the periodic direction. For example, in order to define a finite cylinder along z of radius 2.5 Bohr -and length 3*R3 icutcoul 1 vcutgeo 0 0 -3.0 # note the minus sign rcut 2.5 +and length 3*R3, +``` +icutcoul 1 +vcutgeo 0 0 -3.0 # note the minus sign +rcut 2.5 +``` -For surface calculations ([[icutcoul]]=2), [[vcutgeo]] is used to define the +For surface calculations ([[icutcoul]] = 2), [[vcutgeo]] is used to define the two periodic directions defining the surface. Also in this case two different -techniques are available. In the method of Beigi, the (positive) non-zero +techniques are available. In the method of Ismail-Beigi, the (positive) non-zero components of vcutgeo define the periodic directions of the infinite surface. The interaction is truncated within a slab of width L where L is the length of the primitive vector of the lattice along the non-periodic dimension. For -example: icutcoul 2 vcutgeo 1 1 0 It is also possible to define a finite -surface by employing negative values For example: icutcoul 2 vcutgeo -3 -2 0 -defines.... +example: +``` +icutcoul 2 +vcutgeo 1 1 0 +``` + +It is also possible to define a finite +surface by employing negative values. For example: +``` +icutcoul 2 +vcutgeo -3 -2 0 +``` +**Definition to be added** """, ), @@ -17522,7 +18361,7 @@ mnemonics="vdW-DF MINimum Angular CUT-off", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build angular meshes for the vdW-DF kernel. """, ), @@ -17537,7 +18376,7 @@ mnemonics="""vdW-DF Angle RATIO between the highest and lowest angles.""", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build angular meshes for the vdW-DF kernel. """, ), @@ -17552,7 +18391,7 @@ mnemonics="vdW-DF Delta for Angles, MAXimum", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build angular meshes for the vdW-DF kernel. """, ), @@ -17567,7 +18406,7 @@ mnemonics="vdW-DF Delta for Angles, MINimum", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build angular meshes for the vdW-DF kernel. """, ), @@ -17582,7 +18421,7 @@ mnemonics="vdW-DF D-mesh CUT-off", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17598,7 +18437,7 @@ lowest D, RATIO.""", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17613,7 +18452,7 @@ mnemonics="vdW-DF Distance for SOFTening.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17628,7 +18467,7 @@ mnemonics="vdW-DF G-space CUT-off", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to filter the vdW-DF kernel in reciprocal space. """, ), @@ -17643,7 +18482,7 @@ mnemonics="vdW-DF Number of D-mesh PoinTS", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17658,7 +18497,7 @@ mnemonics="vdW-DF Number of G-mesh PoinTS", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17673,7 +18512,7 @@ mnemonics="vdW-DF Number of Q-mesh PoinTS", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17688,7 +18527,7 @@ mnemonics="vdW-DF Number of R-PoinTS", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to define the sampling of the vdW-DF-kernel in real-space. """, ), @@ -17703,7 +18542,7 @@ mnemonics="vdW-DF Number of SMOOTHening iterations", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to exponentially smoothen q near q0. """, ), @@ -17718,7 +18557,7 @@ mnemonics="vdW-DF PHI value SOFTening.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17733,7 +18572,7 @@ mnemonics="vdW-DF Q-mesh CUT-off", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17748,7 +18587,7 @@ mnemonics="vdW-DF, between highest and lowest Q, RATIO.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0,. """, ), @@ -17763,7 +18602,7 @@ mnemonics="vdW-DF Real-space CUT-off", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to define the vdW-DF kernel cut-off radius. """, ), @@ -17778,7 +18617,7 @@ mnemonics="vdW-DF radius SOFTening.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17793,7 +18632,7 @@ mnemonics="vdW-DF energy calculation THRESHOLD", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Sets a threshold for the energy gradient that, when reached, will cause the vdW-DF interactions to be calculated. Adjust it to a big value (e.g. 1e12) to enable it all along the SCF @@ -17812,7 +18651,7 @@ mnemonics="vdW-DF global TOLERANCE.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. """, ), @@ -17827,13 +18666,14 @@ mnemonics="vdW-DF TWEAKS.", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" + text=r""" Used when [[vdw_xc]]>0, to build the vdW-DF kernel. !!! important - modifying this variable will likely transform the - calculated energies and their gradients into garbage. You have been warned! + Modifying this variable will likely transform the + calculated energies and their gradients into garbage. + You have been warned! """, ), @@ -17847,9 +18687,8 @@ mnemonics="vdW-DF ZAB parameter", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]]>0", - text=""" -Used when [[vdw_xc]]>0, as introduced in -[doi:10.1103/PhysRevLett.92.246401](http://dx.doi.org/10.1103/PhysRevLett.92.246401). + text=r""" +Used when [[vdw_xc]]>0, as introduced in [[cite:Dion2004]]. """, ), @@ -17863,7 +18702,7 @@ mnemonics="Van Der Waals Number of interacting FRAGments", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]] in [10,11]", - text=""" + text=r""" The absolute value of vdw_nfrag is the number of vdW interacting fragments in the unit cell. As wannierization takes place in reciprocal space, the MLWF center positions could be translated by some lattice vector from the cell @@ -17884,7 +18723,7 @@ mnemonics="Van Der Waals correction from Wannier functions in SUPERCELL", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]] in [10,11]", - text=""" + text=r""" Set of dimensionless positive numbers which define the maximum multiples of the primitive translations ([[rprimd]]) in the supercell construction. Each component of vdw_supercell indicates the maximum number of cells along both @@ -17906,9 +18745,9 @@ defaultval=1e-10, mnemonics="Van Der Waals TOLerance", characteristics=['[[DEVELOP]]'], - requires="[[vdw_xc]]==5", - text=""" -The DFT-D methods (S. Grimme approach) dispersion potentials, [[vdw_xc]]==5 or + requires="[[vdw_xc]] == 5", + text=r""" +The DFT-D methods [[cite:Grimme2010]] dispersion potentials, [[vdw_xc]] == 5 or 6 or 7, include a pair potential. The number of pairs of atoms contributing to the potential is necessarily limited. To be included in the potential a pair of atom must have contribution to the energy larger than [[vdw_tol]]. @@ -17926,11 +18765,12 @@ characteristics=['[[DEVELOP]]'], commentdefault="Do include the 3-body term in the correction", requires="[[vdw_xc]] == 6", - text=""" + text=r""" Control the computation of the 3-body correction inside DFT-D3 dispersion correction (Grimme approach) to the total energy: --If **vdw_tol_3bt** <0, no 3-body correction. --If **vdw_tol_3bt** >0, the 3-body term is included with a tolerance = **vdw_tol_3bt** + + * If **vdw_tol_3bt** <0, no 3-body correction. + * If **vdw_tol_3bt** >0, the 3-body term is included with a tolerance = **vdw_tol_3bt**. DFT-D3 as proposed by S. Grimme adds two contributions to the total energy in order to take into account of the dispersion: @@ -17940,12 +18780,11 @@ * A 3-body term which is obtained by summing over all triplets of atoms. Each individual contribution depends of the distances and angles between the three atoms. As it is impossible to sum over all the triplets in a periodic system, one has to define a stopping criterium which is here that an additional contribution to the energy must be higher than **vdw_tol_3bt** The last term has been predicted to have an important effect for large -molecules (see for e.g. _Grimme S., J. Chem. Phys. 132, 154104 (2010)_ ). It -is however quite costly in computational time for periodic systems and seems -to lead to an overestimation of lattice parameters for weakly bound systems -(see for e.g. _Reckien W., J. Chem. Phys. 132, 154104(2010)_ ). Still, its +molecules [[cite:Grimme2010]]. It is however quite costly in computational +time for periodic systems and seems to lead to an overestimation of lattice +parameters for weakly bound systems [[cite:Grimme2011]]. Still, its contribution to energy, to forces and to stress is available (not planned for -elastic constants, dynamical matrix and internal strains) +elastic constants, dynamical matrix and internal strains). """, ), @@ -17959,7 +18798,7 @@ mnemonics="Van Der Waals TYPe of FRAGment", characteristics=['[[DEVELOP]]'], requires="[[vdw_xc]] in [10,11]", - text=""" + text=r""" This array defines the interacting fragments by assigning to each atom an integer index from 1 to **vdw_nfrag**. The ordering of [[vdw_typfrag]] is the same as [[typat]] or [[xcart]]. Internally each MLWF is assigned to a given @@ -17978,55 +18817,24 @@ defaultval=0, mnemonics="Van Der Waals eXchange-Correlation functional", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" Selects a van-der-Waals density functional to apply the corresponding correction to the exchange-correlation energy. If set to zero, no correction will be applied. Possible values are: * 0: no correction. - * 1: apply vdW-DF1 (DRSLL) from Dion _et al._ -_doi:10.1103/PhysRevLett.92.246401_ - - * 2: apply vdw-DF2 (LMKLL) from Lee _et al._ -_arXiv:1003.5255v1_ - - * 5: apply vdw-DFT-D2 as proposed by S. Grimme (adding a semi-empirical dispersion potential) -Available only for ground-state calculations and response functions; see -[[vdw_tol]] variable to control convergency -_J. Comp. Chem. 27, 1787 (2006)_ - - * 6: apply vdw-DFT-D3 as proposed by S. Grimme (refined version of DFT-D2) -Available only for ground-state calculations and response functions; see -[[vdw_tol]] variable to control convergency and [[vdw_tol_3bt]] variable to -include 3-body corrections -_J. Chem. Phys. 132, 154104 (2010)_ - - * 7: apply vdw-DFT-D3(BJ) as proposed by Grimme (based on Becke-Jonhson method J. Chem. Phys. 2004-2006) -Available only for ground-state calculations and response functions; see -[[vdw_tol]] variable to control convergency -_J. Comput. Chem. 32, 1456 (2011)_ - - * 10: evaluate the vdW correlation energy from maximally localized Wannier functions, as proposed by P. L. Silvestrelli, also known as vdW-WF1 method. -_doi:10.1103/PhysRevLett.100.053002._ For details on this implementation -please check: _doi:10.1016/j.cpc.2011.11.003_ -The improvements introduced by Andrinopoulos _et al._ in _J. Chem. Phys. 135, -154105 (2011)_ namely the amalgamation procedure, splitting of p-like MLWFs -into -two s-like Wannier functions and fractional occupation of MLWFs are performed -automatically. - - * 11: evaluate the vdW correlation energy from maximally localized Wannier functions, as proposed by A. Ambrosetti and P. L. Silvestrelli, also known as vdW-WF2 method. -_doi:10.1103/PhysRevB.85.073101_ + * 1: apply vdW-DF1 (DRSLL) from [[cite:Dion2004]]. + * 2: apply vdw-DF2 (LMKLL) from [[cite:Lee2010]]. + * 5: apply vdw-DFT-D2 as proposed by S. Grimme [[cite:Grimme2006]] (adding a semi-empirical dispersion potential). Available only for ground-state calculations and response functions; see [[vdw_tol]] variable to control convergence. + * 6: apply vdw-DFT-D3 as proposed by S. Grimme [[cite:Grimme2010]] (refined version of DFT-D2). Available only for ground-state calculations and response functions; see [[vdw_tol]] variable to control convergence and [[vdw_tol_3bt]] variable to include 3-body corrections. + * 7: apply vdw-DFT-D3(BJ) as proposed by Grimme (based on Becke-Jonhson method from [[cite:Becke2006]]). Available only for ground-state calculations and response functions; see [[vdw_tol]] variable to control convergence. + * 10: evaluate the vdW correlation energy from maximally localized Wannier functions, as proposed by P. L. Silvestrelli, also known as vdW-WF1 method [[cite:Silvestrelli2008]]. For details on this implementation please check [[cite:Espejo2012]]. The improvements introduced by Andrinopoulos _et al._ [[cite:Andrinopoulos2011]], namely the amalgamation procedure, splitting of p-like MLWFs into two s-like Wannier functions and fractional occupation of MLWFs are performed automatically. + * 11: evaluate the vdW correlation energy from maximally localized Wannier functions, as proposed by A. Ambrosetti and P. L. Silvestrelli, also known as vdW-WF2 method [[cite:Ambrosetti2012]]. + * 14: apply DFT/vdW-QHO-WF method as proposed by Silvestrelli, which combines the quantum harmonic oscillator-model with localized Wannier functions [[cite:Silvestrelli2013]]. For periodic systems a supercell approach has to be used since **vdw_supercell** is not enabled in this case. - * 14: apply DFT/vdW-QHO-WF method as proposed by Silvestrelli, which combines the quantum harmonic oscillator-model with localized Wannier functions. -_J. Chem. Phys. 139, 054106 (2013)_ -For periodic systems a supercell approach has to be used since -**vdw_supercell** is not enabled in this case. - -For [[vdw_xc]]=1 and [[vdw_xc]]=2, the implementation follows the strategy -devised in the article of Rom an-Perez and Soler -([doi:10.1103/PhysRevLett.103.096102](https://dx.doi.org/10.1103/PhysRevLett.103.096102)) +For [[vdw_xc]] = 1 and [[vdw_xc]] = 2, the implementation follows the strategy +devised in the article of Roman-Perez and Soler [[cite:Romanperez2009]]. """, ), @@ -18041,15 +18849,15 @@ characteristics=['[[EVOLVING]]'], commentdims="It is represented internally as [[vel]](3,[[natom]],[[nimage]])", requires="[[ionmov]] > 0", - text=""" + text=r""" Gives the starting velocities of atoms, in cartesian coordinates, in Bohr/atomic time units (atomic time units given where [[dtion]] is described). -For [[ionmov]]=8 (Nose thermostat), if [[vel]] is not initialized, a random +For [[ionmov]] = 8 (Nose thermostat), if [[vel]] is not initialized, a random initial velocity giving the right kinetic energy will be generated. If the atom manipulator is used, [[vel]] will be related to the preprocessed set of atoms, generated by the atom manipulator. The user must thus foresee the effect of this atom manipulator (see [[objarf]]). -Velocities evolve is [[ionmov]]==1. +Velocities evolve is [[ionmov]] == 1. """, ), @@ -18065,8 +18873,8 @@ commentdims="It is represented internally as [[vel_cell]](3,3,[[nimage]])", requires="""[[imgmov]] in [9,13] and [[optcell]] > 0 (Path-Integral Molecular Dynamics with NPT algorithm)""", - text=""" -Irrelevant unless [[imgmov]]=9 or 13 and [[optcell]]>0 (Path-Integral + text=r""" +Irrelevant unless [[imgmov]] = 9 or 13 and [[optcell]]>0 (Path-Integral Molecular Dynamics with NPT algorithm). Gives the starting velocities of the dimensional cell parameters in Bohr/atomic time units (atomic time units given where [[dtion]] is described). @@ -18086,14 +18894,14 @@ M I d 2 R I /dt 2 = F I - [[vis]] dR I /dt -The atomic unit of viscosity is hartrees*(atomic time units)/Bohr 2. Units +The atomic unit of viscosity is hartree * (atomic time units)/Bohr 2. Units are not critical as this is a fictitious damping used to relax structures. A typical value for silicon is 400 with [[dtion]] of 350 and atomic mass 28 [[amu]]. Critical damping is most desirable and is found only by optimizing [[vis]] for a given situation. In the case of Path-Integral Molecular Dynamics using the Langevin Thermostat -([[imgmov]]=9), [[vis]] defines the friction coefficient, in atomic units. +([[imgmov]] = 9), [[vis]] defines the friction coefficient, in atomic units. Typical value range is 0.00001-0.001. """, ), @@ -18108,15 +18916,15 @@ mnemonics="potential -V- for the PeRTuRBation", characteristics=['[[DEVELOP]]', '[[ENERGY]]'], requires="[[qprtrb]]", - text=""" + text=r""" Gives the real and imaginary parts of a scalar potential perturbation. Can be specified in Ha (the default), Ry, eV or Kelvin, since [[vprtrb]] has the '[[ENERGY]]' characteristics. This is made available for testing responses to such perturbations. The form of the perturbation, which is added to the local potential, is: - * ([[vprtrb]](1)+I*[[vprtrb]](2))/2 at G=[[qprtrb]] and - * ([[vprtrb]](1)-I*[[vprtrb]](2))/2 at G=-[[qprtrb]] (see [[qprtrb]] also). + * ([[vprtrb]](1)$+I$[[vprtrb]](2)$)/2$ at $G=$[[qprtrb]] and + * ([[vprtrb]](1)$-I$[[vprtrb]](2)$)/2$ at $G=-$[[qprtrb]] (see [[qprtrb]] also). """, ), @@ -18128,21 +18936,20 @@ dimensions="scalar", defaultval=1, mnemonics="Wannier90- INItial PROJections", - requires="[[prtwant]]==2 or [[prtwant]]==3", - text=""" + requires="[[prtwant]] == 2 or [[prtwant]] == 3", + text=r""" In order to find the Maximally Localized Wannier Functions, the user has to provide an initial guess. A set of localized trial orbitals is chosen corresponding to some rough initial guess at the Wannier Functions, and these -are projected onto the Bloch eigenstates. See Ivo Souza, Nicola Marzari, and -David Vanderbilt. Phys. Rev. B, 65, 035109 (2001). -These initial projections are stored in a file.amn and the variable +are projected onto the Bloch eigenstates. See [[cite:Souza2002a]]. +These initial projections are stored in a file **.amn** and the variable **w90iniprj** is used to construct them: * **w90iniprj** =1: Random projections. * **w90iniprj** =2: The initial projections will be a linear combination of hydrogenic atomic orbitals. The user has to define the projections in the secondary input file -wannier90.win +wannier90.win. Information about how to define them can be found in the manual of Wannier90. See [www.wannier.org](http://www.wannier.org) """, @@ -18157,17 +18964,17 @@ defaultval=0, mnemonics="Wannier90- PRINT UNKp.s file", commentdefault="""The default is set to zero because UNKp.s files occupy a lot of memory.""", - requires="[[prtwant]]==2 or [[prtwant]]==3", - text=""" + requires="[[prtwant]] == 2 or [[prtwant]] == 3", + text=r""" Defines whether or not the UNKp.s file will be printed. - * [[w90prtunk]]=0: Do not print the UNKp.s files + * [[w90prtunk]] = 0: Do not print the UNKp.s files - * [[w90prtunk]]=1: Print the UNKp.s files on a fine grid + * [[w90prtunk]] = 1: Print the UNKp.s files on a fine grid * [[w90prtunk]]>1: Print the UNKp.s files on a coarse grid -Instead of printing every record we will print every w90prtunk records. This +Instead of printing every record we will print every [[w90prtunk]] records. This is useful to reduce the size of the UNKp.s files, but, the quality is also reduced. These files contain the periodic part of the bloch states represented on a @@ -18188,16 +18995,16 @@ ```fortran write(iun_plot) n1/w90prtunk,n2/w90prtunk,n3/w90prtunk,ikpt,nband - write(iun_plot) (((fofr(1,jj1,jj2,jj3),fofr(2,jj1,jj2,jj3),& + write(iun_plot) (((fofr(1,jj1,jj2,jj3),fofr(2,jj1,jj2,jj3),& & jj1=1,n1,w90prtunk),jj2=1,n2,w90prtunk),jj3=1,n3,w90prtunk) ``` Where **fofr** is a double precision variable which contains the wavefunctions in real space. Note that in order to reduce the size of the UNK files we are -just including records in the wavefunctions for 1/(w90prtunk^3) of the grid -points. That is why we divide n1, n2 and n3 by prtunk. The output .xsf files +just including records in the wavefunctions for 1/(w90prtunk$^3$) of the grid +points. That is why we divide **n1**, **n2** and **n3** by [[w90prtunk]]. The output .xsf files for plotting with XCrysDen will also be on the coarse grid. When this does not -produce an acceptable plot, prtunk can be set to 1 to output every grid point. +produce an acceptable plot, [[w90prtunk]] can be set to 1 to output every grid point. (You should try spline interpolation in XCrysDen first.) """, ), @@ -18211,14 +19018,14 @@ defaultval=1.0, mnemonics="WaveFunctions MIXing factor", requires="[[usefock]] > 0 and [[nnsclohf]] >0 and [[fockoptmix]]/100 > 0", - text=""" + text=r""" When the wavefunctions are determined using a SCF double loop (hybrid functionals), [[wfmix]] provides the mixing factor to obtain the new input wavefunctions by the combination of the earlier input wavefunctions and corresponding (DFT-preconditioned) output wavefunctions at the level of the outer loop, according to the algorithm specified by [[fockoptmix]]/100. If [[wfmix]] is 1.0, the output wavefunctions only will determine the new input -wavefunctions. This might possibly lead to unstabilities. If [[wfmix]] is +wavefunctions. This might possibly lead to instabilities. If [[wfmix]] is smaller than 1.0, the whole iteration procedure is damped, which might allow better stability, but might be slower. If it is larger than 1.0, perhaps less iterations will be needed (if there is no instability). @@ -18234,19 +19041,39 @@ defaultval="[[AUTO_FROM_PSP]]", mnemonics="WaveFunction OPTimisation ALGorithm", characteristics=['[[DEVELOP]]'], - commentdefault="0 when [[usepaw]]=0 (norm-conserving pseudopotentials), 10 when [[usepaw]]=1 (PAW); 114 if [[paral_kgb]]=1.", - text=""" + commentdefault="0 when [[usepaw]] = 0 (norm-conserving pseudopotentials), 10 when [[usepaw]] = 1 (PAW); 114 if [[paral_kgb]] = 1.", + text=r""" Allows one to choose the algorithm for the optimisation of the wavefunctions. The different possibilities are: - * [[wfoptalg]]=0: standard state-by-state conjugate gradient algorithm, with no possibility to parallelize over the states; - * [[wfoptalg]]=2: minimisation of the residual with respect to different shifts, in order to cover the whole set of occupied bands, with possibility to parallelize over blocks of states (or bands). The number of states in a block is defined in [[nbdblock]]. THIS IS STILL IN DEVELOPMENT. - * [[wfoptalg]]=3: minimisation of the residual with respect to a shift. Available only in the non-self-consistent case [[iscf]]=-2, in order to find eigenvalues and wavefunctions close to a prescribed value. - * [[wfoptalg]]=4: (see also [[wfoptalg]]=14), a parallel code based on the Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) method of Knyazev. [ Reference: A.V. Knyazev, "Toward the Optimal Preconditioned Eigensolver: Locally Optimal Block Preconditioned Conjugate Gradient Method". SIAM Journal on Scientific Computing 23, pp517-541 (2001) ](http://dx.doi.org/10.1137/S1064827500366124) . The implementation rests on the [ matlab program by Knyazev ](http://www.mathworks.com/matlabcentral/fileexchange/48-lobpcg-m) . [ Reference A. V. Knyazev, I. Lashuk, M. E. Argentati, and E. Ovchinnikov, Block Locally Optimal Preconditioned Eigenvalue Xolvers (BLOPEX) in hypre and PETSc (2007). SIAM Journal on Scientific Computing (SISC). 25(5): 2224-2239 ](http://dx.doi.org/10.1137/060661624) . For more information see [ F. Bottin, S. Leroux, A. Knyazev, G. Zerah, Large scale ab initio calculations based on three levels of parallelization. (2008). Computational Material Science, 42(2), 329-336. ](http://dx.doi.org/10.1016/j.commatsci.2007.07.019) - * [[wfoptalg]]=10: (for PAW) standard state-by-state conjugate gradient algorithm, with no possibility to parallelize over the states, but modified scheme described in Kresse, Furthmuller, PRB 54, 11169 (1996) (modified kinetic energy, modified preconditionning, minimal orthogonalization, ...); - * [[wfoptalg]]=14: the recommended for parallel code, the same as [[wfoptalg]]=4 except that the preconditioning of the block vectors does not depend on the kinetic energy of each band, and the orthogonalization after the LOBPCG algorithm is no longer performed. The first modification increases the convergence and the second one the efficiency. - * [[wfoptalg]]=114: A new version of [[wfoptalg]]=14 which is more efficient for few blocks and can take advantage of OpenMP if abinit is compiled with a multithreaded linear algebra library. With more than 1 thread [[npfft]] shoud NOT be used for the time being. - * [[wfoptalg]]=1: new algorithm based on Chebyshev filtering, designed for very large number of processors, in the regime where LOBPCG does not scale anymore. It is not able to use preconditionning and therefore might converge slower than other algorithms. By design, it will **not** converge the last bands: it is recommended to use slightly more bands than necessary. For usage with [[tolwfr]], it is imperative to use [[nbdbuf]]. For more performance, try [[use_gemm_nonlop]]. For more information, see the [ performance guide ](../../theory/howto_chebfi.pdf) and the [ paper ](https://arxiv.org/abs/1406.4350) by A. Levitt and M. Torrent. Status: experimental but usable. Questions and bug reports should be sent to antoine (dot) levitt (at) gmail.com. + * [[wfoptalg]] = 0: standard state-by-state conjugate gradient algorithm, with no possibility to parallelize over the states; + + * [[wfoptalg]] = 2: minimisation of the residual with respect to different shifts, in order to cover the whole set of occupied bands, + with possibility to parallelize over blocks of states (or bands). The number of states in a block is defined in [[nbdblock]]. THIS IS STILL IN DEVELOPMENT. + + * [[wfoptalg]] = 3: minimisation of the residual with respect to a shift. Available only in the non-self-consistent case [[iscf]] = -2, + in order to find eigenvalues and wavefunctions close to a prescribed value. + + * [[wfoptalg]] = 4: (see also [[wfoptalg]] = 14), a parallel code based on the Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) + method of [[cite:Knyazev2001 ]]. + The implementation rests on the [matlab program by Knyazev](http://www.mathworks.com/matlabcentral/fileexchange/48-lobpcg-m) [[cite:Knyazev2007]]. + For more information see [[cite:Bottin2008]] + + * [[wfoptalg]] = 10: (for PAW) standard state-by-state conjugate gradient algorithm, with no possibility to parallelize over the states, + but modified scheme described in [[cite:Kresse1996]] (modified kinetic energy, modified preconditionning, minimal orthogonalization, ...); + + * [[wfoptalg]] = 14: the recommended for parallel code, the same as [[wfoptalg]] = 4 except that the preconditioning of the block vectors does not + depend on the kinetic energy of each band, and the orthogonalization after the LOBPCG algorithm is no longer performed. The first modification increases the convergence and the second one the efficiency. + + * [[wfoptalg]] = 114: A new version of [[wfoptalg]] = 14 which is more efficient for few blocks and can take advantage of OpenMP if abinit is compiled with a multithreaded linear algebra library. + With more than 1 thread [[npfft]] shoud NOT be used for the time being. + + * [[wfoptalg]] = 1: new algorithm based on Chebyshev filtering, designed for very large number of processors, in the regime + where LOBPCG does not scale anymore. It is not able to use preconditionning and therefore might converge slower than other algorithms. + By design, it will **not** converge the last bands: it is recommended to use slightly more bands than necessary. + For usage with [[tolwfr]], it is imperative to use [[nbdbuf]]. For more performance, try [[use_gemm_nonlop]]. + For more information, see the [performance guide](../../theory/howto_chebfi.pdf) and the [[cite:Levitt2015]]. Status: experimental but usable. + Questions and bug reports should be sent to antoine (dot) levitt (at) gmail.com. """, ), @@ -18289,13 +19116,13 @@ defaultval=MultipleValue(number='[[nkpt]]', value=1.0), mnemonics="WeighTs for K points", commentdefault="Except when [[kptopt]]/=0", - text=""" + text=r""" Gives the k point weights. The k point weights will have their sum (re)normalized to 1 (unless -[[occopt]]=2 and [[kptopt]]=0; see description of [[occopt]]) within the +[[occopt]] = 2 and [[kptopt]] = 0; see description of [[occopt]]) within the program and therefore may be input with any arbitrary normalization. This feature helps avoid the need for many digits in representing fractional weights such as 1/3. -[[wtk]] is ignored if [[iscf]] is not positive, except if [[iscf]]=-3. +[[wtk]] is ignored if [[iscf]] is not positive, except if [[iscf]] = -3. """, ), @@ -18308,7 +19135,7 @@ defaultval=1, mnemonics="WeighTs for the current Q-points", commentdefault="Except when [[qptopt]]/=0", - text=""" + text=r""" Gives the current q-point weight. """, ), @@ -18320,8 +19147,8 @@ topics=['Wavelets_expert'], dimensions="scalar", defaultval=0, - mnemonics="WaVeLet BigDFT Comparison", - text=""" + mnemonics="WaVeLet BIGDFT Comparison", + text=r""" This variable is used for the wavelets capabilities of ABINIT (see [[usewvl]]). It is used to compare the results obtained with ABINIT with those obtained with BigDFT stand-alone. When it is set to 1, ABINIT will follow the workflow @@ -18337,9 +19164,9 @@ dimensions="scalar", defaultval=6.0, mnemonics="WaVeLet Coarse grid Radius MULTiplier", - text=""" -This factor is used to defined the expansion of the coarse resolution grid in -the case of wavelets (seea [[usewvl]] ). The grid is made of points inside + text=r""" +This factor is used to define the expansion of the coarse resolution grid in +the case of wavelets (see [[usewvl]]). The grid is made of points inside spheres centered on atoms. The radius of these spheres are the product between this factor and the covalent radius of element (read from the pseudo-potential file). This factor is responsible for the amount of used memory (see also [[wvl_hgrid]]). @@ -18354,9 +19181,9 @@ dimensions="scalar", defaultval=10.0, mnemonics="WaVeLet Fine grid Radius MULTiplier", - text=""" -This factor is used to defined the expansion of the fine resolution grid in -the case of wavelets (see [[usewvl]] ). This fine resolution grid has the same + text=r""" +This factor is used to define the expansion of the fine resolution grid in +the case of wavelets (see [[usewvl]]). This fine resolution grid has the same grid step than the coarse one (see [[wvl_crmult]] ), but on each point, 8 coefficients are stored instead of one, increasing the precision of the calculation in this area. The grid is made of points inside spheres centered @@ -18375,7 +19202,7 @@ defaultval=0.5, mnemonics="WaVeLet H step GRID", characteristics=['[[LENGTH]]'], - text=""" + text=r""" It gives the step size in real space for the grid resolution in the wavelet basis set. This value is highly responsible for the memory occupation in the wavelet computation. The value is a length in atomic units. @@ -18390,10 +19217,10 @@ dimensions=[2], defaultval=[1, 100], mnemonics="WaVeLet Number of GAUSSians", - text=""" + text=r""" In the wavelet-PAW computation case, projectors may be fitted to a sum of -complex Gaussians. The fit is done for wvl_ngauss(1), wvl_ngauss(1)+1... up -to wvl_ngauss(2) Gaussians. +complex Gaussians. The fit is done for [[wvl_ngauss]](1), [[wvl_ngauss]](1)+1... up +to [[wvl_ngauss]](2) Gaussians. """, ), @@ -18404,10 +19231,10 @@ topics=['Wavelets_expert'], dimensions="scalar", defaultval=5, - mnemonics="WaVeLet maximum Number of PReConditionner Conjugate Gradient iterations", - text=""" + mnemonics="WaVeLet maximum Number of PReConditioner Conjugate Gradient iterations", + text=r""" In the wavelet computation case, the wavefunctions are directly minimised -using a real-space preconditionner. This preconditionner has internally some +using a real-space preconditioner. This preconditioner has internally some conjugate gradient iterations. This value defines a boundary for the number of conjugate gradient iterations on each wavefunction convergence step. """, @@ -18421,7 +19248,7 @@ dimensions=[3, 'min([[natom]],[[natrd]])'], mnemonics="vectors (X) of atom positions in cartesian coordinates -length in ANGSTrom-", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the cartesian coordinates of atoms within unit cell, in angstrom. This information is redundant with that supplied by array [[xred]] or [[xcart]]. If [[xred]] and [[xangst]] are ABSENT from the input file and [[xcart]] is @@ -18445,7 +19272,7 @@ defaultval=1e-14, mnemonics="eXchange-Correlation - DENsity POSitivity value", characteristics=['[[DEVELOP]]'], - text=""" + text=r""" For the evaluation of the exchange-correlation functionals, the density cannot be negative, or even too small (e.g. the LDA exchange kernel behaves like the density at power -(2/3), and the density is used at the denominator of @@ -18473,22 +19300,28 @@ defaultval=99.99, mnemonics="Value of the c parameter in the eXchange-Correlation TB09 functional", text=r""" -The modified Becke-Johnson exchange-correlation functional by Tran and Blaha -(Phys. Rev. Lett. 102, 226401 (2009)) reads: +The modified Becke-Johnson exchange-correlation functional by +[[cite:Tran2009 | Tran and Blaha]] reads: -V_x(r) = c * V_x^{BR}(r) + (3*c - 2) * 1/pi * sqrt(5/12) * -sqrt(2*kden(r)/den(r)) +$$ V_x(r) = +c V_x^{BR}(r) + +(3c - 2) \frac{1}{\pi} \sqrt{\frac{5}{12}} +\sqrt{2 \frac{t(r)}{\rho(r)}} $$ -in which V_x^{BR}(r) is the Becke-Roussel potential. +where $\rho(r)$ is the electron density, +$t(r)$ is the kinetic-energy density, and +$ V_x^{BR}(r)$ is the Becke-Roussel potential. -In this equation the parameter c can be evaluated at each SCF step according +In this equation the parameter $c$ can be evaluated at each SCF step according to the following equation: -c = alpha + beta * sqrt(1/V_{cell} * \int_{V_{cell}} |grad(den(r))|/den(r) -d3r) +$$ c = \alpha + \beta +\left( \frac{1}{V_{cell}} +\int_{V_{cell}} \frac{|\nabla \rho(r)|}{\rho(r)} +d^3r \right)^{1/2} $$ -The c parameter is evaluated thanks to the previous equation when xc_tb09_c is -equal to the "magic" default value 99.99. The c parameter can also be fixed to +The $c$ parameter is evaluated thanks to the previous equation when xc_tb09_c is +equal to the "magic" default value 99.99. The $c$ parameter can also be fixed to some (property-optimized or material-optimized) value by using this variable. """, ), @@ -18501,7 +19334,7 @@ dimensions=[3, 'min([[natom]],[[natrd]])'], mnemonics="vectors (X) of atom positions in CARTesian coordinates", characteristics=['[[EVOLVING]]', '[[LENGTH]]'], - text=""" + text=r""" Gives the cartesian coordinates of atoms within unit cell. This information is redundant with that supplied by array [[xred]] or [[xangst]]. By default, [[xcart]] is given in Bohr atomic units (1 Bohr=0.5291772108 Angstroms), @@ -18525,7 +19358,7 @@ defaultval=0, mnemonics="eXchange Correlation functional LEVEL", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" Automatically determined from the value of [[ixc]]. * 0 --> No XC contribution. @@ -18572,7 +19405,7 @@ defaultval=MultipleValue(number=None, value=0.0), mnemonics="X(position) in REDuced coordinates of the SPHeres for dos projection in the EXTRA set", requires="[[natsph_extra]] > 0", - text=""" + text=r""" The positions in reduced coordinates of extra spheres used in the DOS projection, simulating an STS signal. See [[natsph_extra]] for a more complete description. """, @@ -18586,7 +19419,7 @@ dimensions="scalar", mnemonics="XYZ FILE input for geometry", characteristics=['[[INPUT_ONLY]]'], - text=""" + text=r""" Gives the name of a xyz format file, to take [[natom]], [[ntypat]], [[typat]], [[znucl]], and [[xangst]] from. This input can not be mixed with normal atom specifications for other datasets. @@ -18609,24 +19442,23 @@ characteristics=['[[ENERGY]]'], commentdefault="0.0036749326 Ha = 0.1 eV", requires="[[optdriver]] in [3,4,99]", - text=""" -It is meant to avoid some divergencies that might occur during the evaluation + text=r""" +It is meant to avoid some divergences that might occur during the evaluation of the Adler-Wiser expression of the irreducible polarizability -([[optdriver]]=3) or during the numerical treatment of the integrals defining -the contribution to the self-energy matrix elements ([[optdriver]]=4). If the +([[optdriver]] = 3) or during the numerical treatment of the integrals defining +the contribution to the self-energy matrix elements ([[optdriver]] = 4). If the denominator becomes smaller than [[zcut]], a small imaginary part (depending on [[zcut]]) is added, in order to avoid the divergence. -When [[optdriver]]=99, [[zcut]] defines the small complex shift used to avoid -divergences in the expression for the macroscopic dieletric function. It +When [[optdriver]] = 99, [[zcut]] defines the small complex shift used to avoid +divergences in the expression for the macroscopic dielectric function. It simulates the experimental uncertainty and the finite lifetime of the -quasiparticles (although the true lifetime should be k- and band-dependent). +quasi-particles (although the true lifetime should be k- and band-dependent). The value of [[zcut]] affects the number of iteration needed to achieve convergence in the Haydock iterative method. In this case, [[zcut]] should be -larger than the typical distance between the eigenvalues of the exciton -Hamiltonian. +larger than the typical distance between the eigenvalues of the exciton Hamiltonian. Ideally, one should make a convergence study decreasing the value of [[zcut]] -for increasing number of k-points. +for increasing number of k points. """, ), @@ -18639,9 +19471,9 @@ defaultval=0, mnemonics="ZEEMAN FIELD", characteristics=['[[MAGNETIC_FIELD]]'], - text=""" -Give the value of the Zeeman field, H, acting on the spinorial wavefunctions. -Note that Tesla are admitted. This sets the magnitude of mu_0*H, in Tesla, + text=r""" +Give the value of the Zeeman field, $H$, acting on the spinorial wavefunctions. +Note that Tesla are admitted. This sets the magnitude of $\mu_0H$, in Tesla, with H in Amperes/metre. """, ), @@ -18655,7 +19487,7 @@ defaultval="[[AUTO_FROM_PSP]]", mnemonics="Z (charge) of the IONs for the different TYPes of AToms", characteristics=['[[INTERNAL_ONLY]]'], - text=""" + text=r""" Charge of the pseudo-ion (=number of valence electrons that are needed to screen exactly the pseudopotential). """, @@ -18669,14 +19501,16 @@ dimensions=['[[npsp]]'], mnemonics="charge -Z- of the NUCLeus", characteristics=['[[NO_MULTI]]'], - text=""" + text=r""" Gives nuclear charge for each type of pseudopotential, in order. If [[znucl]] does not agree with nuclear charge, as given in pseudopotential files, the program writes an error message and stops. -N.B.: In the pseudopotential files, [[znucl]] is called "zatom". +!!! note + + In the pseudopotential files, [[znucl]] is called "zatom". -For a "dummy" atom, with [[znucl]]=0, as used in the case of calculations +For a "dummy" atom, with [[znucl]] = 0, as used in the case of calculations with only a jellium surface, ABINIT sets arbitrarily the covalent radius to one. """, ), @@ -18689,10 +19523,771 @@ defaultval=[5.0, 59.0, 6.0], dimensions=[3], mnemonics="Temperature MESH", - text=""" + text=r""" This variable defines the linear mesh of temperatures used in the EPH code ([[optdriver]] = 7). The first entry gives the initial temperature in Kelvin, the second entry the linear step in Kelvin, the third entry is the number of points in the mesh. The default value corresponds to 6 points between 5 K and 300 K. """, ), + +Variable( + abivarname="prtkbff", + varset="files", + topics=['printing_prden'], + vartype="integer", + defaultval=0, + dimensions="scalar", + requires="[[iomode]] == 3", + mnemonics="PRinT Kleynman-Bylander Form Factors", + text=r""" +This input variable activates the output of the Kleynman-Bylander form factors in the **netcdf** WFK file +produced at the end of the ground-state calculation. Remember to set [[iomode]] to 3. + +The form factors are needed to compute the matrix elements of the commutator [Vnl, r] +of the non-local part of the (NC) pseudopotentials. +This WFK file can therefore be used to perform optical and/or many-body calculations with external codes such as DP/EXC and Yambo. +The option is ignored if PAW. + +!!! important + + At the time of writing (|today|, [[istwfk]] must be set to 1 for all k-points in the IBZ + since external codes do not support wavefunctions given on the reduced G-sphere. + Moreover [[useylm]] must be 0 (default if NC pseudos). +""", +), + +Variable( + abivarname="sigma_ngkpt", + varset="gw", + topics=['SelfEnergy_useful'], + vartype="integer", + defaultval=0, + dimensions=[3], + requires="[[optdriver]] in [4, 7]", + mnemonics="SIGMA: Number of Grid points for K PoinTs generation", + text=r""" +This variable allows the user to specify the list of k-points in the self-energy $\Sigma_{n\kk}$ +in terms of a homogeneous mesh in the IBZ instead of the traditional approach based +on [[nkptgw]], [[kptgw]], [[bdgw]]. + +The specification in terms of sigma_ngkpt is easier to use in particular when +the self-energy is needed on a sub-mesh. +The use of this variables requires a range of bands specified via [[gw_qprange]]. + +!!! important + + sigma_ngkpt and [[nkptgw]] and [[sigma_erange]] are mutually exclusive. +""", +), + +Variable( + abivarname="sigma_nshiftk", + varset="gw", + topics=['SelfEnergy_useful'], + vartype="integer", + defaultval=0, + dimensions="scalar", + requires="[[optdriver]] in [4, 7] and [[sigma_shiftk]]", + mnemonics="SIGMA: Number of SHIFTs for K point grids", + text=r""" +The number of shifts in [[sigma_shiftk]]. +""", +), + +Variable( + abivarname="sigma_shiftk", + varset="gw", + topics=['SelfEnergy_useful'], + vartype="integer", + defaultval=[0, 0, 0], + dimensions=[3, '[[sigma_nshiftk]]'], + requires="[[optdriver]] in [4, 7] and [[sigma_nshiftk]]", + mnemonics="SHIFT for K points", + excludes="[[sigma_erange]] or [[nkptgw]]", + text=r""" +The shifts of the k-mesh used to define the list of k-points for the computation of the +electron self-energy $\Sigma_{n\kk}$. +See also [[sigma_nshiftk]]. + +!!! important + + This variable is not compatible with [[nkptgw]] and [[sigma_erange]]. +""", +), + +Variable( + abivarname="wfk_task", + varset="gstate", + topics=['ElecBandStructure_useful'], + vartype="string", + defaultval=0, + dimensions="scalar", + requires="[[optdriver]] == 8", + mnemonics="WFK TASK", + text=r""" + +This variable defines the quantity to compute starting from a previously generated WFK file. +Possible values are: + + * "wfk_full" --> Read WFK file and produce new WFK file with k-points in the full BZ. + Wavefunctions with [[istwfk]] > 2 are automatically converted into the full G-sphere representation. + This option can be used to interface Abinit with external tools requiring k-points in the full BZ. + + * "wfk_einterp" --> Read energies from WFK file and interpolate band structure using the parameters specified by [[einterp]]. + + * "wfk_ddk" --> Compute DDK matrix elements for all bands and k-points in the WFK file. + The contribution due to the non-local part of the pseudopotential can be ignored + by setting [[inclvkb]] = 0 (not recommended unless you know what you are doing). + + * "wfk_kpts_erange" --> Read WFK file, + use star-function and [[einterp]] parameters to interpolate electron energies onto fine k-mesh + defined by [[sigma_ngkpt]] and [[sigma_shiftk]]. + Find k-points inside (electron/hole) pockets according to the values specified in [[sigma_erange]]. + Write KERANGE.nc file with the tables required by the code to automate NSCF band structure calculations + inside the pocket(s) and electron lifetime computation in the EPH code when [[eph_task]] = -4. +""", +), + +Variable( + abivarname="sigma_bsum_range", + varset="gw", + topics=['SelfEnergy_expert'], + vartype="integer", + defaultval=[0, 0], + dimensions=[2], + requires="[[optdriver]] in [7]", + mnemonics="SIGMA: Band SUM RANGE", + text=r""" +This variable allows the user to specify the range of bands in the sum over states for the e-ph self-energy $\Sigma_{n\kk}$. +If not specified, the code includes all the states from 1 up to [[nband]]. +Note that this option can be used only when computing both the real and imaginary part of the self-energy. +In the calculation of electron linewidths, indeed, the states are automatically selected using an energy window +that takes into account the maximum phonon frequency. +""", +), + +Variable( + abivarname="frohl_params", + varset="gw", + topics=['SelfEnergy_expert'], + vartype="real", + defaultval=[0, 0, 0, 0], + dimensions=[4], + requires="[[optdriver]] in [7]", + mnemonics="FROHLich PARAMeterS", + text=r""" +This variable is still under development. +""", +), + +Variable( + abivarname="prteliash", + varset="eph", + topics=['SelfEnergy_expert'], + vartype="integer", + defaultval=0, + dimensions="scalar", + requires="[[optdriver]] in [7]", + mnemonics="PRINT ELIASHberg function.", + text=r""" +This variable controls the output of the generalized Eliashberg function when [[eph_task]] is +4 or -4. +If set 1, the EPH code will compute the generalized Eliashberg function and will save the results in the SIGEPH.nc file. +""", +), + +Variable( + abivarname="sigma_erange", + varset="eph", + topics=['SelfEnergy_expert'], + vartype="real", + defaultval=[-1.0, -1.0], + dimensions=[2], + mnemonics="SIGMA Energy-range.", + characteristics=['[[ENERGY]]'], + text=r""" +This variable selects the k-points and the bands in the self-energy matrix elements on the basis +of their position with respect to the band edges (energy differences are **always positive**, even for holes). + +Only the k-points and the bands whose energy difference if less than this value will be included in the calculation. +The first entry refers to holes, the second one to electrons. +A negative entry can be used to exclude either holes or electrons from the calculation. + +!!! important + + By default, this variable is given in Hartree. Use + + sigma_erange 1 1 eV + + to specify the energy intervals in eV units. +""", +), + +Variable( + abivarname="eph_tols_idelta", + varset="eph", + topics=['SelfEnergy_expert'], + vartype="real", + defaultval=[1e-12, 1e-12], + dimensions=[2], + mnemonics="EPH TOLeranceS on Integral of DELTA.", + text=r""" +This variable can be used to introduce a cutoff on the q-points when computing the imaginary +part of the electron-phonon self-energy ([[eph_task]] = -4) with the tetrahedron method ([[eph_intmeth]] = 2) +The first entry refers to phonon absorption while the second one is associated to phonon emission. +A q-point is included in the sum of the tetrahedron weights for phonon absorption/emission are larger that these values. +""", +), + +Variable( + abivarname="eph_phrange", + varset="eph", + topics=['SelfEnergy_expert'], + vartype="real", + defaultval=[0, 0], + dimensions=[2], + mnemonics="EPH PHonon mode RANGE.", + text=r""" +This variable is used to select the range of phonon modes included in the computation of the electron-phonon self-energy. +By default all phonon modes are included ([0, 0]), otherwise only the phonon modes with index between the first +and second entry are included. +""", +), + +Variable( + abivarname="eph_restart", + varset="eph", + topics=['ElPhonInt_basic'], + vartype="integer", + defaultval=0, + dimensions="scalar", + mnemonics="EPH RESTART.", + text=r""" +This variable can be used to restart an EPH calculation. +At present, this feature is supported only when computing the electron-phonon self-energy ([[eph_task]] = 4, -4). +In this case, the code will look for a pre-existing SIGEPH.nc file and will compute the remaining k-points +provided that the metadata found in the netcdf file is compatible with the input variables specified in the input file. +The code aborts if the metadata reported in the SIGEPH.nc file is not compatible with the input file. +Note that the restart in done in-place that is the output SIGEPH.nc is used as input of the calculation so there is no +need to specify getsigeph or irdsigeph input variables. +""", +), + +Variable( + abivarname="eph_stern", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="Electron-PHonon: use STERNheimer approach to replace sum over empty states.", + requires="[[tolwfr]] > 0", + text=r""" +This variable activates the Sternheimer method in the calculation of the e-ph self-energy ([[eph_task]] == 4) +This technique replaces the explicit sum over empty states **above** [[nband]] +with the NSCF computation of the first order derivative of the KS wavefunctions (actually +the projection in the subspace orthogonal to the nband states). + +The Sternheimer approach requires an external file with the KS potential produced by setting [[prtpot]] = 1 +during the GS run and the specification of [[tolwfr]] in the EPH input file. +The path to the POT file used in the EPH calculation is specified via [[getpot_path]]. +The number of line minimisations for the Sternheimer solver is defined by [[nline]]. + +!!! important + + The Sternheimer approach approximates the e-ph self-energy with the adiabatic expression + in which phonon frequencies are neglected and the frequency dependence of $\Sigma_{n\kk}(\omega)$ is + replaced by $\Sigma_{n\kk}(\ee_{n\kk})$. + This approximation is valid provided that **enough** bands above the states of interest are explicitly included. + The calculation should therefore be converged with respect to the value of [[nband]]. + Note however that the memory requirements and the computational cost of the Sternheimer solver increases with **nband**. + +""", +), + +Variable( + abivarname="getkerange_path", + varset="eph", + vartype="string", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval=None, + mnemonics="KERANGE PATH", + text=r""" +This variable defines the path of the external KERANGE.nc file with the list of k-points in the electron/hole pockets. +The tables stored in the file are used for the calculation of the imaginary part of the e-ph self-energy ([[eph_task]] == -4) +This file is generated by running a preliminary step with [[wfk_task]] = "wfk_einterp". +""", +), + +Variable( + abivarname="symv1scf", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="SYMmetrize V1 DFPT SCF potentials", + text=r""" +If *symv1scf* is equal to 1, the spatial-symmetry on the first-order DFPT potentials +is enforced every time a set of potentials in the BZ is recostructed by symmetry +starting from the initial values in the IBZ. +This option is similar to [[symdynmat]] but it acts on the DFPT potentials instead of +the dynamical matrix. +""", +), + +Variable( + abivarname="dvdb_add_lr", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval=1, + mnemonics="DVDB ADD Long-Range part when interpolating DFPT potentials.", + text=r""" +This flag is used in the Fourier interpolation in q-space of the DFPT potentials. +In polar materials there is a long range (LR) component in the first-order variation +of the KS potential that can be modeled in terms of the Born effective charges and +the macroscopic dielectric tensor [[cite:Verdi2015]], [[cite:Giustino2017]]. +Possible values are [0, -1, 1]. + +Setting this flag to 0 deactivates the treatment of the LR contribution (not recommended in polar materials). + +If *dvdb_add_lr* is set to 1, the LR part is removed when computing the real-space representation +of the DFPT potentials so that the potential in real space is short-ranged and ameneable to Fourier interpolation. +The long-range contribution is then added back when interpolating the DFPT potentials at arbitrary q-points + +If *dvdb_add_lr* is set to -1, the LR part is removed before computing the real-space representation +but the LR term is **not** reintroduced during the interpolation in $\qq$-space. +This option is mainly used for debugging purposes. + +By default, the code will always treat the LR term if the DDB file contains the Born effective charges +and the macroscopic dielectric tensor. +This option is similar to [[dipdip]] but it acts on the DFPT potentials instead of the dynamical matrix. +""", +), + +Variable( + abivarname="eph_np_pqbks", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions=[5], + defaultval=0, + mnemonics="EPH Number of Processors for Perturbations, Q-points, Bands, K-points, Spin.", + text=r""" +This variable defines the Cartesian grid of MPI processors used for EPH calculations. +If not specified in the input, the code will generate this grid automatically using the total number of processors +and the basic dimensions of the job computed at runtime. +At present (|today|), this variable is supported only in the calculation of the phonon einewidths ([[eph_task]] 1) +and in the computation of the e-ph self-energy ([[eph_task]] 4 or -4). +In all the other tasks, this variable is ignored. + +Preliminary considerations: + +EPH calculations require very dense samplings of the BZ to converge and the memory requirements +increase quickly with the number of k-points, q-points and [[natom]]. +The EPH code can MPI-distribute the most important datastructures but non all the MPI-levels +present the same scalability and the same parallel efficiency. +Besides the maximum number of MPI processes that can be used for the different MPI-levels is related +to the basic dimensions of the calculation. + +In what follows, we explain briefly the pros and cons of the different MPI-levels, then we specialize +the discussion to the different calculations activated by [[eph_task]]. + +The parallelization over perturbations (**np**) is network intensive but it allows one to decrease the memory +needed for the DFPT potentials especially when computing the e-ph self-energy. +The maximum valus for **np** is 3 * [[natom]] and the workload is equally distributed provided **np** +divides 3 * [[natom]] equally. +Using **np** == [[natom]] usually gives good parallel efficiency. + +The parallelization over bands (**nb**) has limited scalability that depends on the number of bands included +in the self-energy but it allows one to reduce the memory +allocated for the wavefunctions, especially when we have to sum over empty states in the e-ph self-energy. + +[[eph_task]] = +1 + By default, the code uses all the processes for the (k-point, spin) parallelism. + Since the number of k-points around the FS is usually large, this parallelization scheme is OK in most of the cases. + When the number of processes becomes comparable to the number of k-points around the FS, + it makes sense to activate the q-point parallelism. + The parallelism over perturbations should be used to reduce the memory allocated for the interpolation of the DFPT potentials. + The band parallelism is not supported in this part. + +[[eph_task]] = +4 + Parallelization over bands allows one to reduce the memory needed for the wavefunctions but + this level is less efficient than the parallelization over q-points and perturbations. + To avoid load and memory imbalance, **nb** should divide [[nband]]. + We suggest to increase the number of procs for bands until the memory allocated for the wavefunctions + decreases to a reasonable level and then use the remaining procs for **nq** and **np** in this order + until these levels start to saturate. + The MPI parallelism over k-points and spins is efficient at the level of the wall-time + but it requires HDF5 + MPI-IO support and memory does not scale. Use these additional levels if the memory requirements + are under control and you need to boost the calculation. Note also that in this case the output results are written to + different text files, only the SIGEPH.nc file will contains all the k-points and spins. + +[[eph_task]] = -4 + The number of bands in the self-energy sum is usually small so it does not make sense to + parallelize along this dimension. The parallelization over q-points seem to be more efficient than + the one over perturbations although it introduces some load imbalance because, due to memory reasons, + the code distributes the q-points in the IBZ (nqibz) instead of the q-points in the full BZ (nqbz). + Moreover non all the q-points in the IBZ contribute to the imaginary part of $$\Sigma_nk$$. + The MPI parallelism over k-points and spins is supported with similar behaviour as in **eph_task** +4. + + +!!! important + + The total number of MPI processes must be equal to the product of the different entries. +""", +), + +Variable( + abivarname="eph_use_ftinterp", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="EPH FORCE Fourier Transform Interpolation of DFPT potentials.", + text=r""" +This is an *advanced option* used for testing/debugging the interpolation of the DFPT potentials when [[eph_task]] in (2, -2) +By default, the code seeks for the q-point in the input DVDB file when *eph_use_ftinterp* is set to zero (default) +and stops is the q-point in not found in the file. +When *eph_use_ftinterp* is set to 1, the input DVDB file (assumed to be on the [[ddb_ngqpt]] q-mesh) +will be used to generate the real-space representation of the DFPT potentials and interpolated the potential +at the input [[qpt]]. +""", +), + +#Variable( +# abivarname="eph_alpha_gmin", +# varset="eph", +# vartype="real", +# topics=['ElPhonInt_expert'], +# dimensions="scalar", +# defaultval=0, +# mnemonics="EPH ALPHA times norm of GMIN.", +# text=r""" +#This is an *advanced option* used to compute the long-range part of the DFTP potential. +#TO BE DESCRIBED WHEN WE ENTER PRODUCTION +#""", +#), + +Variable( + abivarname="getpot_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the KS POTential from PATH", + text=r""" +This variable defines the path of the POT file containing the KS ground-state potential +that should be used in input. +At present, it is mainly used in EPH code when performing calculation with the Sternheimer equation. +Note that the path must be inserted between quotation marks. +Note also that relative paths are interpreted according to the working directory in which Abinit is executed! +""", +), + +Variable( + abivarname="ddb_qrefine", + varset="eph", + vartype="integer", + topics=['ElPhonInt_expert'], + dimensions=[3], + defaultval=[1, 1, 1], + mnemonics="Q-point REFINEment order (experimental)", + text=r""" +If **ddb_qrefine** is superior to 1, the EPH code attempts to initialize a first set of +dynamical matrices from the DDB file and DFPT potentials from the DVDB file, with a q-point grid which is +[[ddb_ngqpt]] divided by **qrefine** (e.g. ddb_ngqpt 4 4 2 ddb_qrefine 2 2 1 starts with a 2x2x2 grid). +The dynamical matrices and DFPT potentials are interpolated onto the full +[[ddb_ngqpt]] grid and any additional information found in the DDB file is +imposed, before proceeding to normal band structure and other interpolations. +Should implement Gaal-Nagy's algorithm in [[cite:GaalNagy2006]]. + +A similar option is also available in anaddb. The main difference is that ddb_qrefine will also densify +the q-mesh used for the Fourier transform of the DFPT potentials. +""", +), + +Variable( + abivarname="getwfk_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the wavefunctions from WFK PATH", + text=r""" +Specify the path of the WFK file using a string instead of the dataset index. +Alternative to [[getwfk]] and [[irdwfk]]. The string must be enclosed between quotation marks: + + getwfk_path "../outdata/out_WFK" +""" +), + + +Variable( + abivarname="getwfkfine_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the fine wavefunctions from PATH", + text=r""" +Specify the path of the fine WFK file using a string instead of the dataset index. +Alternative to [[getwfkfine]] and [[irdwfkfine]]. The string must be enclosed between quotation marks: + + getwfkfine_path "../outdata/out_WFK" +""" +), + + +Variable( + abivarname="getwfq_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the k+q wavefunctions from WFQ PATH", + text=r""" +Specify the path of the WFQ file using a string instead of the dataset index. +Alternative to [[getwfq]] and [[irdwfq]]. The string must be enclosed between quotation marks: + + getwfq_path "../outdata/out_WFQ" +""" +), + +Variable( + abivarname="getddb_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval="None", + mnemonics="GET the DDB from PATH", + text=r""" +Specify the path of the DDB file using a string instead of the dataset index. +Alternative to [[getddb]] and [[irdddb]]. The string must be enclosed between quotation marks: + + getddb_path "../outdata/out_DDB" +""" +), + +Variable( + abivarname="getdvdb_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the DVDB file from PATH", + text=r""" +Specify the path of the DVDB file using a string instead of the dataset index. +Alternative to [[getdvdb]] and [[irddvdb]]. The string must be enclosed between quotation marks: + + getdvdb_path "../outdata/out_DVDB" +""" +), + +Variable( + abivarname="getden_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the DEN file from PATH", + text=r""" +Specify the path of the DEN file using a string instead of the dataset index. +Alternative to [[getden]] and [[irdden]]. The string must be enclosed between quotation marks: + + getden_path "../outdata/out_DEN" +""" +), + +Variable( + abivarname="getscr_path", + varset="files", + vartype="string", + topics=['multidtset_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="GET the SCR file from PATH", + text=r""" +Specify the path of the SCR file using a string instead of the dataset index. +Alternative to [[getscr]] and [[irdscr]]. The string must be enclosed between quotation marks: + + getscr_path "../outdata/out_SCR" +""" +), + +Variable( + abivarname="eph_ecutosc", + varset="eph", + vartype="real", + topics=['ElPhonInt_expert'], + dimensions="scalar", + defaultval="0.0 Hartree", + mnemonics="Electron-Phonon: Energy CUToff for OSCillator matrix elements", + characteristics=['[[ENERGY]]'], + text=r""" +This variable defines the energy cutoff defining the number of G-vectors in the oscillator matrix elements: + +$$ \langle \mathbf{k+q},b_1 | e^{+i (\mathbf{q+G)} \mathbf{r}} | \mathbf{k}, b_2 \rangle $$ + +These quantities are used to compute the long-range part of the e-ph matrix elements that are then used +to integrate the Frohlich divergence. + +Possible values: + + - = 0 --> Approximate oscillators with $ \delta_{b_1 b_2} $ + - > 0 --> Use full expression with G-dependence + - < 0 --> Deactivate computation of oscillators. + +!!! important + + eph_ecutosc cannot be greater than [[ecut]] +""", +), + +Variable( + abivarname="output_file", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="OUTPUT FILE", + text=r""" +String specifying the name of the main output file +when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +If not specified, the name of the output file is automatically generated by replacing +the file extension of the input file with `.abo`. +To specify the filename in the input use the syntax + + output_file = "t01.out" + +with the string enclosed between double quotation marks. +""" +), + +Variable( + abivarname="indata_prefix", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="INput DATA PREFIX", + text=r""" +Prefix for input files. Replaces the analogous entry in the obsolete *files_file* +This variable is used when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +If this option is not specified, a prefix is automatically constructed from the input file name +provided the file ends with e.g. `.ext`. (`.abi` is recommended) + +If the input file does not have a file extension, a default is provided. +""" +), + +Variable( + abivarname="outdata_file", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="OUTput DATA PREFIX", + text=r""" +Prefix for output files. Replaces the analogous entry in the obsolete *files_file* +This variable is used when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +If this option is not specified, a prefix is automatically constructed from the input file name +provided the file ends with e.g. `.ext`. (`.abi` is recommended) + +If the input file does not have a file extension, a default is provided. +""" +), + +Variable( + abivarname="tmpdata_prefix", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval=None, + mnemonics="TeMPorary DATA PREFIX", + text=r""" +Prefix for temporary files. Replaces the analogous entry in the obsolete *files_file* +This variable is used when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +If this option is not specified, a prefix is automatically constructed from the input file name +provided the file ends with `.ext`. + +If the input file does not have a file extension, a default is provided. +""" +), + +Variable( + abivarname="pp_dirpath", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="PseudoPotential DIRectory PATH", + text=r""" +Directory prependeded to the pseudopotential basename specified in [[pseudos]]. +This variable is used when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +The string must be quoted in double quotation marks: + + pp_dirpath = "/home/user/my_pseudos/" + +If not present, the list in [[pseudos]] is used directly. +""" +), + +Variable( + abivarname="pseudos", + varset="files", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="PSEUDOpotentialS", + text=r""" +String defining the list of pseudopotential files +when Abinit is executed with the new syntax: + + abinit run.abi > run.log 2> run.err & + +The string must be quoted in double quotation marks and multiple files should be separated by a comma, e.g. + + pseudos = "al.psp8, as.psp8" + +The **mandatory** list must contain [[ntypat]] pseudos ordered according to the [[znucl]] array. +The directory where all pseudos are located can be specified with [[pp_dirpath]]. + +!!! important + + Shell variables e.g. $HOME or tilde syntax `~` for user home are not supported. +""" +), + ] diff --git a/abipy/abio/abivar_database/variables_aim.py b/abipy/abio/abivar_database/variables_aim.py index e6530d1b3..051cfb1c2 100644 --- a/abipy/abio/abivar_database/variables_aim.py +++ b/abipy/abio/abivar_database/variables_aim.py @@ -3,10 +3,11 @@ executable = "aim" +#from abimkdocs.variables import ValueWithUnit, MultipleValue, Range from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions ValueWithConditions = dict - Variable=dict + variables = [ Variable( abivarname="atom@aim", @@ -16,7 +17,7 @@ dimensions="scalar", defaultval=1, mnemonics="index of ATOM", - text=""" + text=r""" Index of the investigated atom. """, ), @@ -29,7 +30,7 @@ dimensions="scalar", defaultval=1.0, mnemonics="bader ATomic RADius", - text=""" + text=r""" A first estimation of the Bader radius (not too important - it is used only two times) """, @@ -43,7 +44,7 @@ dimensions="scalar", defaultval=0.98, mnemonics="COeFFicient 1", - text=""" + text=r""" See the input variable [[ratmin@aim]]. """, ), @@ -56,7 +57,7 @@ dimensions="scalar", defaultval=0.95, mnemonics="COeFFicient 2", - text=""" + text=r""" See the input variable [[ratmin@aim]]. """, ), @@ -69,7 +70,7 @@ dimensions="scalar", defaultval=0, mnemonics="computation of CRITical points", - text=""" + text=r""" Drives the computation of critical points. * [0] not @@ -103,7 +104,7 @@ dimensions="scalar", defaultval=0, mnemonics="electronic DENsity OUTput", - text=""" + text=r""" Output of the electronic density. The specification of the line (plane) in the real space must be given in the input variable [[vpts@aim]] and grid in [[ngrid@aim]]. It is also possible to get only the valence density or the core @@ -123,7 +124,7 @@ dimensions="scalar", defaultval=0, mnemonics="Density or Laplacian TYP output", - text=""" + text=r""" Specification of the contribution of the electronic density corresponding to the density and/or laplacian output (see [[denout@aim]] and [[lapout@aim]]) @@ -141,7 +142,7 @@ dimensions="scalar", defaultval="1.d-2", mnemonics="DPCLIM", - text=""" + text=r""" If two "numerically different" critical points are separated by less than **dpclim** , they are considered to be the same critical point. This often happens because of numerical inaccuracies : one CP might be "seen" by two @@ -157,9 +158,9 @@ vartype="real", topics=['Bader_expert'], dimensions=[3], - defaultval=MultipleValue({'number': 3, 'value': 0.0}), + defaultval="3*0.0", mnemonics="FOLlow DEParture", - text=""" + text=r""" Needed in the case [[aim:follow]]=1 only. Defines the starting point. """, ), @@ -172,7 +173,7 @@ dimensions="scalar", defaultval=0, mnemonics="FOLLOW the gradient path", - text=""" + text=r""" Follow the gradient path to the corresponding atom starting from the position specified in the input variable [[aim:foldep]]. """, @@ -186,7 +187,7 @@ dimensions="scalar", defaultval=0.5, mnemonics="FOLlow STeP", - text=""" + text=r""" The first step for following the gradient path. """, ), @@ -199,7 +200,7 @@ dimensions="scalar", defaultval=0, mnemonics="GraPhic output for the bader SURFace", - text=""" + text=r""" Drives the graphic output (gnuplot script) of the irreducible part of the calculated Bader surface. @@ -216,7 +217,7 @@ dimensions="scalar", defaultval=100, mnemonics="numer of INtegration PoinTs", - text=""" + text=r""" Number of radial points used for integration of the Bader charge (not too sensitive). """, @@ -230,7 +231,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integration of the charge density RHO", - text=""" + text=r""" Drives the integration of the charge of the Bader atom. * 0, not calculated @@ -246,7 +247,7 @@ dimensions="scalar", defaultval=0, mnemonics="Integration of the VOLume", - text=""" + text=r""" Drives the integration of the volume of the Bader atom. * 0, not calculated @@ -262,7 +263,7 @@ dimensions="scalar", defaultval=0, mnemonics="electronic density LAPlacian OUTput", - text=""" + text=r""" Output of the laplacian of electronic density. The specification of the line (plane) in the real space must be given in the input variable [[aim:vpts]] and grid in [[aim:ngrid]]. It is also possible to get only the valence density or @@ -282,7 +283,7 @@ dimensions="scalar", defaultval="1.d-12", mnemonics="Low GRADient criterion", - text=""" + text=r""" The search for one particular CP is decided to be successful when either the norm of the gradient of the electron density is smaller than **lgrad** or when the length of the planned search step is smaller than [[aim:lstep]]. If the @@ -302,7 +303,7 @@ dimensions="scalar", defaultval="1.d-5", mnemonics="Low GRADient criterion 2", - text=""" + text=r""" Determines the criterion for deciding that a CP has been found. See [[aim:lgrad]] for more details. """, @@ -316,7 +317,7 @@ dimensions="scalar", defaultval="1.d-10", mnemonics="Length of the planned search STEP", - text=""" + text=r""" Determines the criterion for deciding a CP has been found. See [[aim:lgrad]] for more details. """, @@ -330,7 +331,7 @@ dimensions="scalar", defaultval="1.d-5", mnemonics="Length of the planned search STEP 2", - text=""" + text=r""" Determines the criterion for deciding that a CP has been found. See [[aim:lgrad]] for more details. """, @@ -344,7 +345,7 @@ dimensions="scalar", defaultval=10.0, mnemonics="MAXimal ATomic Distance", - text=""" + text=r""" Atoms within this maximal distance are considered in order to start the search of a CP. @@ -362,7 +363,7 @@ dimensions="scalar", defaultval=5.0, mnemonics="MAXimal CP Distance", - text=""" + text=r""" The CPs are searched for within this maximal distance. Note that the supercell, determined by [[aim:nsa]], [[aim:nsb]], and @@ -377,9 +378,9 @@ vartype="integer", topics=['Bader_expert'], dimensions=[2], - defaultval=MultipleValue({'number': 2, 'value': 30}), + defaultval="2*30", mnemonics="Number of GRID points", - text=""" + text=r""" Defines the grid in real space, for the density and laplacian outputs, governed by [[aim:denout]] and [[aim:lapout]]. """, @@ -393,13 +394,13 @@ dimensions="scalar", defaultval=48, mnemonics="Number of PHI angle", - text=""" + text=r""" With [[aim:ntheta]], this variable defines the angular grid for the integration within the Bader volume, in particular, the number of phi angles, to be used between [[aim:phimin]] and [[aim:phimax]]. When the difference -between these two variables is 2 pi, the recommended value of **nphi** is 48. -When it is pi (for symmetry reasons), the recommended value is 32. When it is -pi/2 (for symmetry reasons), the recommended value is 20. +between these two variables is 2 $\pi$, the recommended value of **nphi** is 48. +When it is $\pi$ (for symmetry reasons), the recommended value is 32. When it is +$\pi$/2 (for symmetry reasons), the recommended value is 20. """, ), @@ -411,7 +412,7 @@ dimensions="scalar", defaultval=3, mnemonics="Number of Supercell points in direction A", - text=""" + text=r""" These variables define a "supercell", from the primitive cell repeated along each primitive direction. This supercell is build as follows : @@ -437,7 +438,7 @@ dimensions="scalar", defaultval=3, mnemonics="Number of Supercell points in direction B", - text=""" + text=r""" These variables define a "supercell", from the primitive cell repeated along each primitive direction. This supercell is build as follows : @@ -463,7 +464,7 @@ dimensions="scalar", defaultval=3, mnemonics="Number of Supercell points in direction C", - text=""" + text=r""" These variables define a "supercell", from the primitive cell repeated along each primitive direction. This supercell is build as follows : @@ -489,12 +490,12 @@ dimensions="scalar", defaultval=32, mnemonics="Number of THETA angles", - text=""" + text=r""" With [[aim:nphi]], this variable defines the angular grid for the integration within the Bader volume, in particular, the number of theta angles, to be used between [[aim:thetamin]] and [[aim:thetamax]]. When the difference between -these two variables is pi, the recommended value of **ntheta** is 32. When it -is pi/2 (for symmetry reasons), the recommended value is 20. +these two variables is $\pi$, the recommended value of **ntheta** is 32. When it +is $\pi$/2 (for symmetry reasons), the recommended value is 20. """, ), @@ -506,7 +507,7 @@ dimensions="scalar", defaultval=2.0, mnemonics="PHI MAXimal angle", - text=""" + text=r""" Angular limits of integration of the Bader volume for the phi variables. The number of integration points is given by [[aim:nphi]]. The range of integration can be decreased if there are symmetry reasons for doing this. @@ -521,7 +522,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="PHI MINimal angle", - text=""" + text=r""" Angular limits of integration of the Bader volume for the phi variables. The number of integration points is given by [[aim:nphi]]. The range of integration can be decreased if there are symmetry reasons for doing this. @@ -536,7 +537,7 @@ dimensions="scalar", defaultval=0.05, mnemonics="RADial STeP", - text=""" + text=r""" The length of the first step in the search of the exact Bader radius. """, ), @@ -549,7 +550,7 @@ dimensions="scalar", defaultval=1.0, mnemonics="Radius Atomic MINimal", - text=""" + text=r""" The first estimation of the smallest radius of the basin of the atom (the distance at which the procedure that follows the gradient path announces that the gradient path finishes in the corresponding atom) This parameter is very @@ -568,9 +569,9 @@ vartype="real", topics=['Bader_expert'], dimensions=[2], - defaultval=MultipleValue({'number': 2, 'value': 0.0}), + defaultval="2*0.0", mnemonics="Radius SURface DIRection", - text=""" + text=r""" In the case [[aim:rsurf]]=1, gives the direction (angular coordinates theta,phi) along which the radius of the Bader surface is to be determined. """, @@ -584,7 +585,7 @@ dimensions="scalar", defaultval=0, mnemonics="computation of the Radius bader SURFace", - text=""" + text=r""" Drive the computation of the radius of the Bader surface for the angles specified in the input variable [[aim:rsurdir]] @@ -601,7 +602,7 @@ dimensions=[3], defaultval="1.0 1.0 1.0", mnemonics="SCALing of the cartesian coordinates", - text=""" + text=r""" SCALing of the cartesian coordinates. """, ), @@ -614,7 +615,7 @@ dimensions="scalar", defaultval=0, mnemonics="computation of the bader SURFace", - text=""" + text=r""" Drive the computation of the full Bader surface. * 0, not calculated @@ -628,9 +629,9 @@ vartype="real", topics=['Bader_basic'], dimensions="scalar", - defaultval="pi", + defaultval=r"$\pi$", mnemonics="THETA MAXimal angle", - text=""" + text=r""" Angular limits of integration of the Bader volume for the theta variables. The number of integration points is given by [[aim:ntheta]]. The range of integration can be decreased if there are symmetry reasons for doing this. @@ -645,7 +646,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="THETA MINimal angle", - text=""" + text=r""" Angular limits of integration of the Bader volume for the theta variables. The number of integration points is given by [[aim:ntheta]]. The range of integration can be decreased if there are symmetry reasons for doing this. @@ -658,10 +659,10 @@ vartype="real", topics=['Bader_useful'], dimensions=[6], - defaultval=MultipleValue({'number': 6, 'value': 0.0}), + defaultval="6*0.0", mnemonics="Vectors defining the PoinTS of the surface", commentdims="6 for 1D, 9 for 2D", - text=""" + text=r""" Basic vectors of the line or rectangle in real space, defining the points for which the density or laplacian will be computed, thanks to [[aim:denout]] or [[aim:lapout]] diff --git a/abipy/abio/abivar_database/variables_anaddb.py b/abipy/abio/abivar_database/variables_anaddb.py index 3e986afc1..987414714 100644 --- a/abipy/abio/abivar_database/variables_anaddb.py +++ b/abipy/abio/abivar_database/variables_anaddb.py @@ -3,10 +3,11 @@ executable = "anaddb" +#from abimkdocs.variables import ValueWithUnit, MultipleValue, Range from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions ValueWithConditions = dict - Variable=dict + variables = [ Variable( abivarname="a2fsmear@anaddb", @@ -17,8 +18,8 @@ defaultval=2e-05, mnemonics="Alpha2F SMEARing factor", characteristics=['[[ENERGY]]'], - text=""" -Smearing width for the Eliashberg alpha^2F function (similar to a phonon DOS), + text=r""" +Smearing width for the Eliashberg $\\alpha^2$F function (similar to a phonon DOS), which is sampled on a finite q and k grid. The Dirac delta functions in energy are replaced by Gaussians of width **a2fsmear** (by default in Hartree). """, @@ -32,7 +33,7 @@ dimensions="scalar", defaultval=0, mnemonics="ALign PHONon mode eigendisplacements", - text=""" + text=r""" In case **alphon** is set to 1, ANADDB will compute linear combinations of the eigendisplacements of modes that are degenerate (twice or three times), in order to align the mode effective charges along the cartesian axes. This @@ -51,8 +52,8 @@ defaultval=1, mnemonics="Acoustic Sum Rule", commentdefault="was 0 before v5.3", - text=""" -Govern the imposition of the Acoustic Sum Rule (ASR). + text=r""" +Governs the imposition of the Acoustic Sum Rule (ASR). * 0 --> no ASR for interatomic force constants is imposed. * 1 or 2 --> the ASR for interatomic force constants is imposed by modifying @@ -99,7 +100,7 @@ (NOTE: in order to confuse even more the situation, it seems that the acoustic phonon frequencies generated by the code for both the sym and asym options are -exactly the same ... likely due to an extra symmetrisation in the +exactly the same likely due to an extra symmetrisation in the diagonalisation routine. Of course, when the matrix at Gamma has been generated from IFCs coming from dynamical matrices none of which are Gamma, the breaking of the ASR is rather severe. In order to clear the situation, one @@ -109,31 +110,15 @@ """, ), -Variable( - abivarname="atftol@anaddb", - varset="anaddb", - vartype="real", - topics=['Temperature_expert'], - dimensions="scalar", - defaultval=0.05, - mnemonics="ATomic Temperature Factor TOLerance", - text=""" -The relative tolerance on the atomic temperature factors. This number will -determine when the series of channel widths with which the DOS is calculated -can be stopped, i.e. the mean of the relative change going from one grid to -the next bigger is smaller than **wtol2**. -""", -), - Variable( abivarname="atifc@anaddb", varset="anaddb", vartype="integer", topics=['PhononBands_basic'], - dimensions=["array '[[anaddb:natifc]]'"], + dimensions=['[[anaddb:natifc]]'], defaultval=0, mnemonics="AToms for IFC analysis", - text=""" + text=r""" The actual numbers of the atoms for which the interatomic force constant have to be written and eventually analysed. @@ -142,6 +127,8 @@ """, ), +#FIXME NOTE XG20170811: apparently no effective test for this input variable. Also, +# the description is strange ...! Variable( abivarname="band_gap@anaddb", varset="anaddb", @@ -151,11 +138,8 @@ defaultval=999.0, mnemonics="BAND GAP", characteristics=['[[ENERGY]]'], - text=""" -Allow setting the target band gap, in eV. ([[elphflag@anaddb]]=1). - -NOTE XG20170811: apparently no effective test for this input variable. Also, -the description is strange ...! + text=r""" +Allow setting the target band gap, in eV. ([[anaddb:elphflag]]=1). """, ), @@ -167,7 +151,7 @@ dimensions="scalar", defaultval=1, mnemonics="BRAVais", - text=""" + text=r""" Allows to specify the Bravais lattice of the crystal, in order to help to generate a grid of special q points. @@ -188,10 +172,10 @@ should be replaced by routines used by the main abinit code. Warning: -The value [[brav@anaddb]] = -1 is also possible. It is used for backwards compatibility: -it corresponds to [[brav@anaddb]] = 1, with the weights for the +The value **brav** = -1 is also possible. It is used for backwards compatibility: +it corresponds to **brav** = 1, with the weights for the interpolation of the phonon band structure determined by another (now obsolete) algorithm -than the default [[brav@anaddb]] = 1 algorithm +than the default **brav** = 1 algorithm based on Wigner-Seitz cells (new as v8.7). The default algorithm has a correct treatment of symmetries. """, ), @@ -204,15 +188,15 @@ dimensions="scalar", defaultval=0, mnemonics="Integer for CHarge NEUTrality treatment", - text=""" + text=r""" Set the treatment of the Charge Neutrality requirement for the effective charges. * chneut=0 --> no ASR for effective charges is imposed * chneut=1 --> the ASR for effective charges is imposed by giving to each atom - an equal portion of the missing charge. See Eq.(48) in Phys. Rev. B55, 10355 (1997). + an equal portion of the missing charge. See Eq.(48) in [[cite:Gonze1997a]]. * chneut=2 --> the ASR for effective charges is imposed by giving to each atom a portion of the missing charge proportional to the screening charge already present. - See Eq.(49) in Phys. Rev. B55, 10355 (1997). + See Eq.(49) in [[cite:Gonze1997a]]. More detailed explanation: the sum of the effective charges in the unit cell should be equal to zero. It is not the case in the DDB, and this sum rule is @@ -229,8 +213,8 @@ dimensions="scalar", defaultval=0, mnemonics="DIElectric FLAG", - text=""" -Integer. Frequency-dependent dielectric tensor flag. + text=r""" +Frequency-dependent dielectric tensor flag. * 0 --> No dielectric tensor is calculated. @@ -256,7 +240,7 @@ the variable [[anaddb:nph2l]] must be nonzero in order to initiate computation of atomic displacements. If only the dielectric response is needed it is sufficient to set [[anaddb:nph2l]] to 1 and leave [[anaddb:qph2l]] at its default value (the Gamma point). Note that the relaxed-ion dielectric tensor computed here can also be obtained - as the zero-frequency limit of the frequency-dependent dielectric tensor using input variables dieflag=1 and frmin=0.0. + as the zero-frequency limit of the frequency-dependent dielectric tensor using input variables **dieflag** =1 and [[anaddb:frmin]]=0.0. (The results obtained using these two approaches should agree to good numerical precision.) The ability to compute and print the static dielectric tensor here is provided for completeness and consistency with the other tensor quantities that are computed in this section of the code. @@ -274,7 +258,7 @@ dimensions="scalar", defaultval=1, mnemonics="DIPole-DIPole interaction", - text=""" + text=r""" * 0 --> the dipole-dipole interaction is not handled separately in the treatment of the interatomic forces. This option is available for testing purposes or if effective charge and/or dielectric tensor is not available in the derivative database. It gives results much less accurate than **dipdip** =1. @@ -292,9 +276,9 @@ vartype="real", topics=['PhononBands_useful'], dimensions="scalar", - defaultval="4.5E-06 Hartree = 1 cm-1", + defaultval="4.5E-06 Hartree = 1 cm$^{-1}$", mnemonics="DOS DELTA in Energy", - text=""" + text=r""" The input variable **dosdeltae** is used to define the step of the frequency grid used to calculate the phonon density of states when [[anaddb:prtdos]] = 1. """, @@ -306,10 +290,10 @@ vartype="real", topics=['PhononBands_useful'], dimensions="scalar", - defaultval="4.5E-05 Hartree = 10 cm-1", + defaultval="4.5E-05 Hartree = 10 cm$^{-1}$", mnemonics="DOS SMEARing value", characteristics=['[[ENERGY]]'], - text=""" + text=r""" **dossmear** defines the gaussian broadening used to calculate the phonon density of states when [[anaddb:prtdos]] = 1. """, @@ -323,10 +307,10 @@ dimensions="scalar", defaultval=0, mnemonics="DOS SUM", - text=""" -Set the flag to calculate the two phonon dos density of states. Sum and + text=r""" +Set the flag to 1 to calculate the two phonon dos density of states. Sum and Difference for the Gamma point. The DOS is converged and based on that, the -sum and different is reported in the output file **dossum**. +sum and difference are reported in the output file. """, ), @@ -338,7 +322,7 @@ dimensions="scalar", defaultval=0.25, mnemonics="DOS TOLerance", - text=""" + text=r""" The relative tolerance on the phonon density of state. This number will determine when the series of grids with which the DOS is calculated can be stopped, i.e. the mean of the relative change going from one grid to the next @@ -354,7 +338,7 @@ dimensions="scalar", defaultval=0, mnemonics="EIgenVECtors", - text=""" + text=r""" * 0 --> do not write the phonon eigenvectors; * 1 or 2 --> write the phonon eigenvectors; * 4 --> generate output files for band2eps (drawing tool for the phonon band structure); @@ -369,7 +353,7 @@ dimensions="scalar", defaultval=0, mnemonics="ELAstic tensor FLAG", - text=""" + text=r""" Flag for calculation of elastic and compliance tensors * 0 --> No elastic or compliance tensor will be calculated. @@ -393,7 +377,7 @@ to build the whole tensor, so we need set [[anaddb:instrflag]]=1 and [[anaddb:dieflag]]=3 or 4 . * 5 --> Calculate the relaxed ion elastic and compliance tensors, considering the stress left inside cell. At the same time, bare relaxed ion tensors will still be printed out for comparison. - In this calculation, stress tensor is needed to compute the correction term, so one supposed + In this calculation, stress tensor is needed to compute the correction term, so one is supposed to merge the first order derivative data base (DDB file) with the second order derivative data base (DDB file) into a new DDB file, which can contain both information. And the program will also check for the users. """, @@ -408,7 +392,7 @@ defaultval=0.0, mnemonics="ELectron-PHonon FERMI Energy", characteristics=['[[ENERGY]]'], - text=""" + text=r""" If non-zero, will fix artificially the value of the Fermi energy (e.g. for semiconductors), in the electron-phonon case. Note that [[anaddb:elph_fermie]] and [[anaddb:ep_extrael]] should not be used at the same time. ([[anaddb:elphflag]]=1). @@ -423,7 +407,7 @@ dimensions="scalar", defaultval=0, mnemonics="ELectron-PHonon FLAG", - text=""" + text=r""" If **elphflag** is 1, anaddb performs an analysis of the electron-phonon coupling. """, ), @@ -437,7 +421,7 @@ defaultval="0.01 Hartree", mnemonics="ELectron-PHonon SMEARing factor", characteristics=['[[ENERGY]]'], - text=""" + text=r""" Smearing width for the Fermi surface integration (in Hartree by default). """, ), @@ -450,13 +434,13 @@ dimensions="scalar", defaultval=0, mnemonics="ENergy UNITs", - text=""" + text=r""" Give the energy for the phonon frequency output (in the output file, not in the console log file, for which Hartree units are used). - * 0 --> Hartree and cm-1; + * 0 --> Hartree and cm$^{-1}$; * 1 --> meV and Thz; - * 2 --> Hartree, cm-1, meV, Thz, and Kelvin. + * 2 --> Hartree, cm$^{-1}$, meV, Thz, and Kelvin. """, ), @@ -468,7 +452,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron Phonon integration Band MAXimum", - text=""" + text=r""" When set, and [[anaddb:telphint]] is equal to 2, this variable determines the k-point integration weights which are used in the electron-phonon part of the code. Instead of weighting according to a distance from the Fermi surface, an @@ -485,7 +469,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron Phonon integration Band MINimum", - text=""" + text=r""" As for [[anaddb:ep_b_max]], but **ep_b_min** is the lower bound on the band integration, instead of the upper bound. See also [[anaddb:telphint]]. """, @@ -499,11 +483,11 @@ dimensions="scalar", defaultval=0.0, mnemonics="Electron-Phonon EXTRA ELectrons", - text=""" + text=r""" If non-zero, will fix artificially the number of extra electrons per unit cell (positive for electron doping), according to a doped case. (e.g. for semiconductors), in the electron-phonon case. This field can also be filled -with doping concentration, in the units of cm-3 (negative for electron +with doping concentration, in the units of cm$^{-3}$ (negative for electron doping). Note that **ep_extrael** and [[anaddb:elph_fermie]] should not be used at the same time. ([[anaddb:elphflag]]=1). """, @@ -517,7 +501,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron-Phonon INTerpolation of GKK", - text=""" + text=r""" This flag determines whether the interpolation of the electron-phonon matrix elements over the coarse k-grid is done ( **ep_int_gkk** 1) before summing with appropriate Fermi Surface weights. In this way, the two integration @@ -533,7 +517,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron-Phonon KEEP dependence on electron BANDS", - text=""" + text=r""" This flag determines whether the dependency of the electron-phonon matrix elements on the electron band index is kept ( **ep_keepbands** 1), or whether it is summed over immediately with appropriate Fermi Surface weights. For @@ -549,7 +533,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron Phonon Number of Q PoinTs", - text=""" + text=r""" In case a non-uniform grid of q-points is being used, for direct calculation of the electron-phonon quantities without interpolation, this specifies the number of q-points to be found in the GKK file, independently of the normal anaddb input (ngqpt) @@ -564,7 +548,7 @@ dimensions="scalar", defaultval=20, mnemonics="Electron Phonon Number for SPLINE interpolation", - text=""" + text=r""" The scale factor for cubic spline interpolation, only used in the relaxation time approximation ([[anaddb:ifltransport]]=3). """, @@ -578,7 +562,7 @@ dimensions="scalar", defaultval=0, mnemonics="Electron Phonon PRinTout YAMBO data", - text=""" + text=r""" For electron-phonon calculations, print out matrix elements for use by the yambo code. """, ), @@ -591,7 +575,7 @@ dimensions=[3, '[[anaddb:ep_nqpt]]'], defaultval="(3*[[anaddb:ep_nqpt]])*0", mnemonics="Electron Phonon Q PoinT LIST", - text=""" + text=r""" In case a non-uniform grid of q-points is being used, for direct calculation of the electron-phonon quantities without interpolation, this specifies the q-points to be found in the GKK file, independently of the normal anaddb input @@ -607,7 +591,7 @@ dimensions="scalar", defaultval=0, mnemonics="DO SCALar PRODuct for gkk matrix elements", - text=""" + text=r""" The input variable **ep_scalprod** is a flag determining whether the scalar product of the electron-phonon matrix elements (gkk) with the phonon displacement vectors is done before or after interpolation. Doing so before ( @@ -627,7 +611,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="FREEZE DISPLacement of phonons into supercells", - text=""" + text=r""" If different from zero, **freeze_displ** will be used as the amplitude of a phonon displacement. For each q-point and mode in the [[anaddb:qph1l]] list, a file will be created containing a supercell of atoms with the corresponding @@ -635,12 +619,12 @@ phonon mode, then let it relax in abinit afterwards. **freeze_displ** is unitless, but has a physical meaning: it is related to the -Bose distribution n_B and the frequency w_qs of the phonon mode. At a given +Bose distribution $n_B$ and the frequency $\omega_{qs}$ of the phonon mode. At a given temperature T, **freeze_displ** will give the mean square displacement of atoms (along with the displacement vectors, which are in Bohr). In atomic -units **freeze_displ** = sqrt((0.5 + n_B(w_qs/kT) / w_qs) Typical values are -50-200 for a frequency of a few hundred cm-1 and room temperature. If all you -want is to break the symmetry in the right direction, any reasonable value +units **freeze_displ** = $\sqrt{(0.5 + n_B(\omega_{qs}/kT) / \omega_{qs}}$. +Typical values are 50-200 for a frequency of a few hundred cm$^{-1}$ and room temperature. +If all you want is to break the symmetry in the right direction, any reasonable value (10-50) should be ok. **WARNING**: this will create a _lot_ of files (3*natom*nph1l), so it should @@ -656,7 +640,7 @@ dimensions="scalar", defaultval=10.0, mnemonics="FRequency MAXimum", - text=""" + text=r""" Value of the largest frequency for the frequency-dependent dielectric tensor, in Hartree. """, ), @@ -669,7 +653,7 @@ dimensions="scalar", defaultval=0.0, mnemonics="FRequency MINimum", - text=""" + text=r""" Value of the lowest frequency for the frequency-dependent dielectric tensor, in Hartree. """, ), @@ -682,7 +666,7 @@ dimensions="scalar", defaultval=0, mnemonics="GKk for input Q grid to be WRITtEn to disk", - text=""" + text=r""" Flag to write out the reciprocal space matrix elements to a disk file named gkqfile. This reduces strongly the memory needed for an electron-phonon run. """, @@ -696,7 +680,7 @@ dimensions=['[[anaddb:gruns_nddbs]]'], defaultval="Empty", mnemonics="GRUNeiSen DDBS", - text=""" + text=r""" List of strings with the paths of the DDB files used for the calculation of the Gruneisen parameters. Each string must be enclosed by quotation marks. The number of DDB files is defined by [[anaddb:gruns_nddbs]] (possible values are: @@ -716,7 +700,7 @@ dimensions="scalar", defaultval=0, mnemonics="GRUNeiSen Number of DDB files", - text=""" + text=r""" This variable defines the number of DDB files (read from [[anaddb:gruns_ddbs]]) used for the calculation of the Gruneisen parameters. """, @@ -730,7 +714,7 @@ dimensions=['[[anaddb:natfix]]'], defaultval=0, mnemonics="Indices of the AToms that are FIXed", - text=""" + text=r""" Indices of the atoms that are fixed during a structural relaxation at constrained polarization. See [[anaddb:polflag]]. """, @@ -744,7 +728,7 @@ dimensions=['[[anaddb:natprj_bs]]'], defaultval="0*'[[anaddb:natprj_bs]]'", mnemonics="Indices of the AToms for the PRoJection of the phonon Band Structure", - text=""" + text=r""" Indices of the atoms that are chosen for projection of the phonon eigenvectors, giving a weighted phonon band structure file. """, @@ -758,7 +742,7 @@ dimensions="scalar", defaultval=0, mnemonics="IFC ANAlysis", - text=""" + text=r""" * 0 --> no analysis of interatomic force constants; * 1 --> analysis of interatomic force constants. @@ -784,7 +768,7 @@ dimensions="scalar", defaultval=0, mnemonics="Interatomic Force Constants FLAG", - text=""" + text=r""" * 0 --> do all calculations directly from the DDB, without the use of the interatomic force constant. * 1 --> calculate and use the interatomic force constants for interpolating the phonon spectrum and dynamical matrices at every q wavevector, and eventually analyse the interatomic force constants, @@ -815,7 +799,7 @@ dimensions="scalar", defaultval=0, mnemonics="IFC OUTput", - text=""" + text=r""" For each atom in the list [[anaddb:atifc]] (generic atoms), **ifcout** give the number of neighbouring atoms for which the ifc's will be output (written) and eventually analysed. The neighbouring atoms are selected by decreasing @@ -831,11 +815,11 @@ dimensions="scalar", defaultval=0, mnemonics="IFLag for TRANSPORT", - text=""" -if ifltransport=1 (LOVA) or ifltransport=2 (non-LOVA), anaddb calculates the + text=r""" +if **ifltransport** =1 (LOVA) or **ifltransport** =2 (non-LOVA), anaddb calculates the transport properties: electrical and thermal resistivities from electron- -phonon interactions in the variational approach. If ifltransport=3, anaddb -calculates the k-dependent relaxation time. (needs[[anaddb:elphflag]] = 1) +phonon interactions in the variational approach. If **ifltransport** =3, anaddb +calculates the k-dependent relaxation time. (needs [[anaddb:elphflag]] = 1) """, ), @@ -847,7 +831,7 @@ dimensions="scalar", defaultval=0, mnemonics="INternal STRain FLAG", - text=""" + text=r""" Internal strain tensor flag. * 0 --> No internal-strain calculation. @@ -865,7 +849,7 @@ dimensions=['[[anaddb:nstrfix]]'], defaultval=0, mnemonics="Index of STRain FIXed", - text=""" + text=r""" Indices of the elements of the strain tensor that are fixed during a structural relaxation at constrained polarisation: @@ -881,11 +865,11 @@ of phonons at Q=0 (needed because the inverse of force-constant tensor is required). * 3 --> Both relaxed and clamped-ion elastic and compliance tensors will be printed out. The input variable [[anaddb:instrflag]] should also be set to 1. - Requirements for preceding response-function DDB generation run: Same as for [[anaddb:elaflag]]=2'. + Requirements for preceding response-function DDB generation run: Same as for [[anaddb:elaflag]]=2. * 4 --> Calculate the elastic and compliance tensors (relaxed ion) at fixed displacement field, the relaxed-ion tensors at fixed electric field will be printed out too, for comparison. When [[anaddb:elaflag]]=4, we need the information of internal strain and relaxed-ion dielectric tensor - to build the whole tensor, so we need set [[anaddb:instrflag]]=1 and [[anaddb:dieflag]]=3 or 4 . + to build the whole tensor, so we need to set [[anaddb:instrflag]]=1 and [[anaddb:dieflag]]=3 or 4. * 5 --> Calculate the relaxed ion elastic and compliance tensors, considering the stress left inside cell. At the same time, bare relaxed ion tensors will still be printed out for comparison. In this calculation, stress tensor is needed to compute the correction term, so one supposed @@ -904,7 +888,7 @@ dimensions=[3, 3], defaultval="9*0", mnemonics="K PoinT Reciprocal LATTice", - text=""" + text=r""" Unnormalized lattice vectors for the k-point grid in reciprocal space (see [[kptrlatt]] abinit variable definitionas well). Input needed in electron-phonon calculations using nesting functions or tetrahedron integration. @@ -919,9 +903,9 @@ dimensions=[3, 3], defaultval="9*0", mnemonics="K PoinT Reciprocal LATTice for FINE grid", - text=""" + text=r""" As kptrlatt above, but for a finer grid of k-points. Under development. -Does not work yet, as of June 2010. +Does not work yet, as of |today|. """, ), @@ -933,7 +917,7 @@ dimensions="scalar", defaultval=0.1, mnemonics="MU STAR", - text=""" + text=r""" Average electron-electron interaction strength, for the computation of the superconducting Tc using Mc-Millan's formula. """, @@ -947,7 +931,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of AToms FIXed", - text=""" + text=r""" Number of atoms that are fixed during a structural optimisation at constrained polarization. See [[anaddb:polflag]]. """, @@ -961,7 +945,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of AToms for IFC analysis", - text=""" + text=r""" Give the number of atoms for which IFCs are written and eventually analysed. The list of these atoms is provided by [[anaddb:atifc]]. """, @@ -975,9 +959,9 @@ dimensions="scalar", defaultval=0, mnemonics="Number of AToms for PRoJection of the Band Structure", - text=""" + text=r""" Give the number of atoms for which atomic-projected phonon band structures -will be output. The list of these atoms is provided by [[iatprj_bs@anaddb]]. +will be output. The list of these atoms is provided by [[anaddb:iatprj_bs]]. """, ), @@ -989,8 +973,8 @@ dimensions="scalar", defaultval=800, mnemonics="Number of CHANnels", - text=""" -The number of channels of width 1 cm-1 used in calculating the phonon density + text=r""" +The number of channels of width 1 cm$^{-1}$ used in calculating the phonon density of states through the histogram method, or, equivalently, the largest frequency sampled. The first channel begins at 0. """, @@ -1004,7 +988,7 @@ dimensions="scalar", defaultval=20, mnemonics="Number of DIVisions for the SMallest segment", - text=""" + text=r""" This variable defines the number of divisions used to sample the smallest segment of the q-path used for the phonon band structure. If ndivsm is specified in the input file, the code will automatically generate the points @@ -1020,7 +1004,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of FREQuencies", - text=""" + text=r""" Number of frequencies wanted for the frequency-dependent dielectric tensor. Should be positive. See [[anaddb:dieflag]]. The code will take **nfreq** equidistant values from [[anaddb:frmin]] to [[anaddb:frmax]]. @@ -1035,8 +1019,7 @@ dimensions=[3], defaultval="3*0", mnemonics="Number of Grids points for Q PoinTs (grid 2)", - commentdefault="(will not work)", - text=""" + text=r""" The Monkhorst-Pack grid linear dimensions, for the finer of the series of fine grids. Used for the integration of thermodynamical functions (Bose-Einstein distribution) or for the DOS. """, @@ -1050,9 +1033,9 @@ dimensions=[3], defaultval="3*0", mnemonics="Number of Grids points for Q PoinTs", - commentdefault="(will not work)", - text=""" -The Monkhorst-Pack grid linear dimensions, for the DDB (coarse grid). + text=r""" +The Monkhorst-Pack grid linear dimensions (coarse grid). +Should correspond to the grid of points available in the DDB or to a sub-grid. """, ), @@ -1064,11 +1047,11 @@ dimensions="scalar", defaultval=4, mnemonics="Number of GRIDS", - text=""" + text=r""" This number define the series of grids that will be used for the estimation of the phonon DOS. The coarsest will be tried first, then the next, ... then the one described by [[anaddb:ng2qpt]]. The intermediate grids are defined for -igrid=1... **ngrids** , by the numbers ngqpt_igrid(ii)=(ng2qpt(ii)*igrid)/**ngrids** +igrid=1... **ngrids**, by the numbers ngqpt_igrid(ii)=(ng2qpt(ii)*igrid)/**ngrids** """, ), @@ -1080,7 +1063,7 @@ dimensions="scalar", defaultval=0, mnemonics="Non-Linear FLAG", - text=""" + text=r""" Non-linear properties flag. * 0 --> do not compute non-linear properties ; @@ -1099,7 +1082,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of PHonons in List 1", - text=""" + text=r""" The number of wavevectors in phonon list 1, used for interpolation of the phonon frequencies. The values of these wavevectors will be specified by [[anaddb:qph1l]]. The dynamical matrix for these wavevectors, obtained either @@ -1117,7 +1100,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of PHonons in List 2", - text=""" + text=r""" The number of wavevectors in phonon list 2, defining the directions along which the non-analytical splitting of phonon frequencies at Gamma will be calculated. The actual values of the wavevector directions will be specified @@ -1143,7 +1126,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of Q wavevectors defining a PATH", - text=""" + text=r""" Number of q-points in the array [[anaddb:qpath]] defining the path along which the phonon band structure and phonon linewidths are interpolated. """, @@ -1157,7 +1140,7 @@ dimensions="scalar", defaultval=1, mnemonics="Number of Q SHiFTs", - text=""" + text=r""" The number of vector shifts of the simple Monkhorst and Pack grid, needed to generate the coarse grid of q points (for the series of fine grids, the number of shifts it is always taken to be 1). Usually, put it to 1. Use 2 if BCC @@ -1174,7 +1157,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of atoms in SPHERe", - text=""" + text=r""" Number of atoms included in the cut-off sphere for interatomic force constant, see also the alternative [[anaddb:rifcsph]]. If **nsphere** = 0: maximum extent allowed by the grid. If **nsphere** = -1: the code analyzes different @@ -1201,7 +1184,7 @@ dimensions="scalar", defaultval=0, mnemonics="Number of STRain components FIXed", - text=""" + text=r""" Number of strain component that are fixed during a structural optimisation at constrained polarization. See [[anaddb:polflag]]. """, @@ -1215,7 +1198,7 @@ dimensions="scalar", defaultval=10, mnemonics="Number of TEMPERatures", - text=""" + text=r""" Number of temperatures at which the thermodynamical quantities have to be evaluated. Now also used for the output of transport quantities in electron- phonon calculations. The full grid is specified with the [[anaddb:tempermin]] @@ -1235,10 +1218,10 @@ dimensions="scalar", defaultval=10, mnemonics="Number of Widths of CHANnels", - text=""" + text=r""" The width of the largest channel used to sample the frequencies. The code will generate different sets of channels, with decreasing widths (by step -of 1 cm-1), from this channel width to 1, eventually. It considers to have +of 1 cm$^{-1}$), from this channel width to 1, eventually. It considers to have converged when the convergence criterion based on [[anaddb:dostol]] and [[anaddb:thmtol]] have been fulfilled. """, @@ -1252,8 +1235,8 @@ dimensions="scalar", defaultval=0, mnemonics="OUTput files for BOLTZTRAP code", - text=""" -If set to 1, the phonon frequencies on the ngqpt grid are output in a format + text=r""" +If set to 1, the phonon frequencies on the [[anaddb:ngqpt]] grid are output in a format legible by the BoltzTrap code, which does band interpolation and gets group velocities. The output file will be appended _BTRAP """, @@ -1267,9 +1250,9 @@ dimensions="scalar", defaultval=0, mnemonics="OUTput files for Self Consistent PHONons", - text=""" + text=r""" If set to 1, the phonon frequency and eigenvector files needed for a Self -Consistent phonon run (as in Souvatzis PRL **100** 095901) will be output to +Consistent phonon run (as in [[cite:Souvatzis2008]]) will be output to files appended _PHFRQ and _PHVEC. The third file needed is appended _PCINFO for Primitive Cell INFOrmation. """, @@ -1283,7 +1266,7 @@ dimensions="scalar", defaultval=0, mnemonics="PIEZOelectric tensor FLAG", - text=""" + text=r""" Flag for calculation of piezoelectric tensors * 0 --> No piezoelectric tensor will be calculated. @@ -1291,11 +1274,11 @@ Requirements for preceding response-function DDB generation run: Strain and electric-field responses. For the electric-field part, one needs results from a prior 'ddk perturbation' run. Note that even if only a limited number of piezoelectric tensor terms are wanted - (as determined by rfstrs and rfdir in this calculation) it is necessary to set rfdir = 1 1 1 + (as determined by [[rfstrs]] and [[rfdir]] in this calculation) it is necessary to set [[rfdir]] = 1 1 1 in the d/dk calculation for most structures. The only obvious exception to this requirement is cases in which the primitive lattice vectors are all aligned with the cartesian axes. The code will omit terms in the output piezoelectric tensor for which the available d/dk set is incomplete. - Thus: Set [[rfstrs]] to 1, 2, or 3i (preferably 3) + Thus: Set [[rfstrs]] to 1, 2, or 3 (preferably 3) * 2 --> Both relaxed- and clamped-ion elastic and compliance tensor will be calculated, but only the relaxed-ion quantities will be printed. The input variable [[anaddb:instrflag]] should also be set to 1, because the internal-strain tensor is needed to compute the relaxed-ion corrections. @@ -1331,21 +1314,21 @@ dimensions="scalar", defaultval=0, mnemonics="POLarization FLAG", - text=""" + text=r""" If activated, compute polarization in cartesian coordinates, and update lattice constants and atomic positions in order to perform a structural optimization at constrained polarization. -More detailed explanation: ANADDB can use the formalism described in Na Sai et -al, PRB 66, 104108 (2002), to perform structural relaxations under the +More detailed explanation: ANADDB can use the formalism described in +[[cite:Sai2002]], to perform structural relaxations under the constraint that the polarization is equal to a value specified by the input variable [[anaddb:targetpol]]. The user starts from a given configuration of a crystal and performs a ground-state calculation of the Hellman-Feynman forces and stresses and the Berry phase polarization as well as a linear response calculation of the whole matrix of second-order energy derivatives with respect to atomic displacement, strains and electric field. -In case **polflag** =1, ANADDB solves the linear system of equations (13) of -the Na Sai paper, and computes new atomic positions (if [[anaddb:relaxat]]=1) +In case **polflag** =1, ANADDB solves the linear system of equations (13) in +[[cite:Sai2002]], and computes new atomic positions (if [[anaddb:relaxat]]=1) and lattice constant (if [[anaddb:relaxstr]]=1). Then, the user uses these parameters to perform a new ground-state and linear-response calculation. This must be repeated until convergence is reached. The user can also fix some @@ -1354,7 +1337,7 @@ In case both [[anaddb:relaxat]] and [[anaddb:relaxstr]] are 0, while **polflag** =1, ANADDB only computes the polarization in cartesian coordinates. -As described in the Na Sai's paper, it is important to use the finite +As described in [[cite:Sai2002]], it is important to use the finite difference expression of the ddk ([[berryopt]]=2 or -2) in the linear response calculation of the effective charges and the piezoelectric tensor. """, @@ -1368,7 +1351,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Interatomic Force Constants", - text=""" + text=r""" Flag to print out the Interatomic Force Constants in real space to a file. The available options are: @@ -1385,7 +1368,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT input files for BoLTZTRaP code.", - text=""" + text=r""" * 0 --> do not write the BoltzTraP input files; * 1 --> write out the input files for BoLTZTRaP code. """, @@ -1399,12 +1382,12 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Derivative DataBase files", - text=""" + text=r""" Flag to print out the DDB file interpolated with the Interatomic Force Constants. The available options are: - * 0 --> no output of DDB (default); + * 0 --> no output of DDB; * 1 --> Interpolate the DDB and write out the DDB and DDB.nc files. """, ), @@ -1417,7 +1400,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the phonon Density Of States", - text=""" + text=r""" The **prtdos** variable is used to calculate the phonon density of states, PHDOS, by Fourier interpolating the interatomic force constants on the (dense) q-mesh defined by [[anaddb:ng2qpt]]. Note that the variable [[anaddb:ifcflag]] @@ -1427,6 +1410,7 @@ * 0 --> no output of PHDOS (default); * 1 --> calculate PHDOS using the gaussian method and the broadening defined by [[anaddb:dossmear]]. + * 2 --> calculate PHDOS using the tetrahedron method. The step of the frequency grid employed to calculate the DOS can be defined through the input variable [[anaddb:dosdeltae]]. @@ -1441,7 +1425,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Fermi SURFace", - text=""" + text=r""" Only for electron-phonon calculations. The available options are: * 0 --> do not write the Fermi Surface; @@ -1469,7 +1453,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT Mode-By-Mode decomposition of the electrooptic tensor", - text=""" + text=r""" * 0 --> do not write the mode-by-mode decomposition of the electrooptic tensor; * 1 --> write out the contribution of the individual zone-center phonon modes to the electrooptic tensor. """, @@ -1485,8 +1469,10 @@ mnemonics="PRinT the NESTing function", text=r""" Only for electron-phonon calculations. This input variable is used to -calculate the nesting function defined as: \chi_{nm}(q) = \sum_k -\delta(\epsilon_{k,n}-epsilon_F) \delta(\epsilon_{k+q,m}-\epsilon_F). +calculate the nesting function defined as: +$$ +\chi_{nm}(q) = \sum_k\delta(\epsilon_{k,n}-\epsilon_F) \delta(\epsilon_{k+q,m}-\epsilon_F). +$$ The nesting factor is calculated for every point of the k-grid employed during the previous GS calculation. The values are subsequently interpolated along the @@ -1496,10 +1482,10 @@ the NEST_XSF file that can be read using [XCrySDen](http://www.xcrysden.org) (**prtnest** =2). Note that in the present implementation what is really -printed to file is the "total nesting" defined as \sum_{nm} \chi_{nm}(q). +printed to file is the "total nesting" defined as $\sum_{nm} \chi_{nm}(q)$. Limitations: the k-grid defined by [[kptrlatt]] must be orthogonal in -reciprocal space, moreover off-diagonal elements are not allowed, i.e kptrlatt -4 0 0 0 4 0 0 0 4 is fine while kprtlatt = 1 0 0 0 1 1 0 -1 1 will not work. +reciprocal space, moreover off-diagonal elements are not allowed, i.e. [[kptrlatt]] +4 0 0 0 4 0 0 0 4 is fine while [[kptrlatt]] = 1 0 0 0 1 1 0 -1 1 will not work. * 0 --> do not write the nesting function; * 1 --> write only the nesting function along the q-path in the X-Y format; @@ -1515,7 +1501,7 @@ dimensions="scalar", defaultval=1, mnemonics="PRinT PHonon BANDS", - text=""" + text=r""" Only if [[anaddb:ifcflag]]=1. This option specifies the file format for the phonon band structure. Possible values: @@ -1534,13 +1520,13 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT the Short-Range/Long-Range decomposition of phonon FREQuencies", - text=""" + text=r""" Only if [[anaddb:ifcflag]]=1. The available options are: * 0 --> do not write the SR/LR decomposition of phonon frequencies; * 1 --> write out the SR/LR decomposition of the square of phonon frequencies at each q-point specified in [[anaddb:qph1l]]. -For details see _Europhys. Lett., 33 (9), pp. 713-718 (1996)_. +For details see [[cite:Ghosez1996]]. See also [[anaddb:ifcflag]], [[anaddb:ifcflag]] and [[anaddb:dipdip]]. """, ), @@ -1553,7 +1539,7 @@ dimensions="scalar", defaultval=0, mnemonics="PRinT VOLume", - text=""" + text=r""" Control the volume of printed output. """, ), @@ -1566,21 +1552,21 @@ dimensions=['[[anaddb:nqshft]]'], defaultval=0, mnemonics="Q shifts for the grid number 1", - text=""" + text=r""" This vector gives the shifts needed to define the coarse q-point grid. -a) Case nqshft=1 In general, 0.5 0.5 0.5 with the ngqpt's even will give very -economical grids. On the other hand, is it sometimes better for phonons to +a) Case [[anaddb:nqshft]]=1 In general, 0.5 0.5 0.5 with the ngqpt's even will give +very economical grids. On the other hand, is it sometimes better for phonons to have the Gamma point in the grid. In that case, 0.0 0.0 0.0 should be OK. For the hexagonal lattice, the above mentioned quantities become 0.0 0.0 0.5 and 0.0 0.0 0.0 . -b) Case nqshft=2 The two q1shft vectors must form a BCC lattice. For example, -use 0.0 0.0 0.0 and 0.5 0.5 0.5 +b) Case [[anaddb:nqshft]]=2 The two q1shft vectors must form a BCC lattice. For +example, use 0.0 0.0 0.0 and 0.5 0.5 0.5 -c) Case nqshft=4 The four q1shft vectors must form a FCC lattice. For example, -use 0.0 0.0 0.0 , 0.0 0.5 0.5 , 0.5 0.0 0.5 , 0.5 0.5 0.0 or 0.5 0.5 0.5 , 0.0 -0.0 0.5 , 0.0 0.5 0.0 , 0.5 0.0 0.0 (the latter is referred to as shifted) +c) Case [[anaddb:nqshft]]=4 The four q1shft vectors must form a FCC lattice. For +example, use 0.0 0.0 0.0, 0.0 0.5 0.5, 0.5 0.0 0.5, 0.5 0.5 0.0 or 0.5 0.5 0.5, +0.0 0.0 0.5, 0.0 0.5 0.0, 0.5 0.0 0.0 (the latter is referred to as shifted) Further comments: by using this technique, it is possible to increase smoothly the number of q-points, at least less abruptly than relying on series of grids @@ -1596,19 +1582,19 @@ with respectively 1, 1, 4 and 10 q-points, corresponding to a number of points in the full BZ of 1, 8, 8 and 64. Indeed, the following grids are made available: -1x1x1 with nqshft=2 --> (0 0 0) (.5 .5 .5) -1x1x1 with nqshft=4 --> (0 0 0) (.5 .5 0) -1x1x1 with nqshft=4 (shifted) --> (.5 0 0) (.5 .5 .5) -2x2x2 with nqshft=2 --> 2x2x2 + (.25 .25 .25) -2x2x2 with nqshft=4 --> 2x2x2 + (.25 .25 0) (.25 .25 .5) -2x2x2 with nqshft=4 (shifted) --> (.25 0 0) (.25 .25 .25) (.5 .5 .25) (.25 .5 0) +1x1x1 with [[anaddb:nqshft]]=2 --> (0 0 0) (.5 .5 .5) +1x1x1 with [[anaddb:nqshft]]=4 --> (0 0 0) (.5 .5 0) +1x1x1 with [[anaddb:nqshft]]=4 (shifted) --> (.5 0 0) (.5 .5 .5) +2x2x2 with [[anaddb:nqshft]]=2 --> 2x2x2 + (.25 .25 .25) +2x2x2 with [[anaddb:nqshft]]=4 --> 2x2x2 + (.25 .25 0) (.25 .25 .5) +2x2x2 with [[anaddb:nqshft]]=4 (shifted) --> (.25 0 0) (.25 .25 .25) (.5 .5 .25) (.25 .5 0) ... with respectively 2, 2, 2, 5, 6 and 4 q-points, corresponding to a number of points in the full BZ of 2, 4, 4, 16, 32 and 32. For a FCC lattice, it is possible to sample only the Gamma point by using a -1x1x1 BCC sampling (nqshft=2). +1x1x1 BCC sampling ([[anaddb:nqshft]]=2). """, ), @@ -1620,7 +1606,7 @@ dimensions=[3], defaultval="3* 0", mnemonics="Q points SHiFTs for the grids 2", - text=""" + text=r""" Similar to [[anaddb:q1shft]], but for the series of fine grids. Note that [[anaddb:nqshft]] for this series of grids corresponds to 1. @@ -1635,7 +1621,7 @@ dimensions="scalar", defaultval=0, mnemonics="Q GRID TYPE", - text=""" + text=r""" If **qgrid_type** is set to 1, the electron-phonon part of anaddb will use the [[anaddb:ep_nqpt]] and [[anaddb:ep_qptlist]] variables to determine which q-points to calculate the electron-phonon coupling for. This is an alternative @@ -1651,7 +1637,7 @@ dimensions=[3, '[[anaddb:nqpath]]'], defaultval=0.0, mnemonics="Q wavevectors defining a PATH", - text=""" + text=r""" It is used to generate the path along which the phonon band structure and phonon linewidths are interpolated. There are [[anaddb:nqpath]]-1 segments to be defined, each of which starts from the end point of the previous one. The @@ -1669,7 +1655,7 @@ dimensions=[4, '[[anaddb:nph1l]]'], defaultval=0, mnemonics="Q for PHonon List 1", - text=""" + text=r""" List of [[anaddb:nph1l]] wavevectors, at which the phonon frequencies will be interpolated. Defined by 4 numbers: the wavevector is made by the three first numbers divided by the fourth one (a normalisation factor). The coordinates @@ -1691,7 +1677,7 @@ dimensions=[4, '[[anaddb:nph2l]]'], defaultval=0, mnemonics="PHonon List 2", - text=""" + text=r""" List of phonon wavevector _directions_ along which the non-analytical correction to the Gamma-point phonon frequencies will be calculated (for insulators). Four numbers, as for [[anaddb:qph1l]], but where the last one, @@ -1703,7 +1689,7 @@ Note that if the three first numbers are zero, then the code will do a calculation at Gamma without non-analyticities. -Also note that the code automatically set the imaginary part of the dynamical +Also note that the code automatically sets the imaginary part of the dynamical matrix to zero. This is useful to compute the phonon frequencies when half of the k-points has been used, by the virtue of the time-reversal symmetry (which may induce parasitic imaginary parts...). @@ -1721,14 +1707,14 @@ dimensions=[3], defaultval=0, mnemonics="Q-point REFINEment order (experimental)", - text=""" + text=r""" If **qrefine** is superior to 1, attempts to initialize a first set of dynamical matrices from the DDB file, with a q-point grid which is [[anaddb:ngqpt]] divided by **qrefine** (e.g. ngqpt 4 4 2 qrefine 2 2 1 starts with a 2x2x2 grid). The dynamical matrices are interpolated onto the full [[anaddb:ngqpt]] grid and any additional information found in the DDB file is imposed, before proceeding to normal band structure and other interpolations. -Should implement Gaal-Nagy's algorithm in PRB **73** 014117. +Should implement Gaal-Nagy's algorithm in [[cite:GaalNagy2006]]. """, ), @@ -1740,8 +1726,8 @@ dimensions="scalar", defaultval=0, mnemonics="RAMAN Sum-Rule", - text=""" -Govern the imposition of the sum-rule on the Raman tensors. + text=r""" +Governs the imposition of the sum-rule on the Raman tensors. As in the case of the Born effective charges, the first-order derivatives of the linear dielectric susceptibility with respect to an atomic displacement must vanish when they are summed over all atoms. This sum rule is broken in @@ -1765,7 +1751,7 @@ dimensions="scalar", defaultval=0, mnemonics="RELAXation of AToms", - text=""" + text=r""" If **relaxat** =1, relax atomic positions during a structural relaxation at constrained polarization. See [[anaddb:polflag]]. """, @@ -1779,8 +1765,8 @@ dimensions="scalar", defaultval=0, mnemonics="RELAXation of STRain", - text=""" -If **relaxat** =1, relax lattice constants (lengths/angles) during a + text=r""" +If **relaxstr** =1, relax lattice constants (lengths/angles) during a structural relaxation at constrained polarization. See [[anaddb:polflag]]. """, ), @@ -1793,13 +1779,13 @@ dimensions="scalar", defaultval=1, mnemonics="Response-Function METHod", - text=""" + text=r""" Select a particular set of Data Blocks in the DDB. (PRESENTLY, ONLY OPTION 1 IS AVAILABLE) * 1 --> Blocks obtained by a non-stationary formulation. * 2 --> Blocks obtained by a stationary formulation. -For more detailed explanations, see [[help:abinit]] If the information in the +For more detailed explanations, see [[help:abinit]]. If the information in the DDB is available, always use the option 2. If not, you can try option 1, which is less accurate. """, ), @@ -1812,7 +1798,7 @@ dimensions="scalar", defaultval="zero", mnemonics="Radius of the Interatomic Force Constant SPHere", - text=""" + text=r""" Cut-off radius for the sphere for interatomic force constant, see also the alternative [[anaddb:nsphere]]. If **rifcsph** = 0: maximum extent allowed by the grid. @@ -1830,7 +1816,7 @@ dimensions="scalar", defaultval=0, mnemonics="SeLECT Z", - text=""" + text=r""" Select some parts of the effective charge tensor. (This is done after the application or non-application of the ASR for effective charges). The transformed effective charges are then used for all the subsequent @@ -1855,7 +1841,7 @@ defaultval=1, mnemonics="SYMmetrize the DYNamical MATrix", commentdefault="(was 0 before v5.3)", - text=""" + text=r""" If **symdynmat** is equal to 1, the dynamical matrix is symmetrized before the diagonalization. This is especially useful when the set of primitive vectors of the unit cell and their opposite do not reflect the symmetries of the Bravais lattice @@ -1874,7 +1860,7 @@ dimensions="scalar", defaultval=1, mnemonics="SYMmetrize the GKk matrix elements for each Q", - text=""" + text=r""" If **symgkq** is equal to 1, the electron-phonon matrix elements are symmetrized over the small group of the q-point they correspond to. This should always be used, except for debugging or test purposes. @@ -1889,8 +1875,8 @@ dimensions=[3], defaultval=0.0, mnemonics="TARGET POLarization", - text=""" -Target value of the polarization in cartesian coordinates and in C/m^2. See [[anaddb:polflag]]. + text=r""" +Target value of the polarization in cartesian coordinates and in C/m$^2$. See [[anaddb:polflag]]. """, ), @@ -1902,7 +1888,7 @@ dimensions="scalar", defaultval=1, mnemonics="Technique for ELectron-PHonon INTegration", - text=""" + text=r""" Flag controlling the Fermi surface integration technique used for electron-phonon quantities. * 0 = tetrahedron method (no adjustable parameter) @@ -1919,7 +1905,7 @@ dimensions="scalar", defaultval=100.0, mnemonics="TEMPERature INCrease", - text=""" + text=r""" Increment of the temperature in Kelvin, for thermodynamical and el-phon transport properties. See the associated [[anaddb:tempermin]] and [[anaddb:ntemper]] variables. The default temperature grid goes from 100K to @@ -1938,7 +1924,7 @@ dimensions="scalar", defaultval=100.0, mnemonics="TEMPERature MINimum", - text=""" + text=r""" Lowest temperature (Kelvin) at which the thermodynamical quantities have to be evaluated. Cannot be zero when [[anaddb:thmflag]] is 1. @@ -1961,20 +1947,20 @@ mnemonics="THERMALized SUPERCELL lattice vectors", characteristics=['[[DEVELOP]]'], commentdefault="do not calculate any thermalized supercells", - text=""" + text=r""" Thermal_supercell defines the real space supercell in which a thermalized atomic configuration should be produced, following the prescription of -Zacharias and Giustino (PRB 94 075125 (2016)). The displacements are chosen +[[cite:Zacharias2016]]. The displacements are chosen for each phonon mode according to a temperature, and the displacements are alternated in sign/direction to obtain maximal compensation of the linear -electron phonon coupling. In this way in the PRB dielectric properties at +electron phonon coupling. In this way in [[cite:Zacharias2016]] dielectric properties at finite T can be obtained from a single supercell calculation instead of lots of MD and configuration averaging. The supercell vectors are not constrained to be collinear with the normal lattice vectors: this effect is obtained by using a diagonal -Thermal_supercell. The lines of the matrix describe the linear combination of -the primitive cell lattice vectors yielding the supercell vectors, as for kptrlatt. +thermal_supercell. The lines of the matrix describe the linear combination of +the primitive cell lattice vectors yielding the supercell vectors, as for [[kptrlatt]]. For the moment this feature is under development and it looks like the relative phases of the displacements are not fixed properly yet... (Aug 2017) @@ -1989,7 +1975,7 @@ dimensions="scalar", defaultval=0, mnemonics="THerMal FLAG", - text=""" + text=r""" Flag controlling the calculation of thermal quantities. * When **thmflag** == 1, the code will compute, using the histogram method: @@ -2022,7 +2008,7 @@ dimensions="scalar", defaultval=0.05, mnemonics="THerModynamic TOLerance", - text=""" + text=r""" The relative tolerance on the thermodynamical functions This number will determine when the series of channel widths with which the DOS is calculated can be stopped, i.e. the mean of the relative change going from one grid to @@ -2038,9 +2024,9 @@ dimensions="scalar", defaultval=0, mnemonics="USE K-grid FINEr than the coarse k-grid", - text=""" + text=r""" When set, [[anaddb:kptrlatt_fine]] is suggested to be given. For the present -version, both eigenvalues (densergridGKK, obtained from mrggkk with only the +version, both eigenvalues (denser grid GKK, obtained from mrggkk with only the GS WFK file) and electronic velocities(GKK files from DDK calculation) are needed. Note that the coarse k-grid must be a subset of the fine k-grid. """, @@ -2054,13 +2040,13 @@ dimensions=[2], defaultval="2*0.0d0", mnemonics="Speed of Sound Q-radius, TOLerance KiloMeter/Second", - text=""" + text=r""" This variable activates the calculation of the speed of sound (requires [[anaddb:ifcflag]] = 1). The first entry of the array defines the radius of -the small sphere around the Gamma point (Bohr-1). The second entry gives the +the small sphere around the Gamma point (Bohr$^{-1}$). The second entry gives the absolute tolerance in kilometer/second. The speed of sound is evaluated by performing a spherical average on the small sphere using Lebedev-Laikov grids -(typical values for q-radius: 0.1 Bohr-1) The number of radial points is +(typical values for q-radius: 0.1 Bohr$^{-1}$) The number of radial points is increased until the integration converges twice withing the tolerance specified by the user (typical values for tolkms: 0.05 km/s). @@ -2068,5 +2054,121 @@ """, ), +# ABINIT 9 +Variable( + abivarname="ddb_path@anaddb", + varset="anaddb", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="DDB PATH", + text=r""" +This variable specifies the input DDB file when anaddb is invoked with the new syntax: + + anaddb t01.in > log 2> err + +instead of the legacy mode based on the files file. Example: + + ddb_path = "out_DDB" + +!!! important + + Shell variables e.g. $HOME or tilde syntax `~` for user home are not supported. +""", +), + +Variable( + abivarname="output@anaddb", + varset="anaddb", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="OUTPUT file", + text=r""" +This variable specifies the name of the output file when anaddb is invoked with the new syntax: + + anaddb t01.in > log 2> err + +instead of the legacy mode based on the files file. Example: + + output = "t01.out" +""", +), + +#Variable( +# abivarname="md_output@anaddb", +# varset="anaddb", +# vartype="string", +# topics=['Control_useful'], +# dimensions="scalar", +# defaultval="", +# mnemonics="Molecular Dynamics OUTPUT", +# text=r""" +#This variable specifies the name of the MD output file when anaddb is invoked with the new syntax: +# +# anaddb t01.in > log 2> err +# +#instead of the legacy mode based on the files file. +#Note This variable is optional and used ... +#""", +#), + +Variable( + abivarname="gkk_path@anaddb", + varset="anaddb", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="GKK PATH", + text=r""" +This variable specifies the name of the GKK file when anaddb is invoked with the new syntax: + + anaddb t01.in > log 2> err + +instead of the legacy mode based on the files file. +This variable is optional and used for performing EPH calculation with [[elphflag@anaddb]]. +""", +), + +Variable( + abivarname="eph_prefix@anaddb", + varset="anaddb", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="EPH PREFIX", + text=r""" +This variable specifies the prefix for the elphon output files when anaddb is invoked with the new syntax: + + anaddb t01.in > log 2> err + +instead of the legacy mode based on the files file. +This variable is optional and used for performing EPH calculation with [[elphflag@anaddb]]. +""", +), + +Variable( + abivarname="ddk_path@anaddb", + varset="anaddb", + vartype="string", + topics=['Control_useful'], + dimensions="scalar", + defaultval="", + mnemonics="DDK PATH", + text=r""" +This variable specifies the name the input file with the matrix elements of the velocity operator +when anaddb is invoked with the new syntax: + + anaddb t01.in > log 2> err + +instead of the legacy mode based on the files file. +This variable is optional and used for performing transport calculations with [[elphflag@anaddb]]. +""", +), + ] diff --git a/abipy/abio/abivar_database/variables_multibinit.py b/abipy/abio/abivar_database/variables_multibinit.py new file mode 100644 index 000000000..8bde19dde --- /dev/null +++ b/abipy/abio/abivar_database/variables_multibinit.py @@ -0,0 +1,1283 @@ +# coding: utf-8 +from __future__ import print_function, division, unicode_literals, absolute_import + +executable = "multibinit" + +#from abimkdocs.variables import ValueWithUnit, MultipleValue, Range +from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions +ValueWithConditions = dict +Variable=dict + +variables = [ +Variable( + abivarname="dipdip@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="DIPole-DIPole interaction", + text=r""" +* 0 --> Do not recompute the dipole-dipole interaction. +* 1 --> Recompute the dipole-dipole interaction based on ewald summation . +""", +), + +Variable( + abivarname="dipdip_prt@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="DIPole-DIPole PRinT", + text=r""" +* 1 --> Print the dipole-dipole interaction into the XML. +* 0 --> Do not print the dipole-dipole interaction into the XML. +""", +), + +Variable( + abivarname="dipdip_range@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_expert'], + dimensions=[3], + defaultval=0, + mnemonics="Dipole-Dipole interaction", + text=r""" +Depending of the cases, the range of the dipole-dipole interaction will be parameted by: + +* dipdip_range if superior to ncell and superior to short-range interaction +* ncell if dipdip_range inferior to ncell +* short-range if dipdip_range inferior to short-range interaction + +For example: + + * if dipdip_range = 2 2 2 and the short range interaction if 3 3 3, the dipdip interaction will be set on 3 3 3 + + * if ncell = 15 15 15 and the dipdip_range is 6 6 6, the dipdip interaction will be set on 15 15 15 +""", +), + + +Variable( + abivarname="energy_reference@multibinit", + varset="multibinit", + vartype="real", + topics=['LatticeModel_useful'], + dimensions="scalar", + defaultval=0.0, + mnemonics="Energy of the refences structure", + characteristics=['[[ENERGY]]'], + text=r""" +Set the energy of the reference structure (from the DFT calculation) +if the energy of the reference is not specified in the DDB, +(for example if the DDB file of the ground states is not merged), +or not specified in the XML file), (by default in Hartree). +""", +), + +Variable( + abivarname="ncoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="Number of anharmonic COEFFicients", + text=r""" +Set the number of anharmonic coefficients in the model. This number have to be in agreement with the number of coefficients present in the XML file. + +If ncoeff /= 0, [[multibinit:coefficients]] have to be present in the input files +""", +), + +Variable( + abivarname="coefficients@multibinit", + varset="multibinit", + vartype="real", + topics=['LatticeModel_useful'], + dimensions=['[[multibinit:ncoeff]]'], + defaultval=0.0, + mnemonics="values of the COEFFICIENTS", + text=r""" +Set the values of the coefficients present in the XML file +""", +), + + +Variable( + abivarname="ngqpt@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_useful'], + dimensions=[3], + defaultval="3*1", + mnemonics="Number of Grids points for Q PoinTs", + text=r""" +The Monkhorst-Pack grid linear dimensions, for the DDB (coarse grid). +""", +), + +Variable( + abivarname="nqshft@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_useful'], + dimensions="scalar", + defaultval=1, + mnemonics="Number of Q SHiFTs", + text=r""" +The number of vector shifts of the simple Monkhorst and Pack grid, needed to +generate the coarse grid of q points (for the series of fine grids, the number +of shifts it is always taken to be 1). Usually, put it to 1. Use 2 if BCC +sampling (Warning: not BCC lattice, BCC *sampling*), and 4 for FCC sampling +(Warning: not FCC lattice, FCC *sampling*). +""", +), + +Variable( + abivarname="prt_model@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="Effective potential XML output", + text=r""" +* 0 --> do nothing (Default). +* 1 --> Generate the XML file with: + + * The system definition and the model (Harmonic + Anharmonic) in _model.xml + +* 2 --> Generate two XML files with: + + * The system definition and the model (Harmonic) in _sys.XML + * The model (Anharmonic) in _coeffs.xml + +* 3 --> Generate only one XML file with: + + * The system definition and the model (Harmonic) in _sys.XML + +* 4 --> Generate only one XML file with: + + * The model (Anharmonic) in _coeffs.xml +""", +), + + +Variable( + abivarname="fit_coeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT anharmonic COEFFficients", + text=r""" +* 0 --> do not active the fit process + +* 1 --> Activate the fit process. This option will first generate a set of coefficients if [[multibinit:fit_generateCoeff]] is set to one. This generation is mainly parametrized by [[multibinit:fit_rangePower]] and [[multibinit:fit_cutoff]]. You can also provided a list of coefficients with the model_anharmonic.MXL (see [[help:multibinit]]). Then the fit process will select the coefficients one by one up to [[multibinit:fit_ncoeff]] (see this [[cite:Escorihuela-Sayalero2017|paper]] for the details of the procedure). + +* -1 --> **only for developers**, print the files for the scripts +""", +), + +Variable( + abivarname="fit_ncoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT Number of COEFFicients", + text=r""" +Give the number of anharmonic coefficients to add in the model during the fit process +""", +), + +Variable( + abivarname="fit_generateCoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="FIT GENERATE anharmonic COEFFicient ", + text=r""" +Flag to activate the generation of the anharmonic coefficient for the fit process + +**Related variables:** The power range of the coefficients ([[multibinit:fit_rangePower]]), the cut off of the interactions ([[multibinit:fit_cutoff]]), the flag to add ahnarmonic strain ([[multibinit:fit_anhaStrain]]), the flag to add phonon strain coupling ([[multibinit:fit_SPCoupling]]) +""", +), + +Variable( + abivarname="fit_initializeData@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT INITIALIZE DATA for the fit", + text=r""" +Flag to de/activate the precomputing and storage of all the data for the fit, it will reduce the computation time but increase a lot the memory... +""", +), + +Variable( + abivarname="fit_rangePower@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions=[2], + defaultval="3 4", + mnemonics="FIT RANGE POWER for the coefficients", + text=r""" +Set the range of the powers for the anharmonic coefficients +""", +), + +Variable( + abivarname="fit_cutoff@multibinit", + varset="multibinit", + vartype="real", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval="Unit cell", + mnemonics="FIT CUT-OFF of the anharmonic phonon interaction", + text=r""" +Cut-off for the anharmonic phonon interaction (in Bohr) +""", +), + +Variable( + abivarname="fit_anhaStrain@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT ANHARmonic STRAIN coefficients", + text=r""" +Flag to activate the anharmonic strain. This option will add coefficients like (eta^4) +""", +), + +Variable( + abivarname="fit_SPCoupling@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="FIT anharmonic Strain-Phonon COUPLING coefficients", + text=r""" +Flag to activate the strain phonon coupling. This option will add coefficients like (Sr-Ti)^1 (eta^4) +""", +), + + +Variable( + abivarname="fit_tolMSDE@multibinit", + varset="multibinit", + vartype="real", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT TOLerance on Mean Standard Deviation of the Energy", + text=r""" +Tolerance of the fit based on the Mean Standard Deviation of the Energy in (meV/atm) +""", +), + +Variable( + abivarname="fit_tolMSDS@multibinit", + varset="multibinit", + vartype="real", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT TOLerance on Mean Standard Deviation of the Stresses", + text=r""" +Tolerance of the fit based on the Mean Standard Deviation of the Stresses in (eV^2/A^2) +""", +), + +Variable( + abivarname="fit_tolMSDF@multibinit", + varset="multibinit", + vartype="real", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT TOLerance on Mean Standard Deviation of the Forces", + text=r""" +Tolerance of the fit based on the Mean Standard Deviation of the Forces (eV^2/A^2) +""", +), + +Variable( + abivarname="fit_tolMSDFS@multibinit", + varset="multibinit", + vartype="real", + topics=['FitProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT TOLerance on Mean Standard Deviation of the Forces and Stresses", + text=r""" +Tolerance of the fit based on the Mean Standard Deviation of the Forces and Sressses (eV^2/A^2) +""", +), + +Variable( + abivarname="fit_nfixcoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT Number of FIXed COEFFicients", + text=r""" +Number of imposed coefficients during the fit process for the model: + +* -1 --> fix all the coefficients + +* 0 --> do not fix coefficients + +* n --> fix n coefficients (requires [[multibinit:fit_fixcoeff]] input variable) +""", +), + +Variable( + abivarname="fit_fixcoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions=['[[multibinit:fit_nfixcoeff]]'], + defaultval=0, + mnemonics="FIT FIXed COEFFicients", + text=r""" +Indexes of the imposed coefficients during the fit process for the model: +""", +), + + +Variable( + abivarname="fit_nbancoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT Number of BANed COEFFicients", + text=r""" +Number of imposed coefficients during the fit process of the model: + +* 0 --> do not ban coefficients + +* n --> ban n coefficients (requires [[multibinit:fit_bancoeff]] input variable) +""", +), + +Variable( + abivarname="fit_bancoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions=['[[multibinit:fit_nbancoeff]]'], + defaultval=0, + mnemonics="FIT BANed COEFFicients", + text=r""" +Indexes of the banned coefficients during the fit process of the model +""", +), + +Variable( + abivarname="ts_option@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_useful'], + dimensions="scalar", + defaultval=0, + mnemonics="FIT Training Set OPTION", + text=r""" +* 0 --> the Training is hist from ABINIT + +* 1 --> the Training contains -1 * stress (usualy output from VASP) +""", +), + +Variable( + abivarname="bound_model@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="BOUND COEFFicient", + text=r""" +Flag to activate the bound process: + +* 0 --> Do not activate the bound process + +* 1 --> This option will generate all the possible combinations of coefficients from 1 to [[multibinit:bound_maxCoeff]]. Some constrains are imposed during the generation and the fit of the coefficients, they have to be positive and with even power. Finaly, the code will try all the possible combinations and try to find a bounded model. + +* 2 --> **new version** This option will generate a set of coefficients with a power range defined by [[multibinit:bound_rangePower]] and keep only the coefficients with even power. Then the procedure is similar to the fit process with the constrains to only keep positive coefficients. The bound process will select the coefficients one by one up to [[multibinit:bound_maxCoeff]] and try if the model is bound at each step of the process. + +**Related variables:1 and 2** The number of maximum additional coefficient in the polynome ([[multibinit:bound_maxCoeff]]), the power range for the additional coefficients ([[multibinit:bound_rangePower]]), the cut off of the additional interactions ([[multibinit:bound_cutoff]]) + +*3 --> Check each anharmonic term in the effective potential. If the term contains has a negative coefficient and is even in its displacement or contains odd powers in the displacement generate high order bounding terms of the same combination of displacement within the range of powers defined by the user ([[multibinit:bound_rangePower]]). The coefficients of the added high-order terms are optimized until the precision of the original effective potential is retained. + +""", +), + +Variable( + abivarname="bound_maxCoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="BOUND MAX COEFFicient", + text=r""" +Number of maximum additional coefficients for the bound process +""", +), + +Variable( + abivarname="bound_rangePower@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_basic'], + dimensions=[2], + defaultval="6,6", + mnemonics="BOUND RANGE POWER", + text=r""" +Range of the power for the additional coefficients in the bound process +""", +), + +Variable( + abivarname="bound_cutoff@multibinit", + varset="multibinit", + vartype="real", + topics=['BoundingProcess_basic'], + dimensions="scalar", + defaultval="1 unit cell", + mnemonics="BOUND CUT OFF", + text=r""" +Cut-off for the anharmonic phonon interaction during the bound process (in Bohr) +""", +), + + +Variable( + abivarname="bound_anhaStrain@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="BOUND ANHArmonic STRAIN coefficients", + text=r""" +Flag to activate the anharmonic strain. When the bound process will generate the possible coefficients for the fit, if this input variable is set to 1, the generator will consider coefficients like eta^4 +""", +), + +Variable( + abivarname="bound_SPCoupling@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="BOUND Strain Phonon COUPLING coefficients", + text=r""" +Flag to activate the strain phonon coupling. When the bound process will generate the possible coefficients for the fit, if this input variable is set to 1, the generator will consider coefficients like (Sr-Ti)^2 eta^2 +""", +), + +Variable( + abivarname="bound_cell@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_expert'], + dimensions=[3], + defaultval="6,6,6", + mnemonics="BOUND superCELL size for the molecular dynamics", + text=r""" +When the process will try a given model, this input variable is used to set the size of the supercell for the molecular dynamics +""", +), + +Variable( + abivarname="bound_temp@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_expert'], + dimensions="scalar", + defaultval=500, + mnemonics="BOUND TEMPerature for the molecular dynamics (in Kelvin)", + text=r""" +When the process will try a given model, this input variable is used to set the temperature for the molecular dynamics +""", +), + +Variable( + abivarname="bound_step@multibinit", + varset="multibinit", + vartype="integer", + topics=['BoundingProcess_expert'], + dimensions="scalar", + defaultval=1000, + mnemonics="BOUND number of STEP for the molecular dynamics", + text=r""" +When the process will try a given model, this input variable is used to set the maximum number of molecular dynamics steps +""", +), + +Variable( + abivarname="dynamics@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="Dynamics option for Multibinit", + text=r""" +Set the Dynamics option for Multibinit. This option is equivalent to [[abinit:ionmov]] for numbers < 100. For numbers >100, it uses algorithms implemented inside Multibinit: + +* 0 --> do nothing + +* 12 --> Isokinetic ensemble molecular dynamics. The equation of motion of the ions in contact with a thermostat are solved with the algorithm proposed by Zhang [J. Chem. Phys. 106, 6102 (1997)], as worked out by Minary et al [J. Chem. Phys. 188, 2510 (2003)]. The conservation of the kinetic energy is obtained within machine precision, at each step. +**Purpose:** Molecular dynamics +**Cell optimization:** No (Use [[optcell]]=0 only) + +* 13 --> Isothermal/isenthalpic ensemble. The equation of motion of the ions in contact with a thermostat and a barostat are solved with the algorithm proposed by Martyna, Tuckermann Tobias and Klein [Mol. Phys., 1996, p. 1117]. +If optcell=1 or 2, the mass of the barostat ([[bmass]]) must be given in +addition. +**Purpose:** Molecular dynamics +**Cell optimization:** Yes (if [[optcell]]/=0) +**Related variables:** The time step ([[dtion]]), the temperatures +([[mdtemp]]), the number of thermostats ([[nnos]]), and the masses of +thermostats ([[qmass]]). + +* 101 --> NVE ensemble with velocity Verlet algorithm [[cite:Swope1982]] . +**Purpose:** Molecular dynamics +**Cell optimization:** No (Use [[optcell]]=0 only) +**Related variables:** The time step ([[dtion]]), the temperatures +([[multibinit:temperature]]). + + +* 102 --> NVT ensemble with Langevin algorithm. [[cite:Vanden2006]] . +**Purpose:** Molecular dynamics +**Cell optimization:** No (Use [[optcell]]=0 only) +**Related variables:** The time step ([[dtion]]), the temperatures +([[multibinit:temperature]]), the friction [[multibinit:latt_friction]]. + + +* 103 --> NVT ensemble. The temperature is approached by scaling the velocity of atoms. The method is proposed by Berendsen et al. in J. Chem. Phys., 81 3684–3690 (1984) [[cite:Berendsen1984]]. Note that this method does NOT generate properly the thermostated ensemble. It does not have the correct distribution of the kinetic energy but have the correct average. However, it approches the target temperature exponentially without oscillation, for which the steps can be easily controlled. +**Purpose:** Molecular dynamics +**Cell optimization:** No (Use [[optcell]]=0 only) +**Related variables:** The time step ([[dtion]]), the temperatures +([[multibinit:temperature]]), the ion relaxation time [[multibinit:latt_taut]]. + +* 104 --> NPT ensemble with method. Similar to option 103, except the pressure is also scaled. +**Purpose:** Molecular dynamics +**Cell optimization:** No (Use [[optcell]]=0 only) +**Related variables:** The time step ([[dtion]]), the temperatures +([[multibinit:temperature]]), the ion relaxation time [[multibinit:latt_taut]], the pressure relaxation time [[multibinit:latt_taup]]. + + +* 120 --> Dummy mover. Atoms does not move. For testing only. + +""", + +), + +Variable( + abivarname="dtion@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=100, + mnemonics="Delta Time for IONs", + text=r""" +See [[abinit:dtion]] +""", +), + +Variable( + abivarname="latt_friction@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1e-4, + mnemonics="LATTice dynamics FRICTION parameter", + text=r""" + Parameter of the friction used in Langevin dynamcis [[multibinit:dynamics]] =101. +""", +), + + +Variable( + abivarname="latt_taut@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1000, + mnemonics="LATTice dynamics relaxation time TAUT", + text=r""" + Parameter used in Berendsen lattice dynamcis [[multibinit:dynamics]] =102 and 103, in which the temperature is relaxed exponentially to the target temperature, with the characteristic time of latt_taut. + The unit is atomic unit, same as [[dtion]]. +""", +), + +Variable( + abivarname="latt_taup@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1000, + mnemonics="LATTice dynamics relaxation time TAUT", + text=r""" + Parameter used in Berendsen lattice dynamcis [[multibinit:dynamics]] =103, in which the pressure is relaxed exponentially to the target temperature, with the characteristic time of latt_taup. + The unit is atomic unit, same as [[dtion]]. +""", +), + + + +Variable( + abivarname="ntime@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=200, + mnemonics="Number of TIME step", + text=r""" +Number of step for the dynamics +""", +), + +Variable( + abivarname="nnos@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="Number of NOSe masses", + text=r""" +See [[abinit:nnos]] +""", +), + +Variable( + abivarname="qmass@multibinit", + varset="multibinit", + vartype="real", + topics=['DynamicsMultibinit_basic'], + dimensions=['[[abinit:nnos]]'], + defaultval=0, + mnemonics="Q thermostat MASS", + text=r""" +See [[abinit:qmass]] +""", +), + +Variable( + abivarname="nctime@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="NetCdf TIME between output of molecular dynamics informations ", + text=r""" +Set the number of step between output the molecular dynamics informations in the NetCDF file +""", +), + +Variable( + abivarname="temperature@multibinit", + varset="multibinit", + vartype="real", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=325, + mnemonics="molecular dynamics TEMPERATURE (in Kelvin)", + text=r""" +Give the temperature of the dynamics in Kelvin +""", +), + +Variable( + abivarname="ncell@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[6,6,6], + mnemonics="Number of Cell", + text=r""" +Give the size of the supercell for the dynamics +""", +), + +Variable( + abivarname="strtarget@multibinit", + varset="multibinit", + vartype="real", + topics=['DynamicsMultibinit_basic'], + dimensions=[6], + defaultval=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + mnemonics="STRess TARGET", + text=r""" +See [[abinit:strtarget]] +""", +), + +Variable( + abivarname="bmass@multibinit", + varset="multibinit", + vartype="real", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=10, + mnemonics="Barostat MASS", + text=r""" +See [[abinit:bmass]] +""", +), + +Variable( + abivarname="optcell@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="OPTimize the CELL shape and dimensions", + text=r""" +See [[abinit:optcell]] +""", +), + +Variable( + abivarname="restartxf@multibinit", + varset="multibinit", + vartype="integer", + topics=['DynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="RESTART from (X,F) history", + text=r""" +See [[abinit:restartxf]] +""", +), + +Variable( + abivarname="spin_calc_correlation_obs@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN CALCulate CORRELATION OBServables", + text=r""" +Flag to calculate spin correlation function based observables. + +* 0 --> do not calculate. + +* 1 --> calculate. +""", +), + + +Variable( + abivarname="spin_calc_traj_obs@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN CALCulate TRAJectory based OBServables", + text=r""" +Flag to calculate spin trajectory based observables. (Nothing included yet.) + +* 0 --> do not calculate. + +* 1 --> calculate. +""", +), + + +Variable( + abivarname="spin_calc_thermo_obs@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="SPIN CALCulate THERMO dynamics OBServables", + text=r""" +Flag to calculate spin thermo dynamics observables, +including the specific heat, magnetic susceptibility, Binder U4 value. +It's recommend to always calculate these observables. + +* 0 --> do not calculate. + +* 1 --> calculate. +""", +), + + +Variable( + abivarname="spin_damping@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=-1.0, + mnemonics="SPIN gilbert DAMPING factor", + text=r""" +Gilbert damping factor in LLG equation for spin dynamics. + +* negative value --> use damping factor from spin xml file. + +* positive value --> use as damping factor. The value should be between 0.0 and 1.0 (both included). +""", +), + +Variable( + abivarname="spin_dipdip@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN DIPole DIPole interaction", + text=r""" +* 0 --> Switch off spin dipole-dipole interaction. + +* 1 --> Switch on spin dipole-dipole interaction. + (Not yet implemented.) +""", +), + +Variable( + abivarname="spin_dt@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=100, + mnemonics="SPIN Delta Time", + text=r""" +Time step for spin dynamics. Default value is 100. +Default unit is atomic unit (2.419e-17 s). +S, Sec or Second can be appended as unit. (e.g. 1e-16 Sec). +""", +), + + +Variable( + abivarname="spin_dynamics@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN DYNAMICS", + text=r""" +Flag to run spin dynamics. + +* 0 --> Do not run spin dynamics. + +* 1 --> Run spin dynamics with HeunP integration method. + +* 2 --> Run spin dynamics with Depondt-Mertens method [[cite:Depondt2009]]. + +* 3 --> Run Monte Carlo. + +* 20 --> Dummy mover. Spin will not rotate. For test only. + +The HeunP method does less computation for each step, +whereas the Depondt-Mertens method allow larger time step. +For system with very simple interaction terms, HeunP could be faster. +Otherwise, use Depondt-Mertens method can be more efficient. +""", +), + +Variable( + abivarname="spin_init_state@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="SPIN INITial STATE", + text=r""" +Flag to initialize spin state. + +* 1 --> Random spin state using uniform random numbers. + +* 2 --> Reference spin state from potential file if present. + +* 3 --> State with q-vector using [[multibinit:spin_init_qpoint]], [[multibinit:spin_init_rotate_axis]], and [[multibinit:spin_init_orientation]]. Please check default values for those variables. + +* 4 --> Restart from last step of input spin hist file. "{output}_spinhist_input.nc". +""", +), + + +Variable( + abivarname="spin_mag_field@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[0,0,0], + mnemonics="SPIN Magnetic Field", + text=r""" +External magnetic field. Unit: Tesla. +""", +), + + +Variable( + abivarname="spin_nctime@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN NetCdf write per number of TIME steps", + text=r""" +Write spin into netcdf file in every spin_nctime of spin dynamics time steps. +""", +), + +Variable( + abivarname="spin_ntime@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN dynamics total Number of TIME steps", + text=r""" +Total number of spin dynamics time steps. +""", +), + + +Variable( + abivarname="spin_ntime_pre@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN dynamics total Number of TIME steps for PREparing", + text=r""" +Total number of spin dynamics time steps for preparing the system. +The results of these time step are not written to trajectory spinhist.nc file, +And they are not used for calculating the observables. +""", +), + + +Variable( + abivarname="spin_init_orientation@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[0,0,1], + mnemonics="SPIN INITial ORIENTATION", + text=r""" +Spin initial orientation. It is used for setting the initial spin in a supercell. + For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$ + from the initial orientation along the rotate axis. + Default is along z(0,0,1) direction. +""", +), + + + + +Variable( + abivarname="spin_init_qpoint@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[0,0,0], + mnemonics="SPIN INITial QPOINT", + text=r""" +Spin wave vector. It is used for setting the initial spin in a supercell. + For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$ + from the initial orientation along the rotate axis. + Default is Gamma (0, 0, 0). +""", +), + + + +Variable( + abivarname="spin_init_rotate_axis@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[1,0,0], + mnemonics="SPIN INITial ROTATE AXIS", + text=r""" +Spin initial rotate axis. It is used for setting the initial spin in a supercell. + For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$ + from the initial orientation along the rotate axis. + Default is along x axis (1,0,0). +""", +), + + + +Variable( + abivarname="spin_projection_qpoint@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[0,0,0], + mnemonics="SPIN PROJECTION QPOINT", + text=r""" +Spin wave vector. It is used for getting the total spin. $M_{tot}=\sum_i M_i exp(i q \cdot R_i)$. The unit is the reciprocal lattice vectors of the unitcell. + Default is Gamma. (0, 0, 0) +""", +), + + +Variable( + abivarname="spin_sia_add@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN Single Ion Anistropy ADD", + text=r""" +Add single ion anistropy term to the spin model hamiltonian. +with user defined values (see [[multibinit:spin_sia_k1amp]] and [[multibinit:spin_sia_k1dir]]. + +* 0 --> Do not add, use the term defined in the spin model xml file. + +* 1 --> Override the term in spin model xml file. + +* 2 --> Add to the value defined in spin model xml file. + +Default value: 0. +""", +), + + +Variable( + abivarname="spin_sia_k1amp@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0.0, + mnemonics="SPIN Single Ion Anistropy K1 AMPtitude", + text=r""" +User defined amplitude of single ion anistropy. Only used when [[multibinit:spin_sia_add]] is not 0. +The direction is defined with [[multibinit:spin_sia_k1dir]]. The unit is Ha. To use eV or Ry as unit, +put eV or Ry at the end. +""", +), + + +Variable( + abivarname="spin_sia_k1dir@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions=[3], + defaultval=[0.0,0.0,1.0], + mnemonics="SPIN Single Ion Anistropy K1 DIRection", + text=r""" +User defined direction of single ion anistropy. Only used when [[multibinit:spin_sia_add]] is not 0. +It will be automatically normalized to 1.0. The amplitude is defined with [[multibinit:spin_sia_k1amp]]. +Default value: [0.0, 0.0,1.0]. +""", +), + + +Variable( + abivarname="spin_temperature@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=325, + mnemonics="SPIN TEMPERATURE", + text=r""" +Temperature of spin for spin dynamics. Unit: Kelvin. +Default value: 325. +""", +), + + +Variable( + abivarname="spin_var_temperature@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN VARiable TEMPERATURE", + text=r""" +Switch for variable temperature calculation. 0: off. 1: on. +If switched on, a series of spin dynamics calculation with temperatures from +[[multibinit:spin_temperature_start]] to [[multibinit:spin_temperature_end]], +with number of steps [[multibinit:spin_temperature_nstep]] will be done. +The corresponding _spinhist.nc file has the corresponding temperature in the filename. +""", +), + + +Variable( + abivarname="spin_write_traj@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=1, + mnemonics="SPIN WRITE TRAJectory to spinhist.nc file", + text=""" +Switch for writting of spin trajectory file. 0: off. 1 on. +The trajectory is needed for postprocessing of correlation functions. +""", +), + + +Variable( + abivarname="spin_temperature_start@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0.0, + mnemonics="SPIN TEMPERATURE START", + text=r""" +Start point of variable temperature spin dynamcis calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation. +""", +), + +Variable( + abivarname="spin_temperature_end@multibinit", + varset="multibinit", + vartype="real", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0.0, + mnemonics="SPIN TEMPERATURE END", + text=r""" +End point of variable temperature spin dynamics calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation. +""", +), + +Variable( + abivarname="spin_temperature_nstep@multibinit", + varset="multibinit", + vartype="integer", + topics=['SpinDynamicsMultibinit_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="SPIN TEMPERATURE Number of STEPs", + text=r""" +Number of steps in the variable temperature spin dynamics calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation. +""", +), + +Variable( + abivarname="test_effpot@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="TEST EFFective POTential", + text=r""" +* 0 --> nothing. +* 1 --> Evaluate the effective potential with respect to given test-set and calculate mean square differences between ab-initio energy/forces and model energy/forces""", +), + +Variable( + abivarname="analyze_anh_pot@multibinit", + varset="multibinit", + vartype="integer", + topics=['LatticeModel_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="ANALYZE ANHarmonic POTential", + text=r""" +* 0 --> nothing. +* 1 --> Print energy contribution of each anharmonic term in the effective Potential. + If it is a Molecular Dynamics (MD) run the contribution of each term is printed for each MD-step into MD_anharmonic_terms_energy.dat + If the effective potential is tested against a test set the contribution of each term for each configuration in the test is set is printed in TES_anharmonic_terms_energy.dat + If the a effective potential is fitted the contribution of each selected term for each configuration in the training set is printed in TRS_anharmonic_terms_energy.dat""", +), + + +Variable( + abivarname="opt_effpot@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="OPTimize EFFective POTential", + text=r""" +* 0 --> nothing. +* 1 --> Turn on reading of optimization of effective potential keywords (opt_) + The optimization process gives the user the ability to refit the coefficients of specified terms with respect to the training set while keeping the rest fixed. + +**Related variables:** The number of coefficients to refit ([[multibinit:opt_ncoeff]]), the indexes of the coefficients to optimize ([[multibinit:opt_coeff]])""" +), + +Variable( + abivarname="opt_ncoeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions="scalar", + defaultval=0, + mnemonics="OPTimize NUMBER of COEFFicients", + text=r""" +* Number of anharmonic terms to refit in the effective potential""" +), + +Variable( + abivarname="opt_coeff@multibinit", + varset="multibinit", + vartype="integer", + topics=['FitProcess_expert'], + dimensions=['[[multibinit:opt_ncoeff]]'], + defaultval=0, + mnemonics="OPTimize Cofficients", + text=r""" +Indexes of the terms to refit in the effective potential. """, +), + + +] + + diff --git a/abipy/abio/abivar_database/variables_optic.py b/abipy/abio/abivar_database/variables_optic.py index 335e7b96e..c68972a19 100644 --- a/abipy/abio/abivar_database/variables_optic.py +++ b/abipy/abio/abivar_database/variables_optic.py @@ -3,10 +3,11 @@ executable = "optic" +#from abimkdocs.variables import ValueWithUnit, MultipleValue, Range from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions ValueWithConditions = dict - Variable=dict + variables = [ Variable( abivarname="broadening@optic", @@ -16,16 +17,21 @@ dimensions="scalar", defaultval="1.d-3 Ha", mnemonics="BROADENING", - text=""" -In Eq. 46 of [[cite:Sharma2004], it is clear that when ever wnm(k) is equal to w, there is a resonance. -Numerically this would lead to an infinity. In order to avoid this one could do two things. - -You could change the sum over k-points to integration and then use + text=r""" +This parameter applies a broadening to the spectrum and is used to avoid +divergences in the sum-over-states approach. +The sum-over-states approach to the linear and nonlinear susceptibilities +inevitably include resonant denominators of the form +$(\omega - \omega_{nm})^{-1}$, see for example Eq. 46 of [[cite:Sharma2004]]. +Numerically these denominators lead to infinities. In order to avoid them +one could do one of two things. +One could change the sum over k-points to integration, and then use the linear tetrahedron method (see [[cite:Hughes1996]] for details). -Another way to get around the problem is, like we do in the present case, avoid this -singularity by adding a small complex number to the denominator. This prevents -the denominator from ever going to 0 and acts as a broadening to the spectrum. -The broadening should not be too large as this would wash out the features in the spectrum. +Another way to get around the problem, as we will do in the present case, +is to avoid the singularities by adding a small imaginary contribution to the +denominator. This addition prevents the denominator from ever going to 0, +and acts as a broadening to the spectrum. The broadening should not be too +large, as this would wash out the features in the spectrum. """, ), @@ -37,14 +43,13 @@ dimensions="scalar", mnemonics="DDK FILE", commentdefault="no default", - text=""" -Specify the filename that has been produced by the preparatory Abinit run. -This file must contain the matrix elements of the d/dk operator along direction X. -It must not contain the first-order wavefunctions and may be generated using [[prtwf]] 3. -You should make sure that the number of bands, of spin channels and of + text=r""" +This parameter specifies the name of the file containing the matrix elements of the +$d/dk$ operator in direction X, as the string ddkfile_X. This file should have been +produced by a preparatory Abinit run. +This file must not contain the first-order wavefunctions, and may be generated +using [[prtwf]] 3. Make sure that the number of bands, spin channels, and k-points are the same in all the files. - -use as string with the filename: ddkfile_X, where X is the file number. """, ), @@ -56,10 +61,12 @@ dimensions="scalar", defaultval="1.d-3 Ha", mnemonics="Delta OMEGA", - text=""" -The step and maximum sets your energy grid for the calculation using the -formula number of energy mesh points=maximum/step (zero excluded). So in order -to capture more features you can decrease the step size to get a finer energy + text=r""" +This parameter specifies the step size $\Delta\omega$ for the grid over which the +optic utility computes the susceptibilities. The maximum energy is set by the +companion parameter [[optic:maxomega]]. The susceptibilities are thus computed at +[[optic:maxomega]]/[[optic:domega]] energy points (zero excluded). In order +to capture more features, decrease the step size to get a finer energy grid. In order to go to higher frequency, increase the maximum. """, ), @@ -72,10 +79,13 @@ dimensions=[['num_lin_comp']], defaultval=0, mnemonics="LINear COMPonents", - text=""" -This tells which component of the dielectric tensor you want to calculate. -These numbers are called a and b Eqs. 46 in [[cite:Sharma2004]]. -1 2 3 represent x y and z respectively. For example 11 would be xx and 32 would mean zy. + text=r""" +This parameter specifies the directions of the [[optic:num_lin_comp]] requested components +of the dielectric tensor. The components are specified in +cartesian coordinates, where 1, 2, and 3 represent x, y, and z respectively. For +example, 11 represents the xx component, and 32 represents zy. There should be +[[optic:num_lin_comp]] entries. Note that these directions are denoted by +$a$ and $b$ in [[cite:Sharma2004]]. """, ), @@ -87,11 +97,13 @@ dimensions="scalar", defaultval="1 Ha", mnemonics="MAXimum value of OMEGA", - text=""" -The step and maximum sets your energy grid for the calculation using the -formula number of energy mesh points=maximum/step (zero excluded). So in order -to capture more features you can decrease the step size to get a finer energy grid. -In order to go to higher frequency, increase the maximum. + text=r""" +This parameter specifies the maximum energy for the grid over which the +optic utility computes the susceptibilities. The grid step size is set by the +companion parameter [[optic:domega]]. The susceptibilities are thus computed at +[[optic:maxomega]]/[[optic:domega]] energy points (zero excluded). In order +to capture more features, decrease the step size to get a finer energy +grid. In order to go to higher frequency, increase the maximum. """, ), @@ -103,10 +115,13 @@ dimensions=[['num_nonlin_comp']], defaultval=0, mnemonics="NON-LINear COMPonents", - text=""" -This tells which component of the dielectric tensor you want to calculate. -These numbers are called a, b and c in [[cite:Sharma2004]]. -1 2 3 represent x y and z respectively. For example 111 would be xxx and 321 would mean zyx. + text=r""" +This parameter specifies the directions of the [[optic:num_nonlin_comp]] requested components +of the second-order nonlinear dielectric tensor. The components are specified in +cartesian coordinates, where 1, 2, and 3 represent x, y, and z respectively. For +example, 111 represents the xxx component, and 321 represents zyx. There should be +[[optic:num_nonlin_comp]] entries. Note that these directions are denoted by +$a$ and $b$ in [[cite:Sharma2004]]. """, ), @@ -118,11 +133,13 @@ dimensions="scalar", defaultval=0, mnemonics="NUMber of LINear COMPonents", - text=""" -How many components out of 9 of the linear optical dielectric tensor do you -want to calculate. Most of these are either equal or zero depending upon the -symmetry of the material (for detail see [[cite:Draxl2006]]). -Note that the directions are along the Cartesian axis. + text=r""" +This parameter specifies how many components (out of 9 possible) +of the linear optical dielectric tensor to calculate. +Some of these may be either equal to each other, or zero, depending upon the +symmetry of the material (for details see [[cite:Draxl2006]]). +The directions of the requested components are specified by the parameter +[[optic:lin_comp]]. """, ), @@ -134,11 +151,44 @@ dimensions="scalar", defaultval=0, mnemonics="NUMber of NON-LINear COMPonents", - text=""" -How many components out of 27 of the non-linear optical dielectric tensor do -you want to calculate. Most of these are either equal or zero depending upon -the symmetry of the material (for detail see [[cite:Draxl2006]]). -Note that the directions are along the Cartesian axis. + text=r""" +This parameter specifies how many components (out of 27 possible) +of the second-order nonlinear optical tensor to calculate. +Some of these may be either equal to each other, or zero, depending upon the +symmetry of the material. The directions of the requested components are specified by the parameter [[optic:nonlin_comp]]. +""", +), + +Variable( + abivarname="num_linel_comp@optic", + varset="optic", + vartype="integer", + topics=['Optic_basic'], + dimensions="scalar", + defaultval=0, + mnemonics="NUMber of LINear ELetro-optic COMPonents", + text=r""" +This parameter specifies how many components (out of 27 possible) +of the linear electro-optical susceptibility to calculate. +Some of these may be either equal to each other, or zero, depending upon the +symmetry of the material. The directions of the requested components are specified by the parameter [[optic:linel_comp]]. +""", +), + +Variable( + abivarname="linel_comp@optic", + varset="optic", + vartype="integer", + topics=['Optic_basic'], + dimensions=[['num_linel_comp']], + defaultval=0, + mnemonics="LINear ELectro-optic COMPonents", + text=r""" +This parameter specifies the directions of the [[optic:num_linel_comp]] requested components +of the linear electro-optical susceptibility. The components are specified in +cartesian coordinates, where 1, 2, and 3 represent x, y, and z respectively. For +example, 111 represents the xxx component, and 321 represents zyx. There should be +[[optic:num_linel_comp]] entries. """, ), @@ -151,16 +201,15 @@ defaultval=0.0, mnemonics="SCISSOR operator", commentdefault="in Ha", - text=""" -LDA/GGA are known to underestimate the band-gap by up to 100%. In order -to get the optical spectrum and make a realistic comparison with experiments -one needs to correct for this. This can be achieved in two ways. - + text=r""" +This parameter provides a fixed shift to all the conduction bands. As +LDA/GGA are known to underestimate the band-gap by a significant amount in +some cases, in order to obtain a reasonable optical spectrum and make a realistic +comparison with experiments one needs to correct for this. The scissors shift is normally chosen to be the difference between the experimental and -theoretical band-gap and is used to shift the conduction bands only. Another -way in which you do not have to rely on experimental data is to determine the -self energy using the [[lesson:gw1|GW approach]]. -In this case the opening of the gap due to the GW correction can be used as scissor shift. +theoretical band-gap, and simply shifts the conduction bands. Alternatively, one may +determine the self energy using the [[tutorial:gw1|GW approach]], in which case +the opening of the gap due to the GW correction can be used as the scissor shift. """, ), @@ -172,8 +221,10 @@ dimensions="scalar", defaultval="1.d-3 Ha", mnemonics="TOLERANCE", - text=""" -When energy denominators are smaller than **tolerance** , the term is discarded from the sum. + text=r""" +This parameter sets a scale for discarding small energy denominators. +When energy denominators are smaller than **tolerance**, the term is discarded from the sum. +See also [[optic:broadening]]. """, ), @@ -185,13 +236,11 @@ dimensions="scalar", mnemonics="WaveFunction K FILE", commentdefault="no default", - text=""" -Specify the filename that has been produced by the preparatory Abinit run. -This file must contain the matrix elements of the d/dk operator along -direction X. It must not contain the first-order wavefunctions and may be -generated using [[prtwf]] 3. -You should make sure that the number of bands, of spin channels and of -k-points are the same in all the files. + text=r""" +This parameter specifies the name of the ground state wavefunction file, which +should have been produced in a preparatory Abinit run. It should include both +the valence and conduction states to be used in the optic calculation +(see [[help:optic]]). """, ), diff --git a/abipy/abio/abivars.py b/abipy/abio/abivars.py index 3f2b51014..86ccf82aa 100644 --- a/abipy/abio/abivars.py +++ b/abipy/abio/abivars.py @@ -1,7 +1,4 @@ """This module contains lookup table with the name of the ABINIT variables.""" -from __future__ import division, print_function, unicode_literals, absolute_import - -import json import os import warnings import numpy as np @@ -22,6 +19,7 @@ "AbinitInputParser", ] + def is_anaddb_var(varname): """True if varname is a valid Anaddb variable.""" return varname in get_codevars()["anaddb"] @@ -40,12 +38,13 @@ def is_abivar(varname): ABI_UNIT_NAMES = { s.lower() for s in ( - "au", + "au", "nm", "Angstr", "Angstrom", "Angstroms", "Bohr", "Bohrs", "eV", "Ha", "Hartree", "Hartrees", "K", "Ry", "Rydberg", "Rydbergs", "T", "Tesla",) } + def is_abiunit(s): """ True if string is one of the units supported by the ABINIT parser @@ -220,7 +219,7 @@ def to_string(self, post=None, mode="text", verbose=0): if mode == "html": vname = var_database[k].html_link(label=vname) app("%s %s" % (vname, str(self[k]))) - return "\n".join(lines) if mode=="text" else "\n".join(lines).replace("\n", "
") + return "\n".join(lines) if mode == "text" else "\n".join(lines).replace("\n", "
") def _repr_html_(self): """Integration with jupyter_ notebooks.""" @@ -244,7 +243,7 @@ def from_string(cls, string): return cls(filename) def __init__(self, filepath): - super(AbinitInputFile, self).__init__(filepath) + super().__init__(filepath) with open(filepath, "rt") as fh: self.string = fh.read() @@ -430,7 +429,7 @@ def parse(self, s): varpos.append(len(tokens)) - # Build dict {varname --> value_string} + # Build dict {varname --> value_string} dvars = {} for i, pos in enumerate(varpos[:-1]): varname = tokens[pos] @@ -454,7 +453,7 @@ def parse(self, s): if udtset is not None: raise NotImplementedError("udtset is not supported") - # Build list of datasets. + # Build list of datasets. datasets = [Dataset() for i in range(ndtset)] # Treat all variables without a dataset index @@ -485,7 +484,7 @@ def parse(self, s): vname = k[:-1] start = str2array(dvars.pop(k)) - # Handle ecut+ or ecut* + # Handle ecut+ or ecut* incr = dvars.pop(vname + "+", None) if incr is not None: incr = str2array(incr) @@ -500,12 +499,12 @@ def parse(self, s): dt[vname] = start.copy() start *= mult - # Consistency check - # 1) dvars should be empty + # Consistency check + # 1) dvars should be empty if dvars: raise ValueError("Don't know how handle variables in:\n%s" % pformat(dvars), indent=4) - # 2) Keys in datasets should be valid Abinit input variables. + # 2) Keys in datasets should be valid Abinit input variables. wrong = [] for i, dt in enumerate(datasets): wlist = [k for k in dt if not is_abivar(k)] @@ -514,7 +513,7 @@ def parse(self, s): if wrong: raise ValueError("Found variables that are not registered in the abipy database:\n%s" % pformat(wrong, indent=4)) - # 3) We don't support spg builder: dataset.structure will fail or, even worse, + # 3) We don't support spg builder: dataset.structure will fail or, even worse, # spglib will segfault so it's better to raise here! for dt in datasets: if "spgroup" in dt or "nobj" in dt: @@ -533,11 +532,11 @@ def eval_abinit_operators(tokens): Receive a list of strings, find the occurences of operators supported in the input file (e.g. sqrt), evalute the expression and return new list of strings. - .. note: + .. note: - This function is not recursive hence expr like sqrt(1/2) are not supported + This function is not recursive hence expr like sqrt(1/2) are not supported """ - import math + import math # noqa: F401 import re re_sqrt = re.compile(r"[+|-]?sqrt\((.+)\)") @@ -547,7 +546,7 @@ def eval_abinit_operators(tokens): if m: tok = tok.replace("sqrt", "math.sqrt") tok = str(eval(tok)) - if "/" in tok: # Note true_division from __future__ + if "/" in tok: tok = str(eval(tok)) values.append(tok) return values diff --git a/abipy/abio/abivars_db.py b/abipy/abio/abivars_db.py index 4bef55071..a12ff942d 100644 --- a/abipy/abio/abivars_db.py +++ b/abipy/abio/abivars_db.py @@ -1,14 +1,8 @@ """Database with the names of the input variables used in Abinit and in other main programs.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys -import os from collections import OrderedDict -# Unit names. -# Operators. -from abipy.abio.abivar_database.variables import ABI_UNITS, ABI_OPS ############## # Public API # @@ -21,9 +15,10 @@ def get_abinit_variables(): return get_codevars()["abinit"] -def docvar(varname): +def docvar(varname, executable="abinit"): """Return the `Variable` object associated to this name.""" - return get_abinit_variables()[varname] + from abipy.abio.abivar_database.variables import get_codevars + return get_codevars()[executable][varname] def abinit_help(varname, info=True, stream=sys.stdout): diff --git a/abipy/abio/decorators.py b/abipy/abio/decorators.py index ab2e8bab9..0a3ed5856 100644 --- a/abipy/abio/decorators.py +++ b/abipy/abio/decorators.py @@ -1,18 +1,10 @@ # coding: utf-8 """Decorators for AbinitInput or MultiDataset objects.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import six import abc import pymatgen.io.abinit.abiobjects as aobj -from monty.inspect import initializer from monty.json import MSONable -try: - from pymatgen.util.serialization import pmg_serialize -except ImportError: - from pymatgen.serializers.json_coders import pmg_serialize - +from pymatgen.util.serialization import pmg_serialize from abipy.flowtk.abiobjects import LdauParams, LexxParams from .inputs import AbinitInput, MultiDataset @@ -24,7 +16,7 @@ class InputDecoratorError(Exception): """Error class raised by :class:`AbinitInputDecorator`.""" -class AbinitInputDecorator(six.with_metaclass(abc.ABCMeta, MSONable)): +class AbinitInputDecorator(MSONable, metaclass=abc.ABCMeta): """ An `AbinitInputDecorator` adds new options to an existing :class:`AbinitInput` or an existing :class:`MultiDataset` without altering its structure. This is an abstract Base class. @@ -243,13 +235,13 @@ def _decorate(self, inp, deepcopy=True): if symbol not in self.symbols_lexx: continue lexx_params.lexx_for_symbol(symbol, l=self.symbols_lexx[symbol]) - # Context : the value of the variable useexexch is 1. + # Context: the value of the variable useexexch is 1. # The value of the input variable ixc is 7, while it must be # equal to one of the following: 11 23 # Action : you should change the input variables ixc or useexexch. inp.set_vars(lexx_params.to_abivars()) dt_ixc = inp.get("ixc") - if dt_ixc is None or ixc not in [11, 23]: inp.set_vars(ixc=11) + if dt_ixc is None or dt_ixc not in [11, 23]: inp.set_vars(ixc=11) if self.exchmix is not None: inp.set_vars(exchmix=self.exchmix) return inp diff --git a/abipy/abio/factories.py b/abipy/abio/factories.py index 1575eb4bd..bb612e0b5 100644 --- a/abipy/abio/factories.py +++ b/abipy/abio/factories.py @@ -1,27 +1,17 @@ # coding: utf-8 """Factory functions for Abinit input files """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import pymatgen.io.abinit.abiobjects as aobj +import abipy.abio.input_tags as atags from enum import Enum from collections import namedtuple from monty.collections import AttrDict from monty.string import is_string -from monty.json import jsanitize, MontyDecoder -try: - from pymatgen.util.serialization import pmg_serialize -except ImportError: - from pymatgen.serializers.json_coders import pmg_serialize -from abipy.flowtk import PseudoTable +from monty.json import jsanitize, MontyDecoder, MSONable +from pymatgen.util.serialization import pmg_serialize from abipy.core.structure import Structure from abipy.abio.inputs import AbinitInput, MultiDataset -from abipy.abio.input_tags import * -from monty.json import MSONable - -import logging -logger = logging.getLogger(__file__) __all__ = [ @@ -37,32 +27,11 @@ "piezo_elastic_inputs_from_gsinput", "scf_piezo_elastic_inputs", "scf_for_phonons", - "dte_from_gsinput" + "dte_from_gsinput", + "dfpt_from_gsinput", ] -# TODO: To be discussed: -# 1) extra_abivars is more similar to a hack. The factory functions are designed for -# HPC hence we cannot allow the user to inject something we cannot control easily -# Shall we remove it? -# 2) scf_nband and nscf_band should be computed from the pseudos, the structure -# and some approximation for the band dispersion. -# SCF fails if nband is too small or has problems if we don't have enough partially -# occupied states in metals (can write EventHandler but it would be nice if we could -# fix this problem in advance. -# 3) How do we handle options related to parallelism e.g. paral_kgb? -# 4) The API of the factory functions must be simple enough so that we can easily generate -# flows but, on the other hand, we would like to decorate the input with extra features -# e.g. we would like to do a LDA+U band structure, a LDA+U relaxation etc. -# For a possible solution based on factory functions see: -# -# http://python-3-patterns-idioms-test.readthedocs.org/en/latest/Factory.html -# -# for decorator pattern see: -# -# http://www.tutorialspoint.com/design_pattern/decorator_pattern.htm - - # Name of the (default) tolerance used by the runlevels. _runl2tolname = { "scf": 'tolvrs', @@ -84,12 +53,12 @@ del T -# Default values used if user do not specify them -# TODO: Design an object similar to DictVaspInputSet +# Default values used if user does not specify them _DEFAULTS = dict( kppa=1000, ) + class ShiftMode(Enum): """ Class defining the mode to be used for the shifts. @@ -116,7 +85,7 @@ def from_object(cls, obj): elif is_string(obj): return cls(obj[0].upper()) else: - raise TypeError('The object provided is not handled: type' % type(obj)) + raise TypeError('The object provided is not handled: type %s' % type(obj)) def _stopping_criterion(runlevel, accuracy): @@ -137,7 +106,6 @@ def _find_ecut_pawecutdg(ecut, pawecutdg, pseudos, accuracy): else: raise AbinitInput.Error("ecut is None but pseudos do not provide hints for ecut") - # TODO: This should be the new API. if pawecutdg is None and any(p.ispaw for p in pseudos): if has_hints: pawecutdg = max(p.hint_for_accuracy(accuracy).pawecutdg for p in pseudos) @@ -166,13 +134,13 @@ def _find_scf_nband(structure, pseudos, electrons, spinat=None): # if the change is not propagated e.g. phonons in metals. if smearing: # metallic occupation - nband = max(np.ceil(nband*1.2), nband+10) + nband = max(np.ceil(nband * 1.2), nband + 10) else: - nband = max(np.ceil(nband*1.1), nband+4) + nband = max(np.ceil(nband * 1.1), nband + 4) # Increase number of bands based on the starting magnetization if nsppol == 2 and spinat is not None: - nband += np.ceil(max(np.sum(spinat, axis=0))/2.) + nband += np.ceil(max(np.sum(spinat, axis=0)) / 2.) # Force even nband (easier to divide among procs, mandatory if nspinor == 2) nband += nband % 2 @@ -206,7 +174,7 @@ def _get_shifts(shift_mode, structure): else: return ((0, 0, 0)) else: - raise ValueError("shift_mode `%s `not valid." % str(shift_mode)) + raise ValueError("invalid shift_mode: `%s`" % str(shift_mode)) def gs_input(structure, pseudos, @@ -644,7 +612,6 @@ def g0w0_convergence_inputs(structure, pseudos, kppa, nscf_nband, ecuteps, ecuts if nksmall is not None: # if nksmall add bandstructure and dos calculations as well - logger.info('added band structure calculation') bands_ksampling = aobj.KSampling.path_from_structure(ndivsm=nksmall, structure=structure) dos_ksampling = aobj.KSampling.automatic_density(structure=structure, kppa=2000) nscf_multi[0].set_vars(bands_ksampling.to_abivars()) @@ -874,7 +841,7 @@ def phonons_from_gsinput(gs_inp, ph_ngqpt=None, qpoints=None, with_ddk=True, wit ph_ngqpt: a list of three integers representing the gamma centered q-point grid used for the calculation. If None and qpoint==None the ngkpt value present in the gs_input will be used. Incompatible with qpoints. - qpoints: a list of of coordinatesq points in reduced coordinates for which the phonon perturbations will + qpoints: a list of coordinates of q points in reduced coordinates for which the phonon perturbations will be calculated. Incompatible with ph_ngqpt. with_ddk: If True, if Gamma is included in the list of qpoints it will add inputs for the calculations of the DDK. @@ -883,13 +850,13 @@ def phonons_from_gsinput(gs_inp, ph_ngqpt=None, qpoints=None, with_ddk=True, wit with_bec: If Truem if Gamma is included in the list of qpoints the DDE will be calculated in the same input as the phonons. This will allow to determine the BECs. Automatically sets with_ddk=True and with_dde=False. - ph_tol: a dictionary with a single key defining the type of tolarence used for the phonon calculations and + ph_tol: a dictionary with a single key defining the type of tolerance used for the phonon calculations and its value. Default: {"tolvrs": 1.0e-10}. - ddk_tol: a dictionary with a single key defining the type of tolarence used for the DDK calculations and + ddk_tol: a dictionary with a single key defining the type of tolerance used for the DDK calculations and its value. Default: {"tolwfr": 1.0e-22}. - dde_tol: a dictionary with a single key defining the type of tolarence used for the DDE calculations and + dde_tol: a dictionary with a single key defining the type of tolerance used for the DDE calculations and its value. Default: {"tolvrs": 1.0e-10}. - wfq_tol: a dictionary with a single key defining the type of tolarence used for the NSCF calculations of + wfq_tol: a dictionary with a single key defining the type of tolerance used for the NSCF calculations of the WFQ and its value. Default {"tolwfr": 1.0e-22}. qpoints_to_skip: a list of coordinates of q points in reduced coordinates that will be skipped. Useful when calculating multiple grids for the same system to avoid duplicate calculations. @@ -955,7 +922,7 @@ def phonons_from_gsinput(gs_inp, ph_ngqpt=None, qpoints=None, with_ddk=True, wit for q, nscf_inp in zip(nscf_qpt, multi_nscf): nscf_inp.set_vars(qpt=q) - multi_nscf.add_tags(NSCF) + multi_nscf.add_tags(atags.NSCF) multi.extend(multi_nscf) @@ -965,27 +932,28 @@ def phonons_from_gsinput(gs_inp, ph_ngqpt=None, qpoints=None, with_ddk=True, wit if np.allclose(qpt, 0): if with_ddk: multi_ddk = gs_inp.make_ddk_inputs(tolerance=ddk_tol) - multi_ddk.add_tags(DDK) + multi_ddk.add_tags(atags.DDK) multi.extend(multi_ddk) if with_dde: - multi_dde = gs_inp.make_dde_inputs(dde_tol) - multi_dde.add_tags(DDE) + multi_dde = gs_inp.make_dde_inputs(dde_tol, manager=manager) + multi_dde.add_tags(atags.DDE) multi.extend(multi_dde) elif with_bec: - multi_bec = gs_inp.make_bec_inputs(ph_tol) - multi_bec.add_tags(BEC) + multi_bec = gs_inp.make_bec_inputs(ph_tol, manager=manager) + multi_bec.add_tags(atags.BEC) multi.extend(multi_bec) continue multi_ph_q = gs_inp.make_ph_inputs_qpoint(qpt, ph_tol) - multi_ph_q.add_tags(PH_Q_PERT) + multi_ph_q.add_tags(atags.PH_Q_PERT) multi.extend(multi_ph_q) multi = MultiDataset.from_inputs(multi) - multi.add_tags(PHONON) + multi.add_tags(atags.PHONON) return multi + def piezo_elastic_inputs_from_gsinput(gs_inp, ddk_tol=None, rf_tol=None, ddk_split=False, rf_split=False, manager=None): """ @@ -1028,7 +996,7 @@ def piezo_elastic_inputs_from_gsinput(gs_inp, ddk_tol=None, rf_tol=None, ddk_spl ddk_inp.set_vars(nband=ddk_inp['nband']+nbdbuf, nbdbuf=nbdbuf) multi = MultiDataset.from_inputs([ddk_inp]) - multi.add_tags(DDK) + multi.add_tags(atags.DDK) # Response Function input(s) if rf_split: @@ -1062,10 +1030,10 @@ def piezo_elastic_inputs_from_gsinput(gs_inp, ddk_tol=None, rf_tol=None, ddk_spl rf_inp.set_vars(nband=rf_inp['nband']+nbdbuf, nbdbuf=nbdbuf) multi_rf = MultiDataset.from_inputs([rf_inp]) - multi_rf.add_tags([DFPT, STRAIN]) + multi_rf.add_tags([atags.DFPT, atags.STRAIN]) for inp in multi_rf: if inp.get('rfphon', 0) == 1: - inp.add_tags(PHONON) + inp.add_tags(atags.PHONON) multi.extend(multi_rf) @@ -1272,7 +1240,7 @@ def scf_for_phonons(structure, pseudos, kppa=None, ecut=None, pawecutdg=None, nb return abiinput -def dte_from_gsinput(gs_inp, use_phonons=True, ph_tol=None, ddk_tol=None, dde_tol=None, dte_tol=None, +def dte_from_gsinput(gs_inp, use_phonons=True, ph_tol=None, ddk_tol=None, dde_tol=None, skip_dte_permutations=False, manager=None): """ Returns a list of inputs in the form of a |MultiDataset| to perform calculations of non-linear properties, based on @@ -1284,15 +1252,15 @@ def dte_from_gsinput(gs_inp, use_phonons=True, ph_tol=None, ddk_tol=None, dde_to Args: gs_inp: an |AbinitInput| representing a ground state calculation, likely the SCF performed to get the WFK. use_phonons: determine wether the phonon perturbations at gamma should be included or not - ph_tol: a dictionary with a single key defining the type of tolarence used for the phonon calculations and + ph_tol: a dictionary with a single key defining the type of tolerance used for the phonon calculations and its value. Default: {"tolvrs": 1.0e-22}. - ddk_tol: a dictionary with a single key defining the type of tolarence used for the DDK calculations and + ddk_tol: a dictionary with a single key defining the type of tolerance used for the DDK calculations and its value. Default: {"tolwfr": 1.0e-22}. - dde_tol: a dictionary with a single key defining the type of tolarence used for the DDE calculations and + dde_tol: a dictionary with a single key defining the type of tolerance used for the DDE calculations and its value. Default: {"tolvrs": 1.0e-22}. - dte_tol: a dictionary with a single key defining the type of tolarence used for the DTE calculations and - its value. Default: {"tolwfr": 1.0e-20}. - skip_dte_permutations: + skip_dte_permutations: Since the current version of abinit always performs all the permutations of the + perturbations, even if only one is asked, if True avoids the creation of inputs that will produce + duplicated outputs. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. """ gs_inp = gs_inp.deepcopy() @@ -1307,25 +1275,22 @@ def dte_from_gsinput(gs_inp, use_phonons=True, ph_tol=None, ddk_tol=None, dde_to if dde_tol is None: dde_tol = {"tolvrs": 1.0e-22} - if dte_tol is None: - dte_tol = {"tolwfr": 1.0e-20} - multi = [] multi_ddk = gs_inp.make_ddk_inputs(tolerance=ddk_tol) - multi_ddk.add_tags(DDK) + multi_ddk.add_tags(atags.DDK) multi.extend(multi_ddk) multi_dde = gs_inp.make_dde_inputs(dde_tol, use_symmetries=False, manager=manager) - multi_dde.add_tags(DDE) + multi_dde.add_tags(atags.DDE) multi.extend(multi_dde) if use_phonons: multi_ph = gs_inp.make_ph_inputs_qpoint([0,0,0], ph_tol, manager=manager) - multi_ph.add_tags(PH_Q_PERT) + multi_ph.add_tags(atags.PH_Q_PERT) multi.extend(multi_ph) # non-linear calculations do not accept more bands than those in the valence. Set the correct values. - # Do this as last, so not to intrfere with the the generation of the other steps. + # Do this as last, so not to interfere with the the generation of the other steps. nval = gs_inp.structure.num_valence_electrons(gs_inp.pseudos) nval -= gs_inp['charge'] nband = int(round(nval / 2)) @@ -1333,11 +1298,116 @@ def dte_from_gsinput(gs_inp, use_phonons=True, ph_tol=None, ddk_tol=None, dde_to gs_inp.pop('nbdbuf', None) multi_dte = gs_inp.make_dte_inputs(phonon_pert=use_phonons, skip_permutations=skip_dte_permutations, manager=manager) - multi_dte.add_tags(DTE) + multi_dte.add_tags(atags.DTE) multi.extend(multi_dte) multi = MultiDataset.from_inputs(multi) - multi.add_tags(DFPT) + multi.add_tags(atags.DFPT) + + return multi + + +def dfpt_from_gsinput(gs_inp, ph_ngqpt=None, qpoints=None, do_ddk=True, do_dde=True, do_strain=True, + do_dte=False, ph_tol=None, ddk_tol=None, dde_tol=None, wfq_tol=None, strain_tol=None, + skip_dte_permutations=False, manager=None): + """ + Returns a list of inputs in the form of a MultiDataset to perform a set of calculations based on DFPT including + phonons, elastic and non-linear properties. Requires a ground state |AbinitInput| as a starting point. + + It will determine if WFQ files should be calculated for some q points and add the NSCF AbinitInputs to the set. + The original input is included and the inputs have the following tags, according to their function: + "scf", "ddk", "dde", "nscf", "ph_q_pert", "strain", "dte", "dfpt". + + N.B. Currently (version 8.8.3) anaddb does not support a DDB containing both 2nd order derivatives with qpoints + different from gamma AND 3rd oreder derivatives. The calculations could be run, but the global DDB will not + be directly usable as is. + + Args: + gs_inp: an |AbinitInput| representing a ground state calculation, likely the SCF performed to get the WFK. + ph_ngqpt: a list of three integers representing the gamma centered q-point grid used for the calculation. + If None and qpoint==None the ngkpt value present in the gs_input will be used. + Incompatible with qpoints. + qpoints: a list of coordinates of q points in reduced coordinates for which the phonon perturbations will + be calculated. Incompatible with ph_ngqpt. + do_ddk: If True, if Gamma is included in the list of qpoints it will add inputs for the calculations of + the DDK. + do_dde: If True, if Gamma is included in the list of qpoints it will add inputs for the calculations of + the DDE. Automatically sets with_ddk=True. + do_strain: If True inputs for the strain perturbations will be included. + do_dte: If True inputs for the non-linear perturbations will be included. The phonon non-linear perturbations + will be included only if a phonon calculation at gamma is present. The caller is responsible for + adding it. Automatically sets with_dde=True. + ph_tol: a dictionary with a single key defining the type of tolerance used for the phonon calculations and + its value. Default: {"tolvrs": 1.0e-10}. + ddk_tol: a dictionary with a single key defining the type of tolerance used for the DDK calculations and + its value. Default: {"tolwfr": 1.0e-22}. + dde_tol: a dictionary with a single key defining the type of tolerance used for the DDE calculations and + its value. Default: {"tolvrs": 1.0e-10}. + wfq_tol: a dictionary with a single key defining the type of tolerance used for the NSCF calculations of + the WFQ and its value. Default {"tolwfr": 1.0e-22}. + strain_tol: dictionary with a single key defining the type of tolerance used for the strain calculations of + and its value. Default {"tolvrs": 1.0e-12}. + skip_dte_permutations: Since the current version of abinit always performs all the permutations of the + perturbations, even if only one is asked, if True avoids the creation of inputs that will produce + duplicated outputs. + manager: |TaskManager| of the task. If None, the manager is initialized from the config file. + """ + + if ph_tol is None: + ph_tol = {"tolvrs": 1.0e-10} + if ddk_tol is None: + ddk_tol = {"tolwfr": 1.0e-22} + if dde_tol is None: + dde_tol = {"tolvrs": 1.0e-10} + if wfq_tol is None: + wfq_tol = {"tolwfr": 1.0e-22} + if strain_tol is None: + strain_tol = {"tolvrs": 1.0e-12} + + if do_dde: + do_ddk = True + + if do_dte: + do_dde = True + + multi = MultiDataset.from_inputs([gs_inp]) + multi[0].add_tags(atags.SCF) + + do_phonons = ph_ngqpt is not None or qpoints is not None + has_gamma = False + if do_phonons: + multi.extend(phonons_from_gsinput(gs_inp, ph_ngqpt=ph_ngqpt, qpoints=qpoints, with_ddk=False, with_dde=False, + with_bec=False, ph_tol=ph_tol, ddk_tol=ddk_tol, dde_tol=dde_tol, + wfq_tol=wfq_tol, qpoints_to_skip=None, manager=manager)) + has_gamma = ph_ngqpt is not None or any(np.allclose(q, [0, 0, 0]) for q in qpoints) + + if do_ddk: + multi_ddk = gs_inp.make_ddk_inputs(tolerance=ddk_tol) + multi_ddk.add_tags(atags.DDK) + multi.extend(multi_ddk) + if do_dde: + multi_dde = gs_inp.make_dde_inputs(dde_tol, use_symmetries=not do_dte, manager=manager) + multi_dde.add_tags(atags.DDE) + multi.extend(multi_dde) + + if do_strain: + multi_strain = gs_inp.make_strain_perts_inputs(tolerance=strain_tol, manager=manager, phonon_pert=False, + kptopt=2) + multi_strain.add_tags([atags.DFPT, atags.STRAIN]) + multi.extend(multi_strain) + + if do_dte: + # non-linear calculations do not accept more bands than those in the valence. Set the correct values. + nval = gs_inp.structure.num_valence_electrons(gs_inp.pseudos) + nval -= gs_inp['charge'] + nband = int(round(nval / 2)) + gs_inp_copy = gs_inp.deepcopy() + gs_inp_copy.set_vars(nband=nband) + gs_inp_copy.pop('nbdbuf', None) + multi_dte = gs_inp_copy.make_dte_inputs(phonon_pert=do_phonons and has_gamma, + skip_permutations=skip_dte_permutations, manager=manager) + multi_dte.add_tags([atags.DTE, atags.DFPT]) + multi.extend(multi_dte) return multi diff --git a/abipy/abio/input_tags.py b/abipy/abio/input_tags.py index b20de4cbc..f88f8e81e 100644 --- a/abipy/abio/input_tags.py +++ b/abipy/abio/input_tags.py @@ -1,5 +1,4 @@ """This module contains a list of default tags for the AbinitInput object""" -from __future__ import print_function, division, unicode_literals, absolute_import GROUND_STATE = "ground_state" SCF = "scf" @@ -9,7 +8,7 @@ NSCF = "nscf" BANDS = "bands" DOS = "dos" -MOLECULAR_DYNACMICS="molecular_dynamics" +MOLECULAR_DYNAMICS = "molecular_dynamics" DFPT = "dfpt" PHONON = "phonon" DDK = "ddk" diff --git a/abipy/abio/inputs.py b/abipy/abio/inputs.py index 179fc1de2..15059592d 100644 --- a/abipy/abio/inputs.py +++ b/abipy/abio/inputs.py @@ -2,40 +2,34 @@ This module defines objects to facilitate the creation of ABINIT input files. The syntax is similar to the one used in ABINIT with small differences. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import collections -import warnings import itertools import copy import time -import six import abc import json import numpy as np +import abipy.abio.input_tags as atags -from collections import OrderedDict, MutableMapping +from collections import OrderedDict +from collections.abc import MutableMapping from monty.collections import dict2namedtuple from monty.string import is_string, list_strings from monty.json import MontyDecoder, MSONable from pymatgen.core.units import Energy -try: - from pymatgen.util.serialization import pmg_serialize -except ImportError: - from pymatgen.serializers.json_coders import pmg_serialize +from pymatgen.util.serialization import pmg_serialize +from pymatgen.symmetry.bandstructure import HighSymmKpath +from abipy.tools.numtools import is_diagonal from abipy.core.structure import Structure from abipy.core.mixins import Has_Structure from abipy.core.kpoints import has_timrev_from_kptopt from abipy.abio.variable import InputVariable from abipy.abio.abivars import is_abivar, is_anaddb_var from abipy.abio.abivars_db import get_abinit_variables -from abipy.abio.input_tags import * from abipy.flowtk import PseudoTable, Pseudo, AbinitTask, AnaddbTask, ParalHintsParser, NetcdfReader from abipy.flowtk.abiinspect import yaml_read_irred_perts from abipy.flowtk import abiobjects as aobj -from pymatgen.symmetry.bandstructure import HighSymmKpath -from pymatgen.io.abinit.abiobjects import KSampling import logging logger = logging.getLogger(__file__) @@ -109,7 +103,7 @@ # raise ValueError("Don't know how to reallocate variable %s" % str(name)) -class AbstractInput(six.with_metaclass(abc.ABCMeta, MutableMapping, object)): +class AbstractInput(MutableMapping, metaclass=abc.ABCMeta): """ Abstract class defining the methods that must be implemented by Input objects. """ @@ -266,10 +260,10 @@ def add_abiobjects(self, *abi_objects): the corresponding variables to the input. """ d = {} - for aobj in abi_objects: - if not hasattr(aobj, "to_abivars"): - raise TypeError("type %s: %s does not have `to_abivars` method" % (type(aobj), repr(aobj))) - d.update(self.set_vars(aobj.to_abivars())) + for obj in abi_objects: + if not hasattr(obj, "to_abivars"): + raise TypeError("type %s: %s does not have `to_abivars` method" % (type(obj), repr(obj))) + d.update(self.set_vars(obj.to_abivars())) return d @abc.abstractmethod @@ -299,7 +293,7 @@ class AbinitInputError(Exception): """Base error class for exceptions raised by ``AbinitInput``.""" -class AbinitInput(six.with_metaclass(abc.ABCMeta, AbiAbstractInput, MSONable, Has_Structure, object)): +class AbinitInput(AbiAbstractInput, MSONable, Has_Structure): """ This object stores the ABINIT variables for a single dataset. @@ -372,12 +366,8 @@ def variable_checksum(self): import hashlib sha1 = hashlib.sha1() - try: - tos = unicode - except NameError: - # Py3K - def tos(s): - return str(s).encode(encoding="utf-8") + def tos(s): + return str(s).encode(encoding="utf-8") # Add key, values to sha1 # (not sure this is code is portable: roundoff errors and conversion to string) @@ -440,7 +430,7 @@ def __setitem__(self, key, value): logger.info("Replacing previously set tolerance variable: {0}." .format(self.remove_vars(_TOLVARS_SCF, strict=False))) - return super(AbinitInput, self).__setitem__(key, value) + return super().__setitem__(key, value) def _check_varname(self, key): if key in GEOVARS: @@ -448,11 +438,14 @@ def _check_varname(self, key): "Use Structure objects to prepare the input file.") if self.spell_check and not is_abivar(key): - raise self.Error("%s is not a valid ABINIT variable.\n" % key + - "If the name is correct, try to remove ~/.abinit/abipy/abinit_vars.pickle\n" - "and rerun the code. If the problems persists, contact the abipy developers\n" - "or use input.set_spell_check(False)\n" - "or add the variable to ~abipy/data/variables/abinit_vars.json\n") + raise self.Error(""" +Cannot find variable `%s` in internal database. +If you think this is not a typo, use: + + input.set_spell_check(False) + +to disable spell checking. Perhaps the internal database is not in synch +with the Abinit version you are using. Please contact the AbiPy developers.""" % key) #def __eq__(self, other) #def __ne__(self, other) @@ -473,50 +466,50 @@ def runlevel(self): runlevel = set() if optdriver == 0: - runlevel.add(GROUND_STATE) + runlevel.add(atags.GROUND_STATE) iscf = self.get("iscf", 17 if self.pseudos[0].ispaw else 7) ionmov = self.get("ionmov", 0) optcell = self.get("optcell", 0) if ionmov == 0: if iscf < -1: - runlevel.add(NSCF) + runlevel.add(atags.NSCF) if self.get("kptbounds") is not None: - runlevel.add(BANDS) + runlevel.add(atags.BANDS) else: - runlevel.add(SCF) + runlevel.add(atags.SCF) elif ionmov in (2, 3, 4, 5, 7, 10, 11, 20): - runlevel.add(RELAX) + runlevel.add(atags.RELAX) if optcell == 0: - runlevel.add(ION_RELAX) + runlevel.add(atags.ION_RELAX) else: - runlevel.add(IONCELL_RELAX) + runlevel.add(atags.IONCELL_RELAX) elif ionmov in [1, 6, 8, 9, 12, 13, 14, 23]: - runlevel.add(MOLECULAR_DYNACMICS) + runlevel.add(atags.MOLECULAR_DYNAMICS) elif optdriver == 1: - runlevel.add(DFPT) + runlevel.add(atags.DFPT) rfelfd = self.get("rfelfd") rfphon = self.get("rfphon") if self.get("rfddk") == 1 or rfelfd == 2: - runlevel.add(DDK) + runlevel.add(atags.DDK) elif rfelfd == 3: if rfphon == 1: - runlevel.add(BEC) + runlevel.add(atags.BEC) else: - runlevel.add(DDE) + runlevel.add(atags.DDE) elif rfphon == 1: - runlevel.add(PH_Q_PERT) + runlevel.add(atags.PH_Q_PERT) elif self.get("rfstrs ") > 0: - runlevel.add(STRAIN) + runlevel.add(atags.STRAIN) elif optdriver == 3: - runlevel.update([MANY_BODY, SCREENING]) + runlevel.update([atags.MANY_BODY, atags.SCREENING]) elif optdriver == 4: gwcalctyp = self.get("gwcalctyp") if int(gwcalctyp) > 100: - runlevel.add(HYBRID) + runlevel.add(atags.HYBRID) else: - runlevel.update([MANY_BODY, SIGMA]) + runlevel.update([atags.MANY_BODY, atags.SIGMA]) elif optdriver == 99: - runlevel.update([MANY_BODY, BSE]) + runlevel.update([atags.MANY_BODY, atags.BSE]) return runlevel @@ -561,7 +554,7 @@ def spell_check(self): def to_string(self, sortmode="section", post=None, with_mnemonics=False, mode="text", with_structure=True, with_pseudos=True, exclude=None, verbose=0): - """ + r""" String representation. Args: @@ -581,10 +574,12 @@ def to_string(self, sortmode="section", post=None, with_mnemonics=False, mode="t exclude: List of variable names that should be ignored. """ if mode == "html": - import cgi + import html + def escape(text): - return cgi.escape(text, quote=True) + return html.escape(text, quote=True) else: + def escape(text): return text @@ -598,7 +593,7 @@ def escape(text): if with_mnemonics: mnemonics = with_mnemonics exclude = set(exclude) if exclude is not None else set() - # If spell checking is deactivates, we cannot use mmemonics or sormode == "section" + # If spell checking is deactivated, we cannot use mmemonics or sormode == "section" if not self.spell_check: mnemonics = False sortmode = "a" @@ -618,7 +613,7 @@ def escape(text): for name, value in items: if mnemonics and value is not None: - app("# <" + var_database[name].mnemonics + ">") + app("#### <" + var_database[name].mnemonics + ">") # Build variable, convert to string and append it vname = name + post @@ -630,16 +625,16 @@ def escape(text): # Get dict mapping section_name --> list of variable names belonging to the section. keys = [k for (k, v) in self.items() if k not in exclude and v is not None] sec2names = var_database.group_by_varset(keys) - w = 92 + w = 46 for sec, names in sec2names.items(): app(w * "#") - app("#" + ("SECTION: %s" % sec).center(w - 1)) + app("####" + ("SECTION: %s" % sec).center(w - 1)) app(w * "#") for name in names: value = self[name] if mnemonics and value is not None: - app(escape("# <" + var_database[name].mnemonics + ">")) + app(escape("#### <" + var_database[name].mnemonics + ">")) # Build variable, convert to string and append it vname = name + post @@ -649,11 +644,11 @@ def escape(text): if with_structure: app(w * "#") - app("#" + ("STRUCTURE").center(w - 1)) + app("####" + ("STRUCTURE").center(w - 1)) app(w * "#") for name, value in self.structure.to_abivars().items(): if mnemonics and value is not None: - app(escape("# <" + var_database[name].mnemonics + ">")) + app(escape("#### <" + var_database[name].mnemonics + ">")) vname = name + post if mode == "html": vname = var_database[name].html_link(label=vname) app(str(InputVariable(vname, value))) @@ -673,6 +668,7 @@ def escape(text): s += escape("\n#".join(ppinfo)) if mode == "html": s = s.replace("\n", "
") + return s def _repr_html_(self): @@ -718,7 +714,7 @@ def set_kmesh(self, ngkpt, shiftk, kptopt=1): shiftk: List of shifts. kptopt: Option for the generation of the mesh. """ - shiftk = np.reshape(shiftk, (-1,3)) + shiftk = np.reshape(shiftk, (-1, 3)) return self.set_vars(ngkpt=ngkpt, kptopt=kptopt, nshiftk=len(shiftk), shiftk=shiftk) def set_gamma_sampling(self): @@ -737,6 +733,29 @@ def set_autokmesh(self, nksmall, kptopt=1): return self.set_vars(ngkpt=self.structure.calc_ngkpt(nksmall), kptopt=kptopt, nshiftk=len(shiftk), shiftk=shiftk) + def get_ngkpt_shiftk(self): + """ + Return info on the k-point sampling from the input file, + more specifically a tuple with nkgpt and shift. + ngkpt is set to None if the BZ sampling cannot be described in terms of + three divisions + one shift. + """ + # ngkpt and kptrlatt are mutually exclusive. + nshiftk = self.get("nshiftk", 1) + shiftk = np.reshape(self.get("shiftk", [0.5, 0.5, 0.5]), (-1, 3))[:nshiftk, :] + + kptrlatt = self.get("kptrlatt", None) + if kptrlatt is not None: + kptrlatt = np.reshape(kptrlatt, (3, 3)) + # Check whether is diagonal with one shift. + ngkpt = None + if nshiftk == 1 and is_diagonal(kptrlatt): + ngkpt = np.diag(kptrlatt) + else: + ngkpt = np.array(self.get("ngkpt")) + + return ngkpt, shiftk + def set_phdos_qmesh(self, nqsmall, method="tetra", ph_qshift=(0, 0, 0)): """ Set the variables (ngkpt, shift, kptopt) for the computation of the Phonon DOS in Abinit. @@ -775,10 +794,10 @@ def set_kpath(self, ndivsm, kptbounds=None, iscf=-2): If None, we use the default high-symmetry k-path defined in the pymatgen database. """ if kptbounds is None: kptbounds = self.structure.calc_kptbounds() - kptbounds = np.reshape(kptbounds, (-1,3)) + kptbounds = np.reshape(kptbounds, (-1, 3)) #self.pop_vars(["ngkpt", "shiftk"]) ?? - return self.set_vars(kptbounds=kptbounds, kptopt=-(len(kptbounds)-1), ndivsm=ndivsm, iscf=iscf) + return self.set_vars(kptbounds=kptbounds, kptopt=-(len(kptbounds) - 1), ndivsm=ndivsm, iscf=iscf) def set_qpath(self, ndivsm, qptbounds=None): """ @@ -965,7 +984,7 @@ def product(self, *items): varnames, values = items[:i], items[i:] if len(varnames) != len(values): raise self.Error("The number of variables must equal the number of lists\n" - "varnames: %s\nvalues %s" % (str(varnames), str(values))) + "varnames: %s\nvalues %s" % (str(varnames), str(values))) # TODO: group varnames and varvalues! #varnames = [t[0] for t in items] @@ -1094,8 +1113,8 @@ def new_with_structure(self, new_structure, scdims=None, verbose=1): raise NotImplementedError("kptrlatt in new_with_structure") #new["kptrlatt"] = (np.rint(np.array(new["kptrlatt"]) / iscale)).astype(int) else: - # Single k-point - pass + # Single k-point + pass # Add chkprim if not yet done. new.set_vars_ifnotin(chkprim=0) @@ -1132,10 +1151,10 @@ def pop_irdvars(self): #def pop_relax_vars(self): # """ - # Remove all the `ird*` variables present in self. + # Remove all the relax variables present in self. # Return dictionary with the variables that have been removed. # """ - # return scf_input.pop_vars(["ionmov", "optcell", "ntime", "dilatmx"]) + # return self.pop_vars(["ionmov", "optcell", "ntime", "dilatmx"]) @property def scf_tolvar(self): @@ -1153,9 +1172,117 @@ def scf_tolvar(self): return tolvar, value - def make_ph_inputs_qpoint(self, qpt, tolerance=None, manager=None): + def make_ebands_input(self, ndivsm=15, tolwfr=1e-20, nscf_nband=None): + """ + Generate an input file for band structure calculation from a GS-SCF input. + + Args: + ndivsm: Number of divisions used to sample the smallest segment of the k-path. + tolwfr: Tolerance on residuals for NSCF calculation + nscf_nband: Number of bands for NSCF calculation. +10 if None. + """ + nscf_input = self.deepcopy() + nscf_input.pop_vars(["ngkpt", "shiftk"]) + nscf_input.pop_tolerances() + + # Define k-path. + nscf_ksampling = aobj.KSampling.path_from_structure(ndivsm, self.structure) + nscf_nband = self["nband"] + 10 if nscf_nband is None else nscf_nband + + nscf_input.set_vars(nscf_ksampling.to_abivars()) + nscf_input.set_vars(iscf=-2, nband=nscf_nband, tolwfr=tolwfr) + #nscf_input.set_vars(_stopping_criterion("nscf", accuracy)) + + return nscf_input + + def make_edos_input(self, ngkpt, shiftk=(0, 0, 0), tolwfr=1e-20, nscf_nband=None): + """ + Generate an input file for electron DOS calculation from a GS-SCF input. + + Args: + ngkpt: Number of divisions for the k-mesh. + shiftk: List of shifts. + tolwfr: Tolerance on residuals for NSCF calculation + nscf_nband: Number of bands for NSCF calculation. +10 if None. + """ + dos_input = self.deepcopy() + dos_input.pop_tolerances() + nscf_nband = self["nband"] + 10 if nscf_nband is None else nscf_nband + dos_input.set_vars(iscf=-2, nband=nscf_nband, tolwfr=tolwfr) + dos_input.set_kmesh(ngkpt, shiftk) + + return dos_input + + def make_nscf_kptopt0_input(self, kpts, tolwfr=1e-20, iscf=-2): + """ + Build an input for NSCF calculation from a GS-SCF one. + Uses explicit list of k-points and kptopt 0 + + Args: + kpts: List of k-points in reduced coordinates. + tolwfr: Tolerance on residuals. + """ + nscf_input = self.deepcopy() + nscf_input.pop_vars(["ngkpt", "shiftk"]) + nscf_input.pop_tolerances() + kpts = np.reshape(kpts, (-1, 3)) + nscf_input.set_vars(tolwfr=tolwfr, kptopt=0, iscf=-2, nkpt=len(kpts), kpt=kpts) + return nscf_input + + def make_dfpt_effmass_input(self, kpts, effmass_bands_f90, tolwfr=1e-20, iscf=-2): + """ + Return |MultiDataset| with 2 inputs for the calculation of effective masses with DFPT + The first input in a standard NSCF run, the second input computes the effective masses. + + Args: + kpts: List of k-points in reduced coordinates where effective masses are wanted. + efmas_bands_f90: (nkpt, 2) array with band range for effmas computation. + WARNING: Assumes Fortran convention with indices starting from 1. + tolwfr: Tolerance on residuals. + """ + multi = MultiDataset.replicate_input(input=self, ndtset=3) + multi.pop_vars(["ngkpt", "shiftk", "iscf"]) + multi.pop_tolerances() + + kpts = np.reshape(kpts, (-1, 3)) + nkpt = len(kpts) + # NSCF calculation (requires DEN) + multi[0].set_vars(tolwfr=tolwfr, kptopt=0, iscf=-2, nkpt=nkpt, kpt=kpts, prtwf=1) + + # Response Function calculation: d/dk (requires DEN and GS WFK) + multi[1].set_vars( + rfelfd=2, # Activate d/dk perturbation (required for effective mass calc.) + efmas=1, # Activate calculation of effective mass tensors + prtefmas=1, # Print netcdf file (should be default) + prtwf=-1, + tolwfr=tolwfr, kptopt=0, nkpt=len(kpts), kpt=kpts, + # The range of bands for which the effective mass tensors will be computed, for each k-point. + efmas_bands=np.reshape(effmass_bands_f90, (nkpt, 2)), + # And we request the scalar effective mass along directions in cartesian coordinates + efmas_calc_dirs=1, + efmas_n_dirs=7, + efmas_dirs=np.reshape([1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0], (7, 3)), + ) + + # Input variables for Frohlich model calculation (need DDB, WFK and EFMAS file) + # See https://docs.abinit.org/tests/v8/Input/t57.in + multi[2].set_vars( + iscf=-2, + optdriver=7, + eph_frohlichm=1, + eph_task=6, + tolwfr=tolwfr, kptopt=0, nkpt=len(kpts), kpt=kpts, + ddb_ngqpt=[1, 1, 1], + asr=2, + chneut=1, + prtphdos=0, + ) + + return multi + + def make_ph_inputs_qpoint(self, qpt, tolerance=None, prtwf=-1, prepgkk=0, manager=None): """ - This functions builds and returns a list of input files + Builds and returns a |MultiDataset| list of input files for the calculation of phonons at the given q-point `qpt`. It should be called with an input the represents a GS run. @@ -1163,11 +1290,11 @@ def make_ph_inputs_qpoint(self, qpt, tolerance=None, manager=None): qpt: q-point in reduced coordinates. tolerance: dict {varname: value} with the tolerance to be used in the DFPT run. Defaults to {"tolvrs": 1.0e-10}. + prtwf: 1WFs are only needed for restarting or non-linear response. + Since these files are huge, we use prtwf -1 so that the 1WF file is produced + only if the calculation is not converged so that AbiPy can restart it. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. - Return: - List of |AbinitInput| objects for DFPT runs. - .. WARNING:: The routine assumes the q-point is such that k + q belongs to the initial GS mesh. @@ -1180,7 +1307,7 @@ def make_ph_inputs_qpoint(self, qpt, tolerance=None, manager=None): raise self.Error("Invalid tolerance: %s" % str(tolerance)) # Call Abinit to get the list of irred perts. - perts = self.abiget_irred_phperts(qpt=qpt, manager=manager) + perts = self.abiget_irred_phperts(qpt=qpt, manager=manager, prepgkk=prepgkk) # Build list of datasets (one input per perturbation) # Remove iscf if any (required if we pass an input for NSCF calculation) @@ -1194,7 +1321,7 @@ def make_ph_inputs_qpoint(self, qpt, tolerance=None, manager=None): # Note: this will work for phonons, but not for the other types of perturbations. for pert, ph_input in zip(perts, ph_inputs): rfdir = 3 * [0] - rfdir[pert.idir -1] = 1 + rfdir[pert.idir - 1] = 1 ph_input.set_vars( rfphon=1, # Will consider phonon-type perturbation @@ -1204,26 +1331,29 @@ def make_ph_inputs_qpoint(self, qpt, tolerance=None, manager=None): rfdir=rfdir, kptopt=kptopt, ) + #if "prtwf" not in ph_input: ph_input["prtwf"] = prtwf ph_input.pop_tolerances() ph_input.set_vars(tolerance) return ph_inputs - def make_ddk_inputs(self, tolerance=None, kptopt=2): + def make_ddk_inputs(self, tolerance=None, kptopt=2, only_vk=False, manager=None): """ Return inputs for performing DDK calculations. This functions should be called with an input the represents a GS run. Args: - kptopt: 2 to take into account time-reversal symmetry. note that kptopt 1 is not available. tolerance: dict {varname: value} with the tolerance to be used in the DFPT run. Defaults to {"tolwfr": 1.0e-22}. + kptopt: 2 to take into account time-reversal symmetry. Note that kptopt 1 is not available. + only_vk: If only matrix elements of the velocity operator are needed. + First-order wavefunctions won't be converged --> not usable for other DFPT calculations. + manager: |TaskManager| of the task. If None, the manager is initialized from the config file. Return: List of |AbinitInput| objects for DFPT runs. """ - if tolerance is None: - tolerance = {"tolwfr": 1.0e-22} + if tolerance is None: tolerance = {"tolwfr": 1.0e-22} if len(tolerance) != 1 or any(k not in _TOLVARS for k in tolerance): raise self.Error("Invalid tolerance: %s" % str(tolerance)) @@ -1243,6 +1373,7 @@ def make_ddk_inputs(self, tolerance=None, kptopt=2): for rfdir, ddk_input in zip(ddk_rfdirs, ddk_inputs): ddk_input.set_vars( rfelfd=2, # Activate the calculation of the d/dk perturbation + # only the derivative of ground-state wavefunctions with respect to k rfdir=rfdir, # Direction of the per ddk. nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. @@ -1253,22 +1384,22 @@ def make_ddk_inputs(self, tolerance=None, kptopt=2): ddk_input.pop_tolerances() ddk_input.set_vars(tolerance) + if only_vk: + ddk_inputs.set_vars(nstep=1, nline=1) + return ddk_inputs def make_dde_inputs(self, tolerance=None, use_symmetries=True, manager=None): """ - Return inputs for the calculation of the electric field perturbations. + Return |MultiDataset| inputs for the calculation of the electric field perturbations. This functions should be called with an input the represents a gs run. Args: tolerance: dict {varname: value} with the tolerance to be used in the DFPT run. - Defaults to {"tolwfr": 1.0e-22}. + Defaults to {"tolvrs": 1.0e-22}. use_symmetries: boolean that computes the irreducible components of the perturbation. Default to True. Should be set to False for nonlinear coefficients calculation. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. - - Return: - List of |AbinitInput| objects for DFPT runs. """ if tolerance is None: tolerance = {"tolvrs": 1.0e-22} @@ -1276,7 +1407,7 @@ def make_dde_inputs(self, tolerance=None, use_symmetries=True, manager=None): if len(tolerance) != 1 or any(k not in _TOLVARS for k in tolerance): raise self.Error("Invalid tolerance: %s" % str(tolerance)) - if use_symmetries == True: + if use_symmetries: # Call Abinit to get the list of irred perts. perts = self.abiget_irred_ddeperts(manager=manager) @@ -1308,6 +1439,8 @@ def make_dde_inputs(self, tolerance=None, use_symmetries=True, manager=None): multi.set_vars( rfelfd=3, # Activate the calculation of the electric field perturbation + # Assuming the data on derivative of ground-state wavefunction with respect + # to k (DDK) is available on disk and will be read with getddk/irddk nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. kptopt=2, # Take into account time-reversal symmetry. @@ -1318,9 +1451,9 @@ def make_dde_inputs(self, tolerance=None, use_symmetries=True, manager=None): return multi - def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, manager=None): + def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, ixc=None, manager=None): """ - Return inputs for the DTE calculation. + Return |MultiDataset| inputs for DTE calculation. This functions should be called with an input that represents a GS run. Args: @@ -1328,10 +1461,11 @@ def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, manager=No skip_permutations: Since the current version of abinit always performs all the permutations of the perturbations, even if only one is asked, if True avoids the creation of inputs that will produce duplicated outputs. + ixc: Value of ixc variable. Used to overwrite the default value read from pseudos. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. """ # Call Abinit to get the list of irred perts. - perts = self.abiget_irred_dteperts(phonon_pert=phonon_pert, manager=manager) + perts = self.abiget_irred_dteperts(phonon_pert=phonon_pert, ixc=ixc, manager=manager) if skip_permutations: perts_to_skip = [] @@ -1346,9 +1480,10 @@ def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, manager=No # Build list of datasets (one input per perturbation) multi = MultiDataset.replicate_input(input=self, ndtset=len(perts)) + if ixc is not None: + multi.set_vars(ixc=int(ixc)) # See tutorespfn/Input/tnlo_2.in - na = len(self.structure) for pert, inp in zip(perts, multi): @@ -1371,10 +1506,10 @@ def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, manager=No d3e_pert1_dir=rfdir1, # Direction of the dte perturbation. d3e_pert2_dir=rfdir2, d3e_pert3_dir=rfdir3, - d3e_pert1_phon = 1 if pert.i1pert <= na else 0, - d3e_pert2_phon = 1 if pert.i2pert <= na else 0, - d3e_pert3_phon = 1 if pert.i3pert <= na else 0, - d3e_pert1_atpol = atpol, + d3e_pert1_phon=1 if pert.i1pert <= na else 0, + d3e_pert2_phon=1 if pert.i2pert <= na else 0, + d3e_pert3_phon=1 if pert.i3pert <= na else 0, + d3e_pert1_atpol=atpol, nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. optdriver=5, # non-linear response functions, using the 2n+1 theorem. @@ -1387,12 +1522,10 @@ def make_dte_inputs(self, phonon_pert=False, skip_permutations=False, manager=No def make_bec_inputs(self, tolerance=None, manager=None): """ - Return inputs for the calculation of the Born effective charges. - + Return |MultiDataset| inputs for the calculation of the Born effective charges. This functions should be called with an input that represents a GS run. """ - if tolerance is None: - tolerance = {"tolvrs": 1.0e-10} + if tolerance is None: tolerance = {"tolvrs": 1.0e-10} if len(tolerance) != 1 or any(k not in _TOLVARS for k in tolerance): raise self.Error("Invalid tolerance: %s" % str(tolerance)) @@ -1408,7 +1541,7 @@ def make_bec_inputs(self, tolerance=None, manager=None): # See tutorespfn/Input/trf1_5.in dataset 3 for pert, inp in zip(perts, multi): rfdir = 3 * [0] - rfdir[pert.idir -1] = 1 + rfdir[pert.idir - 1] = 1 inp.set_vars( rfphon=1, # Activate the calculation of the atomic dispacement perturbations @@ -1425,55 +1558,67 @@ def make_bec_inputs(self, tolerance=None, manager=None): return multi - def make_strain_perts_inputs(self, tolerance=None, manager=None): + def make_strain_perts_inputs(self, tolerance=None, phonon_pert=True, kptopt=2, manager=None): + """ + Return |MultiDataset| inputs for strain perturbation calculation. + This functions should be called with an input that represents a GS run. + + Args: + tolerance: dict {varname: value} with the tolerance to be used in the DFPT run. + Defaults to {"tolvrs": 1.0e-12}. + manager: |TaskManager| of the task. If None, the manager is initialized from the config file. + phonon_pert: is True also the phonon perturbations will be considered. Default False. + kptopt: 2 to take into account time-reversal symmetry. + """ if tolerance is None: tolerance = {"tolvrs": 1.0e-12} + if len(tolerance) != 1 or any(k not in _TOLVARS for k in tolerance): raise self.Error("Invalid tolerance: {}".format(str(tolerance))) - perts = self.abiget_irred_strainperts(kptopt=2, manager=manager) + perts = self.abiget_irred_strainperts(kptopt=kptopt, manager=manager, phonon_pert=phonon_pert) + #print("Stress perts:", perts) # Build list of datasets (one input per perturbation) multi = MultiDataset.replicate_input(input=self, ndtset=len(perts)) for pert, inp in zip(perts, multi): rfdir = 3 * [0] - rfdir[pert.idir -1] = 1 + rfdir[pert.idir - 1] = 1 + if pert.ipert <= len(self.structure): inp.set_vars(rfphon=1, # Activate the calculation of the atomic dispacement perturbations rfatpol=[pert.ipert, pert.ipert], rfdir=rfdir, nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. - kptopt=3, # No symmetries - iscf=7, + kptopt=kptopt, # No symmetries + #iscf=7, paral_kgb=0 ) + elif pert.ipert == len(self.structure) + 3: inp.set_vars(rfstrs=1, # Activate the calculation of the strain perturbations (uniaxial) rfdir=rfdir, nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. - kptopt=3, # No symmetries - iscf=7, + kptopt=kptopt, # No symmetries + #iscf=7, paral_kgb=0 ) + elif pert.ipert == len(self.structure) + 4: inp.set_vars(rfstrs=2, # Activate the calculation of the strain perturbations (shear) rfdir=rfdir, nqpt=1, # One wavevector is to be considered qpt=(0, 0, 0), # q-wavevector. - kptopt=3, # No symmetries - iscf=7, + kptopt=kptopt, # No symmetries + #iscf=7, paral_kgb=0 ) inp.pop_tolerances() inp.set_vars(tolerance) - # Adding buffer to help convergence ... - if 'nbdbuf' not in inp: - nbdbuf = max(int(0.1*inp['nband']), 4) - inp.set_vars(nband=inp['nband']+nbdbuf, nbdbuf=nbdbuf) return multi @@ -1499,18 +1644,22 @@ def abivalidate(self, workdir=None, manager=None): return dict2namedtuple(retcode=retcode, output_file=task.output_file, log_file=task.log_file, stderr_file=task.stderr_file, task=task) - def abiget_spacegroup(self, tolsym=None, workdir=None, manager=None): + def abiget_spacegroup(self, tolsym=None, retdict=False, workdir=None, manager=None, verbose=0): """ This function invokes Abinit to get the space group (as detected by Abinit, not by spglib) It should be called with an input file that contains all the mandatory variables required by ABINIT. Args: tolsym: Abinit tolsym input variable. None correspondes to the default value. + retdict: True to return dictionary with space group information instead of Structure. workdir: Working directory of the fake task used to compute the ibz. Use None for temporary dir. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. + verbose: Verbosity level. Return: - |Structure| object with AbinitSpaceGroup obtained from the main output file. + |Structure| object with AbinitSpaceGroup obtained from the main output file if retdict is False + else dict with e.g. + {'bravais': 'Bravais cF (face-center cubic)', 'spg_number': 227, 'spg_symbol': 'Fd-3m'}. """ # Avoid modifications in self. inp = self.deepcopy() @@ -1529,7 +1678,12 @@ def abiget_spacegroup(self, tolsym=None, workdir=None, manager=None): from abipy.abio.outputs import AbinitOutputFile try: with AbinitOutputFile(task.output_file.path) as out: - return out.initial_structure + if not retdict: + return out.initial_structure + else: + dims_dataset, spginfo_dataset = out.get_dims_spginfo_dataset(verbose=verbose) + return spginfo_dataset[1] + except Exception as exc: self._handle_task_exception(task, exc) @@ -1609,7 +1763,7 @@ def _handle_task_exception(self, task, prev_exc): # 1) Abinit cannot be executed or runtime errors due e.g to libraries # 2) IO buffering (Abinit called MPI_ABORT but files are not flushed before aborting. # Try to return as much iformation as possible to aid debugging - errors = ["Problem in temp Task executed in %s" % task.workdir, + errors = ["Problem in temp Task executed in %s" % task.workdir, "Previous exception %s" % prev_exc] try: @@ -1691,7 +1845,7 @@ def _abiget_irred_perts(self, perts_vars, qpt=None, ngkpt=None, shiftk=None, kpt except Exception as exc: self._handle_task_exception(task, exc) - def abiget_irred_phperts(self, qpt=None, ngkpt=None, shiftk=None, kptopt=None, workdir=None, manager=None): + def abiget_irred_phperts(self, qpt=None, ngkpt=None, shiftk=None, kptopt=None, prepgkk=0, workdir=None, manager=None): """ This function, computes the list of irreducible perturbations for DFPT. It should be called with an input file that contains all the mandatory variables required by ABINIT. @@ -1702,6 +1856,7 @@ def abiget_irred_phperts(self, qpt=None, ngkpt=None, shiftk=None, kptopt=None, w ngkpt: Number of divisions for the k-mesh (default None i.e. use ngkpt from self) shiftk: Shiftks (default None i.e. use shiftk from self) kptopt: Option for k-point generation. If None, the value in self is used. + prepgkk: 1 to activate computation of all 3*natom perts (debugging option). workdir: Working directory of the fake task used to compute the ibz. Use None for temporary dir. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. @@ -1716,6 +1871,7 @@ def abiget_irred_phperts(self, qpt=None, ngkpt=None, shiftk=None, kptopt=None, w phperts_vars = dict(rfphon=1, # Will consider phonon-type perturbation rfatpol=[1, len(self.structure)], # Set of atoms to displace. rfdir=[1, 1, 1], # Along this set of reduced coordinate axis. + prepgkk=prepgkk, ) return self._abiget_irred_perts(phperts_vars, qpt=qpt, ngkpt=ngkpt, shiftk=shiftk, kptopt=kptopt, @@ -1750,7 +1906,7 @@ def abiget_irred_ddeperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir=No return self._abiget_irred_perts(ddeperts_vars, qpt=(0, 0, 0), ngkpt=ngkpt, shiftk=shiftk, kptopt=kptopt, workdir=workdir, manager=manager) - def abiget_irred_dteperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir=None, manager=None, + def abiget_irred_dteperts(self, ngkpt=None, shiftk=None, kptopt=None, ixc=None, workdir=None, manager=None, phonon_pert=False): """ This function, computes the list of irreducible perturbations for DFPT. @@ -1787,10 +1943,13 @@ def abiget_irred_dteperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir=No kptopt=2, # kpt time reversal symmetry ) + if ixc is not None: dteperts_vars["ixc"] = ixc + return self._abiget_irred_perts(dteperts_vars, qpt=(0, 0, 0), ngkpt=ngkpt, shiftk=shiftk, kptopt=kptopt, workdir=workdir, manager=manager) - def abiget_irred_strainperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir=None, manager=None): + def abiget_irred_strainperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir=None, manager=None, + phonon_pert=True): """ This function, computes the list of irreducible perturbations for strain perturbations in DFPT. It should be called with an input file that contains all the mandatory variables required by ABINIT. @@ -1801,6 +1960,7 @@ def abiget_irred_strainperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir kptopt: Option for k-point generation. If None, the value in self is used. workdir: Working directory of the fake task used to compute the ibz. Use None for temporary dir. manager: |TaskManager| of the task. If None, the manager is initialized from the config file. + phonon_pert: if True the phonon perturbation at gamma will be included. Returns: List of dictionaries with the Abinit variables defining the irreducible perturbation @@ -1810,9 +1970,7 @@ def abiget_irred_strainperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir [{'idir': 1, 'ipert': 4, 'qpt': [0.0, 0.0, 0.0]}, {'idir': 2, 'ipert': 4, 'qpt': [0.0, 0.0, 0.0]}] """ - strainperts_vars = dict(rfphon=1, # No phonon-type perturbation - rfatpol=(1,len(self.structure)), # Perturbation of all atoms - rfstrs=3, # Do the strain perturbations + strainperts_vars = dict(rfstrs=3, # Do the strain perturbations rfdir=(1,1,1), # All directions # nqpt=1, # One wavevector is to be considered # qpt=(0, 0, 0), # q-wavevector. @@ -1820,6 +1978,10 @@ def abiget_irred_strainperts(self, ngkpt=None, shiftk=None, kptopt=None, workdir iscf=7 # Just so that it works with PAW ... #TODO: check this ) + if phonon_pert: + strainperts_vars['rfphon'] = 1 # No phonon-type perturbation + strainperts_vars['rfatpol'] = (1,len(self.structure)) # Perturbation of all atoms + return self._abiget_irred_perts(strainperts_vars, qpt=(0, 0, 0), ngkpt=ngkpt, shiftk=shiftk, kptopt=kptopt, workdir=workdir, manager=manager) @@ -1911,7 +2073,7 @@ class MultiDataset(object): MultiDataset provides its own implementaion of __getattr__ so that one can simply use: - multi.set_vars(ecut=1) + multi.set_vars(ecut=1) multi.get("ecut") returns a list of values. It's equivalent to: @@ -2035,8 +2197,6 @@ def __iter__(self): return self._inputs.__iter__() def __getattr__(self, name): - #print("in getname with name: %s" % name) - #m = getattr(self._inputs[0], name) _inputs = object.__getattribute__(self, "_inputs") m = getattr(_inputs[0], name) if m is None: @@ -2070,7 +2230,7 @@ def __add__(self, other): new_mds.extend(other) return new_mds else: - return NotImplementedError("Operation not supported") + raise NotImplementedError("Operation not supported") def __radd__(self, other): if isinstance(other, AbinitInput): @@ -2080,7 +2240,7 @@ def __radd__(self, other): new_mds = MultiDataset.from_inputs(other) new_mds.extend(self) else: - return NotImplementedError("Operation not supported") + raise NotImplementedError("Operation not supported") def append(self, abinit_input): """Add a |AbinitInput| to the list.""" @@ -2154,7 +2314,7 @@ def has_same_variable(kref, vref, other_inp): w = 92 if global_vars: lines.append(w * "#") - lines.append("### Global Variables.") + lines.append("#### Global Variables.") lines.append(w * "#") for key in global_vars: vname = key if mode == "text" else var_database[key].html_link(label=key) @@ -2164,15 +2324,15 @@ def has_same_variable(kref, vref, other_inp): if has_same_structures: # Write structure here and disable structure output in input.to_string lines.append(w * "#") - lines.append("#" + ("STRUCTURE").center(w - 1)) + lines.append("####" + ("STRUCTURE").center(w - 1)) lines.append(w * "#") for key, value in self[0].structure.to_abivars().items(): vname = key if mode == "text" else var_database[key].html_link(label=key) lines.append(str(InputVariable(vname, value))) for i, inp in enumerate(self): - header = "### DATASET %d ###" % (i + 1) - is_last = (i==self.ndtset - 1) + header = "##### DATASET %d #####" % (i + 1) + is_last = (i == self.ndtset - 1) s = inp.to_string(post=str(i + 1), with_pseudos=is_last and with_pseudos, mode=mode, with_structure=not has_same_structures, exclude=global_vars) if s: @@ -2181,7 +2341,7 @@ def has_same_variable(kref, vref, other_inp): lines.append(s) - return "\n".join(lines) if mode=="text" else "\n".join(lines).replace("\n", "
") + return "\n".join(lines) if mode == "text" else "\n".join(lines).replace("\n", "
") else: # single datasets ==> don't append the dataset index to the variables. @@ -2315,7 +2475,7 @@ def __init__(self, structure, comment="", anaddb_args=None, anaddb_kwargs=None, """ self.set_spell_check(spell_check) self._structure = structure - self.comment = comment + self.comment = "" if comment is None else str(comment) anaddb_args = [] if anaddb_args is None else anaddb_args for key, value in anaddb_args: @@ -2348,16 +2508,20 @@ def spell_check(self): def _check_varname(self, key): if self.spell_check and not is_anaddb_var(key): - raise self.Error("%s is not a registered Anaddb variable\n" - "If you are sure the name is correct, please contact the abipy developers\n" - "or use input.set_spell_check(False)\n" - "or modify the JSON file abipy/data/variables/anaddb_vars.json" % key) + raise self.Error(""" +Cannot find variable `%s` in internal database. +If you think this is not a typo, use: + + input.set_spell_check(False) + +to disable spell checking. Perhaps the internal database is not in synch +with the Abinit version you are using. Please contact the AbiPy developers.""" % key) @classmethod def modes_at_qpoint(cls, structure, qpoint, asr=2, chneut=1, dipdip=1, ifcflag=0, lo_to_splitting=False, directions=None, anaddb_args=None, anaddb_kwargs=None, spell_check=False): """ - Input file for the calculation of the phonon frequencies at a given q-point. + Build an |AnaddbInput| for the calculation of the phonon frequencies at a given q-point. Args: structure: |Structure| object @@ -2370,17 +2534,13 @@ def modes_at_qpoint(cls, structure, qpoint, asr=2, chneut=1, dipdip=1, ifcflag=0 anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) spell_check: False to disable spell checking for input variables. """ - new = cls(structure, comment="ANADB input for phonon frequencies at one q-point", - anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) + new = cls(structure, comment="ANADDB input for phonon frequencies at one q-point", + anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs, spell_check=spell_check) # We need a numpy array. - if hasattr(qpoint, "frac_coords"): - qpoint = qpoint.frac_coords - else: - qpoint = np.array(qpoint) + qpoint = qpoint.frac_coords if hasattr(qpoint, "frac_coords") else np.array(qpoint) if len(qpoint) != 3: - #print(type(qpoint), qpoint.shape) raise ValueError("Wrong q-point %s" % qpoint) new.set_vars( @@ -2408,33 +2568,27 @@ def modes_at_qpoint(cls, structure, qpoint, asr=2, chneut=1, dipdip=1, ifcflag=0 return new @classmethod - def piezo_elastic(cls, structure, anaddb_args=None, anaddb_kwargs=None, stress_correction=False): - """Build Anaddb input file for the calculation of piezoelectric and elastic tensor calculations.""" - new = cls(structure, comment="ANADB input for piezoelectric and elastic tensor calculation", - anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) - - if stress_correction: - elaflag = 5 - else: - elaflag = 3 + def piezo_elastic(cls, structure, relaxed_ion=True, stress_correction=False, + asr=2, chneut=1, dipdip=1, anaddb_args=None, anaddb_kwargs=None): + """ + Build an |AnaddbInput| for the calculation of piezoelectric and elastic tensor calculations. - new.set_vars( - elaflag=elaflag, - piezoflag=3, - instrflag=1, - chneut=1, - asr=0, - symdynmat=1 - ) + Args: + asr, chneut, dipdp: Anaddb input variable. See official documentation. + """ + comment = "ANADDB input for piezoelectric and elastic tensor calculation" + new = cls.dfpt(structure, relaxed_ion=relaxed_ion, piezo=True, dde=False, strain=True, dte=False, + stress_correction=stress_correction, asr=asr, chneut=chneut, dipdip=dipdip, + anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs, comment=comment) return new @classmethod def phbands_and_dos(cls, structure, ngqpt, nqsmall, qppa=None, ndivsm=20, line_density=None, q1shft=(0, 0, 0), qptbounds=None, asr=2, chneut=0, dipdip=1, dos_method="tetra", lo_to_splitting=False, - anaddb_args=None, anaddb_kwargs=None, spell_check=False): + anaddb_args=None, anaddb_kwargs=None, spell_check=False, comment=None): """ - Build an anaddb input file for the computation of phonon bands and phonon DOS. + Build an |AnaddbInput| for the computation of phonon bands and phonon DOS. Args: structure: |Structure| object @@ -2457,8 +2611,9 @@ def phbands_and_dos(cls, structure, ngqpt, nqsmall, qppa=None, ndivsm=20, line_d anaddb_args: List of tuples (key, value) with Anaddb input variables (default: empty) anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) spell_check: False to disable spell checking for input variables. + comment: Optional string with a comment that will be placed at the beginning of the file. """ - dosdeltae, dossmear = None, None + dossmear = None if dos_method == "tetra": prtdos = 2 @@ -2471,21 +2626,21 @@ def phbands_and_dos(cls, structure, ngqpt, nqsmall, qppa=None, ndivsm=20, line_d else: raise NotImplementedError("Wrong value for dos_method: %s" % str(dos_method)) - new = cls(structure, comment="ANADB input for phonon bands and DOS", + new = cls(structure, comment="ANADDB input for phonon bands and DOS" if not comment else comment, anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs, spell_check=spell_check) # Parameters for the DOS if qppa: - ng2qpt = KSampling.automatic_density(structure, kppa=qppa).kpts[0] - #set new variables - new.set_vars(ng2qpt=ng2qpt,prtdos=prtdos,dossmear=dossmear) + ng2qpt = aobj.KSampling.automatic_density(structure, kppa=qppa).kpts[0] + # Set new variables + new.set_vars(ng2qpt=ng2qpt, prtdos=prtdos, dossmear=dossmear) else: new.set_autoqmesh(nqsmall) - new.set_vars(prtdos=prtdos, dosdeltae=dosdeltae, dossmear=dossmear) + new.set_vars(prtdos=prtdos, dossmear=dossmear) if nqsmall == 0: new["prtdos"] = 0 - # Parameters for the BS + # Parameters for the Bandstructure. if line_density: hs = HighSymmKpath(structure, symprec=1e-2) qpts, labels_list = hs.get_kpoints(line_density=line_density, coords_are_cartesian=False) @@ -2516,15 +2671,16 @@ def phbands_and_dos(cls, structure, ngqpt, nqsmall, qppa=None, ndivsm=20, line_d if lo_to_splitting: directions = [] + rl = structure.lattice.reciprocal_lattice_crystallographic for i, qpt in enumerate(qptbounds): if np.array_equal(qpt, (0, 0, 0)): # anaddb expects cartesian coordinates for the qph2l list if i > 0: - directions.extend(structure.lattice.reciprocal_lattice_crystallographic.get_cartesian_coords(qptbounds[i-1])) + directions.extend(rl.get_cartesian_coords(qptbounds[i-1])) directions.append(0) if i < len(qptbounds) - 1: - directions.extend(structure.lattice.reciprocal_lattice_crystallographic.get_cartesian_coords(qptbounds[i+1])) + directions.extend(rl.get_cartesian_coords(qptbounds[i+1])) directions.append(0) if directions: @@ -2536,90 +2692,10 @@ def phbands_and_dos(cls, structure, ngqpt, nqsmall, qppa=None, ndivsm=20, line_d return new - @classmethod - def thermo(cls, structure, ngqpt, nqsmall, q1shft=(0, 0, 0), nchan=1250, nwchan=5, thmtol=0.5, - ntemper=199, temperinc=5, tempermin=5., asr=2, chneut=1, dipdip=1, ngrids=10, - anaddb_args=None, anaddb_kwargs=None): - - """ - Build an anaddb input file for the computation of phonon bands and phonon DOS. - Note: This method is deprecated because now it's possible to compute Thermodynamical - properties from PhDos - - Args: - structure: |Structure| object - ngqpt: Monkhorst-Pack divisions for the phonon Q-mesh (coarse one) - nqsmall: Used to generate the (dense) mesh for the DOS. - It defines the number of q-points used to sample the smallest lattice vector. - q1shft: Shifts used for the coarse Q-mesh - nchan: - nwchan: - thmtol: - ntemper: - temperinc: - tempermin: - asr, chneut, dipdp: Anaddb input variable. See official documentation. - ngrids: - anaddb_args: List of tuples (key, value) with Anaddb input variables (default: empty) - anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) - - #!Flags - # ifcflag 1 ! Interatomic force constant flag - # thmflag 1 ! Thermodynamical properties flag - #!Wavevector grid number 1 (coarse grid, from DDB) - # brav 2 ! Bravais Lattice : 1-S.C., 2-F.C., 3-B.C., 4-Hex.) - # ngqpt 4 4 4 ! Monkhorst-Pack indices - # nqshft 1 ! number of q-points in repeated basic q-cell - # q1shft 3*0.0 - #!Effective charges - # asr 1 ! Acoustic Sum Rule. 1 => imposed asymetrically - # chneut 1 ! Charge neutrality requirement for effective charges. - #!Interatomic force constant info - # dipdip 1 ! Dipole-dipole interaction treatment - #!Wavevector grid number 2 (series of fine grids, extrapolated from interat forces) - # ng2qpt 20 20 20 ! sample the BZ up to ngqpt2 - # ngrids 5 ! number of grids of increasing size# q2shft 3*0.0 - #!Thermal information - # nchan 1250 ! # of channels for the DOS with channel width 1 cm-1 - # nwchan 5 ! # of different channel widths from this integer down to 1 cm-1 - # thmtol 0.120 ! Tolerance on thermodynamical function fluctuations - # ntemper 10 ! Number of temperatures - # temperinc 20. ! Increment of temperature in K for temperature dependency - # tempermin 20. ! Minimal temperature in Kelvin - # This line added when defaults were changed (v5.3) to keep the previous, old behaviour - # symdynmat 0 - - """ - new = cls(structure, comment="ANADB input for thermodynamics", - anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) - new.set_autoqmesh(nqsmall) - - q1shft = np.reshape(q1shft, (-1, 3)) - - new.set_vars( - ifcflag=1, - thmflag=1, - ngqpt=np.array(ngqpt), - ngrids=ngrids, - q1shft=q1shft, - nqshft=len(q1shft), - asr=asr, - chneut=chneut, - dipdip=dipdip, - nchan=nchan, - nwchan=nwchan, - thmtol=thmtol, - ntemper=ntemper, - temperinc=temperinc, - tempermin=tempermin, - ) - - return new - @classmethod def modes(cls, structure, enunit=2, asr=2, chneut=1, anaddb_args=None, anaddb_kwargs=None): """ - Build an anaddb input file for the computation of phonon modes. + Build an |AnaddbInput| for the computation of phonon modes. Args: Structure: |Structure| object @@ -2632,27 +2708,8 @@ def modes(cls, structure, enunit=2, asr=2, chneut=1, anaddb_args=None, anaddb_kw asr, chneut, dipdp: Anaddb input variable. See official documentation. anaddb_args: List of tuples (key, value) with Anaddb input variables (default: empty) anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) - - #!General information - #enunit 2 - #eivec 1 - #!Flags - #dieflag 1 - #ifcflag 1 - #ngqpt 1 1 1 - #!Effective charges - #asr 2 - #chneut 2 - # Wavevector list number 1 - #nph1l 1 - #qph1l 0.0 0.0 0.0 1.0 ! (Gamma point) - #!Wavevector list number 2 - #nph2l 3 ! number of phonons in list 1 - #qph2l 1.0 0.0 0.0 0.0 - # 0.0 1.0 0.0 0.0 - # 0.0 0.0 1.0 0.0 - """ - new = cls(structure, comment="ANADB input for modes", anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) + """ + new = cls(structure, comment="ANADDB input for modes", anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) new.set_vars( enunit=enunit, @@ -2674,7 +2731,7 @@ def modes(cls, structure, enunit=2, asr=2, chneut=1, anaddb_args=None, anaddb_kw def ifc(cls, structure, ngqpt, ifcout=None, q1shft=(0, 0, 0), asr=2, chneut=1, dipdip=1, anaddb_args=None, anaddb_kwargs=None): """ - Build an anaddb input file for the computation of interatomic force constants. + Build an |AnaddbInput| for the computation of interatomic force constants. Args: structure: |Structure| object @@ -2685,8 +2742,7 @@ def ifc(cls, structure, ngqpt, ifcout=None, q1shft=(0, 0, 0), asr=2, chneut=1, d anaddb_args: List of tuples (key, value) with Anaddb input variables (default: empty) anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) """ - - new = cls(structure, comment="ANADB input for IFC", + new = cls(structure, comment="ANADDB input for IFC", anaddb_args=anaddb_args, anaddb_kwargs=anaddb_kwargs) q1shft = np.reshape(q1shft, (-1, 3)) @@ -2712,6 +2768,128 @@ def ifc(cls, structure, ngqpt, ifcout=None, q1shft=(0, 0, 0), asr=2, chneut=1, d return new + @classmethod + def dfpt(cls, structure, ngqpt=None, relaxed_ion=False, piezo=False, dde=False, strain=False, dte=False, + raman=False, stress_correction=False, nqsmall=None, qppa=None, ndivsm=20, line_density=None, + q1shft=(0, 0, 0), qptbounds=None, asr=2, chneut=1, dipdip=1, ramansr=1, alphon=1, dos_method="tetra", + directions=None, anaddb_args=None, anaddb_kwargs=None, comment=None): + """ + Builds an |AnaddbInput| to post-process a generic DFPT calculation. + + Args: + structure: |Structure| object. + ngqpt: Monkhorst-Pack divisions for the phonon Q-mesh (coarse one) + stress_correction: True to activate computation of stress correction in elastic tensor. + Requires DDB with stress entries. + relaxed_ion: True to activate computation of relaxed-ion elastic and piezoelectric tensors. + (assume the DDB has atomic perturbations at Gamma) + piezo: if True the piezoelectric tensor are calculated (requires piezoelectric perturbations) + dde: if True dielectric tensors will be calculated. If phonon band + structure is calculated will also enable the calculation of the lo_to splitting + (requires the DDE perturbations) + strain: if True the elastic tensors will be calculated (requires the strain perturbations) + dte: if True properties related to the nonlinear tensors will be calculated + (requires third orders perturbations) + raman: if True the Raman tensor will be calculated (sets dte to True). + nqsmall: Used to generate the (dense) mesh for the DOS. + It defines the number of q-points used to sample the smallest lattice vector. + qppa: Defines the homogeneous q-mesh used for the DOS in units of q-points per reciproval atom. + Overrides nqsmall. + line_density: Defines the a density of k-points per reciprocal atom to plot the phonon dispersion. + Overrides ndivsm. + ndivsm: Used to generate a normalized path for the phonon bands. + If gives the number of divisions for the smallest segment of the path. + q1shft: Shifts used for the coarse Q-mesh + qptbounds: Boundaries of the path. If None, the path is generated from an internal database + depending on the input structure. + asr, chneut, dipdp, ramansr, alphon: Anaddb input variable. See official documentation. + dos_method: Possible choices: "tetra", "gaussian" or "gaussian:0.001 eV". + In the later case, the value 0.001 eV is used as gaussian broadening + directions: list of 3D directions along which the non analytical contribution will be calculated. + If None the three cartesian direction will be used. Used only when dte=True. + anaddb_args: List of tuples (key, value) with Anaddb input variables (default: empty) + anaddb_kwargs: Dictionary with Anaddb input variables (default: empty) + comment: Optional string with a comment that will be placed at the beginning of the file. + """ + # use the phonon BS and DOS input as starting point is required, otherwise + if ngqpt: + anaddb_input = cls.phbands_and_dos(structure=structure, ngqpt=ngqpt, ndivsm=ndivsm, nqsmall=nqsmall, + qppa=qppa, line_density=line_density, asr=asr, chneut=chneut, + dipdip=dipdip, qptbounds=qptbounds, dos_method=dos_method, + lo_to_splitting=dde, q1shft=q1shft, comment=comment) + else: + anaddb_input = AnaddbInput(structure, comment=comment) + anaddb_input.set_vars(asr=asr, chneut=chneut) + + dieflag = 0 + if dde: + dieflag = 3 if (relaxed_ion and strain) else 2 + + elaflag = 0 + if strain: + if not relaxed_ion: + elaflag = 1 + elif stress_correction: + elaflag = 5 + else: + elaflag = 3 + + piezoflag = 0 + if piezo: + if not relaxed_ion: + piezoflag = 1 + elif dde and strain: + piezoflag = 7 + else: + piezoflag = 3 + + anaddb_input.set_vars(dieflag=dieflag, elaflag=elaflag, piezoflag=piezoflag) + + if dieflag == 3 and 'nph2l' not in anaddb_input: + anaddb_input['nph2l'] = 1 + + if elaflag > 1: + anaddb_input["instrflag"] = 1 + + if raman: + dte = True + + if dte: + prtmbm = 0 + + if raman: + nlflag = 1 + ramansr = ramansr + alphon = alphon + prtmbm = 1 + if directions is None: + directions = [1, 0, 0, 0, 1, 0, 0, 0, 1] + directions = np.reshape(directions, (-1, 3)) + # append 0 to specify that these are directions, + directions = np.c_[directions, np.zeros(len(directions))] + + anaddb_input.set_vars( + nph2l=len(directions), + qph2l=directions + ) + else: + nlflag = 3 + ramansr = 0 + alphon = 0 + + anaddb_input.set_vars(nlflag=nlflag, + ramansr=ramansr, + alphon=alphon, + prtmbm=prtmbm) + + anaddb_args = [] if anaddb_args is None else anaddb_args + anaddb_kwargs = {} if anaddb_kwargs is None else anaddb_kwargs + args = list(anaddb_args)[:] + args.extend(list(anaddb_kwargs.items())) + anaddb_input.set_vars(args) + + return anaddb_input + @property def structure(self): """|Structure| object.""" @@ -2740,8 +2918,7 @@ def to_string(self, sortmode=None, mode="text", verbose=0): else: raise ValueError("Unsupported value for sortmode %s" % str(sortmode)) - # https://www.abinit.org/doc/helpfiles/for-v8.4/users/anaddb_help.html#mustar - root = "https://www.abinit.org/doc/helpfiles/for-v8.4/users/anaddb_help.html" + root = "https://docs.abinit.org/variables/anaddb/" for varname in keys: value = self[varname] if mode == "html": varname = root + "#%s" % varname @@ -2809,8 +2986,7 @@ def __str__(self): @property def url(self): """The url associated to the variable.""" - # TODO: root will change once we move to the new website. - root = "https://www.abinit.org/sites/default/files/last/users/optic_help.html" + root = "https://docs.abinit.org/variables/optic/" return root + "#%s" % self.name def html_link(self, label=None): @@ -2818,7 +2994,6 @@ def html_link(self, label=None): return '%s' % (self.url, self.name if label is None else label) - class OpticError(Exception): """Error class raised by OpticInput.""" @@ -2899,7 +3074,7 @@ def vars(self): def _check_varname(self, key): if key not in self._VARNAMES: raise self.Error("%s is not a valid optic variable.\n" - "If you are sure the name is correct, please change the _VARIABLES list in:\n%s" % + "If you are sure the name is correct, please change the _VARIABLES list in:\n%s" % (key, __file__)) def get_default(self, key): @@ -3276,7 +3451,7 @@ def product_dict(d): values = [] for v in vals: - if not isinstance(v, collections.Iterable): v = [v] + if not isinstance(v, collections.abc.Iterable): v = [v] values.append(v) # Build list of dictionaries. Use ordered dicts so that diff --git a/abipy/abio/outputs.py b/abipy/abio/outputs.py index 9350b632a..66dbbbe5b 100644 --- a/abipy/abio/outputs.py +++ b/abipy/abio/outputs.py @@ -1,14 +1,12 @@ """ Objects used to extract and plot results from output files in text format. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import pandas as pd from collections import OrderedDict -from six.moves import cStringIO +from io import StringIO from monty.string import is_string, marquee from monty.functools import lazy_property from monty.termcolor import cprint @@ -25,7 +23,7 @@ class AbinitTextFile(TextFile): """ - Class for the ABINIT main output file and the log file. + Base class for the ABINIT main output files and log files. """ @property def events(self): @@ -93,7 +91,7 @@ class AbinitOutputFile(AbinitTextFile, NotebookWriter): # TODO: Extract number of errors and warnings. def __init__(self, filepath): - super(AbinitOutputFile, self).__init__(filepath) + super().__init__(filepath) self.debug_level = 0 self._parse() @@ -204,14 +202,14 @@ def _parse_variables(self, what): if magic_start in line: break else: - raise ValueError("Cannot find magic_start line: %s" % magic_start) + raise ValueError("Cannot find magic_start line: `%s`\nPerhaps this is not an Abinit output file!" % magic_start) lines = lines[i+1:] for i, line in enumerate(lines): if magic_stop in line: break else: - raise ValueError("Cannot find magic_stop line: %s" % magic_stop) + raise ValueError("Cannot find magic_stop line: `%s`\nPerhaps this is not an Abinit output file!" % magic_stop) lines = lines[:i] # Parse data. Assume format: @@ -228,7 +226,7 @@ def get_dtindex_key_value(line): break l.append(c) else: - raise ValueError("Cannot find dataset index in token: %s" % s) + raise ValueError("Cannot find dataset index in token: %s\n" % s) #print(line, "\n", l) dtindex = None @@ -239,6 +237,7 @@ def get_dtindex_key_value(line): # (varname, dtindex), [line1, line2 ...] stack_var, stack_lines = None, [] + def pop_stack(): if stack_lines: key, dtidx = stack_var @@ -371,7 +370,7 @@ def final_structures(self): if self.run_completed: return self._get_structures("footer") else: - print("Cannot extract final structures from file.\n %s" % str(exc)) + cprint("Cannot extract final structures from file.\n %s" % self.filepath, "red") return [] @lazy_property @@ -486,6 +485,21 @@ def to_string(self, verbose=0): app(str(df.coords)) # Print dataframe with dimensions. + df = self.get_dims_spginfo_dataframe(verbose=verbose) + from abipy.tools.printing import print_dataframe + strio = StringIO() + print_dataframe(df, file=strio) + strio.seek(0) + app("") + app(marquee("Dimensions of calculation", mark="=")) + app("".join(strio)) + + return "\n".join(lines) + + def get_dims_spginfo_dataframe(self, verbose=0): + """ + Parse the section with the dimensions of the calculation. Return Dataframe. + """ dims_dataset, spginfo_dataset = self.get_dims_spginfo_dataset(verbose=verbose) rows = [] for dtind, dims in dims_dataset.items(): @@ -495,21 +509,13 @@ def to_string(self, verbose=0): d.update(spginfo_dataset[dtind]) rows.append(d) - from abipy.tools.printing import print_dataframe df = pd.DataFrame(rows, columns=list(rows[0].keys()) if rows else None) df = df.set_index('dataset') - strio = cStringIO() - print_dataframe(df, file=strio) - strio.seek(0) - app("") - app(marquee("Dimensions of calculation", mark="=")) - app("".join(strio)) - - return "\n".join(lines) + return df def get_dims_spginfo_dataset(self, verbose=0): """ - Parse the section with the dimensions of the calculation. + Parse the section with the dimensions of the calculation. Return dictionaries Args: verbose: Verbosity level. @@ -580,9 +586,10 @@ def parse_spgline(line): line = line.strip() if verbose > 1: print("inblock:", inblock, " at line:", line) - if line.startswith(magic_exit): - break + if line.startswith(magic_exit): break + if (not line or line.startswith("===") or line.startswith("---") + #or line.startswith("P") or line.startswith("Rough estimation") or line.startswith("PAW method is used")): continue @@ -606,6 +613,8 @@ def parse_spgline(line): if inblock == 2: # Lines with data. + if line.startswith("For the susceptibility"): continue + if line.startswith(memory_pre): dims["mem_per_proc_mb"] = float(line.replace(memory_pre, "").split()[0]) elif line.startswith(filesizes_pre): @@ -631,12 +640,35 @@ def next_gs_scf_cycle(self): """ return GroundStateScfCycle.from_stream(self) + def get_all_gs_scf_cycles(self): + """Return list of :class:`GroundStateScfCycle` objects. Empty list if no entry is found.""" + # NOTE: get_all should not used with next because of the call to self.seek(0) + # The API should be refactored + cycles = [] + self.seek(0) + while True: + cycle = self.next_gs_scf_cycle() + if cycle is None: break + cycles.append(cycle) + self.seek(0) + return cycles + def next_d2de_scf_cycle(self): """ - Return :class:`GroundStateScfCycle` with information on the GS iterations. None if not found. + Return :class:`D2DEScfCycle` with information on the DFPT iterations. None if not found. """ return D2DEScfCycle.from_stream(self) + def get_all_d2de_scf_cycles(self): + """Return list of :class:`D2DEScfCycle` objects. Empty list if no entry is found.""" + cycles = [] + self.seek(0) + while True: + cycle = self.next_d2de_scf_cycle() + if cycle is None: break + cycles.append(cycle) + return cycles + def plot(self, tight_layout=True, with_timer=False, show=True): """ Plot GS/DFPT SCF cycles and timer data found in the output file. @@ -653,24 +685,14 @@ def yield_figs(self, **kwargs): # pragma: no cover """ This function *generates* a predefined list of matplotlib figures with minimal input from the user. """ - tight_layout = kwargs.pop("tight_layout", True) + tight_layout = kwargs.pop("tight_layout", False) with_timer = kwargs.pop("with_timer", True) - self.seek(0) - icycle = -1 - while True: - gs_cycle = self.next_gs_scf_cycle() - if gs_cycle is None: break - icycle += 1 - yield gs_cycle.plot(title="SCF cycle #%d" % icycle, tight_layout=tight_layout, show=False) + for icycle, cycle in enumerate(self.get_all_gs_scf_cycles()): + yield cycle.plot(title="SCF cycle #%d" % icycle, tight_layout=tight_layout, show=False) - self.seek(0) - icycle = -1 - while True: - d2de_cycle = self.next_d2de_scf_cycle() - if d2de_cycle is None: break - icycle += 1 - yield d2de_cycle.plot(title="DFPT cycle #%d" % icycle, tight_layout=tight_layout, show=False) + for icycle, cycle in enumerate(self.get_all_d2de_scf_cycles()): + yield cycle.plot(title="DFPT cycle #%d" % icycle, tight_layout=tight_layout, show=False) if with_timer: self.seek(0) @@ -679,7 +701,6 @@ def yield_figs(self, **kwargs): # pragma: no cover except Exception: print("Abinit output files does not contain timopt data") - def compare_gs_scf_cycles(self, others, show=True): """ Produce and returns a list of matplotlib_ figure comparing the GS self-consistent @@ -758,6 +779,13 @@ def compare_d2de_scf_cycles(self, others, show=True): return figures + def get_panel(self): + """ + Build panel with widgets to interact with the Abinit output file either in a notebook or in panel app. + """ + from abipy.panels.outputs import AbinitOutputFilePanel + return AbinitOutputFilePanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to nbpath. If ``nbpath`` is None, a temporay file in the current @@ -973,10 +1001,11 @@ class OutNcFile(AbinitNcFile): produced at the end of the run. The netcdf variables can be accessed via instance attribute e.g. ``outfile.ecut``. Provides integration with ipython_. """ + # TODO: This object is deprecated def __init__(self, filepath): - super(OutNcFile, self).__init__(filepath) + super().__init__(filepath) self.reader = NetcdfReader(filepath) - self._varscache= {k: None for k in self.reader.rootgrp.variables} + self._varscache = {k: None for k in self.reader.rootgrp.variables} def __dir__(self): """Ipython integration.""" @@ -984,13 +1013,13 @@ def __dir__(self): def __getattribute__(self, name): try: - return super(OutNcFile, self).__getattribute__(name) + return super().__getattribute__(name) except AttributeError: # Look in self._varscache - varscache = super(OutNcFile, self).__getattribute__("_varscache") + varscache = super().__getattribute__("_varscache") if name not in varscache: raise AttributeError("Cannot find attribute %s" % name) - reader = super(OutNcFile, self).__getattribute__("reader") + reader = super().__getattribute__("reader") if varscache[name] is None: varscache[name] = reader.read_value(name) return varscache[name] diff --git a/abipy/abio/robots.py b/abipy/abio/robots.py index 10ea8a6a8..e00c9ae33 100644 --- a/abipy/abio/robots.py +++ b/abipy/abio/robots.py @@ -3,11 +3,8 @@ This module defines the Robot BaseClass. Robots operates on multiple files and provide helper functions to plot the data e.g. convergence studies and to build pandas dataframes from the output files. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os -import six import inspect import itertools import numpy as np @@ -16,9 +13,9 @@ from functools import wraps from monty.string import is_string, list_strings from monty.termcolor import cprint -#from monty.functools import lazy_property from abipy.core.mixins import NotebookWriter -from abipy.tools import sort_and_groupby, getattrd, hasattrd #, duck +from abipy.tools.numtools import sort_and_groupby +from abipy.tools import duck from abipy.tools.plotting import (plot_xy_with_hue, add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, rotate_ticklabels, set_visible) @@ -70,6 +67,11 @@ def class_for_ext(cls, ext): if subcls.EXT in (ext, ext.upper()): return subcls + # anaddb.nc does not follow the extension rule... + if ext.lower() == "anaddb": + from abipy.dfpt.anaddbnc import AnaddbNcRobot as subcls + return subcls + raise ValueError("Cannot find Robot subclass associated to extension %s\n" % ext + "The list of supported extensions (case insensitive) is:\n%s" % str(cls.get_supported_extensions())) @@ -84,7 +86,7 @@ def from_dir(cls, top, walk=True, abspath=False): Args: top (str): Root directory - walk: if True, directories inside `top` are included as well. + walk: if True, directories inside `top` are included as well. abspath: True if paths in index should be absolute. Default: Relative to `top`. """ new = cls(*cls._open_files_in_dir(top, walk)) @@ -97,7 +99,7 @@ def from_dirs(cls, dirpaths, walk=True, abspath=False): Similar to `from_dir` but accepts a list of directories instead of a single directory. Args: - walk: if True, directories inside `top` are included as well. + walk: if True, directories inside `top` are included as well. abspath: True if paths in index should be absolute. Default: Relative to `top`. """ items = [] @@ -118,7 +120,7 @@ def from_dir_glob(cls, pattern, walk=True, abspath=False): Args: pattern: Pattern string - walk: if True, directories inside `top` are included as well. + walk: if True, directories inside `top` are included as well. abspath: True if paths in index should be absolute. Default: Relative to getcwd(). """ import glob @@ -153,6 +155,10 @@ def _open_files_in_dir(cls, top, walk): @classmethod def class_handles_filename(cls, filename): """True if robot class handles filename.""" + # Special treatment of AnaddbNcRobot + if cls.EXT == "anaddb" and os.path.basename(filename).lower() == "anaddb.nc": + return True + return (filename.endswith("_" + cls.EXT + ".nc") or filename.endswith("." + cls.EXT)) # This for .abo @@ -172,7 +178,9 @@ def from_files(cls, filenames, labels=None, abspath=False): for i, f in enumerate(filenames): try: abifile = abiopen(f) - except Exception: + except Exception as exc: + cprint("Exception while opening file: `%s`" % str(f), "red") + cprint(exc, "red") abifile = None if abifile is not None: @@ -288,7 +296,7 @@ def scan_dir(self, top, walk=True): Return: Number of files found. - """ + """ count = 0 for filepath, abifile in self.__class__._open_files_in_dir(top, walk): count += 1 @@ -500,7 +508,7 @@ def to_string(self, verbose=0): def _repr_html_(self): """Integration with jupyter_ notebooks.""" - return "
    \n{}\n
".format("\n".join("
  • %s
  • " % label for label, abifile in self.items())) + return '
      \n{}\n
    '.format("\n".join("
  • %s
  • " % label for label, abifile in self.items())) @property def abifiles(self): @@ -543,7 +551,7 @@ def has_different_structures(self, rtol=1e-05, atol=1e-08): # if callable(func_or_string): # return [func_or_string(abifile, *args, *kwargs) for abifile in self.abifiles] # else: - # return [getattrd(abifile, func_or_string)(*args, **kwargs) for abifile in self.abifiles] + # return [duck.getattrd(abifile, func_or_string)(*args, **kwargs) for abifile in self.abifiles] def is_sortable(self, aname, raise_exc=False): """ @@ -554,7 +562,7 @@ def is_sortable(self, aname, raise_exc=False): obj = None try: # abiifile.foo.bar? - obj = getattrd(self.abifiles[0], aname) + obj = duck.getattrd(self.abifiles[0], aname) except AttributeError: # abifile.params[aname] ? if hasattr(self.abifiles[0], "params") and aname in self.abifiles[0].params: @@ -604,8 +612,8 @@ def _sortby_labelfile_list(self, labelfile_list, func_or_string, reverse=False, # Assume string and attribute with the same name. # try in abifile.params if not hasattrd(abifile, func_or_string) self.is_sortable(func_or_string, raise_exc=True) - if hasattrd(self.abifiles[0], func_or_string): - items = [(label, abifile, getattrd(abifile, func_or_string)) for (label, abifile) in labelfile_list] + if duck.hasattrd(self.abifiles[0], func_or_string): + items = [(label, abifile, duck.getattrd(abifile, func_or_string)) for (label, abifile) in labelfile_list] else: items = [(label, abifile, abifile.params[func_or_string]) for (label, abifile) in labelfile_list] @@ -658,8 +666,8 @@ def group_and_sortby(self, hue, func_or_string): key = lambda t: hue(t[1]) else: # Assume string. - if hasattrd(self.abifiles[0], hue): - key = lambda t: getattrd(t[1], hue) + if duck.hasattrd(self.abifiles[0], hue): + key = lambda t: duck.getattrd(t[1], hue) else: # Try in abifile.params if hasattr(self.abifiles[0], "params") and hue in self.abifiles[0].params: @@ -685,7 +693,7 @@ def close(self): if self._do_close.pop(abifile.filepath, False): try: abifile.close() - except: + except Exception as exc: print("Exception while closing: ", abifile.filepath) print(exc) @@ -824,7 +832,7 @@ def _get_label(func_or_string): return str(func_or_string) @add_fig_kwargs - def plot_convergence(self, item, sortby=None, hue=None, ax=None, fontsize=12, **kwargs): + def plot_convergence(self, item, sortby=None, hue=None, ax=None, fontsize=8, **kwargs): """ Plot the convergence of ``item`` wrt the ``sortby`` parameter. Values can optionally be grouped by ``hue``. @@ -934,7 +942,7 @@ def plot_convergence_items(self, items, sortby=None, hue=None, fontsize=6, **kwa if callable(item): yvals = [float(item(gsr)) for gsr in self.abifiles] else: - yvals = [getattrd(gsr, item) for gsr in self.abifiles] + yvals = [duck.getattrd(gsr, item) for gsr in self.abifiles] if not is_string(params[0]): ax.plot(params, yvals, marker=marker, **kwargs) @@ -950,7 +958,7 @@ def plot_convergence_items(self, items, sortby=None, hue=None, fontsize=6, **kwa if callable(item): yvals = [float(item(gsr)) for gsr in g.abifiles] else: - yvals = [getattrd(gsr, item) for gsr in g.abifiles] + yvals = [duck.getattrd(gsr, item) for gsr in g.abifiles] label = "%s: %s" % (self._get_label(hue), g.hvalue) ax.plot(g.xvalues, yvals, label=label, marker=marker, **kwargs) @@ -1097,7 +1105,7 @@ def __len__(self): def __iter__(self): """Iterate over (label, abifile, xvalue).""" - return six.moves.zip(self.labels, self.abifiles, self.xvalues) + return zip(self.labels, self.abifiles, self.xvalues) #@lazy_property #def pretty_hvalue(self): @@ -1108,4 +1116,4 @@ def __iter__(self): # try: # return "%.3f" % self.hvalue # except: - # return str(self.hvalue) \ No newline at end of file + # return str(self.hvalue) diff --git a/abipy/abio/tests/test_abivars.py b/abipy/abio/tests/test_abivars.py index df6429773..3edd7bc3e 100644 --- a/abipy/abio/tests/test_abivars.py +++ b/abipy/abio/tests/test_abivars.py @@ -1,6 +1,4 @@ """Tests for abivars module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import os import abipy.data as abidata diff --git a/abipy/abio/tests/test_abivars_db.py b/abipy/abio/tests/test_abivars_db.py index 1b6a701a0..cd6cbb609 100644 --- a/abipy/abio/tests/test_abivars_db.py +++ b/abipy/abio/tests/test_abivars_db.py @@ -1,6 +1,4 @@ """Tests for htc.FilesFile.""" -from __future__ import print_function, division, unicode_literals - import sys from abipy.core.testing import AbipyTest @@ -32,7 +30,7 @@ def test_database(self): #assert len(database.json_dumps_varnames()) for setname in [ - "basic", "rlx", "gstate", "eph", "ffield", "paral", "gw", "dfpt", + "basic", "rlx", "gstate", "eph", "ffield", "paral", "gw", "dfpt", "geo", "bse", "dev", "paw", "dmft", "files", "internal", "w90"]: assert database.vars_with_varset(setname) @@ -69,3 +67,9 @@ def test_database(self): ecut_var = docvar("ecut") assert ecut_var.name == "ecut" + assert ecut_var.executable == "abinit" + + elaflag = docvar("elaflag", executable="anaddb") + assert elaflag.name == "elaflag" + assert elaflag.executable == "anaddb" + assert str(elaflag._repr_html_()) diff --git a/abipy/abio/tests/test_decorators.py b/abipy/abio/tests/test_decorators.py index ab9204c70..9d7cc310a 100644 --- a/abipy/abio/tests/test_decorators.py +++ b/abipy/abio/tests/test_decorators.py @@ -1,6 +1,4 @@ # coding: utf-8 -from __future__ import unicode_literals, division, print_function - import sys import abipy.data as abidata import abipy.abilab as abilab diff --git a/abipy/abio/tests/test_factories.py b/abipy/abio/tests/test_factories.py index 245b0634f..973b3a058 100644 --- a/abipy/abio/tests/test_factories.py +++ b/abipy/abio/tests/test_factories.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals, division, print_function - import abipy.data as abidata import abipy.abilab as abilab @@ -43,9 +41,11 @@ def test_gs_input(self): inp = gs_input(self.si_structure, self.si_pseudo, kppa=None, ecut=2, spin_mode="unpolarized") self.abivalidate_input(inp) - if False: # write_inputs_to_json: - with open('gs_input.json', mode='w') as fp: - json.dump(inp.as_dict(), fp, indent=2) + if False: + print("Updating json reference files.") + #with open('gs_input.json', mode='w') as fp: + # json.dump(inp.as_dict(), fp, indent=2) + self.assertIn('scf', inp.runlevel) self.assertIn('ground_state', inp.runlevel) self.assert_input_equality('gs_input.json', inp) @@ -56,11 +56,12 @@ def test_ebands_input(self): scf_inp, nscf_inp = multi.split_datasets() - if False: # write_inputs_to_json: - with open('scf_input.json', mode='w') as fp: - json.dump(scf_inp.as_dict(), fp, indent=2) - with open('nscf_input.json', mode='w') as fp: - json.dump(nscf_inp.as_dict(), fp, indent=2) + if False: + print("Updating json reference files.") + #with open('scf_input.json', mode='w') as fp: + # json.dump(scf_inp.as_dict(), fp, indent=2) + #with open('nscf_input.json', mode='w') as fp: + # json.dump(nscf_inp.as_dict(), fp, indent=2) self.assertIn('bands', nscf_inp.runlevel) self.assertIn('nscf', nscf_inp.runlevel) @@ -83,8 +84,6 @@ def test_ebands_input(self): assert len(multi_dos) == 4 self.assert_equal(multi_dos.get("iscf"), [None, -2, -2, -2]) - - def test_ion_ioncell_relax_input(self): """Testing ion_ioncell_relax_input factory.""" multi = ion_ioncell_relax_input(self.si_structure, self.si_pseudo, kppa=10, ecut=2) @@ -148,7 +147,6 @@ def test_g0w0_with_ppmodel_inputs(self): flow.register_work(G0W0Work(scf_input, nscf_input, scr_input, sigma_input)) assert flow.build_and_pickle_dump(abivalidate=True) == 0 - # The default value of `shifts` changed in v0.3 from (0.5, 0.5, 0.5) to (0.0, 0.0, 0.0) multi = g0w0_with_ppmodel_inputs(self.si_structure, self.si_pseudo, scf_kppa, nscf_nband, ecuteps, ecutsigx, @@ -272,14 +270,15 @@ def test_phonons_from_gsinput(self): inp_ph_q_pert_2 = multi.filter_by_tags(PH_Q_PERT)[10] if False: - with open('phonons_from_gsinput_ddk.json', mode='w') as fp: - json.dump(inp_ddk.as_dict(), fp, indent=2) - with open('phonons_from_gsinput_dde.json', mode='w') as fp: - json.dump(inp_dde.as_dict(), fp, indent=2) - with open('phonons_from_gsinput_ph_q_pert_1.json', mode='w') as fp: - json.dump(inp_ph_q_pert_1.as_dict(), fp, indent=2) - with open('phonons_from_gsinput_ph_q_pert_2.json', mode='w') as fp: - json.dump(inp_ph_q_pert_2.as_dict(), fp, indent=2) + print("Updating json reference files.") + #with open('phonons_from_gsinput_ddk.json', mode='w') as fp: + # json.dump(inp_ddk.as_dict(), fp, indent=2) + #with open('phonons_from_gsinput_dde.json', mode='w') as fp: + # json.dump(inp_dde.as_dict(), fp, indent=2) + #with open('phonons_from_gsinput_ph_q_pert_1.json', mode='w') as fp: + # json.dump(inp_ph_q_pert_1.as_dict(), fp, indent=2) + #with open('phonons_from_gsinput_ph_q_pert_2.json', mode='w') as fp: + # json.dump(inp_ph_q_pert_2.as_dict(), fp, indent=2) self.assert_input_equality('phonons_from_gsinput_ddk.json', inp_ddk) self.assert_input_equality('phonons_from_gsinput_dde.json', inp_dde) @@ -301,7 +300,6 @@ def test_phonons_from_gsinput(self): self.assert_input_equality('phonons_from_gsinput_ph_q_pert_1.json', inp_ph_q_pert_1_obj) self.assert_input_equality('phonons_from_gsinput_ph_q_pert_2.json', inp_ph_q_pert_2_obj) - def test_elastic_inputs_from_gsinput(self): """Testing elastic_inputs_from_gsinput.""" gs_inp = gs_input(self.si_structure, self.si_pseudo, kppa=None, ecut=2, spin_mode="unpolarized") @@ -365,7 +363,6 @@ def test_ioncell_relax_from_gsinput(self): self.assertMSONable(factory_obj) icrelax_input_obj = factory_obj.build_input(gs_inp) - def test_hybrid_oneshot_input(self): """Testing hybrid_oneshot_input.""" from abipy.abio.factories import hybrid_oneshot_input @@ -388,8 +385,9 @@ def test_scf_for_phonons(self): self.abivalidate_input(scf_inp) if False: - with open('scf_for_phonons.json', mode='w') as fp: - json.dump(scf_inp.as_dict(), fp, indent=2) + print("Updating json reference files.") + #with open('scf_for_phonons.json', mode='w') as fp: + # json.dump(scf_inp.as_dict(), fp, indent=2) self.assert_input_equality('scf_for_phonons.json', scf_inp) @@ -417,11 +415,52 @@ def test_dte_from_gsinput(self): inp2 = multi[5] if False: - with open('dte_from_gsinput_1.json', mode='w') as fp: - json.dump(inp1.as_dict(), fp, indent=2) - with open('dte_from_gsinput_2.json', mode='w') as fp: - json.dump(inp2.as_dict(), fp, indent=2) + print("Updating json reference files.") + #with open('dte_from_gsinput_1.json', mode='w') as fp: + # json.dump(inp1.as_dict(), fp, indent=2) + #with open('dte_from_gsinput_2.json', mode='w') as fp: + # json.dump(inp2.as_dict(), fp, indent=2) self.assert_input_equality('dte_from_gsinput_1.json', inp1) self.assert_input_equality('dte_from_gsinput_2.json', inp2) + def test_dfpt_from_gsinput(self): + """Testing phonons_from_gsinput""" + pseudos = [self.ga_pseudo.pseudo_with_symbol('Ga'), self.n_pseudo.pseudo_with_symbol('N')] + gs_inp = gs_input(self.gan_structure, pseudos, kppa=None, ecut=2, + spin_mode="unpolarized", smearing=None) + # dte calculations only work with selected values of ixc + gs_inp['ixc'] = 7 + multi = dfpt_from_gsinput(gs_inp, ph_ngqpt=[4, 4, 4], do_ddk=True, do_dde=True, do_strain=True, + do_dte=True, ph_tol=None, ddk_tol=None, dde_tol=None) + self.abivalidate_multi(multi) + + from abipy.abio.input_tags import DDK, DDE, PH_Q_PERT, STRAIN, DTE + inp_ddk = multi.filter_by_tags(DDK)[0] + inp_dde = multi.filter_by_tags(DDE)[0] + inp_ph_q_pert_1 = multi.filter_by_tags(PH_Q_PERT)[0] + inp_ph_q_pert_2 = multi.filter_by_tags(PH_Q_PERT)[10] + inp_strain = multi.filter_by_tags(STRAIN)[0] + inp_dte = multi.filter_by_tags(DTE)[0] + + if False: + print("Updating json reference files.") + #with open('dfpt_from_gsinput_ddk.json', mode='w') as fp: + # json.dump(inp_ddk.as_dict(), fp, indent=2) + #with open('dfpt_from_gsinput_dde.json', mode='w') as fp: + # json.dump(inp_dde.as_dict(), fp, indent=2) + #with open('dfpt_from_gsinput_ph_q_pert_1.json', mode='w') as fp: + # json.dump(inp_ph_q_pert_1.as_dict(), fp, indent=2) + #with open('dfpt_from_gsinput_ph_q_pert_2.json', mode='w') as fp: + # json.dump(inp_ph_q_pert_2.as_dict(), fp, indent=2) + #with open('dfpt_from_gsinput_strain.json', mode='w') as fp: + # json.dump(inp_strain.as_dict(), fp, indent=2) + #with open('dfpt_from_gsinput_dte.json', mode='w') as fp: + # json.dump(inp_dte.as_dict(), fp, indent=2) + + self.assert_input_equality('dfpt_from_gsinput_ddk.json', inp_ddk) + self.assert_input_equality('dfpt_from_gsinput_dde.json', inp_dde) + self.assert_input_equality('dfpt_from_gsinput_ph_q_pert_1.json', inp_ph_q_pert_1) + self.assert_input_equality('dfpt_from_gsinput_ph_q_pert_2.json', inp_ph_q_pert_2) + self.assert_input_equality('dfpt_from_gsinput_strain.json', inp_strain) + self.assert_input_equality('dfpt_from_gsinput_dte.json', inp_dte) diff --git a/abipy/abio/tests/test_inputs.py b/abipy/abio/tests/test_inputs.py index ec8e19030..c0784e07e 100644 --- a/abipy/abio/tests/test_inputs.py +++ b/abipy/abio/tests/test_inputs.py @@ -1,6 +1,4 @@ """Tests for input module""" -from __future__ import print_function, division, unicode_literals - import os import numpy as np import abipy.data as abidata @@ -58,15 +56,15 @@ def test_api(self): assert "foo" not in inp inp.set_spell_check(True) - inp["ecut" ] = 1 + inp["ecut"] = 1 assert inp.get("ecut") == 1 and len(inp) == 1 and "ecut" in inp.keys() and "foo" not in inp # Default is kptopt 1 assert inp.uses_ktimereversal - assert inp.mnemonics == False + assert not inp.mnemonics inp.set_mnemonics(True) - assert inp.mnemonics == True + assert inp.mnemonics # Test to_string assert inp.to_string(sortmode="a", with_structure=True, with_pseudos=True) @@ -176,6 +174,21 @@ def test_helper_functions(self): inp.set_kmesh(ngkpt=(1, 2, 3), shiftk=(1, 2, 3, 4, 5, 6)) assert inp["kptopt"] == 1 and inp["nshiftk"] == 2 assert inp.uses_ktimereversal + ngkpt, shiftk = inp.get_ngkpt_shiftk() + assert ngkpt.tolist() == [1, 2, 3] + assert len(shiftk) == 2 and shiftk.ravel().tolist() == [1, 2, 3, 4, 5, 6] + + inp.pop("ngkpt") + kptrlatt = [1, 0, 0, 0, 4, 0, 0, 0, 8] + shiftk = (0.5, 0.0, 0.0) + inp.set_vars(kptrlatt=kptrlatt, nshiftk=1, shiftk=shiftk) + ngkpt, shiftk = inp.get_ngkpt_shiftk() + assert ngkpt.tolist() == [1, 4, 8] + assert len(shiftk) == 1 and shiftk.ravel().tolist() == [0.5, 0.0, 0.0] + + inp.set_vars(kptrlatt=[1, 2, 0, 0, 4, 0, 0, 0, 8], nshiftk=1, shiftk=shiftk) + ngkpt, shiftk = inp.get_ngkpt_shiftk() + assert ngkpt is None inp.set_gamma_sampling() assert inp["kptopt"] == 1 and inp["nshiftk"] == 1 @@ -208,7 +221,7 @@ def test_helper_functions(self): prod_inps = inp.product("ngkpt", "tsmear", [[2, 2, 2], [4, 4, 4]], [0.1, 0.2, 0.3]) assert len(prod_inps) == 6 assert prod_inps[0]["ngkpt"] == [2, 2, 2] and prod_inps[0]["tsmear"] == 0.1 - assert prod_inps[-1]["ngkpt"] == [4, 4, 4] and prod_inps[-1]["tsmear"] == 0.3 + assert prod_inps[-1]["ngkpt"] == [4, 4, 4] and prod_inps[-1]["tsmear"] == 0.3 inp["kptopt"] = 4 assert not inp.uses_ktimereversal @@ -310,7 +323,7 @@ def test_abinit_calls(self): assert pert.idir == 1 and (pert.idir, pert.ipert) == (1, 1) and all(c == 0 for c in pert.qpt) irred_perts = inp_gan.abiget_irred_phperts(qpt=(0.5, 0, 0)) - print(irred_perts) + #print(irred_perts) assert len(irred_perts) == 6 irred_perts_values = [{'idir': 1, 'ipert': 1, 'qpt': [0.5, 0.0, 0.0]}, {'idir': 2, 'ipert': 1, 'qpt': [0.5, 0.0, 0.0]}, @@ -357,13 +370,48 @@ def test_dfpt_methods(self): tolvrs=1.0e-10, ) - # qpt is not in gs_inp and not passed to method. - with self.assertRaises(ValueError): - gs_inp.abiget_irred_phperts() + # Test make_nscf_kptopt0_input + nscf_inp = gs_inp.make_nscf_kptopt0_input(kpts=[1,2,3,4,5,6]) + assert "ngkpt" not in nscf_inp and "shiftk" not in nscf_inp + assert nscf_inp["kptopt"] == 0 and nscf_inp["nkpt"] == 2 and nscf_inp["iscf"] == -2 + + # Test make_ebands_input + nscf_inp = gs_inp.make_ebands_input(ndivsm=3, tolwfr=1e-5) + assert "ngkpt" not in nscf_inp and "shiftk" not in nscf_inp + assert nscf_inp["iscf"] == -2 and nscf_inp["tolwfr"] == 1e-5 + assert nscf_inp["nband"] == gs_inp["nband"] + 10 + + # Test make_edos_input + ngkpt = [4, 4, 4] + shiftk = [(0.5, 0.5, 0.5)] + dos_input = gs_inp.make_edos_input(ngkpt=ngkpt, shiftk=shiftk, nscf_nband=9) + self.assert_equal(dos_input["ngkpt"], ngkpt) + self.assert_equal(dos_input["shiftk"], np.array(shiftk)) + assert dos_input["nshiftk"] == 1 + assert dos_input["iscf"] == -2 and dos_input["tolwfr"] == 1e-20 + assert dos_input["nband"] == 9 + + # Test make_dfpt_effmass_input + multi = gs_inp.make_dfpt_effmass_input(kpts=[0, 0, 0, 0.5, 0, 0], effmass_bands_f90=[1, 4, 5, 5]) + assert len(multi) == 3 + assert all(inp["kptopt"] == 0 for inp in multi) + assert all(inp["nkpt"] == 2 for inp in multi) + + inp0, inp1, inp2 = multi + assert inp0["iscf"] == -2 + assert inp1["rfelfd"] == 2 and inp1["efmas"] == 1 and inp1["efmas_calc_dirs"] == 1 and inp1["efmas_n_dirs"] == 7 + assert inp2["eph_frohlichm"] == 1 and inp2["eph_task"] == 6 and inp2["asr"] == 2 and inp2["chneut"] == 1 + + # Validate with Abinit + self.abivalidate_multi(multi) ################ # Phonon methods ################ + # qpt is not in gs_inp and not passed to method. + with self.assertRaises(ValueError): + gs_inp.abiget_irred_phperts() + with self.assertRaises(gs_inp.Error): try: ddk_inputs = gs_inp.make_ddk_inputs(tolerance={"tolfoo": 1e10}) @@ -415,6 +463,12 @@ def test_dfpt_methods(self): # Validate with Abinit self.abivalidate_multi(ddk_inputs) + oneshot_ddk_inputs = gs_inp.make_ddk_inputs(kptopt=3, only_vk=True) + for inp in oneshot_ddk_inputs: + assert inp["kptopt"] == 3 + assert inp["nstep"] == 1 + assert inp["nline"] == 1 + ############# # DDE methods ############# @@ -452,7 +506,7 @@ def test_dfpt_methods(self): # Non-linear methods #################### if self.has_abinit(version='8.3.2'): - dte_inputs = gs_inp.make_dte_inputs(phonon_pert=True, skip_permutations=True) + dte_inputs = gs_inp.make_dte_inputs(phonon_pert=True, skip_permutations=True, ixc=3) print("dte inputs\n", dte_inputs) assert len(dte_inputs) == 8 assert np.all(dte_inputs[0]["d3e_pert2_dir"] == [1, 0, 0]) @@ -462,7 +516,7 @@ def test_dfpt_methods(self): # Validate with Abinit self.abivalidate_multi(dte_inputs) - def TestInputCheckSum(self): + def test_input_check_sum(self): """Testing the hash method of AbinitInput""" inp = ebands_input(abidata.cif_file("si.cif"), abidata.pseudos("14si.pspnc"), kppa=10, ecut=2)[0] inp_cs = inp.variable_checksum() @@ -492,7 +546,7 @@ def test_api(self): multi.addnew_from(0) assert multi.ndtset == 2 and multi[0] is not multi[1] - assert multi[0].structure == multi[1].structure + assert multi[0].structure == multi[1].structure assert multi[0].structure is not multi[1].structure multi.set_vars(ecut=2) @@ -624,23 +678,11 @@ def test_phbands_and_dos(self): assert "qpath" in inp_loto assert inp_loto["nph2l"] == 3 self.assert_almost_equal(inp_loto["qph2l"], - [[ 0. , 0.184959 , 0. , 0.], - [ 0.13871925, 0.13871925, 0. , 0.], - [ 0.0924795 , 0.0924795 , 0.0924795, 0.]]) + [[0. , 0.184959 , 0. , 0.], + [0.13871925, 0.13871925, 0. , 0.], + [0.0924795 , 0.0924795 , 0.0924795, 0.]]) self.abivalidate_input(inp_loto) - def test_thermo(self): - """Testing the thermodynamics constructor""" - anaddb_input = AnaddbInput.thermo(self.structure, ngqpt=(40, 40, 40), nqsmall=20) - assert str(anaddb_input) - for var in ('thmtol', 'ntemper', 'temperinc', 'thmtol'): - assert anaddb_input[var] >= 0 - for flag in ('ifcflag', 'thmflag'): - assert anaddb_input[flag] == 1 - - self.serialize_with_pickle(anaddb_input, test_eq=False) - anaddb_input.deepcopy() - def test_modes(self): """Testing modes constructor""" anaddb_input = AnaddbInput.modes(self.structure) @@ -666,13 +708,53 @@ def test_ifc(self): def test_piezo_elastic(self): """Testing piezo_elastic constructor.""" anaddb_input = AnaddbInput.piezo_elastic(self.structure, stress_correction=True) - assert anaddb_input["elaflag"] == 5 and anaddb_input["piezoflag"] == 3 and anaddb_input["asr"] == 0 + assert anaddb_input["elaflag"] == 5 and anaddb_input["piezoflag"] == 3 and anaddb_input["asr"] == 2 + assert anaddb_input["instrflag"] == 1 and len(anaddb_input.comment) > 0 self.abivalidate_input(anaddb_input) - anaddb_input = AnaddbInput.piezo_elastic(self.structure, stress_correction=False) + anaddb_input = AnaddbInput.piezo_elastic(self.structure, stress_correction=False, asr=0) assert anaddb_input["elaflag"] == 3 and anaddb_input["piezoflag"] == 3 and anaddb_input["chneut"] == 1 + assert anaddb_input["instrflag"] == 1 and anaddb_input["asr"] == 0 + self.abivalidate_input(anaddb_input) + + def test_dfpt(self): + """Testing dfpt constructor.""" + anaddb_input = AnaddbInput.dfpt(self.structure, stress_correction=True, relaxed_ion=True, piezo=True, dde=True, + strain=True, dte=False) + assert anaddb_input["elaflag"] == 5 + assert anaddb_input["dieflag"] == 3 + assert anaddb_input["piezoflag"] == 7 + self.abivalidate_input(anaddb_input) + + anaddb_input = AnaddbInput.dfpt(self.structure, stress_correction=True, relaxed_ion=False, piezo=True, dde=True, + strain=True, dte=False) + assert anaddb_input["elaflag"] == 1 + assert anaddb_input["dieflag"] == 2 + assert anaddb_input["piezoflag"] == 1 + self.abivalidate_input(anaddb_input) + + anaddb_input = AnaddbInput.dfpt(self.structure, stress_correction=False, relaxed_ion=True, piezo=True, dde=False, + strain=True, dte=False) + assert anaddb_input["elaflag"] == 3 + assert anaddb_input["dieflag"] == 0 + assert anaddb_input["piezoflag"] == 3 self.abivalidate_input(anaddb_input) + ndivsm = 1 + nqsmall = 3 + ngqpt = (4, 4, 4) + anaddb_input = AnaddbInput.dfpt(self.structure, ngqpt=ngqpt, ndivsm=ndivsm, nqsmall=nqsmall, asr=0, dos_method="tetra") + assert anaddb_input['ifcflag'] == 1 + self.abivalidate_input(anaddb_input) + + anaddb_input = AnaddbInput.dfpt(self.structure, dte=True) + assert anaddb_input['nlflag'] == 3 + assert anaddb_input['alphon'] == 0 + + anaddb_input = AnaddbInput.dfpt(self.structure, raman=True) + assert anaddb_input['nlflag'] == 1 + assert anaddb_input['ramansr'] == 1 + class TestCut3DInput(AbipyTest): """Unit tests for AbinitInput.""" diff --git a/abipy/abio/tests/test_outputs.py b/abipy/abio/tests/test_outputs.py index dfc6cc26a..754e2e05b 100644 --- a/abipy/abio/tests/test_outputs.py +++ b/abipy/abio/tests/test_outputs.py @@ -1,7 +1,5 @@ # coding: utf-8 """Test for output files""" -from __future__ import unicode_literals, division, print_function - import os import abipy.data as abidata @@ -65,8 +63,11 @@ def test_gs_output(self): str(abo.events) gs_cycle = abo.next_gs_scf_cycle() assert gs_cycle is not None + assert len(abo.get_all_gs_scf_cycles()) == 1 + if self.has_matplotlib(): assert gs_cycle.plot(show=False) + abo.seek(0) assert abo.next_d2de_scf_cycle() is None @@ -79,6 +80,9 @@ def test_gs_output(self): timer.plot_all(show=False) abo.plot(show=False) + if self.has_panel(): + assert hasattr(abo.get_panel(), "show") + if self.has_nbformat(): abo.write_notebook(nbpath=self.get_tmpname(text=True)) timer.write_notebook(nbpath=self.get_tmpname(text=True)) @@ -87,32 +91,38 @@ def test_ph_output(self): """Testing AbinitOutputFile with phonon calculations.""" abo_path = abidata.ref_file("refs/gs_dfpt.abo") with AbinitOutputFile(abo_path) as abo: - repr(abo); str(abo) - assert abo.to_string(verbose=2) - - assert abo.version == "8.3.2" - assert abo.run_completed - assert not abo.dryrun_mode - assert abo.ndtset == 3 - assert abo.has_same_initial_structures - assert abo.has_same_final_structures - assert len(abo.initial_structures) == 3 - assert abo.initial_structure is not None - assert abo.initial_structure.abi_spacegroup is not None - assert abo.initial_structure == abo.final_structure - - gs_cycle = abo.next_gs_scf_cycle() - assert gs_cycle is not None - ph_cycle = abo.next_d2de_scf_cycle() - assert ph_cycle is not None - if self.has_matplotlib(): + repr(abo); str(abo) + assert abo.to_string(verbose=2) + + assert abo.version == "8.3.2" + assert abo.run_completed + assert not abo.dryrun_mode + assert abo.ndtset == 3 + assert abo.has_same_initial_structures + assert abo.has_same_final_structures + assert len(abo.initial_structures) == 3 + assert abo.initial_structure is not None + assert abo.initial_structure.abi_spacegroup is not None + assert abo.initial_structure == abo.final_structure + + gs_cycle = abo.next_gs_scf_cycle() + assert gs_cycle is not None + + ph_cycle = abo.next_d2de_scf_cycle() + assert ph_cycle is not None + + if self.has_matplotlib(): assert ph_cycle.plot(show=False) assert abo.compare_d2de_scf_cycles([abo_path], show=False) abo.plot(show=False) - if self.has_nbformat(): + if self.has_nbformat(): abo.write_notebook(nbpath=self.get_tmpname(text=True)) + # Call these functions at end to avoid seek(0). + assert len(abo.get_all_gs_scf_cycles()) == 1 + assert len(abo.get_all_d2de_scf_cycles()) == 3 + def test_dryrun_output(self): """Testing AbinitOutputFile with file produced in dry-run mode.""" with abilab.abiopen(abidata.ref_file("refs/dryrun.abo")) as abo: diff --git a/abipy/abio/tests/test_robots.py b/abipy/abio/tests/test_robots.py index b89bd51e4..0d5a85689 100644 --- a/abipy/abio/tests/test_robots.py +++ b/abipy/abio/tests/test_robots.py @@ -1,7 +1,5 @@ # coding: utf-8 """Test for Robots""" -from __future__ import unicode_literals, division, print_function - import sys import os import abipy.data as abidata diff --git a/abipy/abio/tests/test_variable.py b/abipy/abio/tests/test_variable.py index f614f67bd..0555b2d4f 100644 --- a/abipy/abio/tests/test_variable.py +++ b/abipy/abio/tests/test_variable.py @@ -1,6 +1,4 @@ """Tests for variable module.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.data as abidata from abipy.core.testing import AbipyTest diff --git a/abipy/abio/timer.py b/abipy/abio/timer.py index b28d2f31c..93dfb2bf0 100644 --- a/abipy/abio/timer.py +++ b/abipy/abio/timer.py @@ -2,8 +2,6 @@ This module provides objects for extracting timing data from the ABINIT output files It also provides tools to analyze and to visualize the parallel efficiency. """ -from __future__ import print_function, division, unicode_literals, absolute_import - from abipy.core.mixins import NotebookWriter from abipy.flowtk import AbinitTimerParser as _Parser diff --git a/abipy/abio/variable.py b/abipy/abio/variable.py index aece7757b..ba942451a 100644 --- a/abipy/abio/variable.py +++ b/abipy/abio/variable.py @@ -1,7 +1,4 @@ -from __future__ import print_function, division, absolute_import #, unicode_literals - import string -import warnings import collections import numpy as np @@ -19,46 +16,14 @@ _SPECIAL_CONVERSION = zip(_INTERNAL_DATASET_INDICES, _SPECIAL_DATASET_INDICES) _UNITS = { - 'bohr' : 1.0, - 'angstrom' : 1.8897261328856432, - 'hartree' : 1.0, - 'Ha' : 1.0, - 'eV' : 0.03674932539796232, + 'bohr': 1.0, + 'angstrom': 1.8897261328856432, + 'hartree': 1.0, + 'Ha': 1.0, + 'eV': 0.03674932539796232, } -#def convert_number(value): -# """ -# Converts some object to a float or a string. -# If the argument is an integer or a float, returns the same object. -# If the argument is a string, tries to convert to an integer, -# then to a float. -# The string '1.0d-03' will be treated the same as '1.0e-03' -# """ -# if isinstance(value, (float, int)): -# return value -# -# elif isinstance(value, str): -# -# if is_number(value): -# try: -# val = int(value) -# except ValueError: -# val = float(value) -# return val -# -# else: -# val = value.replace('d', 'e') -# if is_number(val): -# val = float(val) -# return val -# else: -# raise ValueError('convert_number failed') -# -# else: -# raise ValueError('convert_number failed') - - class InputVariable(object): """ An Abinit input variable. @@ -72,7 +37,6 @@ def __init__(self, name, value, units='', valperline=3): # Maximum number of values per line. self.valperline = valperline if name in ['bdgw']: - #TODO Shouldn't do that self.valperline = 2 if (is_iter(self.value) and isinstance(self.value[-1], str) and self.value[-1] in _UNITS): @@ -118,14 +82,12 @@ def __str__(self): # By default, do not impose a number of decimal points floatdecimal = 0 - # For some inputs, impose number of decimal points... + # For some inputs, enforce number of decimal points... if any(inp in var for inp in ('xred', 'xcart', 'rprim', 'qpt', 'kpt')): - #TODO Shouldn't do that floatdecimal = 16 # ...but not for those if any(inp in var for inp in ('ngkpt', 'kptrlatt', 'ngqpt', 'ng2qpt')): - #TODO Shouldn't do that floatdecimal = 0 if isinstance(value, np.ndarray): @@ -143,12 +105,6 @@ def __str__(self): line += self.format_list2d(value, floatdecimal) else: - # Maximum number of values per line. - #valperline = 3 - #if any(inp in var for inp in ['bdgw']): - # #TODO Shouldn't do that - # valperline = 2 - line += self.format_list(value, floatdecimal) # scalar values @@ -172,7 +128,7 @@ def format_scalar(self, val, floatdecimal=0): try: fval = float(val) - except: + except Exception: return sval if fval == 0 or (abs(fval) > 1e-3 and abs(fval) < 1e4): @@ -203,7 +159,7 @@ def format_list2d(self, values, floatdecimal=0): for v in lvals: float(v) type_all = float - except: + except Exception: type_all = str # Determine the format @@ -250,118 +206,6 @@ def format_list(self, values, floatdecimal=0): return line.rstrip('\n') - #@staticmethod - #def string_to_value(sval): - # """ - # Interpret a string variable and attempt to return a value of the - # appropriate type. If all else fails, return the initial string. - # """ - # value = None - - # try: - # for part in sval.split(): - - # if '*' in part: - # # cases like istwfk *1 - # if part[0] == '*': - # value = None - # break - - # # cases like acell 3*3.52 - # else: - # n = int(part.split('*')[0]) - # f = convert_number(part.split('*')[1]) - # if value is None: - # value = [] - # value += n * [f] - # continue - - # # Fractions - # if '/' in part: - # (num, den) = (float(part.split('/')[i]) for i in range(2)) - # part = num / den - - # # Unit - # if part in _UNITS.keys(): - - # if value is None: - # warnings.warn("Could not apply the unit token '%s'." % part) - # elif isinstance(value, list): - # value.append(part) - # else: - # value = [value, part] - - # # Convert - # if False: - # if isinstance(value, list): - # for i in range(len(value)): - # value[i] *= _UNITS[part] - # elif isinstance(value, str): - # value = None - # break - # else: - # value *= _UNITS[part] - - # continue - - # # Convert - # try: - # val = convert_number(part) - # except: - # val = part - - # if value is None: - # value = val - # elif isinstance(value, list): - # value.append(val) - # else: - # value = [value, val] - # except: - # value = None - - # if value is None: - # value = sval - - # return value - - #@classmethod - #def from_str(cls, bigstring): - # """Return an instance from a string declaration.""" - # parts = bigstring.split() - - # # Perform checks on the string - # if len(parts) < 2 or (parts[-1] in _UNITS and len(parts) < 3): - # msg = '\n'.join(['Unable to initialize variable from string:', - # bigstring, 'not enough tokens.']) - # raise ValueError(msg) - # elif not parts[0].isalpha(): - # msg = '\n'.join(['Unable to initialize variable from string:', - # bigstring, 'no valid variable name found.']) - # raise ValueError(msg) - - # # Make the name - # name = parts.pop(0) - # #name = cls.declared_to_internal(name) - - # # Make the units - # if parts[-1] in _UNITS: - # units = parts.pop(-1) - # else: - # units = None - - # value = cls.string_to_value(' '.join(parts)) - - # return cls(name, value, units) - - -#def is_number(s): -# """Returns True if the argument can be made a float.""" -# try: -# float(s) -# return True -# except: -# return False - def is_iter(obj): """Return True if the argument is list-like.""" @@ -381,7 +225,7 @@ def flatten(iterable): iterator = stack.pop() else: if not isinstance(value, str) \ - and isinstance(value, collections.Iterable): + and isinstance(value, collections.abc.Iterable): stack.append(iterator) iterator = iter(value) else: diff --git a/abipy/benchmarks/__init__.py b/abipy/benchmarks/__init__.py index 6cd848175..a3b3ae907 100644 --- a/abipy/benchmarks/__init__.py +++ b/abipy/benchmarks/__init__.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import ast import types @@ -106,7 +104,7 @@ def build_and_pickle_dump(self, **kwargs): # (task, task.manager.qadapter.mpi_procs, task.manager.qadapter.omp_threads)) print("Total number of benchmarks: %d" % cnt) - return super(BenchmarkFlow, self).build_and_pickle_dump(**kwargs) + return super().build_and_pickle_dump(**kwargs) #def make_tarball(self): # self.make_tarfile(self, name=None, max_filesize=None, exclude_exts=None, exclude_dirs=None, verbose=0, **kwargs): @@ -213,7 +211,8 @@ def build_bench_main_parser(): parser.add_argument("--min-eff", default=None, type=float, help="Minimum parallel efficiency accepted. Default None.") parser.add_argument('--paw', default=False, action="store_true", help="Run PAW calculation if available") - parser.add_argument("-a", '--abivalidate', default=False, action="store_true", help="Call Abinit to validate input files and return") + parser.add_argument("-a", '--abivalidate', default=False, action="store_true", + help="Call Abinit to validate input files and return") parser.add_argument("-i", '--info', default=False, action="store_true", help="Show benchmark info and exit") parser.add_argument("-r", "--remove", default=False, action="store_true", help="Remove old flow workdir") diff --git a/abipy/benchmarks/_dfpt_phonon_tio2.py b/abipy/benchmarks/_dfpt_phonon_tio2.py index 1c7becab0..0548689a1 100755 --- a/abipy/benchmarks/_dfpt_phonon_tio2.py +++ b/abipy/benchmarks/_dfpt_phonon_tio2.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -"""Benchmark for phonon calculation with DFPT.""" -from __future__ import division, print_function, unicode_literals, absolute_import - +"""Benchmark for phonon calculation with DFPT.""" import sys import numpy as np import abipy.abilab as abilab @@ -21,7 +19,7 @@ def make_inputs(paw=False): # N=9 # Supercell and atoms - xcart= np.fromstring(""" + xcart = np.fromstring(""" 0.0000000000E+00 0.0000000000E+00 -4.2633349730E+00 3.7794522658E+00 3.7794522658E+00 -3.2803418097E+00 0.0000000000E+00 3.7794522658E+00 -3.6627278067E+00 @@ -57,7 +55,7 @@ def make_inputs(paw=False): structure = abilab.Structure.from_abivars( #acell="4.0 4.0 28.0 Angstrom", acell=abilab.ArrayWithUnit([4.0, 4.0, 28], "ang").to("bohr"), - rprim=np.eye(3), + rprim=np.eye(3), typat=[int(i) for i in "3 3 2 3 3 2 1 3 3 3 2 1 3 3 3 2 1 3 3 3 2 1 3 3 3 2 3 3 2".split()], znucl=[56, 22, 8], xcart=xcart, @@ -137,7 +135,7 @@ def main(options): if options.info: # print doc string and exit. print(__doc__) - return + return return build_flow(options) diff --git a/abipy/benchmarks/_runemall.py b/abipy/benchmarks/_runemall.py index 678233e41..05169a49e 100755 --- a/abipy/benchmarks/_runemall.py +++ b/abipy/benchmarks/_runemall.py @@ -3,8 +3,6 @@ This script runs all the python scripts located in this directory """ # pragma: no cover -from __future__ import print_function, division, unicode_literals - import sys import os import argparse diff --git a/abipy/benchmarks/_string5.py b/abipy/benchmarks/_string5.py index 055702974..e9035d2e7 100755 --- a/abipy/benchmarks/_string5.py +++ b/abipy/benchmarks/_string5.py @@ -4,8 +4,6 @@ Moving the proton from H2O to NH3 keeping O and H atoms fixed. Based on tutoparal/tstring_04.in """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import operator import numpy as np @@ -44,7 +42,7 @@ def make_input(): # pragma: no cover 2.9570301511E+00 5.5992672027E-02 -1.3560839453E-01""", sep=" ").reshape((-1,3)) structure = abilab.Structure.from_abivars( - acell = abilab.ArrayWithUnit([10, 5, 5], "ang").to("bohr"), + acell=abilab.ArrayWithUnit([10, 5, 5], "ang").to("bohr"), rprim=np.eye(3), typat=[1, 3, 3, 2, 3, 3, 3, 3], # Type of atoms (H2O + NH3 + H) znucl=[8.0, 7.0, 1.0], @@ -138,8 +136,7 @@ def build_flow(options): # pragma: no cover # print("wfoptalg:", wfoptalg, "done with MPI_PROCS:", mpi_procs, "and:", d) # inp = template.new_with_vars(d) # work.register_scf_task(inp, manager=manager) - - #flow.register_work(work) + #flow.register_work(work) return flow.allocate() diff --git a/abipy/benchmarks/bse_haydock.py b/abipy/benchmarks/bse_haydock.py index fa15fcb85..7a665b2b9 100755 --- a/abipy/benchmarks/bse_haydock.py +++ b/abipy/benchmarks/bse_haydock.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the parallel efficiency of the BSE code (Haydock method with model dielectric function)""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.data as abidata diff --git a/abipy/benchmarks/dfpt_autoparal_phonon.py b/abipy/benchmarks/dfpt_autoparal_phonon.py index a77ecc77a..547507de7 100755 --- a/abipy/benchmarks/dfpt_autoparal_phonon.py +++ b/abipy/benchmarks/dfpt_autoparal_phonon.py @@ -2,8 +2,6 @@ """ This benchmark compares the effective parallel efficiency with the one reported by autoparal. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.data as abidata diff --git a/abipy/benchmarks/dfpt_ddk.py b/abipy/benchmarks/dfpt_ddk.py index 1a02dda57..00d12e868 100755 --- a/abipy/benchmarks/dfpt_ddk.py +++ b/abipy/benchmarks/dfpt_ddk.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Benchmark for DDK calculations.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.data as abidata @@ -46,7 +44,6 @@ def make_inputs(paw=False): 0.5, 0.5, 0.5] ) - multi[0].set_vars( kptopt=1, # Automatic generation of k points with symmetries. tolvrs=1.0e-6, diff --git a/abipy/benchmarks/dfpt_phonon.py b/abipy/benchmarks/dfpt_phonon.py index 0eece9703..0c6337f50 100755 --- a/abipy/benchmarks/dfpt_phonon.py +++ b/abipy/benchmarks/dfpt_phonon.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Benchmark for phonon calculation with DFPT.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/eph_al.py b/abipy/benchmarks/eph_al.py index 5cbdf8d7b..d405fa566 100755 --- a/abipy/benchmarks/eph_al.py +++ b/abipy/benchmarks/eph_al.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Benchmark for electron-phonon calculations.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import numpy as np import abipy.abilab as abilab @@ -84,7 +82,7 @@ def make_flow_ephinp(options): # q-path for phonons and phonon linewidths. ph_ndivsm=20, ph_nqpath=3, - ph_qpath= [ + ph_qpath=[ 0 , 0 , 0, 0.5, 0 , 0, 0.5, 0.5, 0,], diff --git a/abipy/benchmarks/gs_au108.py b/abipy/benchmarks/gs_au108.py index 175a86652..c115387f6 100755 --- a/abipy/benchmarks/gs_au108.py +++ b/abipy/benchmarks/gs_au108.py @@ -3,8 +3,6 @@ Gold with 107 atoms. Gamma-point. GS calculations with paralkgb==1 and wfoptalg in [default, 1] """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import operator import numpy as np @@ -196,7 +194,7 @@ def build_flow(options): pconfs = [ dict(npkpt=1, npband=13, npfft=10), # 130 dict(npkpt=1, npband=26, npfft=10), # 260 - dict(npkpt=1, npband=65, npfft=8 ), # 520 + dict(npkpt=1, npband=65, npfft=8), # 520 dict(npkpt=1, npband=65, npfft=16), # 1040 ] diff --git a/abipy/benchmarks/gs_autoparal.py b/abipy/benchmarks/gs_autoparal.py index de340e0dd..d7cff4bb9 100755 --- a/abipy/benchmarks/gs_autoparal.py +++ b/abipy/benchmarks/gs_autoparal.py @@ -3,8 +3,6 @@ This benchmark uses paral_kgb=1 and compares the effective parallel efficiency with the one reported by autoparal. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/gs_febio3.py b/abipy/benchmarks/gs_febio3.py index 2ef4be11e..b862945d3 100755 --- a/abipy/benchmarks/gs_febio3.py +++ b/abipy/benchmarks/gs_febio3.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """GS+NSCF calculation for FeBiO3""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import numpy as np import abipy.abilab as abilab @@ -63,6 +61,7 @@ #iomode=3 ) + def make_inputs(options): structure = abilab.Structure.from_abivars(unit_cell) diff --git a/abipy/benchmarks/gs_istwfk.py b/abipy/benchmarks/gs_istwfk.py index e247c9806..fae80ab75 100755 --- a/abipy/benchmarks/gs_istwfk.py +++ b/abipy/benchmarks/gs_istwfk.py @@ -2,8 +2,6 @@ """ This benchmark compares GS calculations at the Gamma point done with istwfk in [1,2] """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/gs_kpara.py b/abipy/benchmarks/gs_kpara.py index 4b16f76b8..ef604b7d2 100755 --- a/abipy/benchmarks/gs_kpara.py +++ b/abipy/benchmarks/gs_kpara.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Benchmark for k-point parallelism.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/gs_mpifft.py b/abipy/benchmarks/gs_mpifft.py index cb9b8ecbc..ed3877b0a 100755 --- a/abipy/benchmarks/gs_mpifft.py +++ b/abipy/benchmarks/gs_mpifft.py @@ -1,7 +1,8 @@ #!/usr/bin/env python -"""Analyze the parallel efficiency of the MPI-FFT algorithsm in in the GS part. -Use paral_kgb=1 and fftalg_list = [312, 402, 401]""" -from __future__ import division, print_function, unicode_literals, absolute_import +""" +Analyze the parallel efficiency of the MPI-FFT algorithsm in in the GS part. +Use paral_kgb=1 and fftalg_list = [312, 402, 401] +""" import sys import abipy.abilab as abilab @@ -27,7 +28,7 @@ def make_input(paw=False): ecut = 24 inp.set_vars( ecut=ecut, - pawecutdg=ecut*2 if paw else None, + pawecutdg=ecut * 2 if paw else None, paral_kgb=1, nsppol=1, nband=28, diff --git a/abipy/benchmarks/gs_paralkgb.py b/abipy/benchmarks/gs_paralkgb.py index 28353ad48..ef82752f9 100755 --- a/abipy/benchmarks/gs_paralkgb.py +++ b/abipy/benchmarks/gs_paralkgb.py @@ -3,8 +3,6 @@ Benchmark paral_kgb=1 algorithm with wfoptalg in [default, 1]. default correspongs to the lobpcg algorithm, 1 enables the Chebyschev solver. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import operator import abipy.abilab as abilab @@ -21,8 +19,7 @@ def make_input(paw=False): Build and return an input file for GS calculations with paral_kgb=1 """ pseudos = abidata.pseudos("14si.pspnc", "8o.pspnc") - #if not paw else - #abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") + #if not paw else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") structure = abidata.structure_from_ucell("SiO2-alpha") inp = abilab.AbinitInput(structure, pseudos) diff --git a/abipy/benchmarks/gs_pureomp.py b/abipy/benchmarks/gs_pureomp.py index 928ff0981..2fb671ef6 100755 --- a/abipy/benchmarks/gs_pureomp.py +++ b/abipy/benchmarks/gs_pureomp.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the scalability of the OpenMP sections in the GS part. 1 k-point, cg method.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/gs_ti256.py b/abipy/benchmarks/gs_ti256.py index b40999f72..8b0614f4c 100755 --- a/abipy/benchmarks/gs_ti256.py +++ b/abipy/benchmarks/gs_ti256.py @@ -3,8 +3,6 @@ Titanium with 256 atoms and k-point sampling. GS calculations with paralkgb==1 and wfoptalg in [default, 1] """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import operator import numpy as np @@ -343,7 +341,7 @@ def build_flow(options): # Processor distribution. pconfs = [ - dict(npkpt=2, npband=8 , npfft=8 ), # 128 + dict(npkpt=2, npband=8 , npfft=8), # 128 dict(npkpt=2, npband=8 , npfft=16), # 256 dict(npkpt=2, npband=16, npfft=16), # 512 dict(npkpt=2, npband=16, npfft=32), # 1024 diff --git a/abipy/benchmarks/gs_uo2.py b/abipy/benchmarks/gs_uo2.py index 2e07776a4..659fa35fe 100755 --- a/abipy/benchmarks/gs_uo2.py +++ b/abipy/benchmarks/gs_uo2.py @@ -3,9 +3,6 @@ UO2 with 96 atoms. PAW and nsppol=2 GS calculations with paralkgb==1. Compare wfoptalg in [default, 1]. """ - -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import operator import numpy as np @@ -197,8 +194,8 @@ def build_flow(options): # Processor distribution. pconfs = [ - dict(npkpt=2, npband=8 , npfft=8 ), # 128 processeurs - dict(npkpt=2, npband=16, npfft=8 ), # 256 processeurs + dict(npkpt=2, npband=8 , npfft=8), # 128 processeurs + dict(npkpt=2, npband=16, npfft=8), # 256 processeurs dict(npkpt=2, npband=16, npfft=16), # 512 processeurs dict(npkpt=2, npband=16, npfft=32), # 1024 processeurs ] diff --git a/abipy/benchmarks/gs_useylm.py b/abipy/benchmarks/gs_useylm.py index fb6ca971d..762efc416 100755 --- a/abipy/benchmarks/gs_useylm.py +++ b/abipy/benchmarks/gs_useylm.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Compare GS calculations with NC pseudos performed with useylm in [0, 1].""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/gsio_paralkgb.py b/abipy/benchmarks/gsio_paralkgb.py index b0907938c..f06d48eeb 100755 --- a/abipy/benchmarks/gsio_paralkgb.py +++ b/abipy/benchmarks/gsio_paralkgb.py @@ -2,8 +2,6 @@ """ Benchmark IO sections with paral_kgb=1 algorithm (MPI-IO vs Netcdf) """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/moldyn1.py b/abipy/benchmarks/moldyn1.py index 946b4d4b2..e61cc8023 100755 --- a/abipy/benchmarks/moldyn1.py +++ b/abipy/benchmarks/moldyn1.py @@ -2,8 +2,6 @@ """ Benckmark for Molecular dynamics (based on tutoparal/Input/tmoldyn[1-3].in) """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import numpy as np import abipy.abilab as abilab diff --git a/abipy/benchmarks/moldyn5.py b/abipy/benchmarks/moldyn5.py index 7fcb1e011..c04c23679 100755 --- a/abipy/benchmarks/moldyn5.py +++ b/abipy/benchmarks/moldyn5.py @@ -2,8 +2,6 @@ """ Benckmark for Molecular dynamics (based on tutoparal/Input/tmoldyn5.in) """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import numpy as np import abipy.abilab as abilab diff --git a/abipy/benchmarks/rpa_optic.py b/abipy/benchmarks/rpa_optic.py index 9a2a12c41..8ffb77b9d 100755 --- a/abipy/benchmarks/rpa_optic.py +++ b/abipy/benchmarks/rpa_optic.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Benchmark for Optic calculations.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as data diff --git a/abipy/benchmarks/scr_hilbert.py b/abipy/benchmarks/scr_hilbert.py index 40b276825..01436f607 100755 --- a/abipy/benchmarks/scr_hilbert.py +++ b/abipy/benchmarks/scr_hilbert.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the parallel efficiency of the RPA code (hilbert transform, 60 frequencies and gwpara==2)""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.data as abidata @@ -35,7 +33,7 @@ def make_inputs(paw=False): gs, nscf, scr, sigma = multi.split_datasets() # This grid is the most economical, but does not contain the Gamma point. - ngkpt=[5, 5, 5] + ngkpt = [5, 5, 5] gs_kmesh = dict( ngkpt=ngkpt, shiftk=[0.5, 0.5, 0.5, diff --git a/abipy/benchmarks/scr_rpa.py b/abipy/benchmarks/scr_rpa.py index 737310780..690b4d012 100755 --- a/abipy/benchmarks/scr_rpa.py +++ b/abipy/benchmarks/scr_rpa.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the parallel efficiency of the RPA code (sum over states, 2 frequencies and gwpara==2)""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/benchmarks/sigma_cd.py b/abipy/benchmarks/sigma_cd.py index 43218c72e..9971cbc93 100755 --- a/abipy/benchmarks/sigma_cd.py +++ b/abipy/benchmarks/sigma_cd.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the parallel efficiency of the SIGMA code (one shot G0W0 with contour deformation and gwpara==2)""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.flowtk as flowtk @@ -32,7 +30,6 @@ def make_inputs(paw=False): paral_kgb=0, ) - multi.set_kmesh( ngkpt=[6,6,6], shiftk=[0.0, 0.0, 0.0], diff --git a/abipy/benchmarks/sigma_ppm.py b/abipy/benchmarks/sigma_ppm.py index 747768c4c..db477fbef 100755 --- a/abipy/benchmarks/sigma_ppm.py +++ b/abipy/benchmarks/sigma_ppm.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Analyze the parallel efficiency of the SIGMA code (one shot G0W0 with plasmon-pole model and gwpara==2)""" -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import abipy.abilab as abilab import abipy.data as abidata @@ -28,7 +26,6 @@ def make_inputs(paw=False): timopt=-1, ) - multi.set_kmesh(ngkpt=[4,4,3], shiftk=[0.0, 0.0, 0.0]) gs, nscf, scr, sigma = multi.split_datasets() diff --git a/abipy/benchmarks/test_scripts.py b/abipy/benchmarks/test_scripts.py old mode 100644 new mode 100755 index 9a1202b62..67f41493b --- a/abipy/benchmarks/test_scripts.py +++ b/abipy/benchmarks/test_scripts.py @@ -2,8 +2,6 @@ """ This script runs all the python scripts located in this directory """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import abipy.flowtk as flowtk diff --git a/abipy/core/__init__.py b/abipy/core/__init__.py index 20c7ba729..bac77a44d 100644 --- a/abipy/core/__init__.py +++ b/abipy/core/__init__.py @@ -1,4 +1,5 @@ """Core objects.""" +# flake8: noqa from .kpoints import * from .structure import * from .symmetries import * diff --git a/abipy/core/abinit_units.py b/abipy/core/abinit_units.py index bc5e6bf87..80426d32e 100644 --- a/abipy/core/abinit_units.py +++ b/abipy/core/abinit_units.py @@ -3,20 +3,22 @@ This module defines constants and conversion factors matching those present in abinit that can be used when it is important to preserve consistency with the results produced by abinit. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np - # taken from abinit/10_defs/defs_basis.F90 # 1 Bohr, in Angstrom Bohr_Ang = 0.52917720859 +# 1 Angstrom in Bohr +Ang_Bohr = 1.0/Bohr_Ang # 1 Hartree, in cm^-1 Ha_cmm1 = 219474.6313705 # 1 Hartree, in eV Ha_eV = 27.21138386 +Ha_to_eV = Ha_eV # 1 eV in Hartree eV_Ha = 1. / Ha_eV +# 1 eV in Rydberg +eV_Ry = 2 * eV_Ha # 1 Hartree, in meV Ha_meV = Ha_eV * 1000 # 1 Hartree, in Kelvin @@ -25,12 +27,17 @@ eV_to_K = eV_Ha * Ha_K # 1 Hartree, in THz Ha_THz = 6579.683920722 +# 1 Hartree, in s +Ha_s = Ha_THz * 1e12 * 2 * np.pi # 1 eV, in THz eV_to_THz = eV_Ha * Ha_THz # 1 eV, in cm-1 eV_to_cm1 = 8065.5440044136285 # 1 Hartree, in J Ha_J = 4.35974394e-18 +# Planck constant and h/2pi in eV x s +h_eVs = 4.13566766225e-15 +hbar_eVs = h_eVs / (2 * np.pi) # minus the electron charge, in Coulomb e_Cb = 1.602176487e-19 # Boltzmann constant in eV/K and Ha/K @@ -40,6 +47,13 @@ amu_emass = 1.660538782e-27 / 9.10938215e-31 # 1 Ha/Bohr^3, in GPa HaBohr3_GPa = Ha_eV / Bohr_Ang**3 * e_Cb * 1.0e+21 +# 1 eV/A^3 to GPa +eVA3_GPa = 160.21766208 +# 1 eV in seconds +eV_s = eV_to_THz*1e12 * 2*np.pi +# conversion factor for velocity between atomic units and SI +velocity_at_to_si = 2.1876912633e6 + # per mole Avogadro = 6.02214179e23 # 1 Ohm.cm in atomic units @@ -92,9 +106,9 @@ def wlabel_from_units(units): Return latex string for phonon frequencies in ``units``. """ d = {'ev': 'Energy (eV)', 'mev': 'Energy (meV)', 'ha': 'Energy (Ha)', - 'cm-1': r'Frequency (cm$^{-1}$)', - 'cm^-1': r'Frequency (cm$^{-1}$)', - 'thz': r'Frequency (Thz)', + 'cm-1': r'Frequency (cm$^{-1}$)', + 'cm^-1': r'Frequency (cm$^{-1}$)', + 'thz': r'Frequency (Thz)', } try: return d[units.lower().strip()] @@ -109,7 +123,7 @@ def phdos_label_from_units(units): d = {"ev": "(states/eV)", "mev": "(states/meV)", "ha": '(states/Ha)', "cm-1": "(states/cm$^{-1}$)", 'cm^-1': "(states/cm$^{-1}$)", "thz": '(states/Thz)', - } + } try: return d[units.lower().strip()] except KeyError: @@ -146,3 +160,68 @@ def itup2s(t): raise TypeError("Expecting tuple of len 2 or 3, got %s" % str(t)) d = {0: "x", 1: "y", 2: "z"} return "".join(d[i] for i in t) + + +# Use same tolerances as Abinit Fortran version in m_occ.F90. +_maxFDarg = 500.0 + + +@np.vectorize +def occ_fd(ee, kT, mu): + r""" + Fermi-Dirac statistic: 1 / [(exp((e - mu)/ KT) + 1] + Note that occ_fs in [0, 1] so the spin factor is not included, + unlike the occupations stored in ebands%occ. + + Args: + ee: Single particle energy in eV + kT: Value of K_Boltzmann x T in eV. + mu: Chemical potential in eV. + """ + ee_mu = ee - mu + + # 1 kelvin [K] = 3.16680853419133E-06 Hartree + if kT > 1e-6 * Ha_eV: + arg = ee_mu / kT + if arg > _maxFDarg: + occ_fd = 0.0 + elif arg < - _maxFDarg: + occ_fd = 1.0 + else: + occ_fd = 1.0 / (np.exp(arg) + 1.0) + else: + # Heaviside + if ee_mu > 0.0: + occ_fd = 0.0 + elif ee_mu < 0.0: + occ_fd = 1.0 + else: + occ_fd = 0.5 + + return occ_fd + + +@np.vectorize +def occ_be(ee, kT, mu=0.0): + r""" + Bose-Einstein statistic: 1 / [(exp((e - mu)/ KT) - 1] + + Args: + ee: Single particle energy in eV. + kT: Value of K_Boltzmann x T in eV. + mu: Chemical potential in eV (usually zero) + """ + ee_mu = ee - mu + + # 1 kelvin [K] = 3.16680853419133E-06 Hartree + if kT > 1e-12 * Ha_eV: + arg = ee_mu / kT + if arg > 1e-12 and arg < 600.0: + occ_be = 1.0 / (np.exp(arg) - 1.0) + else: + occ_be = 0.0 + else: + # No condensate for T --> 0 + occ_be = 0.0 + + return occ_be diff --git a/abipy/core/fields.py b/abipy/core/fields.py index 7c4ad646d..9dda02ca1 100644 --- a/abipy/core/fields.py +++ b/abipy/core/fields.py @@ -1,7 +1,5 @@ # coding: utf-8 """This module contains the class describing densities in real space on uniform 3D meshes.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import collections import pymatgen.core.units as pmgu @@ -10,7 +8,7 @@ from collections import OrderedDict from monty.collections import AttrDict from monty.functools import lazy_property -from monty.string import is_string +from monty.string import is_string, marquee from monty.termcolor import cprint from monty.inspect import all_subclasses from pymatgen.io.vasp.inputs import Poscar @@ -20,7 +18,8 @@ from abipy.core.mesh3d import Mesh3D from abipy.core.func1d import Function1D from abipy.core.mixins import Has_Structure -from abipy.tools import transpose_last3dims, duck +from abipy.tools import duck +from abipy.tools.numtools import transpose_last3dims from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt from abipy.iotools import Visualizer, xsf, ETSF_Reader, cube @@ -41,7 +40,7 @@ def latexlabel_ispden(ispden, nspden): elif nspden == 2: return {k: v.replace("myuparrow", "uparrow") for k, v in - {0: r"$\sigma=\myuparrow$", 1: r"$\sigma=\downarrow$"}.items()}[ispden] + {0: r"$\sigma=\myuparrow$", 1: r"$\sigma=\downarrow$"}.items()}[ispden] else: raise NotImplementedError() @@ -109,7 +108,7 @@ def _check_and_get_datar(self, other): if not isinstance(other, _Field): try: return self.__class__, float(other) - except: + except Exception: raise TypeError('object of class %s is not an instance of _Field and cannot be converted to float' % (other.__class__)) @@ -411,7 +410,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, max_nn=10, fontsize=1 Return: |matplotlib-Figure| """ site = self.structure[site_index] - nn_list = self.structure.get_neighbors(site, radius, include_index=True) + nn_list = self.structure.get_neighbors_old(site, radius, include_index=True) if not nn_list: cprint("Zero neighbors found for radius %s Ang. Returning None." % radius, "yellow") return None @@ -420,7 +419,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, max_nn=10, fontsize=1 if max_nn is not None and len(nn_list) > max_nn: cprint("For radius %s, found %s neighbors but only max_nn %s sites are show." % - (radius, len(nn_list), max_nn), "yellow") + (radius, len(nn_list), max_nn), "yellow") nn_list = nn_list[:max_nn] # Get grid of axes. @@ -432,7 +431,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, max_nn=10, fontsize=1 interpolator = self.get_interpolator() for i, (nn, ax) in enumerate(zip(nn_list, ax_list)): - nn_site, nn_dist, nn_sc_index = nn + nn_site, nn_dist, nn_sc_index = nn title = "%s, %s, dist=%.3f A" % (nn_site.species_string, str(nn_site.frac_coords), nn_dist) r = interpolator.eval_line(site.frac_coords, nn_site.frac_coords, num=num, kpoint=None) @@ -489,7 +488,7 @@ def integrate_in_spheres(self, rcut_symbol=None, out=False): symbol = site.specie.symbol phases = np.exp(2j * np.pi * np.dot(gvecs, site.frac_coords)) fg = datag * phases * splines[symbol](gmods) - res_nspden = np.sum(fg, axis=1) * (4 * np.pi) + res_nspden = np.sum(fg, axis=1) * (4 * np.pi) #print("result:", res_nspden, res_nspden.shape, (datag * fg).shape) # Compute densities and magnetization. @@ -504,7 +503,7 @@ def integrate_in_spheres(self, rcut_symbol=None, out=False): elif self.nspinor == 2: raise NotImplementedError() - ntot, mx, my, mz = scalvec_from_spinmat(res_nspden) + #ntot, mx, my, mz = scalvec_from_spinmat(res_nspden) nup, ndown = 0.5 * (ntot + mz), 0.5 * (ntot - mz) # Fill DataFrame row. @@ -561,6 +560,7 @@ def core_density_from_file(filepath): else: raise ValueError('Exension not supported: {}'.format(ext)) + class Density(_DensityField): """ Electronic density. @@ -611,7 +611,7 @@ def ae_core_density_on_mesh(cls, valence_density, structure, rhoc, maxr=2.0, nel if isinstance(rhoc, (list, tuple)): if len(structure) != len(rhoc): raise ValueError('Number of rhoc files should be equal to the number of sites in the structure') - elif isinstance(rhoc, collections.Mapping): + elif isinstance(rhoc, collections.abc.Mapping): atoms_symbols = [elmt.symbol for elmt in structure.composition] if not np.all([atom in rhoc for atom in atoms_symbols]): raise ValueError('The rhoc files should be provided for all the atoms in the structure') @@ -628,8 +628,8 @@ def ae_core_density_on_mesh(cls, valence_density, structure, rhoc, maxr=2.0, nel abs_max = abs(maxr) for r in rhoc: try: - ind = np.min(np.where(r[1]==0)) - except: + ind = np.min(np.where(r[1] == 0)) + except Exception: ind = -1 if r[0][ind] > maxr: @@ -709,9 +709,9 @@ def ae_core_density_on_mesh(cls, valence_density, structure, rhoc, maxr=2.0, nel start = time.time() dist_gridpoints_sites = valence_density.mesh.dist_gridpoints_in_spheres(points=site_coords, radius=maxr) nnx, nny, nnz = small_dist_mesh - meshgrid = np.meshgrid(np.linspace(-0.5, 0.5, nnx, endpoint=False)+0.5/nnx, - np.linspace(-0.5, 0.5, nny, endpoint=False) + 0.5/nny, - np.linspace(-0.5, 0.5, nnz, endpoint=False) + 0.5/nnz) + meshgrid = np.meshgrid(np.linspace(-0.5, 0.5, nnx, endpoint=False) + 0.5 / nnx, + np.linspace(-0.5, 0.5, nny, endpoint=False) + 0.5 / nny, + np.linspace(-0.5, 0.5, nnz, endpoint=False) + 0.5 / nnz) coords_grid = np.outer(meshgrid[0], dvx) + np.outer(meshgrid[1], dvy) + np.outer(meshgrid[2], dvz) for isite, dist_gridpoints_site in enumerate(dist_gridpoints_sites): for igp_uc, dist, igp in dist_gridpoints_site: @@ -1138,7 +1138,7 @@ def read_denpot(self, varname, field_cls): else: raise ValueError("Invalid nspinor: %s, nspden: %s and nsppol: %s" % ( - dims.nspinor, dims.nspden, dims%nsppol)) + dims.nspinor, dims.nspden, dims.nsppol)) #if issubclass(field_cls, _DensityField): #elif issubclass(field_cls, _PotentialFieldField): #else: diff --git a/abipy/core/func1d.py b/abipy/core/func1d.py index 566b5b8d4..f9e2a09b1 100644 --- a/abipy/core/func1d.py +++ b/abipy/core/func1d.py @@ -3,13 +3,9 @@ Function1D describes a function of a single variable and provides an easy-to-use API for performing common tasks such as algebraic operations, integrations, differentiations, plots ... """ -from __future__ import print_function, division, unicode_literals, absolute_import - -import six -import itertools import numpy as np -from six.moves import cStringIO +from io import StringIO from monty.functools import lazy_property from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, data_from_cplx_mode from abipy.tools.derivatives import finite_diff @@ -53,10 +49,7 @@ def __len__(self): return len(self.mesh) def __iter__(self): - if six.PY2: - return itertools.izip(self.mesh, self.values) - else: - return zip(self.mesh, self.values) + return zip(self.mesh, self.values) def __getitem__(self, slice): return self.mesh[slice], self.values[slice] @@ -183,7 +176,7 @@ def __repr__(self): return "%s at %s, size = %d" % (self.__class__.__name__, id(self), len(self)) def __str__(self): - stream = cStringIO() + stream = StringIO() for x, y in zip(self.mesh, self.values): stream.write("%.18e %.18e\n" % (x, y)) return "".join(stream.getvalue()) @@ -330,7 +323,7 @@ def l1_norm(self): @lazy_property def l2_norm(self): r"""Compute :math:`\sqrt{\int |f(x)|^2 dx}`.""" - return np.sqrt( (abs(self)**2).integral()[-1][1] ) + return np.sqrt((abs(self)**2).integral()[-1][1]) def fft(self): """Compute the FFT transform (negative sign).""" diff --git a/abipy/core/globals.py b/abipy/core/globals.py index 3df2fdb17..5eb312153 100644 --- a/abipy/core/globals.py +++ b/abipy/core/globals.py @@ -1,8 +1,6 @@ """ Global variables used to initialize AbiPy environment in notebooks. """ -from __future__ import print_function, division, unicode_literals - from monty.termcolor import cprint import os @@ -11,6 +9,7 @@ __IN_NOTEBOOK = False + def in_notebook(): """True if we are running inside a jupyter notebook (and enable_notebook has been called).""" return __IN_NOTEBOOK @@ -70,7 +69,7 @@ def abinb_mkstemp(force_abinb_workdir=False, use_relpath=False, **kwargs): d = kwargs.pop("dir", None) if d is not None: cprint("Files should be created inside abipy_nbworkdir if we are inside jupyter or force_abinb_workdir", - "yellow") + "yellow") fd, path = tempfile.mkstemp(dir=get_abinb_workdir(), **kwargs) else: fd, path = tempfile.mkstemp(**kwargs) diff --git a/abipy/core/gsphere.py b/abipy/core/gsphere.py index aeb0b8813..a971213a5 100644 --- a/abipy/core/gsphere.py +++ b/abipy/core/gsphere.py @@ -1,7 +1,5 @@ # coding: utf-8 """This module contains the class defining the G-sphere for wavefunctions, densities and potentials""" -from __future__ import print_function, division, unicode_literals, absolute_import - import collections import numpy as np @@ -14,7 +12,7 @@ ] -class GSphere(collections.Sequence): +class GSphere(collections.abc.Sequence): """Descriptor-class for the G-sphere.""" def __init__(self, ecut, lattice, kpoint, gvecs, istwfk=1): @@ -191,7 +189,7 @@ def fromfftmesh(self, mesh, arr_on_mesh): """ Transfer ``arr_on_mesh`` given on the FFT mesh to the G-sphere. """ - indim = arr_on_mesh.ndim + indim = arr_on_mesh.ndim arr_on_mesh = mesh.reshape(arr_on_mesh) ishape = arr_on_mesh.shape s0 = ishape[0] diff --git a/abipy/core/irrepsdb.py b/abipy/core/irrepsdb.py index c8341bdbb..5ef25790c 100644 --- a/abipy/core/irrepsdb.py +++ b/abipy/core/irrepsdb.py @@ -1,7 +1,6 @@ # coding: utf-8 -from __future__ import print_function, division, unicode_literals, absolute_import -_PTG_IRREPS_DB =\ +_PTG_IRREPS_DB = \ {'C1': {'class_names': ['1+'], 'class_range': [(0, 1)], 'irreps': {'A': {'dim': 1, 'matrices': [[[1.0]]]}}, diff --git a/abipy/core/kpoints.py b/abipy/core/kpoints.py index 1129f98fc..08c338c59 100644 --- a/abipy/core/kpoints.py +++ b/abipy/core/kpoints.py @@ -1,7 +1,5 @@ # coding: utf-8 """This module defines objects describing the sampling of the Brillouin Zone.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import collections import json import sys @@ -10,23 +8,16 @@ from itertools import product from tabulate import tabulate -from monty.json import MSONable, MontyEncoder +from monty.json import MontyEncoder from monty.collections import AttrDict, dict2namedtuple from monty.functools import lazy_property -from monty.termcolor import cprint from monty.string import marquee from pymatgen.core.lattice import Lattice -try: - from pymatgen.util.serialization import pmg_serialize -except ImportError: - from pymatgen.serializers.json_coders import pmg_serialize -try: - from pymatgen.util.serialization import SlotPickleMixin -except ImportError: - from pymatgen.serializers.pickle_coders import SlotPickleMixin +from pymatgen.util.serialization import pmg_serialize +from pymatgen.util.serialization import SlotPickleMixin from abipy.iotools import ETSF_Reader from abipy.tools.derivatives import finite_diff -from abipy.tools.numtools import add_periodic_replicas +from abipy.tools.numtools import add_periodic_replicas, is_diagonal import logging logger = logging.getLogger(__name__) @@ -356,7 +347,7 @@ def map_kpoints(other_kpoints, other_lattice, ref_lattice, ref_kpoints, ref_symr found = False for ik_ref, kref in enumerate(ref_kpoints): if found: break - for tsign in tsign: + for tsign in tsigns: for isym, symrec in enumerate(ref_symrecs): krot = tsign * np.matmul(symrec, kref) if issamek(okpt_red, krot): @@ -469,6 +460,44 @@ def find_irred_kpoints_generic(structure, kfrac_coords, verbose=1): return dict2namedtuple(irred_map=np.array(irred_map, dtype=np.int)) +def kpath_from_bounds_and_ndivsm(bounds, ndivsm, structure): + """ + Generate a normalized path given the extrema and the number of divisions for the smallest segment + + Args: + bounds: (N, 3) array with the boundaries of the path in reduced coordinates. + ndivsm: Number of divisions used for the smallest segment. + + Return: + Array (M, 3) with fractional coordinates. + """ + bounds = np.reshape(bounds, (-1, 3)) + nbounds = len(bounds) + if nbounds == 1: + raise ValueError("Need at least two points to define the k-path!") + + lens = [] + for i in range(nbounds - 1): + v = bounds[i + 1] - bounds[i] + lens.append(float(structure.reciprocal_lattice.norm(v))) + + # Avoid division by zero if any bounds[i+1] == bounds[i] + minlen = np.min(lens) + if minlen < 1e-6: + raise ValueError("Found two equivalent consecutive points in bounds!") + + minlen = minlen / ndivsm + ndivs = np.rint(lens / minlen).astype(np.int) + path = [] + for i in range(nbounds - 1): + for j in range(ndivs[i]): + p = bounds[i] + j * (bounds[i + 1] - bounds[i]) / ndivs[i] + path.append(p) + path.append(bounds[-1]) + + return np.array(path) + + class KpointsError(Exception): """Base error class for KpointList exceptions.""" @@ -489,9 +518,9 @@ def as_kpoints(obj, lattice, weights=None, names=None): return [obj] # Iterable with K-points? - if isinstance(obj, collections.Iterable): + if isinstance(obj, collections.abc.Iterable): if isinstance(obj[0], Kpoint): - assert all( isinstance(o, Kpoint) for o in obj) + assert all(isinstance(o, Kpoint) for o in obj) return obj # Assume array-like @@ -514,6 +543,12 @@ def as_kpoints(obj, lattice, weights=None, names=None): class Kpoint(SlotPickleMixin): """ Class defining one k-point. This object is immutable and can be used as key in dictionaries + + Note that we usually construct the object by passing pymatgen.reciprocal_lattice + that is the standard reciprocal lattice used for solid state physics + with a factor of 2 * pi i.e. a_i . b_j = 2pi delta_ij. + Abinit, on the contrary, uses the crystallographic reciprocal lattice i.e. no 2pi factor. + so pay attention when converting Abinit routines to AbiPy. """ __slots__ = [ @@ -620,12 +655,26 @@ def __repr__(self): s += " %s" % self.name return s + def tos(self, m="fract"): + """ + Return string with fractional or cartesian coords depending + on mode `m` in ("fract", "cart", "fracart") + """ + if m == "fract": + return "[%+.3f, %+.3f, %+.3f]" % tuple(self.frac_coords) + elif m == "cart": + return "(%+.3f, %+.3f, %+.3f)" % tuple(self.cart_coords) + elif m == "fracart": + return "%s, %s" % (self.tos(m="fract"), self.tos(m="cart")) + else: + raise ValueError("Invalid mode: `%s`" % str(m)) + def __str__(self): return self.to_string() def to_string(self, verbose=0): """String representation.""" - s = "[%+.3f, %+.3f, %+.3f]" % tuple(self.frac_coords) + s = "[%+.3f, %+.3f, %+.3f]" % tuple(self.frac_coords) if self.name is not None: s += ", name: %s" % self.name if self._weight is not None: s += ", weight: %.3f" % self.weight @@ -729,7 +778,7 @@ def compute_star(self, symmops, wrap_tows=True): return KpointStar(self.lattice, frac_coords, weights=None, names=len(frac_coords) * [self.name]) -class KpointList(collections.Sequence): +class KpointList(collections.abc.Sequence): """ Base class defining a sequence of |Kpoint| objects. Essentially consists of base methods implementing the sequence protocol and helper functions. @@ -880,6 +929,18 @@ def index(self, kpoint): except ValueError: raise ValueError("Cannot find point: %s in KpointList:\n%s" % (repr(kpoint), repr(self))) + def get_all_kindices(self, kpoint): + """ + Return numpy array with indexes of all the k-point + Accepts: |Kpoint| instance or integer. + """ + start = self.index(kpoint) + k0 = self[start] + kinds = [] + for ik, k in enumerate(self): + if k == k0: kinds.append(ik) + return np.array(kinds) + def find(self, kpoint): """ Returns: first index of kpoint. -1 if not found @@ -1189,7 +1250,7 @@ def to_string(self, verbose=0, title=None, **kwargs): if verbose == 0 and not tag: continue table.append([ str(i), - "%.5f, %.5f, %.5f" % tuple(kpoint.frac_coords), + "%.7f, %.7f, %.7f" % tuple(kpoint.frac_coords), kpoint.name, self.ds[i] if i != len(self) - 1 else None, "*" if i in vids else " ", @@ -1234,8 +1295,9 @@ def lines(self): for i, v in enumerate(self.versors[1:]): i += 1 - if v != prev: - #print("diff", v.frac_coords - prev.frac_coords) + #if v != prev: + if ((prev - v).norm > 1e-5): + #print("diff", (prev - v).norm, v.frac_coords - prev.frac_coords) prev = v lines[-1].append(i) lines.append([i]) @@ -1371,8 +1433,8 @@ def __init__(self, reciprocal_lattice, frac_coords, weights=None, names=None, ks names: List with the name of the k-points. ksampling: Info on the k-point sampling """ - super(IrredZone, self).__init__(reciprocal_lattice, frac_coords, - weights=weights, names=names, ksampling=ksampling) + super().__init__(reciprocal_lattice, frac_coords, + weights=weights, names=names, ksampling=ksampling) # Weights must be normalized to one. wsum = self.sum_weights() @@ -1448,19 +1510,6 @@ def to_string(self, func=str, verbose=0, title=None): # return kx, ky, plane -def is_diagonal(matrix, atol=1e-12): - """ - Return True if matrix is diagonal. - """ - m = matrix.copy() - np.fill_diagonal(m, 0) - - if issubclass(matrix.dtype.type, np.integer): - return np.all(m == 0) - else: - return np.all(np.abs(m) <= atol) - - class KSamplingInfo(AttrDict): """ Store metadata defining the k-point sampling according to the abinit conventions. @@ -1536,10 +1585,10 @@ def from_kbounds(cls, kbounds): kptrlatt=kptrlatt, kptrlatt_orig=kptrlatt_orig, kptopt=kptopt) def __init__(self, *args, **kwargs): - super(KSamplingInfo, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) for k in self: - if k not in self.KNOWN_KEYS: - raise ValueError("Unknow key %s" % k) + if k not in self.KNOWN_KEYS: + raise ValueError("Unknow key %s" % k) # FIXME: monkhorst_pack_folding is not written in e.g. DEN.nc files # so we get crazy results because of netCDF4._default_fillvals @@ -1558,7 +1607,6 @@ def __init__(self, *args, **kwargs): #Setting mpdivs to None, this may create problems in post-processing tools. #If needed, use python netcdf to change the value of `monkhorst_pack_folding`""".format(mpdivs=self["mpdivs"])) - def __str__(self): return self.to_string() @@ -1621,7 +1669,8 @@ def read_kpoints(self): weights = self.read_kweights() ksampling = self.read_ksampling_info() - if ksampling.kptopt < 0: + #if ksampling.kptopt < 0: + if ksampling.kptopt < 0 or np.all(weights == 1): # We have a path in the BZ. kpath = Kpath(structure.reciprocal_lattice, frac_coords, ksampling=ksampling) for kpoint in kpath: @@ -1639,9 +1688,6 @@ def read_kpoints(self): # We have a homogeneous sampling of the BZ. return IrredZone(structure.reciprocal_lattice, frac_coords, weights=weights, ksampling=ksampling) - #raise ValueError("Only homogeneous samplings or paths are supported!\n" - # "ksampling info:\n%s" % str(ksampling)) - def read_ksampling_info(self): """ Read information on the k-point sampling. Return :class:`KSamplingInfo` object. @@ -1840,3 +1886,35 @@ def find_points_along_path(cart_bounds, cart_coords, dist_tol): return dict2namedtuple(ikfound=np.array(ikfound)[isort], dist_list=dist_list, path_ticks=np.array(path_ticks)) + + +def build_segments(k0_list, npts, step, red_dirs, reciprocal_lattice): + """ + For each point in k0_list, build a line passing through the point for each + reduced direction in red_dir. Each line consists of `npts` points with step `step` in Ang-1 + and is centered on the k-point. Return: (nk0_list, len(red_dirs) * npts, 3) array with fractional coordinates. + + Args: + k0_list: List of k-points in reduced coordinates. + npts: Number of points in each segment. + step: Step in Ang-1 + red_dirs: List of reduced directions + reciprocal_lattice: Reciprocal lattice (from structure.reciprocal_lattice) + """ + k0_list = np.reshape(k0_list, (-1, 3)) + red_dirs = np.reshape(red_dirs, (-1, 3)) + kpts = [] + for kpoint in k0_list: + kpoint = Kpoint.as_kpoint(kpoint, reciprocal_lattice) + # Build segments passing through this kpoint (work in Cartesian coords) + for rdir in red_dirs: + bvers = reciprocal_lattice.matrix.T @ rdir + #bvers = reciprocal_lattice.get_cartesian_coords(rdir) + bvers /= np.sqrt(np.dot(bvers, bvers)) + kstart = kpoint.cart_coords - bvers * (npts // 2) * step + for ii in range(npts): + kpts.append(kstart + ii * step * bvers) + + # Cart --> Frac + out = reciprocal_lattice.get_fractional_coords(kpts) + return np.reshape(out, (len(k0_list), len(red_dirs) * npts, 3)) diff --git a/abipy/core/mesh3d.py b/abipy/core/mesh3d.py index 32a4e7467..6acbeed7b 100644 --- a/abipy/core/mesh3d.py +++ b/abipy/core/mesh3d.py @@ -1,13 +1,11 @@ # coding: utf-8 """This module contains the class defining Uniform 3D meshes.""" -from __future__ import print_function, division, unicode_literals, absolute_import import numpy as np -from itertools import product as iproduct -from collections import deque +#from itertools import product as iproduct from monty.functools import lazy_property -from numpy.random import random +#from numpy.random import random from numpy.fft import fftn, ifftn, fftshift, ifftshift, fftfreq from abipy.tools import duck @@ -541,4 +539,4 @@ def dist_gridpoints_in_spheres(self, points, radius): # dist_gridpoints.append(((np.mod(ipx, self.nx), np.mod(ipy, self.ny), np.mod(ipz, self.nz)), # dist_gp_pp, (ipx, ipy, ipz))) # dist_gridpoints_points.append(dist_gridpoints) - # return dist_gridpoints_points \ No newline at end of file + # return dist_gridpoints_points diff --git a/abipy/core/mixins.py b/abipy/core/mixins.py index 283f8f4a8..870ff1a2f 100644 --- a/abipy/core/mixins.py +++ b/abipy/core/mixins.py @@ -1,21 +1,18 @@ # coding: utf-8 -"""This module ...""" -from __future__ import print_function, division, unicode_literals, absolute_import - +"""This module provides mixin classes""" import abc import os -import six import collections import tempfile import pickle +import numpy as np from time import ctime from monty.os.path import which from monty.termcolor import cprint -from monty.dev import deprecated -from monty.string import is_string +from monty.string import list_strings +from monty.collections import dict2namedtuple from monty.functools import lazy_property -from abipy.flowtk.netcdf import NetcdfReader, NO_DEFAULT __all__ = [ @@ -27,8 +24,8 @@ "Has_Header", ] -@six.add_metaclass(abc.ABCMeta) -class BaseFile(object): + +class BaseFile(metaclass=abc.ABCMeta): """ Abstract base class defining the methods that must be implemented by the concrete classes representing the different files produced by ABINIT. @@ -48,8 +45,7 @@ def __repr__(self): @classmethod def from_file(cls, filepath): """Initialize the object from a string.""" - if isinstance(filepath, cls): - return filepath + if isinstance(filepath, cls): return filepath #print("Perhaps the subclass", cls, "must redefine the classmethod from_file.") return cls(filepath) @@ -80,8 +76,7 @@ def filetype(self): def filestat(self, as_string=False): """ - Dictionary with file metadata - if ``as_string`` is True, a string is returned. + Dictionary with file metadata, if ``as_string`` is True, a string is returned. """ d = get_filestat(self.filepath) if not as_string: return d @@ -89,7 +84,7 @@ def filestat(self, as_string=False): @abc.abstractmethod def close(self): - """Close file.""" + """Close the file.""" def __enter__(self): return self @@ -98,15 +93,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): """Activated at the end of the with statement. It automatically closes the file.""" self.close() - #def __del__(self): - # """ - # Called when the instance is about to be destroyed. - # """ - # try: - # self.close() - # finally: - # super(BaseFile, self).__close__(self) - class TextFile(BaseFile): @@ -139,22 +125,7 @@ def seek(self, offset, whence=0): self._file.seek(offset, whence) -@deprecated(message="AbinitOutNcFile is deprecated, use abipy.abio.outputs.OutNcFile") -class AbinitOutNcFile(NetcdfReader): - """ - Class representing the _OUT.nc file. - """ - - def get_vars(self, vars, strict=False): - # TODO: add a check on the variable names ? - default = NO_DEFAULT if strict else None - var_values = {} - for var in vars: - var_values[var] = self.read_value(varname=var, default=default) - return var_values - -@six.add_metaclass(abc.ABCMeta) class AbinitNcFile(BaseFile): """ Abstract class representing a Netcdf file with data saved @@ -178,7 +149,6 @@ def params(self): """ -@six.add_metaclass(abc.ABCMeta) class AbinitFortranFile(BaseFile): """ Abstract class representing a fortran file containing output data from abinit. @@ -204,7 +174,7 @@ class CubeFile(BaseFile): """ def __init__(self, filepath): from abipy.iotools.cube import cube_read_structure_mesh_data - super(CubeFile, self).__init__(filepath) + super().__init__(filepath) self.structure, self.mesh, self.data = cube_read_structure_mesh_data(self.filepath) def close(self): @@ -217,9 +187,8 @@ def close(self): # cube_write_data(fh, data, mesh): -@six.add_metaclass(abc.ABCMeta) -class Has_Structure(object): - """Mixin class for :class:`AbinitNcFile` containing crystallographic data.""" +class Has_Structure(metaclass=abc.ABCMeta): + """Mixin class for |AbinitNcFile| containing crystallographic data.""" @abc.abstractproperty def structure(self): @@ -260,14 +229,57 @@ def visualize_structure_with(self, appname): else: raise visu.Error("Don't know how to export data for appname %s" % appname) + def _get_atomview(self, view, select_symbols=None, verbose=0): + """ + Helper function used to select (inequivalent||all) atoms depending on view. + Uses spglib to find inequivalent sites. + + Args: + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + select_symbols: String or list of strings with chemical symbols. + Used to select only atoms of this type. + + Return named tuple with: + + * iatom_list: list of site index. + * wyckoffs: Wyckoff letters + * site_labels: Labels for each site in `iatom_list` e.g Si2a + """ + natom = len(self.structure) + if natom == 1: verbose = False + if verbose: + print("Calling spglib to find inequivalent sites. Magnetic symmetries (if any) are not taken into account.") + + ea = self.structure.spget_equivalent_atoms(printout=verbose > 0) + + # Define iatom_list depending on view + if view == "all": + iatom_list = np.arange(natom) + elif view == "inequivalent": + iatom_list = ea.irred_pos + else: + raise ValueError("Wrong value for view: %s" % str(view)) + + # Filter by element symbol. + if select_symbols is not None: + select_symbols = set(list_strings(select_symbols)) + iatom_list = [i for i in iatom_list if self.structure[i].specie.symbol in select_symbols] + iatom_list = np.array(iatom_list, dtype=np.int) + + # Slice full arrays. + wyckoffs = ea.wyckoffs[iatom_list] + wyck_labels = ea.wyck_labels[iatom_list] + site_labels = ea.site_labels[iatom_list] + + return dict2namedtuple(iatom_list=iatom_list, wyckoffs=wyckoffs, wyck_labels=wyck_labels, site_labels=site_labels) + def yield_structure_figs(self, **kwargs): """*Generates* a predefined list of matplotlib figures with minimal input from the user.""" yield self.structure.plot(show=False) -@six.add_metaclass(abc.ABCMeta) -class Has_ElectronBands(object): - """Mixin class for :class:`AbinitNcFile` containing electron data.""" +class Has_ElectronBands(metaclass=abc.ABCMeta): + """Mixin class for |AbinitNcFile| containing electron data.""" @abc.abstractproperty def ebands(self): @@ -335,6 +347,10 @@ def plot_ebands_with_edos(self, edos, **kwargs): """Plot the electron energy bands with DOS. See the :func:`ElectronBands.plot_with_edos` for the signature.""" return self.ebands.plot_with_edos(edos, **kwargs) + def get_edos(self, **kwargs): + """Compute the electronic DOS on a linear mesh. Wraps ebands.get_edos.""" + return self.ebands.get_edos(**kwargs) + def yield_ebands_figs(self, **kwargs): """*Generates* a predefined list of matplotlib figures with minimal input from the user.""" with_gaps = not self.ebands.has_metallic_scheme @@ -355,10 +371,9 @@ def expose_ebands(self, slide_mode=False, slide_timeout=None, **kwargs): e(self.yield_ebands_figs(**kwargs)) -@six.add_metaclass(abc.ABCMeta) -class Has_PhononBands(object): +class Has_PhononBands(metaclass=abc.ABCMeta): """ - Mixin class for :class:`AbinitNcFile` containing phonon data. + Mixin class for |AbinitNcFile| containing phonon data. """ @abc.abstractproperty @@ -451,44 +466,120 @@ def get_filestat(filepath): ]) -@six.add_metaclass(abc.ABCMeta) -class NotebookWriter(object): +class NotebookWriter(metaclass=abc.ABCMeta): """ Mixin class for objects that are able to generate jupyter_ notebooks. Subclasses must provide a concrete implementation of `write_notebook`. """ - def make_and_open_notebook(self, nbpath=None, foreground=False): # pragma: no cover + + def make_and_open_notebook(self, nbpath=None, foreground=False, + classic_notebook=False, no_browser=False): # pragma: no cover """ Generate an jupyter_ notebook and open it in the browser. Args: nbpath: If nbpath is None, a temporay file is created. - foreground: By default, jupyter is executed in background and stdout, stderr are redirected + foreground: By default, jupyter is executed in background and stdout, stderr are redirected. to devnull. Use foreground to run the process in foreground + classic_notebook: True to use the classic notebook instead of jupyter-lab (default) + no_browser: Start the jupyter server to serve the notebook but don't open the notebook in the browser. + Use this option to connect remotely from localhost to the machine running the kernel - Return: - system exit code. + Return: system exit code. - Raise: - `RuntimeError` if jupyter_ is not in $PATH + Raise: `RuntimeError` if jupyter executable is not in $PATH """ nbpath = self.write_notebook(nbpath=nbpath) - if which("jupyter") is None: - raise RuntimeError("Cannot find jupyter in $PATH. Install it with `conda install jupyter or `pip install jupyter`") + if not classic_notebook: + # Use jupyter-lab. + app_path = which("jupyter-lab") + if app_path is None: + raise RuntimeError(""" +Cannot find jupyter-lab application in $PATH. Install it with: + + conda install -c conda-forge jupyterlab + +or: + + pip install jupyterlab + +See also https://jupyterlab.readthedocs.io/ +""") - if foreground: - return os.system("jupyter notebook %s" % nbpath) else: - fd, tmpname = tempfile.mkstemp(text=True) - print(tmpname) - cmd = "jupyter notebook %s" % nbpath + # Use classic notebook + app_path = which("jupyter") + if app_path is None: + raise RuntimeError(""" +Cannot find jupyter application in $PATH. Install it with: + + conda install -c conda-forge jupyter + +or: + + pip install jupyterlab + +See also https://jupyter.readthedocs.io/en/latest/install.html +""") + + if not no_browser: + + if foreground: + return os.system("%s %s" % (app_path, nbpath)) + else: + fd, tmpname = tempfile.mkstemp(text=True) + print(tmpname) + cmd = "%s %s" % (app_path, nbpath) + print("Executing:", cmd, "\nstdout and stderr redirected to %s" % tmpname) + import subprocess + process = subprocess.Popen(cmd.split(), shell=False, stdout=fd, stderr=fd) + cprint("pid: %s" % str(process.pid), "yellow") + return 0 + + else: + # Based on https://github.com/arose/nglview/blob/master/nglview/scripts/nglview.py + notebook_name = os.path.basename(nbpath) + dirname = os.path.dirname(nbpath) + print("nbpath:", nbpath) + + import socket + def find_free_port(): + """https://stackoverflow.com/questions/1365265/on-localhost-how-do-i-pick-a-free-port-number""" + from contextlib import closing + with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: + s.bind(('', 0)) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + return s.getsockname()[1] + + username = os.getlogin() + hostname = socket.gethostname() + port = find_free_port() + + client_cmd = "ssh -NL localhost:{port}:localhost:{port} {username}@{hostname}".format( + username=username, hostname=hostname, port=port) + + print(f""" +Using port: {port} + +\033[32m In your local machine, run: \033[0m + + {client_cmd} + +\033[32m NOTE: you might want to replace {hostname} by full hostname with domain name \033[0m +\033[32m Then open your web browser, copy and paste the URL: \033[0m + +http://localhost:{port}/notebooks/{notebook_name} +""") + if not classic_notebook: + cmd = f'{app_path} {notebook_name} --no-browser --port {port} --notebook-dir {dirname}' + else: + cmd = f'{app_path} notebook {notebook_name} --no-browser --port {port} --notebook-dir {dirname}' + print("Executing:", cmd) - print("stdout and stderr redirected to %s" % tmpname) - import subprocess - process = subprocess.Popen(cmd.split(), shell=False, stdout=fd, stderr=fd) - cprint("pid: %s" % str(process.pid), "yellow") - return 0 + print('NOTE: make sure to open `{}` in your local machine\n'.format(notebook_name)) + + return os.system(cmd) @staticmethod def get_nbformat_nbv(): @@ -510,12 +601,15 @@ def get_nbformat_nbv_nb(self, title=None): nb.cells.extend([ nbv.new_code_cell("""\ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys, os import numpy as np %matplotlib notebook + +# Use this magic for jupyterlab. +# For installation instructions, see https://github.com/matplotlib/jupyter-matplotlib +#%matplotlib widget + from IPython.display import display # This to render pandas DataFrames with https://github.com/quantopian/qgrid @@ -530,10 +624,7 @@ def get_nbformat_nbv_nb(self, title=None): # Tell AbiPy we are inside a notebook and use seaborn settings for plots. # See https://seaborn.pydata.org/generated/seaborn.set.html#seaborn.set abilab.enable_notebook(with_seaborn=True) - -# AbiPy widgets for pandas and seaborn plot APIs -#import abipy.display.seabornw import snw -#import abipy.display.pandasw import pdw""") +""") ]) return nbformat, nbv, nb @@ -592,8 +683,7 @@ def pickle_dump(self, filepath=None): Save the status of the object in pickle format. If filepath is None, a temporary file is created. - Return: - name of the pickle file. + Return: The name of the pickle file. """ if filepath is None: _, filepath = tempfile.mkstemp(suffix='.pickle') @@ -602,7 +692,6 @@ def pickle_dump(self, filepath=None): pickle.dump(self, fh) return filepath - # TODO: Activate this @abc.abstractmethod def yield_figs(self, **kwargs): # pragma: no cover """ @@ -627,8 +716,4 @@ def hdr(self): """|AttrDict| with the Abinit header e.g. hdr.ecut.""" return self.reader.read_abinit_hdr() - #def get_hdr_params(self): - # """:class:`OrderedDict` with the convergence parameters.""" - # return collections.OrderedDict([ - #def compare_hdr(self, other_hdr): diff --git a/abipy/core/perl.py b/abipy/core/perl.py index bbd76e344..4dac0585f 100644 --- a/abipy/core/perl.py +++ b/abipy/core/perl.py @@ -1,5 +1,5 @@ # coding: utf-8 -from __future__ import print_function, division, unicode_literals, absolute_import +# flake8: noqa print( "You mean the perl language i.e. the only language that looks the same before and after RSA encryption?\n" diff --git a/abipy/core/release.py b/abipy/core/release.py index b78eae68f..003e82ba0 100644 --- a/abipy/core/release.py +++ b/abipy/core/release.py @@ -1,20 +1,19 @@ # coding: utf-8 """Release data for the AbiPy project.""" -from __future__ import print_function, division, unicode_literals from collections import OrderedDict -# Name of the package for release purposes. This is the name which labels +# Name of the package for release purposes. This is the name which labels # the tarballs and RPMs made by distutils, so it's best to lowercase it. name = 'abipy' # version information. An empty _version_extra corresponds to a full # release. 'dev' as a _version_extra string means this is a development version _version_major = 0 -_version_minor = 6 +_version_minor = 8 _version_micro = '0' # use '' for first of series, number for 1 and above -#_version_extra = '' # Uncomment this for full releases -_version_extra = 'dev' +#_version_extra = 'dev' +_version_extra = '' # Uncomment this for full releases # Construct full version string from these. _ver = [_version_major, _version_minor] @@ -30,6 +29,7 @@ description = "Python package to automate ABINIT calculations and analyze the results." +# Don't add spaces because pypi complains about RST long_description = """\ AbiPy is a Python library to analyze the results produced by `ABINIT `_, an open-source program for the ab-initio calculations of the physical properties of materials @@ -38,15 +38,15 @@ ab-initio calculations and typical convergence studies. AbiPy is interfaced with `Pymatgen `_ allowing users to benefit from the different tools and python objects available in the pymatgen ecosystem. - -AbiPy can be used in conjunction with `matplotlib `_, `pandas `_, +The official documentation is hosted on `github pages `_. +AbiPy can be used in conjunction with `matplotlib `_, `pandas `_, `ipython `_ and `jupyter `_ thus providing a powerful and user-friendly environment for data analysis and visualization. -Check out the list of plotting scripts available in our :doc:`gallery `. +Check out our `gallery of plotting scripts `_ +and the `gallery of AbiPy workflows `_. To learn more about the integration between jupyter and AbiPy, visit our collection of `notebooks -`_ -and the `AbiPy lessons `_. - +`_ and the +`AbiPy lessons `_. The latest development version is always available from """ @@ -67,9 +67,7 @@ download_url = "https://github.com/abinit/abipy" platforms = ['Linux', 'darwin'] keywords = ["ABINIT", "ab-initio", "density-function-theory", "first-principles", "electronic-structure", "pymatgen"] -classifiers=[ - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", +classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/abipy/core/restapi.py b/abipy/core/restapi.py index 180b0425e..984bc13d1 100644 --- a/abipy/core/restapi.py +++ b/abipy/core/restapi.py @@ -2,31 +2,26 @@ This module provides interfaces with the Materials Project REST API v2 to enable the creation of data structures and pymatgen objects using Materials Project data. """ -from __future__ import unicode_literals, print_function, division - import sys from collections import OrderedDict from pprint import pprint from monty.functools import lazy_property -from monty.collections import dict2namedtuple from monty.string import marquee from pymatgen import SETTINGS -try: - from pymatgen.ext.matproj import MPRester, MPRestError -except ImportError: - from pymatgen.matproj.rest import MPRester, MPRestError +from pymatgen.ext.matproj import MPRester, MPRestError from abipy.tools.printing import print_dataframe from abipy.core.mixins import NotebookWriter -MP_DEFAULT_ENDPOINT = "https://www.materialsproject.org/rest/v2" +MP_DEFAULT_ENDPOINT = "https://materialsproject.org/rest/v2" -MP_KEYS_FOR_DATAFRAME = ("pretty_formula", "e_above_hull", "energy_per_atom", - "formation_energy_per_atom", "nsites", "volume", - "spacegroup.symbol", "spacegroup.number", - "band_gap", "total_magnetization", "material_id") - # "unit_cell_formula", "icsd_id", "icsd_ids", "cif", , "tags", "elasticity") +MP_KEYS_FOR_DATAFRAME = ( + "pretty_formula", "e_above_hull", "energy_per_atom", + "formation_energy_per_atom", "nsites", "volume", + "spacegroup.symbol", "spacegroup.number", + "band_gap", "total_magnetization", "material_id" # "unit_cell_formula", "icsd_id", "icsd_ids", "cif", , "tags", "elasticity") +) def get_mprester(api_key=None, endpoint=None): @@ -106,8 +101,7 @@ def plot(self, show_unstable=True, show=True): ehull < show_unstable will be shown. show: True to show plot. - Return: - plotter object. + Return: plotter object. """ from pymatgen.analysis.phase_diagram import PDPlotter plotter = PDPlotter(self.phasediagram, show_unstable=show_unstable) @@ -164,7 +158,7 @@ def __init__(self, structures, ids, data=None): structures: List of structure objects ids: List of database ids. data: List of dictionaries with data associated to the structures (optional). - """ + """ from abipy.core.structure import Structure self.structures = list(map(Structure.as_structure, structures)) self.ids, self.data = ids, data @@ -193,7 +187,7 @@ def add_entry(self, structure, entry_id, data_dict=None): data_dict: Option dictionary with metadata. """ if data_dict is None: - new_data = None if self.data is None else self.data + [{}] + new_data = None if self.data is None else self.data + [{}] else: assert self.data is not None new_data = self.data + [data_dict] @@ -223,7 +217,7 @@ def print_results(self, fmt="abivars", verbose=0, file=sys.stdout): Set fmt to None or empty string to disable structure output. """ print("\n# Found %s structures in %s database (use `verbose` to get further info)\n" - % (len(self.structures), self.dbname), file=file) + % (len(self.structures), self.dbname), file=file) if self.dataframe is not None: print_dataframe(self.dataframe, file=file) if verbose and self.data is not None: pprint(self.data, stream=file) @@ -244,7 +238,7 @@ def print_results(self, fmt="abivars", verbose=0, file=sys.stdout): if len(self.structures) > 10: # Print info again print("\n# Found %s structures in %s database (use `verbose` to get further info)\n" - % (len(self.structures), self.dbname), file=file) + % (len(self.structures), self.dbname), file=file) def yield_figs(self, **kwargs): # pragma: no cover """NOP required by NotebookWriter protocol.""" @@ -342,7 +336,7 @@ def dotget(self, key, default=None): """ # if key is in dict access as normal if key in self: - return super(Dotdict,self).__getitem__(key) + return super().__getitem__(key) # Assume string i = -1 @@ -357,4 +351,4 @@ def dotget(self, key, default=None): if key == ".": return None return Dotdict(**self[root])[key] except Exception: - return None \ No newline at end of file + return None diff --git a/abipy/core/site_symmetries.py b/abipy/core/site_symmetries.py new file mode 100644 index 000000000..289332599 --- /dev/null +++ b/abipy/core/site_symmetries.py @@ -0,0 +1,269 @@ +""" +This module provides objects related to site symmetries +""" +import numpy as np +import sympy as sp + +from collections import OrderedDict +from monty.termcolor import cprint +from abipy.core.mixins import Has_Structure + + +class SiteSymmetries(Has_Structure): + + def __init__(self, structure): + """ + Args: + structure: |Structure| object. + """ + # Get spacegroup from spglib if not available from Abinit. + if not structure.has_abi_spacegroup: + structure.spgset_abi_spacegroup(has_timerev=True, overwrite=False) + + self._structure = structure + + abispg = structure.abi_spacegroup + nsym = len(abispg.symrel) + indsym = self.structure.indsym + + #self.eq_atoms = structure.spget_equivalent_atoms() + + # Precompute sympy objects used to solve linear system of equations. + self.sp_symrel, self.sp_symrec = [], [] + self.sp_tnons, self.sp_inv_symrel = [], [] + from abipy.core.symmetries import mati3inv + + for symr, symc, tau in zip(abispg.symrel, abispg.symrec, abispg.tnons): + self.sp_symrel.append(sp.Matrix((symr))) + inv_symr = mati3inv(symr, trans=False) + self.sp_inv_symrel.append(sp.Matrix((inv_symr))) + self.sp_symrec.append(sp.Matrix((symc))) + # FIXME: Should convert to rational numbers + # Permissible translations are unit cell translations or fractions thereof + # that are consistent with the rotational symmetry (e.g. 1/2, 1/3, 1/4, and 1/6), plus combinations. + tau = np.around(tau, decimals=5) + self.sp_tnons.append(sp.Matrix(tau)) + + #from abipy.core.symmetries import indsym_from_symrel + #other_indsym = indsym_from_symrel(abispg.symrel, abispg.tnons, self.structure, tolsym=1e-8) + #assert np.all(self.structure.indsym == other_indsym) + + # Compute symmetry operations in Cartesian coordinates (numpy arrays) + a = self.structure.lattice.matrix.T + self.symcart = np.matmul(a, np.matmul(abispg.symrel, np.linalg.inv(a))) + + import spglib + self.sitesym_labels = [] + for iatom, site in enumerate(self.structure): + rotations = [abispg.symrel[isym] for isym in range(nsym) if + indsym[iatom, isym, 3] == iatom and abispg.symafm[isym] == 1] + # Passing a 0-length rotations list to spglib can segfault. + herm_symbol, ptg_num = "1", 1 + if len(rotations) != 0: + herm_symbol, ptg_num, trans_mat = spglib.get_pointgroup(rotations) + + self.sitesym_labels.append("%s (#%d,nsym:%d)" % (herm_symbol.strip(), ptg_num, len(rotations))) + + #for irred_isite in self.irred_isites: + # for isite_eq, rm1, tau, l0 in self.eq_sites[irred_isite]: + # # isite_eq = rm1(irred_site - tau) + l0 + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation with verbosity level verbose.""" + lines = []; app = lines.append + app(self.structure.to_string(verbose=verbose, title="Structure")) + + return "\n".join(lines) + + def get_wyckoff_dataframe(self, view="all", select_symbols=None, decimals=5, verbose=0): + """ + Find Wyckoff positions. + + Args: + view: + select_symbols: + decimals: Number of decimal places to round to. + If decimals is negative, it specifies the number of positions to the left of the decimal point. + verbose: Verbosity level. + + Return |pandas-DataFrame| with cartesian tensor components as columns and (inequivalent) sites along the rows. + """ + # Select atoms. + aview = self._get_atomview(view, select_symbols, verbose=verbose) + + sitesym_labels = self.structure.spget_site_symmetries() + + frac_symbols = sp.symbols("xfrac, yfrac, zfrac") + vector = sp.Matrix((frac_symbols)) + + indsym = self.structure.indsym + abispg = self.structure.abi_spacegroup + rows = [] + for (iatom, wlabel) in zip(aview.iatom_list, aview.wyck_labels): + site = self.structure[iatom] + system = [] + for isym, (rm1, tau) in enumerate(zip(self.sp_inv_symrel, self.sp_tnons)): + if indsym[iatom, isym, 3] != iatom: continue + l0 = indsym[iatom, isym, :3] + l0 = sp.Matrix(l0) + m = rm1 * (vector - tau) - (l0 + vector) + if verbose: + print(92 * "=") + print("System of linear equations for iatom %d, %s" % (iatom, repr(site))) + sp.pprint(m) + print("Rotation:") + sp.pprint(rm1) + + system.append(m) + + # Solve system of linear equations. + solutions = sp.solve(system, dict=True) + #print(solutions) + if verbose and not solutions: + cprint("No solution for iatom %d" % iatom, "yellow") + + if solutions: + d = OrderedDict() + d["element"] = site.specie.symbol + d["site_index"] = iatom + d["cart_coords"] = np.round(site.coords, decimals=decimals) + d["frac_coords"] = np.round(site.frac_coords, decimals=decimals) + d["wyckoff"] = wlabel + d["site_symmetry"] = sitesym_labels[iatom] + for s in frac_symbols: + d[str(s)] = str(s) + if len(solutions) > 1: + cprint("Found multiple solutions for iatom %d" % iatom, "red") + d.update({str(k): str(v) for k, v in solutions[0].items()}) + rows.append(d) + + import pandas as pd + df = pd.DataFrame(rows, index=None, columns=list(rows[0].keys()) if rows else None) + return df + + def get_tensor_rank2_dataframe(self, view="all", select_symbols=None, decimals=5, verbose=0): + """ + Use site symmetries to detect indipendent elements of rank 2 tensor. + + Args: + view: + select_symbols: + decimals: Number of decimal places to round to. + If decimals is negative, it specifies the number of positions to the left of the decimal point. + verbose: Verbosity level + + Return |pandas-DataFrame| with cartesian tensor components as columns and (inequivalent) sites along the rows. + """ + # Select atoms. + aview = self._get_atomview(view, select_symbols, verbose=verbose) + + sitesym_labels = self.structure.spget_site_symmetries() + + # Symmetric tensor in reduced coordinates (direct lattice) + # Operations in reduced coords are given by integer matrices and this facilitates the solution + # of the system of equations with sympy. + Txx, Tyy, Tzz, Txy, Txz, Tyz = symbols = sp.symbols('Txx, Tyy, Tzz, Txy, Txz, Tyz') + tensor = sp.Matrix(([Txx, Txy, Txz], [Txy, Tyy, Tyz], [Txz, Tyz, Tzz])) + + indsym = self.structure.indsym + rows = [] + for (iatom, wlabel) in zip(aview.iatom_list, aview.wyck_labels): + site = self.structure[iatom] + system = [] + for isym, rotf in enumerate(self.sp_symrel): + if indsym[iatom, isym, 3] != iatom: continue + m = rotf * tensor * rotf.T - tensor + if verbose: + print(92 * "=") + print("System of linear equations for iatom %d, %s" % (iatom, repr(site))) + sp.pprint(m) + print("Rotation:") + sp.pprint(rotf) + print(92 * "=") + + system.append(m) + + # Solve system of linear equations. Print only sites for which we have contraints. + solutions = sp.solve(system, dict=True) + #print(solutions) + if verbose and not solutions: + cprint("No solution for iatom %d" % iatom, "yellow") + + if solutions: + d = OrderedDict() + d["element"] = site.specie.symbol + d["site_index"] = iatom + d["frac_coords"] = np.round(site.frac_coords, decimals=decimals) + d["cart_coords"] = np.round(site.coords, decimals=decimals) + d["wyckoff"] = wlabel + d["site_symmetry"] = sitesym_labels[iatom] + for s in symbols: + d[str(s)] = str(s) + if len(solutions) > 1: + cprint("Found multiple solutions for iatom %d" % iatom, "red") + d.update({str(k): str(v) for k, v in solutions[0].items()}) + rows.append(d) + + import pandas as pd + df = pd.DataFrame(rows, index=None, columns=list(rows[0].keys()) if rows else None) + return df + + def check_site_symmetries(self, tcart, verbose=0): + """ + Test whether a set of tensors associated to the crystalline sites are compatible + with the space group symmetries. + + Args: + tcart: (natom, 3, 3) array + verbose: Verbosity level. + + Return: max_err + """ + natom = len(self.structure) + indsym = self.structure.indsym + nsym = len(self.symcart) + tcart = np.reshape(tcart, (natom, 3, 3)) + + max_err = 0.0 + for iatom in range(natom): + ref_mat = tcart[iatom] + sym_mat = np.zeros_like(ref_mat) + count = 0 + for isym, scart in enumerate(self.symcart): + if indsym[iatom, isym, 3] != iatom: continue + count += 1 + sym_mat += np.matmul(scart, np.matmul(ref_mat, scart.T)) + #sym_mat += np.matmul(scart.T, np.matmul(ref_mat, scart)) + + if (nsym // count) * count != nsym: max_err = 1e+23 + sym_mat /= count + diff_mat = sym_mat - ref_mat + max_err = max(max_err, np.abs(diff_mat).sum()) + if count != 1 and verbose: + print("For iatom", iatom, "on-site symmetries with count:", count) + print("ref_mat:\n", ref_mat, "\nsym_mat:\n", sym_mat, "\ndiff_mat:\n", diff_mat) + + for iatom in range(natom): + ref_mat = tcart[iatom] + for isym, scart in enumerate(self.symcart): + jatom = indsym[iatom, isym, 3] + if jatom == iatom: continue + #sym_mat = np.matmul(scart, np.matmul(ref_mat, scart.T)) + sym_mat = np.matmul(scart.T, np.matmul(ref_mat, scart)) + diff_mat = sym_mat - tcart[jatom] + max_err = max(max_err, np.abs(diff_mat).sum()) + if verbose: + print("For iatom", iatom, "ref_mat, sym_mat, diff_mat") + print("ref_mat:\n", tcart[jatom], "\nsym_mat:\n", sym_mat, "\ndiff_mat:\n", diff_mat) + + if verbose: print("Max symmetrization error:", max_err) + + return max_err diff --git a/abipy/core/skw.py b/abipy/core/skw.py index 53bf1f9ac..45ad8968b 100644 --- a/abipy/core/skw.py +++ b/abipy/core/skw.py @@ -3,12 +3,9 @@ Shankland-Koelling-Wood Fourier interpolation scheme. For the theoretical background see :cite:`Euwema1969,Koelling1986,Pickett1988,Madsen2006`. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import abc import itertools import pickle -import six import numpy as np import scipy import time @@ -16,113 +13,13 @@ from collections import deque, OrderedDict from monty.termcolor import cprint from monty.collections import dict2namedtuple -from pymatgen.util.plotting import add_fig_kwargs, get_ax_fig_plt -from abipy.tools import gaussian -from abipy.core.kpoints import Ktables, Kpath +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from abipy.tools.numtools import gaussian, find_degs_sk +from abipy.core.kpoints import Kpath from abipy.core.symmetries import mati3inv -def n_fermi_dirac(enes, mu, temp): - """ - Fermi-Dirac distribution. - - Args: - enes: Energies in eV - mu: Chemical potential in eV. - temp: Temperature in Kelvin. - - Return: - numpy array with occupations in [0, 1]. - """ - if temp > 1e-2: - return 1. / (np.exp((enes - mu) / (kboltz * temp)) + 1) - else: - enes = np.asarray(enes) - n = np.where(enes <= mu, 1, 0) - return np.where(enes == mu, 0.5, enes) - - -def find_degs_sk(enesb, atol): - """ - Return list of lists with the indices of the degenerated bands. - - Args: - enesb: Iterable with energies for the different bands. - Energies are assumed to be ordered. - atol: Absolute tolerance. Two states are degerated if they differ by less than `atol`. - - Return: - List of lists. The i-th item contains the indices of the degenerates states - for the i-th degenerated set. - - :Examples: - - >>> find_degs_sk([1, 1, 2, 3.4, 3.401], atol=0.01) - [[0, 1], [2], [3, 4]] - """ - ndeg = 0 - degs = [[0]] - e0 = enesb[0] - for ib, ee in enumerate(enesb[1:]): - ib += 1 - if abs(ee - e0) > atol: - e0 = ee - ndeg += 1 - degs.append([ib]) - else: - degs[ndeg].append(ib) - - return degs - - -def map_bz2ibz(structure, ibz, ngkpt, has_timrev): - ngkpt = np.asarray(ngkpt, dtype=dp.int) - - #ibz_grid = [k * ngkpt for k in ibz] - #ibz_grid = ibz[..., :] * ngkpt - #for i, k in enumerate(ibz_grid): - # ibz_grid[ik] = ibz_grid[ik] % ngkpt - - bzgrid2ibz = np.array(ngkpt.shape, dtype=np.int) - #for i, gp in enumerate(itertools.product(range(ngkpt[0] + 1), range(ngkpt[1] + 1), range(ngkpt[2] + 1))): - # bzgrid2ibz[gp] = i - - symrec_fm = structure.spacegroup.symrec - time_signs = (1, -1) - - for ik_ibz, kibz in enumerate(ibz): - gp_ibz = np.rint(kibz * mesh) - rotated_gps = np.dot(symref_fm, gp_ibz).T - for tsign in tsigns: - if tsign == -1: rotated_gps = tsign * rotated_gps - for rot_gp in rotated_gps: - gp_bz = rot_gp % ngkpt - bzgrid2ibz[gp_bz] = ik_ibz - - #bz2ibz = -np.ones(len(bz), dtype=np.int) - #from abipy.core.kpoints import issamek - #for ik_bz, kbz in enumerate(bz): - # found = False - # for ik_ibz, kibz in enumerate(ibz): - # if found: break - # for symmop in structure.spacegroup: - # krot = symmop.rotate_k(kibz) - # if issamek(krot, kbz): - # bz2ibz[ik_bz] = ik_ibz - # found = True - # break - - return bz2ibz - - -#class EDOS(object): -# def __init__(self, mesh, values, integral, is_shift, method, step, width): -# self.mesh, self.values, self.integral = mesh, values, integral -# self.is_shift, self.method, self.step, self.width = is_shift, method, step, width - - -@six.add_metaclass(abc.ABCMeta) -class ElectronInterpolator(object): +class ElectronInterpolator(metaclass=abc.ABCMeta): """ """ # Tolerances passed to spglib. @@ -141,12 +38,12 @@ class ElectronInterpolator(object): @classmethod def pickle_load(cls, filepath): """Loads the object from a pickle file.""" - with open(filepath , "rb") as fh: + with open(filepath, "rb") as fh: return pickle.load(fh) def pickle_dump(self, filepath): """Save the status of the object in pickle format.""" - with open(filepath , "wb") as fh: + with open(filepath, "wb") as fh: pickle.dump(self, fh) def get_sampling(self, mesh, is_shift): @@ -196,8 +93,6 @@ def get_sampling(self, mesh, is_shift): ibz=ibz, nibz=len(ibz), weights=weights, bz=bz, nbz=len(bz), grid=grid, bz2ibz=bz2ibz) - #return Ktables(structure, mesh, is_shift, has_timrev) - #def recalc_fermie(self, kmesh, is_shift=None) # # Compute DOS # edos = _get_cached_edos(kmesh, is_shift) @@ -216,71 +111,71 @@ def val_ib(self): print("Trying to access valence band index with occtype:", self.occtype) return int(self.nelect // 2 - 1) - def set_fermie(self, fermie, kmesh, is_shift=None): - """ - Change the Fermi level. Use the IDOS computed on the k-grid specifined by - `kmesh` and `is_shift` to recompute the total number of electrons. + #def set_fermie(self, fermie, kmesh, is_shift=None): + # """ + # Change the Fermi level. Use the IDOS computed on the k-grid specifined by + # `kmesh` and `is_shift` to recompute the total number of electrons. - Args: - fermie: New Fermi level in eV - kmesh: Three integers with the number of divisions along the reciprocal primitive axes. - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # Args: + # fermie: New Fermi level in eV + # kmesh: Three integers with the number of divisions along the reciprocal primitive axes. + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. - Return: - New value of `self.nelect`. - """ - # Compute DOS - edos = self._get_cached_edos(kmesh, is_shift) - #if edos is None: - # edos = self.get_edos(kmesh, is_shift=is_shift, method="gaussian", step=0.1, width=0.2, wmesh=None) - # self._cache_edos(kmesh, is_shift, edos) - - self.fermie = fermie - # Find number of electrons from new chemical potential from nelect. - self.nelect = idos.spline(fermie) - return self.nelect - - def set_nelect(self, nelect, kmesh, is_shift=None): - """ - Change the total number of electrons. Use the IDOS computed on the k-grid specifined by - `kmesh` and `is_shift` to recompute the new Fermi level + # Return: + # New value of `self.nelect`. + # """ + # # Compute DOS + # edos = self._get_cached_edos(kmesh, is_shift) + # #if edos is None: + # # edos = self.get_edos(kmesh, is_shift=is_shift, method="gaussian", step=0.1, width=0.2, wmesh=None) + # # self._cache_edos(kmesh, is_shift, edos) - Args: - nelect: New numbre of electrons. - kmesh: Three integers with the number of divisions along the reciprocal primitive axes. - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # self.fermie = fermie + # # Find number of electrons from new chemical potential from nelect. + # self.nelect = idos.spline(fermie) + # return self.nelect - Return: - New value of `self.fermie`. - """ - # Compute DOS - edos = self._get_cached_edos(kmesh, is_shift) - #if edos is None: - # edos = self.get_edos(kmesh, is_shift=is_shift, method="gaussian", step=0.1, width=0.2, wmesh=None) - # self._cache_edos(kmesh, is_shift, edos) - self.nelect = nelect - # Find new chemical potential from nelect. - idos - self.fermie = new_fermie - return new_fermie + #def set_nelect(self, nelect, kmesh, is_shift=None): + # """ + # Change the total number of electrons. Use the IDOS computed on the k-grid specifined by + # `kmesh` and `is_shift` to recompute the new Fermi level + + # Args: + # nelect: New numbre of electrons. + # kmesh: Three integers with the number of divisions along the reciprocal primitive axes. + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + + # Return: + # New value of `self.fermie`. + # """ + # # Compute DOS + # edos = self._get_cached_edos(kmesh, is_shift) + # #if edos is None: + # # edos = self.get_edos(kmesh, is_shift=is_shift, method="gaussian", step=0.1, width=0.2, wmesh=None) + # # self._cache_edos(kmesh, is_shift, edos) + # self.nelect = nelect + # # Find new chemical potential from nelect. + # idos + # self.fermie = new_fermie + # return new_fermie #def set_charge_per_ucell(self, charge, kmesh, is_shift=None): - def get_occfacts(self, eigens, temp): - """ - Compute occupation factors from the eigenvalues `eigens` and - the temperature `temp` in K. occfacts in [0, 1]. - """ - if self.occtype == "insulator": - occfacts = np.ones(eigens.shape) - occfacts[:, :, self.val_ib + 1:] = 0.0 - else: - return { - #"gaussian": n_gaussian, - "fermi-dirac": n_fermi_dirac, - }[self.occtype](eigens, self.fermie, temp) + #def get_occfacts(self, eigens, temp): + # """ + # Compute occupation factors from the eigenvalues `eigens` and + # the temperature `temp` in K. occfacts in [0, 1]. + # """ + # if self.occtype == "insulator": + # occfacts = np.ones(eigens.shape) + # occfacts[:, :, self.val_ib + 1:] = 0.0 + # else: + # return { + # #"gaussian": n_gaussian, + # "fermi-dirac": n_fermi_dirac, + # }[self.occtype](eigens, self.fermie, temp) def get_edos(self, kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None): """ @@ -327,68 +222,67 @@ def get_edos(self, kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, return dict2namedtuple(mesh=wmesh, values=values, integral=integral) #return ElectronDos(wmesh, values, integral, is_shift, method, step, width) - def get_jdos_q0(self, kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None): - r""" - Compute the join density of states at q==0 - - :math:`\sum_{kbv} f_{vk} (1 - f_{ck}) \delta(\omega - E_{ck} + E_{vk})` - - Args: - kmesh: Three integers with the number of divisions along the reciprocal primitive axes. - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. - method: String defining the method. - step: Energy step (eV) of the linear mesh. - width: Standard deviation (eV) of the gaussian. - wmesh: Frequency mesh to use. If None, the mesh is computed automatically from the eigenvalues. - - Returns: - """ - k = self.get_sampling(kmesh, is_shift) - - # Interpolate eigenvalues in the IBZ. - eigens = self._get_cached_eigens(kmesh, is_shift, "ibz") - if eigens is None: - eigens = self.interp_kpts(k.ibz).eigens - self._cache_eigens(kmesh, is_shift, eigens, "ibz") - - wmesh, step = self._get_w2mesh_step(eigens, wmesh, step) - nw = len(wmesh) - values = np.zeros((self.nsppol, nw)) - - if self.occtype == "insulator": - if method == "gaussian": - for spin in range(self.nsppol): - for ik, wtk in enumerate(k.weights): - for icb in range(self.val_ib + 1, self.nband): - ec = eigens[spin, ik, icb] - for icv in range(self.val_ib): - ev = eigens[spin, ik, icv] - values[spin] += wtk * gaussian(wmesh, width, center=ec-ev) - else: - raise ValueError("Method %s is not supported" % method) + #def get_jdos_q0(self, kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None): + # r""" + # Compute the join density of states at q==0 - else: - #occfacts = self. - if method == "gaussian": - for spin in range(self.nsppol): - for ik, wtk in enumerate(k.weights): - for icb in conduction: - ec = eigens[spin, ik, icb] - fc = 1.0 - occfacts[spin, ik, icb] - for icv in valence: - ev = eigens[spin, ik, icv] - fv = occfacts[spin, ik, icv] - fact = wtk * fv * fc - values[spin] += fact * gaussian(wmesh, width, center=ec-ev) - else: - raise ValueError("Method %s is not supported" % method) + # :math:`\sum_{kbv} f_{vk} (1 - f_{ck}) \delta(\omega - E_{ck} + E_{vk})` - if self.nsppol == 1: values *= 2.0 - integral = scipy.integrate.cumtrapz(values, x=wmesh, initial=0.0) + # Args: + # kmesh: Three integers with the number of divisions along the reciprocal primitive axes. + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # method: String defining the method. + # step: Energy step (eV) of the linear mesh. + # width: Standard deviation (eV) of the gaussian. + # wmesh: Frequency mesh to use. If None, the mesh is computed automatically from the eigenvalues. + + # Returns: + # """ + # k = self.get_sampling(kmesh, is_shift) - return dict2namedtuple(mesh=wmesh, values=values, integral=integral) - #return ElectronJointDos(wmesh, values, integral, is_shift, method, step, width) + # # Interpolate eigenvalues in the IBZ. + # eigens = self._get_cached_eigens(kmesh, is_shift, "ibz") + # if eigens is None: + # eigens = self.interp_kpts(k.ibz).eigens + # self._cache_eigens(kmesh, is_shift, eigens, "ibz") + + # wmesh, step = self._get_w2mesh_step(eigens, wmesh, step) + # nw = len(wmesh) + # values = np.zeros((self.nsppol, nw)) + + # if self.occtype == "insulator": + # if method == "gaussian": + # for spin in range(self.nsppol): + # for ik, wtk in enumerate(k.weights): + # for icb in range(self.val_ib + 1, self.nband): + # ec = eigens[spin, ik, icb] + # for icv in range(self.val_ib): + # ev = eigens[spin, ik, icv] + # values[spin] += wtk * gaussian(wmesh, width, center=ec-ev) + # else: + # raise ValueError("Method %s is not supported" % method) + + # else: + # raise NotImplementedError("not insulator") + # #if method == "gaussian": + # # for spin in range(self.nsppol): + # # for ik, wtk in enumerate(k.weights): + # # for icb in conduction: + # # ec = eigens[spin, ik, icb] + # # fc = 1.0 - occfacts[spin, ik, icb] + # # for icv in valence: + # # ev = eigens[spin, ik, icv] + # # fv = occfacts[spin, ik, icv] + # # fact = wtk * fv * fc + # # values[spin] += fact * gaussian(wmesh, width, center=ec-ev) + # #else: + # # raise ValueError("Method %s is not supported" % method) + + # if self.nsppol == 1: values *= 2.0 + # integral = scipy.integrate.cumtrapz(values, x=wmesh, initial=0.0) + + # return dict2namedtuple(mesh=wmesh, values=values, integral=integral) #def get_jdos_qpts(self, qpoints, kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None): # qpoints = np.reshape(qpoints, (-1, 3)) @@ -413,48 +307,48 @@ def get_jdos_q0(self, kmesh, is_shift=None, method="gaussian", step=0.1, width=0 # jdos_sqw *= 1. / k.nbz # return jdos_sqw - def get_nesting_at_e0(self, qpoints, kmesh, e0, width=0.2, is_shift=None): - """ - Compute the nesting factor with gaussian broadening for an arbitrary list of q-points. - - Args: - qpoints: List of q-points in reduced coordinates. - kmesh: Three integers with the number of divisions along the reciprocal primitive axes. - e0: Energy level in eV. - width: Standard deviation (eV) of the gaussian. - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + #def get_nesting_at_e0(self, qpoints, kmesh, e0, width=0.2, is_shift=None): + # """ + # Compute the nesting factor with gaussian broadening for an arbitrary list of q-points. - Returns: - numpy array of shape [self.nsppol, len(qpoints)] - """ - qpoints = np.reshape(qpoints, (-1, 3)) - k = self.get_sampling(kmesh, is_shift) + # Args: + # qpoints: List of q-points in reduced coordinates. + # kmesh: Three integers with the number of divisions along the reciprocal primitive axes. + # e0: Energy level in eV. + # width: Standard deviation (eV) of the gaussian. + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + + # Returns: + # numpy array of shape [self.nsppol, len(qpoints)] + # """ + # qpoints = np.reshape(qpoints, (-1, 3)) + # k = self.get_sampling(kmesh, is_shift) - # Interpolate eigenvalues in the full BZ. - eigens_kbz = self._get_cached_eigens(kmesh, is_shift, "bz") - if eigens is None: - eigens_kbz = self.interp_kpts(k.bz).eigens - self._cache_eigens(kmesh, is_shift, eigens_kbz, "bz") + # # Interpolate eigenvalues in the full BZ. + # eigens_kbz = self._get_cached_eigens(kmesh, is_shift, "bz") + # if eigens_kbz is None: + # eigens_kbz = self.interp_kpts(k.bz).eigens + # self._cache_eigens(kmesh, is_shift, eigens_kbz, "bz") - eigens_kbz = eigens_kbz - e0 - g_skb = gaussian(eigens_kbz, width) + # eigens_kbz = eigens_kbz - e0 + # g_skb = gaussian(eigens_kbz, width) - # TODO: One could reduce the sum to IBZ(q) with appropriate weight. - nest_sq = np.zeros((self.nsppol, len(qpoints))) - for iq, qpt in enumerate(qpoints): - kpq_bz = kbz + qpt - eigens_kqbz = self.interp_kpts(kpq_bz).eigens - e0 - g_skqb = gaussian(eigens_kqbz, width) - vals = g_skb * g_skqb - nest_sq[:, iq] = vals.sum(axis=(1, 2)) + # # TODO: One could reduce the sum to IBZ(q) with appropriate weight. + # nest_sq = np.zeros((self.nsppol, len(qpoints))) + # for iq, qpt in enumerate(qpoints): + # kpq_bz = kbz + qpt + # eigens_kqbz = self.interp_kpts(kpq_bz).eigens - e0 + # g_skqb = gaussian(eigens_kqbz, width) + # vals = g_skb * g_skqb + # nest_sq[:, iq] = vals.sum(axis=(1, 2)) - nest_sq *= 1. / k.nbz - return nest_sq + # nest_sq *= 1. / k.nbz + # return nest_sq def _get_wmesh_step(self, eigens, wmesh, step): if wmesh is not None: - return wesh, wmesh[1] - wmesh[0] + return wmesh, wmesh[1] - wmesh[0] # Compute the linear mesh. epad = 1.0 @@ -467,7 +361,7 @@ def _get_wmesh_step(self, eigens, wmesh, step): def _get_w2mesh_step(self, eigens, wmesh, step): if wmesh is not None: - return wesh, wmesh[1] - wmesh[0] + return wmesh, wmesh[1] - wmesh[0] # Compute the linear mesh. cmin, cmax = +np.inf, -np.inf @@ -573,139 +467,139 @@ def plot_dos_vs_kmeshes(self, kmeshes, is_shift=None, method="gaussian", step=0. return fig - @add_fig_kwargs - def plot_jdosq0_vs_kmeshes(self, kmeshes, is_shift=None, method="gaussian", step=0.1, width=0.2, - ax=None, fontsize=12, **kwargs): - """ - Plot (interpolated) Joint DOSes at q=0 computed with different meshes. - - Args: - kmeshes: List of kmeshes. Each item is given by three integers with the number of - divisions along the reciprocal primitive axes. - is_shift: three integers (spglib API). If None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. - method: String defining the method for the computation of the DOS. - step: Energy step (eV) of the linear mesh. - width: Standard deviation (eV) of the gaussian. - ax: |matplotlib-Axes| or None if a new figure should be created. - fontsize: Legend and title fontsize. - - Returns: |matplotlib-Figure| - """ - ax, fig, plt = get_ax_fig_plt(ax=ax) - kmeshes = np.reshape(np.asarray(kmeshes, dtype=np.int), (-1, 3)) - for kmesh in kmeshes: - jdos = self.get_jdos_q0(kmesh, is_shift=is_shift, method=method, step=step, width=width) - for spin in range(self.nsppol): - spin_sign = +1 if spin == 0 else -1 - ax.plot(jdos.mesh, jdos.values[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) - - ax.grid(True) - ax.set_xlabel("Energy (eV)") - ax.set_ylabel('JDOS (states/eV)') - ax.legend(loc="best", fontsize=fontsize, shadow=True) - - return fig - - @add_fig_kwargs - def plot_nesting_vs_widths(self, widths, kmesh, e0=None, qvertices_names=None, - line_density=20, is_shift=None, ax=None, fontsize=12, **kwargs): - """ - Plot (interpolated) nesting factor computed with different broadening. - - Args: - widths: List of standard deviations (eV) of the gaussian. - kmeshes: List of kmeshes. Each item is given by three integers with the number of - divisions along the reciprocal primitive axes. - e0: Energy level in eV. - qvertices_names - line_density: - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. - ax: |matplotlib-Axes| or None if a new figure should be created. - fontsize: Legend and title fontsize. + #@add_fig_kwargs + #def plot_jdosq0_vs_kmeshes(self, kmeshes, is_shift=None, method="gaussian", step=0.1, width=0.2, + # ax=None, fontsize=12, **kwargs): + # """ + # Plot (interpolated) Joint DOSes at q=0 computed with different meshes. - Returns: |matplotlib-Figure| - """ - ax, fig, plt = get_ax_fig_plt(ax=ax) - qpoints = self._get_kpts_kticks_klabels(ax, qvertices_names, line_density) + # Args: + # kmeshes: List of kmeshes. Each item is given by three integers with the number of + # divisions along the reciprocal primitive axes. + # is_shift: three integers (spglib API). If None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # method: String defining the method for the computation of the DOS. + # step: Energy step (eV) of the linear mesh. + # width: Standard deviation (eV) of the gaussian. + # ax: |matplotlib-Axes| or None if a new figure should be created. + # fontsize: Legend and title fontsize. + + # Returns: |matplotlib-Figure| + # """ + # ax, fig, plt = get_ax_fig_plt(ax=ax) + # kmeshes = np.reshape(np.asarray(kmeshes, dtype=np.int), (-1, 3)) + # for kmesh in kmeshes: + # jdos = self.get_jdos_q0(kmesh, is_shift=is_shift, method=method, step=step, width=width) + # for spin in range(self.nsppol): + # spin_sign = +1 if spin == 0 else -1 + # ax.plot(jdos.mesh, jdos.values[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) + + # ax.grid(True) + # ax.set_xlabel("Energy (eV)") + # ax.set_ylabel('JDOS (states/eV)') + # ax.legend(loc="best", fontsize=fontsize, shadow=True) + + # return fig + + #@add_fig_kwargs + #def plot_nesting_vs_widths(self, widths, kmesh, e0=None, qvertices_names=None, + # line_density=20, is_shift=None, ax=None, fontsize=12, **kwargs): + # """ + # Plot (interpolated) nesting factor computed with different broadening. - e0 = self.interpolated_fermie if e0 is None else e0 - for width in np.asarray(widths): - nest_sq = self.get_nesting_at_e0(qpoints, kmesh, e0, width=width, is_shift=is_shift) - for spin in range(self.nsppol): - spin_sign = +1 if spin == 0 else -1 - ax.plot(nest_sq[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) + # Args: + # widths: List of standard deviations (eV) of the gaussian. + # kmeshes: List of kmeshes. Each item is given by three integers with the number of + # divisions along the reciprocal primitive axes. + # e0: Energy level in eV. + # qvertices_names + # line_density: + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # ax: |matplotlib-Axes| or None if a new figure should be created. + # fontsize: Legend and title fontsize. + + # Returns: |matplotlib-Figure| + # """ + # ax, fig, plt = get_ax_fig_plt(ax=ax) + # qpoints = self._get_kpts_kticks_klabels(ax, qvertices_names, line_density) - ax.grid(True) - ax.set_ylabel('Nesting factor') - ax.legend(loc="best", fontsize=fontsize, shadow=True) + # e0 = self.interpolated_fermie if e0 is None else e0 + # for width in np.asarray(widths): + # nest_sq = self.get_nesting_at_e0(qpoints, kmesh, e0, width=width, is_shift=is_shift) + # for spin in range(self.nsppol): + # spin_sign = +1 if spin == 0 else -1 + # ax.plot(nest_sq[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) - return fig + # ax.grid(True) + # ax.set_ylabel('Nesting factor') + # ax.legend(loc="best", fontsize=fontsize, shadow=True) - @add_fig_kwargs - def plot_nesting_vs_kmeshes(self, width, kmeshes, e0=None, qvertices_names=None, line_density=20, - is_shift=None, ax=None, fontsize=12, **kwargs): - """ - Plot (interpolated) nesting factor computed with different k-meshes. + # return fig - Args: - width: Gaussian broadening (eV). - kmeshes: List of kmeshes. Each item is given by three integers with the number of - divisions along the reciprocal primitive axes. - e0: Energy level in eV. - qvertices_names - line_density: - is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along - the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. - ax: |matplotlib-Axes| or None if a new figure should be created. - fontsize: legend and title fontsize. + #@add_fig_kwargs + #def plot_nesting_vs_kmeshes(self, width, kmeshes, e0=None, qvertices_names=None, line_density=20, + # is_shift=None, ax=None, fontsize=12, **kwargs): + # """ + # Plot (interpolated) nesting factor computed with different k-meshes. - Returns: |matplotlib-Figure| - """ - ax, fig, plt = get_ax_fig_plt(ax=ax) - qpoints = self._get_kpts_kticks_klabels(ax, qvertices_names, line_density) + # Args: + # width: Gaussian broadening (eV). + # kmeshes: List of kmeshes. Each item is given by three integers with the number of + # divisions along the reciprocal primitive axes. + # e0: Energy level in eV. + # qvertices_names + # line_density: + # is_shift: three integers (spglib API). When is_shift is not None, the kmesh is shifted along + # the axis in half of adjacent mesh points irrespective of the mesh numbers. None means unshited mesh. + # ax: |matplotlib-Axes| or None if a new figure should be created. + # fontsize: legend and title fontsize. + + # Returns: |matplotlib-Figure| + # """ + # ax, fig, plt = get_ax_fig_plt(ax=ax) + # qpoints = self._get_kpts_kticks_klabels(ax, qvertices_names, line_density) - kmeshes = np.reshape(np.asarray(kmeshes, dtype=np.int), (-1, 3)) - e0 = self.interpolated_fermie if e0 is None else e0 - for kmesh in kmeshes: - nest_sq = self.get_nesting_at_e0(qpoints, kmesh, e0, width=width, is_shift=is_shift) - for spin in range(self.nsppol): - spin_sign = +1 if spin == 0 else -1 - ax.plot(nest_sq[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) + # kmeshes = np.reshape(np.asarray(kmeshes, dtype=np.int), (-1, 3)) + # e0 = self.interpolated_fermie if e0 is None else e0 + # for kmesh in kmeshes: + # nest_sq = self.get_nesting_at_e0(qpoints, kmesh, e0, width=width, is_shift=is_shift) + # for spin in range(self.nsppol): + # spin_sign = +1 if spin == 0 else -1 + # ax.plot(nest_sq[spin] * spin_sign, label=str(kmesh) if spin == 0 else None) - ax.grid(True) - ax.set_ylabel('Nesting factor') - ax.legend(loc="best", fontsize=fontsize, shadow=True) + # ax.grid(True) + # ax.set_ylabel('Nesting factor') + # ax.legend(loc="best", fontsize=fontsize, shadow=True) - return fig + # return fig - @add_fig_kwargs - def plot_group_velocites(self, vertices_names=None, line_density=20, ax=None, **kwargs): - """ - Plot (interpolated) group velocities computed along an arbitrary k-path. + #@add_fig_kwargs + #def plot_group_velocites(self, vertices_names=None, line_density=20, ax=None, **kwargs): + # """ + # Plot (interpolated) group velocities computed along an arbitrary k-path. - Args: - vertices_names - line_density: - ax: |matplotlib-Axes| or None if a new figure should be created. + # Args: + # vertices_names + # line_density: + # ax: |matplotlib-Axes| or None if a new figure should be created. - Returns: |matplotlib-Figure| - """ - ax, fig, plt = get_ax_fig_plt(ax=ax) - kfrac_coords = self._get_kpts_kticks_klabels(ax, vertices_names, line_density) + # Returns: |matplotlib-Figure| + # """ + # ax, fig, plt = get_ax_fig_plt(ax=ax) + # kfrac_coords = self._get_kpts_kticks_klabels(ax, vertices_names, line_density) - #v_skb = self.interp_kpts(kfrac_coords, dk1=v_skb) - for spin in range(self.nsppol): - for band in range(self.nband): - # plot |v| - v_skb[spin, :, band] - ax.plot(vals, color="k" if spin == 0 else "r") + # #v_skb = self.interp_kpts(kfrac_coords, dk1=v_skb) + # for spin in range(self.nsppol): + # for band in range(self.nband): + # # plot |v| + # v_skb[spin, :, band] + # ax.plot(vals, color="k" if spin == 0 else "r") - ax.grid(True) - ax.set_ylabel('Group Velocities') + # ax.grid(True) + # ax.set_ylabel('Group Velocities') - return fig + # return fig def _get_kpts_kticks_klabels(self, ax, vertices_names, line_density): if vertices_names is None: @@ -820,6 +714,13 @@ class SkwInterpolator(ElectronInterpolator): the names of the variables are chosen assuming we are interpolating electronic eigenvalues but the same object can be used to interpolate other quantities. Just set the first dimension to 1. """ + #@class method + #def from_ncreader(cls, reader): + # return cls(lpratio, kpts, eigens, fermie, nelect, cell, symrel, has_timrev, + # filter_params=None, verbose=1) + + #@class method + #def from_file(cls, filepath) def __init__(self, lpratio, kpts, eigens, fermie, nelect, cell, symrel, has_timrev, filter_params=None, verbose=1): @@ -957,7 +858,7 @@ def __init__(self, lpratio, kpts, eigens, fermie, nelect, cell, symrel, has_timr self.rcut = filter_params[0] * np.sqrt(r2vals[-1]) self.rsigma = rsigma = filter_params[1] if self.verbose: - print("Applying filter (Eq 9 of PhysRevB.61.1639) with rcut:", rcut, ", rsigma", self.rsigma) + print("Applying filter (Eq 9 of PhysRevB.61.1639) with rcut:", self.rcut, ", rsigma", self.rsigma) from scipy.special import erfc for ir in range(1, nr): self.coefs[:, :, ir] *= 0.5 * erfc((np.sqrt(r2vals[ir]) - self.rcut) / self.rsigma) @@ -981,7 +882,7 @@ def __init__(self, lpratio, kpts, eigens, fermie, nelect, cell, symrel, has_timr print("spin", spin, "band", band, "ikpt", ik, "e0", e0, "eskw", eskw, "diff", e0 - eskw) mae *= 1e3 / (nsppol * nkpt * nband) - if np.isnan(mae) or np.isinf(mae): + if np.isnan(mae) or np.isinf(mae) or mae > 1000: raise RuntimeError("Interpolation went bananas! mae = %s" % mae) warn = mae > 10.0 @@ -1205,9 +1106,11 @@ def _find_rstar_gen(self, nrwant, rmax): start = time.time() for cnt, l in enumerate(itertools.product(range(-rmax[0], rmax[0] + 1), - range(-rmax[1], rmax[1] + 1), range(-rmax[2], rmax[2] + 1))): - rtmp[cnt] = l - r2tmp[cnt] = np.dot(l, np.matmul(self.rmet, l)) + range(-rmax[1], rmax[1] + 1), + range(-rmax[2], rmax[2] + 1))): + rtmp[cnt] = l + r2tmp[cnt] = np.dot(l, np.matmul(self.rmet, l)) + if self.verbose: print("gen points", time.time() - start) start = time.time() diff --git a/abipy/core/structure.py b/abipy/core/structure.py index 13e08855b..a96d1718f 100644 --- a/abipy/core/structure.py +++ b/abipy/core/structure.py @@ -2,8 +2,6 @@ """ This module defines basic objects representing the crystalline structure. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import collections @@ -13,7 +11,7 @@ import pymatgen import pymatgen.core.units as pmg_units -from pprint import pprint, pformat +from pprint import pformat from warnings import warn from collections import OrderedDict from monty.collections import AttrDict, dict2namedtuple @@ -27,7 +25,7 @@ from abipy.flowtk import PseudoTable from abipy.core.mixins import NotebookWriter from abipy.core.symmetries import AbinitSpaceGroup -from abipy.iotools import as_etsfreader, Visualizer, xsf +from abipy.iotools import as_etsfreader, Visualizer from abipy.flowtk.abiobjects import structure_from_abivars, structure_to_abivars @@ -66,7 +64,7 @@ def mp_match_structure(obj, api_key=None, endpoint=None, final=True): mpids = rest.find_structure(structure) if mpids: structures = [Structure.from_mpid(mid, final=final, api_key=api_key, endpoint=endpoint) - for mid in mpids] + for mid in mpids] except rest.Error as exc: cprint(str(exc), "red") @@ -74,6 +72,8 @@ def mp_match_structure(obj, api_key=None, endpoint=None, final=True): finally: # Back to abipy structure structure = Structure.as_structure(structure) + structures.insert(0, structure) + mpids.insert(0, "this") return restapi.MpStructures(structures=structures, ids=mpids) @@ -105,7 +105,7 @@ def mp_search(chemsys_formula_id, api_key=None, endpoint=None): data = rest.get_data(chemsys_formula_id, prop="") if data: structures = [Structure.from_str(d["cif"], fmt="cif", primitive=False, sort=False) - for d in data] + for d in data] mpids = [d["material_id"] for d in data] # Want AbiPy structure. structures = list(map(Structure.as_structure, structures)) @@ -118,7 +118,7 @@ def mp_search(chemsys_formula_id, api_key=None, endpoint=None): def cod_search(formula, primitive=False): """ - Connect to the COD_ database. Get a list of structures corresponding to a chemical formula + Connect to the COD_ database. Get list of structures corresponding to a chemical formula Args: formula (str): Chemical formula (e.g., Fe2O3) @@ -174,14 +174,11 @@ def as_structure(cls, obj): if is_string(obj): return cls.from_file(obj) - if isinstance(obj, collections.Mapping): - try: + if isinstance(obj, collections.abc.Mapping): + if "@module" in obj: + return Structure.from_dict(obj) + else: return Structure.from_abivars(obj) - except: - try: - return Structure.from_dict(obj) - except: - raise TypeError("Don't know how to convert dict %s into a structure" % str(obj)) if hasattr(obj, "structure"): return cls.as_structure(obj.structure) @@ -212,6 +209,9 @@ def from_file(cls, filepath, primitive=False, sort=False): Returns: |Structure| object """ + #zipped_exts = (".bz2", ".gz", ".z"): + root, ext = os.path.splitext(filepath) + if filepath.endswith("_HIST.nc"): # Abinit history file. In this case we return the last structure! # Note that HIST does not follow the etsf-io conventions. @@ -224,7 +224,15 @@ def from_file(cls, filepath, primitive=False, sort=False): ncfile, closeit = as_etsfreader(filepath) new = ncfile.read_structure(cls=cls) - new.set_abi_spacegroup(AbinitSpaceGroup.from_file(ncfile)) + new.set_abi_spacegroup(AbinitSpaceGroup.from_ncreader(ncfile)) + + # Try to read indsym table from file (added in 8.9.x) + indsym = ncfile.read_value("indsym", default=None) + if indsym is not None: + # Fortran --> C convention + indsym[:, :, 3] -= 1 + new.indsym = indsym + if closeit: ncfile.close() elif filepath.endswith(".abi") or filepath.endswith(".in"): @@ -244,7 +252,7 @@ def from_file(cls, filepath, primitive=False, sort=False): if out.initial_structures: return out.initial_structure raise ValueError("Cannot find structure in Abinit output file `%s`" % filepath) - elif filepath.endswith("_DDB"): + elif filepath.endswith("_DDB") or root.endswith("_DDB"): # DDB file. from abipy.abilab import abiopen with abiopen(filepath) as abifile: @@ -267,7 +275,7 @@ def from_file(cls, filepath, primitive=False, sort=False): else: # Invoke pymatgen and change class # Note that AbinitSpacegroup is missing here. - new = super(Structure, cls).from_file(filepath, primitive=primitive, sort=sort) + new = super().from_file(filepath, primitive=primitive, sort=sort) if new.__class__ != cls: new.__class__ = cls return new @@ -476,26 +484,32 @@ def rocksalt(cls, a, species, units="ang", **kwargs): @classmethod def ABO3(cls, a, species, units="ang", **kwargs): - """ - Peroviskite structures. + """ + Peroviskite structures. - Args: + Args: a: Lattice parameter (Angstrom if units is not given) species: Chemical species. See __init__ method of :class:`pymatgen.Structure` units: Units of input lattice parameters e.g. "bohr", "pm" kwargs: All keyword arguments accepted by :class:`pymatgen.Structure` - """ - a = pmg_units.Length(a, units).to("ang") - lattice = float(a) * np.eye(3) - frac_coords = np.reshape([ - 0, 0, 0, # A (2a) - 0.5, 0.5, 0.5, # B (2a) - 0.5, 0.5, 0.0, # O (6b) - 0.5, 0.0, 0.5, # O (6b) - 0.0, 0.5, 0.5, # O (6b) - ], (5, 3)) - - return cls(lattice, species, frac_coords, coords_are_cartesian=False, **kwargs) + """ + a = pmg_units.Length(a, units).to("ang") + lattice = float(a) * np.eye(3) + frac_coords = np.reshape([ + 0, 0, 0, # A (2a) + 0.5, 0.5, 0.5, # B (2a) + 0.5, 0.5, 0.0, # O (6b) + 0.5, 0.0, 0.5, # O (6b) + 0.0, 0.5, 0.5, # O (6b) + ], (5, 3)) + + return cls(lattice, species, frac_coords, coords_are_cartesian=False, **kwargs) + + @classmethod + def from_abistring(cls, string): + """Initialize Structure from string with Abinit input variables.""" + from abipy.abio.abivars import AbinitInputFile + return AbinitInputFile.from_string(string).structure @classmethod def from_abivars(cls, *args, **kwargs): @@ -529,7 +543,7 @@ def to_string(self, title=None, verbose=0): if verbose: app(self.spget_summary(verbose=verbose)) else: - app(super(Structure, self).__str__()) + app(super().__str__()) if self.abi_spacegroup is not None: app("\nAbinit Spacegroup: %s" % self.abi_spacegroup.to_string(verbose=verbose)) @@ -538,20 +552,20 @@ def to_string(self, title=None, verbose=0): def to(self, fmt=None, filename=None, **kwargs): __doc__ = pymatgen.Structure.to.__doc__ + \ - "\n Accepts also fmt='abivars' and `.abi` as Abinit input file extension" + "\n Accepts also fmt=`abinit` or `abivars` or `.abi` as Abinit input file extension" filename = filename or "" fmt = "" if fmt is None else fmt.lower() fname = os.path.basename(filename) - if fmt in ("abi", "abivars") or fname.endswith(".abi"): + if fmt in ("abi", "abivars", "abinit") or fname.endswith(".abi"): if filename: with open(filename, "wt") as f: f.write(self.abi_string) else: return self.abi_string else: - return super(Structure, self).to(fmt=fmt, filename=filename, **kwargs) + return super().to(fmt=fmt, filename=filename, **kwargs) def __mul__(self, scaling_matrix): """ @@ -560,7 +574,7 @@ def __mul__(self, scaling_matrix): Wraps __mul__ operator of pymatgen structure to return abipy structure """ - new = super(Structure, self).__mul__(scaling_matrix) + new = super().__mul__(scaling_matrix) return self.__class__.as_structure(new) __rmul__ = __mul__ @@ -587,15 +601,19 @@ def abi_string(self): return("\n".join(lines)) + def get_panel(self): + """Build panel with widgets to interact with the structure either in a notebook or in a bokeh app""" + from abipy.panels.structure import StructurePanel + return StructurePanel(self).get_panel() + def get_conventional_standard_structure(self, international_monoclinic=True, - symprec=1e-3, angle_tolerance=5): + symprec=1e-3, angle_tolerance=5): """ Gives a structure with a conventional cell according to certain - standards. The standards are defined in :cite:`Setyawan2010` - They basically enforce as much as possible norm(a1)") - @property def reciprocal_lattice(self): """ @@ -750,8 +761,12 @@ def spget_equivalent_atoms(self, symprec=1e-3, angle_tolerance=5, printout=False ``namedtuple`` (irred_pos, eqmap, spgdata) with the following attributes:: * irred_pos: array giving the position of the i-th irred atom in the structure. - The number of irred atoms is len(irred_pos) - * eqmap: Mapping irred atom position --> list with positions of symmetrical atoms + The number of irred atoms is len(irred_pos). + * eqmap: Mapping irred atom position --> list with positions of symmetrical atoms. + * wyckoffs: Wyckoff letters. + * wyck_mult: Array with Wyckoff multiplicity. + * wyck_labels: List of labels with Wyckoff multiplicity and letter e.g. 3a + * site_labels: Labels for each site in computed from element symbol and wyckoff positions e.g Si2a * spgdata: spglib dataset with additional data reported by spglib_. :Example: @@ -759,9 +774,15 @@ def spget_equivalent_atoms(self, symprec=1e-3, angle_tolerance=5, printout=False for irr_pos in irred_pos: eqmap[irr_pos] # List of symmetrical positions associated to the irr_pos atom. """ + natom = len(self) spgan = SpacegroupAnalyzer(self, symprec=symprec, angle_tolerance=angle_tolerance) spgdata = spgan.get_symmetry_dataset() equivalent_atoms = spgdata["equivalent_atoms"] + wyckoffs = np.array(spgdata["wyckoffs"]) + + wyck_mult = [np.count_nonzero(equivalent_atoms == equivalent_atoms[i]) for i in range(natom)] + wyck_mult = np.array(wyck_mult, dtype=np.int) + irred_pos = [] eqmap = collections.defaultdict(list) for pos, eqpos in enumerate(equivalent_atoms): @@ -775,16 +796,28 @@ def spget_equivalent_atoms(self, symprec=1e-3, angle_tolerance=5, printout=False eqmap[eqpos] = np.array(eqmap[eqpos], dtype=np.int) if printout: - print("Found %d inequivalent position(s)." % len(irred_pos)) + print("Found %d inequivalent position(s):" % len(irred_pos)) for i, irr_pos in enumerate(sorted(eqmap.keys())): - print("Irred_Site: %s" % str(self[irr_pos])) + print("Wyckoff position: (%s%s)" % (wyck_mult[irr_pos], wyckoffs[irr_pos])) + print("\t[%d]: %s" % (irr_pos, repr(self[irr_pos]))) for eqind in eqmap[irr_pos]: if eqind == irr_pos: continue - print("\tSymEq: %s" % str(self[eqind])) + print("\t[%d]: %s" % (eqind, repr(self[eqind]))) + print("") - return dict2namedtuple(irred_pos=irred_pos, eqmap=eqmap, spgdata=spgdata) + # Build list of labels from multiplicity and name: e.g. 3a + wyck_labels = np.array(["%s%s" % (wmul, wsymb) for wsymb, wmul in zip(wyckoffs, wyck_mult)]) - def spget_summary(self, symprec=1e-3, angle_tolerance=5, verbose=0): + # Build labels for sites with chemical element. + site_labels = [] + for i, (site, wsymb, wmul) in enumerate(zip(self, wyckoffs, wyck_mult)): + site_labels.append("%s%d (%s%s)" % (site.specie.symbol, i, wmul, wsymb)) + + return dict2namedtuple(irred_pos=irred_pos, eqmap=eqmap, wyckoffs=wyckoffs, + wyck_mult=wyck_mult, wyck_labels=wyck_labels, + site_labels=np.array(site_labels), spgdata=spgdata) + + def spget_summary(self, symprec=1e-3, angle_tolerance=5, site_symmetry=False, verbose=0): """ Return string with full information about crystalline structure i.e. space group, point group, wyckoff positions, equivalent sites. @@ -792,6 +825,7 @@ def spget_summary(self, symprec=1e-3, angle_tolerance=5, verbose=0): Args: symprec (float): Symmetry precision for distance. angle_tolerance (float): Tolerance on angles. + site_symmetry: True to show site symmetries i.e. the point group operations that leave the site invariant. verbose (int): Verbosity level. """ spgan = SpacegroupAnalyzer(self, symprec=symprec, angle_tolerance=angle_tolerance) @@ -809,7 +843,7 @@ def spget_summary(self, symprec=1e-3, angle_tolerance=5, verbose=0): outs.append("angles: " + " ".join([to_s(i).rjust(10) for i in self.lattice.angles])) app("") - app("Spglib space group info (magnetic symmetries are not taken into account).") + app("Spglib space group info (magnetic symmetries not taken into account).") app("Spacegroup: %s (%s), Hall: %s, Abinit spg_number: %s" % ( spgan.get_space_group_symbol(), spgan.get_space_group_number(), spgan.get_hall(), str(abispg_number))) app("Crystal_system: %s, Lattice_type: %s, Point_group: %s" % ( @@ -817,15 +851,25 @@ def spget_summary(self, symprec=1e-3, angle_tolerance=5, verbose=0): app("") wickoffs, equivalent_atoms = spgdata["wyckoffs"], spgdata["equivalent_atoms"] - table = [["Idx", "Symbol", "Reduced_Coords", "Wyck", "EqIdx"]] + header = ["Idx", "Symbol", "Reduced_Coords", "Wyckoff", "EqIdx"] + + if site_symmetry: + header.append("site_symmetry") + sitesym_labels = self.spget_site_symmetries() + + table = [header] for i, site in enumerate(self): - table.append([ + mult = np.count_nonzero(equivalent_atoms == equivalent_atoms[i]) + row = [ i, site.species_string, "%+.5f %+.5f %+.5f" % tuple(site.frac_coords), - "%s" % wickoffs[i], + "(%s%s)" % (mult, wickoffs[i]), "%d" % equivalent_atoms[i], - ]) + ] + if site_symmetry: row.append(sitesym_labels[i]) + + table.append(row) from tabulate import tabulate app(tabulate(table, headers="firstrow")) @@ -861,15 +905,14 @@ def has_abi_spacegroup(self): def spgset_abi_spacegroup(self, has_timerev, overwrite=False): """ Call spglib to find the spacegroup of the crystal, create new - :class:`AbinitSpaceGroup` object and store it in ``self.abi_spacegroup``. + :class:`AbinitSpaceGroup` object and store it in ``self.abi_spacegroup``. Args: has_timerev (bool): True if time-reversal can be used. overwrite (bool): By default, the method raises `ValueError` if the object already has the list of symmetries found by Abinit. - Returns: - :class:`AbinitSpaceGroup` + Returns: :class:`AbinitSpaceGroup` .. warning: @@ -882,29 +925,98 @@ def spgset_abi_spacegroup(self, has_timerev, overwrite=False): "Use `overwrite=True` to allow modification.")) msg = ("Structure object does not have symmetry operations computed from Abinit.\n" - "Will call spglib to get symmetry operations.") + "Calling spglib to get symmetry operations.") cprint(msg, "magenta") spglib_data = SpacegroupAnalyzer(self).get_symmetry_dataset() spgid = spglib_data["number"] symrel, tnons = spglib_data["rotations"], spglib_data["translations"] - symafm = [1] * len(symrel) # TODO: Anti-ferromagnetic symmetries are not supported by spglib + # TODO: Anti-ferromagnetic symmetries are not supported by spglib + symafm = [1] * len(symrel) abispg = AbinitSpaceGroup(spgid, symrel, tnons, symafm, has_timerev, inord="C") self.set_abi_spacegroup(abispg) return abispg + @property + def indsym(self): + """ + Compute indsym (natom, nsym, 4) array. + + For each isym,iatom, the fourth element is label of atom into + which iatom is sent by INVERSE of symmetry operation isym; + first three elements are the primitive translations which must be + subtracted after the transformation to get back to the original unit cell (see symatm.F90). + """ + if getattr(self, "_indsym", None) is not None: return self._indsym + if not self.has_abi_spacegroup: + self.spgset_abi_spacegroup(has_timerev=True, overwrite=False) + + from abipy.core.symmetries import indsym_from_symrel + self._indsym = indsym_from_symrel(self.abi_spacegroup.symrel, self.abi_spacegroup.tnons, self, tolsym=1e-8) + return self._indsym + + @indsym.setter + def indsym(self, indsym): + """Set indsym array.""" + if getattr(self, "_indsym", None) is not None: + cprint("structure.indsym is already set!", "yellow") + self._indsym = indsym + + @lazy_property + def site_symmetries(self): + """Object with SiteSymmetries.""" + from abipy.core.site_symmetries import SiteSymmetries + return SiteSymmetries(self) + + # TODO: site_symmetry or spget_site_symmetries? + def spget_site_symmetries(self): + import spglib + indsym = self.indsym + symrel, symafm = self.abi_spacegroup.symrel, self.abi_spacegroup.symafm + nsym = len(symrel) + sitesym_labels = [] + for iatom, site in enumerate(self): + rotations = [symrel[isym] for isym in range(nsym) if + indsym[iatom, isym, 3] == iatom and symafm[isym] == +1] + # Passing a 0-length rotations list to spglib can segfault. + herm_symbol, ptg_num = "1", 1 + if len(rotations) != 0: + herm_symbol, ptg_num, trans_mat = spglib.get_pointgroup(rotations) + + sitesym_labels.append("%s (#%d,nsym:%d)" % (herm_symbol.strip(), ptg_num, len(rotations))) + + return sitesym_labels + + def abiget_spginfo(self, tolsym=None, pre=None): + """ + Call Abinit to get spacegroup information. + Return dictionary with e.g. + {'bravais': 'Bravais cF (face-center cubic)', 'spg_number': 227, 'spg_symbol': 'Fd-3m'}. + + Args: + tolsym: Abinit tolsym input variable. None correspondes to the default value. + pre: Keywords in dictionary are prepended with this string + """ + from abipy.data.hgh_pseudos import HGH_TABLE + from abipy.abio import factories + gsinp = factories.gs_input(self, HGH_TABLE, spin_mode="unpolarized") + gsinp["chkprim"] = 0 + d = gsinp.abiget_spacegroup(tolsym=tolsym, retdict=True) + if pre: d = {pre + k: v for k, v in d.items()} + return d + def print_neighbors(self, radius=2.0): """ Get neighbors for each atom in the unit cell, out to a distance ``radius`` in Angstrom Print results. """ print(" ") - print("Finding neighbors for each atom in the unit cell, out to a distance %s [Angstrom]" % radius) + print("Finding neighbors for each atom in the unit cell, out to a distance %s (Angstrom)" % radius) print(" ") - ns = self.get_all_neighbors(radius, include_index=False) + ns = self.get_all_neighbors_old(radius, include_index=False) for i, (site, sited_list) in enumerate(zip(self, ns)): print("[%s] site %s has %s neighbors:" % (i, repr(site), len(sited_list))) for s, dist in sorted(sited_list, key=lambda t: t[1]): @@ -992,16 +1104,32 @@ def get_sorted_structure_z(self): return self.__class__.from_sites(sorted(self.sites, key=lambda site: site.specie.Z)) def findname_in_hsym_stars(self, kpoint): - """Returns the name of the special k-point, None if kpoint is unknown.""" + """ + Returns the name of the special k-point, None if kpoint is unknown. + """ if self.abi_spacegroup is None: return None + + from .kpoints import Kpoint + kpoint = Kpoint.as_kpoint(kpoint, self.reciprocal_lattice) + + # Try to find kpoint in hsym_stars without taking into accout symmetry operation (compare with base_point) + # Important if there are symmetry equivalent k-points in hsym_kpoints e.g. K and U in FCC lattice + # as U should not be mapped onto K as done in the second loop below. + from .kpoints import issamek + for star in self.hsym_stars: + if issamek(kpoint.frac_coords, star.base_point.frac_coords): + return star.name + + # Now check if kpoint is in one of the stars. for star in self.hsym_stars: - if star.find(kpoint) != -1: + i = star.find(kpoint) + if i != -1: + #print("input kpt:", kpoint, "star image", star[i], star[i].name) return star.name else: return None def get_symbol2indices(self): - """ Return a dictionary mapping chemical symbols to numpy array with the position of the atoms. @@ -1059,7 +1187,15 @@ def norm(self, coords, space="r", frac_coords=True): """ return np.sqrt(self.dot(coords, coords, space=space, frac_coords=frac_coords)) - def get_dict4pandas(self, with_spglib=True): + def scale_lattice(self, new_volume): + """ + Return a new |Structure| with volume new_volume by performing a + scaling of the lattice vectors so that length proportions and angles are preserved. + """ + new_lattice = self.lattice.scale(new_volume) + return self.__class__(new_lattice, self.species, self.frac_coords) + + def get_dict4pandas(self, symprec=1e-2, angle_tolerance=5.0, with_spglib=True): """ Return a :class:`OrderedDict` with the most important structural parameters: @@ -1072,16 +1208,21 @@ def get_dict4pandas(self, with_spglib=True): Args: with_spglib (bool): If True, spglib is invoked to get the spacegroup symbol and number + symprec (float): Symmetry precision used to refine the structure. + angle_tolerance (float): Tolerance on angles. """ abc, angles = self.lattice.abc, self.lattice.angles + # Get spacegroup info from spglib. - spglib_symbol, spglib_number = None, None + spglib_symbol, spglib_number, spglib_lattice_type = None, None, None if with_spglib: try: - spglib_symbol, spglib_number = self.get_space_group_info() + spglib_symbol, spglib_number = self.get_space_group_info(symprec=symprec, angle_tolerance=angle_tolerance) + spglib_lattice_type = self.spget_lattice_type(symprec=symprec, angle_tolerance=angle_tolerance) except Exception as exc: cprint("Spglib couldn't find space group symbol and number for composition %s" % str(self.composition), "red") print("Exception:\n", exc) + # Get spacegroup number computed by Abinit if available. abispg_number = None if self.abi_spacegroup is None else self.abi_spacegroup.spgid @@ -1094,6 +1235,7 @@ def get_dict4pandas(self, with_spglib=True): if with_spglib: od["spglib_symb"] = spglib_symbol od["spglib_num"] = spglib_number + od["spglib_lattice_type"] = spglib_lattice_type return od @@ -1120,7 +1262,6 @@ def plot_bz(self, ax=None, pmg_path=True, with_labels=True, **kwargs): """ from pymatgen.electronic_structure.plotter import plot_brillouin_zone, plot_brillouin_zone_from_kpath labels = None if not with_labels else self.hsym_kpath.kpath["kpoints"] - #pprint(labels) if pmg_path: return plot_brillouin_zone_from_kpath(self.hsym_kpath, ax=ax, show=False, **kwargs) else: @@ -1214,23 +1355,22 @@ def export(self, filename, visu=None, verbose=1): else: return visu(filename) - def chemview(self, **kwargs): + def chemview(self, **kwargs): # pragma: no cover """ - Visualize structure in jupyter_ notebook using chemview package. + Visualize structure inside the jupyter notebook using chemview package. """ from pymatgen.vis.structure_chemview import quick_view return quick_view(self, **kwargs) def vtkview(self, show=True, **kwargs): """ - Visualize structure with VTK. Requires vtk python bindings. + Visualize structure with VTK. Requires vVTK python bindings. Args: show: True to show structure immediately. kwargs: keyword arguments passed to :class:`StructureVis`. - Return: - StructureVis object. + Return: StructureVis object. """ from pymatgen.vis.structure_vtk import StructureVis vis = StructureVis(**kwargs) @@ -1239,10 +1379,65 @@ def vtkview(self, show=True, **kwargs): return vis def mayaview(self, figure=None, show=True, **kwargs): - """Visualize the crystalline structure with mayaview""" + """Visualize structure with mayavi.""" from abipy.display import mvtk return mvtk.plot_structure(self, figure=figure, show=show, **kwargs) + def get_nglview(self): # pragma: no cover + """ + Visualize structure with nglview inside a jupyter notebook. + """ + try: + import nglview as nv + except ImportError: + raise ImportError("nglview is not installed. See https://github.com/arose/nglview") + + view = nv.show_pymatgen(self) + view.add_unitcell() + return view + + def crystaltoolkitview(self): # pragma: no cover + """ + Visualize the structure with crystal_toolkit inside the jupyter notebook. + """ + try: + from crystal_toolkit import view + except ImportError: + raise ImportError("crystal_toolkit is not installed. See https://docs.crystaltoolkit.org/jupyter") + + return view(self) + + def get_jsmol(self, symprec=None, verbose=0, **kwargs): # pragma: no cover + """ + + Args: + symprec (float): If not none, finds the symmetry of the structure + and writes the CIF with symmetry information. + Passes symprec to the SpacegroupAnalyzer + verbose: Verbosity level. + """ + try: + from jupyter_jsmol import JsmolView + except ImportError: + raise ImportError("jupyter_jsmol is not installed. See https://github.com/fekad/jupyter-jsmol") + + from pymatgen.io.cif import CifWriter + data = str(CifWriter(self, symprec=symprec)) + + from IPython.display import display, HTML + # FIXME TEMPORARY HACK TO LOAD JSMOL.js + # See discussion at + # https://stackoverflow.com/questions/16852885/ipython-adding-javascript-scripts-to-ipython-notebook + display(HTML('')) + + jsmol = JsmolView(color='white') + display(jsmol) + cmd = 'load inline "%s" {1 1 1}' % data + if verbose: print("executing cmd:", cmd) + jsmol.script(cmd) + + return jsmol + def visualize(self, appname="vesta"): """ Visualize the crystalline structure with visualizer. @@ -1262,7 +1457,7 @@ def visualize(self, appname="vesta"): try: return self.export(ext, visu=visu)() except visu.Error as exc: - print(exc) + cprint(str(exc), color="red") pass else: raise visu.Error("Don't know how to export data for %s" % appname) @@ -1274,6 +1469,8 @@ def convert(self, fmt="cif", **kwargs): """ if fmt in ("abivars", "abinit"): return self.abi_string + elif fmt == "abipython": + return pformat(self.to_abivars(), indent=4) elif fmt == "qe": from pymatgen.io.pwscf import PWInput return str(PWInput(self, pseudo={s: s + ".pseudo" for s in self.symbol_set})) @@ -1283,9 +1480,9 @@ def convert(self, fmt="cif", **kwargs): from abipy.wannier90.win import structure2wannier90 return structure2wannier90(self) else: - return super(Structure, self).to(fmt=fmt, **kwargs) + return super().to(fmt=fmt, **kwargs) - #def max_overlap_and_sites(self, pseudos): + #def get_max_overlap_and_sites(self, pseudos): # # For each site in self: # # 1) Get the radius of the pseudopotential sphere # # 2) Get the neighbors of the site (considering the periodic images). @@ -1296,7 +1493,7 @@ def convert(self, fmt="cif", **kwargs): # symbol = site.specie.symbol # pseudo = pseudos[symbol] # r1 = Length(pseudo.r_cut, "Bohr").to("ang") - # sitedist_list = self.get_neighbors(site, r1, include_index=False) + # sitedist_list = self.get_neighbors_old(site, r1, include_index=False) # if sitedist_list: # # Spheres are overlapping: compute overlap and update the return values @@ -1313,7 +1510,7 @@ def convert(self, fmt="cif", **kwargs): # return max_overlap, ovlp_sites - def displace(self, displ, eta, frac_coords=True): + def displace(self, displ, eta, frac_coords=True, normalize=True): """ Displace the sites of the structure along the displacement vector displ. @@ -1339,8 +1536,9 @@ def displace(self, displ, eta, frac_coords=True): displ = np.reshape([self.lattice.get_fractional_coords(vec) for vec in displ], (-1,3)) # Normalize the displacement so that the maximum atomic displacement is 1 Angstrom. - dnorm = self.norm(displ, space="r") - displ /= np.max(np.abs(dnorm)) + if normalize: + dnorm = self.norm(displ, space="r") + displ /= np.max(np.abs(dnorm)) # Displace the sites. for i in range(len(self)): @@ -1457,8 +1655,7 @@ def range_vec(i): arange = range_vec(0)[:, None] * np.array([1, 0, 0])[None, :] brange = range_vec(1)[:, None] * np.array([0, 1, 0])[None, :] crange = range_vec(2)[:, None] * np.array([0, 0, 1])[None, :] - all_points = arange[:, None, None] + brange[None, :, None] +\ - crange[None, None, :] + all_points = arange[:, None, None] + brange[None, :, None] + crange[None, None, :] all_points = all_points.reshape((-1, 3)) # find the translation vectors (in terms of the initial lattice vectors) @@ -1477,7 +1674,7 @@ def range_vec(i): def write_vib_file(self, xyz_file, qpoint, displ, do_real=True, frac_coords=True, scale_matrix=None, max_supercell=None): """ - write into the file descriptor xyz_file the positions and displacements of the atoms + Write into the file descriptor xyz_file the positions and displacements of the atoms Args: xyz_file: file_descriptor @@ -1552,7 +1749,7 @@ def frozen_2phonon(self, qpoint, displ1, displ2, eta=1, frac_coords=False, scale if scale_matrix is None: if max_supercell is None: - raise ValueError("If scale_matrix is not provided, please provide max_supercell !") + raise ValueError("scale_matrix is not provided, please provide max_supercell!") scale_matrix = self.get_smallest_supercell(qpoint, max_supercell=max_supercell) @@ -1571,8 +1768,8 @@ def frozen_2phonon(self, qpoint, displ1, displ2, eta=1, frac_coords=False, scale else: displ1 = np.array(displ1) displ2 = np.array(displ2) - # from here displ are in cartesian coordinates + # from here on displ are in cartesian coordinates norm_factor = np.linalg.norm(displ1+displ2, axis=1).max() displ1 = eta * displ1 / norm_factor @@ -1584,14 +1781,13 @@ def frozen_2phonon(self, qpoint, displ1, displ2, eta=1, frac_coords=False, scale displ_list = [] for at,site in enumerate(self): for t in tvects: - new_displ1[:] = np.real(np.exp(2*1j*np.pi*(np.dot(qpoint,t)))*displ1[at,:]) + new_displ1[:] = np.real(np.exp(2*1j * np.pi * (np.dot(qpoint, t))) * displ1[at,:]) + new_displ2[:] = np.real(np.exp(2*1j * np.pi * (np.dot(qpoint, t))) * displ2[at,:]) - new_displ2[:] = np.real(np.exp(2*1j*np.pi*(np.dot(qpoint,t)))*displ2[at,:]) - - displ_list.append(new_displ1+new_displ2) + displ_list.append(new_displ1 + new_displ2) coords = site.coords + old_lattice.get_cartesian_coords(t) + new_displ1 + new_displ2 new_site = PeriodicSite( - site.species_and_occu, coords, new_lattice, + site.species, coords, new_lattice, coords_are_cartesian=True, properties=site.properties, to_unit_cell=True) new_sites.append(new_site) @@ -1655,7 +1851,7 @@ def frozen_phonon(self, qpoint, displ, eta=1, frac_coords=False, scale_matrix=No coords = site.coords + old_lattice.get_cartesian_coords(t) + new_displ new_site = PeriodicSite( - site.species_and_occu, coords, new_lattice, + site.species, coords, new_lattice, coords_are_cartesian=True, properties=site.properties, to_unit_cell=True) new_sites.append(new_site) @@ -1679,8 +1875,9 @@ def get_kpath_input_string(self, fmt="abinit", line_density=10): if fmt in ("abinit", "abivars"): app("# Abinit Structure") app(self.convert(fmt=fmt)) + app("\n# tolwfr 1e-20 iscf -2 # NSCF run") + app('# To read previous DEN file, use: getden -1 or specify filename via getden_path "out_DEN"') app("\n# K-path in reduced coordinates:") - app("# tolwfr 1e-20 iscf -2 getden ??") app(" ndivsm %d" % line_density) app(" kptopt %d" % -(len(self.hsym_kpoints) - 1)) app(" kptbounds") @@ -1715,32 +1912,6 @@ def get_kpath_input_string(self, fmt="abinit", line_density=10): return "\n".join(lines) - #def ksampling_from_jhudb(self, **kwargs): - # from pymatgen.ext.jhu import get_kpoints - # __doc__ = get_kpoints.__doc__ - # kpoints = get_kpoints(self, **kwargs) - # print(kpoints) - # print(kpoints.style) - # print("num_kpts", kpoints.num_kpts) - - # d = {"kptopt": 0, - # "kpt": kpoints.kpts, - # "nkpt": kpoints.num_kpts, - # #"kptnrm": kptnrm, - # "wtk": kpoints.kpts_weights, - # "shiftk": kpoints.kpts_shift, - # "chksymbreak": 0, - # } - # print(d) - - # #from pymatgen.io.abinit.abiobjects import KSampling - # #return KSampling(mode=KSamplingModes.automatic, - # # num_kpts= 0, - # # kpts=((1, 1, 1),), - # # kpt_shifts=(0.5, 0.5, 0.5), - # # kpts_weights=None, use_symmetries=True, use_time_reversal=True, chksymbreak=None, - # # comment=None) - def calc_ksampling(self, nksmall, symprec=0.01, angle_tolerance=5): """ Return the k-point sampling from the number of divisions ``nksmall`` to be used for @@ -1823,12 +1994,12 @@ def calc_shiftk(self, symprec=0.01, angle_tolerance=5): lattice_type, spg_symbol = sym.get_lattice_type(), sym.get_space_group_symbol() # Check if the cell is primitive - is_primitve = len(sym.find_primitive()) == len(self) + is_primitive = len(sym.find_primitive()) == len(self) # Generate the appropriate set of shifts. shiftk = None - if is_primitve: + if is_primitive: if lattice_type == "cubic": if "F" in spg_symbol: # FCC @@ -1878,7 +2049,7 @@ def num_valence_electrons(self, pseudos): """ nval, table = 0, PseudoTable.as_table(pseudos) for site in self: - pseudo = table.pseudo_with_symbol(site.species_string) + pseudo = table.pseudo_with_symbol(site.specie.symbol) nval += pseudo.Z_val return int(nval) if int(nval) == nval else nval @@ -1893,7 +2064,7 @@ def valence_electrons_per_atom(self, pseudos): table = PseudoTable.as_table(pseudos) psp_valences = [] for site in self: - pseudo = table.pseudo_with_symbol(site.species_string) + pseudo = table.pseudo_with_symbol(site.specie.symbol) psp_valences.append(pseudo.Z_val) return psp_valences @@ -1917,7 +2088,7 @@ def write_notebook(self, nbpath=None): nbv.new_code_cell("print(structure)"), nbv.new_code_cell("print(structure.abi_string)"), nbv.new_code_cell("structure"), - nbv.new_code_cell("print(structure.spglib_summary())"), + nbv.new_code_cell("print(structure.spget_summary())"), nbv.new_code_cell("if structure.abi_spacegroup is not None: print(structure.abi_spacegroup)"), nbv.new_code_cell("print(structure.hsym_kpoints)"), nbv.new_code_cell("structure.plot_bz();"), @@ -1929,7 +2100,8 @@ def write_notebook(self, nbpath=None): return self._write_nb_nbpath(nb, nbpath) -def dataframes_from_structures(struct_objects, index=None, with_spglib=True, cart_coords=False): +def dataframes_from_structures(struct_objects, index=None, symprec=1e-2, angle_tolerance=5, + with_spglib=True, cart_coords=False): """ Build two pandas Dataframes_ with the most important geometrical parameters associated to a list of structures or a list of objects that can be converted into structures. @@ -1939,6 +2111,8 @@ def dataframes_from_structures(struct_objects, index=None, with_spglib=True, car Support filenames, structure objects, Abinit input files, dicts and many more types. See ``Structure.as_structure`` for the complete list. index: Index of the |pandas-DataFrame|. + symprec (float): Symmetry precision used to refine the structure. + angle_tolerance (float): Tolerance on angles. with_spglib (bool): If True, spglib_ is invoked to get the spacegroup symbol and number. cart_coords: True if the ``coords`` dataframe should contain Cartesian cordinates instead of Reduced coordinates. @@ -1959,7 +2133,8 @@ def dataframes_from_structures(struct_objects, index=None, with_spglib=True, car structures = [Structure.as_structure(obj) for obj in struct_objects] # Build Frame with lattice parameters. # Use OrderedDict to have columns ordered nicely. - odict_list = [(structure.get_dict4pandas(with_spglib=with_spglib)) for structure in structures] + odict_list = [(structure.get_dict4pandas(with_spglib=with_spglib, symprec=symprec, + angle_tolerance=angle_tolerance)) for structure in structures] import pandas as pd lattice_frame = pd.DataFrame(odict_list, index=index, @@ -2067,7 +2242,7 @@ def displace(self, displ, etas, frac_coords=True): Returns: List of new structures with displaced atoms. """ - if not isinstance(etas, collections.Iterable): + if not isinstance(etas, collections.abc.Iterable): etas = [etas] news = [] @@ -2175,4 +2350,4 @@ def structure2siesta(structure, verbose=0): app(" %.10f %.10f %.10f %d" % (fc[0], fc[1], fc[2], itype + 1)) app("%endblock AtomicCoordinatesAndAtomicSpecies") - return "\n".join(lines) \ No newline at end of file + return "\n".join(lines) diff --git a/abipy/core/symmetries.py b/abipy/core/symmetries.py index edf8530b8..e0ebfc683 100644 --- a/abipy/core/symmetries.py +++ b/abipy/core/symmetries.py @@ -1,27 +1,20 @@ # coding: utf-8 """Objects used to deal with symmetry operations in crystals.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import abc import warnings import collections -import six import numpy as np import spglib -from six.moves import cStringIO -from tabulate import tabulate from monty.string import is_string from monty.itertools import iuptri from monty.functools import lazy_property +from monty.termcolor import cprint +from monty.collections import dict2namedtuple from pymatgen.symmetry.analyzer import SpacegroupAnalyzer -try: - from pymatgen.util.serialization import SlotPickleMixin -except: - from pymatgen.serializers.pickle_coders import SlotPickleMixin +from pymatgen.util.serialization import SlotPickleMixin from abipy.core.kpoints import wrap_to_ws, issamek, has_timrev_from_kptopt -from abipy.iotools import as_etsfreader __all__ = [ @@ -29,6 +22,7 @@ "AbinitSpaceGroup", ] + def wrap_in_ucell(x): """ Transforms x in its corresponding reduced number in the interval [0,1[." @@ -68,10 +62,6 @@ def mati3inv(mat3, trans=True): Since these form a group, inverses are also integer arrays. """ mat3 = np.reshape(np.array(mat3, dtype=np.int), (3, 3)) - #if mat3.dtype not in (np.int, np.int8, np.int16, np.int32, np.int64): - # raise TypeError("Expecting integer matrix but received dtype %s" % mat3.dtype) - #if mat3.shape != (3, 3): - # raise TypeError("Expecting (3, 3) matrix but received shape %s" % str(mat3.shape)) mit = np.empty((3, 3), dtype=np.int) mit[0,0] = mat3[1,1] * mat3[2,2] - mat3[2,1] * mat3[1,2] @@ -94,7 +84,7 @@ def mati3inv(mat3, trans=True): if trans: return mit else: - return mit.T + return mit.T.copy() def _get_det(mat): @@ -104,21 +94,109 @@ def _get_det(mat): raises: ValueError if abs(det) != 1. """ - det = mat[0,0]* (mat[1,1]*mat[2,2] - mat[1,2]*mat[2,1])\ - - mat[0,1]* (mat[1,0]*mat[2,2] - mat[1,2]*mat[2,0])\ - + mat[0,2]* (mat[1,0]*mat[2,1] - mat[1,1]*mat[2,0]) + det = mat[0,0] * (mat[1,1] * mat[2,2] - mat[1,2] * mat[2,1])\ + - mat[0,1] * (mat[1,0] * mat[2,2] - mat[1,2] * mat[2,0])\ + + mat[0,2] * (mat[1,0] * mat[2,1] - mat[1,1] * mat[2,0]) if abs(det) != 1: - raise ValueError("determinant must be +-1 while it is %s" % det) + raise ValueError("Determinant must be +-1 while it is %s" % det) return det -@six.add_metaclass(abc.ABCMeta) -class Operation(object): +def indsym_from_symrel(symrel, tnons, structure, tolsym=1e-8): + r""" + For each symmetry operation, find the number of the position to + which each atom is sent in the unit cell by the INVERSE of the + symmetry operation inv(symrel); i.e. this is the atom which, when acted + upon by the given symmetry element isym, gets transformed into atom iatom. + indirect indexing array for atoms, see symatm.F90. + + $ R^{-1} (xred(:,iat) - \tau) = xred(:,iat_sym) + R_0 $ + * indsym(4, isym,iat) gives iat_sym in the original unit cell. + * indsym(1:3,isym,iat) gives the lattice vector $R_0$. + + Args: + symrel: int (nsym,3,3) array with real space symmetries expressed in reduced coordinates. + tnons: float (nsym, 3) array with nonsymmorphic translations for each symmetry. + structure: |Structure| object. + tolsym: tolerance for the symmetries + + Returns: + """ + natom = len(structure) + nsym = len(symrel) + xred = np.array([site.frac_coords for site in structure], dtype=float) + typat = {i: site.specie.symbol for i, site in enumerate(structure)} + + rm1_list = np.empty_like(symrel) + for isym in range(nsym): + rm1_list[isym] = mati3inv(symrel[isym], trans=False) + + # Start testmn out at large value + testmn = 1000000 + err = 0.0 + indsym = np.empty((natom, nsym, 4)) + + # Implementation is similar to Abinit routine (including the order of the loops) + for isym in range(nsym): + for iatom in range(natom): + tratm = np.matmul(rm1_list[isym], xred[iatom] - tnons[isym]) + # Loop through atoms, when types agree, check for agreement after primitive translation + for jatm in range(natom): + if typat[jatm] != typat[iatom]: continue + test_vec = tratm - xred[jatm] + # Find nearest integer part of difference + trans = np.rint(test_vec) + # Check whether, after translation, they agree + test_vec = test_vec - trans + diff = np.abs(test_vec).sum() + # Abinit uses 1e-10 but python seems to require a slightly larger value. + #if diff < 1e-10: + if diff < 1e-9: + difmin = test_vec + indsym[iatom, isym, :3] = trans + indsym[iatom, isym, 3] = jatm + # Break out of loop when agreement is within tolerance + break + else: + # Keep track of smallest difference if greater than tol10 + if diff < testmn: + testmn = diff + # Note that abs() is not taken here + difmin = test_vec + indsym[iatom, isym, :3] = trans + indsym[iatom, isym, 3] = jatm + + # Keep track of maximum difference between transformed coordinates and nearest "target" coordinate + difmax = np.abs(difmin).max() + err = max(err, difmax) + if difmax > tolsym: + cprint(""" +Trouble finding symmetrically equivalent atoms. +Applying inverse of symm number {isym} to atom number {iatom} of typat',typat(iatom) gives tratom=',tratom(1:3) +This is further away from every atom in crystal than the allowed tolerance. +The inverse symmetry matrix is',symrec(1,1:3,isym),ch10,& + ',symrec(2,1:3,isym),ch10,& + ',symrec(3,1:3,isym) +and the nonsymmorphic transl. tnons =',(tnons(mu,isym),mu=1,3) +The nearest coordinate differs by',difmin(1:3) for indsym(nearest atom)=',indsym(4,isym,iatom) + +This indicates that when symatm attempts to find atoms symmetrically +related to a given atom, the nearest candidate is further away than some tolerance. +Should check atomic coordinates and symmetry group input data. +""".format(), "red") + + if err > tolsym: + raise ValueError("maximum err %s is larger than tolsym: %s" % (err, tolsym)) + + return indsym + + +class Operation(metaclass=abc.ABCMeta): """ Abstract base class that defines the methods that must be - implememted by the concrete class representing some sort of operation + implemented by the concrete class representing some sort of operation """ @abc.abstractmethod def __eq__(self, other): @@ -147,12 +225,23 @@ def opconj(self, other): def isE(self): """True if self is the identity operator""" + #def commute(self, other) + # return self * other == other * self + + #def commutator(self, other) + # return self * other - other * self + + #def anticommute(self, other) + # return self * other == - other * self + + #def direct_product(self, other) + class SymmOp(Operation, SlotPickleMixin): """ Crystalline symmetry. """ - _ATOL_TAU = 1e-8 + _ATOL_TAU = 1e-8 __slots__ = [ "rot_r", @@ -165,15 +254,15 @@ class SymmOp(Operation, SlotPickleMixin): "_trace", ] - # TODO: Add lattice + # TODO: Add lattice? def __init__(self, rot_r, tau, time_sign, afm_sign, rot_g=None): """ This object represents a space group symmetry i.e. a symmetry of the crystal. Args: - rot_r: 3x3 integer matrix with the rotational part in real space in reduced coordinates (C order). + rot_r: (3,3) integer matrix with the rotational part in real space in reduced coordinates (C order). tau: fractional translation in reduced coordinates. - time_sign: -1 if time reversal can be used, otherwise +1. + time_sign: -1 if time reversal can be used, +1 otherwise. afm_sign: anti-ferromagnetic part [+1, -1]. """ rot_r = np.asarray(rot_r) @@ -226,7 +315,7 @@ def inverse(self): time_sign=self.time_sign, afm_sign=self.afm_sign) - @property + @lazy_property def isE(self): """True if identity operator.""" return (np.all(self.rot_r == np.eye(3, dtype=np.int)) and @@ -235,61 +324,68 @@ def isE(self): self.afm_sign == 1) # end operator protocol. + #@lazy_property + #def order(self): + # """Order of the operation.""" + # n = 0 + # o = self + # while m < 1000: + # if o.isE: return n + # n += 1 + # o = self * o + # else: + # raise ValueError("Cannot find order") + def __repr__(self): return str(self) def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): def vec2str(vec): return "%2d,%2d,%2d" % tuple(v for v in vec) s = "" for i in range(3): - s += "[" + vec2str(self.rot_r[i]) + ", %.3f] " % self.tau[i] + "[" + vec2str(self.rot_g[i]) + "] " - if i == 0: - s += " time_sign=%2d, afm_sign=%2d, det=%2d" % (self.time_sign, self.afm_sign, self.det) + s += "[" + vec2str(self.rot_r[i]) + ", %.3f] " % self.tau[i] + "[" + vec2str(self.rot_g[i]) + "] " + if i == 2: + s += ", time_sign = %+1d, afm_sign = %+1d, det = %+1d" % (self.time_sign, self.afm_sign, self.det) s += "\n" return s - @property + @lazy_property def is_symmorphic(self): """True if the fractional translation is non-zero.""" return np.any(np.abs(self.tau) > 0.0) - @property + @lazy_property def det(self): """Determinant of the rotation matrix [-1, +1].""" - try: - return self._det - except AttributeError: - self._det = _get_det(self.rot_r) - return self._det + return _get_det(self.rot_r) - @property + @lazy_property def trace(self): """Trace of the rotation matrix.""" - try: - return self._trace - except AttributeError: - self._trace = self.rot_r.trace() - return self._trace + return self.rot_r.trace() - @property + @lazy_property def is_proper(self): """True if the rotational part has determinant == 1.""" return self.det == +1 - @property + @lazy_property def has_timerev(self): """True if symmetry contains the time-reversal operator.""" return self.time_sign == -1 - @property + @lazy_property def is_fm(self): """True if self if ferromagnetic symmetry.""" return self.afm_sign == +1 - @property + @lazy_property def is_afm(self): """True if self if anti-ferromagnetic symmetry.""" return self.afm_sign == -1 @@ -336,25 +432,8 @@ def rotate_r(self, frac_coords, in_ucell=False): return wrap_in_ucell(rotm1_rmt) if in_ucell else rotm1_rmt - #def rotate_gvecs(self, gvecs): - # """ - # Apply the symmetry operation to the list of gvectors gvecs in reduced coordinates. - - # Args: - # gvecs: `ndarray` with shape [ng, 3] containing the reduced coordinates of the G-vectors. - - # Returns: - # rot_gvecs: `ndarray` with shape [ng, 3] containing the result of self(G). - # """ - # rot_gvecs = np.empty_like(gvecs) - - # for ig, gvec in enumerate(gvecs): - # rot_gvecs[ig] = np.dot(self.rot_g, gvec) * self.time_sign - - # return rot_gvecs - -class OpSequence(collections.Sequence): +class OpSequence(collections.abc.Sequence): """ Mixin class providing the basic method that are common to containers of operations. """ @@ -427,7 +506,7 @@ def find(self, op): return -1 def is_group(self): - """True if the list of operations represent a group.""" + """True if this set of operations represent a group.""" check = 0 # Identity must be present. @@ -450,15 +529,13 @@ def is_group(self): return check == 0 def is_commutative(self): - """True if operations in self commute with each other.""" + """True if all operations commute with each other.""" for op1, op2 in iuptri(self, diago=False): - if op1 * op2 != op2 * op1: - return False - + if op1 * op2 != op2 * op1: return False return True def is_abelian_group(self): - """True if self is a commutative group.""" + """True if commutative group.""" return self.is_commutative() and self.is_group() def asdict(self): @@ -468,6 +545,15 @@ def asdict(self): """ return {op: idx for idx, op in enumerate(self)} + #def is_subset(self, other) + # indmap = {} + # for i, op in self: + # j = other.find(op) + # if j != -1: indmap[i] = j + # return indmap + + #def is_superset(self, other) + @lazy_property def mult_table(self): """ @@ -486,7 +572,6 @@ def mult_table(self): index = d[op12] except KeyError: index = None - mtable[i, j] = index return mtable @@ -585,9 +670,6 @@ def __init__(self, spgid, symrel, tnons, symafm, has_timerev, inord="C"): for isym in range(len(self.symrel)): self._symrel[isym] = self._symrel[isym].T - #self._symrel = np.reshape(self._symrel, (-1, 3, 3)) - #self._tnons = np.reshape(self._tnons, (-1, 3)) - self._symrec = self._symrel.copy() for isym in range(len(self.symrel)): self._symrec[isym] = mati3inv(self.symrel[isym], trans=True) @@ -603,23 +685,32 @@ def __init__(self, spgid, symrel, tnons, symafm, has_timerev, inord="C"): self._ops = tuple(all_syms) @classmethod - def from_file(cls, ncfile, inord="F"): - """Initialize the object from a Netcdf file.""" - r, closeit = as_etsfreader(ncfile) - + def from_ncreader(cls, r, inord="F"): + """ + Builds the object from a netcdf reader + """ kptopt = int(r.read_value("kptopt", default=1)) + symrel = r.read_value("reduced_symmetry_matrices") - new = cls(spgid=r.read_value("space_group"), - symrel=r.read_value("reduced_symmetry_matrices"), - tnons=r.read_value("reduced_symmetry_translations"), - symafm=r.read_value("symafm"), - has_timerev=has_timrev_from_kptopt(kptopt), - inord=inord) + return cls(spgid=r.read_value("space_group"), + symrel=symrel, + tnons=r.read_value("reduced_symmetry_translations"), + symafm=r.read_value("symafm"), + has_timerev=has_timrev_from_kptopt(kptopt), + inord=inord) - if closeit: - file.close() + #@classmethod + #def from_file(cls, ncfile, inord="F"): + # """ + # Initialize the object from a Netcdf file. + # """ + # from abipy.iotools import as_etsfreader + # r, closeit = as_etsfreader(ncfile) + # new = cls.from_ncreader(r) + # if closeit: + # file.close() - return new + # return new @classmethod def from_structure(cls, structure, has_timerev=True, symprec=1e-5, angle_tolerance=5): @@ -627,9 +718,9 @@ def from_structure(cls, structure, has_timerev=True, symprec=1e-5, angle_toleran Takes a |Structure| object. Uses spglib to perform various symmetry finding operations. Args: - structure: |Structure| object + structure: |Structure| object. has_timerev: True is time-reversal symmetry is included. - symprec: Tolerance for symmetry finding + symprec: Tolerance for symmetry finding. angle_tolerance: Angle tolerance for symmetry finding. .. warning:: @@ -679,18 +770,28 @@ def has_timerev(self): @property def symrel(self): + """ + [nsym, 3, 3] int array with symmetries in reduced coordinates of the direct lattice. + """ return self._symrel @property def tnons(self): + """ + [nsym, 3] float array with fractional translations in reduced coordinates of the direct lattice. + """ return self._tnons @property def symrec(self): + """ + [nsym, 3, 3] int array with symmetries in reduced coordinates of the reciprocal lattice. + """ return self._symrec @property def symafm(self): + """[nsym] int array with +1 if FM or -1 if AFM symmetry.""" return self._symafm @property @@ -734,6 +835,29 @@ def symmops(self, time_sign=None, afm_sign=None): return tuple(symmops) + def symeq(self, k1_frac_coords, k2_frac_coords, atol=None): + """ + Test whether two k-points in fractional coordinates are symmetry equivalent + i.e. if there's a symmetry operations TO (including time-reversal T, if present) + such that:: + + TO(k1) = k2 + G0 + + Return: namedtuple with:: + + isym: The index of the symmetry operation such that TS(k1) = k2 + G0 + Set to -1 if k1 and k2 are not related by symmetry. + op: Symmetry operation. + g0: numpy vector. + """ + for isym, sym in enumerate(self): + sk_coords = sym.rotate_k(k1_frac_coords, wrap_tows=False) + if issamek(sk_coords, k2_frac_coords, atol=atol): + g0 = sym.rotate_k(k1_frac_coords) - k2_frac_coords + return dict2namedtuple(isym=isym, op=self[isym], g0=g0) + + return dict2namedtuple(isym=-1, op=None, g0=None) + def find_little_group(self, kpoint): """ Find the little group of the kpoint. @@ -762,7 +886,8 @@ def find_little_group(self, kpoint): k_symmops = [self[i] for i in to_spgrp] return LittleGroup(kpoint, k_symmops, g0vecs) -# To maintain backward compatibility. + +# FIXME To maintain backward compatibility. SpaceGroup = AbinitSpaceGroup @@ -822,7 +947,7 @@ def to_string(self, verbose=0): # Add character_table from Bilbao database. bilbao_ptgrp = bilbao_ptgroup(self.kgroup.sch_symbol) - lines.extend(l.strip() for l in bilbao_ptgrp.to_string().splitlines()) + app(bilbao_ptgrp.to_string(verbose=verbose)) app("") # Write warning if non-symmorphic little group with k-point at zone border. @@ -838,11 +963,13 @@ def to_string(self, verbose=0): class LatticePointGroup(OpSequence): def __init__(self, rotations): + rotations = np.reshape(rotations, (-1, 3, 3)) self._ops = [LatticeRotation(rot) for rot in rotations] # Call spglib to get the Herm symbol. - # Remove blanks from C string. + # (symbol, pointgroup_number, transformation_matrix) herm_symbol, ptg_num, trans_mat = spglib.get_pointgroup(rotations) + # Remove blanks from C string. self.herm_symbol = herm_symbol.strip() #print(self.herm_symbol, ptg_num, trans_mat) @@ -869,7 +996,6 @@ def spgid(self): return sch2spgid(self.sch_symbol) - class LatticeRotation(Operation): """ This object defines a pure rotation of the lattice (proper, improper, mirror symmetry) @@ -886,7 +1012,7 @@ class LatticeRotation(Operation): _E3D = np.identity(3, np.int) def __init__(self, mat): - self.mat = np.matrix(mat, np.int) + self.mat = np.asarray(mat, dtype=np.int) self.mat.shape = (3, 3) def _find_order_and_rootinv(self): @@ -922,7 +1048,7 @@ def __eq__(self, other): return np.allclose(self.mat, other.mat) def __mul__(self, other): - return self.__class__(self.mat * other.mat) + return self.__class__(np.matmul(self.mat, other.mat)) def __hash__(self): return int(8 * self.trace + 4 * self.det) @@ -948,10 +1074,10 @@ def __neg__(self): return self.__class__(-self.mat) def __pow__(self, intexp, modulo=1): - if intexp == 0: return self.__class__(self._E3D) - if intexp > 0: return self.__class__(self.mat ** intexp) + if intexp == 0: return self.__class__(self._E3D) + if intexp > 0: return self.__class__(np.linalg.matrix_power(self.mat, intexp)) if intexp == -1: return self.inverse() - if intexp < 0: return self.__pow__(-intexp).inverse() + if intexp < 0: return self.__pow__(-intexp).inverse() raise TypeError("type %s is not supported in __pow__" % type(intexp)) @property @@ -971,31 +1097,27 @@ def root_inv(self): self._order, self._root_inv = self._find_order_and_rootinv() return self._root_inv - @property + @lazy_property def det(self): """Return the determinant of a symmetry matrix mat[3,3]. It must be +-1""" - try: - return self._det - except AttributeError: - self._det = _get_det(self.mat) - return self._det + return _get_det(self.mat) - @property + @lazy_property def trace(self): """The trace of the rotation matrix""" - return self.mat.trace()[0, 0] + return self.mat.trace() - @property + @lazy_property def is_proper(self): """True if proper rotation""" return self.det == 1 - @property + @lazy_property def isI(self): """True if self is the inversion operation.""" return np.allclose(self.mat, -self._E3D) - @property + @lazy_property def name(self): # Sign of the determinant (only if improper) name = "-" if self.det == -1 else "" @@ -1005,18 +1127,6 @@ def name(self): return name - #def versor(self): - # # Numb code, it would be possible to have a closed expression. - # from numpy.linalg import eig - # eigens, eigvecs = eig(self.mat) - # eigvecs = eigvecs.T # F --> C - # print(eigens, eigvecs) - # for e, vec in zip(eigens, eigves): - # if np.abs(e - 1) < 1.e-3: - # return vec - # else: - # raise ValueError("Cannot find versor of the rotation) - #@property #def rottype(self): # """ @@ -1046,6 +1156,9 @@ def name(self): # return t +# TODO: Need to find an easy way to map classes in internal database +# onto classes computed by client code when calculation has been done +# with non-conventional settings (spglib?) class Irrep(object): """ This object represents an irreducible representation. @@ -1090,6 +1203,9 @@ def mats(self): def character(self): return self._character + #@lazy_property + #def dataframe(self): + def bilbao_ptgroup(sch_symbol): """ @@ -1113,7 +1229,7 @@ class BilbaoPointGroup(object): def __init__(self, sch_symbol, rotations, class_names, class_range, irreps): # Rotations are grouped in classes. self.sch_symbol = sch_symbol - self.rotations = rotations + self.rotations = np.reshape(rotations, (-1, 3, 3)) self.class_names = class_names self.nclass = len(class_names) @@ -1157,29 +1273,44 @@ def irrep_names(self): """List with the names of the irreps.""" return list(self.irreps_by_name.keys()) - @property + @lazy_property def character_table(self): - """Table of strings with the character of the irreps.""" - # 1st row: ptgroup_name class names and multiplicity of each class + """ + Dataframe with irreps. + """ + # Caveat: class names are not necessarly unique --> use np.stack + import pandas as pd name_mult = [name + " [" + str(mult) + "]" for (name, mult) in zip(self.class_names, self.class_len)] - table = [[self.sch_symbol] + name_mult] - app = table.append + columns = ["name"] + name_mult + + stack = np.stack([irrep.character for irrep in self.irreps]) + index = [irrep.name for irrep in self.irreps] + df = pd.DataFrame(stack, columns=name_mult, index=index) + df.index.name = "Irrep" + df.columns.name = self.sch_symbol - # Add row: irrep_name, character. - for irrep in self.irreps: - character = list(map(str, irrep.character)) - app([irrep.name] + character) + # TODO + #print(df) + # Convert complex --> real if all entries in a colums are real. + #for k in name_mult: + # if np.all(np.isreal(df[k].values)): + # #df[k] = df[k].values.real + # df[k] = df[k].astype(float) - return table + return df - def to_string(self, tablefmt="simple", numalign="left"): + def to_string(self, verbose=0): """ - Write a string with the character_table to the given ``stream``. - ``tablefmt`` and ``numalign`` options are passed to ``tabulate``. + Return string with the character_table """ - s = tabulate(self.character_table[1:], headers=self.character_table[0], - tablefmt=tablefmt, numalign=numalign) - return s + return self.character_table.to_string() + + #def decompose(self, character): + # od = collections.OrderedDict() + # for irrep in self.irreps: + # irrep.name + # irrep.character + # return od #def show_irrep(self, irrep_name): # """Show the mapping rotation --> irrep mat.""" @@ -1199,6 +1330,7 @@ def auto_test(self): """ Perform internal consistency check. Return 0 if success """ + #print("rotations\n", self.rotations) rot_group = LatticePointGroup(self.rotations) if not rot_group.is_group(): print("rotations do not form a group!") diff --git a/abipy/core/tensor.py b/abipy/core/tensor.py deleted file mode 100644 index ed24a7849..000000000 --- a/abipy/core/tensor.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 -""" -This module contains classes representing tensors and helper functions to change lattice. -""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import itertools -import numpy as np - -from monty.dev import deprecated -from pymatgen.symmetry.analyzer import SpacegroupAnalyzer -from abipy.core import Structure - - -__all__ = [ - "Tensor", - "SymmetricTensor", -] - - -def from_cart_to_red(cartesian_tensor,lattice): - mat = lattice.inv_matrix - red_tensor = np.dot(np.dot(np.transpose(mat), cartesian_tensor), mat) - return red_tensor - - -class Tensor(object): - """Representation of a 3x3 tensor""" - - # TODO Remove - #@deprecated(message="abipy.core.Tensor is deprecated and will be replaced by pymatgen tensor in v0.4") - def __init__(self, red_tensor, lattice, space="r"): - """ - Args: - red_tensor: array-like object with the 9 cartesian components of the tensor - lattice: Lattice object defining the reference system - space: - "r" if the lattice is a real space lattice - "g" if the lattice is a reciprocal space lattice - """ - self._reduced_tensor = red_tensor - self._lattice = lattice - self.space = space - - if space == "g": - self._is_real_space = False - elif space == "r": - self._is_real_space = True - else: - raise ValueError("space should be either 'g' or 'r'") - - def __eq__(self, other): - if other is None: return False - return (np.allclose(self.reduced_tensor, other.reduced_tensor) and - self.lattice == other.lattice and - self.space == other.space) - - def __ne__(self, other): - return not self == other - - def __repr__(self): - return self.to_string() - - def __str__(self): - return repr(self) - - def to_string(self, verbose=0, with_reduced=False): - lines = [] - app = lines.append - - app("Tensor in %s space." % self.space) - app("") - app("Cartesian coordinates:") - app(str(self.cartesian_tensor)) - - if with_reduced: - app("") - app(str(self.lattice)) - app("Reduced coordinates:") - app(str(self.reduced_tensor)) - - return "\n".join(lines) - - @property - def lattice(self): - return self._lattice - - @property - def reduced_tensor(self): - return self._reduced_tensor - - @property - def is_real_space(self): - return self._is_real_space - - @property - def cartesian_tensor(self): - mat = self._lattice.matrix - return np.dot(np.dot(np.transpose(mat), self._reduced_tensor), mat) - - @classmethod - def from_cartesian_tensor(cls, cartesian_tensor, lattice, space="r"): - red_tensor = from_cart_to_red(cartesian_tensor, lattice) - return cls(red_tensor, lattice,space) - - def symmetrize(self, structure): - tensor = self._reduced_tensor - - if self._is_real_space: - real_lattice = self._lattice - else: - real_lattice = self._lattice.reciprocal_lattice - - # I guess this is the reason why tensor.symmetrize (omega) is so slow! - real_finder = SpacegroupAnalyzer(structure) - - real_symmops = real_finder.get_point_group_operations(cartesian=True) - - cartesian_tensor = self.cartesian_tensor - - sym_tensor = np.zeros((3,3)) - - my_tensor = cartesian_tensor - - for real_sym in real_symmops: - mat = real_sym.rotation_matrix - prod_sym = np.dot(np.transpose(mat),np.dot(cartesian_tensor,mat)) - sym_tensor = sym_tensor + prod_sym - - sym_tensor = sym_tensor/len(real_symmops) - - self._reduced_tensor = from_cart_to_red(sym_tensor,self._lattice) - - -class SymmetricTensor(Tensor): - """Representation of a 3x3 symmetric tensor""" - - @classmethod - def from_directions(cls, qpoints, values, lattice, space): - """ - Build a `SymmetricTensor` from the values computed along 6 directions. - - Args: - qpoints: fractional coordinates of 6 independent q-directions - values: values of (q^T E q)/(q^T q) along the 6 qpoints - lattice: `Lattice` object defining the reference system - space: "r" if the lattice is a real space lattice - "g" if the lattice is a reciprocal space lattice - """ - assert len(qpoints) == 6 and len(values) == len(qpoints) - - mat = lattice.matrix - metric = np.dot(np.transpose(mat),mat) - - coeffs_red = np.zeros((6,6)) - - for (iqpt,qpt) in enumerate(qpoints): - metqpt = np.dot(metric,qpt) - - coeffs_red[iqpt,:] = [metqpt[0]**2,metqpt[1]**2,metqpt[2]**2, - 2*metqpt[0]*metqpt[1],2*metqpt[0]*metqpt[2],2*metqpt[1]*metqpt[2]] - - normqpt_red = np.dot(np.transpose(qpt),np.dot(metric,qpt)) - - coeffs_red[iqpt,:] = coeffs_red[iqpt,:] / normqpt_red - - red_symm = np.linalg.solve(coeffs_red,values) - - red_tensor = [[red_symm[0],red_symm[3],red_symm[4]], - [red_symm[3],red_symm[1],red_symm[5]], - [red_symm[4],red_symm[5],red_symm[2]]] - - return cls(red_tensor, lattice, space) diff --git a/abipy/core/testing.py b/abipy/core/testing.py index 2dade0df4..bb94ea2da 100644 --- a/abipy/core/testing.py +++ b/abipy/core/testing.py @@ -1,20 +1,21 @@ # coding: utf-8 +# flake8: noqa """ Common test support for all AbiPy test scripts. This single module should provide all the common functionality for abipy tests in a single location, so that test scripts can just import it and work right away. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy import subprocess import json import tempfile -import shutil import unittest -import numpy.testing.utils as nptu +try: + import numpy.testing as nptu +except ImportError: + import numpy.testing.utils as nptu import abipy.data as abidata from functools import wraps @@ -43,32 +44,21 @@ def cmp_version(this, other, op=">="): return op(parse_version(this), parse_version(other)) -#TODO: Replace with abinit build and manager -def has_abinit(version=None, op=">="): +def has_abinit(version=None, op=">=", manager=None): """ - True if abinit is in $PATH. - If version is not None, abinit version op version is evaluated and the result is returned. - False if condition is not fulfilled or the execution of ``abinit -v`` raised CalledProcessError + True if abinit is available via TaskManager configuration options. + If version is not None, `abinit_version op version` is evaluated and the result is returned. """ - abinit = which("abinit") - if abinit is None: return False - if version is None: return abinit is not None + from abipy.flowtk import TaskManager, AbinitBuild + manager = TaskManager.from_user_config() if manager is None else manager + build = AbinitBuild(manager=manager) + if version is None: + return build.version != "0.0.0" + else: + return cmp_version(build.version, version, op=op) - try: - abinit_version = str(subprocess.check_output(["abinit", "-v"])) - except subprocess.CalledProcessError: - # Some MPI implementations require the mpirunner. - try: - abinit_version = subprocess.check_output(["mpirun", "-n", "1", "abinit", "-v"]) - except subprocess.CalledProcessError: - try: - abinit_version = subprocess.check_output(["mpiexec", "-n", "1", "abinit", "-v"]) - except subprocess.CalledProcessError as exc: - logger.warning(exc.output) - return False - - return cmp_version(abinit_version, version, op=op) +_HAS_MATPLOTLIB_CALLS = 0 def has_matplotlib(version=None, op=">="): @@ -83,8 +73,13 @@ def has_matplotlib(version=None, op=">="): print("Skipping matplotlib test") return False - matplotlib.use("Agg") - #matplotlib.use("Agg", force=True) # Use non-graphical display backend during test. + global _HAS_MATPLOTLIB_CALLS + _HAS_MATPLOTLIB_CALLS += 1 + + if _HAS_MATPLOTLIB_CALLS == 1: + matplotlib.use("Agg") + #matplotlib.use("Agg", force=True) # Use non-graphical display backend during test. + import matplotlib.pyplot as plt # http://stackoverflow.com/questions/21884271/warning-about-too-many-open-figures plt.close("all") @@ -216,15 +211,15 @@ def flatten_var(o, tree_types=(list, tuple, numpy.ndarray)): val_list_t = flatten_var(val_t) val_list_r = flatten_var(val_r) error = False - print(var) - print(val_list_r, type(val_list_r[0])) - print(val_list_t, type(val_list_t[0])) + #print(var) + #print(val_list_r, type(val_list_r[0])) + #print(val_list_t, type(val_list_t[0])) for k, var_item in enumerate(val_list_r): try: error = error or check_var(val_list_t[k], val_list_r[k]) except IndexError: - print(val_list_t, type(val_list_t[0])) - print(val_list_r, type(val_list_r[0])) + #print(val_list_t, type(val_list_t[0])) + #print(val_list_r, type(val_list_r[0])) raise RuntimeError('two value lists were not flattened in the same way, try to add the collection' 'type to the tree_types tuple in flatten_var') @@ -245,9 +240,10 @@ def flatten_var(o, tree_types=(list, tuple, numpy.ndarray)): def get_gsinput_si(usepaw=0, as_task=False): - # Build GS input file. - pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else data.pseudos("Si.GGA_PBE-JTH-paw.xml") - #silicon = abilab.Structure.zincblende(5.431, ["Si", "Si"], units="ang") + """ + Build and return a GS input file for silicon or a Task if `as_task` + """ + pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") silicon = abidata.cif_file("si.cif") from abipy.abio.inputs import AbinitInput @@ -255,7 +251,6 @@ def get_gsinput_si(usepaw=0, as_task=False): ecut = 6 scf_input.set_vars( ecut=ecut, - pawecutdg=40, nband=6, paral_kgb=0, iomode=3, @@ -266,6 +261,35 @@ def get_gsinput_si(usepaw=0, as_task=False): # K-point sampling (shifted) scf_input.set_autokmesh(nksmall=4) + + if not as_task: + return scf_input + else: + from abipy.flowtk.tasks import ScfTask + return ScfTask(scf_input) + + +def get_gsinput_alas_ngkpt(ngkpt, usepaw=0, as_task=False): + """ + Build and return a GS input file for AlAs or a Task if `as_task` + """ + if usepaw != 0: raise NotImplementedError("PAW") + pseudos = abidata.pseudos("13al.981214.fhi", "33as.pspnc") + structure = abidata.structure_from_ucell("AlAs") + + from abipy.abio.inputs import AbinitInput + scf_input = AbinitInput(structure, pseudos=pseudos) + + scf_input.set_vars( + nband=5, + ecut=8.0, + ngkpt=ngkpt, + nshiftk=1, + shiftk=[0, 0, 0], + tolvrs=1.0e-6, + diemac=12.0, + ) + if not as_task: return scf_input else: @@ -292,6 +316,12 @@ def has_abinit(version=None, op=">="): """Return True if abinit is in $PATH and version is op min_version.""" return has_abinit(version=version, op=op) + def skip_if_abinit_not_ge(self, version): + """Skip test if Abinit version is not >= `version`""" + op = ">=" + if not self.has_abinit(version, op=op): + raise unittest.SkipTest("This test requires Abinit version %s %s" % (op, version)) + @staticmethod def has_matplotlib(version=None, op=">="): return has_matplotlib(version=version, op=op) @@ -321,7 +351,7 @@ def has_skimage(): return False @staticmethod - def has_python_graphviz(need_dotexec=False): + def has_python_graphviz(need_dotexec=True): """ True if python-graphviz package is installed and dot executable in path. """ @@ -351,6 +381,35 @@ def has_mayavi(): mlab.options.backend = "test" return True + def has_panel(self): + """False if Panel library is not installed.""" + try: + import param + import panel as pn + import bokeh + return pn + except ImportError: + return False + + def has_networkx(self): + """False if networkx library is not installed.""" + try: + import networkx as nx + return nx + except ImportError: + return False + + def has_graphviz(self): + """True if graphviz library is installed and `dot` in $PATH""" + try: + from graphviz import Digraph + import graphviz + except ImportError: + return False + + if self.which("dot") is None: return False + return graphviz + @staticmethod def get_abistructure_from_abiref(basename): """Return an Abipy |Structure| from the basename of one of the reference files.""" @@ -373,7 +432,7 @@ def tmpfileindir(basename, **kwargs): @staticmethod def get_tmpname(**kwargs): """Invoke mkstep with kwargs, return the name of a temporary file.""" - fd, tmpname = tempfile.mkstemp(**kwargs) + _, tmpname = tempfile.mkstemp(**kwargs) return tmpname @staticmethod @@ -385,6 +444,11 @@ def has_nbformat(): except ImportError: return False + def run_nbpath(self, nbpath): + """Test that the notebook in question runs all cells correctly.""" + nb, errors = notebook_run(nbpath) + return nb, errors + @staticmethod def has_ipywidgets(): """Return True if ipywidgets_ package is available.""" @@ -456,6 +520,29 @@ def skip_if_not_phonopy(version=None, op=">="): msg = "This test requires phonopy version %s %s" % (op, version) raise unittest.SkipTest(msg) + @staticmethod + def skip_if_not_bolztrap2(version=None, op=">="): + """ + Raise SkipTest if bolztrap2 is not installed. + Use ``version`` and ``op`` to ask for a specific version + """ + try: + import BoltzTraP2 as bzt + except ImportError: + raise unittest.SkipTest("This test requires bolztrap2") + + from BoltzTraP2.version import PROGRAM_VERSION + if version is not None and not cmp_version(PROGRAM_VERSION, version, op=op): + msg = "This test requires bolztrap2 version %s %s" % (op, version) + raise unittest.SkipTest(msg) + + def skip_if_not_executable(self, executable): + """ + Raise SkipTest if executable is not installed. + """ + if self.which(executable) is None: + raise unittest.SkipTest("This test requires `%s` in PATH" % str(executable)) + @staticmethod def skip_if_not_pseudodojo(): """ @@ -471,6 +558,14 @@ def get_mock_module(): """Return mock module for testing. Raises ImportError if not found.""" return get_mock_module() + def decode_with_MSON(self, obj): + """ + Convert obj into JSON assuming MSONable protocolo. Return new object decoded with MontyDecoder + """ + from monty.json import MSONable, MontyDecoder + self.assertIsInstance(obj, MSONable) + return json.loads(obj.to_json(), cls=MontyDecoder) + @staticmethod def abivalidate_input(abinput, must_fail=False): """ @@ -515,6 +610,14 @@ def abivalidate_multi(multi): assert not errors + def abivalidate_work(self, work): + """Invoke Abinit to test validity of the inputs of a |Work|""" + from abipy.flowtk import Flow + tmpdir = tempfile.mkdtemp() + flow = Flow(workdir=tmpdir) + flow.register_work(work) + return self.abivalidate_flow(flow) + @staticmethod def abivalidate_flow(flow): """ @@ -536,3 +639,40 @@ def abivalidate_flow(flow): @wraps(get_gsinput_si) def get_gsinput_si(*args, **kwargs): return get_gsinput_si(*args, **kwargs) + + @staticmethod + @wraps(get_gsinput_alas_ngkpt) + def get_gsinput_alas_ngkpt(*args, **kwargs): + return get_gsinput_alas_ngkpt(*args, **kwargs) + + +def notebook_run(path): + """ + Execute a notebook via nbconvert and collect output. + + Taken from + https://blog.thedataincubator.com/2016/06/testing-jupyter-notebooks/ + + Args: + path (str): file path for the notebook object + + Returns: (parsed nb object, execution errors) + + """ + import nbformat + dirname, __ = os.path.split(path) + os.chdir(dirname) + with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout: + args = ["jupyter", "nbconvert", "--to", "notebook", "--execute", + "--ExecutePreprocessor.timeout=300", + "--ExecutePreprocessor.allow_errors=True", + "--output", fout.name, path] + subprocess.check_call(args) + + fout.seek(0) + nb = nbformat.read(fout, nbformat.current_nbformat) + + errors = [output for cell in nb.cells if "outputs" in cell + for output in cell["outputs"] if output.output_type == "error"] + + return nb, errors diff --git a/abipy/core/tests/test_abinit_units.py b/abipy/core/tests/test_abinit_units.py index 7eee4f3db..e5c19cced 100644 --- a/abipy/core/tests/test_abinit_units.py +++ b/abipy/core/tests/test_abinit_units.py @@ -1,6 +1,4 @@ """Tests for core.abinit_units""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.core.abinit_units as abu from abipy.core.testing import AbipyTest diff --git a/abipy/core/tests/test_fields.py b/abipy/core/tests/test_fields.py index b450bcd71..ace99dbcb 100644 --- a/abipy/core/tests/test_fields.py +++ b/abipy/core/tests/test_fields.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Tests for core.field module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import numpy as np import os import pymatgen.core.units as pmgu @@ -168,11 +166,11 @@ def test_silicon_density(self): method='get_sites_in_sphere', small_dist_mesh=(6, 6, 6)) core_den_2 = Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1.5, method='mesh3d_dist_gridpoints', small_dist_mesh=(6, 6, 6)) - self.assertAlmostEquals(np.sum(core_den_1.datar) * si_den.mesh.dv, 20, delta=0.5) - self.assertArrayAlmostEqual(core_den_1.datar, core_den_2.datar) + self.assertAlmostEqual(np.sum(core_den_1.datar) * si_den.mesh.dv, 20, delta=0.5) + self.assertArrayAlmostEqual(core_den_1.datar, core_den_2.datar, decimal=1) with self.assertRaises(ValueError): Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1, nelec=20, tol=0.001, - method='get_sites_in_sphere', small_dist_mesh=(2,2,2)) + method='get_sites_in_sphere', small_dist_mesh=(2, 2, 2)) def test_ni_density(self): @@ -260,7 +258,7 @@ def test_potentials(self): assert vxc.is_collinear assert not vxc.is_density_like assert vxc.is_potential_like - assert vxc.datar.dtype == np.float + #assert vxc.datar.dtype == np.float fact = pmgu.Ha_to_eV / pmgu.bohr_to_angstrom ** 3 self.assert_almost_equal(vxc.datar[0, 0, 0, 0], -2.40411892342838 * fact) self.assert_almost_equal(vxc.datar[0, 0, 0, 1], -2.31753083824603 * fact) diff --git a/abipy/core/tests/test_func1d.py b/abipy/core/tests/test_func1d.py index 43130a6cf..88694d96f 100644 --- a/abipy/core/tests/test_func1d.py +++ b/abipy/core/tests/test_func1d.py @@ -1,6 +1,4 @@ """Tests for func1d module""" -from __future__ import print_function, division - import numpy as np import collections import tempfile @@ -24,7 +22,7 @@ def test_base(self): sinf, cosf, eix = self.sinf, self.cosf, self.eix repr(sinf); str(sinf) - assert isinstance(sinf, collections.Iterable) + assert isinstance(sinf, collections.abc.Iterable) assert len(sinf) == len(sinf.mesh) assert self.h == sinf.h diff --git a/abipy/core/tests/test_gsphere.py b/abipy/core/tests/test_gsphere.py index 46f1dd122..d1c1380ca 100644 --- a/abipy/core/tests/test_gsphere.py +++ b/abipy/core/tests/test_gsphere.py @@ -1,6 +1,4 @@ """Tests for gsphere""" -from __future__ import print_function, division - import numpy as np from abipy.core import Mesh3D diff --git a/abipy/core/tests/test_kpoints.py b/abipy/core/tests/test_kpoints.py index 5dbeb0807..bc3598431 100644 --- a/abipy/core/tests/test_kpoints.py +++ b/abipy/core/tests/test_kpoints.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """Tests for kpoints.kpoints module.""" -from __future__ import print_function, division - import itertools import unittest import numpy as np @@ -11,7 +9,7 @@ from abipy import abilab from abipy.core.kpoints import (wrap_to_ws, wrap_to_bz, issamek, Kpoint, KpointList, IrredZone, Kpath, KpointsReader, has_timrev_from_kptopt, KSamplingInfo, as_kpoints, rc_list, kmesh_from_mpdivs, map_grid2ibz, - set_atol_kdiff, set_spglib_tols) #Ktables, + set_atol_kdiff, set_spglib_tols, kpath_from_bounds_and_ndivsm, build_segments) #Ktables, from abipy.core.testing import AbipyTest @@ -63,6 +61,21 @@ def test_kptopt2str(self): for kptopt in [-5, 0, 1, 2, 3, 4]: assert kptopt2str(kptopt, verbose=1 if kptopt != 1 else 0) + def test_kpath_from_bounds_and_ndivsm(self): + """Testing kpath_from_bounds_and_ndivsm.""" + structure = abilab.Structure.as_structure(abidata.cif_file("si.cif")) + with self.assertRaises(ValueError): + kpath_from_bounds_and_ndivsm([(0, 0, 0)], 5, structure) + with self.assertRaises(ValueError): + kpath_from_bounds_and_ndivsm([(0, 0, 0), (0, 0, 0)], 5, structure) + + path = kpath_from_bounds_and_ndivsm([(0, 0, 0), (0.5, 0, 0)], 5, structure) + self.assert_equal(path, [[0.0, 0.0, 0.0 ], + [0.1, 0.0, 0.0 ], + [0.2, 0.0, 0.0 ], + [0.3, 0.0, 0.0 ], + [0.4, 0.0, 0.0 ], + [0.5, 0.0, 0.0 ]]) class TestKpoint(AbipyTest): """Unit tests for Kpoint object.""" @@ -93,6 +106,9 @@ def test_kpoint_algebra(self): K = Kpoint([1/3, 1/3, 1/3], lattice) repr(X); str(X) assert X.to_string(verbose=2) + assert X.tos(m="fract") + assert X.tos(m="cart") + assert X.tos(m="fracart") assert gamma.is_gamma() assert not pgamma.is_gamma() @@ -170,7 +186,6 @@ def test_kpointlist(self): frac_coords = [0, 0, 0, 1/2, 1/2, 1/2, 1/3, 1/3, 1/3] weights = [0.1, 0.2, 0.7] - klist = KpointList(lattice, frac_coords, weights=weights) repr(klist); str(klist) @@ -185,6 +200,7 @@ def test_kpointlist(self): for i, kpoint in enumerate(klist): assert kpoint in klist assert klist.count(kpoint) == 1 + assert klist.index(kpoint) == i assert klist.find(kpoint) == i # Changing the weight of the Kpoint object should change the weights of klist. @@ -224,6 +240,12 @@ def test_kpointlist(self): assert len(add_klist) == 4 assert add_klist == add_klist.remove_duplicated() + frac_coords = [1/2, 1/2, 1/2, 1/2, 1/2, 1/2] + klist = KpointList(lattice, frac_coords, weights=None) + assert np.all(klist.get_all_kindices([1/2, 1/2, 1/2]) == [0, 1]) + with self.assertRaises(ValueError): + klist.index((0, 0, 0)) + class TestIrredZone(AbipyTest): @@ -277,6 +299,28 @@ def test_kpath_api(self): #assert len(kpath) == 60 #self.assert_equal(kpath.ksampling.mpdivs, [8, 8, 8]) + segments = build_segments(k0_list=(0, 0, 0), npts=1, step=0.01, red_dirs=(1, 0, 0), + reciprocal_lattice=structure.reciprocal_lattice) + assert len(segments) == 1 + assert np.all(segments[0] == (0, 0, 0)) + + step, npts = 0.1, 5 + red_dir = np.array((1, 1, 0)) + segments = build_segments(k0_list=(0, 0, 0, 0.5, 0, 0), npts=npts, step=step, red_dirs=red_dir, + reciprocal_lattice=structure.reciprocal_lattice) + + #print("segments:\n", segments) + # (nk0_list, len(red_dirs) * npts, 3) + assert segments.shape == (2, npts, 3) + self.assert_almost_equal(segments[0, 2], (0, 0, 0)) + self.assert_almost_equal(segments[1, 2], (0.5, 0.0, 0)) + def r2c(vec): + return structure.reciprocal_lattice.get_cartesian_coords(vec) + cart_vers = r2c(red_dir) + cart_vers /= np.linalg.norm(cart_vers) + self.assert_almost_equal(r2c(segments[1, 1] - segments[1, 0]), step * cart_vers) + self.assert_almost_equal(r2c(segments[1, 3] - segments[1, 2]), step * cart_vers) + class TestKpointsReader(AbipyTest): diff --git a/abipy/core/tests/test_mesh3d.py b/abipy/core/tests/test_mesh3d.py index 184548b6d..cbf18ef74 100644 --- a/abipy/core/tests/test_mesh3d.py +++ b/abipy/core/tests/test_mesh3d.py @@ -1,6 +1,4 @@ """Tests for mesh3d module""" -from __future__ import print_function, division - import numpy as np from abipy.core.mesh3d import * diff --git a/abipy/core/tests/test_restapi.py b/abipy/core/tests/test_restapi.py index fc9e947b4..a76f50ddf 100644 --- a/abipy/core/tests/test_restapi.py +++ b/abipy/core/tests/test_restapi.py @@ -1,6 +1,5 @@ """Tests for core.restapi module""" -from __future__ import print_function, division, unicode_literals, absolute_import - +import contextlib import abipy.data as abidata from abipy import abilab @@ -10,6 +9,7 @@ class TestMpRestApi(AbipyTest): """Test interfaces with the Materials Project REST API.""" + def test_mprester(self): """Testing MP Rest API wrappers.""" @@ -34,7 +34,9 @@ def test_mprester(self): new = mp.add_entry(mp.structures[-1], "newid") assert len(new.ids) == len(mp.ids) + 1 assert new.ids == mp.ids + ["newid"] - new.print_results(fmt="cif", verbose=2) + + with contextlib.redirect_stdout(None): + new.print_results(fmt="cif", verbose=2) # Test mp_match_structure mp = abilab.mp_match_structure(abidata.cif_file("al.cif")) @@ -47,6 +49,9 @@ def test_mprester(self): if self.has_nbformat(): mp.write_notebook(nbpath=self.get_tmpname(text=True)) + def test_cod(self): + """Testing COD interface.""" + self.skip_if_not_executable("mysql") # Test abilab.cod_search cod = abilab.cod_search("MgB2", primitive=True) repr(cod); str(cod) @@ -54,4 +59,6 @@ def test_mprester(self): assert 1000026 in cod.ids assert cod.data is not None assert hasattr(cod.dataframe, "describe") - cod.print_results(fmt="POSCAR", verbose=2) + + with contextlib.redirect_stdout(None): + cod.print_results(fmt="POSCAR", verbose=2) diff --git a/abipy/core/tests/test_site_symmetries.py b/abipy/core/tests/test_site_symmetries.py new file mode 100644 index 000000000..8bdc8efae --- /dev/null +++ b/abipy/core/tests/test_site_symmetries.py @@ -0,0 +1,65 @@ +"""Tests for core.site_symmetries module""" +import os +import numpy as np + +from abipy.core.testing import AbipyTest +from abipy.core.structure import Structure +#from abipy.core.site_symmetries import SiteSymmetries + +import abipy.data as abidata + + +class TestSiteSymmetries(AbipyTest): + """Unit tests for SiteSymmetries.""" + + def test_si(self): + """Testing wyckoff positions for Si2""" + si = Structure.from_file(abidata.cif_file("si.cif")) + ss = si.site_symmetries + repr(ss); str(ss) + assert ss.to_string(verbose=2) + df = ss.get_wyckoff_dataframe(verbose=2) + self.assert_equal(np.array(df["xfrac"].values, dtype=float), [0, 0.25]) + self.assert_equal(np.array(df["yfrac"].values, dtype=float), [0, 0.25]) + self.assert_equal(np.array(df["zfrac"].values, dtype=float), [0, 0.25]) + #0 -43m (#31) nsym:24 0 0 0 + #1 -43m (#31) nsym:24 0.250000000000000 0.250000000000000 0.250000000000000 + + df = ss.get_tensor_rank2_dataframe(verbose=2) + ref = ["Tzz", "Tzz"] + self.assert_equal(df["Txx"].values, ref) + self.assert_equal(df["Tyy"].values, ref) + ref = ["-Tzz/3", "-Tzz/3"] + self.assert_equal(df["Txy"].values, ref) + self.assert_equal(df["Txz"].values, ref) + self.assert_equal(df["Tyz"].values, ref) + + def test_alpha_sio2(self): + """Testing wyckoff positions for alpha-SiO2""" + asi02 = Structure.from_file(os.path.join(abidata.dirpath, "refs", "mp-7000_DDB.bz2")) + ss = asi02.site_symmetries + df = ss.get_wyckoff_dataframe(verbose=2) + df = df[df["element"] == "Si"] + self.assert_equal(df["xfrac"].values, ["xfrac", "yfrac", "0.0"]) + self.assert_equal(df["yfrac"].values, ["0.0", "yfrac", "yfrac"]) + self.assert_equal(np.array(df["zfrac"].values, dtype=float), [0.833335, 0.5, 0.166665]) + + """ + wyckoff site_symmetry Txx Tyy Tzz Txy Txz Tyz + 0 3a 2 (#3,nsym:2) Txx Tyy Tzz Tyy/2 Tyz/2 Tyz + 1 3a 2 (#3,nsym:2) Tyy Tyy Tzz Txy -Tyz Tyz + 2 3a 2 (#3,nsym:2) 2*Txy Tyy Tzz Txy 2*Tyz Tyz + """ + df = ss.get_tensor_rank2_dataframe(verbose=2) + ref = ["Txx", "Tyy", "2*Txy"] + self.assert_equal(df["Txx"].values, ref) + ref = ["Tyy", "Tyy", "Tyy"] + self.assert_equal(df["Tyy"].values, ref) + ref = ["Tzz", "Tzz", "Tzz"] + self.assert_equal(df["Tzz"].values, ref) + ref = ["Tyy/2", "Txy", "Txy"] + self.assert_equal(df["Txy"].values, ref) + ref = ["Tyz/2", "-Tyz", "2*Tyz"] + self.assert_equal(df["Txz"].values, ref) + ref = ["Tyz", "Tyz", "Tyz"] + self.assert_equal(df["Tyz"].values, ref) diff --git a/abipy/core/tests/test_skw.py b/abipy/core/tests/test_skw.py index 32b06352a..6fd1dfc11 100644 --- a/abipy/core/tests/test_skw.py +++ b/abipy/core/tests/test_skw.py @@ -1,6 +1,4 @@ """Tests for core.skw module""" -from __future__ import print_function, division, unicode_literals - import numpy as np import abipy.data as abidata @@ -64,7 +62,7 @@ def test_silicon_interpolation(self): # Test interpolation routines (high-level API). edos = skw.get_edos(kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None) - jdos = skw.get_jdos_q0(kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None) + #jdos = skw.get_jdos_q0(kmesh, is_shift=None, method="gaussian", step=0.1, width=0.2, wmesh=None) #nest = skw.get_nesting_at_e0(qpoints, kmesh, e0, width=0.2, is_shift=None) # Test pickle @@ -78,7 +76,7 @@ def test_silicon_interpolation(self): widths = [0.2, 0.3] is_shift = None assert skw.plot_dos_vs_kmeshes(kmeshes, is_shift=is_shift, show=False) - assert skw.plot_jdosq0_vs_kmeshes(kmeshes, is_shift=is_shift, show=False) + #assert skw.plot_jdosq0_vs_kmeshes(kmeshes, is_shift=is_shift, show=False) #assert skw.plot_nesting_vs_widths(widths=widths, kmesh=[4, 4, 4], e0=None, qvertices_names=None, # line_density=5, is_shift=is_shift, show=False) diff --git a/abipy/core/tests/test_structure.py b/abipy/core/tests/test_structure.py index 42ebb7f20..087917600 100644 --- a/abipy/core/tests/test_structure.py +++ b/abipy/core/tests/test_structure.py @@ -1,6 +1,4 @@ """Tests for structure module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import numpy as np import sys import abipy.data as abidata @@ -18,7 +16,7 @@ def test_structure_from_ncfiles(self): """Initialize Structure from Netcdf data files""" for filename in abidata.WFK_NCFILES + abidata.GSR_NCFILES: - print("About to read file %s" % filename) + #print("About to read file %s" % filename) structure = Structure.from_file(filename) str(structure) structure.to_string(verbose=2) @@ -58,11 +56,6 @@ def test_utils(self): self.assert_equal(kfrac_coords, ([[0. , 0. , 0. ], [0.5, 0. , 0.5], [0.5, 0.5, 0.5], [0. , 0. , 0. ]])) - with self.assertRaises(TypeError): - Structure.as_structure({}) - with self.assertRaises(TypeError): - Structure.as_structure([]) - si_wfk = Structure.as_structure(abidata.ref_file("si_scf_WFK.nc")) assert si_wfk.formula == "Si2" si_wfk.print_neighbors(radius=2.5) @@ -72,6 +65,10 @@ def test_utils(self): with self.assertRaises(ValueError): si_wfk.spgset_abi_spacegroup(has_timerev=True) + # K and U are equivalent. [5/8, 1/4, 5/8] should return U + assert si_wfk.findname_in_hsym_stars([3/8, 3/8, 3/4]) == "K" + assert si_wfk.findname_in_hsym_stars([5/8, 1/4, 5/8]) == "U" + # TODO: Fix order of atoms in supercells. # Test __mul__, __rmul__ (should return Abipy structures) assert si_wfk == 1 * si_wfk @@ -143,6 +140,9 @@ def test_utils(self): #assert si.vtkview(show=False) # Disabled due to (core dumped) on travis assert si.mayaview(show=False) + if self.has_panel(): + assert hasattr(si.get_panel(), "show") + assert si is Structure.as_structure(si) assert si == Structure.as_structure(si.to_abivars()) assert si == Structure.from_abivars(si.to_abivars()) @@ -158,9 +158,36 @@ def test_utils(self): self.assert_equal(ksamp.ngkpt, [10, 10, 10]) self.assert_equal(ksamp.shiftk, shiftk) + lif = Structure.from_abistring(""" +acell 7.7030079150 7.7030079150 7.7030079150 Angstrom +rprim 0.0000000000 0.5000000000 0.5000000000 + 0.5000000000 0.0000000000 0.5000000000 + 0.5000000000 0.5000000000 0.0000000000 +natom 2 +ntypat 2 +typat 1 2 +znucl 3 9 +xred 0.0000000000 0.0000000000 0.0000000000 + 0.5000000000 0.5000000000 0.5000000000 +""") + assert lif.formula == "Li1 F1" + same = Structure.rocksalt(7.7030079150, ["Li", "F"], units="ang") + self.assert_almost_equal(lif.lattice.a, same.lattice.a) + si = Structure.from_mpid("mp-149") assert si.formula == "Si2" + # Test abiget_spginfo + d = si.abiget_spginfo(tolsym=None, pre="abi_") + assert d["abi_spg_symbol"] == "Fd-3m" + assert d["abi_spg_number"] == 227 + assert d["abi_bravais"] == "Bravais cF (face-center cubic)" + + llzo = Structure.from_file(abidata.cif_file("LLZO_oxi.cif")) + assert llzo.is_ordered + d = llzo.abiget_spginfo(tolsym=0.001) + assert d["spg_number"] == 142 + mgb2_cod = Structure.from_cod_id(1526507, primitive=True) assert mgb2_cod.formula == "Mg1 B2" assert mgb2_cod.spget_lattice_type() == "hexagonal" @@ -179,12 +206,16 @@ def test_utils(self): self.assert_equal(s2coords["Mg"], [[0, 0, 0]]) self.assert_equal(s2coords["B"], [[1/3, 2/3, 0.5], [2/3, 1/3, 0.5]]) + new_mgb2 = mgb2.scale_lattice(mgb2.volume * 1.1) + self.assert_almost_equal(new_mgb2.volume, mgb2.volume * 1.1) + assert new_mgb2.lattice.is_hexagonal + # TODO: This part should be tested more carefully mgb2.abi_sanitize() mgb2.abi_sanitize(primitive_standard=True) mgb2.get_conventional_standard_structure() assert len(mgb2.abi_string) - assert len(mgb2.spget_summary(verbose=10)) + assert len(mgb2.spget_summary(site_symmetry=True, verbose=10)) #print(structure._repr_html_()) self.serialize_with_pickle(mgb2) @@ -238,7 +269,7 @@ def test_utils(self): # Test notebook generation. if self.has_nbformat(): - mgb2.write_notebook(nbpath=self.get_tmpname(text=True)) + assert mgb2.write_notebook(nbpath=self.get_tmpname(text=True)) def test_dataframes_from_structures(self): """Testing dataframes from structures.""" @@ -265,7 +296,7 @@ def test_frozen_phonon_methods(self): #print(old_structure.lattice._matrix) for site in old_structure: - print(structure.lattice.get_cartesian_coords(site.frac_coords)) + _ = structure.lattice.get_cartesian_coords(site.frac_coords) # TODO: Check all this stuff more carefully #qpoint = [0, 0, 0] diff --git a/abipy/core/tests/test_symmetries.py b/abipy/core/tests/test_symmetries.py index fbd6eedf7..c6dc47fa1 100644 --- a/abipy/core/tests/test_symmetries.py +++ b/abipy/core/tests/test_symmetries.py @@ -1,6 +1,4 @@ """Tests for symmetries module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import numpy as np import abipy.data as abidata @@ -77,6 +75,7 @@ def test_silicon(self): for idx, symmop in enumerate(spgrp): repr(symmop); str(symmop) + symmop.to_string(verbose=2) assert symmop in spgrp assert spgrp.count(symmop) == 1 assert spgrp.find(symmop) == idx @@ -108,6 +107,15 @@ def test_silicon(self): assert not err_msg + k1, k2 = [0.5, 0, 0], [0, 0.5, 0] + ktab = spgrp.symeq(k1, k2, atol=None) + assert ktab.isym != -1 + self.assert_equal(spgrp[ktab.isym].rotate_k(k1) - np.array(k2), ktab.g0) + + k1, k2 = [0.0, 0, 0], [0, 0.5, 0] + ktab = spgrp.symeq(k1, k2, atol=None) + assert ktab.isym == -1 + # Test little group with Gamma point. lg_gamma = spgrp.find_little_group(kpoint=[0, 0, 0]) assert len(lg_gamma) == len(spgrp) @@ -171,7 +179,7 @@ def test_database(self): """Testing BilbaoPointGroup database.""" from abipy.core.symmetries import bilbao_ptgroup, sch_symbols for sch_symbol in sch_symbols: - #print(sch_symbol) + print(sch_symbol) ptg = bilbao_ptgroup(sch_symbol) repr(ptg); str(ptg) assert len(ptg.to_string()) diff --git a/abipy/core/tests/test_tensor.py b/abipy/core/tests/test_tensor.py deleted file mode 100644 index 234044ea8..000000000 --- a/abipy/core/tests/test_tensor.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Tests for tensor""" -from __future__ import print_function, division - -import numpy as np - -from pymatgen.core.structure import Structure -from pymatgen.core.lattice import Lattice -from pymatgen.symmetry.analyzer import SpacegroupAnalyzer -from abipy.core.tensor import * -from abipy.core.testing import AbipyTest - - -class TestTensor(AbipyTest): - """Unit tests for Tensor.""" - - def test_tensor(self): - """Initialize Tensor""" - - lattice = Lattice.hexagonal(4,6) - #rprimd = np.array([[0,0.5,0.5],[0.5,0,0.5],[0.5,0.5,0]]) - #rprimd = rprimd*10 - #lattice = Lattice(rprimd) - structure = Structure(lattice, ["Ga", "As"], - [[0, 0, 0], [0.5, 0.5, 0.5]]) - - #finder = SymmetryFinder(structure) - finder = SpacegroupAnalyzer(structure) - - spacegroup = finder.get_space_group_operations() - pointgroup = finder.get_point_group_symbol() - - cartesian_tensor = [[2,3,1.2],[3,4,1.0],[1.2,1.0,6]] - - tensor = Tensor.from_cartesian_tensor(cartesian_tensor,lattice.reciprocal_lattice,space="g") - red_tensor = tensor.reduced_tensor - tensor2 = Tensor(red_tensor,lattice.reciprocal_lattice,space="g") - assert(((np.abs(tensor2.cartesian_tensor)-np.abs(cartesian_tensor)) < 1E-8).all()) - - self.assertTrue(tensor==tensor2) - print(tensor) - - #print("non-symmetrized cartesian_tensor = ",tensor2.cartesian_tensor) - tensor2.symmetrize(structure) - - #print("symmetrized_cartesian_tensor = ",tensor2.cartesian_tensor) - - self.serialize_with_pickle(tensor) - - -if __name__ == "__main__": - import unittest - unittest.main() diff --git a/abipy/core/tests/test_testing.py b/abipy/core/tests/test_testing.py index c426c6b8f..25c9dc2bd 100644 --- a/abipy/core/tests/test_testing.py +++ b/abipy/core/tests/test_testing.py @@ -1,6 +1,4 @@ """Tests for test_testing module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os from abipy.core.testing import AbipyTest from abipy.core.testing import input_equality_check diff --git a/abipy/core/tests/test_wyckoff.py b/abipy/core/tests/test_wyckoff.py deleted file mode 100644 index aa21e09ad..000000000 --- a/abipy/core/tests/test_wyckoff.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Tests for core.density module""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import unittest - -from collections import OrderedDict -from abipy.core.testing import AbipyTest -from abipy.core.structure import Lattice -from abipy.core.wyckoff import Wyckoff - - -class TestWyckoff(AbipyTest): - """Unit tests for Wyckoff.""" - - def test_sio2(self): - """Testing Wyckoff positions with SiO2 (requires sympy)""" - try: - import sympy - except ImportError: - raise unittest.SkipTest("sympy is not installed") - - # http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list?gnum=152 - site2wpos = {} - #3 b .2. - #site2wpos["Si"] = "(x,0,5/6) (0,x,1/6) (-x,-x,1/2)" - #3 a .2. - site2wpos["Si"] = "[x,0,1/3], (0,x,2/3), (-x,-x,0)" - #6 c 1 - site2wpos["O"] = """(x,y,z), (-y,x-y,z+1/3), (-x+y,-x,z+2/3), (y,x,-z), - (x-y,-y,-z+2/3), (-x,-x+y,-z+1/3)""" - - wyckoff = Wyckoff(site2wpos) - repr(wyckoff); str(wyckoff) - - site2params = OrderedDict([ - ("Si", dict(x=0.4763)), - ("O", dict(x=0.1588, y=0.7439, z=0.4612)), - #("O", dict(x=0.1588, y=0.7439, z=0.4612, yyy=3)), - ]) - - lattice = Lattice.hexagonal(a=4.971, c=5.473) - for to_unit_cell in [False]: - #for to_unit_cell in [False, True]: - structure = wyckoff.generate_structure(lattice, site2params, to_unit_cell=to_unit_cell) - print("to_unit_cell %s\n" % to_unit_cell, structure) - - #from pymatgen.symmetry.analyzer import SpacegroupAnalyzer - #spga = SpacegroupAnalyzer(structure) - #structure = spga.get_refined_structure() - #print("Refined:", structure) - - wyck_params = wyckoff.find_params(structure) - #structure.perturb(distance=0.01) - #wyck_params = wyckoff.find_params(structure) - - print("Error of params") - wyckoff.error_of_params(wyck_params, structure) - - for site, params in site2params.items(): - print(wyck_params[site]) - assert wyck_params[site] == params diff --git a/abipy/core/wyckoff.py b/abipy/core/wyckoff.py deleted file mode 100644 index 405d699f8..000000000 --- a/abipy/core/wyckoff.py +++ /dev/null @@ -1,213 +0,0 @@ -""" -This module provides functions to generate crystalline structures from Wyckoff positions -or to retrieve Wyckoff parameters from a given structure. -""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import numpy as np - -#from monty.functools import lazy_property -from collections import Sequence, OrderedDict - - -def _validate_params(params, wpos): - """ - Check keys in params. Raises ValueError. - """ - check = params.copy() - for k in params: - if k not in wpos.names: - raise ValueError("Cannot find key: %s in symbol_names: %s" % (k, wpos.names)) - check.pop(k) - if check: - raise ValueError("Found unknown symbol names in %s" % check) - - -class WyckoffPositions(Sequence): - """ - A numpy array with sympy expression. - """ - @classmethod - def from_string(cls, s): - """ - Initialize the object from string `s`. - """ - # Build a matrix of strings with expressions. - s = s.replace("\n", "") - s = s.replace("(", "").replace(")", "") - s = s.replace("[", "").replace("]", "") - - try: - matrix_str = np.reshape(s.split(","), (-1, 3)) - except ValueError: - raise ValueError("Wrong string in input, perhaps missing comma. Input string:\n %s" % str(s)) - - return cls(matrix_str) - - def __init__(self, matrix_str, letter=None, site_symmetry=None): - """ - - Args: - matrix_str: - letter: - site_symmetry: - """ - self.letter, self.site_symmetry = None, None - - # Build numpy matrix of sympy expressions from the matrix of strings. - from sympy import Symbol - from sympy.parsing.sympy_parser import parse_expr - exprs = [] - for vec in np.reshape(matrix_str, (-1, 3)): - exprs.extend([parse_expr(e) for e in vec]) - - self._expr_mat = np.reshape(exprs, (-1, 3)) - - # Get set of sympy symbols. - symbols = [] - for expr in self.ravel(): - for arg in expr.args: - if isinstance(arg, Symbol): symbols.append(arg) - - # SymPy symbols and names. - self.symbols = list(set(symbols)) - self.names = [s.name for s in self.symbols] - - def __len__(self): - return len(self._expr_mat) - - def __getitem__(self, key): - return self._expr_mat.__getitem__(key) - - def __str__(self): - """String representation.""" - lines = [] - for vec in self: - lines.append("(" + ",".join(str(e) for e in vec) + ")") - return ", ".join(lines) - - def ravel(self): - """Flat list, similar to np.ravel""" - return self._expr_mat.ravel() - - @property - def mult(self): - """Multiplicity""" - return len(self) - - @property - def num_params(self): - """The number of parameters.""" - return len(self.symbols) - - def params_from_frac_coords(self, frac_coords): - """ - Compute the Wyckoff parameters from the fractional coordinates. - """ - frac_coords = np.reshape(frac_coords, (-1, 3)) - assert len(self) == len(frac_coords) - equations = [] - for i in range(len(self)): - eqs = self[i, :] - frac_coords[i, :] - equations.extend(eqs) - - # Solve the problem. - from sympy.solvers import solve - d = solve(equations, self.symbols) - #print("solution: ", d) - - # Return results in a dict with symbol names. - if not d: - return None - - return {symbol.name: d[symbol] for symbol in self.symbols} - - def error_of_params(self, params, frac_coords): - """ - Return a numpy array with the difference between the - wyckoff positions computed from the sympy expressions and the input frac_coords - """ - _validate_params(params, self) - frac_coords = np.reshape(frac_coords, (-1, 3)) - assert len(self) == len(frac_coords) - - frac_errors = np.empty((self.mult, 3)) - for i in range(len(self)): - for j in range(3): - frac_errors[i,j] = self[i,j].subs(params) - frac_coords[i,j] - - # Modulo lattice vector (with tolerance?) - return frac_errors % 1 - - -class Wyckoff(object): - """ - """ - #@classmethod - #def from_site2wpos_ordict(cls, site2wpos): - # return cls(site2wpos) - - def __init__(self, site2wpos): - # TODO: Ordered dict. - d = {} - for k, s in site2wpos.items(): - d[k] = WyckoffPositions.from_string(s) - - self.site2wpos = d - - def __str__(self): - """String representation.""" - lines = [] - app = lines.append - app("Wyckoff positions:") - for site, wpos in self.site2wpos.items(): - app("%s site:\n\t%s" % (site, wpos)) - - return "\n".join(lines) - - def generate_structure(self, lattice, site2params, to_unit_cell=False, struct_cls=None): - """ - Generate structure object from `lattice` and dictionary `site2params` - """ - if not isinstance(site2params, OrderedDict): - raise ValueError("Please use a OrderedDict for site2params so that\n" + - "the algorithm used to build the structure is deterministic.") - - # Build species and coords arrays. - species, coords = [], [] - for elsym, wpos in self.site2wpos.items(): - params = site2params[elsym] - _validate_params(params, wpos) - for vec_expr in wpos: - species.append(elsym) - # Evaluate sympy expression with params. - coords.append([float(expr.subs(params)) for expr in vec_expr]) - - #for sp, c in zip(species, coords): - # print(sp, c, type(c), type(c[0])) - - from abipy.core.structure import Structure - cls = struct_cls if struct_cls is not None else Structure - return cls(lattice, species, coords, validate_proximity=True, - to_unit_cell=to_unit_cell, coords_are_cartesian=False, site_properties=None) - - def find_params(self, structure): - """ - Compute the value of the parameter given a Structure object. - """ - frac_coords = structure.get_symbol2coords() - - # Solve the problem. - params = {} - for elsym, wpos in self.site2wpos.items(): - params[elsym] = wpos.params_from_frac_coords(frac_coords[elsym]) - - # Return results in a dict with symbol names. - return params - - def error_of_params(self, params, structure): - frac_coords = structure.get_symbol2coords() - - for elsym, wpos in self.site2wpos.items(): - frac_errors = wpos.error_of_params(params[elsym], frac_coords[elsym]) - print(frac_errors) diff --git a/abipy/data/__init__.py b/abipy/data/__init__.py index f21ea32db..100aa6433 100644 --- a/abipy/data/__init__.py +++ b/abipy/data/__init__.py @@ -2,10 +2,8 @@ Functions providing access to file data for unit tests and tutorials. Preferred way to import the module is via the import syntax: - import abipy.abidata as abidata + import abipy.data as abidata """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os from abipy.core.structure import Structure @@ -32,7 +30,6 @@ _MPDATA_DIRPATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "mpdata")) - _SCRIPTS_DIRPATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "examples")) _SCRIPTS = None @@ -114,7 +111,7 @@ def find_ncfiles(top, verbose=0): if basename.endswith(".nc"): if basename in ncfiles: - err_msg = "Found duplicated basename %s\n" % basename + err_msg = "Found duplicated basename %s\n" % basename err_msg += "Stored: %s, new %s\n" % (ncfiles[basename], apath) if not verbose: import warnings @@ -125,6 +122,7 @@ def find_ncfiles(top, verbose=0): return ncfiles + _DATA_NCFILES = find_ncfiles(top=os.path.join(os.path.dirname(__file__), "refs")) @@ -135,7 +133,7 @@ def ref_file(basename): else: path = os.path.join(dirpath, basename) if not os.path.exists(path): - raise ValueError("Cannot find reference file %s" % basename) + raise ValueError("Cannot find reference file `%s`, at abs_path: `%s`" % (basename, path)) return path @@ -154,14 +152,16 @@ def ncfiles_with_ext(ext): return ncfiles + _MP_STRUCT_DICT = None + def get_mp_structures_dict(): """ Returns a dictionary containing the structures stored in mpdata/mp_structures. """ global _MP_STRUCT_DICT - if _MP_STRUCT_DICT is not None: + if _MP_STRUCT_DICT is not None: return _MP_STRUCT_DICT import json @@ -277,7 +277,7 @@ class AbinitFilesGenerator(FilesGenerator): executable = "abinit" def __init__(self, **kwargs): - super(AbinitFilesGenerator, self).__init__(**kwargs) + super().__init__(**kwargs) # Add Absolute paths for the pseudopotentials. #self.pseudos = [p.filepath for p in pseudos(*self.pseudos)] @@ -314,7 +314,7 @@ class AnaddbFilesGenerator(FilesGenerator): executable = "anaddb" def __init__(self, **kwargs): - super(AnaddbFilesGenerator, self).__init__(**kwargs) + super().__init__(**kwargs) if self.in_ddb is None: raise ValueError("in_ddb must be specified") diff --git a/abipy/data/benchmark_structures.py b/abipy/data/benchmark_structures.py index 5d65bc8f1..374175af3 100644 --- a/abipy/data/benchmark_structures.py +++ b/abipy/data/benchmark_structures.py @@ -3,11 +3,8 @@ Preferably one should test the scripts on all lists. """ -__author__ = 'setten' - # some simple semiconductors Si, C (diamond), LiF, MgO, GaN simple_semiconductors = ['mp-149', 'mp-66', 'mp-830', 'mp-1138', 'mp-1265'] # simple metals: Na, Mg, Al simple_metals = ['mp-10172', 'mp-153', 'mp-134'] - diff --git a/abipy/data/cifs/LLZO_oxi.cif b/abipy/data/cifs/LLZO_oxi.cif new file mode 100644 index 000000000..1c4c2697d --- /dev/null +++ b/abipy/data/cifs/LLZO_oxi.cif @@ -0,0 +1,129 @@ +# generated using pymatgen +data_Li7La3Zr2O12 +_symmetry_space_group_name_H-M 'P 1' +_cell_length_a 11.23299904 +_cell_length_b 11.23299904 +_cell_length_c 11.23299904 +_cell_angle_alpha 108.54499439 +_cell_angle_beta 108.54499439 +_cell_angle_gamma 111.33999140 +_symmetry_Int_Tables_number 1 +_chemical_formula_structural Li7La3Zr2O12 +_chemical_formula_sum 'Li28 La12 Zr8 O48' +_cell_volume 1090.22807487 +_cell_formula_units_Z 4 +loop_ + _symmetry_equiv_pos_site_id + _symmetry_equiv_pos_as_xyz + 1 'x, y, z' +loop_ + _atom_type_symbol + _atom_type_oxidation_number + Li+ 1.0 + La3+ 3.0 + Zr4+ 4.0 + O2- -2.0 +loop_ + _atom_site_type_symbol + _atom_site_label + _atom_site_symmetry_multiplicity + _atom_site_fract_x + _atom_site_fract_y + _atom_site_fract_z + _atom_site_occupancy + Li+ Li1 1 0.250000 0.750000 0.500000 1.0 + Li+ Li2 1 0.750000 0.250000 0.500000 1.0 + Li+ Li3 1 0.500000 0.500000 0.000000 1.0 + Li+ Li4 1 0.000000 0.000000 0.000000 1.0 + Li+ Li5 1 0.677926 0.177926 0.855853 1.0 + Li+ Li6 1 0.177926 0.322074 0.500000 1.0 + Li+ Li7 1 0.927926 0.927926 0.355853 1.0 + Li+ Li8 1 0.427926 0.072074 0.000000 1.0 + Li+ Li9 1 0.572074 0.572074 0.644147 1.0 + Li+ Li10 1 0.072074 0.427926 0.000000 1.0 + Li+ Li11 1 0.322074 0.822074 0.144148 1.0 + Li+ Li12 1 0.822074 0.677926 0.500000 1.0 + Li+ Li13 1 0.899761 0.156963 0.417018 1.0 + Li+ Li14 1 0.399761 0.982743 0.742798 1.0 + Li+ Li15 1 0.906963 0.149761 0.917018 1.0 + Li+ Li16 1 0.406963 0.489945 0.757202 1.0 + Li+ Li17 1 0.350239 0.593037 0.082982 1.0 + Li+ Li18 1 0.850239 0.767257 0.757202 1.0 + Li+ Li19 1 0.343037 0.600239 0.582982 1.0 + Li+ Li20 1 0.843037 0.260055 0.742798 1.0 + Li+ Li21 1 0.239945 0.656963 0.257202 1.0 + Li+ Li22 1 0.739945 0.482743 0.582982 1.0 + Li+ Li23 1 0.732743 0.649761 0.242798 1.0 + Li+ Li24 1 0.232743 0.989945 0.082982 1.0 + Li+ Li25 1 0.010055 0.093037 0.242798 1.0 + Li+ Li26 1 0.510055 0.267257 0.917018 1.0 + Li+ Li27 1 0.517257 0.100239 0.257202 1.0 + Li+ Li28 1 0.017257 0.760055 0.417018 1.0 + La3+ La29 1 0.500000 0.000000 0.500000 1.0 + La3+ La30 1 0.000000 0.500000 0.500000 1.0 + La3+ La31 1 0.750000 0.750000 0.000000 1.0 + La3+ La32 1 0.250000 0.250000 0.000000 1.0 + La3+ La33 1 0.503007 0.625000 0.378007 1.0 + La3+ La34 1 0.003007 0.625000 0.878007 1.0 + La3+ La35 1 0.375000 0.753007 0.878007 1.0 + La3+ La36 1 0.875000 0.996993 0.621993 1.0 + La3+ La37 1 0.746993 0.125000 0.121993 1.0 + La3+ La38 1 0.246993 0.125000 0.621993 1.0 + La3+ La39 1 0.375000 0.253007 0.378007 1.0 + La3+ La40 1 0.875000 0.496993 0.121993 1.0 + Zr4+ Zr41 1 0.625000 0.875000 0.250000 1.0 + Zr4+ Zr42 1 0.125000 0.875000 0.750000 1.0 + Zr4+ Zr43 1 0.625000 0.875000 0.750000 1.0 + Zr4+ Zr44 1 0.125000 0.375000 0.750000 1.0 + Zr4+ Zr45 1 0.125000 0.375000 0.250000 1.0 + Zr4+ Zr46 1 0.625000 0.375000 0.750000 1.0 + Zr4+ Zr47 1 0.625000 0.375000 0.250000 1.0 + Zr4+ Zr48 1 0.125000 0.875000 0.250000 1.0 + O2- O49 1 0.437452 0.776968 0.271130 1.0 + O2- O50 1 0.937452 0.666322 0.660484 1.0 + O2- O51 1 0.526968 0.687452 0.771131 1.0 + O2- O52 1 0.026968 0.255838 0.839516 1.0 + O2- O53 1 0.812548 0.973032 0.228870 1.0 + O2- O54 1 0.312548 0.083678 0.839516 1.0 + O2- O55 1 0.723032 0.062548 0.728869 1.0 + O2- O56 1 0.223032 0.494162 0.660484 1.0 + O2- O57 1 0.005838 0.276968 0.339516 1.0 + O2- O58 1 0.505838 0.166322 0.728869 1.0 + O2- O59 1 0.416322 0.187452 0.160484 1.0 + O2- O60 1 0.916322 0.755838 0.228870 1.0 + O2- O61 1 0.244162 0.473032 0.160484 1.0 + O2- O62 1 0.744162 0.583678 0.771131 1.0 + O2- O63 1 0.833678 0.562548 0.339516 1.0 + O2- O64 1 0.333678 0.994162 0.271130 1.0 + O2- O65 1 0.146117 0.192904 0.156383 1.0 + O2- O66 1 0.646117 0.489734 0.953213 1.0 + O2- O67 1 0.942904 0.396117 0.656383 1.0 + O2- O68 1 0.442904 0.786521 0.546787 1.0 + O2- O69 1 0.103883 0.557096 0.343617 1.0 + O2- O70 1 0.603883 0.260266 0.546787 1.0 + O2- O71 1 0.307096 0.353883 0.843617 1.0 + O2- O72 1 0.807096 0.963479 0.953213 1.0 + O2- O73 1 0.536521 0.692904 0.046787 1.0 + O2- O74 1 0.036521 0.989734 0.843617 1.0 + O2- O75 1 0.239734 0.896117 0.453213 1.0 + O2- O76 1 0.739734 0.286521 0.343617 1.0 + O2- O77 1 0.713479 0.057096 0.453213 1.0 + O2- O78 1 0.213479 0.760266 0.656383 1.0 + O2- O79 1 0.010266 0.853883 0.046787 1.0 + O2- O80 1 0.510266 0.463479 0.156383 1.0 + O2- O81 1 0.329162 0.456769 0.428243 1.0 + O2- O82 1 0.829162 0.400919 0.872393 1.0 + O2- O83 1 0.206769 0.579162 0.928243 1.0 + O2- O84 1 0.706769 0.778526 0.627607 1.0 + O2- O85 1 0.920838 0.293231 0.071757 1.0 + O2- O86 1 0.420838 0.349081 0.627607 1.0 + O2- O87 1 0.043231 0.170838 0.571757 1.0 + O2- O88 1 0.543231 0.971474 0.872393 1.0 + O2- O89 1 0.528526 0.956769 0.127607 1.0 + O2- O90 1 0.028526 0.900919 0.571757 1.0 + O2- O91 1 0.150920 0.079162 0.372393 1.0 + O2- O92 1 0.650919 0.278526 0.071757 1.0 + O2- O93 1 0.721474 0.793231 0.372393 1.0 + O2- O94 1 0.221474 0.849081 0.928243 1.0 + O2- O95 1 0.099081 0.670838 0.127607 1.0 + O2- O96 1 0.599081 0.471474 0.428243 1.0 diff --git a/abipy/data/cifs/LLZO_partial_occ.cif b/abipy/data/cifs/LLZO_partial_occ.cif new file mode 100644 index 000000000..c7eba9ff7 --- /dev/null +++ b/abipy/data/cifs/LLZO_partial_occ.cif @@ -0,0 +1,146 @@ +#====================================================================== + +# CRYSTAL DATA + +#---------------------------------------------------------------------- + +data_VESTA_phase_1 + + +_chemical_name_common 'La3 Li7 O12 Zr2' +_cell_length_a 13.00350 +_cell_length_b 13.00350 +_cell_length_c 13.00350 +_cell_angle_alpha 90 +_cell_angle_beta 90 +_cell_angle_gamma 90 +_space_group_name_H-M_alt 'I a -3 d' +_space_group_IT_number 230 + +loop_ +_space_group_symop_operation_xyz + 'x, y, z' + '-x, -y, -z' + '-x+1/2, -y, z+1/2' + 'x+1/2, y, -z+1/2' + '-x, y+1/2, -z+1/2' + 'x, -y+1/2, z+1/2' + 'x+1/2, -y+1/2, -z' + '-x+1/2, y+1/2, z' + 'z, x, y' + '-z, -x, -y' + 'z+1/2, -x+1/2, -y' + '-z+1/2, x+1/2, y' + '-z+1/2, -x, y+1/2' + 'z+1/2, x, -y+1/2' + '-z, x+1/2, -y+1/2' + 'z, -x+1/2, y+1/2' + 'y, z, x' + '-y, -z, -x' + '-y, z+1/2, -x+1/2' + 'y, -z+1/2, x+1/2' + 'y+1/2, -z+1/2, -x' + '-y+1/2, z+1/2, x' + '-y+1/2, -z, x+1/2' + 'y+1/2, z, -x+1/2' + 'y+3/4, x+1/4, -z+1/4' + '-y+1/4, -x+3/4, z+3/4' + '-y+3/4, -x+3/4, -z+3/4' + 'y+1/4, x+1/4, z+1/4' + 'y+1/4, -x+1/4, z+3/4' + '-y+3/4, x+3/4, -z+1/4' + '-y+1/4, x+3/4, z+1/4' + 'y+3/4, -x+1/4, -z+3/4' + 'x+3/4, z+1/4, -y+1/4' + '-x+1/4, -z+3/4, y+3/4' + '-x+1/4, z+3/4, y+1/4' + 'x+3/4, -z+1/4, -y+3/4' + '-x+3/4, -z+3/4, -y+3/4' + 'x+1/4, z+1/4, y+1/4' + 'x+1/4, -z+1/4, y+3/4' + '-x+3/4, z+3/4, -y+1/4' + 'z+3/4, y+1/4, -x+1/4' + '-z+1/4, -y+3/4, x+3/4' + 'z+1/4, -y+1/4, x+3/4' + '-z+3/4, y+3/4, -x+1/4' + '-z+1/4, y+3/4, x+1/4' + 'z+3/4, -y+1/4, -x+3/4' + '-z+3/4, -y+3/4, -x+3/4' + 'z+1/4, y+1/4, x+1/4' + 'x+1/2, y+1/2, z+1/2' + '-x+1/2, -y+1/2, -z+1/2' + '-x, -y+1/2, z' + 'x, y+1/2, -z' + '-x+1/2, y, -z' + 'x+1/2, -y, z' + 'x, -y, -z+1/2' + '-x, y, z+1/2' + 'z+1/2, x+1/2, y+1/2' + '-z+1/2, -x+1/2, -y+1/2' + 'z, -x, -y+1/2' + '-z, x, y+1/2' + '-z, -x+1/2, y' + 'z, x+1/2, -y' + '-z+1/2, x, -y' + 'z+1/2, -x, y' + 'y+1/2, z+1/2, x+1/2' + '-y+1/2, -z+1/2, -x+1/2' + '-y+1/2, z, -x' + 'y+1/2, -z, x' + 'y, -z, -x+1/2' + '-y, z, x+1/2' + '-y, -z+1/2, x' + 'y, z+1/2, -x' + 'y+1/4, x+3/4, -z+3/4' + '-y+3/4, -x+1/4, z+1/4' + '-y+1/4, -x+1/4, -z+1/4' + 'y+3/4, x+3/4, z+3/4' + 'y+3/4, -x+3/4, z+1/4' + '-y+1/4, x+1/4, -z+3/4' + '-y+3/4, x+1/4, z+3/4' + 'y+1/4, -x+3/4, -z+1/4' + 'x+1/4, z+3/4, -y+3/4' + '-x+3/4, -z+1/4, y+1/4' + '-x+3/4, z+1/4, y+3/4' + 'x+1/4, -z+3/4, -y+1/4' + '-x+1/4, -z+1/4, -y+1/4' + 'x+3/4, z+3/4, y+3/4' + 'x+3/4, -z+3/4, y+1/4' + '-x+1/4, z+1/4, -y+3/4' + 'z+1/4, y+3/4, -x+3/4' + '-z+3/4, -y+1/4, x+1/4' + 'z+3/4, -y+3/4, x+1/4' + '-z+1/4, y+1/4, -x+3/4' + '-z+3/4, y+1/4, x+3/4' + 'z+1/4, -y+3/4, -x+1/4' + '-z+1/4, -y+1/4, -x+1/4' + 'z+3/4, y+3/4, x+3/4' + +loop_ + _atom_site_label + _atom_site_occupancy + _atom_site_fract_x + _atom_site_fract_y + _atom_site_fract_z + _atom_site_adp_type + _atom_site_U_iso_or_equiv + _atom_site_type_symbol + Li1 0.6000 0.375000 0.000000 0.250000 Uiso 0.026000 Li + Li2 0.4000 0.680000 0.601000 0.101000 Uiso 0.034300 Li + La1 1.0 0.125000 0.000000 0.250000 Uiso 0.007367 La + Zr1 1.0 0.000000 0.000000 0.000000 Uiso 0.006700 Zr + O1 1.0 0.282000 0.101000 0.195000 Uiso 0.017400 O + +loop_ + _atom_site_aniso_label + _atom_site_aniso_U_11 + _atom_site_aniso_U_22 + _atom_site_aniso_U_33 + _atom_site_aniso_U_12 + _atom_site_aniso_U_13 + _atom_site_aniso_U_23 + Li1 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + Li2 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + La1 0.00650 0.00650 0.00910 0.00390 0.00000 0.00000 + Zr1 0.00670 0.00670 0.00670 0.00060 0.00060 0.00060 + O1 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 diff --git a/abipy/data/hgh_pseudos/__init__.py b/abipy/data/hgh_pseudos/__init__.py index 0678ad10b..190f9a13a 100644 --- a/abipy/data/hgh_pseudos/__init__.py +++ b/abipy/data/hgh_pseudos/__init__.py @@ -1,6 +1,5 @@ -from __future__ import unicode_literals, division, print_function, absolute_import - import os +from abipy.flowtk import PseudoTable _root = os.path.dirname(__file__) _paths = [f for f in os.listdir(_root) if f.endswith("hgh")] @@ -15,7 +14,6 @@ _paths = [os.path.join(_root, f) for f in _paths] del d -from abipy.flowtk import PseudoTable HGH_TABLE = PseudoTable(_paths) # Add fake hints. diff --git a/abipy/data/managers/travis_manager.yml b/abipy/data/managers/travis_manager.yml index ea6547452..b85444741 100644 --- a/abipy/data/managers/travis_manager.yml +++ b/abipy/data/managers/travis_manager.yml @@ -7,7 +7,7 @@ qadapters: job: mpi_runner: mpirun pre_run: - - source activate test-environment + - source activate abinit-environment - ulimit -s unlimited limits: min_cores: 1 diff --git a/abipy/data/pseudos/Ca.psp8 b/abipy/data/pseudos/Ca.psp8 new file mode 100644 index 000000000..7d360fdad --- /dev/null +++ b/abipy/data/pseudos/Ca.psp8 @@ -0,0 +1,2468 @@ +Ca ONCVPSP-3.2.3.1 r_core= 1.45885 1.45885 1.85192 +20.0000 10.0000 170504 zatom,zion,pspd +8 11 2 4 400 0 pspcod,pspxc,lmax,lloc,mmax,r2well +3.99000000 6.00000000 0.00000000 rchrg fchrg qchrg +2 2 2 0 0 nproj +1 1 extension_switch +0 1.0063789352773D+01 9.7239096602960D-01 +1 0.0000000000000D+00 -3.4654412672808D-10 1.4395392655686D-09 +2 1.0000000000000D-02 7.0845407209523D-02 -3.9351288971143D-02 +3 2.0000000000000D-02 1.4153261705160D-01 -7.8451072198856D-02 +4 3.0000000000000D-02 2.1190411572207D-01 -1.1704994554602D-01 +5 4.0000000000000D-02 2.8180375000058D-01 -1.5490268177679D-01 +6 5.0000000000000D-02 3.5107739127570D-01 -1.9177025360171D-01 +7 6.0000000000000D-02 4.1957358029991D-01 -2.2742177927547D-01 +8 7.0000000000000D-02 4.8714414666452D-01 -2.6163636664739D-01 +9 8.0000000000000D-02 5.5364479733078D-01 -2.9420483300451D-01 +10 9.0000000000000D-02 6.1893566897749D-01 -3.2493127980804D-01 +11 1.0000000000000D-01 6.8288183942016D-01 -3.5363450348116D-01 +12 1.1000000000000D-01 7.4535379391553D-01 -3.8014922573011D-01 +13 1.2000000000000D-01 8.0622784278054D-01 -4.0432712943963D-01 +14 1.3000000000000D-01 8.6538648741636D-01 -4.2603768893892D-01 +15 1.4000000000000D-01 9.2271873252791D-01 -4.4516878634959D-01 +16 1.5000000000000D-01 9.7812034305607D-01 -4.6162710875769D-01 +17 1.6000000000000D-01 1.0314940450839D+00 -4.7533832405686D-01 +18 1.7000000000000D-01 1.0827496707274D+00 -4.8624703644289D-01 +19 1.8000000000000D-01 1.1318042477680D+00 -4.9431652565764D-01 +20 1.9000000000000D-01 1.1785820355106D+00 -4.9952827713573D-01 +21 2.0000000000000D-01 1.2230145090575D+00 -5.0188131315894D-01 +22 2.1000000000000D-01 1.2650402948515D+00 -5.0139133792469D-01 +23 2.2000000000000D-01 1.3046050609630D+00 -4.9808971204895D-01 +24 2.3000000000000D-01 1.3416613661587D+00 -4.9202227440835D-01 +25 2.4000000000000D-01 1.3761684722902D+00 -4.8324803134938D-01 +26 2.5000000000000D-01 1.4080921249665D+00 -4.7183773511969D-01 +27 2.6000000000000D-01 1.4374043078261D+00 -4.5787237488196D-01 +28 2.7000000000000D-01 1.4640829759881D+00 -4.4144160483018D-01 +29 2.8000000000000D-01 1.4881117744409D+00 -4.2264213472476D-01 +30 2.9000000000000D-01 1.5094797472123D+00 -4.0157610858063D-01 +31 3.0000000000000D-01 1.5281810431613D+00 -3.7834949727778D-01 +32 3.1000000000000D-01 1.5442146241310D+00 -3.5307053050943D-01 +33 3.2000000000000D-01 1.5575839810134D+00 -3.2584819274649D-01 +34 3.3000000000000D-01 1.5682968629969D+00 -2.9679080678482D-01 +35 3.4000000000000D-01 1.5763650249026D+00 -2.6600472696821D-01 +36 3.5000000000000D-01 1.5818039970704D+00 -2.3359316236643D-01 +37 3.6000000000000D-01 1.5846328817354D+00 -1.9965514805616D-01 +38 3.7000000000000D-01 1.5848741792526D+00 -1.6428468023559D-01 +39 3.8000000000000D-01 1.5825536468799D+00 -1.2757002823177D-01 +40 3.9000000000000D-01 1.5777001921401D+00 -8.9593233574026D-02 +41 4.0000000000000D-01 1.5703458020527D+00 -5.0429803246220D-02 +42 4.1000000000000D-01 1.5605255087660D+00 -1.0148601040766D-02 +43 4.2000000000000D-01 1.5482773913489D+00 3.1188062336480D-02 +44 4.3000000000000D-01 1.5336426127260D+00 7.3524143069601D-02 +45 4.4000000000000D-01 1.5166654899669D+00 1.1680938789847D-01 +46 4.5000000000000D-01 1.4973935953970D+00 1.6099867683286D-01 +47 4.6000000000000D-01 1.4758778852789D+00 2.0605119721923D-01 +48 4.7000000000000D-01 1.4521728521400D+00 2.5192946442506D-01 +49 4.8000000000000D-01 1.4263366962106D+00 2.9859820715757D-01 +50 4.9000000000000D-01 1.3984315108773D+00 3.4602313793834D-01 +51 5.0000000000000D-01 1.3685234765893D+00 3.9416963146850D-01 +52 5.1000000000000D-01 1.3366830572551D+00 4.4300133550734D-01 +53 5.2000000000000D-01 1.3029851928711D+00 4.9247874041591D-01 +54 5.3000000000000D-01 1.2675094819164D+00 5.4255773466032D-01 +55 5.4000000000000D-01 1.2303403469512D+00 5.9318817430504D-01 +56 5.5000000000000D-01 1.1915671768540D+00 6.4431249483769D-01 +57 5.6000000000000D-01 1.1512844392535D+00 6.9586439354411D-01 +58 5.7000000000000D-01 1.1095917569246D+00 7.4776761008999D-01 +59 5.8000000000000D-01 1.0665939422485D+00 7.9993483196941D-01 +60 5.9000000000000D-01 1.0224009842695D+00 8.5226675005343D-01 +61 6.0000000000000D-01 9.7712798340856D-01 9.0465128763740D-01 +62 6.1000000000000D-01 9.3089502952307D-01 9.5696302415258D-01 +63 6.2000000000000D-01 8.8382701970803D-01 1.0090628321238D+00 +64 6.3000000000000D-01 8.3605341302836D-01 1.0607977430192D+00 +65 6.4000000000000D-01 7.8770792022155D-01 1.1120010544383D+00 +66 6.5000000000000D-01 7.3892812732554D-01 1.1624926876076D+00 +67 6.6000000000000D-01 6.8985505314115D-01 1.2120798004882D+00 +68 6.7000000000000D-01 6.4063264142139D-01 1.2605576579898D+00 +69 6.8000000000000D-01 5.9140718968513D-01 1.3077107568598D+00 +70 6.9000000000000D-01 5.4232671755530D-01 1.3533141988646D+00 +71 7.0000000000000D-01 4.9354027851527D-01 1.3971353019309D+00 +72 7.1000000000000D-01 4.4519721993764D-01 1.4389354350681D+00 +73 7.2000000000000D-01 3.9744639716892D-01 1.4784720591268D+00 +74 7.3000000000000D-01 3.5043534831622D-01 1.5155009519246D+00 +75 7.4000000000000D-01 3.0430943718165D-01 1.5497785929533D+00 +76 7.5000000000000D-01 2.5921097250535D-01 1.5810646798729D+00 +77 7.6000000000000D-01 2.1527831229785D-01 1.6091247463339D+00 +78 7.7000000000000D-01 1.7264496255990D-01 1.6337328483837D+00 +79 7.8000000000000D-01 1.3143868008785D-01 1.6546742848587D+00 +80 7.9000000000000D-01 9.1780589341419D-02 1.6717483157731D+00 +81 8.0000000000000D-01 5.3784323500272D-02 1.6847708418041D+00 +82 8.1000000000000D-01 1.7555199851583D-02 1.6935770075735D+00 +83 8.2000000000000D-01 -1.6810560469667D-02 1.6980236915492D+00 +84 8.3000000000000D-01 -4.9226558623825D-02 1.6979918460367D+00 +85 8.4000000000000D-01 -7.9616880723470D-02 1.6933886519077D+00 +86 8.5000000000000D-01 -1.0791668816207D-01 1.6841494544065D+00 +87 8.6000000000000D-01 -1.3407272742810D-01 1.6702394485685D+00 +88 8.7000000000000D-01 -1.5804375199610D-01 1.6516550854590D+00 +89 8.8000000000000D-01 -1.7980084977659D-01 1.6284251735577D+00 +90 8.9000000000000D-01 -1.9932767060001D-01 1.6006116531442D+00 +91 9.0000000000000D-01 -2.1662054929350D-01 1.5683100254310D+00 +92 9.1000000000000D-01 -2.3168852107060D-01 1.5316494223983D+00 +93 9.2000000000000D-01 -2.4455322717755D-01 1.4907923077519D+00 +94 9.3000000000000D-01 -2.5524871000991D-01 1.4459338040929D+00 +95 9.4000000000000D-01 -2.6382109821403D-01 1.3973006461915D+00 +96 9.5000000000000D-01 -2.7032818360072D-01 1.3451497651332D+00 +97 9.6000000000000D-01 -2.7483889300478D-01 1.2897665129763D+00 +98 9.7000000000000D-01 -2.7743265951990D-01 1.2314625424120D+00 +99 9.8000000000000D-01 -2.7819869875995D-01 1.1705733605152D+00 +100 9.9000000000000D-01 -2.7723519700596D-01 1.1074555802306D+00 +101 1.0000000000000D+00 -2.7464841920243D-01 1.0424838974288D+00 +102 1.0100000000000D+00 -2.7055174578139D-01 9.7604782522959D-01 +103 1.0200000000000D+00 -2.6506464821079D-01 9.0854822080173D-01 +104 1.0300000000000D+00 -2.5831161395493D-01 8.4039364289388D-01 +105 1.0400000000000D+00 -2.5042103220506D-01 7.7199658095238D-01 +106 1.0500000000000D+00 -2.4152405222724D-01 7.0376959859602D-01 +107 1.0600000000000D+00 -2.3175342659022D-01 6.3612143587963D-01 +108 1.0700000000000D+00 -2.2124235170639D-01 5.6945311549909D-01 +109 1.0800000000000D+00 -2.1012331818935D-01 5.0415409844872D-01 +110 1.0900000000000D+00 -1.9852698337279D-01 4.4059853413482D-01 +111 1.1000000000000D+00 -1.8658107813612D-01 3.7914164927328D-01 +112 1.1100000000000D+00 -1.7440935965513D-01 3.2011631801264D-01 +113 1.1200000000000D+00 -1.6213062115041D-01 2.6382985373462D-01 +114 1.1300000000000D+00 -1.4985776887059D-01 2.1056105991705D-01 +115 1.1400000000000D+00 -1.3769697579025D-01 1.6055757464870D-01 +116 1.1500000000000D+00 -1.2574692038520D-01 1.1403353924457D-01 +117 1.1600000000000D+00 -1.1409811770841D-01 7.1167617168130D-02 +118 1.1700000000000D+00 -1.0283234862775D-01 3.2101384379455D-02 +119 1.1800000000000D+00 -9.2022192136623D-02 -3.0618913189481D-03 +120 1.1900000000000D+00 -8.1730663812160D-02 -3.4258071244911D-02 +121 1.2000000000000D+00 -7.2010962197260D-02 -6.1462561288798D-02 +122 1.2100000000000D+00 -6.2906323365066D-02 -8.4690321736521D-02 +123 1.2200000000000D+00 -5.4449982777158D-02 -1.0399547565338D-01 +124 1.2300000000000D+00 -4.6665241414903D-02 -1.1947052804177D-01 +125 1.2400000000000D+00 -3.9565631909846D-02 -1.3124521270768D-01 +126 1.2500000000000D+00 -3.3155179736624D-02 -1.3948498626247D-01 +127 1.2600000000000D+00 -2.7428751949702D-02 -1.4438919841601D-01 +128 1.2700000000000D+00 -2.2372483840042D-02 -1.4618897744322D-01 +129 1.2800000000000D+00 -1.7964283784502D-02 -1.4514481933819D-01 +130 1.2900000000000D+00 -1.4174373395900D-02 -1.4154408182288D-01 +131 1.3000000000000D+00 -1.0965984355446D-02 -1.3569777210425D-01 +132 1.3100000000000D+00 -8.2957185026945D-03 -1.2793905202827D-01 +133 1.3200000000000D+00 -6.1147463618952D-03 -1.1861762347439D-01 +134 1.3300000000000D+00 -4.3706770423805D-03 -1.0809079553182D-01 +135 1.3400000000000D+00 -3.0096400454525D-03 -9.6713986619375D-02 +136 1.3500000000000D+00 -1.9779763338165D-03 -8.4833291821347D-02 +137 1.3600000000000D+00 -1.2230312691393D-03 -7.2782666116476D-02 +138 1.3700000000000D+00 -6.9423794894626D-04 -6.0879578755299D-02 +139 1.3800000000000D+00 -3.4408476305771D-04 -4.9421211407515D-02 +140 1.3900000000000D+00 -1.2903205156072D-04 -3.8680853895607D-02 +141 1.4000000000000D+00 -1.0347162918476D-05 -2.8904634686681D-02 +142 1.4100000000000D+00 4.5182228026226D-05 -2.0310982108530D-02 +143 1.4200000000000D+00 6.4471363088647D-05 -1.3080822402782D-02 +144 1.4300000000000D+00 6.6576731542494D-05 -7.3251626254051D-03 +145 1.4400000000000D+00 6.7240339133876D-05 -3.2447981890113D-03 +146 1.4500000000000D+00 7.6577707964061D-05 -9.9595907776046D-04 +147 1.4600000000000D+00 6.8934869397638D-05 -1.2948039624590D-04 +148 1.4700000000000D+00 2.6007087247750D-05 3.3326674324932D-05 +149 1.4800000000000D+00 -5.8793643851873D-06 -1.3767930494462D-05 +150 1.4900000000000D+00 -4.3226697403794D-06 -1.3300418809486D-05 +151 1.5000000000000D+00 1.6082330153367D-06 2.6009962034653D-06 +152 1.5100000000000D+00 5.3942459212612D-07 1.0255792075990D-06 +153 1.5200000000000D+00 -2.0440114382260D-07 5.1648390585992D-07 +154 1.5300000000000D+00 -4.9714554916784D-09 1.2561949028912D-08 +155 1.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 3.0498783063276D+00 4.7179906936283D-01 +1 0.0000000000000D+00 2.9609786428297D-09 -7.6147358418766D-09 +2 1.0000000000000D-02 1.9934890473248D-03 -1.3265858567395D-03 +3 2.0000000000000D-02 7.9617372550917D-03 -5.2880934585880D-03 +4 3.0000000000000D-02 1.7868206909929D-02 -1.1830039623582D-02 +5 4.0000000000000D-02 3.1652397089980D-02 -2.0862503736288D-02 +6 5.0000000000000D-02 4.9230430653620D-02 -3.2261439491870D-02 +7 6.0000000000000D-02 7.0495864298913D-02 -4.5870481028724D-02 +8 7.0000000000000D-02 9.5320710198592D-02 -6.1503213757162D-02 +9 8.0000000000000D-02 1.2355665475436D-01 -7.8945872576939D-02 +10 9.0000000000000D-02 1.5503645728897D-01 -9.7960423194161D-02 +11 1.0000000000000D-01 1.8957550904836D-01 -1.1828797601587D-01 +12 1.1000000000000D-01 2.2697353075895D-01 -1.3965247672395D-01 +13 1.2000000000000D-01 2.6701638521182D-01 -1.6176461320299D-01 +14 1.3000000000000D-01 3.0947797995272D-01 -1.8432587509083D-01 +15 1.4000000000000D-01 3.5412223416956D-01 -2.0703269989933D-01 +16 1.5000000000000D-01 4.0070508329844D-01 -2.2958063845084D-01 +17 1.6000000000000D-01 4.4897649472873D-01 -2.5166847232105D-01 +18 1.7000000000000D-01 4.9868246827324D-01 -2.7300221706555D-01 +19 1.8000000000000D-01 5.4956699577939D-01 -2.9329894722602D-01 +20 1.9000000000000D-01 6.0137395537605D-01 -3.1229038241902D-01 +21 2.0000000000000D-01 6.5384891735876D-01 -3.2972617815585D-01 +22 2.1000000000000D-01 7.0674084058802D-01 -3.4537687034934D-01 +23 2.2000000000000D-01 7.5980364047712D-01 -3.5903642864585D-01 +24 2.3000000000000D-01 8.1279761214032D-01 -3.7052438067107D-01 +25 2.4000000000000D-01 8.6549069501583D-01 -3.7968747688118D-01 +26 2.5000000000000D-01 9.1765956822301D-01 -3.8640087383397D-01 +27 2.6000000000000D-01 9.6909056900942D-01 -3.9056882220155D-01 +28 2.7000000000000D-01 1.0195804298364D+00 -3.9212485458928D-01 +29 2.8000000000000D-01 1.0689368328873D+00 -3.9103147705508D-01 +30 2.9000000000000D-01 1.1169787840039D+00 -3.8727937698672D-01 +31 3.0000000000000D-01 1.1635368112068D+00 -3.8088616853901D-01 +32 3.1000000000000D-01 1.2084529959853D+00 -3.7189470501029D-01 +33 3.2000000000000D-01 1.2515808483864D+00 -3.6037099520322D-01 +34 3.3000000000000D-01 1.2927850395589D+00 -3.4640176783493D-01 +35 3.4000000000000D-01 1.3319410077557D+00 -3.3009173430882D-01 +36 3.5000000000000D-01 1.3689344558272D+00 -3.1156060552516D-01 +37 3.6000000000000D-01 1.4036607599281D+00 -2.9093992278916D-01 +38 3.7000000000000D-01 1.4360243104526D+00 -2.6836976619429D-01 +39 3.8000000000000D-01 1.4659378071178D+00 -2.4399540605037D-01 +40 3.9000000000000D-01 1.4933215305823D+00 -2.1796396394574D-01 +41 4.0000000000000D-01 1.5181026130359D+00 -1.9042114985669D-01 +42 4.1000000000000D-01 1.5402143298061D+00 -1.6150814033958D-01 +43 4.2000000000000D-01 1.5595954332091D+00 -1.3135866028031D-01 +44 4.3000000000000D-01 1.5761895486467D+00 -1.0009632696628D-01 +45 4.4000000000000D-01 1.5899446513244D+00 -6.7832310448400D-02 +46 4.5000000000000D-01 1.6008126399786D+00 -3.4663358347904D-02 +47 4.6000000000000D-01 1.6087490216823D+00 -6.7022653277591D-04 +48 4.7000000000000D-01 1.6137127191863D+00 3.4083450449580D-02 +49 4.8000000000000D-01 1.6156660093979D+00 6.9551823515004D-02 +50 4.9000000000000D-01 1.6145745985510D+00 1.0570701085311D-01 +51 5.0000000000000D-01 1.6104078364312D+00 1.4253878964783D-01 +52 5.1000000000000D-01 1.6031390687471D+00 1.8005379933645D-01 +53 5.2000000000000D-01 1.5927461234470D+00 2.1827426748951D-01 +54 5.3000000000000D-01 1.5792119235209D+00 2.5723627875096D-01 +55 5.4000000000000D-01 1.5625252156720D+00 2.9698761636783D-01 +56 5.5000000000000D-01 1.5426814012380D+00 3.3758521451281D-01 +57 5.6000000000000D-01 1.5196834529601D+00 3.7909226767163D-01 +58 5.7000000000000D-01 1.4935428986749D+00 4.2157505072319D-01 +59 5.8000000000000D-01 1.4642808508123D+00 4.6509950980394D-01 +60 5.9000000000000D-01 1.4319290587423D+00 5.0972768952522D-01 +61 6.0000000000000D-01 1.3965309595837D+00 5.5551406647517D-01 +62 6.1000000000000D-01 1.3581427020927D+00 6.0250186210531D-01 +63 6.2000000000000D-01 1.3168341177110D+00 6.5071940999765D-01 +64 6.3000000000000D-01 1.2726896127962D+00 7.0017665308330D-01 +65 6.4000000000000D-01 1.2258089564877D+00 7.5086184561543D-01 +66 6.5000000000000D-01 1.1763079395770D+00 8.0273853257286D-01 +67 6.6000000000000D-01 1.1243188811565D+00 8.5574287570092D-01 +68 6.7000000000000D-01 1.0699909616724D+00 9.0978139066283D-01 +69 6.8000000000000D-01 1.0134903633228D+00 9.6472915377163D-01 +70 6.9000000000000D-01 9.5500020144626D-01 1.0204285296560D+00 +71 7.0000000000000D-01 8.9472023363008D-01 1.0766884630342D+00 +72 7.1000000000000D-01 8.3286633665252D-01 1.1332843687439D+00 +73 7.2000000000000D-01 7.6966974505808D-01 1.1899586442733D+00 +74 7.3000000000000D-01 7.0537604902443D-01 1.2464218186398D+00 +75 7.4000000000000D-01 6.4024395320231D-01 1.3023543405634D+00 +76 7.5000000000000D-01 5.7454380231143D-01 1.3574089977307D+00 +77 7.6000000000000D-01 5.0855588336762D-01 1.4112139477750D+00 +78 7.7000000000000D-01 4.4256851847556D-01 1.4633763304691D+00 +79 7.8000000000000D-01 3.7687596602702D-01 1.5134864198811D+00 +80 7.9000000000000D-01 3.1177615185572D-01 1.5611222649698D+00 +81 8.0000000000000D-01 2.4756825534568D-01 1.6058547575132D+00 +82 8.1000000000000D-01 1.8455017860232D-01 1.6472530575382D+00 +83 8.2000000000000D-01 1.2301592951934D-01 1.6848902987136D+00 +84 8.3000000000000D-01 6.3252951855396D-02 1.7183494896277D+00 +85 8.4000000000000D-01 5.5394372270298D-03 1.7472295216268D+00 +86 8.5000000000000D-01 -4.9858344809971D-02 1.7711511900376D+00 +87 8.6000000000000D-01 -1.0268866171097D-01 1.7897631332419D+00 +88 8.7000000000000D-01 -1.5271684091512D-01 1.8027475932515D+00 +89 8.8000000000000D-01 -1.9972766429215D-01 1.8098259021992D+00 +90 8.9000000000000D-01 -2.4352759856902D-01 1.8107636015258D+00 +91 9.0000000000000D-01 -2.8394682788086D-01 1.8053751045699D+00 +92 9.1000000000000D-01 -3.2084105679658D-01 1.7935278187401D+00 +93 9.2000000000000D-01 -3.5409305491516D-01 1.7751456503702D+00 +94 9.3000000000000D-01 -3.8361391737732D-01 1.7502118236514D+00 +95 9.4000000000000D-01 -4.0934401934337D-01 1.7187709545725D+00 +96 9.5000000000000D-01 -4.3125364659724D-01 1.6809303314388D+00 +97 9.6000000000000D-01 -4.4934328887968D-01 1.6368603650979D+00 +98 9.7000000000000D-01 -4.6364358732622D-01 1.5867941844700D+00 +99 9.8000000000000D-01 -4.7421493221848D-01 1.5310263656376D+00 +100 9.9000000000000D-01 -4.8114671239219D-01 1.4699107962436D+00 +101 1.0000000000000D+00 -4.8455622272356D-01 1.4038576903183D+00 +102 1.0100000000000D+00 -4.8458724114662D-01 1.3333297819329D+00 +103 1.0200000000000D+00 -4.8140829160915D-01 1.2588377391773D+00 +104 1.0300000000000D+00 -4.7521061408545D-01 1.1809348524349D+00 +105 1.0400000000000D+00 -4.6620586734547D-01 1.1002110630866D+00 +106 1.0500000000000D+00 -4.5462359393547D-01 1.0172864087494D+00 +107 1.0600000000000D+00 -4.4070848096620D-01 9.3280397218443D-01 +108 1.0700000000000D+00 -4.2471745314064D-01 8.4742242857224D-01 +109 1.0800000000000D+00 -4.0691663722689D-01 7.6180829327167D-01 +110 1.0900000000000D+00 -3.8757823921213D-01 6.7662797762779D-01 +111 1.1000000000000D+00 -3.6697737670407D-01 5.9253976398179D-01 +112 1.1100000000000D+00 -3.4538891008967D-01 5.1018581361747D-01 +113 1.1200000000000D+00 -3.2308431588796D-01 4.3018432124243D-01 +114 1.1300000000000D+00 -3.0032864504067D-01 3.5312192782887D-01 +115 1.1400000000000D+00 -2.7737760782989D-01 2.7954650089159D-01 +116 1.1500000000000D+00 -2.5447482508965D-01 2.0996038597100D-01 +117 1.1600000000000D+00 -2.3184928271077D-01 1.4481422604940D-01 +118 1.1700000000000D+00 -2.0971302284313D-01 8.4501436120368D-02 +119 1.1800000000000D+00 -1.8825910266424D-01 2.9353413424065D-02 +120 1.1900000000000D+00 -1.6765984611047D-01 -2.0364450640776D-02 +121 1.2000000000000D+00 -1.4806540963051D-01 -6.4455902429409D-02 +122 1.2100000000000D+00 -1.2960267785650D-01 -1.0279606100044D-01 +123 1.2200000000000D+00 -1.1237450122576D-01 -1.3533272556860D-01 +124 1.2300000000000D+00 -9.6459279666488D-02 -1.6208674597833D-01 +125 1.2400000000000D+00 -8.1910891362557D-02 -1.8315146027781D-01 +126 1.2500000000000D+00 -6.8758963301604D-02 -1.9869120961249D-01 +127 1.2600000000000D+00 -5.7009469684837D-02 -2.0893896892789D-01 +128 1.2700000000000D+00 -4.6645638139449D-02 -2.1419315178920D-01 +129 1.2800000000000D+00 -3.7629162463001D-02 -2.1481357224530D-01 +130 1.2900000000000D+00 -2.9901628215693D-02 -2.1121688954834D-01 +131 1.3000000000000D+00 -2.3386387149419D-02 -2.0387061025776D-01 +132 1.3100000000000D+00 -1.7989875705919D-02 -1.9328941339474D-01 +133 1.3200000000000D+00 -1.3604733795539D-02 -1.8002480009414D-01 +134 1.3300000000000D+00 -1.0114370817451D-02 -1.6464933951152D-01 +135 1.3400000000000D+00 -7.3980397471766D-03 -1.4774004034319D-01 +136 1.3500000000000D+00 -5.3351776042058D-03 -1.2986481420445D-01 +137 1.3600000000000D+00 -3.8079697090775D-03 -1.1157604819284D-01 +138 1.3700000000000D+00 -2.7045122251448D-03 -9.3401716652902D-02 +139 1.3800000000000D+00 -1.9217344597914D-03 -7.5837321037504D-02 +140 1.3900000000000D+00 -1.3681915646951D-03 -5.9338165603816D-02 +141 1.4000000000000D+00 -9.6664561881852D-04 -4.4312228725646D-02 +142 1.4100000000000D+00 -6.5646740380219D-04 -3.1117363788553D-02 +143 1.4200000000000D+00 -3.9556190799050D-04 -2.0044382549976D-02 +144 1.4300000000000D+00 -1.6360843470399D-04 -1.1263879633042D-02 +145 1.4400000000000D+00 4.2757361532247D-05 -5.0784013564636D-03 +146 1.4500000000000D+00 2.1225945942600D-04 -1.7147841325408D-03 +147 1.4600000000000D+00 2.4591063028976D-04 -3.9417126920397D-04 +148 1.4700000000000D+00 9.9427540177940D-05 -2.6206317840166D-05 +149 1.4800000000000D+00 -2.2769567258829D-05 -3.5311241663965D-06 +150 1.4900000000000D+00 -1.6996419565319D-05 -7.3326538831523D-06 +151 1.5000000000000D+00 6.0869741793441D-06 -7.2972595673684D-07 +152 1.5100000000000D+00 2.0515036142421D-06 -1.4348754269271D-08 +153 1.5200000000000D+00 -7.1919133610067D-07 1.3669922566221D-06 +154 1.5300000000000D+00 -1.7492209928768D-08 3.3248058372727D-08 +155 1.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +2 -3.4066714868802D+00 -1.0788900892855D+00 +1 0.0000000000000D+00 1.3019354171140D-10 -2.8667031509028D-10 +2 1.0000000000000D-02 1.6819866591384D-05 -9.9728687129377D-06 +3 2.0000000000000D-02 1.3445284916228D-04 -7.9645625496822D-05 +4 3.0000000000000D-02 4.5318235868051D-04 -2.6803298818981D-04 +5 4.0000000000000D-02 1.0722357151675D-03 -6.3278608815036D-04 +6 5.0000000000000D-02 2.0892643663072D-03 -1.2295274881927D-03 +7 6.0000000000000D-02 3.5998339292707D-03 -2.1112061681719D-03 +8 7.0000000000000D-02 5.6969271753179D-03 -3.3274787937425D-03 +9 8.0000000000000D-02 8.4704629465466D-03 -4.9241232971414D-03 +10 9.0000000000000D-02 1.2006833834594D-02 -6.9424904468356D-03 +11 1.0000000000000D-01 1.6388465264162D-02 -9.4189986695578D-03 +12 1.1000000000000D-01 2.1693398412341D-02 -1.2384676918444D-02 +13 1.2000000000000D-01 2.7994899160570D-02 -1.5864759860218D-02 +14 1.3000000000000D-01 3.5361095022667D-02 -1.9878339088525D-02 +15 1.4000000000000D-01 4.3854641722974D-02 -2.4438073466445D-02 +16 1.5000000000000D-01 5.3532420816711D-02 -2.9549961065638D-02 +17 1.6000000000000D-01 6.4445269453759D-02 -3.5213174510184D-02 +18 1.7000000000000D-01 7.6637743090980D-02 -4.1419960857446D-02 +19 1.8000000000000D-01 9.0147911660757D-02 -4.8155606464213D-02 +20 1.9000000000000D-01 1.0500718940830D-01 -5.5398466601882D-02 +21 2.0000000000000D-01 1.2124019832150D-01 -6.3120058907582D-02 +22 2.1000000000000D-01 1.3886466479796D-01 -7.1285219096614D-02 +23 2.2000000000000D-01 1.5789134892862D-01 -7.9852316723504D-02 +24 2.3000000000000D-01 1.7832400552838D-01 -8.8773528171245D-02 +25 2.4000000000000D-01 2.0015937581588D-01 -9.7995163478531D-02 +26 2.5000000000000D-01 2.2338720843846D-01 -1.0745804308916D-01 +27 2.6000000000000D-01 2.4799030835824D-01 -1.1709792013278D-01 +28 2.7000000000000D-01 2.7394461196263D-01 -1.2684594342691D-01 +29 2.8000000000000D-01 3.0121928663926D-01 -1.3662915603164D-01 +30 2.9000000000000D-01 3.2977685296321D-01 -1.4637102389486D-01 +31 3.0000000000000D-01 3.5957332758404D-01 -1.5599198890017D-01 +32 3.1000000000000D-01 3.9055838487181D-01 -1.6541004047443D-01 +33 3.2000000000000D-01 4.2267553538623D-01 -1.7454129982891D-01 +34 3.3000000000000D-01 4.5586231926869D-01 -1.8330061089760D-01 +35 3.4000000000000D-01 4.9005051272497D-01 -1.9160213209827D-01 +36 3.5000000000000D-01 5.2516634586294D-01 -1.9935992317535D-01 +37 3.6000000000000D-01 5.6113073027450D-01 -2.0648852158619D-01 +38 3.7000000000000D-01 5.9785949490131D-01 -2.1290350316124D-01 +39 3.8000000000000D-01 6.3526362889653D-01 -2.1852202210004D-01 +40 3.9000000000000D-01 6.7324953038763D-01 -2.2326332575410D-01 +41 4.0000000000000D-01 7.1171926025364D-01 -2.2704924008918D-01 +42 4.1000000000000D-01 7.5057080025159D-01 -2.2980462220779D-01 +43 4.2000000000000D-01 7.8969831505587D-01 -2.3145777684015D-01 +44 4.3000000000000D-01 8.2899241800802D-01 -2.3194083427180D-01 +45 4.4000000000000D-01 8.6834044060706D-01 -2.3119008776079D-01 +46 4.5000000000000D-01 9.0762670599922D-01 -2.2914628909864D-01 +47 4.6000000000000D-01 9.4673280694443D-01 -2.2575490157851D-01 +48 4.7000000000000D-01 9.8553788894218D-01 -2.2096631024323D-01 +49 4.8000000000000D-01 1.0239189393864D+00 -2.1473598988639D-01 +50 4.9000000000000D-01 1.0617510837832D+00 -2.0702463186222D-01 +51 5.0000000000000D-01 1.0989078902033D+00 -1.9779823131797D-01 +52 5.1000000000000D-01 1.1352616832498D+00 -1.8702813698577D-01 +53 5.2000000000000D-01 1.1706838688954D+00 -1.7469106615414D-01 +54 5.3000000000000D-01 1.2050452715826D+00 -1.6076908787312D-01 +55 5.4000000000000D-01 1.2382164849788D+00 -1.4524957782695D-01 +56 5.5000000000000D-01 1.2700682377395D+00 -1.2812514862705D-01 +57 5.6000000000000D-01 1.3004717755471D+00 -1.0939355953183D-01 +58 5.7000000000000D-01 1.3292992605696D+00 -8.9057609783515D-02 +59 5.8000000000000D-01 1.3564241893141D+00 -6.7125019863729D-02 +60 5.9000000000000D-01 1.3817218296402D+00 -4.3608305005525D-02 +61 6.0000000000000D-01 1.4050696774467D+00 -1.8524645260280D-02 +62 6.1000000000000D-01 1.4263479332551D+00 8.1042436984859D-03 +63 6.2000000000000D-01 1.4454399985866D+00 3.6252235042073D-02 +64 6.3000000000000D-01 1.4622329916695D+00 6.5888906796980D-02 +65 6.4000000000000D-01 1.4766182816254D+00 9.6979646002882D-02 +66 6.5000000000000D-01 1.4884920398678D+00 1.2948573802175D-01 +67 6.6000000000000D-01 1.4977558070152D+00 1.6336443846041D-01 +68 6.7000000000000D-01 1.5043170731706D+00 1.9856902567899D-01 +69 6.8000000000000D-01 1.5080898689678D+00 2.3504883241789D-01 +70 6.9000000000000D-01 1.5089953643225D+00 2.7274925567197D-01 +71 7.0000000000000D-01 1.5069624713794D+00 3.1161174456820D-01 +72 7.1000000000000D-01 1.5019284477025D+00 3.5157376664702D-01 +73 7.2000000000000D-01 1.4938394953369D+00 3.9256875360967D-01 +74 7.3000000000000D-01 1.4826513509743D+00 4.3452602824826D-01 +75 7.4000000000000D-01 1.4683298620946D+00 4.7737071492478D-01 +76 7.5000000000000D-01 1.4508515436322D+00 5.2102363659311D-01 +77 7.6000000000000D-01 1.4302041094434D+00 5.6540120195291D-01 +78 7.7000000000000D-01 1.4063869726301D+00 6.1041528688188D-01 +79 7.8000000000000D-01 1.3794117086102D+00 6.5597311479596D-01 +80 7.9000000000000D-01 1.3493024747322D+00 7.0197714103135D-01 +81 8.0000000000000D-01 1.3160963801982D+00 7.4832494671672D-01 +82 8.1000000000000D-01 1.2798438001084D+00 7.9490914790210D-01 +83 8.2000000000000D-01 1.2406086275582D+00 8.4161732592400D-01 +84 8.3000000000000D-01 1.1984684579220D+00 8.8833198510960D-01 +85 8.4000000000000D-01 1.1535146997348D+00 9.3493054395118D-01 +86 8.5000000000000D-01 1.1058526069445D+00 9.8128536581089D-01 +87 8.6000000000000D-01 1.0556012277497D+00 1.0272638350445D+00 +88 8.7000000000000D-01 1.0028932657537D+00 1.0727284841583D+00 +89 8.8000000000000D-01 9.4787484976193D-01 1.1175371772391D+00 +90 8.9000000000000D-01 8.9070520921412D-01 1.1615433544184D+00 +91 9.0000000000000D-01 8.3155625297840D-01 1.2045963415655D+00 +92 9.1000000000000D-01 7.7061205002496D-01 1.2465417287352D+00 +93 9.2000000000000D-01 7.0806821134815D-01 1.2872218201493D+00 +94 9.3000000000000D-01 6.4413117339941D-01 1.3264761576666D+00 +95 9.4000000000000D-01 5.7901738422641D-01 1.3641421187954D+00 +96 9.5000000000000D-01 5.1295239447503D-01 1.4000555893522D+00 +97 9.6000000000000D-01 4.4616985638909D-01 1.4340517098695D+00 +98 9.7000000000000D-01 3.7891043493852D-01 1.4659656938052D+00 +99 9.8000000000000D-01 3.1142063617303D-01 1.4956337145714D+00 +100 9.9000000000000D-01 2.4395155888437D-01 1.5228938573085D+00 +101 1.0000000000000D+00 1.7675757659888D-01 1.5475871302752D+00 +102 1.0100000000000D+00 1.1009495782299D-01 1.5695585296861D+00 +103 1.0200000000000D+00 4.4220433322601D-02 1.5886581508150D+00 +104 1.0300000000000D+00 -2.0610279991651D-02 1.6047423372311D+00 +105 1.0400000000000D+00 -8.4143988261329D-02 1.6176748591112D+00 +106 1.0500000000000D+00 -1.4613155205765D-01 1.6273281108253D+00 +107 1.0600000000000D+00 -2.0632942842046D-01 1.6335843171719D+00 +108 1.0700000000000D+00 -2.6450121164693D-01 1.6363367370872D+00 +109 1.0800000000000D+00 -3.2041916055846D-01 1.6354908531156D+00 +110 1.0900000000000D+00 -3.7386569976793D-01 1.6309655345569D+00 +111 1.1000000000000D+00 -4.2463488235866D-01 1.6226941619637D+00 +112 1.1100000000000D+00 -4.7253380141425D-01 1.6106257005291D+00 +113 1.1200000000000D+00 -5.1738393799954D-01 1.5947257099682D+00 +114 1.1300000000000D+00 -5.5902243351813D-01 1.5749772787193D+00 +115 1.1400000000000D+00 -5.9730327472479D-01 1.5513818705729D+00 +116 1.1500000000000D+00 -6.3209838025519D-01 1.5239600723628D+00 +117 1.1600000000000D+00 -6.6329857822374D-01 1.4927522320167D+00 +118 1.1700000000000D+00 -6.9081446533991D-01 1.4578189771755D+00 +119 1.1800000000000D+00 -7.1457713862429D-01 1.4192416052251D+00 +120 1.1900000000000D+00 -7.3453879213166D-01 1.3771223369718D+00 +121 1.2000000000000D+00 -7.5067317213341D-01 1.3315844273192D+00 +122 1.2100000000000D+00 -7.6297588547745D-01 1.2827721276736D+00 +123 1.2200000000000D+00 -7.7146455677217D-01 1.2308504958092D+00 +124 1.2300000000000D+00 -7.7617883199892D-01 1.1760050510873D+00 +125 1.2400000000000D+00 -7.7718022750146D-01 1.1184412744376D+00 +126 1.2500000000000D+00 -7.7455182384160D-01 1.0583839530965D+00 +127 1.2600000000000D+00 -7.6839780681289D-01 9.9607637325758D-01 +128 1.2700000000000D+00 -7.5884285998112D-01 9.3177936815686D-01 +129 1.2800000000000D+00 -7.4603140608012D-01 8.6577020663273D-01 +130 1.2900000000000D+00 -7.3012672718507D-01 7.9834139983092D-01 +131 1.3000000000000D+00 -7.1130987507961D-01 7.2979915236148D-01 +132 1.3100000000000D+00 -6.8977872997427D-01 6.6046249802402D-01 +133 1.3200000000000D+00 -6.6574635521846D-01 5.9066057544481D-01 +134 1.3300000000000D+00 -6.3943877318058D-01 5.2072838118645D-01 +135 1.3400000000000D+00 -6.1109248394586D-01 4.5100237188820D-01 +136 1.3500000000000D+00 -5.8095218375975D-01 3.8181693050133D-01 +137 1.3600000000000D+00 -5.4926905630914D-01 3.1350282039243D-01 +138 1.3700000000000D+00 -5.1629878614176D-01 2.4638486367016D-01 +139 1.3800000000000D+00 -4.8229959430968D-01 1.8077977073003D-01 +140 1.3900000000000D+00 -4.4753025534252D-01 1.1699396363062D-01 +141 1.4000000000000D+00 -4.1224812646543D-01 5.5321453276813D-02 +142 1.4100000000000D+00 -3.7670719833855D-01 -3.9582320156150D-03 +143 1.4200000000000D+00 -3.4115618582033D-01 -6.0582042622283D-02 +144 1.4300000000000D+00 -3.0583667423902D-01 -1.1430531060178D-01 +145 1.4400000000000D+00 -2.7098133746459D-01 -1.6490354103318D-01 +146 1.4500000000000D+00 -2.3681224333056D-01 -2.1217407368556D-01 +147 1.4600000000000D+00 -2.0353925987219D-01 -2.5593759955713D-01 +148 1.4700000000000D+00 -1.7135857805492D-01 -2.9603951511875D-01 +149 1.4800000000000D+00 -1.4045136043113D-01 -3.3235110337997D-01 +150 1.4900000000000D+00 -1.1098253287710D-01 -3.6477052039461D-01 +151 1.5000000000000D+00 -8.3099724614553D-02 -3.9322358400184D-01 +152 1.5100000000000D+00 -5.6932367162862D-02 -4.1766435350635D-01 +153 1.5200000000000D+00 -3.2590962084314D-02 -4.3807548720865D-01 +154 1.5300000000000D+00 -1.0166520255422D-02 -4.5446837622933D-01 +155 1.5400000000000D+00 1.0269817589342D-02 -4.6688304486949D-01 +156 1.5500000000000D+00 2.8666984577746D-02 -4.7538782527661D-01 +157 1.5600000000000D+00 4.4994002896755D-02 -4.8007879153185D-01 +158 1.5700000000000D+00 5.9239823259299D-02 -4.8107897091209D-01 +159 1.5800000000000D+00 7.1412979178365D-02 -4.7853732171627D-01 +160 1.5900000000000D+00 8.1541069781970D-02 -4.7262749642305D-01 +161 1.6000000000000D+00 8.9670068775989D-02 -4.6354638857367D-01 +162 1.6100000000000D+00 9.5863472489066D-02 -4.5151248109546D-01 +163 1.6200000000000D+00 1.0020129186989D-01 -4.3676400366545D-01 +164 1.6300000000000D+00 1.0277890060685D-01 -4.1955691584202D-01 +165 1.6400000000000D+00 1.0370575036449D-01 -4.0016273122594D-01 +166 1.6500000000000D+00 1.0310396559385D-01 -3.7886620004610D-01 +167 1.6600000000000D+00 1.0110683348000D-01 -3.5596287122404D-01 +168 1.6700000000000D+00 9.7857201909663D-02 -3.3175655147711D-01 +169 1.6800000000000D+00 9.3505803608192D-02 -3.0655668583057D-01 +170 1.6900000000000D+00 8.8209521546309D-02 -2.8067568023944D-01 +171 1.7000000000000D+00 8.2129614001845D-02 -2.5442619078104D-01 +172 1.7100000000000D+00 7.5429916835002D-02 -2.2811840317997D-01 +173 1.7200000000000D+00 6.8275040036155D-02 -2.0205732537068D-01 +174 1.7300000000000D+00 6.0828578741533D-02 -1.7654012025519D-01 +175 1.7400000000000D+00 5.3251353397898D-02 -1.5185349819131D-01 +176 1.7500000000000D+00 4.5699700859791D-02 -1.2827119835179D-01 +177 1.7600000000000D+00 3.8323829027928D-02 -1.0605157576923D-01 +178 1.7700000000000D+00 3.1266255924156D-02 -8.5435321918493D-02 +179 1.7800000000000D+00 2.4660345679349D-02 -6.6643335509228D-02 +180 1.7900000000000D+00 1.8631059570823D-02 -4.9880312939756D-02 +181 1.8000000000000D+00 1.3288131426435D-02 -3.5318197916379D-02 +182 1.8100000000000D+00 8.7150876543207D-03 -2.3067927934960D-02 +183 1.8200000000000D+00 4.9979860014405D-03 -1.3256766034370D-02 +184 1.8300000000000D+00 2.2739436356205D-03 -6.1643413209155D-03 +185 1.8400000000000D+00 6.0314721401445D-04 -1.8837965964265D-03 +186 1.8500000000000D+00 -1.6999137483344D-04 1.0571986270298D-04 +187 1.8600000000000D+00 -2.8327352587897D-04 5.1101648844707D-04 +188 1.8700000000000D+00 -9.0640370874143D-05 1.7678019143944D-04 +189 1.8800000000000D+00 5.4421258475186D-05 -1.0927178217212D-04 +190 1.8900000000000D+00 4.6410810813786D-05 -9.4774395128468D-05 +191 1.9000000000000D+00 -6.6097662631954D-06 1.2893141876344D-05 +192 1.9100000000000D+00 -1.1910938146537D-05 2.3482954387153D-05 +193 1.9200000000000D+00 6.6564773146507D-08 -7.9995751640034D-08 +194 1.9300000000000D+00 6.6623998016328D-07 -8.0066926493536D-07 +195 1.9400000000000D+00 2.0375423478704D-07 -2.4486635184280D-07 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +4 +1 0.0000000000000D+00 -1.5722460265206D+01 +2 1.0000000000000D-02 -1.5721744730447D+01 +3 2.0000000000000D-02 -1.5719599294487D+01 +4 3.0000000000000D-02 -1.5716027460214D+01 +5 4.0000000000000D-02 -1.5711034984878D+01 +6 5.0000000000000D-02 -1.5704629766804D+01 +7 6.0000000000000D-02 -1.5696821690467D+01 +8 7.0000000000000D-02 -1.5687622436106D+01 +9 8.0000000000000D-02 -1.5677045260037D+01 +10 9.0000000000000D-02 -1.5665104752452D+01 +11 1.0000000000000D-01 -1.5651816579825D+01 +12 1.1000000000000D-01 -1.5637197219135D+01 +13 1.2000000000000D-01 -1.5621263690856D+01 +14 1.3000000000000D-01 -1.5604033297179D+01 +15 1.4000000000000D-01 -1.5585523371198D+01 +16 1.5000000000000D-01 -1.5565751041944D+01 +17 1.6000000000000D-01 -1.5544733019148D+01 +18 1.7000000000000D-01 -1.5522485400669D+01 +19 1.8000000000000D-01 -1.5499023504400D+01 +20 1.9000000000000D-01 -1.5474361725664D+01 +21 2.0000000000000D-01 -1.5448513420137D+01 +22 2.1000000000000D-01 -1.5421490811637D+01 +23 2.2000000000000D-01 -1.5393304923538D+01 +24 2.3000000000000D-01 -1.5363965532032D+01 +25 2.4000000000000D-01 -1.5333481139189D+01 +26 2.5000000000000D-01 -1.5301858963534D+01 +27 2.6000000000000D-01 -1.5269104945786D+01 +28 2.7000000000000D-01 -1.5235223767427D+01 +29 2.8000000000000D-01 -1.5200218879881D+01 +30 2.9000000000000D-01 -1.5164092542256D+01 +31 3.0000000000000D-01 -1.5126845865837D+01 +32 3.1000000000000D-01 -1.5088478863776D+01 +33 3.2000000000000D-01 -1.5048990504713D+01 +34 3.3000000000000D-01 -1.5008378769317D+01 +35 3.4000000000000D-01 -1.4966640709068D+01 +36 3.5000000000000D-01 -1.4923772506759D+01 +37 3.6000000000000D-01 -1.4879769538476D+01 +38 3.7000000000000D-01 -1.4834626436997D+01 +39 3.8000000000000D-01 -1.4788337156618D+01 +40 3.9000000000000D-01 -1.4740895039547D+01 +41 4.0000000000000D-01 -1.4692292884063D+01 +42 4.1000000000000D-01 -1.4642523014545D+01 +43 4.2000000000000D-01 -1.4591577353535D+01 +44 4.3000000000000D-01 -1.4539447496015D+01 +45 4.4000000000000D-01 -1.4486124785809D+01 +46 4.5000000000000D-01 -1.4431600394282D+01 +47 4.6000000000000D-01 -1.4375865401481D+01 +48 4.7000000000000D-01 -1.4318910879939D+01 +49 4.8000000000000D-01 -1.4260727981810D+01 +50 4.9000000000000D-01 -1.4201308030229D+01 +51 5.0000000000000D-01 -1.4140642616561D+01 +52 5.1000000000000D-01 -1.4078723705700D+01 +53 5.2000000000000D-01 -1.4015543752553D+01 +54 5.3000000000000D-01 -1.3951095833508D+01 +55 5.4000000000000D-01 -1.3885373797580D+01 +56 5.5000000000000D-01 -1.3818372442300D+01 +57 5.6000000000000D-01 -1.3750087719723D+01 +58 5.7000000000000D-01 -1.3680516977423D+01 +59 5.8000000000000D-01 -1.3609659238252D+01 +60 5.9000000000000D-01 -1.3537515520713D+01 +61 6.0000000000000D-01 -1.3464089198795D+01 +62 6.1000000000000D-01 -1.3389386396414D+01 +63 6.2000000000000D-01 -1.3313416407028D+01 +64 6.3000000000000D-01 -1.3236192124086D+01 +65 6.4000000000000D-01 -1.3157730463155D+01 +66 6.5000000000000D-01 -1.3078052752338D+01 +67 6.6000000000000D-01 -1.2997185064829D+01 +68 6.7000000000000D-01 -1.2915158466547D+01 +69 6.8000000000000D-01 -1.2832009153450D+01 +70 6.9000000000000D-01 -1.2747778457568D+01 +71 7.0000000000000D-01 -1.2662512707818D+01 +72 7.1000000000000D-01 -1.2576262941056D+01 +73 7.2000000000000D-01 -1.2489084469464D+01 +74 7.3000000000000D-01 -1.2401036321348D+01 +75 7.4000000000000D-01 -1.2312180582307D+01 +76 7.5000000000000D-01 -1.2222581671431D+01 +77 7.6000000000000D-01 -1.2132305591620D+01 +78 7.7000000000000D-01 -1.2041419193991D+01 +79 7.8000000000000D-01 -1.1949989493305D+01 +80 7.9000000000000D-01 -1.1858083065307D+01 +81 8.0000000000000D-01 -1.1765765548388D+01 +82 8.1000000000000D-01 -1.1673101262374D+01 +83 8.2000000000000D-01 -1.1580152947615D+01 +84 8.3000000000000D-01 -1.1486981618836D+01 +85 8.4000000000000D-01 -1.1393646521285D+01 +86 8.5000000000000D-01 -1.1300205171798D+01 +87 8.6000000000000D-01 -1.1206713464684D+01 +88 8.7000000000000D-01 -1.1113225821599D+01 +89 8.8000000000000D-01 -1.1019795365407D+01 +90 8.9000000000000D-01 -1.0926474100044D+01 +91 9.0000000000000D-01 -1.0833313081195D+01 +92 9.1000000000000D-01 -1.0740362565645D+01 +93 9.2000000000000D-01 -1.0647672130388D+01 +94 9.3000000000000D-01 -1.0555290755587D+01 +95 9.4000000000000D-01 -1.0463266868259D+01 +96 9.5000000000000D-01 -1.0371648345966D+01 +97 9.6000000000000D-01 -1.0280482481879D+01 +98 9.7000000000000D-01 -1.0189815914245D+01 +99 9.8000000000000D-01 -1.0099694524609D+01 +100 9.9000000000000D-01 -1.0010163310108D+01 +101 1.0000000000000D+00 -9.9212662357255D+00 +102 1.0100000000000D+00 -9.8330460726982D+00 +103 1.0200000000000D+00 -9.7455442292222D+00 +104 1.0300000000000D+00 -9.6588005793110D+00 +105 1.0400000000000D+00 -9.5728532951151D+00 +106 1.0500000000000D+00 -9.4877386873837D+00 +107 1.0600000000000D+00 -9.4034910578515D+00 +108 1.0700000000000D+00 -9.3201425665115D+00 +109 1.0800000000000D+00 -9.2377231158304D+00 +110 1.0900000000000D+00 -9.1562602530821D+00 +111 1.1000000000000D+00 -9.0757790913055D+00 +112 1.1100000000000D+00 -8.9963022485567D+00 +113 1.1200000000000D+00 -8.9178498046901D+00 +114 1.1300000000000D+00 -8.8404392744196D+00 +115 1.1400000000000D+00 -8.7640855951285D+00 +116 1.1500000000000D+00 -8.6888011276692D+00 +117 1.1600000000000D+00 -8.6145956683201D+00 +118 1.1700000000000D+00 -8.5414764700756D+00 +119 1.1800000000000D+00 -8.4694482714576D+00 +120 1.1900000000000D+00 -8.3985133311792D+00 +121 1.2000000000000D+00 -8.3286714671240D+00 +122 1.2100000000000D+00 -8.2599200982545D+00 +123 1.2200000000000D+00 -8.1922542881915D+00 +124 1.2300000000000D+00 -8.1256667894282D+00 +125 1.2400000000000D+00 -8.0601480872585D+00 +126 1.2500000000000D+00 -7.9956864425792D+00 +127 1.2600000000000D+00 -7.9322679329436D+00 +128 1.2700000000000D+00 -7.8698764899453D+00 +129 1.2800000000000D+00 -7.8084939407723D+00 +130 1.2900000000000D+00 -7.7481000245933D+00 +131 1.3000000000000D+00 -7.6886725003969D+00 +132 1.3100000000000D+00 -7.6301869199973D+00 +133 1.3200000000000D+00 -7.5726171264959D+00 +134 1.3300000000000D+00 -7.5159363464757D+00 +135 1.3400000000000D+00 -7.4601182307024D+00 +136 1.3500000000000D+00 -7.4051374892726D+00 +137 1.3600000000000D+00 -7.3509696543217D+00 +138 1.3700000000000D+00 -7.2975911637779D+00 +139 1.3800000000000D+00 -7.2449793778823D+00 +140 1.3900000000000D+00 -7.1931125958673D+00 +141 1.4000000000000D+00 -7.1419700563921D+00 +142 1.4100000000000D+00 -7.0915320429161D+00 +143 1.4200000000000D+00 -7.0417796881373D+00 +144 1.4300000000000D+00 -6.9926950936262D+00 +145 1.4400000000000D+00 -6.9442610080454D+00 +146 1.4500000000000D+00 -6.8964622520298D+00 +147 1.4600000000000D+00 -6.8492884688951D+00 +148 1.4700000000000D+00 -6.8027341090473D+00 +149 1.4800000000000D+00 -6.7567992032981D+00 +150 1.4900000000000D+00 -6.7114791734878D+00 +151 1.5000000000000D+00 -6.6667608957621D+00 +152 1.5100000000000D+00 -6.6226302730175D+00 +153 1.5200000000000D+00 -6.5790740034170D+00 +154 1.5300000000000D+00 -6.5360815091512D+00 +155 1.5400000000000D+00 -6.4936437818765D+00 +156 1.5500000000000D+00 -6.4517501672191D+00 +157 1.5600000000000D+00 -6.4103901642839D+00 +158 1.5700000000000D+00 -6.3695541683402D+00 +159 1.5800000000000D+00 -6.3292327916350D+00 +160 1.5900000000000D+00 -6.2894167711650D+00 +161 1.6000000000000D+00 -6.2500970871126D+00 +162 1.6100000000000D+00 -6.2112649400412D+00 +163 1.6200000000000D+00 -6.1729117195296D+00 +164 1.6300000000000D+00 -6.1350289935652D+00 +165 1.6400000000000D+00 -6.0976084982596D+00 +166 1.6500000000000D+00 -6.0606421280330D+00 +167 1.6600000000000D+00 -6.0241219277416D+00 +168 1.6700000000000D+00 -5.9880400863553D+00 +169 1.6800000000000D+00 -5.9523889320344D+00 +170 1.6900000000000D+00 -5.9171609286091D+00 +171 1.7000000000000D+00 -5.8823486732278D+00 +172 1.7100000000000D+00 -5.8479448950304D+00 +173 1.7200000000000D+00 -5.8139424546824D+00 +174 1.7300000000000D+00 -5.7803343445610D+00 +175 1.7400000000000D+00 -5.7471136894726D+00 +176 1.7500000000000D+00 -5.7142737476498D+00 +177 1.7600000000000D+00 -5.6818079119487D+00 +178 1.7700000000000D+00 -5.6497097110133D+00 +179 1.7800000000000D+00 -5.6179728103245D+00 +180 1.7900000000000D+00 -5.5865910130043D+00 +181 1.8000000000000D+00 -5.5555582602204D+00 +182 1.8100000000000D+00 -5.5248686312501D+00 +183 1.8200000000000D+00 -5.4945163429214D+00 +184 1.8300000000000D+00 -5.4644957487155D+00 +185 1.8400000000000D+00 -5.4348013371179D+00 +186 1.8500000000000D+00 -5.4054277296856D+00 +187 1.8600000000000D+00 -5.3763696783837D+00 +188 1.8700000000000D+00 -5.3476220626484D+00 +189 1.8800000000000D+00 -5.3191798859281D+00 +190 1.8900000000000D+00 -5.2910382719382D+00 +191 1.9000000000000D+00 -5.2631924606400D+00 +192 1.9100000000000D+00 -5.2356378040104D+00 +193 1.9200000000000D+00 -5.2083697617052D+00 +194 1.9300000000000D+00 -5.1813838967082D+00 +195 1.9400000000000D+00 -5.1546758709278D+00 +196 1.9500000000000D+00 -5.1282414410291D+00 +197 1.9600000000000D+00 -5.1020764542619D+00 +198 1.9700000000000D+00 -5.0761768446400D+00 +199 1.9800000000000D+00 -5.0505386292800D+00 +200 1.9900000000000D+00 -5.0251579050219D+00 +201 2.0000000000000D+00 -5.0000308454390D+00 +202 2.0100000000000D+00 -4.9751536979766D+00 +203 2.0200000000000D+00 -4.9505227816109D+00 +204 2.0300000000000D+00 -4.9261344846196D+00 +205 2.0400000000000D+00 -4.9019852627332D+00 +206 2.0500000000000D+00 -4.8780716375172D+00 +207 2.0600000000000D+00 -4.8543901949332D+00 +208 2.0700000000000D+00 -4.8309375841395D+00 +209 2.0800000000000D+00 -4.8077105164052D+00 +210 2.0900000000000D+00 -4.7847057641204D+00 +211 2.1000000000000D+00 -4.7619201598940D+00 +212 2.1100000000000D+00 -4.7393505956823D+00 +213 2.1200000000000D+00 -4.7169940218334D+00 +214 2.1300000000000D+00 -4.6948474462397D+00 +215 2.1400000000000D+00 -4.6729079332489D+00 +216 2.1500000000000D+00 -4.6511726025914D+00 +217 2.1600000000000D+00 -4.6296386282380D+00 +218 2.1700000000000D+00 -4.6083032369842D+00 +219 2.1800000000000D+00 -4.5871637071512D+00 +220 2.1900000000000D+00 -4.5662173670058D+00 +221 2.2000000000000D+00 -4.5454615931433D+00 +222 2.2100000000000D+00 -4.5248938089025D+00 +223 2.2200000000000D+00 -4.5045114825852D+00 +224 2.2300000000000D+00 -4.4843121257790D+00 +225 2.2400000000000D+00 -4.4642932916834D+00 +226 2.2500000000000D+00 -4.4444525734808D+00 +227 2.2600000000000D+00 -4.4247876028673D+00 +228 2.2700000000000D+00 -4.4052960485839D+00 +229 2.2800000000000D+00 -4.3859756151927D+00 +230 2.2900000000000D+00 -4.3668240426811D+00 +231 2.3000000000000D+00 -4.3478391135123D+00 +232 2.3100000000000D+00 -4.3290186275358D+00 +233 2.3200000000000D+00 -4.3103604013162D+00 +234 2.3300000000000D+00 -4.2918622322401D+00 +235 2.3400000000000D+00 -4.2735221840613D+00 +236 2.3500000000000D+00 -4.2553383417670D+00 +237 2.3600000000000D+00 -4.2373089247226D+00 +238 2.3700000000000D+00 -4.2194311613466D+00 +239 2.3800000000000D+00 -4.2017024549274D+00 +240 2.3900000000000D+00 -4.1841202651018D+00 +241 2.4000000000000D+00 -4.1666837400119D+00 +242 2.4100000000000D+00 -4.1493919684396D+00 +243 2.4200000000000D+00 -4.1322440095194D+00 +244 2.4300000000000D+00 -4.1152379282236D+00 +245 2.4400000000000D+00 -4.0983718242563D+00 +246 2.4500000000000D+00 -4.0816437288581D+00 +247 2.4600000000000D+00 -4.0650518154386D+00 +248 2.4700000000000D+00 -4.0485942154838D+00 +249 2.4800000000000D+00 -4.0322691948040D+00 +250 2.4900000000000D+00 -4.0160752032565D+00 +251 2.5000000000000D+00 -4.0000107509405D+00 +252 2.5100000000000D+00 -3.9840743361029D+00 +253 2.5200000000000D+00 -3.9682644063967D+00 +254 2.5300000000000D+00 -3.9525794461795D+00 +255 2.5400000000000D+00 -3.9370179708062D+00 +256 2.5500000000000D+00 -3.9215785342953D+00 +257 2.5600000000000D+00 -3.9062597070051D+00 +258 2.5700000000000D+00 -3.8910600813969D+00 +259 2.5800000000000D+00 -3.8759782710144D+00 +260 2.5900000000000D+00 -3.8610129113547D+00 +261 2.6000000000000D+00 -3.8461626590347D+00 +262 2.6100000000000D+00 -3.8314261913854D+00 +263 2.6200000000000D+00 -3.8168022060501D+00 +264 2.6300000000000D+00 -3.8022894205923D+00 +265 2.6400000000000D+00 -3.7878865721123D+00 +266 2.6500000000000D+00 -3.7735924168656D+00 +267 2.6600000000000D+00 -3.7594057298919D+00 +268 2.6700000000000D+00 -3.7453253046519D+00 +269 2.6800000000000D+00 -3.7313499526681D+00 +270 2.6900000000000D+00 -3.7174785031755D+00 +271 2.7000000000000D+00 -3.7037098027778D+00 +272 2.7100000000000D+00 -3.6900427151131D+00 +273 2.7200000000000D+00 -3.6764761205270D+00 +274 2.7300000000000D+00 -3.6630089157503D+00 +275 2.7400000000000D+00 -3.6496400135889D+00 +276 2.7500000000000D+00 -3.6363683426206D+00 +277 2.7600000000000D+00 -3.6231928468970D+00 +278 2.7700000000000D+00 -3.6101124856555D+00 +279 2.7800000000000D+00 -3.5971262330400D+00 +280 2.7900000000000D+00 -3.5842330778281D+00 +281 2.8000000000000D+00 -3.5714320231628D+00 +282 2.8100000000000D+00 -3.5587220862974D+00 +283 2.8200000000000D+00 -3.5461022983429D+00 +284 2.8300000000000D+00 -3.5335717040230D+00 +285 2.8400000000000D+00 -3.5211293614366D+00 +286 2.8500000000000D+00 -3.5087743418250D+00 +287 2.8600000000000D+00 -3.4965057293462D+00 +288 2.8700000000000D+00 -3.4843226208543D+00 +289 2.8800000000000D+00 -3.4722241256831D+00 +290 2.8900000000000D+00 -3.4602093654356D+00 +291 2.9000000000000D+00 -3.4482774737794D+00 +292 2.9100000000000D+00 -3.4364275962439D+00 +293 2.9200000000000D+00 -3.4246588900224D+00 +294 2.9300000000000D+00 -3.4129705237804D+00 +295 2.9400000000000D+00 -3.4013616774655D+00 +296 2.9500000000000D+00 -3.3898315421209D+00 +297 2.9600000000000D+00 -3.3783793197023D+00 +298 2.9700000000000D+00 -3.3670042229016D+00 +299 2.9800000000000D+00 -3.3557054749684D+00 +300 2.9900000000000D+00 -3.3444823095377D+00 +301 3.0000000000000D+00 -3.3333339704612D+00 +302 3.0100000000000D+00 -3.3222597116402D+00 +303 3.0200000000000D+00 -3.3112587968618D+00 +304 3.0300000000000D+00 -3.3003304996376D+00 +305 3.0400000000000D+00 -3.2894741030465D+00 +306 3.0500000000000D+00 -3.2786888995790D+00 +307 3.0600000000000D+00 -3.2679741909848D+00 +308 3.0700000000000D+00 -3.2573292881224D+00 +309 3.0800000000000D+00 -3.2467535108132D+00 +310 3.0900000000000D+00 -3.2362461876956D+00 +311 3.1000000000000D+00 -3.2258066560840D+00 +312 3.1100000000000D+00 -3.2154342618292D+00 +313 3.1200000000000D+00 -3.2051283591814D+00 +314 3.1300000000000D+00 -3.1948883106561D+00 +315 3.1400000000000D+00 -3.1847134869024D+00 +316 3.1500000000000D+00 -3.1746032665729D+00 +317 3.1600000000000D+00 -3.1645570361973D+00 +318 3.1700000000000D+00 -3.1545741900577D+00 +319 3.1800000000000D+00 -3.1446541300658D+00 +320 3.1900000000000D+00 -3.1347962656431D+00 +321 3.2000000000000D+00 -3.1250000136029D+00 +322 3.2100000000000D+00 -3.1152647980348D+00 +323 3.2200000000000D+00 -3.1055900501909D+00 +324 3.2300000000000D+00 -3.0959752083748D+00 +325 3.2400000000000D+00 -3.0864197178317D+00 +326 3.2500000000000D+00 -3.0769230306416D+00 +327 3.2600000000000D+00 -3.0674846056138D+00 +328 3.2700000000000D+00 -3.0581039081832D+00 +329 3.2800000000000D+00 -3.0487804103097D+00 +330 3.2900000000000D+00 -3.0395135903775D+00 +331 3.3000000000000D+00 -3.0303029330983D+00 +332 3.3100000000000D+00 -3.0211479294150D+00 +333 3.3200000000000D+00 -3.0120480764071D+00 +334 3.3300000000000D+00 -3.0030028771990D+00 +335 3.3400000000000D+00 -2.9940118408684D+00 +336 3.3500000000000D+00 -2.9850744823580D+00 +337 3.3600000000000D+00 -2.9761903223871D+00 +338 3.3700000000000D+00 -2.9673588873662D+00 +339 3.3800000000000D+00 -2.9585797093123D+00 +340 3.3900000000000D+00 -2.9498523257664D+00 +341 3.4000000000000D+00 -2.9411762797116D+00 +342 3.4100000000000D+00 -2.9325511194933D+00 +343 3.4200000000000D+00 -2.9239763987407D+00 +344 3.4300000000000D+00 -2.9154516762897D+00 +345 3.4400000000000D+00 -2.9069765161068D+00 +346 3.4500000000000D+00 -2.8985504872150D+00 +347 3.4600000000000D+00 -2.8901731636202D+00 +348 3.4700000000000D+00 -2.8818441242398D+00 +349 3.4800000000000D+00 -2.8735629528317D+00 +350 3.4900000000000D+00 -2.8653292379246D+00 +351 3.5000000000000D+00 -2.8571425727506D+00 +352 3.5100000000000D+00 -2.8490025551774D+00 +353 3.5200000000000D+00 -2.8409087876427D+00 +354 3.5300000000000D+00 -2.8328608770893D+00 +355 3.5400000000000D+00 -2.8248584349016D+00 +356 3.5500000000000D+00 -2.8169010768429D+00 +357 3.5600000000000D+00 -2.8089884229936D+00 +358 3.5700000000000D+00 -2.8011200976914D+00 +359 3.5800000000000D+00 -2.7932957294710D+00 +360 3.5900000000000D+00 -2.7855149510061D+00 +361 3.6000000000000D+00 -2.7777773990519D+00 +362 3.6100000000000D+00 -2.7700827143884D+00 +363 3.6200000000000D+00 -2.7624305417646D+00 +364 3.6300000000000D+00 -2.7548205298444D+00 +365 3.6400000000000D+00 -2.7472523311522D+00 +366 3.6500000000000D+00 -2.7397256020206D+00 +367 3.6600000000000D+00 -2.7322400025376D+00 +368 3.6700000000000D+00 -2.7247951964963D+00 +369 3.6800000000000D+00 -2.7173908513438D+00 +370 3.6900000000000D+00 -2.7100266381323D+00 +371 3.7000000000000D+00 -2.7027022314698D+00 +372 3.7100000000000D+00 -2.6954173094727D+00 +373 3.7200000000000D+00 -2.6881715537184D+00 +374 3.7300000000000D+00 -2.6809646491988D+00 +375 3.7400000000000D+00 -2.6737962842749D+00 +376 3.7500000000000D+00 -2.6666661506316D+00 +377 3.7600000000000D+00 -2.6595739432339D+00 +378 3.7700000000000D+00 -2.6525193602829D+00 +379 3.7800000000000D+00 -2.6455021031735D+00 +380 3.7900000000000D+00 -2.6385218764518D+00 +381 3.8000000000000D+00 -2.6315783877740D+00 +382 3.8100000000000D+00 -2.6246713478655D+00 +383 3.8200000000000D+00 -2.6178004704805D+00 +384 3.8300000000000D+00 -2.6109654723629D+00 +385 3.8400000000000D+00 -2.6041660732068D+00 +386 3.8500000000000D+00 -2.5974019956189D+00 +387 3.8600000000000D+00 -2.5906729650800D+00 +388 3.8700000000000D+00 -2.5839787099086D+00 +389 3.8800000000000D+00 -2.5773189612237D+00 +390 3.8900000000000D+00 -2.5706934529094D+00 +391 3.9000000000000D+00 -2.5641019215790D+00 +392 3.9100000000000D+00 -2.5575441065402D+00 +393 3.9200000000000D+00 -2.5510197497609D+00 +394 3.9300000000000D+00 -2.5445285958353D+00 +395 3.9400000000000D+00 -2.5380703919504D+00 +396 3.9500000000000D+00 -2.5316448878533D+00 +397 3.9600000000000D+00 -2.5252518358192D+00 +398 3.9700000000000D+00 -2.5188909906190D+00 +399 3.9800000000000D+00 -2.5125621094880D+00 +400 3.9900000000000D+00 -2.5062649520958D+00 +1 0.0000000000000D+00 5.4372146438920D+01 9.9782369034074D-09 -5.3605687435021D+02 9.1577220700856D-05 1.4847030998792D+04 +2 1.0000000000000D-02 5.4345349784210D+01 -5.3580947036103D+00 -5.3531476911020D+02 1.4836750963699D+02 1.4815269270081D+04 +3 2.0000000000000D-02 5.4265033993433D+01 -1.0701358013941D+01 -5.3309166696855D+02 2.9609243290364D+02 1.4719024771847D+04 +4 3.0000000000000D-02 5.4131421300044D+01 -1.6015022762789D+01 -5.2939719276036D+02 4.4253592408902D+02 1.4559145677149D+04 +5 4.0000000000000D-02 5.3944881018258D+01 -2.1284449865648D+01 -5.2424732645359D+02 5.8706638811696D+02 1.4336597162019D+04 +6 5.0000000000000D-02 5.3705927949284D+01 -2.6495191449974D+01 -5.1766431230724D+02 7.2906314015749D+02 1.4052643328932D+04 +7 6.0000000000000D-02 5.3415220157954D+01 -3.1633052894234D+01 -5.0967653223815D+02 8.6791991085705D+02 1.3708898110455D+04 +8 7.0000000000000D-02 5.3073556135875D+01 -3.6684153426397D+01 -5.0031834451101D+02 1.0030482600439D+03 1.3307311200444D+04 +9 8.0000000000000D-02 5.2681871367227D+01 -4.1634984940502D+01 -4.8962988886624D+02 1.1338808701883D+03 1.2850155060141D+04 +10 9.0000000000000D-02 5.2241234316682D+01 -4.6472468702174D+01 -4.7765685942641D+02 1.2598746937137D+03 1.2340008417154D+04 +11 1.0000000000000D-01 5.1752841862142D+01 -5.1184009628529D+01 -4.6445024694271D+02 1.3805139343607D+03 1.1779739550827D+04 +12 1.1000000000000D-01 5.1218014198051D+01 -5.5757547844502D+01 -4.5006605214620D+02 1.4953128416526D+03 1.1172486044630D+04 +13 1.2000000000000D-01 5.0638189237940D+01 -6.0181607236309D+01 -4.3456497216282D+02 1.6038183007134D+03 1.0521633691953D+04 +14 1.3000000000000D-01 5.0014916547529D+01 -6.4445340743192D+01 -4.1801206212635D+02 1.7056122002352D+03 9.8307934694446D+03 +15 1.4000000000000D-01 4.9349850842228D+01 -6.8538572150789D+01 -4.0047637428341D+02 1.8003135636925D+03 9.1037771809735D+03 +16 1.5000000000000D-01 4.8644745085086D+01 -7.2451834173099D+01 -3.8203057702639D+02 1.8875804305259D+03 8.3445718578742D+03 +17 1.6000000000000D-01 4.7901443223271D+01 -7.6176402635041D+01 -3.6275055641252D+02 1.9671114760152D+03 7.5573131251293D+03 +18 1.7000000000000D-01 4.7121872602915D+01 -7.9704326593676D+01 -3.4271500283007D+02 2.0386473606026D+03 6.7462577631698D+03 +19 1.8000000000000D-01 4.6308036103617D+01 -8.3028454263232D+01 -3.2200498555465D+02 2.1019718015435D+03 5.9157556354359D+03 +20 1.9000000000000D-01 4.5462004035142D+01 -8.6142454636797D+01 -3.0070351799945D+02 2.1569123618037D+03 5.0702212571172D+03 +21 2.0000000000000D-01 4.4585905839758D+01 -8.9040834725838D+01 -2.7889511650283D+02 2.2033409534125D+03 4.2141051481594D+03 +22 2.1000000000000D-01 4.3681921644308D+01 -9.1718952367181D+01 -2.5666535551425D+02 2.2411740544781D+03 3.3518652545793D+03 +23 2.2000000000000D-01 4.2752273706480D+01 -9.4173024575769D+01 -2.3410042203617D+02 2.2703726414102D+03 2.4879386009903D+03 +24 2.3000000000000D-01 4.1799217799806D+01 -9.6400131449937D+01 -2.1128667215410D+02 2.2909418398297D+03 1.6267134076380D+03 +25 2.4000000000000D-01 4.0825034581707D+01 -9.8398215664053D+01 -1.8831019244145D+02 2.3029302998246D+03 7.7250187664635D+02 +26 2.5000000000000D-01 3.9832020988426D+01 -1.0016607761096D+02 -1.6525636895890D+02 2.3064293031887D+03 -7.0486164610338D+01 +27 2.6000000000000D-01 3.8822481699937D+01 -1.0170336628337D+02 -1.4220946648267D+02 2.3015716121864D+03 -8.9816857108329D+02 +28 2.7000000000000D-01 3.7798720716861D+01 -1.0301056600936D+02 -1.1925222049082D+02 2.2885300712012D+03 -1.7066149660151D+03 +29 2.8000000000000D-01 3.6763033090195D+01 -1.0408897918145D+02 -9.6465444314735D+01 2.2675159743662D+03 -2.4920694349737D+03 +30 2.9000000000000D-01 3.5717696843111D+01 -1.0494070514272D+02 -7.3927653724038D+01 2.2387772138284D+03 -3.2509716789768D+03 +31 3.0000000000000D-01 3.4664965122343D+01 -1.0556861541464D+02 -5.1714711059081D+01 2.2025962247530D+03 -3.9799764934300D+03 +32 3.1000000000000D-01 3.3607058614738D+01 -1.0597632547232D+02 -2.9899490857710D+01 2.1592877444802D+03 -4.6759714400793D+03 +33 3.2000000000000D-01 3.2546158262403D+01 -1.0616816329078D+02 -8.5515687429178D+00 2.1091964043676D+03 -5.3360926150554D+03 +34 3.3000000000000D-01 3.1484398307518D+01 -1.0614913490319D+02 1.2263064852585D+01 2.0526941738410D+03 -5.9577384366982D+03 +35 3.4000000000000D-01 3.0423859695471D+01 -1.0592488722621D+02 3.2482264747234D+01 1.9901776769759D+03 -6.5385813311003D+03 +36 3.5000000000000D-01 2.9366563862271D+01 -1.0550166842095D+02 5.2047963687674D+01 1.9220654025714D+03 -7.0765773473007D+03 +37 3.6000000000000D-01 2.8314466929532D+01 -1.0488628606795D+02 7.0906376682265D+01 1.8487948290666D+03 -7.5699735590642D+03 +38 3.7000000000000D-01 2.7269454327429D+01 -1.0408606344392D+02 8.9008176249231D+01 1.7708194860497D+03 -8.0173133559773D+03 +39 3.8000000000000D-01 2.6233335863169D+01 -1.0310879419356D+02 1.0630863805256D+02 1.6886059738954D+03 -8.4174393924295D+03 +40 3.9000000000000D-01 2.5207841249518D+01 -1.0196269569455D+02 1.2276775662217D+02 1.6026309620559D+03 -8.7694953602901D+03 +41 4.0000000000000D-01 2.4194616104966D+01 -1.0065636141576D+02 1.3835033107425D+02 1.5133782089982D+03 -9.0729252126706D+03 +42 4.1000000000000D-01 2.3195218434107D+01 -9.9198712566268D+01 1.5302602073660D+02 1.4213355260942D+03 -9.3274598788603D+03 +43 4.2000000000000D-01 2.2211115593800D+01 -9.7598949340313D+01 1.6676937165438D+02 1.3269919020371D+03 -9.5331235554634D+03 +44 4.3000000000000D-01 2.1243681747749D+01 -9.5866502033266D+01 1.7955981433856D+02 1.2308347030420D+03 -9.6902682549961D+03 +45 4.4000000000000D-01 2.0294195809240D+01 -9.4010982343003D+01 1.9138163051618D+02 1.1333466422053D+03 -9.7994197772187D+03 +46 4.5000000000000D-01 1.9363839868902D+01 -9.2042135111954D+01 2.0222389730225D+02 1.0350033382873D+03 -9.8614695550471D+03 +47 4.6000000000000D-01 1.8453698101676D+01 -8.9969790787051D+01 2.1208040062244D+02 9.3627063535239D+02 -9.8775065679846D+03 +48 4.7000000000000D-01 1.7564756144493D+01 -8.7803818857473D+01 2.2094952566403D+02 8.3760214583501D+02 -9.8488691295047D+03 +49 4.8000000000000D-01 1.6697900933676D+01 -8.5554082512009D+01 2.2883412313943D+02 7.3943697953400D+02 -9.7771199476940D+03 +50 4.9000000000000D-01 1.5853920988715D+01 -8.3230394746019D+01 2.3574135325111D+02 6.4219758914047D+02 -9.6640248011220D+03 +51 5.0000000000000D-01 1.5033507126812D+01 -8.0842476132593D+01 2.4168250919398D+02 5.4628779822143D+02 -9.5115406922129D+03 +52 5.1000000000000D-01 1.4237253590571D+01 -7.8399914455151D+01 2.4667282166405D+02 4.5209100538598D+02 -9.3217927998004D+03 +53 5.2000000000000D-01 1.3465659569299D+01 -7.5912126381026D+01 2.5073124645093D+02 3.5996857317403D+02 -9.0970598441086D+03 +54 5.3000000000000D-01 1.2719131092684D+01 -7.3388321337029D+01 2.5388023676709D+02 2.7025840806985D+02 -8.8397509194915D+03 +55 5.4000000000000D-01 1.1997983274112D+01 -7.0837467728972D+01 2.5614550247240D+02 1.8327374164753D+02 -8.5523888734765D+03 +56 5.5000000000000D-01 1.1302442879549D+01 -6.8268261627070D+01 2.5755575798145D+02 9.9302102997918D+01 -8.2375875677375D+03 +57 5.6000000000000D-01 1.0632651196807D+01 -6.5689098019810D+01 2.5814246102754D+02 1.8604504905989D+01 -7.8980336136465D+03 +58 5.7000000000000D-01 9.9886671790741D+00 -6.3108044717925D+01 2.5793954417667D+02 -5.8585185587824D+01 -7.5364656070617D+03 +59 5.8000000000000D-01 9.3704708358971D+00 -6.0532818971130D+01 2.5698314113343D+02 -1.3206066060535D+02 -7.1556540732903D+03 +60 5.9000000000000D-01 8.7779668442373D+00 -5.7970766839257D+01 2.5531130984244D+02 -2.0164340296091D+02 -6.7583830803787D+03 +61 6.0000000000000D-01 8.2109883519485D+00 -5.5428845340815D+01 2.5296375424963D+02 -2.6718271843115D+02 -6.3474301571196D+03 +62 6.1000000000000D-01 7.6693009458567D+00 -5.2913607382290D+01 2.4998154669005D+02 -3.2855558411894D+02 -5.9255492369993D+03 +63 6.2000000000000D-01 7.1526067566992D+00 -5.0431189453151D+01 2.4640685264663D+02 -3.8566632403608D+02 -5.4954526164406D+03 +64 6.3000000000000D-01 6.6605486734131D+00 -4.7987302054067D+01 2.4228265965617D+02 -4.3844610630460D+02 -5.0597944967824D+03 +65 6.4000000000000D-01 6.1927146396778D+00 -4.5587222808245D+01 2.3765251201548D+02 -4.8685228923530D+02 -4.6211559870641D+03 +66 6.5000000000000D-01 5.7486420061933D+00 -4.3235792190540D+01 2.3256025279610D+02 -5.3086761225044D+02 -4.1820299451496D+03 +67 6.6000000000000D-01 5.3278219129116D+00 -4.0937411793479D+01 2.2704977466392D+02 -5.7049924877294D+02 -3.7448082929423D+03 +68 6.7000000000000D-01 4.9297036763097D+00 -3.8696045035690D+01 2.2116478079015D+02 -6.0577773605530D+02 -3.3117698451784D+03 +69 6.8000000000000D-01 4.5536991578075D+00 -3.6515220205716D+01 2.1494855705931D+02 -6.3675578672400D+02 -2.8850692365941D+03 +70 6.9000000000000D-01 4.1991870905612D+00 -3.4398035722546D+01 2.0844375668387D+02 -6.6350700105950D+02 -2.4667279448419D+03 +71 7.0000000000000D-01 3.8655173431012D+00 -3.2347167484174D+01 2.0169219812395D+02 -6.8612449294406D+02 -2.0586258630900D+03 +72 7.1000000000000D-01 3.5520150996105D+00 -3.0364878166894D+01 1.9473467715588D+02 -7.0471943798947D+02 -1.6624945187348D+03 +73 7.2000000000000D-01 3.2579849380599D+00 -2.8453028330274D+01 1.8761079376220D+02 -7.1941956360236D+02 -1.2799119581990D+03 +74 7.3000000000000D-01 2.9827147888912D+00 -2.6613089176902D+01 1.8035879436259D+02 -7.3036759188593D+02 -9.1229842568011D+02 +75 7.4000000000000D-01 2.7254797584753D+00 -2.4846156811331D+01 1.7301542981091D+02 -7.3771964622195D+02 -5.6091369232088D+02 +76 7.5000000000000D-01 2.4855458031491D+00 -2.3152967838966D+01 1.6561582943077D+02 -7.4164364011899D+02 -2.2685583225801D+02 +77 7.6000000000000D-01 2.2621732412315D+00 -2.1533916143920D+01 1.5819339120806D+02 -7.4231765701121D+02 8.8939185308259D+01 +78 7.7000000000000D-01 2.0546200920425D+00 -1.9989070683882D+01 1.5077968818696D+02 -7.3992833388522D+02 3.8569628696171D+02 +79 7.8000000000000D-01 1.8621452325614D+00 -1.8518194140484D+01 1.4340439094270D+02 -7.3466926292936D+02 6.6279910205816D+02 +80 7.9000000000000D-01 1.6840113639707D+00 -1.7120762265424D+01 1.3609520591720D+02 -7.2673941947227D+02 9.1978669077759D+02 +81 8.0000000000000D-01 1.5194877819159D+00 -1.5795983765209D+01 1.2887782928998D+02 -7.1634162903153D+02 1.1563491858273D+03 +82 8.1000000000000D-01 1.3678529458652D+00 -1.4542820571331D+01 1.2177591594603D+02 -7.0368108161364D+02 1.3723225956755D+03 +83 8.2000000000000D-01 1.2283968444612D+00 -1.3360008347358D+01 1.1481106302715D+02 -6.8896390325817D+02 1.5676825990908D+03 +84 8.3000000000000D-01 1.1004231552143D+00 -1.2246077090171D+01 1.0800280744140D+02 -6.7239579316071D+02 1.7425377198381D+03 +85 8.4000000000000D-01 9.8325119828434D-01 -1.1199371689127D+01 1.0136863665249D+02 -6.5418073210473D+02 1.8971217664989D+03 +86 8.5000000000000D-01 8.7621768542087D-01 -1.0218072314029D+01 9.4924011993347D+01 -6.3451977051099D+02 2.0317856097331D+03 +87 8.6000000000000D-01 7.7867826638914D-01 -9.3002145107649D+00 8.8682403680038D+01 -6.1360990038894D+02 2.1469886009561D+03 +88 8.7000000000000D-01 6.9000887637399D-01 -8.4437088918460D+00 8.2655336672078D+01 -5.9164301537045D+02 2.2432895021989D+03 +89 8.8000000000000D-01 6.0960688894130D-01 -7.6463603178703D+00 7.6852446470553D+01 -5.6880496354746D+02 2.3213370869862D+03 +90 8.9000000000000D-01 5.3689208012848D-01 -6.9058864752268D+00 7.1281543915251D+01 -5.4527469490804D+02 2.3818606019749D+03 +91 9.0000000000000D-01 4.7130741013585D-01 -6.2199357647937D+00 6.5948688028668D+01 -5.2122350498089D+02 2.4256600575566D+03 +92 9.1000000000000D-01 4.1231962989541D-01 -5.5861044259996D+00 6.0858265935817D+01 -4.9681437611626D+02 2.4535964561620D+03 +93 9.2000000000000D-01 3.5941972050054D-01 -5.0019528303804D+00 5.6013078883341D+01 -4.7220141612701D+02 2.4665820983752D+03 +94 9.3000000000000D-01 3.1212317409069D-01 -4.4650208884874D+00 5.1414433389752D+01 -4.4752939328906D+02 2.4655710046062D+03 +95 9.4000000000000D-01 2.6997012529804D-01 -3.9728425236316D+00 4.7062236569236D+01 -4.2293336635080D+02 2.4515495127002D+03 +96 9.5000000000000D-01 2.3252534278063D-01 -3.5229591754492D+00 4.2955094689180D+01 -3.9853840727894D+02 2.4255271462326D+03 +97 9.6000000000000D-01 1.9937809069028D-01 -3.1129323055241D+00 3.9090414049180D+01 -3.7445941368912D+02 2.3885278154059D+03 +98 9.7000000000000D-01 1.7014187015589D-01 -2.7403548863367D+00 3.5464503301942D+01 -3.5080100741213D+02 2.3415813987826D+03 +99 9.8000000000000D-01 1.4445405100616D-01 -2.4028618632750D+00 3.2072676374554D+01 -3.2765751512932D+02 2.2857157529216D+03 +100 9.9000000000000D-01 1.2197540401881D-01 -2.0981395877785D+00 2.8909355191534D+01 -3.0511302657573D+02 2.2219492023071D+03 +101 1.0000000000000D+00 1.0238954396151D-01 -1.8239342274093D+00 2.5968171448947D+01 -2.8324152524603D+02 2.1512835508939D+03 +102 1.0100000000000D+00 8.5402293596278D-02 -1.5780591658528D+00 2.3242066741108D+01 -2.6210708627600D+02 2.0746976390239D+03 +103 1.0200000000000D+00 7.0740978654581D-02 -1.3584014125967D+00 2.0723390395712D+01 -2.4176413593121D+02 1.9931414699798D+03 +104 1.0300000000000D+00 5.8153663564664D-02 -1.1629270481635D+00 1.8403994429688D+01 -2.2225776688616D+02 1.9075309293438D+03 +105 1.0400000000000D+00 4.7408337408353D-02 -9.8968573650682D-01 1.6275325100019D+01 -2.0362410328246D+02 1.8187431089732D+03 +106 1.0500000000000D+00 3.8292059284026D-02 -8.3681434074823D-01 1.4328510577927D+01 -1.8589070951812D+02 1.7276122386053D+03 +107 1.0600000000000D+00 3.0610071817393D-02 -7.0253968336574D-01 1.2554444343296D+01 -1.6907703667415D+02 1.6349262256293D+03 +108 1.0700000000000D+00 2.4184891166368D-02 -5.8518049528891D-01 1.0943863951588D+01 -1.5319490052202D+02 1.5414237981145D+03 +109 1.0800000000000D+00 1.8855381398369D-02 -4.8314860167025D-01 9.4874248872114D+00 -1.3824898512404D+02 1.4477922405536D+03 +110 1.0900000000000D+00 1.4475820593360D-02 -3.9494939469672D-01 8.1757692797549D+00 -1.2423736618683D+02 1.3546657062227D+03 +111 1.1000000000000D+00 1.0914965600337D-02 -3.1918164558611D-01 6.9995893082334D+00 -1.1115204848023D+02 1.2626240853246D+03 +112 1.1100000000000D+00 8.0551217359548D-03 -2.5453670963515D-01 5.9496851854532D+00 -9.8979511901371D+01 1.1721924050377D+03 +113 1.1200000000000D+00 5.7912232496233D-03 -1.9979717881019D-01 5.0170176595181D+00 -8.7701260986311D+01 1.0838407339162D+03 +114 1.1300000000000D+00 4.0299297735285D-03 -1.5383503675677D-01 4.1927550252182D+00 -7.7294372998407D+01 9.9798455953638D+02 +115 1.1400000000000D+00 2.6887435044930D-03 -1.1560937102248D-01 3.4683146789198D+00 -6.7732040001637D+01 9.1498560568818D+02 +116 1.1500000000000D+00 1.6951512529302D-03 -8.4163696722451D-02 2.8353993006132D+00 -5.8984100708718D+01 8.3515305335324D+02 +117 1.1600000000000D+00 9.8579497505718D-04 -5.8622944783185D-02 2.2860277850798D+00 -5.1017558255044D+01 7.5874512805163D+02 +118 1.1700000000000D+00 5.0567384707653D-04 -3.8190166295747D-02 1.8125610822106D+00 -4.3797080459456D+01 6.8597101497443D+02 +119 1.1800000000000D+00 2.0738055714539D-04 -2.2143003359202D-02 1.4077231323378D+00 -3.7285479416505D+01 6.1699306256622D+02 +120 1.1900000000000D+00 5.0373840212627D-05 -9.8299741531150D-03 1.0646171214843D+00 -3.1444167788123D+01 5.5192923453671D+02 +121 1.2000000000000D+00 2.8888838712371D-07 -6.6661778832255D-04 7.7673730050175D-01 -2.6233589508080D+01 4.9085577078313D+02 +122 1.2100000000000D+00 2.8286817246210D-05 5.8684581470224D-03 5.3797663309678D-01 -2.1613623015361D+01 4.3381001823969D+02 +123 1.2200000000000D+00 1.1044402639296D-04 1.0237586382341D-02 3.4263055407455D-01 -1.7543955435276D+01 3.8079339297387D+02 +124 1.2300000000000D+00 2.2718174495865D-04 1.2848068291630D-02 1.8539713713444D-01 -1.3984426664405D+01 3.3177443658699D+02 +125 1.2400000000000D+00 3.6273576893655D-04 1.4056187778533D-02 6.1373975180120D-02 -1.0895342622135D+01 2.8669193173769D+02 +126 1.2500000000000D+00 5.0466621461194D-04 1.4171177899627D-02 -3.3947915944022D-02 -8.2377571004046D+00 2.4545804196252D+02 +127 1.2600000000000D+00 6.4340654358985D-04 1.3459113317066D-02 -1.0469285392382D-01 -5.9737222696534D+00 2.0796144466678D+02 +128 1.2700000000000D+00 7.7185100335187D-04 1.2146703790648D-02 -1.5461159760142D-01 -4.0665080585007D+00 1.7407042810617D+02 +129 1.2800000000000D+00 8.8497947546079D-04 1.0424965179382D-02 -1.8709449247885D-01 -2.4807907798091D+00 1.4363592378215D+02 +130 1.2900000000000D+00 9.7951831538122D-04 8.4527503315654D-03 -2.0518635144389D-01 -1.1828118893123D+00 1.1649445044806D+02 +131 1.3000000000000D+00 1.0536357076284D-03 6.3601245297352D-03 -2.1160278250161D-01 -1.4050788504679D-01 9.2470948376243D+01 +132 1.3100000000000D+00 1.1066699884313D-03 4.2515703964090D-03 -2.0874766990853D-01 6.7638758003845D-01 7.1381482376886D+01 +133 1.3200000000000D+00 1.1388890936640D-03 2.2090138544711D-03 -1.9873154482025D-01 1.2962678497182D+00 5.3035798520353D+01 +134 1.3300000000000D+00 1.1512793392958D-03 2.9466372245496D-04 -1.8339059623461D-01 1.7456021732670D+00 3.7239721047780D+01 +135 1.3400000000000D+00 1.1453616547756D-03 -1.4463423869030D-03 -1.6430606417467D-01 2.0489077843703D+00 2.3797375526224D+01 +136 1.3500000000000D+00 1.1230332831600D-03 -2.9834860358439D-03 -1.4282381204288D-01 2.2287432661144D+00 1.2513232520465D+01 +137 1.3600000000000D+00 1.0864330445916D-03 -4.2986117870426D-03 -1.2007386751576D-01 2.3057214477327D+00 3.1939642968690D+00 +138 1.3700000000000D+00 1.0378281572808D-03 -5.3838662288012D-03 -9.6989734384719D-02 2.2985399063440D+00 -4.3498902509292D+00 +139 1.3800000000000D+00 9.7952074361701D-04 -6.2398272260202D-03 -7.4327333736972D-02 2.2240271642654D+00 -1.0302451162902D+01 +140 1.3900000000000D+00 9.1377208186330D-04 -6.8738209343361D-03 -5.2683401513870D-02 2.0972026731083D+00 -1.4841215661228D+01 +141 1.4000000000000D+00 8.4274276354407D-04 -7.2984192806321D-03 -3.2513226401541D-02 1.9313486440946D+00 -1.8135964724037D+01 +142 1.4100000000000D+00 7.6844707009229D-04 -7.5301106977805D-03 -1.4147629254726D-02 1.7380919519976D+00 -2.0347852958873D+01 +143 1.4200000000000D+00 6.9271969883028D-04 -7.5881371588621D-03 2.1909387380466D-03 1.5274941478835D+00 -2.1628677970246D+01 +144 1.4300000000000D+00 6.1719343836184D-04 -7.4934868315292D-03 1.6373211832655D-02 1.3081480180720D+00 -2.2120318419460D+01 +145 1.4400000000000D+00 5.4328610550011D-04 -7.2680341867652D-03 2.8348929520032D-02 1.0872788875874D+00 -2.1954334565518D+01 +146 1.4500000000000D+00 4.7219538695762D-04 -6.9338164860432D-03 3.8133684191465D-02 8.7084914008059D-01 -2.1251719750687D+01 +147 1.4600000000000D+00 4.0490036249952D-04 -6.5124367089126D-03 4.5796815618526D-02 6.6366461440135D-01 -2.0122792275028D+01 +148 1.4700000000000D+00 3.4216825297448D-04 -6.0245820112431D-03 5.1450389292950D-02 4.6948124240522D-01 -1.8667216730421D+01 +149 1.4800000000000D+00 2.8456564671865D-04 -5.4896473604834D-03 5.5239217844382D-02 2.9111111005998D-01 -1.6974141704851D+01 +150 1.4900000000000D+00 2.3247281941319D-04 -4.9254533433548D-03 5.7331953230417D-02 1.3052638328418D-01 -1.5122442473531D+01 +151 1.5000000000000D+00 1.8610058519155D-04 -4.3480481562302D-03 5.7913190831034D-02 -1.1039499111907D-02 -1.3181055350416D+01 +152 1.5100000000000D+00 1.4550868952482D-04 -3.7715835376946D-03 5.7176574355500D-02 -1.3299445274800D-01 -1.1209391819922D+01 +153 1.5200000000000D+00 1.1062509187143D-04 -3.2082544983119D-03 5.5318851523160D-02 -2.3529489846461D-01 -9.2578192304784D+00 +154 1.5300000000000D+00 8.1265669218132D-05 -2.6682947671326D-03 5.2534830035606D-02 -3.1835786443394D-01 -7.3681973159833D+00 +155 1.5400000000000D+00 5.7153557444868D-05 -2.1600169942385D-03 4.9013190657893D-02 -3.8297891596382D-01 -5.5744565567441D+00 +156 1.5500000000000D+00 3.7938118994944D-05 -1.6898927327519D-03 4.4933085033921D-02 -4.3025572387304D-01 -3.9032106288641D+00 +157 1.5600000000000D+00 2.3212705288987D-05 -1.2626604662627D-03 4.0461472331950D-02 -4.6151822404565D-01 -2.3743878538421D+00 +158 1.5700000000000D+00 1.2531450085381D-05 -8.8145916004457D-04 3.5751119055732D-02 -4.7826482424327D-01 -1.0018768436564D+00 +159 1.5800000000000D+00 5.4244435877565D-06 -5.4797669115793D-04 3.0939205594063D-02 -4.8210536730265D-01 2.0582784416528D-01 +160 1.5900000000000D+00 1.4115119664971D-06 -2.6261116102058D-04 2.6146471352257D-02 -4.7471030892261D-01 1.2449838481040D+00 +161 1.6000000000000D+00 1.4239539687677D-08 -2.4637017184184D-05 2.1476835089310D-02 -4.5776641444630D-01 2.1159741966068D+00 +162 1.6100000000000D+00 7.6639302636566D-07 1.6762622595394D-04 1.7017428211701D-02 -4.3293851710489D-01 2.8226993583491D+00 +163 1.6200000000000D+00 3.2226188150253D-06 3.1664795364010D-04 1.2838980415948D-02 -4.0183730272095D-01 3.3719957548738D+00 +164 1.6300000000000D+00 6.9655312371680D-06 4.2552558224223D-04 8.9964975550366D-03 -3.6599271802484D-01 3.7730847739999D+00 +165 1.6400000000000D+00 1.1611217342974D-05 4.9783162643245D-04 5.5301815780452D-03 -3.2683274008681D-01 4.0370562235018D+00 +166 1.6500000000000D+00 1.6813266515061D-05 5.3747125811719D-04 2.4665324476485D-03 -2.8566711252098D-01 4.1763903502639D+00 +167 1.6600000000000D+00 2.2265431406388D-05 5.4855113125458D-04 -1.8040343469439D-04 -2.4367567133629D-01 4.2045191644293D+00 +168 1.6700000000000D+00 2.7703044294936D-05 5.3526180368379D-04 -2.4076982375412D-03 -2.0190083442638D-01 4.1354308786815D+00 +169 1.6800000000000D+00 3.2903318420222D-05 5.0177316730064D-04 -4.2221412055463D-03 -1.6124385807246D-01 3.9833157951988D+00 +170 1.6900000000000D+00 3.7684687202548D-05 4.5214467401188D-04 -5.6388282962944D-03 -1.2246438080704D-01 3.7622566129818D+00 +171 1.7000000000000D+00 4.1905296458379D-05 3.9024903716154D-04 -6.6797498458580D-03 -8.6182904030051D-02 3.4859600242895D+00 +172 1.7100000000000D+00 4.5460829863770D-05 3.1971040237544D-04 -7.3724279772170D-03 -5.2885679224201D-02 3.1675312364159D+00 +173 1.7200000000000D+00 4.8281752054408D-05 2.4385546668181D-04 -7.7486018229314D-03 -2.2931726880688D-02 2.8192877383943D+00 +174 1.7300000000000D+00 5.0330161790270D-05 1.6567763155809D-04 -7.8430021010895D-03 3.4385630009178D-03 2.4526122763279D+00 +175 1.7400000000000D+00 5.1596311709104D-05 8.7812823877131D-05 -7.6922096355019D-03 2.6093455101417D-02 2.0778415250846D+00 +176 1.7500000000000D+00 5.2094973514255D-05 1.2526227385865D-05 -7.3336252543453D-03 4.4999032150585D-02 1.7041887014012D+00 +177 1.7600000000000D+00 5.1861694616248D-05 -5.8291152822231D-05 -6.8045473004180D-03 6.0207674645257D-02 1.3396971470552D+00 +178 1.7700000000000D+00 5.0949080353149D-05 -1.2311742849632D-04 -6.1413675428307D-03 7.1846262256573D-02 9.9122175245061D-01 +179 1.7800000000000D+00 4.9423162304761D-05 -1.8078716115243D-04 -5.3788869890201D-03 8.0104306740848D-02 6.6443571387551D-01 +180 1.7900000000000D+00 4.7359912620577D-05 -2.3047255496434D-04 -4.5497456311182D-03 8.5222233950366D-02 3.6385890108901D-01 +181 1.8000000000000D+00 4.4842003407155D-05 -2.7165952517135D-04 -3.6839738741528D-03 8.7480124984064D-02 9.2905238415422D-02 +182 1.8100000000000D+00 4.1955777252847D-05 -3.0411966508176D-04 -2.8086460289702D-03 8.7186880816905D-02 -1.4605404141546D-01 +183 1.8200000000000D+00 3.8788580305183D-05 -3.2787968198777D-04 -1.9476474903019D-03 8.4670272755517D-02 -3.5161490600113D-01 +184 1.8300000000000D+00 3.5426328199868D-05 -3.4318830000076D-04 -1.1215288607560D-03 8.0267558716359D-02 -5.2325394848881D-01 +185 1.8400000000000D+00 3.1951504473786D-05 -3.5048317311849D-04 -3.4745685049463D-04 7.4317293928147D-02 -6.6123651769895D-01 +186 1.8500000000000D+00 2.8441388429113D-05 -3.5035637419784D-04 3.6076274743725D-04 6.7151760454157D-02 -7.6651747553360D-01 +187 1.8600000000000D+00 2.4966723324115D-05 -3.4352197986726D-04 9.9258928932096D-04 5.9090727350211D-02 -8.4064287846550D-01 +188 1.8700000000000D+00 2.1590624204819D-05 -3.3078345536795D-04 1.5405929694061D-03 5.0435918917883D-02 -8.8564814760691D-01 +189 1.8800000000000D+00 1.8367855837795D-05 -3.1300405249151D-04 2.0002537513240D-03 4.1466695944805D-02 -9.0396086418930D-01 +190 1.8900000000000D+00 1.5344368477592D-05 -2.9107855758399D-04 2.3697174588508D-03 3.2436572291406D-02 -8.9830471071570D-01 +191 1.9000000000000D+00 1.2557111036716D-05 -2.6590809168170D-04 2.6495255076222D-03 2.3570717871817D-02 -8.7160948891872D-01 +192 1.9100000000000D+00 1.0034087483650D-05 -2.3837769616933D-04 2.8423227139512D-03 1.5064341941646D-02 -8.2692694169526D-01 +193 1.9200000000000D+00 7.7946129846282D-06 -2.0933652284611D-04 2.9525504970073D-03 7.0818360107270D-03 -7.6735249064398D-01 +194 1.9300000000000D+00 5.8497579214691D-06 -1.7958186551937D-04 2.9861429107665D-03 -2.4327476241914D-04 -6.9595684979246D-01 +195 1.9400000000000D+00 4.2029427373508D-06 -1.4984523101683D-04 2.9502125691422D-03 -6.8077919956268D-03 -6.1572260745793D-01 +196 1.9500000000000D+00 2.8506363003920D-06 -1.2078255136731D-04 2.8527613403132D-03 -1.2537685587815D-02 -5.2949293092452D-01 +197 1.9600000000000D+00 1.7831679717123D-06 -9.2966376098522D-05 2.7023888310761D-03 -1.7386456118969D-02 -4.3992561519642D-01 +198 1.9700000000000D+00 9.8557218535007D-07 -6.6881408215867D-05 2.5080320689464D-03 -2.1333116159426D-02 -3.4945797181173D-01 +199 1.9800000000000D+00 4.3848676323774D-07 -4.2922349539732D-05 2.2787201528828D-03 -2.4379824989277D-02 -2.6027899332020D-01 +200 1.9900000000000D+00 1.1905845928602D-07 -2.1394022297003D-05 2.0233537263754D-03 -2.6549295542433D-02 -1.7430946244831D-01 +201 2.0000000000000D+00 1.8128367507331D-09 -2.5137230040999D-06 1.7505182280641D-03 -2.7882084856620D-02 -9.3190577033645D-02 +202 2.0100000000000D+00 5.9542737106627D-08 1.3584815687906D-05 1.4683122086643D-03 -2.8433694302195D-02 -1.8278146021028D-02 +203 2.0200000000000D+00 2.6408196452774D-07 2.6845901124340D-05 1.1842193630186D-03 -2.8271805783600D-02 4.9355408084129D-02 +204 2.0300000000000D+00 5.8708079040180D-07 3.7285065702125D-05 9.0499586619491D-04 -2.7473402955415D-02 1.0891429007618D-01 +205 2.0400000000000D+00 1.0006668335086D-06 4.4981467835087D-05 6.3659294283040D-04 -2.6122102586441D-02 1.5986725914268D-01 +206 2.0500000000000D+00 1.4780367612927D-06 5.0069551503969D-05 3.8410425587124D-04 -2.4305594561755D-02 2.0193130010994D-01 +207 2.0600000000000D+00 1.9939838418485D-06 5.2730164276967D-05 1.5173483507035D-04 -2.2113199275725D-02 2.3505181636332D-01 +208 2.0700000000000D+00 2.5252914454360D-06 5.3181908331646D-05 -5.7201490414035D-05 -1.9633782540034D-02 2.5938046210956D-01 +209 2.0800000000000D+00 3.0510909942743D-06 5.1671937014330D-05 -2.4026940014479D-04 -1.6953721160805D-02 2.7525008921757D-01 +210 2.0900000000000D+00 3.5530883344709D-06 4.8467602805367D-05 -3.9587804768290D-04 -1.4155284142791D-02 2.8314941284471D-01 +211 2.1000000000000D+00 4.0157269450503D-06 4.3848160000657D-05 -5.2323235503607D-04 -1.1315190086453D-02 2.8369662079967D-01 +212 2.1100000000000D+00 4.4262756575884D-06 3.8096951946289D-05 -6.2227153283502D-04 -8.5034136090471D-03 2.7761275317337D-01 +213 2.1200000000000D+00 4.7748230660034D-06 3.1494755764946D-05 -6.9359803068208D-04 -5.7823529916256D-03 2.6569779432879D-01 +214 2.1300000000000D+00 5.0542283143455D-06 2.4313144322513D-05 -7.3839605545549D-04 -3.2061195442614D-03 2.4879562080746D-01 +215 2.1400000000000D+00 5.2599983219096D-06 1.6809381186516D-05 -7.5834889130851D-04 -8.2018197663578D-04 2.2777441100133D-01 +216 2.1500000000000D+00 5.3901204109591D-06 9.2218073162622D-06 -7.5555071757337D-04 1.3387977612174D-03 2.0352100359538D-01 +217 2.1600000000000D+00 5.4448541846450D-06 1.7660083915195D-06 -7.3241685202852D-04 3.2429225498850D-03 1.7694505444829D-01 +218 2.1700000000000D+00 5.4264935004205D-06 -5.3676921629903D-06 -6.9160048594381D-04 4.8727120980869D-03 1.4896630232541D-01 +219 2.1800000000000D+00 5.3390952461150D-06 -1.2016426919602D-05 -6.3590493497722D-04 6.2173042390024D-03 1.2019951950394D-01 +220 2.1900000000000D+00 5.1882053461992D-06 -1.8045776575939D-05 -5.6820742318648D-04 7.2736156308992D-03 9.1162325467622D-02 +221 2.2000000000000D+00 4.9805735354835D-06 -2.3350097633565D-05 -4.9138698026333D-04 8.0456490024992D-03 6.2360598196954D-02 +222 2.2100000000000D+00 4.7238543041533D-06 -2.7852322238822D-05 -4.0825161234285D-04 8.5396448965528D-03 3.5328371802214D-02 +223 2.2200000000000D+00 4.4263426401139D-06 -3.1502872347905D-05 -3.2148021263103D-04 8.7656687299338D-03 1.1479186215302D-02 +224 2.2300000000000D+00 4.0966937499702D-06 -3.4278217171694D-05 -2.3359827706167D-04 8.7504068834012D-03 -9.6206354394516D-03 +225 2.2400000000000D+00 3.7436728782369D-06 -3.6178921464596D-05 -1.4692571148967D-04 8.5313862727591D-03 -2.9794237238542D-02 +226 2.2500000000000D+00 3.3759380997416D-06 -3.7227269594279D-05 -6.3614671409610D-05 8.1576165154892D-03 -5.0848996953397D-02 +227 2.2600000000000D+00 3.0018154513051D-06 -3.7464794118901D-05 1.4798725970992D-05 7.6038991146086D-03 -7.0247326189352D-02 +228 2.2700000000000D+00 2.6291370376932D-06 -3.6949606418336D-05 8.7055833785483D-05 6.8516188355339D-03 -8.5146664965425D-02 +229 2.2800000000000D+00 2.2650911807452D-06 -3.5753516294360D-05 1.5212376313499D-04 5.9047016284173D-03 -9.3207966668466D-02 +230 2.2900000000000D+00 1.9160897014607D-06 -3.3955720949355D-05 2.0776142224262D-04 4.9139236083196D-03 -9.2334192404455D-02 +231 2.3000000000000D+00 1.5876981981654D-06 -3.1639777494676D-05 2.5215807525935D-04 4.0041786170948D-03 -8.1382075184906D-02 +232 2.3100000000000D+00 1.2845550543062D-06 -2.8906419803726D-05 2.8598131345576D-04 3.2341093479861D-03 -6.6795937217704D-02 +233 2.3200000000000D+00 1.0103357568185D-06 -2.5871016115506D-05 3.1259255794512D-04 2.5604175947976D-03 -6.2544537975423D-02 +234 2.3300000000000D+00 7.6789709712440D-07 -2.2659915417285D-05 3.3511545630131D-04 1.9446923677203D-03 -8.1291496869147D-02 +235 2.3400000000000D+00 5.5884620294124D-07 -1.9301673248552D-05 3.5175128500570D-04 1.1547507834401D-03 -1.1705275367454D-01 +236 2.3500000000000D+00 3.8392744317159D-07 -1.5813392510678D-05 3.5845847959217D-04 -3.5745545063094D-05 -1.5505902187820D-01 +237 2.3600000000000D+00 2.4233090853225D-07 -1.2203663729592D-05 3.5160532857874D-04 -1.8478231937672D-03 -1.7955300812616D-01 +238 2.3700000000000D+00 1.3533421419724D-07 -8.7195766600766D-06 3.2664172057130D-04 -3.8546479675739D-03 -1.7598057566407D-01 +239 2.3800000000000D+00 6.2411168664774D-08 -5.6049223820187D-06 2.8142045681869D-04 -5.5937424537602D-03 -1.3516560899690D-01 +240 2.3900000000000D+00 2.1986578395726D-08 -3.0942486941330D-06 2.1559040334389D-04 -6.5774748834737D-03 -5.2579700970498D-02 +241 2.4000000000000D+00 4.1052884181287D-09 -1.2761256450026D-06 1.4291411774271D-04 -6.6712377436916D-03 4.2597888535021D-02 +242 2.4100000000000D+00 -8.1087994821012D-10 -1.8676088024217D-07 7.6477038091717D-05 -5.8215307329571D-03 1.2239663583839D-01 +243 2.4200000000000D+00 -1.5539878273901D-09 2.3542053278214D-07 2.7808974796422D-05 -4.1720579808038D-03 1.6237787032980D-01 +244 2.4300000000000D+00 -5.7179458006309D-10 2.4208980691406D-07 -2.5464005537626D-06 -2.2678194436603D-03 1.6450730182376D-01 +245 2.4400000000000D+00 3.5029510136901D-10 9.8712086219119D-08 -1.5368162894492D-05 -6.5970539771144D-04 1.3336315589951D-01 +246 2.4500000000000D+00 7.5570559993204D-10 3.6760773464338D-09 -1.4745661702534D-05 2.8310003639588D-04 8.1193973030509D-02 +247 2.4600000000000D+00 3.8146507797389D-10 -3.8720437949938D-08 -7.1268164666671D-06 6.6309612855862D-04 2.5884485741143D-02 +248 2.4700000000000D+00 -9.3903478164700D-11 -4.3015097390638D-08 1.5908247473870D-07 6.3251844445700D-04 -1.3630243035197D-02 +249 2.4800000000000D+00 -1.9100955868987D-10 -3.4921224455592D-08 3.0340121194803D-06 3.8741803563159D-04 -2.8628871536369D-02 +250 2.4900000000000D+00 -9.7465916857727D-11 -1.2324738608819D-08 2.8023034215018D-06 7.3323221801670D-05 -2.6304922360619D-02 +251 2.5000000000000D+00 0.0000000000000D+00 5.5572028587152D-09 1.5293345581702D-06 -1.3512820619731D-04 -1.6085061753499D-02 +252 2.5100000000000D+00 0.0000000000000D+00 9.5632728321812D-09 6.6474107196365D-07 -1.7251495326795D-04 -5.5109013821372D-03 +253 2.5200000000000D+00 0.0000000000000D+00 4.4687179578384D-09 -4.1862659123561D-08 -1.0435775238922D-04 3.2063397295836D-03 +254 2.5300000000000D+00 0.0000000000000D+00 -7.6351355917645D-10 -4.0190957444472D-07 -2.5604719329523D-05 7.2365829265495D-03 +255 2.5400000000000D+00 0.0000000000000D+00 -1.4035851990688D-09 -4.1079847573465D-07 9.4648549644047D-06 6.3508749450752D-03 +256 2.5500000000000D+00 0.0000000000000D+00 -7.1258979725745D-10 -1.5712067225150D-07 1.9896303250783D-05 2.7297436296214D-03 +257 2.5600000000000D+00 0.0000000000000D+00 5.3300807002152D-11 6.7692975099915D-08 1.7082285375191D-05 -4.4449891377377D-04 +258 2.5700000000000D+00 0.0000000000000D+00 1.0826298257887D-10 1.0314394833985D-07 1.1765673793582D-05 -1.4231916676579D-03 +259 2.5800000000000D+00 0.0000000000000D+00 6.1541991140769D-11 5.2938707198013D-08 2.5559134054813D-06 -1.1550097882274D-03 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.6871223730512D-09 -4.2141888053030D-06 -4.8077519439906D-04 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.5038414519956D-08 -5.0526960808040D-06 -1.4528999901056D-04 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.3439386704697D-09 -2.5005338054197D-06 9.5247452389967D-05 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.1408596420371D-10 5.5762606136459D-07 1.9338317794593D-04 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.2857166901008D-09 1.1091114194510D-06 1.8324299998246D-04 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 9.4761309323158D-10 7.3311084075216D-07 8.0946120607212D-05 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -8.8674457638453D-12 -3.5725073101642D-08 -3.4372739408896D-05 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.5301161949592D-11 -1.5446571384645D-07 -5.8602452863714D-05 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.9070300028648D-11 -1.2864027161030D-07 -4.0153841992543D-05 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.8163001093468D-12 -7.0986984552935D-09 6.8160322300909D-07 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3677014561794D-08 1.1087682699250D-05 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.4401508184939D-08 1.0157643935162D-05 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.7369721665595D-09 2.3427327424699D-06 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.0281321558023D-10 -1.3419537300708D-06 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.6219263088477D-10 -1.6625253213445D-06 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.4256988152962D-10 -7.2797734431430D-07 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.5543909989814D-11 9.7414885625526D-08 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.1139921697109D-11 1.8167575795632D-07 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.0873651830964D-11 1.1773204515230D-07 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.8307485074464D-09 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.2717603815086D-08 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.1396141168034D-08 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.7605161685859D-09 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 5.0130806041550D-10 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 6.2957013607647D-10 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.8460756966794D-10 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.6432493656163D-12 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.5770320859451D-11 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.1533168504987D-11 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 0.0000000000000D+00 6.1397372322272D-01 7.5536340628283D+02 7.0809869336453D+04 +2 1.0000000000000D-02 6.1793942854313D-01 4.9024100796311D+02 4.6190353039699D+04 +3 2.0000000000000D-02 6.2983043157088D-01 3.2206705572082D+02 3.0549989582994D+04 +4 3.0000000000000D-02 6.4962840093435D-01 2.1512887714407D+02 2.0390241455289D+04 +5 4.0000000000000D-02 6.7730277841876D-01 1.4803557972578D+02 1.3706289647928D+04 +6 5.0000000000000D-02 7.1281077229300D-01 1.0720283995496D+02 9.2909995550757D+03 +7 6.0000000000000D-02 7.5609734829288D-01 8.3477631656940D+01 6.3699705652349D+03 +8 7.0000000000000D-02 8.0709521931046D-01 7.0628811163569D+01 4.4367459775019D+03 +9 8.0000000000000D-02 8.6572483483941D-01 6.4429476894591D+01 3.1572598762180D+03 +10 9.0000000000000D-02 9.3189437140262D-01 6.2045023370662D+01 2.3101848448303D+03 +11 1.0000000000000D-01 1.0054997253882D+00 6.1610539600158D+01 1.7485711579732D+03 +12 1.1000000000000D-01 1.0864245099140D+00 6.1934420131715D+01 1.3747986860782D+03 +13 1.2000000000000D-01 1.1745400575255D+00 6.2288864725808D+01 1.1240679353312D+03 +14 1.3000000000000D-01 1.2697054307043D+00 6.2261179558810D+01 9.5345223055101D+02 +15 1.4000000000000D-01 1.3717674423235D+00 6.1648408910911D+01 8.3461070278434D+02 +16 1.5000000000000D-01 1.4805606883249D+00 6.0383522484280D+01 7.4892848321703D+02 +17 1.6000000000000D-01 1.5959075950208D+00 5.8484570749549D+01 6.8427092625954D+02 +18 1.7000000000000D-01 1.7176184835202D+00 5.6020038892822D+01 6.3281168155156D+02 +19 1.8000000000000D-01 1.8454916538635D+00 5.3085277406059D+01 5.8957636362848D+02 +20 1.9000000000000D-01 1.9793134915003D+00 4.9786546216972D+01 5.5146533501030D+02 +21 2.0000000000000D-01 2.1188585987766D+00 4.6230471328806D+01 5.1659919932581D+02 +22 2.1000000000000D-01 2.2638899540915D+00 4.2517415743819D+01 4.8388225561539D+02 +23 2.2000000000000D-01 2.4141591013561D+00 3.8737641782193D+01 4.5271296526043D+02 +24 2.3000000000000D-01 2.5694063723185D+00 3.4969410971480D+01 4.2279330488052D+02 +25 2.4000000000000D-01 2.7293611442251D+00 3.1278390193743D+01 3.9400445829722D+02 +26 2.5000000000000D-01 2.8937421351508D+00 2.7717908354016D+01 3.6632687881928D+02 +27 2.6000000000000D-01 3.0622577391675D+00 2.4329739239506D+01 3.3978989673698D+02 +28 2.7000000000000D-01 3.2346064033138D+00 2.1145182634446D+01 3.1444086840359D+02 +29 2.8000000000000D-01 3.4104770480916D+00 1.8186286202022D+01 2.9032712416202D+02 +30 2.9000000000000D-01 3.5895495329432D+00 1.5467101983334D+01 2.6748618253671D+02 +31 3.0000000000000D-01 3.7714951678534D+00 1.2994908506734D+01 2.4594119768300D+02 +32 3.1000000000000D-01 3.9559772718880D+00 1.0771356056683D+01 2.2569962423491D+02 +33 3.2000000000000D-01 4.1426517791074D+00 8.7935113352077D+00 2.0675377248354D+02 +34 3.3000000000000D-01 4.3311678919062D+00 7.0547906273538D+00 1.8908239185729D+02 +35 3.4000000000000D-01 4.5211687814083D+00 5.5457792227502D+00 1.7265273322684D+02 +36 3.5000000000000D-01 4.7122923341136D+00 4.2549404306728D+00 1.5742274928302D+02 +37 3.6000000000000D-01 4.9041719435404D+00 3.1692209381737D+00 1.4334323039146D+02 +38 3.7000000000000D-01 5.0964373451439D+00 2.2745611527823D+00 1.3035976365365D+02 +39 3.8000000000000D-01 5.2887154923280D+00 1.5563200213812D+00 1.1841446095494D+02 +40 3.9000000000000D-01 5.4806314708942D+00 9.9962397198901D-01 1.0744743816734D+02 +41 4.0000000000000D-01 5.6718094488141D+00 5.8964933453114D-01 9.7398049645084D+01 +42 4.1000000000000D-01 5.8618736577588D+00 3.1184703658357D-01 8.8205894627727D+01 +43 4.2000000000000D-01 6.0504494023838D+00 1.5211766377855D-01 7.9811618485591D+01 +44 4.3000000000000D-01 6.2371640929565D+00 9.6944206046004D-02 7.2157534157328D+01 +45 4.4000000000000D-01 6.4216482965330D+00 1.3348903577823D-01 6.5188089146738D+01 +46 4.5000000000000D-01 6.6035368015371D+00 2.4966091733597D-01 5.8850202069009D+01 +47 4.6000000000000D-01 6.7824696902874D+00 4.3415714921012D-01 5.3093490616397D+01 +48 4.7000000000000D-01 6.9580934137542D+00 6.7648530025028D-01 4.7870410365103D+01 +49 4.8000000000000D-01 7.1300618626033D+00 9.6696842207710D-01 4.3136321383727D+01 +50 4.9000000000000D-01 7.2980374284285D+00 1.2967370987399D+00 3.8849497182050D+01 +51 5.0000000000000D-01 7.4616920489563D+00 1.6577112267998D+00 3.4971088355557D+01 +52 5.1000000000000D-01 7.6207082309611D+00 2.0425739971935D+00 3.1465051308076D+01 +53 5.2000000000000D-01 7.7747800446333D+00 2.4447401668856D+00 2.8298050687009D+01 +54 5.3000000000000D-01 7.9236140832200D+00 2.8583203549732D+00 2.5439342662696D+01 +55 5.4000000000000D-01 8.0669303818793D+00 3.2780827663415D+00 2.2860644887405D+01 +56 5.5000000000000D-01 8.2044632898950D+00 3.6994134287289D+00 2.0535997878353D+01 +57 5.6000000000000D-01 8.3359622906394D+00 4.1182757248289D+00 1.8441621673903D+01 +58 5.7000000000000D-01 8.4611927639913D+00 4.5311697146338D+00 1.6555770899993D+01 +59 5.8000000000000D-01 8.5799366862775D+00 4.9350914961464D+00 1.4858590844626D+01 +60 5.9000000000000D-01 8.6919932632222D+00 5.3274926772211D+00 1.3331976737317D+01 +61 6.0000000000000D-01 8.7971794918559D+00 5.7062399685209D+00 1.1959438115510D+01 +62 6.1000000000000D-01 8.8953306478346D+00 6.0695749850856D+00 1.0725969855670D+01 +63 6.2000000000000D-01 8.9863006951670D+00 6.4160745540796D+00 9.6179310857000D+00 +64 6.3000000000000D-01 9.0699626159132D+00 6.7446121162631D+00 8.6229327370237D+00 +65 6.4000000000000D-01 9.1462086580175D+00 7.0543210790623D+00 7.7297339682529D+00 +66 6.5000000000000D-01 9.2149505000447D+00 7.3445611254826D+00 6.9281471608638D+00 +67 6.6000000000000D-01 9.2761193322145D+00 7.6148884135898D+00 6.2089507474428D+00 +68 6.7000000000000D-01 9.3296658537482D+00 7.8650302857858D+00 5.5638088542895D+00 +69 6.8000000000000D-01 9.3755601871637D+00 8.0948645765942D+00 4.9851966640900D+00 +70 6.9000000000000D-01 9.4137917107600D+00 8.3044029963156D+00 4.4663305390143D+00 +71 7.0000000000000D-01 9.4443688111254D+00 8.4937775689099D+00 4.0011022471848D+00 +72 7.1000000000000D-01 9.4673185580633D+00 8.6632288924753D+00 3.5840170098143D+00 +73 7.2000000000000D-01 9.4826863048682D+00 8.8130951368719D+00 3.2101354114666D+00 +74 7.3000000000000D-01 9.4905352173817D+00 8.9438010913904D+00 2.8750193850861D+00 +75 7.4000000000000D-01 9.4909457357135D+00 9.0558470338883D+00 2.5746824809336D+00 +76 7.5000000000000D-01 9.4840149729282D+00 9.1497975422711D+00 2.3055445025795D+00 +77 7.6000000000000D-01 9.4698560553594D+00 9.2262705396492D+00 2.0643904269628D+00 +78 7.7000000000000D-01 9.4485974095253D+00 9.2859268797060D+00 1.8483333827310D+00 +79 7.8000000000000D-01 9.4203820008786D+00 9.3294607053260D+00 1.6547813731366D+00 +80 7.9000000000000D-01 9.3853665298276D+00 9.3575907145330D+00 1.4814073944216D+00 +81 8.0000000000000D-01 9.3437205906100D+00 9.3710523799245D+00 1.3261226033515D+00 +82 8.1000000000000D-01 9.2956257986976D+00 9.3705911053088D+00 1.1870522115446D+00 +83 8.2000000000000D-01 9.2412748924438D+00 9.3569562657250D+00 1.0625138166447D+00 +84 8.3000000000000D-01 9.1808708146752D+00 9.3308960584151D+00 9.5099791366608D-01 +85 8.4000000000000D-01 9.1146257798578D+00 9.2931530859771D+00 8.5115036039635D-01 +86 8.5000000000000D-01 9.0427603323617D+00 9.2444605936814D+00 7.6175659741527D-01 +87 8.6000000000000D-01 8.9655024011841D+00 9.1855392873563D+00 6.8172744609540D-01 +88 8.7000000000000D-01 8.8830863562963D+00 9.1170946643085D+00 6.1008632739889D-01 +89 8.8000000000000D-01 8.7957520715430D+00 9.0398147963427D+00 5.4595776095476D-01 +90 8.9000000000000D-01 8.7037439987581D+00 8.9543685104933D+00 4.8855701833218D-01 +91 9.0000000000000D-01 8.6073102574614D+00 8.8614039192800D+00 4.3718081704690D-01 +92 9.1000000000000D-01 8.5067017441901D+00 8.7615472580149D+00 3.9119895298352D-01 +93 9.2000000000000D-01 8.4021712651764D+00 8.6554019918320D+00 3.5004677883930D-01 +94 9.3000000000000D-01 8.2939726957402D+00 8.5435481596725D+00 3.1321844508704D-01 +95 9.4000000000000D-01 8.1823601694040D+00 8.4265419264430D+00 2.8026082796137D-01 +96 9.5000000000000D-01 8.0675872993784D+00 8.3049153180046D+00 2.5076807620849D-01 +97 9.6000000000000D-01 7.9499064347043D+00 8.1791761165959D+00 2.2437671488651D-01 +98 9.7000000000000D-01 7.8295679529804D+00 8.0498078968192D+00 2.0076125049098D-01 +99 9.8000000000000D-01 7.7068195912571D+00 7.9172701844290D+00 1.7963022698641D-01 +100 9.9000000000000D-01 7.5819058163390D+00 7.7819987220263D+00 1.6072268731690D-01 +101 1.0000000000000D+00 7.4550672354115D+00 7.6444058273286D+00 1.4380499938518D-01 +102 1.0100000000000D+00 7.3265400476027D+00 7.5048808310526D+00 1.2866800950408D-01 +103 1.0200000000000D+00 7.1965555368017D+00 7.3637905826668D+00 1.1512449000828D-01 +104 1.0300000000000D+00 7.0653396057840D+00 7.2214800133474D+00 1.0300685099926D-01 +105 1.0400000000000D+00 6.9331123514444D+00 7.0782727464783D+00 9.2165089262544D-02 +106 1.0500000000000D+00 6.8000876807278D+00 6.9344717468592D+00 8.2464949938322D-02 +107 1.0600000000000D+00 6.6664729666217D+00 6.7903600007127D+00 7.3786279207503D-02 +108 1.0700000000000D+00 6.5324687434136D+00 6.6462012192718D+00 6.6021548278059D-02 +109 1.0800000000000D+00 6.3982684402522D+00 6.5022405594721D+00 5.9074531017458D-02 +110 1.0900000000000D+00 6.2640581519134D+00 6.3587053559665D+00 5.2859119438046D-02 +111 1.1000000000000D+00 6.1300164455704D+00 6.2158058592158D+00 4.7298262636776D-02 +112 1.1100000000000D+00 5.9963142022555D+00 6.0737359751061D+00 4.2323016547731D-02 +113 1.1200000000000D+00 5.8631144916392D+00 5.9326740019993D+00 3.7871692949966D-02 +114 1.1300000000000D+00 5.7305724786902D+00 5.7927833616755D+00 3.3889097483898D-02 +115 1.1400000000000D+00 5.5988353607401D+00 5.6542133210319D+00 3.0325847349039D-02 +116 1.1500000000000D+00 5.4680423334467D+00 5.5170997018852D+00 2.7137760442035D-02 +117 1.1600000000000D+00 5.3383245841347D+00 5.3815655765964D+00 2.4285308496402D-02 +118 1.1700000000000D+00 5.2098053109943D+00 5.2477219476132D+00 2.1733127591295D-02 +119 1.1800000000000D+00 5.0825997666180D+00 5.1156684092788D+00 1.9449579938040D-02 +120 1.1900000000000D+00 4.9568153243717D+00 4.9854937906515D+00 1.7406361681172D-02 +121 1.2000000000000D+00 4.8325515661182D+00 4.8572767782917D+00 1.5578151892602D-02 +122 1.2100000000000D+00 4.7099003898391D+00 4.7310865182198D+00 1.3942298453161D-02 +123 1.2200000000000D+00 4.5889461357177D+00 4.6069831964314D+00 1.2478536895873D-02 +124 1.2300000000000D+00 4.4697657292937D+00 4.4850185976201D+00 1.1168738842316D-02 +125 1.2400000000000D+00 4.3524288403349D+00 4.3652366418860D+00 9.9966869418827D-03 +126 1.2500000000000D+00 4.2369980560806D+00 4.2476738992954D+00 8.9478734123540D-03 +127 1.2600000000000D+00 4.1235290675818D+00 4.1323600824095D+00 8.0093198278638D-03 +128 1.2700000000000D+00 4.0120708678854D+00 4.0193185169356D+00 7.1694159161445D-03 +129 1.2800000000000D+00 3.9026659608267D+00 3.9085665907254D+00 6.4177752708019D-03 +130 1.2900000000000D+00 3.7953505792572D+00 3.8001161815096D+00 5.7451062905348D-03 +131 1.3000000000000D+00 3.6901549115664D+00 3.6939740637796D+00 5.1430967582188D-03 +132 1.3100000000000D+00 3.5871033353533D+00 3.5901422952597D+00 4.6043105205771D-03 +133 1.3200000000000D+00 3.4862146571846D+00 3.4886185835287D+00 4.1220950921402D-03 +134 1.3300000000000D+00 3.3875023573971D+00 3.3893966333420D+00 3.6904990317475D-03 +135 1.3400000000000D+00 3.2909748388978D+00 3.2924664752311D+00 3.3041979682382D-03 +136 1.3500000000000D+00 3.1966356790224D+00 3.1978147760212D+00 2.9584284790826D-03 +137 1.3600000000000D+00 3.1044838834873D+00 3.1054251318829D+00 2.6489289374668D-03 +138 1.3700000000000D+00 3.0145141414878D+00 3.0152783445669D+00 2.3718865675669D-03 +139 1.3800000000000D+00 2.9267170810886D+00 2.9273526814744D+00 2.1238901346936D-03 +140 1.3900000000000D+00 2.8410795240006D+00 2.8416241202084D+00 1.9018875883196D-03 +141 1.4000000000000D+00 2.7575847389366D+00 2.7580665782651D+00 1.7031481844748D-03 +142 1.4100000000000D+00 2.6762126922493D+00 2.6766521284936D+00 1.5252286295910D-03 +143 1.4200000000000D+00 2.5969402977243D+00 2.5973512009825D+00 1.3659427510962D-03 +144 1.4300000000000D+00 2.5197416610564D+00 2.5201327719729D+00 1.2233344147274D-03 +145 1.4400000000000D+00 2.4445883152598D+00 2.4449645404299D+00 1.0956532691741D-03 +146 1.4500000000000D+00 2.3714494646399D+00 2.3718130928667D+00 9.8133305761090D-04 +147 1.4600000000000D+00 2.3002922036248D+00 2.3006440569831D+00 8.7897223319930D-04 +148 1.4700000000000D+00 2.2310819325588D+00 2.2314222447349D+00 7.8731658734709D-04 +149 1.4800000000000D+00 2.1637827585198D+00 2.1641117853185D+00 7.0524375026580D-04 +150 1.4900000000000D+00 2.0983580975808D+00 2.0986762486441D+00 6.3174928965997D-04 +151 1.5000000000000D+00 2.0347710678025D+00 2.0350787597832D+00 5.6593430211131D-04 +152 1.5100000000000D+00 1.9729844937062D+00 1.9732821049253D+00 5.0699430069176D-04 +153 1.5200000000000D+00 1.9129609903682D+00 1.9132488292817D+00 4.5420927344901D-04 +154 1.5300000000000D+00 1.8546629640668D+00 1.8549413273662D+00 4.0693480259448D-04 +155 1.5400000000000D+00 1.7980527236798D+00 1.7983219261713D+00 3.6459409799643D-04 +156 1.5500000000000D+00 1.7430926179364D+00 1.7433529615474D+00 3.2667089921454D-04 +157 1.5600000000000D+00 1.6897450755915D+00 1.6899968483073D+00 2.9270309409987D-04 +158 1.5700000000000D+00 1.6379726617833D+00 1.6382161443077D+00 2.6227703913014D-04 +159 1.5800000000000D+00 1.5877381438167D+00 1.5879736089895D+00 2.3502245389148D-04 +160 1.5900000000000D+00 1.5390045443795D+00 1.5392322566212D+00 2.1060787198347D-04 +161 1.6000000000000D+00 1.4917351890159D+00 1.4919554046557D+00 1.8873655745136D-04 +162 1.6100000000000D+00 1.4458937499552D+00 1.4461067174512D+00 1.6914286031968D-04 +163 1.6200000000000D+00 1.4014442855831D+00 1.4016502456926D+00 1.5158895031212D-04 +164 1.6300000000000D+00 1.3583512758108D+00 1.3585504617738D+00 1.3586189679727D-04 +165 1.6400000000000D+00 1.3165796536874D+00 1.3167722914091D+00 1.2177105588999D-04 +166 1.6500000000000D+00 1.2760948335097D+00 1.2762811417420D+00 1.0914573071143D-04 +167 1.6600000000000D+00 1.2368627356382D+00 1.2370429261632D+00 9.7833080750710D-05 +168 1.6700000000000D+00 1.1988498082862D+00 1.1990240860989D+00 8.7696247135604D-05 +169 1.6800000000000D+00 1.1620230464451D+00 1.1621916099340D+00 7.8612679415948D-05 +170 1.6900000000000D+00 1.1263500082022D+00 1.1265130493290D+00 7.0472633533310D-05 +171 1.7000000000000D+00 1.0917988285822D+00 1.0919565330594D+00 6.3177832227907D-05 +172 1.7100000000000D+00 1.0583382311504D+00 1.0584907786168D+00 5.6640261777040D-05 +173 1.7200000000000D+00 1.0259375374869D+00 1.0260851016810D+00 5.0781099055344D-05 +174 1.7300000000000D+00 9.9456667474623D-01 9.9470942367656D-01 4.5529747817682D-05 +175 1.7400000000000D+00 9.6419618140050D-01 9.6433427751353D-01 4.0822978896444D-05 +176 1.7500000000000D+00 9.3479721134846D-01 9.3493081169349D-01 3.6604158572746D-05 +177 1.7600000000000D+00 9.0634153648976D-01 9.0647079288072D-01 3.2822559151235D-05 +178 1.7700000000000D+00 8.7880154790770D-01 8.7892660708180D-01 2.9432741379271D-05 +179 1.7800000000000D+00 8.5215025577014D-01 8.5227125954319D-01 2.6394001243614D-05 +180 1.7900000000000D+00 8.2636128804705D-01 8.2647837346551D-01 2.3669875927668D-05 +181 1.8000000000000D+00 8.0140888817394D-01 8.0152218766352D-01 2.1227699560745D-05 +182 1.8100000000000D+00 7.7726791170958D-01 7.7737755322040D-01 1.9038208222724D-05 +183 1.8200000000000D+00 7.5391382214378D-01 7.5401992929208D-01 1.7075182891577D-05 +184 1.8300000000000D+00 7.3132268585084D-01 7.3142537805720D-01 1.5315133814605D-05 +185 1.8400000000000D+00 7.0947116637509D-01 7.0957055899915D-01 1.3737013317758D-05 +186 1.8500000000000D+00 6.8833651799306D-01 6.8843272246475D-01 1.2321963617065D-05 +187 1.8600000000000D+00 6.6789657875953D-01 6.6798970270686D-01 1.1053086139882D-05 +188 1.8700000000000D+00 6.4812976296504D-01 6.4821991033838D-01 9.9152391393781D-06 +189 1.8800000000000D+00 6.2901505317944D-01 6.2910232437245D-01 8.8948533462536D-06 +190 1.8900000000000D+00 6.1053199184952D-01 6.1061648381665D-01 7.9797688908291D-06 +191 1.9000000000000D+00 5.9266067255597D-01 5.9274247892661D-01 7.1590882964850D-06 +192 1.9100000000000D+00 5.7538173095640D-01 5.7546094214578D-01 6.4230448325175D-06 +193 1.9200000000000D+00 5.5867633544492D-01 5.5875303876171D-01 5.7628854527139D-06 +194 1.9300000000000D+00 5.4252617761595D-01 5.4260045736669D-01 5.1707643768177D-06 +195 1.9400000000000D+00 5.2691346249266D-01 5.2698540008303D-01 4.6396498913296D-06 +196 1.9500000000000D+00 5.1182089865311D-01 5.1189057268618D-01 4.1632385754528D-06 +197 1.9600000000000D+00 4.9723168818539D-01 4.9729917455675D-01 3.7358804790882D-06 +198 1.9700000000000D+00 4.8312951658605D-01 4.8319488857607D-01 3.3525107016073D-06 +199 1.9800000000000D+00 4.6949854257461D-01 4.6956187093779D-01 3.0085887719049D-06 +200 1.9900000000000D+00 4.5632338786804D-01 4.5638474091951D-01 2.7000443835870D-06 +201 2.0000000000000D+00 4.4358912695728D-01 4.4364857065655D-01 2.4232281102576D-06 +202 2.0100000000000D+00 4.3128127685398D-01 4.3133887488599D-01 2.1748683921560D-06 +203 2.0200000000000D+00 4.1938578690312D-01 4.1944160075671D-01 1.9520316866307D-06 +204 2.0300000000000D+00 4.0788902860004D-01 4.0794311764383D-01 1.7520878757393D-06 +205 2.0400000000000D+00 3.9677778548943D-01 3.9683020704516D-01 1.5726786084105D-06 +206 2.0500000000000D+00 3.8603924313081D-01 3.8609005254436D-01 1.4116890778723D-06 +207 2.0600000000000D+00 3.7566097913835D-01 3.7571022984833D-01 1.2672230577003D-06 +208 2.0700000000000D+00 3.6563095334403D-01 3.6567869694807D-01 1.1375798884849D-06 +209 2.0800000000000D+00 3.5593749803851D-01 3.5598378435740D-01 1.0212345956050D-06 +210 2.0900000000000D+00 3.4656930835743D-01 3.4661418549703D-01 9.1681946103384D-07 +211 2.1000000000000D+00 3.3751543278051D-01 3.3755894719155D-01 8.2310780752710D-07 +212 2.1100000000000D+00 3.2876526376242D-01 3.2880746029835D-01 7.3899953313570D-07 +213 2.1200000000000D+00 3.2030852852187D-01 3.2034945049464D-01 6.6350779355158D-07 +214 2.1300000000000D+00 3.1213527995309D-01 3.1217496918708D-01 5.9574754511228D-07 +215 2.1400000000000D+00 3.0423588771186D-01 3.0427438459591D-01 5.3492485174911D-07 +216 2.1500000000000D+00 2.9660102944594D-01 2.9663837298363D-01 4.8032750757171D-07 +217 2.1600000000000D+00 2.8922168218191D-01 2.8925791004005D-01 4.3131669331534D-07 +218 2.1700000000000D+00 2.8208911388925D-01 2.8212426244474D-01 3.8731924097185D-07 +219 2.1800000000000D+00 2.7519487519059D-01 2.7522897957557D-01 3.4782100901992D-07 +220 2.1900000000000D+00 2.6853079125284D-01 2.6856388539836D-01 3.1236071432733D-07 +221 2.2000000000000D+00 2.6208895384244D-01 2.6212107052052D-01 2.8052445557173D-07 +222 2.2100000000000D+00 2.5586171354073D-01 2.5589288440497D-01 2.5194093691697D-07 +223 2.2200000000000D+00 2.4984167214333D-01 2.4987192776810D-01 2.2627695480962D-07 +224 2.2300000000000D+00 2.4402167521524D-01 2.4405104513348D-01 2.0323354601712D-07 +225 2.2400000000000D+00 2.3839480481958D-01 2.3842331755928D-01 1.8254246100423D-07 +226 2.2500000000000D+00 2.3295437241794D-01 2.3298205553731D-01 1.6396294058315D-07 +227 2.2600000000000D+00 2.2769391192754D-01 2.2772079204893D-01 1.4727897423955D-07 +228 2.2700000000000D+00 2.2260717295414D-01 2.2263327579677D-01 1.3229669046666D-07 +229 2.2800000000000D+00 2.1768811418435D-01 2.1771346459586D-01 1.1884208163519D-07 +230 2.2900000000000D+00 2.1293089693736D-01 2.1295551892428D-01 1.0675901270054D-07 +231 2.3000000000000D+00 2.0832987888413D-01 2.0835379564118D-01 9.5907322333326D-08 +232 2.3100000000000D+00 2.0387960791932D-01 2.0390284185775D-01 8.6161214236861D-08 +233 2.3200000000000D+00 1.9957481619108D-01 1.9959738896596D-01 7.7407789285746D-08 +234 2.3300000000000D+00 1.9541041428689D-01 1.9543234682342D-01 6.9545686048495D-08 +235 2.3400000000000D+00 1.9138148556824D-01 1.9140279808711D-01 6.2483933969036D-08 +236 2.3500000000000D+00 1.8748328065644D-01 1.8750399269832D-01 5.6140870773918D-08 +237 2.3600000000000D+00 1.8371121206521D-01 1.8373134251433D-01 5.0443171523448D-08 +238 2.3700000000000D+00 1.8006084897727D-01 1.8008041608415D-01 4.5325029860066D-08 +239 2.3800000000000D+00 1.7652791216308D-01 1.7654693356649D-01 4.0727358478456D-08 +240 2.3900000000000D+00 1.7310826903899D-01 1.7312676178709D-01 3.6597100204114D-08 +241 2.4000000000000D+00 1.6979792886350D-01 1.6981590943419D-01 3.2886635125304D-08 +242 2.4100000000000D+00 1.6659303806603D-01 1.6661052238667D-01 2.9553197485980D-08 +243 2.4200000000000D+00 1.6348987570953D-01 1.6350687917585D-01 2.6558385630020D-08 +244 2.4300000000000D+00 1.6048484908333D-01 1.6050138657773D-01 2.3867728188259D-08 +245 2.4400000000000D+00 1.5757448942115D-01 1.5759057533035D-01 2.1450263884339D-08 +246 2.4500000000000D+00 1.5475544774656D-01 1.5477109597856D-01 1.9278190157192D-08 +247 2.4600000000000D+00 1.5202449084120D-01 1.5203971484172D-01 1.7326546402957D-08 +248 2.4700000000000D+00 1.4937849733202D-01 1.4939331010030D-01 1.5572911094996D-08 +249 2.4800000000000D+00 1.4681445389908D-01 1.4682886800316D-01 1.3997149418612D-08 +250 2.4900000000000D+00 1.4432945159949D-01 1.4434347919090D-01 1.2581182407981D-08 +251 2.5000000000000D+00 1.4192068230492D-01 1.4193433513294D-01 1.1308768374479D-08 +252 2.5100000000000D+00 1.3958543525243D-01 1.3959872467775D-01 1.0165321285850D-08 +253 2.5200000000000D+00 1.3732109370553D-01 1.3733403071354D-01 9.1377430103579D-09 +254 2.5300000000000D+00 1.3512513172401D-01 1.3513772693749D-01 8.2142652748288D-09 +255 2.5400000000000D+00 1.3299511103903D-01 1.3300737473058D-01 7.3843186369361D-09 +256 2.5500000000000D+00 1.3092867803333D-01 1.3094062013721D-01 6.6384110940459D-09 +257 2.5600000000000D+00 1.2892356082514D-01 1.2893519094879D-01 5.9680134990680D-09 +258 2.5700000000000D+00 1.2697756644943D-01 1.2698889388457D-01 5.3654647510986D-09 +259 2.5800000000000D+00 1.2508857813821D-01 1.2509961187158D-01 4.8238844321280D-09 +260 2.5900000000000D+00 1.2325455269968D-01 1.2326530142339D-01 4.3370894533060D-09 +261 2.6000000000000D+00 1.2147351798665D-01 1.2148399010818D-01 3.8995252040997D-09 +262 2.6100000000000D+00 1.1974357045665D-01 1.1975377410854D-01 3.5062031084708D-09 +263 2.6200000000000D+00 1.1806287282533D-01 1.1807281587453D-01 3.1526397580198D-09 +264 2.6300000000000D+00 1.1642965180167D-01 1.1643934185854D-01 2.8348066958450D-09 +265 2.6400000000000D+00 1.1484219590585D-01 1.1485164033292D-01 2.5490861564382D-09 +266 2.6500000000000D+00 1.1329885337365D-01 1.1330805929404D-01 2.2922264397378D-09 +267 2.6600000000000D+00 1.1179803013509D-01 1.1180700444067D-01 2.0613051043420D-09 +268 2.6700000000000D+00 1.1033818786764D-01 1.1034693722689D-01 1.8536979021738D-09 +269 2.6800000000000D+00 1.0891784212540D-01 1.0892637299106D-01 1.6670458972983D-09 +270 2.6900000000000D+00 1.0753556053542D-01 1.0754387915179D-01 1.4992285271715D-09 +271 2.7000000000000D+00 1.0618996106342D-01 1.0619807347354D-01 1.3483416666979D-09 +272 2.7100000000000D+00 1.0487971034002D-01 1.0488762239249D-01 1.2126736002677D-09 +273 2.7200000000000D+00 1.0360352204873D-01 1.0361123940438D-01 1.0906854789623D-09 +274 2.7300000000000D+00 1.0236015537807D-01 1.0236768351633D-01 9.8099508365150D-10 +275 2.7400000000000D+00 1.0114841352099D-01 1.0115575774615D-01 8.8236013779363D-10 +276 2.7500000000000D+00 9.9967142228111D-02 9.9974307675251D-02 7.9366370013062D-10 +277 2.7600000000000D+00 9.8815228418158D-02 9.8822220058957D-02 7.1390209651262D-10 +278 2.7700000000000D+00 9.7691598831843D-02 9.7698421480155D-02 6.4217354783731D-10 +279 2.7800000000000D+00 9.6595218724564D-02 9.6601877041810D-02 5.7766718021213D-10 +280 2.7900000000000D+00 9.5525090609327D-02 9.5531589109698D-02 5.1965397047344D-10 +281 2.8000000000000D+00 9.4480253048342D-02 9.4486596103826D-02 4.6747915760067D-10 +282 2.8100000000000D+00 9.3459779462753D-02 9.3465971307985D-02 4.2055390593370D-10 +283 2.8200000000000D+00 9.2462776990399D-02 9.2468821727342D-02 3.7834864382728D-10 +284 2.8300000000000D+00 9.1488385391446D-02 9.1494286993911D-02 3.4038773396909D-10 +285 2.8400000000000D+00 9.0535775965014D-02 9.0541538283019D-02 3.0624348031975D-10 +286 2.8500000000000D+00 8.9604150507236D-02 8.9609777271215D-02 2.7553121857534D-10 +287 2.8600000000000D+00 8.8692740306775D-02 8.8698235131640D-02 2.4790521422268D-10 +288 2.8700000000000D+00 8.7800805165350D-02 8.7806171554402D-02 2.2305477571700D-10 +289 2.8800000000000D+00 8.6927632440076D-02 8.6932873788790D-02 2.0070044259818D-10 +290 2.8900000000000D+00 8.6072536119467D-02 8.6077655719136D-02 1.8059082269710D-10 +291 2.9000000000000D+00 8.5234855934922D-02 8.5239856976176D-02 1.6250016241887D-10 +292 2.9100000000000D+00 8.4413956479880D-02 8.4418842056074D-02 1.4622534947573D-10 +293 2.9200000000000D+00 8.3609226364664D-02 8.3613999475157D-02 1.3158366387244D-10 +294 2.9300000000000D+00 8.2820077398036D-02 8.2824740951347D-02 1.1841089882547D-10 +295 2.9400000000000D+00 8.2045943787763D-02 8.2050500604614D-02 1.0655943047653D-10 +296 2.9500000000000D+00 8.1286281363913D-02 8.1290734180172D-02 9.5896444985772D-11 +297 2.9600000000000D+00 8.0540566827063D-02 8.0544918296575D-02 8.6302446285236D-11 +298 2.9700000000000D+00 7.9808297021220D-02 7.9812549718544D-02 7.7670116533459D-11 +299 2.9800000000000D+00 7.9088988222608D-02 7.9093144645653D-02 6.9902873931599D-11 +300 2.9900000000000D+00 7.8382175453379D-02 7.8386238025953D-02 6.2913811895128D-11 +301 3.0000000000000D+00 7.7687411816260D-02 7.7691382890520D-02 5.6624814400904D-11 +302 3.0100000000000D+00 7.7004267848725D-02 7.7008149707551D-02 5.0965649704568D-11 +303 3.0200000000000D+00 7.6332330896877D-02 7.6336125756157D-02 4.5873118222875D-11 +304 3.0300000000000D+00 7.5671204509385D-02 7.5674914520221D-02 4.1290327394636D-11 +305 3.0400000000000D+00 7.5020507850771D-02 7.5024135101606D-02 3.7166194950475D-11 +306 3.0500000000000D+00 7.4379875132760D-02 7.4383421651433D-02 3.3454734000225D-11 +307 3.0600000000000D+00 7.3748955064286D-02 7.3752422820015D-02 3.0114559348432D-11 +308 3.0700000000000D+00 7.3127410319283D-02 7.3130801224579D-02 2.7108446117550D-11 +309 3.0800000000000D+00 7.2514917021918D-02 7.2518232934431D-02 2.4402942318304D-11 +310 3.0900000000000D+00 7.1911164248769D-02 7.1914406973069D-02 2.1967932869924D-11 +311 3.1000000000000D+00 7.1315853547560D-02 7.1319024836860D-02 1.9776305229828D-11 +312 3.1100000000000D+00 7.0728698472359D-02 7.0731800030172D-02 1.7803695739897D-11 +313 3.1200000000000D+00 7.0149424134119D-02 7.0152457615866D-02 1.6028186122006D-11 +314 3.1300000000000D+00 6.9577766766637D-02 6.9580733781192D-02 1.4430047008962D-11 +315 3.1400000000000D+00 6.9013473307237D-02 6.9016375418423D-02 1.2991509028981D-11 +316 3.1500000000000D+00 6.8456300993087D-02 6.8459139721118D-02 1.1696620201301D-11 +317 3.1600000000000D+00 6.7906016969719D-02 6.7908793792593D-02 1.0531012702626D-11 +318 3.1700000000000D+00 6.7362397914245D-02 6.7365114269092D-02 9.4817530911549D-12 +319 3.1800000000000D+00 6.6825229671755D-02 6.6827886956133D-02 8.5371994841616D-12 +320 3.1900000000000D+00 6.6294306905392D-02 6.6296906478546D-02 7.6868946535081D-12 +321 3.2000000000000D+00 6.5769432756823D-02 6.5771975940892D-02 6.9214191358584D-12 +322 3.2100000000000D+00 6.5250418520005D-02 6.5252906601198D-02 6.2322911043193D-12 +323 3.2200000000000D+00 6.4737083327210D-02 6.4739517556932D-02 5.6118806404873D-12 +324 3.2300000000000D+00 6.4229253846045D-02 6.4231635441992D-02 5.0533294155782D-12 +325 3.2400000000000D+00 6.3726763986040D-02 6.3729094133253D-02 4.5504598166213D-12 +326 3.2500000000000D+00 6.3229454616769D-02 6.3231734468655D-02 4.0977073947061D-12 +327 3.2600000000000D+00 6.2737173297578D-02 6.2739403976893D-02 3.6900695722131D-12 +328 3.2700000000000D+00 6.2249774015506D-02 6.2251956615305D-02 3.3230466631625D-12 +329 3.2800000000000D+00 6.1767116932427D-02 6.1769252516989D-02 2.9925856771188D-12 +330 3.2900000000000D+00 6.1289068141919D-02 6.1291157747630D-02 2.6950348543313D-12 +331 3.3000000000000D+00 6.0815499437099D-02 6.0817544073313D-02 2.4271128108741D-12 +332 3.3100000000000D+00 6.0346288084187D-02 6.0348288734055D-02 2.1858663543808D-12 +333 3.3200000000000D+00 5.9881316605027D-02 5.9883274226300D-02 1.9686354656960D-12 +334 3.3300000000000D+00 5.9420472567678D-02 5.9422388093479D-02 1.7730228596753D-12 +335 3.3400000000000D+00 5.8963648387231D-02 5.8965522726807D-02 1.5968751548437D-12 +336 3.3500000000000D+00 5.8510741130477D-02 5.8512575169922D-02 1.4382535590768D-12 +337 3.3600000000000D+00 5.8061652329077D-02 5.8063446932032D-02 1.2954116772269D-12 +338 3.3700000000000D+00 5.7616287799432D-02 5.7618043807760D-02 1.1667752939445D-12 +339 3.3800000000000D+00 5.7174557471883D-02 5.7176275706327D-02 1.0509305768882D-12 +340 3.3900000000000D+00 5.6736375222580D-02 5.6738056483390D-02 9.4660435795101D-13 +341 3.4000000000000D+00 5.6301658713030D-02 5.6303303780580D-02 8.5264969011459D-13 +342 3.4100000000000D+00 5.5870329235381D-02 5.5871938870755D-02 7.6803256640468D-13 +343 3.4200000000000D+00 5.5442311565921D-02 5.5443886511490D-02 6.9182423001630D-13 +344 3.4300000000000D+00 5.5017533820782D-02 5.5019074800750D-02 6.2318842187022D-13 +345 3.4400000000000D+00 5.4595927318092D-02 5.4597435039040D-02 5.6137164407519D-13 +346 3.4500000000000D+00 5.4177426445297D-02 5.4178901596690D-02 5.0569456234126D-13 +347 3.4600000000000D+00 5.3761968533404D-02 5.3763411788098D-02 4.5554672783490D-13 +348 3.4700000000000D+00 5.3349493733583D-02 5.3350905748306D-02 4.1037874754852D-13 +349 3.4800000000000D+00 5.2939944898641D-02 5.2941326314462D-02 3.6969545233182D-13 +350 3.4900000000000D+00 5.2533267469436D-02 5.2534618912217D-02 3.3305043790274D-13 +351 3.5000000000000D+00 5.2129409366794D-02 5.2130731447628D-02 3.0004223159605D-13 +352 3.5100000000000D+00 5.1728320886445D-02 5.1729614202080D-02 2.7030983823238D-13 +353 3.5200000000000D+00 5.1329954596975D-02 5.1331219730223D-02 2.4352775606485D-13 +354 3.5300000000000D+00 5.0934265242791D-02 5.0935502762925D-02 2.1940259783600D-13 +355 3.5400000000000D+00 5.0541209651050D-02 5.0542420114190D-02 1.9767016220915D-13 +356 3.5500000000000D+00 5.0150746642695D-02 5.0151930592175D-02 1.7809320863270D-13 +357 3.5600000000000D+00 4.9762836944439D-02 4.9763994911171D-02 1.6045770588919D-13 +358 3.5700000000000D+00 4.9377443106073D-02 4.9378575608892D-02 1.4457080943096D-13 +359 3.5800000000000D+00 4.8994529420154D-02 4.8995636966156D-02 1.3025854316028D-13 +360 3.5900000000000D+00 4.8614061847125D-02 4.8615144931992D-02 1.1736497095021D-13 +361 3.6000000000000D+00 4.8236007939292D-02 4.8237067047607D-02 1.0574931909451D-13 +362 3.6100000000000D+00 4.7860336770396D-02 4.7861372375952D-02 9.5284765388816D-14 +363 3.6200000000000D+00 4.7487018866810D-02 4.7488031432902D-02 8.5856833802435D-14 +364 3.6300000000000D+00 4.7116026143656D-02 4.7117016123370D-02 7.7362853545797D-14 +365 3.6400000000000D+00 4.6747331840323D-02 4.6748299676809D-02 6.9710260903648D-14 +366 3.6500000000000D+00 4.6380910459920D-02 4.6381856586665D-02 6.2815613833944D-14 +367 3.6600000000000D+00 4.6016737710860D-02 4.6017662551948D-02 5.6603638968140D-14 +368 3.6700000000000D+00 4.5654790451628D-02 4.5655694421987D-02 5.1006629050562D-14 +369 3.6800000000000D+00 4.5295046637115D-02 4.5295930142767D-02 4.5963733628948D-14 +370 3.6900000000000D+00 4.4937485266137D-02 4.4938348704430D-02 4.1420038484943D-14 +371 3.7000000000000D+00 4.4582086332090D-02 4.4582930091929D-02 3.7326049309133D-14 +372 3.7100000000000D+00 4.4228830775006D-02 4.4229655237073D-02 3.3637082266578D-14 +373 3.7200000000000D+00 4.3877700437376D-02 4.3878505974347D-02 3.0313129802313D-14 +374 3.7300000000000D+00 4.3528678018532D-02 4.3529464995285D-02 2.7318043112830D-14 +375 3.7400000000000D+00 4.3181747032971D-02 4.3182515806785D-02 2.4619247440181D-14 +376 3.7500000000000D+00 4.2836891769527D-02 4.2837642690280D-02 2.2187329643690D-14 +377 3.7600000000000D+00 4.2494097253541D-02 4.2494830663900D-02 1.9995886312686D-14 +378 3.7700000000000D+00 4.2153349209035D-02 4.2154065444638D-02 1.8021146301026D-14 +379 3.7800000000000D+00 4.1814634022633D-02 4.1815333412266D-02 1.6241660138601D-14 +380 3.7900000000000D+00 4.1477938709341D-02 4.1478621575113D-02 1.4638086679416D-14 +381 3.8000000000000D+00 4.1143250879515D-02 4.1143917537026D-02 1.3192968412768D-14 +382 3.8100000000000D+00 4.0810558708401D-02 4.0811209466901D-02 1.1890677585390D-14 +383 3.8200000000000D+00 4.0479850904562D-02 4.0480486067111D-02 1.0717087071299D-14 +384 3.8300000000000D+00 4.0151116681248D-02 4.0151736544867D-02 9.6594642424241D-15 +385 3.8400000000000D+00 3.9824345728300D-02 3.9824950584120D-02 8.7063077694027D-15 +386 3.8500000000000D+00 3.9499528186269D-02 3.9500118319675D-02 7.8472928412156D-15 +387 3.8600000000000D+00 3.9176654620531D-02 3.9177230311299D-02 7.0731283814066D-15 +388 3.8700000000000D+00 3.8855715996480D-02 3.8856277518914D-02 6.3754261644318D-15 +389 3.8800000000000D+00 3.8536703656257D-02 3.8537251279321D-02 5.7466246141486D-15 +390 3.8900000000000D+00 3.8219609295942D-02 3.8220143283383D-02 5.1798828741056D-15 +391 3.9000000000000D+00 3.7904424945388D-02 3.7904945555865D-02 4.6690936764545D-15 +392 3.9100000000000D+00 3.7591142946331D-02 3.7591650433530D-02 4.2087296254451D-15 +393 3.9200000000000D+00 3.7279755933085D-02 3.7280250545840D-02 3.7938081789943D-15 +394 3.9300000000000D+00 3.6970256813587D-02 3.6970738795987D-02 3.4198309714269D-15 +395 3.9400000000000D+00 3.6662638751619D-02 3.6663108343123D-02 3.0827462593646D-15 +396 3.9500000000000D+00 3.6356895149959D-02 3.6357352585499D-02 2.7789223877603D-15 +397 3.9600000000000D+00 3.6053019633237D-02 3.6053465143323D-02 2.5050753472695D-15 +398 3.9700000000000D+00 3.5751006032447D-02 3.5751439843268D-02 2.2582444907397D-15 +399 3.9800000000000D+00 3.5450848369710D-02 3.5451270703229D-02 2.0357527530401D-15 +400 3.9900000000000D+00 3.5152540844573D-02 3.5152951918623D-02 1.8352000403028D-15 + +# +#ONCVPSP (Optimized Norm-Conservinng Vanderbilt PSeudopotential) +#scalar-relativistic version 3.2.3 08/16/2016 +# +#While it is not required under the terms of the GNU GPL, it is +#suggested that you cite D. R. Hamann, Phys. Rev. B 88, 085117 (2013) +#in any publication utilizing these pseudopotentials. +# +# ATOM AND REFERENCE CONFIGURATION +# atsym z nc nv iexc psfile +Ca 20.00 3 3 4 psp8 +# +# n l f +1 0 2.00 +2 0 2.00 +2 1 6.00 +3 0 2.00 +3 1 6.00 +4 0 2.00 +# +# PSEUDOPOTENTIAL AND OPTIMIZATION +# lmax +2 +# +# l, rc, ep, ncon, nbas, qcut +0 1.45000 -1.73059 4 8 8.20000 +1 1.45000 -1.02928 4 8 8.40000 +2 1.85000 0.00000 4 8 8.00000 +# +# LOCAL POTENTIAL +# lloc, lpopt, rc(5), dvloc0 +4 5 1.30000 0.00000 +# +# VANDERBILT-KLEINMAN-BYLANDER PROJECTORs +# l, nproj, debl +0 2 1.59218 +1 2 2.00000 +2 2 2.00000 +# +# MODEL CORE CHARGE +# icmod, fcfact, rcfact +3 6.00000 1.28000 +# +# LOG DERIVATIVE ANALYSIS +# epsh1, epsh2, depsh +-12.00 12.00 0.02 +# +# OUTPUT GRID +# rlmax, drl +4.00 0.01 +# +# TEST CONFIGURATIONS +# ncnf +0 +# nvcnf +# n l f + diff --git a/abipy/data/pseudos/O.psp8 b/abipy/data/pseudos/O.psp8 new file mode 100644 index 000000000..463194c36 --- /dev/null +++ b/abipy/data/pseudos/O.psp8 @@ -0,0 +1,3669 @@ +O ONCVPSP r_core= 1.36 1.46 1.26 +8.0000 6.0000 151103 zatom,zion,pspd +8 11 2 4 600 0 pspcod,pspxc,lmax,lloc,mmax,r2well +5.99000000 4.00000000 0.00000000 rchrg fchrg qchrg +2 2 1 0 0 nproj +1 extension_switch +0 5.2572115247182D+00 7.0424088935255D-01 +1 0.0000000000000D+00 -5.5465312343017D-09 1.6075256847881D-08 +2 1.0000000000000D-02 9.4968528244248D-02 -4.7304235922137D-02 +3 2.0000000000000D-02 1.8945043067282D-01 -9.3699914387904D-02 +4 3.0000000000000D-02 2.8296476540873D-01 -1.3829354695588D-01 +5 4.0000000000000D-02 3.7504186986599D-01 -1.8022153027351D-01 +6 5.0000000000000D-02 4.6522878037388D-01 -2.1866446045614D-01 +7 6.0000000000000D-02 5.5309439179705D-01 -2.5286070532429D-01 +8 7.0000000000000D-02 6.3823427711597D-01 -2.8211900634252D-01 +9 8.0000000000000D-02 7.2027509247863D-01 -3.0582989817874D-01 +10 9.0000000000000D-02 7.9887849999668D-01 -3.2347575340021D-01 +11 1.0000000000000D-01 8.7374454842828D-01 -3.3463928262379D-01 +12 1.1000000000000D-01 9.4461446073677D-01 -3.3901034607147D-01 +13 1.2000000000000D-01 1.0112727871968D+00 -3.3639096052984D-01 +14 1.3000000000000D-01 1.0735488930794D+00 -3.2669841571697D-01 +15 1.4000000000000D-01 1.1313177608145D+00 -3.0996644553047D-01 +16 1.5000000000000D-01 1.1845000977337D+00 -2.8634443207491D-01 +17 1.6000000000000D-01 1.2330617518400D+00 -2.5609465320984D-01 +18 1.7000000000000D-01 1.2770124493720D+00 -2.1958761708771D-01 +19 1.8000000000000D-01 1.3164038790180D+00 -1.7729555922254D-01 +20 1.9000000000000D-01 1.3513271583280D+00 -1.2978420851849D-01 +21 2.0000000000000D-01 1.3819097279836D+00 -7.7702957883754D-02 +22 2.1000000000000D-01 1.4083117289549D+00 -2.1773602073379D-02 +23 2.2000000000000D-01 1.4307219260391D+00 3.7222170201713D-02 +24 2.3000000000000D-01 1.4493532487094D+00 9.8456321503464D-02 +25 2.4000000000000D-01 1.4644380264635D+00 1.6106882186931D-01 +26 2.5000000000000D-01 1.4762230008644D+00 2.2418257535633D-01 +27 2.6000000000000D-01 1.4849642001064D+00 2.8691866596775D-01 +28 2.7000000000000D-01 1.4909217641691D+00 3.4841166580281D-01 +29 2.8000000000000D-01 1.4943548093988D+00 4.0782474630891D-01 +30 2.9000000000000D-01 1.4955164206495D+00 4.6436433584383D-01 +31 3.0000000000000D-01 1.4946488569606D+00 5.1729407334541D-01 +32 3.1000000000000D-01 1.4919790531437D+00 5.6594781866889D-01 +33 3.2000000000000D-01 1.4877144946784D+00 6.0974149492418D-01 +34 3.3000000000000D-01 1.4820395370418D+00 6.4818355670118D-01 +35 3.4000000000000D-01 1.4751122331155D+00 6.8088390011954D-01 +36 3.5000000000000D-01 1.4670617237577D+00 7.0756105583262D-01 +37 3.6000000000000D-01 1.4579862371198D+00 7.2804753405532D-01 +38 3.7000000000000D-01 1.4479517319934D+00 7.4229322091924D-01 +39 3.8000000000000D-01 1.4369912095500D+00 7.5036675750753D-01 +40 3.9000000000000D-01 1.4251047064691D+00 7.5245486625920D-01 +41 4.0000000000000D-01 1.4122599708195D+00 7.4885962352399D-01 +42 4.1000000000000D-01 1.3983938103580D+00 7.3999371133324D-01 +43 4.2000000000000D-01 1.3834140913340D+00 7.2637371536797D-01 +44 4.3000000000000D-01 1.3672023546212D+00 7.0861156909722D-01 +45 4.4000000000000D-01 1.3496170052390D+00 6.8740427557431D-01 +46 4.5000000000000D-01 1.3304970212419D+00 6.6352206789951D-01 +47 4.6000000000000D-01 1.3096661187293D+00 6.3779519638227D-01 +48 4.7000000000000D-01 1.2869373015045D+00 6.1109955451129D-01 +49 4.8000000000000D-01 1.2621177168397D+00 5.8434137655724D-01 +50 4.9000000000000D-01 1.2350137330064D+00 5.5844125662814D-01 +51 5.0000000000000D-01 1.2054361498015D+00 5.3431775197627D-01 +52 5.1000000000000D-01 1.1732054503300D+00 5.1287084207993D-01 +53 5.2000000000000D-01 1.1381570008483D+00 4.9496551933244D-01 +54 5.3000000000000D-01 1.1001461055575D+00 4.8141578695665D-01 +55 5.4000000000000D-01 1.0590528248733D+00 4.7296933502371D-01 +56 5.5000000000000D-01 1.0147864688768D+00 4.7029315622138D-01 +57 5.6000000000000D-01 9.6728968231259D-01 4.7396034941943D-01 +58 5.7000000000000D-01 9.1654204358466D-01 4.8443834135675D-01 +59 5.8000000000000D-01 8.6256310763477D-01 5.0207873507593D-01 +60 5.9000000000000D-01 8.0541483119975D-01 5.2710896860408D-01 +61 6.0000000000000D-01 7.4520332869835D-01 5.5962593890082D-01 +62 6.1000000000000D-01 6.8207991761361D-01 5.9959171509611D-01 +63 6.2000000000000D-01 6.1624142367214D-01 6.4683143163608D-01 +64 6.3000000000000D-01 5.4792972810855D-01 7.0103341693067D-01 +65 6.4000000000000D-01 4.7743055164574D-01 7.6175157702149D-01 +66 6.5000000000000D-01 4.0507148242768D-01 8.2841001693057D-01 +67 6.6000000000000D-01 3.3121926763530D-01 9.0030984580512D-01 +68 6.7000000000000D-01 2.5627640082683D-01 9.7663807594765D-01 +69 6.8000000000000D-01 1.8067704894489D-01 1.0564784909753D+00 +70 6.9000000000000D-01 1.0488237416584D-01 1.1388243254389D+00 +71 7.0000000000000D-01 2.9375316176901D-02 1.2225925677043D+00 +72 7.1000000000000D-01 -4.5345090053890D-02 1.3066396700717D+00 +73 7.2000000000000D-01 -1.1876977768952D-01 1.3897784258172D+00 +74 7.3000000000000D-01 -1.9038600229637D-01 1.4707957522300D+00 +75 7.4000000000000D-01 -2.5968389107954D-01 1.5484711022269D+00 +76 7.5000000000000D-01 -3.2616308713771D-01 1.6215952150921D+00 +77 7.6000000000000D-01 -3.8933938631653D-01 1.6889889094069D+00 +78 7.7000000000000D-01 -4.4875126343299D-01 1.7495216186278D+00 +79 7.8000000000000D-01 -5.0396618548299D-01 1.8021293719404D+00 +80 7.9000000000000D-01 -5.5458661195199D-01 1.8458319300552D+00 +81 8.0000000000000D-01 -6.0025558648401D-01 1.8797487973792D+00 +82 8.1000000000000D-01 -6.4066182987154D-01 1.9031138483517D+00 +83 8.2000000000000D-01 -6.7554425152143D-01 1.9152883264090D+00 +84 8.3000000000000D-01 -7.0469580512263D-01 1.9157719987399D+00 +85 8.4000000000000D-01 -7.2796662405476D-01 1.9042122783163D+00 +86 8.5000000000000D-01 -7.4526638298172D-01 1.8804111561844D+00 +87 8.6000000000000D-01 -7.5656584389718D-01 1.8443298211945D+00 +88 8.7000000000000D-01 -7.6189755744063D-01 1.7960908806640D+00 +89 8.8000000000000D-01 -7.6135570338402D-01 1.7359781333402D+00 +90 8.9000000000000D-01 -7.5509506758717D-01 1.6644338848387D+00 +91 9.0000000000000D-01 -7.4332916621915D-01 1.5820538348439D+00 +92 9.1000000000000D-01 -7.2632754142269D-01 1.4895796041422D+00 +93 9.2000000000000D-01 -7.0441226564063D-01 1.3878890073667D+00 +94 9.3000000000000D-01 -6.7795370431326D-01 1.2779842135561D+00 +95 9.4000000000000D-01 -6.4736559838748D-01 1.1609779706561D+00 +96 9.5000000000000D-01 -6.1309953885834D-01 1.0380781013691D+00 +97 9.6000000000000D-01 -5.7563891521158D-01 9.1057050575076D-01 +98 9.7000000000000D-01 -5.3549242798859D-01 7.7980093019617D-01 +99 9.8000000000000D-01 -4.9318726262618D-01 6.4715578257690D-01 +100 9.9000000000000D-01 -4.4926202706885D-01 5.1404228881116D-01 +101 1.0000000000000D+00 -4.0425955936843D-01 3.8186829694707D-01 +102 1.0100000000000D+00 -3.5871971356674D-01 2.5202204088822D-01 +103 1.0200000000000D+00 -3.1317223233648D-01 1.2585217642297D-01 +104 1.0300000000000D+00 -2.6812981340318D-01 4.6483980145193D-03 +105 1.0400000000000D+00 -2.2408147359819D-01 -1.1037706438943D-01 +106 1.0500000000000D+00 -1.8148630905914D-01 -2.1810678473764D-01 +107 1.0600000000000D+00 -1.4076774449110D-01 -3.1753404891227D-01 +108 1.0700000000000D+00 -1.0230835526526D-01 -4.0777709039336D-01 +109 1.0800000000000D+00 -6.6445337405098D-02 -4.8809143784425D-01 +110 1.0900000000000D+00 -3.3466689671640D-02 -5.5788019035991D-01 +111 1.1000000000000D+00 -3.6081595234731D-03 -6.1670207220468D-01 +112 1.1100000000000D+00 2.2949005711169D-02 -6.6427714915423D-01 +113 1.1200000000000D+00 4.6079477271068D-02 -7.0049013544036D-01 +114 1.1300000000000D+00 6.5714419265802D-02 -7.2539125348184D-01 +115 1.1400000000000D+00 8.1841221187678D-02 -7.3919465524195D-01 +116 1.1500000000000D+00 9.4502401226785D-02 -7.4227444380023D-01 +117 1.1600000000000D+00 1.0379371110062D-01 -7.3515838627392D-01 +118 1.1700000000000D+00 1.0986148568399D-01 -7.1851944747610D-01 +119 1.1800000000000D+00 1.1289929298254D-01 -6.9316530611566D-01 +120 1.1900000000000D+00 1.1314386554259D-01 -6.6002574195477D-01 +121 1.2000000000000D+00 1.1087074223812D-01 -6.2013940253930D-01 +122 1.2100000000000D+00 1.0638910317594D-01 -5.7463799679145D-01 +123 1.2200000000000D+00 1.0003386482331D-01 -5.2472057240701D-01 +124 1.2300000000000D+00 9.2157116768957D-02 -4.7162607574298D-01 +125 1.2400000000000D+00 8.3119871578047D-02 -4.1660755418507D-01 +126 1.2500000000000D+00 7.3285775958198D-02 -3.6091394293662D-01 +127 1.2600000000000D+00 6.3014315241258D-02 -3.0576992743235D-01 +128 1.2700000000000D+00 5.2654245434976D-02 -2.5235658066821D-01 +129 1.2800000000000D+00 4.2537249563198D-02 -2.0179267228242D-01 +130 1.2900000000000D+00 3.2971950585396D-02 -1.5511705355507D-01 +131 1.3000000000000D+00 2.4238361436849D-02 -1.1327234061461D-01 +132 1.3100000000000D+00 1.6585001417533D-02 -7.7100017494382D-02 +133 1.3200000000000D+00 1.0216947617757D-02 -4.7292721395331D-02 +134 1.3300000000000D+00 5.2694693261048D-03 -2.4280865633573D-02 +135 1.3400000000000D+00 1.9706346471172D-03 -8.9756241199469D-03 +136 1.3500000000000D+00 3.7344510594944D-04 -1.5554436620009D-03 +137 1.3600000000000D+00 -6.9364112132192D-05 4.4103476648436D-04 +138 1.3700000000000D+00 -1.5589573966029D-05 8.3835985269138D-05 +139 1.3800000000000D+00 2.8084445244228D-05 -1.4685481755645D-04 +140 1.3900000000000D+00 -2.2432824007126D-06 1.2293899894255D-05 +141 1.4000000000000D+00 -3.5538848817516D-06 1.9190101249116D-05 +142 1.4100000000000D+00 -1.2444757550781D-07 1.5787950696566D-07 +143 1.4200000000000D+00 -3.1584233181265D-08 4.0069106547066D-08 +144 1.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +145 1.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +146 1.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +147 1.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +148 1.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +149 1.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +150 1.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +151 1.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +152 1.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +153 1.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +154 1.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +155 1.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 -5.1354431326117D+00 -1.4517814893642D+00 +1 0.0000000000000D+00 -1.0676017847544D-09 1.9229906486617D-09 +2 1.0000000000000D-02 2.2857107546090D-03 -7.9278074350328D-04 +3 2.0000000000000D-02 9.1327035953324D-03 -3.1657938090243D-03 +4 3.0000000000000D-02 2.0510572296276D-02 -7.1030308301767D-03 +5 4.0000000000000D-02 3.6368680612782D-02 -1.2577742772942D-02 +6 5.0000000000000D-02 5.6636225751860D-02 -1.9552341294297D-02 +7 6.0000000000000D-02 8.1222331721426D-02 -2.7978268546774D-02 +8 7.0000000000000D-02 1.1001617692184D-01 -3.7795843133889D-02 +9 8.0000000000000D-02 1.4288716141082D-01 -4.8934091844353D-02 +10 9.0000000000000D-02 1.7968512021076D-01 -6.1310578514657D-02 +11 1.0000000000000D-01 2.2024058981116D-01 -7.4831242850595D-02 +12 1.1000000000000D-01 2.6436513562722D-01 -8.9390263246888D-02 +13 1.2000000000000D-01 3.1185174859083D-01 -1.0486995855058D-01 +14 1.3000000000000D-01 3.6247531925659D-01 -1.2114074429510D-01 +15 1.4000000000000D-01 4.1599319779277D-01 -1.3806115916962D-01 +16 1.5000000000000D-01 4.7214584798882D-01 -1.5547797737276D-01 +17 1.6000000000000D-01 5.3065760294221D-01 -1.7322642202188D-01 +18 1.7000000000000D-01 5.9123752939240D-01 -1.9113049395446D-01 +19 1.8000000000000D-01 6.5358040675154D-01 -2.0900342907059D-01 +20 1.9000000000000D-01 7.1736782575113D-01 -2.2664829584017D-01 +21 2.0000000000000D-01 7.8226941029549D-01 -2.4385874275681D-01 +22 2.1000000000000D-01 8.4794416460281D-01 -2.6041990338529D-01 +23 2.2000000000000D-01 9.1404194604605D-01 -2.7610946425588D-01 +24 2.3000000000000D-01 9.8020506230170D-01 -2.9069889824075D-01 +25 2.4000000000000D-01 1.0460699895035D+00 -3.0395486324769D-01 +26 2.5000000000000D-01 1.1112692061097D+00 -3.1564076312875D-01 +27 2.6000000000000D-01 1.1754331351597D+00 -3.2551846467442D-01 +28 2.7000000000000D-01 1.2381921855489D+00 -3.3335016149832D-01 +29 2.8000000000000D-01 1.2991788809320D+00 -3.3890037256486D-01 +30 2.9000000000000D-01 1.3580300628976D+00 -3.4193806012577D-01 +31 3.0000000000000D-01 1.4143891531879D+00 -3.4223884896387D-01 +32 3.1000000000000D-01 1.4679084579936D+00 -3.3958732614513D-01 +33 3.2000000000000D-01 1.5182514957674D+00 -3.3377939800319D-01 +34 3.3000000000000D-01 1.5650953286108D+00 -3.2462467887150D-01 +35 3.4000000000000D-01 1.6081328761092D+00 -3.1194888417954D-01 +36 3.5000000000000D-01 1.6470751895671D+00 -2.9559619898313D-01 +37 3.6000000000000D-01 1.6816536639305D+00 -2.7543159183607D-01 +38 3.7000000000000D-01 1.7116221643100D+00 -2.5134304316327D-01 +39 3.8000000000000D-01 1.7367590439451D+00 -2.2324365698499D-01 +40 3.9000000000000D-01 1.7568690306859D+00 -1.9107362498516D-01 +41 4.0000000000000D-01 1.7717849596232D+00 -1.5480201252414D-01 +42 4.1000000000000D-01 1.7813693303700D+00 -1.1442833726816D-01 +43 4.2000000000000D-01 1.7855156686819D+00 -6.9983912642199D-02 +44 4.3000000000000D-01 1.7841496735941D+00 -2.1532930295966D-02 +45 4.4000000000000D-01 1.7772301330357D+00 3.0826741814932D-02 +46 4.5000000000000D-01 1.7647495929342D+00 8.6963066312455D-02 +47 4.6000000000000D-01 1.7467347671303D+00 1.4670966563663D-01 +48 4.7000000000000D-01 1.7232466779521D+00 2.0986598751386D-01 +49 4.8000000000000D-01 1.6943805200193D+00 2.7619781671530D-01 +50 4.9000000000000D-01 1.6602652427311D+00 3.4543813911992D-01 +51 5.0000000000000D-01 1.6210628498981D+00 4.1728835986381D-01 +52 5.1000000000000D-01 1.5769674180649D+00 4.9141987300005D-01 +53 5.2000000000000D-01 1.5282038382074D+00 5.6747597566384D-01 +54 5.3000000000000D-01 1.4750262886201D+00 6.4507411530642D-01 +55 5.4000000000000D-01 1.4177164499033D+00 7.2380845418829D-01 +56 5.5000000000000D-01 1.3565814759713D+00 8.0325273106431D-01 +57 5.6000000000000D-01 1.2919517378879D+00 8.8296339592211D-01 +58 5.7000000000000D-01 1.2241783600533D+00 9.6248298980563D-01 +59 5.8000000000000D-01 1.1536305707880D+00 1.0413437382171D+00 +60 5.9000000000000D-01 1.0806928916297D+00 1.1190713234179D+00 +61 6.0000000000000D-01 1.0057621916702D+00 1.1951887981579D+00 +62 6.1000000000000D-01 9.2924463495704D-01 1.2692206010347D+00 +63 6.2000000000000D-01 8.5155255036506D-01 1.3406966318190D+00 +64 6.3000000000000D-01 7.7310125437045D-01 1.4091563437426D+00 +65 6.4000000000000D-01 6.9430585782542D-01 1.4741528089299D+00 +66 6.5000000000000D-01 6.1557808812523D-01 1.5352567128967D+00 +67 6.6000000000000D-01 5.3732315806912D-01 1.5920602343376D+00 +68 6.7000000000000D-01 4.5993671225140D-01 1.6441807672785D+00 +69 6.8000000000000D-01 3.8380188097279D-01 1.6912644440847D+00 +70 6.9000000000000D-01 3.0928647045279D-01 1.7329894197605D+00 +71 7.0000000000000D-01 2.3674031657160D-01 1.7690688804260D+00 +72 7.1000000000000D-01 1.6649282747507D-01 1.7992537418086D+00 +73 7.2000000000000D-01 9.8850738187389D-02 1.8233350069659D+00 +74 7.3000000000000D-01 3.4096097909237D-02 1.8411457562410D+00 +75 7.4000000000000D-01 -2.7515492038274D-02 1.8525627466004D+00 +76 7.5000000000000D-01 -8.5756374564866D-02 1.8575076019135D+00 +77 7.6000000000000D-01 -1.4042805550194D-01 1.8559475804339D+00 +78 7.7000000000000D-01 -1.9136213587479D-01 1.8478959105729D+00 +79 7.8000000000000D-01 -2.3842095229535D-01 1.8334116910178D+00 +80 7.9000000000000D-01 -2.8149792334718D-01 1.8125993562545D+00 +81 8.0000000000000D-01 -3.2051760316251D-01 1.7856077135347D+00 +82 8.1000000000000D-01 -3.5543544667033D-01 1.7526285622277D+00 +83 8.2000000000000D-01 -3.8623729418340D-01 1.7138949112388D+00 +84 8.3000000000000D-01 -4.1293858604739D-01 1.6696788147124D+00 +85 8.4000000000000D-01 -4.3558332096046D-01 1.6202888504960D+00 +86 8.5000000000000D-01 -4.5424277424822D-01 1.5660672697769D+00 +87 8.6000000000000D-01 -4.6901399481651D-01 1.5073868498648D+00 +88 8.7000000000000D-01 -4.8001810167142D-01 1.4446474852300D+00 +89 8.8000000000000D-01 -4.8739840276960D-01 1.3782725545957D+00 +90 8.9000000000000D-01 -4.9131836052064D-01 1.3087051040753D+00 +91 9.0000000000000D-01 -4.9195942949176D-01 1.2364038880352D+00 +92 9.1000000000000D-01 -4.8951879275260D-01 1.1618393105226D+00 +93 9.2000000000000D-01 -4.8420702383912D-01 1.0854893107220D+00 +94 9.3000000000000D-01 -4.7624570150962D-01 1.0078352359968D+00 +95 9.4000000000000D-01 -4.6586500431720D-01 9.2935774563107D-01 +96 9.5000000000000D-01 -4.5330131154118D-01 8.5053278743739D-01 +97 9.6000000000000D-01 -4.3879483621914D-01 7.7182768794940D-01 +98 9.7000000000000D-01 -4.2258731492009D-01 6.9369739501375D-01 +99 9.8000000000000D-01 -4.0491977751807D-01 6.1658090925328D-01 +100 9.9000000000000D-01 -3.8603041857433D-01 5.4089793811635D-01 +101 1.0000000000000D+00 -3.6615259014322D-01 4.6704580325593D-01 +102 1.0100000000000D+00 -3.4551293368084D-01 3.9539662846580D-01 +103 1.0200000000000D+00 -3.2432966659695D-01 3.2629483189511D-01 +104 1.0300000000000D+00 -3.0281103663904D-01 2.6005494241688D-01 +105 1.0400000000000D+00 -2.8115395490679D-01 1.9695975612138D-01 +106 1.0500000000000D+00 -2.5954281572939D-01 1.3725884471806D-01 +107 1.0600000000000D+00 -2.3814850942998D-01 8.1167424024319D-02 +108 1.0700000000000D+00 -2.1712763121261D-01 2.8865586162239D-02 +109 1.0800000000000D+00 -1.9662188725626D-01 -1.9502104438848D-02 +110 1.0900000000000D+00 -1.7675769671648D-01 -6.3826655048304D-02 +111 1.1000000000000D+00 -1.5764598608576D-01 -1.0403433617340D-01 +112 1.1100000000000D+00 -1.3938217059976D-01 -1.4008603107071D-01 +113 1.1200000000000D+00 -1.2204631511160D-01 -1.7197625744102D-01 +114 1.1300000000000D+00 -1.0570346550632D-01 -1.9973187778846D-01 +115 1.1400000000000D+00 -9.0404140063086D-02 -2.2341051775153D-01 +116 1.1500000000000D+00 -7.6184969190559D-02 -2.4309871339049D-01 +117 1.1600000000000D+00 -6.3069470596288D-02 -2.5890981080279D-01 +118 1.1700000000000D+00 -5.1068947402796D-02 -2.7098163989401D-01 +119 1.1800000000000D+00 -4.0183495262386D-02 -2.7947398809739D-01 +120 1.1900000000000D+00 -3.0403066105982D-02 -2.8456599367224D-01 +121 1.2000000000000D+00 -2.1708734337529D-02 -2.8645308473172D-01 +122 1.2100000000000D+00 -1.4073874754490D-02 -2.8534418140086D-01 +123 1.2200000000000D+00 -7.4643102953407D-03 -2.8146158973955D-01 +124 1.2300000000000D+00 -1.8383196804624D-03 -2.7504109192075D-01 +125 1.2400000000000D+00 2.8531089925717D-03 -2.6633130593340D-01 +126 1.2500000000000D+00 6.6650831782501D-03 -2.5559057172772D-01 +127 1.2600000000000D+00 9.6578607852350D-03 -2.4308449615434D-01 +128 1.2700000000000D+00 1.1895878397510D-02 -2.2908342208171D-01 +129 1.2800000000000D+00 1.3446811666876D-02 -2.1385996941130D-01 +130 1.2900000000000D+00 1.4380664168006D-02 -1.9768663524633D-01 +131 1.3000000000000D+00 1.4768896689180D-02 -1.8083348255263D-01 +132 1.3100000000000D+00 1.4683601415226D-02 -1.6356592717173D-01 +133 1.3200000000000D+00 1.4196725552605D-02 -1.4614263456417D-01 +134 1.3300000000000D+00 1.3379346852278D-02 -1.2881353414779D-01 +135 1.3400000000000D+00 1.2301003943302D-02 -1.1181795983530D-01 +136 1.3500000000000D+00 1.1029082584378D-02 -9.5382922416855D-02 +137 1.3600000000000D+00 9.6282579066519D-03 -7.9721517407989D-02 +138 1.3700000000000D+00 8.1599933063368D-03 -6.5031473188568D-02 +139 1.3800000000000D+00 6.6820944406434D-03 -5.1493840124376D-02 +140 1.3900000000000D+00 5.2483174385979D-03 -3.9271822229489D-02 +141 1.4000000000000D+00 3.9080301143856D-03 -2.8509752890084D-02 +142 1.4100000000000D+00 2.7066275655347D-03 -1.9337056523860D-02 +143 1.4200000000000D+00 1.6820261650531D-03 -1.1845018413618D-02 +144 1.4300000000000D+00 8.6530023682513D-04 -6.0895720720524D-03 +145 1.4400000000000D+00 3.0384248338139D-04 -2.2670670411939D-03 +146 1.4500000000000D+00 1.3790943475442D-05 -3.5851415753506D-04 +147 1.4600000000000D+00 -5.7912508534168D-05 1.8203560704663D-04 +148 1.4700000000000D+00 -1.6185373173158D-05 6.4884771417117D-05 +149 1.4800000000000D+00 1.1873476756203D-05 -5.0772655237130D-05 +150 1.4900000000000D+00 1.3731981144445D-06 -6.0568719781676D-06 +151 1.5000000000000D+00 -2.3489427028535D-06 9.5825484218583D-06 +152 1.5100000000000D+00 3.7364904140160D-08 -5.3978489114641D-08 +153 1.5200000000000D+00 1.2431658753080D-07 -1.7959156382763D-07 +154 1.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +155 1.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +2 -4.3714856259694D+00 +1 0.0000000000000D+00 1.1546319882150D-07 +2 1.0000000000000D-02 1.6625509952208D-04 +3 2.0000000000000D-02 1.3228437400010D-03 +4 3.0000000000000D-02 4.4243501740639D-03 +5 4.0000000000000D-02 1.0354954461740D-02 +6 5.0000000000000D-02 1.9895935410335D-02 +7 6.0000000000000D-02 3.3696333807006D-02 +8 7.0000000000000D-02 5.2247688944382D-02 +9 8.0000000000000D-02 7.5863645976357D-02 +10 9.0000000000000D-02 1.0466509329171D-01 +11 1.0000000000000D-01 1.3857133161061D-01 +12 1.1000000000000D-01 1.7729760417198D-01 +13 1.2000000000000D-01 2.2035913487848D-01 +14 1.3000000000000D-01 2.6708163358018D-01 +15 1.4000000000000D-01 3.1661803994165D-01 +16 1.5000000000000D-01 3.6797109470641D-01 +17 1.6000000000000D-01 4.2002115468361D-01 +18 1.7000000000000D-01 4.7155851022113D-01 +19 1.8000000000000D-01 5.2131932570186D-01 +20 1.9000000000000D-01 5.6802420861388D-01 +21 2.0000000000000D-01 6.1041832430202D-01 +22 2.1000000000000D-01 6.4731191421786D-01 +23 2.2000000000000D-01 6.7762004718683D-01 +24 2.3000000000000D-01 7.0040043692850D-01 +25 2.4000000000000D-01 7.1488819496858D-01 +26 2.5000000000000D-01 7.2052645548204D-01 +27 2.6000000000000D-01 7.1699190597028D-01 +28 2.7000000000000D-01 7.0421438265738D-01 +29 2.8000000000000D-01 6.8238983899380D-01 +30 2.9000000000000D-01 6.5198616590604D-01 +31 3.0000000000000D-01 6.1374152907488D-01 +32 3.1000000000000D-01 5.6865508673801D-01 +33 3.2000000000000D-01 5.1797015612691D-01 +34 3.3000000000000D-01 4.6315010228024D-01 +35 3.4000000000000D-01 4.0584742417498D-01 +36 3.5000000000000D-01 3.4786670449091D-01 +37 3.6000000000000D-01 2.9112226571825D-01 +38 3.7000000000000D-01 2.3759153188246D-01 +39 3.8000000000000D-01 1.8926522757985D-01 +40 3.9000000000000D-01 1.4809565050842D-01 +41 4.0000000000000D-01 1.1594432721069D-01 +42 4.1000000000000D-01 9.4530402027373D-02 +43 4.2000000000000D-01 8.5381114871412D-02 +44 4.3000000000000D-01 8.9785693831557D-02 +45 4.4000000000000D-01 1.0875392417443D-01 +46 4.5000000000000D-01 1.4298055731454D-01 +47 4.6000000000000D-01 1.9281659392429D-01 +48 4.7000000000000D-01 2.5824831755568D-01 +49 4.8000000000000D-01 3.3888477269700D-01 +50 4.9000000000000D-01 4.3395417852334D-01 +51 5.0000000000000D-01 5.4230955166092D-01 +52 5.1000000000000D-01 6.6244358365509D-01 +53 5.2000000000000D-01 7.9251258694115D-01 +54 5.3000000000000D-01 9.3036909311997D-01 +55 5.4000000000000D-01 1.0736024651365D+00 +56 5.5000000000000D-01 1.2195866758864D+00 +57 5.6000000000000D-01 1.3655342158314D+00 +58 5.7000000000000D-01 1.5085549260958D+00 +59 5.8000000000000D-01 1.6457184154960D+00 +60 5.9000000000000D-01 1.7741186143999D+00 +61 6.0000000000000D-01 1.8909389474016D+00 +62 6.1000000000000D-01 1.9935165733086D+00 +63 6.2000000000000D-01 2.0794041456133D+00 +64 6.3000000000000D-01 2.1464275900000D+00 +65 6.4000000000000D-01 2.1927384761133D+00 +66 6.5000000000000D-01 2.2168596783431D+00 +67 6.6000000000000D-01 2.2177231704407D+00 +68 6.7000000000000D-01 2.1946989788853D+00 +69 6.8000000000000D-01 2.1476145261937D+00 +70 6.9000000000000D-01 2.0767638216534D+00 +71 7.0000000000000D-01 1.9829061976344D+00 +72 7.1000000000000D-01 1.8672545412235D+00 +73 7.2000000000000D-01 1.7314532237290D+00 +74 7.3000000000000D-01 1.5775461806386D+00 +75 7.4000000000000D-01 1.4079358353241D+00 +76 7.5000000000000D-01 1.2253337833775D+00 +77 7.6000000000000D-01 1.0327043588453D+00 +78 7.7000000000000D-01 8.3320237919631D-01 +79 7.8000000000000D-01 6.3010651149593D-01 +80 7.9000000000000D-01 4.2674981262013D-01 +81 8.0000000000000D-01 2.2644906888582D-01 +82 8.1000000000000D-01 3.2434593219659D-02 +83 8.2000000000000D-01 -1.5221787004064D-01 +84 8.3000000000000D-01 -3.2465153136163D-01 +85 8.4000000000000D-01 -4.8228772026863D-01 +86 8.5000000000000D-01 -6.2287844057439D-01 +87 8.6000000000000D-01 -7.4455108992121D-01 +88 8.7000000000000D-01 -8.4584430794329D-01 +89 8.8000000000000D-01 -9.2573413417098D-01 +90 8.9000000000000D-01 -9.8364989407848D-01 +91 9.0000000000000D-01 -1.0194794835031D+00 +92 9.1000000000000D-01 -1.0335639817362D+00 +93 9.2000000000000D-01 -1.0266817853763D+00 +94 9.3000000000000D-01 -1.0000227119544D+00 +95 9.4000000000000D-01 -9.5515276791518D-01 +96 9.5000000000000D-01 -8.9397050355526D-01 +97 9.6000000000000D-01 -8.1865608221209D-01 +98 9.7000000000000D-01 -7.3161436715604D-01 +99 9.8000000000000D-01 -6.3541347303573D-01 +100 9.9000000000000D-01 -5.3272033458335D-01 +101 1.0000000000000D+00 -4.2623491294975D-01 +102 1.0100000000000D+00 -3.1862468688214D-01 +103 1.0200000000000D+00 -2.1246105904920D-01 +104 1.0300000000000D+00 -1.1015925158499D-01 +105 1.0400000000000D+00 -1.3923169521131D-02 +106 1.0500000000000D+00 7.4303433217340D-02 +107 1.0600000000000D+00 1.5287829607672D-01 +108 1.0700000000000D+00 2.2049353820835D-01 +109 1.0800000000000D+00 2.7619932945794D-01 +110 1.0900000000000D+00 3.1941783315576D-01 +111 1.1000000000000D+00 3.4994717429712D-01 +112 1.1100000000000D+00 3.6795540633486D-01 +113 1.1200000000000D+00 3.7396476661560D-01 +114 1.1300000000000D+00 3.6882671894321D-01 +115 1.1400000000000D+00 3.5368855303003D-01 +116 1.1500000000000D+00 3.2995247868995D-01 +117 1.1600000000000D+00 2.9922841201313D-01 +118 1.1700000000000D+00 2.6328177147534D-01 +119 1.1800000000000D+00 2.2397773666447D-01 +120 1.1900000000000D+00 1.8322343174828D-01 +121 1.2000000000000D+00 1.4290997562300D-01 +122 1.2100000000000D+00 1.0485540994242D-01 +123 1.2200000000000D+00 7.0759912849273D-02 +124 1.2300000000000D+00 4.2103839969951D-02 +125 1.2400000000000D+00 2.0032079756686D-02 +126 1.2500000000000D+00 6.2396292448588D-03 +127 1.2600000000000D+00 5.1474157184780D-04 +128 1.2700000000000D+00 -3.6630441040282D-04 +129 1.2800000000000D+00 1.0046467962443D-04 +130 1.2900000000000D+00 4.7727372400341D-05 +131 1.3000000000000D+00 -2.3532922364150D-05 +132 1.3100000000000D+00 -2.6165334725386D-07 +133 1.3200000000000D+00 -2.6640400525596D-07 +134 1.3300000000000D+00 0.0000000000000D+00 +135 1.3400000000000D+00 0.0000000000000D+00 +136 1.3500000000000D+00 0.0000000000000D+00 +137 1.3600000000000D+00 0.0000000000000D+00 +138 1.3700000000000D+00 0.0000000000000D+00 +139 1.3800000000000D+00 0.0000000000000D+00 +140 1.3900000000000D+00 0.0000000000000D+00 +141 1.4000000000000D+00 0.0000000000000D+00 +142 1.4100000000000D+00 0.0000000000000D+00 +143 1.4200000000000D+00 0.0000000000000D+00 +144 1.4300000000000D+00 0.0000000000000D+00 +145 1.4400000000000D+00 0.0000000000000D+00 +146 1.4500000000000D+00 0.0000000000000D+00 +147 1.4600000000000D+00 0.0000000000000D+00 +148 1.4700000000000D+00 0.0000000000000D+00 +149 1.4800000000000D+00 0.0000000000000D+00 +150 1.4900000000000D+00 0.0000000000000D+00 +151 1.5000000000000D+00 0.0000000000000D+00 +152 1.5100000000000D+00 0.0000000000000D+00 +153 1.5200000000000D+00 0.0000000000000D+00 +154 1.5300000000000D+00 0.0000000000000D+00 +155 1.5400000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 +4 +1 0.0000000000000D+00 -1.0292798173655D+01 +2 1.0000000000000D-02 -1.0291902486581D+01 +3 2.0000000000000D-02 -1.0289236550285D+01 +4 3.0000000000000D-02 -1.0284862252835D+01 +5 4.0000000000000D-02 -1.0278878001312D+01 +6 5.0000000000000D-02 -1.0271412157387D+01 +7 6.0000000000000D-02 -1.0262614916649D+01 +8 7.0000000000000D-02 -1.0252649448379D+01 +9 8.0000000000000D-02 -1.0241683112423D+01 +10 9.0000000000000D-02 -1.0229879446216D+01 +11 1.0000000000000D-01 -1.0217391423157D+01 +12 1.1000000000000D-01 -1.0204356265601D+01 +13 1.2000000000000D-01 -1.0190891889646D+01 +14 1.3000000000000D-01 -1.0177094891623D+01 +15 1.4000000000000D-01 -1.0163039870666D+01 +16 1.5000000000000D-01 -1.0148779819340D+01 +17 1.6000000000000D-01 -1.0134347297332D+01 +18 1.7000000000000D-01 -1.0119756120038D+01 +19 1.8000000000000D-01 -1.0105003331909D+01 +20 1.9000000000000D-01 -1.0090071282201D+01 +21 2.0000000000000D-01 -1.0074929670117D+01 +22 2.1000000000000D-01 -1.0059537471323D+01 +23 2.2000000000000D-01 -1.0043844695438D+01 +24 2.3000000000000D-01 -1.0027793953200D+01 +25 2.4000000000000D-01 -1.0011321832637D+01 +26 2.5000000000000D-01 -9.9943600966174D+00 +27 2.6000000000000D-01 -9.9768367210724D+00 +28 2.7000000000000D-01 -9.9586767949768D+00 +29 2.8000000000000D-01 -9.9398033015401D+00 +30 2.9000000000000D-01 -9.9201377963893D+00 +31 3.0000000000000D-01 -9.8996009934727D+00 +32 3.1000000000000D-01 -9.8781132651972D+00 +33 3.2000000000000D-01 -9.8555950600711D+00 +34 3.3000000000000D-01 -9.8319672408166D+00 +35 3.4000000000000D-01 -9.8071513487372D+00 +36 3.5000000000000D-01 -9.7810698070771D+00 +37 3.6000000000000D-01 -9.7536460870593D+00 +38 3.7000000000000D-01 -9.7248048744230D+00 +39 3.8000000000000D-01 -9.6944722899644D+00 +40 3.9000000000000D-01 -9.6625762321771D+00 +41 4.0000000000000D-01 -9.6290469199372D+00 +42 4.1000000000000D-01 -9.5938177138125D+00 +43 4.2000000000000D-01 -9.5568262821723D+00 +44 4.3000000000000D-01 -9.5180161494828D+00 +45 4.4000000000000D-01 -9.4773386179222D+00 +46 4.5000000000000D-01 -9.4347549927643D+00 +47 4.6000000000000D-01 -9.3902389728261D+00 +48 4.7000000000000D-01 -9.3437790012757D+00 +49 4.8000000000000D-01 -9.2953803225070D+00 +50 4.9000000000000D-01 -9.2450664723551D+00 +51 5.0000000000000D-01 -9.1928799525289D+00 +52 5.1000000000000D-01 -9.1388819099163D+00 +53 5.2000000000000D-01 -9.0831507516425D+00 +54 5.3000000000000D-01 -9.0257797608087D+00 +55 5.4000000000000D-01 -8.9668739118411D+00 +56 5.5000000000000D-01 -8.9065461915393D+00 +57 5.6000000000000D-01 -8.8449137904793D+00 +58 5.7000000000000D-01 -8.7820945284138D+00 +59 5.8000000000000D-01 -8.7182038191990D+00 +60 5.9000000000000D-01 -8.6533523814137D+00 +61 6.0000000000000D-01 -8.5876447812689D+00 +62 6.1000000000000D-01 -8.5211787821837D+00 +63 6.2000000000000D-01 -8.4540453829191D+00 +64 6.3000000000000D-01 -8.3863293710577D+00 +65 6.4000000000000D-01 -8.3181101960024D+00 +66 6.5000000000000D-01 -8.2494629743492D+00 +67 6.6000000000000D-01 -8.1804594696997D+00 +68 6.7000000000000D-01 -8.1111689296787D+00 +69 6.8000000000000D-01 -8.0416587070083D+00 +70 6.9000000000000D-01 -7.9719946325382D+00 +71 7.0000000000000D-01 -7.9022411426972D+00 +72 7.1000000000000D-01 -7.8324611901715D+00 +73 7.2000000000000D-01 -7.7627159840782D+00 +74 7.3000000000000D-01 -7.6930646150343D+00 +75 7.4000000000000D-01 -7.6235636225304D+00 +76 7.5000000000000D-01 -7.5542665581163D+00 +77 7.6000000000000D-01 -7.4852235897637D+00 +78 7.7000000000000D-01 -7.4164811820388D+00 +79 7.8000000000000D-01 -7.3480818749653D+00 +80 7.9000000000000D-01 -7.2800641728532D+00 +81 8.0000000000000D-01 -7.2124625441654D+00 +82 8.1000000000000D-01 -7.1453075250945D+00 +83 8.2000000000000D-01 -7.0786259134592D+00 +84 8.3000000000000D-01 -7.0124410356535D+00 +85 8.4000000000000D-01 -6.9467730676191D+00 +86 8.5000000000000D-01 -6.8816393908478D+00 +87 8.6000000000000D-01 -6.8170549640754D+00 +88 8.7000000000000D-01 -6.7530327096392D+00 +89 8.8000000000000D-01 -6.6895838942776D+00 +90 8.9000000000000D-01 -6.6267184146402D+00 +91 9.0000000000000D-01 -6.5644450892336D+00 +92 9.1000000000000D-01 -6.5027719550457D+00 +93 9.2000000000000D-01 -6.4417065226950D+00 +94 9.3000000000000D-01 -6.3812559818783D+00 +95 9.4000000000000D-01 -6.3214273598800D+00 +96 9.5000000000000D-01 -6.2622276349993D+00 +97 9.6000000000000D-01 -6.2036638089891D+00 +98 9.7000000000000D-01 -6.1457429433589D+00 +99 9.8000000000000D-01 -6.0884721646522D+00 +100 9.9000000000000D-01 -6.0318586436959D+00 +101 1.0000000000000D+00 -5.9759095534358D+00 +102 1.0100000000000D+00 -5.9206320094054D+00 +103 1.0200000000000D+00 -5.8660329963234D+00 +104 1.0300000000000D+00 -5.8121192837331D+00 +105 1.0400000000000D+00 -5.7588973330939D+00 +106 1.0500000000000D+00 -5.7063731983261D+00 +107 1.0600000000000D+00 -5.6545524215373D+00 +108 1.0700000000000D+00 -5.6034399254043D+00 +109 1.0800000000000D+00 -5.5530399036103D+00 +110 1.0900000000000D+00 -5.5033557106719D+00 +111 1.1000000000000D+00 -5.4543897524666D+00 +112 1.1100000000000D+00 -5.4061433787905D+00 +113 1.1200000000000D+00 -5.3586167792606D+00 +114 1.1300000000000D+00 -5.3118088838442D+00 +115 1.1400000000000D+00 -5.2657172691893D+00 +116 1.1500000000000D+00 -5.2203380718545D+00 +117 1.1600000000000D+00 -5.1756659092864D+00 +118 1.1700000000000D+00 -5.1316938083524D+00 +119 1.1800000000000D+00 -5.0884131421222D+00 +120 1.1900000000000D+00 -5.0458136032861D+00 +121 1.2000000000000D+00 -5.0038830897107D+00 +122 1.2100000000000D+00 -4.9626077159869D+00 +123 1.2200000000000D+00 -4.9219727375551D+00 +124 1.2300000000000D+00 -4.8819634717240D+00 +125 1.2400000000000D+00 -4.8425659415760D+00 +126 1.2500000000000D+00 -4.8037666937466D+00 +127 1.2600000000000D+00 -4.7655528341819D+00 +128 1.2700000000000D+00 -4.7279120268392D+00 +129 1.2800000000000D+00 -4.6908324965703D+00 +130 1.2900000000000D+00 -4.6543030231006D+00 +131 1.3000000000000D+00 -4.6183129266241D+00 +132 1.3100000000000D+00 -4.5828521020729D+00 +133 1.3200000000000D+00 -4.5479109017355D+00 +134 1.3300000000000D+00 -4.5134801644333D+00 +135 1.3400000000000D+00 -4.4795510029136D+00 +136 1.3500000000000D+00 -4.4461160193512D+00 +137 1.3600000000000D+00 -4.4131706889012D+00 +138 1.3700000000000D+00 -4.3807133560372D+00 +139 1.3800000000000D+00 -4.3487432910498D+00 +140 1.3900000000000D+00 -4.3172549975576D+00 +141 1.4000000000000D+00 -4.2862400624933D+00 +142 1.4100000000000D+00 -4.2556892336784D+00 +143 1.4200000000000D+00 -4.2255946251476D+00 +144 1.4300000000000D+00 -4.1959496278538D+00 +145 1.4400000000000D+00 -4.1667465081872D+00 +146 1.4500000000000D+00 -4.1379748769327D+00 +147 1.4600000000000D+00 -4.1096209766232D+00 +148 1.4700000000000D+00 -4.0816659107128D+00 +149 1.4800000000000D+00 -4.0540879290437D+00 +150 1.4900000000000D+00 -4.0268766336362D+00 +151 1.5000000000000D+00 -4.0000293798883D+00 +152 1.5100000000000D+00 -3.9735387273800D+00 +153 1.5200000000000D+00 -3.9473966231949D+00 +154 1.5300000000000D+00 -3.9215964331510D+00 +155 1.5400000000000D+00 -3.8961315134837D+00 +156 1.5500000000000D+00 -3.8709953011886D+00 +157 1.5600000000000D+00 -3.8461814200834D+00 +158 1.5700000000000D+00 -3.8216836662881D+00 +159 1.5800000000000D+00 -3.7974959975542D+00 +160 1.5900000000000D+00 -3.7736125314217D+00 +161 1.6000000000000D+00 -3.7500275413420D+00 +162 1.6100000000000D+00 -3.7267354518476D+00 +163 1.6200000000000D+00 -3.7037308333716D+00 +164 1.6300000000000D+00 -3.6810083967394D+00 +165 1.6400000000000D+00 -3.6585629875199D+00 +166 1.6500000000000D+00 -3.6363895805523D+00 +167 1.6600000000000D+00 -3.6144832735334D+00 +168 1.6700000000000D+00 -3.5928392825393D+00 +169 1.6800000000000D+00 -3.5714529417932D+00 +170 1.6900000000000D+00 -3.5503196927308D+00 +171 1.7000000000000D+00 -3.5294350655977D+00 +172 1.7100000000000D+00 -3.5087946962197D+00 +173 1.7200000000000D+00 -3.4883943486743D+00 +174 1.7300000000000D+00 -3.4682298849387D+00 +175 1.7400000000000D+00 -3.4482972419917D+00 +176 1.7500000000000D+00 -3.4285924406965D+00 +177 1.7600000000000D+00 -3.4091115777733D+00 +178 1.7700000000000D+00 -3.3898508353768D+00 +179 1.7800000000000D+00 -3.3708065019005D+00 +180 1.7900000000000D+00 -3.3519749579873D+00 +181 1.8000000000000D+00 -3.3333526586761D+00 +182 1.8100000000000D+00 -3.3149361340093D+00 +183 1.8200000000000D+00 -3.2967219915709D+00 +184 1.8300000000000D+00 -3.2787069138773D+00 +185 1.8400000000000D+00 -3.2608876552780D+00 +186 1.8500000000000D+00 -3.2432610402423D+00 +187 1.8600000000000D+00 -3.2258239615476D+00 +188 1.8700000000000D+00 -3.2085733784345D+00 +189 1.8800000000000D+00 -3.1915063148399D+00 +190 1.8900000000000D+00 -3.1746198576865D+00 +191 1.9000000000000D+00 -3.1579111552246D+00 +192 1.9100000000000D+00 -3.1413774154280D+00 +193 1.9200000000000D+00 -3.1250159044381D+00 +194 1.9300000000000D+00 -3.1088239450579D+00 +195 1.9400000000000D+00 -3.0927989152916D+00 +196 1.9500000000000D+00 -3.0769382469290D+00 +197 1.9600000000000D+00 -3.0612394241741D+00 +198 1.9700000000000D+00 -3.0456999823146D+00 +199 1.9800000000000D+00 -3.0303175064320D+00 +200 1.9900000000000D+00 -3.0150896301506D+00 +201 2.0000000000000D+00 -3.0000140344242D+00 +202 2.0100000000000D+00 -2.9850884463582D+00 +203 2.0200000000000D+00 -2.9703106380679D+00 +204 2.0300000000000D+00 -2.9556784255696D+00 +205 2.0400000000000D+00 -2.9411896677045D+00 +206 2.0500000000000D+00 -2.9268422650945D+00 +207 2.0600000000000D+00 -2.9126341591278D+00 +208 2.0700000000000D+00 -2.8985633309743D+00 +209 2.0800000000000D+00 -2.8846278006294D+00 +210 2.0900000000000D+00 -2.8708256259848D+00 +211 2.1000000000000D+00 -2.8571549019265D+00 +212 2.1100000000000D+00 -2.8436137594580D+00 +213 2.1200000000000D+00 -2.8302003648485D+00 +214 2.1300000000000D+00 -2.8169129188050D+00 +215 2.1400000000000D+00 -2.8037496556674D+00 +216 2.1500000000000D+00 -2.7907088426268D+00 +217 2.1600000000000D+00 -2.7777887789648D+00 +218 2.1700000000000D+00 -2.7649877953137D+00 +219 2.1800000000000D+00 -2.7523042529381D+00 +220 2.1900000000000D+00 -2.7397365430349D+00 +221 2.2000000000000D+00 -2.7272830860532D+00 +222 2.2100000000000D+00 -2.7149423310326D+00 +223 2.2200000000000D+00 -2.7027127549590D+00 +224 2.2300000000000D+00 -2.6905928621382D+00 +225 2.2400000000000D+00 -2.6785811835856D+00 +226 2.2500000000000D+00 -2.6666762764332D+00 +227 2.2600000000000D+00 -2.6548767233515D+00 +228 2.2700000000000D+00 -2.6431811319866D+00 +229 2.2800000000000D+00 -2.6315881344131D+00 +230 2.2900000000000D+00 -2.6200963866002D+00 +231 2.3000000000000D+00 -2.6087045678925D+00 +232 2.3100000000000D+00 -2.5974113805037D+00 +233 2.3200000000000D+00 -2.5862155490240D+00 +234 2.3300000000000D+00 -2.5751158199398D+00 +235 2.3400000000000D+00 -2.5641109611657D+00 +236 2.3500000000000D+00 -2.5531997615884D+00 +237 2.3600000000000D+00 -2.5423810306229D+00 +238 2.3700000000000D+00 -2.5316535977789D+00 +239 2.3800000000000D+00 -2.5210163122385D+00 +240 2.3900000000000D+00 -2.5104680424450D+00 +241 2.4000000000000D+00 -2.5000076757015D+00 +242 2.4100000000000D+00 -2.4896341177795D+00 +243 2.4200000000000D+00 -2.4793462925371D+00 +244 2.4300000000000D+00 -2.4691431415473D+00 +245 2.4400000000000D+00 -2.4590236237344D+00 +246 2.4500000000000D+00 -2.4489867150204D+00 +247 2.4600000000000D+00 -2.4390314079791D+00 +248 2.4700000000000D+00 -2.4291567114991D+00 +249 2.4800000000000D+00 -2.4193616504550D+00 +250 2.4900000000000D+00 -2.4096452653861D+00 +251 2.5000000000000D+00 -2.4000066121831D+00 +252 2.5100000000000D+00 -2.3904447617829D+00 +253 2.5200000000000D+00 -2.3809587998689D+00 +254 2.5300000000000D+00 -2.3715478265806D+00 +255 2.5400000000000D+00 -2.3622109562284D+00 +256 2.5500000000000D+00 -2.3529473170160D+00 +257 2.5600000000000D+00 -2.3437560507688D+00 +258 2.5700000000000D+00 -2.3346363126692D+00 +259 2.5800000000000D+00 -2.3255872709973D+00 +260 2.5900000000000D+00 -2.3166081068783D+00 +261 2.6000000000000D+00 -2.3076980140356D+00 +262 2.6100000000000D+00 -2.2988561985491D+00 +263 2.6200000000000D+00 -2.2900818786194D+00 +264 2.6300000000000D+00 -2.2813742843378D+00 +265 2.6400000000000D+00 -2.2727326574606D+00 +266 2.6500000000000D+00 -2.2641562511890D+00 +267 2.6600000000000D+00 -2.2556443299543D+00 +268 2.6700000000000D+00 -2.2471961692075D+00 +269 2.6800000000000D+00 -2.2388110552134D+00 +270 2.6900000000000D+00 -2.2304882848498D+00 +271 2.7000000000000D+00 -2.2222271654112D+00 +272 2.7100000000000D+00 -2.2140270144161D+00 +273 2.7200000000000D+00 -2.2058871594192D+00 +274 2.7300000000000D+00 -2.1978069378281D+00 +275 2.7400000000000D+00 -2.1897856967227D+00 +276 2.7500000000000D+00 -2.1818227926799D+00 +277 2.7600000000000D+00 -2.1739175916012D+00 +278 2.7700000000000D+00 -2.1660694685447D+00 +279 2.7800000000000D+00 -2.1582778075602D+00 +280 2.7900000000000D+00 -2.1505420015281D+00 +281 2.8000000000000D+00 -2.1428614520016D+00 +282 2.8100000000000D+00 -2.1352355690528D+00 +283 2.8200000000000D+00 -2.1276637711209D+00 +284 2.8300000000000D+00 -2.1201454848653D+00 +285 2.8400000000000D+00 -2.1126801450200D+00 +286 2.8500000000000D+00 -2.1052671942524D+00 +287 2.8600000000000D+00 -2.0979060830248D+00 +288 2.8700000000000D+00 -2.0905962694580D+00 +289 2.8800000000000D+00 -2.0833372191989D+00 +290 2.8900000000000D+00 -2.0761284052900D+00 +291 2.9000000000000D+00 -2.0689693080419D+00 +292 2.9100000000000D+00 -2.0618594149086D+00 +293 2.9200000000000D+00 -2.0547982203648D+00 +294 2.9300000000000D+00 -2.0477852257868D+00 +295 2.9400000000000D+00 -2.0408199393344D+00 +296 2.9500000000000D+00 -2.0339018758361D+00 +297 2.9600000000000D+00 -2.0270305566768D+00 +298 2.9700000000000D+00 -2.0202055096872D+00 +299 2.9800000000000D+00 -2.0134262690354D+00 +300 2.9900000000000D+00 -2.0066923751214D+00 +301 3.0000000000000D+00 -2.0000033744731D+00 +302 3.0100000000000D+00 -1.9933588196441D+00 +303 3.0200000000000D+00 -1.9867582691146D+00 +304 3.0300000000000D+00 -1.9802012871930D+00 +305 3.0400000000000D+00 -1.9736874439205D+00 +306 3.0500000000000D+00 -1.9672163149769D+00 +307 3.0600000000000D+00 -1.9607874815884D+00 +308 3.0700000000000D+00 -1.9544005304376D+00 +309 3.0800000000000D+00 -1.9480550535746D+00 +310 3.0900000000000D+00 -1.9417506483302D+00 +311 3.1000000000000D+00 -1.9354869172309D+00 +312 3.1100000000000D+00 -1.9292634679152D+00 +313 3.1200000000000D+00 -1.9230799130519D+00 +314 3.1300000000000D+00 -1.9169358702593D+00 +315 3.1400000000000D+00 -1.9108309620270D+00 +316 3.1500000000000D+00 -1.9047648156381D+00 +317 3.1600000000000D+00 -1.8987370630936D+00 +318 3.1700000000000D+00 -1.8927473410379D+00 +319 3.1800000000000D+00 -1.8867952906859D+00 +320 3.1900000000000D+00 -1.8808805577511D+00 +321 3.2000000000000D+00 -1.8750027923758D+00 +322 3.2100000000000D+00 -1.8691616490614D+00 +323 3.2200000000000D+00 -1.8633567866016D+00 +324 3.2300000000000D+00 -1.8575878680151D+00 +325 3.2400000000000D+00 -1.8518545604812D+00 +326 3.2500000000000D+00 -1.8461565352749D+00 +327 3.2600000000000D+00 -1.8404934677052D+00 +328 3.2700000000000D+00 -1.8348650370522D+00 +329 3.2800000000000D+00 -1.8292709265076D+00 +330 3.2900000000000D+00 -1.8237108231147D+00 +331 3.3000000000000D+00 -1.8181844177102D+00 +332 3.3100000000000D+00 -1.8126914048668D+00 +333 3.3200000000000D+00 -1.8072314828372D+00 +334 3.3300000000000D+00 -1.8018043534984D+00 +335 3.3400000000000D+00 -1.7964097222981D+00 +336 3.3500000000000D+00 -1.7910472982008D+00 +337 3.3600000000000D+00 -1.7857167936357D+00 +338 3.3700000000000D+00 -1.7804179244453D+00 +339 3.3800000000000D+00 -1.7751504098350D+00 +340 3.3900000000000D+00 -1.7699139723234D+00 +341 3.4000000000000D+00 -1.7647083376936D+00 +342 3.4100000000000D+00 -1.7595332349453D+00 +343 3.4200000000000D+00 -1.7543883962478D+00 +344 3.4300000000000D+00 -1.7492735568938D+00 +345 3.4400000000000D+00 -1.7441884552542D+00 +346 3.4500000000000D+00 -1.7391328327331D+00 +347 3.4600000000000D+00 -1.7341064337243D+00 +348 3.4700000000000D+00 -1.7291090055680D+00 +349 3.4800000000000D+00 -1.7241402985086D+00 +350 3.4900000000000D+00 -1.7192000656532D+00 +351 3.5000000000000D+00 -1.7142880629304D+00 +352 3.5100000000000D+00 -1.7094040490505D+00 +353 3.5200000000000D+00 -1.7045477854655D+00 +354 3.5300000000000D+00 -1.6997190363307D+00 +355 3.5400000000000D+00 -1.6949175684665D+00 +356 3.5500000000000D+00 -1.6901431513205D+00 +357 3.5600000000000D+00 -1.6853955569310D+00 +358 3.5700000000000D+00 -1.6806745598903D+00 +359 3.5800000000000D+00 -1.6759799373096D+00 +360 3.5900000000000D+00 -1.6713114687835D+00 +361 3.6000000000000D+00 -1.6666689363556D+00 +362 3.6100000000000D+00 -1.6620521244844D+00 +363 3.6200000000000D+00 -1.6574608200104D+00 +364 3.6300000000000D+00 -1.6528948121231D+00 +365 3.6400000000000D+00 -1.6483538923284D+00 +366 3.6500000000000D+00 -1.6438378544173D+00 +367 3.6600000000000D+00 -1.6393464944344D+00 +368 3.6700000000000D+00 -1.6348796106476D+00 +369 3.6800000000000D+00 -1.6304370035172D+00 +370 3.6900000000000D+00 -1.6260184756671D+00 +371 3.7000000000000D+00 -1.6216238318546D+00 +372 3.7100000000000D+00 -1.6172528789424D+00 +373 3.7200000000000D+00 -1.6129054258700D+00 +374 3.7300000000000D+00 -1.6085812836257D+00 +375 3.7400000000000D+00 -1.6042802652197D+00 +376 3.7500000000000D+00 -1.6000021856566D+00 +377 3.7600000000000D+00 -1.5957468619092D+00 +378 3.7700000000000D+00 -1.5915141128923D+00 +379 3.7800000000000D+00 -1.5873037594370D+00 +380 3.7900000000000D+00 -1.5831156242655D+00 +381 3.8000000000000D+00 -1.5789495319661D+00 +382 3.8100000000000D+00 -1.5748053089689D+00 +383 3.8200000000000D+00 -1.5706827835213D+00 +384 3.8300000000000D+00 -1.5665817856649D+00 +385 3.8400000000000D+00 -1.5625021472116D+00 +386 3.8500000000000D+00 -1.5584437017206D+00 +387 3.8600000000000D+00 -1.5544062844763D+00 +388 3.8700000000000D+00 -1.5503897324655D+00 +389 3.8800000000000D+00 -1.5463938843555D+00 +390 3.8900000000000D+00 -1.5424185804729D+00 +391 3.9000000000000D+00 -1.5384636627818D+00 +392 3.9100000000000D+00 -1.5345289748634D+00 +393 3.9200000000000D+00 -1.5306143618948D+00 +394 3.9300000000000D+00 -1.5267196706290D+00 +395 3.9400000000000D+00 -1.5228447493752D+00 +396 3.9500000000000D+00 -1.5189894479784D+00 +397 3.9600000000000D+00 -1.5151536178006D+00 +398 3.9700000000000D+00 -1.5113371117014D+00 +399 3.9800000000000D+00 -1.5075397840193D+00 +400 3.9900000000000D+00 -1.5037614905533D+00 +401 4.0000000000000D+00 -1.5000020885442D+00 +402 4.0100000000000D+00 -1.4962614366571D+00 +403 4.0200000000000D+00 -1.4925393949633D+00 +404 4.0300000000000D+00 -1.4888358249233D+00 +405 4.0400000000000D+00 -1.4851505893691D+00 +406 4.0500000000000D+00 -1.4814835524877D+00 +407 4.0600000000000D+00 -1.4778345798041D+00 +408 4.0700000000000D+00 -1.4742035381650D+00 +409 4.0800000000000D+00 -1.4705902957226D+00 +410 4.0900000000000D+00 -1.4669947219187D+00 +411 4.1000000000000D+00 -1.4634166874689D+00 +412 4.1100000000000D+00 -1.4598560643469D+00 +413 4.1200000000000D+00 -1.4563127257697D+00 +414 4.1300000000000D+00 -1.4527865461821D+00 +415 4.1400000000000D+00 -1.4492774012422D+00 +416 4.1500000000000D+00 -1.4457851678064D+00 +417 4.1600000000000D+00 -1.4423097239155D+00 +418 4.1700000000000D+00 -1.4388509487801D+00 +419 4.1800000000000D+00 -1.4354087227666D+00 +420 4.1900000000000D+00 -1.4319829273839D+00 +421 4.2000000000000D+00 -1.4285734452690D+00 +422 4.2100000000000D+00 -1.4251801601744D+00 +423 4.2200000000000D+00 -1.4218029569543D+00 +424 4.2300000000000D+00 -1.4184417215519D+00 +425 4.2400000000000D+00 -1.4150963409864D+00 +426 4.2500000000000D+00 -1.4117667033405D+00 +427 4.2600000000000D+00 -1.4084526977476D+00 +428 4.2700000000000D+00 -1.4051542143800D+00 +429 4.2800000000000D+00 -1.4018711444362D+00 +430 4.2900000000000D+00 -1.3986033801294D+00 +431 4.3000000000000D+00 -1.3953508146754D+00 +432 4.3100000000000D+00 -1.3921133422811D+00 +433 4.3200000000000D+00 -1.3888908581330D+00 +434 4.3300000000000D+00 -1.3856832583859D+00 +435 4.3400000000000D+00 -1.3824904401518D+00 +436 4.3500000000000D+00 -1.3793123014888D+00 +437 4.3600000000000D+00 -1.3761487413902D+00 +438 4.3700000000000D+00 -1.3729996597739D+00 +439 4.3800000000000D+00 -1.3698649574720D+00 +440 4.3900000000000D+00 -1.3667445362199D+00 +441 4.4000000000000D+00 -1.3636382986467D+00 +442 4.4100000000000D+00 -1.3605461482644D+00 +443 4.4200000000000D+00 -1.3574679894585D+00 +444 4.4300000000000D+00 -1.3544037274776D+00 +445 4.4400000000000D+00 -1.3513532684242D+00 +446 4.4500000000000D+00 -1.3483165192446D+00 +447 4.4600000000000D+00 -1.3452933877199D+00 +448 4.4700000000000D+00 -1.3422837824564D+00 +449 4.4800000000000D+00 -1.3392876128763D+00 +450 4.4900000000000D+00 -1.3363047892090D+00 +451 4.5000000000000D+00 -1.3333352224816D+00 +452 4.5100000000000D+00 -1.3303788245105D+00 +453 4.5200000000000D+00 -1.3274355078926D+00 +454 4.5300000000000D+00 -1.3245051859964D+00 +455 4.5400000000000D+00 -1.3215877729539D+00 +456 4.5500000000000D+00 -1.3186831836517D+00 +457 4.5600000000000D+00 -1.3157913337234D+00 +458 4.5700000000000D+00 -1.3129121395407D+00 +459 4.5800000000000D+00 -1.3100455182060D+00 +460 4.5900000000000D+00 -1.3071913875439D+00 +461 4.6000000000000D+00 -1.3043496660937D+00 +462 4.6100000000000D+00 -1.3015202731016D+00 +463 4.6200000000000D+00 -1.2987031285128D+00 +464 4.6300000000000D+00 -1.2958981529644D+00 +465 4.6400000000000D+00 -1.2931052677773D+00 +466 4.6500000000000D+00 -1.2903243949496D+00 +467 4.6600000000000D+00 -1.2875554571487D+00 +468 4.6700000000000D+00 -1.2847983777046D+00 +469 4.6800000000000D+00 -1.2820530806023D+00 +470 4.6900000000000D+00 -1.2793194904755D+00 +471 4.7000000000000D+00 -1.2765975325991D+00 +472 4.7100000000000D+00 -1.2738871328827D+00 +473 4.7200000000000D+00 -1.2711882178636D+00 +474 4.7300000000000D+00 -1.2685007147007D+00 +475 4.7400000000000D+00 -1.2658245511674D+00 +476 4.7500000000000D+00 -1.2631596556454D+00 +477 4.7600000000000D+00 -1.2605059571180D+00 +478 4.7700000000000D+00 -1.2578633851644D+00 +479 4.7800000000000D+00 -1.2552318699529D+00 +480 4.7900000000000D+00 -1.2526113422350D+00 +481 4.8000000000000D+00 -1.2500017333393D+00 +482 4.8100000000000D+00 -1.2474029751653D+00 +483 4.8200000000000D+00 -1.2448150001780D+00 +484 4.8300000000000D+00 -1.2422377414014D+00 +485 4.8400000000000D+00 -1.2396711324132D+00 +486 4.8500000000000D+00 -1.2371151073387D+00 +487 4.8600000000000D+00 -1.2345696008457D+00 +488 4.8700000000000D+00 -1.2320345481383D+00 +489 4.8800000000000D+00 -1.2295098849520D+00 +490 4.8900000000000D+00 -1.2269955475478D+00 +491 4.9000000000000D+00 -1.2244914727070D+00 +492 4.9100000000000D+00 -1.2219975977261D+00 +493 4.9200000000000D+00 -1.2195138604111D+00 +494 4.9300000000000D+00 -1.2170401990730D+00 +495 4.9400000000000D+00 -1.2145765525221D+00 +496 4.9500000000000D+00 -1.2121228600630D+00 +497 4.9600000000000D+00 -1.2096790614901D+00 +498 4.9700000000000D+00 -1.2072450970821D+00 +499 4.9800000000000D+00 -1.2048209075976D+00 +500 4.9900000000000D+00 -1.2024064342699D+00 +501 5.0000000000000D+00 -1.2000016188026D+00 +502 5.0100000000000D+00 -1.1976064033645D+00 +503 5.0200000000000D+00 -1.1952207305856D+00 +504 5.0300000000000D+00 -1.1928445435516D+00 +505 5.0400000000000D+00 -1.1904777858004D+00 +506 5.0500000000000D+00 -1.1881204013168D+00 +507 5.0600000000000D+00 -1.1857723345286D+00 +508 5.0700000000000D+00 -1.1834335303019D+00 +509 5.0800000000000D+00 -1.1811039339370D+00 +510 5.0900000000000D+00 -1.1787834911640D+00 +511 5.1000000000000D+00 -1.1764721481387D+00 +512 5.1100000000000D+00 -1.1741698514383D+00 +513 5.1200000000000D+00 -1.1718765480576D+00 +514 5.1300000000000D+00 -1.1695921854044D+00 +515 5.1400000000000D+00 -1.1673167112960D+00 +516 5.1500000000000D+00 -1.1650500739548D+00 +517 5.1600000000000D+00 -1.1627922220047D+00 +518 5.1700000000000D+00 -1.1605431044670D+00 +519 5.1800000000000D+00 -1.1583026707569D+00 +520 5.1900000000000D+00 -1.1560708706792D+00 +521 5.2000000000000D+00 -1.1538476544248D+00 +522 5.2100000000000D+00 -1.1516329725673D+00 +523 5.2200000000000D+00 -1.1494267760587D+00 +524 5.2300000000000D+00 -1.1472290162264D+00 +525 5.2400000000000D+00 -1.1450396447691D+00 +526 5.2500000000000D+00 -1.1428586137538D+00 +527 5.2600000000000D+00 -1.1406858756116D+00 +528 5.2700000000000D+00 -1.1385213831352D+00 +529 5.2800000000000D+00 -1.1363650894743D+00 +530 5.2900000000000D+00 -1.1342169481334D+00 +531 5.3000000000000D+00 -1.1320769129676D+00 +532 5.3100000000000D+00 -1.1299449381797D+00 +533 5.3200000000000D+00 -1.1278209783168D+00 +534 5.3300000000000D+00 -1.1257049882672D+00 +535 5.3400000000000D+00 -1.1235969232569D+00 +536 5.3500000000000D+00 -1.1214967388469D+00 +537 5.3600000000000D+00 -1.1194043909298D+00 +538 5.3700000000000D+00 -1.1173198357265D+00 +539 5.3800000000000D+00 -1.1152430297836D+00 +540 5.3900000000000D+00 -1.1131739299703D+00 +541 5.4000000000000D+00 -1.1111124934750D+00 +542 5.4100000000000D+00 -1.1090586778027D+00 +543 5.4200000000000D+00 -1.1070124407721D+00 +544 5.4300000000000D+00 -1.1049737405127D+00 +545 5.4400000000000D+00 -1.1029425354617D+00 +546 5.4500000000000D+00 -1.1009187843613D+00 +547 5.4600000000000D+00 -1.0989024462562D+00 +548 5.4700000000000D+00 -1.0968934804904D+00 +549 5.4800000000000D+00 -1.0948918467046D+00 +550 5.4900000000000D+00 -1.0928975048338D+00 +551 5.5000000000000D+00 -1.0909104151042D+00 +552 5.5100000000000D+00 -1.0889305380307D+00 +553 5.5200000000000D+00 -1.0869578344145D+00 +554 5.5300000000000D+00 -1.0849922653401D+00 +555 5.5400000000000D+00 -1.0830337921731D+00 +556 5.5500000000000D+00 -1.0810823765576D+00 +557 5.5600000000000D+00 -1.0791379804136D+00 +558 5.5700000000000D+00 -1.0772005659345D+00 +559 5.5800000000000D+00 -1.0752700955848D+00 +560 5.5900000000000D+00 -1.0733465320974D+00 +561 5.6000000000000D+00 -1.0714298384717D+00 +562 5.6100000000000D+00 -1.0695199779706D+00 +563 5.6200000000000D+00 -1.0676169141188D+00 +564 5.6300000000000D+00 -1.0657206106997D+00 +565 5.6400000000000D+00 -1.0638310317541D+00 +566 5.6500000000000D+00 -1.0619481415769D+00 +567 5.6600000000000D+00 -1.0600719047155D+00 +568 5.6700000000000D+00 -1.0582022859676D+00 +569 5.6800000000000D+00 -1.0563392503785D+00 +570 5.6900000000000D+00 -1.0544827632393D+00 +571 5.7000000000000D+00 -1.0526327900848D+00 +572 5.7100000000000D+00 -1.0507892966912D+00 +573 5.7200000000000D+00 -1.0489522490738D+00 +574 5.7300000000000D+00 -1.0471216134855D+00 +575 5.7400000000000D+00 -1.0452973564141D+00 +576 5.7500000000000D+00 -1.0434794445805D+00 +577 5.7600000000000D+00 -1.0416678449370D+00 +578 5.7700000000000D+00 -1.0398625246647D+00 +579 5.7800000000000D+00 -1.0380634511719D+00 +580 5.7900000000000D+00 -1.0362705920922D+00 +581 5.8000000000000D+00 -1.0344839152822D+00 +582 5.8100000000000D+00 -1.0327033888199D+00 +583 5.8200000000000D+00 -1.0309289810026D+00 +584 5.8300000000000D+00 -1.0291606603453D+00 +585 5.8400000000000D+00 -1.0273983955785D+00 +586 5.8500000000000D+00 -1.0256421556466D+00 +587 5.8600000000000D+00 -1.0238919097058D+00 +588 5.8700000000000D+00 -1.0221476271227D+00 +589 5.8800000000000D+00 -1.0204092774722D+00 +590 5.8900000000000D+00 -1.0186768305357D+00 +591 5.9000000000000D+00 -1.0169502562997D+00 +592 5.9100000000000D+00 -1.0152295249537D+00 +593 5.9200000000000D+00 -1.0135146068886D+00 +594 5.9300000000000D+00 -1.0118054726950D+00 +595 5.9400000000000D+00 -1.0101020931617D+00 +596 5.9500000000000D+00 -1.0084044392737D+00 +597 5.9600000000000D+00 -1.0067124822108D+00 +598 5.9700000000000D+00 -1.0050261933459D+00 +599 5.9800000000000D+00 -1.0033455442434D+00 +600 5.9900000000000D+00 -1.0016705066575D+00 +1 0.0000000000000D+00 4.3026267910874D+01 2.1416669682139D-07 -8.2513768375804D+02 -6.8965508489782D-05 4.4455291133273D+04 +2 1.0000000000000D-02 4.2985029581475D+01 -8.2439707434979D+00 -8.2291647003323D+02 4.4393164455276D+02 4.4268330332957D+04 +3 2.0000000000000D-02 4.2861536447965D+01 -1.6443579483688D+01 -8.1627151796711D+02 8.8412599997030D+02 4.3708818040024D+04 +4 3.0000000000000D-02 4.2656452576501D+01 -2.4554837601132D+01 -8.0525873634310D+02 1.3168872101156D+03 4.2783124371533D+04 +5 4.0000000000000D-02 4.2370878474114D+01 -3.2534499103935D+01 -7.8997060951897D+02 1.7386017713035D+03 4.1501532176981D+04 +6 5.0000000000000D-02 4.2006341885886D+01 -4.0340421646783D+01 -7.7053517886779D+02 2.1457782980182D+03 3.9878194328507D+04 +7 6.0000000000000D-02 4.1564785002597D+01 -4.7931915351333D+01 -7.4711462923677D+02 2.5350856741533D+03 3.7930977925853D+04 +8 7.0000000000000D-02 4.1048548257122D+01 -5.5270075617618D+01 -7.1990350426395D+02 2.9033890537283D+03 3.5681227451624D+04 +9 8.0000000000000D-02 4.0460350887851D+01 -6.2318096330277D+01 -6.8912657439258D+02 3.2477832440024D+03 3.3153478912376D+04 +10 9.0000000000000D-02 3.9803268482073D+01 -6.9041560124893D+01 -6.5503638596164D+02 3.5656230386621D+03 3.0375136006631D+04 +11 1.0000000000000D-01 3.9080707744179D+01 -7.5408702684344D+01 -6.1791052384770D+02 3.8545501144919D+03 2.7376108736303D+04 +12 1.1000000000000D-01 3.8296378762080D+01 -8.1390648378284D+01 -5.7804862373338D+02 4.1125161584323D+03 2.4188421621433D+04 +13 1.2000000000000D-01 3.7454265070320D+01 -8.6961614935344D+01 -5.3576917312643D+02 4.3378019493888D+03 2.0845797409043D+04 +14 1.3000000000000D-01 3.6558591829412D+01 -9.2099085241667D+01 -4.9140614270889D+02 4.5290321799577D+03 1.7383222464990D+04 +15 1.4000000000000D-01 3.5613792457913D+01 -9.6783944784849D+01 -4.4530549142357D+02 4.6851858675049D+03 1.3836500347528D+04 +16 1.5000000000000D-01 3.4624474066357D+01 -1.0100058370291D+02 -3.9782158988501D+02 4.8056022695925D+03 1.0241800184855D+04 +17 1.6000000000000D-01 3.3595382050316D+01 -1.0473696284686D+02 -3.4931360722021D+02 4.8899822849452D+03 6.6352065249742D+03 +18 1.7000000000000D-01 3.2531364203550D+01 -1.0798464371645D+02 -3.0014190630268D+02 4.9383853870944D+03 3.0522770632315D+03 +19 1.8000000000000D-01 3.1437334711340D+01 -1.1073878257475D+02 -2.5066449155046D+02 4.9512222016934D+03 -4.7238528650336D+02 +20 1.9000000000000D-01 3.0318238378866D+01 -1.1299808948236D+02 -2.0123355203665D+02 4.9292429003973D+03 -3.9055402018695D+03 +21 2.0000000000000D-01 2.9179015439991D+01 -1.1476475341008D+02 -1.5219214064125D+02 4.8735216418231D+03 -7.2156918524306D+03 +22 2.1000000000000D-01 2.8024567278214D+01 -1.1604433498335D+02 -1.0387102739491D+02 4.7854373437036D+03 -1.0373439919553D+04 +23 2.2000000000000D-01 2.6859723374151D+01 -1.1684562877873D+02 -5.6585762079123D+01 4.6666511184963D+03 -1.3351795210791D+04 +24 2.3000000000000D-01 2.5689209773049D+01 -1.1718049742552D+02 -1.0633977610253D+01 4.5190807466181D+03 -1.6126455917469D+04 +25 2.4000000000000D-01 2.4517619341730D+01 -1.1706368006190D+02 3.3707038191905D+01 4.3448725971069D+03 -1.8676041395222D+04 +26 2.5000000000000D-01 2.3349384057628D+01 -1.1651257794982D+02 7.6182479095097D+01 4.1463714338490D+03 -2.0982280395077D+04 +27 2.6000000000000D-01 2.2188749543384D+01 -1.1554702026428D+02 1.1656184633211D+02 3.9260885960110D+03 -2.3030167912555D+04 +28 2.7000000000000D-01 2.1039752029485D+01 -1.1418901324024D+02 1.5464044969491D+02 3.6866689309490D+03 -2.4807996151351D+04 +29 2.8000000000000D-01 1.9906197894969D+01 -1.1246247596138D+02 1.9024057451553D+02 3.4308568005153D+03 -2.6307518732553D+04 +30 2.9000000000000D-01 1.8791645902846D+01 -1.1039296619883D+02 2.2321230919035D+02 3.1614629077644D+03 -2.7523834749759D+04 +31 3.0000000000000D-01 1.7699392213027D+01 -1.0800739964021D+02 2.5343403479170D+02 2.8813296450132D+03 -2.8455405434230D+04 +32 3.1000000000000D-01 1.6632458221714D+01 -1.0533376591850D+02 2.8081257970717D+02 2.5932985675726D+03 -2.9103947610709D+04 +33 3.2000000000000D-01 1.5593581242809D+01 -1.0240084472299D+02 3.0528304943196D+02 2.3001783500134D+03 -2.9474293184770D+04 +34 3.3000000000000D-01 1.4585208014446D+01 -9.9237925185364D+01 3.2680834445070D+02 2.0047143860165D+03 -2.9574230174403D+04 +35 3.4000000000000D-01 1.3609490982551D+01 -9.5874531577881D+01 3.4537838309770D+02 1.7095602640758D+03 -2.9414295883698D+04 +36 3.5000000000000D-01 1.2668287283901D+01 -9.2340158173763D+01 3.6100904992237D+02 1.4172514529061D+03 -2.9007539144479D+04 +37 3.6000000000000D-01 1.1763160323718D+01 -8.8664015899432D+01 3.7374089303620D+02 1.1301814514125D+03 -2.8369257971365D+04 +38 3.7000000000000D-01 1.0895383817731D+01 -8.4874793160754D+01 3.8363759653612D+02 8.5058067124330D+02 -2.7516720507855D+04 +39 3.8000000000000D-01 1.0065948146211D+01 -8.1000432953303D+01 3.9078425616955D+02 5.8049824063103D+02 -2.6468867297579D+04 +40 3.9000000000000D-01 9.2755688477668D+00 -7.7067928076088D+01 3.9528548799314D+02 3.2178683456221D+02 -2.5245996424212D+04 +41 4.0000000000000D-01 8.5246970640471D+00 -7.3103135964508D+01 3.9726340109120D+02 7.6090637778909D+01 -2.3869452412999D+04 +42 4.1000000000000D-01 7.8135317328680D+00 -6.9130614345399D+01 3.9685546578654D+02 -1.5516350102511D+02 -2.2361307774901D+04 +43 4.2000000000000D-01 7.1420333168622D+00 -6.5173478599890D+01 3.9421230905613D+02 -3.7077178356233D+02 -2.0744046990863D+04 +44 4.3000000000000D-01 6.5099388474473D+00 -6.1253281405131D+01 3.8949546855755D+02 -5.6975605796075D+02 -1.9040264798456D+04 +45 4.4000000000000D-01 5.9167780597712D+00 -5.7389914915669D+01 3.8287513566900D+02 -7.5136341771050D+02 -1.7272368696404D+04 +46 4.5000000000000D-01 5.3618903931842D+00 -5.3601535445718D+01 3.7452791700549D+02 -9.1506295359069D+02 -1.5462304844890D+04 +47 4.6000000000000D-01 4.8444426336198D+00 -4.9904510328575D+01 3.6463464198024D+02 -1.0605398118243D+03 -1.3631298142695D+04 +48 4.7000000000000D-01 4.3634469788546D+00 -4.6313386361267D+01 3.5337824226110D+02 -1.1876868027081D+03 -1.1799618280207D+04 +49 4.8000000000000D-01 3.9177793147894D+00 -4.2840878996785D+01 3.4094172655923D+02 -1.2965937632496D+03 -9.9863690276292D+03 +50 4.9000000000000D-01 3.5061975004055D+00 -3.9497881222816D+01 3.2750627177674D+02 -1.3875349697492D+03 -8.2093054027724D+03 +51 5.0000000000000D-01 3.1273594706641D+00 -3.6293490870095D+01 3.1324944879124D+02 -1.4609548446423D+03 -6.4846791797242D+03 +52 5.1000000000000D-01 2.7798409800531D+00 -3.3235054923929D+01 2.9834359832667D+02 -1.5174522802413D+03 -4.8271134229970D+03 +53 5.2000000000000D-01 2.4621528244760D+00 -3.0328229273353D+01 2.8295436943242D+02 -1.5577638471969D+03 -3.2495079436231D+03 +54 5.3000000000000D-01 2.1727573954104D+00 -2.7577052221547D+01 2.6723943005690D+02 -1.5827462107435D+03 -1.7629730281322D+03 +55 5.4000000000000D-01 1.9100844374435D+00 -2.4984030001414D+01 2.5134735631340D+02 -1.5933580317561D+03 -3.7679371534881D+02 +56 5.5000000000000D-01 1.6725458981453D+00 -2.2550232488858D+01 2.3541670402583D+02 -1.5906416488200D+03 9.0157706762508D+02 +57 5.6000000000000D-01 1.4585497774433D+00 -2.0275397284521D+01 2.1957526335569D+02 -1.5757048282983D+03 2.0665056799131D+03 +58 5.7000000000000D-01 1.2665129019373D+00 -1.8158040340483D+01 2.0393949490776D+02 -1.5497027762847D+03 3.1141199221720D+03 +59 5.8000000000000D-01 1.0948725677367D+00 -1.6195571336283D+01 1.8861414218467D+02 -1.5138208405864D+03 4.0422644040153D+03 +60 5.9000000000000D-01 9.4209701300541D-01 -1.4384412074298D+01 1.7369201512801D+02 -1.4692577170296D+03 4.8503917749109D+03 +61 6.0000000000000D-01 8.0669469850527D-01 -1.2720116219713D+01 1.5925393456385D+02 -1.4172099938357D+03 5.5394687828270D+03 +62 6.1000000000000D-01 6.8722239047376D-01 -1.1197488837313D+01 1.4536882796683D+02 -1.3588574390912D+03 6.1118587836082D+03 +63 6.2000000000000D-01 5.8229205533869D-01 -9.8107042581526D+00 1.3209396453041D+02 -1.2953498402373D+03 6.5711792774945D+03 +64 6.3000000000000D-01 4.9057658965357D-01 -8.5534209589601D+00 1.1947531586570D+02 -1.2277950642698D+03 6.9221688200504D+03 +65 6.4000000000000D-01 4.1081442119590D-01 -7.4188922619293D+00 1.0754802853630D+02 -1.1572486373813D+03 7.1705333161899D+03 +66 6.5000000000000D-01 3.4181302837834D-01 -6.4000718128846D+00 9.6336993413247D+01 -1.0847048122172D+03 7.3227954657537D+03 +67 6.6000000000000D-01 2.8245143476852D-01 -5.4897129449967D+00 8.5857496652343D+01 -1.0110891748731D+03 7.3861403747260D+03 +68 6.7000000000000D-01 2.3168174368475D-01 -4.6804611884793D+00 7.6115936934272D+01 -9.3725278426977D+02 7.3682632315673D+03 +69 6.8000000000000D-01 1.8852978447400D-01 -3.9649393402168D+00 6.7110593743505D+01 -8.6396781845234D+02 7.2772206465969D+03 +70 6.9000000000000D-01 1.5209494717200D-01 -3.3358246575878D+00 5.8832431838012D+01 -7.9192468081135D+02 7.1212877170904D+03 +71 7.0000000000000D-01 1.2154928586945D-01 -2.7859178862408D+00 5.1265927631958D+01 -7.2173049803256D+02 6.9088229018444D+03 +72 7.1000000000000D-01 9.6135973316048D-02 -2.3082039711726D+00 4.4389903992567D+01 -6.5390892375325D+02 6.6481422401144D+03 +73 7.2000000000000D-01 7.5167190134471D-02 -1.8959044305611D+00 3.8178360884724D+01 -5.8890114765825D+02 6.3474042563877D+03 +74 7.3000000000000D-01 5.8021531614401D-02 -1.5425214922793D+00 3.2601290361954D+01 -5.2706799716695D+02 6.0145067033182D+03 +75 7.4000000000000D-01 4.4141013493266D-02 -1.2418742023716D+00 2.7625465587275D+01 -4.6869300922599D+02 5.6569958853429D+03 +76 7.5000000000000D-01 3.3027755561855D-02 -9.8812681133792D-01 2.3215194815919D+01 -4.1398634375407D+02 5.2819890897410D+03 +77 7.6000000000000D-01 2.4240418418848D-02 -7.7580982872437D-01 1.9333032589501D+01 -3.6308940588534D+02 4.8961104068276D+03 +78 7.7000000000000D-01 1.7390464443632D-02 -5.9983420700773D-01 1.5940441721677D+01 -3.1608004309848D+02 4.5054399100418D+03 +79 7.8000000000000D-01 1.2138309143405D-02 -4.5549917339594D-01 1.2998400991875D+01 -2.7297818460082D+02 4.1154759856490D+03 +80 7.9000000000000D-01 8.1894236123923D-03 -3.3849427240614D-01 1.0467954774406D+01 -2.3375179364830D+02 3.7311102213042D+03 +81 8.0000000000000D-01 5.2904430452671D-03 -2.4489621342595D-01 8.3107020977427D+00 -1.9832300952100D+02 3.3566149599517D+03 +82 8.1000000000000D-01 3.2253301998799D-03 -1.7116113644210D-01 6.4892238297903D+00 -1.6657435914393D+02 2.9956398694147D+03 +83 8.2000000000000D-01 1.8116365264201D-03 -1.1411291647425D-01 4.9674478179924D+00 -1.3835494990878D+02 2.6512231477528D+03 +84 8.3000000000000D-01 8.9689748326907D-04 -7.0928123822973D-02 3.7109527466084D+00 -1.1348647341960D+02 2.3258163301405D+03 +85 8.4000000000000D-01 3.5519244661550D-04 -3.9118244254963D-02 2.6872130156110D+00 -9.1769059014209D+01 2.0212623872763D+03 +86 8.5000000000000D-01 8.3893683066801D-05 -1.6509738772618D-02 1.8657854159740D+00 -7.2987149069802D+01 1.7389075050495D+03 +87 8.6000000000000D-01 6.2318272041938D-07 -1.2225107887720D-03 1.2184421960364D+00 -5.6913490085537D+01 1.4797631210747D+03 +88 8.7000000000000D-01 4.0430768150206D-05 8.3527537475051D-03 7.1927068182647D-01 -4.3313268534811D+01 1.2442027830890D+03 +89 8.8000000000000D-01 1.5320286553943D-04 1.3578026098616D-02 3.4471369527205D-01 -3.1951987911382D+01 1.0318612708144D+03 +90 8.9000000000000D-01 3.0130680726152D-04 1.5591359966885D-02 7.3532913421705D-02 -2.2600332724880D+01 8.4221319462172D+02 +91 9.0000000000000D-01 4.5746651876097D-04 1.5329793216602D-02 -1.1324182272295D-01 -1.5033671033823D+01 6.7477806715452D+02 +92 9.1000000000000D-01 6.0286499711819D-04 1.3551811680646D-02 -2.3236004511209D-01 -9.0332063171822D+00 5.2881069949889D+02 +93 9.2000000000000D-01 7.2546875578224D-04 1.0859207748815D-02 -2.9842734490599D-01 -4.3895611466604D+00 4.0320420874562D+02 +94 9.3000000000000D-01 8.1856635901268D-04 7.7179887201897D-03 -3.2401569724382D-01 -9.0571406848179D-01 2.9661448617388D+02 +95 9.4000000000000D-01 8.7951010670348D-04 4.4780628476291D-03 -3.1979658320865D-01 1.6011400380074D+00 2.0754552702259D+02 +96 9.5000000000000D-01 9.0864764177283D-04 1.3915096321182D-03 -2.9469022763680D-01 3.2982699759029D+00 1.3439731453564D+02 +97 9.6000000000000D-01 9.0842859579640D-04 -1.3706996495689D-03 -2.5602518124007D-01 4.3366713547196D+00 7.5524658141125D+01 +98 9.7000000000000D-01 8.8267036444441D-04 -3.7036039566846D-03 -2.0970240053667D-01 4.8508720442033D+00 2.9285916009097D+01 +99 9.8000000000000D-01 8.3596664334913D-04 -5.5547977502019D-03 -1.6035910558736D-01 4.9591604074056D+00 -5.9194824557353D+00 +100 9.9000000000000D-01 7.7322237948393D-04 -6.9125973253027D-03 -1.1152859934089D-01 4.7641495358734D+00 -3.1621953890938D+01 +101 1.0000000000000D+00 6.9929916209457D-04 -7.7957729125392D-03 -6.5793131459996D-02 4.3535881991666D+00 -4.9261133254555D+01 +102 1.0100000000000D+00 6.1875579899889D-04 -8.2447655318766D-03 -2.4927750882644D-02 3.8013419096554D+00 -6.0172293866438D+01 +103 1.0200000000000D+00 5.3566969885272D-04 -8.3142913621579D-03 9.9662320384159D-03 3.1684800512247D+00 -6.5578485517356D+01 +104 1.0300000000000D+00 4.5352572065539D-04 -8.0672252630547D-03 3.8338968972490D-02 2.5044185478161D+00 -6.6587078111555D+01 +105 1.0400000000000D+00 3.7516025803202D-04 -7.5696494717200D-03 6.0081338841972D-02 1.8480800333997D+00 -6.4189530213911D+01 +106 1.0500000000000D+00 3.0274952572765D-04 -6.8869518212161D-03 7.5425782476466D-02 1.2290445187493D+00 -5.9263407958143D+01 +107 1.0600000000000D+00 2.3783204930087D-04 -6.0808583394875D-03 8.4858520492733D-02 6.6867168155081D-01 -5.2575876716753D+01 +108 1.0700000000000D+00 1.8135665330709D-04 -5.2072882488693D-03 8.9042798164235D-02 1.8118334708211D-01 -4.4788137266516D+01 +109 1.0800000000000D+00 1.3374823333051D-04 -4.3149231421150D-03 8.8752723364424D-02 -2.2530159333902D-01 -3.6460450261406D+01 +110 1.0900000000000D+00 9.4984694057564D-05 -3.4443868440253D-03 8.4817195668177D-02 -5.4778460718264D-01 -2.8057560049179D+01 +111 1.1000000000000D+00 6.4679480598431D-05 -2.6279380348734D-03 7.8073382832135D-02 -7.8746086517945D-01 -1.9954444279905D+01 +112 1.1100000000000D+00 4.2164951838528D-05 -1.8895823448808D-03 6.9329173231838D-02 -9.4885165955431D-01 -1.2442390704943D+01 +113 1.1200000000000D+00 2.6572934785740D-05 -1.2455178126007D-03 5.9333993088871D-02 -1.0389994138883D+00 -5.7354448804098D+00 +114 1.1300000000000D+00 1.6909480189199D-05 -7.0483282066491D-04 4.8757345262469D-02 -1.0667292142149D+00 2.2732340255436D-02 +115 1.1400000000000D+00 1.2121726293484D-05 -2.7038345061924D-04 3.8174379970199D-02 -1.0419809982582D+00 4.7515811394692D+00 +116 1.1500000000000D+00 1.1155314658902D-05 6.0217774743673D-05 2.8057776709133D-02 -9.7521672151147D-01 8.4259420129646D+00 +117 1.1600000000000D+00 1.3001641819428D-05 2.9355999260192D-04 1.8775160854188D-02 -8.7690635253500D-01 1.1068010508338D+01 +118 1.1700000000000D+00 1.6734642524924D-05 4.3939070752227D-04 1.0591252477779D-02 -7.5709561715654D-01 1.2739058695702D+01 +119 1.1800000000000D+00 2.1537330247973D-05 5.0961350586383D-04 3.6739256325999D-03 -6.2505687635459D-01 1.3531075511059D+01 +120 1.1900000000000D+00 2.6718634466055D-05 5.1736367366429D-04 -1.8966615264481D-03 -4.8902356870303D-01 1.3558508460854D+01 +121 1.2000000000000D+00 3.1721522764832D-05 4.7618638345119D-04 -6.1166917127479D-03 -3.5600571689383D-01 1.2950315338873D+01 +122 1.2100000000000D+00 3.6123496527568D-05 3.9933606578811D-04 -9.0458505587450D-03 -2.3168240326857D-01 1.1842521786947D+01 +123 1.2200000000000D+00 3.9630723125736D-05 2.9920908646316D-04 -1.0793779187804D-02 -1.2036553885999D-01 1.0371480629696D+01 +124 1.2300000000000D+00 4.2067193116429D-05 1.8691256380369D-04 -1.1506494461997D-02 -2.5026761411968D-02 8.6680028942840D+00 +125 1.2400000000000D+00 4.3360229105316D-05 7.1966156640612D-05 -1.1353344338973D-02 5.2621983096768D-02 6.8524799841678D+00 +126 1.2500000000000D+00 4.3523635632242D-05 -3.7870131305079D-05 -1.0514993340038D-02 1.1200425724067D-01 5.0310865493132D+00 +127 1.2600000000000D+00 4.2639740895544D-05 -1.3665461266705D-04 -9.1728408264706D-03 1.5352270750277D-01 3.2931104913989D+00 +128 1.2700000000000D+00 4.0841325716815D-05 -2.2022546997913D-04 -7.5000982546812D-03 1.7838148468190D-01 1.7093787070246D+00 +129 1.2800000000000D+00 3.8294340001690D-05 -2.8608168107599D-04 -5.6547030978994D-03 1.8839796653319D-01 3.3173110463572D-01 +130 1.2900000000000D+00 3.5182186061592D-05 -3.3320294192140D-04 -3.7741470058486D-03 1.8581453468031D-01 -8.0655234729602D-01 +131 1.3000000000000D+00 3.1691977115748D-05 -3.6182703291217D-04 -1.9721260108573D-03 1.7311840957873D-01 -1.6895226214091D+00 +132 1.3100000000000D+00 2.8003171903232D-05 -3.7320206627787D-04 -3.3693075291465D-04 1.5287711703630D-01 -2.3166710982247D+00 +133 1.3200000000000D+00 2.4278775574171D-05 -3.6933150954799D-04 1.0686174706309D-03 1.2759599951604D-01 -2.7005622432571D+00 +134 1.3300000000000D+00 2.0659017727497D-05 -3.5272415287436D-04 2.2059409042092D-03 9.9600303804369D-02 -2.8641608268881D+00 +135 1.3400000000000D+00 1.7257490173848D-05 -3.2616233201055D-04 3.0584244074541D-03 7.0945268909045D-02 -2.8380236691902D+00 +136 1.3500000000000D+00 1.4159462753985D-05 -2.9249752888576D-04 3.6283911633878D-03 4.3354381797426D-02 -2.6575284608888D+00 +137 1.3600000000000D+00 1.1422074387781D-05 -2.5447731586865D-04 3.9335773407990D-03 1.8184061667107D-02 -2.3602477540017D+00 +138 1.3700000000000D+00 9.0760895703806D-06 -2.1461063809025D-04 4.0033998992117D-03 -3.5859943341697D-03 -1.9836187907088D+00 +139 1.3800000000000D+00 7.1287943974430D-06 -1.7506948004969D-04 3.8752336382698D-03 -2.1341427918413D-02 -1.5629649152711D+00 +140 1.3900000000000D+00 5.5677239430189D-06 -1.3762689198996D-04 3.5908755311327D-03 -3.4803791781329D-02 -1.1299227351859D+00 +141 1.4000000000000D+00 4.3647928567425D-06 -1.0362931912648D-04 3.1934128828146D-03 -4.3987792959972D-02 -7.1132968394486D-01 +142 1.4100000000000D+00 3.4806027736658D-06 -7.3997161065703D-05 2.7245247826702D-03 -4.9149392274659D-02 -3.2852372716083D-01 +143 1.4200000000000D+00 2.8685830043495D-06 -4.9250261836178D-05 2.2223622796336D-03 -5.0729110148898D-02 2.9270303530214D-03 +144 1.4300000000000D+00 2.4787837733031D-06 -2.9551159610272D-05 1.7199910374781D-03 -4.9294667953187D-02 2.7313951690823D-01 +145 1.4400000000000D+00 2.2612018380469D-06 -1.4761807023404D-05 1.2443896803834D-03 -4.5485459641922D-02 4.7752131644766D-01 +146 1.4500000000000D+00 2.1684379468457D-06 -4.5065854543951D-06 8.1599925835458D-04 -3.9963198868960D-02 6.1613830659791D-01 +147 1.4600000000000D+00 2.1577760099809D-06 1.7613274704721D-06 4.4871081140244D-04 -3.3368662841760D-02 6.9291550506453D-01 +148 1.4700000000000D+00 2.1925491042293D-06 4.6965871308447D-06 1.5025962518860D-04 -2.6287931676125D-02 7.1474508556340D-01 +149 1.4800000000000D+00 2.2429334764433D-06 5.0031257467840D-06 -7.7099906591517D-05 -1.9227114703454D-02 6.9056662549113D-01 +150 1.4900000000000D+00 2.2861749395826D-06 3.3835035382630D-06 -2.3570043526727D-04 -1.2596397391229D-02 6.3047202949170D-01 +151 1.5000000000000D+00 2.3063670665150D-06 4.9841994823691D-07 -3.3146989348477D-04 -6.7027500789148D-03 5.4490304157410D-01 +152 1.5100000000000D+00 2.2938622510170D-06 -3.0646590415739D-06 -3.7287743038024D-04 -1.7499062992028D-03 4.4394108922901D-01 +153 1.5200000000000D+00 2.2444413435106D-06 -6.8112108978969D-06 -3.6994877286248D-04 2.1550499107065D-03 3.3676398998690D-01 +154 1.5300000000000D+00 2.1583068083308D-06 -1.0351060989720D-05 -3.3333253549555D-04 4.9904698850402D-03 2.3122230452099D-01 +155 1.5400000000000D+00 2.0390369614707D-06 -1.3400231685769D-05 -2.7353384753699D-04 6.8055520840124D-03 1.3360072900422D-01 +156 1.5500000000000D+00 1.8925300822987D-06 -1.5776435243948D-05 -2.0027457516010D-04 7.7038691086297D-03 4.8504147702730D-02 +157 1.5600000000000D+00 1.7260425254229D-06 -1.7388671399383D-05 -1.2204194112915D-04 7.8265295233468D-03 -2.1168576054298D-02 +158 1.5700000000000D+00 1.5473405815153D-06 -1.8223408005430D-05 -4.5791584909360D-05 7.3360308443307D-03 -7.4114723816971D-02 +159 1.5800000000000D+00 1.3640035959308D-06 -1.8328273314667D-05 2.3188675139332D-05 6.4010110730359D-03 -1.1022674445598D-01 +160 1.5900000000000D+00 1.1829009105686D-06 -1.7795523985091D-05 8.1282655133188D-05 5.1841239160744D-03 -1.3043072535597D-01 +161 1.6000000000000D+00 1.0098220768142D-06 -1.6745446711534D-05 1.2643183048896D-04 3.8349356204514D-03 -1.3695770211195D-01 +162 1.6100000000000D+00 8.4927675658834D-07 -1.5312060363905D-05 1.5794794430715D-04 2.4815038834802D-03 -1.3266218277249D-01 +163 1.6200000000000D+00 7.0441954445005D-07 -1.3630118180621D-05 1.7629489937444D-04 1.2163564752022D-03 -1.1992122463763D-01 +164 1.6300000000000D+00 5.7709362594809D-07 -1.1825726549872D-05 1.8280275460853D-04 1.0469856431344D-04 -1.0102701980176D-01 +165 1.6400000000000D+00 4.6796110951467D-07 -1.0008424075358D-05 1.7922730344474D-04 -7.9553932276649D-04 -7.7905142174643D-02 +166 1.6500000000000D+00 3.7668126741010D-07 -8.2672022719954D-06 1.6767575691597D-04 -1.4522782047772D-03 -5.2701775165161D-02 +167 1.6600000000000D+00 3.0213988357132D-07 -6.6703204569745D-06 1.5076662293547D-04 -1.8685980135495D-03 -3.0443384894469D-02 +168 1.6700000000000D+00 2.4266548511583D-07 -5.2630319776885D-06 1.3092031155545D-04 -2.0738077841123D-03 -1.4868098844767D-02 +169 1.6800000000000D+00 1.9624071004823D-07 -4.0621969832471D-06 1.0972977741185D-04 -2.1492043379552D-03 -4.2075897804604D-03 +170 1.6900000000000D+00 1.6069764430165D-07 -3.0699350114530D-06 8.8360317416793D-05 -2.1608804970721D-03 4.7644269937100D-03 +171 1.7000000000000D+00 1.3401018611180D-07 -2.2900516920608D-06 6.7359933593156D-05 -2.0730646510439D-03 1.6238890762731D-02 +172 1.7100000000000D+00 1.1421681893910D-07 -1.7158751740785D-06 4.7339036767209D-05 -1.8404883254566D-03 3.2324632409072D-02 +173 1.7200000000000D+00 9.9218636125474D-08 -1.3276431432049D-06 3.0383540641525D-05 -1.4567095598777D-03 4.5776759633025D-02 +174 1.7300000000000D+00 8.7209748285856D-08 -1.0938392718875D-06 1.8328905009777D-05 -9.4964298308923D-04 4.8831942152031D-02 +175 1.7400000000000D+00 7.7013108878189D-08 -9.5607635711288D-07 1.1346590602906D-05 -4.6312522093184D-04 4.0827955792001D-02 +176 1.7500000000000D+00 6.7909276151704D-08 -8.5654741240108D-07 8.7359265019753D-06 -1.4251684788849D-04 2.4229810763846D-02 +177 1.7600000000000D+00 5.9707657630631D-08 -7.6848325869407D-07 8.5058952287384D-06 -2.9518574429486D-06 6.8012172214471D-03 +178 1.7700000000000D+00 5.2482771973116D-08 -6.8164176251056D-07 8.4415850530770D-06 -1.9765993417763D-06 -3.1725385176801D-03 +179 1.7800000000000D+00 4.6147751182519D-08 -5.9736634690629D-07 7.8724162924113D-06 -6.2877617211155D-05 -5.2574333009348D-03 +180 1.7900000000000D+00 4.0557975047582D-08 -5.2381725273589D-07 6.9534759767947D-06 -1.0060147613494D-04 -2.8933517001043D-03 +181 1.8000000000000D+00 3.5625129597587D-08 -4.6193392840977D-07 5.9307260499235D-06 -9.6057049729229D-05 5.9663933029187D-04 +182 1.8100000000000D+00 3.1280564636791D-08 -4.0752456334683D-07 5.0991112780982D-06 -7.5138106407832D-05 2.3900456515069D-03 +183 1.8200000000000D+00 2.7456538301609D-08 -3.5857963391622D-07 4.5380861241020D-06 -5.6205563675652D-05 1.9353508571722D-03 +184 1.8300000000000D+00 2.4092754446856D-08 -3.1520058798591D-07 4.0761050889834D-06 -4.4648148298203D-05 8.3642385660378D-04 +185 1.8400000000000D+00 2.1135474220743D-08 -2.7703004919050D-07 3.6004942884154D-06 -4.1640050530606D-05 2.9573154788399D-04 +186 1.8500000000000D+00 1.8536908557770D-08 -2.4337720591157D-07 3.1576563484054D-06 -4.1107157708786D-05 1.8715975624433D-04 +187 1.8600000000000D+00 1.6254616064904D-08 -2.1370771248557D-07 2.7798558254702D-06 -3.6852883046731D-05 2.8984090137294D-04 +188 1.8700000000000D+00 1.4250951998346D-08 -1.8758006600436D-07 2.4495908520506D-06 -3.1258812787565D-05 4.5623958255234D-04 +189 1.8800000000000D+00 1.2492566910570D-08 -1.6458807547681D-07 2.1550839379270D-06 -2.7371773212799D-05 4.3548910757465D-04 +190 1.8900000000000D+00 1.0949951309219D-08 -1.4436916564691D-07 1.8943985077615D-06 -2.4378229461884D-05 3.1710225456403D-04 +191 1.9000000000000D+00 9.5970220867405D-09 -1.2659996989096D-07 1.6642984457887D-06 -2.1633360849923D-05 2.4507068614104D-04 +192 1.9100000000000D+00 8.4107498642849D-09 -1.1099258073887D-07 1.4614229407275D-06 -1.9061216266023D-05 2.2784978342639D-04 +193 1.9200000000000D+00 7.3708214153953D-09 -9.7291054747082D-08 1.2826567564195D-06 -1.6762216395571D-05 2.1754510521921D-04 +194 1.9300000000000D+00 6.4593367829113D-09 -8.5268192334909D-08 1.1252674879743D-06 -1.4749745429838D-05 1.9314414062867D-04 +195 1.9400000000000D+00 5.6605368181922D-09 -7.4722589118442D-08 9.8682025959537D-07 -1.2972533289930D-05 1.6712036120599D-04 +196 1.9500000000000D+00 4.9605582893828D-09 -6.5475950304321D-08 8.6513053327425D-07 -1.1398231794023D-05 1.4722263925117D-04 +197 1.9600000000000D+00 4.3472163700265D-09 -5.7370643593458D-08 7.5824714694286D-07 -1.0007710625037D-05 1.3040419890346D-04 +198 1.9700000000000D+00 3.8098078460120D-09 -5.0267470452670D-08 6.6443043241728D-07 -8.7813651015289D-06 1.1511573759349D-04 +199 1.9800000000000D+00 3.3389384807217D-09 -4.4043653972988D-08 5.8213272738754D-07 -7.7009636342387D-06 1.0134299115916D-04 +200 1.9900000000000D+00 2.9263667741326D-09 -3.8591024773339D-08 5.0997850700417D-07 -6.7501593175694D-06 8.9093890945629D-05 +201 2.0000000000000D+00 2.5648670504461D-09 -3.3814380013510D-08 4.4674595674500D-07 -5.9143772185397D-06 7.8263437423523D-05 +202 2.0100000000000D+00 2.2481071461058D-09 -2.9630021943260D-08 3.9135096462922D-07 -5.1806065877148D-06 6.8674692739943D-05 +203 2.0200000000000D+00 1.9705390584045D-09 -2.5964460499048D-08 3.4283349183777D-07 -4.5371570774031D-06 6.0193299154591D-05 +204 2.0300000000000D+00 1.7273046358278D-09 -2.2753272725851D-08 3.0034373584254D-07 -3.9734138193421D-06 5.2716168764596D-05 +205 2.0400000000000D+00 1.5141486693007D-09 -1.9939999995521D-08 2.6313226112492D-07 -3.4798355632964D-06 4.6147356302685D-05 +206 2.0500000000000D+00 1.3273446217087D-09 -1.7475220650878D-08 2.3054164794681D-07 -3.0478162488543D-06 4.0391916738389D-05 +207 2.0600000000000D+00 1.1636285029422D-09 -1.5315679403043D-08 2.0199597880720D-07 -2.6696524775379D-06 3.5358051192383D-05 +208 2.0700000000000D+00 1.0201413038010D-09 -1.3423508629108D-08 1.7699130006117D-07 -2.3385405153472D-06 3.0959084295856D-05 +209 2.0800000000000D+00 8.9437911728303D-10 -1.1765539233117D-08 1.5508731363994D-07 -2.0485854979790D-06 2.7114002868772D-05 +210 2.0900000000000D+00 7.8414798541717D-10 -1.0312726976586D-08 1.3589931345142D-07 -1.7946356146633D-06 2.3748574618595D-05 +211 2.1000000000000D+00 6.8752656014615D-10 -9.0396396217800D-09 1.1908991424390D-07 -1.5722018348043D-06 2.0801131404523D-05 +212 2.1100000000000D+00 6.0283142990721D-10 -7.9240002366481D-09 1.0436366438442D-07 -1.3773790452813D-06 1.8219162082010D-05 +213 2.1200000000000D+00 5.2858767321611D-10 -6.9462969040756D-09 9.1461887022146D-08 -1.2067532159545D-06 1.5957489287365D-05 +214 2.1300000000000D+00 4.6350346712856D-10 -6.0894460501375D-09 8.0158133646833D-08 -1.0573102372816D-06 1.3976444747078D-05 +215 2.1400000000000D+00 4.0644656800212D-10 -5.3384787037735D-09 7.0254006404590D-08 -9.2641096787816D-07 1.2242020634119D-05 +216 2.1500000000000D+00 3.5642525463238D-10 -4.6802875294706D-09 6.1575878955759D-08 -8.1174983721878D-07 1.0723618754837D-05 +217 2.1600000000000D+00 3.1257046356593D-10 -4.1033897046507D-09 5.3971702794502D-08 -7.1130810419369D-07 9.3941226147828D-06 +218 2.1700000000000D+00 2.7412054628213D-10 -3.5977246099210D-09 4.7308303334592D-08 -6.2331774996309D-07 8.2297131235892D-06 +219 2.1800000000000D+00 2.4040835143294D-10 -3.1544824409436D-09 4.1469086453140D-08 -5.4623251943048D-07 7.2099047877101D-06 +220 2.1900000000000D+00 2.1084900341905D-10 -2.7659420467516D-09 3.6351899340710D-08 -4.7869842729594D-07 6.3167057173979D-06 +221 2.2000000000000D+00 1.8493007413800D-10 -2.4253406411284D-09 3.1867296503892D-08 -4.1952991020457D-07 5.5343674131591D-06 +222 2.2100000000000D+00 1.6220250872072D-10 -2.1267534999888D-09 2.7936940686751D-08 -3.6768869846244D-07 4.8491053676479D-06 +223 2.2200000000000D+00 1.4227258202259D-10 -1.8649873479321D-09 2.4492185791960D-08 -3.2226523067404D-07 4.2488650261505D-06 +224 2.2300000000000D+00 1.2479543083191D-10 -1.6354947140810D-09 2.1472940301895D-08 -2.8246372679463D-07 3.7230754408039D-06 +225 2.2400000000000D+00 1.0946866020978D-10 -1.4342892176566D-09 1.8826542268430D-08 -2.4758696802251D-07 3.2624775655753D-06 +226 2.2500000000000D+00 9.6027216302032D-11 -1.2578777002041D-09 1.6506858858748D-08 -2.1702436652270D-07 2.8589669248739D-06 +227 2.2600000000000D+00 8.4238854860141D-11 -1.1032002571921D-09 1.4473490922685D-08 -1.9024137511714D-07 2.5054613371447D-06 +228 2.2700000000000D+00 7.3899894696326D-11 -9.6757402931917D-10 1.2691027281056D-08 -1.6676959499006D-07 2.1957699732822D-06 +229 2.2800000000000D+00 6.4831853162863D-11 -8.4864871534883D-10 1.1128455172183D-08 -1.4619891329887D-07 1.9244257975128D-06 +230 2.2900000000000D+00 5.6878270341645D-11 -7.4436456946353D-10 9.7586034737027D-09 -1.2817012622934D-07 1.6866383707071D-06 +231 2.3000000000000D+00 4.9901911573525D-11 -6.5291541212248D-10 8.5576525170415D-09 -1.1236827071367D-07 1.4780783970698D-06 +232 2.3100000000000D+00 4.3782553995052D-11 -5.7271939342926D-10 7.5047470667154D-09 -9.8518179628585D-08 1.2954893244353D-06 +233 2.3200000000000D+00 3.8414749268912D-11 -5.0238942019162D-10 6.5816046665867D-09 -8.6378946217812D-08 1.1360513092426D-06 +234 2.3300000000000D+00 3.3706025310533D-11 -4.4070940729990D-10 5.7722012474850D-09 -7.5739486499524D-08 9.9718120419613D-07 +235 2.3400000000000D+00 2.9575356337725D-11 -3.8661408268835D-10 5.0625028561637D-09 -6.6410685574258D-08 8.7431887871760D-07 +236 2.3500000000000D+00 2.5951656671273D-11 -3.3916909524138D-10 4.4401980582629D-09 -5.8222475382067D-08 7.6279297487738D-07 +237 2.3600000000000D+00 2.2772601305125D-11 -2.9755545500768D-10 3.8945086795301D-09 -5.1039645409784D-08 6.6276230536048D-07 +238 2.3700000000000D+00 1.9983561396174D-11 -2.6105549049239D-10 3.4160074900473D-09 -4.4763331271001D-08 5.8045205809393D-07 +239 2.3800000000000D+00 1.7536602439670D-11 -2.2903963012230D-10 2.9965183574749D-09 -3.9339077153393D-08 5.2463306353295D-07 +240 2.3900000000000D+00 1.5389706019256D-11 -2.0095614521560D-10 2.6286194374745D-09 -3.4584649988529D-08 4.8092128288283D-07 +241 2.4000000000000D+00 1.3506028948865D-11 -1.7632138268125D-10 2.3057411279683D-09 -3.0293642593268D-08 4.2655150183027D-07 +242 2.4100000000000D+00 1.1853238626725D-11 -1.5471030108099D-10 2.0213201347195D-09 -2.6144743730657D-08 3.3353003969285D-07 +243 2.4200000000000D+00 1.0402998562274D-11 -1.3575222968263D-10 1.7723851455654D-09 -2.2544429812976D-08 2.3631853280812D-07 +244 2.4300000000000D+00 9.1304533065847D-12 -1.1912179619942D-10 1.5560820398997D-09 -1.9869522826776D-08 1.7571366470692D-07 +245 2.4400000000000D+00 8.0137878287404D-12 -1.0454531813087D-10 1.3740919164607D-09 -1.8822443959992D-08 1.9632187595982D-07 +246 2.4500000000000D+00 7.0338867229383D-12 -9.1747824070414D-11 1.2108566888449D-09 -1.7915185464161D-08 2.6528493196704D-07 +247 2.4600000000000D+00 6.1739770744141D-12 -8.0499973887284D-11 1.0564014549368D-09 -1.5997258514582D-08 3.4002978795661D-07 +248 2.4700000000000D+00 5.4193361132323D-12 -7.0504324102140D-11 8.8883762366291D-10 -1.1486232894153D-08 3.8826425365694D-07 +249 2.4800000000000D+00 4.7570648250198D-12 -6.1831212371526D-11 7.5172605162330D-10 -6.6049643540521D-09 3.3452691085518D-07 +250 2.4900000000000D+00 4.1758656518469D-12 -5.4424651726474D-11 6.6921065573785D-10 -3.1455715801675D-09 1.4630128512772D-07 +251 2.5000000000000D+00 3.6672452841410D-12 -4.8595166624848D-11 6.8460241439163D-10 -3.0533090381199D-09 -2.3780415955118D-07 +252 2.5100000000000D+00 3.2196629212661D-12 -4.3062069058906D-11 7.0310350907292D-10 -6.2600493102889D-09 -5.7154212920598D-07 +253 2.5200000000000D+00 2.8246528077976D-12 -3.7194153552765D-11 6.6069419311823D-10 -1.2107498173167D-08 -6.8345999728879D-07 +254 2.5300000000000D+00 2.4659118485918D-12 -2.9740467811369D-11 4.7715482367435D-10 -2.0276181230771D-08 -3.6058841129875D-07 +255 2.5400000000000D+00 2.1612187893390D-12 -2.3729337778677D-11 2.1998845384892D-10 -2.5257071877669D-08 1.8787455564788D-07 +256 2.5500000000000D+00 1.9118424507672D-12 -2.0969594144261D-11 -5.0311001134815D-11 -2.3547083619610D-08 7.8335046148569D-07 +257 2.5600000000000D+00 1.7435602876152D-12 -2.4273946803668D-11 -2.6533906704415D-10 -1.0248326699070D-08 1.2014465331637D-06 +258 2.5700000000000D+00 1.5588820651208D-12 -2.9834806569351D-11 -3.4528954296501D-10 7.1913662250273D-09 1.3147937265198D-06 +259 2.5800000000000D+00 1.3020242391556D-12 -3.4832688024354D-11 -2.4454596913567D-10 2.3025697006049D-08 1.0481298622406D-06 +260 2.5900000000000D+00 8.7988720141767D-13 -3.5421479413037D-11 1.0187502708235D-10 2.9483674097150D-08 3.1213544857508D-07 +261 2.6000000000000D+00 4.2674474364255D-13 -3.1857388778498D-11 5.1684652193449D-10 2.7212256465127D-08 -5.5046047962759D-07 +262 2.6100000000000D+00 4.6299727334845D-14 -2.4602018975848D-11 8.5246290424980D-10 1.7284972876683D-08 -1.2457176983375D-06 +263 2.6200000000000D+00 -1.0997363434289D-13 -1.4561618164929D-11 9.1156482573950D-10 1.7727828939141D-09 -1.3912791310486D-06 +264 2.6300000000000D+00 -1.0915570589023D-13 -4.3574001418684D-12 7.5635685801977D-10 -1.4148305070599D-08 -1.0990168697995D-06 +265 2.6400000000000D+00 -2.7663143274824D-14 3.5313147273338D-12 4.7273764043934D-10 -2.5573976940741D-08 -5.3415909681080D-07 +266 2.6500000000000D+00 2.1262816080488D-14 6.0899373554663D-12 1.8739367759989D-10 -2.6697449654712D-08 6.2418815895300D-08 +267 2.6600000000000D+00 2.8029172525860D-14 4.4429149328259D-12 -4.1504228136177D-11 -1.9526061877607D-08 5.4688127871506D-07 +268 2.6700000000000D+00 1.1435520627556D-14 9.5664509909652D-13 -1.8184978482593D-10 -8.5594568924316D-09 8.2155783355050D-07 +269 2.6800000000000D+00 -2.0575737819471D-15 -1.3590859691100D-12 -2.0351162429867D-10 5.4897251976484D-10 7.9022071370391D-07 +270 2.6900000000000D+00 -3.6369723718455D-15 -1.6010703313116D-12 -1.2848865838286D-10 5.3988758641181D-09 5.0329529651093D-07 +271 2.7000000000000D+00 -2.0995080746862D-15 -7.9216277254766D-13 -1.6890266860131D-11 6.7881698953404D-09 1.2279931747211D-07 +272 2.7100000000000D+00 0.0000000000000D+00 1.1363307585278D-13 6.3634993087227D-11 5.4947477378563D-09 -1.7497802849611D-07 +273 2.7200000000000D+00 0.0000000000000D+00 2.8644089853441D-13 6.8764164572546D-11 2.8436628303371D-09 -2.6806785324984D-07 +274 2.7300000000000D+00 0.0000000000000D+00 2.0582618065439D-13 3.6448725462856D-11 -1.9081832423940D-10 -2.3281722441072D-07 +275 2.7400000000000D+00 0.0000000000000D+00 -3.1886457250014D-15 -7.0984028126077D-12 -2.3998105152315D-09 -1.2298626196241D-07 +276 2.7500000000000D+00 0.0000000000000D+00 -2.9511733803403D-14 -1.6885613959750D-11 -2.4388134951369D-09 -3.5022384082568D-08 +277 2.7600000000000D+00 0.0000000000000D+00 -2.8322626836392D-14 -1.3621061736442D-11 -1.3435822426801D-09 3.7793385066463D-08 +278 2.7700000000000D+00 0.0000000000000D+00 -5.7583101642772D-15 -2.2692338627381D-12 1.7747275236553D-10 7.7477619451960D-08 +279 2.7800000000000D+00 0.0000000000000D+00 1.4106695854132D-15 2.3896773411551D-12 7.7253676717525D-10 7.3843670247491D-08 +280 2.7900000000000D+00 0.0000000000000D+00 1.8604958821070D-15 2.8042104031483D-12 6.7866465638370D-10 4.0345920264808D-08 +281 2.8000000000000D+00 0.0000000000000D+00 8.6190247439101D-16 1.2243852099963D-12 2.2647113923590D-10 -3.3494927387321D-09 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.7093372374194D-13 -1.2831630888612D-10 -2.9318391598155D-08 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -3.3983497591336D-13 -1.7790345802965D-10 -2.7594936644840D-08 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.3552297378345D-13 -1.0892307484608D-10 -1.2591059433546D-08 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.9242232899452D-15 7.5923667665810D-12 5.2005874741696D-09 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.2638714459160D-14 2.7881444473867D-11 8.6289558707309D-09 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.2620728548127D-14 2.5474316254627D-11 6.5701575207233D-09 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 6.4380836347210D-15 6.7991778545198D-12 1.2112298211928D-09 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.2699077581333D-16 -2.4860953055877D-12 -1.5235765616941D-09 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.5616947132175D-16 -3.5315044903257D-12 -1.7680881155482D-09 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.7445190377936D-16 -2.0437254299714D-12 -9.2373863007775D-10 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 8.1559660339429D-14 1.2341430100925D-10 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.8555710968496D-13 2.8877533797103D-10 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.5905944198137D-13 2.4167217185684D-10 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 5.9397775459951D-14 5.1036656180287D-11 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.1473695836914D-14 -2.7172640749223D-11 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.6491011262191D-14 -3.6115284820077D-11 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.8640138885920D-15 -2.0798078193499D-11 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.0966821073541D-16 8.9699777967399D-13 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.2930964016853D-16 3.1700031337591D-12 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.1792735387351D-16 2.9888849868501D-12 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3085159860306D-16 9.1556745955612D-13 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.3809811103016D-13 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.2558025618202D-13 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.5732002811892D-13 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.0779188974600D-16 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 8.2112009143443D-15 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 9.4836305178287D-15 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.6766720681285D-15 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -8.0013322762034D-17 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.0826576233652D-16 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.9034926797209D-16 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.5790612877249D-17 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 0.0000000000000D+00 3.7003778228292D+00 +2 1.0000000000000D-02 3.7089391723634D+00 +3 2.0000000000000D-02 3.7345803508528D+00 +4 3.0000000000000D-02 3.7771730342706D+00 +5 4.0000000000000D-02 3.8365042658638D+00 +6 5.0000000000000D-02 3.9122778157680D+00 +7 6.0000000000000D-02 4.0041160736660D+00 +8 7.0000000000000D-02 4.1115624554799D+00 +9 8.0000000000000D-02 4.2340843050918D+00 +10 9.0000000000000D-02 4.3710762679052D+00 +11 1.0000000000000D-01 4.5218641093258D+00 +12 1.1000000000000D-01 4.6857089477885D+00 +13 1.2000000000000D-01 4.8618118687953D+00 +14 1.3000000000000D-01 5.0493188835832D+00 +15 1.4000000000000D-01 5.2473261935356D+00 +16 1.5000000000000D-01 5.4548857193097D+00 +17 1.6000000000000D-01 5.6710108518883D+00 +18 1.7000000000000D-01 5.8946823814015D+00 +19 1.8000000000000D-01 6.1248545586006D+00 +20 1.9000000000000D-01 6.3604612433197D+00 +21 2.0000000000000D-01 6.6004220941268D+00 +22 2.1000000000000D-01 6.8436487536413D+00 +23 2.2000000000000D-01 7.0890509846801D+00 +24 2.3000000000000D-01 7.3355427134695D+00 +25 2.4000000000000D-01 7.5820479376163D+00 +26 2.5000000000000D-01 7.8275064583489D+00 +27 2.6000000000000D-01 8.0708793986937D+00 +28 2.7000000000000D-01 8.3111544717193D+00 +29 2.8000000000000D-01 8.5473509657324D+00 +30 2.9000000000000D-01 8.7785244163103D+00 +31 3.0000000000000D-01 9.0037709382777D+00 +32 3.1000000000000D-01 9.2222311941357D+00 +33 3.2000000000000D-01 9.4330939789964D+00 +34 3.3000000000000D-01 9.6355994057332D+00 +35 3.4000000000000D-01 9.8290416777689D+00 +36 3.5000000000000D-01 1.0012771440677D+01 +37 3.6000000000000D-01 1.0186197707502D+01 +38 3.7000000000000D-01 1.0348789356387D+01 +39 3.8000000000000D-01 1.0500076202713D+01 +40 3.9000000000000D-01 1.0639649651396D+01 +41 4.0000000000000D-01 1.0767162938366D+01 +42 4.1000000000000D-01 1.0882330973329D+01 +43 4.2000000000000D-01 1.0984929798897D+01 +44 4.3000000000000D-01 1.1074795683825D+01 +45 4.4000000000000D-01 1.1151823870539D+01 +46 4.5000000000000D-01 1.1215966999308D+01 +47 4.6000000000000D-01 1.1267233233255D+01 +48 4.7000000000000D-01 1.1305684110016D+01 +49 4.8000000000000D-01 1.1331432147072D+01 +50 4.9000000000000D-01 1.1344638228783D+01 +51 5.0000000000000D-01 1.1345508803770D+01 +52 5.1000000000000D-01 1.1334292921672D+01 +53 5.2000000000000D-01 1.1311279138342D+01 +54 5.3000000000000D-01 1.1276792318330D+01 +55 5.4000000000000D-01 1.1231190363028D+01 +56 5.5000000000000D-01 1.1174860892073D+01 +57 5.6000000000000D-01 1.1108217904685D+01 +58 5.7000000000000D-01 1.1031698446387D+01 +59 5.8000000000000D-01 1.0945759305231D+01 +60 5.9000000000000D-01 1.0850873760092D+01 +61 6.0000000000000D-01 1.0747528401935D+01 +62 6.1000000000000D-01 1.0636220047201D+01 +63 6.2000000000000D-01 1.0517452760551D+01 +64 6.3000000000000D-01 1.0391735002318D+01 +65 6.4000000000000D-01 1.0259576914023D+01 +66 6.5000000000000D-01 1.0121487753350D+01 +67 6.6000000000000D-01 9.9779734879836D+00 +68 6.7000000000000D-01 9.8295345558063D+00 +69 6.8000000000000D-01 9.6766637970133D+00 +70 6.9000000000000D-01 9.5198445619234D+00 +71 7.0000000000000D-01 9.3595489964986D+00 +72 7.1000000000000D-01 9.1962365059479D+00 +73 7.2000000000000D-01 9.0303523952538D+00 +74 7.3000000000000D-01 8.8623266840456D+00 +75 7.4000000000000D-01 8.6925730919484D+00 +76 7.5000000000000D-01 8.5214881893801D+00 +77 7.6000000000000D-01 8.3494507077392D+00 +78 7.7000000000000D-01 8.1768210020380D+00 +79 7.8000000000000D-01 8.0039406582812D+00 +80 7.9000000000000D-01 7.8311322372699D+00 +81 8.0000000000000D-01 7.6586991460205D+00 +82 8.1000000000000D-01 7.4869256276232D+00 +83 8.2000000000000D-01 7.3160768601190D+00 +84 8.3000000000000D-01 7.1463991548439D+00 +85 8.4000000000000D-01 6.9781202446577D+00 +86 8.5000000000000D-01 6.8114496525454D+00 +87 8.6000000000000D-01 6.6465791312339D+00 +88 8.7000000000000D-01 6.4836831647004D+00 +89 8.8000000000000D-01 6.3229195227496D+00 +90 8.9000000000000D-01 6.1644298602003D+00 +91 9.0000000000000D-01 6.0083403526308D+00 +92 9.1000000000000D-01 5.8547623610835D+00 +93 9.2000000000000D-01 5.7037931186136D+00 +94 9.3000000000000D-01 5.5555164320731D+00 +95 9.4000000000000D-01 5.4100033930402D+00 +96 9.5000000000000D-01 5.2673130923388D+00 +97 9.6000000000000D-01 5.1274933331199D+00 +98 9.7000000000000D-01 4.9905813380047D+00 +99 9.8000000000000D-01 4.8566044463061D+00 +100 9.9000000000000D-01 4.7255807978488D+00 +101 1.0000000000000D+00 4.5975200003765D+00 +102 1.0100000000000D+00 4.4724237780169D+00 +103 1.0200000000000D+00 4.3502865986886D+00 +104 1.0300000000000D+00 4.2310962787499D+00 +105 1.0400000000000D+00 4.1148345635602D+00 +106 1.0500000000000D+00 4.0014776829839D+00 +107 1.0600000000000D+00 3.8909968811490D+00 +108 1.0700000000000D+00 3.7833589200978D+00 +109 1.0800000000000D+00 3.6785265571864D+00 +110 1.0900000000000D+00 3.5764589963248D+00 +111 1.1000000000000D+00 3.4771123133407D+00 +112 1.1100000000000D+00 3.3804398558990D+00 +113 1.1200000000000D+00 3.2863926185687D+00 +114 1.1300000000000D+00 3.1949195937217D+00 +115 1.1400000000000D+00 3.1059680990418D+00 +116 1.1500000000000D+00 3.0194840824820D+00 +117 1.1600000000000D+00 2.9354124055668D+00 +118 1.1700000000000D+00 2.8536971059545D+00 +119 1.1800000000000D+00 2.7742816401896D+00 +120 1.1900000000000D+00 2.6971091075820D+00 +121 1.2000000000000D+00 2.6221224561344D+00 +122 1.2100000000000D+00 2.5492646714142D+00 +123 1.2200000000000D+00 2.4784789492536D+00 +124 1.2300000000000D+00 2.4097088531181D+00 +125 1.2400000000000D+00 2.3428984569466D+00 +126 1.2500000000000D+00 2.2779924742317D+00 +127 1.2600000000000D+00 2.2149363740745D+00 +128 1.2700000000000D+00 2.1536764848805D+00 +129 1.2800000000000D+00 2.0941600863488D+00 +130 1.2900000000000D+00 2.0363354903716D+00 +131 1.3000000000000D+00 1.9801521113947D+00 +132 1.3100000000000D+00 1.9255605266347D+00 +133 1.3200000000000D+00 1.8725125275436D+00 +134 1.3300000000000D+00 1.8209611613189D+00 +135 1.3400000000000D+00 1.7708607636905D+00 +136 1.3500000000000D+00 1.7221669847035D+00 +137 1.3600000000000D+00 1.6748368174916D+00 +138 1.3700000000000D+00 1.6288286865728D+00 +139 1.3800000000000D+00 1.5841025420353D+00 +140 1.3900000000000D+00 1.5406199902682D+00 +141 1.4000000000000D+00 1.4983442646769D+00 +142 1.4100000000000D+00 1.4572401677847D+00 +143 1.4200000000000D+00 1.4172739792077D+00 +144 1.4300000000000D+00 1.3784133954656D+00 +145 1.4400000000000D+00 1.3406274977834D+00 +146 1.4500000000000D+00 1.3038866841207D+00 +147 1.4600000000000D+00 1.2681625783664D+00 +148 1.4700000000000D+00 1.2334278618028D+00 +149 1.4800000000000D+00 1.1996560914474D+00 +150 1.4900000000000D+00 1.1668213982961D+00 +151 1.5000000000000D+00 1.1348984524014D+00 +152 1.5100000000000D+00 1.1038625658893D+00 +153 1.5200000000000D+00 1.0736896413950D+00 +154 1.5300000000000D+00 1.0443561635356D+00 +155 1.5400000000000D+00 1.0158391929156D+00 +156 1.5500000000000D+00 9.8811635748358D-01 +157 1.5600000000000D+00 9.6116584307029D-01 +158 1.5700000000000D+00 9.3496638406452D-01 +159 1.5800000000000D+00 9.0949725381294D-01 +160 1.5900000000000D+00 8.8473825485336D-01 +161 1.6000000000000D+00 8.6066970900821D-01 +162 1.6100000000000D+00 8.3727244738275D-01 +163 1.6200000000000D+00 8.1452780028131D-01 +164 1.6300000000000D+00 7.9241758708724D-01 +165 1.6400000000000D+00 7.7092410610969D-01 +166 1.6500000000000D+00 7.5003012444247D-01 +167 1.6600000000000D+00 7.2971886783079D-01 +168 1.6700000000000D+00 7.0997401058915D-01 +169 1.6800000000000D+00 6.9077966556198D-01 +170 1.6900000000000D+00 6.7212037416592D-01 +171 1.7000000000000D+00 6.5398109650415D-01 +172 1.7100000000000D+00 6.3634720158667D-01 +173 1.7200000000000D+00 6.1920445764589D-01 +174 1.7300000000000D+00 6.0253902257778D-01 +175 1.7400000000000D+00 5.8633743449661D-01 +176 1.7500000000000D+00 5.7058660243011D-01 +177 1.7600000000000D+00 5.5527379714309D-01 +178 1.7700000000000D+00 5.4038664211178D-01 +179 1.7800000000000D+00 5.2591310463869D-01 +180 1.7900000000000D+00 5.1184148712480D-01 +181 1.8000000000000D+00 4.9816041849172D-01 +182 1.8100000000000D+00 4.8485884576488D-01 +183 1.8200000000000D+00 4.7192602581372D-01 +184 1.8300000000000D+00 4.5935151725439D-01 +185 1.8400000000000D+00 4.4712517251436D-01 +186 1.8500000000000D+00 4.3523713005913D-01 +187 1.8600000000000D+00 4.2367780678395D-01 +188 1.8700000000000D+00 4.1243789056586D-01 +189 1.8800000000000D+00 4.0150833298209D-01 +190 1.8900000000000D+00 3.9088034218627D-01 +191 1.9000000000000D+00 3.8054537594997D-01 +192 1.9100000000000D+00 3.7049513486060D-01 +193 1.9200000000000D+00 3.6072155568026D-01 +194 1.9300000000000D+00 3.5121680486017D-01 +195 1.9400000000000D+00 3.4197327221055D-01 +196 1.9500000000000D+00 3.3298356472445D-01 +197 1.9600000000000D+00 3.2424050055129D-01 +198 1.9700000000000D+00 3.1573710312140D-01 +199 1.9800000000000D+00 3.0746659541548D-01 +200 1.9900000000000D+00 2.9942239438001D-01 +201 2.0000000000000D+00 2.9159810548385D-01 +202 2.0100000000000D+00 2.8398751741469D-01 +203 2.0200000000000D+00 2.7658459691278D-01 +204 2.0300000000000D+00 2.6938348373868D-01 +205 2.0400000000000D+00 2.6237848577349D-01 +206 2.0500000000000D+00 2.5556407424790D-01 +207 2.0600000000000D+00 2.4893487909819D-01 +208 2.0700000000000D+00 2.4248568444611D-01 +209 2.0800000000000D+00 2.3621142420029D-01 +210 2.0900000000000D+00 2.3010717777607D-01 +211 2.1000000000000D+00 2.2416816593194D-01 +212 2.1100000000000D+00 2.1838974671896D-01 +213 2.1200000000000D+00 2.1276741154132D-01 +214 2.1300000000000D+00 2.0729678132537D-01 +215 2.1400000000000D+00 2.0197360279383D-01 +216 2.1500000000000D+00 1.9679374484407D-01 +217 2.1600000000000D+00 1.9175319502627D-01 +218 2.1700000000000D+00 1.8684805612022D-01 +219 2.1800000000000D+00 1.8207454280838D-01 +220 2.1900000000000D+00 1.7742897844121D-01 +221 2.2000000000000D+00 1.7290779189489D-01 +222 2.2100000000000D+00 1.6850751451698D-01 +223 2.2200000000000D+00 1.6422477715827D-01 +224 2.2300000000000D+00 1.6005630729038D-01 +225 2.2400000000000D+00 1.5599892620325D-01 +226 2.2500000000000D+00 1.5204954628407D-01 +227 2.2600000000000D+00 1.4820516837380D-01 +228 2.2700000000000D+00 1.4446287919817D-01 +229 2.2800000000000D+00 1.4081984887424D-01 +230 2.2900000000000D+00 1.3727332848711D-01 +231 2.3000000000000D+00 1.3382064773644D-01 +232 2.3100000000000D+00 1.3045921265249D-01 +233 2.3200000000000D+00 1.2718650337571D-01 +234 2.3300000000000D+00 1.2400007200193D-01 +235 2.3400000000000D+00 1.2089754049048D-01 +236 2.3500000000000D+00 1.1787659863105D-01 +237 2.3600000000000D+00 1.1493500207133D-01 +238 2.3700000000000D+00 1.1207057040155D-01 +239 2.3800000000000D+00 1.0928118529356D-01 +240 2.3900000000000D+00 1.0656478869603D-01 +241 2.4000000000000D+00 1.0391938108094D-01 +242 2.4100000000000D+00 1.0134301974084D-01 +243 2.4200000000000D+00 9.8833817137772D-02 +244 2.4300000000000D+00 9.6389939298366D-02 +245 2.4400000000000D+00 9.4009604256226D-02 +246 2.4500000000000D+00 9.1691080541732D-02 +247 2.4600000000000D+00 8.9432685713503D-02 +248 2.4700000000000D+00 8.7232784933760D-02 +249 2.4800000000000D+00 8.5089789587227D-02 +250 2.4900000000000D+00 8.3002155937581D-02 +251 2.5000000000000D+00 8.0968383824658D-02 +252 2.5100000000000D+00 7.8987015401483D-02 +253 2.5200000000000D+00 7.7056633905347D-02 +254 2.5300000000000D+00 7.5175862466492D-02 +255 2.5400000000000D+00 7.3343362953281D-02 +256 2.5500000000000D+00 7.1557834848288D-02 +257 2.5600000000000D+00 6.9818014158899D-02 +258 2.5700000000000D+00 6.8122672361526D-02 +259 2.5800000000000D+00 6.6470615373762D-02 +260 2.5900000000000D+00 6.4860682558275D-02 +261 2.6000000000000D+00 6.3291745757500D-02 +262 2.6100000000000D+00 6.1762708353854D-02 +263 2.6200000000000D+00 6.0272504358860D-02 +264 2.6300000000000D+00 5.8820097530509D-02 +265 2.6400000000000D+00 5.7404480514162D-02 +266 2.6500000000000D+00 5.6024674009530D-02 +267 2.6600000000000D+00 5.4679725963551D-02 +268 2.6700000000000D+00 5.3368710785202D-02 +269 2.6800000000000D+00 5.2090728583603D-02 +270 2.6900000000000D+00 5.0844904429815D-02 +271 2.7000000000000D+00 4.9630387639391D-02 +272 2.7100000000000D+00 4.8446351075408D-02 +273 2.7200000000000D+00 4.7291990473166D-02 +274 2.7300000000000D+00 4.6166523784802D-02 +275 2.7400000000000D+00 4.5069190541607D-02 +276 2.7500000000000D+00 4.3999251236103D-02 +277 2.7600000000000D+00 4.2955986723512D-02 +278 2.7700000000000D+00 4.1938697638119D-02 +279 2.7800000000000D+00 4.0946703828150D-02 +280 2.7900000000000D+00 3.9979343808365D-02 +281 2.8000000000000D+00 3.9035974226662D-02 +282 2.8100000000000D+00 3.8115969346946D-02 +283 2.8200000000000D+00 3.7218720548013D-02 +284 2.8300000000000D+00 3.6343635836611D-02 +285 2.8400000000000D+00 3.5490139373922D-02 +286 2.8500000000000D+00 3.4657671016639D-02 +287 2.8600000000000D+00 3.3845685872623D-02 +288 2.8700000000000D+00 3.3053653867075D-02 +289 2.8800000000000D+00 3.2281059322728D-02 +290 2.8900000000000D+00 3.1527400553159D-02 +291 2.9000000000000D+00 3.0792189466516D-02 +292 2.9100000000000D+00 3.0074951181016D-02 +293 2.9200000000000D+00 2.9375223652203D-02 +294 2.9300000000000D+00 2.8692557311581D-02 +295 2.9400000000000D+00 2.8026514714050D-02 +296 2.9500000000000D+00 2.7376670196581D-02 +297 2.9600000000000D+00 2.6742609547829D-02 +298 2.9700000000000D+00 2.6123929685657D-02 +299 2.9800000000000D+00 2.5520238344553D-02 +300 2.9900000000000D+00 2.4931153772442D-02 +301 3.0000000000000D+00 2.4356304436912D-02 +302 3.0100000000000D+00 2.3795328738232D-02 +303 3.0200000000000D+00 2.3247874731682D-02 +304 3.0300000000000D+00 2.2713599858678D-02 +305 3.0400000000000D+00 2.2192170684511D-02 +306 3.0500000000000D+00 2.1683262643790D-02 +307 3.0600000000000D+00 2.1186559793370D-02 +308 3.0700000000000D+00 2.0701754573733D-02 +309 3.0800000000000D+00 2.0228547574892D-02 +310 3.0900000000000D+00 1.9766647310405D-02 +311 3.1000000000000D+00 1.9315769998016D-02 +312 3.1100000000000D+00 1.8875639346642D-02 +313 3.1200000000000D+00 1.8445986348503D-02 +314 3.1300000000000D+00 1.8026549077875D-02 +315 3.1400000000000D+00 1.7617072496372D-02 +316 3.1500000000000D+00 1.7217308262683D-02 +317 3.1600000000000D+00 1.6827014547970D-02 +318 3.1700000000000D+00 1.6445955856567D-02 +319 3.1800000000000D+00 1.6073902853060D-02 +320 3.1900000000000D+00 1.5710632192280D-02 +321 3.2000000000000D+00 1.5355926355263D-02 +322 3.2100000000000D+00 1.5009573489673D-02 +323 3.2200000000000D+00 1.4671367255688D-02 +324 3.2300000000000D+00 1.4341106674522D-02 +325 3.2400000000000D+00 1.4018595982341D-02 +326 3.2500000000000D+00 1.3703644488308D-02 +327 3.2600000000000D+00 1.3396066436993D-02 +328 3.2700000000000D+00 1.3095680873532D-02 +329 3.2800000000000D+00 1.2802311513397D-02 +330 3.2900000000000D+00 1.2515786616041D-02 +331 3.3000000000000D+00 1.2235938862047D-02 +332 3.3100000000000D+00 1.1962605233037D-02 +333 3.3200000000000D+00 1.1695626895511D-02 +334 3.3300000000000D+00 1.1434849088305D-02 +335 3.3400000000000D+00 1.1180121012905D-02 +336 3.3500000000000D+00 1.0931295726403D-02 +337 3.3600000000000D+00 1.0688230037860D-02 +338 3.3700000000000D+00 1.0450784407969D-02 +339 3.3800000000000D+00 1.0218822851152D-02 +340 3.3900000000000D+00 9.9922128400496D-03 +341 3.4000000000000D+00 9.7708252130450D-03 +342 3.4100000000000D+00 9.5545340846960D-03 +343 3.4200000000000D+00 9.3432167584067D-03 +344 3.4300000000000D+00 9.1367536411031D-03 +345 3.4400000000000D+00 8.9350281606974D-03 +346 3.4500000000000D+00 8.7379266860445D-03 +347 3.4600000000000D+00 8.5453384490892D-03 +348 3.4700000000000D+00 8.3571554685514D-03 +349 3.4800000000000D+00 8.1732724762494D-03 +350 3.4900000000000D+00 7.9935868454661D-03 +351 3.5000000000000D+00 7.8179985216089D-03 +352 3.5100000000000D+00 7.6464099538549D-03 +353 3.5200000000000D+00 7.4787260293790D-03 +354 3.5300000000000D+00 7.3148540091429D-03 +355 3.5400000000000D+00 7.1547034662067D-03 +356 3.5500000000000D+00 6.9981862244119D-03 +357 3.5600000000000D+00 6.8452162996366D-03 +358 3.5700000000000D+00 6.6957098422756D-03 +359 3.5800000000000D+00 6.5495850821550D-03 +360 3.5900000000000D+00 6.4067622737175D-03 +361 3.6000000000000D+00 6.2671636433790D-03 +362 3.6100000000000D+00 6.1307133381275D-03 +363 3.6200000000000D+00 5.9973373760109D-03 +364 3.6300000000000D+00 5.8669635974455D-03 +365 3.6400000000000D+00 5.7395216178321D-03 +366 3.6500000000000D+00 5.6149427816553D-03 +367 3.6600000000000D+00 5.4931601178743D-03 +368 3.6700000000000D+00 5.3741082967652D-03 +369 3.6800000000000D+00 5.2577235871821D-03 +370 3.6900000000000D+00 5.1439438155621D-03 +371 3.7000000000000D+00 5.0327083257249D-03 +372 3.7100000000000D+00 4.9239579405204D-03 +373 3.7200000000000D+00 4.8176349233917D-03 +374 3.7300000000000D+00 4.7136829416086D-03 +375 3.7400000000000D+00 4.6120470303124D-03 +376 3.7500000000000D+00 4.5126735578191D-03 +377 3.7600000000000D+00 4.4155101916691D-03 +378 3.7700000000000D+00 4.3205058653053D-03 +379 3.7800000000000D+00 4.2276107459876D-03 +380 3.7900000000000D+00 4.1367762032996D-03 +381 3.8000000000000D+00 4.0479547792579D-03 +382 3.8100000000000D+00 3.9611001580486D-03 +383 3.8200000000000D+00 3.8761671373103D-03 +384 3.8300000000000D+00 3.7931115999402D-03 +385 3.8400000000000D+00 3.7118904869086D-03 +386 3.8500000000000D+00 3.6324617706630D-03 +387 3.8600000000000D+00 3.5547844289539D-03 +388 3.8700000000000D+00 3.4788184196745D-03 +389 3.8800000000000D+00 3.4045246561425D-03 +390 3.8900000000000D+00 3.3318649836158D-03 +391 3.9000000000000D+00 3.2608021555944D-03 +392 3.9100000000000D+00 3.1912998111909D-03 +393 3.9200000000000D+00 3.1233224530222D-03 +394 3.9300000000000D+00 3.0568354257004D-03 +395 3.9400000000000D+00 2.9918048951622D-03 +396 3.9500000000000D+00 2.9281978279049D-03 +397 3.9600000000000D+00 2.8659819712320D-03 +398 3.9700000000000D+00 2.8051258338268D-03 +399 3.9800000000000D+00 2.7455986670981D-03 +400 3.9900000000000D+00 2.6873704468038D-03 +401 4.0000000000000D+00 2.6304118550129D-03 +402 4.0100000000000D+00 2.5746942627589D-03 +403 4.0200000000000D+00 2.5201897129765D-03 +404 4.0300000000000D+00 2.4668709042961D-03 +405 4.0400000000000D+00 2.4147111747103D-03 +406 4.0500000000000D+00 2.3636844858854D-03 +407 4.0600000000000D+00 2.3137654079163D-03 +408 4.0700000000000D+00 2.2649291043277D-03 +409 4.0800000000000D+00 2.2171513179695D-03 +410 4.0900000000000D+00 2.1704083565114D-03 +411 4.1000000000000D+00 2.1246770787723D-03 +412 4.1100000000000D+00 2.0799348813042D-03 +413 4.1200000000000D+00 2.0361596852486D-03 +414 4.1300000000000D+00 1.9933299239334D-03 +415 4.1400000000000D+00 1.9514245301082D-03 +416 4.1500000000000D+00 1.9104229239556D-03 +417 4.1600000000000D+00 1.8703050012862D-03 +418 4.1700000000000D+00 1.8310511220154D-03 +419 4.1800000000000D+00 1.7926420992284D-03 +420 4.1900000000000D+00 1.7550591879678D-03 +421 4.2000000000000D+00 1.7182840746888D-03 +422 4.2100000000000D+00 1.6822988668743D-03 +423 4.2200000000000D+00 1.6470860828997D-03 +424 4.2300000000000D+00 1.6126286424187D-03 +425 4.2400000000000D+00 1.5789098564834D-03 +426 4.2500000000000D+00 1.5459134182674D-03 +427 4.2600000000000D+00 1.5136233939268D-03 +428 4.2700000000000D+00 1.4820242136533D-03 +429 4.2800000000000D+00 1.4511006632518D-03 +430 4.2900000000000D+00 1.4208378754035D-03 +431 4.3000000000000D+00 1.3912213215015D-03 +432 4.3100000000000D+00 1.3622368036094D-03 +433 4.3200000000000D+00 1.3338704465287D-03 +434 4.3300000000000D+00 1.3061086904541D-03 +435 4.3400000000000D+00 1.2789382832159D-03 +436 4.3500000000000D+00 1.2523462730956D-03 +437 4.3600000000000D+00 1.2263200017330D-03 +438 4.3700000000000D+00 1.2008470971389D-03 +439 4.3800000000000D+00 1.1759154671706D-03 +440 4.3900000000000D+00 1.1515132927681D-03 +441 4.4000000000000D+00 1.1276290215543D-03 +442 4.4100000000000D+00 1.1042513615905D-03 +443 4.4200000000000D+00 1.0813692752219D-03 +444 4.4300000000000D+00 1.0589719732491D-03 +445 4.4400000000000D+00 1.0370489090701D-03 +446 4.4500000000000D+00 1.0155897729477D-03 +447 4.4600000000000D+00 9.9458448651310D-04 +448 4.4700000000000D+00 9.7402319734873D-04 +449 4.4800000000000D+00 9.5389627374753D-04 +450 4.4900000000000D+00 9.3419429968074D-04 +451 4.5000000000000D+00 9.1490806963344D-04 +452 4.5100000000000D+00 8.9602858376858D-04 +453 4.5200000000000D+00 8.7754704315725D-04 +454 4.5300000000000D+00 8.5945484505990D-04 +455 4.5400000000000D+00 8.4174357859543D-04 +456 4.5500000000000D+00 8.2440502011087D-04 +457 4.5600000000000D+00 8.0743112890458D-04 +458 4.5700000000000D+00 7.9081404301009D-04 +459 4.5800000000000D+00 7.7454607504334D-04 +460 4.5900000000000D+00 7.5861970826238D-04 +461 4.6000000000000D+00 7.4302759264074D-04 +462 4.6100000000000D+00 7.2776254096374D-04 +463 4.6200000000000D+00 7.1281752512293D-04 +464 4.6300000000000D+00 6.9818567246693D-04 +465 4.6400000000000D+00 6.8386026218604D-04 +466 4.6500000000000D+00 6.6983472202689D-04 +467 4.6600000000000D+00 6.5610262470710D-04 +468 4.6700000000000D+00 6.4265768466096D-04 +469 4.6800000000000D+00 6.2949375480587D-04 +470 4.6900000000000D+00 6.1660482335915D-04 +471 4.7000000000000D+00 6.0398501081385D-04 +472 4.7100000000000D+00 5.9162856694437D-04 +473 4.7200000000000D+00 5.7952986779404D-04 +474 4.7300000000000D+00 5.6768341283756D-04 +475 4.7400000000000D+00 5.5608382218098D-04 +476 4.7500000000000D+00 5.4472583378346D-04 +477 4.7600000000000D+00 5.3360430092501D-04 +478 4.7700000000000D+00 5.2271418948290D-04 +479 4.7800000000000D+00 5.1205057540179D-04 +480 4.7900000000000D+00 5.0160864221636D-04 +481 4.8000000000000D+00 4.9138367861652D-04 +482 4.8100000000000D+00 4.8137107606062D-04 +483 4.8200000000000D+00 4.7156632657207D-04 +484 4.8300000000000D+00 4.6196502035036D-04 +485 4.8400000000000D+00 4.5256284360406D-04 +486 4.8500000000000D+00 4.4335557639422D-04 +487 4.8600000000000D+00 4.3433909051013D-04 +488 4.8700000000000D+00 4.2550934744410D-04 +489 4.8800000000000D+00 4.1686239641456D-04 +490 4.8900000000000D+00 4.0839437233007D-04 +491 4.9000000000000D+00 4.0010149390002D-04 +492 4.9100000000000D+00 3.9198006176199D-04 +493 4.9200000000000D+00 3.8402645662845D-04 +494 4.9300000000000D+00 3.7623713756062D-04 +495 4.9400000000000D+00 3.6860864020531D-04 +496 4.9500000000000D+00 3.6113757505265D-04 +497 4.9600000000000D+00 3.5382062578865D-04 +498 4.9700000000000D+00 3.4665454766778D-04 +499 4.9800000000000D+00 3.3963616589653D-04 +500 4.9900000000000D+00 3.3276237415324D-04 +501 5.0000000000000D+00 3.2603013302775D-04 +502 5.0100000000000D+00 3.1943646852146D-04 +503 5.0200000000000D+00 3.1297847061153D-04 +504 5.0300000000000D+00 3.0665329183520D-04 +505 5.0400000000000D+00 3.0045814588091D-04 +506 5.0500000000000D+00 2.9439030630931D-04 +507 5.0600000000000D+00 2.8844710518547D-04 +508 5.0700000000000D+00 2.8262593177751D-04 +509 5.0800000000000D+00 2.7692423130637D-04 +510 5.0900000000000D+00 2.7133950371334D-04 +511 5.1000000000000D+00 2.6586930243324D-04 +512 5.1100000000000D+00 2.6051123327897D-04 +513 5.1200000000000D+00 2.5526295325637D-04 +514 5.1300000000000D+00 2.5012216942446D-04 +515 5.1400000000000D+00 2.4508663780827D-04 +516 5.1500000000000D+00 2.4015416232503D-04 +517 5.1600000000000D+00 2.3532259371738D-04 +518 5.1700000000000D+00 2.3058982856976D-04 +519 5.1800000000000D+00 2.2595380829626D-04 +520 5.1900000000000D+00 2.2141251813147D-04 +521 5.2000000000000D+00 2.1696398618680D-04 +522 5.2100000000000D+00 2.1260628251423D-04 +523 5.2200000000000D+00 2.0833751818045D-04 +524 5.2300000000000D+00 2.0415584438846D-04 +525 5.2400000000000D+00 2.0005945162886D-04 +526 5.2500000000000D+00 1.9604656877558D-04 +527 5.2600000000000D+00 1.9211546226854D-04 +528 5.2700000000000D+00 1.8826443529677D-04 +529 5.2800000000000D+00 1.8449182699698D-04 +530 5.2900000000000D+00 1.8079601165817D-04 +531 5.3000000000000D+00 1.7717539802656D-04 +532 5.3100000000000D+00 1.7362842848512D-04 +533 5.3200000000000D+00 1.7015357834772D-04 +534 5.3300000000000D+00 1.6674935514574D-04 +535 5.3400000000000D+00 1.6341429793073D-04 +536 5.3500000000000D+00 1.6014697657344D-04 +537 5.3600000000000D+00 1.5694599115319D-04 +538 5.3700000000000D+00 1.5380997126325D-04 +539 5.3800000000000D+00 1.5073757537373D-04 +540 5.3900000000000D+00 1.4772749021404D-04 +541 5.4000000000000D+00 1.4477843016353D-04 +542 5.4100000000000D+00 1.4188913664728D-04 +543 5.4200000000000D+00 1.3905837756556D-04 +544 5.4300000000000D+00 1.3628494674509D-04 +545 5.4400000000000D+00 1.3356766334248D-04 +546 5.4500000000000D+00 1.3090537131406D-04 +547 5.4600000000000D+00 1.2829693888299D-04 +548 5.4700000000000D+00 1.2574125801830D-04 +549 5.4800000000000D+00 1.2323724390682D-04 +550 5.4900000000000D+00 1.2078383451147D-04 +551 5.5000000000000D+00 1.1837999003372D-04 +552 5.5100000000000D+00 1.1602469244632D-04 +553 5.5200000000000D+00 1.1371694502978D-04 +554 5.5300000000000D+00 1.1145577191654D-04 +555 5.5400000000000D+00 1.0924021763891D-04 +556 5.5500000000000D+00 1.0706934669890D-04 +557 5.5600000000000D+00 1.0494224316615D-04 +558 5.5700000000000D+00 1.0285801022292D-04 +559 5.5800000000000D+00 1.0081576976958D-04 +560 5.5900000000000D+00 9.8814662025439D-05 +561 5.6000000000000D+00 9.6853845138315D-05 +562 5.6100000000000D+00 9.4932494790649D-05 +563 5.6200000000000D+00 9.3049803858329D-05 +564 5.6300000000000D+00 9.1204982026846D-05 +565 5.6400000000000D+00 8.9397255425875D-05 +566 5.6500000000000D+00 8.7625866285773D-05 +567 5.6600000000000D+00 8.5890072595543D-05 +568 5.6700000000000D+00 8.4189147768306D-05 +569 5.6800000000000D+00 8.2522380298431D-05 +570 5.6900000000000D+00 8.0889073490112D-05 +571 5.7000000000000D+00 7.9288545097924D-05 +572 5.7100000000000D+00 7.7720127032421D-05 +573 5.7200000000000D+00 7.6183165061347D-05 +574 5.7300000000000D+00 7.4677018516356D-05 +575 5.7400000000000D+00 7.3201060004036D-05 +576 5.7500000000000D+00 7.1754675118524D-05 +577 5.7600000000000D+00 7.0337262202814D-05 +578 5.7700000000000D+00 6.8948232039722D-05 +579 5.7800000000000D+00 6.7587007602177D-05 +580 5.7900000000000D+00 6.6253023795967D-05 +581 5.8000000000000D+00 6.4945727208078D-05 +582 5.8100000000000D+00 6.3664575856944D-05 +583 5.8200000000000D+00 6.2409038952116D-05 +584 5.8300000000000D+00 6.1178596681482D-05 +585 5.8400000000000D+00 5.9972739950038D-05 +586 5.8500000000000D+00 5.8790970164816D-05 +587 5.8600000000000D+00 5.7632799014010D-05 +588 5.8700000000000D+00 5.6497748250899D-05 +589 5.8800000000000D+00 5.5385349478750D-05 +590 5.8900000000000D+00 5.4295143946131D-05 +591 5.9000000000000D+00 5.3226682363001D-05 +592 5.9100000000000D+00 5.2179524676139D-05 +593 5.9200000000000D+00 5.1153239884652D-05 +594 5.9300000000000D+00 5.0147405850222D-05 +595 5.9400000000000D+00 4.9161609111459D-05 +596 5.9500000000000D+00 4.8195444699493D-05 +597 5.9600000000000D+00 4.7248515959553D-05 +598 5.9700000000000D+00 4.6320434397986D-05 +599 5.9800000000000D+00 4.5410819485111D-05 +600 5.9900000000000D+00 4.4519298497813D-05 + + +ONCVPSP (Optimized Norm-Conservinng Vanderbilt PSeudopotential) +scalar-relativistic version 3.2.2 08/07/2015 + + +While it is not required under the terms of the GNU GPL, it is +suggested that you cite D. R. Hamann, Phys. Rev. B 88, 085117 (2013) +in any publication utilizing these pseudopotentials. + + +# ATOM AND REFERENCE CONFIGURATION +# atsym z nc nv iexc psfile +O 8.00 1 2 4 psp8 +# +# n l f energy (Ha) +1 0 2.00 -1.8914766D+01 +2 0 2.00 -8.8057174D-01 +2 1 4.00 -3.3186939D-01 +# +# PSEUDOPOTENTIAL AND OPTIMIZATION +# lmax +2 +# +# l, rc, ep, ncon, nbas, qcut +0 1.35 -0.88 4 8 8.40 +1 1.45 -0.33 4 8 9.30 +2 1.25 0.10 4 8 6.00 +# +# LOCAL POTENTIAL +# lloc, lpopt, rc(5), dvloc0 +4 5 1.20 0.00 +# +# VANDERBILT-KLEINMAN-BYLANDER PROJECTORs +# l, nproj, debl +0 2 1.0000 +1 2 1.0000 +2 1 1.0000 +# +# MODEL CORE CHARGE +# icmod, fcfact, rcfact +3 4.00 1.50 +# +# LOG DERIVATIVE ANALYSIS +# epsh1, epsh2, depsh +-12.00 12.00 0.02 +# +# OUTPUT GRID +# rlmax, drl +6.00 0.01 +# +# TEST CONFIGURATIONS +# ncnf +0 +# nvcnf +# n l f + + + diff --git a/abipy/data/pseudos/P.psp8 b/abipy/data/pseudos/P.psp8 new file mode 100644 index 000000000..01c8b0f62 --- /dev/null +++ b/abipy/data/pseudos/P.psp8 @@ -0,0 +1,3667 @@ +P ONCVPSP-3.3.0 r_core= 1.46089 1.55067 1.70594 +15.0000 5.0000 171102 zatom,zion,pspd +8 -1012 2 4 600 0 pspcod,pspxc,lmax,lloc,mmax,r2well +5.99000000 5.00000000 0.00000000 rchrg fchrg qchrg +2 2 2 0 0 nproj +1 1 extension_switch +0 6.7951922407484D+00 1.0782916708880D+00 +1 0.0000000000000D+00 -1.7628875192965D-08 4.3221890899670D-08 +2 1.0000000000000D-02 5.6100475374758D-02 -5.2645997693819D-02 +3 2.0000000000000D-02 1.1165925286328D-01 -1.0401579982635D-01 +4 3.0000000000000D-02 1.6614570872616D-01 -1.5286032506218D-01 +5 4.0000000000000D-02 2.1905113871661D-01 -1.9798415985875D-01 +6 5.0000000000000D-02 2.6989915045959D-01 -2.3827100208146D-01 +7 6.0000000000000D-02 3.1825538787777D-01 -2.7270746787899D-01 +8 7.0000000000000D-02 3.6373638621652D-01 -3.0040476822559D-01 +9 8.0000000000000D-02 4.0601737384893D-01 -3.2061780475929D-01 +10 9.0000000000000D-02 4.4483885840918D-01 -3.3276128693017D-01 +11 1.0000000000000D-01 4.8001185948088D-01 -3.3642253297592D-01 +12 1.1000000000000D-01 5.1142167756427D-01 -3.3137068465193D-01 +13 1.2000000000000D-01 5.3903011881239D-01 -3.1756213861250D-01 +14 1.3000000000000D-01 5.6287612646603D-01 -2.9514207440730D-01 +15 1.4000000000000D-01 5.8307480240087D-01 -2.6444203867888D-01 +16 1.5000000000000D-01 5.9981483507730D-01 -2.2597362572508D-01 +17 1.6000000000000D-01 6.1335438279306D-01 -1.8041837450750D-01 +18 1.7000000000000D-01 6.2401549282666D-01 -1.2861407983357D-01 +19 1.8000000000000D-01 6.3217716718630D-01 -7.1537789253070D-02 +20 1.9000000000000D-01 6.3826721363747D-01 -1.0285825696085D-02 +21 2.0000000000000D-01 6.4275304590571D-01 5.3948762348079D-02 +22 2.1000000000000D-01 6.4613161892655D-01 1.1990086750972D-01 +23 2.2000000000000D-01 6.4891870329381D-01 1.8625960674396D-01 +24 2.3000000000000D-01 6.5163771726281D-01 2.5169568599409D-01 +25 2.4000000000000D-01 6.5480834450150D-01 3.1488928722717D-01 +26 2.5000000000000D-01 6.5893517103932D-01 3.7455790596871D-01 +27 2.6000000000000D-01 6.6449657542182D-01 4.2948356619993D-01 +28 2.7000000000000D-01 6.7193410191310D-01 4.7853884979986D-01 +29 2.8000000000000D-01 6.8164253776541D-01 5.2071119944890D-01 +30 2.9000000000000D-01 6.9396090225735D-01 5.5512498666255D-01 +31 3.0000000000000D-01 7.0916453763912D-01 5.8106087977500D-01 +32 3.1000000000000D-01 7.2745847065311D-01 5.9797209941686D-01 +33 3.2000000000000D-01 7.4897218833340D-01 6.0549721030741D-01 +34 3.3000000000000D-01 7.7375594381711D-01 6.0346916681653D-01 +35 3.4000000000000D-01 8.0177867747007D-01 5.9192040439753D-01 +36 3.5000000000000D-01 8.3292760633715D-01 5.7108384818350D-01 +37 3.6000000000000D-01 8.6700950141319D-01 5.4138979220653D-01 +38 3.7000000000000D-01 9.0375363815652D-01 5.0345868621292D-01 +39 3.8000000000000D-01 9.4281637171323D-01 4.5808995024297D-01 +40 3.9000000000000D-01 9.8378725516351D-01 4.0624701835759D-01 +41 4.0000000000000D-01 1.0261965874098D+00 3.4903889048903D-01 +42 4.1000000000000D-01 1.0695242477373D+00 2.8769854380720D-01 +43 4.2000000000000D-01 1.1132096471905D+00 2.2355862075166D-01 +44 4.3000000000000D-01 1.1566626032791D+00 1.5802486863498D-01 +45 4.4000000000000D-01 1.1992749246331D+00 9.2547854284845D-02 +46 4.5000000000000D-01 1.2404324764914D+00 2.8593515541199D-02 +47 4.6000000000000D-01 1.2795274866653D+00 -3.2386861256901D-02 +48 4.7000000000000D-01 1.3159708451132D+00 -8.8986632978096D-02 +49 4.8000000000000D-01 1.3492041486503D+00 -1.3987315211297D-01 +50 4.9000000000000D-01 1.3787112456666D+00 -1.8381587989459D-01 +51 5.0000000000000D-01 1.4040290439760D+00 -2.1971268065744D-01 +52 5.1000000000000D-01 1.4247573579665D+00 -2.4661375022254D-01 +53 5.2000000000000D-01 1.4405675888035D+00 -2.6374267450357D-01 +54 5.3000000000000D-01 1.4512100532476D+00 -2.7051416825375D-01 +55 5.4000000000000D-01 1.4565198022759D+00 -2.6654810696467D-01 +56 5.5000000000000D-01 1.4564207996843D+00 -2.5167953622693D-01 +57 5.6000000000000D-01 1.4509283625319D+00 -2.2596442073945D-01 +58 5.7000000000000D-01 1.4401497992894D+00 -1.8968097868515D-01 +59 5.8000000000000D-01 1.4242832168713D+00 -1.4332653390557D-01 +60 5.9000000000000D-01 1.4036145040882D+00 -8.7609907531260D-02 +61 6.0000000000000D-01 1.3785125352784D+00 -2.3439459571274D-02 +62 6.1000000000000D-01 1.3494226737776D+00 4.8093021025719D-02 +63 6.2000000000000D-01 1.3168586891298D+00 1.2573229543466D-01 +64 6.3000000000000D-01 1.2813932345404D+00 2.0808316092356D-01 +65 6.4000000000000D-01 1.2436470607139D+00 2.9363700901420D-01 +66 6.5000000000000D-01 1.2042771687546D+00 3.8080095627500D-01 +67 6.6000000000000D-01 1.1639641275441D+00 4.6792899272223D-01 +68 6.7000000000000D-01 1.1233987993742D+00 5.5335454810547D-01 +69 6.8000000000000D-01 1.0832687313937D+00 6.3542384293378D-01 +70 6.9000000000000D-01 1.0442444792265D+00 7.1252936994618D-01 +71 7.0000000000000D-01 1.0069661326952D+00 7.8314284340534D-01 +72 7.1000000000000D-01 9.7203031193751D-01 8.4584695811816D-01 +73 7.2000000000000D-01 9.3997789525362D-01 8.9936531762943D-01 +74 7.3000000000000D-01 9.1128272786014D-01 9.4258992138040D-01 +75 7.4000000000000D-01 8.8634154362994D-01 9.7460564307642D-01 +76 7.5000000000000D-01 8.6546531010198D-01 9.9471118647801D-01 +77 7.6000000000000D-01 8.4887218090230D-01 1.0024360694588D+00 +78 7.7000000000000D-01 8.3668220997556D-01 9.9755326060234D-01 +79 7.8000000000000D-01 8.2891394871796D-01 9.8008717476582D-01 +80 7.9000000000000D-01 8.2548301145375D-01 9.5031682189338D-01 +81 8.0000000000000D-01 8.2620265697204D-01 9.0877399626669D-01 +82 8.1000000000000D-01 8.3078639491872D-01 8.5623648916943D-01 +83 8.2000000000000D-01 8.3885258645018D-01 7.9371640481583D-01 +84 8.3000000000000D-01 8.4993096945789D-01 7.2244375548933D-01 +85 8.4000000000000D-01 8.6347100063126D-01 6.4384560527428D-01 +86 8.5000000000000D-01 8.7885187038682D-01 5.5952112070578D-01 +87 8.6000000000000D-01 8.9539401297127D-01 4.7121296934975D-01 +88 8.7000000000000D-01 9.1237190351582D-01 3.8077558210837D-01 +89 8.8000000000000D-01 9.2902790709362D-01 2.9014086041763D-01 +90 8.9000000000000D-01 9.4458692245432D-01 2.0128196413269D-01 +91 9.0000000000000D-01 9.5827154554252D-01 1.1617585864806D-01 +92 9.1000000000000D-01 9.6931746552273D-01 3.6765329766200D-02 +93 9.2000000000000D-01 9.7698879910482D-01 -3.5078808658752D-02 +94 9.3000000000000D-01 9.8059306766222D-01 -9.7594586625375D-02 +95 9.4000000000000D-01 9.7949552602084D-01 -1.4916411311915D-01 +96 9.5000000000000D-01 9.7313256177734D-01 -1.8834648328745D-01 +97 9.6000000000000D-01 9.6102389973515D-01 -2.1390770574410D-01 +98 9.7000000000000D-01 9.4278336637483D-01 -2.2484704866141D-01 +99 9.8000000000000D-01 9.1812799513943D-01 -2.2041926749842D-01 +100 9.9000000000000D-01 8.8688528329995D-01 -2.0015225150610D-01 +101 1.0000000000000D+00 8.4899844482009D-01 -1.6385970944077D-01 +102 1.0100000000000D+00 8.0452954074865D-01 -1.1164860667333D-01 +103 1.0200000000000D+00 7.5366040803063D-01 -4.3921163134547D-02 +104 1.0300000000000D+00 6.9669134986562D-01 3.8628674182748D-02 +105 1.0400000000000D+00 6.3403759109488D-01 1.3502427087171D-01 +106 1.0500000000000D+00 5.6622354642262D-01 2.4402073430933D-01 +107 1.0600000000000D+00 4.9387499070162D-01 3.6412450771560D-01 +108 1.0700000000000D+00 4.1770926036218D-01 4.9361780623299D-01 +109 1.0800000000000D+00 3.3852365444315D-01 6.3058747525998D-01 +110 1.0900000000000D+00 2.5718223722052D-01 7.7295776878961D-01 +111 1.1000000000000D+00 1.7460127712285D-01 9.1852646515605D-01 +112 1.1100000000000D+00 9.1733584798083D-02 1.0650036684581D+00 +113 1.1200000000000D+00 9.5520342661691D-03 1.2100525923140D+00 +114 1.1300000000000D+00 -7.0967431227074D-02 1.3513315794427D+00 +115 1.1400000000000D+00 -1.4886299565380D-01 1.4865365828230D+00 +116 1.1500000000000D+00 -2.2320404853558D-01 1.6134433164957D+00 +117 1.1600000000000D+00 -2.9310782703433D-01 1.7299482900925D+00 +118 1.1700000000000D+00 -3.5775531099720D-01 1.8341079597674D+00 +119 1.1800000000000D+00 -4.1640606659150D-01 1.9241752444781D+00 +120 1.1900000000000D+00 -4.6841175847645D-01 1.9986327171695D+00 +121 1.2000000000000D+00 -5.1322807452432D-01 2.0562218401713D+00 +122 1.2100000000000D+00 -5.5042482712883D-01 2.0959676638943D+00 +123 1.2200000000000D+00 -5.7969403408251D-01 2.1171985045309D+00 +124 1.2300000000000D+00 -6.0085582295984D-01 2.1195602178914D+00 +125 1.2400000000000D+00 -6.1386203676392D-01 2.1030247702524D+00 +126 1.2500000000000D+00 -6.1879745231205D-01 2.0678928906091D+00 +127 1.2600000000000D+00 -6.1587859075040D-01 2.0147907567106D+00 +128 1.2700000000000D+00 -6.0545012904177D-01 1.9446607400481D+00 +129 1.2800000000000D+00 -5.8797894971595D-01 1.8587463053667D+00 +130 1.2900000000000D+00 -5.6404595148467D-01 1.7585713710780D+00 +131 1.3000000000000D+00 -5.3433575386118D-01 1.6459144629151D+00 +132 1.3100000000000D+00 -4.9962446167400D-01 1.5227780741602D+00 +133 1.3200000000000D+00 -4.6076573324438D-01 1.3913538379822D+00 +134 1.3300000000000D+00 -4.1867538351559D-01 1.2539840865552D+00 +135 1.3400000000000D+00 -3.7431480080532D-01 1.1131204886535D+00 +136 1.3500000000000D+00 -3.2867349125016D-01 9.7128054448126D-01 +137 1.3600000000000D+00 -2.8275104975271D-01 8.3100267893982D-01 +138 1.3700000000000D+00 -2.3753890415539D-01 6.9480079257429D-01 +139 1.3800000000000D+00 -1.9400214987031D-01 5.6511905618071D-01 +140 1.3900000000000D+00 -1.5306182437906D-01 4.4428781497071D-01 +141 1.4000000000000D+00 -1.1557793541276D-01 3.3448137923234D-01 +142 1.4100000000000D+00 -8.2335241129342D-02 2.3768332060249D-01 +143 1.4200000000000D+00 -5.4041072471532D-02 1.5568583408933D-01 +144 1.4300000000000D+00 -3.1153233396295D-02 8.9600697329194D-02 +145 1.4400000000000D+00 -1.4323251475491D-02 4.1135540905765D-02 +146 1.4500000000000D+00 -4.3256395443989D-03 1.2392868740688D-02 +147 1.4600000000000D+00 -1.7359555837801D-04 4.7288943944104D-04 +148 1.4700000000000D+00 4.5851968503202D-04 -1.3268044645718D-03 +149 1.4800000000000D+00 -5.4023905943446D-05 1.5602302359344D-04 +150 1.4900000000000D+00 -1.2791637429738D-04 3.6899242665458D-04 +151 1.5000000000000D+00 1.9019365210326D-05 -5.5053833747601D-05 +152 1.5100000000000D+00 1.7440649401607D-05 -5.0457141269952D-05 +153 1.5200000000000D+00 3.1217282433624D-08 -2.7245369081129D-08 +154 1.5300000000000D+00 1.2660153607764D-08 -1.1049346092208D-08 +155 1.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +156 1.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +157 1.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +158 1.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +159 1.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +160 1.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +161 1.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +162 1.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +163 1.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 3.4529292943677D+00 9.0711665468692D-01 +1 0.0000000000000D+00 4.9222207809674D-08 -5.6695523831252D-08 +2 1.0000000000000D-02 2.6625960555347D-03 -2.2560568007727D-03 +3 2.0000000000000D-02 1.0590483910951D-02 -8.9566306117540D-03 +4 3.0000000000000D-02 2.3605319310108D-02 -1.9900491320188D-02 +5 4.0000000000000D-02 4.1414354630489D-02 -3.4757420344032D-02 +6 5.0000000000000D-02 6.3617075623296D-02 -5.3075839996778D-02 +7 6.0000000000000D-02 8.9714290140199D-02 -7.4293261074124D-02 +8 7.0000000000000D-02 1.1911947127906D-01 -9.7749321067358D-02 +9 8.0000000000000D-02 1.5117210815873D-01 -1.2270112871282D-01 +10 9.0000000000000D-02 1.8515277352401D-01 -1.4834057990246D-01 +11 1.0000000000000D-01 2.2029957952007D-01 -1.7381326638398D-01 +12 1.1000000000000D-01 2.5582566206837D-01 -1.9823856310074D-01 +13 1.2000000000000D-01 2.9093731098660D-01 -2.2073045322607D-01 +14 1.3000000000000D-01 3.2485234782795D-01 -2.4041863251484D-01 +15 1.4000000000000D-01 3.5681834670751D-01 -2.5646942691554D-01 +16 1.5000000000000D-01 3.8613029529508D-01 -2.6810605964160D-01 +17 1.6000000000000D-01 4.1214730366730D-01 -2.7462781607084D-01 +18 1.7000000000000D-01 4.3430798762728D-01 -2.7542767669473D-01 +19 1.8000000000000D-01 4.5214418004554D-01 -2.7000801944479D-01 +20 1.9000000000000D-01 4.6529265820742D-01 -2.5799403245425D-01 +21 2.0000000000000D-01 4.7350461637190D-01 -2.3914452586170D-01 +22 2.1000000000000D-01 4.7665265990984D-01 -2.1335988565676D-01 +23 2.2000000000000D-01 4.7473514952794D-01 -1.8068697268612D-01 +24 2.3000000000000D-01 4.6787778012115D-01 -1.4132083454080D-01 +25 2.4000000000000D-01 4.5633233756949D-01 -9.5603165790652D-02 +26 2.5000000000000D-01 4.4047263708381D-01 -4.4017521511738D-02 +27 2.6000000000000D-01 4.2078770724854D-01 1.2818641187672D-02 +28 2.7000000000000D-01 3.9787234344147D-01 7.4164950357061D-02 +29 2.8000000000000D-01 3.7241521157482D-01 1.3917192587257D-01 +30 2.9000000000000D-01 3.4518473689002D-01 2.0689733441867D-01 +31 3.0000000000000D-01 3.1701306170289D-01 2.7632476503081D-01 +32 3.1000000000000D-01 2.8877839948468D-01 3.4638404741849D-01 +33 3.2000000000000D-01 2.6138614953416D-01 4.1597309290182D-01 +34 3.3000000000000D-01 2.3574916593957D-01 4.8398070398032D-01 +35 3.4000000000000D-01 2.1276759588604D-01 5.4930987407026D-01 +36 3.5000000000000D-01 1.9330871514026D-01 6.1090108436320D-01 +37 3.6000000000000D-01 1.7818719241845D-01 6.6775510044165D-01 +38 3.7000000000000D-01 1.6814620917961D-01 7.1895477739361D-01 +39 3.8000000000000D-01 1.6383984723081D-01 7.6368539863646D-01 +40 3.9000000000000D-01 1.6581713361925D-01 8.0125310022179D-01 +41 4.0000000000000D-01 1.7450810103576D-01 8.3110096855870D-01 +42 4.1000000000000D-01 1.9021218295440D-01 8.5282244458242D-01 +43 4.2000000000000D-01 2.1308921673946D-01 8.6617172053389D-01 +44 4.3000000000000D-01 2.4315327586816D-01 8.7107087565699D-01 +45 4.4000000000000D-01 2.8026949527850D-01 8.6761356307093D-01 +46 4.5000000000000D-01 3.2415399280296D-01 8.5606513050954D-01 +47 4.6000000000000D-01 3.7437692592355D-01 8.3685913111476D-01 +48 4.7000000000000D-01 4.3036865797903D-01 8.1059025552886D-01 +49 4.8000000000000D-01 4.9142894280300D-01 7.7800379161345D-01 +50 4.9000000000000D-01 5.5673897291873D-01 7.3998179167780D-01 +51 5.0000000000000D-01 6.2537607519243D-01 6.9752619759177D-01 +52 5.1000000000000D-01 6.9633078051750D-01 6.5173924013035D-01 +53 5.2000000000000D-01 7.6852594189806D-01 6.0380148892805D-01 +54 5.3000000000000D-01 8.4083752934196D-01 5.5494798222334D-01 +55 5.4000000000000D-01 9.1211669121555D-01 5.0644291004580D-01 +56 5.5000000000000D-01 9.8121264105615D-01 4.5955335960526D-01 +57 5.6000000000000D-01 1.0469959069759D+00 4.1552265658969D-01 +58 5.7000000000000D-01 1.1083814681948D+00 3.7554385032191D-01 +59 5.8000000000000D-01 1.1643513003133D+00 3.4073389381046D-01 +60 5.9000000000000D-01 1.2139758578029D+00 3.1210906151022D-01 +61 6.0000000000000D-01 1.2564340387000D+00 2.9056212827326D-01 +62 6.1000000000000D-01 1.2910312026671D+00 2.7684180248462D-01 +63 6.2000000000000D-01 1.3172148484539D+00 2.7153486588330D-01 +64 6.3000000000000D-01 1.3345876004796D+00 2.7505142191174D-01 +65 6.4000000000000D-01 1.3429172051387D+00 2.8761359551770D-01 +66 6.5000000000000D-01 1.3421432950732D+00 3.0924796063183D-01 +67 6.6000000000000D-01 1.3323807429534D+00 3.3978189836149D-01 +68 6.7000000000000D-01 1.3139194935516D+00 3.7884401124182D-01 +69 6.8000000000000D-01 1.2872208332223D+00 4.2586863766711D-01 +70 6.9000000000000D-01 1.2529101279361D+00 4.8010442749484D-01 +71 7.0000000000000D-01 1.2117661328682D+00 5.4062685692860D-01 +72 7.1000000000000D-01 1.1647070470998D+00 6.0635447945902D-01 +73 7.2000000000000D-01 1.1127735548705D+00 6.7606863144713D-01 +74 7.3000000000000D-01 1.0571091584724D+00 7.4843623767247D-01 +75 7.4000000000000D-01 9.9893816588145D-01 8.2203529547310D-01 +76 7.5000000000000D-01 9.3954174763776D-01 8.9538255706261D-01 +77 7.6000000000000D-01 8.8023252104992D-01 9.6696287967137D-01 +78 7.7000000000000D-01 8.2232815446829D-01 1.0352596735271D+00 +79 7.8000000000000D-01 7.6712450973342D-01 1.0987858488392D+00 +80 7.9000000000000D-01 7.1586885587099D-01 1.1561146461262D+00 +81 8.0000000000000D-01 6.6973369168519D-01 1.2059097294108D+00 +82 8.1000000000000D-01 6.2979170872355D-01 1.2469539294296D+00 +83 8.2000000000000D-01 5.9699240921794D-01 1.2781760439695D+00 +84 8.3000000000000D-01 5.7214086629291D-01 1.2986751344714D+00 +85 8.4000000000000D-01 5.5587907642537D-01 1.3077418015945D+00 +86 8.5000000000000D-01 5.4867030749739D-01 1.3048759767463D+00 +87 8.6000000000000D-01 5.5078679065452D-01 1.2898008306755D+00 +88 8.7000000000000D-01 5.6230104159138D-01 1.2624724728883D+00 +89 8.8000000000000D-01 5.8308102801646D-01 1.2230851955290D+00 +90 8.9000000000000D-01 6.1278932621449D-01 1.1720721009252D+00 +91 9.0000000000000D-01 6.5088633225452D-01 1.1101010415870D+00 +92 9.1000000000000D-01 6.9663751399031D-01 1.0380658933239D+00 +93 9.2000000000000D-01 7.4912461012625D-01 9.5707327449983D-01 +94 9.3000000000000D-01 8.0726060385701D-01 8.6842491544724D-01 +95 9.4000000000000D-01 8.6980822250139D-01 7.7359596990941D-01 +96 9.5000000000000D-01 9.3540164272978D-01 6.7420964321751D-01 +97 9.6000000000000D-01 1.0025710144038D+00 5.7200858862510D-01 +98 9.7000000000000D-01 1.0697693577045D+00 4.6882359035655D-01 +99 9.8000000000000D-01 1.1354013363240D+00 3.6654011154123D-01 +100 9.9000000000000D-01 1.1978533682633D+00 2.6706333243681D-01 +101 1.0000000000000D+00 1.2555245044205D+00 1.7228234010977D-01 +102 1.0100000000000D+00 1.3068574844954D+00 8.4034154086803D-02 +103 1.0200000000000D+00 1.3503693704913D+00 4.0682826112478D-03 +104 1.0300000000000D+00 1.3846811613426D+00 -6.5987500239604D-02 +105 1.0400000000000D+00 1.4085458053583D+00 -1.2465948212836D-01 +106 1.0500000000000D+00 1.4208740532608D+00 -1.7065780110843D-01 +107 1.0600000000000D+00 1.4207576320428D+00 -2.0290309566471D-01 +108 1.0700000000000D+00 1.4074892660262D+00 -2.2054947045515D-01 +109 1.0800000000000D+00 1.3805791306979D+00 -2.2300330114417D-01 +110 1.0900000000000D+00 1.3397673873395D+00 -2.0993747448267D-01 +111 1.1000000000000D+00 1.2850325188716D+00 -1.8130074408383D-01 +112 1.1100000000000D+00 1.2165952706225D+00 -1.3732197918451D-01 +113 1.1200000000000D+00 1.1349180778377D+00 -7.8509174435246D-02 +114 1.1300000000000D+00 1.0406999553483D+00 -5.6431974229545D-03 +115 1.1400000000000D+00 9.3486689379013D-01 8.0233669314974D-02 +116 1.1500000000000D+00 8.1855791869349D-01 1.7783420525505D-01 +117 1.1600000000000D+00 6.9310703591148D-01 2.8564748352298D-01 +118 1.1700000000000D+00 5.6002137521422D-01 4.0196449059867D-01 +119 1.1800000000000D+00 4.2095590610462D-01 5.2490769546302D-01 +120 1.1900000000000D+00 2.7768519078071D-01 6.5246402455581D-01 +121 1.2000000000000D+00 1.3207268357802D-01 7.8252064774501D-01 +122 1.2100000000000D+00 -1.3961868159682D-02 9.1290292789467D-01 +123 1.2200000000000D+00 -1.5847631073702D-01 1.0414138220860D+00 +124 1.2300000000000D+00 -2.9954062785526D-01 1.1658740005825D+00 +125 1.2400000000000D+00 -4.3527150064894D-01 1.2841619380443D+00 +126 1.2500000000000D+00 -5.6386622335140D-01 1.3942532089024D+00 +127 1.2600000000000D+00 -6.8363533435831D-01 1.4942582433562D+00 +128 1.2700000000000D+00 -7.9303335200465D-01 1.5824578351184D+00 +129 1.2800000000000D+00 -8.9068699905420D-01 1.6573356862163D+00 +130 1.2900000000000D+00 -9.7542039372830D-01 1.7176073841057D+00 +131 1.3000000000000D+00 -1.0462767248073D+00 1.7622452525948D+00 +132 1.3100000000000D+00 -1.1025359398856D+00 1.7904985318596D+00 +133 1.3200000000000D+00 -1.1437281515035D+00 1.8019085477205D+00 +134 1.3300000000000D+00 -1.1696424666245D+00 1.7963185311062D+00 +135 1.3400000000000D+00 -1.1803310156195D+00 1.7738778312401D+00 +136 1.3500000000000D+00 -1.1761081704881D+00 1.7350405146735D+00 +137 1.3600000000000D+00 -1.1575448622078D+00 1.6805582493477D+00 +138 1.3700000000000D+00 -1.1254581111410D+00 1.6114676104683D+00 +139 1.3800000000000D+00 -1.0808960217161D+00 1.5290721044096D+00 +140 1.3900000000000D+00 -1.0251183567365D+00 1.4349190490983D+00 +141 1.4000000000000D+00 -9.5957320064436D-01 1.3307719072118D+00 +142 1.4100000000000D+00 -8.8587004267886D-01 1.2185784609362D+00 +143 1.4200000000000D+00 -8.0574978042898D-01 1.1004354136982D+00 +144 1.4300000000000D+00 -7.2105226657817D-01 9.7855014889992D-01 +145 1.4400000000000D+00 -6.3368190233777D-01 8.5520024302077D-01 +146 1.4500000000000D+00 -5.4557202192770D-01 7.3269161393940D-01 +147 1.4600000000000D+00 -4.5864854544110D-01 6.1331558122079D-01 +148 1.4700000000000D+00 -3.7479402114050D-01 4.9930708079632D-01 +149 1.4800000000000D+00 -2.9581249621146D-01 3.9280416688627D-01 +150 1.4900000000000D+00 -2.2339595927470D-01 2.9580927824211D-01 +151 1.5000000000000D+00 -1.5912040001382D-01 2.1018908364172D-01 +152 1.5100000000000D+00 -1.0431346765694D-01 1.3750478662002D-01 +153 1.5200000000000D+00 -5.9897868027740D-02 7.8810787493163D-02 +154 1.5300000000000D+00 -2.7460667527666D-02 3.6058020631494D-02 +155 1.5400000000000D+00 -8.3264910362127D-03 1.0881505868039D-02 +156 1.5500000000000D+00 -2.5732773085027D-04 2.8640341547630D-04 +157 1.5600000000000D+00 1.0433498829982D-03 -1.3937846888722D-03 +158 1.5700000000000D+00 -5.4069085083644D-05 7.1935392083070D-05 +159 1.5800000000000D+00 -3.2244941131789D-04 4.2800531683185D-04 +160 1.5900000000000D+00 2.1866282497930D-05 -2.9195171766171D-05 +161 1.6000000000000D+00 5.5372849806588D-05 -7.3849765694911D-05 +162 1.6100000000000D+00 1.4125926092819D-08 5.3267795643719D-08 +163 1.6200000000000D+00 2.3452126398987D-08 8.8436189473409D-08 +164 1.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +165 1.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +166 1.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +167 1.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +168 1.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +169 1.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +2 -3.0248640179084D+00 -8.0218946439693D-01 +1 0.0000000000000D+00 -1.4809290689588D-08 1.7883379329481D-08 +2 1.0000000000000D-02 -3.8251372192813D-05 5.7622549196816D-05 +3 2.0000000000000D-02 -3.0443034537911D-04 4.5905717217809D-04 +4 3.0000000000000D-02 -1.0186009634771D-03 1.5385474316603D-03 +5 4.0000000000000D-02 -2.3852841036769D-03 3.6114209314957D-03 +6 5.0000000000000D-02 -4.5861418643562D-03 6.9651792877307D-03 +7 6.0000000000000D-02 -7.7731982851059D-03 1.1851232554619D-02 +8 7.0000000000000D-02 -1.2062757355657D-02 1.8477471400197D-02 +9 8.0000000000000D-02 -1.7530164461199D-02 2.7001852442642D-02 +10 9.0000000000000D-02 -2.4205539470958D-02 3.7527150498019D-02 +11 1.0000000000000D-01 -3.2070588969045D-02 5.0097006494405D-02 +12 1.1000000000000D-01 -4.1056582072243D-02 6.4693371987583D-02 +13 1.2000000000000D-01 -5.1043549347610D-02 8.1235421138992D-02 +14 1.3000000000000D-01 -6.1860738041806D-02 9.9579969304106D-02 +15 1.4000000000000D-01 -7.3288329700846D-02 1.1952340468048D-01 +16 1.5000000000000D-01 -8.5060398849488D-02 1.4080510645326D-01 +17 1.6000000000000D-01 -9.6869064276286D-02 1.6311229023405D-01 +18 1.7000000000000D-01 -1.0836975819289D-01 1.8608618999424D-01 +19 1.8000000000000D-01 -1.1918751364855D-01 2.0932945580476D-01 +20 1.9000000000000D-01 -1.2892414760120D-01 2.3241461913692D-01 +21 2.0000000000000D-01 -1.3716619645746D-01 2.5489345283756D-01 +22 2.1000000000000D-01 -1.4349344313111D-01 2.7630703168946D-01 +23 2.2000000000000D-01 -1.4748786011466D-01 2.9619628216636D-01 +24 2.3000000000000D-01 -1.4874278203030D-01 3.1411279697164D-01 +25 2.4000000000000D-01 -1.4687211387413D-01 3.2962968150915D-01 +26 2.5000000000000D-01 -1.4151937786655D-01 3.4235219578098D-01 +27 2.6000000000000D-01 -1.3236640256761D-01 3.5192795645121D-01 +28 2.7000000000000D-01 -1.1914146272728D-01 3.5805646997103D-01 +29 2.8000000000000D-01 -1.0162668714862D-01 3.6049777864204D-01 +30 2.9000000000000D-01 -7.9664564504063D-02 3.5908001711967D-01 +31 3.0000000000000D-01 -5.3163393334853D-02 3.5370569684742D-01 +32 3.1000000000000D-01 -2.2101542085163D-02 3.4435655989789D-01 +33 3.2000000000000D-01 1.3469592392691D-02 3.3109687122794D-01 +34 3.3000000000000D-01 5.3424014304565D-02 3.1407504890562D-01 +35 3.4000000000000D-01 9.7561005621503D-02 2.9352356484705D-01 +36 3.5000000000000D-01 1.4560648059606D-01 2.6975708336755D-01 +37 3.6000000000000D-01 1.9721581899222D-01 2.4316884071818D-01 +38 3.7000000000000D-01 2.5197814888869D-01 2.1422530503454D-01 +39 3.8000000000000D-01 3.0942202008999D-01 1.8345919204124D-01 +40 3.9000000000000D-01 3.6902238016941D-01 1.5146094670961D-01 +41 4.0000000000000D-01 4.3020873756369D-01 1.1886883414177D-01 +42 4.1000000000000D-01 4.9237437050200D-01 8.6357813573294D-02 +43 4.2000000000000D-01 5.5488641741492D-01 5.4627396906671D-02 +44 4.3000000000000D-01 6.1709666431835D-01 2.4388717022697D-02 +45 4.4000000000000D-01 6.7835282793435D-01 -3.6489492471245D-03 +46 4.5000000000000D-01 7.3801012036479D-01 -2.8791943609924D-02 +47 4.6000000000000D-01 7.9544287227260D-01 -5.0376004382469D-02 +48 4.7000000000000D-01 8.5005598696850D-01 -6.7779785510075D-02 +49 4.8000000000000D-01 9.0129599768850D-01 -8.0437842550863D-02 +50 4.9000000000000D-01 9.4866150473051D-01 -8.7852817750827D-02 +51 5.0000000000000D-01 9.9171277795977D-01 -8.9606567839864D-02 +52 5.1000000000000D-01 1.0300803233759D+00 -8.5369994925754D-02 +53 5.2000000000000D-01 1.0634722297494D+00 -7.4911362583357D-02 +54 5.3000000000000D-01 1.0916801324791D+00 -5.8102905547146D-02 +55 5.4000000000000D-01 1.1145836564434D+00 -3.4925571879560D-02 +56 5.5000000000000D-01 1.1321532272968D+00 -5.4717705754362D-03 +57 5.6000000000000D-01 1.1444511707820D+00 3.0053965474246D-02 +58 5.7000000000000D-01 1.1516310518690D+00 7.1336451812657D-02 +59 5.8000000000000D-01 1.1539352389510D+00 1.1795346995227D-01 +60 5.9000000000000D-01 1.1516907126917D+00 1.6938149826009D-01 +61 6.0000000000000D-01 1.1453031733342D+00 2.2500348288477D-01 +62 6.1000000000000D-01 1.1352495341848D+00 2.8411853447836D-01 +63 6.2000000000000D-01 1.1220689213291D+00 3.4595339755622D-01 +64 6.3000000000000D-01 1.1063523304365D+00 4.0967550243881D-01 +65 6.4000000000000D-01 1.0887311195345D+00 4.7440737632660D-01 +66 6.5000000000000D-01 1.0698645417376D+00 5.3924216033229D-01 +67 6.6000000000000D-01 1.0504265434452D+00 6.0325995403958D-01 +68 6.7000000000000D-01 1.0310920709206D+00 6.6554468901749D-01 +69 6.8000000000000D-01 1.0125231412233D+00 7.2520121794616D-01 +70 6.9000000000000D-01 9.9535494179421D-01 7.8137229707156D-01 +71 7.0000000000000D-01 9.8018222633830D-01 8.3325513687081D-01 +72 7.1000000000000D-01 9.6754627299453D-01 8.8011719909927D-01 +73 7.2000000000000D-01 9.5792266402096D-01 9.2131092789939D-01 +74 7.3000000000000D-01 9.5171013442078D-01 9.5628711828979D-01 +75 7.4000000000000D-01 9.4922072032355D-01 9.8460664680347D-01 +76 7.5000000000000D-01 9.5067141671854D-01 1.0059503160479D+00 +77 7.6000000000000D-01 9.5617752861276D-01 1.0201265971258D+00 +78 7.7000000000000D-01 9.6574787055793D-01 1.0270770903011D+00 +79 7.8000000000000D-01 9.7928193674679D-01 1.0268795650268D+00 +80 7.9000000000000D-01 9.9656912869112D-01 1.0197484840037D+00 +81 8.0000000000000D-01 1.0172900900860D+00 1.0060329620420D+00 +82 8.1000000000000D-01 1.0410201596745D+00 9.8621215809456D-01 +83 8.2000000000000D-01 1.0672349134473D+00 9.6088814708540D-01 +84 8.3000000000000D-01 1.0953177280716D+00 9.3077636614979D-01 +85 8.4000000000000D-01 1.1245692587827D+00 8.9669377674213D-01 +86 8.5000000000000D-01 1.1542186878283D+00 8.5954492884151D-01 +87 8.6000000000000D-01 1.1834365646366D+00 8.2030615533481D-01 +88 8.7000000000000D-01 1.2113490268605D+00 7.8000816275798D-01 +89 8.8000000000000D-01 1.2370531629689D+00 7.3971731816858D-01 +90 8.9000000000000D-01 1.2596332526697D+00 7.0051596032591D-01 +91 9.0000000000000D-01 1.2781776016635D+00 6.6348208597645D-01 +92 9.1000000000000D-01 1.2917956724524D+00 6.2966877839378D-01 +93 9.2000000000000D-01 1.2996352034961D+00 6.0008375502757D-01 +94 9.3000000000000D-01 1.3008990051393D+00 5.7566941392084D-01 +95 9.4000000000000D-01 1.2948611225674D+00 5.5728375433077D-01 +96 9.5000000000000D-01 1.2808820635485D+00 5.4568253579381D-01 +97 9.6000000000000D-01 1.2584228021153D+00 5.4150302146467D-01 +98 9.7000000000000D-01 1.2270572875946D+00 5.4524962727162D-01 +99 9.8000000000000D-01 1.1864832124228D+00 5.5728176708993D-01 +100 9.9000000000000D-01 1.1365308207547D+00 5.7780414737906D-01 +101 1.0000000000000D+00 1.0771695725367D+00 6.0685972309369D-01 +102 1.0100000000000D+00 1.0085125143245D+00 6.4432548036832D-01 +103 1.0200000000000D+00 9.3081824753735D-01 6.8991116194411D-01 +104 1.0300000000000D+00 8.4449042777516D-01 7.4316099767161D-01 +105 1.0400000000000D+00 7.5007477037410D-01 8.0345845077834D-01 +106 1.0500000000000D+00 6.4825358365270D-01 8.7003393335620D-01 +107 1.0600000000000D+00 5.3983789532157D-01 9.4197539041464D-01 +108 1.0700000000000D+00 4.2575728051095D-01 1.0182415992770D+00 +109 1.0800000000000D+00 3.0704754322661D-01 1.0976779784262D+00 +110 1.0900000000000D+00 1.8483644078115D-01 1.1790346543838D+00 +111 1.1000000000000D+00 6.0327678324837D-02 1.2609864901854D+00 +112 1.1100000000000D+00 -6.5216565536216D-02 1.3421547390033D+00 +113 1.1200000000000D+00 -1.9049429457960D-01 1.4211299556332D+00 +114 1.1300000000000D+00 -3.1418322055329D-01 1.4964957710447D+00 +115 1.1400000000000D+00 -4.3496083054977D-01 1.5668531169768D+00 +116 1.1500000000000D+00 -5.5152465272012D-01 1.6308444718047D+00 +117 1.1600000000000D+00 -6.6261237419797D-01 1.6871776978841D+00 +118 1.1700000000000D+00 -7.6702146583297D-01 1.7346490447058D+00 +119 1.1800000000000D+00 -8.6362797010148D-01 1.7721648966791D+00 +120 1.1900000000000D+00 -9.5140412582669D-01 1.7987618697568D+00 +121 1.2000000000000D+00 -1.0294345238398D+00 1.8136248890547D+00 +122 1.2100000000000D+00 -1.0969305041366D+00 1.8161029023560D+00 +123 1.2200000000000D+00 -1.1532425394290D+00 1.8057219305651D+00 +124 1.2300000000000D+00 -1.1978703892097D+00 1.7821952074245D+00 +125 1.2400000000000D+00 -1.2304708413793D+00 1.7454302036787D+00 +126 1.2500000000000D+00 -1.2508628904274D+00 1.6955323727380D+00 +127 1.2600000000000D+00 -1.2590302706228D+00 1.6328055439617D+00 +128 1.2700000000000D+00 -1.2551212947238D+00 1.5577489301892D+00 +129 1.2800000000000D+00 -1.2394459765195D+00 1.4710507521916D+00 +130 1.2900000000000D+00 -1.2124705090283D+00 1.3735786006471D+00 +131 1.3000000000000D+00 -1.1748091845713D+00 1.2663666735996D+00 +132 1.3100000000000D+00 -1.1272138763582D+00 1.1506000701941D+00 +133 1.3200000000000D+00 -1.0705612956400D+00 1.0275964380462D+00 +134 1.3300000000000D+00 -1.0058382264161D+00 8.9878525593031D-01 +135 1.3400000000000D+00 -9.3412499328763D-01 7.6568510063548D-01 +136 1.3500000000000D+00 -8.5657747517684D-01 6.2987931377008D-01 +137 1.3600000000000D+00 -7.7440795433700D-01 4.9299045671693D-01 +138 1.3700000000000D+00 -6.8886515828384D-01 3.5665402369977D-01 +139 1.3800000000000D+00 -6.0121383872212D-01 2.2249186009937D-01 +140 1.3900000000000D+00 -5.1271424781609D-01 9.2085759559328D-02 +141 1.4000000000000D+00 -4.2460188051743D-01 -3.3048290232065D-02 +142 1.4100000000000D+00 -3.3806782653909D-01 -1.5148476962305D-01 +143 1.4200000000000D+00 -2.5424011149681D-01 -2.6191171149242D-01 +144 1.4300000000000D+00 -1.7416629765067D-01 -3.6315187551690D-01 +145 1.4400000000000D+00 -9.8797712392051D-02 -4.5418155009485D-01 +146 1.4500000000000D+00 -2.8975506667104D-02 -5.3414675738711D-01 +147 1.4600000000000D+00 3.4580864030852D-02 -6.0237578115327D-01 +148 1.4700000000000D+00 9.1283589021486D-02 -6.5839021973151D-01 +149 1.4800000000000D+00 1.4068436582282D-01 -7.0191348439102D-01 +150 1.4900000000000D+00 1.8247965509549D-01 -7.3287559397433D-01 +151 1.5000000000000D+00 2.1651341295857D-01 -7.5141455579535D-01 +152 1.5100000000000D+00 2.4277613146636D-01 -7.5787186499328D-01 +153 1.5200000000000D+00 2.6140148489386D-01 -7.5278498890331D-01 +154 1.5300000000000D+00 2.7266045037054D-01 -7.3687661134537D-01 +155 1.5400000000000D+00 2.7695289382614D-01 -7.1104045808290D-01 +156 1.5500000000000D+00 2.7479693716383D-01 -6.7632424921569D-01 +157 1.5600000000000D+00 2.6681617068604D-01 -6.3390985362337D-01 +158 1.5700000000000D+00 2.5372512940035D-01 -5.8509121855792D-01 +159 1.5800000000000D+00 2.3631312563612D-01 -5.3125022193545D-01 +160 1.5900000000000D+00 2.1542693426906D-01 -4.7383110730927D-01 +161 1.6000000000000D+00 1.9195249995440D-01 -4.1431375128849D-01 +162 1.6100000000000D+00 1.6679613713720D-01 -3.5418638695746D-01 +163 1.6200000000000D+00 1.4086550212777D-01 -2.9491817377550D-01 +164 1.6300000000000D+00 1.1505073683009D-01 -2.3793214351412D-01 +165 1.6400000000000D+00 9.0206135275854D-02 -1.8457900236130D-01 +166 1.6500000000000D+00 6.7144185869716D-02 -1.3613487247330D-01 +167 1.6600000000000D+00 4.6579345661810D-02 -9.3699636023812D-02 +168 1.6700000000000D+00 2.9069172883799D-02 -5.8089252412506D-02 +169 1.6800000000000D+00 1.5304477852845D-02 -3.0413304756762D-02 +170 1.6900000000000D+00 6.0441977890016D-03 -1.1954042666456D-02 +171 1.7000000000000D+00 1.1633047492028D-03 -2.2954870704526D-03 +172 1.7100000000000D+00 -4.8742542974617D-04 9.5031496793298D-04 +173 1.7200000000000D+00 -3.6204305432170D-04 7.0633462307351D-04 +174 1.7300000000000D+00 1.0208796907457D-04 -2.0016841418295D-04 +175 1.7400000000000D+00 1.3466410702774D-04 -2.6394136177527D-04 +176 1.7500000000000D+00 -1.4196161949891D-05 2.8004127552980D-05 +177 1.7600000000000D+00 -2.7083742657995D-05 5.3439527622321D-05 +178 1.7700000000000D+00 1.0819248396432D-07 -2.0558838784983D-07 +179 1.7800000000000D+00 3.2242739994388D-07 -6.1267961437072D-07 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +4 +1 0.0000000000000D+00 -7.3911051893564D+00 +2 1.0000000000000D-02 -7.3907948461863D+00 +3 2.0000000000000D-02 -7.3898639011250D+00 +4 3.0000000000000D-02 -7.3883126133755D+00 +5 4.0000000000000D-02 -7.3861414141118D+00 +6 5.0000000000000D-02 -7.3833509061533D+00 +7 6.0000000000000D-02 -7.3799418633361D+00 +8 7.0000000000000D-02 -7.3759152296444D+00 +9 8.0000000000000D-02 -7.3712721181606D+00 +10 9.0000000000000D-02 -7.3660138098518D+00 +11 1.0000000000000D-01 -7.3601417522102D+00 +12 1.1000000000000D-01 -7.3536575577602D+00 +13 1.2000000000000D-01 -7.3465630024511D+00 +14 1.3000000000000D-01 -7.3388600239530D+00 +15 1.4000000000000D-01 -7.3305507198729D+00 +16 1.5000000000000D-01 -7.3216373459109D+00 +17 1.6000000000000D-01 -7.3121223139739D+00 +18 1.7000000000000D-01 -7.3020081902652D+00 +19 1.8000000000000D-01 -7.2912976933676D+00 +20 1.9000000000000D-01 -7.2799936923349D+00 +21 2.0000000000000D-01 -7.2680992048080D+00 +22 2.1000000000000D-01 -7.2556173951677D+00 +23 2.2000000000000D-01 -7.2425515727354D+00 +24 2.3000000000000D-01 -7.2289051900314D+00 +25 2.4000000000000D-01 -7.2146818410970D+00 +26 2.5000000000000D-01 -7.1998852598844D+00 +27 2.6000000000000D-01 -7.1845193187177D+00 +28 2.7000000000000D-01 -7.1685880268227D+00 +29 2.8000000000000D-01 -7.1520955289238D+00 +30 2.9000000000000D-01 -7.1350461039023D+00 +31 3.0000000000000D-01 -7.1174441635084D+00 +32 3.1000000000000D-01 -7.0992942511188D+00 +33 3.2000000000000D-01 -7.0806010405274D+00 +34 3.3000000000000D-01 -7.0613693347587D+00 +35 3.4000000000000D-01 -7.0416040648897D+00 +36 3.5000000000000D-01 -7.0213102888691D+00 +37 3.6000000000000D-01 -7.0004931903173D+00 +38 3.7000000000000D-01 -6.9791580772995D+00 +39 3.8000000000000D-01 -6.9573103810558D+00 +40 3.9000000000000D-01 -6.9349556546824D+00 +41 4.0000000000000D-01 -6.9120995717551D+00 +42 4.1000000000000D-01 -6.8887479248908D+00 +43 4.2000000000000D-01 -6.8649066242456D+00 +44 4.3000000000000D-01 -6.8405816959526D+00 +45 4.4000000000000D-01 -6.8157792805057D+00 +46 4.5000000000000D-01 -6.7905056311001D+00 +47 4.6000000000000D-01 -6.7647671119462D+00 +48 4.7000000000000D-01 -6.7385701965758D+00 +49 4.8000000000000D-01 -6.7119214661681D+00 +50 4.9000000000000D-01 -6.6848276079241D+00 +51 5.0000000000000D-01 -6.6572954135239D+00 +52 5.1000000000000D-01 -6.6293317777079D+00 +53 5.2000000000000D-01 -6.6009436970226D+00 +54 5.3000000000000D-01 -6.5721382687774D+00 +55 5.4000000000000D-01 -6.5429226902614D+00 +56 5.5000000000000D-01 -6.5133042582704D+00 +57 5.6000000000000D-01 -6.4832903689918D+00 +58 5.7000000000000D-01 -6.4528885183015D+00 +59 5.8000000000000D-01 -6.4221063025159D+00 +60 5.9000000000000D-01 -6.3909514196472D+00 +61 6.0000000000000D-01 -6.3594316712001D+00 +62 6.1000000000000D-01 -6.3275549645426D+00 +63 6.2000000000000D-01 -6.2953293158792D+00 +64 6.3000000000000D-01 -6.2627628538403D+00 +65 6.4000000000000D-01 -6.2298638236951D+00 +66 6.5000000000000D-01 -6.1966405921804D+00 +67 6.6000000000000D-01 -6.1631016529268D+00 +68 6.7000000000000D-01 -6.1292556324461D+00 +69 6.8000000000000D-01 -6.0951112966308D+00 +70 6.9000000000000D-01 -6.0606775577002D+00 +71 7.0000000000000D-01 -6.0259634815097D+00 +72 7.1000000000000D-01 -5.9909782951265D+00 +73 7.2000000000000D-01 -5.9557313945566D+00 +74 7.3000000000000D-01 -5.9202323524955D+00 +75 7.4000000000000D-01 -5.8844909259609D+00 +76 7.5000000000000D-01 -5.8485170636536D+00 +77 7.6000000000000D-01 -5.8123209128871D+00 +78 7.7000000000000D-01 -5.7759128259161D+00 +79 7.8000000000000D-01 -5.7393033654946D+00 +80 7.9000000000000D-01 -5.7025033094936D+00 +81 8.0000000000000D-01 -5.6655236544133D+00 +82 8.1000000000000D-01 -5.6283756176329D+00 +83 8.2000000000000D-01 -5.5910706382523D+00 +84 8.3000000000000D-01 -5.5536203763989D+00 +85 8.4000000000000D-01 -5.5160367108886D+00 +86 8.5000000000000D-01 -5.4783317351555D+00 +87 8.6000000000000D-01 -5.4405177513889D+00 +88 8.7000000000000D-01 -5.4026072628442D+00 +89 8.8000000000000D-01 -5.3646129643214D+00 +90 8.9000000000000D-01 -5.3265477308381D+00 +91 9.0000000000000D-01 -5.2884246045468D+00 +92 9.1000000000000D-01 -5.2502567799803D+00 +93 9.2000000000000D-01 -5.2120575877315D+00 +94 9.3000000000000D-01 -5.1738404766976D+00 +95 9.4000000000000D-01 -5.1356189950406D+00 +96 9.5000000000000D-01 -5.0974067700315D+00 +97 9.6000000000000D-01 -5.0592174869563D+00 +98 9.7000000000000D-01 -5.0210648672736D+00 +99 9.8000000000000D-01 -4.9829626462120D+00 +100 9.9000000000000D-01 -4.9449245499997D+00 +101 1.0000000000000D+00 -4.9069642729078D+00 +102 1.0100000000000D+00 -4.8690954542833D+00 +103 1.0200000000000D+00 -4.8313316557340D+00 +104 1.0300000000000D+00 -4.7936863386089D+00 +105 1.0400000000000D+00 -4.7561728419021D+00 +106 1.0500000000000D+00 -4.7188043606879D+00 +107 1.0600000000000D+00 -4.6815939251692D+00 +108 1.0700000000000D+00 -4.6445543804046D+00 +109 1.0800000000000D+00 -4.6076983667533D+00 +110 1.0900000000000D+00 -4.5710383010567D+00 +111 1.1000000000000D+00 -4.5345863585576D+00 +112 1.1100000000000D+00 -4.4983544555337D+00 +113 1.1200000000000D+00 -4.4623542326107D+00 +114 1.1300000000000D+00 -4.4265970387022D+00 +115 1.1400000000000D+00 -4.3910939155135D+00 +116 1.1500000000000D+00 -4.3558555825348D+00 +117 1.1600000000000D+00 -4.3208924224434D+00 +118 1.1700000000000D+00 -4.2862144668300D+00 +119 1.1800000000000D+00 -4.2518313821624D+00 +120 1.1900000000000D+00 -4.2177524558993D+00 +121 1.2000000000000D+00 -4.1839865826713D+00 +122 1.2100000000000D+00 -4.1505422504495D+00 +123 1.2200000000000D+00 -4.1174275266286D+00 +124 1.2300000000000D+00 -4.0846500439606D+00 +125 1.2400000000000D+00 -4.0522169862843D+00 +126 1.2500000000000D+00 -4.0201350740015D+00 +127 1.2600000000000D+00 -3.9884105492694D+00 +128 1.2700000000000D+00 -3.9570491608843D+00 +129 1.2800000000000D+00 -3.9260561488405D+00 +130 1.2900000000000D+00 -3.8954362285670D+00 +131 1.3000000000000D+00 -3.8651935748507D+00 +132 1.3100000000000D+00 -3.8353318054589D+00 +133 1.3200000000000D+00 -3.8058539644981D+00 +134 1.3300000000000D+00 -3.7767625055376D+00 +135 1.3400000000000D+00 -3.7480592745443D+00 +136 1.3500000000000D+00 -3.7197454926784D+00 +137 1.3600000000000D+00 -3.6918217390024D+00 +138 1.3700000000000D+00 -3.6642879331612D+00 +139 1.3800000000000D+00 -3.6371433180937D+00 +140 1.3900000000000D+00 -3.6103864428354D+00 +141 1.4000000000000D+00 -3.5840151454732D+00 +142 1.4100000000000D+00 -3.5580265362323D+00 +143 1.4200000000000D+00 -3.5324169803544D+00 +144 1.4300000000000D+00 -3.5071820825202D+00 +145 1.4400000000000D+00 -3.4823166751194D+00 +146 1.4500000000000D+00 -3.4578148197867D+00 +147 1.4600000000000D+00 -3.4336696743369D+00 +148 1.4700000000000D+00 -3.4098737163988D+00 +149 1.4800000000000D+00 -3.3864191218394D+00 +150 1.4900000000000D+00 -3.3632980949476D+00 +151 1.5000000000000D+00 -3.3405032001061D+00 +152 1.5100000000000D+00 -3.3180272391469D+00 +153 1.5200000000000D+00 -3.2958632155875D+00 +154 1.5300000000000D+00 -3.2740043404422D+00 +155 1.5400000000000D+00 -3.2524440093447D+00 +156 1.5500000000000D+00 -3.2311757984736D+00 +157 1.5600000000000D+00 -3.2101934602616D+00 +158 1.5700000000000D+00 -3.1894909195777D+00 +159 1.5800000000000D+00 -3.1690622810628D+00 +160 1.5900000000000D+00 -3.1489018381796D+00 +161 1.6000000000000D+00 -3.1290040615553D+00 +162 1.6100000000000D+00 -3.1093635915537D+00 +163 1.6200000000000D+00 -3.0899752266373D+00 +164 1.6300000000000D+00 -3.0708339122394D+00 +165 1.6400000000000D+00 -3.0519347391392D+00 +166 1.6500000000000D+00 -3.0332729384148D+00 +167 1.6600000000000D+00 -3.0148438737602D+00 +168 1.6700000000000D+00 -2.9966430359102D+00 +169 1.6800000000000D+00 -2.9786660379154D+00 +170 1.6900000000000D+00 -2.9609086102869D+00 +171 1.7000000000000D+00 -2.9433665964070D+00 +172 1.7100000000000D+00 -2.9260359482713D+00 +173 1.7200000000000D+00 -2.9089127224745D+00 +174 1.7300000000000D+00 -2.8919930764263D+00 +175 1.7400000000000D+00 -2.8752732647820D+00 +176 1.7500000000000D+00 -2.8587496360749D+00 +177 1.7600000000000D+00 -2.8424186295316D+00 +178 1.7700000000000D+00 -2.8262767720627D+00 +179 1.7800000000000D+00 -2.8103206754076D+00 +180 1.7900000000000D+00 -2.7945470334321D+00 +181 1.8000000000000D+00 -2.7789526195564D+00 +182 1.8100000000000D+00 -2.7635342843155D+00 +183 1.8200000000000D+00 -2.7482889530292D+00 +184 1.8300000000000D+00 -2.7332136235873D+00 +185 1.8400000000000D+00 -2.7183053643275D+00 +186 1.8500000000000D+00 -2.7035613120119D+00 +187 1.8600000000000D+00 -2.6889786698833D+00 +188 1.8700000000000D+00 -2.6745547058050D+00 +189 1.8800000000000D+00 -2.6602867504711D+00 +190 1.8900000000000D+00 -2.6461721956846D+00 +191 1.9000000000000D+00 -2.6322084927010D+00 +192 1.9100000000000D+00 -2.6183931506257D+00 +193 1.9200000000000D+00 -2.6047237348712D+00 +194 1.9300000000000D+00 -2.5911978656590D+00 +195 1.9400000000000D+00 -2.5778132165740D+00 +196 1.9500000000000D+00 -2.5645675131588D+00 +197 1.9600000000000D+00 -2.5514585315516D+00 +198 1.9700000000000D+00 -2.5384840971627D+00 +199 1.9800000000000D+00 -2.5256420833859D+00 +200 1.9900000000000D+00 -2.5129304103475D+00 +201 2.0000000000000D+00 -2.5003470436843D+00 +202 2.0100000000000D+00 -2.4878899933564D+00 +203 2.0200000000000D+00 -2.4755573124870D+00 +204 2.0300000000000D+00 -2.4633470962326D+00 +205 2.0400000000000D+00 -2.4512574806801D+00 +206 2.0500000000000D+00 -2.4392866417693D+00 +207 2.0600000000000D+00 -2.4274327942445D+00 +208 2.0700000000000D+00 -2.4156941906267D+00 +209 2.0800000000000D+00 -2.4040691202137D+00 +210 2.0900000000000D+00 -2.3925559081029D+00 +211 2.1000000000000D+00 -2.3811529142366D+00 +212 2.1100000000000D+00 -2.3698585324726D+00 +213 2.1200000000000D+00 -2.3586711896755D+00 +214 2.1300000000000D+00 -2.3475893448316D+00 +215 2.1400000000000D+00 -2.3366114881860D+00 +216 2.1500000000000D+00 -2.3257361404009D+00 +217 2.1600000000000D+00 -2.3149618517370D+00 +218 2.1700000000000D+00 -2.3042872012554D+00 +219 2.1800000000000D+00 -2.2937107960415D+00 +220 2.1900000000000D+00 -2.2832312704505D+00 +221 2.2000000000000D+00 -2.2728472853732D+00 +222 2.2100000000000D+00 -2.2625575275234D+00 +223 2.2200000000000D+00 -2.2523607087459D+00 +224 2.2300000000000D+00 -2.2422555653450D+00 +225 2.2400000000000D+00 -2.2322408574332D+00 +226 2.2500000000000D+00 -2.2223153683008D+00 +227 2.2600000000000D+00 -2.2124779038036D+00 +228 2.2700000000000D+00 -2.2027272917721D+00 +229 2.2800000000000D+00 -2.1930623814393D+00 +230 2.2900000000000D+00 -2.1834820428862D+00 +231 2.3000000000000D+00 -2.1739851665080D+00 +232 2.3100000000000D+00 -2.1645706624972D+00 +233 2.3200000000000D+00 -2.1552374603444D+00 +234 2.3300000000000D+00 -2.1459845083573D+00 +235 2.3400000000000D+00 -2.1368107731966D+00 +236 2.3500000000000D+00 -2.1277152394274D+00 +237 2.3600000000000D+00 -2.1186969090880D+00 +238 2.3700000000000D+00 -2.1097548012736D+00 +239 2.3800000000000D+00 -2.1008879517350D+00 +240 2.3900000000000D+00 -2.0920954124924D+00 +241 2.4000000000000D+00 -2.0833762514626D+00 +242 2.4100000000000D+00 -2.0747295521004D+00 +243 2.4200000000000D+00 -2.0661544130524D+00 +244 2.4300000000000D+00 -2.0576499478237D+00 +245 2.4400000000000D+00 -2.0492152844563D+00 +246 2.4500000000000D+00 -2.0408495652186D+00 +247 2.4600000000000D+00 -2.0325519463069D+00 +248 2.4700000000000D+00 -2.0243215975559D+00 +249 2.4800000000000D+00 -2.0161577021594D+00 +250 2.4900000000000D+00 -2.0080594564010D+00 +251 2.5000000000000D+00 -2.0000260693929D+00 +252 2.5100000000000D+00 -1.9920567628225D+00 +253 2.5200000000000D+00 -1.9841507707089D+00 +254 2.5300000000000D+00 -1.9763073391644D+00 +255 2.5400000000000D+00 -1.9685257261637D+00 +256 2.5500000000000D+00 -1.9608052013214D+00 +257 2.5600000000000D+00 -1.9531450456726D+00 +258 2.5700000000000D+00 -1.9455445514611D+00 +259 2.5800000000000D+00 -1.9380030219337D+00 +260 2.5900000000000D+00 -1.9305197711375D+00 +261 2.6000000000000D+00 -1.9230941237223D+00 +262 2.6100000000000D+00 -1.9157254147503D+00 +263 2.6200000000000D+00 -1.9084129895057D+00 +264 2.6300000000000D+00 -1.9011562033104D+00 +265 2.6400000000000D+00 -1.8939544213445D+00 +266 2.6500000000000D+00 -1.8868070184677D+00 +267 2.6600000000000D+00 -1.8797133790452D+00 +268 2.6700000000000D+00 -1.8726728967778D+00 +269 2.6800000000000D+00 -1.8656849745329D+00 +270 2.6900000000000D+00 -1.8587490241791D+00 +271 2.7000000000000D+00 -1.8518644664244D+00 +272 2.7100000000000D+00 -1.8450307306562D+00 +273 2.7200000000000D+00 -1.8382472547832D+00 +274 2.7300000000000D+00 -1.8315134850808D+00 +275 2.7400000000000D+00 -1.8248288760394D+00 +276 2.7500000000000D+00 -1.8181928902127D+00 +277 2.7600000000000D+00 -1.8116049980709D+00 +278 2.7700000000000D+00 -1.8050646778551D+00 +279 2.7800000000000D+00 -1.7985714154339D+00 +280 2.7900000000000D+00 -1.7921247041621D+00 +281 2.8000000000000D+00 -1.7857240447431D+00 +282 2.8100000000000D+00 -1.7793689450915D+00 +283 2.8200000000000D+00 -1.7730589202001D+00 +284 2.8300000000000D+00 -1.7667934920075D+00 +285 2.8400000000000D+00 -1.7605721892696D+00 +286 2.8500000000000D+00 -1.7543945474322D+00 +287 2.8600000000000D+00 -1.7482601085069D+00 +288 2.8700000000000D+00 -1.7421684209488D+00 +289 2.8800000000000D+00 -1.7361190395372D+00 +290 2.8900000000000D+00 -1.7301115252585D+00 +291 2.9000000000000D+00 -1.7241454451915D+00 +292 2.9100000000000D+00 -1.7182203723949D+00 +293 2.9200000000000D+00 -1.7123358857983D+00 +294 2.9300000000000D+00 -1.7064915700950D+00 +295 2.9400000000000D+00 -1.7006870156363D+00 +296 2.9500000000000D+00 -1.6949218183308D+00 +297 2.9600000000000D+00 -1.6891955795438D+00 +298 2.9700000000000D+00 -1.6835079059999D+00 +299 2.9800000000000D+00 -1.6778584096885D+00 +300 2.9900000000000D+00 -1.6722467077712D+00 +301 3.0000000000000D+00 -1.6666724224922D+00 +302 3.0100000000000D+00 -1.6611351810892D+00 +303 3.0200000000000D+00 -1.6556346157093D+00 +304 3.0300000000000D+00 -1.6501703633251D+00 +305 3.0400000000000D+00 -1.6447420656537D+00 +306 3.0500000000000D+00 -1.6393493690773D+00 +307 3.0600000000000D+00 -1.6339919245667D+00 +308 3.0700000000000D+00 -1.6286693876067D+00 +309 3.0800000000000D+00 -1.6233814181221D+00 +310 3.0900000000000D+00 -1.6181276804072D+00 +311 3.1000000000000D+00 -1.6129078430566D+00 +312 3.1100000000000D+00 -1.6077215788968D+00 +313 3.1200000000000D+00 -1.6025685649210D+00 +314 3.1300000000000D+00 -1.5974484822241D+00 +315 3.1400000000000D+00 -1.5923610159399D+00 +316 3.1500000000000D+00 -1.5873058551797D+00 +317 3.1600000000000D+00 -1.5822826929722D+00 +318 3.1700000000000D+00 -1.5772912262042D+00 +319 3.1800000000000D+00 -1.5723311555634D+00 +320 3.1900000000000D+00 -1.5674021854815D+00 +321 3.2000000000000D+00 -1.5625040240794D+00 +322 3.2100000000000D+00 -1.5576363831120D+00 +323 3.2200000000000D+00 -1.5527989779150D+00 +324 3.2300000000000D+00 -1.5479915273531D+00 +325 3.2400000000000D+00 -1.5432137537674D+00 +326 3.2500000000000D+00 -1.5384653829252D+00 +327 3.2600000000000D+00 -1.5337461439690D+00 +328 3.2700000000000D+00 -1.5290557693688D+00 +329 3.2800000000000D+00 -1.5243939948722D+00 +330 3.2900000000000D+00 -1.5197605594530D+00 +331 3.3000000000000D+00 -1.5151552052652D+00 +332 3.3100000000000D+00 -1.5105776776231D+00 +333 3.3200000000000D+00 -1.5060277249164D+00 +334 3.3300000000000D+00 -1.5015050985924D+00 +335 3.3400000000000D+00 -1.4970095530905D+00 +336 3.3500000000000D+00 -1.4925408457070D+00 +337 3.3600000000000D+00 -1.4880987367067D+00 +338 3.3700000000000D+00 -1.4836829892249D+00 +339 3.3800000000000D+00 -1.4792933692653D+00 +340 3.3900000000000D+00 -1.4749296457778D+00 +341 3.4000000000000D+00 -1.4705915904362D+00 +342 3.4100000000000D+00 -1.4662789776314D+00 +343 3.4200000000000D+00 -1.4619915844203D+00 +344 3.4300000000000D+00 -1.4577291905256D+00 +345 3.4400000000000D+00 -1.4534915781935D+00 +346 3.4500000000000D+00 -1.4492785321836D+00 +347 3.4600000000000D+00 -1.4450898397499D+00 +348 3.4700000000000D+00 -1.4409252902419D+00 +349 3.4800000000000D+00 -1.4367846754968D+00 +350 3.4900000000000D+00 -1.4326677896971D+00 +351 3.5000000000000D+00 -1.4285744292582D+00 +352 3.5100000000000D+00 -1.4245043931934D+00 +353 3.5200000000000D+00 -1.4204574827011D+00 +354 3.5300000000000D+00 -1.4164335012413D+00 +355 3.5400000000000D+00 -1.4124322545250D+00 +356 3.5500000000000D+00 -1.4084535504000D+00 +357 3.5600000000000D+00 -1.4044971988848D+00 +358 3.5700000000000D+00 -1.4005630121325D+00 +359 3.5800000000000D+00 -1.3966508043951D+00 +360 3.5900000000000D+00 -1.3927603919949D+00 +361 3.6000000000000D+00 -1.3888915932950D+00 +362 3.6100000000000D+00 -1.3850442286717D+00 +363 3.6200000000000D+00 -1.3812181204865D+00 +364 3.6300000000000D+00 -1.3774130930585D+00 +365 3.6400000000000D+00 -1.3736289726378D+00 +366 3.6500000000000D+00 -1.3698655873789D+00 +367 3.6600000000000D+00 -1.3661227673147D+00 +368 3.6700000000000D+00 -1.3624003443307D+00 +369 3.6800000000000D+00 -1.3586981521401D+00 +370 3.6900000000000D+00 -1.3550160262590D+00 +371 3.7000000000000D+00 -1.3513538039818D+00 +372 3.7100000000000D+00 -1.3477113243574D+00 +373 3.7200000000000D+00 -1.3440884281656D+00 +374 3.7300000000000D+00 -1.3404849578938D+00 +375 3.7400000000000D+00 -1.3369007577142D+00 +376 3.7500000000000D+00 -1.3333356734615D+00 +377 3.7600000000000D+00 -1.3297895526103D+00 +378 3.7700000000000D+00 -1.3262622442541D+00 +379 3.7800000000000D+00 -1.3227535990832D+00 +380 3.7900000000000D+00 -1.3192634693638D+00 +381 3.8000000000000D+00 -1.3157917089174D+00 +382 3.8100000000000D+00 -1.3123381731006D+00 +383 3.8200000000000D+00 -1.3089027187842D+00 +384 3.8300000000000D+00 -1.3054852043344D+00 +385 3.8400000000000D+00 -1.3020854895926D+00 +386 3.8500000000000D+00 -1.2987034358567D+00 +387 3.8600000000000D+00 -1.2953389058618D+00 +388 3.8700000000000D+00 -1.2919917637620D+00 +389 3.8800000000000D+00 -1.2886618751121D+00 +390 3.8900000000000D+00 -1.2853491068492D+00 +391 3.9000000000000D+00 -1.2820533272753D+00 +392 3.9100000000000D+00 -1.2787744060400D+00 +393 3.9200000000000D+00 -1.2755122141229D+00 +394 3.9300000000000D+00 -1.2722666238167D+00 +395 3.9400000000000D+00 -1.2690375087111D+00 +396 3.9500000000000D+00 -1.2658247436756D+00 +397 3.9600000000000D+00 -1.2626282048440D+00 +398 3.9700000000000D+00 -1.2594477695979D+00 +399 3.9800000000000D+00 -1.2562833165516D+00 +400 3.9900000000000D+00 -1.2531347255362D+00 +401 4.0000000000000D+00 -1.2500018775844D+00 +402 4.0100000000000D+00 -1.2468846549161D+00 +403 4.0200000000000D+00 -1.2437829409227D+00 +404 4.0300000000000D+00 -1.2406966201534D+00 +405 4.0400000000000D+00 -1.2376255783003D+00 +406 4.0500000000000D+00 -1.2345697021846D+00 +407 4.0600000000000D+00 -1.2315288797428D+00 +408 4.0700000000000D+00 -1.2285030000125D+00 +409 4.0800000000000D+00 -1.2254919531193D+00 +410 4.0900000000000D+00 -1.2224956302634D+00 +411 4.1000000000000D+00 -1.2195139237067D+00 +412 4.1100000000000D+00 -1.2165467267594D+00 +413 4.1200000000000D+00 -1.2135939337677D+00 +414 4.1300000000000D+00 -1.2106554401010D+00 +415 4.1400000000000D+00 -1.2077311421399D+00 +416 4.1500000000000D+00 -1.2048209372635D+00 +417 4.1600000000000D+00 -1.2019247238379D+00 +418 4.1700000000000D+00 -1.1990424012039D+00 +419 4.1800000000000D+00 -1.1961738696657D+00 +420 4.1900000000000D+00 -1.1933190304793D+00 +421 4.2000000000000D+00 -1.1904777858411D+00 +422 4.2100000000000D+00 -1.1876500388768D+00 +423 4.2200000000000D+00 -1.1848356936304D+00 +424 4.2300000000000D+00 -1.1820346550532D+00 +425 4.2400000000000D+00 -1.1792468289932D+00 +426 4.2500000000000D+00 -1.1764721221848D+00 +427 4.2600000000000D+00 -1.1737104422378D+00 +428 4.2700000000000D+00 -1.1709616976278D+00 +429 4.2800000000000D+00 -1.1682257976856D+00 +430 4.2900000000000D+00 -1.1655026525875D+00 +431 4.3000000000000D+00 -1.1627921733454D+00 +432 4.3100000000000D+00 -1.1600942717971D+00 +433 4.3200000000000D+00 -1.1574088605966D+00 +434 4.3300000000000D+00 -1.1547358532050D+00 +435 4.3400000000000D+00 -1.1520751638808D+00 +436 4.3500000000000D+00 -1.1494267076711D+00 +437 4.3600000000000D+00 -1.1467904004025D+00 +438 4.3700000000000D+00 -1.1441661586718D+00 +439 4.3800000000000D+00 -1.1415538998376D+00 +440 4.3900000000000D+00 -1.1389535420116D+00 +441 4.4000000000000D+00 -1.1363650040498D+00 +442 4.4100000000000D+00 -1.1337882055445D+00 +443 4.4200000000000D+00 -1.1312230668152D+00 +444 4.4300000000000D+00 -1.1286695089015D+00 +445 4.4400000000000D+00 -1.1261274535537D+00 +446 4.4500000000000D+00 -1.1235968232259D+00 +447 4.4600000000000D+00 -1.1210775410677D+00 +448 4.4700000000000D+00 -1.1185695309162D+00 +449 4.4800000000000D+00 -1.1160727172887D+00 +450 4.4900000000000D+00 -1.1135870253748D+00 +451 4.5000000000000D+00 -1.1111123810293D+00 +452 4.5100000000000D+00 -1.1086487107645D+00 +453 4.5200000000000D+00 -1.1061959417430D+00 +454 4.5300000000000D+00 -1.1037540017706D+00 +455 4.5400000000000D+00 -1.1013228192892D+00 +456 4.5500000000000D+00 -1.0989023233699D+00 +457 4.5600000000000D+00 -1.0964924437057D+00 +458 4.5700000000000D+00 -1.0940931106053D+00 +459 4.5800000000000D+00 -1.0917042549858D+00 +460 4.5900000000000D+00 -1.0893258083667D+00 +461 4.6000000000000D+00 -1.0869577028625D+00 +462 4.6100000000000D+00 -1.0845998711771D+00 +463 4.6200000000000D+00 -1.0822522465969D+00 +464 4.6300000000000D+00 -1.0799147629848D+00 +465 4.6400000000000D+00 -1.0775873547738D+00 +466 4.6500000000000D+00 -1.0752699569607D+00 +467 4.6600000000000D+00 -1.0729625051006D+00 +468 4.6700000000000D+00 -1.0706649353005D+00 +469 4.6800000000000D+00 -1.0683771842134D+00 +470 4.6900000000000D+00 -1.0660991890327D+00 +471 4.7000000000000D+00 -1.0638308874862D+00 +472 4.7100000000000D+00 -1.0615722178307D+00 +473 4.7200000000000D+00 -1.0593231188460D+00 +474 4.7300000000000D+00 -1.0570835298301D+00 +475 4.7400000000000D+00 -1.0548533905927D+00 +476 4.7500000000000D+00 -1.0526326414508D+00 +477 4.7600000000000D+00 -1.0504212232227D+00 +478 4.7700000000000D+00 -1.0482190772231D+00 +479 4.7800000000000D+00 -1.0460261452577D+00 +480 4.7900000000000D+00 -1.0438423696183D+00 +481 4.8000000000000D+00 -1.0416676930776D+00 +482 4.8100000000000D+00 -1.0395020588840D+00 +483 4.8200000000000D+00 -1.0373454107570D+00 +484 4.8300000000000D+00 -1.0351976928823D+00 +485 4.8400000000000D+00 -1.0330588499068D+00 +486 4.8500000000000D+00 -1.0309288269339D+00 +487 4.8600000000000D+00 -1.0288075695188D+00 +488 4.8700000000000D+00 -1.0266950236640D+00 +489 4.8800000000000D+00 -1.0245911358144D+00 +490 4.8900000000000D+00 -1.0224958528533D+00 +491 4.9000000000000D+00 -1.0204091220973D+00 +492 4.9100000000000D+00 -1.0183308912924D+00 +493 4.9200000000000D+00 -1.0162611086094D+00 +494 4.9300000000000D+00 -1.0141997226394D+00 +495 4.9400000000000D+00 -1.0121466823901D+00 +496 4.9500000000000D+00 -1.0101019372811D+00 +497 4.9600000000000D+00 -1.0080654371399D+00 +498 4.9700000000000D+00 -1.0060371321979D+00 +499 4.9800000000000D+00 -1.0040169730861D+00 +500 4.9900000000000D+00 -1.0020049108313D+00 +501 5.0000000000000D+00 -1.0000008968522D+00 +502 5.0100000000000D+00 -9.9800488295520D-01 +503 5.0200000000000D+00 -9.9601682133092D-01 +504 5.0300000000000D+00 -9.9403666455002D-01 +505 5.0400000000000D+00 -9.9206436555965D-01 +506 5.0500000000000D+00 -9.9009987767962D-01 +507 5.0600000000000D+00 -9.8814315459877D-01 +508 5.0700000000000D+00 -9.8619415037134D-01 +509 5.0800000000000D+00 -9.8425281941334D-01 +510 5.0900000000000D+00 -9.8231911649900D-01 +511 5.1000000000000D+00 -9.8039299675726D-01 +512 5.1100000000000D+00 -9.7847441566833D-01 +513 5.1200000000000D+00 -9.7656332906017D-01 +514 5.1300000000000D+00 -9.7465969310524D-01 +515 5.1400000000000D+00 -9.7276346431703D-01 +516 5.1500000000000D+00 -9.7087459954681D-01 +517 5.1600000000000D+00 -9.6899305598032D-01 +518 5.1700000000000D+00 -9.6711879113458D-01 +519 5.1800000000000D+00 -9.6525176285462D-01 +520 5.1900000000000D+00 -9.6339192931040D-01 +521 5.2000000000000D+00 -9.6153924899367D-01 +522 5.2100000000000D+00 -9.5969368071484D-01 +523 5.2200000000000D+00 -9.5785518359993D-01 +524 5.2300000000000D+00 -9.5602371708762D-01 +525 5.2400000000000D+00 -9.5419924092617D-01 +526 5.2500000000000D+00 -9.5238171517056D-01 +527 5.2600000000000D+00 -9.5057110017952D-01 +528 5.2700000000000D+00 -9.4876735661267D-01 +529 5.2800000000000D+00 -9.4697044542768D-01 +530 5.2900000000000D+00 -9.4518032787740D-01 +531 5.3000000000000D+00 -9.4339696550715D-01 +532 5.3100000000000D+00 -9.4162032015188D-01 +533 5.3200000000000D+00 -9.3985035393356D-01 +534 5.3300000000000D+00 -9.3808702925840D-01 +535 5.3400000000000D+00 -9.3633030881420D-01 +536 5.3500000000000D+00 -9.3458015556774D-01 +537 5.3600000000000D+00 -9.3283653276216D-01 +538 5.3700000000000D+00 -9.3109940391441D-01 +539 5.3800000000000D+00 -9.2936873281268D-01 +540 5.3900000000000D+00 -9.2764448351391D-01 +541 5.4000000000000D+00 -9.2592662034127D-01 +542 5.4100000000000D+00 -9.2421510788173D-01 +543 5.4200000000000D+00 -9.2250991098360D-01 +544 5.4300000000000D+00 -9.2081099475413D-01 +545 5.4400000000000D+00 -9.1911832455715D-01 +546 5.4500000000000D+00 -9.1743186601071D-01 +547 5.4600000000000D+00 -9.1575158498472D-01 +548 5.4700000000000D+00 -9.1407744759869D-01 +549 5.4800000000000D+00 -9.1240942021943D-01 +550 5.4900000000000D+00 -9.1074746945880D-01 +551 5.5000000000000D+00 -9.0909156217145D-01 +552 5.5100000000000D+00 -9.0744166545272D-01 +553 5.5200000000000D+00 -9.0579774663635D-01 +554 5.5300000000000D+00 -9.0415977329236D-01 +555 5.5400000000000D+00 -9.0252771322495D-01 +556 5.5500000000000D+00 -9.0090153447033D-01 +557 5.5600000000000D+00 -8.9928120529469D-01 +558 5.5700000000000D+00 -8.9766669419209D-01 +559 5.5800000000000D+00 -8.9605796988246D-01 +560 5.5900000000000D+00 -8.9445500130957D-01 +561 5.6000000000000D+00 -8.9285775763899D-01 +562 5.6100000000000D+00 -8.9126620825618D-01 +563 5.6200000000000D+00 -8.8968032276446D-01 +564 5.6300000000000D+00 -8.8810007098313D-01 +565 5.6400000000000D+00 -8.8652542294553D-01 +566 5.6500000000000D+00 -8.8495634889719D-01 +567 5.6600000000000D+00 -8.8339281929389D-01 +568 5.6700000000000D+00 -8.8183480479984D-01 +569 5.6800000000000D+00 -8.8028227628584D-01 +570 5.6900000000000D+00 -8.7873520482746D-01 +571 5.7000000000000D+00 -8.7719356170325D-01 +572 5.7100000000000D+00 -8.7565731839297D-01 +573 5.7200000000000D+00 -8.7412644657584D-01 +574 5.7300000000000D+00 -8.7260091812876D-01 +575 5.7400000000000D+00 -8.7108070512461D-01 +576 5.7500000000000D+00 -8.6956577983055D-01 +577 5.7600000000000D+00 -8.6805611470633D-01 +578 5.7700000000000D+00 -8.6655168240261D-01 +579 5.7800000000000D+00 -8.6505245575935D-01 +580 5.7900000000000D+00 -8.6355840780413D-01 +581 5.8000000000000D+00 -8.6206951175054D-01 +582 5.8100000000000D+00 -8.6058574099660D-01 +583 5.8200000000000D+00 -8.5910706912314D-01 +584 5.8300000000000D+00 -8.5763346989227D-01 +585 5.8400000000000D+00 -8.5616491724580D-01 +586 5.8500000000000D+00 -8.5470138530374D-01 +587 5.8600000000000D+00 -8.5324284836275D-01 +588 5.8700000000000D+00 -8.5178928089462D-01 +589 5.8800000000000D+00 -8.5034065754484D-01 +590 5.8900000000000D+00 -8.4889695313104D-01 +591 5.9000000000000D+00 -8.4745814264160D-01 +592 5.9100000000000D+00 -8.4602420123420D-01 +593 5.9200000000000D+00 -8.4459510423435D-01 +594 5.9300000000000D+00 -8.4317082713402D-01 +595 5.9400000000000D+00 -8.4175134559020D-01 +596 5.9500000000000D+00 -8.4033663542355D-01 +597 5.9600000000000D+00 -8.3892667261699D-01 +598 5.9700000000000D+00 -8.3752143331437D-01 +599 5.9800000000000D+00 -8.3612089381909D-01 +600 5.9900000000000D+00 -8.3472503059282D-01 +1 0.0000000000000D+00 6.4704082305733D+00 3.3555824785481D-11 -3.1624576592997D+01 1.3569107174760D-05 4.3418319538653D+02 +2 1.0000000000000D-02 6.4688271826876D+00 -3.1617340117751D-01 -3.1602868722097D+01 4.3407977925895D+00 4.3376210318705D+02 +3 2.0000000000000D-02 6.4640862093522D+00 -6.3191280037434D-01 -3.1537791735831D+01 8.6722705662524D+00 4.3237171056127D+02 +4 3.0000000000000D-02 6.4561918171266D+00 -9.4678512768830D-01 -3.1429485379745D+01 1.2985124967338D+01 4.3004601907535D+02 +5 4.0000000000000D-02 6.4451548347090D+00 -1.2603591747375D+00 -3.1278182124213D+01 1.7270115667888D+01 4.2679952959820D+02 +6 5.0000000000000D-02 6.4309903897199D+00 -1.5722065188344D+00 -3.1084206506542D+01 2.1518077786519D+01 4.2264177463598D+02 +7 6.0000000000000D-02 6.4137178762566D+00 -1.8819024392829D+00 -3.0847974213418D+01 2.5719950757749D+01 4.1758395448616D+02 +8 7.0000000000000D-02 6.3933609133340D+00 -2.1890268232163D+00 -3.0569990906987D+01 2.9866804226769D+01 4.1164045247285D+02 +9 8.0000000000000D-02 6.3699472943302D+00 -2.4931650584246D+00 -3.0250850797929D+01 3.3949862977556D+01 4.0482800452546D+02 +10 9.0000000000000D-02 6.3435089275798D+00 -2.7939089106721D+00 -2.9891234970899D+01 3.7960531471649D+01 3.9716578957447D+02 +11 1.0000000000000D-01 6.3140817682807D+00 -3.0908573830522D+00 -2.9491909467812D+01 4.1890417726834D+01 3.8867533774986D+02 +12 1.1000000000000D-01 6.2817057419086D+00 -3.3836175549924D+00 -2.9053723135629D+01 4.5731356513218D+01 3.7938045110744D+02 +13 1.2000000000000D-01 6.2464246593517D+00 -3.6718053985900D+00 -2.8577605245984D+01 4.9475431796492D+01 3.6930714988635D+02 +14 1.3000000000000D-01 6.2082861240053D+00 -3.9550465700359D+00 -2.8064562894699D+01 5.3114998297306D+01 3.5848355386849D+02 +15 1.4000000000000D-01 6.1673414310857D+00 -4.2329771739704D+00 -2.7515678190082D+01 5.6642702158684D+01 3.4693980796020D+02 +16 1.5000000000000D-01 6.1236454594445D+00 -4.5052444987049D+00 -2.6932105239531D+01 6.0051500612985D+01 3.3470796967853D+02 +17 1.6000000000000D-01 6.0772565561845D+00 -4.7715077203433D+00 -2.6315066944627D+01 6.3334680603094D+01 3.2182190379778D+02 +18 1.7000000000000D-01 6.0282364143978D+00 -5.0314385739422D+00 -2.5665851615563D+01 6.6485876286729D+01 3.0831716945238D+02 +19 1.8000000000000D-01 5.9766499443643D+00 -5.2847219899584D+00 -2.4985809416278D+01 6.9499085379974D+01 2.9423089915592D+02 +20 1.9000000000000D-01 5.9225651385665D+00 -5.5310566943519D+00 -2.4276348652245D+01 7.2368684276097D+01 2.7960167462769D+02 +21 2.0000000000000D-01 5.8660529308909D+00 -5.7701557708304D+00 -2.3538931913337D+01 7.5089441904031D+01 2.6446939917670D+02 +22 2.1000000000000D-01 5.8071870504023D+00 -6.0017471838526D+00 -2.2775072084605D+01 7.7656532279510D+01 2.4887516464608D+02 +23 2.2000000000000D-01 5.7460438700896D+00 -6.2255742611322D+00 -2.1986328238247D+01 8.0065545712356D+01 2.3286111522416D+02 +24 2.3000000000000D-01 5.6827022509935D+00 -6.4413961345258D+00 -2.1174301420330D+01 8.2312498642073D+01 2.1647030907399D+02 +25 2.4000000000000D-01 5.6172433821380D+00 -6.6489881383185D+00 -2.0340630346151D+01 8.4393842071145D+01 1.9974657712749D+02 +26 2.5000000000000D-01 5.5497506166954D+00 -6.8481421640647D+00 -1.9486987018337D+01 8.6306468580082D+01 1.8273438006333D+02 +27 2.6000000000000D-01 5.4803093048228D+00 -7.0386669712842D+00 -1.8615072281984D+01 8.8047717905010D+01 1.6547866423475D+02 +28 2.7000000000000D-01 5.4090066236155D+00 -7.2203884534537D+00 -1.7726611331223D+01 8.9615381070455D+01 1.4802471673226D+02 +29 2.8000000000000D-01 5.3359314046246D+00 -7.3931498588822D+00 -1.6823349181718D+01 9.1007703071063D+01 1.3041802042903D+02 +30 2.9000000000000D-01 5.2611739593944D+00 -7.5568119662014D+00 -1.5907046123591D+01 9.2223384105826D+01 1.1270410916581D+02 +31 3.0000000000000D-01 5.1848259034701D+00 -7.7112532143470D+00 -1.4979473169233D+01 9.3261579367833D+01 9.4928424110492D+01 +32 3.1000000000000D-01 5.1069799793355D+00 -7.8563697870538D+00 -1.4042407510373D+01 9.4121897403764D+01 7.7136171278778D+01 +33 3.2000000000000D-01 5.0277298787308D+00 -7.9920756520258D+00 -1.3097627998650D+01 9.4804397059493D+01 5.9372181197266D+01 +34 3.3000000000000D-01 4.9471700648050D+00 -8.1183025550894D+00 -1.2146910663708D+01 9.5309583032655D+01 4.1680770994203D+01 +35 3.4000000000000D-01 4.8653955945501D+00 -8.2349999697714D+00 -1.1192024282604D+01 9.5638400061388D+01 2.4105609373483D+01 +36 3.5000000000000D-01 4.7825019419593D+00 -8.3421350028852D+00 -1.0234726014042D+01 9.5792225778666D+01 6.6895850532360D+00 +37 3.6000000000000D-01 4.6985848223474D+00 -8.4396922568376D+00 -9.2767571105623D+00 9.5772862271392D+01 -1.0525320935713D+01 +38 3.7000000000000D-01 4.6137400182600D+00 -8.5276736495011D+00 -8.3198387214615D+00 9.5582526382714D+01 -2.7498158425732D+01 +39 3.8000000000000D-01 4.5280632073932D+00 -8.6060981926206D+00 -7.3656677987735D+00 9.5223838805743D+01 -4.4189127061384D+01 +40 3.9000000000000D-01 4.4416497929312D+00 -8.6750017298442D+00 -6.4159131181680D+00 9.4699812015739D+01 -6.0559689183105D+01 +41 4.0000000000000D-01 4.3545947367009D+00 -8.7344366355860D+00 -5.4722114260949D+00 9.4013837095628D+01 -7.6572678338776D+01 +42 4.1000000000000D-01 4.2669923955283D+00 -8.7844714760362D+00 -4.5361637239837D+00 9.3169669511733D+01 -9.2192400904651D+01 +43 4.2000000000000D-01 4.1789363611682D+00 -8.8251906337411D+00 -3.6093316996791D+00 9.2171413899966D+01 -1.0738473207792D+02 +44 4.3000000000000D-01 4.0905193041636D+00 -8.8566938972744D+00 -2.6932343157094D+00 9.1023507923625D+01 -1.2211720528461D+02 +45 4.4000000000000D-01 4.0018328219768D+00 -8.8790960176122D+00 -1.7893445633161D+00 8.9730705275057D+01 -1.3635909473500D+02 +46 4.5000000000000D-01 3.9129672917154D+00 -8.8925262329123D+00 -8.9908639050282D-01 8.8298057882495D+01 -1.5008149101401D+02 +47 4.6000000000000D-01 3.8240117277623D+00 -8.8971277634754D+00 -2.3831811666699D-02 8.6730897397227D+01 -1.6325736954675D+02 +48 4.7000000000000D-01 3.7350536445961D+00 -8.8930572787402D+00 8.3510179434961D-01 8.5034816035059D+01 -1.7586165172109D+02 +49 4.8000000000000D-01 3.6461789250745D+00 -8.8804843382257D+00 1.6764541916751D+00 8.3215646842118D+01 -1.8787125834972D+02 +50 4.9000000000000D-01 3.5574716944298D+00 -8.8595908083956D+00 2.4990245949459D+00 8.1279443464462D+01 -1.9926515557710D+02 +51 5.0000000000000D-01 3.4690142002079D+00 -8.8305702574656D+00 3.3016737723698D+00 7.9232459497592D+01 -2.1002439325405D+02 +52 5.1000000000000D-01 3.3808866983610D+00 -8.7936273302188D+00 4.0833259404908D+00 7.7081127490044D+01 -2.2013213526191D+02 +53 5.2000000000000D-01 3.2931673456833D+00 -8.7489771049287D+00 4.8429704476071D+00 7.4832037680518D+01 -2.2957368305827D+02 +54 5.3000000000000D-01 3.2059320987577D+00 -8.6968444345133D+00 5.5796632435590D+00 7.2491916555147D+01 -2.3833648580974D+02 +55 5.4000000000000D-01 3.1192546195619D+00 -8.6374632740654D+00 6.2925281344840D+00 7.0067605217295D+01 -2.4641008781969D+02 +56 5.5000000000000D-01 3.0332061878572D+00 -8.5710759969195D+00 6.9807578217771D+00 6.7566038003047D+01 -2.5378666600146D+02 +57 5.6000000000000D-01 2.9478556204653D+00 -8.4979327014018D+00 7.6436147184470D+00 6.4994223897773D+01 -2.6045874635470D+02 +58 5.7000000000000D-01 2.8632691975163D+00 -8.4182905104331D+00 8.2804316322549D+00 6.2359208466154D+01 -2.6642598662775D+02 +59 5.8000000000000D-01 2.7795105957246D+00 -8.3324128661180D+00 8.8906118713202D+00 5.9668086327223D+01 -2.7168047706753D+02 +60 5.9000000000000D-01 2.6966408287396D+00 -8.2405688214451D+00 9.4736299640863D+00 5.6927950220729D+01 -2.7622865744043D+02 +61 6.0000000000000D-01 2.6147181945802D+00 -8.1430323312043D+00 1.0029031096431D+01 5.4145875250994D+01 -2.8006903036607D+02 +62 6.1000000000000D-01 2.5337982301591D+00 -8.0400815441759D+00 1.0556431172301D+01 5.1328909634701D+01 -2.8320742066932D+02 +63 6.2000000000000D-01 2.4539336728684D+00 -7.9319980986257D+00 1.1055516308522D+01 4.8484047473584D+01 -2.8564962863893D+02 +64 6.3000000000000D-01 2.3751744291863D+00 -7.8190664230812D+00 1.1526042215423D+01 4.5618210379458D+01 -2.8740391273502D+02 +65 6.4000000000000D-01 2.2975675502413D+00 -7.7015730443207D+00 1.1967833381251D+01 4.2738229193948D+01 -2.8848026365598D+02 +66 6.5000000000000D-01 2.2211572142527D+00 -7.5798059044395D+00 1.2380782072776D+01 3.9850825832813D+01 -2.8889045372570D+02 +67 6.6000000000000D-01 2.1459847157474D+00 -7.4540536888033D+00 1.2764847158683D+01 3.6962595927141D+01 -2.8864795595209D+02 +68 6.7000000000000D-01 2.0720884614358D+00 -7.3246051666231D+00 1.3120052762899D+01 3.4079992184688D+01 -2.8776786868836D+02 +69 6.8000000000000D-01 1.9995039726112D+00 -7.1917485458176D+00 1.3446486755424D+01 3.1209308538492D+01 -2.8626683487757D+02 +70 6.9000000000000D-01 1.9282638939232D+00 -7.0557708437442D+00 1.3744299088741D+01 2.8356665117991D+01 -2.8416295771645D+02 +71 7.0000000000000D-01 1.8583980083578D+00 -6.9169572753046D+00 1.4013699988224D+01 2.5527994085478D+01 -2.8147571456630D+02 +72 7.1000000000000D-01 1.7899332582437D+00 -6.7755906598393D+00 1.4254958005348D+01 2.2729026353293D+01 -2.7822584747349D+02 +73 7.2000000000000D-01 1.7228937720904D+00 -6.6319508481379D+00 1.4468397942788D+01 1.9965279352422D+01 -2.7443536452367D+02 +74 7.3000000000000D-01 1.6573008970495D+00 -6.4863141707980D+00 1.4654398661095D+01 1.7242044993836D+01 -2.7012712003993D+02 +75 7.4000000000000D-01 1.5931732367825D+00 -6.3389529090847D+00 1.4813390774936D+01 1.4564382149619D+01 -2.6532536178135D+02 +76 7.5000000000000D-01 1.5305266945015D+00 -6.1901347891615D+00 1.4945854265644D+01 1.1937099406054D+01 -2.6005511091314D+02 +77 7.6000000000000D-01 1.4693745209457D+00 -6.0401225014578D+00 1.5052315930229D+01 9.3647578761079D+00 -2.5434151749166D+02 +78 7.7000000000000D-01 1.4097273670428D+00 -5.8891732441348D+00 1.5133346921402D+01 6.8516569991617D+00 -2.4821154794739D+02 +79 7.8000000000000D-01 1.3515933409993D+00 -5.7375382937691D+00 1.5189559999134D+01 4.4018254869835D+00 -2.4169203650579D+02 +80 7.9000000000000D-01 1.2949780695552D+00 -5.5854626021524D+00 1.5221606893718D+01 2.0190235147593D+00 -2.3481035131297D+02 +81 8.0000000000000D-01 1.2398847631339D+00 -5.4331844204738D+00 1.5230175537508D+01 -2.9326750650941D-01 -2.2759447478684D+02 +82 8.1000000000000D-01 1.1863142846122D+00 -5.2809349511511D+00 1.5215987284855D+01 -2.5318456587779D+00 -2.2007250350770D+02 +83 8.2000000000000D-01 1.1342652214324D+00 -5.1289380276717D+00 1.5179794096385D+01 -4.6937917686939D+00 -2.1227279409821D+02 +84 8.3000000000000D-01 1.0837339607748D+00 -4.9774098226850D+00 1.5122375706168D+01 -6.7764704606966D+00 -2.0422375968217D+02 +85 8.4000000000000D-01 1.0347147675069D+00 -4.8265585844679D+00 1.5044536780822D+01 -8.7775306284627D+00 -1.9595382148227D+02 +86 8.5000000000000D-01 9.8719986462720D-01 -4.6765844018095D+00 1.4947104078126D+01 -1.0694904964205D+01 -1.8749129889144D+02 +87 8.6000000000000D-01 9.4117951591675D-01 -4.5276789972691D+00 1.4830923615948D+01 -1.2526808426216D+01 -1.7886431246210D+02 +88 8.7000000000000D-01 8.9664211051776D-01 -4.3800255486509D+00 1.4696857860859D+01 -1.4271735852330D+01 -1.7010070486575D+02 +89 8.8000000000000D-01 8.5357424915701D-01 -4.2337985384622D+00 1.4545782944574D+01 -1.5928458780546D+01 -1.6122795902433D+02 +90 8.9000000000000D-01 8.1196083173614D-01 -4.0891636310324D+00 1.4378585916384D+01 -1.7496021410922D+01 -1.5227310875568D+02 +91 9.0000000000000D-01 7.7178514601404D-01 -3.9462775768930D+00 1.4196162040351D+01 -1.8973735696201D+01 -1.4326265976843D+02 +92 9.1000000000000D-01 7.3302895711115D-01 -3.8052881439263D+00 1.3999412145435D+01 -2.0361175724081D+01 -1.3422252300407D+02 +93 9.2000000000000D-01 6.9567259757080D-01 -3.6663340747205D+00 1.3789240034943D+01 -2.1658171428806D+01 -1.2517794294371D+02 +94 9.3000000000000D-01 6.5969505771850D-01 -3.5295450695055D+00 1.3566549962591D+01 -2.2864801552444D+01 -1.1615342634446D+02 +95 9.4000000000000D-01 6.2507407606684D-01 -3.3950417939629D+00 1.3332244182442D+01 -2.3981385967957D+01 -1.0717268395740D+02 +96 9.5000000000000D-01 5.9178622952119D-01 -3.2629359111445D+00 1.3087220578189D+01 -2.5008477450460D+01 -9.8258576034801D+01 +97 9.6000000000000D-01 5.5980702314905D-01 -3.1333301366769D+00 1.2832370377663D+01 -2.5946852899059D+01 -8.9433058605724D+01 +98 9.7000000000000D-01 5.2911097928444D-01 -3.0063183163733D+00 1.2568575957566D+01 -2.6797504043242D+01 -8.0717133244471D+01 +99 9.8000000000000D-01 4.9967172574818D-01 -2.8819855253262D+00 1.2296708743678D+01 -2.7561627675845D+01 -7.2130805696157D+01 +100 9.9000000000000D-01 4.7146208297369D-01 -2.7604081875011D+00 1.2017627210640D+01 -2.8240615518928D+01 -6.3693050008320D+01 +101 1.0000000000000D+00 4.4445414983874D-01 -2.6416542148219D+00 1.1732174984781D+01 -2.8836043733593D+01 -5.5421774112676D+01 +102 1.0100000000000D+00 4.1861938801308D-01 -2.5257831646965D+00 1.1441179053568D+01 -2.9349662100755D+01 -4.7333789732191D+01 +103 1.0200000000000D+00 3.9392870464317D-01 -2.4128464149030D+00 1.1145448084666D+01 -2.9783382940307D+01 -3.9444789815283D+01 +104 1.0300000000000D+00 3.7035253320599D-01 -2.3028873547269D+00 1.0845770856732D+01 -3.0139269833835D+01 -3.1769331362385D+01 +105 1.0400000000000D+00 3.4786091237467D-01 -2.1959415912248D+00 1.0542914803912D+01 -3.0419526192862D+01 -2.4320820778905D+01 +106 1.0500000000000D+00 3.2642356275079D-01 -2.0920371694685D+00 1.0237624675200D+01 -3.0626483694753D+01 -1.7111503944072D+01 +107 1.0600000000000D+00 3.0600996132899D-01 -1.9911948056163D+00 9.9306213099549D+00 -3.0762590647111D+01 -1.0152460238680D+01 +108 1.0700000000000D+00 2.8658941357167D-01 -1.8934281316464D+00 9.6226005299433D+00 -3.0830400325721D+01 -3.4536037860173D+00 +109 1.0800000000000D+00 2.6813112298300D-01 -1.7987439505864D+00 9.3142321477375D+00 -3.0832559334824D+01 2.9763086691423D+00 +110 1.0900000000000D+00 2.5060425808295D-01 -1.7071425010812D+00 9.0061590914568D+00 -3.0771796097096D+01 9.1296747553791D+00 +111 1.1000000000000D+00 2.3397801669356D-01 -1.6186177301329D+00 8.6989966438356D+00 -3.0650909304364D+01 1.5000039646509D+01 +112 1.1100000000000D+00 2.1822168746191D-01 -1.5331575728799D+00 8.3933317966593D+00 -3.0472756559520D+01 2.0582069542613D+01 +113 1.1200000000000D+00 2.0330470855475D-01 -1.4507442382707D+00 8.0897227178320D+00 -3.0240243289427D+01 2.5871522567702D+01 +114 1.1300000000000D+00 1.8919672347211D-01 -1.3713544994984D+00 7.7886983266744D+00 -2.9956311971161D+01 3.0865247112178D+01 +115 1.1400000000000D+00 1.7586763393633D-01 -1.2949599881736D+00 7.4907579779189D+00 -2.9623931183502D+01 3.5561157930481D+01 +116 1.1500000000000D+00 1.6328764982576D-01 -1.2215274910948D+00 7.1963712534502D+00 -2.9246085202623D+01 3.9958189516185D+01 +117 1.1600000000000D+00 1.5142733613187D-01 -1.1510192485874D+00 6.9059778563685D+00 -2.8825764066164D+01 4.4056250091399D+01 +118 1.1700000000000D+00 1.4025765693027D-01 -1.0833932534222D+00 6.6199875998899D+00 -2.8365953940704D+01 4.7856214296816D+01 +119 1.1800000000000D+00 1.2975001636201D-01 -1.0186035493640D+00 6.3387804952379D+00 -2.7869627534316D+01 5.1359884179505D+01 +120 1.1900000000000D+00 1.1987629663614D-01 -9.5660052836514D-01 6.0627069316994D+00 -2.7339735066192D+01 5.4569940934047D+01 +121 1.2000000000000D+00 1.1060889307151D-01 -8.9733122550734D-01 5.7920879445076D+00 -2.6779195816938D+01 5.7489892133050D+01 +122 1.2100000000000D+00 1.0192074620290D-01 -8.4073961087158D-01 5.5272155645857D+00 -2.6190889972245D+01 6.0124041639341D+01 +123 1.2200000000000D+00 9.3785370987356D-02 -7.8676687748839D-01 5.2683532489023D+00 -2.5577650883781D+01 6.2477444513785D+01 +124 1.2300000000000D+00 8.6176883154475D-02 -7.3535172461119D-01 5.0157363858383D+00 -2.4942257787836D+01 6.4555857365414D+01 +125 1.2400000000000D+00 7.9070022750297D-02 -6.8643063558834D-01 4.7695728701166D+00 -2.4287429067321D+01 6.6365689509402D+01 +126 1.2500000000000D+00 7.2440174931448D-02 -6.3993814964353D-01 4.5300437434136D+00 -2.3615815941030D+01 6.7913956020361D+01 +127 1.2600000000000D+00 6.6263388075401D-02 -5.9580712694978D-01 4.2973038955193D+00 -2.2929996641821D+01 6.9208229828951D+01 +128 1.2700000000000D+00 6.0516389276330D-02 -5.5396900641490D-01 4.0714828211808D+00 -2.2232471098411D+01 7.0256591205985D+01 +129 1.2800000000000D+00 5.5176597300451D-02 -5.1435405562562D-01 3.8526854277187D+00 -2.1525656103499D+01 7.1067578822233D+01 +130 1.2900000000000D+00 5.0222133084222D-02 -4.7689161249261D-01 3.6409928884813D+00 -2.0811880975633D+01 7.1650140611173D+01 +131 1.3000000000000D+00 4.5631827859563D-02 -4.4151031815794D-01 3.4364635372427D+00 -2.0093383712788D+01 7.2013584511938D+01 +132 1.3100000000000D+00 4.1385228994214D-02 -4.0813834075559D-01 3.2391337985786D+00 -1.9372307636451D+01 7.2167529891768D+01 +133 1.3200000000000D+00 3.7462603642718D-02 -3.7670358972550D-01 3.0490191494076D+00 -1.8650698517457D+01 7.2121859628036D+01 +134 1.3300000000000D+00 3.3844940302372D-02 -3.4713392037492D-01 2.8661151068970D+00 -1.7930502176309D+01 7.1886673101355D+01 +135 1.3400000000000D+00 3.0513948372943D-02 -3.1935732843237D-01 2.6903982379880D+00 -1.7213562550059D+01 7.1472240080312D+01 +136 1.3500000000000D+00 2.7452055822420D-02 -2.9330213444168D-01 2.5218271860309D+00 -1.6501620213765D+01 7.0888955733856D+01 +137 1.3600000000000D+00 2.4642405059663D-02 -2.6889715780603D-01 2.3603437099310D+00 -1.5796311346482D+01 7.0147296952088D+01 +138 1.3700000000000D+00 2.2068847119174D-02 -2.4607188039182D-01 2.2058737314407D+00 -1.5099167126519D+01 6.9257780129455D+01 +139 1.3800000000000D+00 1.9715934261997D-02 -2.2475659966582D-01 2.0583283865510D+00 -1.4411613540428D+01 6.8230920520346D+01 +140 1.3900000000000D+00 1.7568911098064D-02 -2.0488257127398D-01 1.9176050766013D+00 -1.3734971591262D+01 6.7077193264457D+01 +141 1.4000000000000D+00 1.5613704335197D-02 -1.8638214115767D-01 1.7835885155225D+00 -1.3070457887066D+01 6.5806996169208D+01 +142 1.4100000000000D+00 1.3836911258742D-02 -1.6918886722543D-01 1.6561517693553D+00 -1.2419185592536D+01 6.4430614330405D+01 +143 1.4200000000000D+00 1.2225787047614D-02 -1.5323763066502D-01 1.5351572843786D+00 -1.1782165725147D+01 6.2958186720107D+01 +144 1.4300000000000D+00 1.0768231026119D-02 -1.3846473708138D-01 1.4204579008969D+00 -1.1160308774958D+01 6.1399674768807D+01 +145 1.4400000000000D+00 9.4527719574829D-03 -1.2480800754014D-01 1.3118978489938D+00 -1.0554426628533D+01 5.9764833051268D+01 +146 1.4500000000000D+00 8.2685524743999D-03 -1.1220685978730D-01 1.2093137238412D+00 -9.9652347752573D+00 5.8063182056872D+01 +147 1.4600000000000D+00 7.2053127460988D-03 -1.0060237981734D-01 1.1125354375517D+00 -9.3933547755613D+00 5.6303983083083D+01 +148 1.4700000000000D+00 6.2533734788653D-03 -8.9937384042909D-02 1.0213871450089D+00 -8.8393169692548D+00 5.4496215305961D+01 +149 1.4800000000000D+00 5.4036183362430D-03 -8.0156472370074D-02 9.3568814180505D-01 -8.3035634025486D+00 5.2648555008493D+01 +150 1.4900000000000D+00 4.6474758792667D-03 -7.1206072408958D-02 8.5525373147758D-01 -7.7864509514704D+00 5.0769357010421D+01 +151 1.5000000000000D+00 3.9769011003798D-03 -6.3034475207203D-02 7.7989606108268D-01 -7.2882546205968D+00 4.8866638241340D+01 +152 1.5100000000000D+00 3.3843566474976D-03 -5.5591862765374D-02 7.0942492259198D-01 -6.8091709949342D+00 4.6948063471319D+01 +153 1.5200000000000D+00 2.8627938081690D-03 -4.8830327733619D-02 6.4364851936640D-01 -6.3493218241477D+00 4.5020933146656D+01 +154 1.5300000000000D+00 2.4056333358737D-03 -4.2703885614211D-02 5.8237419610821D-01 -5.9087577180155D+00 4.3092173308085D+01 +155 1.5400000000000D+00 2.0067461920705D-03 -3.7168479853679D-02 5.2540913131724D-01 -5.4874619320322D+00 4.1168327547288D+01 +156 1.5500000000000D+00 1.6604342659269D-03 -3.2181980203069D-02 4.7256099176719D-01 -5.0853542245373D+00 3.9255550937993D+01 +157 1.5600000000000D+00 1.3614111514947D-03 -2.7704174723180D-02 4.2363854773011D-01 -4.7022947631287D+00 3.7359605904122D+01 +158 1.5700000000000D+00 1.1047830225530D-03 -2.3696755836534D-02 3.7845224951454D-01 -4.3380880654677D+00 3.5485859928154D+01 +159 1.5800000000000D+00 8.8602969017056D-04 -2.0123300811717D-02 3.3681476385724D-01 -3.9924869510117D+00 3.3639285058284D+01 +160 1.5900000000000D+00 7.0098586509209D-04 -1.6949247076030D-02 2.9854147149517D-01 -3.6651964925177D+00 3.1824459101982D+01 +161 1.6000000000000D+00 5.4582270777312D-04 -1.4141862760160D-02 2.6345092463646D-01 -3.3558779438298D+00 3.0045568462205D+01 +162 1.6100000000000D+00 4.1702967969758D-04 -1.1670212849580D-02 2.3136526592895D-01 -3.0641526350591D+00 2.8306412494224D+01 +163 1.6200000000000D+00 3.1139676729122D-04 -9.5051213571805D-03 2.0211060819756D-01 -2.7896058136129D+00 2.6610409322317D+01 +164 1.6300000000000D+00 2.2599709045425D-04 -7.6191298713855D-03 1.7551737652208D-01 -2.5317904231520D+00 2.4960602999464D+01 +165 1.6400000000000D+00 1.5816995237342D-04 -5.9864528894882D-03 1.5142061254357D-01 -2.2902308020086D+00 2.3359671930409D+01 +166 1.6500000000000D+00 1.0550434189597D-04 -4.5829302737838D-03 1.2966024252291D-01 -2.0644262937346D+00 2.1809938449176D+01 +167 1.6600000000000D+00 6.5822931472423D-05 -3.3859772224071D-03 1.1008130955013D-01 -1.8538547545571D+00 2.0313379460833D+01 +168 1.6700000000000D+00 3.7166580244069D-05 -2.3745320765954D-03 9.2534171424929D-02 -1.6579759511924D+00 1.8871638041245D+01 +169 1.6800000000000D+00 1.7779373686447D-05 -1.5290023309482D-03 7.6874664989326D-02 -1.4762348368236D+00 1.7486035899846D+01 +170 1.6900000000000D+00 6.0942061226054D-06 -8.3120914872453D-04 6.2964238478093D-02 -1.3080646998781D+00 1.6157586602216D+01 +171 1.7000000000000D+00 7.1892859474356D-07 -2.6433072259856D-04 5.0670052927745D-02 -1.1528901759118D+00 1.4887009456055D+01 +172 1.7100000000000D+00 4.2306327383557D-07 1.8715524598705D-04 3.9865054288164D-02 -1.0101301190538D+00 1.3674743961756D+01 +173 1.7200000000000D+00 4.1251009535827D-06 5.3752962830771D-04 3.0428017438172D-02 -8.7920032504330D-01 1.2520964730894D+01 +174 1.7300000000000D+00 1.0880375767299D-05 7.9989028116236D-04 2.2243563831749D-02 -7.5951610487019D-01 1.1425596782350D+01 +175 1.7400000000000D+00 1.9869530695402D-05 9.8621047710382D-04 1.5202154075303D-02 -6.5049470184426D-01 1.0388331118062D+01 +176 1.7500000000000D+00 3.0387559328536D-05 1.1073971859107D-03 9.2000572073859D-03 -5.5155755445263D-01 9.4086405016023D+00 +177 1.7600000000000D+00 4.1833437062627D-05 1.1733488809475D-03 4.1392980714209D-03 -4.6213239763658D-01 8.4857953359384D+00 +178 1.7700000000000D+00 5.3700317509174D-05 1.1930127909101D-03 -7.2415494645997D-05 -3.8165520890976D-01 7.6188795860598D+00 +179 1.7800000000000D+00 6.5566308717806D-05 1.1744412350987D-03 -3.5217841174874D-03 -3.0957199089229D-01 6.8068066296310D+00 +180 1.7900000000000D+00 7.7085795311889D-05 1.1248470737836D-03 -6.2900254715390D-03 -2.4534040118201D-01 6.0483350145539D+00 +181 1.8000000000000D+00 8.7981323181044D-05 1.0506578527408D-03 -8.4529981896904D-03 -1.8843121952756D-01 5.3420839844207D+00 +182 1.8100000000000D+00 9.8036004634370D-05 9.5756880421102D-04 -1.0081339977766D-02 -1.3832966765928D-01 4.6865487943704D+00 +183 1.8200000000000D+00 1.0708646100283D-04 8.5059421743335D-04 -1.1240617738049D-02 -9.4536570515021D-02 4.0801156502320D+00 +184 1.8300000000000D+00 1.1501625781076D-04 7.3411744569140D-04 -1.1991489099900D-02 -5.6569376706287D-02 3.5210763347426D+00 +185 1.8400000000000D+00 1.2174984303249D-04 6.1193906423652D-04 -1.2389872830752D-02 -2.3963028770528D-02 3.0076423440656D+00 +186 1.8500000000000D+00 1.2724694992581D-04 4.8732344434968D-04 -1.2487127852583D-02 3.7293007745956D-03 2.5379586075950D+00 +187 1.8600000000000D+00 1.3149746178839D-04 3.6304337646268D-04 -1.2330238400910D-02 2.6935611423218D-02 2.1101166453673D+00 +188 1.8700000000000D+00 1.3451671110037D-04 2.4142289870951D-04 -1.1962004934926D-02 4.6064603557540D-02 1.7221672057645D+00 +189 1.8800000000000D+00 1.3634119769441D-04 1.2437815541607D-04 -1.1421238896278D-02 6.1505331452078D-02 1.3721323012141D+00 +190 1.8900000000000D+00 1.3702470669147D-04 1.3456284530460D-05 -1.0742960347194D-02 7.3626974020484D-02 1.0580166291444D+00 +191 1.9000000000000D+00 1.3663480404235D-04 -9.0127624708428D-05 -9.9585976357430D-03 8.2778715407834D-02 7.7781837937336D-01 +192 1.9100000000000D+00 1.3524969231994D-04 -1.8545567765996D-04 -9.0961870843869D-03 8.9289731988917D-02 5.2953934341535D-01 +193 1.9200000000000D+00 1.3295540603831D-04 -2.7187417442661D-04 -8.1805733065654D-03 9.3469275587821D-02 3.1119441868479D-01 +194 1.9300000000000D+00 1.2984332391998D-04 -3.4896276730723D-04 -7.2336069944386D-03 9.5606849402637D-02 1.2082035992718D-01 +195 1.9400000000000D+00 1.2600798454101D-04 -4.1650543748637D-04 -6.2743417796674D-03 9.5972467765779D-02 -4.3516080843003D-02 +196 1.9500000000000D+00 1.2154517692259D-04 -4.7446353872426D-04 -5.3192270387811D-03 9.4816993402580D-02 -1.8371075777448D-01 +197 1.9600000000000D+00 1.1655029568442D-04 -5.2295068670701D-04 -4.3822976578621D-03 9.2372546043046D-02 -3.0161538284139D-01 +198 1.9700000000000D+00 1.1111693595894D-04 -5.6220953765875D-04 -3.4753591861616D-03 8.8852974580710D-02 -3.9903146430349D-01 +199 1.9800000000000D+00 1.0533570896381D-04 -5.9259042722023D-04 -2.6081676182823D-03 8.4454386077182D-02 -4.7770493167763D-01 +200 1.9900000000000D+00 9.9293270012272D-05 -6.1453171122463D-04 -1.7886045304494D-03 7.9355727156993D-02 -5.3932137683716D-01 +201 2.0000000000000D+00 9.3071521974531D-05 -6.2854191265350D-04 -1.0228448906744D-03 7.3719406245816D-02 -5.8550199116990D-01 +202 2.0100000000000D+00 8.6747003774991D-05 -6.3518343751064D-04 -3.1551982583125D-04 6.7691957831497D-02 -6.1780007254202D-01 +203 2.0200000000000D+00 8.0390420262260D-05 -6.3505793740610D-04 3.3012854962552D-04 6.1404734220172D-02 -6.3769817768654D-01 +204 2.0300000000000D+00 7.4066318979486D-05 -6.2879316366456D-04 9.1209873713858D-04 5.4974625677992D-02 -6.4660583544368D-01 +205 2.0400000000000D+00 6.7832891268971D-05 -6.1703126421061D-04 1.4294887217632D-03 4.8504800616904D-02 -6.4585781554884D-01 +206 2.0500000000000D+00 6.1741873407087D-05 -6.0041847305469D-04 1.8823630276565D-03 4.2085456778151D-02 -6.3671294878193D-01 +207 2.0600000000000D+00 5.5838563514024D-05 -5.7959607393029D-04 2.2716261044832D-03 3.5794588909467D-02 -6.2035342048952D-01 +208 2.0700000000000D+00 5.0161899537432D-05 -5.5519259804342D-04 2.5989048007863D-03 2.9698752143209D-02 -5.9788456926707D-01 +209 2.0800000000000D+00 4.4744628161392D-05 -5.2781716463584D-04 2.8664374305791D-03 2.3853832571390D-02 -5.7033511169038D-01 +210 2.0900000000000D+00 3.9613527030942D-05 -4.9805388399633D-04 3.0769709259687D-03 1.8305810231509D-02 -5.3865778760788D-01 +211 2.1000000000000D+00 3.4789672382299D-05 -4.6645724529433D-04 3.2336658643627D-03 1.3091511419543D-02 -5.0373039183050D-01 +212 2.1100000000000D+00 3.0288766264393D-05 -4.3354844957777D-04 3.3400081373590D-03 8.2393565803606D-03 -4.6635715517814D-01 +213 2.1200000000000D+00 2.6121471769212D-05 -3.9981253280426D-04 3.3997290502135D-03 3.7700822012315D-03 -4.2727044491068D-01 +214 2.1300000000000D+00 2.2293793750051D-05 -3.6569630933481D-04 3.4167317531594D-03 -3.0254668205643D-04 -3.8713276053677D-01 +215 2.1400000000000D+00 1.8807467563507D-05 -3.3160698540219D-04 3.3950250016226D-03 -3.9710493103383D-03 -3.4653898254285D-01 +216 2.1500000000000D+00 1.5660352526590D-05 -2.9791137980258D-04 3.3386638683642D-03 -7.2335683721190D-03 -3.0601884281142D-01 +217 2.1600000000000D+00 1.2846849852072D-05 -2.6493578684938D-04 3.2516963835039D-03 -1.0093225825986D-02 -2.6603961475944D-01 +218 2.1700000000000D+00 1.0358294379739D-05 -2.3296622547704D-04 3.1381171065075D-03 -1.2557518248790D-02 -2.2700893590599D-01 +219 2.1800000000000D+00 8.1833600771143D-06 -2.0224921629584D-04 3.0018261984231D-03 -1.4637732319040D-02 -1.8927779884230D-01 +220 2.1900000000000D+00 6.3084513189825D-06 -1.7299291346089D-04 2.8465942623089D-03 -1.6348392972070D-02 -1.5314364439992D-01 +221 2.2000000000000D+00 4.7180720008520D-06 -1.4536850637754D-04 2.6760326809486D-03 -1.7706747405016D-02 -1.1885351806462D-01 +222 2.2100000000000D+00 3.3951966892746D-06 -1.1951200839114D-04 2.4935687929465D-03 -1.8732272313288D-02 -8.6607331039006D-02 +223 2.2200000000000D+00 2.3216056946915D-06 -9.5526146979582D-05 2.3024259111174D-03 -1.9446222468380D-02 -5.6561104781639D-02 +224 2.2300000000000D+00 1.4782078743644D-06 -7.3482490117697D-05 2.1056076908604D-03 -1.9871207990224D-02 -2.8830251814151D-02 +225 2.2400000000000D+00 8.4534682683773D-07 -5.3423752866675D-05 1.9058865862268D-03 -2.0030801656291D-02 -3.4928668105629D-03 +226 2.2500000000000D+00 4.0307002377713D-07 -3.5366080228479D-05 1.7057959357451D-03 -1.9949185924332D-02 1.9407067775213D-02 +227 2.2600000000000D+00 1.3138759588237D-07 -1.9301516299875D-05 1.5076256335015D-03 -1.9650825137011D-02 3.9856465209113D-02 +228 2.2700000000000D+00 1.0500688437624D-08 -5.2004407034481D-06 1.3134207703826D-03 -1.9160172491430D-02 5.7870013178433D-02 +229 2.2800000000000D+00 2.1002001651216D-08 6.9860342264477D-06 1.1249829443936D-03 -1.8501409624423D-02 7.3487152785919D-02 +230 2.2900000000000D+00 1.4406207851669D-07 1.7323569532810D-05 9.4387445093782D-04 -1.7698210897551D-02 8.6769088096640D-02 +231 2.3000000000000D+00 3.6158122264338D-07 2.5892293798189D-05 7.7142414588114D-04 -1.6773542142688D-02 9.7795975253326D-02 +232 2.3100000000000D+00 6.5632246007688D-07 3.2784509650935D-05 6.0873542231399D-04 -1.5749484957750D-02 1.0666419847927D-01 +233 2.3200000000000D+00 1.0120254937936D-06 3.8102425885363D-05 4.5669613425230D-04 -1.4647085808146D-02 1.1348373791078D-01 +234 2.3300000000000D+00 1.4134917451908D-06 4.1956126406053D-05 3.1598917929301D-04 -1.3486234220457D-02 1.1837574759266D-01 +235 2.3400000000000D+00 1.8466543099189D-06 4.4461548303298D-05 1.8710479658310D-04 -1.2285562179326D-02 1.2147021385203D-01 +236 2.3500000000000D+00 2.2986278627530D-06 4.5738599778782D-05 7.0353674436659D-05 -1.1062366423028D-02 1.2290376791787D-01 +237 2.3600000000000D+00 2.7577383148093D-06 4.5909481145910D-05 -3.4119769585984D-05 -9.8325527614955D-03 1.2281769045888D-01 +238 2.3700000000000D+00 3.2135382544744D-06 4.5097050825869D-05 -1.2632291878585D-04 -8.6105989947615D-03 1.2135601056368D-01 +239 2.3800000000000D+00 3.6568062831693D-06 4.3423386872699D-05 -2.0640065567595D-04 -7.4095360153484D-03 1.1866379143393D-01 +240 2.3900000000000D+00 4.0795325889428D-06 4.1008512906083D-05 -2.7462115267460D-04 -6.2409451814175D-03 1.1488558260480D-01 +241 2.4000000000000D+00 4.4748918308757D-06 3.7969195755675D-05 -3.3136095074525D-04 -5.1149714942825D-03 1.1016397601570D-01 +242 2.4100000000000D+00 4.8372060669709D-06 3.4417955914551D-05 -3.7709100423378D-04 -4.0403489041221D-03 1.0463835947511D-01 +243 2.4200000000000D+00 5.1618983509848D-06 3.0462206202841D-05 -4.1236292899497D-04 -3.0244375191934D-03 9.8443809393427D-02 +244 2.4300000000000D+00 5.4454357799634D-06 2.6203478352419D-05 -4.3779495458444D-04 -2.0732736380245D-03 9.1710091276562D-02 +245 2.4400000000000D+00 5.6852695260056D-06 2.1736847789422D-05 -4.5405940784894D-04 -1.1916253444843D-03 8.4560848074364D-02 +246 2.4500000000000D+00 5.8797682679975D-06 1.7150457759387D-05 -4.6187042431624D-04 -3.8305690610624D-04 7.7112902832834D-02 +247 2.4600000000000D+00 6.0281436797423D-06 1.2525137688424D-05 -4.6197171557575D-04 3.4999712319901D-04 6.9475667713278D-02 +248 2.4700000000000D+00 6.1303794247524D-06 7.9341815853063D-06 -4.5512617444895D-04 1.0061585148589D-03 6.1750714376601D-02 +249 2.4800000000000D+00 6.1871547904545D-06 3.4432052440416D-06 -4.4210566383536D-04 1.5850249972408D-03 5.4031437607059D-02 +250 2.4900000000000D+00 6.1997642054669D-06 -8.8990325871546D-07 -4.2368125720370D-04 2.0870842097180D-03 4.6402821011228D-02 +251 2.5000000000000D+00 6.1700439858024D-06 -5.0149275802623D-06 -4.0061519867352D-04 2.5136323629995D-03 3.8941322303682D-02 +252 2.5100000000000D+00 6.1002957160569D-06 -8.8891969078040D-06 -3.7365318635099D-04 2.8666883232644D-03 3.1714840276100D-02 +253 2.5200000000000D+00 5.9932083025769D-06 -1.2477382288821D-05 -3.4351725437848D-04 3.1489050562650D-03 2.4782768548337D-02 +254 2.5300000000000D+00 5.8517897995000D-06 -1.5751236307583D-05 -3.1090020006608D-04 3.3634888745678D-03 1.8196128923528D-02 +255 2.5400000000000D+00 5.6792976371280D-06 -1.8689274004419D-05 -2.7646041822216D-04 3.5141162088748D-03 1.1997773214515D-02 +256 2.5500000000000D+00 5.4791693395121D-06 -2.1276394151495D-05 -2.4081736206673D-04 3.6048498565396D-03 6.2226545631316D-03 +257 2.5600000000000D+00 5.2549645671976D-06 -2.3503488088982D-05 -2.0454832236858D-04 3.6400653351733D-03 8.9813980225989D-04 +258 2.5700000000000D+00 5.0103070201906D-06 -2.5367003103675D-05 -1.6818564574840D-04 3.6243765130469D-03 -3.9556240120626D-03 +259 2.5800000000000D+00 4.7488276769613D-06 -2.6868460617778D-05 -1.3221453614052D-04 3.5625618527129D-03 -8.3252886792762D-03 +260 2.5900000000000D+00 4.4741200522906D-06 -2.8014002033571D-05 -9.7071901475608D-05 3.4595023512220D-03 -1.2203880198778D-02 +261 2.6000000000000D+00 4.1896964023210D-06 -2.8813903089945D-05 -6.3145625510717D-05 3.3201201261921D-03 -1.5590334662201D-02 +262 2.6100000000000D+00 3.8989454003614D-06 -2.9282050904008D-05 -3.0774361356813D-05 3.1493179231478D-03 -1.8488989475625D-02 +263 2.6200000000000D+00 3.6051017500362D-06 -2.9435485630333D-05 -2.4804934045272D-07 2.9519312766280D-03 -2.0909107746334D-02 +264 2.6300000000000D+00 3.3112169645855D-06 -2.9293918103112D-05 2.8191189107790D-05 2.7326817098183D-03 -2.2864372743963D-02 +265 2.6400000000000D+00 3.0201326312907D-06 -2.8879225953575D-05 5.4347675112845D-05 2.4961320979892D-03 -2.4372352724958D-02 +266 2.6500000000000D+00 2.7344630238930D-06 -2.8215026484028D-05 7.8070437214903D-05 2.2466528959505D-03 -2.5454018165641D-02 +267 2.6600000000000D+00 2.4565800289627D-06 -2.7326243334980D-05 9.9251142503003D-05 1.9883908362401D-03 -2.6133246076684D-02 +268 2.6700000000000D+00 2.1886008688402D-06 -2.6238664343192D-05 1.1782162866971D-04 1.7252403501424D-03 -2.6436307812719D-02 +269 2.6800000000000D+00 1.9323821612078D-06 -2.4978571069506D-05 1.3375134484365D-04 1.4608232032355D-03 -2.6391413397982D-02 +270 2.6900000000000D+00 1.6895170877273D-06 -2.3572385111041D-05 1.4704457799557D-04 1.1984719008108D-03 -2.6028265501032D-02 +271 2.7000000000000D+00 1.4613352568083D-06 -2.2046315147818D-05 1.5773737819901D-04 9.4121594138066D-04 -2.5377607729847D-02 +272 2.7100000000000D+00 1.2489063608768D-06 -2.0426058786911D-05 1.6589451861013D-04 6.9177360883708D-04 -2.4470820606850D-02 +273 2.7200000000000D+00 1.0530468286891D-06 -1.8736544516733D-05 1.7160645328853D-04 4.5254813229919D-04 -2.3339552645798D-02 +274 2.7300000000000D+00 8.7432877938652D-07 -1.7001680953978D-05 1.7498607598705D-04 2.2562649341600D-04 -2.2015354311742D-02 +275 2.7400000000000D+00 7.1309132801633D-07 -1.5244138849198D-05 1.7616548713885D-04 1.2781764348456D-05 -2.0529341747755D-02 +276 2.7500000000000D+00 5.6945358056209D-07 -1.3485191548655D-05 1.7529305086328D-04 -1.8452068276220D-04 -1.8911920132562D-02 +277 2.7600000000000D+00 4.4332932295337D-07 -1.1744566030512D-05 1.7253035004714D-04 -3.6511480133889D-04 -1.7192515799336D-02 +278 2.7700000000000D+00 3.3444405706106D-07 -1.0040307815571D-05 1.6804900040929D-04 -5.2812273888080D-04 -1.5399317748495D-02 +279 2.7800000000000D+00 2.4235111725408D-07 -8.3887125305947D-06 1.6202809985289D-04 -6.7294171427351D-04 -1.3559098147832D-02 +280 2.7900000000000D+00 1.6644941303931D-07 -6.8042632100352D-06 1.5465154951472D-04 -7.9922906981002D-04 -1.1697036480657D-02 +281 2.8000000000000D+00 1.0600318823615D-07 -5.2995853111587D-06 1.4610530327665D-04 -9.0688478225707D-04 -9.8365579668096D-03 +282 2.8100000000000D+00 6.0159505431910D-08 -3.8854442499268D-06 1.3657520476849D-04 -9.9603403755314D-04 -7.9992311477347D-03 +283 2.8200000000000D+00 2.7966459900490D-08 -2.5707585027386D-06 1.2624487513432D-04 -1.0670084466484D-03 -6.2046828621103D-03 +284 2.8300000000000D+00 8.3924136535737D-09 -1.3626301155288D-06 1.1529363536768D-04 -1.1203256143857D-03 -4.4705309743130D-03 +285 2.8400000000000D+00 3.4413452683563D-10 -2.6639561981358D-07 1.0389471559268D-04 -1.1566687146384D-03 -2.8123473259840D-03 +286 2.8500000000000D+00 2.6829844819292D-09 7.1430408992012D-07 9.2213832747829D-05 -1.1768668568853D-03 -1.2436530667651D-03 +287 2.8600000000000D+00 1.4241439630122D-08 1.5774425019405D-06 8.0407831350881D-05 -1.1818746778015D-03 2.2407206617501D-04 +288 2.8700000000000D+00 3.3840879441258D-08 2.3225086239039D-06 6.8623333705185D-05 -1.1727501297468D-03 1.5813645768850D-03 +289 2.8800000000000D+00 6.0303990364678D-08 2.9504055531841D-06 5.6996004668139D-05 -1.1506366518509D-03 2.8207216978839D-03 +290 2.8900000000000D+00 9.2468469505322D-08 3.4633375703057D-06 4.5649775843783D-05 -1.1167438049742D-03 3.9365369265031D-03 +291 2.9000000000000D+00 1.2920084986406D-07 3.8646822887963D-06 3.4696181751628D-05 -1.0723271881139D-03 4.9250179223735D-03 +292 2.9100000000000D+00 1.6940690742330D-07 4.1588691625181D-06 2.4234030807535D-05 -1.0186715495714D-03 5.7840929092400D-03 +293 2.9200000000000D+00 2.1204095017908D-07 4.3512546739158D-06 1.4349234774789D-05 -9.5707475614327D-04 6.5133063864302D-03 +294 2.9300000000000D+00 2.5611465174597D-07 4.4479915705581D-06 5.1147443152513D-06 -8.8883195542862D-04 7.1137044782670D-03 +295 2.9400000000000D+00 3.0070562406901D-07 4.4558886344719D-06 -3.4094052077805D-06 -8.1521959804877D-04 7.5877063873841D-03 +296 2.9500000000000D+00 3.4496185304777D-07 4.3822968752651D-06 -1.1175784703799D-05 -7.3748424800315D-04 7.9389853977030D-03 +297 2.9600000000000D+00 3.8810659457839D-07 4.2349853270309D-06 -1.8149223626754D-05 -6.5683063148389D-04 8.1723342299417D-03 +298 2.9700000000000D+00 4.2944287944318D-07 4.0220071793386D-06 -2.4306338959516D-05 -5.7440962552045D-04 8.2935336659826D-03 +299 2.9800000000000D+00 4.6835528071972D-07 3.7515930102050D-06 -2.9634956907525D-05 -4.9130996739145D-04 8.3092152141744D-03 +300 2.9900000000000D+00 5.0431088863077D-07 3.4320460375598D-06 -3.4133454226822D-05 -4.0855083800457D-04 8.2267341527316D-03 +301 3.0000000000000D+00 5.3685957054247D-07 3.0716397421980D-06 -3.7810030721970D-05 -3.2707527123665D-04 8.0540507451578D-03 +302 3.0100000000000D+00 5.6563376503655D-07 2.6785083016229D-06 -4.0681871245576D-05 -2.4774356786477D-04 7.7994665719747D-03 +303 3.0200000000000D+00 5.9034609420477D-07 2.2605783586398D-06 -4.2774364960589D-05 -1.7133097240393D-04 7.4716736194443D-03 +304 3.0300000000000D+00 6.1078700755000D-07 1.8254898522220D-06 -4.4120241572653D-05 -9.8524399048880D-05 7.0794174579946D-03 +305 3.0400000000000D+00 6.2682159096645D-07 1.3805177988470D-06 -4.4758618267873D-05 -2.9921218956140D-05 6.6319108927689D-03 +306 3.0500000000000D+00 6.3838566018829D-07 9.3251503139426D-07 -4.4734115632992D-05 3.3971380021004D-05 6.1385372289664D-03 +307 3.0600000000000D+00 6.4548127607338D-07 4.8786764469889D-07 -4.4095998209878D-05 9.2736180626698D-05 5.6083271188597D-03 +308 3.0700000000000D+00 6.4817198451913D-07 5.2454691333755D-08 -4.2897309599949D-05 1.4603937742020D-04 5.0513126649230D-03 +309 3.0800000000000D+00 6.4657703371728D-07 -3.6839938956056D-07 -4.1193850229210D-05 1.9364596787023D-04 4.4735602563806D-03 +310 3.0900000000000D+00 6.4086627784289D-07 -7.6993557069881D-07 -3.9043477429222D-05 2.3539857243470D-04 3.8820142653995D-03 +311 3.1000000000000D+00 6.3125439501409D-07 -1.1479783514182D-06 -3.6505299831897D-05 2.7122564126715D-04 3.2824940797097D-03 +312 3.1100000000000D+00 6.1799489402094D-07 -1.4989451690430D-06 -3.3638879602606D-05 3.0112769304077D-04 2.6810568447298D-03 +313 3.1200000000000D+00 6.0137365389098D-07 -1.8198521417388D-06 -3.0503334434267D-05 3.2511576389500D-04 2.0918566396613D-03 +314 3.1300000000000D+00 5.8170375556120D-07 -2.1083011967312D-06 -2.7156946328914D-05 3.4329808578913D-04 1.5244981956010D-03 +315 3.1400000000000D+00 5.5931967010378D-07 -2.3624690976955D-06 -2.3656165295507D-05 3.5577124065853D-04 9.9159249108704D-04 +316 3.1500000000000D+00 5.3457094640956D-07 -2.5810907951042D-06 -2.0055924465651D-05 3.6285194649482D-04 4.9345281689422D-04 +317 3.1600000000000D+00 5.0781688170761D-07 -2.7634357263288D-06 -1.6408893339424D-05 3.6500560500550D-04 2.1601230530450D-05 +318 3.1700000000000D+00 4.7942179833793D-07 -2.9092786661157D-06 -1.2764275285737D-05 3.6263291620196D-04 -4.2873734085533D-04 +319 3.1800000000000D+00 4.4975030023002D-07 -3.0188645081721D-06 -9.1707552385346D-06 3.5642375516060D-04 -8.6392554892741D-04 +320 3.1900000000000D+00 4.1916154178948D-07 -3.0928848401196D-06 -5.6658365854530D-06 3.4627331317712D-04 -1.2796099003284D-03 +321 3.2000000000000D+00 3.8800592386347D-07 -3.1324298893758D-06 -2.2842393867320D-06 3.3214882308658D-04 -1.6677590641354D-03 +322 3.2100000000000D+00 3.5662132025228D-07 -3.1389472701338D-06 9.4124121366198D-07 3.1419000086036D-04 -2.0167830128762D-03 +323 3.2200000000000D+00 3.2532997019242D-07 -3.1142731224059D-06 3.9946166659581D-06 2.9222865151586D-04 -2.3388402485228D-03 +324 3.2300000000000D+00 2.9443407914244D-07 -3.0603352036458D-06 6.8250232437064D-06 2.6751998585958D-04 -2.5750097750739D-03 +325 3.2400000000000D+00 2.6421466118163D-07 -2.9793747441664D-06 9.4001491289696D-06 2.4104789087072D-04 -2.6978874072104D-03 +326 3.2500000000000D+00 2.3492912273591D-07 -2.8737875470175D-06 1.1692514154318D-05 2.1378313414001D-04 -2.6859761801222D-03 +327 3.2600000000000D+00 2.0680968171669D-07 -2.7458982296987D-06 1.3670491471774D-05 1.8637520121715D-04 -2.5028760606038D-03 +328 3.2700000000000D+00 1.8006121876502D-07 -2.5991713375272D-06 1.5375424273846D-05 1.6032755398705D-04 -2.2799030571080D-03 +329 3.2800000000000D+00 1.5486138593908D-07 -2.4366478161953D-06 1.6830628962508D-05 1.3629491559438D-04 -2.1009434909854D-03 +330 3.2900000000000D+00 1.3136295134735D-07 -2.2615586999799D-06 1.8061251792461D-05 1.1493523802847D-04 -2.0548409526033D-03 +331 3.3000000000000D+00 1.0969283232901D-07 -2.0771222518258D-06 1.9087124875265D-05 9.6610215479519D-05 -2.2172042188810D-03 +332 3.3100000000000D+00 8.9928592095979D-08 -1.8839051595234D-06 1.9905706731981D-05 7.6646226092571D-05 -2.5697901825686D-03 +333 3.3200000000000D+00 7.2133130148467D-08 -1.6835320679825D-06 2.0503069044089D-05 5.2200798428784D-05 -3.0851606584113D-03 +334 3.3300000000000D+00 5.6330401517045D-08 -1.4775522375748D-06 2.0870813441163D-05 2.0171967812132D-05 -3.7274811873077D-03 +335 3.3400000000000D+00 4.2525137695950D-08 -1.2680785295617D-06 2.0982386284603D-05 -2.1416754659503D-05 -4.4257216834158D-03 +336 3.3500000000000D+00 3.0787385631873D-08 -1.0597401085495D-06 2.0682516702266D-05 -6.9186951222127D-05 -4.9397071808382D-03 +337 3.3600000000000D+00 2.1112235974009D-08 -8.5692845236094D-07 1.9882037622316D-05 -1.2027336996774D-04 -5.1053976918814D-03 +338 3.3700000000000D+00 1.3473282653441D-08 -6.6392313520568D-07 1.8486599360859D-05 -1.7125453054660D-04 -4.7450155562445D-03 +339 3.3800000000000D+00 7.7859008250607D-09 -4.8525804456475D-07 1.6456444410344D-05 -2.1800740847958D-04 -3.7502500949936D-03 +340 3.3900000000000D+00 3.7899800075972D-09 -3.2794911612479D-07 1.3989568089726D-05 -2.5396271495924D-04 -2.3357268709107D-03 +341 3.4000000000000D+00 1.2342883481752D-09 -1.9685734209784D-07 1.1245706323254D-05 -2.7435965609791D-04 -6.5946653738519D-04 +342 3.4100000000000D+00 -1.6023565677354D-10 -9.6482178677272D-08 8.4166515376130D-06 -2.7453070795676D-04 1.0753515659332D-03 +343 3.4200000000000D+00 -6.8508716053978D-10 -2.9721693426057D-08 5.7042226061225D-06 -2.5134931249737D-04 2.6512387967473D-03 +344 3.4300000000000D+00 -6.4940801572452D-10 1.0017191250387D-08 3.2801194226281D-06 -2.1244405077784D-04 3.9123463456775D-03 +345 3.4400000000000D+00 -3.2572358491400D-10 2.7779002063320D-08 1.2938917480811D-06 -1.6330713787074D-04 4.7176141783313D-03 +346 3.4500000000000D+00 3.6967746778011D-11 3.0042435462113D-08 -1.3034412177562D-07 -1.1080248909855D-04 4.9547829404430D-03 +347 3.4600000000000D+00 1.9699628856050D-10 2.4507451755186D-08 -8.7504237868895D-07 -6.2956759569848D-05 4.5162600191406D-03 +348 3.4700000000000D+00 2.2484320517249D-10 1.4132850334725D-08 -1.1246610649284D-06 -2.1768108853296D-05 3.6501906366892D-03 +349 3.4800000000000D+00 1.3992376440688D-10 2.9515943713223D-09 -1.0065259151362D-06 9.6590652784101D-06 2.5299739905010D-03 +350 3.4900000000000D+00 -9.0676624971963D-13 -5.9882883505868D-09 -6.7439817667196D-07 2.9544072429667D-05 1.3527314220969D-03 +351 3.5000000000000D+00 -3.1097026882351D-11 -9.2684125610625D-09 -3.7735722017019D-07 3.5572795576208D-05 4.2617673465606D-04 +352 3.5100000000000D+00 -4.1307613898778D-11 -8.6866402704040D-09 -9.4133643209886D-08 3.2117739439294D-05 -2.9027461269377D-04 +353 3.5200000000000D+00 -3.0275349589132D-11 -5.3242946378689D-09 1.2280308209663D-07 2.2415422833724D-05 -7.5210246281182D-04 +354 3.5300000000000D+00 -4.7752392141171D-12 -7.7575947896759D-10 2.4727079059595D-07 1.0113047159465D-05 -9.5411107260585D-04 +355 3.5400000000000D+00 -1.7234554339163D-13 1.2679634201562D-09 2.7567346569119D-07 1.4032920541409D-06 -9.1672183750880D-04 +356 3.5500000000000D+00 -2.6613609842398D-13 1.8720019064750D-09 2.2519473304076D-07 -4.3267092517337D-06 -7.0616204271456D-04 +357 3.5600000000000D+00 -2.2221653368352D-13 1.5001032798039D-09 1.2520089171284D-07 -7.1893725181028D-06 -4.0026668970738D-04 +358 3.5700000000000D+00 -7.4020203755562D-14 4.8285214505532D-10 1.0600592419044D-08 -7.4188354878844D-06 -7.8819931882924D-05 +359 3.5800000000000D+00 0.0000000000000D+00 -1.1730010385648D-10 -5.7680196749619D-08 -6.3080731866550D-06 1.3961874250022D-04 +360 3.5900000000000D+00 0.0000000000000D+00 -2.2754970586991D-10 -7.3725503557153D-08 -4.4065945747127D-06 2.3698508295540D-04 +361 3.6000000000000D+00 0.0000000000000D+00 -2.1609397598880D-10 -5.9449922106178D-08 -1.9623698734505D-06 2.4833581401459D-04 +362 3.6100000000000D+00 0.0000000000000D+00 -1.0603079851042D-10 -2.5417863481603D-08 4.0358898727528D-07 1.9362180255360D-04 +363 3.6200000000000D+00 0.0000000000000D+00 4.0551121797027D-12 5.7926017829798D-09 1.9792208736198D-06 1.1595660407398D-04 +364 3.6300000000000D+00 0.0000000000000D+00 1.3416178746078D-11 1.3289700558804D-08 2.2698296780927D-06 5.8420942375800D-05 +365 3.6400000000000D+00 0.0000000000000D+00 1.5341584247162D-11 1.3801840704317D-08 1.8101387327905D-06 5.5378602066905D-06 +366 3.6500000000000D+00 0.0000000000000D+00 1.0073931312890D-11 8.5572928415048D-09 8.6753804731593D-07 -3.3987229347816D-05 +367 3.6600000000000D+00 0.0000000000000D+00 3.2651465225892D-13 2.7975471452699D-10 -2.1286372349488D-07 -5.5606788663360D-05 +368 3.6700000000000D+00 0.0000000000000D+00 7.4248750304378D-14 -1.3283343383598D-09 -5.3580800700166D-07 -5.7455958529191D-05 +369 3.6800000000000D+00 0.0000000000000D+00 1.0576365114950D-13 -1.8454747115978D-09 -5.8391475658465D-07 -4.4205231964071D-05 +370 3.6900000000000D+00 0.0000000000000D+00 8.6708090003724D-14 -1.4802800556780D-09 -4.1477496167095D-07 -2.1717296550493D-05 +371 3.7000000000000D+00 0.0000000000000D+00 2.9752027981176D-14 -4.9872016859262D-10 -1.1770990245447D-07 3.0660001775452D-06 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 6.6685205358681D-11 6.5229070060204D-08 1.7158399150768D-05 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3620735799054D-10 1.0694624751739D-07 1.9288535961141D-05 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3684405887646D-10 9.9308715810560D-08 1.4987117873250D-05 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 7.8082138492044D-11 5.3739261437582D-08 6.5533676859083D-06 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.2235265355063D-13 -2.3813489926753D-09 -2.1990842287221D-06 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.3421634046063D-12 -1.1611064618241D-08 -4.3349790763263D-06 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.6593246085418D-12 -1.4305969561221D-08 -4.5349213089253D-06 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.4304775872181D-12 -1.0816273189790D-08 -3.1165224611730D-06 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.3526919438217D-12 -3.2207689894143D-09 -7.6282640283085D-07 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.9469652992787D-14 6.3673662880698D-10 5.2851297774242D-07 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -3.8004814475028D-14 1.2228951551335D-09 8.1662834461911D-07 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -3.8401482693687D-14 1.2167512854009D-09 7.5239000813922D-07 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.2709947916736D-14 7.1024993718522D-10 4.1641978575549D-07 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.9510794202461D-12 -1.6764945928660D-08 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.3848846090248D-11 -8.7287857590365D-08 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.2909735378721D-11 -1.1047450819291D-07 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.0276259391892D-11 -8.8062479188231D-08 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.3898541772977D-11 -3.3910201304767D-08 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 7.1485378318392D-13 4.2740832232219D-09 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.7437370853286D-12 9.7596206532462D-09 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.9450848580807D-12 1.0564799669402D-08 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3523936453966D-12 7.1889659911089D-09 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.3597012658348D-13 1.2345423752489D-09 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 8.5843270428027D-15 -4.3740524062549D-10 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.4357896799107D-14 -7.2267245873438D-10 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3876767302373D-14 -6.9080954428913D-10 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 8.0064556648495D-15 -3.9486556142229D-10 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.4556885133460D-12 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.3672861564646D-11 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.2569065679230D-11 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.8140623773692D-11 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3282127391787D-11 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.5980980366824D-13 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.3635272073238D-13 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.6254119926367D-13 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.3026157410374D-13 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.0517349103991D-13 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.8860273995622D-15 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.5837402344060D-15 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.2658420547203D-15 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -3.9719023405257D-15 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.2790164857405D-15 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 0.0000000000000D+00 1.5622770461954D-02 1.7959090056567D+02 2.8281746095902D+04 +2 1.0000000000000D-02 1.5742718653562D-02 1.3036896588743D+02 2.0628020898944D+04 +3 2.0000000000000D-02 1.6102713857016D-02 9.4702363697147D+01 1.5174143602829D+04 +4 3.0000000000000D-02 1.6703207768354D-02 6.8574919398726D+01 1.1216018703108D+04 +5 4.0000000000000D-02 1.7544953812850D-02 4.9438903080326D+01 8.3170963847149D+03 +6 5.0000000000000D-02 1.8629007763674D-02 3.5532972895561D+01 6.1868936078692D+03 +7 6.0000000000000D-02 1.9956728440966D-02 2.5548160768084D+01 4.6189622112101D+03 +8 7.0000000000000D-02 2.1529778210680D-02 1.8493989123174D+01 3.4638207794962D+03 +9 8.0000000000000D-02 2.3350123002537D-02 1.3616807349917D+01 2.6123670232253D+03 +10 9.0000000000000D-02 2.5420031521036D-02 1.0342562183642D+01 1.9846148965330D+03 +11 1.0000000000000D-01 2.7742073288920D-02 8.2345747349786D+00 1.5217534276095D+03 +12 1.1000000000000D-01 3.0319115139492D-02 6.9616858727944D+00 1.1804521346523D+03 +13 1.2000000000000D-01 3.3154315763361D-02 6.2739454481599D+00 9.2873965943633D+02 +14 1.3000000000000D-01 3.6251117917303D-02 5.9839301854893D+00 7.4300314241761D+02 +15 1.4000000000000D-01 3.9613237918091D-02 5.9523217763600D+00 6.0579395278945D+02 +16 1.5000000000000D-01 4.3244652072316D-02 6.0767402818103D+00 5.0421745955909D+02 +17 1.6000000000000D-01 4.7149579733973D-02 6.2830826561110D+00 4.2874796767313D+02 +18 1.7000000000000D-01 5.1332462734040D-02 6.5187996167473D+00 3.7235444560770D+02 +19 1.8000000000000D-01 5.5797940989377D-02 6.7476783739131D+00 3.2985423796206D+02 +20 1.9000000000000D-01 6.0550824170547D-02 6.9457983566281D+00 2.9743452335378D+02 +21 2.0000000000000D-01 6.5596059387928D-02 7.0984019606525D+00 2.7229751214939D+02 +22 2.1000000000000D-01 7.0938694940752D-02 7.1974794111180D+00 2.5239712088034D+02 +23 2.2000000000000D-01 7.6583840262418D-02 7.2399108571041D+00 2.3624339553631D+02 +24 2.3000000000000D-01 8.2536622285238D-02 7.2260430695779D+00 2.2275718748097D+02 +25 2.4000000000000D-01 8.8802138536457D-02 7.1586048737386D+00 2.1116215245636D+02 +26 2.5000000000000D-01 9.5385407362457D-02 7.0418863621911D+00 2.0090450016915D+02 +27 2.6000000000000D-01 1.0229131575736D-01 6.8811232653102D+00 1.9159339586596D+02 +28 2.7000000000000D-01 1.0952456534345D-01 6.6820405929754D+00 1.8295674215480D+02 +29 2.8000000000000D-01 1.1708961711217D-01 6.4505195985793D+00 1.7480842072933D+02 +30 2.9000000000000D-01 1.2499063558360D-01 6.1923598780781D+00 1.6702407498423D+02 +31 3.0000000000000D-01 1.3323143307869D-01 5.9131144931599D+00 1.5952325760871D+02 +32 3.1000000000000D-01 1.4181541481987D-01 5.6179807770264D+00 1.5225631956643D+02 +33 3.2000000000000D-01 1.5074552558204D-01 5.3117332346548D+00 1.4519482800965D+02 +34 3.3000000000000D-01 1.6002419860628D-01 4.9986879098009D+00 1.3832460716877D+02 +35 3.4000000000000D-01 1.6965330746365D-01 4.6826899297222D+00 1.3164072504737D+02 +36 3.5000000000000D-01 1.7963412151556D-01 4.3671177878901D+00 1.2514391975497D+02 +37 3.6000000000000D-01 1.8996726556206D-01 4.0548993873054D+00 1.1883808724791D+02 +38 3.7000000000000D-01 2.0065268420076D-01 3.7485360226064D+00 1.1272854805869D+02 +39 3.8000000000000D-01 2.1168961133861D-01 3.4501313908508D+00 1.0682088238456D+02 +40 3.9000000000000D-01 2.2307654520818D-01 3.1614234384436D+00 1.0112017672322D+02 +41 4.0000000000000D-01 2.3481122914162D-01 2.8838174145934D+00 9.5630565586529D+01 +42 4.1000000000000D-01 2.4689063825147D-01 2.6184189414490D+00 9.0354982062087D+01 +43 4.2000000000000D-01 2.5931097206032D-01 2.3660662527880D+00 8.5295053641977D+01 +44 4.3000000000000D-01 2.7206765301392D-01 2.1273610169615D+00 8.0451096685432D+01 +45 4.4000000000000D-01 2.8515533070630D-01 1.9026973618679D+00 7.5822175544400D+01 +46 4.5000000000000D-01 2.9856789154525D-01 1.6922888729825D+00 7.1406201821057D+01 +47 4.6000000000000D-01 3.1229847349197D-01 1.4961934502627D+00 6.7200056244811D+01 +48 4.7000000000000D-01 3.2633948542482D-01 1.3143359943864D+00 6.3199720855484D+01 +49 4.8000000000000D-01 3.4068263060333D-01 1.1465289538906D+00 5.9400413013007D+01 +50 4.9000000000000D-01 3.5531893364907D-01 9.9249080765173D-01 5.5796715563871D+01 +51 5.0000000000000D-01 3.7023877041393D-01 8.5186258598667D-01 5.2382699538519D+01 +52 5.1000000000000D-01 3.8543190007629D-01 7.2422255179923D-01 4.9152037226366D+01 +53 5.2000000000000D-01 4.0088749879179D-01 6.0909917326976D-01 4.6098104521838D+01 +54 5.3000000000000D-01 4.1659419422729D-01 5.0598252366960D-01 4.3214072166344D+01 +55 5.4000000000000D-01 4.3254010032558D-01 4.1433424359169D-01 4.0492986010420D+01 +56 5.5000000000000D-01 4.4871285168222D-01 3.3359619747231D-01 3.7927836749029D+01 +57 5.6000000000000D-01 4.6509963696499D-01 2.6319795074178D-01 3.5511619788036D+01 +58 5.7000000000000D-01 4.8168723086836D-01 2.0256318697086D-01 3.3237386016333D+01 +59 5.8000000000000D-01 4.9846202416947D-01 1.5111517661774D-01 3.1098284311188D+01 +60 5.9000000000000D-01 5.1541005153570D-01 1.0828140075601D-01 2.9087596613973D+01 +61 6.0000000000000D-01 5.3251701682540D-01 7.3497424892626D-02 2.7198766393402D+01 +62 6.1000000000000D-01 5.4976831571997D-01 4.6210109769846D-02 2.5425421273929D+01 +63 6.2000000000000D-01 5.6714905562515D-01 2.5880238186408D-02 2.3761390556241D+01 +64 6.3000000000000D-01 5.8464407287943D-01 1.1984629314501D-02 2.2200718299214D+01 +65 6.4000000000000D-01 6.0223794740540D-01 4.0178049498161D-03 2.0737672572606D+01 +66 6.5000000000000D-01 6.1991501503317D-01 1.4932655432477D-03 1.9366751432277D+01 +67 6.6000000000000D-01 6.3765937781171D-01 3.9444277697387D-03 1.8082686107441D+01 +68 6.7000000000000D-01 6.5545491270111D-01 1.0925269822014D-02 1.6880441839296D+01 +69 6.8000000000000D-01 6.7328527910551D-01 2.2010725517569D-02 1.5755216757585D+01 +70 6.9000000000000D-01 6.9113392576000D-01 3.6796863667916D-02 1.4702439134604D+01 +71 7.0000000000000D-01 7.0898409752481D-01 5.4900884976862D-02 1.3717763312637D+01 +72 7.1000000000000D-01 7.2681884266456D-01 7.5960964957567D-02 1.2797064563938D+01 +73 7.2000000000000D-01 7.4462102119906D-01 9.9635967958134D-02 1.1936433106333D+01 +74 7.3000000000000D-01 7.6237331490543D-01 1.2560505433977D-01 1.1132167466809D+01 +75 7.4000000000000D-01 7.8005823952730D-01 1.5356720013366D-01 1.0380767358086D+01 +76 7.5000000000000D-01 7.9765815970835D-01 1.8324064607192D-01 9.6789262087610D+00 +77 7.6000000000000D-01 8.1515530711369D-01 2.1436229072287D-01 9.0235234662390D+00 +78 7.7000000000000D-01 8.3253180213518D-01 2.4668704054615D-01 8.4116167729457D+00 +79 7.8000000000000D-01 8.4976967949708D-01 2.7998712796844D-01 7.8404340998508D+00 +80 7.9000000000000D-01 8.6685091798907D-01 3.1405140707679D-01 7.3073659071290D+00 +81 8.0000000000000D-01 8.8375747445486D-01 3.4868463518824D-01 6.8099573893893D+00 +82 8.1000000000000D-01 9.0047132206105D-01 3.8370674737473D-01 6.3459008521986D+00 +83 8.2000000000000D-01 9.1697449276263D-01 4.1895212998184D-01 5.9130282574066D+00 +84 8.3000000000000D-01 9.3324912377277D-01 4.5426889826312D-01 5.5093039668579D+00 +85 8.4000000000000D-01 9.4927750773684D-01 4.8951818244558D-01 5.1328177073036D+00 +86 8.5000000000000D-01 9.6504214620739D-01 5.2457342583394D-01 4.7817777735512D+00 +87 8.6000000000000D-01 9.8052580591938D-01 5.5931969793925D-01 4.4545044819974D+00 +88 8.7000000000000D-01 9.9571157727711D-01 5.9365302507350D-01 4.1494238825519D+00 +89 8.8000000000000D-01 1.0105829343866D+00 6.2747974037487D-01 3.8650617334928D+00 +90 8.9000000000000D-01 1.0251237959030D+00 6.6071585481209D-01 3.6000377409007D+00 +91 9.0000000000000D-01 1.0393185859135D+00 6.9328645035279D-01 3.3530600619186D+00 +92 9.1000000000000D-01 1.0531522940393D+00 7.2512509616389D-01 3.1229200691229D+00 +93 9.2000000000000D-01 1.0666105339275D+00 7.5617328843698D-01 2.9084873716888D+00 +94 9.3000000000000D-01 1.0796795992988D+00 7.8637991419235D-01 2.7087050877576D+00 +95 9.4000000000000D-01 1.0923465167382D+00 8.1570073920832D-01 2.5225853614035D+00 +96 9.5000000000000D-01 1.1045990944469D+00 8.4409792004428D-01 2.3492051168216D+00 +97 9.6000000000000D-01 1.1164259662301D+00 8.7153953997161D-01 2.1877020417771D+00 +98 9.7000000000000D-01 1.1278166300551D+00 8.9799916849715D-01 2.0372707919468D+00 +99 9.8000000000000D-01 1.1387614806018D+00 9.2345544405085D-01 1.8971594075059D+00 +100 9.9000000000000D-01 1.1492518353174D+00 9.4789167931623D-01 1.7666659331573D+00 +101 1.0000000000000D+00 1.1592799535919D+00 9.7129548860496D-01 1.6451352327452D+00 +102 1.0100000000000D+00 1.1688390487863D+00 9.9365843661298D-01 1.5319559896143D+00 +103 1.0200000000000D+00 1.1779232929581D+00 1.0149757078447D+00 1.4265578839628D+00 +104 1.0300000000000D+00 1.1865278142597D+00 1.0352457959525D+00 1.3284089385835D+00 +105 1.0400000000000D+00 1.1946486870984D+00 1.0544702122117D+00 1.2370130245633D+00 +106 1.0500000000000D+00 1.2022829152750D+00 1.0726532123271D+00 1.1519075187324D+00 +107 1.0600000000000D+00 1.2094284084355D+00 1.0898015407623D+00 1.0726611049017D+00 +108 1.0700000000000D+00 1.2160839522772D+00 1.1059241917730D+00 9.9887171117979D-01 +109 1.0800000000000D+00 1.2222491730572D+00 1.1210321863330D+00 9.3016457595147D-01 +110 1.0900000000000D+00 1.2279244970399D+00 1.1351383641469D+00 8.6619043536650D-01 +111 1.1000000000000D+00 1.2331111055987D+00 1.1482571899588D+00 8.0662382548482D-01 +112 1.1100000000000D+00 1.2378108867573D+00 1.1604045733822D+00 7.5116149252829D-01 +113 1.1200000000000D+00 1.2420263840002D+00 1.1715977014995D+00 6.9952090496440D-01 +114 1.1300000000000D+00 1.2457607432169D+00 1.1818548835027D+00 6.5143886146224D-01 +115 1.1400000000000D+00 1.2490176586639D+00 1.1911954066691D+00 6.0667018898850D-01 +116 1.1500000000000D+00 1.2518013188287D+00 1.1996394030007D+00 5.6498652567121D-01 +117 1.1600000000000D+00 1.2541163530613D+00 1.2072077258790D+00 5.2617518327545D-01 +118 1.1700000000000D+00 1.2559677798046D+00 1.2139218361209D+00 4.9003808443124D-01 +119 1.1800000000000D+00 1.2573609572217D+00 1.2198036968430D+00 4.5639076995838D-01 +120 1.1900000000000D+00 1.2583015369389D+00 1.2248756765831D+00 4.2506147196136D-01 +121 1.2000000000000D+00 1.2587954215486D+00 1.2291604601503D+00 3.9589024856789D-01 +122 1.2100000000000D+00 1.2588487264526D+00 1.2326809667011D+00 3.6872817637627D-01 +123 1.2200000000000D+00 1.2584677465139D+00 1.2354602745713D+00 3.4343659695579D-01 +124 1.2300000000000D+00 1.2576589278719D+00 1.2375215524246D+00 3.1988641395184D-01 +125 1.2400000000000D+00 1.2564288451846D+00 1.2388879962952D+00 2.9795743751952D-01 +126 1.2500000000000D+00 1.2547841844703D+00 1.2395827721299D+00 2.7753777298408D-01 +127 1.2600000000000D+00 1.2527317315486D+00 1.2396289634659D+00 2.5852325089666D-01 +128 1.2700000000000D+00 1.2502783660083D+00 1.2390495238968D+00 2.4081689576131D-01 +129 1.2800000000000D+00 1.2474310605593D+00 1.2378672339941D+00 2.2432843082878D-01 +130 1.2900000000000D+00 1.2441968854211D+00 1.2361046623879D+00 2.0897381664948D-01 +131 1.3000000000000D+00 1.2405830173854D+00 1.2337841307205D+00 1.9467482112010D-01 +132 1.3100000000000D+00 1.2365967531075D+00 1.2309276821940D+00 1.8135861886680D-01 +133 1.3200000000000D+00 1.2322455260181D+00 1.2275570534747D+00 1.6895741809352D-01 +134 1.3300000000000D+00 1.2275369262821D+00 1.2236936497111D+00 1.5740811299970D-01 +135 1.3400000000000D+00 1.2224787231213D+00 1.2193585224415D+00 1.4665196001845D-01 +136 1.3500000000000D+00 1.2170788887745D+00 1.2145723501957D+00 1.3663427635616D-01 +137 1.3600000000000D+00 1.2113456233894D+00 1.2093554215853D+00 1.2730415922842D-01 +138 1.3700000000000D+00 1.2052873800605D+00 1.2037276207047D+00 1.1861422442328D-01 +139 1.3800000000000D+00 1.1989128893249D+00 1.1977084146818D+00 1.1052036294290D-01 +140 1.3900000000000D+00 1.1922311823246D+00 1.1913168431994D+00 1.0298151434140D-01 +141 1.4000000000000D+00 1.1852516120009D+00 1.1845715098590D+00 9.5959455774105D-02 +142 1.4100000000000D+00 1.1779838717200D+00 1.1774905752340D+00 8.9418605603945D-02 +143 1.4200000000000D+00 1.1704380109470D+00 1.1700917514811D+00 8.3325840544471D-02 +144 1.4300000000000D+00 1.1626244442639D+00 1.1623922983996D+00 7.7650325517350D-02 +145 1.4400000000000D+00 1.1545539640286D+00 1.1544090208035D+00 7.2363355198960D-02 +146 1.4500000000000D+00 1.1462377370037D+00 1.1461582671186D+00 6.7438206595895D-02 +147 1.4600000000000D+00 1.1376873129650D+00 1.1376559290901D+00 6.2850001802964D-02 +148 1.4700000000000D+00 1.1289145395438D+00 1.1289174425098D+00 5.8575580248221D-02 +149 1.4800000000000D+00 1.1199314546252D+00 1.1199577888813D+00 5.4593379842498D-02 +150 1.4900000000000D+00 1.1107501037159D+00 1.1107914979256D+00 5.0883326286466D-02 +151 1.5000000000000D+00 1.1013823691995D+00 1.1014326508681D+00 4.7426730130892D-02 +152 1.5100000000000D+00 1.0918400034576D+00 1.0918948844166D+00 4.4206190902527D-02 +153 1.5200000000000D+00 1.0821346392289D+00 1.0821913953775D+00 4.1205507923031D-02 +154 1.5300000000000D+00 1.0722778480463D+00 1.0723349458376D+00 3.8409597290598D-02 +155 1.5400000000000D+00 1.0622811430123D+00 1.0623378688551D+00 3.5804414611184D-02 +156 1.5500000000000D+00 1.0521559387428D+00 1.0522120746093D+00 3.3376883117314D-02 +157 1.5600000000000D+00 1.0419134964392D+00 1.0419690569465D+00 3.1114826719394D-02 +158 1.5700000000000D+00 1.0315648754300D+00 1.0316199002919D+00 2.9006907767650D-02 +159 1.5800000000000D+00 1.0211208189133D+00 1.0211752868601D+00 2.7042569048947D-02 +160 1.5900000000000D+00 1.0105916327569D+00 1.0106455041483D+00 2.5211979888454D-02 +161 1.6000000000000D+00 9.9998721544764D-01 1.0000404526491D+00 2.3505985907653D-02 +162 1.6100000000000D+00 9.8931706345051D-01 9.8936965376967D-01 2.1916062336258D-02 +163 1.6200000000000D+00 9.7859030565373D-01 9.7864225790369D-01 2.0434270499202D-02 +164 1.6300000000000D+00 9.6781573933236D-01 9.6786705264410D-01 1.9053217369573D-02 +165 1.6400000000000D+00 9.5700180439750D-01 9.5705247109238D-01 1.7766017882451D-02 +166 1.6500000000000D+00 9.4615658381120D-01 9.4620660025099D-01 1.6566259893558D-02 +167 1.6600000000000D+00 9.3528782455849D-01 9.3533718946478D-01 1.5447971537414D-02 +168 1.6700000000000D+00 9.2440294680964D-01 9.2445165889730D-01 1.4405590868700D-02 +169 1.6800000000000D+00 9.1350904959429D-01 9.1355710801491D-01 1.3433937586834D-02 +170 1.6900000000000D+00 9.0261291948483D-01 9.0266032406553D-01 1.2528186734152D-02 +171 1.7000000000000D+00 8.9172103939195D-01 8.9176779053017D-01 1.1683844199823D-02 +172 1.7100000000000D+00 8.8083959692365D-01 8.8088569553599D-01 1.0896723932949D-02 +173 1.7200000000000D+00 8.6997449271535D-01 8.7001994021213D-01 1.0162926717501D-02 +174 1.7300000000000D+00 8.5913134872568D-01 8.5917614698035D-01 9.4788204311273D-03 +175 1.7400000000000D+00 8.4831551644292D-01 8.4835966776315D-01 8.8410216510738D-03 +176 1.7500000000000D+00 8.3753208500516D-01 8.3757559210532D-01 8.2463785523545D-03 +177 1.7600000000000D+00 8.2678588921714D-01 8.2682875519177D-01 7.6919549638250D-03 +178 1.7700000000000D+00 8.1608151746360D-01 8.1612374576213D-01 7.1750155537339D-03 +179 1.7800000000000D+00 8.0542331950163D-01 8.0546491390422D-01 6.6930120064543D-03 +180 1.7900000000000D+00 7.9481541413702D-01 7.9485637873151D-01 6.2435701904092D-03 +181 1.8000000000000D+00 7.8426169676544D-01 7.8430203592542D-01 5.8244781705239D-03 +182 1.8100000000000D+00 7.7376584678830D-01 7.7380556515205D-01 5.4336750936336D-03 +183 1.8200000000000D+00 7.6333133488259D-01 7.6337043733318D-01 5.0692407925370D-03 +184 1.8300000000000D+00 7.5296143013768D-01 7.5299992178391D-01 4.7293861547632D-03 +185 1.8400000000000D+00 7.4265920704010D-01 7.4269709319842D-01 4.4124441118064D-03 +186 1.8500000000000D+00 7.3242755231741D-01 7.3246483849469D-01 4.1168612859319D-03 +187 1.8600000000000D+00 7.2226917162845D-01 7.2230586350560D-01 3.8411901852048D-03 +188 1.8700000000000D+00 7.1218659610570D-01 7.1222269952213D-01 3.5840819538480D-03 +189 1.8800000000000D+00 7.0218218874464D-01 7.0221770968351D-01 3.3442796140208D-03 +190 1.8900000000000D+00 6.9225815064019D-01 6.9229309521437D-01 3.1206117708685D-03 +191 1.9000000000000D+00 6.8241652707212D-01 6.8245090151091D-01 2.9119867623117D-03 +192 1.9100000000000D+00 6.7265921343433D-01 6.7269302407089D-01 2.7173871907112D-03 +193 1.9200000000000D+00 6.6298796101598D-01 6.6302121427537D-01 2.5358648588009D-03 +194 1.9300000000000D+00 6.5340438262574D-01 6.5343708501367D-01 2.3665360218910D-03 +195 1.9400000000000D+00 6.4390995806946D-01 6.4394211616159D-01 2.2085769962674D-03 +196 1.9500000000000D+00 6.3450603947454D-01 6.3453765990641D-01 2.0612200461177D-03 +197 1.9600000000000D+00 6.2519385646750D-01 6.2522494592499D-01 1.9237495666917D-03 +198 1.9700000000000D+00 6.1597452120412D-01 6.1600508641447D-01 1.7954985262330D-03 +199 1.9800000000000D+00 6.0684903325309D-01 6.0687908097641D-01 1.6758451449970D-03 +200 1.9900000000000D+00 5.9781828433827D-01 5.9784782135958D-01 1.5642098182126D-03 +201 2.0000000000000D+00 5.8888306293670D-01 5.8891209605837D-01 1.4600522284092D-03 +202 2.0100000000000D+00 5.8004405873971D-01 5.8007259477442D-01 1.3628686777490D-03 +203 2.0200000000000D+00 5.7130186697496D-01 5.7132991273907D-01 1.2721895857680D-03 +204 2.0300000000000D+00 5.6265699259458D-01 5.6268455490184D-01 1.1875771676481D-03 +205 2.0400000000000D+00 5.5410985433082D-01 5.5413693998657D-01 1.1086232722356D-03 +206 2.0500000000000D+00 5.4566078862097D-01 5.4568740441666D-01 1.0349473578467D-03 +207 2.0600000000000D+00 5.3731005340608D-01 5.3733620611411D-01 9.6619462392875D-04 +208 2.0700000000000D+00 5.2905783180358D-01 5.2908352817254D-01 9.0203425125241D-04 +209 2.0800000000000D+00 5.2090423565852D-01 5.2092948240873D-01 8.4215777691960D-04 +210 2.0900000000000D+00 5.1284930897504D-01 5.1287411279435D-01 7.8627757486658D-04 +211 2.1000000000000D+00 5.0489303123075D-01 5.0491739877071D-01 7.3412543623055D-04 +212 2.1100000000000D+00 4.9703532057732D-01 4.9705925844954D-01 6.8545125844421D-04 +213 2.1200000000000D+00 4.8927603692938D-01 4.8929955170223D-01 6.4002180878069D-04 +214 2.1300000000000D+00 4.8161498494468D-01 4.8163808314017D-01 5.9761958442348D-04 +215 2.1400000000000D+00 4.7405191689832D-01 4.7407460498925D-01 5.5804174527923D-04 +216 2.1500000000000D+00 4.6658653545372D-01 4.6660881986108D-01 5.2109911628245D-04 +217 2.1600000000000D+00 4.5921849633245D-01 4.5924038342299D-01 4.8661526799104D-04 +218 2.1700000000000D+00 4.5194741088691D-01 4.5196890697090D-01 4.5442564700621D-04 +219 2.1800000000000D+00 4.4477284857688D-01 4.4479395990613D-01 4.2437677490606D-04 +220 2.1900000000000D+00 4.3769433935365D-01 4.3771507211963D-01 3.9632549950506D-04 +221 2.2000000000000D+00 4.3071137595446D-01 4.3073173628666D-01 3.7013829259953D-04 +222 2.2100000000000D+00 4.2382341610824D-01 4.2384341007263D-01 3.4569060389766D-04 +223 2.2200000000000D+00 4.1702988465761D-01 4.1704951825529D-01 3.2286625070663D-04 +224 2.2300000000000D+00 4.1033017559760D-01 4.1034945476364D-01 3.0155685274635D-04 +225 2.2400000000000D+00 4.0372365403384D-01 4.0374258463612D-01 2.8166130796766D-04 +226 2.2500000000000D+00 3.9720965806443D-01 3.9722824590275D-01 2.6308529734222D-04 +227 2.2600000000000D+00 3.9078750058485D-01 3.9080575139011D-01 2.4574082973755D-04 +228 2.2700000000000D+00 3.8445647102075D-01 3.8447439045423D-01 2.2954581475160D-04 +229 2.2800000000000D+00 3.7821583699053D-01 3.7823343064325D-01 2.1442366268545D-04 +230 2.2900000000000D+00 3.7206484589742D-01 3.7208211928973D-01 2.0030291714474D-04 +231 2.3000000000000D+00 3.6600272645761D-01 3.6601968503870D-01 1.8711690667920D-04 +232 2.3100000000000D+00 3.6002869016307D-01 3.6004533931072D-01 1.7480342241297D-04 +233 2.3200000000000D+00 3.5414193268132D-01 3.5415827770163D-01 1.6330442007396D-04 +234 2.3300000000000D+00 3.4834163519744D-01 3.4835768132471D-01 1.5256573689111D-04 +235 2.3400000000000D+00 3.4262696569604D-01 3.4264271809269D-01 1.4253683177402D-04 +236 2.3500000000000D+00 3.3699708018737D-01 3.3701254394395D-01 1.3317054257389D-04 +237 2.3600000000000D+00 3.3145112388093D-01 3.3146630401618D-01 1.2442285703068D-04 +238 2.3700000000000D+00 3.2598823230487D-01 3.2600313376581D-01 1.1625270282943D-04 +239 2.3800000000000D+00 3.2060753237557D-01 3.2062216003764D-01 1.0862174982503D-04 +240 2.3900000000000D+00 3.1530814341896D-01 3.1532250208627D-01 1.0149422476232D-04 +241 2.4000000000000D+00 3.1008917814189D-01 3.1010327254758D-01 9.4836741541156D-05 +242 2.4100000000000D+00 3.0494974356192D-01 3.0496357836851D-01 8.8618140039516D-05 +243 2.4200000000000D+00 2.9988894189244D-01 2.9990252169224D-01 8.2809336231546D-05 +244 2.4300000000000D+00 2.9490587138411D-01 2.9491920069952D-01 7.7383184881507D-05 +245 2.4400000000000D+00 2.8999962712725D-01 2.9001271041126D-01 7.2314348195495D-05 +246 2.4500000000000D+00 2.8516930181473D-01 2.8518214345134D-01 6.7579174549882D-05 +247 2.4600000000000D+00 2.8041398646442D-01 2.8042659076921D-01 6.3155587329800D-05 +248 2.4700000000000D+00 2.7573277110984D-01 2.7574514233052D-01 5.9022977911410D-05 +249 2.4800000000000D+00 2.7112474545344D-01 2.7113688777040D-01 5.5162107618090D-05 +250 2.4900000000000D+00 2.6658899948485D-01 2.6660091701176D-01 5.1555017394927D-05 +251 2.5000000000000D+00 2.6212462407014D-01 2.6213632085457D-01 4.8184940940830D-05 +252 2.5100000000000D+00 2.5773071150798D-01 2.5774219153203D-01 4.5036225203196D-05 +253 2.5200000000000D+00 2.5340635605459D-01 2.5341762323557D-01 4.2094257060796D-05 +254 2.5300000000000D+00 2.4915065442323D-01 2.4916171261429D-01 3.9345392769928D-05 +255 2.5400000000000D+00 2.4496270625407D-01 2.4497355924494D-01 3.6776893433633D-05 +256 2.5500000000000D+00 2.4084161455625D-01 2.4085226607392D-01 3.4376865543746D-05 +257 2.5600000000000D+00 2.3678648612778D-01 2.3679693983717D-01 3.2134203633295D-05 +258 2.5700000000000D+00 2.3279643194901D-01 2.3280669145377D-01 3.0038537844656D-05 +259 2.5800000000000D+00 2.2887056755124D-01 2.2888063639441D-01 2.8080185769511D-05 +260 2.5900000000000D+00 2.2500801336616D-01 2.2501789503096D-01 2.6250105793411D-05 +261 2.6000000000000D+00 2.2120789505207D-01 2.2121759296264D-01 2.4539854442876D-05 +262 2.6100000000000D+00 2.1746934379738D-01 2.1747886131949D-01 2.2941547435068D-05 +263 2.6200000000000D+00 2.1379149660815D-01 2.1380083705000D-01 2.1447821662235D-05 +264 2.6300000000000D+00 2.1017349657476D-01 2.1018266318771D-01 2.0051800553498D-05 +265 2.6400000000000D+00 2.0661449311858D-01 2.0662348909794D-01 1.8747062413512D-05 +266 2.6500000000000D+00 2.0311364222458D-01 2.0312247071036D-01 1.7527609618938D-05 +267 2.6600000000000D+00 1.9967010665596D-01 1.9967877073362D-01 1.6387840396156D-05 +268 2.6700000000000D+00 1.9628305615105D-01 1.9629155885229D-01 1.5322523038678D-05 +269 2.6800000000000D+00 1.9295166760757D-01 1.9296001191106D-01 1.4326771029338D-05 +270 2.6900000000000D+00 1.8967512525170D-01 1.8968331408389D-01 1.3396019995956D-05 +271 2.7000000000000D+00 1.8645262079174D-01 1.8646065702757D-01 1.2526006676211D-05 +272 2.7100000000000D+00 1.8328335355976D-01 1.8329124002343D-01 1.1712748890104D-05 +273 2.7200000000000D+00 1.8016653064114D-01 1.8017427010690D-01 1.0952526688406D-05 +274 2.7300000000000D+00 1.7710136699057D-01 1.7710896218342D-01 1.0241865150850D-05 +275 2.7400000000000D+00 1.7408708553647D-01 1.7409453913294D-01 9.5775183221438D-06 +276 2.7500000000000D+00 1.7112291727625D-01 1.7113023190514D-01 8.9564537630245D-06 +277 2.7600000000000D+00 1.6820810135970D-01 1.6821527960279D-01 8.3758384479713D-06 +278 2.7700000000000D+00 1.6534188516100D-01 1.6534892955383D-01 7.8330259279022D-06 +279 2.7800000000000D+00 1.6252352434439D-01 1.6253043737693D-01 7.3255436302194D-06 +280 2.7900000000000D+00 1.5975228291900D-01 1.5975906703643D-01 6.8510813803640D-06 +281 2.8000000000000D+00 1.5702743328384D-01 1.5703409088720D-01 6.4074809536919D-06 +282 2.8100000000000D+00 1.5434825626690D-01 1.5435478971386D-01 5.9927258368644D-06 +283 2.8200000000000D+00 1.5171404115578D-01 1.5172045276130D-01 5.6049318214228D-06 +284 2.8300000000000D+00 1.4912408571990D-01 1.4913037775694D-01 5.2423384006181D-06 +285 2.8400000000000D+00 1.4657769622619D-01 1.4658387092640D-01 4.9033006463852D-06 +286 2.8500000000000D+00 1.4407418744926D-01 1.4408024700364D-01 4.5862814412057D-06 +287 2.8600000000000D+00 1.4161288267425D-01 1.4161882923387D-01 4.2898443738982D-06 +288 2.8700000000000D+00 1.3919311369244D-01 1.3919894936905D-01 4.0126473337325D-06 +289 2.8800000000000D+00 1.3681422079405D-01 1.3681994766077D-01 3.7534360638903D-06 +290 2.8900000000000D+00 1.3447555275415D-01 1.3448117284613D-01 3.5110383935607D-06 +291 2.9000000000000D+00 1.3217646681270D-01 1.3218198212771D-01 3.2843589721130D-06 +292 2.9100000000000D+00 1.2991632865116D-01 1.2992174115030D-01 3.0723741482414D-06 +293 2.9200000000000D+00 1.2769451236460D-01 1.2769982397284D-01 2.8741271976618D-06 +294 2.9300000000000D+00 1.2551040042895D-01 1.2551561303582D-01 2.6887239435009D-06 +295 2.9400000000000D+00 1.2336338366345D-01 1.2336849912361D-01 2.5153287675624D-06 +296 2.9500000000000D+00 1.2125286119166D-01 1.2125788132554D-01 2.3531606171667D-06 +297 2.9600000000000D+00 1.1917824039765D-01 1.1918316699202D-01 2.2014894278823D-06 +298 2.9700000000000D+00 1.1713893687806D-01 1.1714377168659D-01 2.0596328826698D-06 +299 2.9800000000000D+00 1.1513437439243D-01 1.1513911913633D-01 1.9269532172424D-06 +300 2.9900000000000D+00 1.1316398481048D-01 1.1316864117902D-01 1.8028542664360D-06 +301 3.0000000000000D+00 1.1122720805632D-01 1.1123177770740D-01 1.6867787405066D-06 +302 3.0100000000000D+00 1.0932349204921D-01 1.0932797660992D-01 1.5782057765498D-06 +303 3.0200000000000D+00 1.0745229264416D-01 1.0745669371133D-01 1.4766484390989D-06 +304 3.0300000000000D+00 1.0561307356915D-01 1.0561739270987D-01 1.3816515074364D-06 +305 3.0400000000000D+00 1.0380530635973D-01 1.0380954511190D-01 1.2927894551604D-06 +306 3.0500000000000D+00 1.0202847029266D-01 1.0203263016550D-01 1.2096644932279D-06 +307 3.0600000000000D+00 1.0028205231803D-01 1.0028613479259D-01 1.1319047181601D-06 +308 3.0700000000000D+00 9.8565546989567D-02 9.8569553519237D-02 1.0591624067446D-06 +309 3.0800000000000D+00 9.6878456392249D-02 9.6882388403253D-02 9.9111252779288D-07 +310 3.0900000000000D+00 9.5220290070803D-02 9.5224148962694D-02 9.2745117411243D-07 +311 3.1000000000000D+00 9.3590564955844D-02 9.3594352101980D-02 8.6789419155840D-07 +312 3.1100000000000D+00 9.1988805288950D-02 9.1992522036972D-02 8.1217589672256D-07 +313 3.1200000000000D+00 9.0414542546343D-02 9.0418190218641D-02 7.6004791217109D-07 +314 3.1300000000000D+00 8.8867315363075D-02 8.8870895257243D-02 7.1127797999234D-07 +315 3.1400000000000D+00 8.7346669455599D-02 8.7350182844891D-02 6.6564891427243D-07 +316 3.1500000000000D+00 8.5852157543273D-02 8.5855605677045D-02 6.2295764940828D-07 +317 3.1600000000000D+00 8.4383339269868D-02 8.4386723374017D-02 5.8301431399484D-07 +318 3.1700000000000D+00 8.2939781124870D-02 8.2943102402258D-02 5.4564134734933D-07 +319 3.1800000000000D+00 8.1521056364094D-02 8.1524315994976D-02 5.1067269241446D-07 +320 3.1900000000000D+00 8.0126744929154D-02 8.0129944071591D-02 4.7795309050543D-07 +321 3.2000000000000D+00 7.8756433368007D-02 7.8759573158273D-02 4.4733734536561D-07 +322 3.2100000000000D+00 7.7409714754758D-02 7.7412796307746D-02 4.1868966645647D-07 +323 3.2200000000000D+00 7.6086188609526D-02 7.6089213019136D-02 3.9188304675442D-07 +324 3.2300000000000D+00 7.4785460817163D-02 7.4788429156695D-02 3.6679873948000D-07 +325 3.2400000000000D+00 7.3507143547775D-02 7.3510056870307D-02 3.4332567493226D-07 +326 3.2500000000000D+00 7.2250855176230D-02 7.2253714514994D-02 3.2135997060414D-07 +327 3.2600000000000D+00 7.1016220202059D-02 7.1019026570810D-02 3.0080445964795D-07 +328 3.2700000000000D+00 6.9802869168799D-02 6.9805623562175D-02 2.8156828561713D-07 +329 3.2800000000000D+00 6.8610438584906D-02 6.8613141978782D-02 2.6356645848374D-07 +330 3.2900000000000D+00 6.7438570844058D-02 6.7441224195900D-02 2.4671948037898D-07 +331 3.3000000000000D+00 6.6286914145885D-02 6.6289518395089D-02 2.3095298975447D-07 +332 3.3100000000000D+00 6.5155122416630D-02 6.5157678484858D-02 2.1619744715221D-07 +333 3.3200000000000D+00 6.4042855231169D-02 6.4045364022686D-02 2.0238779804181D-07 +334 3.3300000000000D+00 6.2949777734786D-02 6.2952240136778D-02 1.8946318630273D-07 +335 3.3400000000000D+00 6.1875560565408D-02 6.1877977448306D-02 1.7736668461610D-07 +336 3.3500000000000D+00 6.0819879776078D-02 6.0822251993871D-02 1.6604505257694D-07 +337 3.3600000000000D+00 5.9782416758707D-02 5.9784745149248D-02 1.5544847949032D-07 +338 3.3700000000000D+00 5.8762858167792D-02 5.8765143553102D-02 1.4553036542711D-07 +339 3.3800000000000D+00 5.7760895844710D-02 5.7763139031276D-02 1.3624711565554D-07 +340 3.3900000000000D+00 5.6776226742376D-02 5.6778428521440D-02 1.2755795628418D-07 +341 3.4000000000000D+00 5.5808552851184D-02 5.5810713999033D-02 1.1942473680865D-07 +342 3.4100000000000D+00 5.4857581125062D-02 5.4859702403306D-02 1.1181176325627D-07 +343 3.4200000000000D+00 5.3923023408212D-02 5.3925105564063D-02 1.0468564017820D-07 +344 3.4300000000000D+00 5.3004596362242D-02 5.3006640128783D-02 9.8015131952382D-08 +345 3.4400000000000D+00 5.2102021394645D-02 5.2104027491096D-02 9.1771009993909D-08 +346 3.4500000000000D+00 5.1215024587465D-02 5.1216993719447D-02 8.5925926056314D-08 +347 3.4600000000000D+00 5.0343336626778D-02 5.0345269486567D-02 8.0454289592801D-08 +348 3.4700000000000D+00 4.9486692732499D-02 4.9488589999279D-02 7.5332165131659D-08 +349 3.4800000000000D+00 4.8644832589652D-02 4.8646694929761D-02 7.0537152964526D-08 +350 3.4900000000000D+00 4.7817500279836D-02 4.7819328347011D-02 6.6048293377893D-08 +351 3.5000000000000D+00 4.7004444213654D-02 4.7006238649267D-02 6.1845970407931D-08 +352 3.5100000000000D+00 4.6205417063333D-02 4.6207178496625D-02 5.7911837493445D-08 +353 3.5200000000000D+00 4.5420175696945D-02 4.5421904745258D-02 5.4228723407896D-08 +354 3.5300000000000D+00 4.4648481112836D-02 4.4650178381836D-02 5.0780559722294D-08 +355 3.5400000000000D+00 4.3890098375006D-02 4.3891764458903D-02 4.7552307085561D-08 +356 3.5500000000000D+00 4.3144796548850D-02 4.3146432030616D-02 4.4529897390094D-08 +357 3.5600000000000D+00 4.2412348638227D-02 4.2413954089811D-02 4.1700164319385D-08 +358 3.5700000000000D+00 4.1692531523009D-02 4.1694107505544D-02 3.9050785782103D-08 +359 3.5800000000000D+00 4.0985125897461D-02 4.0986672961469D-02 3.6570228456469D-08 +360 3.5900000000000D+00 4.0289916209168D-02 4.0291434894761D-02 3.4247701319320D-08 +361 3.6000000000000D+00 3.9606690598970D-02 3.9608181436048D-02 3.2073106350327D-08 +362 3.6100000000000D+00 3.8935240841675D-02 3.8936704350122D-02 3.0036991766774D-08 +363 3.6200000000000D+00 3.8275362287446D-02 3.8276798977314D-02 2.8130510738747D-08 +364 3.6300000000000D+00 3.7626853803920D-02 3.7628264175623D-02 2.6345383318429D-08 +365 3.6400000000000D+00 3.6989517719025D-02 3.6990902263517D-02 2.4673862791005D-08 +366 3.6500000000000D+00 3.6363159764832D-02 3.6364518963790D-02 2.3108697138915D-08 +367 3.6600000000000D+00 3.5747589021944D-02 3.5748923347940D-02 2.1643098564833D-08 +368 3.6700000000000D+00 3.5142617864745D-02 3.5143927781423D-02 2.0270712062805D-08 +369 3.6800000000000D+00 3.4548061907130D-02 3.4549347869373D-02 1.8985593071648D-08 +370 3.6900000000000D+00 3.3963739949405D-02 3.3965002403505D-02 1.7782175975787D-08 +371 3.7000000000000D+00 3.3389473925674D-02 3.3390713309492D-02 1.6655251040940D-08 +372 3.7100000000000D+00 3.2825088852044D-02 3.2826305595170D-02 1.5599940806122D-08 +373 3.7200000000000D+00 3.2270412775441D-02 3.2271607299355D-02 1.4611680910822D-08 +374 3.7300000000000D+00 3.1725276723283D-02 3.1726449441505D-02 1.3686199400705D-08 +375 3.7400000000000D+00 3.1189514653893D-02 3.1190665972136D-02 1.2819496714977D-08 +376 3.7500000000000D+00 3.0662963407567D-02 3.0664093723888D-02 1.2007828609807D-08 +377 3.7600000000000D+00 3.0145462658387D-02 3.0146572363329D-02 1.1247689354455D-08 +378 3.7700000000000D+00 2.9636854866623D-02 2.9637944343359D-02 1.0535799193939D-08 +379 3.7800000000000D+00 2.9136985232055D-02 2.9138054856529D-02 9.8690868653686D-09 +380 3.7900000000000D+00 2.8645701647851D-02 2.8646751788916D-02 9.2446771031400D-09 +381 3.8000000000000D+00 2.8162854655176D-02 2.8163885674727D-02 8.6598775111730D-09 +382 3.8100000000000D+00 2.7688297398416D-02 2.7689309651523D-02 8.1121684523016D-09 +383 3.8200000000000D+00 2.7221885581158D-02 2.7222879416198D-02 7.5991912638741D-09 +384 3.8300000000000D+00 2.6763477422841D-02 2.6764453181622D-02 7.1187373613809D-09 +385 3.8400000000000D+00 2.6312933616031D-02 2.6313891633920D-02 6.6687388810958D-09 +386 3.8500000000000D+00 2.5870117284386D-02 2.5871057890430D-02 6.2472592358888D-09 +387 3.8600000000000D+00 2.5434893941188D-02 2.5435817458234D-02 5.8524867125576D-09 +388 3.8700000000000D+00 2.5007131448649D-02 2.5008038193464D-02 5.4827244240492D-09 +389 3.8800000000000D+00 2.4586699977765D-02 2.4587590261148D-02 5.1363835549489D-09 +390 3.8900000000000D+00 2.4173471968826D-02 2.4174346095725D-02 4.8119761747615D-09 +391 3.9000000000000D+00 2.3767322092528D-02 2.3768180362150D-02 4.5081094157339D-09 +392 3.9100000000000D+00 2.3368127211712D-02 2.3368969917634D-02 4.2234795362718D-09 +393 3.9200000000000D+00 2.2975766343725D-02 2.2976593773998D-02 3.9568654760767D-09 +394 3.9300000000000D+00 2.2590120623360D-02 2.2590933060614D-02 3.7071238554149D-09 +395 3.9400000000000D+00 2.2211073266393D-02 2.2211870987945D-02 3.4731836487585D-09 +396 3.9500000000000D+00 2.1838509533707D-02 2.1839292811658D-02 3.2540427131516D-09 +397 3.9600000000000D+00 2.1472316695996D-02 2.1473085797329D-02 3.0487624968863D-09 +398 3.9700000000000D+00 2.1112383999031D-02 2.1113139185713D-02 2.8564640265325D-09 +399 3.9800000000000D+00 2.0758602629502D-02 2.0759344158576D-02 2.6763241516507D-09 +400 3.9900000000000D+00 2.0410865681396D-02 2.0411593805075D-02 2.5075717793810D-09 +401 4.0000000000000D+00 2.0069068122963D-02 2.0069783088723D-02 2.3494855263605D-09 +402 4.0100000000000D+00 1.9733106764167D-02 1.9733808814836D-02 2.2013895332255D-09 +403 4.0200000000000D+00 1.9402880224714D-02 1.9403569598561D-02 2.0626508572540D-09 +404 4.0300000000000D+00 1.9078288902578D-02 1.9078965833400D-02 1.9326766429674D-09 +405 4.0400000000000D+00 1.8759234943077D-02 1.8759899660283D-02 1.8109116839621D-09 +406 4.0500000000000D+00 1.8445622208456D-02 1.8446274937149D-02 1.6968363807463D-09 +407 4.0600000000000D+00 1.8137356247933D-02 1.8137997208998D-02 1.5899639224377D-09 +408 4.0700000000000D+00 1.7834344268291D-02 1.7834973678467D-02 1.4898383782938D-09 +409 4.0800000000000D+00 1.7536495104924D-02 1.7537113176889D-02 1.3960326200423D-09 +410 4.0900000000000D+00 1.7243719193416D-02 1.7244326135859D-02 1.3081467423618D-09 +411 4.1000000000000D+00 1.6955928541567D-02 1.6956524559271D-02 1.2258063656250D-09 +412 4.1100000000000D+00 1.6673036701865D-02 1.6673621995772D-02 1.1486607323427D-09 +413 4.1200000000000D+00 1.6394958744448D-02 1.6395533511740D-02 1.0763813124636D-09 +414 4.1300000000000D+00 1.6121611230510D-02 1.6122175664676D-02 1.0086602831091D-09 +415 4.1400000000000D+00 1.5852912186204D-02 1.5853466477111D-02 9.4520949336013D-10 +416 4.1500000000000D+00 1.5588781076939D-02 1.5589325410900D-02 8.8575911497622D-10 +417 4.1600000000000D+00 1.5329138782091D-02 1.5329673341936D-02 8.3005633906239D-10 +418 4.1700000000000D+00 1.5073907570195D-02 1.5074432535332D-02 7.7786436153775D-10 +419 4.1800000000000D+00 1.4823011074512D-02 1.4823526620995D-02 7.2896127599824D-10 +420 4.1900000000000D+00 1.4576374269108D-02 1.4576880569701D-02 6.8313937693388D-10 +421 4.2000000000000D+00 1.4333923445240D-02 1.4334420669476D-02 6.4020413481833D-10 +422 4.2100000000000D+00 1.4095586188161D-02 1.4096074502408D-02 5.9997328073481D-10 +423 4.2200000000000D+00 1.3861291354357D-02 1.3861770921876D-02 5.6227607387586D-10 +424 4.2300000000000D+00 1.3630969049138D-02 1.3631440030140D-02 5.2695250025077D-10 +425 4.2400000000000D+00 1.3404550604700D-02 1.3405013156406D-02 4.9385278226922D-10 +426 4.2500000000000D+00 1.3181968558477D-02 1.3182422835173D-02 4.6283663917797D-10 +427 4.2600000000000D+00 1.2963156631862D-02 1.2963602784957D-02 4.3377261993898D-10 +428 4.2700000000000D+00 1.2748049709343D-02 1.2748487887421D-02 4.0653757981659D-10 +429 4.2800000000000D+00 1.2536583817954D-02 1.2537014166830D-02 3.8101610513352D-10 +430 4.2900000000000D+00 1.2328696107181D-02 1.2329118769951D-02 3.5710014633095D-10 +431 4.3000000000000D+00 1.2124324829123D-02 1.2124739946217D-02 3.3468851824236D-10 +432 4.3100000000000D+00 1.1923409318983D-02 1.1923817028214D-02 3.1368639146951D-10 +433 4.3200000000000D+00 1.1725889975956D-02 1.1726290412571D-02 2.9400492343865D-10 +434 4.3300000000000D+00 1.1531708244405D-02 1.1532101541133D-02 2.7556084982521D-10 +435 4.3400000000000D+00 1.1340806595440D-02 1.1341192882540D-02 2.5827619055886D-10 +436 4.3500000000000D+00 1.1153128508780D-02 1.1153507914087D-02 2.4207794373715D-10 +437 4.3600000000000D+00 1.0968618454859D-02 1.0968991103830D-02 2.2689767942691D-10 +438 4.3700000000000D+00 1.0787221877328D-02 1.0787587893087D-02 2.1267128410256D-10 +439 4.3800000000000D+00 1.0608885175829D-02 1.0609244679212D-02 1.9933867447778D-10 +440 4.3900000000000D+00 1.0433555689090D-02 1.0433908798686D-02 1.8684354707482D-10 +441 4.4000000000000D+00 1.0261181678388D-02 1.0261528510584D-02 1.7513322213095D-10 +442 4.4100000000000D+00 1.0091712311117D-02 1.0092052980138D-02 1.6415830610612D-10 +443 4.4200000000000D+00 9.9250976447852D-03 9.9254322627359D-03 1.5387251849949D-10 +444 4.4300000000000D+00 9.7612886112592D-03 9.7616172881630D-03 1.4423249491266D-10 +445 4.4400000000000D+00 9.6002370012341D-03 9.6005598450731D-03 1.3519756491382D-10 +446 4.4500000000000D+00 9.4418954492012D-03 9.4422125659548D-03 1.2672970563749D-10 +447 4.4600000000000D+00 9.2862174183382D-03 9.2865289120203D-03 1.1879325463322D-10 +448 4.4700000000000D+00 9.1331571858848D-03 9.1334631585813D-03 1.1135479523600D-10 +449 4.4800000000000D+00 8.9826698287272D-03 8.9829703806323D-03 1.0438301456986D-10 +450 4.4900000000000D+00 8.8347112091998D-03 8.8350064386515D-03 9.7848550367215D-11 +451 4.5000000000000D+00 8.6892379612819D-03 8.6895279647972D-03 9.1723924378319D-11 +452 4.5100000000000D+00 8.5462074768679D-03 8.5464923491768D-03 8.5983390808651D-11 +453 4.5200000000000D+00 8.4055778923215D-03 8.4058577264009D-03 8.0602814959263D-11 +454 4.5300000000000D+00 8.2673080753079D-03 8.2675829624146D-03 7.5559580347749D-11 +455 4.5400000000000D+00 8.1313576118241D-03 8.1316276415270D-03 7.0832485902133D-11 +456 4.5500000000000D+00 7.9976867934954D-03 7.9979520537074D-03 6.6401663453771D-11 +457 4.5600000000000D+00 7.8662566051528D-03 7.8665171821619D-03 6.2248523438483D-11 +458 4.5700000000000D+00 7.7370287124434D-03 7.7372846909435D-03 5.8355630460412D-11 +459 4.5800000000000D+00 7.6099654498120D-03 7.6102169129324D-03 5.4706645097667D-11 +460 4.5900000000000D+00 7.4850298086580D-03 7.4852768379932D-03 5.1286254740430D-11 +461 4.6000000000000D+00 7.3621854256526D-03 7.3624281012911D-03 4.8080094206160D-11 +462 4.6100000000000D+00 7.2413965714694D-03 7.2416349720218D-03 4.5074731124488D-11 +463 4.6200000000000D+00 7.1226281394254D-03 7.1228623420524D-03 4.2257569167787D-11 +464 4.6300000000000D+00 7.0058456344783D-03 7.0060757149177D-03 3.9616800907313D-11 +465 4.6400000000000D+00 6.8910151624075D-03 6.8912411950011D-03 3.7141360356465D-11 +466 4.6500000000000D+00 6.7781034191584D-03 6.7783254768782D-03 3.4820871639232D-11 +467 4.6600000000000D+00 6.6670776804277D-03 6.6672958349014D-03 3.2645611904073D-11 +468 4.6700000000000D+00 6.5579057914642D-03 6.5581201130005D-03 3.0606483510077D-11 +469 4.6800000000000D+00 6.4505561568841D-03 6.4507667144977D-03 2.8694951937945D-11 +470 4.6900000000000D+00 6.3449977308127D-03 6.3452045922482D-03 2.6903018221693D-11 +471 4.7000000000000D+00 6.2412000071638D-03 6.2414032389196D-03 2.5223185206514D-11 +472 4.7100000000000D+00 6.1391330100457D-03 6.1393326773977D-03 2.3648418379360D-11 +473 4.7200000000000D+00 6.0387672845237D-03 6.0389634515474D-03 2.2172138995056D-11 +474 4.7300000000000D+00 5.9400738873036D-03 5.9402666168976D-03 2.0788179047018D-11 +475 4.7400000000000D+00 5.8430243776867D-03 5.8432137315939D-03 1.9490755196536D-11 +476 4.7500000000000D+00 5.7475908086986D-03 5.7477768475281D-03 1.8274446663157D-11 +477 4.7600000000000D+00 5.6537457183559D-03 5.6539285016045D-03 1.7134171444624D-11 +478 4.7700000000000D+00 5.5614621210707D-03 5.5616417071434D-03 1.6065161769223D-11 +479 4.7800000000000D+00 5.4707134993794D-03 5.4708899456097D-03 1.5062961933764D-11 +480 4.7900000000000D+00 5.3814737955128D-03 5.3816471581830D-03 1.4123389556855D-11 +481 4.8000000000000D+00 5.2937174033285D-03 5.2938877376895D-03 1.3242524295219D-11 +482 4.8100000000000D+00 5.2074191603371D-03 5.2075865206271D-03 1.2416691344957D-11 +483 4.8200000000000D+00 5.1225543398447D-03 5.1227187793085D-03 1.1642443659986D-11 +484 4.8300000000000D+00 5.0390986433101D-03 5.0392602142177D-03 1.0916551958532D-11 +485 4.8400000000000D+00 4.9570281928232D-03 4.9571869464879D-03 1.0235994186892D-11 +486 4.8500000000000D+00 4.8763195235950D-03 4.8764755103911D-03 9.5979344968577D-12 +487 4.8600000000000D+00 4.7969495767056D-03 4.7971028460861D-03 8.9997145486156D-12 +488 4.8700000000000D+00 4.7188956919475D-03 4.7190462924614D-03 8.4388423525105D-12 +489 4.8800000000000D+00 4.6421356007587D-03 4.6422835800674D-03 7.9129791684423D-12 +490 4.8900000000000D+00 4.5666474194232D-03 4.5667928243176D-03 7.4199369028999D-12 +491 4.9000000000000D+00 4.4924096422383D-03 4.4925525186547D-03 6.9576652510778D-12 +492 4.9100000000000D+00 4.4194011348218D-03 4.4195415278577D-03 6.5242407676926D-12 +493 4.9200000000000D+00 4.3476011275935D-03 4.3477390815235D-03 6.1178602972611D-12 +494 4.9300000000000D+00 4.2769892093525D-03 4.2771247676437D-03 5.7368334235090D-12 +495 4.9400000000000D+00 4.2075453209225D-03 4.2076785262490D-03 5.3795729757964D-12 +496 4.9500000000000D+00 4.1392497490968D-03 4.1393806433550D-03 5.0445956629898D-12 +497 4.9600000000000D+00 4.0720831204424D-03 4.0722117447652D-03 4.7305101233984D-12 +498 4.9700000000000D+00 4.0060263953287D-03 4.0061527900997D-03 4.4360113596307D-12 +499 4.9800000000000D+00 3.9410608620708D-03 3.9411850669384D-03 4.1598759173862D-12 +500 4.9900000000000D+00 3.8771681311646D-03 3.8772901850554D-03 3.9009567731543D-12 +501 5.0000000000000D+00 3.8143301295747D-03 3.8144500707071D-03 3.6581765777751D-12 +502 5.0100000000000D+00 3.7525290953326D-03 3.7526469612298D-03 3.4305292855133D-12 +503 5.0200000000000D+00 3.6917475719347D-03 3.6918633994379D-03 3.2170705240847D-12 +504 5.0300000000000D+00 3.6319684030043D-03 3.6320822282850D-03 3.0169146313060D-12 +505 5.0400000000000D+00 3.5731747270307D-03 3.5732865856033D-03 2.8292312402733D-12 +506 5.0500000000000D+00 3.5153499721958D-03 3.5154598989297D-03 2.6532418159114D-12 +507 5.0600000000000D+00 3.4584778512416D-03 3.4585858803732D-03 2.4882149443624D-12 +508 5.0700000000000D+00 3.4025423566376D-03 3.4026485217823D-03 2.3334678591986D-12 +509 5.0800000000000D+00 3.3475277555374D-03 3.3476320897005D-03 2.1883594919092D-12 +510 5.0900000000000D+00 3.2934185849916D-03 3.2935211205801D-03 2.0522885979616D-12 +511 5.1000000000000D+00 3.2401996472259D-03 3.2403004160595D-03 1.9246914410861D-12 +512 5.1100000000000D+00 3.1878560049974D-03 3.1879550383192D-03 1.8050394454581D-12 +513 5.1200000000000D+00 3.1363729769864D-03 3.1364703054736D-03 1.6928359924164D-12 +514 5.1300000000000D+00 3.0857361334573D-03 3.0858317872319D-03 1.5876173936429D-12 +515 5.1400000000000D+00 3.0359312917419D-03 3.0360253003806D-03 1.4889484381580D-12 +516 5.1500000000000D+00 2.9869445119294D-03 2.9870369044740D-03 1.3964208489522D-12 +517 5.1600000000000D+00 2.9387620926325D-03 2.9388528975996D-03 1.3096517997944D-12 +518 5.1700000000000D+00 2.8913705668175D-03 2.8914598122083D-03 1.2282823227006D-12 +519 5.1800000000000D+00 2.8447566976716D-03 2.8448444109813D-03 1.1519751992410D-12 +520 5.1900000000000D+00 2.7989074746878D-03 2.7989936829150D-03 1.0804152773666D-12 +521 5.2000000000000D+00 2.7538101096476D-03 2.7538948393035D-03 1.0133070921524D-12 +522 5.2100000000000D+00 2.7094520327222D-03 2.7095353098396D-03 9.5037332698803D-13 +523 5.2200000000000D+00 2.6658208886784D-03 2.6659027388205D-03 8.9135393992162D-13 +524 5.2300000000000D+00 2.6229045331359D-03 2.6229849814048D-03 8.3600508276751D-13 +525 5.2400000000000D+00 2.5806910288638D-03 2.5807700999093D-03 7.8409777415356D-13 +526 5.2500000000000D+00 2.5391686422266D-03 2.5392463602542D-03 7.3541762889317D-13 +527 5.2600000000000D+00 2.4983258396447D-03 2.4984022284241D-03 6.8976406038479D-13 +528 5.2700000000000D+00 2.4581512840442D-03 2.4582263669171D-03 6.4694865566680D-13 +529 5.2800000000000D+00 2.4186338314631D-03 2.4187076313511D-03 6.0679473056835D-13 +530 5.2900000000000D+00 2.3797625276899D-03 2.3798350671023D-03 5.6913659562077D-13 +531 5.3000000000000D+00 2.3415266049512D-03 2.3415979059926D-03 5.3381877538383D-13 +532 5.3100000000000D+00 2.3039154786616D-03 2.3039855630391D-03 5.0069529349497D-13 +533 5.3200000000000D+00 2.2669187443399D-03 2.2669876333709D-03 4.6962998216442D-13 +534 5.3300000000000D+00 2.2305261743554D-03 2.2305938889741D-03 4.4049479810892D-13 +535 5.3400000000000D+00 2.1947277148957D-03 2.1947942756609D-03 4.1316966395425D-13 +536 5.3500000000000D+00 2.1595134829483D-03 2.1595789100494D-03 3.8754196937224D-13 +537 5.3600000000000D+00 2.1248737633347D-03 2.1249380765994D-03 3.6350610535983D-13 +538 5.3700000000000D+00 2.0907990057553D-03 2.0908622246554D-03 3.4096274383064D-13 +539 5.3800000000000D+00 2.0572798220582D-03 2.0573419657168D-03 3.1981928711415D-13 +540 5.3900000000000D+00 2.0243069833178D-03 2.0243680705152D-03 2.9998875171003D-13 +541 5.4000000000000D+00 1.9918714170896D-03 1.9919314662700D-03 2.8138951108457D-13 +542 5.4100000000000D+00 1.9599642047068D-03 1.9600232339840D-03 2.6394501152659D-13 +543 5.4200000000000D+00 1.9285765786162D-03 1.9286346057800D-03 2.4758345543120D-13 +544 5.4300000000000D+00 1.8976999197412D-03 1.8977569622632D-03 2.3223740501044D-13 +545 5.4400000000000D+00 1.8673257549475D-03 1.8673818299871D-03 2.1784368012246D-13 +546 5.4500000000000D+00 1.8374457545487D-03 1.8375008789584D-03 2.0434324599373D-13 +547 5.4600000000000D+00 1.8080517297503D-03 1.8081059200817D-03 1.9168060093863D-13 +548 5.4700000000000D+00 1.7791356302429D-03 1.7791889027520D-03 1.7980369068668D-13 +549 5.4800000000000D+00 1.7506895418086D-03 1.7507419124612D-03 1.6866369286362D-13 +550 5.4900000000000D+00 1.7227056839698D-03 1.7227571684471D-03 1.5821481581948D-13 +551 5.5000000000000D+00 1.6951764076370D-03 1.6952270213403D-03 1.4841395548651D-13 +552 5.5100000000000D+00 1.6680941929720D-03 1.6681439510281D-03 1.3922099555441D-13 +553 5.5200000000000D+00 1.6414516470387D-03 1.6415005643049D-03 1.3059820729581D-13 +554 5.5300000000000D+00 1.6152415016395D-03 1.6152895927086D-03 1.2251018715868D-13 +555 5.5400000000000D+00 1.5894566111691D-03 1.5895038903739D-03 1.1492372848328D-13 +556 5.5500000000000D+00 1.5640899505014D-03 1.5641364319198D-03 1.0780768450493D-13 +557 5.5600000000000D+00 1.5391346128995D-03 1.5391803103588D-03 1.0113280199919D-13 +558 5.5700000000000D+00 1.5145838079901D-03 1.5146287350719D-03 9.4871637616913D-14 +559 5.5800000000000D+00 1.4904308598179D-03 1.4904750298624D-03 8.8998598670660D-14 +560 5.5900000000000D+00 1.4666692047885D-03 1.4667126308989D-03 8.3489600691148D-14 +561 5.6000000000000D+00 1.4432923897667D-03 1.4433350848134D-03 7.8322053095707D-14 +562 5.6100000000000D+00 1.4202940701768D-03 1.4203360468019D-03 7.3474765838060D-14 +563 5.6200000000000D+00 1.3976680081370D-03 1.3977092787582D-03 6.8927862275441D-14 +564 5.6300000000000D+00 1.3754080705969D-03 1.3754486474117D-03 6.4662641627140D-14 +565 5.6400000000000D+00 1.3535082276119D-03 1.3535481226015D-03 6.0661649045241D-14 +566 5.6500000000000D+00 1.3319625505351D-03 1.3320017754686D-03 5.6908528444610D-14 +567 5.6600000000000D+00 1.3107652102548D-03 1.3108037766926D-03 5.3387907991465D-14 +568 5.6700000000000D+00 1.2899104755024D-03 1.2899483948004D-03 5.0085368450604D-14 +569 5.6800000000000D+00 1.2693927111749D-03 1.2694299944880D-03 4.6987383765631D-14 +570 5.6900000000000D+00 1.2492063766860D-03 1.2492430349717D-03 4.4081265606474D-14 +571 5.7000000000000D+00 1.2293460243088D-03 1.2293820683310D-03 4.1355057009759D-14 +572 5.7100000000000D+00 1.2098062977010D-03 1.2098417380333D-03 3.8797650093117D-14 +573 5.7200000000000D+00 1.1905819302359D-03 1.1906167772650D-03 3.6398589575605D-14 +574 5.7300000000000D+00 1.1716677434888D-03 1.1717020074181D-03 3.4148061484598D-14 +575 5.7400000000000D+00 1.1530586457323D-03 1.1530923365850D-03 3.2036859502219D-14 +576 5.7500000000000D+00 1.1347496304537D-03 1.1347827580763D-03 3.0056347119525D-14 +577 5.7600000000000D+00 1.1167357748956D-03 1.1167683489609D-03 2.8198419673648D-14 +578 5.7700000000000D+00 1.0990122385944D-03 1.0990442686047D-03 2.6455439448634D-14 +579 5.7800000000000D+00 1.0815742620882D-03 1.0816057573784D-03 2.4820324071491D-14 +580 5.7900000000000D+00 1.0644171654160D-03 1.0644481351565D-03 2.3286392521721D-14 +581 5.8000000000000D+00 1.0475363467974D-03 1.0475667999972D-03 2.1847377369467D-14 +582 5.8100000000000D+00 1.0309272812990D-03 1.0309572268085D-03 2.0497398933433D-14 +583 5.8200000000000D+00 1.0145855195234D-03 1.0146149660376D-03 1.9230941159897D-14 +584 5.8300000000000D+00 9.9850668631584D-04 9.9853564237650D-04 1.8042824565055D-14 +585 5.8400000000000D+00 9.8268647948401D-04 9.8271495348305D-04 1.6928174033130D-14 +586 5.8500000000000D+00 9.6712066864271D-04 9.6714866882457D-04 1.5882465619377D-14 +587 5.8600000000000D+00 9.5180509389180D-04 9.5183262835615D-04 1.4901431696855D-14 +588 5.8700000000000D+00 9.3673566464891D-04 9.3676274135330D-04 1.3981068626753D-14 +589 5.8800000000000D+00 9.2190835846987D-04 9.2193498523222D-04 1.3117620274857D-14 +590 5.8900000000000D+00 9.0731921988969D-04 9.0734540439086D-04 1.2307562627225D-14 +591 5.9000000000000D+00 8.9296435927798D-04 8.9299010906421D-04 1.1547586159130D-14 +592 5.9100000000000D+00 8.7883995170696D-04 8.7886527419229D-04 1.0834575159628D-14 +593 5.9200000000000D+00 8.6494223593422D-04 8.6496713840285D-04 1.0165640486716D-14 +594 5.9300000000000D+00 8.5126751322744D-04 8.5129200283609D-04 9.5380553715062D-15 +595 5.9400000000000D+00 8.3781214633414D-04 8.3783623011431D-04 8.9492616010168D-15 +596 5.9500000000000D+00 8.2457255843826D-04 8.2459624329849D-04 8.3968589967663D-15 +597 5.9600000000000D+00 8.1154523213501D-04 8.1156852486308D-04 7.8785955954655D-15 +598 5.9700000000000D+00 7.9872670842077D-04 7.9874961568588D-04 7.3923573675870D-15 +599 5.9800000000000D+00 7.8611358567910D-04 7.8613611403396D-04 6.9361499723572D-15 +600 5.9900000000000D+00 7.7370251880381D-04 7.7372467468674D-04 6.5081289477586D-15 + +# +#ONCVPSP (Optimized Norm-Conservinng Vanderbilt PSeudopotential) +#scalar-relativistic version 3.3.0 08/16/2017 +# +#While it is not required under the terms of the GNU GPL, it is +#suggested that you cite D. R. Hamann, Phys. Rev. B 88, 085117 (2013) +#in any publication utilizing these pseudopotentials. +# +# ATOM AND REFERENCE CONFIGURATION +# atsym z nc nv iexc psfile +P 15.00 3 2 -1012 psp8 +# +# n l f +1 0 2.00 +2 0 2.00 +2 1 6.00 +3 0 2.00 +3 1 3.00 +# +# PSEUDOPOTENTIAL AND OPTIMIZATION +# lmax +2 +# +# l, rc, ep, ncon, nbas, qcut +0 1.45000 -0.51510 4 9 6.20000 +1 1.55000 -0.20568 4 9 6.60000 +2 1.70000 0.05000 4 9 6.60000 +# +# LOCAL POTENTIAL +# lloc, lpopt, rc(5), dvloc0 +4 5 1.45000 0.00000 +# +# VANDERBILT-KLEINMAN-BYLANDER PROJECTORs +# l, nproj, debl +0 2 3.00000 +1 2 2.50000 +2 2 2.00000 +# +# MODEL CORE CHARGE +# icmod, fcfact, rcfact +3 5.00000 1.10000 +# +# LOG DERIVATIVE ANALYSIS +# epsh1, epsh2, depsh +-12.00 12.00 0.02 +# +# OUTPUT GRID +# rlmax, drl +6.00 0.01 +# +# TEST CONFIGURATIONS +# ncnf +0 +# nvcnf +# n l f + diff --git a/abipy/data/pseudos/Si_r.psp8 b/abipy/data/pseudos/Si_r.psp8 new file mode 100644 index 000000000..9d46da2c4 --- /dev/null +++ b/abipy/data/pseudos/Si_r.psp8 @@ -0,0 +1,4871 @@ +Si ONCVPSP-3.3.0 r_core= 1.60303 1.72197 1.91712 +14.0000 4.0000 180423 zatom,zion,pspd +8 11 2 4 600 0 pspcod,pspxc,lmax,lloc,mmax,r2well +5.99000000 4.00000000 0.00000000 rchrg fchrg qchrg +2 3 2 0 nproj +3 1 extension_switch +4 3 0 nprojso +0 8.3017033695175D-01 5.1693444514459D+00 +1 0.0000000000000D+00 1.2523442661366D-08 -5.6354553246152D-09 +2 1.0000000000000D-02 -7.8248894949010D-03 3.1589806999166D-02 +3 2.0000000000000D-02 -1.5094928786720D-02 6.2920648781125D-02 +4 3.0000000000000D-02 -2.1266137875149D-02 9.3738442041792D-02 +5 4.0000000000000D-02 -2.5816085603245D-02 1.2379878110774D-01 +6 5.0000000000000D-02 -2.8254188439943D-02 1.5287156273235D-01 +7 6.0000000000000D-02 -2.8131447586467D-02 1.8074535815960D-01 +8 7.0000000000000D-02 -2.5049452169574D-02 2.0723145495614D-01 +9 8.0000000000000D-02 -1.8668488808040D-02 2.3216749674730D-01 +10 9.0000000000000D-02 -8.7146130948254D-03 2.5542065585840D-01 +11 1.0000000000000D-01 5.0144437294995D-03 2.7689028184228D-01 +12 1.1000000000000D-01 2.2644639724288D-02 2.9650997783527D-01 +13 1.2000000000000D-01 4.4222343871670D-02 3.1424906647511D-01 +14 1.3000000000000D-01 6.9712476191566D-02 3.3011341757244D-01 +15 1.4000000000000D-01 9.8998103838658D-02 3.4414562067591D-01 +16 1.5000000000000D-01 1.3188150566377D-01 3.5642449692656D-01 +17 1.6000000000000D-01 1.6808669245574D-01 3.6706395596910D-01 +18 1.7000000000000D-01 2.0726334497984D-01 3.7621121498625D-01 +19 1.8000000000000D-01 2.4899210741984D-01 3.8404440795526D-01 +20 1.9000000000000D-01 2.9279115032616D-01 3.9076962380714D-01 +21 2.0000000000000D-01 3.3812389507189D-01 3.9661742212029D-01 +22 2.1000000000000D-01 3.8440777149605D-01 4.0183888413087D-01 +23 2.2000000000000D-01 4.3102386221732D-01 4.0670126503799D-01 +24 2.3000000000000D-01 4.7732727134140D-01 4.1148332068081D-01 +25 2.4000000000000D-01 5.2265804223439D-01 4.1647038754580D-01 +26 2.5000000000000D-01 5.6635243891855D-01 4.2194929962345D-01 +27 2.6000000000000D-01 6.0775439864474D-01 4.2820322879322D-01 +28 2.7000000000000D-01 6.4622695943335D-01 4.3550653711827D-01 +29 2.8000000000000D-01 6.8116346592607D-01 4.4411972964291D-01 +30 2.9000000000000D-01 7.1199835977191D-01 4.5428459499822D-01 +31 3.0000000000000D-01 7.3821736694372D-01 4.6621961835306D-01 +32 3.1000000000000D-01 7.5936690375405D-01 4.8011574703740D-01 +33 3.2000000000000D-01 7.7506253576347D-01 4.9613258358260D-01 +34 3.3000000000000D-01 7.8499633905356D-01 5.1439507405342D-01 +35 3.4000000000000D-01 7.8894303122286D-01 5.3499075150369D-01 +36 3.5000000000000D-01 7.8676475966727D-01 5.5796758529985D-01 +37 3.6000000000000D-01 7.7841445689680D-01 5.8333247707299D-01 +38 3.7000000000000D-01 7.6393769645104D-01 6.1105043334570D-01 +39 3.8000000000000D-01 7.4347300801841D-01 6.4104443360879D-01 +40 3.9000000000000D-01 7.1725063621805D-01 6.7319600098474D-01 +41 4.0000000000000D-01 6.8558975374376D-01 7.0734647079968D-01 +42 4.1000000000000D-01 6.4889416575614D-01 7.4329894059233D-01 +43 4.2000000000000D-01 6.0764656810409D-01 7.8082087351398D-01 +44 4.3000000000000D-01 5.6240144672779D-01 8.1964731591145D-01 +45 4.4000000000000D-01 5.1377672902438D-01 8.5948467932496D-01 +46 4.5000000000000D-01 4.6244431964640D-01 9.0001502735226D-01 +47 4.6000000000000D-01 4.0911967278148D-01 9.4090079899761D-01 +48 4.7000000000000D-01 3.5455057009252D-01 9.8178989238990D-01 +49 4.8000000000000D-01 2.9950528788330D-01 1.0223210262530D+00 +50 4.9000000000000D-01 2.4476034844105D-01 1.0621292913576D+00 +51 5.0000000000000D-01 1.9108805869022D-01 1.1008518004712D+00 +52 5.1000000000000D-01 1.3924404411903D-01 1.1381333431145D+00 +53 5.2000000000000D-01 8.9954987313749D-02 1.1736319507848D+00 +54 5.3000000000000D-01 4.3906778308821D-02 1.2070242792249D+00 +55 5.4000000000000D-01 1.7332783711421D-03 1.2380107167983D+00 +56 5.5000000000000D-01 -3.5994110180708D-02 1.2663201320547D+00 +57 5.6000000000000D-01 -6.8775887786997D-02 1.2917141790534D+00 +58 5.7000000000000D-01 -9.6192750114708D-02 1.3139910858925D+00 +59 5.8000000000000D-01 -1.1791258243503D-01 1.3329888600639D+00 +60 5.9000000000000D-01 -1.3369602990808D-01 1.3485878535553D+00 +61 6.0000000000000D-01 -1.4340054081148D-01 1.3607126409666D+00 +62 6.1000000000000D-01 -1.4698280459302D-01 1.3693331750595D+00 +63 6.2000000000000D-01 -1.4449953294776D-01 1.3744651959882D+00 +64 6.3000000000000D-01 -1.3610655955796D-01 1.3761698827856D+00 +65 6.4000000000000D-01 -1.2205626194688D-01 1.3745527481884D+00 +66 6.5000000000000D-01 -1.0269333712997D-01 1.3697617905796D+00 +67 6.6000000000000D-01 -7.8448990419704D-02 1.3619849292817D+00 +68 6.7000000000000D-01 -4.9833623635129D-02 1.3514467615374D+00 +69 6.8000000000000D-01 -1.7428134791505D-02 1.3384046911503D+00 +70 6.9000000000000D-01 1.8126034714322D-02 1.3231444895419D+00 +71 7.0000000000000D-01 5.6137947460654D-02 1.3059753598839D+00 +72 7.1000000000000D-01 9.5879134451827D-02 1.2872245837565D+00 +73 7.2000000000000D-01 1.3659628251827D-01 1.2672318373333D+00 +74 7.3000000000000D-01 1.7752443696697D-01 1.2463432702283D+00 +75 7.4000000000000D-01 2.1790050151572D-01 1.2249054448082D+00 +76 7.5000000000000D-01 2.5697681083132D-01 1.2032592368378D+00 +77 7.6000000000000D-01 2.9403454791596D-01 1.1817337997668D+00 +78 7.7000000000000D-01 3.2839677927114D-01 1.1606406947135D+00 +79 7.8000000000000D-01 3.5944088519187D-01 1.1402682862680D+00 +80 7.9000000000000D-01 3.8661017067288D-01 1.1208765006449D+00 +81 8.0000000000000D-01 4.0942445413522D-01 1.1026920374988D+00 +82 8.1000000000000D-01 4.2748944633921D-01 1.0859041199637D+00 +83 8.2000000000000D-01 4.4050475021285D-01 1.0706608592751D+00 +84 8.3000000000000D-01 4.4827033361686D-01 1.0570663008211D+00 +85 8.4000000000000D-01 4.5069135096196D-01 1.0451782077772D+00 +86 8.5000000000000D-01 4.4778121571808D-01 1.0350066267844D+00 +87 8.6000000000000D-01 4.3966285379992D-01 1.0265132676153D+00 +88 8.7000000000000D-01 4.2656809713680D-01 1.0196117156296D+00 +89 8.8000000000000D-01 4.0883520696757D-01 1.0141684822667D+00 +90 8.9000000000000D-01 3.8690454706024D-01 1.0100048850689D+00 +91 9.0000000000000D-01 3.6131245764544D-01 1.0068997350042D+00 +92 9.1000000000000D-01 3.3268341087340D-01 1.0045927953776D+00 +93 9.2000000000000D-01 3.0172055756760D-01 1.0027889636105D+00 +94 9.3000000000000D-01 2.6919480247479D-01 1.0011631148453D+00 +95 9.4000000000000D-01 2.3593257064565D-01 9.9936553488990D-01 +96 9.5000000000000D-01 2.0280245059761D-01 9.9702785966421D-01 +97 9.6000000000000D-01 1.7070092011926D-01 9.9376942920550D-01 +98 9.7000000000000D-01 1.4053737762504D-01 9.8920395660095D-01 +99 9.8000000000000D-01 1.1321871561337D-01 9.8294640605005D-01 +100 9.9000000000000D-01 8.9633682496565D-02 9.7461996985415D-01 +101 1.0000000000000D+00 7.0637285389635D-02 9.6386303124405D-01 +102 1.0100000000000D+00 5.7035488192784D-02 9.5033599912063D-01 +103 1.0200000000000D+00 4.9570457323669D-02 9.3372790161678D-01 +104 1.0300000000000D+00 4.8906601362834D-02 9.1376262806757D-01 +105 1.0400000000000D+00 5.5617640448781D-02 8.9020471359670D-01 +106 1.0500000000000D+00 7.0174927474988D-02 8.6286456665737D-01 +107 1.0600000000000D+00 9.2937225892276D-02 8.3160304754973D-01 +108 1.0700000000000D+00 1.2414212672008D-01 7.9633531584143D-01 +109 1.0800000000000D+00 1.6389926425013D-01 7.5703387494186D-01 +110 1.0900000000000D+00 2.1218546163146D-01 7.1373075472357D-01 +111 1.1000000000000D+00 2.6884190977500D-01 6.6651878549184D-01 +112 1.1100000000000D+00 3.3357345173132D-01 6.1555193059530D-01 +113 1.1200000000000D+00 4.0595001022731D-01 5.6104466039513D-01 +114 1.1300000000000D+00 4.8541016429797D-01 5.0327036452300D-01 +115 1.1400000000000D+00 5.7126684553349D-01 4.4255881521751D-01 +116 1.1500000000000D+00 6.6271509561167D-01 3.7929270745038D-01 +117 1.1600000000000D+00 7.5884178593568D-01 3.1390331985828D-01 +118 1.1700000000000D+00 8.5863717338614D-01 2.4686535251610D-01 +119 1.1800000000000D+00 9.6100813652075D-01 1.7869101089377D-01 +120 1.1900000000000D+00 1.0647929084441D+00 1.0992341794604D-01 +121 1.2000000000000D+00 1.1687770937959D+00 4.1129449200379D-02 +122 1.2100000000000D+00 1.2717107379776D+00 -2.7107905605482D-02 +123 1.2200000000000D+00 1.3723262029065D+00 -9.4197544577002D-02 +124 1.2300000000000D+00 1.4693565780778D+00 -1.5954849817044D-01 +125 1.2400000000000D+00 1.5615543535987D+00 -2.2257829394246D-01 +126 1.2500000000000D+00 1.6477100737810D+00 -2.8272131568681D-01 +127 1.2600000000000D+00 1.7266706827267D+00 -3.3943702785197D-01 +128 1.2700000000000D+00 1.7973572829623D+00 -3.9221794039817D-01 +129 1.2800000000000D+00 1.8587820299312D+00 -4.4059719002181D-01 +130 1.2900000000000D+00 1.9100638921286D+00 -4.8415561674801D-01 +131 1.3000000000000D+00 1.9504430370842D+00 -5.2252822846745D-01 +132 1.3100000000000D+00 1.9792936031284D+00 -5.5540994586784D-01 +133 1.3200000000000D+00 1.9961346452998D+00 -5.8256053288411D-01 +134 1.3300000000000D+00 2.0006390933353D+00 -6.0380863995283D-01 +135 1.3400000000000D+00 1.9926405402068D+00 -6.1905487864693D-01 +136 1.3500000000000D+00 1.9721377538814D+00 -6.2827387942818D-01 +137 1.3600000000000D+00 1.9392968431706D+00 -6.3151530134752D-01 +138 1.3700000000000D+00 1.8944509747307D+00 -6.2890374738987D-01 +139 1.3800000000000D+00 1.8380976799985D+00 -6.2063760255517D-01 +140 1.3900000000000D+00 1.7708937422075D+00 -6.0698679001634D-01 +141 1.4000000000000D+00 1.6936477079699D+00 -5.8828946499391D-01 +142 1.4100000000000D+00 1.6073101676188D+00 -5.6494771062277D-01 +143 1.4200000000000D+00 1.5129618584936D+00 -5.3742225979244D-01 +144 1.4300000000000D+00 1.4117998162463D+00 -5.0622634343945D-01 +145 1.4400000000000D+00 1.3051217317192D+00 -4.7191873555293D-01 +146 1.4500000000000D+00 1.1943087241010D+00 -4.3509608893538D-01 +147 1.4600000000000D+00 1.0808068148745D+00 -3.9638468884617D-01 +148 1.4700000000000D+00 9.6610730580569D-01 -3.5643171522490D-01 +149 1.4800000000000D+00 8.5172640218417D-01 -3.1589616603170D-01 +150 1.4900000000000D+00 7.3918432868847D-01 -2.7543955218488D-01 +151 1.5000000000000D+00 6.2998427209520D-01 -2.3571651349840D-01 +152 1.5100000000000D+00 5.2559142952006D-01 -1.9736548018488D-01 +153 1.5200000000000D+00 4.2741250357621D-01 -1.6099953251312D-01 +154 1.5300000000000D+00 3.3677588766979D-01 -1.2719756739080D-01 +155 1.5400000000000D+00 2.5491291350770D-01 -9.6495938181316D-02 +156 1.5500000000000D+00 1.8296630581151D-01 -6.9390519822108D-02 +157 1.5600000000000D+00 1.2188848085415D-01 -4.6296998073542D-02 +158 1.5700000000000D+00 7.2256682939805D-02 -2.7479459055026D-02 +159 1.5800000000000D+00 3.5250751946724D-02 -1.3422117608731D-02 +160 1.5900000000000D+00 1.2222071568681D-02 -4.6650018122336D-03 +161 1.6000000000000D+00 1.4736890494813D-03 -5.7426635751477D-04 +162 1.6100000000000D+00 -1.2023907698808D-03 4.4976069728121D-04 +163 1.6200000000000D+00 -3.0293915908184D-04 1.1415478561836D-04 +164 1.6300000000000D+00 3.7179004456762D-04 -1.4028397371393D-04 +165 1.6400000000000D+00 9.0767968535561D-05 -3.4284652077795D-05 +166 1.6500000000000D+00 -6.7005290303505D-05 2.5199687468549D-05 +167 1.6600000000000D+00 -1.4520880601566D-05 5.4647392694935D-06 +168 1.6700000000000D+00 -7.9060246413369D-08 6.5039141193358D-08 +169 1.6800000000000D+00 -1.6121921429931D-08 1.3262745460052D-08 +170 1.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +171 1.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +172 1.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +173 1.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +174 1.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +175 1.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +176 1.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +177 1.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +178 1.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +179 1.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +180 1.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +181 1.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 2.5730355756361D+00 5.7857970536717D-01 1.7838995802812D-04 +1 0.0000000000000D+00 1.8582189509342D-08 -1.9241348958587D-08 7.6984090942311D-09 +2 1.0000000000000D-02 1.5676424885381D-03 -1.2285870901523D-03 -2.0904345986696D-04 +3 2.0000000000000D-02 6.2387221942956D-03 -4.8816145018622D-03 -8.4760027807917D-04 +4 3.0000000000000D-02 1.3918299369358D-02 -1.0861505453120D-02 -1.9497008890625D-03 +5 4.0000000000000D-02 2.4450142133071D-02 -1.9007703499189D-02 -3.5712375165771D-03 +6 5.0000000000000D-02 3.7619690616965D-02 -2.9099741084628D-02 -5.7887419023108D-03 +7 6.0000000000000D-02 5.3158132622603D-02 -4.0861458731242D-02 -8.6977048021365D-03 +8 7.0000000000000D-02 7.0747518182211D-02 -5.3966299668160D-02 -1.2410467303466D-02 +9 8.0000000000000D-02 9.0026821829754D-02 -6.8043585468858D-02 -1.7053721715545D-02 +10 9.0000000000000D-02 1.1059884438034D-01 -8.2685660648523D-02 -2.2765666837219D-02 +11 1.0000000000000D-01 1.3203783087274D-01 -9.7455778498445D-02 -2.9692868701662D-02 +12 1.1000000000000D-01 1.5389766831652D-01 -1.1189658696478D-01 -3.7986883313407D-02 +13 1.2000000000000D-01 1.7572051622834D-01 -1.2553906235218D-01 -4.7800702345167D-02 +14 1.3000000000000D-01 1.9704571482936D-01 -1.3791173024183D-01 -5.9285086168056D-02 +15 1.4000000000000D-01 2.1741881034973D-01 -1.4855000740810D-01 -7.2584850896029D-02 +16 1.5000000000000D-01 2.3640053424773D-01 -1.5700549579920D-01 -8.7835177277615D-02 +17 1.6000000000000D-01 2.5357557334868D-01 -1.6285505986880D-01 -1.0515800926593D-01 +18 1.7000000000000D-01 2.6856097094812D-01 -1.6570952170932D-01 -1.2465860891386D-01 +19 1.8000000000000D-01 2.8101400475700D-01 -1.6522181449735D-01 -1.4642233190769D-01 +20 1.9000000000000D-01 2.9063939610329D-01 -1.6109444361932D-01 -1.7051168461237D-01 +21 2.0000000000000D-01 2.9719571590319D-01 -1.5308611635815D-01 -1.9696371897806D-01 +22 2.1000000000000D-01 3.0050086639481D-01 -1.4101741499799D-01 -2.2578781617114D-01 +23 2.2000000000000D-01 3.0043653326271D-01 -1.2477540441190D-01 -2.5696390338820D-01 +24 2.3000000000000D-01 2.9695152031250D-01 -1.0431708336629D-01 -2.9044114112827D-01 +25 2.4000000000000D-01 2.9006389798635D-01 -7.9671608599587D-02 -3.2613711032999D-01 +26 2.5000000000000D-01 2.7986191742128D-01 -5.0941241878210D-02 -3.6393752037942D-01 +27 2.6000000000000D-01 2.6650366309661D-01 -1.8300992341314D-02 -4.0369645018011D-01 +28 2.7000000000000D-01 2.5021543903435D-01 1.8003050856809D-02 -4.4523712541559D-01 +29 2.8000000000000D-01 2.3128890563309D-01 5.7656677699153D-02 -4.8835322596323D-01 +30 2.9000000000000D-01 2.1007700615498D-01 1.0028176763606D-01 -5.3281070829834D-01 +31 3.0000000000000D-01 1.8698874327095D-01 1.4544168834524D-01 -5.7835011881648D-01 +32 3.1000000000000D-01 1.6248288653370D-01 1.9264779900355D-01 -6.2468936544103D-01 +33 3.2000000000000D-01 1.3706071083742D-01 2.4136695430792D-01 -6.7152690682310D-01 +34 3.3000000000000D-01 1.1125788350419D-01 2.9102988731066D-01 -7.1854531102704D-01 +35 3.4000000000000D-01 8.5635633302361D-02 3.4104033295171D-01 -7.6541512893970D-01 +36 3.5000000000000D-01 6.0771348174689D-02 3.9078474026476D-01 -8.1179902187419D-01 +37 3.6000000000000D-01 3.7248759493776D-02 4.3964240985312D-01 -8.5735607805087D-01 +38 3.7000000000000D-01 1.5647879067600D-02 4.8699588458322D-01 -9.0174624892708D-01 +39 3.8000000000000D-01 -3.4651392671023D-03 5.3224141569007D-01 -9.4463483376086D-01 +40 3.9000000000000D-01 -1.9548038913495D-02 5.7479932374406D-01 -9.8569693940710D-01 +41 4.0000000000000D-01 -3.2092226346623D-02 6.1412407425631D-01 -1.0246218421619D+00 +42 4.1000000000000D-01 -4.0632092438868D-02 6.4971389111165D-01 -1.0611171795226D+00 +43 4.2000000000000D-01 -4.4753724377676D-02 6.8111973747610D-01 -1.0949129019912D+00 +44 4.3000000000000D-01 -4.4102852295951D-02 7.0795350323648D-01 -1.1257649184983D+00 +45 4.4000000000000D-01 -3.8391886474830D-02 7.2989525025339D-01 -1.1534583736009D+00 +46 4.5000000000000D-01 -2.7405915253835D-02 7.4669938155538D-01 -1.1778105002557D+00 +47 4.6000000000000D-01 -1.1007550369353D-02 7.5819961783667D-01 -1.1986729985845D+00 +48 4.7000000000000D-01 1.0859474926261D-02 7.6431268396815D-01 -1.2159338985415D+00 +49 4.8000000000000D-01 3.8168029237043D-02 7.6504062937702D-01 -1.2295188726338D+00 +50 4.9000000000000D-01 7.0806680370560D-02 7.6047172875178D-01 -1.2393919737100D+00 +51 5.0000000000000D-01 1.0858019630018D-01 7.5077993321206D-01 -1.2455557821696D+00 +52 5.1000000000000D-01 1.5121145586512D-01 7.3622286645374D-01 -1.2480509566093D+00 +53 5.2000000000000D-01 1.9834475151937D-01 7.1713838504323D-01 -1.2469551917529D+00 +54 5.3000000000000D-01 2.4955044274110D-01 6.9393974656951D-01 -1.2423815973485D+00 +55 5.4000000000000D-01 3.0433089554542D-01 6.6710945333430D-01 -1.2344765213827D+00 +56 5.5000000000000D-01 3.6212762122971D-01 6.3719186233343D-01 -1.2234168503336D+00 +57 5.6000000000000D-01 4.2232950650354D-01 6.0478467395678D-01 -1.2094068280564D+00 +58 5.7000000000000D-01 4.8428200778161D-01 5.7052943183413D-01 -1.1926744431483D+00 +59 5.8000000000000D-01 5.4729716503253D-01 5.3510118418120D-01 -1.1734674421429D+00 +60 5.9000000000000D-01 6.1066427548824D-01 4.9919747253476D-01 -1.1520490324647D+00 +61 6.0000000000000D-01 6.7366105495490D-01 4.6352682667280D-01 -1.1286933446738D+00 +62 6.1000000000000D-01 7.3556510470751D-01 4.2879695450657D-01 -1.1036807280031D+00 +63 6.2000000000000D-01 7.9566549513864D-01 3.9570282265942D-01 -1.0772929564842D+00 +64 6.3000000000000D-01 8.5327427362696D-01 3.6491482714750D-01 -1.0498084249992D+00 +65 6.4000000000000D-01 9.0773770355741D-01 3.3706725398755D-01 -1.0214974153422D+00 +66 6.5000000000000D-01 9.5844704412337D-01 3.1274722661204D-01 -9.9261751180869D-01 +67 6.6000000000000D-01 1.0048486864389D+00 2.9248433071045D-01 -9.6340924394794D-01 +68 6.7000000000000D-01 1.0464534704506D+00 2.7674109767990D-01 -9.3409203095505D-01 +69 6.8000000000000D-01 1.0828450191988D+00 2.6590451522092D-01 -9.0486049774409D-01 +70 6.9000000000000D-01 1.1136869417802D+00 2.6027871813567D-01 -8.7588122714418D-01 +71 7.0000000000000D-01 1.1387287737694D+00 2.6007899420612D-01 -8.4729000596111D-01 +72 7.1000000000000D-01 1.1578105436089D+00 2.6542721944089D-01 -8.1918961493943D-01 +73 7.2000000000000D-01 1.1708658752805D+00 2.7634881426155D-01 -7.9164820406394D-01 +74 7.3000000000000D-01 1.1779235609723D+00 2.9277128784884D-01 -7.6469828531762D-01 +75 7.4000000000000D-01 1.1791075622383D+00 3.1452441209958D-01 -7.3833636506768D-01 +76 7.5000000000000D-01 1.1746354237735D+00 3.4134204001310D-01 -7.1252322788937D-01 +77 7.6000000000000D-01 1.1648151100537D+00 3.7286555620605D-01 -6.8718487298344D-01 +78 7.7000000000000D-01 1.1500403013540D+00 4.0864891999614D-01 -6.6221409356346D-01 +79 7.8000000000000D-01 1.1307842114290D+00 4.4816523478624D-01 -6.3747267892546D-01 +80 7.9000000000000D-01 1.1075920142024D+00 4.9081475151330D-01 -6.1279420845103D-01 +81 8.0000000000000D-01 1.0810719906324D+00 5.3593418927892D-01 -5.8798739676754D-01 +82 8.1000000000000D-01 1.0518855291255D+00 5.8280723332200D-01 -5.6283993983310D-01 +83 8.2000000000000D-01 1.0207361330897D+00 6.3067604962509D-01 -5.3712280299729D-01 +84 8.3000000000000D-01 9.8835760709196D-01 6.7875363702475D-01 -5.1059488425657D-01 +85 8.4000000000000D-01 9.5550160831097D-01 7.2623682204416D-01 -4.8300797910554D-01 +86 8.5000000000000D-01 9.2292476228093D-01 7.7231968906356D-01 -4.5411196770145D-01 +87 8.6000000000000D-01 8.9137555107924D-01 8.1620722912144D-01 -4.2366014061380D-01 +88 8.7000000000000D-01 8.6158118794747D-01 8.5712898477725D-01 -3.9141457628725D-01 +89 8.8000000000000D-01 8.3423469472855D-01 8.9435246618934D-01 -3.5715148159971D-01 +90 8.9000000000000D-01 8.0998239738557D-01 9.2719611493619D-01 -3.2066640653648D-01 +91 9.0000000000000D-01 7.8941205022969D-01 9.5504159714438D-01 -2.8177924509102D-01 +92 9.1000000000000D-01 7.7304179137313D-01 9.7734521613018D-01 -2.4033893700753D-01 +93 9.2000000000000D-01 7.6131012044092D-01 9.9364824690377D-01 -1.9622778886738D-01 +94 9.3000000000000D-01 7.5456707488262D-01 1.0035860103577D+00 -1.4936533826422D-01 +95 9.4000000000000D-01 7.5306676353333D-01 1.0068955235403D+00 -9.9711691311478D-02 +96 9.5000000000000D-01 7.5696139564611D-01 1.0034215838250D+00 -4.7270271391179D-02 +97 9.6000000000000D-01 7.6629692076273D-01 9.9312116870585D-01 7.9100742164861D-03 +98 9.7000000000000D-01 7.8101036993292D-01 9.7606605893173D-01 6.5733653562642D-02 +99 9.8000000000000D-01 8.0092896173842D-01 9.5244362093698D-01 1.2605722826073D-01 +100 9.9000000000000D-01 8.2577100967560D-01 9.2255571259370D-01 1.8869005321344D-01 +101 1.0000000000000D+00 8.5514863756015D-01 8.8681570746207D-01 2.5339466838016D-01 +102 1.0100000000000D+00 8.8857228121295D-01 8.4574366229371D-01 3.1988844165621D-01 +103 1.0200000000000D+00 9.2545692548912D-01 7.9995968292187D-01 3.8784585003285D-01 +104 1.0300000000000D+00 9.6512999730185D-01 7.5017557320651D-01 4.5690147450283D-01 +105 1.0400000000000D+00 1.0068408075199D+00 6.9718488054390D-01 5.2665367260187D-01 +106 1.0500000000000D+00 1.0497714092360D+00 6.4185147778083D-01 5.9666888177369D-01 +107 1.0600000000000D+00 1.0930487156789D+00 5.8509684647764D-01 6.6648649639233D-01 +108 1.0700000000000D+00 1.1357576985352D+00 5.2788624974170D-01 7.3562425147294D-01 +109 1.0800000000000D+00 1.1769554692773D+00 4.7121400161544D-01 8.0358403801169D-01 +110 1.0900000000000D+00 1.2156860292925D+00 4.1608805729462D-01 8.6985806718846D-01 +111 1.1000000000000D+00 1.2509954625454D+00 3.6351416081964D-01 9.3393529488298D-01 +112 1.1100000000000D+00 1.2819473343029D+00 3.1447979728305D-01 9.9530801280410D-01 +113 1.1200000000000D+00 1.3076380539589D+00 2.6993820206289D-01 1.0534785091567D+00 +114 1.1300000000000D+00 1.3272119584781D+00 2.3079268094142D-01 1.1079657000793D+00 +115 1.1400000000000D+00 1.3398758755383D+00 1.9788149202899D-01 1.1583116328989D+00 +116 1.1500000000000D+00 1.3449129289197D+00 1.7196353658589D-01 1.2040877626461D+00 +117 1.1600000000000D+00 1.3416953608461D+00 1.5370509284789D-01 1.2449009067184D+00 +118 1.1700000000000D+00 1.3296961589197D+00 1.4366781326715D-01 1.2803987868149D+00 +119 1.1800000000000D+00 1.3084992913697D+00 1.4229818858345D-01 1.3102750726447D+00 +120 1.1900000000000D+00 1.2778083720706D+00 1.4991866342624D-01 1.3342738480012D+00 +121 1.2000000000000D+00 1.2374536041616D+00 1.6672055936504D-01 1.3521934296803D+00 +122 1.2100000000000D+00 1.1873968787605D+00 1.9275893230315D-01 1.3638894800351D+00 +123 1.2200000000000D+00 1.1277349184388D+00 2.2794947726063D-01 1.3692773587165D+00 +124 1.2300000000000D+00 1.0587004030837D+00 2.7206754332953D-01 1.3683336772877D+00 +125 1.2400000000000D+00 9.8066104075604D-01 3.2474929547126D-01 1.3610970302161D+00 +126 1.2500000000000D+00 8.9411656763038D-01 3.8549503733725D-01 1.3476678839820D+00 +127 1.2600000000000D+00 7.9969370448465D-01 4.5367466393034D-01 1.3282076229699D+00 +128 1.2700000000000D+00 6.9813913333015D-01 5.2853517524014D-01 1.3029367654253D+00 +129 1.2800000000000D+00 5.9031057163930D-01 6.0921016750950D-01 1.2721323683113D+00 +130 1.2900000000000D+00 4.7716606385190D-01 6.9473117471757D-01 1.2361246568333D+00 +131 1.3000000000000D+00 3.5975164684286D-01 7.8404069438680D-01 1.1952929300867D+00 +132 1.3100000000000D+00 2.3918754794929D-01 8.7600672981946D-01 1.1500607950359D+00 +133 1.3200000000000D+00 1.1665311916739D-01 9.6943863400931D-01 1.1008907998017D+00 +134 1.3300000000000D+00 -6.6292681088734D-03 1.0631040190833D+00 1.0482785472189D+00 +135 1.3400000000000D+00 -1.2941114704183D-01 1.1557464987773D+00 9.9274636749368D-01 +136 1.3500000000000D+00 -2.5043543369594D-01 1.2461039864113D+00 9.3483664863294D-01 +137 1.3600000000000D+00 -3.6845420651039D-01 1.3329272826106D+00 8.7510492042757D-01 +138 1.3700000000000D+00 -4.8224651941456D-01 1.4149986719359D+00 8.1411279205938D-01 +139 1.3800000000000D+00 -5.9063597535349D-01 1.4911502424838D+00 7.5242085098868D-01 +140 1.3900000000000D+00 -6.9250780087398D-01 1.5602816567347D+00 6.9058162355101D-01 +141 1.4000000000000D+00 -7.8682514314604D-01 1.6213770820981D+00 6.2913270720959D-01 +142 1.4100000000000D+00 -8.7264436631102D-01 1.6735210483574D+00 5.6859016666678D-01 +143 1.4200000000000D+00 -9.4912907332459D-01 1.7159129455420D+00 5.0944230227922D-01 +144 1.4300000000000D+00 -1.0155626619625D+00 1.7478799632084D+00 4.5214387371486D-01 +145 1.4400000000000D+00 -1.0713592125925D+00 1.7688882601253D+00 3.9711086360585D-01 +146 1.4500000000000D+00 -1.1160724976292D+00 1.7785521456003D+00 3.4471587078889D-01 +147 1.4600000000000D+00 -1.1494030442561D+00 1.7766412026097D+00 2.9528417107218D-01 +148 1.4700000000000D+00 -1.1712030217656D+00 1.7630851144512D+00 2.4909054193681D-01 +149 1.4800000000000D+00 -1.1814789804924D+00 1.7379762254084D+00 2.0635685459843D-01 +150 1.4900000000000D+00 -1.1803923060350D+00 1.7015696942147D+00 1.6725049606570D-01 +151 1.5000000000000D+00 -1.1682574024422D+00 1.6542812568143D+00 1.3188362944020D-01 +152 1.5100000000000D+00 -1.1455376443700D+00 1.5966826423169D+00 1.0031328889243D-01 +153 1.5200000000000D+00 -1.1128390637778D+00 1.5294946081816D+00 7.2542336096505D-02 +154 1.5300000000000D+00 -1.0709019928340D+00 1.4535778290081D+00 4.8521204203334D-02 +155 1.5400000000000D+00 -1.0205906025295D+00 1.3699215777066D+00 2.8150467005687D-02 +156 1.5500000000000D+00 -9.6288066893757D-01 1.2796305491566D+00 1.1284115595588D-02 +157 1.5600000000000D+00 -8.9884557697097D-01 1.1839098375087D+00 -2.2664488451963D-03 +158 1.5700000000000D+00 -8.2964089575561D-01 1.0840484243639D+00 -1.2727818789491D-02 +159 1.5800000000000D+00 -7.5648765031291D-01 9.8140129371974D-01 -2.0359440813219D-02 +160 1.5900000000000D+00 -6.8065460328146D-01 8.7737051983369D-01 -2.5448020297852D-02 +161 1.6000000000000D+00 -6.0343979574459D-01 7.7338567546534D-01 -2.8301446942198D-02 +162 1.6100000000000D+00 -5.2615155447428D-01 6.7088350969424D-01 -2.9242677845571D-02 +163 1.6200000000000D+00 -4.5008925137096D-01 5.7128725638006D-01 -2.8603589370819D-02 +164 1.6300000000000D+00 -3.7652420151966D-01 4.7598626899936D-01 -2.6718598233882D-02 +165 1.6400000000000D+00 -3.0668088420834D-01 3.8631599153645D-01 -2.3918347005499D-02 +166 1.6500000000000D+00 -2.4171893122007D-01 3.0353892768726D-01 -2.0523317646576D-02 +167 1.6600000000000D+00 -1.8271598642693D-01 2.2882662436721D-01 -1.6837569433789D-02 +168 1.6700000000000D+00 -1.3069505357795D-01 1.6329657623164D-01 -1.3151619208694D-02 +169 1.6800000000000D+00 -8.6405506838168D-02 1.0774303202713D-01 -9.6960228328553D-03 +170 1.6900000000000D+00 -5.0418747943044D-02 6.2758784398397D-02 -6.6444389818876D-03 +171 1.7000000000000D+00 -2.4039057561508D-02 2.9865506767806D-02 -4.3591162708950D-03 +172 1.7100000000000D+00 -8.0395447246536D-03 9.9479044562140D-03 -3.1188050111645D-03 +173 1.7200000000000D+00 -6.5346153119578D-04 7.7017550236888D-04 -2.3498211026174D-03 +174 1.7300000000000D+00 1.0820743433409D-03 -1.3676617404183D-03 -1.2847414760579D-03 +175 1.7400000000000D+00 2.9095800432232D-04 -3.6518479114662D-04 -2.1343694607551D-04 +176 1.7500000000000D+00 -3.1702342909707D-04 3.9768884837739D-04 1.9879054040740D-04 +177 1.7600000000000D+00 -1.4923016225769D-04 1.8697704763711D-04 8.2769265111502D-05 +178 1.7700000000000D+00 5.1955268802246D-05 -6.5456280910843D-05 -4.1904389512551D-05 +179 1.7800000000000D+00 3.6542456292396D-05 -4.6005042271656D-05 -2.7614950267858D-05 +180 1.7900000000000D+00 -6.5661950893539D-08 1.6640266641581D-07 4.7256679151827D-06 +181 1.8000000000000D+00 -6.4633268057020D-08 1.6379574468163D-07 4.6516339669177D-06 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +2 -2.4273649132658D+00 -4.8811033250628D-01 +1 0.0000000000000D+00 -2.5997163501795D-09 5.2330675851670D-09 +2 1.0000000000000D-02 -6.4648433674080D-06 3.0376075488239D-05 +3 2.0000000000000D-02 -5.1317905158171D-05 2.4214386965161D-04 +4 3.0000000000000D-02 -1.7095172210112D-04 8.1238869112967D-04 +5 4.0000000000000D-02 -3.9780711018119D-04 1.9096632769284D-03 +6 5.0000000000000D-02 -7.5849573381647D-04 3.6899207646967D-03 +7 6.0000000000000D-02 -1.2720389056798D-03 6.2926829804155D-03 +8 7.0000000000000D-02 -1.9482582520544D-03 9.8375162221164D-03 +9 8.0000000000000D-02 -2.7863512788954D-03 1.4420881487177D-02 +10 9.0000000000000D-02 -3.7736817040033D-03 2.0113419710535D-02 +11 1.0000000000000D-01 -4.8848107322669D-03 2.6957725157486D-02 +12 1.1000000000000D-01 -6.0807913036754D-03 3.4966651768166D-02 +13 1.2000000000000D-01 -7.3087428051390D-03 4.4122188117585D-02 +14 1.3000000000000D-01 -8.5017188808388D-03 5.4374926883529D-02 +15 1.4000000000000D-01 -9.5788758811901D-03 6.5644144465015D-02 +16 1.5000000000000D-01 -1.0445944240431D-02 7.7818495833206D-02 +17 1.6000000000000D-01 -1.0995999753642D-02 9.0757318998650D-02 +18 1.7000000000000D-01 -1.1110526422517D-02 1.0429253281854D-01 +19 1.8000000000000D-01 -1.0660757343208D-02 1.1823110142197D-01 +20 1.9000000000000D-01 -9.5092751044113D-03 1.3235802847191D-01 +21 2.0000000000000D-01 -7.5118484331821D-03 1.4643983497824D-01 +22 2.1000000000000D-01 -4.5194774483241D-03 1.6022846558419D-01 +23 2.2000000000000D-01 -3.8061593062289D-04 1.7346556031865D-01 +24 2.3000000000000D-01 5.0564644375476D-03 1.8588702187224D-01 +25 2.4000000000000D-01 1.1941205813754D-02 1.9722780263637D-01 +26 2.5000000000000D-01 2.0418232167635D-02 2.0722683114310D-01 +27 2.6000000000000D-01 3.0624795386019D-02 2.1563199424198D-01 +28 2.7000000000000D-01 4.2688242389549D-02 2.2220508941137D-01 +29 2.8000000000000D-01 5.6723546417569D-02 2.2672666106610D-01 +30 2.9000000000000D-01 7.2830945209216D-02 2.2900063560904D-01 +31 3.0000000000000D-01 9.1093727674264D-02 2.2885867227775D-01 +32 3.1000000000000D-01 1.1157620882035D-01 2.2616415053086D-01 +33 3.2000000000000D-01 1.3432193020774D-01 2.2081571975359D-01 +34 3.3000000000000D-01 1.5935212007390D-01 2.1275034336574D-01 +35 3.4000000000000D-01 1.8666444355276D-01 2.0194577689779D-01 +36 3.5000000000000D-01 2.1623206916262D-01 1.8842242814862D-01 +37 3.6000000000000D-01 2.4800307301604D-01 1.7224455702433D-01 +38 3.7000000000000D-01 2.8190019708609D-01 1.5352078293474D-01 +39 3.8000000000000D-01 3.1782097242416D-01 1.3240387853629D-01 +40 3.9000000000000D-01 3.5563821255014D-01 1.0908983998515D-01 +41 4.0000000000000D-01 3.9520087641307D-01 8.3816235525130D-02 +42 4.1000000000000D-01 4.3633529444179D-01 5.6859845997981D-02 +43 4.2000000000000D-01 4.7884674536288D-01 2.8533622539772D-02 +44 4.3000000000000D-01 5.2252136575067D-01 -8.1700186931310D-04 +45 4.4000000000000D-01 5.6712836878248D-01 -3.0818399388299D-02 +46 4.5000000000000D-01 6.1242254349096D-01 -6.1073574908501D-02 +47 4.6000000000000D-01 6.5814700101854D-01 -9.1167466829163D-02 +48 4.7000000000000D-01 7.0403613006627D-01 -1.2067264504917D-01 +49 4.8000000000000D-01 7.4981871996260D-01 -1.4915532277894D-01 +50 4.9000000000000D-01 7.9522120662189D-01 -1.7618159258478D-01 +51 5.0000000000000D-01 8.3997099417237D-01 -2.0132379223488D-01 +52 5.1000000000000D-01 8.8379980325509D-01 -2.2416690251094D-01 +53 5.2000000000000D-01 9.2644699596248D-01 -2.4431487724947D-01 +54 5.3000000000000D-01 9.6766282712381D-01 -2.6139680553158D-01 +55 5.4000000000000D-01 1.0072115721612D+00 -2.7507280716169D-01 +56 5.5000000000000D-01 1.0448744830411D+00 -2.8503956537452D-01 +57 5.6000000000000D-01 1.0804525259124D+00 -2.9103540504403D-01 +58 5.7000000000000D-01 1.1137688568321D+00 -2.9284483049421D-01 +59 5.8000000000000D-01 1.1446709955008D+00 -2.9030244425978D-01 +60 5.9000000000000D-01 1.1730326611025D+00 -2.8329617669158D-01 +61 6.0000000000000D-01 1.1987552391284D+00 -2.7176976607131D-01 +62 6.1000000000000D-01 1.2217688533731D+00 -2.5572443970296D-01 +63 6.2000000000000D-01 1.2420330230565D+00 -2.3521975815726D-01 +64 6.3000000000000D-01 1.2595368911844D+00 -2.1037359732306D-01 +65 6.4000000000000D-01 1.2742990166487D+00 -1.8136125583999D-01 +66 6.5000000000000D-01 1.2863667292138D+00 -1.4841368889386D-01 +67 6.6000000000000D-01 1.2958150532081D+00 -1.1181488280449D-01 +68 6.7000000000000D-01 1.3027452124038D+00 -7.1898398227023D-02 +69 6.8000000000000D-01 1.3072827351530D+00 -2.9043123002394D-02 +70 6.9000000000000D-01 1.3095751851633D+00 1.6331711668523D-02 +71 7.0000000000000D-01 1.3097895493119D+00 6.3772186043875D-02 +72 7.1000000000000D-01 1.3081093194968D+00 1.1279594082451D-01 +73 7.2000000000000D-01 1.3047313106239D+00 1.6289893336455D-01 +74 7.3000000000000D-01 1.2998622613226D+00 2.1356260530622D-01 +75 7.4000000000000D-01 1.2937152678306D+00 2.6426135829896D-01 +76 7.5000000000000D-01 1.2865061045977D+00 3.1447022843430D-01 +77 7.6000000000000D-01 1.2784494874884D+00 3.6367264558574D-01 +78 7.7000000000000D-01 1.2697553369729D+00 4.1136816108354D-01 +79 7.8000000000000D-01 1.2606250993341D+00 4.5708002614766D-01 +80 7.9000000000000D-01 1.2512481836929D+00 5.0036250425996D-01 +81 8.0000000000000D-01 1.2417985715430D+00 5.4080780320300D-01 +82 8.1000000000000D-01 1.2324316535016D+00 5.7805251680180D-01 +83 8.2000000000000D-01 1.2232813451472D+00 6.1178347243134D-01 +84 8.3000000000000D-01 1.2144575301601D+00 6.4174288802219D-01 +85 8.4000000000000D-01 1.2060438745617D+00 6.6773275151204D-01 +86 8.5000000000000D-01 1.1980960507077D+00 6.8961834632841D-01 +87 8.6000000000000D-01 1.1906404039165D+00 7.0733085840129D-01 +88 8.7000000000000D-01 1.1836730882778D+00 7.2086901322895D-01 +89 8.8000000000000D-01 1.1771596913751D+00 7.3029970546940D-01 +90 8.9000000000000D-01 1.1710353604761D+00 7.3575759820527D-01 +91 9.0000000000000D-01 1.1652054352963D+00 7.3744368421643D-01 +92 9.1000000000000D-01 1.1595465848269D+00 7.3562281707137D-01 +93 9.2000000000000D-01 1.1539084380648D+00 7.3062023538446D-01 +94 9.3000000000000D-01 1.1481156908867D+00 7.2281711895043D-01 +95 9.4000000000000D-01 1.1419706639043D+00 7.1264523042732D-01 +96 9.5000000000000D-01 1.1352562790163D+00 7.0058071056730D-01 +97 9.6000000000000D-01 1.1277394156614D+00 6.8713710846943D-01 +98 9.7000000000000D-01 1.1191746015763D+00 6.7285774072605D-01 +99 9.8000000000000D-01 1.1093079872060D+00 6.5830748459000D-01 +100 9.9000000000000D-01 1.0978815481414D+00 6.4406411973710D-01 +101 1.0000000000000D+00 1.0846374556412D+00 6.3070934167433D-01 +102 1.0100000000000D+00 1.0693225521228D+00 6.1881957598519D-01 +103 1.0200000000000D+00 1.0516928660729D+00 6.0895672722073D-01 +104 1.0300000000000D+00 1.0315180993656D+00 6.0165899886936D-01 +105 1.0400000000000D+00 1.0085860195288D+00 5.9743192139602D-01 +106 1.0500000000000D+00 9.8270669000999D-01 5.9673972393675D-01 +107 1.0600000000000D+00 9.5371647288797D-01 5.9999718205018D-01 +108 1.0700000000000D+00 9.2148174111893D-01 6.0756206817370D-01 +109 1.0800000000000D+00 8.8590224069183D-01 6.1972832442568D-01 +110 1.0900000000000D+00 8.4691404763484D-01 6.3672006775489D-01 +111 1.1000000000000D+00 8.0449206974999D-01 6.5868652710823D-01 +112 1.1100000000000D+00 7.5865204886598D-01 6.8569799996308D-01 +113 1.1200000000000D+00 7.0945202652545D-01 7.1774290080740D-01 +114 1.1300000000000D+00 6.5699324297409D-01 7.5472595979965D-01 +115 1.1400000000000D+00 6.0142044755394D-01 7.9646761289736D-01 +116 1.1500000000000D+00 5.4292160546010D-01 8.4270461065319D-01 +117 1.1600000000000D+00 4.8172699637050D-01 8.9309185128820D-01 +118 1.1700000000000D+00 4.1810770798080D-01 9.4720542831953D-01 +119 1.1800000000000D+00 3.5237353602738D-01 1.0045468656120D+00 +120 1.1900000000000D+00 2.8487031077563D-01 1.0645484956599D+00 +121 1.2000000000000D+00 2.1597667970403D-01 1.1265799171820D+00 +122 1.2100000000000D+00 1.4610038387674D-01 1.1899554525113D+00 +123 1.2200000000000D+00 7.5674070184080D-02 1.2539425157863D+00 +124 1.2300000000000D+00 5.1506933527798D-03 1.3177707794853D+00 +125 1.2400000000000D+00 -6.5001434625985D-02 1.3806420195249D+00 +126 1.2500000000000D+00 -1.3430388545380D-01 1.4417405100902D+00 +127 1.2600000000000D+00 -2.0227357643308D-01 1.5002438251255D+00 +128 1.2700000000000D+00 -2.6842838110065D-01 1.5553338982928D+00 +129 1.2800000000000D+00 -3.3229281488302D-01 1.6062081903985D+00 +130 1.2900000000000D+00 -3.9340371792086D-01 1.6520908054541D+00 +131 1.3000000000000D+00 -4.5131585859616D-01 1.6922434001678D+00 +132 1.3100000000000D+00 -5.0560738098903D-01 1.7259757310700D+00 +133 1.3200000000000D+00 -5.5588501939424D-01 1.7526556841590D+00 +134 1.3300000000000D+00 -6.0178901055075D-01 1.7717186481481D+00 +135 1.3400000000000D+00 -6.4299763067918D-01 1.7826760848620D+00 +136 1.3500000000000D+00 -6.7923129400138D-01 1.7851231712815D+00 +137 1.3600000000000D+00 -7.1025615893217D-01 1.7787454075365D+00 +138 1.3700000000000D+00 -7.3588717908014D-01 1.7633240663759D+00 +139 1.3800000000000D+00 -7.5599056511557D-01 1.7387404205561D+00 +140 1.3900000000000D+00 -7.7048561535528D-01 1.7049786670813D+00 +141 1.4000000000000D+00 -7.7934588150130D-01 1.6621274856279D+00 +142 1.4100000000000D+00 -7.8259966500231D-01 1.6103802285343D+00 +143 1.4200000000000D+00 -7.8032981317681D-01 1.5500336852823D+00 +144 1.4300000000000D+00 -7.7267283216763D-01 1.4814854637022D+00 +145 1.4400000000000D+00 -7.5981731820465D-01 1.4052299975333D+00 +146 1.4500000000000D+00 -7.4200171830586D-01 1.3218532104327D+00 +147 1.4600000000000D+00 -7.1951146886487D-01 1.2320259423896D+00 +148 1.4700000000000D+00 -6.9267551873881D-01 1.1364961594955D+00 +149 1.4800000000000D+00 -6.6186231188632D-01 1.0360801072066D+00 +150 1.4900000000000D+00 -6.2747525977788D-01 9.3165247596738D-01 +151 1.5000000000000D+00 -5.8994777504637D-01 8.2413573207097D-01 +152 1.5100000000000D+00 -5.4973793129309D-01 7.1448875214962D-01 +153 1.5200000000000D+00 -5.0732281404411D-01 6.0369490159108D-01 +154 1.5300000000000D+00 -4.6319265037488D-01 4.9274973900194D-01 +155 1.5400000000000D+00 -4.1784478384334D-01 3.8264849119083D-01 +156 1.5500000000000D+00 -3.7177758682164D-01 2.7437348745267D-01 +157 1.5600000000000D+00 -3.2548438751910D-01 1.6888172066376D-01 +158 1.5700000000000D+00 -2.7944749282350D-01 6.7092693382359D-02 +159 1.5800000000000D+00 -2.3413240229074D-01 -3.0123225721256D-02 +160 1.5900000000000D+00 -1.8998227920574D-01 -1.2195582330169D-01 +161 1.6000000000000D+00 -1.4741267957256D-01 -2.0766556718440D-01 +162 1.6100000000000D+00 -1.0680685030416D-01 -2.8659258663291D-01 +163 1.6200000000000D+00 -6.8511575866626D-02 -3.5816424363208D-01 +164 1.6300000000000D+00 -3.2833472867521D-02 -4.2190194179057D-01 +165 1.6400000000000D+00 -3.5864709366535D-05 -4.7742662711733D-01 +166 1.6500000000000D+00 2.9663845907414D-02 -5.2446344098290D-01 +167 1.6600000000000D+00 5.6096253747796D-02 -5.6284528675116D-01 +168 1.6700000000000D+00 7.9141237591516D-02 -5.9251453658796D-01 +169 1.6800000000000D+00 9.8728634656932D-02 -6.1352345565185D-01 +170 1.6900000000000D+00 1.1483815050158D-01 -6.2603296074229D-01 +171 1.7000000000000D+00 1.2749863660582D-01 -6.3031001505614D-01 +172 1.7100000000000D+00 1.3678662114542D-01 -6.2672341956294D-01 +173 1.7200000000000D+00 1.4282424336917D-01 -6.1573832654607D-01 +174 1.7300000000000D+00 1.4577650044272D-01 -5.9790929006029D-01 +175 1.7400000000000D+00 1.4584796488577D-01 -5.7387219319872D-01 +176 1.7500000000000D+00 1.4327891819692D-01 -5.4433494632732D-01 +177 1.7600000000000D+00 1.3834104769536D-01 -5.1006727077570D-01 +178 1.7700000000000D+00 1.3133270052595D-01 -4.7188956497203D-01 +179 1.7800000000000D+00 1.2257381589928D-01 -4.3066111174126D-01 +180 1.7900000000000D+00 1.1240058124290D-01 -3.8726773232673D-01 +181 1.8000000000000D+00 1.0115990219434D-01 -3.4260908026045D-01 +182 1.8100000000000D+00 8.9203772983791D-02 -2.9758576497265D-01 +183 1.8200000000000D+00 7.6883617040095D-02 -2.5308645712176D-01 +184 1.8300000000000D+00 6.4544694693839D-02 -2.0997518420992D-01 +185 1.8400000000000D+00 5.2520659569415D-02 -1.6907899559317D-01 +186 1.8500000000000D+00 4.1128721054141D-02 -1.3117733922977D-01 +187 1.8600000000000D+00 3.0674011912400D-02 -9.7019232096159D-02 +188 1.8700000000000D+00 2.1396369813765D-02 -6.7164704121779D-02 +189 1.8800000000000D+00 1.3495915828192D-02 -4.2066285254907D-02 +190 1.8900000000000D+00 7.3089250621314D-03 -2.2606534254696D-02 +191 1.9000000000000D+00 3.1010995656583D-03 -9.4709242505067D-03 +192 1.9100000000000D+00 7.5867477795319D-04 -2.2127087845149D-03 +193 1.9200000000000D+00 -1.7132772076115D-04 6.2484769224640D-04 +194 1.9300000000000D+00 -2.4430104235155D-04 7.9602452165546D-04 +195 1.9400000000000D+00 -3.1595203654193D-06 1.0125334392170D-05 +196 1.9500000000000D+00 8.4964786772141D-05 -2.7292017423662D-04 +197 1.9600000000000D+00 3.3295144178846D-05 -1.0648678841028D-04 +198 1.9700000000000D+00 -1.2507485861113D-05 4.0998583531193D-05 +199 1.9800000000000D+00 -1.1627002967079D-05 3.8005278111956D-05 +200 1.9900000000000D+00 2.1043366320412D-08 -2.0330921227713D-07 +201 2.0000000000000D+00 4.6195383955352D-08 -4.4631391098734D-07 +202 2.0100000000000D+00 4.7771094059502D-09 -4.6153753895513D-08 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +4 +1 0.0000000000000D+00 -4.7660258956878D+00 +2 1.0000000000000D-02 -4.7658750218906D+00 +3 2.0000000000000D-02 -4.7654224791935D+00 +4 3.0000000000000D-02 -4.7646685083488D+00 +5 4.0000000000000D-02 -4.7636135098109D+00 +6 5.0000000000000D-02 -4.7622580432587D+00 +7 6.0000000000000D-02 -4.7606028267351D+00 +8 7.0000000000000D-02 -4.7586487354033D+00 +9 8.0000000000000D-02 -4.7563967999174D+00 +10 9.0000000000000D-02 -4.7538482043476D+00 +11 1.0000000000000D-01 -4.7510042836107D+00 +12 1.1000000000000D-01 -4.7478665203445D+00 +13 1.2000000000000D-01 -4.7444365411777D+00 +14 1.3000000000000D-01 -4.7407161123444D+00 +15 1.4000000000000D-01 -4.7367071346169D+00 +16 1.5000000000000D-01 -4.7324116375307D+00 +17 1.6000000000000D-01 -4.7278317728980D+00 +18 1.7000000000000D-01 -4.7229698076286D+00 +19 1.8000000000000D-01 -4.7178281158894D+00 +20 1.9000000000000D-01 -4.7124091706516D+00 +21 2.0000000000000D-01 -4.7067155347105D+00 +22 2.1000000000000D-01 -4.7007498512617D+00 +23 2.2000000000000D-01 -4.6945148341479D+00 +24 2.3000000000000D-01 -4.6880132579021D+00 +25 2.4000000000000D-01 -4.6812479477194D+00 +26 2.5000000000000D-01 -4.6742217695099D+00 +27 2.6000000000000D-01 -4.6669376201711D+00 +28 2.7000000000000D-01 -4.6593984182362D+00 +29 2.8000000000000D-01 -4.6516070950374D+00 +30 2.9000000000000D-01 -4.6435665865144D+00 +31 3.0000000000000D-01 -4.6352798257954D+00 +32 3.1000000000000D-01 -4.6267497366453D+00 +33 3.2000000000000D-01 -4.6179792278683D+00 +34 3.3000000000000D-01 -4.6089711887177D+00 +35 3.4000000000000D-01 -4.5997284853522D+00 +36 3.5000000000000D-01 -4.5902539583399D+00 +37 3.6000000000000D-01 -4.5805504211922D+00 +38 3.7000000000000D-01 -4.5706206598793D+00 +39 3.8000000000000D-01 -4.5604674332549D+00 +40 3.9000000000000D-01 -4.5500934743006D+00 +41 4.0000000000000D-01 -4.5395014920641D+00 +42 4.1000000000000D-01 -4.5286941741644D+00 +43 4.2000000000000D-01 -4.5176741897205D+00 +44 4.3000000000000D-01 -4.5064441925326D+00 +45 4.4000000000000D-01 -4.4950068243762D+00 +46 4.5000000000000D-01 -4.4833647182210D+00 +47 4.6000000000000D-01 -4.4715205012347D+00 +48 4.7000000000000D-01 -4.4594767974092D+00 +49 4.8000000000000D-01 -4.4472362296737D+00 +50 4.9000000000000D-01 -4.4348014213709D+00 +51 5.0000000000000D-01 -4.4221749969874D+00 +52 5.1000000000000D-01 -4.4093595820637D+00 +53 5.2000000000000D-01 -4.3963578022219D+00 +54 5.3000000000000D-01 -4.3831722812827D+00 +55 5.4000000000000D-01 -4.3698056384718D+00 +56 5.5000000000000D-01 -4.3562604847411D+00 +57 5.6000000000000D-01 -4.3425394182726D+00 +58 5.7000000000000D-01 -4.3286450192287D+00 +59 5.8000000000000D-01 -4.3145798438994D+00 +60 5.9000000000000D-01 -4.3003464183426D+00 +61 6.0000000000000D-01 -4.2859472317266D+00 +62 6.1000000000000D-01 -4.2713847295162D+00 +63 6.2000000000000D-01 -4.2566613067320D+00 +64 6.3000000000000D-01 -4.2417793014862D+00 +65 6.4000000000000D-01 -4.2267409889973D+00 +66 6.5000000000000D-01 -4.2115485763412D+00 +67 6.6000000000000D-01 -4.1962041981158D+00 +68 6.7000000000000D-01 -4.1807099132644D+00 +69 6.8000000000000D-01 -4.1650677032372D+00 +70 6.9000000000000D-01 -4.1492794716722D+00 +71 7.0000000000000D-01 -4.1333470457499D+00 +72 7.1000000000000D-01 -4.1172721793557D+00 +73 7.2000000000000D-01 -4.1010565581247D+00 +74 7.3000000000000D-01 -4.0847018064370D+00 +75 7.4000000000000D-01 -4.0682094963803D+00 +76 7.5000000000000D-01 -4.0515811586252D+00 +77 7.6000000000000D-01 -4.0348182951675D+00 +78 7.7000000000000D-01 -4.0179223938185D+00 +79 7.8000000000000D-01 -4.0008949442115D+00 +80 7.9000000000000D-01 -3.9837374552057D+00 +81 8.0000000000000D-01 -3.9664514734072D+00 +82 8.1000000000000D-01 -3.9490386024120D+00 +83 8.2000000000000D-01 -3.9315005226121D+00 +84 8.3000000000000D-01 -3.9138390110871D+00 +85 8.4000000000000D-01 -3.8960559612457D+00 +86 8.5000000000000D-01 -3.8781534018337D+00 +87 8.6000000000000D-01 -3.8601335149143D+00 +88 8.7000000000000D-01 -3.8419986524381D+00 +89 8.8000000000000D-01 -3.8237513510314D+00 +90 8.9000000000000D-01 -3.8053943446756D+00 +91 9.0000000000000D-01 -3.7869305749728D+00 +92 9.1000000000000D-01 -3.7683631987383D+00 +93 9.2000000000000D-01 -3.7496955927275D+00 +94 9.3000000000000D-01 -3.7309313553566D+00 +95 9.4000000000000D-01 -3.7120743053462D+00 +96 9.5000000000000D-01 -3.6931284772807D+00 +97 9.6000000000000D-01 -3.6740981141491D+00 +98 9.7000000000000D-01 -3.6549876570042D+00 +99 9.8000000000000D-01 -3.6358017319366D+00 +100 9.9000000000000D-01 -3.6165451346031D+00 +101 1.0000000000000D+00 -3.5972228126348D+00 +102 1.0100000000000D+00 -3.5778398462518D+00 +103 1.0200000000000D+00 -3.5584014274682D+00 +104 1.0300000000000D+00 -3.5389128382855D+00 +105 1.0400000000000D+00 -3.5193794282705D+00 +106 1.0500000000000D+00 -3.4998065919389D+00 +107 1.0600000000000D+00 -3.4801997463370D+00 +108 1.0700000000000D+00 -3.4605643091976D+00 +109 1.0800000000000D+00 -3.4409056780326D+00 +110 1.0900000000000D+00 -3.4212292104866D+00 +111 1.1000000000000D+00 -3.4015402062356D+00 +112 1.1100000000000D+00 -3.3818438906881D+00 +113 1.1200000000000D+00 -3.3621454006873D+00 +114 1.1300000000000D+00 -3.3424497723776D+00 +115 1.1400000000000D+00 -3.3227619313540D+00 +116 1.1500000000000D+00 -3.3030866851665D+00 +117 1.1600000000000D+00 -3.2834287181952D+00 +118 1.1700000000000D+00 -3.2637925888763D+00 +119 1.1800000000000D+00 -3.2441827292193D+00 +120 1.1900000000000D+00 -3.2246034465023D+00 +121 1.2000000000000D+00 -3.2050589269974D+00 +122 1.2100000000000D+00 -3.1855532415438D+00 +123 1.2200000000000D+00 -3.1660903527560D+00 +124 1.2300000000000D+00 -3.1466741236218D+00 +125 1.2400000000000D+00 -3.1273083272327D+00 +126 1.2500000000000D+00 -3.1079966573719D+00 +127 1.2600000000000D+00 -3.0887427396750D+00 +128 1.2700000000000D+00 -3.0695501430905D+00 +129 1.2800000000000D+00 -3.0504223913763D+00 +130 1.2900000000000D+00 -3.0313629743705D+00 +131 1.3000000000000D+00 -3.0123753588344D+00 +132 1.3100000000000D+00 -2.9934629986568D+00 +133 1.3200000000000D+00 -2.9746293442700D+00 +134 1.3300000000000D+00 -2.9558778511861D+00 +135 1.3400000000000D+00 -2.9372119875373D+00 +136 1.3500000000000D+00 -2.9186352406180D+00 +137 1.3600000000000D+00 -2.9001511224252D+00 +138 1.3700000000000D+00 -2.8817631741976D+00 +139 1.3800000000000D+00 -2.8634749700392D+00 +140 1.3900000000000D+00 -2.8452901196524D+00 +141 1.4000000000000D+00 -2.8272122702772D+00 +142 1.4100000000000D+00 -2.8092451078338D+00 +143 1.4200000000000D+00 -2.7913923573572D+00 +144 1.4300000000000D+00 -2.7736577826709D+00 +145 1.4400000000000D+00 -2.7560451852688D+00 +146 1.4500000000000D+00 -2.7385584023645D+00 +147 1.4600000000000D+00 -2.7212013038703D+00 +148 1.4700000000000D+00 -2.7039777882728D+00 +149 1.4800000000000D+00 -2.6868917770432D+00 +150 1.4900000000000D+00 -2.6699472074499D+00 +151 1.5000000000000D+00 -2.6531480234107D+00 +152 1.5100000000000D+00 -2.6364981642207D+00 +153 1.5200000000000D+00 -2.6200015492949D+00 +154 1.5300000000000D+00 -2.6036620746342D+00 +155 1.5400000000000D+00 -2.5874835725266D+00 +156 1.5500000000000D+00 -2.5714697392336D+00 +157 1.5600000000000D+00 -2.5556242879026D+00 +158 1.5700000000000D+00 -2.5399507725589D+00 +159 1.5800000000000D+00 -2.5244529101295D+00 +160 1.5900000000000D+00 -2.5091336989357D+00 +161 1.6000000000000D+00 -2.4939928046587D+00 +162 1.6100000000000D+00 -2.4790264337824D+00 +163 1.6200000000000D+00 -2.4642261731555D+00 +164 1.6300000000000D+00 -2.4495823538578D+00 +165 1.6400000000000D+00 -2.4350916935245D+00 +166 1.6500000000000D+00 -2.4207552045845D+00 +167 1.6600000000000D+00 -2.4065751265948D+00 +168 1.6700000000000D+00 -2.3925539290525D+00 +169 1.6800000000000D+00 -2.3786905308904D+00 +170 1.6900000000000D+00 -2.3649822992828D+00 +171 1.7000000000000D+00 -2.3514289469678D+00 +172 1.7100000000000D+00 -2.3380299116348D+00 +173 1.7200000000000D+00 -2.3247819344264D+00 +174 1.7300000000000D+00 -2.3116800256001D+00 +175 1.7400000000000D+00 -2.2987168228467D+00 +176 1.7500000000000D+00 -2.2858846359002D+00 +177 1.7600000000000D+00 -2.2731792054152D+00 +178 1.7700000000000D+00 -2.2605987379574D+00 +179 1.7800000000000D+00 -2.2481424488597D+00 +180 1.7900000000000D+00 -2.2358099831255D+00 +181 1.8000000000000D+00 -2.2235997850846D+00 +182 1.8100000000000D+00 -2.2115089457056D+00 +183 1.8200000000000D+00 -2.1995350642981D+00 +184 1.8300000000000D+00 -2.1876768463528D+00 +185 1.8400000000000D+00 -2.1759329786927D+00 +186 1.8500000000000D+00 -2.1643017773388D+00 +187 1.8600000000000D+00 -2.1527816328260D+00 +188 1.8700000000000D+00 -2.1413711044804D+00 +189 1.8800000000000D+00 -2.1300687916052D+00 +190 1.8900000000000D+00 -2.1188733330724D+00 +191 1.9000000000000D+00 -2.1077834151873D+00 +192 1.9100000000000D+00 -2.0967977719714D+00 +193 1.9200000000000D+00 -2.0859151817450D+00 +194 1.9300000000000D+00 -2.0751344638927D+00 +195 1.9400000000000D+00 -2.0644544764592D+00 +196 1.9500000000000D+00 -2.0538741136620D+00 +197 1.9600000000000D+00 -2.0433923033195D+00 +198 1.9700000000000D+00 -2.0330080044216D+00 +199 1.9800000000000D+00 -2.0227202047035D+00 +200 1.9900000000000D+00 -2.0125279183241D+00 +201 2.0000000000000D+00 -2.0024301836241D+00 +202 2.0100000000000D+00 -1.9924260609609D+00 +203 2.0200000000000D+00 -1.9825146306658D+00 +204 2.0300000000000D+00 -1.9726949910701D+00 +205 2.0400000000000D+00 -1.9629662566604D+00 +206 2.0500000000000D+00 -1.9533275563191D+00 +207 2.0600000000000D+00 -1.9437780316746D+00 +208 2.0700000000000D+00 -1.9343168355582D+00 +209 2.0800000000000D+00 -1.9249431305534D+00 +210 2.0900000000000D+00 -1.9156560876577D+00 +211 2.1000000000000D+00 -1.9064548850346D+00 +212 2.1100000000000D+00 -1.8973387068668D+00 +213 2.1200000000000D+00 -1.8883067423044D+00 +214 2.1300000000000D+00 -1.8793581845029D+00 +215 2.1400000000000D+00 -1.8704922297538D+00 +216 2.1500000000000D+00 -1.8617080767008D+00 +217 2.1600000000000D+00 -1.8530049256407D+00 +218 2.1700000000000D+00 -1.8443819779059D+00 +219 2.1800000000000D+00 -1.8358384353252D+00 +220 2.1900000000000D+00 -1.8273734997610D+00 +221 2.2000000000000D+00 -1.8189863727188D+00 +222 2.2100000000000D+00 -1.8106762550270D+00 +223 2.2200000000000D+00 -1.8024423465830D+00 +224 2.2300000000000D+00 -1.7942838461646D+00 +225 2.2400000000000D+00 -1.7861999513006D+00 +226 2.2500000000000D+00 -1.7781898582014D+00 +227 2.2600000000000D+00 -1.7702527617436D+00 +228 2.2700000000000D+00 -1.7623878555067D+00 +229 2.2800000000000D+00 -1.7545943318595D+00 +230 2.2900000000000D+00 -1.7468713820925D+00 +231 2.3000000000000D+00 -1.7392181965934D+00 +232 2.3100000000000D+00 -1.7316339650626D+00 +233 2.3200000000000D+00 -1.7241178767667D+00 +234 2.3300000000000D+00 -1.7166691208255D+00 +235 2.3400000000000D+00 -1.7092868865310D+00 +236 2.3500000000000D+00 -1.7019703636940D+00 +237 2.3600000000000D+00 -1.6947187430168D+00 +238 2.3700000000000D+00 -1.6875312164891D+00 +239 2.3800000000000D+00 -1.6804069778018D+00 +240 2.3900000000000D+00 -1.6733452227790D+00 +241 2.4000000000000D+00 -1.6663451498249D+00 +242 2.4100000000000D+00 -1.6594059603791D+00 +243 2.4200000000000D+00 -1.6525268593842D+00 +244 2.4300000000000D+00 -1.6457070557577D+00 +245 2.4400000000000D+00 -1.6389457628656D+00 +246 2.4500000000000D+00 -1.6322421990012D+00 +247 2.4600000000000D+00 -1.6255955878593D+00 +248 2.4700000000000D+00 -1.6190051590055D+00 +249 2.4800000000000D+00 -1.6124701483456D+00 +250 2.4900000000000D+00 -1.6059897985804D+00 +251 2.5000000000000D+00 -1.5995633596508D+00 +252 2.5100000000000D+00 -1.5931900891785D+00 +253 2.5200000000000D+00 -1.5868692528834D+00 +254 2.5300000000000D+00 -1.5806001249877D+00 +255 2.5400000000000D+00 -1.5743819886105D+00 +256 2.5500000000000D+00 -1.5682141361337D+00 +257 2.5600000000000D+00 -1.5620958695504D+00 +258 2.5700000000000D+00 -1.5560265008004D+00 +259 2.5800000000000D+00 -1.5500053520728D+00 +260 2.5900000000000D+00 -1.5440317560881D+00 +261 2.6000000000000D+00 -1.5381050563639D+00 +262 2.6100000000000D+00 -1.5322246074472D+00 +263 2.6200000000000D+00 -1.5263897751219D+00 +264 2.6300000000000D+00 -1.5205999365984D+00 +265 2.6400000000000D+00 -1.5148544806707D+00 +266 2.6500000000000D+00 -1.5091528078456D+00 +267 2.6600000000000D+00 -1.5034943304531D+00 +268 2.6700000000000D+00 -1.4978784727284D+00 +269 2.6800000000000D+00 -1.4923046708604D+00 +270 2.6900000000000D+00 -1.4867723730209D+00 +271 2.7000000000000D+00 -1.4812810393665D+00 +272 2.7100000000000D+00 -1.4758301420201D+00 +273 2.7200000000000D+00 -1.4704191650182D+00 +274 2.7300000000000D+00 -1.4650476042714D+00 +275 2.7400000000000D+00 -1.4597149674376D+00 +276 2.7500000000000D+00 -1.4544207738186D+00 +277 2.7600000000000D+00 -1.4491645541970D+00 +278 2.7700000000000D+00 -1.4439458506987D+00 +279 2.7800000000000D+00 -1.4387642166136D+00 +280 2.7900000000000D+00 -1.4336192162173D+00 +281 2.8000000000000D+00 -1.4285104245588D+00 +282 2.8100000000000D+00 -1.4234374272160D+00 +283 2.8200000000000D+00 -1.4183998200553D+00 +284 2.8300000000000D+00 -1.4133972089612D+00 +285 2.8400000000000D+00 -1.4084292095792D+00 +286 2.8500000000000D+00 -1.4034954470303D+00 +287 2.8600000000000D+00 -1.3985955556251D+00 +288 2.8700000000000D+00 -1.3937291785597D+00 +289 2.8800000000000D+00 -1.3888959676078D+00 +290 2.8900000000000D+00 -1.3840955828065D+00 +291 2.9000000000000D+00 -1.3793276921368D+00 +292 2.9100000000000D+00 -1.3745919712031D+00 +293 2.9200000000000D+00 -1.3698881029094D+00 +294 2.9300000000000D+00 -1.3652157771298D+00 +295 2.9400000000000D+00 -1.3605746903872D+00 +296 2.9500000000000D+00 -1.3559645455299D+00 +297 2.9600000000000D+00 -1.3513850514078D+00 +298 2.9700000000000D+00 -1.3468359225549D+00 +299 2.9800000000000D+00 -1.3423168788798D+00 +300 2.9900000000000D+00 -1.3378276453608D+00 +301 3.0000000000000D+00 -1.3333679517377D+00 +302 3.0100000000000D+00 -1.3289375322280D+00 +303 3.0200000000000D+00 -1.3245361252444D+00 +304 3.0300000000000D+00 -1.3201634731188D+00 +305 3.0400000000000D+00 -1.3158193218354D+00 +306 3.0500000000000D+00 -1.3115034207866D+00 +307 3.0600000000000D+00 -1.3072155225339D+00 +308 3.0700000000000D+00 -1.3029553825700D+00 +309 3.0800000000000D+00 -1.2987227591108D+00 +310 3.0900000000000D+00 -1.2945174128952D+00 +311 3.1000000000000D+00 -1.2903391069996D+00 +312 3.1100000000000D+00 -1.2861876066483D+00 +313 3.1200000000000D+00 -1.2820626790689D+00 +314 3.1300000000000D+00 -1.2779640933435D+00 +315 3.1400000000000D+00 -1.2738916202735D+00 +316 3.1500000000000D+00 -1.2698450322564D+00 +317 3.1600000000000D+00 -1.2658241031917D+00 +318 3.1700000000000D+00 -1.2618286083904D+00 +319 3.1800000000000D+00 -1.2578583244898D+00 +320 3.1900000000000D+00 -1.2539130293940D+00 +321 3.2000000000000D+00 -1.2499925022265D+00 +322 3.2100000000000D+00 -1.2460965232939D+00 +323 3.2200000000000D+00 -1.2422248740492D+00 +324 3.2300000000000D+00 -1.2383773370847D+00 +325 3.2400000000000D+00 -1.2345536961275D+00 +326 3.2500000000000D+00 -1.2307537360470D+00 +327 3.2600000000000D+00 -1.2269772428617D+00 +328 3.2700000000000D+00 -1.2232240037707D+00 +329 3.2800000000000D+00 -1.2194938071836D+00 +330 3.2900000000000D+00 -1.2157864427594D+00 +331 3.3000000000000D+00 -1.2121017014501D+00 +332 3.3100000000000D+00 -1.2084393755525D+00 +333 3.3200000000000D+00 -1.2047992587633D+00 +334 3.3300000000000D+00 -1.2011811462373D+00 +335 3.3400000000000D+00 -1.1975848346536D+00 +336 3.3500000000000D+00 -1.1940101222757D+00 +337 3.3600000000000D+00 -1.1904568090182D+00 +338 3.3700000000000D+00 -1.1869246965126D+00 +339 3.3800000000000D+00 -1.1834135881835D+00 +340 3.3900000000000D+00 -1.1799232893037D+00 +341 3.4000000000000D+00 -1.1764536070610D+00 +342 3.4100000000000D+00 -1.1730043506194D+00 +343 3.4200000000000D+00 -1.1695753311919D+00 +344 3.4300000000000D+00 -1.1661663620829D+00 +345 3.4400000000000D+00 -1.1627772587454D+00 +346 3.4500000000000D+00 -1.1594078388251D+00 +347 3.4600000000000D+00 -1.1560579222267D+00 +348 3.4700000000000D+00 -1.1527273311315D+00 +349 3.4800000000000D+00 -1.1494158900379D+00 +350 3.4900000000000D+00 -1.1461234257845D+00 +351 3.5000000000000D+00 -1.1428497675959D+00 +352 3.5100000000000D+00 -1.1395947470797D+00 +353 3.5200000000000D+00 -1.1363581982426D+00 +354 3.5300000000000D+00 -1.1331399574922D+00 +355 3.5400000000000D+00 -1.1299398636529D+00 +356 3.5500000000000D+00 -1.1267577579488D+00 +357 3.5600000000000D+00 -1.1235934839911D+00 +358 3.5700000000000D+00 -1.1204468877594D+00 +359 3.5800000000000D+00 -1.1173178175873D+00 +360 3.5900000000000D+00 -1.1142061241335D+00 +361 3.6000000000000D+00 -1.1111116603428D+00 +362 3.6100000000000D+00 -1.1080342814102D+00 +363 3.6200000000000D+00 -1.1049738447398D+00 +364 3.6300000000000D+00 -1.1019302099048D+00 +365 3.6400000000000D+00 -1.0989032385901D+00 +366 3.6500000000000D+00 -1.0958927945421D+00 +367 3.6600000000000D+00 -1.0928987435117D+00 +368 3.6700000000000D+00 -1.0899209531994D+00 +369 3.6800000000000D+00 -1.0869592931919D+00 +370 3.6900000000000D+00 -1.0840136349014D+00 +371 3.7000000000000D+00 -1.0810838515026D+00 +372 3.7100000000000D+00 -1.0781698178665D+00 +373 3.7200000000000D+00 -1.0752714104959D+00 +374 3.7300000000000D+00 -1.0723885074628D+00 +375 3.7400000000000D+00 -1.0695209883440D+00 +376 3.7500000000000D+00 -1.0666687341598D+00 +377 3.7600000000000D+00 -1.0638316272987D+00 +378 3.7700000000000D+00 -1.0610095514703D+00 +379 3.7800000000000D+00 -1.0582023916412D+00 +380 3.7900000000000D+00 -1.0554100339824D+00 +381 3.8000000000000D+00 -1.0526323658022D+00 +382 3.8100000000000D+00 -1.0498692754987D+00 +383 3.8200000000000D+00 -1.0471206525148D+00 +384 3.8300000000000D+00 -1.0443863872898D+00 +385 3.8400000000000D+00 -1.0416663712204D+00 +386 3.8500000000000D+00 -1.0389604965974D+00 +387 3.8600000000000D+00 -1.0362686565929D+00 +388 3.8700000000000D+00 -1.0335907452194D+00 +389 3.8800000000000D+00 -1.0309266573033D+00 +390 3.8900000000000D+00 -1.0282762884498D+00 +391 3.9000000000000D+00 -1.0256395350179D+00 +392 3.9100000000000D+00 -1.0230162941115D+00 +393 3.9200000000000D+00 -1.0204064635592D+00 +394 3.9300000000000D+00 -1.0178099419066D+00 +395 3.9400000000000D+00 -1.0152266283898D+00 +396 3.9500000000000D+00 -1.0126564229430D+00 +397 3.9600000000000D+00 -1.0100992261935D+00 +398 3.9700000000000D+00 -1.0075549394611D+00 +399 3.9800000000000D+00 -1.0050234647612D+00 +400 3.9900000000000D+00 -1.0025047047991D+00 +401 4.0000000000000D+00 -9.9999856298837D-01 +402 4.0100000000000D+00 -9.9750494345563D-01 +403 4.0200000000000D+00 -9.9502375105140D-01 +404 4.0300000000000D+00 -9.9255489136170D-01 +405 4.0400000000000D+00 -9.9009827072064D-01 +406 4.0500000000000D+00 -9.8765379622582D-01 +407 4.0600000000000D+00 -9.8522137575306D-01 +408 4.0700000000000D+00 -9.8280091797038D-01 +409 4.0800000000000D+00 -9.8039233235815D-01 +410 4.0900000000000D+00 -9.7799552922444D-01 +411 4.1000000000000D+00 -9.7561041971754D-01 +412 4.1100000000000D+00 -9.7323691584291D-01 +413 4.1200000000000D+00 -9.7087493047377D-01 +414 4.1300000000000D+00 -9.6852437737739D-01 +415 4.1400000000000D+00 -9.6618517122148D-01 +416 4.1500000000000D+00 -9.6385722758267D-01 +417 4.1600000000000D+00 -9.6154046295929D-01 +418 4.1700000000000D+00 -9.5923479477430D-01 +419 4.1800000000000D+00 -9.5694014140158D-01 +420 4.1900000000000D+00 -9.5465642215911D-01 +421 4.2000000000000D+00 -9.5238355731074D-01 +422 4.2100000000000D+00 -9.5012146807082D-01 +423 4.2200000000000D+00 -9.4787007659775D-01 +424 4.2300000000000D+00 -9.4562930601251D-01 +425 4.2400000000000D+00 -9.4339908038116D-01 +426 4.2500000000000D+00 -9.4117932470699D-01 +427 4.2600000000000D+00 -9.3896996492549D-01 +428 4.2700000000000D+00 -9.3677092788940D-01 +429 4.2800000000000D+00 -9.3458214137290D-01 +430 4.2900000000000D+00 -9.3240353404946D-01 +431 4.3000000000000D+00 -9.3023503547301D-01 +432 4.3100000000000D+00 -9.2807657606414D-01 +433 4.3200000000000D+00 -9.2592808708911D-01 +434 4.3300000000000D+00 -9.2378950064763D-01 +435 4.3400000000000D+00 -9.2166074965027D-01 +436 4.3500000000000D+00 -9.1954176779178D-01 +437 4.3600000000000D+00 -9.1743248953030D-01 +438 4.3700000000000D+00 -9.1533285011237D-01 +439 4.3800000000000D+00 -9.1324278546807D-01 +440 4.3900000000000D+00 -9.1116223208674D-01 +441 4.4000000000000D+00 -9.0909112721122D-01 +442 4.4100000000000D+00 -9.0702940874041D-01 +443 4.4200000000000D+00 -9.0497701483863D-01 +444 4.4300000000000D+00 -9.0293388289723D-01 +445 4.4400000000000D+00 -9.0089995557726D-01 +446 4.4500000000000D+00 -8.9887517373311D-01 +447 4.4600000000000D+00 -8.9685947843264D-01 +448 4.4700000000000D+00 -8.9485281081148D-01 +449 4.4800000000000D+00 -8.9285512298079D-01 +450 4.4900000000000D+00 -8.9086634420537D-01 +451 4.5000000000000D+00 -8.8888641008612D-01 +452 4.5100000000000D+00 -8.8691525980960D-01 +453 4.5200000000000D+00 -8.8495283475249D-01 +454 4.5300000000000D+00 -8.8299906587739D-01 +455 4.5400000000000D+00 -8.8105390272881D-01 +456 4.5500000000000D+00 -8.7911731889557D-01 +457 4.5600000000000D+00 -8.7718927489485D-01 +458 4.5700000000000D+00 -8.7526973143919D-01 +459 4.5800000000000D+00 -8.7335864859865D-01 +460 4.5900000000000D+00 -8.7145599970214D-01 +461 4.6000000000000D+00 -8.6956171373059D-01 +462 4.6100000000000D+00 -8.6767573278888D-01 +463 4.6200000000000D+00 -8.6579799437163D-01 +464 4.6300000000000D+00 -8.6392843165405D-01 +465 4.6400000000000D+00 -8.6206698863507D-01 +466 4.6500000000000D+00 -8.6021358568378D-01 +467 4.6600000000000D+00 -8.5836812837457D-01 +468 4.6700000000000D+00 -8.5653053542921D-01 +469 4.6800000000000D+00 -8.5470072898854D-01 +470 4.6900000000000D+00 -8.5287863694931D-01 +471 4.7000000000000D+00 -8.5106413085690D-01 +472 4.7100000000000D+00 -8.4925723487611D-01 +473 4.7200000000000D+00 -8.4745792021659D-01 +474 4.7300000000000D+00 -8.4566616235329D-01 +475 4.7400000000000D+00 -8.4388193947151D-01 +476 4.7500000000000D+00 -8.4210525092295D-01 +477 4.7600000000000D+00 -8.4033608410364D-01 +478 4.7700000000000D+00 -8.3857435723889D-01 +479 4.7800000000000D+00 -8.3682002252840D-01 +480 4.7900000000000D+00 -8.3507302920262D-01 +481 4.8000000000000D+00 -8.3333332461016D-01 +482 4.8100000000000D+00 -8.3160083837939D-01 +483 4.8200000000000D+00 -8.2987552978152D-01 +484 4.8300000000000D+00 -8.2815736235784D-01 +485 4.8400000000000D+00 -8.2644629183529D-01 +486 4.8500000000000D+00 -8.2474227488498D-01 +487 4.8600000000000D+00 -8.2304526896151D-01 +488 4.8700000000000D+00 -8.2135523656393D-01 +489 4.8800000000000D+00 -8.1967213116655D-01 +490 4.8900000000000D+00 -8.1799590976463D-01 +491 4.9000000000000D+00 -8.1632653020919D-01 +492 4.9100000000000D+00 -8.1466395067180D-01 +493 4.9200000000000D+00 -8.1300812963302D-01 +494 4.9300000000000D+00 -8.1135902572514D-01 +495 4.9400000000000D+00 -8.0971659835875D-01 +496 4.9500000000000D+00 -8.0808080706951D-01 +497 4.9600000000000D+00 -8.0645161171921D-01 +498 4.9700000000000D+00 -8.0482897249251D-01 +499 4.9800000000000D+00 -8.0321284989344D-01 +500 4.9900000000000D+00 -8.0160320474160D-01 +501 5.0000000000000D+00 -7.9999999817337D-01 +502 5.0100000000000D+00 -7.9840319163382D-01 +503 5.0200000000000D+00 -7.9681274687525D-01 +504 5.0300000000000D+00 -7.9522862595409D-01 +505 5.0400000000000D+00 -7.9365079122797D-01 +506 5.0500000000000D+00 -7.9207920535265D-01 +507 5.0600000000000D+00 -7.9051383127913D-01 +508 5.0700000000000D+00 -7.8895463225074D-01 +509 5.0800000000000D+00 -7.8740157180022D-01 +510 5.0900000000000D+00 -7.8585461374690D-01 +511 5.1000000000000D+00 -7.8431372219390D-01 +512 5.1100000000000D+00 -7.8277886152533D-01 +513 5.1200000000000D+00 -7.8124999640358D-01 +514 5.1300000000000D+00 -7.7972709176660D-01 +515 5.1400000000000D+00 -7.7821011282517D-01 +516 5.1500000000000D+00 -7.7669902506031D-01 +517 5.1600000000000D+00 -7.7519379422065D-01 +518 5.1700000000000D+00 -7.7369438631979D-01 +519 5.1800000000000D+00 -7.7220076763383D-01 +520 5.1900000000000D+00 -7.7071290469879D-01 +521 5.2000000000000D+00 -7.6923076430809D-01 +522 5.2100000000000D+00 -7.6775431351014D-01 +523 5.2200000000000D+00 -7.6628351960582D-01 +524 5.2300000000000D+00 -7.6481835014614D-01 +525 5.2400000000000D+00 -7.6335877292981D-01 +526 5.2500000000000D+00 -7.6190475600091D-01 +527 5.2600000000000D+00 -7.6045626764652D-01 +528 5.2700000000000D+00 -7.5901327639447D-01 +529 5.2800000000000D+00 -7.5757575101097D-01 +530 5.2900000000000D+00 -7.5614366049844D-01 +531 5.3000000000000D+00 -7.5471697409327D-01 +532 5.3100000000000D+00 -7.5329566126359D-01 +533 5.3200000000000D+00 -7.5187969170709D-01 +534 5.3300000000000D+00 -7.5046903534888D-01 +535 5.3400000000000D+00 -7.4906366233939D-01 +536 5.3500000000000D+00 -7.4766354305218D-01 +537 5.3600000000000D+00 -7.4626864808195D-01 +538 5.3700000000000D+00 -7.4487894824244D-01 +539 5.3800000000000D+00 -7.4349441456438D-01 +540 5.3900000000000D+00 -7.4211501829352D-01 +541 5.4000000000000D+00 -7.4074073088858D-01 +542 5.4100000000000D+00 -7.3937152401934D-01 +543 5.4200000000000D+00 -7.3800736956465D-01 +544 5.4300000000000D+00 -7.3664823961052D-01 +545 5.4400000000000D+00 -7.3529410644824D-01 +546 5.4500000000000D+00 -7.3394494257246D-01 +547 5.4600000000000D+00 -7.3260072067935D-01 +548 5.4700000000000D+00 -7.3126141366473D-01 +549 5.4800000000000D+00 -7.2992699462228D-01 +550 5.4900000000000D+00 -7.2859743684171D-01 +551 5.5000000000000D+00 -7.2727271380704D-01 +552 5.5100000000000D+00 -7.2595279919474D-01 +553 5.5200000000000D+00 -7.2463766687206D-01 +554 5.5300000000000D+00 -7.2332729089528D-01 +555 5.5400000000000D+00 -7.2202164550800D-01 +556 5.5500000000000D+00 -7.2072070513945D-01 +557 5.5600000000000D+00 -7.1942444440285D-01 +558 5.5700000000000D+00 -7.1813283809372D-01 +559 5.5800000000000D+00 -7.1684586118827D-01 +560 5.5900000000000D+00 -7.1556348884178D-01 +561 5.6000000000000D+00 -7.1428569638700D-01 +562 5.6100000000000D+00 -7.1301245933254D-01 +563 5.6200000000000D+00 -7.1174375336134D-01 +564 5.6300000000000D+00 -7.1047955432914D-01 +565 5.6400000000000D+00 -7.0921983826291D-01 +566 5.6500000000000D+00 -7.0796458135933D-01 +567 5.6600000000000D+00 -7.0671375998331D-01 +568 5.6700000000000D+00 -7.0546735066652D-01 +569 5.6800000000000D+00 -7.0422533010587D-01 +570 5.6900000000000D+00 -7.0298767516211D-01 +571 5.7000000000000D+00 -7.0175436285840D-01 +572 5.7100000000000D+00 -7.0052537037883D-01 +573 5.7200000000000D+00 -6.9930067506706D-01 +574 5.7300000000000D+00 -6.9808025442490D-01 +575 5.7400000000000D+00 -6.9686408611097D-01 +576 5.7500000000000D+00 -6.9565214793927D-01 +577 5.7600000000000D+00 -6.9444441787791D-01 +578 5.7700000000000D+00 -6.9324087404774D-01 +579 5.7800000000000D+00 -6.9204149472100D-01 +580 5.7900000000000D+00 -6.9084625832005D-01 +581 5.8000000000000D+00 -6.8965514341608D-01 +582 5.8100000000000D+00 -6.8846812872778D-01 +583 5.8200000000000D+00 -6.8728519312013D-01 +584 5.8300000000000D+00 -6.8610631560311D-01 +585 5.8400000000000D+00 -6.8493147533048D-01 +586 5.8500000000000D+00 -6.8376065159854D-01 +587 5.8600000000000D+00 -6.8259382384492D-01 +588 5.8700000000000D+00 -6.8143097164734D-01 +589 5.8800000000000D+00 -6.8027207472249D-01 +590 5.8900000000000D+00 -6.7911711292477D-01 +591 5.9000000000000D+00 -6.7796606624519D-01 +592 5.9100000000000D+00 -6.7681891481019D-01 +593 5.9200000000000D+00 -6.7567563888046D-01 +594 5.9300000000000D+00 -6.7453621884989D-01 +595 5.9400000000000D+00 -6.7340063524434D-01 +596 5.9500000000000D+00 -6.7226886872065D-01 +597 5.9600000000000D+00 -6.7114090006542D-01 +598 5.9700000000000D+00 -6.7001671019404D-01 +599 5.9800000000000D+00 -6.6889628014952D-01 +600 5.9900000000000D+00 -6.6777959110148D-01 +1 6.8404979429576D-02 -1.6347856419948D-02 5.7526817101318D-03 -3.5616832413256D-05 +1 0.0000000000000D+00 2.4541796608823D-08 -3.4068597318249D-09 -1.3917807323294D-08 1.5080914322896D-08 +2 1.0000000000000D-02 1.6309708797554D-03 5.6452408462667D-04 -1.2598897022026D-03 2.7214554269332D-03 +3 2.0000000000000D-02 6.4825693901938D-03 2.2622853353371D-03 -5.0145542803888D-03 1.0851403146981D-02 +4 3.0000000000000D-02 1.4431649779310D-02 5.1057415238145D-03 -1.1189435465644D-02 2.4287114040974D-02 +5 4.0000000000000D-02 2.5275610395503D-02 9.1152935009864D-03 -1.9661779155185D-02 4.2859119495131D-02 +6 5.0000000000000D-02 3.8736306195757D-02 1.4318748892273D-02 -3.0262871926177D-02 6.6333801195377D-02 +7 6.0000000000000D-02 5.4465428346497D-02 2.0750584839347D-02 -4.2781116641087D-02 9.4416957216120D-02 +8 7.0000000000000D-02 7.2051255029006D-02 2.8451023085115D-02 -5.6965892781600D-02 1.2675828596111D-01 +9 8.0000000000000D-02 9.1026653019474D-02 3.7464934105490D-02 -7.2532133230309D-02 1.6295671443308D-01 +10 9.0000000000000D-02 1.1087818714691D-01 4.7840590114731D-02 -8.9165536485519D-02 2.0256648353415D-01 +11 1.0000000000000D-01 1.3105617472499D-01 5.9628289562724D-02 -1.0652832195346D-01 2.4510389067803D-01 +12 1.1000000000000D-01 1.5098550485861D-01 7.2878878144735D-02 -1.2426542621158D-01 2.9005457920523D-01 +13 1.2000000000000D-01 1.7007702843905D-01 8.7642193324354D-02 -1.4201103015989D-01 3.3688125523859D-01 +14 1.3000000000000D-01 1.8773931391102D-01 1.0396546088702D-01 -1.5939530088874D-01 3.8503170555451D-01 +15 1.4000000000000D-01 2.0339055670966D-01 1.2189167307745D-01 -1.7605122802776D-01 4.3394698521511D-01 +16 1.5000000000000D-01 2.1647042675999D-01 1.4145797839674D-01 -1.9162143235358D-01 4.8306964099403D-01 +17 1.6000000000000D-01 2.2645163866590D-01 1.6269411315241D-01 -2.0576482457037D-01 5.3185183607117D-01 +18 1.7000000000000D-01 2.3285103320380D-01 1.8562090434720D-01 -2.1816299444159D-01 5.7976324324175D-01 +19 1.8000000000000D-01 2.3523996641302D-01 2.1024887247742D-01 -2.2852621480495D-01 6.2629857780796D-01 +20 1.9000000000000D-01 2.3325381381515D-01 2.3657696131108D-01 -2.3659895137523D-01 6.7098464731621D-01 +21 2.0000000000000D-01 2.2660041192929D-01 2.6459141972840D-01 -2.4216477753337D-01 7.1338680349052D-01 +22 2.1000000000000D-01 2.1506727701840D-01 2.9426485830111D-01 -2.4505060337231D-01 7.5311469167562D-01 +23 2.2000000000000D-01 1.9852746162780D-01 3.2555550046593D-01 -2.4513013995348D-01 7.8982720490018D-01 +24 2.3000000000000D-01 1.7694393260232D-01 3.5840664498444D-01 -2.4232653282714D-01 8.2323656295385D-01 +25 2.4000000000000D-01 1.5037237951729D-01 3.9274635290964D-01 -2.3661411317341D-01 8.5311145164720D-01 +26 2.5000000000000D-01 1.1896238939531D-01 4.2848736856949D-01 -2.2801923016607D-01 8.7927917308482D-01 +27 2.6000000000000D-01 8.2956951761958D-02 4.6552728018047D-01 -2.1662014411950D-01 9.0162677453804D-01 +28 2.7000000000000D-01 4.2690287032284D-02 5.0374892169261D-01 -2.0254597635032D-01 9.2010114061544D-01 +29 2.8000000000000D-01 -1.4159795673414D-03 5.4302101340230D-01 -1.8597472821547D-01 9.3470805102518D-01 +30 2.9000000000000D-01 -4.8858247352634D-02 5.8319903481936D-01 -1.6713039817462D-01 9.4551022368446D-01 +31 3.0000000000000D-01 -9.9057893360199D-02 6.2412631931422D-01 -1.4627924170231D-01 9.5262438020177D-01 +32 3.1000000000000D-01 -1.5136964284719D-01 6.6563535625612D-01 -1.2372523415569D-01 9.5621738739740D-01 +33 3.2000000000000D-01 -2.0509122522741D-01 7.0754928275418D-01 -9.9804811034102D-02 9.5650154440278D-01 +34 3.3000000000000D-01 -2.5947416029717D-01 7.4968354379517D-01 -7.4880973188779D-02 9.5372909956476D-01 +35 3.4000000000000D-01 -3.1373549886055D-01 7.9184769658052D-01 -4.9336856225904D-02 9.4818609473407D-01 +36 3.5000000000000D-01 -3.6707032400876D-01 8.3384733226265D-01 -2.3568873396249D-02 9.4018564633790D-01 +37 3.6000000000000D-01 -4.1866480465704D-01 8.7548608610436D-01 2.0204505127327D-03 9.3006078262774D-01 +38 3.7000000000000D-01 -4.6770958176632D-01 9.1656770538179D-01 2.7029830516649D-02 9.1815696448072D-01 +39 3.8000000000000D-01 -5.1341326017437D-01 9.5689814313991D-01 5.1066630070036D-02 9.0482442317657D-01 +40 3.9000000000000D-01 -5.5501577529243D-01 9.9628764522681D-01 7.3754197077034D-02 8.9041045219537D-01 +41 4.0000000000000D-01 -5.9180140415980D-01 1.0345527978794D+00 9.4738997573879D-02 8.7525179163969D-01 +42 4.1000000000000D-01 -6.2311119451927D-01 1.0715185035262D+00 1.1369741983729D-01 8.5966724293814D-01 +43 4.2000000000000D-01 -6.4835459362432D-01 1.1070198533968D+00 1.3034212631923D-01 8.4395064836930D-01 +44 4.3000000000000D-01 -6.6702007031015D-01 1.1409038669860D+00 1.4442783759301D-01 8.2836436444328D-01 +45 4.4000000000000D-01 -6.7868453926768D-01 1.1730310703698D+00 1.5575644130752D-01 8.1313335057223D-01 +46 4.5000000000000D-01 -6.8302141522727D-01 1.2032768878089D+00 1.6418132985629D-01 7.9843998464871D-01 +47 4.6000000000000D-01 -6.7980714657732D-01 1.2315328239387D+00 1.6961088289719D-01 7.8441970553920D-01 +48 4.7000000000000D-01 -6.6892610247614D-01 1.2577074171062D+00 1.7201102482110D-01 7.7115756897248D-01 +49 4.8000000000000D-01 -6.5037371435867D-01 1.2817269480173D+00 1.7140680252100D-01 7.5868578837181D-01 +50 4.9000000000000D-01 -6.2425780146281D-01 1.3035358917397D+00 1.6788294512730D-01 7.4698231578137D-01 +51 5.0000000000000D-01 -5.9079804012612D-01 1.3230971052141D+00 1.6158338446170D-01 7.3597050072863D-01 +52 5.1000000000000D-01 -5.5032356763834D-01 1.3403917466872D+00 1.5270973255462D-01 7.2551984663277D-01 +53 5.2000000000000D-01 -5.0326874287046D-01 1.3554189278253D+00 1.4151873036832D-01 7.1544786575885D-01 +54 5.3000000000000D-01 -4.5016711720730D-01 1.3681951036324D+00 1.2831869957950D-01 7.0552301482057D-01 +55 5.4000000000000D-01 -3.9164369993083D-01 1.3787532095946D+00 1.1346504657223D-01 6.9546867467818D-01 +56 5.5000000000000D-01 -3.2840563171355D-01 1.3871415596612D+00 9.7354884449750D-02 6.8496811916949D-01 +57 5.6000000000000D-01 -2.6123140764305D-01 1.3934225226457D+00 8.0420854512365D-02 6.7367040060033D-01 +58 5.7000000000000D-01 -1.9095881686096D-01 1.3976709983494D+00 6.3124243081381D-02 6.6119706286356D-01 +59 5.8000000000000D-01 -1.1847178895691D-01 1.3999727181095D+00 4.5947502486427D-02 6.4714957780915D-01 +60 5.9000000000000D-01 -4.4686357292625D-02 1.4004223974745D+00 2.9386296235246D-02 6.3111738687380D-01 +61 6.0000000000000D-01 2.9464033848301D-02 1.3991217712923D+00 1.3941197694032D-02 6.1268641798235D-01 +62 6.1000000000000D-01 1.0304363836225D-01 1.3961775435901D+00 1.0917880263661D-04 5.9144793786271D-01 +63 6.2000000000000D-01 1.7512968460763D-01 1.3916992862019D+00 -1.1624969668470D-02 5.6700759217747D-01 +64 6.3000000000000D-01 2.4482756473948D-01 1.3857973211406D+00 -2.0797142160808D-02 5.3899448042287D-01 +65 6.4000000000000D-01 3.1128568209621D-01 1.3785806221724D+00 -2.6972202247608D-02 5.0707010966609D-01 +66 6.5000000000000D-01 3.7370970502305D-01 1.3701547709459D+00 -2.9751904159167D-02 4.7093707061991D-01 +67 6.6000000000000D-01 4.3137598312842D-01 1.3606200023398D+00 -2.8782314207163D-02 4.3034728173726D-01 +68 6.7000000000000D-01 4.8364389362698D-01 1.3500693724353D+00 -2.3760601249717D-02 3.8510965153265D-01 +69 6.8000000000000D-01 5.2996690117461D-01 1.3385870807006D+00 -1.4441074521423D-02 3.3509701648503D-01 +70 6.9000000000000D-01 5.6990213397746D-01 1.3262469756320D+00 -6.4035838075695D-04 2.8025222136170D-01 +71 7.0000000000000D-01 6.0311830179083D-01 1.3131112702626D+00 1.7758393290207D-02 2.2059322051678D-01 +72 7.1000000000000D-01 6.2940180735325D-01 1.2992294906559D+00 4.0802325366083D-02 1.5621709262645D-01 +73 7.2000000000000D-01 6.4866093146840D-01 1.2846376768098D+00 6.8466818302532D-02 8.7302877043536D-02 +74 7.3000000000000D-01 6.6092800273662D-01 1.2693578513642D+00 1.0065458171016D-01 1.4113157422125D-02 +75 7.4000000000000D-01 6.6635949556962D-01 1.2533977671828D+00 1.3719593420126D-01 -6.3005662896642D-02 +76 7.5000000000000D-01 6.6523403389758D-01 1.2367509403593D+00 1.7785027972104D-01 -1.4362442930838D-01 +77 7.6000000000000D-01 6.5794831242743D-01 1.2193969705224D+00 2.2230877090868D-01 -2.2723366290947D-01 +78 7.7000000000000D-01 6.4501098198362D-01 1.2013021455690D+00 2.7019813026623D-01 -3.1324733942065D-01 +79 7.8000000000000D-01 6.2703457949335D-01 1.1824203232373D+00 3.2108558054083D-01 -4.0100799204548D-01 +80 7.9000000000000D-01 6.0472561631914D-01 1.1626940772778D+00 3.7448481688876D-01 -4.8979308888179D-01 +81 8.0000000000000D-01 5.7887297015722D-01 1.1420560915047D+00 4.2986293550832D-01 -5.7882261471333D-01 +82 8.1000000000000D-01 5.5033475514145D-01 1.1204307807553D+00 4.8664821677011D-01 -6.6726776700893D-01 +83 8.2000000000000D-01 5.2002387160928D-01 1.0977361138426D+00 5.4423864572508D-01 -7.5426065709980D-01 +84 8.3000000000000D-01 4.8889246074123D-01 1.0738856100096D+00 6.0201103949734D-01 -8.3890489013969D-01 +85 8.4000000000000D-01 4.5791550956428D-01 1.0487904772495D+00 6.5933063970125D-01 -9.2028688181224D-01 +86 8.5000000000000D-01 4.2807386825517D-01 1.0223618581885D+00 7.1556101886366D-01 -9.9748775609419D-01 +87 8.6000000000000D-01 4.0033695398860D-01 9.9451314710102D-01 7.7007414305445D-01 -1.0695956570217D+00 +88 8.7000000000000D-01 3.7564542352174D-01 9.6516234004878D-01 8.2226042865736D-01 -1.1357182983713D+00 +89 8.8000000000000D-01 3.5489410011149D-01 9.3423437917675D-01 8.7153862954835D-01 -1.1949955689104D+00 +90 8.9000000000000D-01 3.3891543915211D-01 9.0166345183078D-01 9.1736539192593D-01 -1.2466120070980D+00 +91 9.0000000000000D-01 3.2846381106120D-01 8.6739520543760D-01 9.5924431768482D-01 -1.2898089583955D+00 +92 9.1000000000000D-01 3.2420086950112D-01 8.3138883998384D-01 9.9673438348100D-01 -1.3238962302960D+00 +93 9.2000000000000D-01 3.2668225813374D-01 7.9361904143420D-01 1.0294575714428D+00 -1.3482630650273D+00 +94 9.3000000000000D-01 3.3634588996499D-01 7.5407772154124D-01 1.0571055787102D+00 -1.3623882575705D+00 +95 9.4000000000000D-01 3.5350201022763D-01 7.1277553217142D-01 1.0794454864678D+00 -1.3658492569625D+00 +96 9.5000000000000D-01 3.7832522701683D-01 6.6974312546807D-01 1.0963242846898D+00 -1.3583301017721D+00 +97 9.6000000000000D-01 4.1084866393066D-01 6.2503213485659D-01 1.1076721661890D+00 -1.3396280559701D+00 +98 9.7000000000000D-01 4.5096035634031D-01 5.7871585599107D-01 1.1135045224446D+00 -1.3096588288486D+00 +99 9.8000000000000D-01 4.9840197736140D-01 5.3088961128488D-01 1.1139225942233D+00 -1.2684602824447D+00 +100 9.9000000000000D-01 5.5276994420698D-01 4.8167078626248D-01 1.1091127504165D+00 -1.2161945502200D+00 +101 1.0000000000000D+00 6.1351891624169D-01 4.3119853115786D-01 1.0993443911872D+00 -1.1531485141257D+00 +102 1.0100000000000D+00 6.7996765861276D-01 3.7963312619654D-01 1.0849664930483D+00 -1.0797326100994D+00 +103 1.0200000000000D+00 7.5130720680848D-01 3.2715501422580D-01 1.0664028356215D+00 -9.9647795631858D-01 +104 1.0300000000000D+00 8.2661122996620D-01 2.7396350952999D-01 1.0441459713434D+00 -9.0403182295547D-01 +105 1.0400000000000D+00 9.0484845402092D-01 2.2027519681638D-01 1.0187500204166D+00 -8.0315148689873D-01 +106 1.0500000000000D+00 9.8489697217568D-01 1.6632203914959D-01 9.9082239251573D-01 -6.9469653836277D-01 +107 1.0600000000000D+00 1.0655602380474D+00 1.1234921828387D-01 9.6101455508380D-01 -5.7961972951673D-01 +108 1.0700000000000D+00 1.1455845069371D+00 5.8612735309753D-02 9.3001198507537D-01 -4.5895647813553D-01 +109 1.0800000000000D+00 1.2236774664620D+00 5.3768032616392D-03 8.9852345473219D-01 -3.3381315882376D-01 +110 1.0900000000000D+00 1.2985277753342D+00 -4.7088933060519D-02 8.6726981465728D-01 -2.0535433394485D-01 +111 1.1000000000000D+00 1.3688252128578D+00 -9.8512312038393D-02 8.3697244654772D-01 -7.4789092090508D-02 +112 1.1100000000000D+00 1.4332811279204D+00 -1.4862166441620D-01 8.0834156561822D-01 5.6643323137418D-02 +113 1.1200000000000D+00 1.4906488686262D+00 -1.9714887440338D-01 7.8206455684122D-01 1.8768839926925D-01 +114 1.1300000000000D+00 1.5397438713483D+00 -2.4383244936763D-01 7.5879453021622D-01 3.1709155305604D-01 +115 1.1400000000000D+00 1.5794630909516D+00 -2.8842055438650D-01 7.3913927825461D-01 4.4361343169141D-01 +116 1.1500000000000D+00 1.6088034581609D+00 -3.3067396783752D-01 7.2365081617353D-01 5.6604510469277D-01 +117 1.1600000000000D+00 1.6268790655908D+00 -3.7036891532906D-01 7.1281567596887D-01 6.8322293437092D-01 +118 1.1700000000000D+00 1.6329368006707D+00 -4.0729974086577D-01 7.0704611564831D-01 7.9404291701735D-01 +119 1.1800000000000D+00 1.6263701645244D+00 -4.4128137620433D-01 7.0667239261726D-01 8.9747429293698D-01 +120 1.1900000000000D+00 1.6067310388818D+00 -4.7215157173160D-01 7.1193623666963D-01 9.9257223102274D-01 +121 1.2000000000000D+00 1.5737391988005D+00 -4.9977285621530D-01 7.2298563715235D-01 1.0784894085645D+00 +122 1.2100000000000D+00 1.5272894051605D+00 -5.2403419705733D-01 7.3987103777519D-01 1.1544863243102D+00 +123 1.2200000000000D+00 1.4674559280696D+00 -5.4485233461395D-01 7.6254302248922D-01 1.2199401900293D+00 +124 1.2300000000000D+00 1.3944944151417D+00 -5.6217277174914D-01 7.9085153928991D-01 1.2743522776039D+00 +125 1.2400000000000D+00 1.3088410514582D+00 -5.7597040400784D-01 8.2454668974920D-01 1.3173536178323D+00 +126 1.2500000000000D+00 1.2111089861998D+00 -5.8624977927911D-01 8.6328109570304D-01 1.3487089621560D+00 +127 1.2600000000000D+00 1.1020820579323D+00 -5.9304498306247D-01 9.0661382144179D-01 1.3683189509471D+00 +128 1.2700000000000D+00 9.8270589818456D-01 -5.9641915184788D-01 9.5401580219029D-01 1.3762204627150D+00 +129 1.2800000000000D+00 8.5407651122443D-01 -5.9646361953298D-01 1.0048767190852D+00 1.3725851299653D+00 +130 1.2900000000000D+00 7.1742648357897D-01 -5.9329670917341D-01 1.0585132286480D+00 1.3577160422924D+00 +131 1.3000000000000D+00 5.7410902590564D-01 -5.8706218941589D-01 1.1141784264910D+00 1.3320426939430D+00 +132 1.3100000000000D+00 4.2558005233778D-01 -5.7792741528824D-01 1.1710724235308D+00 1.2961142345652D+00 +133 1.3200000000000D+00 2.7337856199674D-01 -5.6608118138222D-01 1.2283538786194D+00 1.2505911242098D+00 +134 1.3300000000000D+00 1.1910561530262D-01 -5.5173132025365D-01 1.2851523155925D+00 1.1962353227582D+00 +135 1.3400000000000D+00 -3.5597807275619D-02 -5.3510207775590D-01 1.3405810555144D+00 1.1338991360553D+00 +136 1.3500000000000D+00 -1.8907371818553D-01 -5.1643130629484D-01 1.3937505615873D+00 1.0645128941866D+00 +137 1.3600000000000D+00 -3.3967047563128D-01 -4.9596751615072D-01 1.4437820025599D+00 9.8907163917716D-01 +138 1.3700000000000D+00 -4.8576622620502D-01 -4.7396682649768D-01 1.4898208296642D+00 9.0862100112411D-01 +139 1.3800000000000D+00 -6.2579207780073D-01 -4.5068986247301D-01 1.5310501575417D+00 8.2424248427481D-01 +140 1.3900000000000D+00 -7.5825466218004D-01 -4.2639864105754D-01 1.5667037502889D+00 7.3703836101975D-01 +141 1.4000000000000D+00 -8.8175772052880D-01 -4.0135349314986D-01 1.5960783989474D+00 6.4811640084887D-01 +142 1.4100000000000D+00 -9.9502241692926D-01 -3.7581006271468D-01 1.6185455190947D+00 5.5857464655132D-01 +143 1.4200000000000D+00 -1.0969060192558D+00 -3.5001642984809D-01 1.6335617585026D+00 4.6948646371737D-01 +144 1.4300000000000D+00 -1.1864186930814D+00 -3.2421039554499D-01 1.6406784677194D+00 3.8188607375508D-01 +145 1.4400000000000D+00 -1.2627381405202D+00 -2.9861696603896D-01 1.6395498780920D+00 2.9675477087784D-01 +146 1.4500000000000D+00 -1.3252218051797D+00 -2.7344607716127D-01 1.6299398257147D+00 2.1500804340334D-01 +147 1.4600000000000D+00 -1.3734165493245D+00 -2.4889057808417D-01 1.6117269683013D+00 1.3748373401523D-01 +148 1.4700000000000D+00 -1.4070655001706D+00 -2.2512451769109D-01 1.5849083192194D+00 6.4931471115212D-02 +149 1.4800000000000D+00 -1.4261120958424D+00 -2.0230173893171D-01 1.5496011187440D+00 -1.9965498858146D-03 +150 1.4900000000000D+00 -1.4307011484942D+00 -1.8055481059089D-01 1.5060429375427D+00 -6.2753260117188D-02 +151 1.5000000000000D+00 -1.4211769377782D+00 -1.5999430378741D-01 1.4545900222399D+00 -1.1690279873172D-01 +152 1.5100000000000D+00 -1.3980783830139D+00 -1.4070841504498D-01 1.3957139134727D+00 -1.6412492992440D-01 +153 1.5200000000000D+00 -1.3621312440718D+00 -1.2276295111255D-01 1.3299963092201D+00 -2.0421767077896D-01 +154 1.5300000000000D+00 -1.3142376379775D+00 -1.0620164744434D-01 1.2581223437485D+00 -2.3709822237686D-01 +155 1.5400000000000D+00 -1.2554627867106D+00 -9.1046840356861D-02 1.1808722346717D+00 -2.6280205162973D-01 +156 1.5500000000000D+00 -1.1870194285137D+00 -7.7300445753382D-02 1.0991115536601D+00 -2.8148031122331D-01 +157 1.5600000000000D+00 -1.1102499009520D+00 -6.4945252103879D-02 1.0137801278574D+00 -2.9339552999743D-01 +158 1.5700000000000D+00 -1.0266063298223D+00 -5.3946482550185D-02 9.2587982788597D-01 -2.9891566319543D-01 +159 1.5800000000000D+00 -9.3762908860915D-01 -4.4253603392737D-02 8.3646134372694D-01 -2.9850689284795D-01 +160 1.5900000000000D+00 -8.4492393163356D-01 -3.5802345629169D-02 7.4661018423665D-01 -2.9272499719797D-01 +161 1.6000000000000D+00 -7.5013810291413D-01 -2.8516951976056D-02 6.5743206812355D-01 -2.8220363382947D-01 +162 1.6100000000000D+00 -6.5493576503818D-01 -2.2312462827530D-02 5.7003794897806D-01 -2.6764548753210D-01 +163 1.6200000000000D+00 -5.6097309992743D-01 -1.7097042478899D-02 4.8552887252739D-01 -2.4981506363635D-01 +164 1.6300000000000D+00 -4.6987352597012D-01 -1.2774421201704D-02 4.0498089567959D-01 -2.2952761258203D-01 +165 1.6400000000000D+00 -3.8320331488990D-01 -9.2463332189605D-03 3.2943025842628D-01 -2.0763810182565D-01 +166 1.6500000000000D+00 -3.0244812053420D-01 -6.4150243634111D-03 2.5985907843726D-01 -1.8502598082516D-01 +167 1.6600000000000D+00 -2.2899059409345D-01 -4.1857359727404D-03 1.9718169038233D-01 -1.6257814756639D-01 +168 1.6700000000000D+00 -1.6414562610220D-01 -2.4678539724060D-03 1.4228777182593D-01 -1.4135335217525D-01 +169 1.6800000000000D+00 -1.0887646385188D-01 -1.1826643048049D-03 9.5766812683412D-02 -1.2171870672880D-01 +170 1.6900000000000D+00 -6.3912794937924D-02 -2.6851184996440D-04 5.8006582152716D-02 -1.0332560993225D-01 +171 1.7000000000000D+00 -3.0956786885483D-02 3.7112826390160D-04 3.0520848196720D-02 -9.1080644195481D-02 +172 1.7100000000000D+00 -1.1039017694053D-02 8.2424911403912D-04 1.4290554572579D-02 -8.9431101558448D-02 +173 1.7200000000000D+00 -1.7662330417317D-03 9.5521495013686D-04 6.3200625304696D-03 -8.1617231872449D-02 +174 1.7300000000000D+00 7.7856156681922D-04 6.1203180213450D-04 2.2730633900928D-03 -4.8413252876845D-02 +175 1.7400000000000D+00 2.6403083239553D-04 1.0867319237183D-04 2.8650087409506D-04 -8.3359866636822D-03 +176 1.7500000000000D+00 -3.0178050765074D-04 -1.0384286028787D-04 -2.2966842566076D-04 7.8971725252777D-03 +177 1.7600000000000D+00 -1.4652668139642D-04 -4.4302443282971D-05 -8.1599692012792D-05 3.3348297593739D-03 +178 1.7700000000000D+00 4.5622898606845D-05 2.0962257302784D-05 6.0307562508017D-05 -1.6227631434035D-03 +179 1.7800000000000D+00 3.2859098823441D-05 1.3955841544960D-05 3.7845419485651D-05 -1.0754791094968D-03 +180 1.7900000000000D+00 1.8797466864675D-06 -2.0075697061638D-06 -1.1571637819780D-05 1.6771524489066D-04 +181 1.8000000000000D+00 1.8502979246342D-06 -1.9761184246874D-06 -1.1390352538827D-05 1.6508775984805D-04 +182 1.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +183 1.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +184 1.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +185 1.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +186 1.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +187 1.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +188 1.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +189 1.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +190 1.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +191 1.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +192 1.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +193 1.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +194 1.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +195 1.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +196 1.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +197 1.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +198 1.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +199 1.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +200 1.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +201 2.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +202 2.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +2 8.4947304878842D-04 1.1954942914139D-04 -4.0273577079822D-05 +1 0.0000000000000D+00 -1.2755907868606D-09 2.8309722474237D-09 -7.0262170005775D-09 +2 1.0000000000000D-02 2.1742757449013D-06 1.2758795599360D-05 -4.6472918102656D-05 +3 2.0000000000000D-02 1.7570599220190D-05 1.0162445114265D-04 -3.7058328160074D-04 +4 3.0000000000000D-02 6.0288789533814D-05 3.4048362688152D-04 -1.2439912572085D-03 +5 4.0000000000000D-02 1.4616469404217D-04 7.9882618387376D-04 -2.9265094592369D-03 +6 5.0000000000000D-02 2.9358977214068D-04 1.5396549768046D-03 -5.6604450159711D-03 +7 6.0000000000000D-02 5.2427349257609D-04 2.6175234284223D-03 -9.6652555597747D-03 +8 7.0000000000000D-02 8.6393106499045D-04 4.0767399567547D-03 -1.5132615717928D-02 +9 8.0000000000000D-02 1.3428803019975D-03 5.9497754953014D-03 -2.2221983654992D-02 +10 9.0000000000000D-02 1.9965330189850D-03 8.2559068113653D-03 -3.1056748903874D-02 +11 1.0000000000000D-01 2.8657682251310D-03 1.1000124155026D-02 -4.1721033072190D-02 +12 1.1000000000000D-01 3.9971764223704D-03 1.4172327315346D-02 -5.4257203780211D-02 +13 1.2000000000000D-01 5.4431666654381D-03 1.7746828821632D-02 -6.8664150767272D-02 +14 1.3000000000000D-01 7.2619303696356D-03 2.1682178053052D-02 -8.4896359403207D-02 +15 1.4000000000000D-01 9.5172585294478D-03 2.5921313889334D-02 -1.0286380435648D-01 +16 1.5000000000000D-01 1.2278211538139D-02 3.0392048111094D-02 -1.2243267144268D-01 +17 1.6000000000000D-01 1.5618643508621D-02 3.5007875653239D-02 -1.4342690201167D-01 +18 1.7000000000000D-01 1.9616585669821D-02 3.9669101957277D-02 -1.6563054021407D-01 +19 1.8000000000000D-01 2.4353495938480D-02 4.4264272087629D-02 -1.8879084929366D-01 +20 1.9000000000000D-01 2.9913384346811D-02 4.8671880523005D-02 -2.1262215028876D-01 +21 2.0000000000000D-01 3.6381826294917D-02 5.2762335616085D-02 -2.3681032334236D-01 +22 2.1000000000000D-01 4.3844877832141D-02 5.6400147625809D-02 -2.6101790070008D-01 +23 2.2000000000000D-01 5.2387909070551D-02 5.9446305217546D-02 -2.8488966930270D-01 +24 2.3000000000000D-01 6.2094373607206D-02 6.1760801323852D-02 -3.0805869210565D-01 +25 2.4000000000000D-01 7.3044533197909D-02 6.3205266379810D-02 -3.3015264889269D-01 +26 2.5000000000000D-01 8.5314158111171D-02 6.3645664194554D-02 -3.5080039167956D-01 +27 2.6000000000000D-01 9.8973224305939D-02 6.2955004461127D-02 -3.6963860434720D-01 +28 2.7000000000000D-01 1.1408462910654D-01 6.1016024504300D-02 -3.8631845416615D-01 +29 2.8000000000000D-01 1.3070294711537D-01 5.7723792950209D-02 -4.0051212142049D-01 +30 2.9000000000000D-01 1.4887324781616D-01 5.2988188644519D-02 -4.1191909409077D-01 +31 3.0000000000000D-01 1.6862999576018D-01 4.6736209439385D-02 -4.2027211755417D-01 +32 3.1000000000000D-01 1.8999605323218D-01 3.8914067698087D-02 -4.2534269363615D-01 +33 3.2000000000000D-01 2.1298180400004D-01 2.9489032358708D-02 -4.2694602954018D-01 +34 3.3000000000000D-01 2.3758441514883D-01 1.8450980841285D-02 -4.2494534543726D-01 +35 3.4000000000000D-01 2.6378725204805D-01 5.8136286461404D-03 -4.1925545847905D-01 +36 3.5000000000000D-01 2.9155945938106D-01 -8.3845909829422D-03 -4.0984557254893D-01 +37 3.6000000000000D-01 3.2085571870000D-01 -2.4080019420731D-02 -3.9674121486609D-01 +38 3.7000000000000D-01 3.5161619039907D-01 -4.1183653356523D-02 -3.8002527390837D-01 +39 3.8000000000000D-01 3.8376664517151D-01 -5.9581424018762D-02 -3.5983810711526D-01 +40 3.9000000000000D-01 4.1721878720003D-01 -7.9134878840538D-02 -3.3637670187470D-01 +41 4.0000000000000D-01 4.5187076833358D-01 -9.9682262902671D-02 -3.0989288827321D-01 +42 4.1000000000000D-01 4.8760788955630D-01 -1.2103999100355D-01 -2.8069061760273D-01 +43 4.2000000000000D-01 5.2430348299493D-01 -1.4300449461176D-01 -2.4912233549387D-01 +44 4.3000000000000D-01 5.6181996503493D-01 -1.6535442194871D-01 -2.1558449445711D-01 +45 4.4000000000000D-01 6.0001004808223D-01 -1.8785316302380D-01 -1.8051226385085D-01 +46 4.5000000000000D-01 6.3871809614916D-01 -2.1025166630067D-01 -1.4437351029469D-01 +47 4.6000000000000D-01 6.7778160682529D-01 -2.3229150795705D-01 -1.0766213291887D-01 +48 4.7000000000000D-01 7.1703280018709D-01 -2.5370817056899D-01 -7.0890850386163D-02 +49 4.8000000000000D-01 7.5630029326391D-01 -2.7423448384715D-01 -3.4583546224909D-02 +50 4.9000000000000D-01 7.9541083706797D-01 -2.9360417668624D-01 7.3271272778986D-04 +51 5.0000000000000D-01 8.3419109203039D-01 -3.1155548758796D-01 3.4535862600183D-02 +52 5.1000000000000D-01 8.7246941681307D-01 -3.2783477853555D-01 6.6317106817870D-02 +53 5.2000000000000D-01 9.1007764489386D-01 -3.4220009666326D-01 9.5589128873719D-02 +54 5.3000000000000D-01 9.4685282339971D-01 -3.5442462829932D-01 1.2189412222145D-01 +55 5.4000000000000D-01 9.8263888871992D-01 -3.6429999037001D-01 1.4481150832049D-01 +56 5.5000000000000D-01 1.0172882543671D+00 -3.7163930653452D-01 1.6396521551188D-01 +57 5.6000000000000D-01 1.0506632874930D+00 -3.7628001765230D-01 1.7903039744158D-01 +58 5.7000000000000D-01 1.0826376519148D+00 -3.7808637976671D-01 1.8973947664973D-01 +59 5.8000000000000D-01 1.1130974974424D+00 -3.7695160716785D-01 1.9588740740274D-01 +60 5.9000000000000D-01 1.1419424772789D+00 -3.7279962268850D-01 1.9733606341589D-01 +61 6.0000000000000D-01 1.1690865778530D+00 -3.6558638362042D-01 1.9401766717338D-01 +62 6.1000000000000D-01 1.1944587480882D+00 -3.5530075714526D-01 1.8593719237882D-01 +63 6.2000000000000D-01 1.2180033179773D+00 -3.4196492616718D-01 1.7317368565999D-01 +64 6.3000000000000D-01 1.2396801996773D+00 -3.2563431370752D-01 1.5588046881510D-01 +65 6.4000000000000D-01 1.2594648672832D+00 -3.0639702072253D-01 1.3428420107095D-01 +66 6.5000000000000D-01 1.2773481150968D+00 -2.8437278024487D-01 1.0868279670367D-01 +67 6.6000000000000D-01 1.2933355973598D+00 -2.5971143807047D-01 7.9442211644491D-02 +68 6.7000000000000D-01 1.3074471558696D+00 -2.3259097737079D-01 4.6992130382105D-02 +69 6.8000000000000D-01 1.3197159452771D+00 -2.0321511249763D-01 1.1820600816661D-02 +70 6.9000000000000D-01 1.3301873688994D+00 -1.7181048368282D-01 -2.5532317519144D-02 +71 7.0000000000000D-01 1.3389178409998D+00 -1.3862349090079D-01 -6.4481810758068D-02 +72 7.1000000000000D-01 1.3459733942757D+00 -1.0391681175233D-01 -1.0440637826166D-01 +73 7.2000000000000D-01 1.3514281537919D+00 -6.7965652844888D-02 -1.4465660025329D-01 +74 7.3000000000000D-01 1.3553627008633D+00 -3.1053789421485D-02 -1.8456448413173D-01 +75 7.4000000000000D-01 1.3578623523028D+00 6.5305482469221D-03 -2.2345325741703D-01 +76 7.5000000000000D-01 1.3590153819234D+00 4.4498880174796D-02 -2.6064746652420D-01 +77 7.6000000000000D-01 1.3589112123946D+00 8.2566710031289D-02 -2.9548323416221D-01 +78 7.7000000000000D-01 1.3576386061100D+00 1.2045772164282D-01 -3.2731852350353D-01 +79 7.8000000000000D-01 1.3552838841943D+00 1.5790787355390D-01 -3.5554325550218D-01 +80 7.9000000000000D-01 1.3519292024467D+00 1.9466932723972D-01 -3.7958912564882D-01 +81 8.0000000000000D-01 1.3476509124342D+00 2.3051414672815D-01 -3.9893896839484D-01 +82 8.1000000000000D-01 1.3425180349577D+00 2.6523770965067D-01 -4.1313552310675D-01 +83 8.2000000000000D-01 1.3365908715495D+00 2.9866177392744D-01 -4.2178946150158D-01 +84 8.3000000000000D-01 1.3299197778023D+00 3.3063714858743D-01 -4.2458654622031D-01 +85 8.4000000000000D-01 1.3225441200305D+00 3.6104592307108D-01 -4.2129380077706D-01 +86 8.5000000000000D-01 1.3144914342122D+00 3.8980321503760D-01 -4.1176458523014D-01 +87 8.6000000000000D-01 1.3057768030472D+00 4.1685840432332D-01 -3.9594248532482D-01 +88 8.7000000000000D-01 1.2964024639064D+00 4.4219582765393D-01 -3.7386394040021D-01 +89 8.8000000000000D-01 1.2863576568554D+00 4.6583491707033D-01 -3.4565955212326D-01 +90 8.9000000000000D-01 1.2756187185004D+00 4.8782977282282D-01 -3.1155403607844D-01 +91 9.0000000000000D-01 1.2641494233208D+00 5.0826817103140D-01 -2.7186479554236D-01 +92 9.1000000000000D-01 1.2519015706469D+00 5.2727001400347D-01 -2.2699911911516D-01 +93 9.2000000000000D-01 1.2388158114478D+00 5.4498524045026D-01 -1.7745002271604D-01 +94 9.3000000000000D-01 1.2248227052401D+00 5.6159122126194D-01 -1.2379077655211D-01 +95 9.4000000000000D-01 1.2098439938589D+00 5.7728967446157D-01 -6.6668178079123D-02 +96 9.5000000000000D-01 1.1937940752220D+00 5.9230314103890D-01 -6.7946504433427D-03 +97 9.6000000000000D-01 1.1765816568780D+00 6.0687107053033D-01 5.5060735903086D-02 +98 9.7000000000000D-01 1.1581115661519D+00 6.2124557175844D-01 1.1808220364006D-01 +99 9.8000000000000D-01 1.1382866908663D+00 6.3568689014132D-01 1.8141804108441D-01 +100 9.9000000000000D-01 1.1170100223214D+00 6.5045867783245D-01 2.4419206349313D-01 +101 1.0000000000000D+00 1.0941867701335D+00 6.6582312728176D-01 3.0551560789627D-01 +102 1.0100000000000D+00 1.0697265171061D+00 6.8203604142485D-01 3.6449989642698D-01 +103 1.0200000000000D+00 1.0435453811083D+00 6.9934191607895D-01 4.2026859653510D-01 +104 1.0300000000000D+00 1.0155681503637D+00 7.1796911086560D-01 4.7197040138832D-01 +105 1.0400000000000D+00 9.8573035849065D-01 7.3812518451268D-01 5.1879145124859D-01 +106 1.0500000000000D+00 9.5398026594422D-01 7.5999246927534D-01 5.5996741759298D-01 +107 1.0600000000000D+00 9.2028071541092D-01 7.8372395655643D-01 5.9479507384823D-01 +108 1.0700000000000D+00 8.8461083015828D-01 8.0943956193278D-01 6.2264318255058D-01 +109 1.0800000000000D+00 8.4696752611443D-01 8.3722283335340D-01 6.4296253652764D-01 +110 1.0900000000000D+00 8.0736681088270D-01 8.6711816024365D-01 6.5529500268195D-01 +111 1.1000000000000D+00 7.6584484549078D-01 8.9912853487128D-01 6.5928142896886D-01 +112 1.1100000000000D+00 7.2245874781423D-01 9.3321390972422D-01 6.5466828946565D-01 +113 1.1200000000000D+00 6.7728712027235D-01 9.6929018604860D-01 6.4131296066731D-01 +114 1.1300000000000D+00 6.3043028799112D-01 1.0072288601613D+00 6.1918753958360D-01 +115 1.1400000000000D+00 5.8201023786283D-01 1.0468573442246D+00 5.8838113512363D-01 +116 1.1500000000000D+00 5.3217025246885D-01 1.0879599699298D+00 5.4910058165053D-01 +117 1.1600000000000D+00 4.8107423818876D-01 1.1302796712437D+00 5.0166955099653D-01 +118 1.1700000000000D+00 4.2890575064671D-01 1.1735203335766D+00 4.4652605862630D-01 +119 1.1800000000000D+00 3.7586672498302D-01 1.2173497868388D+00 3.8421838183075D-01 +120 1.1900000000000D+00 3.2217592265193D-01 1.2614034103510D+00 3.1539943001180D-01 +121 1.2000000000000D+00 2.6806711136700D-01 1.3052883065559D+00 2.4081963270527D-01 +122 1.2100000000000D+00 2.1378699866681D-01 1.3485879920065D+00 1.6131843180149D-01 +123 1.2200000000000D+00 1.5959294194234D-01 1.3908675487558D+00 7.7814476631292D-02 +124 1.2300000000000D+00 1.0575046350545D-01 1.4316791668890D+00 -8.7053473345735D-03 +125 1.2400000000000D+00 5.2530601121170D-02 1.4705680051306D+00 -9.7197915219595D-02 +126 1.2500000000000D+00 2.0712667926457D-04 1.5070782916498D+00 -1.8657673164931D-01 +127 1.2600000000000D+00 -5.0946330879118D-02 1.5407595800253D+00 -2.7572549815925D-01 +128 1.2700000000000D+00 -1.0065922101518D-01 1.5711730733617D+00 -3.6351219673585D-01 +129 1.2800000000000D+00 -1.4866702740566D-01 1.5978979283723D+00 -4.4880350256969D-01 +130 1.2900000000000D+00 -1.9471420411120D-01 1.6205374474774D+00 -5.3047932738744D-01 +131 1.3000000000000D+00 -2.3855705315155D-01 1.6387250706335D+00 -6.0744729562520D-01 +132 1.3100000000000D+00 -2.7996650441446D-01 1.6521300783476D+00 -6.7865695472962D-01 +133 1.3200000000000D+00 -3.1873075893350D-01 1.6604629188155D+00 -7.4311351916479D-01 +134 1.3300000000000D+00 -3.5465776075371D-01 1.6634800828863D+00 -7.9989096458942D-01 +135 1.3400000000000D+00 -3.8757746074687D-01 1.6609884459339D+00 -8.4814427987856D-01 +136 1.3500000000000D+00 -4.1734384091856D-01 1.6528490095108D+00 -8.8712070686061D-01 +137 1.3600000000000D+00 -4.4383667274997D-01 1.6389799876316D+00 -9.1616982112294D-01 +138 1.3700000000000D+00 -4.6696297850266D-01 1.6193591716166D+00 -9.3475228395774D-01 +139 1.3800000000000D+00 -4.8665817953929D-01 1.5940255445871D+00 -9.4244716699080D-01 +140 1.3900000000000D+00 -5.0288691135390D-01 1.5630801057002D+00 -9.3895773126167D-01 +141 1.4000000000000D+00 -5.1564348967503D-01 1.5266858760772D+00 -9.2411556255288D-01 +142 1.4100000000000D+00 -5.2495202686818D-01 1.4850670934480D+00 -8.9788303897800D-01 +143 1.4200000000000D+00 -5.3086618436005D-01 1.4385075707743D+00 -8.6035403953044D-01 +144 1.4300000000000D+00 -5.3346857146763D-01 1.3873482523300D+00 -8.1175292431007D-01 +145 1.4400000000000D+00 -5.3286979288806D-01 1.3319839811369D+00 -7.5243177822201D-01 +146 1.4500000000000D+00 -5.2920715227116D-01 1.2728595045761D+00 -6.8286593294346D-01 +147 1.4600000000000D+00 -5.2264303797119D-01 1.2104647870562D+00 -6.0364788092534D-01 +148 1.4700000000000D+00 -5.1336299607989D-01 1.1453296513294D+00 -5.1547958464922D-01 +149 1.4800000000000D+00 -5.0157353025559D-01 1.0780178477727D+00 -4.1916336468285D-01 +150 1.4900000000000D+00 -4.8749964531291D-01 1.0091205998942D+00 -3.1559143205995D-01 +151 1.5000000000000D+00 -4.7138217223332D-01 9.3924972119801D-01 -2.0573423942352D-01 +152 1.5100000000000D+00 -4.5347490864453D-01 8.6903038874825D-01 -9.0627810665101D-02 +153 1.5200000000000D+00 -4.3404160940267D-01 7.9909366264189D-01 2.8639795360551D-02 +154 1.5300000000000D+00 -4.1335287197839D-01 7.3006885759576D-01 1.5094266219727D-01 +155 1.5400000000000D+00 -3.9168295230111D-01 6.6257585918343D-01 2.7513167572492D-01 +156 1.5500000000000D+00 -3.6930655792291D-01 5.9721749353478D-01 4.0004942942508D-01 +157 1.5600000000000D+00 -3.4649565664136D-01 5.3457204345516D-01 5.2454516239852D-01 +158 1.5700000000000D+00 -3.2351635171415D-01 4.7518604394430D-01 6.4748961090302D-01 +159 1.5800000000000D+00 -3.0062583717820D-01 4.1956734004037D-01 7.6778921053016D-01 +160 1.5900000000000D+00 -2.7806950320419D-01 3.6817862146532D-01 8.8439980040485D-01 +161 1.6000000000000D+00 -2.5607834851360D-01 3.2143204204316D-01 9.9634127841375D-01 +162 1.6100000000000D+00 -2.3486633360858D-01 2.7968327188224D-01 1.1027075898090D+00 +163 1.6200000000000D+00 -2.1462780495297D-01 2.4322548467348D-01 1.2026733483798D+00 +164 1.6300000000000D+00 -1.9553539885525D-01 2.1228498114072D-01 1.2955017587752D+00 +165 1.6400000000000D+00 -1.7773818603356D-01 1.8701739299387D-01 1.3805505899711D+00 +166 1.6500000000000D+00 -1.6136044569375D-01 1.6750600614447D-01 1.4572802649256D+00 +167 1.6600000000000D+00 -1.4650087686436D-01 1.5376142769523D-01 1.5252619877180D+00 +168 1.6700000000000D+00 -1.3323207547099D-01 1.4572172141397D-01 1.5841824799063D+00 +169 1.6800000000000D+00 -1.2160039887488D-01 1.4325362474493D-01 1.6338478086170D+00 +170 1.6900000000000D+00 -1.1162621555849D-01 1.4615471471594D-01 1.6741851615637D+00 +171 1.7000000000000D+00 -1.0330448793394D-01 1.5415641413382D-01 1.7052430600465D+00 +172 1.7100000000000D+00 -9.6605736805462D-02 1.6692793437075D-01 1.7271896275213D+00 +173 1.7200000000000D+00 -9.1477311145239D-02 1.8408096546433D-01 1.7403093094151D+00 +174 1.7300000000000D+00 -8.7845003169618D-02 2.0517519402922D-01 1.7449977564280D+00 +175 1.7400000000000D+00 -8.5614929288417D-02 2.2972445383797D-01 1.7417552915206D+00 +176 1.7500000000000D+00 -8.4675698992985D-02 2.5720354709763D-01 1.7311787765707D+00 +177 1.7600000000000D+00 -8.4900797800179D-02 2.8705555509981D-01 1.7139522672836D+00 +178 1.7700000000000D+00 -8.6151182665920D-02 3.1869962045245D-01 1.6908364064358D+00 +179 1.7800000000000D+00 -8.8278029079797D-02 3.5153905141095D-01 1.6626568749353D+00 +180 1.7900000000000D+00 -9.1125603039312D-02 3.8496967146100D-01 1.6302919933498D+00 +181 1.8000000000000D+00 -9.4534212540736D-02 4.1838830138334D-01 1.5946597095181D+00 +182 1.8100000000000D+00 -9.8343192463355D-02 4.5120125328224D-01 1.5567041812786D+00 +183 1.8200000000000D+00 -1.0239388683186D-01 4.8283274451729D-01 1.5173821316803D+00 +184 1.8300000000000D+00 -1.0653257908220D-01 5.1273310786060D-01 1.4776492267937D+00 +185 1.8400000000000D+00 -1.1061332687874D-01 5.4038668426264D-01 1.4384466733899D+00 +186 1.8500000000000D+00 -1.1451002336161D-01 5.6536496618831D-01 1.4007805209976D+00 +187 1.8600000000000D+00 -1.1833406294281D-01 5.8838374648003D-01 1.3678343839342D+00 +188 1.8700000000000D+00 -1.2130671519954D-01 6.0579383923441D-01 1.3337971793076D+00 +189 1.8800000000000D+00 -1.2174447460257D-01 6.0947160331860D-01 1.2838493913560D+00 +190 1.8900000000000D+00 -1.2423069423152D-01 6.2196452270653D-01 1.2642815819896D+00 +191 1.9000000000000D+00 -1.3439496999178D-01 6.7098288416197D-01 1.3310228185061D+00 +192 1.9100000000000D+00 -1.3962737117217D-01 6.9467343608005D-01 1.3619181193982D+00 +193 1.9200000000000D+00 -1.1509285146969D-01 5.7121027405243D-01 1.1149572442377D+00 +194 1.9300000000000D+00 -5.6259078377970D-02 2.7888201768545D-01 5.4339219032972D-01 +195 1.9400000000000D+00 -5.5952011777669D-04 2.7714188155769D-03 5.3959675783160D-03 +196 1.9500000000000D+00 1.3661282376863D-02 -6.7717873161380D-02 -1.3176664359989D-01 +197 1.9600000000000D+00 4.8944886482378D-03 -2.4256419969020D-02 -4.7181077259482D-02 +198 1.9700000000000D+00 -2.5944903924304D-03 1.2871469404247D-02 2.5065499552679D-02 +199 1.9800000000000D+00 -2.2866877622461D-03 1.1343889648389D-02 2.2086746877478D-02 +200 1.9900000000000D+00 1.6127434439125D-04 -8.0078021695166D-04 -1.5644183270728D-03 +201 2.0000000000000D+00 3.5403699901735D-04 -1.7579102612518D-03 -3.4342844289042D-03 +202 2.0100000000000D+00 3.6611309036738D-05 -1.8178720306684D-04 -3.5514267970763D-04 +203 2.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +204 2.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +205 2.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +206 2.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +207 2.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +208 2.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +209 2.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +210 2.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +211 2.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +212 2.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +213 2.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +214 2.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +215 2.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +216 2.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +217 2.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +218 2.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +219 2.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +220 2.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +221 2.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +222 2.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +223 2.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +224 2.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +225 2.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +226 2.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +227 2.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +228 2.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +229 2.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +230 2.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +231 2.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +232 2.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +233 2.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +234 2.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +235 2.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +236 2.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +237 2.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +238 2.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +239 2.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +240 2.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +241 2.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +242 2.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +243 2.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +244 2.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +245 2.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +246 2.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +247 2.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +248 2.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +249 2.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +250 2.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +251 2.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +252 2.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +253 2.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +254 2.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +255 2.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +256 2.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +257 2.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +258 2.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +259 2.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +260 2.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +261 2.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +262 2.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +263 2.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +264 2.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +265 2.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +266 2.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +267 2.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +268 2.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +269 2.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +270 2.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +271 2.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +272 2.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +273 2.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +274 2.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +275 2.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +276 2.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +277 2.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +278 2.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +279 2.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +280 2.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +281 2.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +282 2.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +283 2.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +284 2.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +285 2.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +286 2.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +287 2.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +288 2.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +289 2.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +290 2.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +291 2.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +292 2.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +293 2.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +294 2.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +295 2.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +296 2.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +297 2.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +298 2.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +299 2.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +300 2.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +301 3.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +302 3.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +303 3.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +304 3.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +305 3.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +306 3.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +307 3.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +308 3.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +309 3.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +310 3.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +311 3.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +312 3.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +313 3.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +314 3.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +315 3.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +316 3.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +317 3.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +318 3.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +319 3.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +320 3.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +321 3.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +322 3.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +323 3.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +324 3.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +325 3.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +326 3.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +327 3.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +328 3.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +329 3.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +330 3.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +331 3.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +332 3.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +333 3.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +334 3.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +335 3.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +336 3.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +337 3.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +338 3.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +339 3.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +340 3.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +341 3.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +342 3.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +343 3.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +344 3.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +345 3.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +346 3.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +347 3.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +348 3.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +349 3.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +350 3.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +351 3.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +352 3.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +353 3.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +354 3.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +355 3.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +356 3.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +357 3.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +358 3.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +359 3.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +360 3.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +361 3.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +362 3.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +363 3.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +364 3.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +365 3.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +366 3.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +367 3.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +368 3.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +369 3.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +370 3.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +371 3.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +372 3.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +373 3.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +374 3.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +375 3.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +376 3.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +377 3.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +378 3.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +379 3.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +380 3.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +381 3.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +382 3.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +383 3.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +384 3.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +385 3.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +386 3.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +387 3.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +388 3.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +389 3.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +390 3.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +391 3.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +392 3.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +393 3.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +394 3.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +395 3.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +396 3.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +397 3.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +398 3.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +399 3.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +400 3.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +401 4.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +402 4.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +403 4.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +404 4.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +405 4.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +406 4.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +407 4.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +408 4.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +409 4.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +410 4.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +411 4.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +412 4.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +413 4.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +414 4.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +415 4.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +416 4.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +417 4.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +418 4.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +419 4.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +420 4.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +421 4.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +422 4.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +423 4.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +424 4.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +425 4.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +426 4.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +427 4.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +428 4.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +429 4.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +430 4.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +431 4.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +432 4.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +433 4.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +434 4.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +435 4.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +436 4.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +437 4.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +438 4.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +439 4.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +440 4.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +441 4.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +442 4.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +443 4.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +444 4.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +445 4.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +446 4.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +447 4.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +448 4.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +449 4.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +450 4.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +451 4.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +452 4.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +453 4.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +454 4.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +455 4.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +456 4.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +457 4.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +458 4.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +459 4.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +460 4.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +461 4.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +462 4.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +463 4.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +464 4.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +465 4.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +466 4.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +467 4.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +468 4.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +469 4.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +470 4.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +471 4.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +472 4.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +473 4.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +474 4.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +475 4.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +476 4.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +477 4.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +478 4.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +479 4.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +480 4.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +481 4.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +482 4.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +483 4.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +484 4.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +485 4.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +486 4.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +487 4.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +488 4.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +489 4.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +490 4.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +491 4.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +492 4.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +493 4.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +494 4.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +495 4.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +496 4.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +497 4.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +498 4.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +499 4.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +500 4.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +501 5.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +502 5.0100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +503 5.0200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +504 5.0300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 0.0000000000000D+00 2.8192662164374D+00 6.7135186299083D-13 -7.4479232678226D+00 -1.2290147495264D-06 5.5275514997396D+01 +2 1.0000000000000D-02 2.8188938433059D+00 -7.4470020448600D-02 -7.4451597046417D+00 5.5265903724251D-01 5.5245047016246D+01 +3 2.0000000000000D-02 2.8177770002384D+00 -1.4888478031728D-01 -7.4368722219950D+00 1.1046768286960D+00 5.5148477345330D+01 +4 3.0000000000000D-02 2.8159165159038D+00 -2.2318908318625D-01 -7.4230704420355D+00 1.6554120747326D+00 5.4988077457796D+01 +5 4.0000000000000D-02 2.8133137703467D+00 -2.9732786085714D-01 -7.4037703843132D+00 2.2042261818669D+00 5.4764120850659D+01 +6 5.0000000000000D-02 2.8099706933861D+00 -3.7124623721877D-01 -7.3789944418198D+00 2.7504833659538D+00 5.4476763822121D+01 +7 6.0000000000000D-02 2.8058897623770D+00 -4.4488959181899D-01 -7.3487713468412D+00 3.2935517439862D+00 5.4126450619869D+01 +8 7.0000000000000D-02 2.8010739993367D+00 -5.1820362304562D-01 -7.3131361269727D+00 3.8328042999533D+00 5.3713703839329D+01 +9 8.0000000000000D-02 2.7955269674435D+00 -5.9113441082025D-01 -7.2721300516526D+00 4.3676198392325D+00 5.3239160950915D+01 +10 9.0000000000000D-02 2.7892527669094D+00 -6.6362847870944D-01 -7.2258005691518D+00 4.8973839462402D+00 5.2703545655363D+01 +11 1.0000000000000D-01 2.7822560302363D+00 -7.3563285535888D-01 -7.1742012341930D+00 5.4214899016923D+00 5.2107675478816D+01 +12 1.1000000000000D-01 2.7745419168613D+00 -8.0709513515749D-01 -7.1173916263319D+00 5.9393396094290D+00 5.1452455221294D+01 +13 1.2000000000000D-01 2.7661161071990D+00 -8.7796353803972D-01 -7.0554372592529D+00 6.4503444899497D+00 5.0738883064360D+01 +14 1.3000000000000D-01 2.7569847960916D+00 -9.4818696833605D-01 -6.9884094811289D+00 6.9539263688949D+00 4.9968042808838D+01 +15 1.4000000000000D-01 2.7471546856745D+00 -1.0177150725831D+00 -6.9163853662475D+00 7.4495183403484D+00 4.9141103586008D+01 +16 1.5000000000000D-01 2.7366329776703D+00 -1.0864982962073D+00 -6.8394475980967D+00 7.9365656097567D+00 4.8259317861884D+01 +17 1.6000000000000D-01 2.7254273651208D+00 -1.1544879389977D+00 -6.7576843441264D+00 8.4145263142637D+00 4.7324019507767D+01 +18 1.7000000000000D-01 2.7135460235722D+00 -1.2216362092851D+00 -6.6711891224139D+00 8.8828723215812D+00 4.6336620215058D+01 +19 1.8000000000000D-01 2.7009976017237D+00 -1.2878962767495D+00 -6.5800606604810D+00 9.3410900015037D+00 4.5298608246206D+01 +20 1.9000000000000D-01 2.6877912115567D+00 -1.3532223237763D+00 -6.4844027465205D+00 9.7886809723143D+00 4.4211544480103D+01 +21 2.0000000000000D-01 2.6739364179567D+00 -1.4175695952888D+00 -6.3843240733065D+00 1.0225162816786D+01 4.3077060610314D+01 +22 2.1000000000000D-01 2.6594432278456D+00 -1.4808944469843D+00 -6.2799380750686D+00 1.0650069772987D+01 4.1896855412715D+01 +23 2.2000000000000D-01 2.6443220788398D+00 -1.5431543919044D+00 -6.1713627576352D+00 1.1062953390543D+01 4.0672691919471D+01 +24 2.3000000000000D-01 2.6285838274511D+00 -1.6043081452753D+00 -6.0587205221486D+00 1.1463383158604D+01 3.9406394447073D+01 +25 2.4000000000000D-01 2.6122397368476D+00 -1.6643156675535D+00 -5.9421379826751D+00 1.1850947099440D+01 3.8099844805136D+01 +26 2.5000000000000D-01 2.5953014641947D+00 -1.7231382056192D+00 -5.8217457780421D+00 1.2225252329333D+01 3.6754979307257D+01 +27 2.6000000000000D-01 2.5777810475921D+00 -1.7807383320601D+00 -5.6976783782382D+00 1.2585925584402D+01 3.5373785080527D+01 +28 2.7000000000000D-01 2.5596908926289D+00 -1.8370799824939D+00 -5.5700738857306D+00 1.2932613711686D+01 3.3958296553335D+01 +29 2.8000000000000D-01 2.5410437585748D+00 -1.8921284908795D+00 -5.4390738320531D+00 1.3264984123564D+01 3.2510591794228D+01 +30 2.9000000000000D-01 2.5218527442289D+00 -1.9458506227727D+00 -5.3048229700313D+00 1.3582725215699D+01 3.1032788738440D+01 +31 3.0000000000000D-01 2.5021312734458D+00 -1.9982146064830D+00 -5.1674690620173D+00 1.3885546747522D+01 2.9527041532404D+01 +32 3.1000000000000D-01 2.4818930803616D+00 -2.0491901620952D+00 -5.0271626645093D+00 1.4173180184204D+01 2.7995536618473D+01 +33 3.2000000000000D-01 2.4611521943400D+00 -2.0987485283200D+00 -4.8840569095406D+00 1.4445379000933D+01 2.6440488863120D+01 +34 3.3000000000000D-01 2.4399229246606D+00 -2.1468624871448D+00 -4.7383072832230D+00 1.4701918947648D+01 2.4864137680447D+01 +35 3.4000000000000D-01 2.4182198449724D+00 -2.1935063862560D+00 -4.5900714018390D+00 1.4942598274859D+01 2.3268743133205D+01 +36 3.5000000000000D-01 2.3960577775342D+00 -2.2386561592133D+00 -4.4395087858690D+00 1.5167237920020D+01 2.1656581897243D+01 +37 3.6000000000000D-01 2.3734517772641D+00 -2.2822893433540D+00 -4.2867806323571D+00 1.5375681654207D+01 2.0029943358965D+01 +38 3.7000000000000D-01 2.3504171156221D+00 -2.3243850954156D+00 -4.1320495860047D+00 1.5567796189286D+01 1.8391125612688D+01 +39 3.8000000000000D-01 2.3269692643472D+00 -2.3649242048635D+00 -3.9754795093944D+00 1.5743471245253D+01 1.6742431538668D+01 +40 3.9000000000000D-01 2.3031238790731D+00 -2.4038891049192D+00 -3.8172352527347D+00 1.5902619578129D+01 1.5086164798746D+01 +41 4.0000000000000D-01 2.2788967828455D+00 -2.4412638812845D+00 -3.6574824235265D+00 1.6045176968375D+01 1.3424625965454D+01 +42 4.1000000000000D-01 2.2543039495626D+00 -2.4770342785640D+00 -3.4963871565387D+00 1.6171102170097D+01 1.1760108570472D+01 +43 4.2000000000000D-01 2.2293614873641D+00 -2.5111877043907D+00 -3.3341158844876D+00 1.6280376821591D+01 1.0094895245604D+01 +44 4.3000000000000D-01 2.2040856219896D+00 -2.5437132312625D+00 -3.1708351098041D+00 1.6373005317187D+01 8.4312539488651D+00 +45 4.4000000000000D-01 2.1784926801302D+00 -2.5746015961051D+00 -3.0067111778712D+00 1.6449014641214D+01 6.7714341134464D+00 +46 4.5000000000000D-01 2.1525990727962D+00 -2.6038451975744D+00 -2.8419100521105D+00 1.6508454164705D+01 5.1176629969060D+00 +47 4.6000000000000D-01 2.1264212787218D+00 -2.6314380911221D+00 -2.6765970912870D+00 1.6551395404878D+01 3.4721420163821D+00 +48 4.7000000000000D-01 2.0999758278321D+00 -2.6573759818457D+00 -2.5109368293976D+00 1.6577931748994D+01 1.8370431407478D+00 +49 4.8000000000000D-01 2.0732792847906D+00 -2.6816562151529D+00 -2.3450927585028D+00 1.6588178142337D+01 2.1450544793783D-01 +50 4.9000000000000D-01 2.0463482326525D+00 -2.7042777652695D+00 -2.1792271148477D+00 1.6582270742058D+01 -1.3933683337590D+00 +51 5.0000000000000D-01 2.0191992566422D+00 -2.7252412216272D+00 -2.0135006686169D+00 1.6560366537054D+01 -2.9845151223828D+00 +52 5.1000000000000D-01 1.9918489280784D+00 -2.7445487731677D+00 -1.8480725176529D+00 1.6522642935367D+01 -4.5569147116123D+00 +53 5.2000000000000D-01 1.9643137884661D+00 -2.7622041906064D+00 -1.6830998854615D+00 1.6469297319671D+01 -6.1085928797219D+00 +54 5.3000000000000D-01 1.9366103337753D+00 -2.7782128066971D+00 -1.5187379238148D+00 1.6400546572271D+01 -7.6376244210113D+00 +55 5.4000000000000D-01 1.9087549989282D+00 -2.7925814945488D+00 -1.3551395202550D+00 1.6316626570510D+01 -9.1421360081977D+00 +56 5.5000000000000D-01 1.8807641425113D+00 -2.8053186440418D+00 -1.1924551107841D+00 1.6217791653797D+01 -1.0620308995411D+01 +57 5.6000000000000D-01 1.8526540317338D+00 -2.8164341363991D+00 -1.0308324980220D+00 1.6104314063674D+01 -1.2070382053180D+01 +58 5.7000000000000D-01 1.8244408276487D+00 -2.8259393169662D+00 -8.7041667509462D-01 1.5976483357697D+01 -1.3490653695701D+01 +59 5.8000000000000D-01 1.7961405706548D+00 -2.8338469662614D+00 -7.1134965550466D-01 1.5834605799173D+01 -1.4879484664470D+01 +60 5.9000000000000D-01 1.7677691662967D+00 -2.8401712693542D+00 -5.5377030922491D-01 1.5679003723283D+01 -1.6235300188948D+01 +61 6.0000000000000D-01 1.7393423713792D+00 -2.8449277836372D+00 -3.9781420523898D-01 1.5510014881774D+01 -1.7556592087470D+01 +62 6.1000000000000D-01 1.7108757804116D+00 -2.8481334050569D+00 -2.4361346073910D-01 1.5327991766816D+01 -1.8841920748699D+01 +63 6.2000000000000D-01 1.6823848123975D+00 -2.8498063328700D+00 -9.1296597180340D-02 1.5133300916363D+01 -2.0089916943426D+01 +64 6.3000000000000D-01 1.6538846979831D+00 -2.8499660329956D+00 5.9011596628126D-02 1.4926322201634D+01 -2.1299283492052D+01 +65 6.4000000000000D-01 1.6253904669800D+00 -2.8486332000343D+00 2.0719019422859D-01 1.4707448098864D+01 -2.2468796837599D+01 +66 6.5000000000000D-01 1.5969169362736D+00 -2.8458297180265D+00 3.5312225385906D-01 1.4477082946271D+01 -2.3597308317066D+01 +67 6.6000000000000D-01 1.5684786981292D+00 -2.8415786200252D+00 4.9669493330926D-01 1.4235642188819D+01 -2.4683745487482D+01 +68 6.7000000000000D-01 1.5400901089096D+00 -2.8359040465576D+00 6.3779959715585D-01 1.3983551610298D+01 -2.5727113139785D+01 +69 6.8000000000000D-01 1.5117652782117D+00 -2.8288312030533D+00 7.7633191627687D-01 1.3721246556953D+01 -2.6726494156684D+01 +70 6.9000000000000D-01 1.4835180584346D+00 -2.8203863163163D+00 9.1219195955499D-01 1.3449171151914D+01 -2.7681050399757D+01 +71 7.0000000000000D-01 1.4553620347871D+00 -2.8105965901192D+00 1.0452842776891D+00 1.3167777502963D+01 -2.8590023171279D+01 +72 7.1000000000000D-01 1.4273105157437D+00 -2.7994901599991D+00 1.1755179790647D+00 1.2877524906112D+01 -2.9452732974583D+01 +73 7.2000000000000D-01 1.3993765239555D+00 -2.7870960473347D+00 1.3028067976263D+00 1.2578879044510D+01 -3.0268586017726D+01 +74 7.3000000000000D-01 1.3715727876246D+00 -2.7734441127845D+00 1.4270691527369D+00 1.2272311205204D+01 -3.1037060242402D+01 +75 7.4000000000000D-01 1.3439117323461D+00 -2.7585650091673D+00 1.5482282012259D+00 1.1958296927734D+01 -3.1757638047465D+01 +76 7.5000000000000D-01 1.3164054734243D+00 -2.7424901338642D+00 1.6662118766177D+00 1.1637319892208D+01 -3.2430104206454D+01 +77 7.6000000000000D-01 1.2890658086667D+00 -2.7252515808198D+00 1.7809529652210D+00 1.1309849713838D+01 -3.3055735188383D+01 +78 7.7000000000000D-01 1.2619042116596D+00 -2.7068820922364D+00 1.8923888715641D+00 1.0976383953539D+01 -3.3628027453017D+01 +79 7.8000000000000D-01 1.2349318255286D+00 -2.6874150100131D+00 2.0004623959262D+00 1.0637439470783D+01 -3.4155100465008D+01 +80 7.9000000000000D-01 1.2081594571843D+00 -2.6668842270362D+00 2.1051207924825D+00 1.0293437796284D+01 -3.4635442286519D+01 +81 8.0000000000000D-01 1.1815975720571D+00 -2.6453241383930D+00 2.2063160625220D+00 9.9449070420803D+00 -3.5062858079453D+01 +82 8.1000000000000D-01 1.1552562893187D+00 -2.6227695925673D+00 2.3040054656056D+00 9.5923374596294D+00 -3.5443223641962D+01 +83 8.2000000000000D-01 1.1291453775921D+00 -2.5992558427253D+00 2.3981509347147D+00 9.2362038067952D+00 -3.5775262633190D+01 +84 8.3000000000000D-01 1.1032742511476D+00 -2.5748184981364D+00 2.4887192858841D+00 8.8769936166686D+00 -3.6058829118470D+01 +85 8.4000000000000D-01 1.0776519665839D+00 -2.5494934758243D+00 2.5756821516731D+00 8.5151866380972D+00 -3.6294601529920D+01 +86 8.5000000000000D-01 1.0522872199913D+00 -2.5233169525110D+00 2.6590159533388D+00 8.1512599294532D+00 -3.6482865222328D+01 +87 8.6000000000000D-01 1.0271883445929D+00 -2.4963253169291D+00 2.7387018602537D+00 7.7856860501831D+00 -3.6624118474853D+01 +88 8.7000000000000D-01 1.0023633088617D+00 -2.4685551225703D+00 2.8147257427849D+00 7.4189325079849D+00 -3.6718887487122D+01 +89 8.8000000000000D-01 9.7781971510705D-01 -2.4400430409402D+00 2.8870781183980D+00 7.0514611669493D+00 -3.6767800811832D+01 +90 8.9000000000000D-01 9.5356479852563D-01 -2.4108258153755D+00 2.9557540916885D+00 6.6837272328816D+00 -3.6771495504398D+01 +91 9.0000000000000D-01 9.2960542671168D-01 -2.3809402155576D+00 3.0207532848446D+00 6.3161795746720D+00 -3.6730689052500D+01 +92 9.1000000000000D-01 9.0594809961865D-01 -2.3504229925397D+00 3.0820797740338D+00 5.9492589796131D+00 -3.6646234100856D+01 +93 9.2000000000000D-01 8.8259894996568D-01 -2.3193108347801D+00 3.1397419968508D+00 5.5833976909689D+00 -3.6518943010906D+01 +94 9.3000000000000D-01 8.5956374408097D-01 -2.2876403248962D+00 3.1937526740954D+00 5.2190200364526D+00 -3.6349668703878D+01 +95 9.4000000000000D-01 8.3684788317332D-01 -2.2554478971770D+00 3.2441287272810D+00 4.8565409638296D+00 -3.6139409591728D+01 +96 9.5000000000000D-01 8.1445640502323D-01 -2.2227697961652D+00 3.2908911719868D+00 4.4963650995414D+00 -3.5889175490959D+01 +97 9.6000000000000D-01 7.9239398608366D-01 -2.1896420361549D+00 3.3340650239755D+00 4.1388872969250D+00 -3.5599987024610D+01 +98 9.7000000000000D-01 7.7066494398077D-01 -2.1561003617266D+00 3.3736791926365D+00 3.7844915255097D+00 -3.5272951804972D+01 +99 9.8000000000000D-01 7.4927324040392D-01 -2.1221802093502D+00 3.4097663720790D+00 3.4335506407822D+00 -3.4909202994209D+01 +100 9.9000000000000D-01 7.2822248437413D-01 -2.0879166701030D+00 3.4423629273992D+00 3.0864259323166D+00 -3.4509915654145D+01 +101 1.0000000000000D+00 7.0751593587965D-01 -2.0533444535445D+00 3.4715087772269D+00 2.7434667544458D+00 -3.4076301461830D+01 +102 1.0100000000000D+00 6.8715650986676D-01 -2.0184978527834D+00 3.4972472726032D+00 2.4050101788977D+00 -3.3609605493102D+01 +103 1.0200000000000D+00 6.6714678057387D-01 -1.9834107107732D+00 3.5196250724704D+00 2.0713806618775D+00 -3.3111105218028D+01 +104 1.0300000000000D+00 6.4748898619636D-01 -1.9481163878696D+00 3.5386920159898D+00 1.7428897381586D+00 -3.2582106887953D+01 +105 1.0400000000000D+00 6.2818503386937D-01 -1.9126477306782D+00 3.5545009918967D+00 1.4198357509544D+00 -3.2023941363687D+01 +106 1.0500000000000D+00 6.0923650495559D-01 -1.8770370422235D+00 3.5671078054442D+00 1.1025036247287D+00 -3.1437962150127D+01 +107 1.0600000000000D+00 5.9064466062465D-01 -1.8413160534574D+00 3.5765710431090D+00 7.9116463971167D-01 -3.0825543956909D+01 +108 1.0700000000000D+00 5.7241044771063D-01 -1.8055158961328D+00 3.5829519351179D+00 4.8607623647519D-01 -3.0188079148393D+01 +109 1.0800000000000D+00 5.5453450483392D-01 -1.7696670770612D+00 3.5863142162203D+00 1.8748185980734D-01 -2.9526973856707D+01 +110 1.0900000000000D+00 5.3701716877350D-01 -1.7337994537693D+00 3.5867239851294D+00 -1.0438916377857D-01 -2.8843645687904D+01 +111 1.1000000000000D+00 5.1985848107567D-01 -1.6979422115667D+00 3.5842495627663D+00 -3.8932173499972D-01 -2.8139521974301D+01 +112 1.1100000000000D+00 5.0305819488493D-01 -1.6621238420374D+00 3.5789613495537D+00 -6.6711506468282D-01 -2.7416036828978D+01 +113 1.1200000000000D+00 4.8661578198283D-01 -1.6263721229607D+00 3.5709316820302D+00 -9.3758272520337D-01 -2.6674627887780D+01 +114 1.1300000000000D+00 4.7053044002042D-01 -1.5907140996688D+00 3.5602346890964D+00 -1.2005526708582D+00 -2.5916733395899D+01 +115 1.1400000000000D+00 4.5480109992995D-01 -1.5551760678425D+00 3.5469461482223D+00 -1.4558672316494D+00 -2.5143790178728D+01 +116 1.1500000000000D+00 4.3942643350142D-01 -1.5197835577434D+00 3.5311433417890D+00 -1.7033830901663D+00 -2.4357231399568D+01 +117 1.1600000000000D+00 4.2440486110963D-01 -1.4845613198824D+00 3.5129049137883D+00 -1.9429712315405D+00 -2.3558483888917D+01 +118 1.1700000000000D+00 4.0973455957735D-01 -1.4495333121169D+00 3.4923107271528D+00 -2.1745168655289D+00 -2.2748965278060D+01 +119 1.1800000000000D+00 3.9541347016049D-01 -1.4147226881715D+00 3.4694417220259D+00 -2.3979193219148D+00 -2.1930081601306D+01 +120 1.1900000000000D+00 3.8143930664093D-01 -1.3801517875696D+00 3.4443797751685D+00 -2.6130919244383D+00 -2.1103225305862D+01 +121 1.2000000000000D+00 3.6780956351298D-01 -1.3458421269646D+00 3.4172075607297D+00 -2.8199618444904D+00 -2.0269773222717D+01 +122 1.2100000000000D+00 3.5452152424972D-01 -1.3118143928556D+00 3.3880084126031D+00 -3.0184699352474D+00 -1.9431084360699D+01 +123 1.2200000000000D+00 3.4157226963522D-01 -1.2780884356714D+00 3.3568661885201D+00 -3.2085705399191D+00 -1.8588497289451D+01 +124 1.2300000000000D+00 3.2895868614921D-01 -1.2446832652026D+00 3.3238651362113D+00 -3.3902312774027D+00 -1.7743328175715D+01 +125 1.2400000000000D+00 3.1667747439072D-01 -1.2116170473619D+00 3.2890897618120D+00 -3.5634328077131D+00 -1.6896869231821D+01 +126 1.2500000000000D+00 3.0472515752770D-01 -1.1789071022481D+00 3.2526247006690D+00 -3.7281685878129D+00 -1.6050387030736D+01 +127 1.2600000000000D+00 2.9309808975939D-01 -1.1465699034890D+00 3.2145545906874D+00 -3.8844446036692D+00 -1.5205120453824D+01 +128 1.2700000000000D+00 2.8179246477918D-01 -1.1146210788383D+00 3.1749639484354D+00 -4.0322790831478D+00 -1.4362278648143D+01 +129 1.2800000000000D+00 2.7080432422518D-01 -1.0830754119954D+00 3.1339370482722D+00 -4.1717021909472D+00 -1.3523039809042D+01 +130 1.2900000000000D+00 2.6012956610673D-01 -1.0519468456196D+00 3.0915578045354D+00 -4.3027557130014D+00 -1.2688549795133D+01 +131 1.3000000000000D+00 2.4976395319483D-01 -1.0212484855055D+00 3.0479096569621D+00 -4.4254927275953D+00 -1.1859920762665D+01 +132 1.3100000000000D+00 2.3970312136527D-01 -9.9099260588828D-01 3.0030754594780D+00 -4.5399772589505D+00 -1.1038229618091D+01 +133 1.3200000000000D+00 2.2994258788298D-01 -9.6119065584305D-01 2.9571373725250D+00 -4.6462839189019D+00 -1.0224516788019D+01 +134 1.3300000000000D+00 2.2047775961738D-01 -9.3185326674287D-01 2.9101767590299D+00 -4.7444975368453D+00 -9.4197851761233D+00 +135 1.3400000000000D+00 2.1130394117773D-01 -9.0299026073859D-01 2.8622740841156D+00 -4.8347127795461D+00 -8.6249992120654D+00 +136 1.3500000000000D+00 2.0241634295879D-01 -8.7461066022241D-01 2.8135088186653D+00 -4.9170337618339D+00 -7.8410839637168D+00 +137 1.3600000000000D+00 1.9381008908733D-01 -8.4672269823578D-01 2.7639593468332D+00 -4.9915736492189D+00 -7.0689243332374D+00 +138 1.3700000000000D+00 1.8548022525960D-01 -8.1933382978280D-01 2.7137028775535D+00 -5.0584542516933D+00 -6.3093642019170D+00 +139 1.3800000000000D+00 1.7742172646161D-01 -7.9245074400751D-01 2.6628153601505D+00 -5.1178056105539D+00 -5.5632057477075D+00 +140 1.3900000000000D+00 1.6962950456347D-01 -7.6607937719480D-01 2.6113714041321D+00 -5.1697655779271D+00 -4.8312090277472D+00 +141 1.4000000000000D+00 1.6209841577948D-01 -7.4022492655214D-01 2.5594442031906D+00 -5.2144793940526D+00 -4.1140915850342D+00 +142 1.4100000000000D+00 1.5482326798722D-01 -7.1489186472965D-01 2.5071054634515D+00 -5.2520992615166D+00 -3.4125281655394D+00 +143 1.4200000000000D+00 1.4779882789731D-01 -6.9008395503711D-01 2.4544253359955D+00 -5.2827839144445D+00 -2.7271503337517D+00 +144 1.4300000000000D+00 1.4101982806813D-01 -6.6580426731365D-01 2.4014723537001D+00 -5.3066981859660D+00 -2.0585462728452D+00 +145 1.4400000000000D+00 1.3448097375869D-01 -6.4205519440753D-01 2.3483133724296D+00 -5.3240125739007D+00 -1.4072607962990D+00 +146 1.4500000000000D+00 1.2817694961347D-01 -6.1883846922220D-01 2.2950135165563D+00 -5.3349028074395D+00 -7.7379539375040D-01 +147 1.4600000000000D+00 1.2210242617490D-01 -5.9615518228569D-01 2.2416361287990D+00 -5.3395494149212D+00 -1.5860838167667D-01 +148 1.4700000000000D+00 1.1625206621678D-01 -5.7400579979980D-01 2.1882427243996D+00 -5.3381372924696D+00 4.3788494586894D-01 +149 1.4800000000000D+00 1.1062053089577D-01 -5.5239018212617D-01 2.1348929495871D+00 -5.3308552750663D+00 1.0153120649246D+00 +150 1.4900000000000D+00 1.0520248571559D-01 -5.3130760266628D-01 2.0816445443230D+00 -5.3178957104924D+00 1.5733428705002D+00 +151 1.5000000000000D+00 9.9992606300674D-02 -5.1075676709243D-01 2.0285533092866D+00 -5.2994540374029D+00 2.1116892318930D+00 +152 1.5100000000000D+00 9.4985583976256D-02 -4.9073583288872D-01 1.9756730770563D+00 -5.2757283680044D+00 2.6301044390002D+00 +153 1.5200000000000D+00 9.0176131150962D-02 -4.7124242915801D-01 1.9230556874399D+00 -5.2469190768137D+00 3.1283826209887D+00 +154 1.5300000000000D+00 8.5558986501230D-02 -4.5227367665699D-01 1.8707509668746D+00 -5.2132283958299D+00 3.6063580923768D+00 +155 1.5400000000000D+00 8.1128919953170D-02 -4.3382620801494D-01 1.8188067118603D+00 -5.1748600157529D+00 4.0639046609717D+00 +156 1.5500000000000D+00 7.6880737462683D-02 -4.1589618810065D-01 1.7672686763216D+00 -5.1320186948074D+00 4.5009348717106D+00 +157 1.5600000000000D+00 7.2809285590324D-02 -3.9847933449412D-01 1.7161805628674D+00 -5.0849098757654D+00 4.9173991303301D+00 +158 1.5700000000000D+00 6.8909455871845D-02 -3.8157093802841D-01 1.6655840178190D+00 -5.0337393116874D+00 5.3132847899353D+00 +159 1.5800000000000D+00 6.5176188982630D-02 -3.6516588336147D-01 1.6155186299384D+00 -4.9787127014141D+00 5.6886151956502D+00 +160 1.5900000000000D+00 6.1604478696645D-02 -3.4925866954316D-01 1.5660219327532D+00 -4.9200353346027D+00 6.0434486798052D+00 +161 1.6000000000000D+00 5.8189375639913D-02 -3.3384343054166D-01 1.5171294103810D+00 -4.8579117468890D+00 6.3778775247273D+00 +162 1.6100000000000D+00 5.4925990838807D-02 -3.1891395569353D-01 1.4688745067512D+00 -4.7925453858742D+00 6.6920268703302D+00 +163 1.6200000000000D+00 5.1809499064854D-02 -3.0446371004690D-01 1.4212886381053D+00 -4.7241382881848D+00 6.9860535781443D+00 +164 1.6300000000000D+00 4.8835141976083D-02 -2.9048585456094D-01 1.3744012086779D+00 -4.6528907681556D+00 7.2601450571431D+00 +165 1.6400000000000D+00 4.5998231058100D-02 -2.7697326613692D-01 1.3282396294227D+00 -4.5790011182487D+00 7.5145180531813D+00 +166 1.6500000000000D+00 4.3294150364794D-02 -2.6391855744246D-01 1.2828293396817D+00 -4.5026653219436D+00 7.7494174132559D+00 +167 1.6600000000000D+00 4.0718359063103D-02 -2.5131409651063D-01 1.2381938316550D+00 -4.4240767790078D+00 7.9651148213026D+00 +168 1.6700000000000D+00 3.8266393781793D-02 -2.3915202607427D-01 1.1943546775633D+00 -4.3434260435432D+00 8.1619075180251D+00 +169 1.6800000000000D+00 3.5933870769622D-02 -2.2742428262317D-01 1.1513315593551D+00 -4.2609005748047D+00 8.3401170037323D+00 +170 1.6900000000000D+00 3.3716487863090D-02 -2.1612261514389D-01 1.1091423008510D+00 -4.1766845013071D+00 8.5000877173985D+00 +171 1.7000000000000D+00 3.1610026269826D-02 -2.0523860353514D-01 1.0678029021733D+00 -4.0909583979574D+00 8.6421857041026D+00 +172 1.7100000000000D+00 2.9610352168202D-02 -1.9476367665893D-01 1.0273275763416D+00 -4.0038990768379D+00 8.7667972722416D+00 +173 1.7200000000000D+00 2.7713418129626D-02 -1.8468913002490D-01 9.8772878789041D-01 -3.9156793911990D+00 8.8743276427912D+00 +174 1.7300000000000D+00 2.5915264364712D-02 -1.7500614306931D-01 9.4901729338050D-01 -3.8264680531878D+00 8.9651996001260D+00 +175 1.7400000000000D+00 2.4212019799854D-02 -1.6570579602959D-01 9.1120218366781D-01 -3.7364294648821D+00 9.0398521410876D+00 +176 1.7500000000000D+00 2.2599902986176D-02 -1.5677908637870D-01 8.7429092778938D-01 -3.6457235629691D+00 9.0987391302456D+00 +177 1.7600000000000D+00 2.1075222847239D-02 -1.4821694482187D-01 8.3828941834105D-01 -3.5545056766928D+00 9.1423279629577D+00 +178 1.7700000000000D+00 1.9634379268351D-02 -1.4001025082463D-01 8.0320201820245D-01 -3.4629263993057D+00 9.1710982323751D+00 +179 1.7800000000000D+00 1.8273863533505D-02 -1.3214984767440D-01 7.6903160848973D-01 -3.3711314725981D+00 9.1855404069072D+00 +180 1.7900000000000D+00 1.6990258613737D-02 -1.2462655705135D-01 7.3577963758736D-01 -3.2792616847477D+00 9.1861545245517D+00 +181 1.8000000000000D+00 1.5780239312456D-02 -1.1743119310804D-01 7.0344617114468D-01 -3.1874527811052D+00 9.1734489027588D+00 +182 1.8100000000000D+00 1.4640572272443D-02 -1.1055457604283D-01 6.7202994289527D-01 -3.0958353877502D+00 9.1479388700992D+00 +183 1.8200000000000D+00 1.3568115849569D-02 -1.0398754516115D-01 6.4152840617848D-01 -3.0045349476129D+00 9.1101455229253D+00 +184 1.8300000000000D+00 1.2559819858702D-02 -9.7720971421634D-02 6.1193778604253D-01 -2.9136716688992D+00 9.0605945038155D+00 +185 1.8400000000000D+00 1.1612725196484D-02 -9.1745769452765D-02 5.8325313179124D-01 -2.8233604857039D+00 8.9998148037130D+00 +186 1.8500000000000D+00 1.0723963346863D-02 -8.6052909051584D-02 5.5546836988681D-01 -2.7337110302866D+00 8.9283375929032D+00 +187 1.8600000000000D+00 9.8907557740639D-03 -8.0633426139486D-02 5.2857635703732D-01 -2.6448276171258D+00 8.8466950839291D+00 +188 1.8700000000000D+00 9.1104132087456D-03 -7.5478433202330D-02 5.0256893343465D-01 -2.5568092379365D+00 8.7554194235612D+00 +189 1.8800000000000D+00 8.3803348325138D-03 -7.0579129180742D-02 4.7743697593147D-01 -2.4697495678200D+00 8.6550416228389D+00 +190 1.8900000000000D+00 7.6980073659119D-03 -6.5926808845572D-02 4.5317045116122D-01 -2.3837369817417D+00 8.5460905196747D+00 +191 1.9000000000000D+00 7.0610040657112D-03 -6.1512871629701D-02 4.2975846839082D-01 -2.2988545813592D+00 8.4290917793757D+00 +192 1.9100000000000D+00 6.4669836360992D-03 -5.7328829942103D-02 4.0718933209440D-01 -2.2151802315561D+00 8.3045669322019D+00 +193 1.9200000000000D+00 5.9136890596595D-03 -5.3366316953691D-02 3.8545059409308D-01 -2.1327866064521D+00 8.1730324499375D+00 +194 1.9300000000000D+00 5.3989463530427D-03 -4.9617093863539D-02 3.6452910518840D-01 -2.0517412444579D+00 8.0349988620152D+00 +195 1.9400000000000D+00 4.9206632521780D-03 -4.6073056657567D-02 3.4441106622860D-01 -1.9721066118996D+00 7.8909699119354D+00 +196 1.9500000000000D+00 4.4768278333813D-03 -4.2726242348993D-02 3.2508207844083D-01 -1.8939401749773D+00 7.7414417575989D+00 +197 1.9600000000000D+00 4.0655070729996D-03 -3.9568834733996D-02 3.0652719308808D-01 -1.8172944794108D+00 7.5869022108010D+00 +198 1.9700000000000D+00 3.6848453539222D-03 -3.6593169639042D-02 2.8873096019610D-01 -1.7422172375354D+00 7.4278300233877D+00 +199 1.9800000000000D+00 3.3330629201737D-03 -3.3791739698512D-02 2.7167747645970D-01 -1.6687514222847D+00 7.2646942143536D+00 +200 1.9900000000000D+00 3.0084542874317D-03 -3.1157198650291D-02 2.5535043212056D-01 -1.5969353677035D+00 7.0979534411309D+00 +201 2.0000000000000D+00 2.7093866124685D-03 -2.8682365169555D-02 2.3973315682577D-01 -1.5268028755317D+00 6.9280554139525D+00 +202 2.0100000000000D+00 2.4342980258642D-03 -2.6360226253113D-02 2.2480866441942D-01 -1.4583833274202D+00 6.7554363534183D+00 +203 2.0200000000000D+00 2.1816959349761D-03 -2.4183940153336D-02 2.1055969651494D-01 -1.3917018023354D+00 6.5805204937483D+00 +204 2.0300000000000D+00 1.9501552968252D-03 -2.2146838893037D-02 1.9696876497223D-01 -1.3267791987811D+00 6.4037196267234D+00 +205 2.0400000000000D+00 1.7383168711731D-03 -2.0242430351431D-02 1.8401819302108D-01 -1.2636323612543D+00 6.2254326918726D+00 +206 2.0500000000000D+00 1.5448854522415D-03 -1.8464399952173D-02 1.7169015518216D-01 -1.2022742106859D+00 6.0460454076149D+00 +207 2.0600000000000D+00 1.3686280865007D-03 -1.6806611956723D-02 1.5996671583630D-01 -1.1427138783111D+00 5.8659299453623D+00 +208 2.0700000000000D+00 1.2083722804914D-03 -1.5263110376315D-02 1.4882986640651D-01 -1.0849568425441D+00 5.6854446460521D+00 +209 2.0800000000000D+00 1.0630041982450D-03 -1.3828119524473D-02 1.3826156124913D-01 -1.0290050686426D+00 5.5049337760839D+00 +210 2.0900000000000D+00 9.3146685926788D-04 -1.2496044211467D-02 1.2824375201480D-01 -9.7485715036231D-01 5.3247273261022D+00 +211 2.1000000000000D+00 8.1275833232883D-04 -1.1261469606693D-02 1.1875842069109D-01 -9.2250845367006D-01 5.1451408473267D+00 +212 2.1100000000000D+00 7.0592993440725D-04 -1.0119160776207D-02 1.0978761114422D-01 -8.7195126175242D-01 4.9664753277215D+00 +213 2.1200000000000D+00 6.1008443633253D-04 -9.0640619116226D-03 1.0131345919140D-01 -8.2317492104098D-01 4.7890171062193D+00 +214 2.1300000000000D+00 5.2437427428815D-04 -8.0912952667578D-03 9.3318221291529D-02 -7.7616598815768D-01 4.6130378222447D+00 +215 2.1400000000000D+00 4.4799977835048D-04 -7.1961598142381D-03 8.5784301645218D-02 -7.3090837679247D-01 4.4387944030013D+00 +216 2.1500000000000D+00 3.8020741125814D-04 -6.3741296377771D-03 7.8694277930530D-02 -6.8738350490832D-01 4.2665290836309D+00 +217 2.1600000000000D+00 3.2028802669835D-04 -5.6208520754169D-03 7.2030925520235D-02 -6.4557044138866D-01 4.0964694613435D+00 +218 2.1700000000000D+00 2.6757514865441D-04 -4.9321456286358D-03 6.5777240207576D-02 -6.0544605186717D-01 3.9288285819419D+00 +219 2.1800000000000D+00 2.2144326798561D-04 -4.3039976474661D-03 5.9916459577453D-02 -5.6698514397833D-01 3.7638050559017D+00 +220 2.1900000000000D+00 1.8130616952789D-04 -3.7325618156412D-03 5.4432082804950D-02 -5.3016061069805D-01 3.6015832054343D+00 +221 2.2000000000000D+00 1.4661528063529D-04 -3.2141554392325D-03 4.9307889118584D-02 -4.9494357252999D-01 3.4423332385810D+00 +222 2.2100000000000D+00 1.1685804862698D-04 -2.7452565590707D-03 4.4527954834543D-02 -4.6130351772478D-01 3.2862114501880D+00 +223 2.2200000000000D+00 9.1556350825995D-05 -2.3225009044345D-03 4.0076668947562D-02 -4.2920844006092D-01 3.1333604485756D+00 +224 2.2300000000000D+00 7.0264930705111D-05 -1.9426786881540D-03 3.5938747442259D-02 -3.9862497479027D-01 2.9839094054772D+00 +225 2.2400000000000D+00 5.2569871498454D-05 -1.6027312752051D-03 3.2099246181873D-02 -3.6951853144729D-01 2.8379743286655D+00 +226 2.2500000000000D+00 3.8087102281470D-05 -1.2997477257021D-03 2.8543572505573D-02 -3.4185342399282D-01 2.6956583553722D+00 +227 2.2600000000000D+00 2.6460936185014D-05 -1.0309612209324D-03 2.5257495582962D-02 -3.1559299827387D-01 2.5570520651101D+00 +228 2.2700000000000D+00 1.7362650523183D-05 -7.9374540724280D-04 2.2227155430973D-02 -2.9069975558948D-01 2.4222338103769D+00 +229 2.2800000000000D+00 1.0489099097133D-05 -5.8561064212053D-04 1.9439070775056D-02 -2.6713547345187D-01 2.2912700639972D+00 +230 2.2900000000000D+00 5.5613637016286D-06 -4.0420017171512D-04 1.6880145705010D-02 -2.4486132263559D-01 2.1642157813775D+00 +231 2.3000000000000D+00 2.3234467728097D-06 -2.4728625611027D-04 1.4537675148853D-02 -2.2383798020436D-01 2.0411147759830D+00 +232 2.3100000000000D+00 5.4099823650730D-07 -1.1276622832713D-04 1.2399349284660D-02 -2.0402573935049D-01 1.9220001076605D+00 +233 2.3200000000000D+00 8.5970220548872D-11 1.3414700948410D-06 1.0453256836703D-02 -1.8538461475954D-01 1.8068944808372D+00 +234 2.3300000000000D+00 5.0600582559895D-07 9.6901282037453D-05 8.6878873406772D-03 -1.6787444397556D-01 1.6958106519464D+00 +235 2.3400000000000D+00 1.8821273746147D-06 1.7566456414126D-04 7.0921324456379D-03 -1.5145498525696D-01 1.5887518459847D+00 +236 2.3500000000000D+00 3.9687860887299D-06 2.3927359671993D-04 5.6552862206620D-03 -1.3608601036316D-01 1.4857121776168D+00 +237 2.3600000000000D+00 6.6222121305964D-06 2.8926560849333D-04 4.3670445741542D-03 -1.2172739360752D-01 1.3866770786058D+00 +238 2.3700000000000D+00 9.7134980340202D-06 3.2707679815457D-04 3.2175038076161D-03 -1.0833919681533D-01 1.2916237297354D+00 +239 2.3800000000000D+00 1.3127610891985D-05 3.5404631380396D-04 2.1971583302442D-03 -9.5881749281938D-02 1.2005214933134D+00 +240 2.3900000000000D+00 1.6762440522999D-05 3.7142022641394D-04 1.2968976005327D-03 -8.4315723970717D-02 1.1133323488912D+00 +241 2.4000000000000D+00 2.0527887628553D-05 3.8035546643201D-04 5.0800232785770D-04 -7.3602209284619D-02 1.0300113289511D+00 +242 2.4100000000000D+00 2.4344993725520D-05 3.8192370226409D-04 -1.7786001688483D-04 -6.3702776059890D-02 9.5050695196600D-01 +243 2.4200000000000D+00 2.8145106343664D-05 3.7711519304660D-04 -7.6864035231896D-04 -5.4579540788623D-02 8.7476165572892D-01 +244 2.4300000000000D+00 3.1869083938039D-05 3.6684257597840D-04 -1.2719137382247D-03 -4.6195224270485D-02 8.0271222638029D-01 +245 2.4400000000000D+00 3.5466539627090D-05 3.5194458366781D-04 -1.6948856823264D-03 -3.8513205774766D-02 7.3429022220826D-01 +246 2.4500000000000D+00 3.8895119058060D-05 3.3318971874552D-04 -2.0443989988338D-03 -3.1497573485741D-02 6.6942239504727D-01 +247 2.4600000000000D+00 4.2119816590129D-05 3.1127983981606D-04 -2.3269411218515D-03 -2.5113170400025D-02 6.0803110352521D-01 +248 2.4700000000000D+00 4.5112327304479D-05 2.8685366867994D-04 -2.5486518509626D-03 -1.9325636058830D-02 5.5003471899854D-01 +249 2.4800000000000D+00 4.7850431600653D-05 2.6049024069000D-04 -2.7153315413611D-03 -1.4101444683102D-02 4.9534802673522D-01 +250 2.4900000000000D+00 5.0317415781144D-05 2.3271224904449D-04 -2.8324496038758D-03 -9.4079389381095D-03 4.4388261566709D-01 +251 2.5000000000000D+00 5.2501525509450D-05 2.0398930381239D-04 -2.9051533257318D-03 -5.2133598730075D-03 3.9554725914573D-01 +252 2.5100000000000D+00 5.4395449959824D-05 1.7474112293696D-04 -2.9382770330913D-03 -1.4868734433907D-03 3.5024828894779D-01 +253 2.5200000000000D+00 5.5995838918916D-05 1.4534060573700D-04 -2.9363514261464D-03 1.8014070258663D-03 3.0788995528202D-01 +254 2.5300000000000D+00 5.7302849877857D-05 1.1611681610312D-04 -2.9036131326981D-03 4.6804018584019D-03 2.6837477640756D-01 +255 2.5400000000000D+00 5.8319723637312D-05 8.7357889456459D-05 -2.8440145069081D-03 7.1780492279750D-03 2.3160387987468D-01 +256 2.5500000000000D+00 5.9052389366885D-05 5.9313816603119D-05 -2.7612334773715D-03 9.3212930043413D-03 1.9747732800493D-01 +257 2.5600000000000D+00 5.9509096816224D-05 3.2199133257814D-05 -2.6586835176466D-03 1.1136073733278D-02 1.6589443178265D-01 +258 2.5700000000000D+00 5.9700074654083D-05 6.1955278983221D-06 -2.5395237729591D-03 1.2647322524130D-02 1.3675405512658D-01 +259 2.5800000000000D+00 5.9637214561572D-05 -1.8545673621152D-05 -2.4066691330221D-03 1.3878958095864D-02 1.0995490248942D-01 +260 2.5900000000000D+00 5.9333779617445D-05 -4.1901121067941D-05 -2.2628003343297D-03 1.4853886603249D-02 8.5395793788977D-02 +261 2.6000000000000D+00 5.8804136295122D-05 -6.3773137393624D-05 -2.1103741381802D-03 1.5594004061733D-02 6.2975928845488D-02 +262 2.6100000000000D+00 5.8063508579575D-05 -8.4087534846759D-05 -1.9516333768120D-03 1.6120201415161D-02 4.2595135104846D-02 +263 2.6200000000000D+00 5.7127753400998D-05 -1.0279153124608D-04 -1.7886169360848D-03 1.6452372009331D-02 2.4154101688220D-02 +264 2.6300000000000D+00 5.6013157096432D-05 -1.1985175147456D-04 -1.6231697424063D-03 1.6609421332548D-02 7.5546024201946D-03 +265 2.6400000000000D+00 5.4736250695224D-05 -1.3525233895480D-04 -1.4569525689295D-03 1.6609278899506D-02 -7.3002970850321D-03 +266 2.6500000000000D+00 5.3313643318676D-05 -1.4899316882562D-04 -1.2914516832119D-03 1.6468912127666D-02 -2.0506046935288D-02 +267 2.6600000000000D+00 5.1761874003926D-05 -1.6108814505173D-04 -1.1279884365540D-03 1.6204342133749D-02 -3.2156431702598D-02 +268 2.6700000000000D+00 5.0097279654452D-05 -1.7156359637906D-04 -9.6772865487863D-04 1.5830661239865D-02 -4.2343403654084D-02 +269 2.6800000000000D+00 4.8335877566761D-05 -1.8045677393163D-04 -8.1169177321791D-04 1.5362051997412D-02 -5.1156931354201D-02 +270 2.6900000000000D+00 4.6493263789935D-05 -1.8781442976203D-04 -6.6075985794562D-04 1.4811807774575D-02 -5.8684859416041D-02 +271 2.7000000000000D+00 4.4584525729871D-05 -1.9369148221272D-04 -5.1568644281657D-04 1.4192354733820D-02 -6.5012780832750D-02 +272 2.7100000000000D+00 4.2624165385784D-05 -1.9814978038410D-04 -3.7710500991864D-04 1.3515274770862D-02 -7.0223925156275D-02 +273 2.7200000000000D+00 4.0626035862731D-05 -2.0125694507474D-04 -2.4553731281790D-04 1.2791329654760D-02 -7.4399057472469D-02 +274 2.7300000000000D+00 3.8603291186042D-05 -2.0308528550447D-04 -1.2140155050692D-04 1.2030486390452D-02 -7.7616387915965D-02 +275 2.7400000000000D+00 3.6568342256976D-05 -2.0371080937765D-04 -5.0200859533761D-06 1.1241942873767D-02 -7.9951497094415D-02 +276 2.7500000000000D+00 3.4532824507260D-05 -2.0321230202627D-04 1.0337299372738D-04 1.0434154512204D-02 -8.1477271121026D-02 +277 2.7600000000000D+00 3.2507576514640D-05 -2.0167047704071D-04 2.0362450602106D-04 9.6148617438434D-03 -8.2263846829774D-02 +278 2.7700000000000D+00 3.0502622994459D-05 -1.9916720463077D-04 2.9565522381610D-04 8.7911175131613D-03 -8.2378570273365D-02 +279 2.7800000000000D+00 2.8527166330739D-05 -1.9578480631153D-04 3.7945315749466D-04 7.9693152742989D-03 -8.1885965002846D-02 +280 2.7900000000000D+00 2.6589586729044D-05 -1.9160541443550D-04 4.5506705430251D-04 7.1552175479866D-03 -8.0847709750412D-02 +281 2.8000000000000D+00 2.4697446996678D-05 -1.8671039562788D-04 5.2260023155777D-04 6.3539844279192D-03 -7.9322626457235D-02 +282 2.8100000000000D+00 2.2857501455251D-05 -1.8117983489466D-04 5.8220473920038D-04 5.5702019566017D-03 -7.7366678102853D-02 +283 2.8200000000000D+00 2.1075711450519D-05 -1.7509207650671D-04 6.3407575106149D-04 4.8079107459116D-03 -7.5032974784404D-02 +284 2.8300000000000D+00 1.9357266951361D-05 -1.6852332087346D-04 6.7844619292805D-04 4.0706347833792D-03 -7.2371787992469D-02 +285 2.8400000000000D+00 1.7706607207535D-05 -1.6154727030382D-04 7.1558178848365D-04 3.3614092884878D-03 -6.9430573695373D-02 +286 2.8500000000000D+00 1.6127447231821D-05 -1.5423482449262D-04 7.4577631118679D-04 2.6828087095948D-03 -6.6254002349573D-02 +287 2.8600000000000D+00 1.4622809820318D-05 -1.4665382681306D-04 7.6934705294250D-04 2.0369748547137D-03 -6.2883996122174D-02 +288 2.8700000000000D+00 1.3195055125012D-05 -1.3886884663685D-04 7.8663068148720D-04 1.4256437989640D-03 -5.9359772622803D-02 +289 2.8800000000000D+00 1.1845913885067D-05 -1.3094100450182D-04 7.9797932569839D-04 8.5017261309767D-04 -5.5717894702198D-02 +290 2.8900000000000D+00 1.0576523728284D-05 -1.2292783861909D-04 8.0375689621080D-04 3.1156583431154D-04 -5.1992326169907D-02 +291 2.9000000000000D+00 9.3874662681838D-06 -1.1488320587245D-04 8.0433567403926D-04 -1.8949871192335D-04 -4.8214492650478D-02 +292 2.9100000000000D+00 8.2788024762068D-06 -1.0685720943467D-04 8.0009320229730D-04 -6.5264517814261D-04 -4.4413346650929D-02 +293 2.9200000000000D+00 7.2501101402314D-06 -9.8896159572100D-05 7.9140939142480D-04 -1.0777753656489D-03 -4.0615437059666D-02 +294 2.9300000000000D+00 6.3005250489587D-06 -9.1042573923981D-05 7.7866381650982D-04 -1.4650444614905D-03 -3.6844983965465D-02 +295 2.9400000000000D+00 5.4287758915119D-06 -8.3335182974964D-05 7.6223333849630D-04 -1.8148386879006D-03 -3.3123954389001D-02 +296 2.9500000000000D+00 4.6332221272209D-06 -7.5808968720987D-05 7.4248990147654D-04 -2.1277531384308D-03 -2.9472142180913D-02 +297 2.9600000000000D+00 3.9118923217369D-06 -6.8495228665705D-05 7.1979854103840D-04 -2.4045702387304D-03 -2.5907251170227D-02 +298 2.9700000000000D+00 3.2625209565561D-06 -6.1421655144232D-05 6.9451560973661D-04 -2.6462392037211D-03 -2.2444979953232D-02 +299 2.9800000000000D+00 2.6825825754297D-06 -5.4612423955635D-05 6.6698722022495D-04 -2.8538566950091D-03 -1.9099107341355D-02 +300 2.9900000000000D+00 2.1693261490381D-06 -4.8088302143642D-05 6.3754786437251D-04 -3.0286481149759D-03 -1.5881579757779D-02 +301 3.0000000000000D+00 1.7198112501514D-06 -4.1866784273761D-05 6.0651920742244D-04 -3.1719491916830D-03 -1.2802602269653D-02 +302 3.0100000000000D+00 1.3309377040783D-06 -3.5962213013543D-05 5.7420907557607D-04 -3.2851894937316D-03 -9.8707258129055D-03 +303 3.0200000000000D+00 9.9947655464140D-07 -3.0385922575659D-05 5.4091059727744D-04 -3.3698763072281D-03 -7.0929369416172D-03 +304 3.0300000000000D+00 7.2209995280305D-07 -2.5146392822779D-05 5.0690150499136D-04 -3.4275793280563D-03 -4.4747481181645D-03 +305 3.0400000000000D+00 4.9540978851762D-07 -2.0249411448179D-05 4.7244358576805D-04 -3.4599161917520D-03 -2.0202880152983D-03 +306 3.0500000000000D+00 3.1596230489860D-07 -1.5698225803613D-05 4.3778226184486D-04 -3.4685393870414D-03 2.6761156157870D-04 +307 3.0600000000000D+00 1.8029266942808D-07 -1.1493707536595D-05 4.0314630230106D-04 -3.4551237300783D-03 2.3873279933188D-03 +308 3.0700000000000D+00 8.4939370260400D-08 -7.6345316515405D-06 3.6874767931219D-04 -3.4213544005982D-03 4.3383588798401D-03 +309 3.0800000000000D+00 2.6464418511234D-08 -4.1173371827040D-06 3.3478150383576D-04 -3.3689163596870D-03 6.1212382874011D-03 +310 3.0900000000000D+00 1.4726013275757D-09 -9.3689349331963D-07 3.0142607417982D-04 -3.2994844597620D-03 7.7374535092970D-03 +311 3.1000000000000D+00 6.6291760495998D-09 1.9137340870844D-06 2.6884301747765D-04 -3.2147143575045D-03 9.1893636228982D-03 +312 3.1100000000000D+00 3.8677593170741D-08 4.4430035943754D-06 2.3717756617360D-04 -3.1162338807439D-03 1.0480116487490D-02 +313 3.1200000000000D+00 9.4452408698553D-08 6.6607495827646D-06 2.0655882833798D-04 -3.0056358451822D-03 1.1613574460497D-02 +314 3.1300000000000D+00 1.7089250361507D-07 8.5780214018413D-06 1.7710017803839D-04 -2.8844712342888D-03 1.2594238627359D-02 +315 3.1400000000000D+00 2.6505268409654D-07 1.0206924822389D-05 1.4889971729073D-04 -2.7542431309269D-03 1.3427175282622D-02 +316 3.1500000000000D+00 3.7411388511199D-07 1.1560466745804D-05 1.2204080100414D-04 -2.6164013369499D-03 1.4117944651967D-02 +317 3.1600000000000D+00 4.9539079482775D-07 1.2652419783708D-05 9.6592555720499D-05 -2.4723379069407D-03 1.4672535597796D-02 +318 3.1700000000000D+00 6.2633887551913D-07 1.3497182727355D-05 7.2610475990674D-05 -2.3233831718512D-03 1.5097300975221D-02 +319 3.1800000000000D+00 7.6456031142153D-07 1.4109639597230D-05 5.0137098744627D-05 -2.1708023459841D-03 1.5398894047577D-02 +320 3.1900000000000D+00 9.0780812786569D-07 1.4505036180188D-05 2.9202652542126D-05 -2.0157928335696D-03 1.5584210480880D-02 +321 3.2000000000000D+00 1.0539890347221D-06 1.4698864226381D-05 9.8257267375042D-06 -1.8594821158223D-03 1.5660333566694D-02 +322 3.2100000000000D+00 1.2011653284169D-06 1.4706749930227D-05 -7.9860312196451D-06 -1.7029261315890D-03 1.5634481902476D-02 +323 3.2200000000000D+00 1.3475558533922D-06 1.4544338059205D-05 -2.4235128270629D-05 -1.5471081757737D-03 1.5513957215733D-02 +324 3.2300000000000D+00 1.4915356205959D-06 1.4227201705787D-05 -3.8933548446226D-05 -1.3929382894618D-03 1.5306099922482D-02 +325 3.2400000000000D+00 1.6316346221739D-06 1.3770751148720D-05 -5.2102018538008D-05 -1.2412530948422D-03 1.5018245695695D-02 +326 3.2500000000000D+00 1.7665358432684D-06 1.3190152243174D-05 -6.3769293788152D-05 -1.0928160178870D-03 1.4657685713041D-02 +327 3.2600000000000D+00 1.8950721820049D-06 1.2500239643825D-05 -7.3971342241369D-05 -9.4831804204431D-04 1.4231626562419D-02 +328 3.2700000000000D+00 2.0162230743162D-06 1.1715457651417D-05 -8.2750707989278D-05 -8.0837859896780D-04 1.3747158682685D-02 +329 3.2800000000000D+00 2.1291102144076D-06 1.0849796066708D-05 -9.0155784826940D-05 -6.7354691564608D-04 1.3211224491053D-02 +330 3.2900000000000D+00 2.2329928317973D-06 9.9167364926978D-06 -9.6240136972377D-05 -5.4430360070459D-04 1.2630590386725D-02 +331 3.3000000000000D+00 2.3272618089101D-06 8.9291973362786D-06 -1.0106174480336D-04 -4.2106273932430D-04 1.2011819209606D-02 +332 3.3100000000000D+00 2.4114344633239D-06 7.8994996369585D-06 -1.0468243127135D-04 -3.0417381589485D-04 1.1361249654953D-02 +333 3.3200000000000D+00 2.4851482575305D-06 6.8393302863825D-06 -1.0716720921445D-04 -1.9392410757516D-04 1.0684975739060D-02 +334 3.3300000000000D+00 2.5481543904692D-06 5.7597136916232D-06 -1.0858367972984D-04 -9.0541191047956D-05 9.9888295566444D-03 +335 3.3400000000000D+00 2.6003103538873D-06 4.6709852609037D-06 -1.0900138564134D-04 5.8041140855341D-06 9.2783651991994D-03 +336 3.3500000000000D+00 2.6415737764962D-06 3.5827784699590D-06 -1.0849132841577D-04 9.4995192705517D-05 8.5588477423654D-03 +337 3.3600000000000D+00 2.6719951626570D-06 2.5040120569729D-06 -1.0712542495999D-04 1.7696662868192D-04 7.8352428299583D-03 +338 3.3700000000000D+00 2.6917107854588D-06 1.4428835566964D-06 -1.0497601622452D-04 2.5170119716463D-04 7.1122089110383D-03 +339 3.3800000000000D+00 2.7009346419213D-06 4.0686608997816D-07 -1.0211534678166D-04 3.1922647027700D-04 6.3940909139342D-03 +340 3.3900000000000D+00 2.6999521886115D-06 -5.9728728282956D-07 -9.8615193862325D-05 3.7961200842945D-04 5.6849173220650D-03 +341 3.4000000000000D+00 2.6891129451630D-06 -1.5635371626460D-06 -9.4546448758801D-05 4.3296610475414D-04 4.9883982175384D-03 +342 3.4100000000000D+00 2.6688235490102D-06 -2.4865471291758D-06 -8.9978752774312D-05 4.7943265117261D-04 4.3079253442874D-03 +343 3.4200000000000D+00 2.6395398153684D-06 -3.3616687912927D-06 -8.4980107988040D-05 5.1918760345472D-04 3.6465737630740D-03 +344 3.4300000000000D+00 2.6017610408233D-06 -4.1849249509360D-06 -7.9616625558268D-05 5.5243623432529D-04 3.0071052475761D-03 +345 3.4400000000000D+00 2.5560231016830D-06 -4.9529889730872D-06 -7.3952234237047D-05 5.7940991646005D-04 2.3919730133078D-03 +346 3.4500000000000D+00 2.5028923423013D-06 -5.6631624175124D-06 -6.8048445592424D-05 6.0036317336820D-04 1.8033276767942D-03 +347 3.4600000000000D+00 2.4429582308786D-06 -6.3133465708142D-06 -6.1964092625858D-05 6.1557023430995D-04 1.2430252126237D-03 +348 3.4700000000000D+00 2.3768287131605D-06 -6.9020182523301D-06 -5.5755191555553D-05 6.2532259758354D-04 7.1263474663145D-04 +349 3.4800000000000D+00 2.3051242688246D-06 -7.4281998221278D-06 -4.9474771488727D-05 6.2992607988666D-04 2.1344818316982D-04 +350 3.4900000000000D+00 2.2284729311549D-06 -7.8914300720293D-06 -4.3172753694631D-05 6.2969822583049D-04 -2.5350982714844D-04 +351 3.5000000000000D+00 2.1475041666608D-06 -8.2917275099163D-06 -3.6895818343330D-05 6.2496523801514D-04 -6.8746945715846D-04 +352 3.5100000000000D+00 2.0628452500129D-06 -8.6295624147381D-06 -3.0687355434867D-05 6.1605990087756D-04 -1.0879051083039D-03 +353 3.5200000000000D+00 1.9751167128370D-06 -8.9058226514222D-06 -2.4587406283376D-05 6.0331911774057D-04 -1.4545227804528D-03 +354 3.5300000000000D+00 1.8849285411994D-06 -9.1217814048727D-06 -1.8632636369331D-05 5.8708174905842D-04 -1.7872476178406D-03 +355 3.5400000000000D+00 1.7928757655076D-06 -9.2790584557536D-06 -1.2856317012230D-05 5.6768616768035D-04 -2.0862092210086D-03 +356 3.5500000000000D+00 1.6995356550043D-06 -9.3795898165508D-06 -7.2883454473592D-06 5.4546850127623D-04 -2.3517291137470D-03 +357 3.5600000000000D+00 1.6054647916353D-06 -9.4255945740373D-06 -1.9552776488399D-06 5.2076081129681D-04 -2.5843071140913D-03 +358 3.5700000000000D+00 1.5111964592313D-06 -9.4195423888971D-06 3.1196235193138D-06 4.9388940846139D-04 -2.7846076878979D-03 +359 3.5800000000000D+00 1.4172379807877D-06 -9.3641177151487D-06 7.9163210305804D-06 4.6517311749555D-04 -2.9534449945300D-03 +360 3.5900000000000D+00 1.3240687361808D-06 -9.2621881738636D-06 1.2417922674231D-05 4.3492185582520D-04 -3.0917690648013D-03 +361 3.6000000000000D+00 1.2321387661410D-06 -9.1167763952409D-06 1.6610587320438D-05 4.0343548342838D-04 -3.2006529128453D-03 +362 3.6100000000000D+00 1.1418673074706D-06 -8.9310295136859D-06 2.0483418840426D-05 3.7100261138251D-04 -3.2812787447630D-03 +363 3.6200000000000D+00 1.0536416805177D-06 -8.7081900313539D-06 2.4028347473034D-05 3.3789956828902D-04 -3.3349244450743D-03 +364 3.6300000000000D+00 9.6781619089283D-07 -8.4515639218014D-06 2.7239992132111D-05 3.0438934213452D-04 -3.3629489379577D-03 +365 3.6400000000000D+00 8.8471197081649D-07 -8.1645000382678D-06 3.0115538354718D-05 2.7072104528093D-04 -3.3667814068575D-03 +366 3.6500000000000D+00 8.0461657692440D-07 -7.8503634526897D-06 3.2654591388385D-05 2.3712921184594D-04 -3.3479082605438D-03 +367 3.6600000000000D+00 7.2778400800485D-07 -7.5125139763265D-06 3.4859036349190D-05 2.0383334189853D-04 -3.3078619068541D-03 +368 3.6700000000000D+00 6.5443468003872D-07 -7.1542774371328D-06 3.6732855753482D-05 1.7103731576845D-04 -3.2482065937138D-03 +369 3.6800000000000D+00 5.8475601177600D-07 -6.7789314894675D-06 3.8282000290714D-05 1.3892928804260D-04 -3.1705297844279D-03 +370 3.6900000000000D+00 5.1890297887733D-07 -6.3896855744065D-06 3.9514224929568D-05 1.0768147968302D-04 -3.0764311766023D-03 +371 3.7000000000000D+00 4.5699886909534D-07 -5.9896645187814D-06 4.0438935045846D-05 7.7450117378133D-05 -2.9675131123176D-03 +372 3.7100000000000D+00 3.9913624704893D-07 -5.5818902255811D-06 4.1067008589079D-05 4.8375417523425D-05 -2.8453700271685D-03 +373 3.7200000000000D+00 3.4537803412485D-07 -5.1692679930873D-06 4.1410639145374D-05 2.0581707996254D-05 -2.7115798049527D-03 +374 3.7300000000000D+00 2.9575870124039D-07 -4.7545762539006D-06 4.1483192774733D-05 -5.8223365597791D-06 -2.5676965301019D-03 +375 3.7400000000000D+00 2.5028560231356D-07 -4.3404549415095D-06 4.1299048157002D-05 -3.0743428460104D-05 -2.4152425837696D-03 +376 3.7500000000000D+00 2.0894035551096D-07 -3.9293969134687D-06 4.0873452092497D-05 -5.4103315921870D-05 -2.2557020615807D-03 +377 3.7600000000000D+00 1.7168063843817D-07 -3.5237361441794D-06 4.0222331787670D-05 -7.5838352112339D-05 -2.0905124128419D-03 +378 3.7700000000000D+00 1.3844148091424D-07 -3.1256456309644D-06 3.9362193831759D-05 -9.5899027382704D-05 -1.9210608790701D-03 +379 3.7800000000000D+00 1.0913699967118D-07 -2.7371311800137D-06 3.8309973111339D-05 -1.1424943115628D-04 -1.7486787415793D-03 +380 3.7900000000000D+00 8.3661988808358D-08 -2.3600283449401D-06 3.7082908768674D-05 -1.3086669082892D-04 -1.5746371654559D-03 +381 3.8000000000000D+00 6.1893924820887D-08 -1.9959985779471D-06 3.5698391606955D-05 -1.4574028553581D-04 -1.4001422704711D-03 +382 3.8100000000000D+00 4.3694584019538D-08 -1.6465288005197D-06 3.4173854194493D-05 -1.5887141108572D-04 -1.2263322201357D-03 +383 3.8200000000000D+00 2.8911655796034D-08 -1.3129321977977D-06 3.2526668555482D-05 -1.7027231629313D-04 -1.0542749135820D-03 +384 3.8300000000000D+00 1.7380527997894D-08 -9.9634909952538D-07 3.0774034572111D-05 -1.7996557693426D-04 -8.8496557528508D-04 +385 3.8400000000000D+00 8.9258698162858D-09 -6.9774940529217D-07 2.8932889429286D-05 -1.8798340040790D-04 -7.1932533560362D-04 +386 3.8500000000000D+00 3.3639217706709D-09 -4.1793494459700D-07 2.7019775740204D-05 -1.9436669660669D-04 -5.5819893129951D-04 +387 3.8600000000000D+00 5.0351875633748D-10 -1.5754442765677D-07 2.5050798871829D-05 -1.9916450781844D-04 -4.0235523098439D-04 +388 3.8700000000000D+00 1.4788252617431D-10 8.2941922641048D-08 2.3041537873063D-05 -2.0243319056051D-04 -2.5248668681229D-04 +389 3.8800000000000D+00 2.0960706588315D-09 3.0319689253149D-07 2.1006981716529D-05 -2.0423569125159D-04 -1.0920966339257D-04 +390 3.8900000000000D+00 6.1447268383689D-09 5.0303967431083D-07 1.8961454689260D-05 -2.0464069640893D-04 2.6935100652022D-05 +391 3.9000000000000D+00 1.2089556612716D-08 6.8242896147937D-07 1.6918559988307D-05 -2.0372186681251D-04 1.5548147577568D-04 +392 3.9100000000000D+00 1.9726382495504D-08 8.4145599913639D-07 1.4891148623943D-05 -2.0155721009740D-04 2.7603628433264D-04 +393 3.9200000000000D+00 2.8852546321687D-08 9.8033664266429D-07 1.2891274034299D-05 -1.9822831656491D-04 3.8827763676062D-04 +394 3.9300000000000D+00 3.9267938700831D-08 1.0994038639893D-06 1.0930166508279D-05 -1.9381973038764D-04 4.9195289963840D-04 +395 3.9400000000000D+00 5.0776689656703D-08 1.1990972211210D-06 9.0181861920942D-06 -1.8841803018781D-04 5.8687624211706D-04 +396 3.9500000000000D+00 6.3187737731461D-08 1.2799559411876D-06 7.1648221991175D-06 -1.8211136992811D-04 6.7292612625600D-04 +397 3.9600000000000D+00 7.6315817214600D-08 1.3426099773668D-06 5.3786789216813D-06 -1.7498883441978D-04 7.5004247468865D-04 +398 3.9700000000000D+00 8.9982334995433D-08 1.3877711112244D-06 3.6674690144488D-06 -1.6713983480654D-04 8.1822367353993D-04 +399 3.9800000000000D+00 1.0401605875388D-07 1.4162245568366D-06 2.0380151187326D-06 -1.5865358149589D-04 8.7752350850401D-04 +400 3.9900000000000D+00 1.1825427823106D-07 1.4288170188179D-06 4.9624369367536D-07 -1.4961831273077D-04 9.2804708964948D-04 +401 4.0000000000000D+00 1.3254286985327D-07 1.4264512365510D-06 -9.5279194731901D-07 -1.4012105394474D-04 9.6994821774585D-04 +402 4.0100000000000D+00 1.4673696123442D-07 1.4100762841386D-06 -2.3049001255878D-06 -1.3024707323118D-04 1.0034255940840D-03 +403 4.0200000000000D+00 1.6070130115505D-07 1.3806795619155D-06 -3.5567308451726D-06 -1.2007948085685D-04 1.0287191622678D-03 +404 4.0300000000000D+00 1.7431067706873D-07 1.3392776634988D-06 -4.7057521721276D-06 -1.0969878578379D-04 1.0461065035045D-03 +405 4.0400000000000D+00 1.8745030621384D-07 1.2869069363871D-06 -5.7502230470122D-06 -9.9182455548252D-05 1.0558992453711D-03 +406 4.0500000000000D+00 2.0001575636222D-07 1.2246183456538D-06 -6.6891614362117D-06 -8.8604749474792D-05 1.0584391368349D-03 +407 4.0600000000000D+00 2.1191313277082D-07 1.1534691543968D-06 -7.5223105438675D-06 -7.8036381772537D-05 1.0540944223404D-03 +408 4.0700000000000D+00 2.2305906350296D-07 1.0745166436488D-06 -8.2501038653381D-06 -6.7544312473078D-05 1.0432590686895D-03 +409 4.0800000000000D+00 2.3338076327834D-07 9.8880942047434D-07 -8.8736216356086D-06 -5.7191438206833D-05 1.0263420941821D-03 +410 4.0900000000000D+00 2.4281591046573D-07 8.9738144615751D-07 -9.3945506132049D-06 -4.7036431387848D-05 1.0037654372635D-03 +411 4.1000000000000D+00 2.5131239729723D-07 8.0124773316762D-07 -9.8151451058523D-06 -3.7133674919015D-05 9.7596650335274D-04 +412 4.1100000000000D+00 2.5882814135331D-07 7.0139822838130D-07 -1.0138181625910D-05 -2.7533120998341D-05 9.4339276086893D-04 +413 4.1200000000000D+00 2.6533080148183D-07 5.9879369572707D-07 -1.0366918392110D-05 -1.8280196187509D-05 9.0647884396475D-04 +414 4.1300000000000D+00 2.7079747640470D-07 4.9435864102643D-07 -1.0505037851148D-05 -9.4158068973557D-06 8.6569943638751D-04 +415 4.1400000000000D+00 2.7521432579754D-07 3.8897860368025D-07 -1.0556607725670D-05 -9.7629192467451D-07 8.2153403123046D-04 +416 4.1500000000000D+00 2.7857615844969D-07 2.8349724103951D-07 -1.0526038849853D-05 7.0065837282651D-06 7.7444622396335D-04 +417 4.1600000000000D+00 2.8088599635248D-07 1.7871269048191D-07 -1.0418037582544D-05 1.4505583985756D-05 7.2488926045762D-04 +418 4.1700000000000D+00 2.8215464086543D-07 7.5375604675437D-08 -1.0237566800584D-05 2.1497421456084D-05 6.7340563781295D-04 +419 4.1800000000000D+00 2.8240007187296D-07 -2.5815424563788D-08 -9.9897842580961D-06 2.7964184842087D-05 6.2032059883730D-04 +420 4.1900000000000D+00 2.8164700528603D-07 -1.2421416605162D-07 -9.6800113653213D-06 3.3892161350517D-05 5.6595348851483D-04 +421 4.2000000000000D+00 2.7992637458884D-07 -2.1922790035266D-07 -9.3136933774928D-06 3.9271484806909D-05 5.1066054584771D-04 +422 4.2100000000000D+00 2.7727477338003D-07 -3.1031872636105D-07 -8.8963566047355D-06 4.4096141783238D-05 4.5480321930930D-04 +423 4.2200000000000D+00 2.7373397569111D-07 -3.9700368399807D-07 -8.4335834100573D-06 4.8367084535310D-05 3.9842230743421D-04 +424 4.2300000000000D+00 2.6935016444817D-07 -4.7885646065633D-07 -7.9309337700872D-06 5.2082361403127D-05 3.4221548963806D-04 +425 4.2400000000000D+00 2.6417352333506D-07 -5.5550625513128D-07 -7.3939387626466D-06 5.5243817847491D-05 2.8684572769789D-04 +426 4.2500000000000D+00 2.5825770683234D-07 -6.2663714760277D-07 -6.8280721480105D-06 5.7858191686775D-05 2.3281052738224D-04 +427 4.2600000000000D+00 2.5165926593525D-07 -6.9198748803551D-07 -6.2387143653549D-06 5.9935950130676D-05 1.8053506701839D-04 +428 4.2700000000000D+00 2.4443719959421D-07 -7.5134863780690D-07 -5.6310565815650D-06 6.1478087801837D-05 1.3093484386170D-04 +429 4.2800000000000D+00 2.3665217421733D-07 -8.0456405046119D-07 -5.0102615115260D-06 6.2513081877571D-05 8.3731542022144D-05 +430 4.2900000000000D+00 2.2836616196981D-07 -8.5152737266255D-07 -4.3813243997216D-06 6.3074243573536D-05 3.8444503573982D-05 +431 4.3000000000000D+00 2.1964201064100D-07 -8.9218046382420D-07 -3.7489990519615D-06 6.3189366740651D-05 -5.1641948224749D-06 +432 4.3100000000000D+00 2.1054292744357D-07 -9.2651139176846D-07 -3.1178042563076D-06 6.2885665157316D-05 -4.7323671861878D-05 +433 4.3200000000000D+00 2.0113210918233D-07 -9.5455153214707D-07 -2.4923990368573D-06 6.2218093484936D-05 -8.8392465539289D-05 +434 4.3300000000000D+00 1.9147210799030D-07 -9.7637469195925D-07 -1.8765766025579D-06 6.1194411926118D-05 -1.2831347898587D-04 +435 4.3400000000000D+00 1.8162447957775D-07 -9.9209410644166D-07 -1.2735198949780D-06 5.9794542092609D-05 -1.6670084026354D-04 +436 4.3500000000000D+00 1.7164954717747D-07 -1.0018586232035D-06 -6.8650192017120D-07 5.8023249529940D-05 -2.0315730699702D-04 +437 4.3600000000000D+00 1.6160598887050D-07 -1.0058503483095D-06 -1.1860573417037D-07 5.5889734675006D-05 -2.3711902711975D-04 +438 4.3700000000000D+00 1.5155056963058D-07 -1.0042887721912D-06 4.2828240902684D-07 5.3386500780748D-05 -2.6895153001913D-04 +439 4.3800000000000D+00 1.4153776021587D-07 -9.9741622806404D-07 9.5173555156872D-07 5.0532198907533D-05 -2.9820484432624D-04 +440 4.3900000000000D+00 1.3161936317473D-07 -9.8548061613150D-07 1.4466580260233D-06 4.7423224837303D-05 -3.2146661803816D-04 +441 4.4000000000000D+00 1.2184451359761D-07 -9.6876423716873D-07 1.9099826098150D-06 4.4125128320865D-05 -3.3729616609130D-04 +442 4.4100000000000D+00 1.1225939259483D-07 -9.4757059062839D-07 2.3391713573893D-06 4.0708228920100D-05 -3.4472662692331D-04 +443 4.4200000000000D+00 1.0290706926760D-07 -9.2220563182239D-07 2.7316456238909D-06 3.7233645053770D-05 -3.4253534295972D-04 +444 4.4300000000000D+00 9.3827397271402D-08 -8.9292960417580D-07 3.0829101797958D-06 3.3721737591534D-05 -3.2681920864905D-04 +445 4.4400000000000D+00 8.5056640797894D-08 -8.6022845017690D-07 3.3986489591702D-06 3.0309543378204D-05 -3.0668202334271D-04 +446 4.4500000000000D+00 7.6627678829558D-08 -8.2449243092132D-07 3.6808163235819D-06 2.7058009874466D-05 -2.8620773065085D-04 +447 4.4600000000000D+00 6.8569853545493D-08 -7.8610521001964D-07 3.9316604766391D-06 2.4002420937424D-05 -2.6968142698529D-04 +448 4.4700000000000D+00 6.0908936017089D-08 -7.4543469984023D-07 4.1533853301904D-06 2.1145486308875D-05 -2.6115624817924D-04 +449 4.4800000000000D+00 5.3670611619104D-08 -7.0310210477961D-07 4.3485285508904D-06 1.8729759399009D-05 -2.6677258561452D-04 +450 4.4900000000000D+00 4.6869764262142D-08 -6.5912758309717D-07 4.5174453771084D-06 1.6383732560416D-05 -2.8590913888566D-04 +451 4.5000000000000D+00 4.0519765624692D-08 -6.1366018865125D-07 4.6599254185503D-06 1.3856996747375D-05 -3.1811475820445D-04 +452 4.5100000000000D+00 3.4631614473602D-08 -5.6690655029390D-07 4.7747848335587D-06 1.0952025950741D-05 -3.6211433193826D-04 +453 4.5200000000000D+00 2.9213490849504D-08 -5.1909509206620D-07 4.8596179906825D-06 7.4917437504066D-06 -4.1523059623287D-04 +454 4.5300000000000D+00 2.4262014042582D-08 -4.7036311261255D-07 4.9174726611883D-06 3.1849002015910D-06 -4.7794750364111D-04 +455 4.5400000000000D+00 1.9781464761553D-08 -4.2105561825559D-07 4.9426311399681D-06 -2.0174556795927D-06 -5.4440225132297D-04 +456 4.5500000000000D+00 1.5787249566245D-08 -3.7178985045946D-07 4.9182203448944D-06 -7.8440880442203D-06 -6.0086303477165D-04 +457 4.5600000000000D+00 1.2280835764765D-08 -3.2309608873097D-07 4.8352055209561D-06 -1.4129784114994D-05 -6.3862992095982D-04 +458 4.5700000000000D+00 9.2585991793709D-09 -2.7555502544858D-07 4.6860188744174D-06 -2.0648754409364D-05 -6.4983771377573D-04 +459 4.5800000000000D+00 6.7118081918029D-09 -2.2976573691482D-07 4.4647434478653D-06 -2.7135373167888D-05 -6.2761234270075D-04 +460 4.5900000000000D+00 4.6462028827604D-09 -1.8596237741037D-07 4.1508559040569D-06 -3.3473462399588D-05 -5.5393146009493D-04 +461 4.6000000000000D+00 3.0069327885132D-09 -1.4532378212899D-07 3.7725113351518D-06 -3.9079152259475D-05 -4.4698346967463D-04 +462 4.6100000000000D+00 1.7558475964041D-09 -1.0856145360280D-07 3.3418465283806D-06 -4.3581651225177D-05 -3.1280234535471D-04 +463 4.6200000000000D+00 8.4915969705433D-10 -7.6292954655624D-08 2.8740180387795D-06 -4.6652759168558D-05 -1.5953858180382D-04 +464 4.6300000000000D+00 2.3887033473824D-10 -4.8996163982418D-08 2.3863025824990D-06 -4.8035810423226D-05 3.1778544645196D-06 +465 4.6400000000000D+00 -1.2250431415063D-10 -2.7562755923281D-08 1.8979744087327D-06 -4.7196038177564D-05 1.6355095802022D-04 +466 4.6500000000000D+00 -2.8780467004840D-10 -1.1832688819385D-08 1.4271255747575D-06 -4.4246283831052D-05 3.1172234641312D-04 +467 4.6600000000000D+00 -3.1179689117087D-10 -8.9026115342321D-10 9.9007118958208D-07 -3.9759980515588D-05 4.3976396889774D-04 +468 4.6700000000000D+00 -2.4368721921947D-10 5.8588150681884D-09 6.0193081890332D-07 -3.4090849960901D-05 5.3983084856047D-04 +469 4.6800000000000D+00 -1.2783104752713D-10 9.1355255371082D-09 2.7501404657480D-07 -2.7656142687634D-05 6.0585554776792D-04 +470 4.6900000000000D+00 -2.0059040570896D-12 9.7351949591343D-09 1.8053366141515D-08 -2.0903893413279D-05 6.3400114147995D-04 +471 4.7000000000000D+00 6.2410725096188D-11 8.9932498471289D-09 -1.4251039481492D-07 -1.4621557190830D-05 6.0889220705044D-04 +472 4.7100000000000D+00 9.6049240042648D-11 7.0517442738237D-09 -2.3368785985190D-07 -8.7968819454666D-06 5.4944915799984D-04 +473 4.7200000000000D+00 9.8124550611965D-11 4.4844013185940D-09 -2.6560119596369D-07 -3.6902190506897D-06 4.6348964622459D-04 +474 4.7300000000000D+00 7.3439645982573D-11 1.7928017938465D-09 -2.5077991074199D-07 4.9465116793633D-07 3.6012556224072D-04 +475 4.7400000000000D+00 3.1192618631257D-11 -6.1872295938799D-10 -2.0337225649952D-07 3.6243909077367D-06 2.4921444426472D-04 +476 4.7500000000000D+00 -4.1294973466690D-12 -2.2987221240575D-09 -1.4477157127561D-07 5.5315015901607D-06 1.4518004008005D-04 +477 4.7600000000000D+00 -1.3324042574619D-11 -2.9780973491623D-09 -9.2588130775016D-08 6.1723480635570D-06 5.9549377309858D-05 +478 4.7700000000000D+00 -1.7754558955674D-11 -2.9728819518977D-09 -4.1847620715269D-08 5.9070592773444D-06 -1.1773212449844D-05 +479 4.7800000000000D+00 -1.6955522359171D-11 -2.4089414333535D-09 2.0487652925055D-09 4.9525467182490D-06 -6.6134781843222D-05 +480 4.7900000000000D+00 -1.1583113359574D-11 -1.4723974540517D-09 3.5546516341883D-08 3.5559617499900D-06 -1.0238687503464D-04 +481 4.8000000000000D+00 -3.1847507522700D-12 -3.8082357818435D-10 5.6851046868034D-08 1.9724344064874D-06 -1.2078825611346D-04 +482 4.8100000000000D+00 -5.2154206226833D-14 2.5771823326464D-10 6.5511378714645D-08 7.2718123374428D-07 -1.2209169940189D-04 +483 4.8200000000000D+00 -1.0814648398309D-13 5.2316929307783D-10 6.2845520672536D-08 -1.7463431478849D-07 -1.0937317740868D-04 +484 4.8300000000000D+00 -1.2895021054936D-13 6.0364543712799D-10 5.1267056984026D-08 -8.2338639776316D-07 -8.6607117736927D-05 +485 4.8400000000000D+00 -1.1379224501856D-13 5.1696833025790D-10 3.3769129714713D-08 -1.2007811996945D-06 -5.7806833885819D-05 +486 4.8500000000000D+00 -6.9139686450287D-14 3.0596228435323D-10 1.3691883844321D-08 -1.3222095131097D-06 -2.7079196608886D-05 +487 4.8600000000000D+00 -6.9328004747572D-15 2.9981962250122D-11 -5.6379836732777D-09 -1.2295444759093D-06 1.7075670180512D-06 +488 4.8700000000000D+00 0.0000000000000D+00 -4.0815079046137D-11 -1.4118212144920D-08 -1.0900211736976D-06 1.8623339008050D-05 +489 4.8800000000000D+00 0.0000000000000D+00 -6.8987638063102D-11 -1.7348134073588D-08 -8.5400983473471D-07 2.8501982906014D-05 +490 4.8900000000000D+00 0.0000000000000D+00 -7.5803052712135D-11 -1.6468216022266D-08 -5.5299465790997D-07 3.2236506742459D-05 +491 4.9000000000000D+00 0.0000000000000D+00 -6.2520359926031D-11 -1.2297454411743D-08 -2.3172734799434D-07 3.0595722550240D-05 +492 4.9100000000000D+00 0.0000000000000D+00 -3.4021929943247D-11 -6.0335277941197D-09 6.8175318919191D-08 2.4851354544601D-05 +493 4.9200000000000D+00 0.0000000000000D+00 1.9817776770395D-13 6.3667790987065D-10 3.0629483081040D-07 1.6833504333800D-05 +494 4.9300000000000D+00 0.0000000000000D+00 2.9645769179359D-12 2.4106603855597D-09 3.8783392749675D-07 1.1545133672390D-05 +495 4.9400000000000D+00 0.0000000000000D+00 4.6152658072668D-12 3.3030295630094D-09 3.8964071872127D-07 6.1332199461088D-06 +496 4.9500000000000D+00 0.0000000000000D+00 4.9304396063905D-12 3.3030823169877D-09 3.2419359921094D-07 1.1799898846608D-06 +497 4.9600000000000D+00 0.0000000000000D+00 3.9714161139210D-12 2.5427445569386D-09 2.1091980309045D-07 -2.8790950086690D-06 +498 4.9700000000000D+00 0.0000000000000D+00 2.0381635939266D-12 1.2616756101654D-09 7.3492951174595D-08 -5.7643181565341D-06 +499 4.9800000000000D+00 0.0000000000000D+00 3.7613877766187D-15 -4.3132895598620D-11 -5.0757273885480D-08 -7.3249212065331D-06 +500 4.9900000000000D+00 0.0000000000000D+00 2.3801714681692D-14 -2.8474773780331D-10 -8.9456443798050D-08 -7.4786021236057D-06 +501 5.0000000000000D+00 0.0000000000000D+00 3.5335483373180D-14 -4.1524769398428D-10 -1.0368027337129D-07 -6.5357952862927D-06 +502 5.0100000000000D+00 0.0000000000000D+00 3.6977543075900D-14 -4.2710770264966D-10 -9.5104050850035D-08 -4.7725644691025D-06 +503 5.0200000000000D+00 0.0000000000000D+00 2.9340689988710D-14 -3.3375521125696D-10 -6.8423482140406D-08 -2.5268158704777D-06 +504 5.0300000000000D+00 0.0000000000000D+00 1.4712204524321D-14 -1.6511981573416D-10 -3.0474344533984D-08 -1.6195305390258D-07 +505 5.0400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.0042907961892D-12 5.4053620006171D-09 1.7765798175523D-06 +506 5.0500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.2086300038698D-11 1.4396042421896D-08 2.3790205192317D-06 +507 5.0600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.2279664822767D-11 1.8688701467157D-08 2.4715156453766D-06 +508 5.0700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.3585949131274D-11 1.8300298274751D-08 2.1168426776296D-06 +509 5.0800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.6708897200437D-11 1.3953181134642D-08 1.4283845702828D-06 +510 5.0900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.3738692177105D-11 6.9032945126333D-09 5.5304828456989D-07 +511 5.1000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.1265274188332D-13 -3.4903609345347D-10 -2.6926650078469D-07 +512 5.1100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -8.0739911730076D-13 -1.6546949198543D-09 -5.0066054930239D-07 +513 5.1200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.2233613292251D-12 -2.3670456273860D-09 -5.9634073650499D-07 +514 5.1300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.3094872962823D-12 -2.4492027060383D-09 -5.6241862094559D-07 +515 5.1400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.0793753293856D-12 -1.9687726926131D-09 -4.2219808458477D-07 +516 5.1500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.0195494323442D-13 -1.0763213665993D-09 -2.1164478119843D-07 +517 5.1600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.3354721611450D-16 1.9710046499183D-12 2.2343282164458D-08 +518 5.1700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.8525094808186D-15 1.2715422682006D-10 7.4273425766250D-08 +519 5.1800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.4651754091349D-15 2.0323201624255D-10 1.0197045920007D-07 +520 5.1900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.0521028054998D-14 2.2328392461999D-10 1.0470854036096D-07 +521 5.2000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.0663202528256D-15 1.9042020549207D-10 8.5463616576097D-08 +522 5.2100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.5784850448975D-15 1.1609339910979D-10 5.0121886209008D-08 +523 5.2200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -8.6047667837860D-16 1.7762098853265D-11 6.4991764176458D-09 +524 5.2300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.8525566103557D-12 -7.5897916216094D-09 +525 5.2400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.0694006066956D-11 -1.2536869902497D-08 +526 5.2500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.2568673817905D-11 -1.4111601375265D-08 +527 5.2600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.1453500987796D-11 -1.2503303827555D-08 +528 5.2700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.8260045059231D-12 -8.3588276645347D-09 +529 5.2800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.5489731780196D-12 -2.6569405297784D-09 +530 5.2900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.0712048025059D-13 4.8458398782543D-10 +531 5.3000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.5391321383220D-13 1.0799747044980D-09 +532 5.3100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.2824805180768D-13 1.3583489875355D-09 +533 5.3200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.2378130835078D-13 1.3137108152172D-09 +534 5.3300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.4792249172275D-13 9.9015037338697D-10 +535 5.3400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.1945158442812D-13 4.7087135739212D-10 +536 5.3500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.6940896188721D-16 -1.2432713140761D-11 +537 5.3600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.7820813410729D-15 -6.0231428697086D-11 +538 5.3700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.6364495438086D-15 -8.8320532871996D-11 +539 5.3800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.8404727633109D-15 -9.4362049266564D-11 +540 5.3900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.4175363050499D-15 -7.9714315035476D-11 +541 5.4000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.4904774422050D-15 -4.8821223663203D-11 +542 5.4100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.5708881324156D-16 -8.3714359412198D-12 +543 5.4200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.8082456849688D-12 +544 5.4300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.4040899241984D-12 +545 5.4400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 4.1046393060235D-12 +546 5.4500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 3.8826935451684D-12 +547 5.4600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 2.8577734699724D-12 +548 5.4700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 1.2662641861425D-12 +549 5.4800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -1.4327453225772D-14 +550 5.4900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.3020949058698D-14 +551 5.5000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.6300474919618D-14 +552 5.5100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -8.1747839066057D-14 +553 5.5200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -6.9972420140815D-14 +554 5.5300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -4.4211640833724D-14 +555 5.5400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -9.7109131764342D-15 +556 5.5500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.9286927521570D-16 +557 5.5600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.8741627173868D-16 +558 5.5700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.3219057123078D-16 +559 5.5800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -7.1776938710477D-16 +560 5.5900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -5.5964470097114D-16 +561 5.6000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 -2.9390981654805D-16 +562 5.6100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +563 5.6200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +564 5.6300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +565 5.6400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +566 5.6500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +567 5.6600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +568 5.6700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +569 5.6800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +570 5.6900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +571 5.7000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +572 5.7100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +573 5.7200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +574 5.7300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +575 5.7400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +576 5.7500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +577 5.7600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +578 5.7700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +579 5.7800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +580 5.7900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +581 5.8000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +582 5.8100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +583 5.8200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +584 5.8300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +585 5.8400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +586 5.8500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +587 5.8600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +588 5.8700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +589 5.8800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +590 5.8900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +591 5.9000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +592 5.9100000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +593 5.9200000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +594 5.9300000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +595 5.9400000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +596 5.9500000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +597 5.9600000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +598 5.9700000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +599 5.9800000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +600 5.9900000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 0.0000000000000D+00 +1 0.0000000000000D+00 2.8569429805847D-02 1.1990107233065D+02 2.2964313866455D+04 +2 1.0000000000000D-02 2.8622713702775D-02 8.8927999974775D+01 1.7107503145687D+04 +3 2.0000000000000D-02 2.8782595095081D-02 6.5925298723617D+01 1.2840953888984D+04 +4 3.0000000000000D-02 2.9049163408131D-02 4.8644144778737D+01 9.6784638236560D+03 +5 4.0000000000000D-02 2.9422567887900D-02 3.5647035389577D+01 7.3144820239452D+03 +6 5.0000000000000D-02 2.9903017890767D-02 2.5926069003982D+01 5.5419304035381D+03 +7 6.0000000000000D-02 3.0490783254261D-02 1.8719001325123D+01 4.2107192142462D+03 +8 7.0000000000000D-02 3.1186194699996D-02 1.3438238943071D+01 3.2100179996647D+03 +9 8.0000000000000D-02 3.1989644220034D-02 9.6279322093120D+00 2.4573434526008D+03 +10 9.0000000000000D-02 3.2901585387794D-02 6.9337317264269D+00 1.8910442611893D+03 +11 1.0000000000000D-01 3.3922533527316D-02 5.0802155817689D+00 1.4649094078551D+03 +12 1.1000000000000D-01 3.5053065669252D-02 3.8536267083649D+00 1.1442304142691D+03 +13 1.2000000000000D-01 3.6293820218398D-02 3.0885088049919D+00 9.0289846315459D+02 +14 1.3000000000000D-01 3.7645496256016D-02 2.6572852710416D+00 7.2125182837855D+02 +15 1.4000000000000D-01 3.9108852400682D-02 2.4620941165648D+00 5.8447284149000D+02 +16 1.5000000000000D-01 4.0684705153997D-02 2.4283696568025D+00 4.8138998962249D+02 +17 1.6000000000000D-01 4.2373926662113D-02 2.4997864471901D+00 4.0358013919285D+02 +18 1.7000000000000D-01 4.4177441830711D-02 2.6342703457045D+00 3.4469397627963D+02 +19 1.8000000000000D-01 4.6096224739601D-02 2.8008469156693D+00 2.9994804464086D+02 +20 1.9000000000000D-01 4.8131294313446D-02 2.9771471944201D+00 2.6574156737621D+02 +21 2.0000000000000D-01 5.0283709216915D-02 3.1474316063987D+00 2.3936710290396D+02 +22 2.1000000000000D-01 5.2554561955776D-02 3.3010269429700D+00 2.1879202054439D+02 +23 2.2000000000000D-01 5.4944972179618D-02 3.4310972653963D+00 2.0249351501278D+02 +24 2.3000000000000D-01 5.7456079196843D-02 3.5336858865005D+00 1.8933404729659D+02 +25 2.4000000000000D-01 6.0089033727961D-02 3.6069745971845D+00 1.7846721992818D+02 +26 2.5000000000000D-01 6.2844988938651D-02 3.6507126896470D+00 1.6926650380027D+02 +27 2.6000000000000D-01 6.5725090809269D-02 3.6657757075278D+00 1.6127112581502D+02 +28 2.7000000000000D-01 6.8730467912056D-02 3.6538229253026D+00 1.5414490569263D+02 +29 2.8000000000000D-01 7.1862220680972D-02 3.6170313989354D+00 1.4764494005278D+02 +30 2.9000000000000D-01 7.5121410271395D-02 3.5578909196589D+00 1.4159782002339D+02 +31 3.0000000000000D-01 7.8509047117777D-02 3.4790480378951D+00 1.3588162006936D+02 +32 3.1000000000000D-01 8.2026079306249D-02 3.3831895329947D+00 1.3041229819759D+02 +33 3.2000000000000D-01 8.5673380886036D-02 3.2729572743008D+00 1.2513345727571D+02 +34 3.3000000000000D-01 8.9451740248154D-02 3.1508877827199D+00 1.2000866058869D+02 +35 3.4000000000000D-01 9.3361848701981D-02 3.0193710323081D+00 1.1501568521212D+02 +36 3.5000000000000D-01 9.7404289379987D-02 2.8806241007192D+00 1.1014224392716D+02 +37 3.6000000000000D-01 1.0157952659799D-01 2.7366761691586D+00 1.0538281890735D+02 +38 3.7000000000000D-01 1.0588789579288D-01 2.5893620965634D+00 1.0073633592897D+02 +39 3.8000000000000D-01 1.1032959415192D-01 2.4403223734109D+00 9.6204472766616D+01 +40 3.9000000000000D-01 1.1490467203741D-01 2.2910077245334D+00 9.1790444724050D+01 +41 4.0000000000000D-01 1.1961302529840D-01 2.1426870014625D+00 8.7498147751092D+01 +42 4.1000000000000D-01 1.2445438854666D-01 1.9964573022853D+00 8.3331568182567D+01 +43 4.2000000000000D-01 1.2942832945847D-01 1.8532554956521D+00 7.9294389960419D+01 +44 4.3000000000000D-01 1.3453424414647D-01 1.7138705170000D+00 7.5389746883798D+01 +45 4.4000000000000D-01 1.3977135362803D-01 1.5789559582681D+00 7.1620080191404D+01 +46 4.5000000000000D-01 1.4513870139754D-01 1.4490425945617D+00 6.7987071538579D+01 +47 4.6000000000000D-01 1.5063515209150D-01 1.3245505881823D+00 6.4491628889982D+01 +48 4.7000000000000D-01 1.5625939121658D-01 1.2058011868930D+00 6.1133908542935D+01 +49 4.8000000000000D-01 1.6200992589275D-01 1.0930277931243D+00 5.7913360836640D+01 +50 4.9000000000000D-01 1.6788508654663D-01 9.8638632721523D-01 5.4828790403237D+01 +51 5.0000000000000D-01 1.7388302947460D-01 8.8596484335916D-01 5.1878424319585D+01 +52 5.1000000000000D-01 1.8000174018109D-01 7.9179238382415D-01 4.9059983409740D+01 +53 5.2000000000000D-01 1.8623903738580D-01 7.0384707700887D-01 4.6370753370759D+01 +54 5.3000000000000D-01 1.9259257758362D-01 6.2206349940375D-01 4.3807653458062D+01 +55 5.4000000000000D-01 1.9905986003395D-01 5.4633933172203D-01 4.1367301256150D+01 +56 5.5000000000000D-01 2.0563823205168D-01 4.7654134630342D-01 3.9046072642245D+01 +57 5.6000000000000D-01 2.1232489446990D-01 4.1251076711131D-01 3.6840156472374D+01 +58 5.7000000000000D-01 2.1911690714577D-01 3.5406804588170D-01 3.4745603822358D+01 +59 5.8000000000000D-01 2.2601119438454D-01 3.0101709870824D-01 3.2758371828227D+01 +60 5.9000000000000D-01 2.3300455016314D-01 2.5314904696413D-01 3.0874362314899D+01 +61 6.0000000000000D-01 2.4009364304392D-01 2.1024550526717D-01 2.9089455496066D+01 +62 6.1000000000000D-01 2.4727502068068D-01 1.7208145743814D-01 2.7399539084952D+01 +63 6.2000000000000D-01 2.5454511383258D-01 1.3842775926998D-01 2.5800533185419D+01 +64 6.3000000000000D-01 2.6190023981737D-01 1.0905330455339D-01 2.4288411343157D+01 +65 6.4000000000000D-01 2.6933660535235D-01 8.3726888331324D-02 2.2859218133361D+01 +66 6.5000000000000D-01 2.7685030875012D-01 6.2218798819752D-02 2.1509083648579D+01 +67 6.6000000000000D-01 2.8443734145538D-01 4.4302166941859D-02 2.0234235231593D+01 +68 6.7000000000000D-01 2.9209358892891D-01 2.9754100001943D-02 1.9031006775754D+01 +69 6.8000000000000D-01 2.9981483090473D-01 1.8356623689489D-02 1.7895845890600D+01 +70 6.9000000000000D-01 3.0759674106608D-01 9.8974544089648D-03 1.6825319205450D+01 +71 7.0000000000000D-01 3.1543488620462D-01 4.1706218627614D-03 1.5816116058413D+01 +72 7.1000000000000D-01 3.2332472494496D-01 9.7695988835899D-04 1.4865050794877D+01 +73 7.2000000000000D-01 3.3126160613284D-01 1.2448176582061D-04 1.3969063875137D+01 +74 7.3000000000000D-01 3.3924076699979D-01 1.4286545746770D-03 1.3125221969396D+01 +75 7.4000000000000D-01 3.4725733122895D-01 4.7125856738547D-03 1.2330717200079D+01 +76 7.5000000000000D-01 3.5530630705674D-01 9.8071330083828D-03 1.1582865671025D+01 +77 7.6000000000000D-01 3.6338258555225D-01 1.6550949700698D-02 1.0879105406152D+01 +78 7.7000000000000D-01 3.7148093921995D-01 2.4790472252142D-02 1.0216993806831D+01 +79 7.8000000000000D-01 3.7959602107328D-01 3.4379860662412D-02 9.5942047216092D+00 +80 7.9000000000000D-01 3.8772236432428D-01 4.5180897852797D-02 9.0085252104405D+00 +81 8.0000000000000D-01 3.9585438282999D-01 5.7062854950727D-02 8.4578520743317D+00 +82 8.1000000000000D-01 4.0398637242824D-01 6.9902328248542D-02 7.9401882115625D+00 +83 8.2000000000000D-01 4.1211251328496D-01 8.3583052980803D-02 7.4536388529091D+00 +84 8.3000000000000D-01 4.2022687336144D-01 9.7995698464647D-02 6.9964077206342D+00 +85 8.4000000000000D-01 4.2832341309411D-01 1.1303764860984D-01 6.5667931492448D+00 +86 8.5000000000000D-01 4.3639599136104D-01 1.2861277132276D-01 6.1631842000876D+00 +87 8.6000000000000D-01 4.4443837278944D-01 1.4463117989583D-01 5.7840567966635D+00 +88 8.7000000000000D-01 4.5244423643627D-01 1.6100898908619D-01 5.4279699030201D+00 +89 8.8000000000000D-01 4.6040718585150D-01 1.7766806823852D-01 5.0935617636485D+00 +90 8.9000000000000D-01 4.6832076050956D-01 1.9453579349515D-01 4.7795462198989D+00 +91 9.0000000000000D-01 4.7617844857070D-01 2.1154480085505D-01 4.4847091149855D+00 +92 9.1000000000000D-01 4.8397370090968D-01 2.2863274159240D-01 4.2079047971042D+00 +93 9.2000000000000D-01 4.9169994632621D-01 2.4574204131859D-01 3.9480527280066D+00 +94 9.3000000000000D-01 4.9935060782880D-01 2.6281966376935D-01 3.7041342024925D+00 +95 9.4000000000000D-01 5.0691911986287D-01 2.7981688021667D-01 3.4751891826837D+00 +96 9.5000000000000D-01 5.1439894633484D-01 2.9668904524227D-01 3.2603132495690D+00 +97 9.6000000000000D-01 5.2178359926687D-01 3.1339537946328D-01 3.0586546731451D+00 +98 9.7000000000000D-01 5.2906665790262D-01 3.2989875966928D-01 2.8694116014915D+00 +99 9.8000000000000D-01 5.3624178807261D-01 3.4616551670991D-01 2.6918293682717D+00 +100 9.9000000000000D-01 5.4330276161964D-01 3.6216524136713D-01 2.5251979174695D+00 +101 1.0000000000000D+00 5.5024347567891D-01 3.7787059834264D-01 2.3688493435560D+00 +102 1.0100000000000D+00 5.5705797160598D-01 3.9325714840051D-01 2.2221555448127D+00 +103 1.0200000000000D+00 5.6374045334708D-01 4.0830317861539D-01 2.0845259871334D+00 +104 1.0300000000000D+00 5.7028530505099D-01 4.2298954059113D-01 1.9554055753074D+00 +105 1.0400000000000D+00 5.7668710773057D-01 4.3729949642862D-01 1.8342726285406D+00 +106 1.0500000000000D+00 5.8294065479281D-01 4.5121857213914D-01 1.7206369567898D+00 +107 1.0600000000000D+00 5.8904096627090D-01 4.6473441811601D-01 1.6140380343613D+00 +108 1.0700000000000D+00 5.9498330160972D-01 4.7783667619202D-01 1.5140432671551D+00 +109 1.0800000000000D+00 6.0076317087499D-01 4.9051685273512D-01 1.4202463499258D+00 +110 1.0900000000000D+00 6.0637634427959D-01 5.0276819716297D-01 1.3322657099606D+00 +111 1.1000000000000D+00 6.1181885994275D-01 5.1458558520575D-01 1.2497430336486D+00 +112 1.1100000000000D+00 6.1708702982305D-01 5.2596540620561D-01 1.1723418725187D+00 +113 1.1200000000000D+00 6.2217744379370D-01 5.3690545373788D-01 1.0997463254759D+00 +114 1.1300000000000D+00 6.2708697185358D-01 5.4740481887394D-01 1.0316597941153D+00 +115 1.1400000000000D+00 6.3181276449525D-01 5.5746378549565D-01 9.6780380816407D-01 +116 1.1500000000000D+00 6.3635225127361D-01 5.6708372715834D-01 9.0791691824230D-01 +117 1.1600000000000D+00 6.4070313765003D-01 5.7626700522763D-01 8.5175365331474D-01 +118 1.1700000000000D+00 6.4486340020697D-01 5.8501686823031D-01 7.9908354028331D-01 +119 1.1800000000000D+00 6.4883128035019D-01 5.9333735259985D-01 7.4969018323546D-01 +120 1.1900000000000D+00 6.5260527663612D-01 6.0123318527266D-01 7.0337039990896D-01 +121 1.2000000000000D+00 6.5618413588272D-01 6.0870968892721D-01 6.5993341287107D-01 +122 1.2100000000000D+00 6.5956684323481D-01 6.1577269082339D-01 6.1920009280036D-01 +123 1.2200000000000D+00 6.6275261136489D-01 6.2242843637148D-01 5.8100225122620D-01 +124 1.2300000000000D+00 6.6574086900671D-01 6.2868350873707D-01 5.4518197983037D-01 +125 1.2400000000000D+00 6.6853124901865D-01 6.3454475559461D-01 5.1159103334200D-01 +126 1.2500000000000D+00 6.7112357617902D-01 6.4001922414510D-01 4.8009025298101D-01 +127 1.2600000000000D+00 6.7351785491769D-01 6.4511410523681D-01 4.5054902725346D-01 +128 1.2700000000000D+00 6.7571425717952D-01 6.4983668689918D-01 4.2284478704501D-01 +129 1.2800000000000D+00 6.7771311061256D-01 6.5419431750047D-01 3.9686253197988D-01 +130 1.2900000000000D+00 6.7951488726675D-01 6.5819437812870D-01 3.7249438512758D-01 +131 1.3000000000000D+00 6.8112019296451D-01 6.6184426331845D-01 3.4963917362985D-01 +132 1.3100000000000D+00 6.8252975750511D-01 6.6515136925194D-01 3.2820203278269D-01 +133 1.3200000000000D+00 6.8374442584139D-01 6.6812308793313D-01 3.0809403163184D-01 +134 1.3300000000000D+00 6.8476515033224D-01 6.7076680601973D-01 2.8923181860046D-01 +135 1.3400000000000D+00 6.8559298418768D-01 6.7308990681042D-01 2.7153728552978D-01 +136 1.3500000000000D+00 6.8622907616948D-01 6.7509977397203D-01 2.5493724930151D-01 +137 1.3600000000000D+00 6.8667466658620D-01 6.7680379603349D-01 2.3936315014045D-01 +138 1.3700000000000D+00 6.8693108464236D-01 6.7820937029653D-01 2.2475076581860D-01 +139 1.3800000000000D+00 6.8699974710706D-01 6.7932390583485D-01 2.1103994136302D-01 +140 1.3900000000000D+00 6.8688215830126D-01 6.8015482485758D-01 1.9817433363650D-01 +141 1.4000000000000D+00 6.8657991136476D-01 6.8070956220751D-01 1.8610117040872D-01 +142 1.4100000000000D+00 6.8609469070489D-01 6.8099556310743D-01 1.7477102337863D-01 +143 1.4200000000000D+00 6.8542827558211D-01 6.8102027898481D-01 1.6413759471823D-01 +144 1.4300000000000D+00 6.8458254468540D-01 6.8079116182375D-01 1.5415751656086D-01 +145 1.4400000000000D+00 6.8355948159301D-01 6.8031565713832D-01 1.4479016291576D-01 +146 1.4500000000000D+00 6.8236118097900D-01 6.7960119597417D-01 1.3599747342062D-01 +147 1.4600000000000D+00 6.8098985539356D-01 6.7865518615159D-01 1.2774378833144D-01 +148 1.4700000000000D+00 6.7944784248040D-01 6.7748500313715D-01 1.1999569415112D-01 +149 1.4800000000000D+00 6.7773761243331D-01 6.7609798069786D-01 1.1272187928556D-01 +150 1.4900000000000D+00 6.7586177553658D-01 6.7450140164028D-01 1.0589299912603D-01 +151 1.5000000000000D+00 6.7382308959481D-01 6.7270248877813D-01 9.9481549965611D-02 +152 1.5100000000000D+00 6.7162446709504D-01 6.7070839625680D-01 9.3461751226348D-02 +153 1.5200000000000D+00 6.6926898189787D-01 6.6852620140751D-01 8.7809435369490D-02 +154 1.5300000000000D+00 6.6675987534025D-01 6.6616289709834D-01 8.2501945107141D-02 +155 1.5400000000000D+00 6.6410056152584D-01 6.6362538476015D-01 7.7518037266115D-02 +156 1.5500000000000D+00 6.6129463195185D-01 6.6092046798352D-01 7.2837793027496D-02 +157 1.5600000000000D+00 6.5834585812554D-01 6.5805484680017D-01 6.8442533950511D-02 +158 1.5700000000000D+00 6.5525819414395D-01 6.5503511256425D-01 6.4314743518124D-02 +159 1.5800000000000D+00 6.5203577865015D-01 6.5186774346675D-01 6.0437993737021D-02 +160 1.5900000000000D+00 6.4868293186207D-01 6.4855910062642D-01 5.6796876505984D-02 +161 1.6000000000000D+00 6.4520416019000D-01 6.4511542474471D-01 5.3376939410822D-02 +162 1.6100000000000D+00 6.4160412194728D-01 6.4154283328081D-01 5.0164625636966D-02 +163 1.6200000000000D+00 6.3788758348410D-01 6.3784731811852D-01 4.7147217764139D-02 +164 1.6300000000000D+00 6.3405935662263D-01 6.3403474368236D-01 4.4312785121205D-02 +165 1.6400000000000D+00 6.3012420369757D-01 6.3011084547615D-01 4.1650134548336D-02 +166 1.6500000000000D+00 6.2608683387124D-01 6.2608122899854D-01 3.9148764243331D-02 +167 1.6600000000000D+00 6.2195191094304D-01 6.2195136901678D-01 3.6798820599621D-02 +168 1.6700000000000D+00 6.1772406114335D-01 6.1772660915043D-01 3.4591057722067D-02 +169 1.6800000000000D+00 6.1340790562470D-01 6.1341216175557D-01 3.2516799569510D-02 +170 1.6900000000000D+00 6.0900804932826D-01 6.0901310806030D-01 3.0567904427802D-02 +171 1.7000000000000D+00 6.0452906291428D-01 6.0453439854946D-01 2.8736731688405D-02 +172 1.7100000000000D+00 5.9997548960893D-01 5.9998085355133D-01 2.7016110660199D-02 +173 1.7200000000000D+00 5.9535185221826D-01 5.9535716402850D-01 2.5399311403462D-02 +174 1.7300000000000D+00 5.9066262911412D-01 5.9066789253020D-01 2.3880017342426D-02 +175 1.7400000000000D+00 5.8591223860914D-01 5.8591747430965D-01 2.2452299649243D-02 +176 1.7500000000000D+00 5.8110500980631D-01 5.8111021856997D-01 2.1110593188470D-02 +177 1.7600000000000D+00 5.7624513999335D-01 5.7625030984145D-01 1.9849674010339D-02 +178 1.7700000000000D+00 5.7133669342050D-01 5.7134180946095D-01 1.8664638218086D-02 +179 1.7800000000000D+00 5.6638360529055D-01 5.6638865715359D-01 1.7550882185738D-02 +180 1.7900000000000D+00 5.6138968484734D-01 5.6139467269563D-01 1.6504083990870D-02 +181 1.8000000000000D+00 5.5635862948785D-01 5.5636355765474D-01 1.5520186020564D-02 +182 1.8100000000000D+00 5.5129402857256D-01 5.5129889719473D-01 1.4595378656941D-02 +183 1.8200000000000D+00 5.4619935525588D-01 5.4620416193639D-01 1.3726084977169D-02 +184 1.8300000000000D+00 5.4107796620563D-01 5.4108270986936D-01 1.2908946417833D-02 +185 1.8400000000000D+00 5.3593310779194D-01 5.3593778830220D-01 1.2140809311832D-02 +186 1.8500000000000D+00 5.3076791882930D-01 5.3077253585235D-01 1.1418712291201D-02 +187 1.8600000000000D+00 5.2558543131547D-01 5.2558998445939D-01 1.0739874436170D-02 +188 1.8700000000000D+00 5.2038857244034D-01 5.2039306142865D-01 1.0101684204090D-02 +189 1.8800000000000D+00 5.1518016685267D-01 5.1518459148667D-01 9.5016889993296D-03 +190 1.8900000000000D+00 5.0996293871052D-01 5.0996729885669D-01 8.9375854324157D-03 +191 1.9000000000000D+00 5.0473951375263D-01 5.0474380933942D-01 8.4072101496121D-03 +192 1.9100000000000D+00 4.9951242138723D-01 4.9951665240271D-01 7.9085312527924D-03 +193 1.9200000000000D+00 4.9428409678367D-01 4.9428826327230D-01 7.4396402402268D-03 +194 1.9300000000000D+00 4.8905688296183D-01 4.8906098502140D-01 6.9987444440447D-03 +195 1.9400000000000D+00 4.8383303287950D-01 4.8383707065823D-01 6.5841599488795D-03 +196 1.9500000000000D+00 4.7861471151006D-01 4.7861868520375D-01 6.1943049235128D-03 +197 1.9600000000000D+00 4.7340399791502D-01 4.7340790776428D-01 5.8276933970696D-03 +198 1.9700000000000D+00 4.6820288730076D-01 4.6820673358836D-01 5.4829293842768D-03 +199 1.9800000000000D+00 4.6301329306511D-01 4.6301707611341D-01 5.1587014017567D-03 +200 1.9900000000000D+00 4.5783704882613D-01 4.5784076899463D-01 4.8537773050680D-03 +201 2.0000000000000D+00 4.5267591043407D-01 4.5267956811699D-01 4.5669994479007D-03 +202 2.0100000000000D+00 4.4753155796505D-01 4.4753515358910D-01 4.2972801473781D-03 +203 2.0200000000000D+00 4.4240559769198D-01 4.4240913171412D-01 4.0435974096653D-03 +204 2.0300000000000D+00 4.3729956403641D-01 4.3730303694174D-01 3.8049909434453D-03 +205 2.0400000000000D+00 4.3221492149408D-01 4.3221833379384D-01 3.5805583931391D-03 +206 2.0500000000000D+00 4.2715306653821D-01 4.2715641876781D-01 3.3694518211127D-03 +207 2.0600000000000D+00 4.2211532949654D-01 4.2211862221372D-01 3.1708743998559D-03 +208 2.0700000000000D+00 4.1710297640126D-01 4.1710621018430D-01 2.9840773002733D-03 +209 2.0800000000000D+00 4.1211721081368D-01 4.1212038625970D-01 2.8083567878667D-03 +210 2.0900000000000D+00 4.0715917561829D-01 4.0716229334161D-01 2.6430514748577D-03 +211 2.1000000000000D+00 4.0222995479048D-01 4.0223301542108D-01 2.4875397589466D-03 +212 2.1100000000000D+00 3.9733057513381D-01 3.9733357931585D-01 2.3412374095990D-03 +213 2.1200000000000D+00 3.9246200798739D-01 3.9246495637776D-01 2.2035952995976D-03 +214 2.1300000000000D+00 3.8762517090453D-01 3.8762806417154D-01 2.0740972877907D-03 +215 2.1400000000000D+00 3.8282092929882D-01 3.8282376812089D-01 1.9522582134704D-03 +216 2.1500000000000D+00 3.7805009806117D-01 3.7805288312564D-01 1.8376220281419D-03 +217 2.1600000000000D+00 3.7331344314501D-01 3.7331617514695D-01 1.7297600345867D-03 +218 2.1700000000000D+00 3.6861168311979D-01 3.6861436276091D-01 1.6282692293909D-03 +219 2.1800000000000D+00 3.6394549069477D-01 3.6394811868239D-01 1.5327707595765D-03 +220 2.1900000000000D+00 3.5931549420932D-01 3.5931807125535D-01 1.4429084566979D-03 +221 2.2000000000000D+00 3.5472227909323D-01 3.5472480591325D-01 1.3583474717793D-03 +222 2.2100000000000D+00 3.5016638929533D-01 3.5016886660772D-01 1.2787729911894D-03 +223 2.2200000000000D+00 3.4564832867999D-01 3.4565075720504D-01 1.2038890240439D-03 +224 2.2300000000000D+00 3.4116856239362D-01 3.4117094285280D-01 1.1334172741663D-03 +225 2.2400000000000D+00 3.3672751819893D-01 3.3672985131412D-01 1.0670960709580D-03 +226 2.2500000000000D+00 3.3232558777859D-01 3.3232787427136D-01 1.0046793680212D-03 +227 2.2600000000000D+00 3.2796312800879D-01 3.2796536859976D-01 9.4593580811360D-04 +228 2.2700000000000D+00 3.2364046220107D-01 3.2364265760929D-01 8.9064783449384D-04 +229 2.2800000000000D+00 3.1935788131489D-01 3.1936003225725D-01 8.3861086454414D-04 +230 2.2900000000000D+00 3.1511564514000D-01 3.1511775233068D-01 7.8963251127016D-04 +231 2.3000000000000D+00 3.1091398344864D-01 3.1091604759861D-01 7.4353184764237D-04 +232 2.3100000000000D+00 3.0675309711926D-01 3.0675511893581D-01 7.0013872302707D-04 +233 2.3200000000000D+00 3.0263315923060D-01 3.0263513941687D-01 6.5929311480729D-04 +234 2.3300000000000D+00 2.9855431612722D-01 2.9855625538181D-01 6.2084451955126D-04 +235 2.3400000000000D+00 2.9451668845739D-01 2.9451858747398D-01 5.8465138722382D-04 +236 2.3500000000000D+00 2.9052037218234D-01 2.9052223164929D-01 5.5058058079007D-04 +237 2.3600000000000D+00 2.8656543955850D-01 2.8656726015858D-01 5.1850687339418D-04 +238 2.3700000000000D+00 2.8265194009299D-01 2.8265372250303D-01 4.8831247766774D-04 +239 2.3800000000000D+00 2.7877990147191D-01 2.7878164636256D-01 4.5988659736605D-04 +240 2.3900000000000D+00 2.7494933046306D-01 2.7495103849850D-01 4.3312501107572D-04 +241 2.4000000000000D+00 2.7116021379276D-01 2.7116188563048D-01 4.0792968040677D-04 +242 2.4100000000000D+00 2.6741251899738D-01 2.6741415528796D-01 3.8420837821515D-04 +243 2.4200000000000D+00 2.6370619525023D-01 2.6370779663716D-01 3.6187434367445D-04 +244 2.4300000000000D+00 2.6004117416416D-01 2.6004274128366D-01 3.4084595607692D-04 +245 2.4400000000000D+00 2.5641737057023D-01 2.5641890405108D-01 3.2104642650374D-04 +246 2.4500000000000D+00 2.5283468327303D-01 2.5283618373646D-01 3.0240351188219D-04 +247 2.4600000000000D+00 2.4929299578326D-01 2.4929446384278D-01 2.8484924340391D-04 +248 2.4700000000000D+00 2.4579217702769D-01 2.4579361328903D-01 2.6831967072557D-04 +249 2.4800000000000D+00 2.4233208203729D-01 2.4233348709830D-01 2.5275462479919D-04 +250 2.4900000000000D+00 2.3891255261389D-01 2.3891392706442D-01 2.3809749179962D-04 +251 2.5000000000000D+00 2.3553341797585D-01 2.3553476239772D-01 2.2429500080105D-04 +252 2.5100000000000D+00 2.3219449538306D-01 2.3219581034998D-01 2.1129702695243D-04 +253 2.5200000000000D+00 2.2889559074203D-01 2.2889687681961D-01 1.9905640335092D-04 +254 2.5300000000000D+00 2.2563649919145D-01 2.2563775693710D-01 1.8752874469537D-04 +255 2.5400000000000D+00 2.2241700566825D-01 2.2241823563119D-01 1.7667228384572D-04 +256 2.5500000000000D+00 2.1923688545535D-01 2.1923808817660D-01 1.6644771535453D-04 +257 2.5600000000000D+00 2.1609590471113D-01 2.1609708072349D-01 1.5681804889264D-04 +258 2.5700000000000D+00 2.1299382098074D-01 2.1299497080882D-01 1.4774847343744D-04 +259 2.5800000000000D+00 2.0993038369055D-01 2.0993150785075D-01 1.3920622723172D-04 +260 2.5900000000000D+00 2.0690533462553D-01 2.0690643362609D-01 1.3116047585021D-04 +261 2.6000000000000D+00 2.0391840838988D-01 2.0391948273089D-01 1.2358219925467D-04 +262 2.6100000000000D+00 2.0096933285195D-01 2.0097038302539D-01 1.1644408382598D-04 +263 2.6200000000000D+00 1.9805782957355D-01 1.9805885606333D-01 1.0972042083003D-04 +264 2.6300000000000D+00 1.9518361422368D-01 1.9518461750566D-01 1.0338701239741D-04 +265 2.6400000000000D+00 1.9234639697767D-01 1.9234737751975D-01 9.7421082000189D-05 +266 2.6500000000000D+00 1.8954588290216D-01 1.8954684116432D-01 9.1801189813560D-05 +267 2.6600000000000D+00 1.8678177232560D-01 1.8678270875994D-01 8.6507154356307D-05 +268 2.6700000000000D+00 1.8405376119520D-01 1.8405467624603D-01 8.1519978382995D-05 +269 2.6800000000000D+00 1.8136154142113D-01 1.8136243552501D-01 7.6821778249392D-05 +270 2.6900000000000D+00 1.7870480120725D-01 1.7870567479311D-01 7.2395718514716D-05 +271 2.7000000000000D+00 1.7608322536928D-01 1.7608407885842D-01 6.8225950711058D-05 +272 2.7100000000000D+00 1.7349649564154D-01 1.7349732944775D-01 6.4297554329425D-05 +273 2.7200000000000D+00 1.7094429097135D-01 1.7094510550097D-01 6.0596482156216D-05 +274 2.7300000000000D+00 1.6842628780171D-01 1.6842708345379D-01 5.7109509782691D-05 +275 2.7400000000000D+00 1.6594216034355D-01 1.6594293750988D-01 5.3824186197699D-05 +276 2.7500000000000D+00 1.6349158083693D-01 1.6349233990215D-01 5.0728788296677D-05 +277 2.7600000000000D+00 1.6107421980090D-01 1.6107496114252D-01 4.7812278778909D-05 +278 2.7700000000000D+00 1.5868974627457D-01 1.5869047026305D-01 4.5064265273918D-05 +279 2.7800000000000D+00 1.5633782804789D-01 1.5633853504670D-01 4.2474962285013D-05 +280 2.7900000000000D+00 1.5401813188246D-01 1.5401882224822D-01 4.0035155917045D-05 +281 2.8000000000000D+00 1.5173032372341D-01 1.5173099780604D-01 3.7736170301824D-05 +282 2.8100000000000D+00 1.4947406890257D-01 1.4947472704534D-01 3.5569835647369D-05 +283 2.8200000000000D+00 1.4724903233259D-01 1.4724967487226D-01 3.3528458623542D-05 +284 2.8300000000000D+00 1.4505487869225D-01 1.4505550595911D-01 3.1604794883883D-05 +285 2.8400000000000D+00 1.4289127260476D-01 1.4289188492275D-01 2.9792022171199D-05 +286 2.8500000000000D+00 1.4075787880761D-01 1.4075847649439D-01 2.8083715575808D-05 +287 2.8600000000000D+00 1.3865436231410D-01 1.3865494568119D-01 2.6473824749060D-05 +288 2.8700000000000D+00 1.3658038856870D-01 1.3658095792152D-01 2.4956651578053D-05 +289 2.8800000000000D+00 1.3453562359481D-01 1.3453617923280D-01 2.3526829488577D-05 +290 2.8900000000000D+00 1.3251973413529D-01 1.3252027635204D-01 2.2179304218660D-05 +291 2.9000000000000D+00 1.3053238778648D-01 1.3053291686976D-01 2.0909315667933D-05 +292 2.9100000000000D+00 1.2857325312625D-01 1.2857376935815D-01 1.9712380400730D-05 +293 2.9200000000000D+00 1.2664199983565D-01 1.2664250349265D-01 1.8584275432125D-05 +294 2.9300000000000D+00 1.2473829881348D-01 1.2473879016656D-01 1.7521023466109D-05 +295 2.9400000000000D+00 1.2286182228678D-01 1.2286230160151D-01 1.6518878114684D-05 +296 2.9500000000000D+00 1.2101224391481D-01 1.2101271145142D-01 1.5574310438347D-05 +297 2.9600000000000D+00 1.1918923888739D-01 1.1918969490089D-01 1.4683996400524D-05 +298 2.9700000000000D+00 1.1739248401825D-01 1.1739292875850D-01 1.3844804955235D-05 +299 2.9800000000000D+00 1.1562165783380D-01 1.1562209154561D-01 1.3053786595713D-05 +300 2.9900000000000D+00 1.1387644065675D-01 1.1387686357997D-01 1.2308162734776D-05 +301 3.0000000000000D+00 1.1215651468413D-01 1.1215692705374D-01 1.1605316079889D-05 +302 3.0100000000000D+00 1.1046156406238D-01 1.1046196610857D-01 1.0942780928051D-05 +303 3.0200000000000D+00 1.0879127495726D-01 1.0879166690552D-01 1.0318234353530D-05 +304 3.0300000000000D+00 1.0714533561942D-01 1.0714571769062D-01 9.7294879611749D-06 +305 3.0400000000000D+00 1.0552343644589D-01 1.0552380885637D-01 9.1744801619311D-06 +306 3.0500000000000D+00 1.0392527003840D-01 1.0392563300006D-01 8.6512686048631D-06 +307 3.0600000000000D+00 1.0235053125752D-01 1.0235088497788D-01 8.1580232373961D-06 +308 3.0700000000000D+00 1.0079891727253D-01 1.0079926195484D-01 7.6930199644454D-06 +309 3.0800000000000D+00 9.9270127608887D-02 9.9270463452195D-02 7.2546343670383D-06 +310 3.0900000000000D+00 9.7763864191943D-02 9.7764191391169D-02 6.8413358747877D-06 +311 3.1000000000000D+00 9.6279831387546D-02 9.6280150133563D-02 6.4516822888386D-06 +312 3.1100000000000D+00 9.4817736038672D-02 9.4818046518387D-02 6.0843148643907D-06 +313 3.1200000000000D+00 9.3377287500624D-02 9.3377589897052D-02 5.7379532463756D-06 +314 3.1300000000000D+00 9.1958197672483D-02 9.1958492164822D-02 5.4113909540806D-06 +315 3.1400000000000D+00 9.0560181025783D-02 9.0560467789486D-02 5.1034911362352D-06 +316 3.1500000000000D+00 8.9182954630471D-02 8.9183233837323D-02 4.8131825983134D-06 +317 3.1600000000000D+00 8.7826238179071D-02 8.7826509997255D-02 4.5394558767997D-06 +318 3.1700000000000D+00 8.6489754007947D-02 8.6490018602120D-02 4.2813596650743D-06 +319 3.1800000000000D+00 8.5173227115836D-02 8.5173484647194D-02 4.0379975378261D-06 +320 3.1900000000000D+00 8.3876385180733D-02 8.3876635807084D-02 3.8085247384374D-06 +321 3.2000000000000D+00 8.2598958574704D-02 8.2599202450530D-02 3.5921451405081D-06 +322 3.2100000000000D+00 8.1340680376520D-02 8.1340917653046D-02 3.3881084168206D-06 +323 3.2200000000000D+00 8.0101286381651D-02 8.0101517206910D-02 3.1957075096400D-06 +324 3.2300000000000D+00 7.8880515111478D-02 7.8880739630374D-02 3.0142760353933D-06 +325 3.2400000000000D+00 7.7678107820221D-02 7.7678326174593D-02 2.8431859329869D-06 +326 3.2500000000000D+00 7.6493808500327D-02 7.6494020829009D-02 2.6818452209557D-06 +327 3.2600000000000D+00 7.5327363885325D-02 7.5327570324208D-02 2.5296960407493D-06 +328 3.2700000000000D+00 7.4178523452559D-02 7.4178724134650D-02 2.3862125650337D-06 +329 3.2800000000000D+00 7.3047039423575D-02 7.3047234479056D-02 2.2508991725717D-06 +330 3.2900000000000D+00 7.1932666763350D-02 7.1932856319636D-02 2.1232886851537D-06 +331 3.3000000000000D+00 7.0835163177415D-02 7.0835347359207D-02 2.0029408240329D-06 +332 3.3100000000000D+00 6.9754289108977D-02 6.9754468038323D-02 1.8894405564910D-06 +333 3.3200000000000D+00 6.8689807733990D-02 6.8689981530334D-02 1.7823966624469D-06 +334 3.3300000000000D+00 6.7641484955264D-02 6.7641653735504D-02 1.6814403521100D-06 +335 3.3400000000000D+00 6.6609089394881D-02 6.6609253273418D-02 1.5862240445584D-06 +336 3.3500000000000D+00 6.5592392386647D-02 6.5592551475438D-02 1.4964200660769D-06 +337 3.3600000000000D+00 6.4591167966815D-02 6.4591322375424D-02 1.4117195210965D-06 +338 3.3700000000000D+00 6.3605192864032D-02 6.3605342699676D-02 1.3318312046971D-06 +339 3.3800000000000D+00 6.2634246487842D-02 6.2634391855445D-02 1.2564806421724D-06 +340 3.3900000000000D+00 6.1678110917376D-02 6.1678251919616D-02 1.1854090601107D-06 +341 3.4000000000000D+00 6.0736570888528D-02 6.0736707625884D-02 1.1183724985057D-06 +342 3.4100000000000D+00 5.9809413780560D-02 5.9809546351355D-02 1.0551409506281D-06 +343 3.4200000000000D+00 5.8896429601436D-02 5.8896558101883D-02 9.9549761409977D-07 +344 3.4300000000000D+00 5.7997410973476D-02 5.7997535497718D-02 9.3923807332663D-07 +345 3.4400000000000D+00 5.7112153117680D-02 5.7112273757837D-02 8.8616960283388D-07 +346 3.4500000000000D+00 5.6240453837719D-02 5.6240570683929D-02 8.3611048254308D-07 +347 3.4600000000000D+00 5.5382113502658D-02 5.5382226643117D-02 7.8888941994962D-07 +348 3.4700000000000D+00 5.4536935030277D-02 5.4537044551279D-02 7.4434489652878D-07 +349 3.4800000000000D+00 5.3704723869149D-02 5.3704829855129D-02 7.0232462145205D-07 +350 3.4900000000000D+00 5.2885287980556D-02 5.2885390514125D-02 6.6268498849869D-07 +351 3.5000000000000D+00 5.2078437819275D-02 5.2078536981264D-02 6.2529062390607D-07 +352 3.5100000000000D+00 5.1283986314980D-02 5.1284082184477D-02 5.9001387257681D-07 +353 3.5200000000000D+00 5.0501748852672D-02 5.0501841507056D-02 5.5673436361536D-07 +354 3.5300000000000D+00 4.9731543252944D-02 4.9731632767930D-02 5.2533858438553D-07 +355 3.5400000000000D+00 4.8973189751459D-02 4.8973276201121D-02 4.9571951704564D-07 +356 3.5500000000000D+00 4.8226510978737D-02 4.8226594435550D-02 4.6777624625215D-07 +357 3.5600000000000D+00 4.7491331939454D-02 4.7491412474327D-02 4.4141360684324D-07 +358 3.5700000000000D+00 4.6767479991476D-02 4.6767557673782D-02 4.1654185196002D-07 +359 3.5800000000000D+00 4.6054784824421D-02 4.6054859722033D-02 3.9307635721131D-07 +360 3.5900000000000D+00 4.5353078438229D-02 4.5353150617551D-02 3.7093732688506D-07 +361 3.6000000000000D+00 4.4662195121711D-02 4.4662264647706D-02 3.5004950499091D-07 +362 3.6100000000000D+00 4.3981971430703D-02 4.3982038366931D-02 3.3034191817586D-07 +363 3.6200000000000D+00 4.3312246166095D-02 4.3312310574734D-02 3.1174763174178D-07 +364 3.6300000000000D+00 4.2652860351481D-02 4.2652922293362D-02 2.9420353493762D-07 +365 3.6400000000000D+00 4.2003657211288D-02 4.2003716745922D-02 2.7765010149221D-07 +366 3.6500000000000D+00 4.1364482148371D-02 4.1364539333978D-02 2.6203119104686D-07 +367 3.6600000000000D+00 4.0735182721731D-02 4.0735237615266D-02 2.4729384898637D-07 +368 3.6700000000000D+00 4.0115608623662D-02 4.0115661280843D-02 2.3338814712823D-07 +369 3.6800000000000D+00 3.9505611657598D-02 3.9505662132931D-02 2.2026699072877D-07 +370 3.6900000000000D+00 3.8905045715494D-02 3.8905094062301D-02 2.0788596058626D-07 +371 3.7000000000000D+00 3.8313766755300D-02 3.8313813025742D-02 1.9620315755269D-07 +372 3.7100000000000D+00 3.7731632778194D-02 3.7731677023298D-02 1.8517906744495D-07 +373 3.7200000000000D+00 3.7158503806019D-02 3.7158546075700D-02 1.7477642413204D-07 +374 3.7300000000000D+00 3.6594241858832D-02 3.6594282201917D-02 1.6496007430377D-07 +375 3.7400000000000D+00 3.6038710932302D-02 3.6038749396555D-02 1.5569685928653D-07 +376 3.7500000000000D+00 3.5491776975238D-02 3.5491813607381D-02 1.4695549850129D-07 +377 3.7600000000000D+00 3.4953307866794D-02 3.4953342712530D-02 1.3870649676695D-07 +378 3.7700000000000D+00 3.4423173394368D-02 3.4423206498402D-02 1.3092202750003D-07 +379 3.7800000000000D+00 3.3901245231128D-02 3.3901276637189D-02 1.2357584197725D-07 +380 3.7900000000000D+00 3.3387396913773D-02 3.3387426664635D-02 1.1664317676686D-07 +381 3.8000000000000D+00 3.2881503820126D-02 3.2881531957626D-02 1.1010067666872D-07 +382 3.8100000000000D+00 3.2383443147064D-02 3.2383469712126D-02 1.0392631163678D-07 +383 3.8200000000000D+00 3.1893093888551D-02 3.1893118921202D-02 9.8099298018583D-08 +384 3.8300000000000D+00 3.1410336813655D-02 3.1410360353047D-02 9.2600029016086D-08 +385 3.8400000000000D+00 3.0935054444769D-02 3.0935076529194D-02 8.7410005332737D-08 +386 3.8500000000000D+00 3.0467131035599D-02 3.0467151702512D-02 8.2511782682189D-08 +387 3.8600000000000D+00 3.0006452549850D-02 3.0006471835882D-02 7.7888901067681D-08 +388 3.8700000000000D+00 2.9552906639646D-02 2.9552924580625D-02 7.3525831901030D-08 +389 3.8800000000000D+00 2.9106382624222D-02 2.9106399255189D-02 6.9407923610502D-08 +390 3.8900000000000D+00 2.8666771468597D-02 2.8666786823824D-02 6.5521355155332D-08 +391 3.9000000000000D+00 2.8233965762476D-02 2.8233979875478D-02 6.1853089564218D-08 +392 3.9100000000000D+00 2.7807859699423D-02 2.7807872602979D-02 5.8390825427389D-08 +393 3.9200000000000D+00 2.7388349056026D-02 2.7388360782195D-02 5.5122956635677D-08 +394 3.9300000000000D+00 2.6975331171320D-02 2.6975341751451D-02 5.2038530886682D-08 +395 3.9400000000000D+00 2.6568704926090D-02 2.6568714390842D-02 4.9127219030359D-08 +396 3.9500000000000D+00 2.6168370722713D-02 2.6168379102069D-02 4.6379274576187D-08 +397 3.9600000000000D+00 2.5774230464984D-02 2.5774237788262D-02 4.3785501032204D-08 +398 3.9700000000000D+00 2.5386187538097D-02 2.5386193833969D-02 4.1337220886133D-08 +399 3.9800000000000D+00 2.5004146788854D-02 2.5004152085356D-02 3.9026245244810D-08 +400 3.9900000000000D+00 2.4628014505807D-02 2.4628018830355D-02 3.6844851358314D-08 +401 4.0000000000000D+00 2.4257698399972D-02 2.4257701779374D-02 3.4785750591734D-08 +402 4.0100000000000D+00 2.3893107585447D-02 2.3893110045914D-02 3.2842065479223D-08 +403 4.0200000000000D+00 2.3534152560288D-02 2.3534154127451D-02 3.1007305819290D-08 +404 4.0300000000000D+00 2.3180745187511D-02 2.3180745886431D-02 2.9275347707528D-08 +405 4.0400000000000D+00 2.2832798676236D-02 2.2832798531415D-02 2.7640414495986D-08 +406 4.0500000000000D+00 2.2490227563201D-02 2.2490226598596D-02 2.6097054126310D-08 +407 4.0600000000000D+00 2.2152947694294D-02 2.2152945933326D-02 2.4640121773974D-08 +408 4.0700000000000D+00 2.1820876206341D-02 2.1820873671910D-02 2.3264761717265D-08 +409 4.0800000000000D+00 2.1493931508970D-02 2.1493928223464D-02 2.1966392837324D-08 +410 4.0900000000000D+00 2.1172033266752D-02 2.1172029252055D-02 2.0740692853481D-08 +411 4.1000000000000D+00 2.0855102381566D-02 2.0855097659075D-02 1.9583582251698D-08 +412 4.1100000000000D+00 2.0543060975073D-02 2.0543055565703D-02 1.8491211165554D-08 +413 4.1200000000000D+00 2.0235832371432D-02 2.0235826295629D-02 1.7459945654681D-08 +414 4.1300000000000D+00 1.9933341080073D-02 1.9933334357821D-02 1.6486357594364D-08 +415 4.1400000000000D+00 1.9635512778804D-02 1.9635505429640D-02 1.5567211960419D-08 +416 4.1500000000000D+00 1.9342274297084D-02 1.9342266340102D-02 1.4699455328625D-08 +417 4.1600000000000D+00 1.9053553599429D-02 1.9053545053293D-02 1.3880205984571D-08 +418 4.1700000000000D+00 1.8769279769063D-02 1.8769270652014D-02 1.3106743570396D-08 +419 4.1800000000000D+00 1.8489382991627D-02 1.8489373321492D-02 1.2376501916142D-08 +420 4.1900000000000D+00 1.8213794539230D-02 1.8213784333433D-02 1.1687059076934D-08 +421 4.2000000000000D+00 1.7942446754634D-02 1.7942436030202D-02 1.1036128959749D-08 +422 4.2100000000000D+00 1.7675273035602D-02 1.7675261809175D-02 1.0421553901113D-08 +423 4.2200000000000D+00 1.7412207819469D-02 1.7412196107308D-02 9.8412968863470D-09 +424 4.2300000000000D+00 1.7153186567793D-02 1.7153174385786D-02 9.2934363279705D-09 +425 4.2400000000000D+00 1.6898145751322D-02 1.6898133114994D-02 8.7761585155830D-09 +426 4.2500000000000D+00 1.6647022835096D-02 1.6647009759618D-02 8.2877513613157D-09 +427 4.2600000000000D+00 1.6399756263719D-02 1.6399742763910D-02 7.8265988651383D-09 +428 4.2700000000000D+00 1.6156285446833D-02 1.6156271537174D-02 7.3911752981667D-09 +429 4.2800000000000D+00 1.5916550744706D-02 1.5916536439344D-02 6.9800412532522D-09 +430 4.2900000000000D+00 1.5680493454081D-02 1.5680478766835D-02 6.5918381557305D-09 +431 4.3000000000000D+00 1.5448055794191D-02 1.5448040738560D-02 6.2252834356458D-09 +432 4.3100000000000D+00 1.5219180892921D-02 1.5219165482092D-02 5.8791664353274D-09 +433 4.3200000000000D+00 1.4993812773176D-02 1.4993797020030D-02 5.5523440913046D-09 +434 4.3300000000000D+00 1.4771896339377D-02 1.4771880256492D-02 5.2437378063255D-09 +435 4.3400000000000D+00 1.4553377364164D-02 1.4553360963827D-02 4.9523296781507D-09 +436 4.3500000000000D+00 1.4338202475300D-02 1.4338185769510D-02 4.6771586335235D-09 +437 4.3600000000000D+00 1.4126319142705D-02 1.4126302143179D-02 4.4173174344938D-09 +438 4.3700000000000D+00 1.3917675665679D-02 1.3917658383859D-02 4.1719495022106D-09 +439 4.3800000000000D+00 1.3712221160277D-02 1.3712203607335D-02 3.9402463169087D-09 +440 4.3900000000000D+00 1.3509905546849D-02 1.3509887733693D-02 3.7214450424391D-09 +441 4.4000000000000D+00 1.3310679537791D-02 1.3310661475070D-02 3.5148253181110D-09 +442 4.4100000000000D+00 1.3114494625420D-02 1.3114476323532D-02 3.3197070975838D-09 +443 4.4200000000000D+00 1.2921303070028D-02 1.2921284539120D-02 3.1354483400771D-09 +444 4.4300000000000D+00 1.2731057888094D-02 1.2731039138074D-02 2.9614427559414D-09 +445 4.4400000000000D+00 1.2543712840634D-02 1.2543693881170D-02 2.7971185296881D-09 +446 4.4500000000000D+00 1.2359222421761D-02 1.2359203262290D-02 2.6419355796975D-09 +447 4.4600000000000D+00 1.2177541847372D-02 1.2177522497104D-02 2.4953840224878D-09 +448 4.4700000000000D+00 1.1998627043992D-02 1.1998607511912D-02 2.3569824772806D-09 +449 4.4800000000000D+00 1.1822434637782D-02 1.1822414932661D-02 2.2262762616671D-09 +450 4.4900000000000D+00 1.1648921943681D-02 1.1648902074073D-02 2.1028365255540D-09 +451 4.5000000000000D+00 1.1478046954726D-02 1.1478026928978D-02 1.9862582848417D-09 +452 4.5100000000000D+00 1.1309768331511D-02 1.1309748157765D-02 1.8761591408973D-09 +453 4.5200000000000D+00 1.1144045391796D-02 1.1144025077994D-02 1.7721780521481D-09 +454 4.5300000000000D+00 1.0980838100260D-02 1.0980817654149D-02 1.6739740431920D-09 +455 4.5400000000000D+00 1.0820107058407D-02 1.0820086487541D-02 1.5812252808417D-09 +456 4.5500000000000D+00 1.0661813494603D-02 1.0661792806349D-02 1.4936280497192D-09 +457 4.5600000000000D+00 1.0505919254276D-02 1.0505898455817D-02 1.4108954880587D-09 +458 4.5700000000000D+00 1.0352386790243D-02 1.0352365888582D-02 1.3327567415723D-09 +459 4.5800000000000D+00 1.0201179153177D-02 1.0201158155142D-02 1.2589560605443D-09 +460 4.5900000000000D+00 1.0052259982222D-02 1.0052238894468D-02 1.1892518278833D-09 +461 4.6000000000000D+00 9.9055934957372D-03 9.9055723247498D-03 1.1234162279576D-09 +462 4.6100000000000D+00 9.7611444821733D-03 9.7611232342743D-03 1.0612340132352D-09 +463 4.6200000000000D+00 9.6188782910911D-03 9.6188569724403D-03 1.0025019375956D-09 +464 4.6300000000000D+00 9.4787608243061D-03 9.4787394409051D-03 9.4702808417724D-10 +465 4.6400000000000D+00 9.3407585271623D-03 9.3407370848580D-03 8.9463116394098D-10 +466 4.6500000000000D+00 9.2048383799461D-03 9.2048168844339D-03 8.4514008425082D-10 +467 4.6600000000000D+00 9.0709678894175D-03 9.0709463462444D-03 7.9839335050162D-10 +468 4.6700000000000D+00 8.9391150804640D-03 8.9390934950322D-03 7.5423841165860D-10 +469 4.6800000000000D+00 8.8092484878870D-03 8.8092268654565D-03 7.1253121310731D-10 +470 4.6900000000000D+00 8.6813371483079D-03 8.6813154939996D-03 6.7313572177153D-10 +471 4.7000000000000D+00 8.5553505921870D-03 8.5553289109860D-03 6.3592338429038D-10 +472 4.7100000000000D+00 8.4312588360001D-03 8.4312371327582D-03 6.0077301139107D-10 +473 4.7200000000000D+00 8.3090323744759D-03 8.3090106539148D-03 5.6757007637871D-10 +474 4.7300000000000D+00 8.1886421729868D-03 8.1886204397006D-03 5.3620642473542D-10 +475 4.7400000000000D+00 8.0700596600471D-03 8.0700379185051D-03 5.0657991938107D-10 +476 4.7500000000000D+00 7.9532567199203D-03 7.9532349744698D-03 4.7859407732749D-10 +477 4.7600000000000D+00 7.8382056853500D-03 7.8381839402188D-03 4.5215779326072D-10 +478 4.7700000000000D+00 7.7248793304075D-03 7.7248575897065D-03 4.2718511323895D-10 +479 4.7800000000000D+00 7.6132508634140D-03 7.6132291311397D-03 4.0359481699161D-10 +480 4.7900000000000D+00 7.5032939200012D-03 7.5032722000380D-03 3.8131019966831D-10 +481 4.8000000000000D+00 7.3949825562705D-03 7.3949608523936D-03 3.6025881978207D-10 +482 4.8100000000000D+00 7.2882912420477D-03 7.2882695579250D-03 3.4037222211815D-10 +483 4.8200000000000D+00 7.1831948542795D-03 7.1831731934740D-03 3.2158582169685D-10 +484 4.8300000000000D+00 7.0796686704884D-03 7.0796470364605D-03 3.0383863131592D-10 +485 4.8400000000000D+00 6.9776883623365D-03 6.9776667584464D-03 2.8707303250450D-10 +486 4.8500000000000D+00 6.8772299893024D-03 6.8772084188120D-03 2.7123460683775D-10 +487 4.8600000000000D+00 6.7782699924506D-03 6.7782484585258D-03 2.5627195759155D-10 +488 4.8700000000000D+00 6.6807851882816D-03 6.6807636939944D-03 2.4213650036851D-10 +489 4.8800000000000D+00 6.5847527627461D-03 6.5847313110764D-03 2.2878243363926D-10 +490 4.8900000000000D+00 6.4901502652539D-03 6.4901288590918D-03 2.1616647115688D-10 +491 4.9000000000000D+00 6.3969556028327D-03 6.3969342449804D-03 2.0424772440991D-10 +492 4.9100000000000D+00 6.3051470343712D-03 6.3051257275448D-03 1.9298757354945D-10 +493 4.9200000000000D+00 6.2147031649487D-03 6.2146819117802D-03 1.8234953884953D-10 +494 4.9300000000000D+00 6.1256029402399D-03 6.1255817432791D-03 1.7229913556965D-10 +495 4.9400000000000D+00 6.0378256410835D-03 6.0378045027996D-03 1.6280386290165D-10 +496 4.9500000000000D+00 5.9513508780134D-03 5.9513298007970D-03 1.5383299148780D-10 +497 4.9600000000000D+00 5.8661585859584D-03 5.8661375721230D-03 1.4535749583260D-10 +498 4.9700000000000D+00 5.7822290190056D-03 5.7822080707895D-03 1.3734995935824D-10 +499 4.9800000000000D+00 5.6995427452439D-03 5.6995218648120D-03 1.2978448046007D-10 +500 4.9900000000000D+00 5.6180806416850D-03 5.6180598311298D-03 1.2263657936222D-10 +501 5.0000000000000D+00 5.5378238893239D-03 5.5378031506680D-03 1.1588317971402D-10 +502 5.0100000000000D+00 5.4587539681677D-03 5.4587333033646D-03 1.0950246208864D-10 +503 5.0200000000000D+00 5.3808526524205D-03 5.3808320633566D-03 1.0347381575672D-10 +504 5.0300000000000D+00 5.3041020057272D-03 5.3040814942231D-03 9.7777771403291D-11 +505 5.0400000000000D+00 5.2284843764878D-03 5.2284639442999D-03 9.2395933709675D-11 +506 5.0500000000000D+00 5.1539823932462D-03 5.1539620420680D-03 8.7310917119604D-11 +507 5.0600000000000D+00 5.0805789602098D-03 5.0805586916734D-03 8.2506332963066D-11 +508 5.0700000000000D+00 5.0082572527273D-03 5.0082370684048D-03 7.7966683581780D-11 +509 5.0800000000000D+00 4.9370007129201D-03 4.9369806143250D-03 7.3677329040730D-11 +510 5.0900000000000D+00 4.8667930453647D-03 4.8667730339531D-03 6.9624439422688D-11 +511 5.1000000000000D+00 4.7976182128398D-03 4.7975982900118D-03 6.5794947561465D-11 +512 5.1100000000000D+00 4.7294604321349D-03 4.7294405992359D-03 6.2176500032522D-11 +513 5.1200000000000D+00 4.6623041700008D-03 4.6622844283227D-03 5.8757455278466D-11 +514 5.1300000000000D+00 4.5961341390306D-03 4.5961144898129D-03 5.5526802508201D-11 +515 5.1400000000000D+00 4.5309352937006D-03 4.5309157381321D-03 5.2474139795074D-11 +516 5.1500000000000D+00 4.4666928264533D-03 4.4666733656726D-03 4.9589640234657D-11 +517 5.1600000000000D+00 4.4033921638417D-03 4.4033727989389D-03 4.6864019806503D-11 +518 5.1700000000000D+00 4.3410189627121D-03 4.3409996947295D-03 4.4288495970395D-11 +519 5.1800000000000D+00 4.2795591065607D-03 4.2795399364945D-03 4.1854797729915D-11 +520 5.1900000000000D+00 4.2189987017751D-03 4.2189796305756D-03 3.9555099845860D-11 +521 5.2000000000000D+00 4.1593240740496D-03 4.1593051026233D-03 3.7382009429865D-11 +522 5.2100000000000D+00 4.1005217648336D-03 4.1005028940434D-03 3.5328541924075D-11 +523 5.2200000000000D+00 4.0425785278363D-03 4.0425597585030D-03 3.3388098476863D-11 +524 5.2300000000000D+00 3.9854813255643D-03 3.9854626584673D-03 3.1554436684360D-11 +525 5.2400000000000D+00 3.9292173260135D-03 3.9291987618921D-03 2.9821674266261D-11 +526 5.2500000000000D+00 3.8737738992797D-03 3.8737554388340D-03 2.8184250003911D-11 +527 5.2600000000000D+00 3.8191386142930D-03 3.8191202581844D-03 2.6636908116623D-11 +528 5.2700000000000D+00 3.7652992356024D-03 3.7652809844551D-03 2.5174682875592D-11 +529 5.2800000000000D+00 3.7122437202089D-03 3.7122255746105D-03 2.3792882536450D-11 +530 5.2900000000000D+00 3.6599602144320D-03 3.6599421749345D-03 2.2487070064855D-11 +531 5.3000000000000D+00 3.6084370508874D-03 3.6084191180080D-03 2.1253058862202D-11 +532 5.3100000000000D+00 3.5576627454599D-03 3.5576449196820D-03 2.0086896432454D-11 +533 5.3200000000000D+00 3.5076259943111D-03 3.5076082760847D-03 1.8984845283970D-11 +534 5.3300000000000D+00 3.4583156709749D-03 3.4582980607180D-03 1.7943374024595D-11 +535 5.3400000000000D+00 3.4097208234881D-03 3.4097033215872D-03 1.6959145944573D-11 +536 5.3500000000000D+00 3.3618306715605D-03 3.3618132783713D-03 1.6029007023541D-11 +537 5.3600000000000D+00 3.3146346037961D-03 3.3146173196446D-03 1.5149975455419D-11 +538 5.3700000000000D+00 3.2681221750189D-03 3.2681050002016D-03 1.4319241863520D-11 +539 5.3800000000000D+00 3.2222831035137D-03 3.2222660382990D-03 1.3534147723887D-11 +540 5.3900000000000D+00 3.1771072684085D-03 3.1770903130368D-03 1.2792181005744D-11 +541 5.4000000000000D+00 3.1325847070745D-03 3.1325678617594D-03 1.2090968054495D-11 +542 5.4100000000000D+00 3.0887056125696D-03 3.0886888774984D-03 1.1428265946790D-11 +543 5.4200000000000D+00 3.0454603310982D-03 3.0454437064324D-03 1.0801951957188D-11 +544 5.4300000000000D+00 3.0028393596134D-03 3.0028228454897D-03 1.0210026561264D-11 +545 5.4400000000000D+00 2.9608333433225D-03 2.9608169398532D-03 9.6505990405365D-12 +546 5.4500000000000D+00 2.9194330732986D-03 2.9194167805723D-03 9.1218820124065D-12 +547 5.4600000000000D+00 2.8786294841332D-03 2.8786133022157D-03 8.6221864803182D-12 +548 5.4700000000000D+00 2.8384136516210D-03 2.8383975805552D-03 8.1499163951802D-12 +549 5.4800000000000D+00 2.7987767904722D-03 2.7987608302795D-03 7.7035625562439D-12 +550 5.4900000000000D+00 2.7597102520832D-03 2.7596944027638D-03 7.2816987319699D-12 +551 5.5000000000000D+00 2.7212055223731D-03 2.7211897839063D-03 6.8829808762668D-12 +552 5.5100000000000D+00 2.6832542195551D-03 2.6832385919002D-03 6.5061368880949D-12 +553 5.5200000000000D+00 2.6458480920276D-03 2.6458325751242D-03 6.1499646422079D-12 +554 5.5300000000000D+00 2.6089790162774D-03 2.6089636100463D-03 5.8133281181182D-12 +555 5.5400000000000D+00 2.5726389948189D-03 2.5726236991622D-03 5.4951537542848D-12 +556 5.5500000000000D+00 2.5368201541416D-03 2.5368049689435D-03 5.1944252982709D-12 +557 5.5600000000000D+00 2.5015147427838D-03 2.5014996679110D-03 4.9101854010108D-12 +558 5.5700000000000D+00 2.4667151293224D-03 2.4667001646248D-03 4.6415290808097D-12 +559 5.5800000000000D+00 2.4324138004395D-03 2.4323989457501D-03 4.3876005254084D-12 +560 5.5900000000000D+00 2.3986033590329D-03 2.3985886141691D-03 4.1475909521868D-12 +561 5.6000000000000D+00 2.3652765223498D-03 2.3652618871133D-03 3.9207360114947D-12 +562 5.6100000000000D+00 2.3324261201483D-03 2.3324115943257D-03 3.7063131899055D-12 +563 5.6200000000000D+00 2.3000450928715D-03 2.3000306762346D-03 3.5036384172579D-12 +564 5.6300000000000D+00 2.2681264899560D-03 2.2681121822627D-03 3.3120683965876D-12 +565 5.6400000000000D+00 2.2366634679952D-03 2.2366492689893D-03 3.1309937117122D-12 +566 5.6500000000000D+00 2.2056492890499D-03 2.2056351984620D-03 2.9598384168746D-12 +567 5.6600000000000D+00 2.1750773189588D-03 2.1750633365066D-03 2.7980581863953D-12 +568 5.6700000000000D+00 2.1449410256764D-03 2.1449271510649D-03 2.6451385718907D-12 +569 5.6800000000000D+00 2.1152339776273D-03 2.1152202105494D-03 2.5005929010182D-12 +570 5.6900000000000D+00 2.0859498421141D-03 2.0859361822508D-03 2.3639613572844D-12 +571 5.7000000000000D+00 2.0570823837661D-03 2.0570688307872D-03 2.2348106975932D-12 +572 5.7100000000000D+00 2.0286254629295D-03 2.0286120164938D-03 2.1127306848709D-12 +573 5.7200000000000D+00 2.0005730341585D-03 2.0005596939138D-03 1.9973335921194D-12 +574 5.7300000000000D+00 1.9729191447101D-03 1.9729059102941D-03 1.8882529597254D-12 +575 5.7400000000000D+00 1.9456579330650D-03 1.9456448041054D-03 1.7851424251099D-12 +576 5.7500000000000D+00 1.9187836274547D-03 1.9187706035695D-03 1.6876741033895D-12 +577 5.7600000000000D+00 1.8922905444705D-03 1.8922776252684D-03 1.5955387481108D-12 +578 5.7700000000000D+00 1.8661730876475D-03 1.8661602727282D-03 1.5084445174257D-12 +579 5.7800000000000D+00 1.8404257460500D-03 1.8404130350046D-03 1.4261151671977D-12 +580 5.7900000000000D+00 1.8150430929246D-03 1.8150304853357D-03 1.3482895976175D-12 +581 5.8000000000000D+00 1.7900197843596D-03 1.7900072798019D-03 1.2747210181110D-12 +582 5.8100000000000D+00 1.7653505579683D-03 1.7653381560085D-03 1.2051761609066D-12 +583 5.8200000000000D+00 1.7410302315721D-03 1.7410179317696D-03 1.1394340877039D-12 +584 5.8300000000000D+00 1.7170537019793D-03 1.7170415038862D-03 1.0772866758470D-12 +585 5.8400000000000D+00 1.6934159437026D-03 1.6934038468641D-03 1.0185373078534D-12 +586 5.8500000000000D+00 1.6701120077104D-03 1.6701000116652D-03 9.6299991011275D-13 +587 5.8600000000000D+00 1.6471370202254D-03 1.6471251245054D-03 9.1049860127197D-13 +588 5.8700000000000D+00 1.6244861815305D-03 1.6244743856618D-03 8.6086713071996D-13 +589 5.8800000000000D+00 1.6021547647961D-03 1.6021430682989D-03 8.1394834981766D-13 +590 5.8900000000000D+00 1.5801381149054D-03 1.5801265172942D-03 7.6959337402382D-13 +591 5.9000000000000D+00 1.5584316473737D-03 1.5584201481574D-03 7.2766201995629D-13 +592 5.9100000000000D+00 1.5370308471988D-03 1.5370194458815D-03 6.8802181534849D-13 +593 5.9200000000000D+00 1.5159312677516D-03 1.5159199638322D-03 6.5054738569923D-13 +594 5.9300000000000D+00 1.4951285297048D-03 1.4951173226776D-03 6.1512021854384D-13 +595 5.9400000000000D+00 1.4746183199707D-03 1.4746072093255D-03 5.8162828576030D-13 +596 5.9500000000000D+00 1.4543963906555D-03 1.4543853758778D-03 5.4996568790608D-13 +597 5.9600000000000D+00 1.4344585580133D-03 1.4344476385846D-03 5.2003208653163D-13 +598 5.9700000000000D+00 1.4148007014807D-03 1.4147898768785D-03 4.9173297455210D-13 +599 5.9800000000000D+00 1.3954187626609D-03 1.3954080323592D-03 4.6497911043741D-13 +600 5.9900000000000D+00 1.3763087443271D-03 1.3762981077962D-03 4.3968599767230D-13 + +# +#ONCVPSP (Optimized Norm-Conservinng Vanderbilt PSeudopotential) +#relativistic version 3.3.0 09/16/2017 +# +#While it is not required under the terms of the GNU GPL, it is +#suggested that you cite D. R. Hamann, Phys. Rev. B 88, 085117 (2013) +#in any publication utilizing these pseudopotentials. +# +#Echo of input data for oncvpsp-3.3.0 +# ATOM AND REFERENCE CONFIGURATION +# atsym z nc nv iexc psfile +Si 14.00 3 2 4 both +# +# n l f energy (Ha) +1 0 2.00 +2 0 2.00 +2 1 6.00 +3 0 2.00 +3 1 2.00 +# +# PSEUDOPOTENTIAL AND OPTIMIZATION +# lmax +2 +# +# l, rc, ep, ncon, nbas, qcut +0 1.60000 -0.39735 4 9 6.40000 +1 1.71000 -0.14959 4 9 6.40000 +2 1.90000 0.05000 4 9 6.40000 +# +# LOCAL POTENTIAL +# lloc, lpopt, rc(5), dvloc0 +4 5 1.60000 0.00000 +# +# VANDERBILT-KLEINMAN-BYLANDER PROJECTORs +# l, nproj, debl +0 2 2.50000 +1 2 2.49961 +2 2 1.50000 +# +# MODEL CORE CHARGE +# icmod, fcfact, rcfact +3 4.00000 1.30000 +# +# LOG DERIVATIVE ANALYSIS +# epsh1, epsh2, depsh +-12.00 12.00 0.02 +# +# OUTPUT GRID +# rlmax, drl +6.00 0.01 +# +# TEST CONFIGURATIONS +# ncnf +0 +# nvcnf +# n l f + diff --git a/abipy/data/refs/alas_elastic_dfpt/AlAs_elastic_DDB b/abipy/data/refs/alas_elastic_dfpt/AlAs_elastic_DDB new file mode 100644 index 000000000..63da6046f --- /dev/null +++ b/abipy/data/refs/alas_elastic_dfpt/AlAs_elastic_DDB @@ -0,0 +1,547 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + DDB file merged by MergeDdbAbinitTask on Wed Aug 1 14:57:18 2018 + + usepaw 0 + natom 4 + nkpt 36 + nsppol 1 + nsym 12 + ntypat 2 + occopt 1 + nband 22 + acell 0.10000000000000D+01 0.10000000000000D+01 0.10000000000000D+01 + amu 0.26981539000000D+02 0.74921590000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.42000000000000D+02 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc -116133 + kpt 0.00000000000000D+00 0.00000000000000D+00 0.10000000000000D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.10000000000000D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.10000000000000D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.10000000000000D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.10000000000000D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.10000000000000D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.10000000000000D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.10000000000000D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.10000000000000D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.10000000000000D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.10000000000000D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.10000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.30000000000000D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.30000000000000D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.30000000000000D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.30000000000000D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.30000000000000D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.30000000000000D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.30000000000000D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.30000000000000D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.30000000000000D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.30000000000000D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.30000000000000D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.30000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.50000000000000D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.50000000000000D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.50000000000000D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.50000000000000D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.50000000000000D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.50000000000000D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.50000000000000D+00 + kptnrm 0.10000000000000D+01 + ngfft 48 48 75 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 + rprim 0.38187550105000D+01 -0.66142776998000D+01 0.00000000000000D+00 + 0.38187550105000D+01 0.66142776998000D+01 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.12552437939500D+02 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + 0 1 0 1 0 0 0 0 1 + 1 1 0 -1 0 0 0 0 1 + -1 0 0 1 1 0 0 0 1 + 0 1 0 -1 -1 0 0 0 1 + -1 -1 0 0 1 0 0 0 1 + -1 0 0 0 -1 0 0 0 1 + 0 -1 0 -1 0 0 0 0 1 + -1 -1 0 1 0 0 0 0 1 + 1 0 0 -1 -1 0 0 0 1 + 0 -1 0 1 1 0 0 0 1 + 1 1 0 0 -1 0 0 0 1 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.50000000003656D+00 + 0.10000023031864D-09 0.00000000000000D+00 0.50000000003656D+00 + -0.10000011929634D-09 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.10000023031864D-09 0.00000000000000D+00 + 0.00000000000000D+00 -0.10000011929634D-09 0.50000000003656D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.50000000003656D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.10000011929634D-09 0.00000000000000D+00 0.00000000000000D+00 + 0.10000023031864D-09 0.00000000000000D+00 0.50000000003656D+00 + 0.00000000000000D+00 -0.10000011929634D-09 0.50000000003656D+00 + 0.00000000000000D+00 0.10000023031864D-09 0.00000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 1 2 2 + wtk 0.49382716049383D-02 0.29629629629630D-01 0.29629629629630D-01 + 0.29629629629630D-01 0.29629629629630D-01 0.29629629629630D-01 + 0.59259259259259D-01 0.59259259259259D-01 0.29629629629630D-01 + 0.29629629629630D-01 0.59259259259259D-01 0.98765432098765D-02 + 0.49382716049383D-02 0.29629629629630D-01 0.29629629629630D-01 + 0.29629629629630D-01 0.29629629629630D-01 0.29629629629630D-01 + 0.59259259259259D-01 0.59259259259259D-01 0.29629629629630D-01 + 0.29629629629630D-01 0.59259259259259D-01 0.98765432098765D-02 + 0.24691358024691D-02 0.14814814814815D-01 0.14814814814815D-01 + 0.14814814814815D-01 0.14814814814815D-01 0.14814814814815D-01 + 0.29629629629630D-01 0.29629629629630D-01 0.14814814814815D-01 + 0.14814814814815D-01 0.29629629629630D-01 0.49382716049383D-02 + xred 0.33333333333333D+00 0.66666666666667D+00 0.76304640000000D-03 + 0.66666666666667D+00 0.33333333333333D+00 0.50076304640000D+00 + 0.33333333333333D+00 0.66666666666667D+00 0.37532295381828D+00 + 0.66666666666667D+00 0.33333333333333D+00 0.87532295381828D+00 + znucl 0.13000000000000D+02 0.33000000000000D+02 + zion 0.30000000000000D+01 0.15000000000000D+02 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 6 lmnmax= 6 + Atom type= 1 pspso= 0 nekb= 6 + iln lpsang iproj ekb(:) + 1 0 1 5.8885347E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 2 0 2 0.0000000E+00 7.3482508E-01 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 3 1 1 0.0000000E+00 0.0000000E+00 6.3672286E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 4 1 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 9.0486909E-01 + 0.0000000E+00 0.0000000E+00 + 5 2 1 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -2.1386447E+01 0.0000000E+00 + 6 2 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -2.1386447E+01 0.0000000E+00 + Atom type= 2 pspso= 0 nekb= 6 + iln lpsang iproj ekb(:) + 1 0 1 7.4672672E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 2 0 2 0.0000000E+00 7.6196949E-01 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 3 1 1 0.0000000E+00 0.0000000E+00 5.2713754E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 4 1 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 9.8735679E-01 + 0.0000000E+00 0.0000000E+00 + 5 2 1 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -1.0069942E+01 0.0000000E+00 + 6 2 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -1.0069942E+01 0.0000000E+00 + + **** Database of total energy derivatives **** + Number of data blocks= 3 + + Total energy - # elements : 1 + -0.21658631214943D+03 0.00000000000000D+00 + + 1st derivatives - # elements : 18 + 1 1 0.00000000000000D+00 0.00000000000000D+00 + 2 1 0.00000000000000D+00 0.00000000000000D+00 + 3 1 0.76644328914884D-03 0.00000000000000D+00 + 1 2 -0.17232929428188D-25 0.00000000000000D+00 + 2 2 0.00000000000000D+00 0.00000000000000D+00 + 3 2 0.76644328914884D-03 0.00000000000000D+00 + 1 3 0.00000000000000D+00 0.00000000000000D+00 + 2 3 0.00000000000000D+00 0.00000000000000D+00 + 3 3 -0.76573137416633D-03 0.00000000000000D+00 + 1 4 0.00000000000000D+00 0.00000000000000D+00 + 2 4 0.00000000000000D+00 0.00000000000000D+00 + 3 4 -0.76573137416633D-03 0.00000000000000D+00 + 1 7 0.65472473248897D-04 0.00000000000000D+00 + 2 7 0.65472473320377D-04 0.00000000000000D+00 + 3 7 0.66055494554740D-04 0.00000000000000D+00 + 1 8 0.00000000000000D+00 0.00000000000000D+00 + 2 8 0.00000000000000D+00 0.00000000000000D+00 + 3 8 0.00000000000000D+00 0.00000000000000D+00 + + 2nd derivatives (non-stat.) - # elements : 351 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.50116112248406D+01 0.00000000000000D+00 + 2 1 1 1 -0.25057927308658D+01 0.00000000000000D+00 + 3 1 1 1 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 1 0.10046665913722D+00 0.16402246766316D-15 + 2 2 1 1 -0.50234157213748D-01 -0.14448196261881D-19 + 3 2 1 1 0.00000000000000D+00 0.00000000000000D+00 + 1 3 1 1 -0.34443758010162D+00 -0.82009827920584D-15 + 2 3 1 1 0.17221253391359D+00 0.11411183919112D-15 + 3 3 1 1 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 1 -0.47676537532066D+01 -0.11325691586535D-14 + 2 4 1 1 0.23837925191287D+01 -0.30542744659931D-15 + 3 4 1 1 0.00000000000000D+00 0.00000000000000D+00 + 1 6 1 1 -0.58058952784329D+01 0.00000000000000D+00 + 2 6 1 1 0.00000000000000D+00 0.00000000000000D+00 + 3 6 1 1 0.00000000000000D+00 0.00000000000000D+00 + 1 1 2 1 -0.25057927308658D+01 0.00000000000000D+00 + 2 1 2 1 0.50116112248406D+01 0.00000000000000D+00 + 3 1 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 2 2 1 -0.50233329572531D-01 -0.14448196261881D-19 + 2 2 2 1 0.10046665913722D+00 0.44851822443492D-16 + 3 2 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 3 2 1 0.17221879014129D+00 0.11411183919112D-15 + 2 3 2 1 -0.34443758010162D+00 0.13869441012349D-16 + 3 3 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 4 2 1 0.23838268765022D+01 -0.30542744659931D-15 + 2 4 2 1 -0.47676537532066D+01 -0.16334160457054D-15 + 3 4 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 6 2 1 0.00000000000000D+00 0.00000000000000D+00 + 2 6 2 1 -0.58057523408313D+01 0.00000000000000D+00 + 3 6 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 1 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 1 3 1 0.00000000000000D+00 0.00000000000000D+00 + 3 1 3 1 0.16271388610549D+02 0.00000000000000D+00 + 1 2 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 2 3 1 0.00000000000000D+00 0.00000000000000D+00 + 3 2 3 1 -0.27553868763415D+01 -0.28546714860387D-16 + 1 3 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 3 3 1 0.00000000000000D+00 0.00000000000000D+00 + 3 3 3 1 -0.80567232460562D+01 0.67723196481248D-14 + 1 4 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 1 0.00000000000000D+00 0.00000000000000D+00 + 3 4 3 1 -0.54594879686315D+01 -0.59012754152453D-14 + 1 6 3 1 -0.34686603820622D-03 0.00000000000000D+00 + 2 6 3 1 -0.36892875638080D-03 0.00000000000000D+00 + 3 6 3 1 -0.46335081093053D+01 0.00000000000000D+00 + 1 1 1 2 0.10046665913722D+00 -0.16402246766316D-15 + 2 1 1 2 -0.50233329572531D-01 0.14448196261881D-19 + 3 1 1 2 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 2 0.50116112248406D+01 0.00000000000000D+00 + 2 2 1 2 -0.25057927308659D+01 0.00000000000000D+00 + 3 2 1 2 0.00000000000000D+00 0.00000000000000D+00 + 1 3 1 2 -0.47676537532066D+01 -0.44673736878815D-15 + 2 3 1 2 0.23838268765022D+01 -0.32233207605124D-16 + 3 3 1 2 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 2 -0.34443758010162D+00 -0.19559174275219D-17 + 2 4 1 2 0.17221879014129D+00 -0.23136094341199D-15 + 3 4 1 2 0.00000000000000D+00 0.00000000000000D+00 + 1 6 1 2 -0.58057523408313D+01 0.00000000000000D+00 + 2 6 1 2 0.00000000000000D+00 0.00000000000000D+00 + 3 6 1 2 0.00000000000000D+00 0.00000000000000D+00 + 1 1 2 2 -0.50234157213748D-01 0.14448196261881D-19 + 2 1 2 2 0.10046665913722D+00 -0.44851822443492D-16 + 3 1 2 2 0.00000000000000D+00 0.00000000000000D+00 + 1 2 2 2 -0.25057927308659D+01 0.00000000000000D+00 + 2 2 2 2 0.50116112248406D+01 0.00000000000000D+00 + 3 2 2 2 0.00000000000000D+00 0.00000000000000D+00 + 1 3 2 2 0.23837925191287D+01 -0.32233207605124D-16 + 2 3 2 2 -0.47676537532066D+01 -0.93213901277161D-15 + 3 3 2 2 0.00000000000000D+00 0.00000000000000D+00 + 1 4 2 2 0.17221253391359D+00 -0.23136094341199D-15 + 2 4 2 2 -0.34443758010162D+00 0.52223988466181D-16 + 3 4 2 2 0.00000000000000D+00 0.00000000000000D+00 + 1 6 2 2 0.00000000000000D+00 0.00000000000000D+00 + 2 6 2 2 -0.58058952784329D+01 0.00000000000000D+00 + 3 6 2 2 0.00000000000000D+00 0.00000000000000D+00 + 1 1 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 1 3 2 0.00000000000000D+00 0.00000000000000D+00 + 3 1 3 2 -0.27553868763415D+01 0.28546714860387D-16 + 1 2 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 2 3 2 0.00000000000000D+00 0.00000000000000D+00 + 3 2 3 2 0.16271388610549D+02 0.00000000000000D+00 + 1 3 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 3 3 2 0.00000000000000D+00 0.00000000000000D+00 + 3 3 3 2 -0.54594879686317D+01 -0.45892565916868D-14 + 1 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 3 4 3 2 -0.80567232460562D+01 -0.41747506055380D-14 + 1 6 3 2 -0.36892875638080D-03 0.00000000000000D+00 + 2 6 3 2 -0.34686603820622D-03 0.00000000000000D+00 + 3 6 3 2 -0.46335178623038D+01 0.00000000000000D+00 + 1 1 1 3 -0.34443758010162D+00 0.82009827920584D-15 + 2 1 1 3 0.17221879014129D+00 -0.11411183919112D-15 + 3 1 1 3 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 3 -0.47676537532066D+01 0.44673736878815D-15 + 2 2 1 3 0.23837925191287D+01 0.32233207605124D-16 + 3 2 1 3 0.00000000000000D+00 0.00000000000000D+00 + 1 3 1 3 0.50858913213669D+01 0.00000000000000D+00 + 2 3 1 3 -0.25427681308174D+01 0.00000000000000D+00 + 3 3 1 3 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 3 0.27668220159854D-01 0.12531294658537D-14 + 2 4 1 3 -0.13846259918125D-01 -0.13146923455487D-14 + 3 4 1 3 0.00000000000000D+00 0.00000000000000D+00 + 1 6 1 3 -0.10748620935622D+03 0.00000000000000D+00 + 2 6 1 3 0.00000000000000D+00 0.00000000000000D+00 + 3 6 1 3 0.00000000000000D+00 0.00000000000000D+00 + 1 1 2 3 0.17221253391359D+00 -0.11411183919112D-15 + 2 1 2 3 -0.34443758010162D+00 -0.13869441012349D-16 + 3 1 2 3 0.00000000000000D+00 0.00000000000000D+00 + 1 2 2 3 0.23838268765022D+01 0.32233207605124D-16 + 2 2 2 3 -0.47676537532066D+01 0.93213901277161D-15 + 3 2 2 3 0.00000000000000D+00 0.00000000000000D+00 + 1 3 2 3 -0.25427681308174D+01 0.00000000000000D+00 + 2 3 2 3 0.50858913213669D+01 0.00000000000000D+00 + 3 3 2 3 0.00000000000000D+00 0.00000000000000D+00 + 1 4 2 3 -0.13834110178029D-01 -0.13146923455487D-14 + 2 4 2 3 0.27668220159861D-01 0.20615961118798D-15 + 3 4 2 3 0.00000000000000D+00 0.00000000000000D+00 + 1 6 2 3 0.00000000000000D+00 0.00000000000000D+00 + 2 6 2 3 -0.10748679578919D+03 0.00000000000000D+00 + 3 6 2 3 0.00000000000000D+00 0.00000000000000D+00 + 1 1 3 3 0.00000000000000D+00 0.00000000000000D+00 + 2 1 3 3 0.00000000000000D+00 0.00000000000000D+00 + 3 1 3 3 -0.80567232460562D+01 -0.67723196481248D-14 + 1 2 3 3 0.00000000000000D+00 0.00000000000000D+00 + 2 2 3 3 0.00000000000000D+00 0.00000000000000D+00 + 3 2 3 3 -0.54594879686317D+01 0.45892565916868D-14 + 1 3 3 3 0.00000000000000D+00 0.00000000000000D+00 + 2 3 3 3 0.00000000000000D+00 0.00000000000000D+00 + 3 3 3 3 0.16219070090330D+02 0.00000000000000D+00 + 1 4 3 3 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 3 0.00000000000000D+00 0.00000000000000D+00 + 3 4 3 3 -0.27083774267528D+01 -0.54543486592300D-15 + 1 6 3 3 -0.47407283452596D-03 0.00000000000000D+00 + 2 6 3 3 -0.51423004706718D-03 0.00000000000000D+00 + 3 6 3 3 -0.10839079708602D+03 0.00000000000000D+00 + 1 1 1 4 -0.47676537532066D+01 0.11325691586535D-14 + 2 1 1 4 0.23838268765022D+01 0.30542744659931D-15 + 3 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 4 -0.34443758010162D+00 0.19559174275219D-17 + 2 2 1 4 0.17221253391359D+00 0.23136094341199D-15 + 3 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 3 1 4 0.27668220159854D-01 -0.12531294658537D-14 + 2 3 1 4 -0.13834110178029D-01 0.13146923455487D-14 + 3 3 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 4 0.50858913213669D+01 0.00000000000000D+00 + 2 4 1 4 -0.25427681308211D+01 0.00000000000000D+00 + 3 4 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 6 1 4 -0.10748679578919D+03 0.00000000000000D+00 + 2 6 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 6 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 1 2 4 0.23837925191287D+01 0.30542744659931D-15 + 2 1 2 4 -0.47676537532066D+01 0.16334160457054D-15 + 3 1 2 4 0.00000000000000D+00 0.00000000000000D+00 + 1 2 2 4 0.17221879014129D+00 0.23136094341199D-15 + 2 2 2 4 -0.34443758010162D+00 -0.52223988466181D-16 + 3 2 2 4 0.00000000000000D+00 0.00000000000000D+00 + 1 3 2 4 -0.13846259918125D-01 0.13146923455487D-14 + 2 3 2 4 0.27668220159861D-01 -0.20615961118798D-15 + 3 3 2 4 0.00000000000000D+00 0.00000000000000D+00 + 1 4 2 4 -0.25427681308211D+01 0.00000000000000D+00 + 2 4 2 4 0.50858913213524D+01 0.00000000000000D+00 + 3 4 2 4 0.00000000000000D+00 0.00000000000000D+00 + 1 6 2 4 0.00000000000000D+00 0.00000000000000D+00 + 2 6 2 4 -0.10748620935622D+03 0.00000000000000D+00 + 3 6 2 4 0.00000000000000D+00 0.00000000000000D+00 + 1 1 3 4 0.00000000000000D+00 0.00000000000000D+00 + 2 1 3 4 0.00000000000000D+00 0.00000000000000D+00 + 3 1 3 4 -0.54594879686315D+01 0.59012754152453D-14 + 1 2 3 4 0.00000000000000D+00 0.00000000000000D+00 + 2 2 3 4 0.00000000000000D+00 0.00000000000000D+00 + 3 2 3 4 -0.80567232460562D+01 0.41747506055380D-14 + 1 3 3 4 0.00000000000000D+00 0.00000000000000D+00 + 2 3 3 4 0.00000000000000D+00 0.00000000000000D+00 + 3 3 3 4 -0.27083774267528D+01 0.54543486592300D-15 + 1 4 3 4 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 4 0.00000000000000D+00 0.00000000000000D+00 + 3 4 3 4 0.16219070090330D+02 0.00000000000000D+00 + 1 6 3 4 -0.51423004706718D-03 0.00000000000000D+00 + 2 6 3 4 -0.47407283452596D-03 0.00000000000000D+00 + 3 6 3 4 -0.10839174131339D+03 0.00000000000000D+00 + 1 1 1 6 -0.58058952784329D+01 0.00000000000000D+00 + 2 1 1 6 0.00000000000000D+00 0.00000000000000D+00 + 3 1 1 6 -0.34686603820622D-03 0.00000000000000D+00 + 1 2 1 6 -0.58057523408313D+01 0.00000000000000D+00 + 2 2 1 6 0.00000000000000D+00 0.00000000000000D+00 + 3 2 1 6 -0.36892875638080D-03 0.00000000000000D+00 + 1 3 1 6 -0.10748620935622D+03 0.00000000000000D+00 + 2 3 1 6 0.00000000000000D+00 0.00000000000000D+00 + 3 3 1 6 -0.47407283452596D-03 0.00000000000000D+00 + 1 4 1 6 -0.10748679578919D+03 0.00000000000000D+00 + 2 4 1 6 0.00000000000000D+00 0.00000000000000D+00 + 3 4 1 6 -0.51423004706718D-03 0.00000000000000D+00 + 1 6 1 6 -0.39661438623846D+03 0.00000000000000D+00 + 2 6 1 6 -0.19830756710076D+03 0.00000000000000D+00 + 3 6 1 6 0.00000000000000D+00 0.00000000000000D+00 + 1 1 2 6 0.00000000000000D+00 0.00000000000000D+00 + 2 1 2 6 -0.58057523408313D+01 0.00000000000000D+00 + 3 1 2 6 -0.36892875638080D-03 0.00000000000000D+00 + 1 2 2 6 0.00000000000000D+00 0.00000000000000D+00 + 2 2 2 6 -0.58058952784329D+01 0.00000000000000D+00 + 3 2 2 6 -0.34686603820622D-03 0.00000000000000D+00 + 1 3 2 6 0.00000000000000D+00 0.00000000000000D+00 + 2 3 2 6 -0.10748679578919D+03 0.00000000000000D+00 + 3 3 2 6 -0.51423004706718D-03 0.00000000000000D+00 + 1 4 2 6 0.00000000000000D+00 0.00000000000000D+00 + 2 4 2 6 -0.10748620935622D+03 0.00000000000000D+00 + 3 4 2 6 -0.47407283452596D-03 0.00000000000000D+00 + 1 6 2 6 -0.19830756710076D+03 0.00000000000000D+00 + 2 6 2 6 -0.39661438623846D+03 0.00000000000000D+00 + 3 6 2 6 0.00000000000000D+00 0.00000000000000D+00 + 1 1 3 6 0.00000000000000D+00 0.00000000000000D+00 + 2 1 3 6 0.00000000000000D+00 0.00000000000000D+00 + 3 1 3 6 -0.46335081093053D+01 0.00000000000000D+00 + 1 2 3 6 0.00000000000000D+00 0.00000000000000D+00 + 2 2 3 6 0.00000000000000D+00 0.00000000000000D+00 + 3 2 3 6 -0.46335178623038D+01 0.00000000000000D+00 + 1 3 3 6 0.00000000000000D+00 0.00000000000000D+00 + 2 3 3 6 0.00000000000000D+00 0.00000000000000D+00 + 3 3 3 6 -0.10839079708602D+03 0.00000000000000D+00 + 1 4 3 6 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 6 0.00000000000000D+00 0.00000000000000D+00 + 3 4 3 6 -0.10839174131339D+03 0.00000000000000D+00 + 1 6 3 6 0.00000000000000D+00 0.00000000000000D+00 + 2 6 3 6 0.00000000000000D+00 0.00000000000000D+00 + 3 6 3 6 -0.11088479096066D+03 0.00000000000000D+00 + 1 1 1 7 0.70963996000716D+00 0.00000000000000D+00 + 2 1 1 7 -0.70963995279751D+00 0.00000000000000D+00 + 3 1 1 7 0.10019903202978D+01 0.00000000000000D+00 + 1 2 1 7 -0.70963998726236D+00 0.00000000000000D+00 + 2 2 1 7 0.70964000192332D+00 0.00000000000000D+00 + 3 2 1 7 0.10019902761765D+01 0.00000000000000D+00 + 1 3 1 7 0.85696104189567D+00 0.00000000000000D+00 + 2 3 1 7 -0.85696101735437D+00 0.00000000000000D+00 + 3 3 1 7 -0.10020381688060D+01 0.00000000000000D+00 + 1 4 1 7 -0.85696313914696D+00 0.00000000000000D+00 + 2 4 1 7 0.85696311642393D+00 0.00000000000000D+00 + 3 4 1 7 -0.10019871960253D+01 0.00000000000000D+00 + 1 6 1 7 0.00000000000000D+00 0.00000000000000D+00 + 2 6 1 7 0.00000000000000D+00 0.00000000000000D+00 + 3 6 1 7 0.20775794413421D+01 0.00000000000000D+00 + 1 7 1 7 0.31744342509117D+01 0.00000000000000D+00 + 2 7 1 7 0.69503804814845D+00 0.00000000000000D+00 + 3 7 1 7 0.38006468346602D+00 0.00000000000000D+00 + 1 8 1 7 0.46282353154313D-07 0.00000000000000D+00 + 2 8 1 7 0.69935727840326D-09 0.00000000000000D+00 + 3 8 1 7 0.29436508708899D-08 0.00000000000000D+00 + 1 1 2 7 -0.70963616690121D+00 0.00000000000000D+00 + 2 1 2 7 0.70963617957002D+00 0.00000000000000D+00 + 3 1 2 7 0.10019870454817D+01 0.00000000000000D+00 + 1 2 2 7 0.70963615142170D+00 0.00000000000000D+00 + 2 2 2 7 -0.70963613686147D+00 0.00000000000000D+00 + 3 2 2 7 0.10019870087388D+01 0.00000000000000D+00 + 1 3 2 7 -0.85698193127040D+00 0.00000000000000D+00 + 2 3 2 7 0.85698211381947D+00 0.00000000000000D+00 + 3 3 2 7 -0.10017292098201D+01 0.00000000000000D+00 + 1 4 2 7 0.85698345331315D+00 0.00000000000000D+00 + 2 4 2 7 -0.85698329242036D+00 0.00000000000000D+00 + 3 4 2 7 -0.10016783787673D+01 0.00000000000000D+00 + 1 6 2 7 0.00000000000000D+00 0.00000000000000D+00 + 2 6 2 7 0.00000000000000D+00 0.00000000000000D+00 + 3 6 2 7 0.20777940043425D+01 0.00000000000000D+00 + 1 7 2 7 0.69503806554440D+00 0.00000000000000D+00 + 2 7 2 7 0.31742747760971D+01 0.00000000000000D+00 + 3 7 2 7 0.38008783561042D+00 0.00000000000000D+00 + 1 8 2 7 -0.42900540163078D-07 0.00000000000000D+00 + 2 8 2 7 0.15008400837652D-08 0.00000000000000D+00 + 3 8 2 7 0.46345890910407D-09 0.00000000000000D+00 + 1 1 3 7 -0.88330341136729D-08 0.00000000000000D+00 + 2 1 3 7 0.31054910714036D-07 0.00000000000000D+00 + 3 1 3 7 -0.18599302440831D+01 0.00000000000000D+00 + 1 2 3 7 -0.89767498189759D-08 0.00000000000000D+00 + 2 2 3 7 0.26791355077901D-07 0.00000000000000D+00 + 3 2 3 7 -0.18599301777508D+01 0.00000000000000D+00 + 1 3 3 7 -0.53993181490340D-06 0.00000000000000D+00 + 2 3 3 7 0.72829988520136D-06 0.00000000000000D+00 + 3 3 3 7 0.18606579889713D+01 0.00000000000000D+00 + 1 4 3 7 -0.54557644492426D-06 0.00000000000000D+00 + 2 4 3 7 0.70057373200230D-06 0.00000000000000D+00 + 3 4 3 7 0.18595495907394D+01 0.00000000000000D+00 + 1 6 3 7 0.00000000000000D+00 0.00000000000000D+00 + 2 6 3 7 -0.13877787807814D-16 0.00000000000000D+00 + 3 6 3 7 -0.41332798583618D+01 0.00000000000000D+00 + 1 7 3 7 0.38007641018697D+00 0.00000000000000D+00 + 2 7 3 7 0.38007639093476D+00 0.00000000000000D+00 + 3 7 3 7 0.35104453333314D+01 0.00000000000000D+00 + 1 8 3 7 -0.82806692045901D-09 0.00000000000000D+00 + 2 8 3 7 -0.46845472064886D-08 0.00000000000000D+00 + 3 8 3 7 0.26002159375814D-08 0.00000000000000D+00 + 1 1 1 8 -0.58500665315924D+00 0.00000000000000D+00 + 2 1 1 8 0.58500664829225D+00 0.00000000000000D+00 + 3 1 1 8 0.98477413846136D-05 0.00000000000000D+00 + 1 2 1 8 -0.58499492724099D+00 0.00000000000000D+00 + 2 2 1 8 0.58499492876995D+00 0.00000000000000D+00 + 3 2 1 8 0.10772233304925D-04 0.00000000000000D+00 + 1 3 1 8 0.58485482432839D+00 0.00000000000000D+00 + 2 3 1 8 -0.58485482545985D+00 0.00000000000000D+00 + 3 3 1 8 -0.20218026574209D-04 0.00000000000000D+00 + 1 4 1 8 0.58489602712605D+00 0.00000000000000D+00 + 2 4 1 8 -0.58489603150418D+00 0.00000000000000D+00 + 3 4 1 8 -0.19527662014497D-04 0.00000000000000D+00 + 1 6 1 8 -0.20121139430030D+01 0.00000000000000D+00 + 2 6 1 8 0.20121139430030D+01 0.00000000000000D+00 + 3 6 1 8 0.25907201640502D-04 0.00000000000000D+00 + 1 7 1 8 -0.11581244468696D-04 0.00000000000000D+00 + 2 7 1 8 0.72917745380777D-05 0.00000000000000D+00 + 3 7 1 8 -0.64077512614418D-05 0.00000000000000D+00 + 1 8 1 8 0.86131626664923D+00 0.00000000000000D+00 + 2 8 1 8 0.35867466339562D-09 0.00000000000000D+00 + 3 8 1 8 -0.47103763800701D-09 0.00000000000000D+00 + 1 1 2 8 0.33775697367639D+00 0.00000000000000D+00 + 2 1 2 8 0.33773642742461D+00 0.00000000000000D+00 + 3 1 2 8 0.11882402064427D-04 0.00000000000000D+00 + 1 2 2 8 0.33773643656638D+00 0.00000000000000D+00 + 2 2 2 8 0.33775697970955D+00 0.00000000000000D+00 + 3 2 2 8 0.11875074326006D-04 0.00000000000000D+00 + 1 3 2 8 -0.33771894588513D+00 0.00000000000000D+00 + 2 3 2 8 -0.33766603576622D+00 0.00000000000000D+00 + 3 3 2 8 -0.17854460691912D-04 0.00000000000000D+00 + 1 4 2 8 -0.33765052642599D+00 0.00000000000000D+00 + 2 4 2 8 -0.33770337740085D+00 0.00000000000000D+00 + 3 4 2 8 -0.17843702688913D-04 0.00000000000000D+00 + 1 6 2 8 0.34850229910885D+01 0.00000000000000D+00 + 2 6 2 8 0.34850229910885D+01 0.00000000000000D+00 + 3 6 2 8 0.32472394598930D-04 0.00000000000000D+00 + 1 7 2 8 0.15117602349530D-04 0.00000000000000D+00 + 2 7 2 8 -0.20099025321874D-04 0.00000000000000D+00 + 3 7 2 8 -0.51083324123702D-05 0.00000000000000D+00 + 1 8 2 8 0.27767421368206D-09 0.00000000000000D+00 + 2 8 2 8 0.86132942573761D+00 0.00000000000000D+00 + 3 8 2 8 0.79617907524528D-07 0.00000000000000D+00 + 1 1 3 8 -0.40970634470968D+00 0.00000000000000D+00 + 2 1 3 8 -0.40972184024257D+00 0.00000000000000D+00 + 3 1 3 8 0.22354467542340D-04 0.00000000000000D+00 + 1 2 3 8 0.40970634685164D+00 0.00000000000000D+00 + 2 2 3 8 0.40972183773250D+00 0.00000000000000D+00 + 3 2 3 8 0.22367687028680D-04 0.00000000000000D+00 + 1 3 3 8 -0.49477961755219D+00 0.00000000000000D+00 + 2 3 3 8 -0.49486496146374D+00 0.00000000000000D+00 + 3 3 3 8 -0.78009000059358D-04 0.00000000000000D+00 + 1 4 3 8 0.49477954667015D+00 0.00000000000000D+00 + 2 4 3 8 0.49486459369277D+00 0.00000000000000D+00 + 3 4 3 8 -0.78001308413672D-04 0.00000000000000D+00 + 1 6 3 8 0.00000000000000D+00 0.00000000000000D+00 + 2 6 3 8 0.00000000000000D+00 0.00000000000000D+00 + 3 6 3 8 -0.95469400659479D-04 0.00000000000000D+00 + 1 7 3 8 0.16749096183752D-04 0.00000000000000D+00 + 2 7 3 8 0.81233833149822D-05 0.00000000000000D+00 + 3 7 3 8 0.11207510405112D-04 0.00000000000000D+00 + 1 8 3 8 -0.47005567012946D-09 0.00000000000000D+00 + 2 8 3 8 0.48419012406604D-07 0.00000000000000D+00 + 3 8 3 8 0.12396575600915D+01 0.00000000000000D+00 + + List of bloks and their characteristics + + Total energy - # elements : 1 + + 1st derivatives - # elements : 18 + + 2nd derivatives (non-stat.) - # elements : 351 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 diff --git a/abipy/data/refs/alas_eph/abinitio_qpath_V1QAVG.nc b/abipy/data/refs/alas_eph/abinitio_qpath_V1QAVG.nc new file mode 100644 index 000000000..66f15ba72 Binary files /dev/null and b/abipy/data/refs/alas_eph/abinitio_qpath_V1QAVG.nc differ diff --git a/abipy/data/refs/alas_eph/interpolated_qpath_V1QAVG.nc b/abipy/data/refs/alas_eph/interpolated_qpath_V1QAVG.nc new file mode 100644 index 000000000..29f9e8879 Binary files /dev/null and b/abipy/data/refs/alas_eph/interpolated_qpath_V1QAVG.nc differ diff --git a/abipy/data/refs/alas_eph/run_dfpt_pot.py b/abipy/data/refs/alas_eph/run_dfpt_pot.py new file mode 100755 index 000000000..dd8a647ab --- /dev/null +++ b/abipy/data/refs/alas_eph/run_dfpt_pot.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python +r""" +Flow for computing e-ph matrix elements along a q-path +====================================================== + +This example shows how to compute the phonon band structure of AlAs with AbiPy flows. +The final results (out_DDB, out_DVDB) will be produced automatically at the end of the run +and saved in ``flow_phonons/outdata/``. +""" +from __future__ import division, print_function, unicode_literals, absolute_import + +import sys +import os +import abipy.abilab as abilab +import abipy.data as abidata +import numpy as np + +from abipy import flowtk + +def make_scf_input(ngkpt): + """ + This function constructs the input file for the GS calculation: + """ + structure = dict( + angdeg= 3*[60.0], + acell=3* [ 7.1992351952], + natom=2, + ntypat=2, + typat=[1, 2], + znucl=[31, 15], + xred=[ + 0.0000000000, 0.0000000000, 0.0000000000, + 0.2500000000, 0.2500000000, 0.2500000000, + ]) + + #pseudos = ["Ga.psp8", "P.psp8"] + pseudos = abidata.pseudos("Ga.oncvpsp", "P.psp8") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + gs_inp.set_vars( + nband=8, + #nband=13, + ecut=30.0, + #ecut=24.0, + ngkpt=ngkpt, + nshiftk=1, + shiftk=[0, 0, 0], + tolvrs=1.0e-10, + nstep=150, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for phonon calculations. The flow has two works. + + The first work contains a single GS task that produces the WFK file used in DFPT + Then we have multiple Works that are generated automatically + in order to compute the dynamical matrix on a [2, 2, 2] mesh. + Symmetries are taken into account: only q-points in the IBZ are generated and + for each q-point only the independent atomic perturbations are computed. + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + + # Use 2x2x2 both for k-mesh and q-mesh + # Build input for GS calculation + scf_input = make_scf_input(ngkpt=(4, 4, 4)) + + # Create flow to compute all the independent atomic perturbations + # corresponding to a [4, 4, 4] q-mesh. + # Electric field and Born effective charges are also computed. + from abipy.flowtk.eph_flows import EphPotFlow + ngqpt = (2, 2, 2) + #ngqpt = (4, 4, 4) + #qpath_list = [[0.01, 0, 0], [0.02, 0, 0], [0.24, 0, 0], [0.45, 0, 0]] + #qpath_list = [[0.0, 0.0, 0.0], [0.01, 0, 0], [0.1, 0, 0], + # [0.24, 0, 0], [0.3, 0, 0], [0.45, 0, 0], [0.5, 0.0, 0.0]] + + #qpath_list = [[0.0, 0.0, 0.0], [0.01, 0, 0], [0.1, 0, 0], + # [0.24, 0, 0], [0.3, 0, 0], [0.45, 0, 0], [0.5, 0.0, 0.0]] + + qpath_list = [ + #+0.50000, +0.50000, +0.50000, # L + #+0.00000, +0.00000, +0.00000, # $\Gamma$ + #+0.50000, +0.00000, +0.50000, # X + + +0.10000, +0.10000, +0.10000, # L + +0.00000, +0.00000, +0.00000, # $\Gamma$ + +0.10000, +0.00000, +0.10000, # X + + #+0.50000, +0.25000, +0.75000, # W + #+0.37500, +0.37500, +0.75000, # K + #+0.00000, +0.00000, +0.00000, # $\Gamma$ + #+0.50000, +0.25000, +0.75000, # W + + #+0.62500 +0.25000 +0.62500 # U + #+0.50000 +0.25000 +0.75000 # W + #+0.50000 +0.50000 +0.50000 # L + #+0.37500 +0.37500 +0.75000 # K + #+0.62500 +0.25000 +0.62500 # U + #+0.50000 +0.00000 +0.50000 # X + ] + + flow = EphPotFlow.from_scf_input(options.workdir, scf_input, + ngqpt, qpath_list, ndivsm=5, ddk_tolerance={"tolwfr": 1e-12}, + with_becs=True) #, prepgkk=0) + + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + diff --git a/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt222_DDB b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt222_DDB new file mode 100644 index 000000000..44829e0eb --- /dev/null +++ b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt222_DDB @@ -0,0 +1,218 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + DDB file merged by BecWork on Thu Aug 16 21:46:02 2018 + + usepaw 0 + natom 2 + nkpt 16 + nsppol 1 + nsym 24 + ntypat 2 + occopt 1 + nband 4 + acell 0.10000000000000D+01 0.10000000000000D+01 0.10000000000000D+01 + amu 0.26981539000000D+02 0.74921590000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.20000000000000D+01 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc 1 + kpt -0.25000000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + kptnrm 0.10000000000000D+01 + ngfft 10 10 10 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 + rprim 0.00000000000000D+00 0.53050000000000D+01 0.53050000000000D+01 + 0.53050000000000D+01 0.00000000000000D+00 0.53050000000000D+01 + 0.53050000000000D+01 0.53050000000000D+01 0.00000000000000D+00 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + 0 -1 1 0 -1 0 1 -1 0 + -1 0 0 -1 0 1 -1 1 0 + 0 1 -1 1 0 -1 0 0 -1 + -1 0 0 -1 1 0 -1 0 1 + 0 -1 1 1 -1 0 0 -1 0 + 1 0 0 0 0 1 0 1 0 + 0 1 -1 0 0 -1 1 0 -1 + -1 0 1 -1 1 0 -1 0 0 + 0 -1 0 1 -1 0 0 -1 1 + 1 0 -1 0 0 -1 0 1 -1 + 0 1 0 0 0 1 1 0 0 + 1 0 -1 0 1 -1 0 0 -1 + 0 -1 0 0 -1 1 1 -1 0 + -1 0 1 -1 0 0 -1 1 0 + 0 1 0 1 0 0 0 0 1 + 0 0 -1 0 1 -1 1 0 -1 + 1 -1 0 0 -1 1 0 -1 0 + 0 0 1 1 0 0 0 1 0 + -1 1 0 -1 0 0 -1 0 1 + 0 0 1 0 1 0 1 0 0 + 1 -1 0 0 -1 0 0 -1 1 + 0 0 -1 1 0 -1 0 1 -1 + -1 1 0 -1 0 1 -1 0 0 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 2 + wtk 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 + xred 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + znucl 0.13000000000000D+02 0.33000000000000D+02 + zion 0.30000000000000D+01 0.50000000000000D+01 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 3 lmnmax= 3 + Atom type= 1 pspso= 0 nekb= 2 + iln lpsang iproj ekb(:) + 1 0 1 1.7687444E+00 0.0000000E+00 + 2 1 1 0.0000000E+00 9.0055415E-01 + Atom type= 2 pspso= 0 nekb= 1 + iln lpsang iproj ekb(:) + 1 0 1 8.3875106E-01 + + **** Database of total energy derivatives **** + Number of data blocks= 1 + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.59014589931585D+01 0.00000000000000D+00 + 2 1 1 1 0.29507294965793D+01 0.00000000000000D+00 + 3 1 1 1 0.29507294965793D+01 0.00000000000000D+00 + 1 2 1 1 -0.59013712383985D+01 0.73319348786105D-18 + 2 2 1 1 -0.29506856191992D+01 -0.22662441376834D-17 + 3 2 1 1 -0.29506856191992D+01 -0.32760426504849D-17 + 1 4 1 1 -0.74153821923041D+01 0.00000000000000D+00 + 2 4 1 1 0.19073074040239D-16 0.00000000000000D+00 + 3 4 1 1 0.45974614211138D-16 0.00000000000000D+00 + 1 1 2 1 0.29507294965793D+01 0.00000000000000D+00 + 2 1 2 1 0.59014589931585D+01 0.00000000000000D+00 + 3 1 2 1 0.29507294965793D+01 0.00000000000000D+00 + 1 2 2 1 -0.29506856191992D+01 -0.22662441376834D-17 + 2 2 2 1 -0.59013712383985D+01 0.28893229871495D-17 + 3 2 2 1 -0.29506856191992D+01 -0.21964918338888D-17 + 1 4 2 1 0.37007434154172D-16 0.00000000000000D+00 + 2 4 2 1 -0.74153821923041D+01 0.00000000000000D+00 + 3 4 2 1 -0.61836574629944D-17 0.00000000000000D+00 + 1 1 3 1 0.29507294965793D+01 0.00000000000000D+00 + 2 1 3 1 0.29507294965793D+01 0.00000000000000D+00 + 3 1 3 1 0.59014589931585D+01 0.00000000000000D+00 + 1 2 3 1 -0.29506856191992D+01 -0.32760426504849D-17 + 2 2 3 1 -0.29506856191992D+01 -0.21964918338888D-17 + 3 2 3 1 -0.59013712383985D+01 -0.72872500684629D-17 + 1 4 3 1 -0.37007434154172D-16 0.00000000000000D+00 + 2 4 3 1 0.67057591142503D-17 0.00000000000000D+00 + 3 4 3 1 -0.74153821923041D+01 0.00000000000000D+00 + 1 1 1 2 -0.59013712383985D+01 -0.73319348786105D-18 + 2 1 1 2 -0.29506856191992D+01 0.22662441376834D-17 + 3 1 1 2 -0.29506856191992D+01 0.32760426504849D-17 + 1 2 1 2 0.59018029371884D+01 0.00000000000000D+00 + 2 2 1 2 0.29509014685942D+01 0.00000000000000D+00 + 3 2 1 2 0.29509014685942D+01 0.00000000000000D+00 + 1 4 1 2 -0.50065530001673D+02 0.00000000000000D+00 + 2 4 1 2 0.32481982569053D-15 0.00000000000000D+00 + 3 4 1 2 0.10876551607491D-15 0.00000000000000D+00 + 1 1 2 2 -0.29506856191992D+01 0.22662441376834D-17 + 2 1 2 2 -0.59013712383985D+01 -0.28893229871495D-17 + 3 1 2 2 -0.29506856191992D+01 0.21964918338888D-17 + 1 2 2 2 0.29509014685942D+01 0.00000000000000D+00 + 2 2 2 2 0.59018029371884D+01 0.00000000000000D+00 + 3 2 2 2 0.29509014685942D+01 0.00000000000000D+00 + 1 4 2 2 -0.29605947323338D-15 0.00000000000000D+00 + 2 4 2 2 -0.50065530001673D+02 0.00000000000000D+00 + 3 4 2 2 0.31230640392285D-15 0.00000000000000D+00 + 1 1 3 2 -0.29506856191992D+01 0.32760426504849D-17 + 2 1 3 2 -0.29506856191992D+01 0.21964918338888D-17 + 3 1 3 2 -0.59013712383985D+01 0.72872500684629D-17 + 1 2 3 2 0.29509014685942D+01 0.00000000000000D+00 + 2 2 3 2 0.29509014685942D+01 0.00000000000000D+00 + 3 2 3 2 0.59018029371884D+01 0.00000000000000D+00 + 1 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 2 -0.61254213836108D-16 0.00000000000000D+00 + 3 4 3 2 -0.50065530001673D+02 0.00000000000000D+00 + 1 1 1 4 -0.74153821923041D+01 0.00000000000000D+00 + 2 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 1 1 4 -0.37007434154172D-16 0.00000000000000D+00 + 1 2 1 4 -0.50065529627667D+02 0.00000000000000D+00 + 2 2 1 4 0.29605947323338D-15 0.00000000000000D+00 + 3 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 4 -0.31459226925975D+03 0.00000000000000D+00 + 2 4 1 4 0.10486408975325D+03 0.00000000000000D+00 + 3 4 1 4 0.10486408975325D+03 0.00000000000000D+00 + 1 1 2 4 0.10105893983273D-16 0.00000000000000D+00 + 2 1 2 4 -0.74153821923041D+01 0.00000000000000D+00 + 3 1 2 4 0.67057591142503D-17 0.00000000000000D+00 + 1 2 2 4 -0.12977325224417D-15 0.00000000000000D+00 + 2 2 2 4 -0.50065529627667D+02 0.00000000000000D+00 + 3 2 2 4 -0.61254213284654D-16 0.00000000000000D+00 + 1 4 2 4 0.10486408975325D+03 0.00000000000000D+00 + 2 4 2 4 -0.31459226925975D+03 0.00000000000000D+00 + 3 4 2 4 0.10486408975325D+03 0.00000000000000D+00 + 1 1 3 4 0.39790956748144D-16 0.00000000000000D+00 + 2 1 3 4 0.15672939171217D-16 0.00000000000000D+00 + 3 1 3 4 -0.74153821923041D+01 0.00000000000000D+00 + 1 2 3 4 0.11352632155469D-15 0.00000000000000D+00 + 2 2 3 4 0.15853360470132D-15 0.00000000000000D+00 + 3 2 3 4 -0.50065529627667D+02 0.00000000000000D+00 + 1 4 3 4 0.10486408975325D+03 0.00000000000000D+00 + 2 4 3 4 0.10486408975325D+03 0.00000000000000D+00 + 3 4 3 4 -0.31459226925975D+03 0.00000000000000D+00 + + List of bloks and their characteristics + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 diff --git a/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt444_DDB b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt444_DDB new file mode 100644 index 000000000..ee1754732 --- /dev/null +++ b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt444_DDB @@ -0,0 +1,367 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + DDB file merged by BecWork on Thu Aug 16 21:46:37 2018 + + usepaw 0 + natom 2 + nkpt 128 + nsppol 1 + nsym 24 + ntypat 2 + occopt 1 + nband 4 + acell 0.10000000000000D+01 0.10000000000000D+01 0.10000000000000D+01 + amu 0.26981539000000D+02 0.74921590000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.20000000000000D+01 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc 1 + kpt -0.12500000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.37500000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.12500000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.12500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.12500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 -0.37500000000000D+00 + 0.25000000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + 0.12500000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + 0.12500000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.12500000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + 0.25000000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + kptnrm 0.10000000000000D+01 + ngfft 10 10 10 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 + rprim 0.00000000000000D+00 0.53050000000000D+01 0.53050000000000D+01 + 0.53050000000000D+01 0.00000000000000D+00 0.53050000000000D+01 + 0.53050000000000D+01 0.53050000000000D+01 0.00000000000000D+00 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + 0 -1 1 0 -1 0 1 -1 0 + -1 0 0 -1 0 1 -1 1 0 + 0 1 -1 1 0 -1 0 0 -1 + -1 0 0 -1 1 0 -1 0 1 + 0 -1 1 1 -1 0 0 -1 0 + 1 0 0 0 0 1 0 1 0 + 0 1 -1 0 0 -1 1 0 -1 + -1 0 1 -1 1 0 -1 0 0 + 0 -1 0 1 -1 0 0 -1 1 + 1 0 -1 0 0 -1 0 1 -1 + 0 1 0 0 0 1 1 0 0 + 1 0 -1 0 1 -1 0 0 -1 + 0 -1 0 0 -1 1 1 -1 0 + -1 0 1 -1 0 0 -1 1 0 + 0 1 0 1 0 0 0 0 1 + 0 0 -1 0 1 -1 1 0 -1 + 1 -1 0 0 -1 1 0 -1 0 + 0 0 1 1 0 0 0 1 0 + -1 1 0 -1 0 0 -1 0 1 + 0 0 1 0 1 0 1 0 0 + 1 -1 0 0 -1 0 0 -1 1 + 0 0 -1 1 0 -1 0 1 -1 + -1 1 0 -1 0 1 -1 0 0 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 2 + wtk 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 0.78125000000000D-02 + 0.78125000000000D-02 0.78125000000000D-02 + xred 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + znucl 0.13000000000000D+02 0.33000000000000D+02 + zion 0.30000000000000D+01 0.50000000000000D+01 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 3 lmnmax= 3 + Atom type= 1 pspso= 0 nekb= 2 + iln lpsang iproj ekb(:) + 1 0 1 1.7687444E+00 0.0000000E+00 + 2 1 1 0.0000000E+00 9.0055415E-01 + Atom type= 2 pspso= 0 nekb= 1 + iln lpsang iproj ekb(:) + 1 0 1 8.3875106E-01 + + **** Database of total energy derivatives **** + Number of data blocks= 1 + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.60221112612129D+01 0.00000000000000D+00 + 2 1 1 1 0.30110556306064D+01 0.00000000000000D+00 + 3 1 1 1 0.30110556306064D+01 0.00000000000000D+00 + 1 2 1 1 -0.60220212481811D+01 0.73319348786105D-18 + 2 2 1 1 -0.30110106240905D+01 -0.22662441376834D-17 + 3 2 1 1 -0.30110106240905D+01 -0.32760426504849D-17 + 1 4 1 1 -0.56907608500300D+01 0.00000000000000D+00 + 2 4 1 1 0.38603447920025D-16 0.00000000000000D+00 + 3 4 1 1 -0.79800688292647D-18 0.00000000000000D+00 + 1 1 2 1 0.30110556306064D+01 0.00000000000000D+00 + 2 1 2 1 0.60221112612129D+01 0.00000000000000D+00 + 3 1 2 1 0.30110556306064D+01 0.00000000000000D+00 + 1 2 2 1 -0.30110106240905D+01 -0.22662441376834D-17 + 2 2 2 1 -0.60220212481811D+01 0.28893229871495D-17 + 3 2 2 1 -0.30110106240905D+01 -0.21964918338888D-17 + 1 4 2 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 2 1 -0.56907608500300D+01 0.00000000000000D+00 + 3 4 2 1 -0.17646860601809D-16 0.00000000000000D+00 + 1 1 3 1 0.30110556306064D+01 0.00000000000000D+00 + 2 1 3 1 0.30110556306064D+01 0.00000000000000D+00 + 3 1 3 1 0.60221112612129D+01 0.00000000000000D+00 + 1 2 3 1 -0.30110106240905D+01 -0.32760426504849D-17 + 2 2 3 1 -0.30110106240905D+01 -0.21964918338888D-17 + 3 2 3 1 -0.60220212481811D+01 -0.72872500684629D-17 + 1 4 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 1 -0.33697707437764D-16 0.00000000000000D+00 + 3 4 3 1 -0.56907608500300D+01 0.00000000000000D+00 + 1 1 1 2 -0.60220212481811D+01 -0.73319348786105D-18 + 2 1 1 2 -0.30110106240905D+01 0.22662441376834D-17 + 3 1 1 2 -0.30110106240905D+01 0.32760426504849D-17 + 1 2 1 2 0.60224999263092D+01 0.00000000000000D+00 + 2 2 1 2 0.30112499631546D+01 0.00000000000000D+00 + 3 2 1 2 0.30112499631546D+01 0.00000000000000D+00 + 1 4 1 2 -0.43370520471940D+02 0.00000000000000D+00 + 2 4 1 2 0.31585805925494D-15 0.00000000000000D+00 + 3 4 1 2 -0.14348570057174D-15 0.00000000000000D+00 + 1 1 2 2 -0.30110106240905D+01 0.22662441376834D-17 + 2 1 2 2 -0.60220212481811D+01 -0.28893229871495D-17 + 3 1 2 2 -0.30110106240905D+01 0.21964918338888D-17 + 1 2 2 2 0.30112499631546D+01 0.00000000000000D+00 + 2 2 2 2 0.60224999263091D+01 0.00000000000000D+00 + 3 2 2 2 0.30112499631546D+01 0.00000000000000D+00 + 1 4 2 2 -0.29605947323338D-15 0.00000000000000D+00 + 2 4 2 2 -0.43370520471940D+02 0.00000000000000D+00 + 3 4 2 2 0.31910722635541D-15 0.00000000000000D+00 + 1 1 3 2 -0.30110106240905D+01 0.32760426504849D-17 + 2 1 3 2 -0.30110106240905D+01 0.21964918338888D-17 + 3 1 3 2 -0.60220212481811D+01 0.72872500684629D-17 + 1 2 3 2 0.30112499631546D+01 0.00000000000000D+00 + 2 2 3 2 0.30112499631546D+01 0.00000000000000D+00 + 3 2 3 2 0.60224999263092D+01 0.00000000000000D+00 + 1 4 3 2 0.29605947323338D-15 0.00000000000000D+00 + 2 4 3 2 -0.36195356549901D-15 0.00000000000000D+00 + 3 4 3 2 -0.43370520471940D+02 0.00000000000000D+00 + 1 1 1 4 -0.56907608500300D+01 0.00000000000000D+00 + 2 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 1 1 4 0.37007434154172D-16 0.00000000000000D+00 + 1 2 1 4 -0.43370518701229D+02 0.00000000000000D+00 + 2 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 2 1 4 -0.29605947323338D-15 0.00000000000000D+00 + 1 4 1 4 -0.20670421613170D+03 0.00000000000000D+00 + 2 4 1 4 0.68901405377234D+02 0.00000000000000D+00 + 3 4 1 4 0.68901405377234D+02 0.00000000000000D+00 + 1 1 2 4 -0.34613413505392D-16 0.00000000000000D+00 + 2 1 2 4 -0.56907608500300D+01 0.00000000000000D+00 + 3 1 2 4 0.33097267164075D-17 0.00000000000000D+00 + 1 2 2 4 -0.10388852880433D-15 0.00000000000000D+00 + 2 2 2 4 -0.43370518701229D+02 0.00000000000000D+00 + 3 2 2 4 -0.65894092265639D-16 0.00000000000000D+00 + 1 4 2 4 0.68901405377234D+02 0.00000000000000D+00 + 2 4 2 4 -0.20670421613170D+03 0.00000000000000D+00 + 3 4 2 4 0.68901405377234D+02 0.00000000000000D+00 + 1 1 3 4 -0.18444867484735D-16 0.00000000000000D+00 + 2 1 3 4 0.39519153987653D-16 0.00000000000000D+00 + 3 1 3 4 -0.56907608500300D+01 0.00000000000000D+00 + 1 2 3 4 0.80840775406567D-16 0.00000000000000D+00 + 2 2 3 4 0.12368711455017D-15 0.00000000000000D+00 + 3 2 3 4 -0.43370518701229D+02 0.00000000000000D+00 + 1 4 3 4 0.68901405377234D+02 0.00000000000000D+00 + 2 4 3 4 0.68901405377234D+02 0.00000000000000D+00 + 3 4 3 4 -0.20670421613170D+03 0.00000000000000D+00 + + List of bloks and their characteristics + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 diff --git a/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt888_DDB b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt888_DDB new file mode 100644 index 000000000..e089dcac2 --- /dev/null +++ b/abipy/data/refs/alas_eps_and_becs_vs_ngkpt/out_ngkpt888_DDB @@ -0,0 +1,1562 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + DDB file merged by BecWork on Thu Aug 16 21:47:27 2018 + + usepaw 0 + natom 2 + nkpt 1024 + nsppol 1 + nsym 24 + ntypat 2 + occopt 1 + nband 4 + acell 0.10000000000000D+01 0.10000000000000D+01 0.10000000000000D+01 + amu 0.26981539000000D+02 0.74921590000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.20000000000000D+01 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc 1 + kpt -0.62500000000000D-01 -0.12500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 0.62500000000000D-01 + -0.62500000000000D-01 -0.25000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 -0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + -0.12500000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 0.18750000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 -0.25000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + -0.25000000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 0.31250000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 -0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + -0.37500000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 0.43750000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 0.50000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 0.00000000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + 0.50000000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 -0.43750000000000D+00 + -0.62500000000000D-01 0.25000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.31250000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.37500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.43750000000000D+00 0.00000000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.43750000000000D+00 0.00000000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 -0.43750000000000D+00 + 0.31250000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 -0.37500000000000D+00 + 0.25000000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + 0.37500000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 -0.31250000000000D+00 + -0.62500000000000D-01 0.12500000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.18750000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 0.18750000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.25000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 0.25000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.31250000000000D+00 0.00000000000000D+00 + -0.18750000000000D+00 0.31250000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.37500000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.43750000000000D+00 0.00000000000000D+00 + -0.31250000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.43750000000000D+00 0.00000000000000D+00 + -0.43750000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.37500000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + 0.43750000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 -0.43750000000000D+00 + 0.31250000000000D+00 -0.25000000000000D+00 0.00000000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 -0.37500000000000D+00 + 0.25000000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + 0.31250000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + 0.37500000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 -0.43750000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 -0.31250000000000D+00 + 0.18750000000000D+00 -0.12500000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 -0.25000000000000D+00 + 0.12500000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + 0.18750000000000D+00 -0.62500000000000D-01 0.62500000000000D-01 + 0.25000000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 -0.31250000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 -0.18750000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 0.00000000000000D+00 + -0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + -0.12500000000000D+00 0.12500000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 0.12500000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 0.18750000000000D+00 0.62500000000000D-01 + -0.12500000000000D+00 0.18750000000000D+00 0.12500000000000D+00 + -0.62500000000000D-01 0.18750000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 0.25000000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.31250000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 0.31250000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 0.31250000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 0.43750000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 -0.43750000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 -0.37500000000000D+00 + 0.31250000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + 0.37500000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + 0.43750000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + 0.50000000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 0.43750000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 -0.43750000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 -0.37500000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 -0.31250000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 -0.25000000000000D+00 + 0.18750000000000D+00 -0.18750000000000D+00 0.62500000000000D-01 + 0.25000000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + 0.31250000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + 0.37500000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 -0.43750000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 -0.31250000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 -0.25000000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 -0.18750000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + 0.18750000000000D+00 -0.12500000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + 0.31250000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.18750000000000D+00 + -0.62500000000000D-01 -0.12500000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.62500000000000D-01 0.00000000000000D+00 + 0.62500000000000D-01 -0.62500000000000D-01 0.62500000000000D-01 + 0.12500000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + 0.18750000000000D+00 -0.62500000000000D-01 0.18750000000000D+00 + 0.25000000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 -0.31250000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 -0.18750000000000D+00 + -0.12500000000000D+00 -0.62500000000000D-01 -0.12500000000000D+00 + -0.62500000000000D-01 -0.62500000000000D-01 -0.62500000000000D-01 + -0.18750000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + -0.62500000000000D-01 0.00000000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 0.62500000000000D-01 0.62500000000000D-01 + -0.12500000000000D+00 0.62500000000000D-01 0.12500000000000D+00 + -0.62500000000000D-01 0.62500000000000D-01 0.18750000000000D+00 + -0.25000000000000D+00 0.12500000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.12500000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.12500000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 0.12500000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.18750000000000D+00 0.62500000000000D-01 + -0.25000000000000D+00 0.18750000000000D+00 0.12500000000000D+00 + -0.18750000000000D+00 0.18750000000000D+00 0.18750000000000D+00 + -0.12500000000000D+00 0.18750000000000D+00 0.25000000000000D+00 + -0.62500000000000D-01 0.18750000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 0.25000000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 0.31250000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 0.31250000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 0.31250000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 0.31250000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 0.31250000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 0.37500000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 0.43750000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.43750000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 0.43750000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 -0.43750000000000D+00 + 0.37500000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 -0.37500000000000D+00 + 0.31250000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + 0.37500000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + 0.43750000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + 0.50000000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + -0.43750000000000D+00 -0.43750000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 0.43750000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 0.50000000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 -0.43750000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 -0.37500000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 -0.31250000000000D+00 + 0.25000000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 -0.25000000000000D+00 + 0.18750000000000D+00 -0.31250000000000D+00 0.62500000000000D-01 + 0.25000000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + 0.31250000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + 0.37500000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + 0.43750000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + 0.50000000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 0.43750000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 -0.43750000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 -0.37500000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 -0.31250000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 -0.25000000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 -0.18750000000000D+00 + 0.12500000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + 0.18750000000000D+00 -0.25000000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + 0.31250000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + 0.43750000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.31250000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 -0.18750000000000D+00 + -0.62500000000000D-01 -0.25000000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.18750000000000D+00 0.00000000000000D+00 + 0.62500000000000D-01 -0.18750000000000D+00 0.62500000000000D-01 + 0.12500000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + 0.18750000000000D+00 -0.18750000000000D+00 0.18750000000000D+00 + 0.25000000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + 0.31250000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + 0.37500000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 -0.43750000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 -0.31250000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 -0.25000000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 -0.18750000000000D+00 + -0.12500000000000D+00 -0.18750000000000D+00 -0.12500000000000D+00 + -0.62500000000000D-01 -0.18750000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.12500000000000D+00 0.62500000000000D-01 + 0.62500000000000D-01 -0.12500000000000D+00 0.12500000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + 0.18750000000000D+00 -0.12500000000000D+00 0.25000000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + 0.31250000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 -0.18750000000000D+00 + -0.18750000000000D+00 -0.12500000000000D+00 -0.12500000000000D+00 + -0.12500000000000D+00 -0.12500000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.62500000000000D-01 0.12500000000000D+00 + 0.62500000000000D-01 -0.62500000000000D-01 0.18750000000000D+00 + 0.12500000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + 0.18750000000000D+00 -0.62500000000000D-01 0.31250000000000D+00 + 0.25000000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 -0.31250000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 -0.18750000000000D+00 + -0.25000000000000D+00 -0.62500000000000D-01 -0.12500000000000D+00 + -0.18750000000000D+00 -0.62500000000000D-01 -0.62500000000000D-01 + -0.31250000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + -0.18750000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.62500000000000D-01 0.62500000000000D-01 + -0.25000000000000D+00 0.62500000000000D-01 0.12500000000000D+00 + -0.18750000000000D+00 0.62500000000000D-01 0.18750000000000D+00 + -0.12500000000000D+00 0.62500000000000D-01 0.25000000000000D+00 + -0.62500000000000D-01 0.62500000000000D-01 0.31250000000000D+00 + -0.37500000000000D+00 0.12500000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 0.12500000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.12500000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 0.12500000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.12500000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 0.12500000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 0.18750000000000D+00 0.62500000000000D-01 + -0.37500000000000D+00 0.18750000000000D+00 0.12500000000000D+00 + -0.31250000000000D+00 0.18750000000000D+00 0.18750000000000D+00 + -0.25000000000000D+00 0.18750000000000D+00 0.25000000000000D+00 + -0.18750000000000D+00 0.18750000000000D+00 0.31250000000000D+00 + -0.12500000000000D+00 0.18750000000000D+00 0.37500000000000D+00 + -0.62500000000000D-01 0.18750000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.25000000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 0.25000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 0.25000000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 0.31250000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 0.31250000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 0.31250000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.31250000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 0.31250000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 0.31250000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 0.31250000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 -0.43750000000000D+00 + 0.37500000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 0.37500000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 0.37500000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 -0.37500000000000D+00 + 0.31250000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + 0.37500000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + 0.43750000000000D+00 0.43750000000000D+00 0.18750000000000D+00 + 0.50000000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + -0.43750000000000D+00 0.43750000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 0.43750000000000D+00 0.37500000000000D+00 + -0.31250000000000D+00 0.43750000000000D+00 0.43750000000000D+00 + -0.25000000000000D+00 0.43750000000000D+00 0.50000000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 -0.43750000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 -0.37500000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 -0.31250000000000D+00 + 0.25000000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 0.50000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 -0.25000000000000D+00 + 0.18750000000000D+00 -0.43750000000000D+00 0.62500000000000D-01 + 0.25000000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + 0.31250000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + 0.37500000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + 0.43750000000000D+00 -0.43750000000000D+00 0.31250000000000D+00 + 0.50000000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 -0.43750000000000D+00 0.43750000000000D+00 + -0.37500000000000D+00 -0.43750000000000D+00 0.50000000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 -0.43750000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 -0.37500000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 -0.31250000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 -0.25000000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 -0.18750000000000D+00 + 0.12500000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + 0.18750000000000D+00 -0.37500000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + 0.31250000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + 0.43750000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + -0.43750000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 -0.43750000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 -0.31250000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.18750000000000D+00 + -0.62500000000000D-01 -0.37500000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.31250000000000D+00 0.00000000000000D+00 + 0.62500000000000D-01 -0.31250000000000D+00 0.62500000000000D-01 + 0.12500000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + 0.18750000000000D+00 -0.31250000000000D+00 0.18750000000000D+00 + 0.25000000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + 0.31250000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + 0.37500000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + 0.43750000000000D+00 -0.31250000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 -0.43750000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 -0.37500000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 -0.31250000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 -0.25000000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 -0.18750000000000D+00 + -0.12500000000000D+00 -0.31250000000000D+00 -0.12500000000000D+00 + -0.62500000000000D-01 -0.31250000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.25000000000000D+00 0.62500000000000D-01 + 0.62500000000000D-01 -0.25000000000000D+00 0.12500000000000D+00 + 0.12500000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + 0.18750000000000D+00 -0.25000000000000D+00 0.25000000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + 0.31250000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 -0.31250000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.18750000000000D+00 + -0.18750000000000D+00 -0.25000000000000D+00 -0.12500000000000D+00 + -0.12500000000000D+00 -0.25000000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.18750000000000D+00 0.12500000000000D+00 + 0.62500000000000D-01 -0.18750000000000D+00 0.18750000000000D+00 + 0.12500000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + 0.18750000000000D+00 -0.18750000000000D+00 0.31250000000000D+00 + 0.25000000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + 0.31250000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + 0.37500000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 -0.43750000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 -0.31250000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 -0.25000000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 -0.18750000000000D+00 + -0.25000000000000D+00 -0.18750000000000D+00 -0.12500000000000D+00 + -0.18750000000000D+00 -0.18750000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.12500000000000D+00 0.18750000000000D+00 + 0.62500000000000D-01 -0.12500000000000D+00 0.25000000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + 0.18750000000000D+00 -0.12500000000000D+00 0.37500000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + 0.31250000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.18750000000000D+00 + -0.31250000000000D+00 -0.12500000000000D+00 -0.12500000000000D+00 + -0.25000000000000D+00 -0.12500000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.62500000000000D-01 0.25000000000000D+00 + 0.62500000000000D-01 -0.62500000000000D-01 0.31250000000000D+00 + 0.12500000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + 0.18750000000000D+00 -0.62500000000000D-01 0.43750000000000D+00 + 0.25000000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 -0.31250000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 -0.18750000000000D+00 + -0.37500000000000D+00 -0.62500000000000D-01 -0.12500000000000D+00 + -0.31250000000000D+00 -0.62500000000000D-01 -0.62500000000000D-01 + -0.43750000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + -0.31250000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + -0.18750000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 0.62500000000000D-01 0.62500000000000D-01 + -0.37500000000000D+00 0.62500000000000D-01 0.12500000000000D+00 + -0.31250000000000D+00 0.62500000000000D-01 0.18750000000000D+00 + -0.25000000000000D+00 0.62500000000000D-01 0.25000000000000D+00 + -0.18750000000000D+00 0.62500000000000D-01 0.31250000000000D+00 + -0.12500000000000D+00 0.62500000000000D-01 0.37500000000000D+00 + -0.62500000000000D-01 0.62500000000000D-01 0.43750000000000D+00 + 0.50000000000000D+00 0.12500000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 0.12500000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.12500000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.12500000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.12500000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 0.12500000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.12500000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 0.12500000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 0.18750000000000D+00 0.62500000000000D-01 + 0.50000000000000D+00 0.18750000000000D+00 0.12500000000000D+00 + -0.43750000000000D+00 0.18750000000000D+00 0.18750000000000D+00 + -0.37500000000000D+00 0.18750000000000D+00 0.25000000000000D+00 + -0.31250000000000D+00 0.18750000000000D+00 0.31250000000000D+00 + -0.25000000000000D+00 0.18750000000000D+00 0.37500000000000D+00 + -0.18750000000000D+00 0.18750000000000D+00 0.43750000000000D+00 + -0.12500000000000D+00 0.18750000000000D+00 0.50000000000000D+00 + -0.62500000000000D-01 0.18750000000000D+00 -0.43750000000000D+00 + 0.37500000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 0.25000000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 0.25000000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.25000000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 0.25000000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 0.25000000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 0.25000000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 0.25000000000000D+00 -0.37500000000000D+00 + 0.31250000000000D+00 0.31250000000000D+00 0.62500000000000D-01 + 0.37500000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + 0.43750000000000D+00 0.31250000000000D+00 0.18750000000000D+00 + 0.50000000000000D+00 0.31250000000000D+00 0.25000000000000D+00 + -0.43750000000000D+00 0.31250000000000D+00 0.31250000000000D+00 + -0.37500000000000D+00 0.31250000000000D+00 0.37500000000000D+00 + -0.31250000000000D+00 0.31250000000000D+00 0.43750000000000D+00 + -0.25000000000000D+00 0.31250000000000D+00 0.50000000000000D+00 + -0.18750000000000D+00 0.31250000000000D+00 -0.43750000000000D+00 + -0.12500000000000D+00 0.31250000000000D+00 -0.37500000000000D+00 + -0.62500000000000D-01 0.31250000000000D+00 -0.31250000000000D+00 + 0.25000000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 0.37500000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 0.37500000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.37500000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 0.37500000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 0.37500000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 0.37500000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 0.37500000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 0.37500000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.37500000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 0.37500000000000D+00 -0.25000000000000D+00 + 0.18750000000000D+00 0.43750000000000D+00 0.62500000000000D-01 + 0.25000000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + 0.31250000000000D+00 0.43750000000000D+00 0.18750000000000D+00 + 0.37500000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + 0.43750000000000D+00 0.43750000000000D+00 0.31250000000000D+00 + 0.50000000000000D+00 0.43750000000000D+00 0.37500000000000D+00 + -0.43750000000000D+00 0.43750000000000D+00 0.43750000000000D+00 + -0.37500000000000D+00 0.43750000000000D+00 0.50000000000000D+00 + -0.31250000000000D+00 0.43750000000000D+00 -0.43750000000000D+00 + -0.25000000000000D+00 0.43750000000000D+00 -0.37500000000000D+00 + -0.18750000000000D+00 0.43750000000000D+00 -0.31250000000000D+00 + -0.12500000000000D+00 0.43750000000000D+00 -0.25000000000000D+00 + -0.62500000000000D-01 0.43750000000000D+00 -0.18750000000000D+00 + 0.12500000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + 0.18750000000000D+00 0.50000000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + 0.31250000000000D+00 0.50000000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + 0.43750000000000D+00 0.50000000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.43750000000000D+00 + -0.43750000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 0.50000000000000D+00 -0.43750000000000D+00 + -0.31250000000000D+00 0.50000000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 0.50000000000000D+00 -0.31250000000000D+00 + -0.18750000000000D+00 0.50000000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 0.50000000000000D+00 -0.18750000000000D+00 + -0.62500000000000D-01 0.50000000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 -0.43750000000000D+00 0.00000000000000D+00 + 0.62500000000000D-01 -0.43750000000000D+00 0.62500000000000D-01 + 0.12500000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + 0.18750000000000D+00 -0.43750000000000D+00 0.18750000000000D+00 + 0.25000000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + 0.31250000000000D+00 -0.43750000000000D+00 0.31250000000000D+00 + 0.37500000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + 0.43750000000000D+00 -0.43750000000000D+00 0.43750000000000D+00 + 0.50000000000000D+00 -0.43750000000000D+00 0.50000000000000D+00 + -0.43750000000000D+00 -0.43750000000000D+00 -0.43750000000000D+00 + -0.37500000000000D+00 -0.43750000000000D+00 -0.37500000000000D+00 + -0.31250000000000D+00 -0.43750000000000D+00 -0.31250000000000D+00 + -0.25000000000000D+00 -0.43750000000000D+00 -0.25000000000000D+00 + -0.18750000000000D+00 -0.43750000000000D+00 -0.18750000000000D+00 + -0.12500000000000D+00 -0.43750000000000D+00 -0.12500000000000D+00 + -0.62500000000000D-01 -0.43750000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.37500000000000D+00 0.62500000000000D-01 + 0.62500000000000D-01 -0.37500000000000D+00 0.12500000000000D+00 + 0.12500000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + 0.18750000000000D+00 -0.37500000000000D+00 0.25000000000000D+00 + 0.25000000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + 0.31250000000000D+00 -0.37500000000000D+00 0.37500000000000D+00 + 0.37500000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + 0.43750000000000D+00 -0.37500000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 -0.37500000000000D+00 -0.43750000000000D+00 + -0.43750000000000D+00 -0.37500000000000D+00 -0.37500000000000D+00 + -0.37500000000000D+00 -0.37500000000000D+00 -0.31250000000000D+00 + -0.31250000000000D+00 -0.37500000000000D+00 -0.25000000000000D+00 + -0.25000000000000D+00 -0.37500000000000D+00 -0.18750000000000D+00 + -0.18750000000000D+00 -0.37500000000000D+00 -0.12500000000000D+00 + -0.12500000000000D+00 -0.37500000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.31250000000000D+00 0.12500000000000D+00 + 0.62500000000000D-01 -0.31250000000000D+00 0.18750000000000D+00 + 0.12500000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + 0.18750000000000D+00 -0.31250000000000D+00 0.31250000000000D+00 + 0.25000000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + 0.31250000000000D+00 -0.31250000000000D+00 0.43750000000000D+00 + 0.37500000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + 0.43750000000000D+00 -0.31250000000000D+00 -0.43750000000000D+00 + 0.50000000000000D+00 -0.31250000000000D+00 -0.37500000000000D+00 + -0.43750000000000D+00 -0.31250000000000D+00 -0.31250000000000D+00 + -0.37500000000000D+00 -0.31250000000000D+00 -0.25000000000000D+00 + -0.31250000000000D+00 -0.31250000000000D+00 -0.18750000000000D+00 + -0.25000000000000D+00 -0.31250000000000D+00 -0.12500000000000D+00 + -0.18750000000000D+00 -0.31250000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.25000000000000D+00 0.18750000000000D+00 + 0.62500000000000D-01 -0.25000000000000D+00 0.25000000000000D+00 + 0.12500000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + 0.18750000000000D+00 -0.25000000000000D+00 0.37500000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + 0.31250000000000D+00 -0.25000000000000D+00 0.50000000000000D+00 + 0.37500000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + 0.43750000000000D+00 -0.25000000000000D+00 -0.37500000000000D+00 + 0.50000000000000D+00 -0.25000000000000D+00 -0.31250000000000D+00 + -0.43750000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + -0.37500000000000D+00 -0.25000000000000D+00 -0.18750000000000D+00 + -0.31250000000000D+00 -0.25000000000000D+00 -0.12500000000000D+00 + -0.25000000000000D+00 -0.25000000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.18750000000000D+00 0.25000000000000D+00 + 0.62500000000000D-01 -0.18750000000000D+00 0.31250000000000D+00 + 0.12500000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + 0.18750000000000D+00 -0.18750000000000D+00 0.43750000000000D+00 + 0.25000000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + 0.31250000000000D+00 -0.18750000000000D+00 -0.43750000000000D+00 + 0.37500000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + 0.43750000000000D+00 -0.18750000000000D+00 -0.31250000000000D+00 + 0.50000000000000D+00 -0.18750000000000D+00 -0.25000000000000D+00 + -0.43750000000000D+00 -0.18750000000000D+00 -0.18750000000000D+00 + -0.37500000000000D+00 -0.18750000000000D+00 -0.12500000000000D+00 + -0.31250000000000D+00 -0.18750000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.12500000000000D+00 0.31250000000000D+00 + 0.62500000000000D-01 -0.12500000000000D+00 0.37500000000000D+00 + 0.12500000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + 0.18750000000000D+00 -0.12500000000000D+00 0.50000000000000D+00 + 0.25000000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + 0.31250000000000D+00 -0.12500000000000D+00 -0.37500000000000D+00 + 0.37500000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + 0.43750000000000D+00 -0.12500000000000D+00 -0.25000000000000D+00 + 0.50000000000000D+00 -0.12500000000000D+00 -0.18750000000000D+00 + -0.43750000000000D+00 -0.12500000000000D+00 -0.12500000000000D+00 + -0.37500000000000D+00 -0.12500000000000D+00 -0.62500000000000D-01 + 0.00000000000000D+00 -0.62500000000000D-01 0.37500000000000D+00 + 0.62500000000000D-01 -0.62500000000000D-01 0.43750000000000D+00 + 0.12500000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + 0.18750000000000D+00 -0.62500000000000D-01 -0.43750000000000D+00 + 0.25000000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + 0.31250000000000D+00 -0.62500000000000D-01 -0.31250000000000D+00 + 0.37500000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + 0.43750000000000D+00 -0.62500000000000D-01 -0.18750000000000D+00 + 0.50000000000000D+00 -0.62500000000000D-01 -0.12500000000000D+00 + -0.43750000000000D+00 -0.62500000000000D-01 -0.62500000000000D-01 + 0.50000000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + -0.43750000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + -0.31250000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + -0.18750000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 0.43750000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.62500000000000D-01 + 0.00000000000000D+00 -0.43750000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.18750000000000D+00 + 0.00000000000000D+00 -0.31250000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.31250000000000D+00 + 0.00000000000000D+00 -0.18750000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 0.43750000000000D+00 + 0.00000000000000D+00 -0.62500000000000D-01 0.50000000000000D+00 + 0.37500000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + 0.43750000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + -0.43750000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + -0.31250000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 0.43750000000000D+00 + -0.18750000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 -0.43750000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 -0.37500000000000D+00 + 0.00000000000000D+00 0.37500000000000D+00 0.62500000000000D-01 + 0.00000000000000D+00 0.43750000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.18750000000000D+00 + 0.00000000000000D+00 -0.43750000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.31250000000000D+00 + 0.00000000000000D+00 -0.31250000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 0.43750000000000D+00 + 0.00000000000000D+00 -0.18750000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 -0.43750000000000D+00 + 0.00000000000000D+00 -0.62500000000000D-01 -0.37500000000000D+00 + 0.25000000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + 0.31250000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + 0.37500000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + 0.43750000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + -0.43750000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 0.43750000000000D+00 + -0.31250000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 -0.43750000000000D+00 + -0.18750000000000D+00 0.00000000000000D+00 -0.37500000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 -0.31250000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 0.25000000000000D+00 0.62500000000000D-01 + 0.00000000000000D+00 0.31250000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 0.37500000000000D+00 0.18750000000000D+00 + 0.00000000000000D+00 0.43750000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.31250000000000D+00 + 0.00000000000000D+00 -0.43750000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 0.43750000000000D+00 + 0.00000000000000D+00 -0.31250000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 -0.43750000000000D+00 + 0.00000000000000D+00 -0.18750000000000D+00 -0.37500000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 -0.31250000000000D+00 + 0.00000000000000D+00 -0.62500000000000D-01 -0.25000000000000D+00 + 0.12500000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + 0.18750000000000D+00 0.00000000000000D+00 0.12500000000000D+00 + 0.25000000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + 0.31250000000000D+00 0.00000000000000D+00 0.25000000000000D+00 + 0.37500000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + 0.43750000000000D+00 0.00000000000000D+00 0.37500000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.43750000000000D+00 + -0.43750000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + -0.37500000000000D+00 0.00000000000000D+00 -0.43750000000000D+00 + -0.31250000000000D+00 0.00000000000000D+00 -0.37500000000000D+00 + -0.25000000000000D+00 0.00000000000000D+00 -0.31250000000000D+00 + -0.18750000000000D+00 0.00000000000000D+00 -0.25000000000000D+00 + -0.12500000000000D+00 0.00000000000000D+00 -0.18750000000000D+00 + -0.62500000000000D-01 0.00000000000000D+00 -0.12500000000000D+00 + 0.00000000000000D+00 0.12500000000000D+00 0.62500000000000D-01 + 0.00000000000000D+00 0.18750000000000D+00 0.12500000000000D+00 + 0.00000000000000D+00 0.25000000000000D+00 0.18750000000000D+00 + 0.00000000000000D+00 0.31250000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.37500000000000D+00 0.31250000000000D+00 + 0.00000000000000D+00 0.43750000000000D+00 0.37500000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 0.43750000000000D+00 + 0.00000000000000D+00 -0.43750000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 -0.37500000000000D+00 -0.43750000000000D+00 + 0.00000000000000D+00 -0.31250000000000D+00 -0.37500000000000D+00 + 0.00000000000000D+00 -0.25000000000000D+00 -0.31250000000000D+00 + 0.00000000000000D+00 -0.18750000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 -0.12500000000000D+00 -0.18750000000000D+00 + 0.00000000000000D+00 -0.62500000000000D-01 -0.12500000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.62500000000000D-01 + 0.00000000000000D+00 0.00000000000000D+00 0.18750000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.31250000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.43750000000000D+00 + kptnrm 0.10000000000000D+01 + ngfft 10 10 10 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 + rprim 0.00000000000000D+00 0.53050000000000D+01 0.53050000000000D+01 + 0.53050000000000D+01 0.00000000000000D+00 0.53050000000000D+01 + 0.53050000000000D+01 0.53050000000000D+01 0.00000000000000D+00 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + 0 -1 1 0 -1 0 1 -1 0 + -1 0 0 -1 0 1 -1 1 0 + 0 1 -1 1 0 -1 0 0 -1 + -1 0 0 -1 1 0 -1 0 1 + 0 -1 1 1 -1 0 0 -1 0 + 1 0 0 0 0 1 0 1 0 + 0 1 -1 0 0 -1 1 0 -1 + -1 0 1 -1 1 0 -1 0 0 + 0 -1 0 1 -1 0 0 -1 1 + 1 0 -1 0 0 -1 0 1 -1 + 0 1 0 0 0 1 1 0 0 + 1 0 -1 0 1 -1 0 0 -1 + 0 -1 0 0 -1 1 1 -1 0 + -1 0 1 -1 0 0 -1 1 0 + 0 1 0 1 0 0 0 0 1 + 0 0 -1 0 1 -1 1 0 -1 + 1 -1 0 0 -1 1 0 -1 0 + 0 0 1 1 0 0 0 1 0 + -1 1 0 -1 0 0 -1 0 1 + 0 0 1 0 1 0 1 0 0 + 1 -1 0 0 -1 0 0 -1 1 + 0 0 -1 1 0 -1 0 1 -1 + -1 1 0 -1 0 1 -1 0 0 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 2 + wtk 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 0.97656250000000D-03 0.97656250000000D-03 + 0.97656250000000D-03 + xred 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + znucl 0.13000000000000D+02 0.33000000000000D+02 + zion 0.30000000000000D+01 0.50000000000000D+01 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 3 lmnmax= 3 + Atom type= 1 pspso= 0 nekb= 2 + iln lpsang iproj ekb(:) + 1 0 1 1.7687444E+00 0.0000000E+00 + 2 1 1 0.0000000E+00 9.0055415E-01 + Atom type= 2 pspso= 0 nekb= 1 + iln lpsang iproj ekb(:) + 1 0 1 8.3875106E-01 + + **** Database of total energy derivatives **** + Number of data blocks= 1 + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.59731125083766D+01 0.00000000000000D+00 + 2 1 1 1 0.29865562541883D+01 0.00000000000000D+00 + 3 1 1 1 0.29865562541883D+01 0.00000000000000D+00 + 1 2 1 1 -0.59730206623909D+01 0.73319348786105D-18 + 2 2 1 1 -0.29865103311954D+01 -0.22662441376834D-17 + 3 2 1 1 -0.29865103311954D+01 -0.32760426504849D-17 + 1 4 1 1 -0.56592138776246D+01 0.00000000000000D+00 + 2 4 1 1 -0.74892020823173D-16 0.00000000000000D+00 + 3 4 1 1 0.43857625310626D-18 0.00000000000000D+00 + 1 1 2 1 0.29865562541883D+01 0.00000000000000D+00 + 2 1 2 1 0.59731125083766D+01 0.00000000000000D+00 + 3 1 2 1 0.29865562541883D+01 0.00000000000000D+00 + 1 2 2 1 -0.29865103311954D+01 -0.22662441376834D-17 + 2 2 2 1 -0.59730206623909D+01 0.28893229871495D-17 + 3 2 2 1 -0.29865103311954D+01 -0.21964918338888D-17 + 1 4 2 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 2 1 -0.56592138776246D+01 0.00000000000000D+00 + 3 4 2 1 0.10779557939147D-16 0.00000000000000D+00 + 1 1 3 1 0.29865562541883D+01 0.00000000000000D+00 + 2 1 3 1 0.29865562541883D+01 0.00000000000000D+00 + 3 1 3 1 0.59731125083766D+01 0.00000000000000D+00 + 1 2 3 1 -0.29865103311954D+01 -0.32760426504849D-17 + 2 2 3 1 -0.29865103311954D+01 -0.21964918338888D-17 + 3 2 3 1 -0.59730206623909D+01 -0.72872500684629D-17 + 1 4 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 1 0.57689397526253D-16 0.00000000000000D+00 + 3 4 3 1 -0.56592138776246D+01 0.00000000000000D+00 + 1 1 1 2 -0.59730206623909D+01 -0.73319348786105D-18 + 2 1 1 2 -0.29865103311954D+01 0.22662441376834D-17 + 3 1 1 2 -0.29865103311954D+01 0.32760426504849D-17 + 1 2 1 2 0.59734797772337D+01 0.00000000000000D+00 + 2 2 1 2 0.29867398886168D+01 0.00000000000000D+00 + 3 2 1 2 0.29867398886168D+01 0.00000000000000D+00 + 1 4 1 2 -0.43008669966054D+02 0.00000000000000D+00 + 2 4 1 2 -0.21548409617587D-15 0.00000000000000D+00 + 3 4 1 2 -0.43252184488872D-16 0.00000000000000D+00 + 1 1 2 2 -0.29865103311954D+01 0.22662441376834D-17 + 2 1 2 2 -0.59730206623909D+01 -0.28893229871495D-17 + 3 1 2 2 -0.29865103311954D+01 0.21964918338888D-17 + 1 2 2 2 0.29867398886168D+01 0.00000000000000D+00 + 2 2 2 2 0.59734797772337D+01 0.00000000000000D+00 + 3 2 2 2 0.29867398886168D+01 0.00000000000000D+00 + 1 4 2 2 0.29605947323338D-15 0.00000000000000D+00 + 2 4 2 2 -0.43008669966054D+02 0.00000000000000D+00 + 3 4 2 2 0.12258966742385D-16 0.00000000000000D+00 + 1 1 3 2 -0.29865103311954D+01 0.32760426504849D-17 + 2 1 3 2 -0.29865103311954D+01 0.21964918338888D-17 + 3 1 3 2 -0.59730206623909D+01 0.72872500684629D-17 + 1 2 3 2 0.29867398886168D+01 0.00000000000000D+00 + 2 2 3 2 0.29867398886168D+01 0.00000000000000D+00 + 3 2 3 2 0.59734797772337D+01 0.00000000000000D+00 + 1 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 2 0.19096616269110D-15 0.00000000000000D+00 + 3 4 3 2 -0.43008669966054D+02 0.00000000000000D+00 + 1 1 1 4 -0.56592138776246D+01 0.00000000000000D+00 + 2 1 1 4 0.37007434154172D-16 0.00000000000000D+00 + 3 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 4 -0.43008668488814D+02 0.00000000000000D+00 + 2 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 4 -0.19682333430226D+03 0.00000000000000D+00 + 2 4 1 4 0.65607778100753D+02 0.00000000000000D+00 + 3 4 1 4 0.65607778100753D+02 0.00000000000000D+00 + 1 1 2 4 0.35691705386237D-16 0.00000000000000D+00 + 2 1 2 4 -0.56592138776246D+01 0.00000000000000D+00 + 3 1 2 4 -0.16325470782090D-16 0.00000000000000D+00 + 1 2 2 4 -0.17816090346938D-15 0.00000000000000D+00 + 2 2 2 4 -0.43008668488814D+02 0.00000000000000D+00 + 3 2 2 4 0.19096616269110D-15 0.00000000000000D+00 + 1 4 2 4 0.65607778100753D+02 0.00000000000000D+00 + 2 4 2 4 -0.19682333430226D+03 0.00000000000000D+00 + 3 4 2 4 0.65607778100753D+02 0.00000000000000D+00 + 1 1 3 4 0.11218134192253D-16 0.00000000000000D+00 + 2 1 3 4 0.21120539625188D-16 0.00000000000000D+00 + 3 1 3 4 -0.56592138776246D+01 0.00000000000000D+00 + 1 2 3 4 -0.13015753636852D-15 0.00000000000000D+00 + 2 2 3 4 0.25873628052688D-15 0.00000000000000D+00 + 3 2 3 4 -0.43008668488814D+02 0.00000000000000D+00 + 1 4 3 4 0.65607778100753D+02 0.00000000000000D+00 + 2 4 3 4 0.65607778100753D+02 0.00000000000000D+00 + 3 4 3 4 -0.19682333430226D+03 0.00000000000000D+00 + + List of bloks and their characteristics + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 diff --git a/abipy/data/refs/alas_nl_dfpt/AlAs_nl_dte_anaddb.nc b/abipy/data/refs/alas_nl_dfpt/AlAs_nl_dte_anaddb.nc index fc602d3ae..feea7c295 100644 Binary files a/abipy/data/refs/alas_nl_dfpt/AlAs_nl_dte_anaddb.nc and b/abipy/data/refs/alas_nl_dfpt/AlAs_nl_dte_anaddb.nc differ diff --git a/abipy/data/refs/diamond_fullbz_sigeph/_runflow.py b/abipy/data/refs/diamond_fullbz_sigeph/_runflow.py new file mode 100755 index 000000000..c2450e7aa --- /dev/null +++ b/abipy/data/refs/diamond_fullbz_sigeph/_runflow.py @@ -0,0 +1,136 @@ +#!/usr/bin/env python +"""Electron-phonon calculations.""" +from __future__ import print_function, division, unicode_literals, absolute_import + +import os +import sys +import numpy as np +import abipy.data as abidata +import abipy.abilab as abilab +import abipy.flowtk as flowtk + + +def build_flow(options): + """ + C in diamond structure. Very rough q-point mesh, low ecut, completely unconverged. + The flow compute the ground state density a WFK file on a k-mesh used for DFPT phonons + a WFK file on a k-mesh with empty states used for the self-energy. + Then all of the independent perturbations for the irreducible qpoints in a 4x4x4 grid are obtained. + Note that the q-point grid must be a sub-grid of the k-point grid (here 8x8x8) + Finally, we enter the EPH driver to compute the Fan-Migdal self-energy. + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + workdir = options.workdir + if not options.workdir: + workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + + # Define structure explicitly. + structure = abilab.Structure.from_abivars( + acell=3*[6.70346805], + rprim=[0.0, 0.5, 0.5, + 0.5, 0.0, 0.5, + 0.5, 0.5, 0.0], + typat=[1, 1], + xred=[0.0, 0.0, 0.0, 0.25, 0.25, 0.25], + ntypat=1, + znucl=6, + ) + + gs_inp = abilab.AbinitInput(structure, pseudos=abidata.pseudos("C.oncvpsp")) + + gs_inp.set_vars( + istwfk="*1", + ecut=12.0, + nband=4, + tolvrs=1e-10, + ) + + # The kpoint grid is minimalistic to keep the calculation manageable. + gs_inp.set_kmesh( + ngkpt=[4, 4, 4], + shiftk=[0.0, 0.0, 0.0], + #kptopt=3, + ) + + # NSCF run with k-path (just for plotting purpose) + nscf_kpath_inp = gs_inp.new_with_vars( + nband=8, + tolwfr=1e-16, + ) + #nscf_kpath_inp.pop_vars(["tolvrs"]) + nscf_kpath_inp.set_kpath(ndivsm=10) + + # NSCF run with k-mesh to get WFK with empty states. + nscf_empty_kmesh_inp = gs_inp.new_with_vars( + nband=54, + nbdbuf=4, + tolwfr=1e-16, + iscf=-2, + ) + + flow = flowtk.Flow(workdir, manager=options.manager, remove=options.remove) + + # GS run to get the WFK + work0 = flowtk.BandStructureWork(gs_inp, nscf_kpath_inp, dos_inputs=[nscf_empty_kmesh_inp]) + flow.register_work(work0) + + # Phonon work with 4x4x4 q-mesh + ddb_ngqpt = [2, 2, 2] + ph_work = flowtk.PhononWork.from_scf_task(work0[0], ddb_ngqpt, is_ngqpt=True) + flow.register_work(ph_work) + + # Build input file for E-PH run. See v8/Input/t44.in + eph_inp = gs_inp.new_with_vars( + optdriver=7, # EPH driver. + eph_task=4, # For electronic self-energy due to phonon + nband=54, + ddb_ngqpt=ddb_ngqpt, # q-mesh used to produce the DDB file (must be consistent with DDB data) + symsigma=0, + gw_qprange=2, + #eph_intmeth=2, # Tetra method + #gw_qprange -2 + ) + + # Set q-path for phonons and phonon linewidths. + eph_inp.set_qpath(10) + + # Set q-mesh for phonons DOS. + eph_inp.set_phdos_qmesh(nqsmall=16, method="tetra") + + # EPH part requires the GS WFK, the DDB file with all perturbations + # and the database of DFPT potentials (already merged by PhononWork) + eph_work = flow.register_work(flowtk.Work()) + deps = {work0[2]: "WFK", ph_work: ["DDB", "DVDB"]} + + eph_work.register_eph_task(eph_inp, deps=deps) + + # Activate Fourier interpolation of DFPT potentials. + eph_work.register_eph_task(eph_inp.new_with_vars(eph_ngqpt_fine=[4, 4, 4]), deps=deps) + #eph_work.register_eph_task(eph_inp.new_with_vars(eph_ngqpt_fine=[12, 12, 12]), deps=deps) + + flow.allocate() + + return flow + + +@flowtk.flow_main +def main(options): + return build_flow(options) + + +if __name__ == "__main__": + retcode = main() + if retcode != 0: sys.exit(retcode) + + rename_table = [ + # src, dest + #("_runflow/w0/t1/outdata/out_GSR.nc", "diamond_kpath_GSR.nc"), + #("_runflow/w1/outdata/out_DDB", "diamond_444q_DDB"), + ("_runflow/w2/t1/outdata/out_SIGEPH.nc", "diamond_444q_full_SIGEPH.nc"), + ] + + import shutil + for old, new in rename_table: + shutil.copyfile(old, new) + #shutil.rmtree("_runflow") + sys.exit(0) diff --git a/abipy/data/refs/diamond_fullbz_sigeph/diamond_444q_full_SIGEPH.nc b/abipy/data/refs/diamond_fullbz_sigeph/diamond_444q_full_SIGEPH.nc new file mode 100644 index 000000000..ff2081f5e Binary files /dev/null and b/abipy/data/refs/diamond_fullbz_sigeph/diamond_444q_full_SIGEPH.nc differ diff --git a/abipy/data/refs/gaas_optic/gaas_444_dir1_DDK.nc b/abipy/data/refs/gaas_optic/gaas_444_dir1_DDK.nc deleted file mode 100644 index 16fcffe6d..000000000 Binary files a/abipy/data/refs/gaas_optic/gaas_444_dir1_DDK.nc and /dev/null differ diff --git a/abipy/data/refs/gaas_optic/gaas_444_dir2_DDK.nc b/abipy/data/refs/gaas_optic/gaas_444_dir2_DDK.nc deleted file mode 100644 index 51df4fb02..000000000 Binary files a/abipy/data/refs/gaas_optic/gaas_444_dir2_DDK.nc and /dev/null differ diff --git a/abipy/data/refs/gaas_optic/gaas_444_dir3_DDK.nc b/abipy/data/refs/gaas_optic/gaas_444_dir3_DDK.nc deleted file mode 100644 index e6387924d..000000000 Binary files a/abipy/data/refs/gaas_optic/gaas_444_dir3_DDK.nc and /dev/null differ diff --git a/abipy/data/refs/mgo_v8t57/README.md b/abipy/data/refs/mgo_v8t57/README.md new file mode 100644 index 000000000..462eea5f3 --- /dev/null +++ b/abipy/data/refs/mgo_v8t57/README.md @@ -0,0 +1,2 @@ +This directory contains the DDB file generated by https://docs.abinit.org/tests/v8/Input/t57.in +This DDB file is used to start a ZPR calculation with AbiPy to reproduce the results of the ABINIT test. diff --git a/abipy/data/refs/mgo_v8t57/mgo_zpr_t57o_DS3_DDB b/abipy/data/refs/mgo_v8t57/mgo_zpr_t57o_DS3_DDB new file mode 100644 index 000000000..c96d2a350 --- /dev/null +++ b/abipy/data/refs/mgo_v8t57/mgo_zpr_t57o_DS3_DDB @@ -0,0 +1,283 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + Note : temporary (transfer) database + + usepaw 0 + natom 2 + nkpt 16 + nsppol 1 + nsym 48 + ntypat 2 + occopt 1 + nband 8 + acell 0.91360000000000D+01 0.91360000000000D+01 0.91360000000000D+01 + amu 0.40078000000000D+02 0.15999400000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.30000000000000D+02 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc 11 + kpt 0.00000000000000D+00 0.00000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 0.25000000000000D+00 0.50000000000000D+00 + 0.00000000000000D+00 0.50000000000000D+00 -0.25000000000000D+00 + 0.25000000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 -0.25000000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 -0.25000000000000D+00 + 0.00000000000000D+00 0.25000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.25000000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + 0.25000000000000D+00 -0.25000000000000D+00 -0.25000000000000D+00 + 0.50000000000000D+00 0.25000000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 -0.25000000000000D+00 + -0.25000000000000D+00 0.25000000000000D+00 -0.25000000000000D+00 + 0.25000000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 0.25000000000000D+00 0.00000000000000D+00 + kptnrm 0.10000000000000D+01 + ngfft 32 32 32 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.20000000000000D+01 + rprim 0.00000000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 0.00000000000000D+00 0.50000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.00000000000000D+00 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + -1 0 0 0 -1 0 0 0 -1 + 0 -1 1 0 -1 0 1 -1 0 + 0 1 -1 0 1 0 -1 1 0 + -1 0 0 -1 0 1 -1 1 0 + 1 0 0 1 0 -1 1 -1 0 + 0 1 -1 1 0 -1 0 0 -1 + 0 -1 1 -1 0 1 0 0 1 + -1 0 0 -1 1 0 -1 0 1 + 1 0 0 1 -1 0 1 0 -1 + 0 -1 1 1 -1 0 0 -1 0 + 0 1 -1 -1 1 0 0 1 0 + 1 0 0 0 0 1 0 1 0 + -1 0 0 0 0 -1 0 -1 0 + 0 1 -1 0 0 -1 1 0 -1 + 0 -1 1 0 0 1 -1 0 1 + -1 0 1 -1 1 0 -1 0 0 + 1 0 -1 1 -1 0 1 0 0 + 0 -1 0 1 -1 0 0 -1 1 + 0 1 0 -1 1 0 0 1 -1 + 1 0 -1 0 0 -1 0 1 -1 + -1 0 1 0 0 1 0 -1 1 + 0 1 0 0 0 1 1 0 0 + 0 -1 0 0 0 -1 -1 0 0 + 1 0 -1 0 1 -1 0 0 -1 + -1 0 1 0 -1 1 0 0 1 + 0 -1 0 0 -1 1 1 -1 0 + 0 1 0 0 1 -1 -1 1 0 + -1 0 1 -1 0 0 -1 1 0 + 1 0 -1 1 0 0 1 -1 0 + 0 1 0 1 0 0 0 0 1 + 0 -1 0 -1 0 0 0 0 -1 + 0 0 -1 0 1 -1 1 0 -1 + 0 0 1 0 -1 1 -1 0 1 + 1 -1 0 0 -1 1 0 -1 0 + -1 1 0 0 1 -1 0 1 0 + 0 0 1 1 0 0 0 1 0 + 0 0 -1 -1 0 0 0 -1 0 + -1 1 0 -1 0 0 -1 0 1 + 1 -1 0 1 0 0 1 0 -1 + 0 0 1 0 1 0 1 0 0 + 0 0 -1 0 -1 0 -1 0 0 + 1 -1 0 0 -1 0 0 -1 1 + -1 1 0 0 1 0 0 1 -1 + 0 0 -1 1 0 -1 0 1 -1 + 0 0 1 -1 0 1 0 -1 1 + -1 1 0 -1 0 1 -1 0 0 + 1 -1 0 1 0 -1 1 0 0 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 2 + wtk 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 0.62500000000000D-01 0.62500000000000D-01 + 0.62500000000000D-01 + xred 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.50000000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + znucl 0.20000000000000D+02 0.80000000000000D+01 + zion 0.10000000000000D+02 0.60000000000000D+01 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 6 lmnmax= 6 + Atom type= 1 pspso= 0 nekb= 6 + iln lpsang iproj ekb(:) + 1 0 1 1.0063789E+01 0.0000000E+00 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 2 0 2 0.0000000E+00 9.7239097E-01 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 3 1 1 0.0000000E+00 0.0000000E+00 3.0498783E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 4 1 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 4.7179907E-01 + 0.0000000E+00 0.0000000E+00 + 5 2 1 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -3.4066715E+00 0.0000000E+00 + 6 2 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -3.4066715E+00 0.0000000E+00 + Atom type= 2 pspso= 0 nekb= 5 + iln lpsang iproj ekb(:) + 1 0 1 5.2572115E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 + 2 0 2 0.0000000E+00 7.0424089E-01 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 + 3 1 1 0.0000000E+00 0.0000000E+00 -5.1354431E+00 0.0000000E+00 + 0.0000000E+00 + 4 1 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 -1.4517815E+00 + 0.0000000E+00 + 5 2 1 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -4.3714856E+00 + + **** Database of total energy derivatives **** + Number of data blocks= 1 + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.15171802159753D+01 0.00000000000000D+00 + 1 1 2 1 0.75859010798752D+00 0.00000000000000D+00 + 1 1 3 1 0.75859010798843D+00 0.00000000000000D+00 + 1 1 1 2 -0.15183825670035D+01 0.00000000000000D+00 + 1 1 2 2 -0.75919128350179D+00 0.00000000000000D+00 + 1 1 3 2 -0.75919128350180D+00 0.00000000000000D+00 + 1 1 1 4 -0.48014297927298D+02 0.00000000000000D+00 + 1 1 2 4 0.94714306542950D-16 0.00000000000000D+00 + 1 1 3 4 -0.21132342656732D-16 0.00000000000000D+00 + 2 1 1 1 0.75859010798752D+00 0.00000000000000D+00 + 2 1 2 1 0.15171802159753D+01 0.00000000000000D+00 + 2 1 3 1 0.75859010798797D+00 0.00000000000000D+00 + 2 1 1 2 -0.75919128350180D+00 0.00000000000000D+00 + 2 1 2 2 -0.15183825670035D+01 0.00000000000000D+00 + 2 1 3 2 -0.75919128350181D+00 0.00000000000000D+00 + 2 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 2 1 2 4 -0.48014297927298D+02 0.00000000000000D+00 + 2 1 3 4 -0.63431473976717D-16 0.00000000000000D+00 + 3 1 1 1 0.75859010798808D+00 0.00000000000000D+00 + 3 1 2 1 0.75859010798831D+00 0.00000000000000D+00 + 3 1 3 1 0.15171802159753D+01 0.00000000000000D+00 + 3 1 1 2 -0.75919128350180D+00 0.00000000000000D+00 + 3 1 2 2 -0.75919128350180D+00 0.00000000000000D+00 + 3 1 3 2 -0.15183825670035D+01 0.00000000000000D+00 + 3 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 3 1 2 4 -0.13787924670719D-15 0.00000000000000D+00 + 3 1 3 4 -0.48014297927298D+02 0.00000000000000D+00 + 1 2 1 1 -0.15183751120229D+01 0.00000000000000D+00 + 1 2 2 1 -0.75918755601148D+00 0.00000000000000D+00 + 1 2 3 1 -0.75918755601147D+00 0.00000000000000D+00 + 1 2 1 2 0.15913669955403D+01 0.00000000000000D+00 + 1 2 2 2 0.79568349776946D+00 0.00000000000000D+00 + 1 2 3 2 0.79568349776946D+00 0.00000000000000D+00 + 1 2 1 4 -0.50359156158595D+02 0.00000000000000D+00 + 1 2 2 4 0.26137177997742D-16 0.00000000000000D+00 + 1 2 3 4 0.50421047906891D-16 0.00000000000000D+00 + 2 2 1 1 -0.75918755601149D+00 0.00000000000000D+00 + 2 2 2 1 -0.15183751120229D+01 0.00000000000000D+00 + 2 2 3 1 -0.75918755601149D+00 0.00000000000000D+00 + 2 2 1 2 0.79568349776991D+00 0.00000000000000D+00 + 2 2 2 2 0.15913669955398D+01 0.00000000000000D+00 + 2 2 3 2 0.79568349776878D+00 0.00000000000000D+00 + 2 2 1 4 0.14802973661669D-15 0.00000000000000D+00 + 2 2 2 4 -0.50359156158595D+02 0.00000000000000D+00 + 2 2 3 4 -0.65072459139864D-16 0.00000000000000D+00 + 3 2 1 1 -0.75918755601148D+00 0.00000000000000D+00 + 3 2 2 1 -0.75918755601148D+00 0.00000000000000D+00 + 3 2 3 1 -0.15183751120229D+01 0.00000000000000D+00 + 3 2 1 2 0.79568349776923D+00 0.00000000000000D+00 + 3 2 2 2 0.79568349776878D+00 0.00000000000000D+00 + 3 2 3 2 0.15913669955389D+01 0.00000000000000D+00 + 3 2 1 4 -0.14802973661669D-15 0.00000000000000D+00 + 3 2 2 4 -0.13654396985192D-15 0.00000000000000D+00 + 3 2 3 4 -0.50359156158595D+02 0.00000000000000D+00 + 1 4 1 1 -0.48014312602607D+02 0.00000000000000D+00 + 1 4 2 1 0.00000000000000D+00 0.00000000000000D+00 + 1 4 3 1 0.14802973661669D-15 0.00000000000000D+00 + 1 4 1 2 -0.50359068592297D+02 0.00000000000000D+00 + 1 4 2 2 -0.14802973661669D-15 0.00000000000000D+00 + 1 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 4 -0.50518878291509D+02 0.00000000000000D+00 + 1 4 2 4 0.16839626097170D+02 0.00000000000000D+00 + 1 4 3 4 0.16839626097170D+02 0.00000000000000D+00 + 2 4 1 1 -0.11016298753753D-16 0.00000000000000D+00 + 2 4 2 1 -0.48014312602607D+02 0.00000000000000D+00 + 2 4 3 1 -0.13787924670719D-15 0.00000000000000D+00 + 2 4 1 2 -0.63990515721905D-17 0.00000000000000D+00 + 2 4 2 2 -0.50359068592297D+02 0.00000000000000D+00 + 2 4 3 2 0.11485766764768D-16 0.00000000000000D+00 + 2 4 1 4 0.16839626097170D+02 0.00000000000000D+00 + 2 4 2 4 -0.50518878291509D+02 0.00000000000000D+00 + 2 4 3 4 0.16839626097170D+02 0.00000000000000D+00 + 3 4 1 1 -0.73581963886218D-16 0.00000000000000D+00 + 3 4 2 1 -0.73581963886218D-16 0.00000000000000D+00 + 3 4 3 1 -0.48014312602607D+02 0.00000000000000D+00 + 3 4 1 2 0.71471510712055D-16 0.00000000000000D+00 + 3 4 2 2 -0.76558225904633D-16 0.00000000000000D+00 + 3 4 3 2 -0.50359068592297D+02 0.00000000000000D+00 + 3 4 1 4 0.16839626097170D+02 0.00000000000000D+00 + 3 4 2 4 0.16839626097170D+02 0.00000000000000D+00 + 3 4 3 4 -0.50518878291509D+02 0.00000000000000D+00 diff --git a/abipy/data/refs/mp-7000_DDB.bz2 b/abipy/data/refs/mp-7000_DDB.bz2 new file mode 100644 index 000000000..db7629356 Binary files /dev/null and b/abipy/data/refs/mp-7000_DDB.bz2 differ diff --git a/abipy/data/refs/si_qha/mp-149_GRUNS.nc b/abipy/data/refs/si_qha/mp-149_GRUNS.nc new file mode 100644 index 000000000..95d0e1b61 Binary files /dev/null and b/abipy/data/refs/si_qha/mp-149_GRUNS.nc differ diff --git a/abipy/data/refs/si_sound_vel/Si_DDB b/abipy/data/refs/si_sound_vel/Si_DDB new file mode 100644 index 000000000..4de4a74be --- /dev/null +++ b/abipy/data/refs/si_sound_vel/Si_DDB @@ -0,0 +1,2154 @@ + + **** DERIVATIVE DATABASE **** ++DDB, Version number 100401 + + DDB file merged by MergeDdbAbinitTask on Thu Dec 29 09:59:17 2016 + + usepaw 0 + natom 2 + nkpt 365 + nsppol 1 + nsym 48 + ntypat 1 + occopt 1 + nband 12 + acell 0.10000000000000D+01 0.10000000000000D+01 0.10000000000000D+01 + amu 0.28085500000000D+02 + dilatmx 0.10000000000000D+01 + ecut 0.19000000000000D+02 + ecutsm 0.00000000000000D+00 + intxc 0 + iscf 7 + ixc -116133 + kpt 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.11111111111111D+00 0.00000000000000D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.00000000000000D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.00000000000000D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.00000000000000D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.00000000000000D+00 + -0.44444444444444D+00 0.11111111111111D+00 0.00000000000000D+00 + -0.33333333333333D+00 0.11111111111111D+00 0.00000000000000D+00 + -0.22222222222222D+00 0.11111111111111D+00 0.00000000000000D+00 + -0.11111111111111D+00 0.11111111111111D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.22222222222222D+00 0.00000000000000D+00 + 0.11111111111111D+00 0.22222222222222D+00 0.00000000000000D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.00000000000000D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.00000000000000D+00 + 0.44444444444444D+00 0.22222222222222D+00 0.00000000000000D+00 + -0.44444444444444D+00 0.22222222222222D+00 0.00000000000000D+00 + -0.33333333333333D+00 0.22222222222222D+00 0.00000000000000D+00 + -0.22222222222222D+00 0.22222222222222D+00 0.00000000000000D+00 + -0.11111111111111D+00 0.22222222222222D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.33333333333333D+00 0.00000000000000D+00 + 0.11111111111111D+00 0.33333333333333D+00 0.00000000000000D+00 + 0.22222222222222D+00 0.33333333333333D+00 0.00000000000000D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.00000000000000D+00 + 0.44444444444444D+00 0.33333333333333D+00 0.00000000000000D+00 + -0.44444444444444D+00 0.33333333333333D+00 0.00000000000000D+00 + -0.33333333333333D+00 0.33333333333333D+00 0.00000000000000D+00 + -0.22222222222222D+00 0.33333333333333D+00 0.00000000000000D+00 + -0.11111111111111D+00 0.33333333333333D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.44444444444444D+00 0.00000000000000D+00 + 0.11111111111111D+00 0.44444444444444D+00 0.00000000000000D+00 + 0.22222222222222D+00 0.44444444444444D+00 0.00000000000000D+00 + 0.33333333333333D+00 0.44444444444444D+00 0.00000000000000D+00 + 0.44444444444444D+00 0.44444444444444D+00 0.00000000000000D+00 + -0.44444444444444D+00 0.44444444444444D+00 0.00000000000000D+00 + -0.33333333333333D+00 0.44444444444444D+00 0.00000000000000D+00 + -0.22222222222222D+00 0.44444444444444D+00 0.00000000000000D+00 + -0.11111111111111D+00 0.44444444444444D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.11111111111111D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.11111111111111D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.11111111111111D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.11111111111111D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.11111111111111D+00 + -0.44444444444444D+00 0.00000000000000D+00 0.11111111111111D+00 + -0.33333333333333D+00 0.00000000000000D+00 0.11111111111111D+00 + -0.22222222222222D+00 0.00000000000000D+00 0.11111111111111D+00 + -0.11111111111111D+00 0.00000000000000D+00 0.11111111111111D+00 + 0.00000000000000D+00 0.11111111111111D+00 0.11111111111111D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.11111111111111D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.11111111111111D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.11111111111111D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.11111111111111D+00 + -0.44444444444444D+00 0.11111111111111D+00 0.11111111111111D+00 + -0.33333333333333D+00 0.11111111111111D+00 0.11111111111111D+00 + -0.22222222222222D+00 0.11111111111111D+00 0.11111111111111D+00 + -0.11111111111111D+00 0.11111111111111D+00 0.11111111111111D+00 + 0.00000000000000D+00 0.22222222222222D+00 0.11111111111111D+00 + 0.11111111111111D+00 0.22222222222222D+00 0.11111111111111D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.11111111111111D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.11111111111111D+00 + 0.44444444444444D+00 0.22222222222222D+00 0.11111111111111D+00 + -0.44444444444444D+00 0.22222222222222D+00 0.11111111111111D+00 + -0.33333333333333D+00 0.22222222222222D+00 0.11111111111111D+00 + -0.22222222222222D+00 0.22222222222222D+00 0.11111111111111D+00 + -0.11111111111111D+00 0.22222222222222D+00 0.11111111111111D+00 + 0.00000000000000D+00 0.33333333333333D+00 0.11111111111111D+00 + 0.11111111111111D+00 0.33333333333333D+00 0.11111111111111D+00 + 0.22222222222222D+00 0.33333333333333D+00 0.11111111111111D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.11111111111111D+00 + 0.44444444444444D+00 0.33333333333333D+00 0.11111111111111D+00 + -0.44444444444444D+00 0.33333333333333D+00 0.11111111111111D+00 + -0.33333333333333D+00 0.33333333333333D+00 0.11111111111111D+00 + -0.22222222222222D+00 0.33333333333333D+00 0.11111111111111D+00 + -0.11111111111111D+00 0.33333333333333D+00 0.11111111111111D+00 + 0.00000000000000D+00 0.44444444444444D+00 0.11111111111111D+00 + 0.11111111111111D+00 0.44444444444444D+00 0.11111111111111D+00 + 0.22222222222222D+00 0.44444444444444D+00 0.11111111111111D+00 + 0.33333333333333D+00 0.44444444444444D+00 0.11111111111111D+00 + 0.44444444444444D+00 0.44444444444444D+00 0.11111111111111D+00 + -0.44444444444444D+00 0.44444444444444D+00 0.11111111111111D+00 + -0.33333333333333D+00 0.44444444444444D+00 0.11111111111111D+00 + -0.22222222222222D+00 0.44444444444444D+00 0.11111111111111D+00 + -0.11111111111111D+00 0.44444444444444D+00 0.11111111111111D+00 + 0.00000000000000D+00 -0.44444444444444D+00 0.11111111111111D+00 + 0.11111111111111D+00 -0.44444444444444D+00 0.11111111111111D+00 + 0.22222222222222D+00 -0.44444444444444D+00 0.11111111111111D+00 + 0.33333333333333D+00 -0.44444444444444D+00 0.11111111111111D+00 + 0.44444444444444D+00 -0.44444444444444D+00 0.11111111111111D+00 + -0.44444444444444D+00 -0.44444444444444D+00 0.11111111111111D+00 + -0.33333333333333D+00 -0.44444444444444D+00 0.11111111111111D+00 + -0.22222222222222D+00 -0.44444444444444D+00 0.11111111111111D+00 + -0.11111111111111D+00 -0.44444444444444D+00 0.11111111111111D+00 + 0.00000000000000D+00 -0.33333333333333D+00 0.11111111111111D+00 + 0.11111111111111D+00 -0.33333333333333D+00 0.11111111111111D+00 + 0.22222222222222D+00 -0.33333333333333D+00 0.11111111111111D+00 + 0.33333333333333D+00 -0.33333333333333D+00 0.11111111111111D+00 + 0.44444444444444D+00 -0.33333333333333D+00 0.11111111111111D+00 + -0.44444444444444D+00 -0.33333333333333D+00 0.11111111111111D+00 + -0.33333333333333D+00 -0.33333333333333D+00 0.11111111111111D+00 + -0.22222222222222D+00 -0.33333333333333D+00 0.11111111111111D+00 + -0.11111111111111D+00 -0.33333333333333D+00 0.11111111111111D+00 + 0.00000000000000D+00 -0.22222222222222D+00 0.11111111111111D+00 + 0.11111111111111D+00 -0.22222222222222D+00 0.11111111111111D+00 + 0.22222222222222D+00 -0.22222222222222D+00 0.11111111111111D+00 + 0.33333333333333D+00 -0.22222222222222D+00 0.11111111111111D+00 + 0.44444444444444D+00 -0.22222222222222D+00 0.11111111111111D+00 + -0.44444444444444D+00 -0.22222222222222D+00 0.11111111111111D+00 + -0.33333333333333D+00 -0.22222222222222D+00 0.11111111111111D+00 + -0.22222222222222D+00 -0.22222222222222D+00 0.11111111111111D+00 + -0.11111111111111D+00 -0.22222222222222D+00 0.11111111111111D+00 + 0.00000000000000D+00 -0.11111111111111D+00 0.11111111111111D+00 + 0.11111111111111D+00 -0.11111111111111D+00 0.11111111111111D+00 + 0.22222222222222D+00 -0.11111111111111D+00 0.11111111111111D+00 + 0.33333333333333D+00 -0.11111111111111D+00 0.11111111111111D+00 + 0.44444444444444D+00 -0.11111111111111D+00 0.11111111111111D+00 + -0.44444444444444D+00 -0.11111111111111D+00 0.11111111111111D+00 + -0.33333333333333D+00 -0.11111111111111D+00 0.11111111111111D+00 + -0.22222222222222D+00 -0.11111111111111D+00 0.11111111111111D+00 + -0.11111111111111D+00 -0.11111111111111D+00 0.11111111111111D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.22222222222222D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.22222222222222D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.22222222222222D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.22222222222222D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.22222222222222D+00 + -0.44444444444444D+00 0.00000000000000D+00 0.22222222222222D+00 + -0.33333333333333D+00 0.00000000000000D+00 0.22222222222222D+00 + -0.22222222222222D+00 0.00000000000000D+00 0.22222222222222D+00 + -0.11111111111111D+00 0.00000000000000D+00 0.22222222222222D+00 + 0.00000000000000D+00 0.11111111111111D+00 0.22222222222222D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.22222222222222D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.22222222222222D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.22222222222222D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.22222222222222D+00 + -0.44444444444444D+00 0.11111111111111D+00 0.22222222222222D+00 + -0.33333333333333D+00 0.11111111111111D+00 0.22222222222222D+00 + -0.22222222222222D+00 0.11111111111111D+00 0.22222222222222D+00 + -0.11111111111111D+00 0.11111111111111D+00 0.22222222222222D+00 + 0.00000000000000D+00 0.22222222222222D+00 0.22222222222222D+00 + 0.11111111111111D+00 0.22222222222222D+00 0.22222222222222D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.22222222222222D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.22222222222222D+00 + 0.44444444444444D+00 0.22222222222222D+00 0.22222222222222D+00 + -0.44444444444444D+00 0.22222222222222D+00 0.22222222222222D+00 + -0.33333333333333D+00 0.22222222222222D+00 0.22222222222222D+00 + -0.22222222222222D+00 0.22222222222222D+00 0.22222222222222D+00 + -0.11111111111111D+00 0.22222222222222D+00 0.22222222222222D+00 + 0.00000000000000D+00 0.33333333333333D+00 0.22222222222222D+00 + 0.11111111111111D+00 0.33333333333333D+00 0.22222222222222D+00 + 0.22222222222222D+00 0.33333333333333D+00 0.22222222222222D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.22222222222222D+00 + 0.44444444444444D+00 0.33333333333333D+00 0.22222222222222D+00 + -0.44444444444444D+00 0.33333333333333D+00 0.22222222222222D+00 + -0.33333333333333D+00 0.33333333333333D+00 0.22222222222222D+00 + -0.22222222222222D+00 0.33333333333333D+00 0.22222222222222D+00 + -0.11111111111111D+00 0.33333333333333D+00 0.22222222222222D+00 + 0.00000000000000D+00 0.44444444444444D+00 0.22222222222222D+00 + 0.11111111111111D+00 0.44444444444444D+00 0.22222222222222D+00 + 0.22222222222222D+00 0.44444444444444D+00 0.22222222222222D+00 + 0.33333333333333D+00 0.44444444444444D+00 0.22222222222222D+00 + 0.44444444444444D+00 0.44444444444444D+00 0.22222222222222D+00 + -0.44444444444444D+00 0.44444444444444D+00 0.22222222222222D+00 + -0.33333333333333D+00 0.44444444444444D+00 0.22222222222222D+00 + -0.22222222222222D+00 0.44444444444444D+00 0.22222222222222D+00 + -0.11111111111111D+00 0.44444444444444D+00 0.22222222222222D+00 + 0.00000000000000D+00 -0.44444444444444D+00 0.22222222222222D+00 + 0.11111111111111D+00 -0.44444444444444D+00 0.22222222222222D+00 + 0.22222222222222D+00 -0.44444444444444D+00 0.22222222222222D+00 + 0.33333333333333D+00 -0.44444444444444D+00 0.22222222222222D+00 + 0.44444444444444D+00 -0.44444444444444D+00 0.22222222222222D+00 + -0.44444444444444D+00 -0.44444444444444D+00 0.22222222222222D+00 + -0.33333333333333D+00 -0.44444444444444D+00 0.22222222222222D+00 + -0.22222222222222D+00 -0.44444444444444D+00 0.22222222222222D+00 + -0.11111111111111D+00 -0.44444444444444D+00 0.22222222222222D+00 + 0.00000000000000D+00 -0.33333333333333D+00 0.22222222222222D+00 + 0.11111111111111D+00 -0.33333333333333D+00 0.22222222222222D+00 + 0.22222222222222D+00 -0.33333333333333D+00 0.22222222222222D+00 + 0.33333333333333D+00 -0.33333333333333D+00 0.22222222222222D+00 + 0.44444444444444D+00 -0.33333333333333D+00 0.22222222222222D+00 + -0.44444444444444D+00 -0.33333333333333D+00 0.22222222222222D+00 + -0.33333333333333D+00 -0.33333333333333D+00 0.22222222222222D+00 + -0.22222222222222D+00 -0.33333333333333D+00 0.22222222222222D+00 + -0.11111111111111D+00 -0.33333333333333D+00 0.22222222222222D+00 + 0.00000000000000D+00 -0.22222222222222D+00 0.22222222222222D+00 + 0.11111111111111D+00 -0.22222222222222D+00 0.22222222222222D+00 + 0.22222222222222D+00 -0.22222222222222D+00 0.22222222222222D+00 + 0.33333333333333D+00 -0.22222222222222D+00 0.22222222222222D+00 + 0.44444444444444D+00 -0.22222222222222D+00 0.22222222222222D+00 + -0.44444444444444D+00 -0.22222222222222D+00 0.22222222222222D+00 + -0.33333333333333D+00 -0.22222222222222D+00 0.22222222222222D+00 + -0.22222222222222D+00 -0.22222222222222D+00 0.22222222222222D+00 + -0.11111111111111D+00 -0.22222222222222D+00 0.22222222222222D+00 + 0.00000000000000D+00 -0.11111111111111D+00 0.22222222222222D+00 + 0.11111111111111D+00 -0.11111111111111D+00 0.22222222222222D+00 + 0.22222222222222D+00 -0.11111111111111D+00 0.22222222222222D+00 + 0.33333333333333D+00 -0.11111111111111D+00 0.22222222222222D+00 + 0.44444444444444D+00 -0.11111111111111D+00 0.22222222222222D+00 + -0.44444444444444D+00 -0.11111111111111D+00 0.22222222222222D+00 + -0.33333333333333D+00 -0.11111111111111D+00 0.22222222222222D+00 + -0.22222222222222D+00 -0.11111111111111D+00 0.22222222222222D+00 + -0.11111111111111D+00 -0.11111111111111D+00 0.22222222222222D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.33333333333333D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.33333333333333D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.33333333333333D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.33333333333333D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.33333333333333D+00 + -0.44444444444444D+00 0.00000000000000D+00 0.33333333333333D+00 + -0.33333333333333D+00 0.00000000000000D+00 0.33333333333333D+00 + -0.22222222222222D+00 0.00000000000000D+00 0.33333333333333D+00 + -0.11111111111111D+00 0.00000000000000D+00 0.33333333333333D+00 + 0.00000000000000D+00 0.11111111111111D+00 0.33333333333333D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.33333333333333D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.33333333333333D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.33333333333333D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.33333333333333D+00 + -0.44444444444444D+00 0.11111111111111D+00 0.33333333333333D+00 + -0.33333333333333D+00 0.11111111111111D+00 0.33333333333333D+00 + -0.22222222222222D+00 0.11111111111111D+00 0.33333333333333D+00 + -0.11111111111111D+00 0.11111111111111D+00 0.33333333333333D+00 + 0.00000000000000D+00 0.22222222222222D+00 0.33333333333333D+00 + 0.11111111111111D+00 0.22222222222222D+00 0.33333333333333D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.33333333333333D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.33333333333333D+00 + 0.44444444444444D+00 0.22222222222222D+00 0.33333333333333D+00 + -0.44444444444444D+00 0.22222222222222D+00 0.33333333333333D+00 + -0.33333333333333D+00 0.22222222222222D+00 0.33333333333333D+00 + -0.22222222222222D+00 0.22222222222222D+00 0.33333333333333D+00 + -0.11111111111111D+00 0.22222222222222D+00 0.33333333333333D+00 + 0.00000000000000D+00 0.33333333333333D+00 0.33333333333333D+00 + 0.11111111111111D+00 0.33333333333333D+00 0.33333333333333D+00 + 0.22222222222222D+00 0.33333333333333D+00 0.33333333333333D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.33333333333333D+00 + 0.44444444444444D+00 0.33333333333333D+00 0.33333333333333D+00 + -0.44444444444444D+00 0.33333333333333D+00 0.33333333333333D+00 + -0.33333333333333D+00 0.33333333333333D+00 0.33333333333333D+00 + -0.22222222222222D+00 0.33333333333333D+00 0.33333333333333D+00 + -0.11111111111111D+00 0.33333333333333D+00 0.33333333333333D+00 + 0.00000000000000D+00 0.44444444444444D+00 0.33333333333333D+00 + 0.11111111111111D+00 0.44444444444444D+00 0.33333333333333D+00 + 0.22222222222222D+00 0.44444444444444D+00 0.33333333333333D+00 + 0.33333333333333D+00 0.44444444444444D+00 0.33333333333333D+00 + 0.44444444444444D+00 0.44444444444444D+00 0.33333333333333D+00 + -0.44444444444444D+00 0.44444444444444D+00 0.33333333333333D+00 + -0.33333333333333D+00 0.44444444444444D+00 0.33333333333333D+00 + -0.22222222222222D+00 0.44444444444444D+00 0.33333333333333D+00 + -0.11111111111111D+00 0.44444444444444D+00 0.33333333333333D+00 + 0.00000000000000D+00 -0.44444444444444D+00 0.33333333333333D+00 + 0.11111111111111D+00 -0.44444444444444D+00 0.33333333333333D+00 + 0.22222222222222D+00 -0.44444444444444D+00 0.33333333333333D+00 + 0.33333333333333D+00 -0.44444444444444D+00 0.33333333333333D+00 + 0.44444444444444D+00 -0.44444444444444D+00 0.33333333333333D+00 + -0.44444444444444D+00 -0.44444444444444D+00 0.33333333333333D+00 + -0.33333333333333D+00 -0.44444444444444D+00 0.33333333333333D+00 + -0.22222222222222D+00 -0.44444444444444D+00 0.33333333333333D+00 + -0.11111111111111D+00 -0.44444444444444D+00 0.33333333333333D+00 + 0.00000000000000D+00 -0.33333333333333D+00 0.33333333333333D+00 + 0.11111111111111D+00 -0.33333333333333D+00 0.33333333333333D+00 + 0.22222222222222D+00 -0.33333333333333D+00 0.33333333333333D+00 + 0.33333333333333D+00 -0.33333333333333D+00 0.33333333333333D+00 + 0.44444444444444D+00 -0.33333333333333D+00 0.33333333333333D+00 + -0.44444444444444D+00 -0.33333333333333D+00 0.33333333333333D+00 + -0.33333333333333D+00 -0.33333333333333D+00 0.33333333333333D+00 + -0.22222222222222D+00 -0.33333333333333D+00 0.33333333333333D+00 + -0.11111111111111D+00 -0.33333333333333D+00 0.33333333333333D+00 + 0.00000000000000D+00 -0.22222222222222D+00 0.33333333333333D+00 + 0.11111111111111D+00 -0.22222222222222D+00 0.33333333333333D+00 + 0.22222222222222D+00 -0.22222222222222D+00 0.33333333333333D+00 + 0.33333333333333D+00 -0.22222222222222D+00 0.33333333333333D+00 + 0.44444444444444D+00 -0.22222222222222D+00 0.33333333333333D+00 + -0.44444444444444D+00 -0.22222222222222D+00 0.33333333333333D+00 + -0.33333333333333D+00 -0.22222222222222D+00 0.33333333333333D+00 + -0.22222222222222D+00 -0.22222222222222D+00 0.33333333333333D+00 + -0.11111111111111D+00 -0.22222222222222D+00 0.33333333333333D+00 + 0.00000000000000D+00 -0.11111111111111D+00 0.33333333333333D+00 + 0.11111111111111D+00 -0.11111111111111D+00 0.33333333333333D+00 + 0.22222222222222D+00 -0.11111111111111D+00 0.33333333333333D+00 + 0.33333333333333D+00 -0.11111111111111D+00 0.33333333333333D+00 + 0.44444444444444D+00 -0.11111111111111D+00 0.33333333333333D+00 + -0.44444444444444D+00 -0.11111111111111D+00 0.33333333333333D+00 + -0.33333333333333D+00 -0.11111111111111D+00 0.33333333333333D+00 + -0.22222222222222D+00 -0.11111111111111D+00 0.33333333333333D+00 + -0.11111111111111D+00 -0.11111111111111D+00 0.33333333333333D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44444444444444D+00 + 0.11111111111111D+00 0.00000000000000D+00 0.44444444444444D+00 + 0.22222222222222D+00 0.00000000000000D+00 0.44444444444444D+00 + 0.33333333333333D+00 0.00000000000000D+00 0.44444444444444D+00 + 0.44444444444444D+00 0.00000000000000D+00 0.44444444444444D+00 + -0.44444444444444D+00 0.00000000000000D+00 0.44444444444444D+00 + -0.33333333333333D+00 0.00000000000000D+00 0.44444444444444D+00 + -0.22222222222222D+00 0.00000000000000D+00 0.44444444444444D+00 + -0.11111111111111D+00 0.00000000000000D+00 0.44444444444444D+00 + 0.00000000000000D+00 0.11111111111111D+00 0.44444444444444D+00 + 0.11111111111111D+00 0.11111111111111D+00 0.44444444444444D+00 + 0.22222222222222D+00 0.11111111111111D+00 0.44444444444444D+00 + 0.33333333333333D+00 0.11111111111111D+00 0.44444444444444D+00 + 0.44444444444444D+00 0.11111111111111D+00 0.44444444444444D+00 + -0.44444444444444D+00 0.11111111111111D+00 0.44444444444444D+00 + -0.33333333333333D+00 0.11111111111111D+00 0.44444444444444D+00 + -0.22222222222222D+00 0.11111111111111D+00 0.44444444444444D+00 + -0.11111111111111D+00 0.11111111111111D+00 0.44444444444444D+00 + 0.00000000000000D+00 0.22222222222222D+00 0.44444444444444D+00 + 0.11111111111111D+00 0.22222222222222D+00 0.44444444444444D+00 + 0.22222222222222D+00 0.22222222222222D+00 0.44444444444444D+00 + 0.33333333333333D+00 0.22222222222222D+00 0.44444444444444D+00 + 0.44444444444444D+00 0.22222222222222D+00 0.44444444444444D+00 + -0.44444444444444D+00 0.22222222222222D+00 0.44444444444444D+00 + -0.33333333333333D+00 0.22222222222222D+00 0.44444444444444D+00 + -0.22222222222222D+00 0.22222222222222D+00 0.44444444444444D+00 + -0.11111111111111D+00 0.22222222222222D+00 0.44444444444444D+00 + 0.00000000000000D+00 0.33333333333333D+00 0.44444444444444D+00 + 0.11111111111111D+00 0.33333333333333D+00 0.44444444444444D+00 + 0.22222222222222D+00 0.33333333333333D+00 0.44444444444444D+00 + 0.33333333333333D+00 0.33333333333333D+00 0.44444444444444D+00 + 0.44444444444444D+00 0.33333333333333D+00 0.44444444444444D+00 + -0.44444444444444D+00 0.33333333333333D+00 0.44444444444444D+00 + -0.33333333333333D+00 0.33333333333333D+00 0.44444444444444D+00 + -0.22222222222222D+00 0.33333333333333D+00 0.44444444444444D+00 + -0.11111111111111D+00 0.33333333333333D+00 0.44444444444444D+00 + 0.00000000000000D+00 0.44444444444444D+00 0.44444444444444D+00 + 0.11111111111111D+00 0.44444444444444D+00 0.44444444444444D+00 + 0.22222222222222D+00 0.44444444444444D+00 0.44444444444444D+00 + 0.33333333333333D+00 0.44444444444444D+00 0.44444444444444D+00 + 0.44444444444444D+00 0.44444444444444D+00 0.44444444444444D+00 + -0.44444444444444D+00 0.44444444444444D+00 0.44444444444444D+00 + -0.33333333333333D+00 0.44444444444444D+00 0.44444444444444D+00 + -0.22222222222222D+00 0.44444444444444D+00 0.44444444444444D+00 + -0.11111111111111D+00 0.44444444444444D+00 0.44444444444444D+00 + 0.00000000000000D+00 -0.44444444444444D+00 0.44444444444444D+00 + 0.11111111111111D+00 -0.44444444444444D+00 0.44444444444444D+00 + 0.22222222222222D+00 -0.44444444444444D+00 0.44444444444444D+00 + 0.33333333333333D+00 -0.44444444444444D+00 0.44444444444444D+00 + 0.44444444444444D+00 -0.44444444444444D+00 0.44444444444444D+00 + -0.44444444444444D+00 -0.44444444444444D+00 0.44444444444444D+00 + -0.33333333333333D+00 -0.44444444444444D+00 0.44444444444444D+00 + -0.22222222222222D+00 -0.44444444444444D+00 0.44444444444444D+00 + -0.11111111111111D+00 -0.44444444444444D+00 0.44444444444444D+00 + 0.00000000000000D+00 -0.33333333333333D+00 0.44444444444444D+00 + 0.11111111111111D+00 -0.33333333333333D+00 0.44444444444444D+00 + 0.22222222222222D+00 -0.33333333333333D+00 0.44444444444444D+00 + 0.33333333333333D+00 -0.33333333333333D+00 0.44444444444444D+00 + 0.44444444444444D+00 -0.33333333333333D+00 0.44444444444444D+00 + -0.44444444444444D+00 -0.33333333333333D+00 0.44444444444444D+00 + -0.33333333333333D+00 -0.33333333333333D+00 0.44444444444444D+00 + -0.22222222222222D+00 -0.33333333333333D+00 0.44444444444444D+00 + -0.11111111111111D+00 -0.33333333333333D+00 0.44444444444444D+00 + 0.00000000000000D+00 -0.22222222222222D+00 0.44444444444444D+00 + 0.11111111111111D+00 -0.22222222222222D+00 0.44444444444444D+00 + 0.22222222222222D+00 -0.22222222222222D+00 0.44444444444444D+00 + 0.33333333333333D+00 -0.22222222222222D+00 0.44444444444444D+00 + 0.44444444444444D+00 -0.22222222222222D+00 0.44444444444444D+00 + -0.44444444444444D+00 -0.22222222222222D+00 0.44444444444444D+00 + -0.33333333333333D+00 -0.22222222222222D+00 0.44444444444444D+00 + -0.22222222222222D+00 -0.22222222222222D+00 0.44444444444444D+00 + -0.11111111111111D+00 -0.22222222222222D+00 0.44444444444444D+00 + 0.00000000000000D+00 -0.11111111111111D+00 0.44444444444444D+00 + 0.11111111111111D+00 -0.11111111111111D+00 0.44444444444444D+00 + 0.22222222222222D+00 -0.11111111111111D+00 0.44444444444444D+00 + 0.33333333333333D+00 -0.11111111111111D+00 0.44444444444444D+00 + 0.44444444444444D+00 -0.11111111111111D+00 0.44444444444444D+00 + -0.44444444444444D+00 -0.11111111111111D+00 0.44444444444444D+00 + -0.33333333333333D+00 -0.11111111111111D+00 0.44444444444444D+00 + -0.22222222222222D+00 -0.11111111111111D+00 0.44444444444444D+00 + -0.11111111111111D+00 -0.11111111111111D+00 0.44444444444444D+00 + kptnrm 0.10000000000000D+01 + ngfft 30 30 30 + nspden 1 + nspinor 1 + occ 0.20000000000000D+01 0.20000000000000D+01 0.20000000000000D+01 + 0.20000000000000D+01 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + rprim 0.00000000000000D+00 0.51318663114000D+01 0.51318663114000D+01 + 0.51318663114000D+01 0.00000000000000D+00 0.51318663114000D+01 + 0.51318663114000D+01 0.51318663114000D+01 0.00000000000000D+00 + dfpt_sciss 0.00000000000000D+00 + spinat 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + symafm 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + symrel 1 0 0 0 1 0 0 0 1 + -1 0 0 0 -1 0 0 0 -1 + 0 -1 1 0 -1 0 1 -1 0 + 0 1 -1 0 1 0 -1 1 0 + -1 0 0 -1 0 1 -1 1 0 + 1 0 0 1 0 -1 1 -1 0 + 0 1 -1 1 0 -1 0 0 -1 + 0 -1 1 -1 0 1 0 0 1 + -1 0 0 -1 1 0 -1 0 1 + 1 0 0 1 -1 0 1 0 -1 + 0 -1 1 1 -1 0 0 -1 0 + 0 1 -1 -1 1 0 0 1 0 + 1 0 0 0 0 1 0 1 0 + -1 0 0 0 0 -1 0 -1 0 + 0 1 -1 0 0 -1 1 0 -1 + 0 -1 1 0 0 1 -1 0 1 + -1 0 1 -1 1 0 -1 0 0 + 1 0 -1 1 -1 0 1 0 0 + 0 -1 0 1 -1 0 0 -1 1 + 0 1 0 -1 1 0 0 1 -1 + 1 0 -1 0 0 -1 0 1 -1 + -1 0 1 0 0 1 0 -1 1 + 0 1 0 0 0 1 1 0 0 + 0 -1 0 0 0 -1 -1 0 0 + 1 0 -1 0 1 -1 0 0 -1 + -1 0 1 0 -1 1 0 0 1 + 0 -1 0 0 -1 1 1 -1 0 + 0 1 0 0 1 -1 -1 1 0 + -1 0 1 -1 0 0 -1 1 0 + 1 0 -1 1 0 0 1 -1 0 + 0 1 0 1 0 0 0 0 1 + 0 -1 0 -1 0 0 0 0 -1 + 0 0 -1 0 1 -1 1 0 -1 + 0 0 1 0 -1 1 -1 0 1 + 1 -1 0 0 -1 1 0 -1 0 + -1 1 0 0 1 -1 0 1 0 + 0 0 1 1 0 0 0 1 0 + 0 0 -1 -1 0 0 0 -1 0 + -1 1 0 -1 0 0 -1 0 1 + 1 -1 0 1 0 0 1 0 -1 + 0 0 1 0 1 0 1 0 0 + 0 0 -1 0 -1 0 -1 0 0 + 1 -1 0 0 -1 0 0 -1 1 + -1 1 0 0 1 0 0 1 -1 + 0 0 -1 1 0 -1 0 1 -1 + 0 0 1 -1 0 1 0 -1 1 + -1 1 0 -1 0 1 -1 0 0 + 1 -1 0 1 0 -1 1 0 0 + tnons 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.44408920985006D-15 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.00000000000000D+00 0.00000000000000D+00 0.44408920985006D-15 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + 0.44408920985006D-15 0.00000000000000D+00 0.00000000000000D+00 + 0.25000000000000D+00 0.25000000000000D+00 0.25000000000000D+00 + tolwfr 0.10000000000000D+01 + tphysel 0.00000000000000D+00 + tsmear 0.10000000000000D-01 + typat 1 1 + wtk 0.13717421124829D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 0.27434842249657D-02 + 0.27434842249657D-02 0.27434842249657D-02 + xred 0.50000000000000D+00 0.50000000000000D+00 0.50000000000000D+00 + 0.75000000000000D+00 0.75000000000000D+00 0.75000000000000D+00 + znucl 0.14000000000000D+02 + zion 0.40000000000000D+01 + + Description of the potentials (KB energies) + vrsio8 (for pseudopotentials)=100401 + usepaw = 0 + dimekb = 6 lmnmax= 6 + Atom type= 1 pspso= 0 nekb= 6 + iln lpsang iproj ekb(:) + 1 0 1 5.4423804E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 2 0 2 0.0000000E+00 8.5033367E-01 0.0000000E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 3 1 1 0.0000000E+00 0.0000000E+00 2.7848044E+00 0.0000000E+00 + 0.0000000E+00 0.0000000E+00 + 4 1 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 6.0758669E-01 + 0.0000000E+00 0.0000000E+00 + 5 2 1 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -3.8364265E+00 0.0000000E+00 + 6 2 2 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 + -3.8364265E+00 0.0000000E+00 + + **** Database of total energy derivatives **** + Number of data blocks= 35 + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.72709055596923D+01 0.00000000000000D+00 + 2 1 1 1 0.36354527798461D+01 0.00000000000000D+00 + 3 1 1 1 0.36354527798461D+01 0.00000000000000D+00 + 1 2 1 1 -0.72708835891982D+01 -0.17252951570232D-16 + 2 2 1 1 -0.36354417945991D+01 0.62092435372811D-19 + 3 2 1 1 -0.36354417945991D+01 0.19780186852246D-16 + 1 4 1 1 -0.25462401036559D+02 0.00000000000000D+00 + 2 4 1 1 -0.19002451841081D-16 0.00000000000000D+00 + 3 4 1 1 0.19423383099567D-16 0.00000000000000D+00 + 1 1 2 1 0.36354527798461D+01 0.00000000000000D+00 + 2 1 2 1 0.72709055596923D+01 0.00000000000000D+00 + 3 1 2 1 0.36354527798462D+01 0.00000000000000D+00 + 1 2 2 1 -0.36354417945991D+01 0.62092435372811D-19 + 2 2 2 1 -0.72708835891982D+01 -0.11272335902950D-16 + 3 2 2 1 -0.36354417945991D+01 0.21277965176964D-17 + 1 4 2 1 0.74014868308344D-16 0.00000000000000D+00 + 2 4 2 1 -0.25462401036559D+02 0.00000000000000D+00 + 3 4 2 1 -0.35591971513231D-16 0.00000000000000D+00 + 1 1 3 1 0.36354527798461D+01 0.00000000000000D+00 + 2 1 3 1 0.36354527798461D+01 0.00000000000000D+00 + 3 1 3 1 0.72709055596923D+01 0.00000000000000D+00 + 1 2 3 1 -0.36354417945991D+01 0.19780186852246D-16 + 2 2 3 1 -0.36354417945991D+01 0.21277965176964D-17 + 3 2 3 1 -0.72708835891983D+01 -0.17007904243078D-16 + 1 4 3 1 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 1 0.82392571198801D-17 0.00000000000000D+00 + 3 4 3 1 -0.25462401036559D+02 0.00000000000000D+00 + 1 1 1 2 -0.72708835891982D+01 0.17252951570232D-16 + 2 1 1 2 -0.36354417945991D+01 -0.62092435372811D-19 + 3 1 1 2 -0.36354417945991D+01 -0.19780186852246D-16 + 1 2 1 2 0.72709055596923D+01 0.00000000000000D+00 + 2 2 1 2 0.36354527798461D+01 0.00000000000000D+00 + 3 2 1 2 0.36354527798461D+01 0.00000000000000D+00 + 1 4 1 2 -0.25462401036559D+02 0.00000000000000D+00 + 2 4 1 2 -0.19002443017821D-16 0.00000000000000D+00 + 3 4 1 2 0.19423383099567D-16 0.00000000000000D+00 + 1 1 2 2 -0.36354417945991D+01 -0.62092435372811D-19 + 2 1 2 2 -0.72708835891982D+01 0.11272335902950D-16 + 3 1 2 2 -0.36354417945991D+01 -0.21277965176964D-17 + 1 2 2 2 0.36354527798461D+01 0.00000000000000D+00 + 2 2 2 2 0.72709055596923D+01 0.00000000000000D+00 + 3 2 2 2 0.36354527798462D+01 0.00000000000000D+00 + 1 4 2 2 0.74014868308344D-16 0.00000000000000D+00 + 2 4 2 2 -0.25462401036559D+02 0.00000000000000D+00 + 3 4 2 2 -0.35591971513231D-16 0.00000000000000D+00 + 1 1 3 2 -0.36354417945991D+01 -0.19780186852246D-16 + 2 1 3 2 -0.36354417945991D+01 -0.21277965176964D-17 + 3 1 3 2 -0.72708835891983D+01 0.17007904243078D-16 + 1 2 3 2 0.36354527798461D+01 0.00000000000000D+00 + 2 2 3 2 0.36354527798461D+01 0.00000000000000D+00 + 3 2 3 2 0.72709055596923D+01 0.00000000000000D+00 + 1 4 3 2 0.00000000000000D+00 0.00000000000000D+00 + 2 4 3 2 0.82392659431399D-17 0.00000000000000D+00 + 3 4 3 2 -0.25462401036559D+02 0.00000000000000D+00 + 1 1 1 4 -0.25462401036559D+02 0.00000000000000D+00 + 2 1 1 4 -0.74014868308344D-16 0.00000000000000D+00 + 3 1 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 2 1 4 -0.25462401036559D+02 0.00000000000000D+00 + 2 2 1 4 -0.74014868308344D-16 0.00000000000000D+00 + 3 2 1 4 0.00000000000000D+00 0.00000000000000D+00 + 1 4 1 4 -0.31505301812207D+03 0.00000000000000D+00 + 2 4 1 4 0.10501767270736D+03 0.00000000000000D+00 + 3 4 1 4 0.10501767270736D+03 0.00000000000000D+00 + 1 1 2 4 0.82932907633070D-17 0.00000000000000D+00 + 2 1 2 4 -0.25462401036559D+02 0.00000000000000D+00 + 3 1 2 4 -0.65775611188464D-16 0.00000000000000D+00 + 1 2 2 4 0.82932995865669D-17 0.00000000000000D+00 + 2 2 2 4 -0.25462401036559D+02 0.00000000000000D+00 + 3 2 2 4 -0.65775611188464D-16 0.00000000000000D+00 + 1 4 2 4 0.10501767270736D+03 0.00000000000000D+00 + 2 4 2 4 -0.31505301812207D+03 0.00000000000000D+00 + 3 4 2 4 0.10501767270736D+03 0.00000000000000D+00 + 1 1 3 4 0.11127154190725D-16 0.00000000000000D+00 + 2 1 3 4 0.57422410490658D-16 0.00000000000000D+00 + 3 1 3 4 -0.25462401036559D+02 0.00000000000000D+00 + 1 2 3 4 0.11127154190725D-16 0.00000000000000D+00 + 2 2 3 4 0.57422410490658D-16 0.00000000000000D+00 + 3 2 3 4 -0.25462401036559D+02 0.00000000000000D+00 + 1 4 3 4 0.10501767270736D+03 0.00000000000000D+00 + 2 4 3 4 0.10501767270736D+03 0.00000000000000D+00 + 3 4 3 4 -0.31505301812207D+03 0.00000000000000D+00 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 1.11111111E-01 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.73443837670875D+01 -0.56466476148288D-15 + 2 1 1 1 0.35865128192545D+01 0.13500801045701D-05 + 3 1 1 1 0.35865128192545D+01 0.13500801045314D-05 + 1 2 1 1 -0.65621158132117D+01 -0.17850348016549D+01 + 2 2 1 1 -0.34999841266045D+01 -0.22571301878311D+00 + 3 2 1 1 -0.34999841266045D+01 -0.22571301878311D+00 + 1 1 2 1 0.35865128192545D+01 -0.13500801053953D-05 + 2 1 2 1 0.71730227727573D+01 -0.32387445725759D-15 + 3 1 2 1 0.35865168227685D+01 0.15648232516688D-05 + 1 2 2 1 -0.34999841266045D+01 -0.22571301878311D+00 + 2 2 2 1 -0.69999650672679D+01 -0.45143181264556D+00 + 3 2 2 1 -0.34999845381456D+01 -0.22571655756748D+00 + 1 1 3 1 0.35865128192545D+01 -0.13500801054340D-05 + 2 1 3 1 0.35865168227685D+01 -0.15648232521658D-05 + 3 1 3 1 0.71730227727574D+01 -0.26919164143630D-15 + 1 2 3 1 -0.34999841266045D+01 -0.22571301878311D+00 + 2 2 3 1 -0.34999845381456D+01 -0.22571655756748D+00 + 3 2 3 1 -0.69999650672680D+01 -0.45143181264556D+00 + 1 1 1 2 -0.65621158132117D+01 0.17850348016549D+01 + 2 1 1 2 -0.34999841266045D+01 0.22571301878311D+00 + 3 1 1 2 -0.34999841266045D+01 0.22571301878311D+00 + 1 2 1 2 0.73443837670875D+01 -0.56466476148288D-15 + 2 2 1 2 0.35865128192545D+01 -0.13500801053953D-05 + 3 2 1 2 0.35865128192545D+01 -0.13500801054340D-05 + 1 1 2 2 -0.34999841266045D+01 0.22571301878311D+00 + 2 1 2 2 -0.69999650672679D+01 0.45143181264556D+00 + 3 1 2 2 -0.34999845381456D+01 0.22571655756748D+00 + 1 2 2 2 0.35865128192545D+01 0.13500801045701D-05 + 2 2 2 2 0.71730227727573D+01 -0.32387445725759D-15 + 3 2 2 2 0.35865168227685D+01 -0.15648232521658D-05 + 1 1 3 2 -0.34999841266045D+01 0.22571301878311D+00 + 2 1 3 2 -0.34999845381456D+01 0.22571655756748D+00 + 3 1 3 2 -0.69999650672680D+01 0.45143181264556D+00 + 1 2 3 2 0.35865128192545D+01 0.13500801045314D-05 + 2 2 3 2 0.35865168227685D+01 0.15648232516688D-05 + 3 2 3 2 0.71730227727574D+01 -0.26919164143630D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.75430116309706D+01 -0.69552524491986D-15 + 2 1 1 1 0.35152528307666D+01 0.71868723521360D-06 + 3 1 1 1 0.35152528307666D+01 0.71868723534730D-06 + 1 2 1 1 -0.48298939519413D+01 -0.26801447513441D+01 + 2 2 1 1 -0.32975927993581D+01 -0.24389170505695D+00 + 3 2 1 1 -0.32975927993581D+01 -0.24389170505695D+00 + 1 1 2 1 0.35152528307666D+01 -0.71868723666715D-06 + 2 1 2 1 0.70305020774104D+01 -0.46801326873891D-15 + 3 1 2 1 0.35152564030912D+01 0.17942878449555D-05 + 1 2 2 1 -0.32975927993581D+01 -0.24389170505695D+00 + 2 2 2 1 -0.65951774738507D+01 -0.48778923520453D+00 + 3 2 2 1 -0.32975912472289D+01 -0.24389524499151D+00 + 1 1 3 1 0.35152528307666D+01 -0.71868723653345D-06 + 2 1 3 1 0.35152564030912D+01 -0.17942878457922D-05 + 3 1 3 1 0.70305020774104D+01 -0.45701204742401D-15 + 1 2 3 1 -0.32975927993581D+01 -0.24389170505695D+00 + 2 2 3 1 -0.32975912472289D+01 -0.24389524499151D+00 + 3 2 3 1 -0.65951774738507D+01 -0.48778923520453D+00 + 1 1 1 2 -0.48298939519413D+01 0.26801447513441D+01 + 2 1 1 2 -0.32975927993581D+01 0.24389170505695D+00 + 3 1 1 2 -0.32975927993581D+01 0.24389170505695D+00 + 1 2 1 2 0.75430116309706D+01 -0.69552524491986D-15 + 2 2 1 2 0.35152528307666D+01 -0.71868723666715D-06 + 3 2 1 2 0.35152528307666D+01 -0.71868723653345D-06 + 1 1 2 2 -0.32975927993581D+01 0.24389170505695D+00 + 2 1 2 2 -0.65951774738507D+01 0.48778923520453D+00 + 3 1 2 2 -0.32975912472289D+01 0.24389524499151D+00 + 1 2 2 2 0.35152528307666D+01 0.71868723521360D-06 + 2 2 2 2 0.70305020774104D+01 -0.46801326873891D-15 + 3 2 2 2 0.35152564030912D+01 -0.17942878457922D-05 + 1 1 3 2 -0.32975927993581D+01 0.24389170505695D+00 + 2 1 3 2 -0.32975912472289D+01 0.24389524499151D+00 + 3 1 3 2 -0.65951774738507D+01 0.48778923520453D+00 + 1 2 3 2 0.35152528307666D+01 0.71868723534730D-06 + 2 2 3 2 0.35152564030912D+01 0.17942878449555D-05 + 3 2 3 2 0.70305020774104D+01 -0.45701204742401D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.77868460505905D+01 -0.82505038590943D-15 + 2 1 1 1 0.34757229940589D+01 0.26190668517557D-06 + 3 1 1 1 0.34757229940589D+01 0.26190668520975D-06 + 1 2 1 1 -0.29193074983113D+01 -0.23259397969339D+01 + 2 2 1 1 -0.31908315508329D+01 -0.15337717122478D+00 + 3 2 1 1 -0.31908315508329D+01 -0.15337717122478D+00 + 1 1 2 1 0.34757229940589D+01 -0.26190668659245D-06 + 2 1 2 1 0.69514421240096D+01 -0.38986527447439D-15 + 3 1 2 1 0.34757257956453D+01 0.17372474602511D-05 + 1 2 2 1 -0.31908315508329D+01 -0.15337717122478D+00 + 2 2 2 1 -0.63816524872828D+01 -0.30675890851472D+00 + 3 2 2 1 -0.31908293680539D+01 -0.15338041656546D+00 + 1 1 3 1 0.34757229940589D+01 -0.26190668655827D-06 + 2 1 3 1 0.34757257956453D+01 -0.17372474609951D-05 + 3 1 3 1 0.69514421240096D+01 -0.37862411979934D-15 + 1 2 3 1 -0.31908315508329D+01 -0.15337717122478D+00 + 2 2 3 1 -0.31908293680539D+01 -0.15338041656546D+00 + 3 2 3 1 -0.63816524872828D+01 -0.30675890851472D+00 + 1 1 1 2 -0.29193074983113D+01 0.23259397969339D+01 + 2 1 1 2 -0.31908315508329D+01 0.15337717122478D+00 + 3 1 1 2 -0.31908315508329D+01 0.15337717122478D+00 + 1 2 1 2 0.77868460505905D+01 -0.82505038590943D-15 + 2 2 1 2 0.34757229940589D+01 -0.26190668659245D-06 + 3 2 1 2 0.34757229940589D+01 -0.26190668655827D-06 + 1 1 2 2 -0.31908315508329D+01 0.15337717122478D+00 + 2 1 2 2 -0.63816524872828D+01 0.30675890851472D+00 + 3 1 2 2 -0.31908293680539D+01 0.15338041656546D+00 + 1 2 2 2 0.34757229940589D+01 0.26190668517557D-06 + 2 2 2 2 0.69514421240096D+01 -0.38986527447439D-15 + 3 2 2 2 0.34757257956453D+01 -0.17372474609951D-05 + 1 1 3 2 -0.31908315508329D+01 0.15337717122478D+00 + 2 1 3 2 -0.31908293680539D+01 0.15338041656546D+00 + 3 1 3 2 -0.63816524872828D+01 0.30675890851472D+00 + 1 2 3 2 0.34757229940589D+01 0.26190668520975D-06 + 2 2 3 2 0.34757257956453D+01 0.17372474602511D-05 + 3 2 3 2 0.69514421240096D+01 -0.37862411979934D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 0.00000000E+00 0.00000000E+00 1.0 + 1 1 1 1 0.79472080556845D+01 -0.16630471125822D-15 + 2 1 1 1 0.34610722893278D+01 -0.88298611725159D-07 + 3 1 1 1 0.34610722893278D+01 -0.88298611703393D-07 + 1 2 1 1 -0.16887353229738D+01 -0.91312445286367D+00 + 2 2 1 1 -0.31598264442703D+01 -0.49332539130787D-01 + 3 2 1 1 -0.31598264442703D+01 -0.49332539130786D-01 + 1 1 2 1 0.34610722893279D+01 0.88298611337558D-07 + 2 1 2 1 0.69221406063721D+01 -0.15776654546143D-15 + 3 1 2 1 0.34610742595377D+01 0.15820093515048D-05 + 1 2 2 1 -0.31598264442703D+01 -0.49332539130787D-01 + 2 2 2 1 -0.63196432817852D+01 -0.98670588280776D-01 + 3 2 2 1 -0.31598245877248D+01 -0.49337045314067D-01 + 1 1 3 1 0.34610722893278D+01 0.88298611359323D-07 + 2 1 3 1 0.34610742595377D+01 -0.15820093518028D-05 + 3 1 3 1 0.69221406063721D+01 -0.16750861561256D-15 + 1 2 3 1 -0.31598264442703D+01 -0.49332539130786D-01 + 2 2 3 1 -0.31598245877248D+01 -0.49337045314067D-01 + 3 2 3 1 -0.63196432817853D+01 -0.98670588280776D-01 + 1 1 1 2 -0.16887353229738D+01 0.91312445286367D+00 + 2 1 1 2 -0.31598264442703D+01 0.49332539130787D-01 + 3 1 1 2 -0.31598264442703D+01 0.49332539130786D-01 + 1 2 1 2 0.79472080556845D+01 -0.16630471125822D-15 + 2 2 1 2 0.34610722893278D+01 0.88298611337558D-07 + 3 2 1 2 0.34610722893278D+01 0.88298611359323D-07 + 1 1 2 2 -0.31598264442703D+01 0.49332539130787D-01 + 2 1 2 2 -0.63196432817852D+01 0.98670588280776D-01 + 3 1 2 2 -0.31598245877248D+01 0.49337045314067D-01 + 1 2 2 2 0.34610722893278D+01 -0.88298611725159D-07 + 2 2 2 2 0.69221406063721D+01 -0.15776654546143D-15 + 3 2 2 2 0.34610742595377D+01 -0.15820093518028D-05 + 1 1 3 2 -0.31598264442703D+01 0.49332539130786D-01 + 2 1 3 2 -0.31598245877248D+01 0.49337045314067D-01 + 3 1 3 2 -0.63196432817853D+01 0.98670588280776D-01 + 1 2 3 2 0.34610722893278D+01 -0.88298611703393D-07 + 2 2 3 2 0.34610742595377D+01 0.15820093515048D-05 + 3 2 3 2 0.69221406063721D+01 -0.16750861561256D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 1.11111111E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.72748449846287D+01 -0.92579167393175D-15 + 2 1 1 1 0.37542632972752D+01 -0.74560133199663D-15 + 3 1 1 1 0.35205816873535D+01 -0.85826429857036D-15 + 1 2 1 1 -0.63080426797386D+01 -0.22959397716563D+01 + 2 2 1 1 -0.34560676504562D+01 -0.48271356185262D+00 + 3 2 1 1 -0.33502589643475D+01 -0.44420234958644D+00 + 1 1 2 1 0.37542632972752D+01 -0.74560133199661D-15 + 2 1 2 1 0.72748449846288D+01 -0.94439890118883D-15 + 3 1 2 1 0.35205816873535D+01 -0.82009601280506D-15 + 1 2 2 1 -0.34560676504562D+01 -0.48271356185262D+00 + 2 2 2 1 -0.63080426797386D+01 -0.22959397716563D+01 + 3 2 2 1 -0.33502589643475D+01 -0.44420234958644D+00 + 1 1 3 1 0.35205816873535D+01 -0.85826429857033D-15 + 2 1 3 1 0.35205816873535D+01 -0.82009601280504D-15 + 3 1 3 1 0.70411633747070D+01 -0.62559833497742D-15 + 1 2 3 1 -0.33502589643475D+01 -0.44420234958644D+00 + 2 2 3 1 -0.33502589643475D+01 -0.44420234958644D+00 + 3 2 3 1 -0.67005179286951D+01 -0.88840469917288D+00 + 1 1 1 2 -0.63080426797386D+01 0.22959397716563D+01 + 2 1 1 2 -0.34560676504562D+01 0.48271356185262D+00 + 3 1 1 2 -0.33502589643475D+01 0.44420234958644D+00 + 1 2 1 2 0.72748449846288D+01 -0.92579167393175D-15 + 2 2 1 2 0.37542632972752D+01 -0.74560133199663D-15 + 3 2 1 2 0.35205816873535D+01 -0.85826429857033D-15 + 1 1 2 2 -0.34560676504562D+01 0.48271356185262D+00 + 2 1 2 2 -0.63080426797386D+01 0.22959397716563D+01 + 3 1 2 2 -0.33502589643475D+01 0.44420234958644D+00 + 1 2 2 2 0.37542632972752D+01 -0.74560133199664D-15 + 2 2 2 2 0.72748449846288D+01 -0.94439890118883D-15 + 3 2 2 2 0.35205816873535D+01 -0.82009601280505D-15 + 1 1 3 2 -0.33502589643475D+01 0.44420234958644D+00 + 2 1 3 2 -0.33502589643475D+01 0.44420234958644D+00 + 3 1 3 2 -0.67005179286951D+01 0.88840469917288D+00 + 1 2 3 2 0.35205816873535D+01 -0.85826429857036D-15 + 2 2 3 2 0.35205816873535D+01 -0.82009601280507D-15 + 3 2 3 2 0.70411633747070D+01 -0.62559833497742D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.73944056577402D+01 -0.80218668982308D-15 + 2 1 1 1 0.37620249493163D+01 -0.71375978103069D-01 + 3 1 1 1 0.34387360513664D+01 0.56816071219907D-06 + 1 2 1 1 -0.45401580955586D+01 -0.31616791656122D+01 + 2 2 1 1 -0.32544430777636D+01 -0.48745435517604D+00 + 3 2 1 1 -0.31438401540319D+01 -0.45889405908222D+00 + 1 1 2 1 0.37620249493164D+01 0.71375978103067D-01 + 2 1 2 1 0.71725968671852D+01 -0.10370038480980D-14 + 3 1 2 1 0.34387370911630D+01 0.17845887066982D-05 + 1 2 2 1 -0.32544430777636D+01 -0.48745435517605D+00 + 2 2 2 1 -0.58576284002375D+01 -0.24154398127261D+01 + 3 2 2 1 -0.31438441019149D+01 -0.45889658509834D+00 + 1 1 3 1 0.34387360513664D+01 -0.56816071367800D-06 + 2 1 3 1 0.34387370911630D+01 -0.17845887087478D-05 + 3 1 3 1 0.68774728890720D+01 -0.79583262818354D-15 + 1 2 3 1 -0.31438401540319D+01 -0.45889405908222D+00 + 2 2 3 1 -0.31438441019149D+01 -0.45889658509834D+00 + 3 2 3 1 -0.62876838828491D+01 -0.91778782728505D+00 + 1 1 1 2 -0.45401580955586D+01 0.31616791656122D+01 + 2 1 1 2 -0.32544430777636D+01 0.48745435517605D+00 + 3 1 1 2 -0.31438401540319D+01 0.45889405908222D+00 + 1 2 1 2 0.73944056577402D+01 -0.80218668982308D-15 + 2 2 1 2 0.37620249493164D+01 0.71375978103067D-01 + 3 2 1 2 0.34387360513664D+01 -0.56816071367800D-06 + 1 1 2 2 -0.32544430777636D+01 0.48745435517604D+00 + 2 1 2 2 -0.58576284002375D+01 0.24154398127261D+01 + 3 1 2 2 -0.31438441019149D+01 0.45889658509834D+00 + 1 2 2 2 0.37620249493164D+01 -0.71375978103069D-01 + 2 2 2 2 0.71725968671852D+01 -0.10370038480980D-14 + 3 2 2 2 0.34387370911630D+01 -0.17845887087478D-05 + 1 1 3 2 -0.31438401540319D+01 0.45889405908222D+00 + 2 1 3 2 -0.31438441019149D+01 0.45889658509834D+00 + 3 1 3 2 -0.62876838828491D+01 0.91778782728505D+00 + 1 2 3 2 0.34387360513664D+01 0.56816071219907D-06 + 2 2 3 2 0.34387370911630D+01 0.17845887066982D-05 + 3 2 3 2 0.68774728890720D+01 -0.79583262818354D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.75751844985106D+01 -0.85478073477056D-15 + 2 1 1 1 0.36969965409873D+01 -0.13338772037955D+00 + 3 1 1 1 0.33996861023190D+01 -0.13496433187520D-06 + 1 2 1 1 -0.26232660272242D+01 -0.27548397097194D+01 + 2 2 1 1 -0.31471097005565D+01 -0.35408625248446D+00 + 3 2 1 1 -0.30397345152059D+01 -0.37800569965298D+00 + 1 1 2 1 0.36969965409873D+01 0.13338772037955D+00 + 2 1 2 1 0.70451690740846D+01 -0.12505042305321D-14 + 3 1 2 1 0.33996866332262D+01 0.16203582537696D-05 + 1 2 2 1 -0.31471097005565D+01 -0.35408625248446D+00 + 2 2 2 1 -0.55781952704164D+01 -0.21875197050809D+01 + 3 2 2 1 -0.30397334495218D+01 -0.37800740620081D+00 + 1 1 3 1 0.33996861023190D+01 0.13496433049133D-06 + 2 1 3 1 0.33996866332262D+01 -0.16203582556869D-05 + 3 1 3 1 0.67993722357318D+01 -0.76382291130977D-15 + 1 2 3 1 -0.30397345152059D+01 -0.37800569965298D+00 + 2 2 3 1 -0.30397334495218D+01 -0.37800740620081D+00 + 3 2 3 1 -0.60794631911111D+01 -0.75600826884336D+00 + 1 1 1 2 -0.26232660272242D+01 0.27548397097194D+01 + 2 1 1 2 -0.31471097005565D+01 0.35408625248446D+00 + 3 1 1 2 -0.30397345152059D+01 0.37800569965298D+00 + 1 2 1 2 0.75751844985106D+01 -0.85478073477056D-15 + 2 2 1 2 0.36969965409873D+01 0.13338772037955D+00 + 3 2 1 2 0.33996861023190D+01 0.13496433049133D-06 + 1 1 2 2 -0.31471097005565D+01 0.35408625248446D+00 + 2 1 2 2 -0.55781952704164D+01 0.21875197050809D+01 + 3 1 2 2 -0.30397334495218D+01 0.37800740620081D+00 + 1 2 2 2 0.36969965409873D+01 -0.13338772037955D+00 + 2 2 2 2 0.70451690740846D+01 -0.12505042305321D-14 + 3 2 2 2 0.33996866332262D+01 -0.16203582556869D-05 + 1 1 3 2 -0.30397345152059D+01 0.37800569965298D+00 + 2 1 3 2 -0.30397334495218D+01 0.37800740620081D+00 + 3 1 3 2 -0.60794631911111D+01 0.75600826884336D+00 + 1 2 3 2 0.33996861023190D+01 -0.13496433187520D-06 + 2 2 3 2 0.33996866332262D+01 0.16203582537696D-05 + 3 2 3 2 0.67993722357318D+01 -0.76382291130977D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.77145005003411D+01 -0.11420860691235D-15 + 2 1 1 1 0.36263811907803D+01 -0.15943929067531D+00 + 3 1 1 1 0.33908617775144D+01 -0.16027347659140D-06 + 1 2 1 1 -0.13777778420777D+01 -0.12997450254657D+01 + 2 2 1 1 -0.31251904562778D+01 -0.24153649105483D+00 + 3 2 1 1 -0.30092462944229D+01 -0.28802138617052D+00 + 1 1 2 1 0.36263811907803D+01 0.15943929067531D+00 + 2 1 2 1 0.69762673924116D+01 -0.10788726454510D-14 + 3 1 2 1 0.33908615171474D+01 0.13090214754592D-05 + 1 2 2 1 -0.31251904562778D+01 -0.24153649105483D+00 + 2 2 2 1 -0.55231275048897D+01 -0.19281700439081D+01 + 3 2 2 1 -0.30092455108873D+01 -0.28802236156411D+00 + 1 1 3 1 0.33908617775144D+01 0.16027347573925D-06 + 2 1 3 1 0.33908615171474D+01 -0.13090214767915D-05 + 3 1 3 1 0.67817224513642D+01 -0.47711221352735D-15 + 1 2 3 1 -0.30092462944229D+01 -0.28802138617052D+00 + 2 2 3 1 -0.30092455108873D+01 -0.28802236156411D+00 + 3 2 3 1 -0.60184889311910D+01 -0.57603928708007D+00 + 1 1 1 2 -0.13777778420777D+01 0.12997450254657D+01 + 2 1 1 2 -0.31251904562778D+01 0.24153649105483D+00 + 3 1 1 2 -0.30092462944229D+01 0.28802138617052D+00 + 1 2 1 2 0.77145005003411D+01 -0.11420860691235D-15 + 2 2 1 2 0.36263811907803D+01 0.15943929067531D+00 + 3 2 1 2 0.33908617775144D+01 0.16027347573925D-06 + 1 1 2 2 -0.31251904562778D+01 0.24153649105483D+00 + 2 1 2 2 -0.55231275048897D+01 0.19281700439081D+01 + 3 1 2 2 -0.30092455108873D+01 0.28802236156411D+00 + 1 2 2 2 0.36263811907803D+01 -0.15943929067531D+00 + 2 2 2 2 0.69762673924116D+01 -0.10788726454510D-14 + 3 2 2 2 0.33908615171474D+01 -0.13090214767915D-05 + 1 1 3 2 -0.30092462944229D+01 0.28802138617052D+00 + 2 1 3 2 -0.30092455108873D+01 0.28802236156411D+00 + 3 1 3 2 -0.60184889311910D+01 0.57603928708007D+00 + 1 2 3 2 0.33908617775144D+01 -0.16027347659140D-06 + 2 2 3 2 0.33908615171474D+01 0.13090214754592D-05 + 3 2 3 2 0.67817224513642D+01 -0.47711221352735D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.77207362151931D+01 0.29771323727645D-15 + 2 1 1 1 0.35555772492935D+01 -0.16092428203313D+00 + 3 1 1 1 0.33981089520476D+01 0.33436977667033D-06 + 1 2 1 1 -0.13529027618286D+01 0.56392363282598D+00 + 2 2 1 1 -0.31275676078489D+01 -0.14958660617190D+00 + 3 2 1 1 -0.30093631483776D+01 -0.19620679267448D+00 + 1 1 2 1 0.35555772492936D+01 0.16092428203313D+00 + 2 1 2 1 0.69530800425539D+01 -0.89279015313973D-15 + 3 1 2 1 0.33981086512910D+01 0.17463934952193D-05 + 1 2 2 1 -0.31275676078489D+01 -0.14958660617191D+00 + 2 2 2 1 -0.55662756317550D+01 -0.17259389820880D+01 + 3 2 2 1 -0.30093642796662D+01 -0.19620375523075D+00 + 1 1 3 1 0.33981089520476D+01 -0.33436977659827D-06 + 2 1 3 1 0.33981086512910D+01 -0.17463934958808D-05 + 3 1 3 1 0.67962153686108D+01 -0.14441928417027D-15 + 1 2 3 1 -0.30093631483776D+01 -0.19620679267448D+00 + 2 2 3 1 -0.30093642796662D+01 -0.19620375523075D+00 + 3 2 3 1 -0.60187256064799D+01 -0.39241236903103D+00 + 1 1 1 2 -0.13529027618286D+01 -0.56392363282598D+00 + 2 1 1 2 -0.31275676078489D+01 0.14958660617191D+00 + 3 1 1 2 -0.30093631483776D+01 0.19620679267448D+00 + 1 2 1 2 0.77207362151931D+01 0.29771323727645D-15 + 2 2 1 2 0.35555772492936D+01 0.16092428203313D+00 + 3 2 1 2 0.33981089520476D+01 -0.33436977659827D-06 + 1 1 2 2 -0.31275676078489D+01 0.14958660617190D+00 + 2 1 2 2 -0.55662756317550D+01 0.17259389820880D+01 + 3 1 2 2 -0.30093642796662D+01 0.19620375523075D+00 + 1 2 2 2 0.35555772492936D+01 -0.16092428203313D+00 + 2 2 2 2 0.69530800425539D+01 -0.89279015313973D-15 + 3 2 2 2 0.33981086512910D+01 -0.17463934958808D-05 + 1 1 3 2 -0.30093631483776D+01 0.19620679267448D+00 + 2 1 3 2 -0.30093642796662D+01 0.19620375523075D+00 + 3 1 3 2 -0.60187256064799D+01 0.39241236903103D+00 + 1 2 3 2 0.33981089520476D+01 0.33436977667033D-06 + 2 2 3 2 0.33981086512910D+01 0.17463934952193D-05 + 3 2 3 2 0.67962153686108D+01 -0.14441928417027D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.75808161902753D+01 0.80377726408698D-15 + 2 1 1 1 0.34983861662804D+01 -0.14831027329511D+00 + 3 1 1 1 0.34213443246328D+01 0.73097672650920D-06 + 1 2 1 1 -0.25709148126655D+01 0.20014835060956D+01 + 2 2 1 1 -0.31588435033453D+01 -0.49588639728495D-01 + 3 2 1 1 -0.30442442083268D+01 -0.87470410893850D-01 + 1 1 2 1 0.34983861662804D+01 0.14831027329511D+00 + 2 1 2 1 0.69627248693470D+01 -0.56939529123083D-15 + 3 1 2 1 0.34213445995375D+01 0.17187908723043D-05 + 1 2 2 1 -0.31588435033453D+01 -0.49588639728495D-01 + 2 2 2 1 -0.56591890235408D+01 -0.15502380496638D+01 + 3 2 2 1 -0.30442453414057D+01 -0.87471861567189D-01 + 1 1 3 1 0.34213443246328D+01 -0.73097672575670D-06 + 2 1 3 1 0.34213445995375D+01 -0.17187908728438D-05 + 3 1 3 1 0.68426876065559D+01 0.10346923387167D-15 + 1 2 3 1 -0.30442442083268D+01 -0.87470410893850D-01 + 2 2 3 1 -0.30442453414057D+01 -0.87471861567189D-01 + 3 2 3 1 -0.60884895116000D+01 -0.17494112359606D+00 + 1 1 1 2 -0.25709148126655D+01 -0.20014835060956D+01 + 2 1 1 2 -0.31588435033453D+01 0.49588639728495D-01 + 3 1 1 2 -0.30442442083268D+01 0.87470410893850D-01 + 1 2 1 2 0.75808161902754D+01 0.80377726408698D-15 + 2 2 1 2 0.34983861662804D+01 0.14831027329511D+00 + 3 2 1 2 0.34213443246328D+01 -0.73097672575670D-06 + 1 1 2 2 -0.31588435033453D+01 0.49588639728495D-01 + 2 1 2 2 -0.56591890235408D+01 0.15502380496638D+01 + 3 1 2 2 -0.30442453414057D+01 0.87471861567189D-01 + 1 2 2 2 0.34983861662804D+01 -0.14831027329511D+00 + 2 2 2 2 0.69627248693470D+01 -0.56939529123083D-15 + 3 2 2 2 0.34213445995375D+01 -0.17187908728438D-05 + 1 1 3 2 -0.30442442083268D+01 0.87470410893850D-01 + 2 1 3 2 -0.30442453414057D+01 0.87471861567189D-01 + 3 1 3 2 -0.60884895116000D+01 0.17494112359606D+00 + 1 2 3 2 0.34213443246328D+01 0.73097672650920D-06 + 2 2 3 2 0.34213445995375D+01 0.17187908723043D-05 + 3 2 3 2 0.68426876065559D+01 0.10346923387167D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.73630015194833D+01 0.52920625559763D-15 + 2 1 1 1 0.34817696666429D+01 -0.11871428386796D+00 + 3 1 1 1 0.34717189270495D+01 0.90651334189582D-06 + 1 2 1 1 -0.44923044307804D+01 0.23464469837497D+01 + 2 2 1 1 -0.32584145889594D+01 0.32621385845564D-01 + 3 2 1 1 -0.31612086396740D+01 0.13659254600543D-01 + 1 1 2 1 0.34817696666429D+01 0.11871428386796D+00 + 2 1 2 1 0.70266326978263D+01 -0.51024427166236D-15 + 3 1 2 1 0.34717196572195D+01 0.12210868686950D-05 + 1 2 2 1 -0.32584145889594D+01 0.32621385845564D-01 + 2 2 2 1 -0.58617414277048D+01 -0.13991703702862D+01 + 3 2 2 1 -0.31612072240791D+01 0.13658273603839D-01 + 1 1 3 1 0.34717189270495D+01 -0.90651334125922D-06 + 2 1 3 1 0.34717196572195D+01 -0.12210868688696D-05 + 3 1 3 1 0.69434387300382D+01 0.11379710545276D-15 + 1 2 3 1 -0.31612086396740D+01 0.13659254600543D-01 + 2 2 3 1 -0.31612072240791D+01 0.13658273603839D-01 + 3 2 3 1 -0.63224127059230D+01 0.27318371603067D-01 + 1 1 1 2 -0.44923044307804D+01 -0.23464469837497D+01 + 2 1 1 2 -0.32584145889594D+01 -0.32621385845564D-01 + 3 1 1 2 -0.31612086396740D+01 -0.13659254600543D-01 + 1 2 1 2 0.73630015194833D+01 0.52920625559763D-15 + 2 2 1 2 0.34817696666429D+01 0.11871428386796D+00 + 3 2 1 2 0.34717189270495D+01 -0.90651334125922D-06 + 1 1 2 2 -0.32584145889594D+01 -0.32621385845564D-01 + 2 1 2 2 -0.58617414277048D+01 0.13991703702862D+01 + 3 1 2 2 -0.31612072240791D+01 -0.13658273603839D-01 + 1 2 2 2 0.34817696666429D+01 -0.11871428386796D+00 + 2 2 2 2 0.70266326978263D+01 -0.51024427166236D-15 + 3 2 2 2 0.34717196572195D+01 -0.12210868688696D-05 + 1 1 3 2 -0.31612086396740D+01 -0.13659254600543D-01 + 2 1 3 2 -0.31612072240791D+01 -0.13658273603839D-01 + 3 1 3 2 -0.63224127059230D+01 -0.27318371603067D-01 + 1 2 3 2 0.34717189270495D+01 0.90651334189582D-06 + 2 2 3 2 0.34717196572195D+01 0.12210868686950D-05 + 3 2 3 2 0.69434387300382D+01 0.11379710545276D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -1.11111111E-01 1.11111111E-01 0.00000000E+00 1.0 + 1 1 1 1 0.71885393325659D+01 0.36805478534338D-15 + 2 1 1 1 0.35214552142648D+01 -0.64876429551689D-01 + 3 1 1 1 0.35489241167802D+01 0.73731413516878D-06 + 1 2 1 1 -0.62451460366615D+01 0.14021829562102D+01 + 2 2 1 1 -0.34222462220528D+01 -0.25896966152412D-05 + 3 2 1 1 -0.33731149827628D+01 -0.11320815589209D-05 + 1 1 2 1 0.35214552142648D+01 0.64876429551689D-01 + 2 1 2 1 0.71885393325659D+01 -0.38397587963729D-15 + 3 1 2 1 0.35489241167802D+01 -0.73731413520853D-06 + 1 2 2 1 -0.34222462220528D+01 -0.25896966152412D-05 + 2 2 2 1 -0.62451460366615D+01 -0.14021829562102D+01 + 3 2 2 1 -0.33731149827628D+01 0.11320815590252D-05 + 1 1 3 1 0.35489241167802D+01 -0.73731413478768D-06 + 2 1 3 1 0.35489241167802D+01 0.73731413474794D-06 + 3 1 3 1 0.70978498663238D+01 -0.35341803869323D-16 + 1 2 3 1 -0.33731149827628D+01 -0.11320815589209D-05 + 2 2 3 1 -0.33731149827628D+01 0.11320815590252D-05 + 3 2 3 1 -0.67462266423746D+01 -0.11063685366895D-05 + 1 1 1 2 -0.62451460366615D+01 -0.14021829562102D+01 + 2 1 1 2 -0.34222462220528D+01 0.25896966152412D-05 + 3 1 1 2 -0.33731149827628D+01 0.11320815589209D-05 + 1 2 1 2 0.71885393325659D+01 0.36805478534338D-15 + 2 2 1 2 0.35214552142648D+01 0.64876429551689D-01 + 3 2 1 2 0.35489241167802D+01 -0.73731413478768D-06 + 1 1 2 2 -0.34222462220528D+01 0.25896966152412D-05 + 2 1 2 2 -0.62451460366615D+01 0.14021829562102D+01 + 3 1 2 2 -0.33731149827628D+01 -0.11320815590252D-05 + 1 2 2 2 0.35214552142648D+01 -0.64876429551689D-01 + 2 2 2 2 0.71885393325659D+01 -0.38397587963729D-15 + 3 2 2 2 0.35489241167802D+01 0.73731413474794D-06 + 1 1 3 2 -0.33731149827628D+01 0.11320815589209D-05 + 2 1 3 2 -0.33731149827628D+01 -0.11320815590252D-05 + 3 1 3 2 -0.67462266423746D+01 0.11063685366895D-05 + 1 2 3 2 0.35489241167802D+01 0.73731413516878D-06 + 2 2 3 2 0.35489241167802D+01 -0.73731413520853D-06 + 3 2 3 2 0.70978498663238D+01 -0.35341803869323D-16 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.73868746924173D+01 -0.11201434709803D-14 + 2 1 1 1 0.40418408107374D+01 -0.11357475002617D-14 + 3 1 1 1 0.33450338816799D+01 -0.11311537571705D-14 + 1 2 1 1 -0.40683407592330D+01 -0.34137432300919D+01 + 2 2 1 1 -0.31027453250018D+01 -0.60466076729814D+00 + 3 2 1 1 -0.29340800757924D+01 -0.46313381891416D+00 + 1 1 2 1 0.40418408107374D+01 -0.11357475002617D-14 + 2 1 2 1 0.73868746924173D+01 -0.12255774443756D-14 + 3 1 2 1 0.33450338816799D+01 -0.10622597611715D-14 + 1 2 2 1 -0.31027453250018D+01 -0.60466076729814D+00 + 2 2 2 1 -0.40683407592330D+01 -0.34137432300919D+01 + 3 2 2 1 -0.29340800757924D+01 -0.46313381891416D+00 + 1 1 3 1 0.33450338816799D+01 -0.11311537571705D-14 + 2 1 3 1 0.33450338816799D+01 -0.10622597611715D-14 + 3 1 3 1 0.66900677633599D+01 -0.10348058622620D-14 + 1 2 3 1 -0.29340800757924D+01 -0.46313381891416D+00 + 2 2 3 1 -0.29340800757924D+01 -0.46313381891417D+00 + 3 2 3 1 -0.58681601515847D+01 -0.92626763782833D+00 + 1 1 1 2 -0.40683407592330D+01 0.34137432300919D+01 + 2 1 1 2 -0.31027453250018D+01 0.60466076729814D+00 + 3 1 1 2 -0.29340800757924D+01 0.46313381891416D+00 + 1 2 1 2 0.73868746924173D+01 -0.11201434709803D-14 + 2 2 1 2 0.40418408107374D+01 -0.11357475002617D-14 + 3 2 1 2 0.33450338816799D+01 -0.11311537571705D-14 + 1 1 2 2 -0.31027453250018D+01 0.60466076729814D+00 + 2 1 2 2 -0.40683407592330D+01 0.34137432300919D+01 + 3 1 2 2 -0.29340800757924D+01 0.46313381891416D+00 + 1 2 2 2 0.40418408107374D+01 -0.11357475002617D-14 + 2 2 2 2 0.73868746924173D+01 -0.12255774443756D-14 + 3 2 2 2 0.33450338816800D+01 -0.10622597611715D-14 + 1 1 3 2 -0.29340800757924D+01 0.46313381891416D+00 + 2 1 3 2 -0.29340800757924D+01 0.46313381891417D+00 + 3 1 3 2 -0.58681601515847D+01 0.92626763782833D+00 + 1 2 3 2 0.33450338816799D+01 -0.11311537571705D-14 + 2 2 3 2 0.33450338816799D+01 -0.10622597611715D-14 + 3 2 3 2 0.66900677633599D+01 -0.10348058622620D-14 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.74982827322243D+01 -0.10375342515104D-14 + 2 1 1 1 0.40565332347497D+01 -0.13228947892619D+00 + 3 1 1 1 0.32967995965583D+01 -0.29384299388416D-06 + 1 2 1 1 -0.21582908247716D+01 -0.29716961102159D+01 + 2 2 1 1 -0.29992620481946D+01 -0.45476407419932D+00 + 3 2 1 1 -0.28304326646854D+01 -0.37859485037688D+00 + 1 1 2 1 0.40565332347498D+01 0.13228947892618D+00 + 2 1 2 1 0.73076761345100D+01 -0.14871718358915D-14 + 3 1 2 1 0.32967998746535D+01 0.97734821891874D-06 + 1 2 2 1 -0.29992620481946D+01 -0.45476407419932D+00 + 2 2 2 1 -0.36987888603968D+01 -0.32248624499176D+01 + 3 2 2 1 -0.28304318253354D+01 -0.37859245693521D+00 + 1 1 3 1 0.32967995965583D+01 0.29384299201182D-06 + 2 1 3 1 0.32967998746535D+01 -0.97734822067587D-06 + 3 1 3 1 0.65936007668200D+01 -0.85144582623012D-15 + 1 2 3 1 -0.28304326646854D+01 -0.37859485037688D+00 + 2 2 3 1 -0.28304318253354D+01 -0.37859245693521D+00 + 3 2 3 1 -0.56608612955081D+01 -0.75718624992475D+00 + 1 1 1 2 -0.21582908247716D+01 0.29716961102159D+01 + 2 1 1 2 -0.29992620481946D+01 0.45476407419932D+00 + 3 1 1 2 -0.28304326646854D+01 0.37859485037688D+00 + 1 2 1 2 0.74982827322243D+01 -0.10375342515104D-14 + 2 2 1 2 0.40565332347497D+01 0.13228947892618D+00 + 3 2 1 2 0.32967995965583D+01 0.29384299201182D-06 + 1 1 2 2 -0.29992620481946D+01 0.45476407419932D+00 + 2 1 2 2 -0.36987888603968D+01 0.32248624499176D+01 + 3 1 2 2 -0.28304318253354D+01 0.37859245693521D+00 + 1 2 2 2 0.40565332347497D+01 -0.13228947892619D+00 + 2 2 2 2 0.73076761345100D+01 -0.14871718358915D-14 + 3 2 2 2 0.32967998746535D+01 -0.97734822067587D-06 + 1 1 3 2 -0.28304326646854D+01 0.37859485037688D+00 + 2 1 3 2 -0.28304318253354D+01 0.37859245693521D+00 + 3 1 3 2 -0.56608612955081D+01 0.75718624992475D+00 + 1 2 3 2 0.32967995965583D+01 -0.29384299388416D-06 + 2 2 3 2 0.32967998746535D+01 0.97734821891874D-06 + 3 2 3 2 0.65936007668200D+01 -0.85144582623012D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.75322497691456D+01 -0.15334997741607D-15 + 2 1 1 1 0.39253384450977D+01 -0.19888514848998D+00 + 3 1 1 1 0.32835859014930D+01 -0.12778406778163D-06 + 1 2 1 1 -0.94711808428337D+00 -0.14246235040271D+01 + 2 2 1 1 -0.30153833448332D+01 -0.27816252867977D+00 + 3 2 1 1 -0.27973012270727D+01 -0.29369711267844D+00 + 1 1 2 1 0.39253384450977D+01 0.19888514848998D+00 + 2 1 2 1 0.71684985380198D+01 -0.13755282154417D-14 + 3 1 2 1 0.32835851462387D+01 0.49939408517414D-06 + 1 2 2 1 -0.30153833448332D+01 -0.27816252867977D+00 + 2 2 2 1 -0.36405687562742D+01 -0.28800527124006D+01 + 3 2 2 1 -0.27973011438687D+01 -0.29370017650345D+00 + 1 1 3 1 0.32835859014930D+01 0.12778406674523D-06 + 2 1 3 1 0.32835851462387D+01 -0.49939408624474D-06 + 3 1 3 1 0.65671719805186D+01 -0.62105226365055D-15 + 1 2 3 1 -0.27973012270727D+01 -0.29369711267844D+00 + 2 2 3 1 -0.27973011438687D+01 -0.29370017650345D+00 + 3 2 3 1 -0.55946024959213D+01 -0.58739558948326D+00 + 1 1 1 2 -0.94711808428337D+00 0.14246235040271D+01 + 2 1 1 2 -0.30153833448332D+01 0.27816252867977D+00 + 3 1 1 2 -0.27973012270727D+01 0.29369711267844D+00 + 1 2 1 2 0.75322497691457D+01 -0.15334997741607D-15 + 2 2 1 2 0.39253384450977D+01 0.19888514848998D+00 + 3 2 1 2 0.32835859014930D+01 0.12778406674523D-06 + 1 1 2 2 -0.30153833448332D+01 0.27816252867977D+00 + 2 1 2 2 -0.36405687562742D+01 0.28800527124006D+01 + 3 1 2 2 -0.27973011438687D+01 0.29370017650345D+00 + 1 2 2 2 0.39253384450977D+01 -0.19888514848998D+00 + 2 2 2 2 0.71684985380198D+01 -0.13755282154417D-14 + 3 2 2 2 0.32835851462388D+01 -0.49939408624474D-06 + 1 1 3 2 -0.27973012270727D+01 0.29369711267844D+00 + 2 1 3 2 -0.27973011438687D+01 0.29370017650345D+00 + 3 1 3 2 -0.55946024959213D+01 0.58739558948326D+00 + 1 2 3 2 0.32835859014930D+01 -0.12778406778163D-06 + 2 2 3 2 0.32835851462388D+01 0.49939408517414D-06 + 3 2 3 2 0.65671719805186D+01 -0.62105226365055D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.74889142584825D+01 0.42178698162479D-15 + 2 1 1 1 0.37736457850240D+01 -0.20846044688113D+00 + 3 1 1 1 0.32923736335731D+01 0.64727176100899D-06 + 1 2 1 1 -0.93680568672206D+00 0.51130502073969D+00 + 2 2 1 1 -0.30407362206084D+01 -0.16972383352014D+00 + 3 2 1 1 -0.27896612621215D+01 -0.20860471328089D+00 + 1 1 2 1 0.37736457850240D+01 0.20846044688113D+00 + 2 1 2 1 0.70942314536571D+01 -0.11258880241273D-14 + 3 1 2 1 0.32923726174104D+01 0.93352252089985D-06 + 1 2 2 1 -0.30407362206084D+01 -0.16972383352014D+00 + 2 2 2 1 -0.37353357286921D+01 -0.26463837950170D+01 + 3 2 2 1 -0.27896629034952D+01 -0.20860210361168D+00 + 1 1 3 1 0.32923736335731D+01 -0.64727176110542D-06 + 2 1 3 1 0.32923726174104D+01 -0.93352252201288D-06 + 3 1 3 1 0.65847462154303D+01 -0.29097823701866D-15 + 1 2 3 1 -0.27896612621215D+01 -0.20860471328089D+00 + 2 2 3 1 -0.27896629034952D+01 -0.20860210361168D+00 + 3 2 3 1 -0.55793238106659D+01 -0.41720777829569D+00 + 1 1 1 2 -0.93680568672206D+00 -0.51130502073969D+00 + 2 1 1 2 -0.30407362206084D+01 0.16972383352014D+00 + 3 1 1 2 -0.27896612621215D+01 0.20860471328089D+00 + 1 2 1 2 0.74889142584825D+01 0.42178698162479D-15 + 2 2 1 2 0.37736457850240D+01 0.20846044688113D+00 + 3 2 1 2 0.32923736335731D+01 -0.64727176110542D-06 + 1 1 2 2 -0.30407362206084D+01 0.16972383352014D+00 + 2 1 2 2 -0.37353357286921D+01 0.26463837950170D+01 + 3 1 2 2 -0.27896629034952D+01 0.20860210361168D+00 + 1 2 2 2 0.37736457850240D+01 -0.20846044688113D+00 + 2 2 2 2 0.70942314536571D+01 -0.11258880241273D-14 + 3 2 2 2 0.32923726174105D+01 -0.93352252201288D-06 + 1 1 3 2 -0.27896612621215D+01 0.20860471328089D+00 + 2 1 3 2 -0.27896629034952D+01 0.20860210361168D+00 + 3 1 3 2 -0.55793238106659D+01 0.41720777829569D+00 + 1 2 3 2 0.32923736335731D+01 0.64727176100899D-06 + 2 2 3 2 0.32923726174104D+01 0.93352252089985D-06 + 3 2 3 2 0.65847462154303D+01 -0.29097823701866D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.73453818768769D+01 0.10521017035410D-14 + 2 1 1 1 0.36283501173140D+01 -0.19781267972686D+00 + 3 1 1 1 0.33212387352553D+01 0.63191095094660D-06 + 1 2 1 1 -0.21596139351007D+01 0.19991987453976D+01 + 2 2 1 1 -0.30687241367014D+01 -0.75407020649669D-01 + 3 2 1 1 -0.28173836097283D+01 -0.10278993894542D+00 + 1 1 2 1 0.36283501173140D+01 0.19781267972686D+00 + 2 1 2 1 0.70836336814184D+01 -0.95417972631361D-15 + 3 1 2 1 0.33212377522021D+01 0.15616480275237D-05 + 1 2 2 1 -0.30687241367014D+01 -0.75407020649669D-01 + 2 2 2 1 -0.38709590646084D+01 -0.24900928261014D+01 + 3 2 2 1 -0.28173847862040D+01 -0.10279202174721D+00 + 1 1 3 1 0.33212387352553D+01 -0.63191095029997D-06 + 2 1 3 1 0.33212377522021D+01 -0.15616480282216D-05 + 3 1 3 1 0.66424763600908D+01 -0.62866882836095D-16 + 1 2 3 1 -0.28173836097283D+01 -0.10278993894542D+00 + 2 2 3 1 -0.28173847862040D+01 -0.10279202174721D+00 + 3 2 3 1 -0.56347699877913D+01 -0.20558054100422D+00 + 1 1 1 2 -0.21596139351007D+01 -0.19991987453976D+01 + 2 1 1 2 -0.30687241367014D+01 0.75407020649669D-01 + 3 1 1 2 -0.28173836097283D+01 0.10278993894542D+00 + 1 2 1 2 0.73453818768769D+01 0.10521017035410D-14 + 2 2 1 2 0.36283501173140D+01 0.19781267972686D+00 + 3 2 1 2 0.33212387352553D+01 -0.63191095029997D-06 + 1 1 2 2 -0.30687241367014D+01 0.75407020649669D-01 + 2 1 2 2 -0.38709590646084D+01 0.24900928261014D+01 + 3 1 2 2 -0.28173847862040D+01 0.10279202174721D+00 + 1 2 2 2 0.36283501173140D+01 -0.19781267972686D+00 + 2 2 2 2 0.70836336814184D+01 -0.95417972631361D-15 + 3 2 2 2 0.33212377522022D+01 -0.15616480282216D-05 + 1 1 3 2 -0.28173836097283D+01 0.10278993894542D+00 + 2 1 3 2 -0.28173847862040D+01 0.10279202174721D+00 + 3 1 3 2 -0.56347699877913D+01 0.20558054100422D+00 + 1 2 3 2 0.33212387352553D+01 0.63191095094660D-06 + 2 2 3 2 0.33212377522021D+01 0.15616480275237D-05 + 3 2 3 2 0.66424763600908D+01 -0.62866882836095D-16 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 2.22222222E-01 0.00000000E+00 1.0 + 1 1 1 1 0.71558321003790D+01 0.80855673930944D-15 + 2 1 1 1 0.35237661691150D+01 -0.17493578867332D+00 + 3 1 1 1 0.33807824450490D+01 0.75971958448301D-06 + 1 2 1 1 -0.40918090562636D+01 0.23617464400406D+01 + 2 2 1 1 -0.31444589450569D+01 -0.50723944170917D-05 + 3 2 1 1 -0.29360873658210D+01 -0.27104621207765D-05 + 1 1 2 1 0.35237661691150D+01 0.17493578867332D+00 + 2 1 2 1 0.71558321003790D+01 -0.79394661175681D-15 + 3 1 2 1 0.33807824450490D+01 -0.75971958448890D-06 + 1 2 2 1 -0.31444589450569D+01 -0.50723944170917D-05 + 2 2 2 1 -0.40918090562636D+01 -0.23617464400406D+01 + 3 2 2 1 -0.29360873658210D+01 0.27104621221090D-05 + 1 1 3 1 0.33807824450490D+01 -0.75971958392944D-06 + 2 1 3 1 0.33807824450490D+01 0.75971958392354D-06 + 3 1 3 1 0.67615656059623D+01 -0.81391947276938D-17 + 1 2 3 1 -0.29360873658210D+01 -0.27104621207765D-05 + 2 2 3 1 -0.29360873658210D+01 0.27104621221090D-05 + 3 2 3 1 -0.58721699961666D+01 -0.37592120564064D-05 + 1 1 1 2 -0.40918090562636D+01 -0.23617464400406D+01 + 2 1 1 2 -0.31444589450569D+01 0.50723944170917D-05 + 3 1 1 2 -0.29360873658210D+01 0.27104621207765D-05 + 1 2 1 2 0.71558321003790D+01 0.80855673930944D-15 + 2 2 1 2 0.35237661691150D+01 0.17493578867332D+00 + 3 2 1 2 0.33807824450490D+01 -0.75971958392944D-06 + 1 1 2 2 -0.31444589450569D+01 0.50723944170917D-05 + 2 1 2 2 -0.40918090562636D+01 0.23617464400406D+01 + 3 1 2 2 -0.29360873658210D+01 -0.27104621221090D-05 + 1 2 2 2 0.35237661691150D+01 -0.17493578867332D+00 + 2 2 2 2 0.71558321003790D+01 -0.79394661175681D-15 + 3 2 2 2 0.33807824450490D+01 0.75971958392354D-06 + 1 1 3 2 -0.29360873658210D+01 0.27104621207765D-05 + 2 1 3 2 -0.29360873658210D+01 -0.27104621221090D-05 + 3 1 3 2 -0.58721699961666D+01 0.37592120564064D-05 + 1 2 3 2 0.33807824450490D+01 0.75971958448301D-06 + 2 2 3 2 0.33807824450490D+01 -0.75971958448890D-06 + 3 2 3 2 0.67615656059623D+01 -0.81391947276938D-17 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 3.33333333E-01 0.00000000E+00 1.0 + 1 1 1 1 0.76034898144929D+01 -0.11344195922066D-14 + 2 1 1 1 0.43620899682974D+01 -0.11175886577203D-14 + 3 1 1 1 0.32413998461956D+01 -0.11372389186903D-14 + 1 2 1 1 -0.17000885756141D+01 -0.29446397896189D+01 + 2 2 1 1 -0.28221464710366D+01 -0.43646208171235D+00 + 3 2 1 1 -0.27331745600233D+01 -0.28235821142814D+00 + 1 1 2 1 0.43620899682974D+01 -0.11175885518412D-14 + 2 1 2 1 0.76034898144929D+01 -0.10307350978763D-14 + 3 1 2 1 0.32413998461955D+01 -0.10052952492471D-14 + 1 2 2 1 -0.28221464710366D+01 -0.43646208171235D+00 + 2 2 2 1 -0.17000885756141D+01 -0.29446397896189D+01 + 3 2 2 1 -0.27331745600233D+01 -0.28235821142814D+00 + 1 1 3 1 0.32413998461956D+01 -0.11372389716298D-14 + 2 1 3 1 0.32413998461955D+01 -0.10052953286564D-14 + 3 1 3 1 0.64827996923911D+01 -0.83312256030140D-15 + 1 2 3 1 -0.27331745600233D+01 -0.28235821142814D+00 + 2 2 3 1 -0.27331745600233D+01 -0.28235821142814D+00 + 3 2 3 1 -0.54663491200466D+01 -0.56471642285629D+00 + 1 1 1 2 -0.17000885756141D+01 0.29446397896190D+01 + 2 1 1 2 -0.28221464710366D+01 0.43646208171235D+00 + 3 1 1 2 -0.27331745600233D+01 0.28235821142814D+00 + 1 2 1 2 0.76034898144929D+01 -0.11344195922066D-14 + 2 2 1 2 0.43620899682974D+01 -0.11175884989016D-14 + 3 2 1 2 0.32413998461956D+01 -0.11372388657507D-14 + 1 1 2 2 -0.28221464710366D+01 0.43646208171235D+00 + 2 1 2 2 -0.17000885756141D+01 0.29446397896189D+01 + 3 1 2 2 -0.27331745600233D+01 0.28235821142814D+00 + 1 2 2 2 0.43620899682974D+01 -0.11175885518412D-14 + 2 2 2 2 0.76034898144929D+01 -0.10307350978763D-14 + 3 2 2 2 0.32413998461956D+01 -0.10052953088041D-14 + 1 1 3 2 -0.27331745600233D+01 0.28235821142814D+00 + 2 1 3 2 -0.27331745600233D+01 0.28235821142814D+00 + 3 1 3 2 -0.54663491200466D+01 0.56471642285629D+00 + 1 2 3 2 0.32413998461956D+01 -0.11372389716299D-14 + 2 2 3 2 0.32413998461955D+01 -0.10052952426297D-14 + 3 2 3 2 0.64827996923911D+01 -0.83312256030140D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 3.33333333E-01 0.00000000E+00 1.0 + 1 1 1 1 0.76221749968866D+01 -0.26521296928597D-15 + 2 1 1 1 0.42999906724785D+01 -0.16098219746579D+00 + 3 1 1 1 0.32204199355180D+01 -0.60607680917895D-06 + 1 2 1 1 -0.54978092305385D+00 -0.14237874135647D+01 + 2 2 1 1 -0.28403604713019D+01 -0.25166710746186D+00 + 3 2 1 1 -0.27035454615421D+01 -0.19129892097742D+00 + 1 1 2 1 0.42999906724785D+01 0.16098219746579D+00 + 2 1 2 1 0.75081263324812D+01 -0.14179650504755D-14 + 3 1 2 1 0.32204191018177D+01 -0.22147157008571D-06 + 1 2 2 1 -0.28403604713019D+01 -0.25166710746186D+00 + 2 2 2 1 -0.15438568476948D+01 -0.25570990773463D+01 + 3 2 2 1 -0.27035470037468D+01 -0.19129687274990D+00 + 1 1 3 1 0.32204199355180D+01 0.60607680850774D-06 + 2 1 3 1 0.32204191018177D+01 0.22147156817630D-06 + 3 1 3 1 0.64408401124613D+01 -0.55095356209629D-15 + 1 2 3 1 -0.27035454615421D+01 -0.19129892097742D+00 + 2 2 3 1 -0.27035470037468D+01 -0.19129687274990D+00 + 3 2 3 1 -0.54070913362529D+01 -0.38259479017179D+00 + 1 1 1 2 -0.54978092305385D+00 0.14237874135647D+01 + 2 1 1 2 -0.28403604713019D+01 0.25166710746186D+00 + 3 1 1 2 -0.27035454615421D+01 0.19129892097742D+00 + 1 2 1 2 0.76221749968866D+01 -0.26521296928597D-15 + 2 2 1 2 0.42999906724785D+01 0.16098219746579D+00 + 3 2 1 2 0.32204199355180D+01 0.60607680850774D-06 + 1 1 2 2 -0.28403604713019D+01 0.25166710746186D+00 + 2 1 2 2 -0.15438568476948D+01 0.25570990773463D+01 + 3 1 2 2 -0.27035470037468D+01 0.19129687274990D+00 + 1 2 2 2 0.42999906724785D+01 -0.16098219746579D+00 + 2 2 2 2 0.75081263324812D+01 -0.14179650504755D-14 + 3 2 2 2 0.32204191018178D+01 0.22147156817630D-06 + 1 1 3 2 -0.27035454615421D+01 0.19129892097742D+00 + 2 1 3 2 -0.27035470037468D+01 0.19129687274990D+00 + 3 1 3 2 -0.54070913362529D+01 0.38259479017179D+00 + 1 2 3 2 0.32204199355180D+01 -0.60607680917895D-06 + 2 2 3 2 0.32204191018177D+01 -0.22147157008571D-06 + 3 2 3 2 0.64408401124613D+01 -0.55095356209629D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 3.33333333E-01 0.00000000E+00 1.0 + 1 1 1 1 0.74795911373932D+01 0.49297371477225D-15 + 2 1 1 1 0.40641564951126D+01 -0.21365309278235D+00 + 3 1 1 1 0.32245018554489D+01 0.29833612406560D-06 + 1 2 1 1 -0.63873780897046D+00 0.56009108862386D+00 + 2 2 1 1 -0.29403580492435D+01 -0.10236852242736D+00 + 3 2 1 1 -0.26918322475390D+01 -0.10537441049237D+00 + 1 1 2 1 0.40641564951126D+01 0.21365309278234D+00 + 2 1 2 1 0.73487835174537D+01 -0.13537514785580D-14 + 3 1 2 1 0.32245006876816D+01 0.28105361560581D-06 + 1 2 2 1 -0.29403580492435D+01 -0.10236852242736D+00 + 2 2 2 1 -0.17100508535555D+01 -0.22447006405031D+01 + 3 2 2 1 -0.26918305174840D+01 -0.10537555320400D+00 + 1 1 3 1 0.32245018554489D+01 -0.29833612399211D-06 + 2 1 3 1 0.32245006876816D+01 -0.28105361668562D-06 + 3 1 3 1 0.64490023886813D+01 -0.17377382855442D-15 + 1 2 3 1 -0.26918322475390D+01 -0.10537441049237D+00 + 2 2 3 1 -0.26918305174840D+01 -0.10537555320400D+00 + 3 2 3 1 -0.53836615465102D+01 -0.21074903352985D+00 + 1 1 1 2 -0.63873780897046D+00 -0.56009108862386D+00 + 2 1 1 2 -0.29403580492435D+01 0.10236852242736D+00 + 3 1 1 2 -0.26918322475390D+01 0.10537441049237D+00 + 1 2 1 2 0.74795911373932D+01 0.49297371477225D-15 + 2 2 1 2 0.40641564951126D+01 0.21365309278234D+00 + 3 2 1 2 0.32245018554489D+01 -0.29833612399211D-06 + 1 1 2 2 -0.29403580492435D+01 0.10236852242736D+00 + 2 1 2 2 -0.17100508535555D+01 0.22447006405031D+01 + 3 1 2 2 -0.26918305174840D+01 0.10537555320400D+00 + 1 2 2 2 0.40641564951126D+01 -0.21365309278235D+00 + 2 2 2 2 0.73487835174537D+01 -0.13537514785580D-14 + 3 2 2 2 0.32245006876816D+01 -0.28105361668562D-06 + 1 1 3 2 -0.26918322475390D+01 0.10537441049237D+00 + 2 1 3 2 -0.26918305174840D+01 0.10537555320400D+00 + 3 1 3 2 -0.53836615465102D+01 0.21074903352985D+00 + 1 2 3 2 0.32245018554489D+01 0.29833612406560D-06 + 2 2 3 2 0.32245006876816D+01 0.28105361560581D-06 + 3 2 3 2 0.64490023886813D+01 -0.17377382855442D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 3.33333333E-01 0.00000000E+00 1.0 + 1 1 1 1 0.72835439688910D+01 0.12638349689496D-14 + 2 1 1 1 0.38258889149322D+01 -0.21338510058956D+00 + 3 1 1 1 0.32557031002926D+01 0.68029433890867D-06 + 1 2 1 1 -0.19133298157192D+01 0.20935536655219D+01 + 2 2 1 1 -0.30014276862709D+01 -0.27227796198610D-05 + 3 2 1 1 -0.27085601533332D+01 0.97038321732268D-07 + 1 1 2 1 0.38258889149322D+01 0.21338510058956D+00 + 2 1 2 1 0.72835439688910D+01 -0.12473291569821D-14 + 3 1 2 1 0.32557017754549D+01 0.87652881788681D-06 + 1 2 2 1 -0.30014276862709D+01 -0.27227796198610D-05 + 2 2 2 1 -0.19133298157192D+01 -0.20935536655219D+01 + 3 2 2 1 -0.27085640664862D+01 0.86759994483010D-06 + 1 1 3 1 0.32557031002926D+01 -0.68029433798407D-06 + 2 1 3 1 0.32557017754549D+01 -0.87652881883503D-06 + 3 1 3 1 0.65114046398799D+01 0.28236003329094D-16 + 1 2 3 1 -0.27085601533332D+01 0.97038321732268D-07 + 2 2 3 1 -0.27085640664862D+01 0.86759994483010D-06 + 3 2 3 1 -0.54171247318395D+01 -0.17550806457779D-05 + 1 1 1 2 -0.19133298157192D+01 -0.20935536655219D+01 + 2 1 1 2 -0.30014276862709D+01 0.27227796198610D-05 + 3 1 1 2 -0.27085601533332D+01 -0.97038321732268D-07 + 1 2 1 2 0.72835439688910D+01 0.12638349689496D-14 + 2 2 1 2 0.38258889149322D+01 0.21338510058956D+00 + 3 2 1 2 0.32557031002926D+01 -0.68029433798407D-06 + 1 1 2 2 -0.30014276862709D+01 0.27227796198610D-05 + 2 1 2 2 -0.19133298157192D+01 0.20935536655219D+01 + 3 1 2 2 -0.27085640664862D+01 -0.86759994483010D-06 + 1 2 2 2 0.38258889149322D+01 -0.21338510058956D+00 + 2 2 2 2 0.72835439688910D+01 -0.12473291569821D-14 + 3 2 2 2 0.32557017754549D+01 -0.87652881883503D-06 + 1 1 3 2 -0.27085601533332D+01 -0.97038321732268D-07 + 2 1 3 2 -0.27085640664862D+01 -0.86759994483010D-06 + 3 1 3 2 -0.54171247318395D+01 0.17550806457779D-05 + 1 2 3 2 0.32557031002926D+01 0.68029433890867D-06 + 2 2 3 2 0.32557017754549D+01 0.87652881788681D-06 + 3 2 3 2 0.65114046398799D+01 0.28236003329094D-16 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 4.44444444E-01 0.00000000E+00 1.0 + 1 1 1 1 0.77565688614420D+01 -0.38552318527523D-15 + 2 1 1 1 0.45601629539186D+01 -0.42699960467787D-15 + 3 1 1 1 0.31964059075233D+01 -0.37737925070449D-15 + 1 2 1 1 -0.20336574518795D+00 -0.11533444524757D+01 + 2 2 1 1 -0.26975329825763D+01 -0.14905546260557D+00 + 3 2 1 1 -0.26872376122608D+01 -0.90667516157358D-01 + 1 1 2 1 0.45601629539186D+01 -0.42699960467788D-15 + 2 1 2 1 0.77565688614419D+01 -0.29435491975053D-15 + 3 1 2 1 0.31964059075233D+01 -0.37867271753319D-15 + 1 2 2 1 -0.26975329825763D+01 -0.14905546260557D+00 + 2 2 2 1 -0.20336574518795D+00 -0.11533444524757D+01 + 3 2 2 1 -0.26872376122609D+01 -0.90667516157357D-01 + 1 1 3 1 0.31964059075233D+01 -0.37737927717428D-15 + 2 1 3 1 0.31964059075233D+01 -0.37867267782852D-15 + 3 1 3 1 0.63928118150466D+01 -0.35711452125185D-15 + 1 2 3 1 -0.26872376122608D+01 -0.90667516157358D-01 + 2 2 3 1 -0.26872376122609D+01 -0.90667516157357D-01 + 3 2 3 1 -0.53744752245217D+01 -0.18133503231471D+00 + 1 1 1 2 -0.20336574518796D+00 0.11533444524757D+01 + 2 1 1 2 -0.26975329825763D+01 0.14905546260557D+00 + 3 1 1 2 -0.26872376122609D+01 0.90667516157358D-01 + 1 2 1 2 0.77565688614420D+01 -0.38552318527523D-15 + 2 2 1 2 0.45601629539186D+01 -0.42699964438255D-15 + 3 2 1 2 0.31964059075233D+01 -0.37737925070450D-15 + 1 1 2 2 -0.26975329825763D+01 0.14905546260557D+00 + 2 1 2 2 -0.20336574518796D+00 0.11533444524757D+01 + 3 1 2 2 -0.26872376122609D+01 0.90667516157357D-01 + 1 2 2 2 0.45601629539186D+01 -0.42699961791276D-15 + 2 2 2 2 0.77565688614419D+01 -0.29435491975053D-15 + 3 2 2 2 0.31964059075233D+01 -0.37867267782852D-15 + 1 1 3 2 -0.26872376122609D+01 0.90667516157358D-01 + 2 1 3 2 -0.26872376122609D+01 0.90667516157357D-01 + 3 1 3 2 -0.53744752245217D+01 0.18133503231471D+00 + 1 2 3 2 0.31964059075233D+01 -0.37737927717427D-15 + 2 2 3 2 0.31964059075233D+01 -0.37867270429830D-15 + 3 2 3 2 0.63928118150466D+01 -0.35711452125185D-15 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 4.44444444E-01 0.00000000E+00 1.0 + 1 1 1 1 0.76349251194041D+01 0.47419056535019D-15 + 2 1 1 1 0.43914266111672D+01 -0.16627209702552D+00 + 3 1 1 1 0.31957906474935D+01 -0.87633599794927D-07 + 1 2 1 1 -0.32430655157514D+00 0.73464808848618D+00 + 2 2 1 1 -0.27931575767105D+01 -0.52617201109465D-06 + 3 2 1 1 -0.26805361954185D+01 0.88892871904649D-06 + 1 1 2 1 0.43914266111672D+01 0.16627209702552D+00 + 2 1 2 1 0.76349251194041D+01 -0.45815430800896D-15 + 3 1 2 1 0.31957906474935D+01 0.87633599729104D-07 + 1 2 2 1 -0.27931575767105D+01 -0.52617201109465D-06 + 2 2 2 1 -0.32430655157514D+00 -0.73464808848618D+00 + 3 2 2 1 -0.26805361954185D+01 -0.88892871890509D-06 + 1 1 3 1 0.31957906474935D+01 0.87633600091049D-07 + 2 1 3 1 0.31957906474935D+01 -0.87633600156872D-07 + 3 1 3 1 0.63915790129188D+01 0.34053365559786D-16 + 1 2 3 1 -0.26805361954185D+01 0.88892871904649D-06 + 2 2 3 1 -0.26805361954185D+01 -0.88892871890509D-06 + 3 2 3 1 -0.53610685275501D+01 0.15383206866607D-05 + 1 1 1 2 -0.32430655157514D+00 -0.73464808848618D+00 + 2 1 1 2 -0.27931575767105D+01 0.52617201109465D-06 + 3 1 1 2 -0.26805361954185D+01 -0.88892871904649D-06 + 1 2 1 2 0.76349251194041D+01 0.47419056535019D-15 + 2 2 1 2 0.43914266111672D+01 0.16627209702552D+00 + 3 2 1 2 0.31957906474935D+01 0.87633600091049D-07 + 1 1 2 2 -0.27931575767105D+01 0.52617201109465D-06 + 2 1 2 2 -0.32430655157514D+00 0.73464808848618D+00 + 3 1 2 2 -0.26805361954185D+01 0.88892871890509D-06 + 1 2 2 2 0.43914266111672D+01 -0.16627209702552D+00 + 2 2 2 2 0.76349251194041D+01 -0.45815430800896D-15 + 3 2 2 2 0.31957906474935D+01 -0.87633600156872D-07 + 1 1 3 2 -0.26805361954185D+01 -0.88892871904649D-06 + 2 1 3 2 -0.26805361954185D+01 0.88892871890509D-06 + 3 1 3 2 -0.53610685275501D+01 -0.15383206866607D-05 + 1 2 3 2 0.31957906474935D+01 -0.87633599794927D-07 + 2 2 3 2 0.31957906474935D+01 0.87633599729104D-07 + 3 2 3 2 0.63915790129188D+01 0.34053365559786D-16 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt 3.33333333E-01 2.22222222E-01 1.11111111E-01 1.0 + 1 1 1 1 0.73791468453293D+01 -0.11550537907556D-14 + 2 1 1 1 0.39050397607050D+01 -0.11988356101810D+00 + 3 1 1 1 0.34741074423328D+01 -0.11988523332340D+00 + 1 2 1 1 -0.19384942105827D+01 -0.33575736889183D+01 + 2 2 1 1 -0.27638307323229D+01 -0.71625707083865D+00 + 3 2 1 1 -0.27001138613376D+01 -0.60589969122189D+00 + 1 1 2 1 0.39050397607050D+01 0.11988356101810D+00 + 2 1 2 1 0.72926986593267D+01 -0.14673785410696D-14 + 3 1 2 1 0.35483554918587D+01 -0.81976955936818D-01 + 1 2 2 1 -0.27638307323229D+01 -0.71625707083865D+00 + 2 2 2 1 -0.35315947608553D+01 -0.37214443347238D+01 + 3 2 2 1 -0.27441602612750D+01 -0.68219200528969D+00 + 1 1 3 1 0.34741074423328D+01 0.11988523332340D+00 + 2 1 3 1 0.35483554918587D+01 0.81976955936815D-01 + 1 2 3 1 -0.27001138613376D+01 -0.60589969122189D+00 + 2 2 3 1 -0.27441602612750D+01 -0.68219200528969D+00 + 1 1 1 2 -0.19384942105827D+01 0.33575736889183D+01 + 2 1 1 2 -0.27638307323229D+01 0.71625707083865D+00 + 3 1 1 2 -0.27001138613376D+01 0.60589969122189D+00 + 1 2 1 2 0.73791468453293D+01 -0.11550537907556D-14 + 2 2 1 2 0.39050397607050D+01 0.11988356101810D+00 + 3 2 1 2 0.34741074423329D+01 0.11988523332340D+00 + 1 1 2 2 -0.27638307323229D+01 0.71625707083865D+00 + 2 1 2 2 -0.35315947608553D+01 0.37214443347238D+01 + 3 1 2 2 -0.27441602612750D+01 0.68219200528969D+00 + 1 2 2 2 0.39050397607050D+01 -0.11988356101810D+00 + 2 2 2 2 0.72926986593267D+01 -0.14673785410696D-14 + 3 2 2 2 0.35483554918587D+01 0.81976955936815D-01 + 1 1 3 2 -0.27001138613376D+01 0.60589969122189D+00 + 2 1 3 2 -0.27441602612750D+01 0.68219200528969D+00 + 1 2 3 2 0.34741074423329D+01 -0.11988523332340D+00 + 2 2 3 2 0.35483554918587D+01 -0.81976955936818D-01 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 2.22222222E-01 1.11111111E-01 1.0 + 1 1 1 1 0.73767741793068D+01 -0.78501366781752D-16 + 2 1 1 1 0.37530933997181D+01 -0.18910676848161D+00 + 3 1 1 1 0.33649552436851D+01 -0.14268374316795D+00 + 1 2 1 1 -0.70064729492821D+00 -0.17572506455676D+01 + 2 2 1 1 -0.27632821650411D+01 -0.51693954145622D+00 + 3 2 1 1 -0.26609850629657D+01 -0.46434745115095D+00 + 1 1 2 1 0.37530933997181D+01 0.18910676848160D+00 + 2 1 2 1 0.71479507892520D+01 -0.18316048910234D-14 + 3 1 2 1 0.35142582299391D+01 -0.93341359599328D-01 + 1 2 2 1 -0.27632821650411D+01 -0.51693954145622D+00 + 2 2 2 1 -0.34697519680797D+01 -0.33702352801235D+01 + 3 2 2 1 -0.27173594999935D+01 -0.57854790228137D+00 + 1 1 3 1 0.33649552436851D+01 0.14268374316795D+00 + 2 1 3 1 0.35142582299391D+01 0.93341359599325D-01 + 3 1 3 1 0.67893639795685D+01 -0.16887034317986D-14 + 1 2 3 1 -0.26609850629657D+01 -0.46434745115095D+00 + 2 2 3 1 -0.27173594999935D+01 -0.57854790228137D+00 + 3 2 3 1 -0.48553330028763D+01 -0.25369243033535D+01 + 1 1 1 2 -0.70064729492821D+00 0.17572506455676D+01 + 2 1 1 2 -0.27632821650411D+01 0.51693954145622D+00 + 3 1 1 2 -0.26609850629657D+01 0.46434745115095D+00 + 1 2 1 2 0.73767741793068D+01 -0.78501366781752D-16 + 2 2 1 2 0.37530933997181D+01 0.18910676848160D+00 + 3 2 1 2 0.33649552436851D+01 0.14268374316795D+00 + 1 1 2 2 -0.27632821650411D+01 0.51693954145622D+00 + 2 1 2 2 -0.34697519680797D+01 0.33702352801235D+01 + 3 1 2 2 -0.27173594999935D+01 0.57854790228137D+00 + 1 2 2 2 0.37530933997181D+01 -0.18910676848161D+00 + 2 2 2 2 0.71479507892520D+01 -0.18316048910234D-14 + 3 2 2 2 0.35142582299391D+01 0.93341359599325D-01 + 1 1 3 2 -0.26609850629657D+01 0.46434745115095D+00 + 2 1 3 2 -0.27173594999935D+01 0.57854790228137D+00 + 3 1 3 2 -0.48553330028763D+01 0.25369243033535D+01 + 1 2 3 2 0.33649552436851D+01 -0.14268374316795D+00 + 2 2 3 2 0.35142582299391D+01 -0.93341359599328D-01 + 3 2 3 2 0.67893639795685D+01 -0.16887034317986D-14 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 2.22222222E-01 1.11111111E-01 1.0 + 1 1 1 1 0.73415151789686D+01 0.62593949614728D-15 + 2 1 1 1 0.36071290414966D+01 -0.21123155840339D+00 + 3 1 1 1 0.32904167968267D+01 -0.15406793396815D+00 + 1 2 1 1 -0.66874541160992D+00 0.19766249765181D+00 + 2 2 1 1 -0.27878453640628D+01 -0.39762976908201D+00 + 3 2 1 1 -0.26579752194946D+01 -0.36380904358456D+00 + 1 1 2 1 0.36071290414966D+01 0.21123155840339D+00 + 2 1 2 1 0.70843988202291D+01 -0.14324314221132D-14 + 3 1 2 1 0.35238822325190D+01 -0.99899605180686D-01 + 1 2 2 1 -0.27878453640628D+01 -0.39762976908201D+00 + 2 2 2 1 -0.35639060713832D+01 -0.31317725583069D+01 + 3 2 2 1 -0.27144231695837D+01 -0.49080033805220D+00 + 1 1 3 1 0.32904167968267D+01 0.15406793396815D+00 + 2 1 3 1 0.35238822325190D+01 0.99899605180684D-01 + 3 1 3 1 0.67861705586317D+01 -0.12473125783326D-14 + 1 2 3 1 -0.26579752194946D+01 -0.36380904358456D+00 + 2 2 3 1 -0.27144231695837D+01 -0.49080033805220D+00 + 3 2 3 1 -0.48802048732142D+01 -0.23594476819933D+01 + 1 1 1 2 -0.66874541160992D+00 -0.19766249765181D+00 + 2 1 1 2 -0.27878453640628D+01 0.39762976908201D+00 + 3 1 1 2 -0.26579752194946D+01 0.36380904358456D+00 + 1 2 1 2 0.73415151789686D+01 0.62593949614728D-15 + 2 2 1 2 0.36071290414966D+01 0.21123155840339D+00 + 3 2 1 2 0.32904167968267D+01 0.15406793396815D+00 + 1 1 2 2 -0.27878453640628D+01 0.39762976908201D+00 + 2 1 2 2 -0.35639060713832D+01 0.31317725583069D+01 + 3 1 2 2 -0.27144231695837D+01 0.49080033805220D+00 + 1 2 2 2 0.36071290414966D+01 -0.21123155840339D+00 + 2 2 2 2 0.70843988202291D+01 -0.14324314221132D-14 + 3 2 2 2 0.35238822325190D+01 0.99899605180684D-01 + 1 1 3 2 -0.26579752194946D+01 0.36380904358456D+00 + 2 1 3 2 -0.27144231695837D+01 0.49080033805220D+00 + 3 1 3 2 -0.48802048732142D+01 0.23594476819933D+01 + 1 2 3 2 0.32904167968267D+01 -0.15406793396815D+00 + 2 2 3 2 0.35238822325190D+01 -0.99899605180686D-01 + 3 2 3 2 0.67861705586317D+01 -0.12473125783326D-14 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt 4.44444444E-01 3.33333333E-01 1.11111111E-01 1.0 + 1 1 1 1 0.74679031555115D+01 -0.15323685654697D-15 + 2 1 1 1 0.41342440416166D+01 -0.15371338223336D+00 + 3 1 1 1 0.33336569698499D+01 -0.15371410560190D+00 + 1 2 1 1 -0.31155173136767D+00 -0.17669107794398D+01 + 2 2 1 1 -0.25924515946940D+01 -0.51736094705689D+00 + 3 2 1 1 -0.25707137227893D+01 -0.39408184945581D+00 + 1 1 2 1 0.41342440416166D+01 0.15371338223336D+00 + 2 1 2 1 0.74134507178604D+01 -0.14552840719706D-14 + 3 1 2 1 0.34114656026988D+01 -0.14472813366590D+00 + 1 2 2 1 -0.25924515946940D+01 -0.51736094705688D+00 + 2 2 2 1 -0.13383774414810D+01 -0.29862100012132D+01 + 3 2 2 1 -0.25785461183995D+01 -0.43851010592943D+00 + 1 1 3 1 0.33336569698499D+01 0.15371410560189D+00 + 2 1 3 1 0.34114656026988D+01 0.14472813366590D+00 + 1 2 3 1 -0.25707137227893D+01 -0.39408184945581D+00 + 2 2 3 1 -0.25785461183995D+01 -0.43851010592943D+00 + 1 1 1 2 -0.31155173136767D+00 0.17669107794398D+01 + 2 1 1 2 -0.25924515946940D+01 0.51736094705688D+00 + 3 1 1 2 -0.25707137227893D+01 0.39408184945581D+00 + 1 2 1 2 0.74679031555115D+01 -0.15323685654697D-15 + 2 2 1 2 0.41342440416166D+01 0.15371338223336D+00 + 3 2 1 2 0.33336569698498D+01 0.15371410560189D+00 + 1 1 2 2 -0.25924515946940D+01 0.51736094705689D+00 + 2 1 2 2 -0.13383774414810D+01 0.29862100012132D+01 + 3 1 2 2 -0.25785461183995D+01 0.43851010592943D+00 + 1 2 2 2 0.41342440416166D+01 -0.15371338223336D+00 + 2 2 2 2 0.74134507178604D+01 -0.14552840719706D-14 + 3 2 2 2 0.34114656026988D+01 0.14472813366590D+00 + 1 1 3 2 -0.25707137227893D+01 0.39408184945581D+00 + 2 1 3 2 -0.25785461183995D+01 0.43851010592943D+00 + 1 2 3 2 0.33336569698498D+01 -0.15371410560190D+00 + 2 2 3 2 0.34114656026988D+01 -0.14472813366590D+00 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 3.33333333E-01 1.11111111E-01 1.0 + 1 1 1 1 0.73265474583662D+01 0.67063921933124D-15 + 2 1 1 1 0.39105126211858D+01 -0.21457615922502D+00 + 3 1 1 1 0.32523429232955D+01 -0.16229634270592D+00 + 1 2 1 1 -0.37765843329008D+00 0.23863423345562D+00 + 2 2 1 1 -0.26963445000952D+01 -0.36125058168663D+00 + 3 2 1 1 -0.25688580983913D+01 -0.29479299025184D+00 + 1 1 2 1 0.39105126211858D+01 0.21457615922502D+00 + 2 1 2 1 0.72660080247352D+01 -0.13304841538120D-14 + 3 1 2 1 0.34117957782579D+01 -0.15338233859512D+00 + 1 2 2 1 -0.26963445000952D+01 -0.36125058168663D+00 + 2 2 2 1 -0.15027863673395D+01 -0.26705330180998D+01 + 3 2 2 1 -0.25781822476965D+01 -0.35193135769937D+00 + 1 1 3 1 0.32523429232955D+01 0.16229634270592D+00 + 2 1 3 1 0.34117957782579D+01 0.15338233859512D+00 + 3 1 3 1 0.66027624752661D+01 -0.15010027661187D-14 + 1 2 3 1 -0.25688580983913D+01 -0.29479299025184D+00 + 2 2 3 1 -0.25781822476965D+01 -0.35193135769937D+00 + 3 2 3 1 -0.46070712238120D+01 -0.21112489086175D+01 + 1 1 1 2 -0.37765843329008D+00 -0.23863423345562D+00 + 2 1 1 2 -0.26963445000952D+01 0.36125058168663D+00 + 3 1 1 2 -0.25688580983913D+01 0.29479299025184D+00 + 1 2 1 2 0.73265474583662D+01 0.67063921933124D-15 + 2 2 1 2 0.39105126211858D+01 0.21457615922502D+00 + 3 2 1 2 0.32523429232955D+01 0.16229634270592D+00 + 1 1 2 2 -0.26963445000952D+01 0.36125058168663D+00 + 2 1 2 2 -0.15027863673395D+01 0.26705330180998D+01 + 3 1 2 2 -0.25781822476965D+01 0.35193135769937D+00 + 1 2 2 2 0.39105126211858D+01 -0.21457615922502D+00 + 2 2 2 2 0.72660080247352D+01 -0.13304841538120D-14 + 3 2 2 2 0.34117957782579D+01 0.15338233859512D+00 + 1 1 3 2 -0.25688580983913D+01 0.29479299025184D+00 + 2 1 3 2 -0.25781822476965D+01 0.35193135769937D+00 + 3 1 3 2 -0.46070712238120D+01 0.21112489086175D+01 + 1 2 3 2 0.32523429232955D+01 -0.16229634270592D+00 + 2 2 3 2 0.34117957782579D+01 -0.15338233859512D+00 + 3 2 3 2 0.66027624752661D+01 -0.15010027661187D-14 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 3.33333333E-01 1.11111111E-01 1.0 + 1 1 1 1 0.71432688236450D+01 0.12622030702331D-14 + 2 1 1 1 0.36922792974721D+01 -0.22139297938456D+00 + 3 1 1 1 0.32054646080565D+01 -0.16429306939903D+00 + 1 2 1 1 -0.16355148571545D+01 0.17764497480559D+01 + 2 2 1 1 -0.27720765392956D+01 -0.24969985606826D+00 + 3 2 1 1 -0.25938783976199D+01 -0.18992840412899D+00 + 1 1 2 1 0.36922792974722D+01 0.22139297938456D+00 + 2 1 2 1 0.72117658327334D+01 -0.12953966151005D-14 + 3 1 2 1 0.34493271391241D+01 -0.15510796741700D+00 + 1 2 2 1 -0.27720765392956D+01 -0.24969985606826D+00 + 2 2 2 1 -0.17153891210927D+01 -0.25090928576421D+01 + 3 2 2 1 -0.26092475829430D+01 -0.23828307577976D+00 + 1 1 3 1 0.32054646080565D+01 0.16429306939903D+00 + 2 1 3 1 0.34493271391241D+01 0.15510796741700D+00 + 3 1 3 1 0.66436480680565D+01 -0.10923612107907D-14 + 1 2 3 1 -0.25938783976199D+01 -0.18992840412899D+00 + 2 2 3 1 -0.26092475829430D+01 -0.23828307577976D+00 + 3 2 3 1 -0.46697300837883D+01 -0.19394807533400D+01 + 1 1 1 2 -0.16355148571545D+01 -0.17764497480559D+01 + 2 1 1 2 -0.27720765392956D+01 0.24969985606826D+00 + 3 1 1 2 -0.25938783976199D+01 0.18992840412899D+00 + 1 2 1 2 0.71432688236450D+01 0.12622030702331D-14 + 2 2 1 2 0.36922792974721D+01 0.22139297938456D+00 + 3 2 1 2 0.32054646080565D+01 0.16429306939903D+00 + 1 1 2 2 -0.27720765392956D+01 0.24969985606826D+00 + 2 1 2 2 -0.17153891210927D+01 0.25090928576421D+01 + 3 1 2 2 -0.26092475829430D+01 0.23828307577976D+00 + 1 2 2 2 0.36922792974721D+01 -0.22139297938456D+00 + 2 2 2 2 0.72117658327333D+01 -0.12953966151005D-14 + 3 2 2 2 0.34493271391242D+01 0.15510796741700D+00 + 1 1 3 2 -0.25938783976199D+01 0.18992840412899D+00 + 2 1 3 2 -0.26092475829430D+01 0.23828307577976D+00 + 3 1 3 2 -0.46697300837883D+01 0.19394807533400D+01 + 1 2 3 2 0.32054646080565D+01 -0.16429306939903D+00 + 2 2 3 2 0.34493271391241D+01 -0.15510796741700D+00 + 3 2 3 2 0.66436480680565D+01 -0.10923612107907D-14 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 3.33333333E-01 1.11111111E-01 1.0 + 1 1 1 1 0.69391919227109D+01 0.79371201107152D-15 + 2 1 1 1 0.35198848592871D+01 -0.20432089745616D+00 + 3 1 1 1 0.32081977884423D+01 -0.14895508493185D+00 + 1 2 1 1 -0.35816140092062D+01 0.21625393533847D+01 + 2 2 1 1 -0.28725399342170D+01 -0.15873846128161D+00 + 3 2 1 1 -0.26985993962505D+01 -0.95429228573943D-01 + 1 1 2 1 0.35198848592871D+01 0.20432089745616D+00 + 2 1 2 1 0.72635735925433D+01 -0.10411165359839D-14 + 3 1 2 1 0.35325905746268D+01 -0.14895435070707D+00 + 1 2 2 1 -0.28725399342170D+01 -0.15873846128161D+00 + 2 2 2 1 -0.19665071738900D+01 -0.24083258333956D+01 + 3 2 2 1 -0.27414747240814D+01 -0.11103315850246D+00 + 1 1 3 1 0.32081977884423D+01 0.14895508493185D+00 + 2 1 3 1 0.35325905746268D+01 0.14895435070707D+00 + 3 1 3 1 0.67407888614974D+01 -0.89463430534914D-15 + 1 2 3 1 -0.26985993962505D+01 -0.95429228573943D-01 + 2 2 3 1 -0.27414747240814D+01 -0.11103315850246D+00 + 3 2 3 1 -0.48700595049153D+01 -0.17725591922198D+01 + 1 1 1 2 -0.35816140092062D+01 -0.21625393533847D+01 + 2 1 1 2 -0.28725399342170D+01 0.15873846128161D+00 + 3 1 1 2 -0.26985993962505D+01 0.95429228573943D-01 + 1 2 1 2 0.69391919227109D+01 0.79371201107152D-15 + 2 2 1 2 0.35198848592871D+01 0.20432089745616D+00 + 3 2 1 2 0.32081977884423D+01 0.14895508493185D+00 + 1 1 2 2 -0.28725399342170D+01 0.15873846128161D+00 + 2 1 2 2 -0.19665071738900D+01 0.24083258333956D+01 + 3 1 2 2 -0.27414747240814D+01 0.11103315850246D+00 + 1 2 2 2 0.35198848592871D+01 -0.20432089745616D+00 + 2 2 2 2 0.72635735925432D+01 -0.10411165359839D-14 + 3 2 2 2 0.35325905746268D+01 0.14895435070707D+00 + 1 1 3 2 -0.26985993962505D+01 0.95429228573943D-01 + 2 1 3 2 -0.27414747240814D+01 0.11103315850246D+00 + 3 1 3 2 -0.48700595049153D+01 0.17725591922198D+01 + 1 2 3 2 0.32081977884423D+01 -0.14895508493185D+00 + 2 2 3 2 0.35325905746268D+01 -0.14895435070707D+00 + 3 2 3 2 0.67407888614974D+01 -0.89463430534914D-15 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt -4.44444444E-01 4.44444444E-01 1.11111111E-01 1.0 + 1 1 1 1 0.74929544549042D+01 0.64683685409268D-15 + 2 1 1 1 0.42519122532038D+01 -0.16726287484246D+00 + 3 1 1 1 0.32410384235285D+01 -0.16726212214104D+00 + 1 2 1 1 -0.69463524903503D-01 0.39395946500934D+00 + 2 2 1 1 -0.25499082292046D+01 -0.27071110739981D+00 + 3 2 1 1 -0.25581855332782D+01 -0.22377528779841D+00 + 1 1 2 1 0.42519122532038D+01 0.16726287484246D+00 + 2 1 2 1 0.75197541288472D+01 -0.31172915974780D-15 + 3 1 2 1 0.33194289264118D+01 -0.16671295847621D+00 + 1 2 2 1 -0.25499082292046D+01 -0.27071110739981D+00 + 2 2 2 1 -0.84364488812198D-01 -0.11181456917572D+01 + 3 2 2 1 -0.25560943998083D+01 -0.23562116305054D+00 + 1 1 3 1 0.32410384235285D+01 0.16726212214104D+00 + 2 1 3 1 0.33194289264118D+01 0.16671295847621D+00 + 1 2 3 1 -0.25581855332782D+01 -0.22377528779841D+00 + 2 2 3 1 -0.25560943998083D+01 -0.23562116305054D+00 + 1 1 1 2 -0.69463524903503D-01 -0.39395946500934D+00 + 2 1 1 2 -0.25499082292046D+01 0.27071110739981D+00 + 3 1 1 2 -0.25581855332782D+01 0.22377528779841D+00 + 1 2 1 2 0.74929544549042D+01 0.64683685409268D-15 + 2 2 1 2 0.42519122532038D+01 0.16726287484246D+00 + 3 2 1 2 0.32410384235285D+01 0.16726212214104D+00 + 1 1 2 2 -0.25499082292046D+01 0.27071110739981D+00 + 2 1 2 2 -0.84364488812198D-01 0.11181456917572D+01 + 3 1 2 2 -0.25560943998083D+01 0.23562116305054D+00 + 1 2 2 2 0.42519122532038D+01 -0.16726287484246D+00 + 2 2 2 2 0.75197541288472D+01 -0.31172915974780D-15 + 3 2 2 2 0.33194289264118D+01 0.16671295847621D+00 + 1 1 3 2 -0.25581855332782D+01 0.22377528779841D+00 + 2 1 3 2 -0.25560943998083D+01 0.23562116305054D+00 + 1 2 3 2 0.32410384235285D+01 -0.16726212214104D+00 + 2 2 3 2 0.33194289264118D+01 -0.16671295847621D+00 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 4.44444444E-01 1.11111111E-01 1.0 + 1 1 1 1 0.72154025014643D+01 0.14548815091669D-14 + 2 1 1 1 0.39460400618445D+01 -0.21930527050696D+00 + 3 1 1 1 0.31906572647031D+01 -0.16959155991981D+00 + 1 2 1 1 -0.14366825343856D+01 0.19041759149710D+01 + 2 2 1 1 -0.27133206138959D+01 -0.16838307526554D+00 + 3 2 1 1 -0.25802977360607D+01 -0.11997076544142D+00 + 1 1 2 1 0.39460400618445D+01 0.21930527050696D+00 + 2 1 2 1 0.73762490277123D+01 -0.48207385501736D-15 + 3 1 2 1 0.33515131269618D+01 -0.16959070911651D+00 + 1 2 2 1 -0.27133206138959D+01 -0.16838307526554D+00 + 2 2 2 1 -0.41014673177829D+00 -0.93799976667732D+00 + 3 2 2 1 -0.25873039180674D+01 -0.12251903831114D+00 + 1 1 3 1 0.31906572647031D+01 0.16959155991981D+00 + 2 1 3 1 0.33515131269618D+01 0.16959070911651D+00 + 3 1 3 1 0.65421705747672D+01 -0.11158135014411D-14 + 1 2 3 1 -0.25802977360607D+01 -0.11997076544142D+00 + 2 2 3 1 -0.25873039180674D+01 -0.12251903831114D+00 + 3 2 3 1 -0.46410420460078D+01 -0.16892005070712D+01 + 1 1 1 2 -0.14366825343856D+01 -0.19041759149710D+01 + 2 1 1 2 -0.27133206138959D+01 0.16838307526554D+00 + 3 1 1 2 -0.25802977360607D+01 0.11997076544142D+00 + 1 2 1 2 0.72154025014643D+01 0.14548815091669D-14 + 2 2 1 2 0.39460400618445D+01 0.21930527050696D+00 + 3 2 1 2 0.31906572647031D+01 0.16959155991981D+00 + 1 1 2 2 -0.27133206138959D+01 0.16838307526554D+00 + 2 1 2 2 -0.41014673177829D+00 0.93799976667732D+00 + 3 1 2 2 -0.25873039180674D+01 0.12251903831114D+00 + 1 2 2 2 0.39460400618445D+01 -0.21930527050696D+00 + 2 2 2 2 0.73762490277123D+01 -0.48207385501736D-15 + 3 2 2 2 0.33515131269618D+01 0.16959070911651D+00 + 1 1 3 2 -0.25802977360607D+01 0.11997076544142D+00 + 2 1 3 2 -0.25873039180674D+01 0.12251903831114D+00 + 3 1 3 2 -0.46410420460078D+01 0.16892005070712D+01 + 1 2 3 2 0.31906572647031D+01 -0.16959155991981D+00 + 2 2 3 2 0.33515131269618D+01 -0.16959070911651D+00 + 3 2 3 2 0.65421705747672D+01 -0.11158135014411D-14 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt -3.33333333E-01 4.44444444E-01 2.22222222E-01 1.0 + 1 1 1 1 0.70348035271926D+01 0.16775415698773D-14 + 2 1 1 1 0.37675522425767D+01 -0.22122892515623D+00 + 3 1 1 1 0.32672459354335D+01 -0.22122760349751D+00 + 1 2 1 1 -0.10990642082913D+01 0.19036367858161D+01 + 2 2 1 1 -0.24150986396573D+01 -0.13830124001676D+00 + 3 2 1 1 -0.24263901550675D+01 -0.11875202494746D+00 + 1 1 2 1 0.37675522425767D+01 0.22122892515623D+00 + 2 1 2 1 0.72824368936722D+01 -0.49358726402055D-15 + 3 1 2 1 0.35949318075090D+01 -0.21419191763386D+00 + 1 2 2 1 -0.24150986396573D+01 -0.13830124001676D+00 + 2 2 2 1 -0.30631559785712D-01 -0.10723483854976D+01 + 3 2 2 1 -0.23969263945899D+01 -0.16977707544859D+00 + 1 1 3 1 0.32672459354335D+01 0.22122760349751D+00 + 2 1 3 1 0.35949318075090D+01 0.21419191763386D+00 + 1 2 3 1 -0.24263901550675D+01 -0.11875202494746D+00 + 2 2 3 1 -0.23969263945899D+01 -0.16977707544859D+00 + 1 1 1 2 -0.10990642082913D+01 -0.19036367858161D+01 + 2 1 1 2 -0.24150986396573D+01 0.13830124001676D+00 + 3 1 1 2 -0.24263901550675D+01 0.11875202494746D+00 + 1 2 1 2 0.70348035271926D+01 0.16775415698773D-14 + 2 2 1 2 0.37675522425767D+01 0.22122892515623D+00 + 3 2 1 2 0.32672459354335D+01 0.22122760349751D+00 + 1 1 2 2 -0.24150986396573D+01 0.13830124001676D+00 + 2 1 2 2 -0.30631559785712D-01 0.10723483854976D+01 + 3 1 2 2 -0.23969263945899D+01 0.16977707544859D+00 + 1 2 2 2 0.37675522425767D+01 -0.22122892515623D+00 + 2 2 2 2 0.72824368936722D+01 -0.49358726402055D-15 + 3 2 2 2 0.35949318075090D+01 0.21419191763386D+00 + 1 1 3 2 -0.24263901550675D+01 0.11875202494746D+00 + 2 1 3 2 -0.23969263945899D+01 0.16977707544859D+00 + 1 2 3 2 0.32672459354335D+01 -0.22122760349751D+00 + 2 2 3 2 0.35949318075090D+01 -0.21419191763386D+00 + + List of bloks and their characteristics + + 2nd derivatives (non-stat.) - # elements : 81 + qpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 1.11111111E-01 0.00000000E+00 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 0.00000000E+00 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 0.00000000E+00 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 0.00000000E+00 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 1.11111111E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -1.11111111E-01 1.11111111E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 2.22222222E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 2.22222222E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 3.33333333E-01 3.33333333E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 3.33333333E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 3.33333333E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 3.33333333E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 4.44444444E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 4.44444444E-01 0.00000000E+00 1.0 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt 3.33333333E-01 2.22222222E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt 4.44444444E-01 2.22222222E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 2.22222222E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt 4.44444444E-01 3.33333333E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -4.44444444E-01 3.33333333E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 3.33333333E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -2.22222222E-01 3.33333333E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt -4.44444444E-01 4.44444444E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 36 + qpt -3.33333333E-01 4.44444444E-01 1.11111111E-01 1.0 + + 2nd derivatives (non-stat.) - # elements : 32 + qpt -3.33333333E-01 4.44444444E-01 2.22222222E-01 1.0 diff --git a/abipy/data/refs/si_sound_vel/Si_sound_PHBST.nc b/abipy/data/refs/si_sound_vel/Si_sound_PHBST.nc new file mode 100644 index 000000000..da8bc4ebd Binary files /dev/null and b/abipy/data/refs/si_sound_vel/Si_sound_PHBST.nc differ diff --git a/abipy/data/refs/sio_DS1_TRANSPORT.nc b/abipy/data/refs/sio_DS1_TRANSPORT.nc new file mode 100644 index 000000000..3ebf3b800 Binary files /dev/null and b/abipy/data/refs/sio_DS1_TRANSPORT.nc differ diff --git a/abipy/data/tests/test_data.py b/abipy/data/tests/test_data.py index 1aafffb1a..37a7a863c 100644 --- a/abipy/data/tests/test_data.py +++ b/abipy/data/tests/test_data.py @@ -1,6 +1,4 @@ """Tests for data module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import abipy.data as abidata diff --git a/abipy/data/ucells.py b/abipy/data/ucells.py index cd2bb4d02..a148f8bd4 100644 --- a/abipy/data/ucells.py +++ b/abipy/data/ucells.py @@ -1,5 +1,4 @@ """Database of unit cells in the ABINIT format.""" -from __future__ import print_function, division, unicode_literals, absolute_import from abipy.abilab import Structure, ArrayWithUnit @@ -41,6 +40,17 @@ def structure_from_ucell(name): xred=[ [0.0 , 0.0 , 0.0], [0.25, 0.25, 0.25]], ), + "Si-shifted": dict(ntypat=1, + natom=2, + typat=[1, 1], + znucl=14, + acell=3*[10.217], + rprim=[[0.0, 0.5, 0.5], + [0.5, 0.0, 0.5], + [0.5, 0.5, 0.0]], + xred=[ [1.0 , 1.0 , 1.0], + [0.25, 0.25, 0.25]], + ), "Al": dict(ntypat=1, natom=1, typat=[1], @@ -51,7 +61,6 @@ def structure_from_ucell(name): [0.5, 0.5, 0.0]], xred=[ [0.0 , 0.0 , 0.0]], ), - "Al-negative-volume": dict(ntypat=1, natom=1, typat=[1], @@ -62,16 +71,14 @@ def structure_from_ucell(name): [0.5, 0.5, 0.0]], xred=[ [0.0 , 0.0 , 0.0]], ), - "ZnO": dict(ntypat=2, natom=2, typat=[1, 2], - acell= 3*[8.6277], - rprim= [[.0, .5, .5], [.5, .0, .5], [.5, .5, .0]], + acell=3*[8.6277], + rprim=[[.0, .5, .5], [.5, .0, .5], [.5, .5, .0]], znucl=[30, 8], xred=[[.0, .0, .0], [.25,.25,.25]], ), - "SiC": dict(ntypat=2, natom=2, typat=[1, 2], @@ -80,10 +87,9 @@ def structure_from_ucell(name): [.5, .0, .5], [.5, .5, .0]], znucl=[6, 14], - xred=[ [.0, .0, .0], - [.25,.25,.25] ] + xred=[[.0, .0, .0], + [.25,.25,.25]] ), - "AlAs": dict(natom=2, typat=[1, 2], acell=3*[10.61], @@ -94,7 +100,6 @@ def structure_from_ucell(name): xred=[[0.0, 0.0, 0.0], [0.25, 0.25, 0.25]] ), - "GaAs": dict(natom=2, typat=[1, 2], acell=3*[10.60], @@ -102,10 +107,9 @@ def structure_from_ucell(name): [0.5, 0.0, 0.5], [0.5, 0.5, 0.0]], znucl=[31, 33], - xred=[3 *[0.00], - 3 *[0.25]] + xred=[3 * [0.00], + 3 * [0.25]] ), - "NiO": dict(natom=4, typat=[1, 1, 2, 2], acell=3 * [7.92], @@ -122,22 +126,22 @@ def structure_from_ucell(name): "MgB2": dict(natom=3, typat=[1, 2, 2], acell=ArrayWithUnit([3.086, 3.086, 3.523], "ang").to("bohr"), - rprim= [ 0.866025403784439, 0.5, 0.0, - -0.866025403784439, 0.5, 0.0, - 0.0 , 0.0, 1.0], + rprim=[0.866025403784439, 0.5, 0.0, + -0.866025403784439, 0.5, 0.0, + 0.0 , 0.0, 1.0], znucl=[12, 5], xred=[0.0, 0.0, 0.0, # Mg 1/3, 2/3, 0.5, # B 2/3, 1/3, 0.5] # B ), - "Fe-fm": dict(natom=1, - typat=1, - acell=3*[5.42], - rprim=[-0.5, 0.5, 0.5, - 0.5, -0.5, 0.5, - 0.5, 0.5, -0.5], - znucl=26, - xred=[0.0, 0.0, 0.0], + "Fe-fm": dict(natom=1, + typat=1, + acell=3*[5.42], + rprim=[-0.5, 0.5, 0.5, + 0.5, -0.5, 0.5, + 0.5, 0.5, -0.5], + znucl=26, + xred=[0.0, 0.0, 0.0], ), "SiO2-alpha": dict(natom=9, typat=3*[1] + 6*[2], diff --git a/abipy/dfpt/__init__.py b/abipy/dfpt/__init__.py index 61b29da32..b5ffe4deb 100644 --- a/abipy/dfpt/__init__.py +++ b/abipy/dfpt/__init__.py @@ -1,2 +1 @@ -"""This subpackage provides objects and functions for the analysis of DFPT calculatios.""" -from .phonons import * +"""This subpackage provides objects and functions for the analysis of DFPT calculations.""" diff --git a/abipy/dfpt/anaddbnc.py b/abipy/dfpt/anaddbnc.py index 99a70f6cd..dc95225cd 100644 --- a/abipy/dfpt/anaddbnc.py +++ b/abipy/dfpt/anaddbnc.py @@ -2,17 +2,21 @@ """ AnaddbNcFile provides a high-level interface to the data stored in the anaddb.nc file. """ -from __future__ import print_function, division, unicode_literals, absolute_import +import pandas as pd +import warnings +from collections import OrderedDict from monty.functools import lazy_property from monty.string import marquee from monty.termcolor import cprint -from abipy.core.tensor import Tensor from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter +from abipy.abio.robots import Robot from abipy.iotools import ETSF_Reader -from abipy.dfpt.phonons import InteratomicForceConstants +from abipy.tools.plotting import add_fig_kwargs, get_axarray_fig_plt, rotate_ticklabels +from abipy.tools.tensors import Tensor, DielectricTensor, NLOpticalSusceptibilityTensor +from abipy.dfpt.ifc import InteratomicForceConstants from abipy.dfpt.ddb import Becs -from abipy.dfpt.tensors import NLOpticalSusceptibilityTensor +from abipy.dfpt.elastic import ElasticData class AnaddbNcFile(AbinitNcFile, Has_Structure, NotebookWriter): @@ -24,7 +28,7 @@ class AnaddbNcFile(AbinitNcFile, Has_Structure, NotebookWriter): |Structure| object. - .. attribute:: emacro + .. attribute:: epsinf Macroscopic dielectric tensor. None if the file does not contain this information. @@ -47,16 +51,25 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(AnaddbNcFile, self).__init__(filepath) + super().__init__(filepath) self.reader = ETSF_Reader(filepath) - self._structure = self.reader.read_structure() def close(self): self.reader.close() + @lazy_property + def structure(self): + return self.reader.read_structure() + @lazy_property def params(self): - return {} + # -666 to support old anaddb.nc files without metadata + return OrderedDict([ + ("asr", int(self.reader.read_value("asr", default=-666))), + ("chneut", int(self.reader.read_value("chneut", default=-666))), + ("dipdip", int(self.reader.read_value("dipdip", default=-666))), + ("symdynmat", int(self.reader.read_value("symdynmat", default=-666))), + ]) def __str__(self): return self.to_string() @@ -75,46 +88,105 @@ def to_string(self, verbose=0): app("") app(self.structure.to_string(verbose=verbose, title="Structure")) - return "\n".join(lines) + import json + app(marquee("Parameters", mark="=")) + app(json.dumps(self.params, indent=2, sort_keys=True)) + app("") - @property - def structure(self): - return self._structure + if self.has_elastic_data: + app("") + df = self.elastic_data.get_average_elastic_dataframe(tensor="elastic_relaxed") + if not df.empty: + app(marquee("Averaged elastic properties (relaxed ions)", mark="=")) + app(df.to_string(index=False)) + app("") + df = self.elastic_data.get_elast_properties_dataframe() + if not df.empty: + app(marquee("Averaged elastic properties (relaxed ions)", mark="=")) + app(df.T.to_string(index=True)) + + if verbose: + df = self.elastic_data.get_voigt_dataframe() + app(df.T.to_string()) + + tol = 1e-3 + if self.epsinf is not None: + app("Electronic dielectric tensor (eps_inf) in Cartesian coordinates. Set to zero below %.2e." % tol) + app(self.epsinf.get_dataframe(tol=tol).to_string()) + app("") + + if self.eps0 is not None: + app("Zero-frequency dielectric tensor (eps_zero) in Cartesian coordinates. Set to zero below %.2e." % tol) + app(self.eps0.get_dataframe(tol=tol).to_string()) + app("") + + #if self.becs is not None: + + if self.dchide is not None: + app("Non-linear optical susceptibility tensor.") + app(str(self.dchide)) + app("") + + if self.dchidt is not None: + app("First-order change in the linear dielectric susceptibility.") + app(str(self.dchidt)) + app("") + + #if self.has_piezoelectric_data: + # df = self.elastic_data.get_piezoelectric_dataframe() + + return "\n".join(lines) @lazy_property - def emacro(self): + def epsinf(self): """ - Macroscopic dielectric tensor. None if the file does not contain this information. + Macroscopic electronic |DielectricTensor| in Cartesian coordinates (a.k.a. epsilon_infinity) + None if the file does not contain this information. """ try: - return Tensor.from_cartesian_tensor(self.reader.read_value("emacro_cart"), - self.structure.lattice, space="r") + return DielectricTensor(self.reader.read_value("emacro_cart").T.copy()) except Exception as exc: - print(exc, "Returning None", sep="\n") + #print(exc, "Returning None", sep="\n") return None + # FIXME To maintain backward compatibility + @property + def emacro(self): + msg = "emacro is deprecated. It will removed in abipy 0.8. Use epsinf" + warnings.simplefilter('default') + warnings.warn(msg, DeprecationWarning, stacklevel=2) + return self.epsinf + @lazy_property - def emacro_rlx(self): + def eps0(self): """ - Relaxed ion Macroscopic dielectric tensor. None if the file does not contain this information. + Relaxed ion macroscopic |DielectricTensor| in Cartesian coordinates (a.k.a. epsilon_zero) + None if the file does not contain this information. """ try: - return Tensor.from_cartesian_tensor(self.reader.read_value("emacro_cart_rlx"), - self.structure.lattice, space="r") + return DielectricTensor(self.reader.read_value("emacro_cart_rlx").T.copy()) except Exception as exc: - print(exc, "Requires dieflag > 0", "Returning None", sep="\n") + #print(exc, "Requires dieflag > 0", "Returning None", sep="\n") return None + # FIXME To maintain backward compatibility + @property + def emacro_rlx(self): + msg = "emacro_rlx is deprecated and will removed in abipy 0.8. Use eps0" + warnings.simplefilter('default') + warnings.warn(msg, DeprecationWarning, stacklevel=2) + return self.eps0 + @lazy_property def becs(self): """ Born effective charges. None if the file does not contain this information. """ + chneut = self.params["chneut"] try: - chneut = -666 # TODO: anaddb.nc should contain the input file. return Becs(self.reader.read_value("becs_cart"), self.structure, chneut=chneut, order="f") except Exception as exc: - print(exc, "Returning None", sep="\n") + #print(exc, "Returning None", sep="\n") return None @lazy_property @@ -127,7 +199,6 @@ def ifc(self): try: return InteratomicForceConstants.from_file(self.filepath) except Exception as exc: - print(exc) cprint("Interatomic force constants have not been calculated. Returning None", "red") return None @@ -140,7 +211,7 @@ def dchide(self): try: return NLOpticalSusceptibilityTensor(self.reader.read_value("dchide")) except Exception as exc: - print(exc, "Requires nlflag > 0", "Returning None", sep="\n") + #print(exc, "Requires nlflag > 0", "Returning None", sep="\n") return None @lazy_property @@ -153,33 +224,53 @@ def dchidt(self): None if the file does not contain this information. """ try: - a = self.reader.read_value("dchidt").T - dchidt = [] - for i in a: - d = [] - for j in i: - d.append(Tensor.from_cartesian_tensor(j, self.structure.lattice, space="r")) - dchidt.append(d) - - return dchidt + a = self.reader.read_value("dchidt").T.copy() except Exception as exc: - print(exc, "Requires 0 < nlflag < 3", "Returning None", sep="\n") + #print(exc, "Requires 0 < nlflag < 3", "Returning None", sep="\n") return None + dchidt = [] + for i in a: + d = [] + for j in i: + d.append(Tensor(j)) + dchidt.append(d) + + return dchidt + @lazy_property def oscillator_strength(self): """ - A complex |numpy-array| containing the oscillator strengths with shape (number of phonon modes, 3, 3), + A complex |numpy-array| containing the oscillator strengths with shape [number of phonon modes, 3, 3], in a.u. (1 a.u.=253.2638413 m3/s2). None if the file does not contain this information. """ try: - return self.reader.read_value("oscillator_strength", cmode="c") + carr = self.reader.read_value("oscillator_strength", cmode="c") + carr = carr.transpose((0, 2, 1)).copy() + return carr except Exception as exc: - print(exc, "Oscillator strengths require dieflag == 1, 3 or 4", "Returning None", sep="\n") - raise + #print(exc, "Oscillator strengths require dieflag == 1, 3 or 4", "Returning None", sep="\n") return None + @lazy_property + def has_elastic_data(self): + """True if elastic tensors have been computed.""" + return self.reader.read_value("elaflag", default=0) != 0 + + @lazy_property + def has_piezoelectric_data(self): + """True if piezoelectric tensors have been computed.""" + return self.reader.read_value("piezoflag", default=0) != 0 + + @lazy_property + def elastic_data(self): + """ + Container with the different (piezo)elastic tensors computed by anaddb. + stored in pymatgen tensor objects. + """ + return ElasticData.from_ncreader(self.reader) + def yield_figs(self, **kwargs): # pragma: no cover """ This function *generates* a predefined list of matplotlib figures with minimal input from the user. @@ -200,3 +291,141 @@ def write_notebook(self, nbpath=None): ]) return self._write_nb_nbpath(nb, nbpath) + + +class AnaddbNcRobot(Robot): + """ + This robot analyzes the results contained in multiple anaddb.nc files. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: AnaddbNcRobot + """ + EXT = "anaddb" + + @property + def has_elastic_data(self): + return all(ncfile.has_elastic_data for ncfile in self.abifiles) + + def get_dataframe(self): + if self.has_elastic_data: + return self.get_elastic_dataframe() + return None + + def get_elastic_dataframe(self, with_geo=True, abspath=False, with_params=False, funcs=None, **kwargs): + """ + Return a |pandas-DataFrame| with properties derived from the elastic tensor + and an associated structure. Filename is used as index. + + Args: + with_geo: True if structure info should be added to the dataframe + abspath: True if paths in index should be absolute. Default: Relative to getcwd(). + with_params: False to exclude calculation parameters from the dataframe. + + kwargs: + attrs: + List of additional attributes of the |GsrFile| to add to the DataFrame. + funcs: Function or list of functions to execute to add more data to the DataFrame. + Each function receives a |GsrFile| object and returns a tuple (key, value) + where key is a string with the name of column and value is the value to be inserted. + """ + # Add attributes specified by the users + attrs = [ + #"energy", "pressure", "max_force", + #"nsppol", "nspinor", "nspden", + ] + kwargs.pop("attrs", []) + + rows, index = [], [] + for label, ncfile in self.items(): + index.append(label) + d = OrderedDict() + + # Add info on structure. + if with_geo: + d.update(ncfile.structure.get_dict4pandas(with_spglib=True)) + + if with_params: + d.update(self.params) + + # Execute functions + if funcs is not None: d.update(self._exec_funcs(funcs, ncfile)) + + df = ncfile.elastic_data.get_elast_properties_dataframe(etypes="elastic_relaxed") + d.update(df.to_dict("records")[0]) + + rows.append(d) + + return pd.DataFrame(rows, index=index, columns=list(rows[0].keys() if rows else None)) + + @add_fig_kwargs + def plot_elastic_properties(self, fontsize=10, **kwargs): + """ + Args: + fontsize: legend and label fontsize. + + Returns: |matplotlib-Figure| + """ + df = self.get_elastic_dataframe(with_geo=False, abspath=False, with_params=False) + from pandas.api.types import is_numeric_dtype + keys = [k for k in df.keys() if is_numeric_dtype(df[k])] + i = keys.index("fitted_to_structure") + if i != -1: + keys.pop(i) + + num_plots, ncols, nrows = len(keys), 1, 1 + if num_plots > 1: + ncols = 3 + nrows = (num_plots // ncols) + (num_plots % ncols) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + ax_list = ax_list.ravel() + + for ix, (key, ax) in enumerate(zip(keys, ax_list)): + irow, icol = divmod(ix, ncols) + xn = range(len(df.index)) + ax.plot(xn, df[key], marker="o") + ax.grid(True) + ax.set_xticks(xn) + ax.set_ylabel(key, fontsize=fontsize) + ax.set_xticklabels([]) + + ax.set_xticklabels(self.keys(), fontsize=fontsize) + rotate_ticklabels(ax, 15) + + if ix != len(ax_list) - 1: + for ix in range(ix + 1, len(ax_list)): + ax_list[ix].axis('off') + + return fig + + #def get_voigt_dataframe(self, tensor_names): + # ncfile.get_voigt_dataframe(self, tensor_names): + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + Used in abiview.py to get a quick look at the results. + """ + if self.has_elastic_data: + yield self.plot_elastic_properties(show=False) + else: + yield None + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + args = [(l, f.filepath) for l, f in self.items()] + nb.cells.extend([ + #nbv.new_markdown_cell("# This is a markdown cell"), + nbv.new_code_cell("robot = abilab.AnaddbNcRobot(*%s)\nrobot.trim_paths()\nrobot" % str(args)), + #nbv.new_code_cell("df = ebands_plotter.get_ebands_frame()\ndisplay(df)"), + ]) + + # Mixins + nb.cells.extend(self.get_baserobot_code_cells()) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/dfpt/ddb.py b/abipy/dfpt/ddb.py index 9c0023aa2..43a948cce 100644 --- a/abipy/dfpt/ddb.py +++ b/abipy/dfpt/ddb.py @@ -1,44 +1,42 @@ # coding: utf-8 """DDB File.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import tempfile import itertools import numpy as np import pandas as pd +import abipy.core.abinit_units as abu from collections import OrderedDict -from six.moves import map, zip, StringIO +from functools import lru_cache from monty.string import marquee, list_strings -from monty.collections import AttrDict, dict2namedtuple, tree +from monty.json import MSONable +from monty.collections import AttrDict, dict2namedtuple from monty.functools import lazy_property from monty.termcolor import cprint -from abipy.flowtk import NetcdfReader, AnaddbTask +from monty.dev import deprecated +from pymatgen.core.units import eV_to_Ha, bohr_to_angstrom, Energy +from pymatgen.util.serialization import pmg_serialize +from abipy.flowtk import AnaddbTask from abipy.core.mixins import TextFile, Has_Structure, NotebookWriter from abipy.core.symmetries import AbinitSpaceGroup from abipy.core.structure import Structure from abipy.core.kpoints import KpointList, Kpoint -from abipy.core.tensor import Tensor from abipy.iotools import ETSF_Reader +from abipy.tools.numtools import data_from_cplx_mode from abipy.abio.inputs import AnaddbInput -from abipy.dfpt.phonons import PhononDosPlotter, PhononBandsPlotter, InteratomicForceConstants -from abipy.dfpt.tensors import DielectricTensor -from abipy.core.abinit_units import phfactor_ev2units, phunit_tag #Ha_cmm1, -from pymatgen.analysis.elasticity.elastic import ElasticTensor -from pymatgen.core.units import eV_to_Ha, bohr_to_angstrom -from abipy.tools.plotting import Marker, add_fig_kwargs, get_ax_fig_plt, set_axlims +from abipy.dfpt.phonons import PhononDosPlotter, PhononBandsPlotter +from abipy.dfpt.ifc import InteratomicForceConstants +from abipy.dfpt.elastic import ElasticData +from abipy.dfpt.raman import Raman +from abipy.core.abinit_units import phfactor_ev2units, phunit_tag +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt from abipy.tools import duck +from abipy.tools.iotools import ExitStackWithFiles +from abipy.tools.tensors import DielectricTensor, ZstarTensor, Stress from abipy.abio.robots import Robot -import logging -logger = logging.getLogger(__name__) - -try: - from functools import lru_cache -except ImportError: # py2k - from abipy.tools.functools_lru_cache import lru_cache class DdbError(Exception): """Error class raised by DDB.""" @@ -46,17 +44,22 @@ class DdbError(Exception): class AnaddbError(DdbError): """ - Exceptions raised when we try to execute :class:`AnaddbTask` in the :class:`DdbFile` methods + Exceptions raised when we try to execute |AnaddbTask| in the |DdbFile| methods An `AnaddbError` has a reference to the task and to the :class:`EventsReport` that contains the error messages of the run. """ def __init__(self, *args, **kwargs): self.task, self.report = kwargs.pop("task"), kwargs.pop("report") - super(AnaddbError, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def __str__(self): - lines = ["\nworkdir = %s" % self.task.workdir] + lines = ["""\n + An exception has been raised while executing anaddb in workdir: %s + Please check the run.err, the run.abo and the job.sh files in the workdir + and make sure that manager.yml is properly configured. +""" + % self.task.workdir] app = lines.append if self.report.errors: @@ -73,14 +76,14 @@ class DdbFile(TextFile, Has_Structure, NotebookWriter): About the indices (idir, ipert) used by Abinit (Fortran notation): - * idir in [1, 2, 3] gives the direction (usually reduced direction) + * idir in [1, 2, 3] gives the direction (usually reduced direction, cart for strain) * ipert in [1, 2, ..., mpert] where mpert = natom + 6 - * ipert in [1, ..., natom] corresponds to atomic perturbations - * ipert = natom + 1 gives d/dk + * ipert in [1, ..., natom] corresponds to atomic perturbations (reduced dirs) + * ipert = natom + 1 gives d/dk (reduced dirs) * ipert = natom + 2 gives the electric field - * ipert = natom + 3 gives the uniaxial stress - * ipert = natom + 4 gives the shear stree. + * ipert = natom + 3 gives the uniaxial stress (cartesian dirs) + * ipert = natom + 4 gives the shear strees. (cartesian dirs) .. rubric:: Inheritance .. inheritance-diagram:: DdbFile @@ -93,6 +96,15 @@ def from_file(cls, filepath): """Needed for the :class:`TextFile` abstract interface.""" return cls(filepath) + @classmethod + def from_string(cls, string): + """Build object from string using temporary file.""" + fd, tmp_filepath = tempfile.mkstemp(text=True, prefix="_DDB") + with open(tmp_filepath, "wt") as fh: + fh.write(string) + + return cls(tmp_filepath) + @classmethod def from_mpid(cls, material_id, api_key=None, endpoint=None): """ @@ -118,8 +130,16 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None): return cls(tmpfile) + @classmethod + def as_ddb(cls, obj): + """ + Return an instance of |DdbFile| from a generic object `obj`. + Accepts: DdbFile or filepath + """ + return obj if isinstance(obj, cls) else cls.from_file(obj) + def __init__(self, filepath): - super(DdbFile, self).__init__(filepath) + super().__init__(filepath) self._header = self._parse_header() @@ -129,6 +149,10 @@ def __init__(self, filepath): spgid, has_timerev, h = 0, True, self.header self._structure.set_abi_spacegroup(AbinitSpaceGroup(spgid, h.symrel, h.tnons, h.symafm, has_timerev)) + # Add forces to structure. + if self.cart_forces is not None: + self._structure.add_site_property("cartesian_forces", self.cart_forces) + frac_coords = self._read_qpoints() self._qpoints = KpointList(self.structure.lattice.reciprocal_lattice, frac_coords, weights=None, names=None) @@ -150,19 +174,56 @@ def to_string(self, verbose=0): app("") app("Number of q-points in DDB: %d" % len(self.qpoints)) app("guessed_ngqpt: %s (guess for the q-mesh divisions made by AbiPy)" % self.guessed_ngqpt) - app("Has electric-field perturbation: %s" % self.has_emacro_terms()) - app("Has Born effective charges: %s" % self.has_bec_terms()) + #if verbose: + h = self.header + #app("Important parameters extracted from the header:") + app("ecut = %f, ecutsm = %f, nkpt = %d, nsym = %d, usepaw = %d" % (h.ecut, h.ecutsm, h.nkpt, h.nsym, h.usepaw)) + app("nsppol %d, nspinor %d, nspden %d, ixc = %d, occopt = %d, tsmear = %f" % ( + h.nsppol, h.nspinor, h.nspden, h.ixc, h.occopt, h.tsmear)) + app("") + + app("Has total energy: %s, Has forces: %s" % ( + self.total_energy is not None, self.cart_forces is not None)) + if self.total_energy is not None: + app("Total energy: %s [eV]" % self.total_energy) + #app("Has forces: %s" % ( + #if self.cart_forces is not None: + # app("Cartesian forces (eV/Ang):\n%s" % (self.cart_forces)) + # app("") + if self.cart_stress_tensor is not None: + app("") + app("Cartesian stress tensor in GPa with pressure %.3e (GPa):\n%s" % ( + - self.cart_stress_tensor.trace() / 3, self.cart_stress_tensor)) + else: + app("Has stress tensor: %s" % (self.cart_stress_tensor is not None)) + app("") + app("Has (at least one) atomic pertubation: %s" % self.has_at_least_one_atomic_perturbation()) + #app("Has (at least one) electric-field perturbation: %s" % self.has_epsinf_terms(select="at_least_one")) + #app("Has (all) electric-field perturbation: %s" % self.has_epsinf_terms(select="all")) + app("Has (at least one diagonal) electric-field perturbation: %s" % + self.has_epsinf_terms(select="at_least_one_diagoterm")) + app("Has (at least one) Born effective charge: %s" % self.has_bec_terms(select="at_least_one")) + app("Has (all) strain terms: %s" % self.has_strain_terms(select="all")) + app("Has (all) internal strain terms: %s" % self.has_internalstrain_terms(select="all")) + app("Has (all) piezoelectric terms: %s" % self.has_piezoelectric_terms(select="all")) if verbose: + # Print q-points app(self.qpoints.to_string(verbose=verbose, title="Q-points in DDB")) if verbose > 1: + # Print full header. from pprint import pformat - app(marquee("DDB Header", mark="=")) + app(marquee("DDB header", mark="=")) app(pformat(self.header)) return "\n".join(lines) + def get_string(self): + """Return string with DDB content.""" + with open(self.filepath, "rt") as fh: + return fh.read() + @property def structure(self): """|Structure| object.""" @@ -170,7 +231,7 @@ def structure(self): @property def natom(self): - """Number of atoms in structure""" + """Number of atoms in structure.""" return len(self.structure) @property @@ -226,7 +287,7 @@ def _parse_header(self): keyvals.append((key, list(map(parse, tokens)))) except Exception as exc: raise RuntimeError("Exception:\n%s\nwhile parsing ddb header line:\n%s" % - (str(exc), line)) + (str(exc), line)) # add the potential information for line in self: @@ -240,7 +301,7 @@ def _parse_header(self): h[key] = value # Convert to array. Note that znucl is converted into integer - # to avoid problems with pymatgen routines that expect integral Z + # to avoid problems with pymatgen routines that expect integer Z # This of course will break any code for alchemical mixing. arrays = { "acell": dict(shape=(3, ), dtype=np.double), @@ -269,7 +330,7 @@ def _parse_header(self): print("While Trying to reshape", k) raise exc - # Transpose symrel because Abinit write matrices by colums. + # Transpose symrel because Abinit write matrices by columns. h.symrel = np.array([s.T for s in h.symrel]) return h @@ -296,12 +357,12 @@ def _read_qpoints(self): qpoints.append(nums[:3]) weights.append(nums[3]) - return np.reshape(qpoints, (-1,3)) + return np.reshape(qpoints, (-1, 3)) @lazy_property def computed_dynmat(self): """ - :class:`OrderedDict` mapping q-point object to --> pandas Dataframe. + OrderedDict mapping q-point object to --> pandas Dataframe. The |pandas-DataFrame| contains the columns: "idir1", "ipert1", "idir2", "ipert2", "cvalue" and (idir1, ipert1, idir2, ipert2) as index. @@ -314,6 +375,11 @@ def computed_dynmat(self): dynmat = OrderedDict() for block in self.blocks: + # skip the blocks that are not related to second order derivatives + first_line = block["data"][0].strip() + if not first_line.startswith("2nd derivatives"): + continue + # Build q-point object. qpt = Kpoint(frac_coords=block["qpt"], lattice=self.structure.reciprocal_lattice, weight=None, name=None) @@ -333,7 +399,7 @@ def computed_dynmat(self): toks[5] = toks[5].replace("D", "E") cvalue = float(toks[4]) + 1j*float(toks[5]) except Exception as exc: - print("exception while parsing line:", line) + cprint("exception while parsing line: %s" % line, "red") raise exc df_index.append(p1 + p2) @@ -361,6 +427,7 @@ def _read_blocks(self): blocks = [] block_lines = [] qpt = None + dord = None for line in self: # skip empty lines @@ -369,14 +436,31 @@ def _read_blocks(self): if "List of bloks and their characteristics" in line: # add last block when we reach the last part of the file. - blocks.append({"data": block_lines, "qpt": qpt}) + # This line is present only if DDB has been produced by mrgddb + if block_lines: + blocks.append({"data": block_lines, "qpt": qpt, "dord": dord}) + block_lines = [] + qpt = None break + # Don't use lstring because we may reuse block_lines to write new DDB. line = line.rstrip() - # new block + + # new block --> detect order if "# elements" in line: if block_lines: - blocks.append({"data": block_lines, "qpt": qpt}) + blocks.append({"data": block_lines, "qpt": qpt, "dord": dord}) + + tokens = line.split() + num_elements = int(tokens[-1]) + s = " ".join(tokens[:2]) + dord = {"Total energy": 0, + "1st derivatives": 1, + "2nd derivatives": 2, + "3rd derivatives": 3}.get(s, None) + if dord is None: + raise RuntimeError("Cannot detect derivative order from string: `%s`" % s) + block_lines = [] qpt = None @@ -384,6 +468,9 @@ def _read_blocks(self): if "qpt" in line: qpt = list(map(float, line.split()[1:4])) + if block_lines: + blocks.append({"data": block_lines, "qpt": qpt, "dord": dord}) + return blocks @property @@ -442,7 +529,6 @@ def _guess_ngqpt(self): q[q == 0] = np.inf # Compute the minimum of the fractional coordinates along the 3 directions and invert - #print(all_qpoints) smalls = np.abs(all_qpoints).min(axis=0) smalls[smalls == 0] = 1 ngqpt = np.rint(1 / smalls) @@ -465,21 +551,119 @@ def _add_params(self, obj): raise TypeError("object %s does not have `params` attribute" % type(obj)) obj.params.update(self.params) + @lazy_property + def total_energy(self): + """ + Total energy in eV. None if not available. + """ + for block in self.blocks: + if block["dord"] == 0: + ene_ha = float(block["data"][1].split()[0].replace("D", "E")) + return Energy(ene_ha, "Ha").to("eV") + return None + + @lazy_property + def cart_forces(self): + """ + Cartesian forces in eV / Ang + None if not available i.e. if the GS DDB has not been merged. + """ + for block in self.blocks: + if block["dord"] != 1: continue + natom = len(self.structure) + fred = np.empty((natom, 3)) + for line in block["data"][1:]: + idir, ipert, fval = line.split()[:3] + # F --> C + idir, ipert = int(idir) - 1, int(ipert) - 1 + if ipert < natom: + fred[ipert, idir] = float(fval.replace("D", "E")) + + # Fred stores d(etotal)/d(xred) + # this array has *not* been corrected by enforcing + # the translational symmetry, namely that the sum of force + # on all atoms is not necessarly zero. + # Compute fcart using same code as in fred2fcart. + # Note conversion to cartesian coordinates (bohr) AND + # negation to make a force out of a gradient. + gprimd = self.structure.reciprocal_lattice.matrix / (2 * np.pi) * abu.Bohr_Ang + #fcart = - np.matmul(fred, gprimd) + fcart = - np.matmul(fred, gprimd.T) + # Subtract off average force from each force component + favg = fcart.sum(axis=0) / len(self.structure) + fcart -= favg + + return fcart * abu.Ha_eV / abu.Bohr_Ang + + return None + + @lazy_property + def cart_stress_tensor(self): + """ + |Stress| tensor in cartesian coordinates (GPa units). None if not available. + """ + for block in self.blocks: + if block["dord"] != 1: continue + svoigt = np.empty(6) + # Abinit stress is in cart coords and Ha/Bohr**3 + # Map (idir, ipert) --> voigt + uniax, shear = len(self.structure) + 3, len(self.structure) + 4 + dirper2voigt = { + (1, uniax): 0, + (2, uniax): 1, + (3, uniax): 2, + (1, shear): 3, + (2, shear): 4, + (3, shear): 5} + + for line in block["data"][1:]: + idir, ipert, fval = line.split()[:3] + idp = int(idir), int(ipert) + if idp in dirper2voigt: + svoigt[dirper2voigt[idp]] = float(fval.replace("D", "E")) + + # Convert from Ha/Bohr^3 to GPa + return Stress.from_voigt(svoigt * abu.HaBohr3_GPa) + + return None + def has_lo_to_data(self, select="at_least_one"): """ True if the DDB file contains the data required to compute the LO-TO splitting. """ - return self.has_emacro_terms(select=select) and self.has_bec_terms(select=select) + return self.has_epsinf_terms(select=select) and self.has_bec_terms(select=select) + + @lru_cache(typed=True) + def has_at_least_one_atomic_perturbation(self, qpt=None): + """ + True if the DDB file contains info on (at least one) atomic perturbation. + If the coordinates of a q point are provided only the specified qpt will be considered. + """ + natom = len(self.structure) + ap_list = list(itertools.product(range(1, 4), range(1, natom + 1))) + + for qpt_dm, df in self.computed_dynmat.items(): + if qpt is not None and qpt_dm != qpt: continue + + index_set = set(df.index) + for p1 in ap_list: + for p2 in ap_list: + p12 = p1 + p2 + if p12 in index_set: return True + + return False @lru_cache(typed=True) - def has_emacro_terms(self, select="at_least_one"): + def has_epsinf_terms(self, select="at_least_one"): """ True if the DDB file contains info on the electric-field perturbation. Args: - select: Possible values in ["at_least_one", "all"] - If select == "at_least_one", we check if there's at least one entry associated to the electric field. - and we assume that anaddb will be able to reconstruct the full tensor by symmetry. + select: Possible values in ["at_least_one", "at_least_one_diagoterm", "all"] + If select == "at_least_one", we check if there's at least one entry + associated to the electric field and we assume that anaddb will be able + to reconstruct the full tensor by symmetry. + "at_least_one_diagoterm" is similar but it only checks for the presence of one diagonal term. If select == "all", all tensor components must be present in the DDB file. """ gamma = Kpoint.gamma(self.structure.reciprocal_lattice) @@ -493,14 +677,23 @@ def has_emacro_terms(self, select="at_least_one"): for p1 in ep_list: for p2 in ep_list: p12 = p1 + p2 + p21 = p2 + p1 if select == "at_least_one": if p12 in index_set: return True + elif select == "at_least_one_diagoterm": + if p12 == p21 and p12 in index_set: + return True elif select == "all": - if p12 not in index_set: return False + if p12 not in index_set and p21 not in index_set: + return False else: raise ValueError("Wrong select %s" % str(select)) - return False + return False if select in ("at_least_one", "at_least_one_diagoterm") else True + + @deprecated(message="has_emacro_terms is deprecated and will be removed in abipy 0.8, use has_epsinf_terms") + def has_emacro_terms(self, **kwargs): + return self.has_epsinf_terms(**kwargs) @lru_cache(typed=True) def has_bec_terms(self, select="at_least_one"): @@ -524,25 +717,147 @@ def has_bec_terms(self, select="at_least_one"): for ap1 in ap_list: for ep2 in ep_list: p12 = ap1 + ep2 + p21 = ep2 + ap1 if select == "at_least_one": if p12 in index_set: return True elif select == "all": - if p12 not in index_set: return False + if p12 not in index_set and p21 not in index_set: + return False else: raise ValueError("Wrong select %s" % str(select)) - return False + return False if select == "at_least_one" else True + + @lru_cache(typed=True) + def has_strain_terms(self, select="all"): + """ + True if the DDB file contains info on the (clamped-ion) strain perturbation + (i.e. 2nd order derivatives wrt strain) + + Args: + select: Possible values in ["at_least_one", "all"] + If select == "at_least_one", we check if there's at least one entry associated to the strain. + and we assume that anaddb will be able to reconstruct the full tensor by symmetry. + If select == "all", all tensor components must be present in the DDB file. + + .. note:: + + As anaddb is not yet able to reconstruct the strain terms by symmetry, + the default value for select is "all" + """ + gamma = Kpoint.gamma(self.structure.reciprocal_lattice) + if gamma not in self.computed_dynmat: + return False + + index_set = set(self.computed_dynmat[gamma].index) + + natom = len(self.structure) + sp_list = list(itertools.product(range(1, 4), [natom + 3, natom + 4])) + for p1 in sp_list: + for p2 in sp_list: + p12 = p1 + p2 + p21 = p2 + p1 + if select == "at_least_one": + if p12 in index_set: return True + elif select == "all": + if p12 not in index_set and p21 not in index_set: + #print("p12", p12, "not in index_set") + return False + else: + raise ValueError("Wrong select %s" % str(select)) + + return False if select == "at_least_one" else True + + @lru_cache(typed=True) + def has_internalstrain_terms(self, select="all"): + """ + True if the DDB file contains internal strain terms + i.e "off-diagonal" 2nd order derivatives wrt (strain, atomic displacement) + + Args: + select: Possible values in ["at_least_one", "all"] + If select == "at_least_one", we check if there's at least one entry associated to the strain. + and we assume that anaddb will be able to reconstruct the full tensor by symmetry. + If select == "all", all tensor components must be present in the DDB file. + + .. note:: + + As anaddb is not yet able to reconstruct the strain terms by symmetry, + the default value for select is "all" + """ + gamma = Kpoint.gamma(self.structure.reciprocal_lattice) + if gamma not in self.computed_dynmat: + return False + + index_set = set(self.computed_dynmat[gamma].index) + + natom = len(self.structure) + sp_list = list(itertools.product(range(1, 4), [natom + 3, natom + 4])) + ap_list = list(itertools.product(range(1, 4), range(1, natom + 1))) + for p1 in sp_list: + for p2 in ap_list: + p12 = p1 + p2 + p21 = p2 + p1 + if select == "at_least_one": + if p12 in index_set: return True + elif select == "all": + if p12 not in index_set and p21 not in index_set: + #print("p12", p12, "non in index") + return False + else: + raise ValueError("Wrong select %s" % str(select)) + + return False if select == "at_least_one" else True + + @lru_cache(typed=True) + def has_piezoelectric_terms(self, select="all"): + """ + True if the DDB file contains piezoelectric terms + i.e "off-diagonal" 2nd order derivatives wrt (electric_field, strain) + + Args: + select: Possible values in ["at_least_one", "all"] + If select == "at_least_one", we check if there's at least one entry associated to the strain. + and we assume that anaddb will be able to reconstruct the full tensor by symmetry. + If select == "all", all tensor components must be present in the DDB file. + + .. note:: + + As anaddb is not yet able to reconstruct the (strain, electric) terms by symmetry, + the default value for select is "all" + """ + gamma = Kpoint.gamma(self.structure.reciprocal_lattice) + if gamma not in self.computed_dynmat: + return False + + index_set = set(self.computed_dynmat[gamma].index) + + natom = len(self.structure) + sp_list = list(itertools.product(range(1, 4), [natom + 3, natom + 4])) + ep_list = list(itertools.product(range(1, 4), [natom + 2])) + for p1 in sp_list: + for p2 in ep_list: + p12 = p1 + p2 + p21 = p2 + p1 + if select == "at_least_one": + if p12 in index_set: return True + elif select == "all": + if p12 not in index_set and p21 not in index_set: return False + else: + raise ValueError("Wrong select %s" % str(select)) + + return False if select == "at_least_one" else True def view_phononwebsite(self, browser=None, verbose=0, dryrun=False, **kwargs): """ Invoke anaddb to compute phonon bands. - Produce JSON_ file that can be parsed from the phononwebsite_ and open it in ``browser``. + Produce JSON file that can be parsed from the phononwebsite_ and open it in ``browser``. Args: browser: Open webpage in ``browser``. Use default $BROWSER if None. verbose: Verbosity level dryrun: Activate dryrun mode for unit testing purposes. - kwargs: Passed to anaget_phbst_and_phdos_files + kwargs: Passed to ``anaget_phbst_and_phdos_files``. Return: Exit status """ @@ -594,7 +909,7 @@ def anaget_phmodes_at_qpoint(self, qpoint=None, asr=2, chneut=1, dipdip=1, workd # Check if qpoint is in the DDB. try: iq = self.qindex(qpoint) - except: + except Exception: raise ValueError("input qpoint %s not in %s.\nddb.qpoints:\n%s" % ( qpoint, self.filepath, self.qpoints)) @@ -604,23 +919,13 @@ def anaget_phmodes_at_qpoint(self, qpoint=None, asr=2, chneut=1, dipdip=1, workd lo_to_splitting = self.has_lo_to_data() and qpoint.is_gamma() and dipdip != 0 if lo_to_splitting and qpoint.is_gamma() and not self.has_lo_to_data(): - cprint("lo_to_splitting set to True but Emacro and Becs are not available in DDB %s:" % self.filepath) + cprint("lo_to_splitting set to True but Eps_inf and Becs are not available in DDB %s:" % self.filepath) inp = AnaddbInput.modes_at_qpoint(self.structure, qpoint, asr=asr, chneut=chneut, dipdip=dipdip, lo_to_splitting=lo_to_splitting, directions=directions, anaddb_kwargs=anaddb_kwargs, spell_check=spell_check) - task = AnaddbTask.temp_shell_task(inp, ddb_node=self.filepath, workdir=workdir, - manager=manager, mpi_procs=mpi_procs) - if verbose: - print("ANADDB INPUT:\n", inp) - print("workdir:", task.workdir) - - # Run the task here - task.start_and_wait(autoparal=False) - report = task.get_event_report() - if not report.run_completed: - raise self.AnaddbError(task=task, report=report) + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) with task.open_phbst() as ncfile: if lo_to_splitting and qpoint.is_gamma(): @@ -628,12 +933,24 @@ def anaget_phmodes_at_qpoint(self, qpoint=None, asr=2, chneut=1, dipdip=1, workd return ncfile.phbands - def anaget_phbst_and_phdos_files(self, nqsmall=10, qppa=None, ndivsm=20, line_density=None, asr=2, chneut=1, dipdip=1, - dos_method="tetra", lo_to_splitting="automatic", ngqpt=None, qptbounds=None, + def anaget_phbst_and_phdos_files(self, nqsmall=10, qppa=None, ndivsm=20, line_density=None, asr=2, chneut=1, dipdip=1, + dos_method="tetra", lo_to_splitting="automatic", ngqpt=None, qptbounds=None, anaddb_kwargs=None, verbose=0, spell_check=True, mpi_procs=1, workdir=None, manager=None): """ - Execute anaddb to compute the phonon band structure and the phonon DOS + Execute anaddb to compute the phonon band structure and the phonon DOS. + Return contex manager that closes the files automatically. + + .. important:: + + Use: + + with ddb.anaget_phbst_and_phdos_files(...) as g: + phbst_file, phdos_file = g[0], g[0] + + to ensure the netcdf files are closed instead of: + + phbst_file, phdos_file = ddb.anaget_phbst_and_phdos_files(...) Args: nqsmall: Defines the homogeneous q-mesh used for the DOS. Gives the number of divisions @@ -660,7 +977,7 @@ def anaget_phbst_and_phdos_files(self, nqsmall=10, qppa=None, ndivsm=20, line_de workdir: Working directory. If None, a temporary directory is created. manager: |TaskManager| object. If None, the object is initialized from the configuration file. - Returns: + Returns: Context manager with two files: |PhbstFile| with the phonon band structure. |PhdosFile| with the the phonon DOS. """ @@ -670,7 +987,7 @@ def anaget_phbst_and_phdos_files(self, nqsmall=10, qppa=None, ndivsm=20, line_de lo_to_splitting = self.has_lo_to_data() and dipdip != 0 if lo_to_splitting and not self.has_lo_to_data(): - cprint("lo_to_splitting is True but Emacro and Becs are not available in DDB: %s" % self.filepath, "yellow") + cprint("lo_to_splitting is True but Eps_inf and Becs are not available in DDB: %s" % self.filepath, "yellow") inp = AnaddbInput.phbands_and_dos( self.structure, ngqpt=ngqpt, ndivsm=ndivsm, line_density=line_density, @@ -678,48 +995,48 @@ def anaget_phbst_and_phdos_files(self, nqsmall=10, qppa=None, ndivsm=20, line_de asr=asr, chneut=chneut, dipdip=dipdip, dos_method=dos_method, lo_to_splitting=lo_to_splitting, anaddb_kwargs=anaddb_kwargs, spell_check=spell_check) - #work as usual - task = AnaddbTask.temp_shell_task(inp, ddb_node=self.filepath, workdir=workdir, manager=manager, mpi_procs=mpi_procs) + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) - if verbose: - print("ANADDB INPUT:\n", inp) - print("workdir:", task.workdir) - - # Run the task here. - task.start_and_wait(autoparal=False) - - report = task.get_event_report() - if not report.run_completed: - raise self.AnaddbError(task=task, report=report) + # Use ExitStackWithFiles so that caller can use with contex manager. + exit_stack = ExitStackWithFiles() # Open file and add metadata to phbands from DDB # TODO: in principle phbands.add_params? phbst_file = task.open_phbst() + exit_stack.enter_context(phbst_file) + self._add_params(phbst_file.phbands) if lo_to_splitting: phbst_file.phbands.read_non_anal_from_file(os.path.join(task.workdir, "anaddb.nc")) - phdos_file = None if inp["prtdos"] == 0 else task.open_phdos() - #if phdos_file is not None: self._add_params(phdos_file.phdos) + phdos_file = None + if inp["prtdos"] != 0: + phdos_file = task.open_phdos() + #self._add_params(phdos_file.phdos) - return phbst_file, phdos_file + exit_stack.enter_context(phdos_file) - def get_coarse(self, filepath, ngqpt_coarse): + return exit_stack + + def get_coarse(self, ngqpt_coarse, filepath=None): """ Get a version of this file on a coarse mesh Args: - ngqpt: list of ngqpt indexes that must be a sub-mesh of the original ngqpt + ngqpt_coarse: list of ngqpt indexes that must be a sub-mesh of the original ngqpt + filepath: Filename for coarse DDB. If None, temporary filename is used. + + Return: |DdbFile| on coarse mesh. """ - #check if ngqpt is a sub-mesh of ngqpt + # Check if ngqpt is a sub-mesh of ngqpt ngqpt_fine = self.guessed_ngqpt - if any([a%b for a,b in zip(ngqpt_fine,ngqpt_coarse)]): + if any([a % b for a, b in zip(ngqpt_fine, ngqpt_coarse)]): raise ValueError('Coarse q-mesh is not a sub-mesh of the current q-mesh') - #get the points in the fine mesh + # Get the points in the fine mesh fine_qpoints = [q.frac_coords for q in self.qpoints] - #generate the points of the coarse mesh + # Generate the points of the coarse mesh map_fine_to_coarse = [] nx,ny,nz = ngqpt_coarse for i,j,k in itertools.product(range(-int(nx/2), int(nx/2) + 1), @@ -727,12 +1044,15 @@ def get_coarse(self, filepath, ngqpt_coarse): range(-int(nz/2), int(nz/2) + 1)): coarse_qpt = np.array([i, j, k]) / np.array(ngqpt_coarse) for n,fine_qpt in enumerate(fine_qpoints): - if np.allclose(coarse_qpt,fine_qpt): + if np.allclose(coarse_qpt, fine_qpt): map_fine_to_coarse.append(n) - #write the file with a subset of q-points - self.write(filepath,map_fine_to_coarse) - return DdbFile(filepath) + # Write the file with a subset of q-points + if filepath is None: + _, filepath = tempfile.mkstemp(suffix="_DDB", text=True) + + self.write(filepath, filter_blocks=map_fine_to_coarse) + return self.__class__(filepath) def anacompare_asr(self, asr_list=(0, 2), chneut_list=(1,), dipdip=1, lo_to_splitting="automatic", nqsmall=10, ndivsm=20, dos_method="tetra", ngqpt=None, @@ -763,8 +1083,7 @@ def anacompare_asr(self, asr_list=(0, 2), chneut_list=(1,), dipdip=1, lo_to_spli Return: |PhononBandsPlotter| object. - Client code can use ``plotter.combiplot()`` or ``plotter.gridplot()`` - to visualize the results. + Client code can use ``plotter.combiplot()`` or ``plotter.gridplot()`` to visualize the results. """ phbands_plotter = PhononBandsPlotter() @@ -811,8 +1130,7 @@ def anacompare_dipdip(self, chneut_list=(1,), asr=2, lo_to_splitting="automatic" Return: |PhononDosPlotter| object. - Client code can use ``plotter.combiplot()`` or ``plotter.gridplot()`` - to visualize the results. + Client code can use ``plotter.combiplot()`` or ``plotter.gridplot()`` to visualize the results. """ phbands_plotter = PhononBandsPlotter() @@ -839,7 +1157,7 @@ def anacompare_phdos(self, nqsmalls, asr=2, chneut=1, dipdip=1, dos_method="tetr """ Invoke Anaddb to compute Phonon DOS with different q-meshes. The ab-initio dynamical matrix reported in the DDB_ file will be Fourier-interpolated on the list of q-meshes specified - by ``nqsmalls``. Useful to perform covergence studies. + by ``nqsmalls``. Useful to perform convergence studies. Args: nqsmalls: List of integers defining the q-mesh for the DOS. Each integer gives @@ -859,7 +1177,7 @@ def anacompare_phdos(self, nqsmalls, asr=2, chneut=1, dipdip=1, dos_method="tetr plotter: |PhononDosPlotter| object. Client code can use ``plotter.gridplot()`` to visualize the results. """ - num_cpus = get_ncpus() // 2 if num_cpus is None else num_cpus + #num_cpus = get_ncpus() // 2 if num_cpus is None else num_cpus if num_cpus <= 0: num_cpus = 1 num_cpus = min(num_cpus, len(nqsmalls)) @@ -878,7 +1196,7 @@ def do_work(nqsmall): else: # Threads if verbose: - print("Computing %d phonon DOS with %d threads" % (len(nqsmalls), num_cpus) ) + print("Computing %d phonon DOS with %d threads" % (len(nqsmalls), num_cpus)) phdoses = [None] * len(nqsmalls) def worker(): @@ -889,10 +1207,7 @@ def worker(): q.task_done() from threading import Thread - try: - from Queue import Queue # py2k - except ImportError: - from queue import Queue # py3k + from queue import Queue q = Queue() for i in range(num_cpus): @@ -923,9 +1238,50 @@ def worker(): return dict2namedtuple(phdoses=phdoses, plotter=plotter) - def anaget_emacro_and_becs(self, chneut=1, mpi_procs=1, workdir=None, manager=None, verbose=0): + def anacompare_rifcsph(self, rifcsph_list, asr=2, chneut=1, dipdip=1, lo_to_splitting="automatic", + ndivsm=20, ngqpt=None, verbose=0, mpi_procs=1): """ - Call anaddb to compute the macroscopic dielectric tensor and the Born effective charges. + Invoke anaddb to compute the phonon band structure and the phonon DOS with different + values of the ``asr`` input variable (acoustic sum rule treatment). + Build and return |PhononBandsPlotter| object. + + Args: + rifcsph_list: List of rifcsph to analyze. + asr, chneut, dipdip: Anaddb input variable. See official documentation. + dipdip: 1 to activate treatment of dipole-dipole interaction (requires BECS and dielectric tensor). + lo_to_splitting: Allowed values are [True, False, "automatic"]. Defaults to "automatic" + If True the LO-TO splitting will be calculated if qpoint == Gamma and the non_anal_directions + non_anal_phfreqs attributes will be addeded to the phonon band structure. + "automatic" activates LO-TO if the DDB file contains the dielectric tensor and Born effective charges. + ndivsm: Number of division used for the smallest segment of the q-path + ngqpt: Number of divisions for the ab-initio q-mesh in the DDB file. Auto-detected if None (default) + verbose: Verbosity level. + mpi_procs: Number of MPI processes used by anaddb. + + Return: + |PhononBandsPlotter| object. + + Client code can use ``plotter.combiplot()`` or ``plotter.gridplot()`` to visualize the results. + """ + phbands_plotter = PhononBandsPlotter() + + for rifcsph in rifcsph_list: + phbst_file, _ = self.anaget_phbst_and_phdos_files( + nqsmall=0, ndivsm=ndivsm, asr=asr, chneut=chneut, dipdip=dipdip, dos_method="tetra", + lo_to_splitting=lo_to_splitting, ngqpt=ngqpt, qptbounds=None, + anaddb_kwargs={"rifcsph": rifcsph}, + verbose=verbose, mpi_procs=mpi_procs, workdir=None, manager=None) + + label = "rifcsph: %f" % rifcsph + phbands_plotter.add_phbands(label, phbst_file.phbands) + phbst_file.close() + + return phbands_plotter + + def anaget_epsinf_and_becs(self, chneut=1, mpi_procs=1, workdir=None, manager=None, verbose=0): + """ + Call anaddb to compute the macroscopic electronic dielectric tensor (e_inf) + and the Born effective charges in Cartesian coordinates. Args: chneut: Anaddb input variable. See official documentation. @@ -933,34 +1289,28 @@ def anaget_emacro_and_becs(self, chneut=1, mpi_procs=1, workdir=None, manager=No mpi_procs: Number of MPI processes to use. verbose: verbosity level. Set it to a value > 0 to get more information - Return: - (emacro, becs) + Return: ``namedtuple`` with the following attributes:: + epsinf: |DielectricTensor| object. + becs: Becs objects. """ if not self.has_lo_to_data(): cprint("Dielectric tensor and Becs are not available in DDB: %s" % self.filepath, "yellow") inp = AnaddbInput(self.structure, anaddb_kwargs={"chneut": chneut}) - task = AnaddbTask.temp_shell_task(inp, ddb_node=self.filepath, mpi_procs=mpi_procs, workdir=workdir, manager=manager) - - if verbose: - print("ANADDB INPUT:\n", inp) - print("workdir:", task.workdir) - - # Run the task here. - task.start_and_wait(autoparal=False) - report = task.get_event_report() - if not report.run_completed: - raise self.AnaddbError(task=task, report=report) + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) # Read data from the netcdf output file produced by anaddb. with ETSF_Reader(os.path.join(task.workdir, "anaddb.nc")) as r: + epsinf = DielectricTensor(r.read_value("emacro_cart").T.copy()) structure = r.read_structure() - # TODO Replace with pymatgen tensors - emacro = Tensor.from_cartesian_tensor(r.read_value("emacro_cart"), structure.lattice, space="r"), becs = Becs(r.read_value("becs_cart"), structure, chneut=inp["chneut"], order="f") + return dict2namedtuple(epsinf=epsinf, becs=becs) - return emacro, becs + @deprecated(message="anaget_emacro_and_becs is deprecated and will be removed in abipy 0.8, use anaget_epsinf_and_becs") + def anaget_emacro_and_becs(self, **kwargs): + r = self.anaget_epsinf_and_becs(**kwargs) + return r.epsinf, r.becs def anaget_ifc(self, ifcout=None, asr=2, chneut=1, dipdip=1, ngqpt=None, mpi_procs=1, workdir=None, manager=None, verbose=0, anaddb_kwargs=None): @@ -985,18 +1335,7 @@ def anaget_ifc(self, ifcout=None, asr=2, chneut=1, dipdip=1, ngqpt=None, inp = AnaddbInput.ifc(self.structure, ngqpt=ngqpt, ifcout=ifcout, q1shft=(0, 0, 0), asr=asr, chneut=chneut, dipdip=dipdip, anaddb_kwargs=anaddb_kwargs) - task = AnaddbTask.temp_shell_task(inp, ddb_node=self.filepath, mpi_procs=mpi_procs, workdir=workdir, manager=manager) - - if verbose: - print("ANADDB INPUT:\n", inp) - print("workdir:", task.workdir) - - # Run the task here. - task.start_and_wait(autoparal=False) - - report = task.get_event_report() - if not report.run_completed: - raise self.AnaddbError(task=task, report=report) + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) return InteratomicForceConstants.from_file(os.path.join(task.workdir, 'anaddb.nc')) @@ -1018,8 +1357,8 @@ def anaget_dielectric_tensor_generator(self, asr=2, chneut=1, dipdip=1, workdir= """ # Check if gamma is in the DDB. try: - self.qindex((0,0,0)) - except: + self.qindex((0, 0, 0)) + except Exception: raise ValueError("Gamma point not in %s.\nddb.qpoints:\n%s" % (self.filepath, self.qpoints)) inp = AnaddbInput.modes_at_qpoint(self.structure, (0, 0, 0), asr=asr, chneut=chneut, dipdip=dipdip, @@ -1028,20 +1367,136 @@ def anaget_dielectric_tensor_generator(self, asr=2, chneut=1, dipdip=1, workdir= if anaddb_kwargs is None or 'dieflag' not in anaddb_kwargs: inp['dieflag'] = 1 - task = AnaddbTask.temp_shell_task(inp, ddb_node=self.filepath, workdir=workdir, manager=manager, mpi_procs=mpi_procs) + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) + + return DielectricTensorGenerator.from_files(os.path.join(task.workdir, "run.abo_PHBST.nc"), + os.path.join(task.workdir, "anaddb.nc")) + + def anaget_elastic(self, relaxed_ion="automatic", piezo="automatic", + dde=False, stress_correction=False, asr=2, chneut=1, + mpi_procs=1, workdir=None, manager=None, verbose=0, retpath=False): + """ + Call anaddb to compute elastic and piezoelectric tensors. Require DDB with strain terms. + + By default, this method sets the anaddb input variables automatically + by looking at the 2nd-order derivatives available in the DDB file. + This behaviour can be changed by setting explicitly the value of: + `relaxed_ion` and `piezo`. + + Args: + relaxed_ion: Activate computation of relaxed-ion tensors. + Allowed values are [True, False, "automatic"]. Defaults to "automatic". + In "automatic" mode, relaxed-ion tensors are automatically computed if + internal strain terms and phonons at Gamma are present in the DDB. + piezo: Activate computation of piezoelectric tensors. + Allowed values are [True, False, "automatic"]. Defaults to "automatic". + In "automatic" mode, piezoelectric tensors are automatically computed if + piezoelectric terms are present in the DDB. + NB: relaxed-ion piezoelectric requires the activation of `relaxed_ion`. + dde: if True, dielectric tensors will be calculated. + stress_correction: Calculate the relaxed ion elastic tensors, considering + the stress left inside cell. The DDB must contain the stress tensor. + asr: Anaddb input variable. See official documentation. + chneut: Anaddb input variable. See official documentation. + mpi_procs: Number of MPI processes to use. + workdir: Working directory. If None, a temporary directory is created. + manager: |TaskManager| object. If None, the object is initialized from the configuration file + verbose: verbosity level. Set it to a value > 0 to get more information + retpath: True to return path to anaddb.nc file. + + Return: + |ElasticData| object if ``retpath`` is None else absolute path to anaddb.nc file. + """ + if not self.has_strain_terms(): # DOH! + cprint("Strain perturbations are not available in DDB: %s" % self.filepath, "yellow") + + if relaxed_ion == "automatic": + relaxed_ion = self.has_internalstrain_terms() and self.has_at_least_one_atomic_perturbation(qpt=(0, 0, 0)) + + if relaxed_ion: + if not self.has_at_least_one_atomic_perturbation(qpt=(0, 0, 0)): + cprint("Requiring `relaxed_ion` but no atomic term available in DDB: %s" % self.filepath, "yellow") + if not self.has_internalstrain_terms(): + cprint("Requiring `internal_strain` but no internal strain term in DDB: %s" % self.filepath, "yellow") + + if piezo == "automatic": + piezo = self.has_piezoelectric_terms() + + if piezo and not self.has_piezoelectric_terms(): + cprint("Requiring `piezo` but no piezoelectric term available in DDB: %s" % self.filepath, "yellow") + + # FIXME This is problematic so don't use automatic as default + #select = "all" + select = "at_least_one_diagoterm" + if dde == "automatic": + dde = self.has_epsinf_terms(select=select) + + if dde and not self.has_epsinf_terms(select=select): + cprint("Requiring `dde` but dielectric tensor not available in DDB: %s" % self.filepath, "yellow") + + if stress_correction == "automatic": + stress_correction = self.cart_stress_tensor is not None + + if stress_correction and self.cart_stress_tensor is None: + cprint("Requiring `stress_correction` but stress not available in DDB: %s" % self.filepath, "yellow") + + inp = AnaddbInput.dfpt(self.structure, strain=True, relaxed_ion=relaxed_ion, + dde=dde, piezo=piezo, stress_correction=stress_correction, dte=False, + asr=asr, chneut=chneut) + + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) + + # Read data from the netcdf output file produced by anaddb. + path = os.path.join(task.workdir, "anaddb.nc") + return ElasticData.from_file(path) if not retpath else path + + def anaget_raman(self, asr=2, chneut=1, ramansr=1, alphon=1, workdir=None, mpi_procs=1, + manager=None, verbose=0, directions=None, anaddb_kwargs=None): + """ + Execute anaddb to compute the Raman spectrum + + Args: + qpoint: Reduced coordinates of the qpoint where phonon modes are computed. + asr, chneut, ramansr, alphon: Anaddb input variable. See official documentation. + workdir: Working directory. If None, a temporary directory is created. + mpi_procs: Number of MPI processes to use. + manager: |TaskManager| object. If None, the object is initialized from the configuration file + verbose: verbosity level. Set it to a value > 0 to get more information. + directions: list of 3D directions along which the non analytical contribution will be calculated. + If None the three cartesian direction will be used. + anaddb_kwargs: additional kwargs for anaddb. + + Return: |Raman| object. + """ + + inp = AnaddbInput.dfpt(self.structure, raman=True, asr=asr, chneut=chneut, ramansr=ramansr, + alphon=alphon, directions=directions, anaddb_kwargs=anaddb_kwargs) + + task = self._run_anaddb_task(inp, mpi_procs, workdir, manager, verbose) + + # Read data from the netcdf output file produced by anaddb. + path = os.path.join(task.workdir, "anaddb.nc") + return Raman.from_file(path) + + def _run_anaddb_task(self, anaddb_input, mpi_procs, workdir, manager, verbose): + """ + Execute an |AnaddbInput| via the shell. Return |AnaddbTask|. + """ + task = AnaddbTask.temp_shell_task(anaddb_input, ddb_node=self.filepath, + mpi_procs=mpi_procs, workdir=workdir, manager=manager) if verbose: - print("ANADDB INPUT:\n", inp) + print("ANADDB INPUT:\n", anaddb_input) print("workdir:", task.workdir) - # Run the task here + # Run the task here. task.start_and_wait(autoparal=False) + report = task.get_event_report() if not report.run_completed: raise self.AnaddbError(task=task, report=report) - return DielectricTensorGenerator.from_files(os.path.join(task.workdir, "run.abo_PHBST.nc"), - os.path.join(task.workdir, "anaddb.nc")) + return task def write(self, filepath, filter_blocks=None): """ @@ -1102,6 +1557,11 @@ def replace_block_for_qpoint(self, qpt, data): return False + def get_panel(self): + """Build panel with widgets to interact with the |DdbFile| either in a notebook or in panel app.""" + from abipy.panels.ddb import DdbFilePanel + return DdbFilePanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write an jupyter_ notebook to nbpath. If ``nbpath`` is None, a temporay file in the current @@ -1141,8 +1601,8 @@ def write_notebook(self, nbpath=None): nbv.new_markdown_cell("## Macroscopic dielectric tensor and Born effective charges"), nbv.new_code_cell("""\ if False: - emacro, becs = ddb.anaget_emacro_and_becs() - print(emacro) + eps_inf, becs = ddb.anaget_epsinf_and_becs() + print(eps_inf) print(becs)"""), nbv.new_markdown_cell("## Call `anaddb` to compute phonons and DOS with/without ASR"), @@ -1185,17 +1645,22 @@ def write_notebook(self, nbpath=None): return self._write_nb_nbpath(nb, nbpath) -class Becs(Has_Structure): +class Becs(Has_Structure, MSONable): """ This object stores the Born effective charges and provides simple tools for data analysis. """ + @pmg_serialize + def as_dict(self): + """Return dictionary with JSON serialization in MSONable format.""" + return dict(becs_arr=self.values, structure=self.structure, chneut=self.chneut, order="c") + def __init__(self, becs_arr, structure, chneut, order="c"): """ Args: - becs_arr: (3, 3, natom) array with the Born effective charges in Cartesian coordinates. + becs_arr: [3, 3, natom] array with the Born effective charges in Cartesian coordinates. structure: |Structure| object. - chneut: Option used for the treatment of the Charge Neutrality requirement + chneut: Option used for the treatment of the Charge Neutrality. for the effective charges (anaddb input variable) order: "f" if becs_arr is in Fortran order. """ @@ -1203,12 +1668,15 @@ def __init__(self, becs_arr, structure, chneut, order="c"): self._structure = structure self.chneut = chneut + # Values is a numpy array while zstars is a list of Tensor objects. self.values = np.empty((len(structure), 3, 3)) for i, bec in enumerate(becs_arr): mat = becs_arr[i] - if order.lower() == "f": mat = mat.T + if order.lower() == "f": mat = mat.T.copy() self.values[i] = mat + self.zstars = [ZstarTensor(mat) for mat in self.values] + @property def structure(self): """|Structure| object.""" @@ -1219,117 +1687,75 @@ def __repr__(self): def to_string(self, verbose=0): """String representation.""" - lines = [] - app = lines.append - app("Born effective charges computed with chneut: %d\n" % self.chneut) - for site, bec in zip(self.structure, self.values): - app("Z* at site: %s" % repr(site)) - app(str(bec)) - app("") + lines = []; app = lines.append + app("Born effective charges in Cartesian coordinates (Voigt notation)") + app(self.get_voigt_dataframe().to_string()) + app("") + + if verbose: + app("Born effective charges (full tensor)") + for site, bec in zip(self.structure, self.values): + app("Z* at site: %s" % repr(site)) + app(str(bec)) + app("") # Add info on the bec sum rule. - stream = StringIO() - self.check_sumrule(stream=stream) - app(stream.getvalue()) + app("Born effective charge neutrality sum-rule with chneut: %d\n" % self.chneut) + app(str(self.sumrule)) return "\n".join(lines) @property def sumrule(self): + """[3, 3] matrix with Born effective charge neutrality sum-rule.""" return self.values.sum(axis=0) - def check_sumrule(self, stream=sys.stdout): - stream.write("Born effective charge neutrality sum-rule with chneut: %d\n" % self.chneut) - stream.write(str(self.sumrule)) - + def _repr_html_(self): + """Integration with jupyter notebooks.""" + return self.get_voigt_dataframe()._repr_html_() -class ElasticComplianceTensor(Has_Structure): - """This object is used to store the elastic and compliance tensors.""" - - def __init__(self, elastic_tensor, compliance_tensor, structure, additional_info=None): + def get_voigt_dataframe(self, view="inequivalent", tol=1e-3, select_symbols=None, decimals=5, verbose=0): """ + Return |pandas-DataFrame| with Voigt indices as columns and natom rows. Args: - elastic_tensor: (6, 6) array with the elastic tensor in Cartesian coordinates - compliance_tensor: (6, 6) array with the compliance tensor in Cartesian coordinates - structure: |Structure| object. + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + tol: Entries are set to zero below this value + select_symbols: String or list of strings with chemical symbols. + Used to select only atoms of this type. + decimals: Number of decimal places to round to. + If decimals is negative, it specifies the number of positions to the left of the decimal point. + verbose: Verbosity level. """ - self._structure = structure - self.elastic_tensor = elastic_tensor - self.compliance_tensor = compliance_tensor - self.additional_info = additional_info + aview = self._get_atomview(view, select_symbols=select_symbols, verbose=verbose) - @property - def structure(self): - """|Structure| object.""" - return self._structure - - def __repr__(self): - return self.to_string() - - @classmethod - def from_ec_nc_file(cls, ec_nc_file, tensor_type='relaxed_ion'): - with NetcdfReader(ec_nc_file) as nc_reader: - if tensor_type == 'relaxed_ion': - ec = np.array(nc_reader.read_variable('elastic_constants_relaxed_ion')) - compl = np.array(nc_reader.read_variable('compliance_constants_relaxed_ion')) - elif tensor_type == 'clamped_ion': - ec = np.array(nc_reader.read_variable('elastic_constants_clamped_ion')) - compl = np.array(nc_reader.read_variable('compliance_constants_clamped_ion')) - elif tensor_type == 'relaxed_ion_stress_corrected': - ec = np.array(nc_reader.read_variable('elastic_constants_relaxed_ion_stress_corrected')) - compl = np.array(nc_reader.read_variable('compliance_constants_relaxed_ion_stress_corrected')) - else: - raise ValueError('tensor_type "{0}" not allowed'.format(tensor_type)) - #TODO: add the structure object! - return cls(elastic_tensor=ec, compliance_tensor=compl, structure=None, - additional_info={'tensor_type': tensor_type}) - - def as_dict(self): - return {'elastic_tensor': self.elastic_tensor, 'compliance_tensor': self.compliance_tensor, - 'structure': self.structure.as_dict() if self.structure is not None else None, - 'additional_info': self.additional_info} - - def extended_dict(self): - dd = self.as_dict() - K_Voigt = (self.elastic_tensor[0, 0] + self.elastic_tensor[1, 1] + self.elastic_tensor[2, 2] + - 2.0*self.elastic_tensor[0, 1] + 2.0*self.elastic_tensor[1, 2] + 2.0*self.elastic_tensor[2, 0]) / 9.0 - K_Reuss = 1.0 / (self.compliance_tensor[0, 0] + self.compliance_tensor[1, 1] + self.compliance_tensor[2, 2] + - 2.0*self.compliance_tensor[0, 1] + 2.0*self.compliance_tensor[1, 2] + - 2.0*self.compliance_tensor[2, 0]) - G_Voigt = (self.elastic_tensor[0, 0] + self.elastic_tensor[1, 1] + self.elastic_tensor[2, 2] - - self.elastic_tensor[0, 1] - self.elastic_tensor[1, 2] - self.elastic_tensor[2, 0] + - 3.0*self.elastic_tensor[3, 3] + 3.0*self.elastic_tensor[4, 4] + 3.0*self.elastic_tensor[5, 5]) / 15.0 - G_Reuss = 15.0 / (4.0*self.compliance_tensor[0, 0] + 4.0*self.compliance_tensor[1, 1] + - 4.0*self.compliance_tensor[2, 2] - 4.0*self.compliance_tensor[0, 1] - - 4.0*self.compliance_tensor[1, 2] - 4.0*self.compliance_tensor[2, 0] + - 3.0*self.compliance_tensor[3, 3] + 3.0*self.compliance_tensor[4, 4] + - 3.0*self.compliance_tensor[5, 5]) - K_VRH = (K_Voigt + K_Reuss) / 2.0 - G_VRH = (G_Voigt + G_Reuss) / 2.0 - universal_elastic_anisotropy = 5.0*G_Voigt/G_Reuss + K_Voigt/K_Reuss - 6.0 - isotropic_poisson_ratio = (3.0*K_VRH - 2.0*G_VRH) / (6.0*K_VRH + 2.0*G_VRH) - dd['K_Voigt'] = K_Voigt - dd['G_Voigt'] = G_Voigt - dd['K_Reuss'] = K_Reuss - dd['G_Reuss'] = G_Reuss - dd['K_VRH'] = K_VRH - dd['G_VRH'] = G_VRH - dd['universal_elastic_anistropy'] = universal_elastic_anisotropy - dd['isotropic_poisson_ratio'] = isotropic_poisson_ratio - return dd + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + rows = [] + for (iatom, wlabel) in zip(aview.iatom_list, aview.wyck_labels): + site = self.structure[iatom] + zstar = self.zstars[iatom] + d = OrderedDict() + d["element"] = site.specie.symbol + d["site_index"] = iatom + d["frac_coords"] = np.round(site.frac_coords, decimals=decimals) + d["cart_coords"] = np.round(site.coords, decimals=decimals) + d["wyckoff"] = wlabel + zstar = zstar.zeroed(tol=tol) + for k, v in zip(columns, zstar.voigt): + d[k] = v + if verbose: + d["determinant"] = np.linalg.det(zstar) + d["iso"] = zstar.trace() / 3 + rows.append(d) - @classmethod - def from_dict(cls, dd): - return cls(elastic_tensor=dd['elastic_tensor'], compliance_tensor=dd['compliance_tensor'], - structure=dd['structure'] if dd['structure'] is not None else None, - additional_info=dd['additional_info']) + return pd.DataFrame(rows, columns=list(rows[0].keys()) if rows else None) - def get_pmg_elastic_tensor(self): + def check_site_symmetries(self, verbose=0): """ - Converts to a pymatgen :class:`ElasticTensor` object. + Check site symmetries of the Born effective charges. Print output to terminal. + Return: max_err """ - return ElasticTensor.from_voigt(self.elastic_tensor) + return self.structure.site_symmetries.check_site_symmetries(self.values, verbose=verbose) class DielectricTensorGenerator(Has_Structure): @@ -1343,47 +1769,29 @@ class DielectricTensorGenerator(Has_Structure): See the definitions Eq.(53-54) in :cite:`Gonze1997` PRB55, 10355 (1997). """ - def __init__(self, phfreqs, oscillator_strength, emacro, structure): - """ - Args: - phfreqs: a numpy array containing the 3 * num_atoms phonon frequencies at gamma - oscillator_strength: a complex numpy array with shape (number of phonon modes, 3, 3) in atomic units - emacro: a numpy array containing the dielectric tensor without frequency dependence - (at infinite frequency) - structure: |Structure| object. - """ - self.phfreqs = phfreqs - self.oscillator_strength = oscillator_strength - self.emacro = emacro - self._structure = structure - - @property - def structure(self): - """|Structure| object.""" - return self._structure - @classmethod def from_files(cls, phbst_filepath, anaddbnc_filepath): """ Generates the object from the files that contain the phonon frequencies, oscillator strength and static dielectric tensor, i.e. the PHBST.nc and anaddb.nc netcdf files, respectively. """ - with ETSF_Reader(phbst_filepath) as reader_phbst: - qpts = reader_phbst.read_value("qpoints") - full_phfreqs = reader_phbst.read_value("phfreqs") + with ETSF_Reader(phbst_filepath) as reader: + qpts = reader.read_value("qpoints") + full_phfreqs = reader.read_value("phfreqs") for i, q in enumerate(qpts): if np.array_equal(q, [0, 0, 0]): + phfreqs = full_phfreqs[i].copy() break else: - raise ValueError('The PHBST does not containg the frequencies at gamma') + raise ValueError('The PHBST does not contain frequencies at gamma') - phfreqs = full_phfreqs[i] - - with ETSF_Reader(anaddbnc_filepath) as reader_anaddbnc: - emacro = reader_anaddbnc.read_value("emacro_cart") + with ETSF_Reader(anaddbnc_filepath) as reader: + epsinf = DielectricTensor(reader.read_value("emacro_cart").T.copy()) + eps0 = DielectricTensor(reader.read_value("emacro_cart_rlx").T.copy()) try: - oscillator_strength = reader_anaddbnc.read_value("oscillator_strength", cmode="c") + oscillator_strength = reader.read_value("oscillator_strength", cmode="c") + oscillator_strength = oscillator_strength.transpose((0, 2, 1)).copy() except Exception as exc: import traceback msg = traceback.format_exc() @@ -1391,9 +1799,9 @@ def from_files(cls, phbst_filepath, anaddbnc_filepath): "Verify that dieflag == 1, 3 or 4 in anaddb\n") raise ValueError(msg) - structure = reader_anaddbnc.read_structure() + structure = reader.read_structure() - return cls(phfreqs, oscillator_strength, emacro, structure) + return cls(phfreqs, oscillator_strength, eps0, epsinf, structure) @classmethod def from_objects(cls, phbands, anaddbnc): @@ -1404,65 +1812,161 @@ def from_objects(cls, phbands, anaddbnc): phfreqs = phbands.phfreqs[gamma_index] - emacro = anaddbnc.emacro.cartesian_tensor + epsinf = anaddbnc.epsinf + eps0 = anaddbnc.eps0 oscillator_strength = anaddbnc.oscillator_strength - return cls(phfreqs, oscillator_strength, emacro, anaddbnc.structure) + return cls(phfreqs, oscillator_strength, eps0, epsinf, anaddbnc.structure) - def tensor_at_frequency(self, w, units='eV'): + def __init__(self, phfreqs, oscillator_strength, eps0, epsinf, structure): """ - Returns a :class:`DielectricTensor` object representing - the dielectric tensor in atomic units at the specified frequency w. - Eq.(53-54) in PRB55, 10355 (1997). + Args: + phfreqs: numpy array containing the 3 * num_atoms phonon frequencies at gamma + oscillator_strength: complex numpy array with shape [number of phonon modes, 3, 3] in atomic units + eps0: numpy array containing the e0 dielectric tensor without frequency dependence + epsinf: numpy array with the electronic dielectric tensor (einf) without frequency dependence + structure: |Structure| object. + """ + self.phfreqs = phfreqs + self.oscillator_strength = oscillator_strength + self.eps0 = eps0 + self.epsinf = epsinf + self._structure = structure + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation with verbosity level `verbose`.""" + lines = [] + app = lines.append + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(marquee("Oscillator strength", mark="=")) + tol = 1e-6 + app("Real part in Cartesian coordinates. a.u. units; 1 a.u. = 253.2638413 m3/s2. Set to zero below %.2e." % tol) + app(self.get_oscillator_dataframe(reim="re", tol=tol).to_string()) + if verbose: + app("") + app("Imaginary part in a.u.; 1 a.u. = 253.2638413 m3/s2. Set to zero below %.2e." % tol) + app(self.get_oscillator_dataframe(reim="im", tol=tol).to_string()) + app("") + app("Trace of oscillator strength, for each phonon mode:") + traces = [o.trace() for o in self.oscillator_strength] + app(str(traces)) + app("") + + tol = 1e-3 + app(marquee("Dielectric Tensors", mark="=")) + app("Electronic dielectric tensor (eps_inf) in Cartesian coordinates. Set to zero below %.2e." % tol) + app(self.epsinf.get_dataframe(tol=tol).to_string()) + app("") + app("Zero-frequency dielectric tensor (eps_zero) in Cartesian coordinates. Set to zero below %.2e." % tol) + app(self.eps0.get_dataframe(tol=tol).to_string()) + + return "\n".join(lines) + + def get_oscillator_dataframe(self, reim="all", tol=1e-6): + """ + Return |pandas-Dataframe| with oscillator matrix elements. Args: - w: frequency - units: string specifying the units used for ph frequencies. Possible values in + reim: "re" for real part, "im" for imaginary part, "all" for both. + tol: Entries are set to zero below this value + """ + dmap = dict(xx=(0, 0), yy=(1, 1), zz=(2, 2), yz=(1, 2), xz=(0, 2), xy=(0, 1)) + #decimals = int(abs(np.rint(np.log10(tol)))) + # 1 a.u. = 253.2638413 m3/s2. + # TODO: Use SI? + #fact = 253.2638413 + + rows, index = [], [] + for nu in range(3 * len(self.structure)): + d = {k: data_from_cplx_mode(reim, self.oscillator_strength[nu][t], tol=tol) for k, t in dmap.items()} + #d = {k: np.around(v * fact, decimals=decimals) for k, v in d.items()} + rows.append(d) + index.append(nu) + + df = pd.DataFrame(rows, index=index, columns=list(rows[0].keys())) + df.index.name = "mode" + return df + + def tensor_at_frequency(self, w, gamma_ev=1e-4, units='eV'): + """ + Returns a |DielectricTensor| object representing the dielectric tensor + in atomic units at the specified frequency w. Eq.(53-54) in PRB55, 10355 (1997). + + Args: + w: Frequency in eV + gamma_ev: Phonon damping factor in eV (full width). Poles are shifted by phfreq * gamma_ev. + Accept scalar or [nfreq] array. + units: string specifying the units used for phonon frequencies. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. """ - w = w / phfactor_ev2units(units) + w = w / phfactor_ev2units(units) - t = np.zeros((3,3)) + # Note that the acoustic modes are not included: their oscillator strength should be exactly zero + # Also, only the real part of the oscillators is taken into account: + # the possible imaginary parts of degenerate modes will cancel. + if duck.is_listlike(gamma_ev): + gammas = np.asarray(gamma_ev) + assert len(gammas) == len(self.phfreqs) + else: + gammas = np.ones(len(self.phfreqs)) * float(gamma_ev) + + t = np.zeros((3, 3),dtype=complex) for i in range(3, len(self.phfreqs)): - t += self.oscillator_strength[i].real/(self.phfreqs[i]**2 - w**2) + g = gammas[i] * self.phfreqs[i] + t += self.oscillator_strength[i].real / (self.phfreqs[i]**2 - w**2 - 1j*g) vol = self.structure.volume / bohr_to_angstrom ** 3 - t = 4*np.pi*t/vol/eV_to_Ha**2 - - t += self.emacro + t = 4 * np.pi * t / vol / eV_to_Ha ** 2 + t += self.epsinf return DielectricTensor(t) @add_fig_kwargs - def plot_vs_w(self, w_min=0, w_max=None, num=100, component='diag', units='eV', ax=None, fontsize=12, **kwargs): + def plot(self, w_min=0, w_max=None, gamma_ev=1e-4, num=500, component='diag', reim="reim", units='eV', + with_phfreqs=True, ax=None, fontsize=12, **kwargs): """ - Plots the selected components of the dielectric tensor as a function of the frequency. + Plots the selected components of the dielectric tensor as a function of frequency. Args: - w_min: minimum frequency. - w_max: maximum frequency. If None it will be set to the value of the maximum frequecy, increased by 10%. + w_min: minimum frequency in units `units`. + w_max: maximum frequency. If None it will be set to the value of the maximum frequency + 5*gamma_ev. + gamma_ev: Phonon damping factor in eV (full width). Poles are shifted by phfreq * gamma_ev. + Accept scalar or [nfreq] array. num: number of values of the frequencies between w_min and w_max. component: determine which components of the tensor will be displayed. Can be a list/tuple of two elements, indicating the indices [i, j] of the desired component or a string among: - * 'diag' to plot the elements on diagonal - * 'all' to plot all the components * 'diag_av' to plot the average of the components on the diagonal + * 'diag' to plot the elements on diagonal + * 'all' to plot all the components in the upper triangle. + * 'offdiag' to plot the off-diagonal components in the upper triangle. - units: string specifying the units used for ph frequencies. Possible values in + reim: a string with "re" will plot the real part, with "im" selects the imaginary part. + units: string specifying the units used for phonon frequencies. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + with_phfreqs: True to show phonon frequencies with dots. + ax: |matplotlib-Axes| or None if a new figure should be created. fontsize: Legend and label fontsize. Return: |matplotlib-Figure| """ if w_max is None: - w_max = np.max(self.phfreqs) * 1.1 * phfactor_ev2units(units) + w_max = (np.max(self.phfreqs) + gamma_ev * 10) * phfactor_ev2units(units) - w_range = np.linspace(w_min, w_max, num, endpoint=True) + wmesh = np.linspace(w_min, w_max, num, endpoint=True) + t = np.zeros((num, 3, 3), dtype=complex) - t = np.zeros((num,3,3)) - for i, w in enumerate(w_range): - t[i] = self.tensor_at_frequency(w, units=units) + for i, w in enumerate(wmesh): + t[i] = self.tensor_at_frequency(w, units=units, gamma_ev=gamma_ev) ax, fig, plt = get_ax_fig_plt(ax=ax) @@ -1470,27 +1974,66 @@ def plot_vs_w(self, w_min=0, w_max=None, num=100, component='diag', units='eV', kwargs['linewidth'] = 2 ax.set_xlabel('Frequency {}'.format(phunit_tag(units))) - ax.set_ylabel(r'$\varepsilon$') - - if isinstance(component, (list, tuple)): - ax.plot(w_range, t[:,component[0], component[1]], label='[{},{}]'.format(*component), **kwargs) - elif component == 'diag': - for i in range(3): - ax.plot(w_range, t[:, i, i], label='[{},{}]'.format(i,i), **kwargs) - elif component == 'all': - for i in range(3): - for j in range(3): - ax.plot(w_range, t[:, i, j], label='[{},{}]'.format(i, j), **kwargs) - elif component == 'diag_av': - for i in range(3): - ax.plot(w_range, np.trace(t, axis1=1, axis2=2)/3, label='[{},{}]'.format(i, i), **kwargs) - else: - raise ValueError('Unkwnown component {}'.format(component)) + ax.set_ylabel(r'$\epsilon(\omega)$') + ax.grid(True) + + reimfs = [] + if 're' in reim: reimfs.append((np.real, "Re{%s}")) + if 'im' in reim: reimfs.append((np.imag, "Im{%s}")) + + for reimf, reims in reimfs: + if isinstance(component, (list, tuple)): + label = reims % r'$\epsilon_{%d%d}$' % tuple(component) + ax.plot(wmesh, reimf(t[:,component[0], component[1]]), label=label, **kwargs) + elif component == 'diag': + for i in range(3): + label = reims % r'$\epsilon_{%d%d}$' % (i, i) + ax.plot(wmesh, reimf(t[:, i, i]), label=label, **kwargs) + elif component in ('all', "offdiag"): + for i in range(3): + for j in range(3): + if component == "all" and i > j: continue + if component == "offdiag" and i >= j: continue + label = reims % r'$\epsilon_{%d%d}$' % (i, j) + ax.plot(wmesh, reimf(t[:, i, j]), label=label, **kwargs) + elif component == 'diag_av': + label = r'$Average\, %s\epsilon_{ii}$' % reims + ax.plot(wmesh, np.trace(reimf(t), axis1=1, axis2=2)/3, label=label, **kwargs) + else: + raise ValueError('Unkwnown component {}'.format(component)) + + # Add points showing phonon energies. + if with_phfreqs: + wvals = self.phfreqs[3:] * phfactor_ev2units(units) + ax.scatter(wvals, np.zeros_like(wvals), s=30, marker="o", c="blue") ax.legend(loc="best", fontsize=fontsize, shadow=True) return fig + # To maintain backward compatibility. + plot_vs_w = plot + + @add_fig_kwargs + def plot_all(self, **kwargs): + """ + Plot diagonal and off-diagonal elements of the dielectric tensor as a function of frequency. + Both real and imag part are show. Accepts all arguments of `plot` method with the exception of: + `component` and `reim`. + + Returns: |matplotlib-Figure| + """ + axmat, fig, plt = get_axarray_fig_plt(None, nrows=2, ncols=2, + sharex=True, sharey=False, squeeze=False) + fontsize = kwargs.pop("fontsize", 8) + for irow in range(2): + component = {0: "diag", 1: "offdiag"}[irow] + for icol in range(2): + reim = {0: "re", 1: "im"}[icol] + self.plot(component=component, reim=reim, ax=axmat[irow, icol], fontsize=fontsize, show=False, **kwargs) + + return fig + class DdbRobot(Robot): """ @@ -1553,11 +2096,76 @@ def from_mpid_list(cls, mpid_list, api_key=None, endpoint=None): # # return np.array(qpoints) - def get_dataframe_at_qpoint(self, qpoint=None, units="eV", asr=2, chneut=1, dipdip=1, with_geo=True, - abspath=False, funcs=None): - """ - Call anaddb to compute the phonon frequencies at a single q-point using the DDB files treated - by the robot and the given anaddb input arguments. LO-TO splitting is not included. + # DEBUGGING CODE (do not remove) + #def find_duplicated_entries(self, std_tol=1e-5, verbose=1): + # """ + # Check for duplicated entries in the list of ddb files + + # Args: + # std_tol: Tolerance on standard deviation + # verbose: Verbosity level. + + # Return: (retcode, results) where results maps qpt --> DataFrame with perts as index. + # """ + # from pprint import pprint + + # # Build q --> group of dataframes. + # from collections import defaultdict + # q2dfgroup = defaultdict(list) + # for ddb in self.abifiles: + # for qpt, df in ddb.computed_dynmat.items(): + # q2dfgroup[qpt].append(df) + + # retcode, results = 0, {} + # for qpt, dfgroup in q2dfgroup.items(): + # all_indset = [set(df.index) for df in dfgroup] + # # Build union of all dynmat indices with this q + # allps = set(all_indset[0]).union(*all_indset) + # #allps = set(all_indset[0]).intersection(*all_indset) + + # index, d_list = [], [] + # for p in allps: + # # Find dataframes with this p + # found = [p in index for index in all_indset] + # count = found.count(True) + # if count == 1: continue + # if verbose: + # print("Found %s duplicated entries for p: %s" % (count, str(p))) + + # # Compute stats for this p (complex numbers) + # cvalues = [] + # for f, df in zip(found, dfgroup): + # if not f: continue + # c = df["cvalue"].loc[[p]] + # cvalues.append(c) + + # cvalues = np.array(cvalues) + # norms = np.abs(cvalues) + # d = dict(mean=cvalues.mean(), std=cvalues.std(), + # min_norm=norms.min(), max_norm=norms.max(), count=count) + + # # Print warning if large deviation + # #if d["max_norm"] - d["min_norm"] > 1e-5: + # if d["std"] > std_tol: + # retcode += 1 + # cprint("Found std > %s" % std_tol, "red") + # pprint(cvalues) + # if verbose: + # pprint(d) + # print(2 * "") + + # d_list.append(d) + # index.append(p) + + # results[qpt] = pd.DataFrame(d_list, index=index) + + # return retcode, results + + def get_dataframe_at_qpoint(self, qpoint=None, units="eV", asr=2, chneut=1, dipdip=1, + with_geo=True, with_spglib=True, abspath=False, funcs=None): + """ + Call anaddb to compute the phonon frequencies at a single q-point using the DDB files treated + by the robot and the given anaddb input arguments. LO-TO splitting is not included. Build and return a |pandas-Dataframe| with results Args: @@ -1566,13 +2174,13 @@ def get_dataframe_at_qpoint(self, qpoint=None, units="eV", asr=2, chneut=1, dipd ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. asr, chneut, dipdip: Anaddb input variable. See official documentation. with_geo: True if structure info should be added to the dataframe + with_spglib: True to compute spglib space group and add it to the DataFrame. abspath: True if paths in index should be absolute. Default: Relative to getcwd(). funcs: Function or list of functions to execute to add more data to the DataFrame. Each function receives a |DdbFile| object and returns a tuple (key, value) where key is a string with the name of column and value is the value to be inserted. - Return: - |pandas-DataFrame| + Return: |pandas-DataFrame| """ # If qpoint is None, all the DDB must contain have the same q-point . if qpoint is None: @@ -1603,7 +2211,7 @@ def get_dataframe_at_qpoint(self, qpoint=None, units="eV", asr=2, chneut=1, dipd # Add info on structure. if with_geo: - d.update(phbands.structure.get_dict4pandas(with_spglib=True)) + d.update(phbands.structure.get_dict4pandas(with_spglib=with_spglib)) # Execute functions. if funcs is not None: d.update(self._exec_funcs(funcs, ddb)) @@ -1620,7 +2228,7 @@ def anaget_phonon_plotters(self, **kwargs): phbands_plotter: |PhononBandsPlotter| object. phdos_plotter: |PhononDosPlotter| object. """ - # TODO: Multiprocessing? + # TODO: Multiprocessing? if "workdir" in kwargs: raise ValueError("Cannot specify `workdir` when multiple DDB file are executed.") @@ -1645,23 +2253,195 @@ def anaget_phonon_plotters(self, **kwargs): return dict2namedtuple(phbands_plotter=phbands_plotter, phdos_plotter=phdos_plotter) + def anacompare_elastic(self, ddb_header_keys=None, with_structure=True, with_spglib=True, + with_path=False, manager=None, verbose=0, **kwargs): + """ + Compute elastic and piezoelectric properties for all DDBs in the robot and build DataFrame. + + Args: + ddb_header_keys: List of keywords in the header of the DDB file + whose value will be added to the Dataframe. + with_structure: True to add structure parameters to the DataFrame. + with_spglib: True to compute spglib space group and add it to the DataFrame. + with_path: True to add DDB path to dataframe + manager: |TaskManager| object. If None, the object is initialized from the configuration file + verbose: verbosity level. Set it to a value > 0 to get more information + kwargs: Keyword arguments passed to `ddb.anaget_elastic`. + + Return: DataFrame and list of ElastData objects. + """ + ddb_header_keys = [] if ddb_header_keys is None else list_strings(ddb_header_keys) + df_list, elastdata_list = [], [] + for label, ddb in self.items(): + # Invoke anaddb to compute elastic data. + edata = ddb.anaget_elastic(verbose=verbose, manager=manager, **kwargs) + elastdata_list.append(edata) + + # Build daframe with properties derived from the elastic tensor. + df = edata.get_elastic_properties_dataframe() + + # Add metadata to the dataframe. + df["formula"] = ddb.structure.formula + for k in ddb_header_keys: + df[k] = ddb.header[k] + + # Add structural parameters to the dataframe. + if with_structure: + for skey, svalue in ddb.structure.get_dict4pandas(with_spglib=with_spglib).items(): + df[skey] = svalue + + # Add path to the DDB file. + if with_path: df["ddb_path"] = ddb.filepath + + df_list.append(df) + + # Concatenate dataframes. + return dict2namedtuple(df=pd.concat(df_list, ignore_index=True), + elastdata_list=elastdata_list) + + def anacompare_becs(self, ddb_header_keys=None, chneut=1, tol=1e-3, with_path=False, verbose=0): + """ + Compute Born effective charges for all DDBs in the robot and build DataFrame. + with Voigt indices as columns + metadata. Useful for convergence studies. + + Args: + ddb_header_keys: List of keywords in the header of the DDB file + whose value will be added to the Dataframe. + chneut: Anaddb input variable. See official documentation. + tol: Elements below this value are set to zero. + with_path: True to add DDB path to dataframe + verbose: verbosity level. Set it to a value > 0 to get more information + + Return: ``namedtuple`` with the following attributes:: + + df: DataFrame with Voigt as columns. + becs_list: list of Becs objects. + """ + ddb_header_keys = [] if ddb_header_keys is None else list_strings(ddb_header_keys) + df_list, becs_list = [], [] + for label, ddb in self.items(): + # Invoke anaddb to compute Becs + _, becs = ddb.anaget_epsinf_and_becs(chneut=chneut, verbose=verbose) + becs_list.append(becs) + df = becs.get_voigt_dataframe(tol=tol) + + # Add metadata to the dataframe. + df["formula"] = ddb.structure.formula + df["chneut"] = chneut + for k in ddb_header_keys: + df[k] = ddb.header[k] + + # Add path to the DDB file. + if with_path: df["ddb_path"] = ddb.filepath + + df_list.append(df) + + # Concatenate dataframes. + return dict2namedtuple(df=pd.concat(df_list, ignore_index=True).sort_values(by="site_index"), + becs_list=becs_list) + + def anacompare_epsinf(self, ddb_header_keys=None, chneut=1, tol=1e-3, with_path=False, verbose=0): + r""" + Compute (eps^\inf) electronic dielectric tensor for all DDBs in the robot and build DataFrame. + with Voigt indices as columns + metadata. Useful for convergence studies. + + Args: + ddb_header_keys: List of keywords in the header of the DDB file + whose value will be added to the Dataframe. + chneut: Anaddb input variable. See official documentation. + tol: Elements below this value are set to zero. + with_path: True to add DDB path to dataframe + verbose: verbosity level. Set it to a value > 0 to get more information + + Return: ``namedtuple`` with the following attributes:: + + df: DataFrame with Voigt indices as columns. + epsinf_list: List of |DielectricTensor| objects with eps^{inf} + """ + ddb_header_keys = [] if ddb_header_keys is None else list_strings(ddb_header_keys) + df_list, epsinf_list = [], [] + for label, ddb in self.items(): + # Invoke anaddb to compute e_inf + einf, _ = ddb.anaget_epsinf_and_becs(chneut=chneut, verbose=verbose) + epsinf_list.append(einf) + df = einf.get_voigt_dataframe(tol=tol) + + # Add metadata to the dataframe. + df["formula"] = ddb.structure.formula + df["chneut"] = chneut + for k in ddb_header_keys: + df[k] = ddb.header[k] + + # Add path to the DDB file. + if with_path: df["ddb_path"] = ddb.filepath + df_list.append(df) + + # Concatenate dataframes. + return dict2namedtuple(df=pd.concat(df_list, ignore_index=True), epsinf_list=epsinf_list) + + def anacompare_eps0(self, ddb_header_keys=None, asr=2, chneut=1, tol=1e-3, with_path=False, verbose=0): + """ + Compute (eps^0) dielectric tensor for all DDBs in the robot and build DataFrame. + with Voigt indices as columns + metadata. Useful for convergence studies. + + Args: + ddb_header_keys: List of keywords in the header of the DDB file + whose value will be added to the Dataframe. + asr, chneut, dipdip: Anaddb input variable. See official documentation. + tol: Elements below this value are set to zero. + with_path: True to add DDB path to dataframe + verbose: verbosity level. Set it to a value > 0 to get more information + + Return: ``namedtuple`` with the following attributes:: + + df: DataFrame with Voigt as columns. + eps0_list: List of |DielectricTensor| objects with eps^0. + dgen_list: List of DielectricTensorGenerator. + """ + ddb_header_keys = [] if ddb_header_keys is None else list_strings(ddb_header_keys) + df_list, eps0_list, dgen_list = [], [], [] + for label, ddb in self.items(): + # Invoke anaddb to compute e_0 + gen = ddb.anaget_dielectric_tensor_generator(asr=asr, chneut=chneut, dipdip=1, verbose=verbose) + dgen_list.append(gen) + eps0_list.append(gen.eps0) + df = gen.eps0.get_voigt_dataframe(tol=tol) + + # Add metadata to the dataframe. + df["formula"] = ddb.structure.formula + df["asr"] = asr + df["chneut"] = chneut + #df["dipdip"] = dipdip + for k in ddb_header_keys: + df[k] = ddb.header[k] + + # Add path to the DDB file. + if with_path: df["ddb_path"] = ddb.filepath + + df_list.append(df) + + # Concatenate dataframes. + return dict2namedtuple(df=pd.concat(df_list, ignore_index=True), + eps0_list=eps0_list, dgen_list=dgen_list) + def yield_figs(self, **kwargs): # pragma: no cover """ This function *generates* a predefined list of matplotlib figures with minimal input from the user. """ - print("Invoking anaddb through anaget_phonon_plotters...") - r = self.anaget_phonon_plotters() - for fig in r.phbands_plotter.yield_figs(): yield fig - for fig in r.phdos_plotter.yield_figs(): yield fig + if all(ddb.has_at_least_one_atomic_perturbation() for ddb in self.abifiles): + print("Invoking anaddb through anaget_phonon_plotters...") + r = self.anaget_phonon_plotters() + for fig in r.phbands_plotter.yield_figs(): yield fig + for fig in r.phdos_plotter.yield_figs(): yield fig def write_notebook(self, nbpath=None): """ - Write a jupyter_ notebook to nbpath. If ``nbpath`` is None, a temporay file in the current + Write a jupyter_ notebook to nbpath. If ``nbpath`` is None, a temporary file in the current working directory is created. Return path to the notebook. """ nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) - anaget_phonon_plotters_kwargs = ( "\n" + anaget_phonon_plotters_kwargs = ("\n" '\tnqsmall=10, ndivsm=20, asr=2, chneut=1, dipdip=1, dos_method="tetra",\n' '\tlo_to_splitting=False, ngqpt=None, qptbounds=None,\n' '\tanaddb_kwargs=None, verbose=0') diff --git a/abipy/dfpt/elastic.py b/abipy/dfpt/elastic.py new file mode 100644 index 000000000..a1a61e4de --- /dev/null +++ b/abipy/dfpt/elastic.py @@ -0,0 +1,467 @@ +# coding: utf-8 +""" +Objects to analyze elastic and piezoelectric tensors computed by anaddb. +""" +import pandas as pd + +from collections import OrderedDict +from monty.string import list_strings, marquee +from monty.collections import AttrDict +from monty.json import MSONable +from abipy.core.mixins import Has_Structure +from abipy.tools.tensors import Tensor, ElasticTensor, PiezoTensor +from abipy.flowtk.netcdf import ETSF_Reader + + +class MyElasticTensor(ElasticTensor): + + def _repr_html_(self): + """Integration with jupyter notebooks.""" + return self.get_voigt_dataframe()._repr_html_() + + def get_voigt_dataframe(self, tol=1e-5): + """ + Return |pandas-DataFrame| with Voigt indices as colums (C-indexing starting from 0). + Useful to analyze the converge of individual elements of the tensor(s) + Elements below tol are set to zero. + """ + tensor = self.zeroed(tol=tol) + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + #columns = ["1", "2", "3", "4", "5", "6"] + rows = [] + for row in tensor.voigt: + rows.append({k: v for k, v in zip(columns, row)}) + + df = pd.DataFrame(rows, index=columns, columns=columns) + df.index.name = "Voigt index" + return df + + +class MyPiezoTensor(PiezoTensor): + + def _repr_html_(self): + """Integration with jupyter notebooks.""" + return self.get_voigt_dataframe()._repr_html_() + + def get_voigt_dataframe(self, tol=1e-5): + """ + Return |pandas-DataFrame| with Voigt indices as colums (C-indexing starting from 0). + Useful to analyze the converge of individual elements of the tensor(s) + Elements below tol are set to zero. + """ + tensor = self.zeroed(tol=tol) + index = ["Px", "Py", "Pz"] + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + #index = ["P1", "P2", "P3"] + #columns = ["1", "2", "3", "4", "5", "6"] + rows = [] + for irow, row in enumerate(tensor.voigt): + rows.append({k: v for k, v in zip(columns, row)}) + + df = pd.DataFrame(rows, index=index, columns=columns) + df.index.name = "Voigt index" + return df + + +class ElasticData(Has_Structure, MSONable): + """ + Container with the different elastic and piezoelectric tensors + computed by anaddb. Data is stored in pymatgen tensor objects. + + Provides methods to analyze/tabulate data + Se also http://progs.coudert.name/elate/mp?query=mp-2172 for a web interface. + """ + + ALL_ELASTIC_TENSOR_NAMES = ( + "elastic_relaxed", + "elastic_clamped", + "elastic_stress_corr", + "elastic_relaxed_fixed_D", + ) + + ALL_PIEZOELECTRIC_TENSOR_NAMES = ( + "piezo_relaxed", + "piezo_clamped", + "d_piezo_relaxed", + "g_piezo_relaxed", + "h_piezo_relaxed", + ) + + ALL_TENSOR_NAMES = ALL_ELASTIC_TENSOR_NAMES + ALL_PIEZOELECTRIC_TENSOR_NAMES + + TYPE2NAMES = { + "all": ALL_TENSOR_NAMES, + "elastic": ALL_ELASTIC_TENSOR_NAMES, + "piezoelectric": ALL_PIEZOELECTRIC_TENSOR_NAMES, + } + + # https://journals.aps.org/prb/abstract/10.1103/PhysRevB.72.035105 + TENSOR_META = { + "elastic_clamped": AttrDict( + info="clamped-ion elastic tensor in Voigt notation (shape: (6, 6))", + units="GPa", latex=r"${\xoverline(C)}$"), + "elastic_relaxed": AttrDict( + info="relaxed-ion elastic tensor in Voigt notation (shape: (6, 6))", + units="GPa", latex=r"${C}$"), + "elastic_stress_corr": AttrDict( + info="relaxed-ion elastic tensor considering the stress left inside cell in Voigt notation (shape: (6, 6))", + units="GPa", latex=r"${C^{\sigma}}$"), + "elastic_relaxed_fixed_D": AttrDict( + info="relaxed-ion elastic tensor at fixed displacement field in Voigt notation (shape: (6, 6))", + units="GPa", latex=r"$C^{(D)}$"), + "piezo_clamped": AttrDict( + info="clamped-ion piezoelectric tensor in Voigt notation (shape: (3, 6))", + units="c/m^2", latex=r"${\xoverline(e)}$"), + "piezo_relaxed": AttrDict( + info="relaxed-ion piezoelectric tensor in Voigt notation (shape: (3, 6))", + units="c/m^2", latex=r"${e}$"), + "d_piezo_relaxed": AttrDict( + info="relaxed-ion piezoelectric d tensor in Voigt notation (shape: (3, 6))", + units="pc/m^2", latex=r"${d}$"), + "g_piezo_relaxed": AttrDict( + info="relaxed-ion piezoelectric g tensor in Voigt notation (shape: (3, 6))", + units="m^2/c", latex=r"${g}$"), + "h_piezo_relaxed": AttrDict( + info="relaxed-ion piezoelectric h tensor in Voigt notation (shape: (3, 6))", + units="GN/c", latex=r"${h}$"), + } + + def __init__(self, structure, params, elastic_clamped=None, elastic_relaxed=None, elastic_stress_corr=None, + elastic_relaxed_fixed_D=None, piezo_clamped=None, piezo_relaxed=None, d_piezo_relaxed=None, + g_piezo_relaxed=None, h_piezo_relaxed=None): + """ + Args: + structure: |Structure| object. + params: Dictionary with input parameters. + elastic_clamped: clamped-ion elastic tensor in Voigt notation in GPa. shape (6,6). + elastic_relaxed: relaxed-ion elastic tensor in Voigt notation in GPa. shape (6,6). + elastic_stress_corr: relaxed-ion elastic tensor considering the stress left inside cell + in Voigt notation in GPa. shape (6,6). + elastic_relaxed_fixed_D: relaxed-ion elastic tensor at fixed displacement field + in Voigt notation in GPa. shape (6,6). + piezo_clamped: clamped-ion piezoelectric tensor in Voigt notation in c/m^2. shape (3,6). + piezo_relaxed: relaxed-ion piezoelectric tensor in Voigt notation in c/m^2. shape (3,6). + d_piezo_relaxed: relaxed-ion piezoelectric d tensor in Voigt notation in pc/m^2. shape (3,6). + g_piezo_relaxed: relaxed-ion piezoelectric g tensor in Voigt notation in m^2/c. shape (3,6). + h_piezo_relaxed: relaxed-ion piezoelectric h tensor in Voigt notation in GN/c. shape (3,6). + + .. note:: + + Arguments can be either arrays or Tensor objects. + """ + self._structure = structure + self.params = params + self.elastic_clamped = self._define_variable(elastic_clamped, MyElasticTensor) + self.elastic_relaxed = self._define_variable(elastic_relaxed, MyElasticTensor) + self.elastic_stress_corr = self._define_variable(elastic_stress_corr, MyElasticTensor) + self.elastic_relaxed_fixed_D = self._define_variable(elastic_relaxed_fixed_D, MyElasticTensor) + self.piezo_clamped = self._define_variable(piezo_clamped, MyPiezoTensor) + self.piezo_relaxed = self._define_variable(piezo_relaxed, MyPiezoTensor) + self.d_piezo_relaxed = self._define_variable(d_piezo_relaxed, MyPiezoTensor) + self.g_piezo_relaxed = self._define_variable(g_piezo_relaxed, MyPiezoTensor) + self.h_piezo_relaxed = self._define_variable(h_piezo_relaxed, MyPiezoTensor) + + def _define_variable(self, tensor_voigt, tensor_class): + """ + Helper function to set values of a variable + """ + if isinstance(tensor_voigt, Tensor): + if not isinstance(tensor_voigt, tensor_class): + raise TypeError("Expecting tensor class `%s`, received class `%s`" % ( + tensor_class.__name__, tensor_voigt.__class__.__name__)) + return tensor_voigt + else: + return tensor_class.from_voigt(tensor_voigt) if tensor_voigt is not None else None + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + @classmethod + def from_file(cls, path): + """ + Builds the object from an anaddb.nc file + """ + with ETSF_Reader(path) as reader: + return cls.from_ncreader(reader) + + @classmethod + def from_ncreader(cls, reader): + """ + Builds the object from a ETSF_Reader + """ + structure = reader.read_structure() + + params = AttrDict( + # NB: asr and chneut are always present in the new anaddb.nc file + # Use -666 to support old formats. + asr=int(reader.read_value("asr", default=-666)), + chneut=int(reader.read_value("chneut", default=-666)), + elaflag=int(reader.read_value("elaflag", default=0)), + instrflag=int(reader.read_value("instrflag", default=0)), + piezoflag=int(reader.read_value("piezoflag", default=0)), + dieflag=int(reader.read_value("dieflag", default=0)), + ) + + ts = AttrDict({n: None for n in cls.ALL_TENSOR_NAMES}) + + # [6, 6] symmetric tensors (written by Fortran, produced in ddb_elast) + ts.elastic_clamped = reader.read_value("elastic_constants_clamped_ion", default=None) + ts.elastic_relaxed = reader.read_value("elastic_constants_relaxed_ion", default=None) + if params.elaflag == 5: + ts.elastic_stress_corr = reader.read_value("elastic_constants_relaxed_ion_stress_corrected") + + # Written in ddb_piezo + if params.elaflag == 4: + ts.elastic_relaxed_fixed_D = reader.read_value("elastic_tensor_relaxed_ion_fixed_D", default=None) + + # [3, 6] tensors (written by Fortran, produced in ddb_piezo). + ts.piezo_clamped = reader.read_value("piezo_clamped_ion", default=None) + ts.piezo_relaxed = reader.read_value("piezo_relaxed_ion", default=None) + + if params.piezoflag == 4: + ts.d_piezo_relaxed = reader.read_value("d_tensor_relaxed_ion", default=None) + + # These are [6, 3] tensors written by Fortran (need to transpose). + if params.piezoflag in (5, 7): + ts.g_piezo_relaxed = reader.read_value("g_tensor_relaxed_ion", default=None) + if ts.g_piezo_relaxed is not None: + ts.g_piezo_relaxed = ts.g_piezo_relaxed.T.copy() + + if params.piezoflag in (6, 7): + ts.h_piezo_relaxed = reader.read_value("h_tensor_relaxed_ion", default=None) + if ts.h_piezo_relaxed is not None: + ts.h_piezo_relaxed = ts.h_piezo_relaxed.T.copy() + + return cls(structure, params, **ts) + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String represention with verbosity level `verbose`.""" + lines = []; app = lines.append + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(marquee("Anaddb Variables", mark="=")) + import json + app(json.dumps(self.params, indent=2, sort_keys=True)) + + for tensor_type in ("elastic", "piezoelectric"): + name_tensor_list = self.name_tensor_list(tensor_type=tensor_type) + if name_tensor_list: + app("") + app(marquee("%s tensors available" % tensor_type, mark="=")) + for name, tensor in name_tensor_list: + meta = self.TENSOR_META[name] + is_fit = tensor.is_fit_to_structure(self.structure, tol=1e-2) + tol = dict(elastic=1e-3, piezoelectric=1e-5)[tensor_type] + app("[%s]" % name.upper()) + app("%s" % meta.info) + app("Units: %s, set to zero below: %s, fit_to_structure: %s" % (meta.units, tol, is_fit)) + app("") + if tensor_type == "elastic": + app(self.get_elastic_tensor_dataframe(tensor_name=name, tol=tol).to_string()) + elif tensor_type == "piezoelectric": + app(self.get_piezoelectric_tensor_dataframe(tensor_name=name, tol=tol).to_string()) + app("") + + return "\n".join(lines) + + def get_tensor(self, tensor_name, tol=None): + """ + Return tensor from its name `tensor_name`. + Set to zero all entries below `tol` if `tol` is not None. + """ + tensor = getattr(self, tensor_name) + if tensor is None: return None + if tol is not None: tensor = tensor.zeroed(tol=tol) + return tensor + + def name_tensor_list(self, tensor_names=None, tensor_type="all", tol=None): + """ + List of (name, tensor) tuples. Only tensors stored in the object are returned. + + Args: + tensor_names: List of tensor names to select. None means all. + tensor_type: Select tensors by type. Must be in ["all", "elastic", "piezoelectric"]. + tol: Set to zero all all entries below this threshold + """ + l = [] + if tensor_names is None: + for name in self.TYPE2NAMES[tensor_type]: + tensor = self.get_tensor(name, tol=tol) + if tensor is not None: + l.append((name, tensor)) + else: + for name in list_strings(tensor_names): + if name not in self.TYPE2NAMES[tensor_type]: + raise ValueError("tensor name %s does not belong to type: `%s`" % (name, tensor_type)) + tensor = self.get_tensor(name, tol=tol) + if tensor is not None: + l.append((name, tensor)) + + return l + + def fit_to_structure(self, structure=None, symprec=0.1): + """ + Return new ElasticData object with tensors that are invariant with respect to symmetry + operations corresponding to `structure`. + + Args: + structure: |Structure| from which to generate symmetry operations + If None, the internal structure is used. + symprec (float): symmetry tolerance for the Spacegroup Analyzer + used to generate the symmetry operations + """ + structure = self.structure if structure is None else structure + kwargs = {name: tensor.fit_to_structure(structure, symprec=symprec) + for name, tensor in self.name_tensor_list()} + + return self.__class__(structure, self.params, **kwargs) + + def convert_to_ieee(self, structure=None, initial_fit=True, refine_rotation=True): + """ + Return new set of tensors in IEEE format according to the 1987 IEEE standards. + + Args: + structure: A |Structure| structure associated with the + tensor to be converted to the IEEE standard + If None, the internal structure is used + initial_fit (bool): flag to indicate whether initial + tensor is fit to the symmetry of the structure. + Defaults to true. Note that if false, inconsistent + results may be obtained due to symmetrically + equivalent, but distinct transformations + being used in different versions of spglib. + refine_rotation (bool): whether to refine the rotation + produced by the ieee transform generator, default True + """ + kwargs = {} + structure = self.structure if structure is None else structure + for name, tensor in self.name_tensor_list(): + # TODO: one should pass the ieee stucture. + kwargs[name] = tensor.convert_to_ieee(structure, + initial_fit=initial_fit, refine_rotation=refine_rotation) + + return self.__class__(structure, self.params, **kwargs) + + def get_elastic_tensor_dataframe(self, tensor_name="elastic_relaxed", tol=1e-3): + """ + Args: + tensor_name: + tol: set to zero all entries below this threshold. + """ + tensor = self.get_tensor(tensor_name, tol=tol) + if tensor is None: return pd.DataFrame() + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + #columns = ["1", "2", "3", "4", "5", "6"] + rows = [] + for row in tensor.voigt: + rows.append({k: v for k, v in zip(columns, row)}) + + return pd.DataFrame(rows, index=columns, columns=columns) + + def get_piezoelectric_tensor_dataframe(self, tensor_name="piezo_relaxed", tol=1e-5): + """ + Args: + tensor_name: + tol: set to zero all entries below this threshold. + """ + tensor = self.get_tensor(tensor_name, tol=tol) + if tensor is None: return pd.DataFrame() + index = ["Px", "Py", "Pz"] + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + #index = ["P1", "P2", "P3"] + #columns = ["1", "2", "3", "4", "5", "6"] + rows = [] + for row in tensor.voigt: + rows.append({k: v for k, v in zip(columns, row)}) + + return pd.DataFrame(rows, index=index, columns=columns) + + def get_elastic_voigt_dataframe(self, voigt_as_index=True, tol=None): + return self.get_voigt_dataframe(tensor_names=self.ALL_ELASTIC_TENSOR_NAMES, + voigt_as_index=voigt_as_index, tol=tol) + + def get_piezo_voigt_dataframe(self, voigt_as_index=True, tol=None): + return self.get_voigt_dataframe(tensor_names=self.ALL_PIEZOELECTRIC_TENSOR_NAMES, + voigt_as_index=voigt_as_index, tol=tol) + + def get_voigt_dataframe(self, tensor_names, voigt_as_index=True, tol=None): + """ + Return |pandas-DataFrame| with Voigt indices as colums (C-indexing starting from 0). + Useful to analyze the converge of individual elements of the tensor(s) + + Args: + tensor_names: List of tensor names. + tol: Set to zero all all entries below a certain threshold + """ + rows, index = [], [] + for name, tensor in self.name_tensor_list(tensor_names=tensor_names, tol=tol): + voigt_map = tensor.get_voigt_dict(tensor.rank) + row = {} + for ind in voigt_map: + row[voigt_map[ind]] = tensor[ind] + index.append(name) + row = OrderedDict(sorted(row.items(), key=lambda item: item[0])) + row["tensor_name"] = name + rows.append(row) + + # Build dataframe. + df = pd.DataFrame(rows, index=index, columns=list(rows[0].keys() if rows else None)) + + if voigt_as_index: + # Return transpose to have (i,j) as index and tensor names as columns + df = df.drop(columns="tensor_name").T + df.index.name = "voigt_cinds" + return df.reset_index() + #return df + else: + return df + + def get_elastic_properties_dataframe(self, tensor_names="all", properties_as_index=False, + include_base_props=True, ignore_errors=False, fit_to_structure=False, symprec=0.1): + """ + Return a |pandas-DataFrame| with properties derived from the elastic tensor + and the associated structure + + Args: + tensor_names= ["elastic_relaxed", "elastic_clamped", "elastic_stress_corr", "elastic_relaxed_fixed_D"] + properties_as_index: + include_base_props (bool): whether to include base properties, like k_vrh, etc. + ignore_errors (bool): if set to true, will set problem properties + that depend on a physical tensor to None, defaults to False + fit_to_structure (bool): If True, properties are computed with the orginal tensors + and symmetrized tensors. An additional column `fit_to_structure` is added to the dataframe. + symprec (float): symmetry tolerance for the Spacegroup Analyzer + used to generate the symmetry operations if `fit_to_structure` + """ + tensor_names = self.ALL_ELASTIC_TENSOR_NAMES if tensor_names == "all" else list_strings(tensor_names) + do_fits = [False] if not fit_to_structure else [True, False] + rows = [] + for name, tensor in self.name_tensor_list(tensor_names=tensor_names): + for do_fit in do_fits: + if do_fit: + tensor = tensor.fit_to_structure(self.structure, symprec=symprec) + d = tensor.get_structure_property_dict(self.structure, + include_base_props=include_base_props, ignore_errors=ignore_errors) + d.pop("structure") + # Add column telling whether fit has been performed + if len(do_fits) > 1: d["fit_to_structure"] = do_fit + d["tensor_name"] = name + rows.append(d) + + df = pd.DataFrame(rows, columns=list(rows[0].keys() if rows else None)) + + if properties_as_index: + # TODO + # Return transpose to have (i,j) as index and tensor names as columns + #columns = df.columns + df = df.drop(columns="tensor_name").T + df.index.name = "property" + #df.columns = columns + return df.reset_index() + else: + return df diff --git a/abipy/dfpt/frozen_phonons.py b/abipy/dfpt/frozen_phonons.py index 6d094ee9a..e5c2d67e8 100644 --- a/abipy/dfpt/frozen_phonons.py +++ b/abipy/dfpt/frozen_phonons.py @@ -1,6 +1,5 @@ # coding: utf-8 """Objects to run and analyze the frozen phonons generated from displacements of atoms""" -from __future__ import print_function, division, absolute_import import numpy as np import scipy.optimize as optimize @@ -20,9 +19,9 @@ def quadratic_fit_function(xx, aa, bb): aa: the coefficient of the quadratic term bb: the constant term """ - return aa * xx ** 2 + bb + class FrozenPhonon(object): """ Class defining a set of structures with displaced atoms. @@ -167,7 +166,6 @@ def fit_to_frequency(self, fit_function=None, units="eV", min_fit_eta=None, max_ The fit is performed with scipy.optimize.curve_fit based on the function given in input and can also be limited number to a subset of the values of the displacements. - Args: fit_function: a function that will be used to fit the data. The first parameter should be the coefficient of the quadratic term. If None a simple quadratic fit will be used. diff --git a/abipy/dfpt/gruneisen.py b/abipy/dfpt/gruneisen.py index 6302b377d..6293cfd81 100644 --- a/abipy/dfpt/gruneisen.py +++ b/abipy/dfpt/gruneisen.py @@ -1,29 +1,28 @@ # coding: utf-8 """Objects to analyze the results stored in the GRUNS.nc file produced by anaddb.""" -from __future__ import print_function, division, unicode_literals, absolute_import import numpy as np import os import abipy.core.abinit_units as abu import scipy.constants as const +from functools import lru_cache from collections import OrderedDict from monty.string import marquee, list_strings from monty.termcolor import cprint from monty.collections import AttrDict from monty.functools import lazy_property from abipy.core.kpoints import Kpath, IrredZone, KSamplingInfo -from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter +from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter from abipy.abio.inputs import AnaddbInput -from abipy.dfpt.phonons import PhononBands, PhononBandsPlotter, PhononDos +from abipy.dfpt.phonons import PhononBands, PhononBandsPlotter, PhononDos, match_eigenvectors, get_dyn_mat_eigenvec from abipy.dfpt.ddb import DdbFile from abipy.iotools import ETSF_Reader from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, set_axlims from abipy.flowtk import AnaddbTask -#from abipy.tools import duck -from abipy.core.func1d import Function1D -from pymatgen.core.units import amu_to_kg, bohr_to_ang - +from abipy.tools.derivatives import finite_diff +from pymatgen.core.units import amu_to_kg +from pymatgen.core.periodic_table import Element # DOS name --> meta-data _ALL_DOS_NAMES = OrderedDict([ @@ -56,7 +55,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(GrunsNcFile, self).__init__(filepath) + super().__init__(filepath) self.reader = GrunsReader(filepath) def close(self): @@ -108,13 +107,17 @@ def doses(self): @lazy_property def wvols_qibz(self): - """Phonon frequencies on reagular grid for the different volumes in eV """ - return self.reader.read_value("gruns_wvols_qibz") * abu.Ha_eV + """Phonon frequencies on regular grid for the different volumes in eV """ + w = self.reader.read_value("gruns_wvols_qibz", default=None) + if w is None: + return None + else: + return w * abu.Ha_eV @lazy_property def qibz(self): """q-points in the irreducible brillouin zone""" - return self.reader.read_value("gruns_qibz") + return self.reader.read_value("gruns_qibz", default=None) @lazy_property def gvals_qibz(self): @@ -130,6 +133,34 @@ def phbands_qpath_vol(self): """List of |PhononBands| objects corresponding to the different volumes.""" return self.reader.read_phbands_on_qpath() + @lazy_property + def structures(self): + """List of structures""" + return self.reader.read_structures() + + @lazy_property + def volumes(self): + """List of volumes""" + return [s.volume for s in self.structures] + + @lazy_property + def phdispl_cart_qibz(self): + """Eigendisplacements for the modes on the qibz""" + return self.reader.read_value("gruns_phdispl_cart_qibz", cmode="c") + + @property + def nvols(self): + """Number of volumes""" + return len(self.structures) + + @lazy_property + def amu_symbol(self): + """Atomic mass units""" + amu_list = self.reader.read_value("atomic_mass_units") + atomic_numbers = self.reader.read_value("atomic_numbers") + amu = {Element.from_Z(at).symbol: a for at, a in zip(atomic_numbers, amu_list)} + return amu + def to_dataframe(self): """ Return a |pandas-DataFrame| with the following columns: @@ -174,7 +205,7 @@ def to_dataframe(self): @add_fig_kwargs def plot_doses(self, xlims=None, dos_names="all", with_idos=True, **kwargs): r""" - Plot the different doses stored in the GRUNS.nc file. + Plot the different DOSes stored in the GRUNS.nc file. Args: xlims: Set the data limits for the x-axis in eV. Accept tuple e.g. ``(left, right)`` @@ -228,13 +259,13 @@ def get_plotter(self): @add_fig_kwargs def plot_phbands_with_gruns(self, fill_with="gruns", gamma_fact=1, alpha=0.6, with_doses="all", units="eV", ylims=None, match_bands=False, qlabels=None, branch_range=None, **kwargs): - """ + r""" Plot the phonon bands corresponding to ``V0`` (the central point) with markers showing the value and the sign of the Grunesein parameters. Args: - fill_with: Define the quantity used to plot stripes. "gruns" for Grunesein parameters, - "groupv" for phonon group velocities. + fill_with: Define the quantity used to plot stripes. "gruns" for Grunesein parameters, "gruns_fd" for + Grunesein parameters calculated with finite differences, "groupv" for phonon group velocities. gamma_fact: Scaling factor for Grunesein parameters. Up triangle for positive values, down triangles for negative values. alpha: The alpha blending value for the markers between 0 (transparent) and 1 (opaque). @@ -277,11 +308,15 @@ def plot_phbands_with_gruns(self, fill_with="gruns", gamma_fact=1, alpha=0.6, wi if fill_with == "gruns": max_gamma = np.abs(phbands.grun_vals).max() + values = phbands.grun_vals elif fill_with == "groupv": # TODO: units? dwdq_qpath = self.reader.read_value("gruns_dwdq_qpath") - groupv = np.linalg.norm(dwdq_qpath, axis=-1) - max_gamma = np.abs(groupv).max() + values = np.linalg.norm(dwdq_qpath, axis=-1) + max_gamma = np.abs(values).max() + elif fill_with == "gruns_fd": + max_gamma = np.abs(self.grun_vals_finite_differences(match_eigv=True)).max() + values = self.grun_vals_finite_differences(match_eigv=True) else: raise ValueError("Unsupported fill_with: `%s`" % fill_with) @@ -298,20 +333,20 @@ def plot_phbands_with_gruns(self, fill_with="gruns", gamma_fact=1, alpha=0.6, wi for nu in branch_range: omegas = phbands.phfreqs[:, nu].copy() * factor - if fill_with == "gruns": + if fill_with.startswith("gruns"): # Must handle positive-negative values - sizes = phbands.grun_vals[:, nu].copy() * (gamma_fact * 0.02 * max_omega / max_gamma) + sizes = values[:, nu].copy() * (gamma_fact * 0.02 * max_omega / max_gamma) yup = omegas + np.where(sizes >= 0, sizes, 0) ydown = omegas + np.where(sizes < 0, sizes, 0) ax_bands.fill_between(xvals, omegas, yup, alpha=alpha, facecolor="red") ax_bands.fill_between(xvals, ydown, omegas, alpha=alpha, facecolor="blue") elif fill_with == "groupv": - sizes = groupv[:, nu].copy() * (gamma_fact * 0.04 * max_omega / max_gamma) + sizes = values[:, nu].copy() * (gamma_fact * 0.04 * max_omega / max_gamma) ydown, yup = omegas - sizes / 2, omegas + sizes / 2 ax_bands.fill_between(xvals, ydown, yup, alpha=alpha, facecolor="red") - set_axlims(ax_bands, ylims, "x") + set_axlims(ax_bands, ylims, "y") if with_doses is None: return fig @@ -333,26 +368,19 @@ def plot_phbands_with_gruns(self, fill_with="gruns", gamma_fact=1, alpha=0.6, wi return fig - def yield_figs(self, **kwargs): # pragma: no cover - """ - This function *generates* a predefined list of matplotlib figures with minimal input from the user. - Used in abiview.py to get a quick look at the results. - """ - yield self.plot_phbands_with_gruns(show=False) - yield self.plot_doses(show=False) - @add_fig_kwargs - def plot_gruns_scatter(self, values="gruns", ax=None, units="eV", **kwargs): + def plot_gruns_scatter(self, values="gruns", ax=None, units="eV", cmap="rainbow", **kwargs): """ A scatter plot of the values of the Gruneisen parameters or group velocities as a function of the phonon frequencies. Args: - values: Define the plotted quantity. "gruns" for Grunesein parameters, - "groupv" for phonon group velocities. + values: Define the plotted quantity. "gruns" for Grunesein parameters, "gruns_fd" for Grunesein + parameters calculated with finite differences, "groupv" for phonon group velocities. ax: |matplotlib-Axes| or None if a new figure should be created. units: Units for phonon frequencies. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + cmap: matplotlib colormap. If not None, points are colored according to the branch index. **kwargs: kwargs passed to the matplotlib function 'scatter'. Size defaults to 10. Returns: |matplotlib-Figure| @@ -363,19 +391,31 @@ def plot_gruns_scatter(self, values="gruns", ax=None, units="eV", **kwargs): elif values == "groupv": # TODO: units? y = np.linalg.norm(self.reader.read_value("gruns_dwdq_qibz"), axis=-1) + elif values == "gruns_fd": + y = self.gvals_qibz_finite_differences(match_eigv=True) else: raise ValueError("Unsupported values: `%s`" % values) w = self.wvols_qibz[:, self.iv0, :] * abu.phfactor_ev2units(units) ax, fig, plt = get_ax_fig_plt(ax=ax) + ax.grid(True) if 's' not in kwargs: kwargs['s'] = 10 - ax.scatter(w.flatten(), y.flatten(), **kwargs) + if cmap is None: + ax.scatter(w.flatten(), y.flatten(), **kwargs) + else: + cmap = plt.get_cmap(cmap) + natom3 = 3 * len(self.structure) + for nu in range(natom3): + color = cmap(float(nu) / natom3) + ax.scatter(w[:, nu], y[:, nu], color=color, **kwargs) + ax.set_xlabel('Frequency %s' % abu.phunit_tag(units)) - if values == "gruns": + + if values.startswith("gruns"): ax.set_ylabel('Gruneisen') elif values == "groupv": ax.set_ylabel('|v|') @@ -387,46 +427,36 @@ def split_gruns(self): """ Splits the values of the gruneisen along a path like for the phonon bands """ + # trigger the generation of the split in the phbands + self.phbands_qpath_vol[self.iv0].split_phfreqs - try: - return self._split_gruns - except AttributeError: - # trigger the generation of the split in the phbands - self.phbands_qpath_vol[self.iv0].split_phfreqs - - indices = self.phbands_qpath_vol[self.iv0]._split_indices - g = self.phbands_qpath_vol[self.iv0].grun_vals - self._split_gruns = [np.array(g[indices[i]:indices[i + 1] + 1]) for i in range(len(indices) - 1)] - return self._split_gruns + indices = self.phbands_qpath_vol[self.iv0]._split_indices + g = self.phbands_qpath_vol[self.iv0].grun_vals + return [np.array(g[indices[i]:indices[i + 1] + 1]) for i in range(len(indices) - 1)] @lazy_property def split_dwdq(self): """ Splits the values of the group velocities along a path like for the phonon bands """ + # trigger the generation of the split in the phbands + self.phbands_qpath_vol[self.iv0].split_phfreqs - try: - return self._split_dwdq - except AttributeError: - # trigger the generation of the split in the phbands - self.phbands_qpath_vol[self.iv0].split_phfreqs - - indices = self.phbands_qpath_vol[self.iv0]._split_indices - v = self.reader.read_value("gruns_dwdq_qpath") - self._split_dwdq = [np.array(v[indices[i]:indices[i + 1] + 1]) for i in range(len(indices) - 1)] - return self._split_dwdq + indices = self.phbands_qpath_vol[self.iv0]._split_indices + v = self.reader.read_value("gruns_dwdq_qpath") + return [np.array(v[indices[i]:indices[i + 1] + 1]) for i in range(len(indices) - 1)] @add_fig_kwargs def plot_gruns_bs(self, values="gruns", ax=None, branch_range=None, qlabels=None, match_bands=False, **kwargs): - """ + r""" A plot of the values of the Gruneisen parameters or group velocities along the high symmetry path. By default only the calculated points will be displayed. If lines are required set a positive value for lw and match_bands=True to obtained reasonable paths. Args: - values: Define the plotted quantity. "gruns" for Grunesein parameters, - "groupv" for phonon group velocities. + values: Define the plotted quantity. "gruns" for Grunesein parameters, "gruns_fd" for Grunesein + parameters calculated with finite differences, "groupv" for phonon group velocities. ax: |matplotlib-Axes| or None if a new figure should be created. branch_range: Tuple specifying the minimum and maximum branch index to plot (default: all branches are plotted). @@ -438,12 +468,13 @@ def plot_gruns_bs(self, values="gruns", ax=None, branch_range=None, qlabels=None Returns: |matplotlib-Figure| """ - if values == "gruns": y = self.split_gruns elif values == "groupv": # TODO: units? y = np.linalg.norm(self.split_dwdq, axis=-1) + elif values == "gruns_fd": + y = self.split_gruns_finite_differences(match_eigv=True) else: raise ValueError("Unsupported values: `%s`" % values) @@ -458,7 +489,7 @@ def plot_gruns_bs(self, values="gruns", ax=None, branch_range=None, qlabels=None ax, fig, plt = get_ax_fig_plt(ax=ax) phbands.decorate_ax(ax, units=None, qlabels=qlabels) - if values == "gruns": + if values in ("gruns", "gruns_fd"): ax.set_ylabel('Gruneisen') elif values == "groupv": ax.set_ylabel('|v|') @@ -488,6 +519,16 @@ def plot_gruns_bs(self, values="gruns", ax=None, branch_range=None, qlabels=None return fig + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + Used in abiview.py to get a quick look at the results. + """ + yield self.plot_phbands_with_gruns(show=False) + yield self.plot_doses(show=False) + yield self.plot_gruns_scatter(show=False) + yield self.plot_gruns_bs(show=False) + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to nbpath. If nbpath is None, a temporay file in the current @@ -499,10 +540,8 @@ def write_notebook(self, nbpath=None): nbv.new_code_cell("ncfile = abilab.abiopen('%s')" % self.filepath), nbv.new_code_cell("print(ncfile)"), nbv.new_code_cell("ncfile.structure"), - nbv.new_code_cell("ncfile.plot_doses();"), nbv.new_code_cell("ncfile.plot_phbands_with_gruns();"), - #nbv.new_code_cell("phbands_qpath_v0.plot_fatbands(phdos_file=phdosfile);"), nbv.new_code_cell("plotter = ncfile.get_plotter()\nprint(plotter)"), nbv.new_code_cell("df_phbands = plotter.get_phbands_frame()\ndisplay(df_phbands)"), @@ -519,9 +558,8 @@ def write_notebook(self, nbpath=None): @property def phdos(self): """ - The |PhononDos| corresponsing to iv0, if present in the file, None otherwise. + The |PhononDos| corresponding to iv0, if present in the file, None otherwise. """ - if not self.doses: return None @@ -537,8 +575,8 @@ def average_gruneisen(self, t=None, squared=True, limit_frequencies=None): Args: t: the temperature at which the average Gruneisen will be evaluated. If None the acoustic Debye - temparature is used (see acoustic_debye_temp) - squared: if True the average is performed on the squared values of the Gruenisen + temperature is used (see acoustic_debye_temp). + squared: if True the average is performed on the squared values of the Gruenisen. limit_frequencies: if None (default) no limit on the frequencies will be applied. Possible values are "debye" (only modes with frequencies lower than the acoustic Debye temperature) and "acoustic" (only the acoustic modes, i.e. the first three modes). @@ -546,7 +584,6 @@ def average_gruneisen(self, t=None, squared=True, limit_frequencies=None): Returns: The average Gruneisen parameter """ - if t is None: t = self.acoustic_debye_temp @@ -563,24 +600,24 @@ def average_gruneisen(self, t=None, squared=True, limit_frequencies=None): if limit_frequencies == "debye": adt = self.acoustic_debye_temp - ind = np.where((0<=w) & (w <= adt * abu.kb_eVK)) + ind = np.where((0 <= w) & (w <= adt * abu.kb_eVK)) elif limit_frequencies == "acoustic": w_acoustic = w[:, :3] ind = np.where(w_acoustic >= 0) elif limit_frequencies is None: - ind = np.where(w>=0) + ind = np.where(w >= 0) else: raise ValueError("{} is not an accepted value for limit_frequencies".format(limit_frequencies)) weights = self.doses['qpoints'].weights - g = np.dot(weights[ind[0]], np.multiply(cv, gamma)[ind]).sum()/ np.dot(weights[ind[0]], cv[ind]).sum() + g = np.dot(weights[ind[0]], np.multiply(cv, gamma)[ind]).sum() / np.dot(weights[ind[0]], cv[ind]).sum() if squared: g = np.sqrt(g) return g - def thermal_conductivity_slack(self, squared=True, limit_frequencies=None): + def thermal_conductivity_slack(self, squared=True, limit_frequencies=None, theta_d=None, t=None): """ Calculates the thermal conductivity at the acoustic Debye temperature wit the Slack formula, using the average Gruneisen. @@ -590,25 +627,30 @@ def thermal_conductivity_slack(self, squared=True, limit_frequencies=None): limit_frequencies: if None (default) no limit on the frequencies will be applied. Possible values are "debye" (only modes with frequencies lower than the acoustic Debye temperature) and "acoustic" (only the acoustic modes, i.e. the first three modes). + theta_d: the temperature used to estimate the average of the Gruneisen used in the + Slack formula. If None the the acoustic Debye temperature is used (see + acoustic_debye_temp). Will also be considered as the Debye temperature in the + Slack formula. + t: temperature at which the thermal conductivity is estimated. If None the value at + the calculated acoustic Debye temperature is given. The value is obtained as a + simple rescaling of the value at the Debye temperature. - Returns: - The value of the thermal conductivity in W/(m*K) + Returns: The value of the thermal conductivity in W/(m*K) """ - average_mass = np.mean([s.specie.atomic_mass for s in self.structure]) * amu_to_kg - mean_g = self.average_gruneisen(t=None, squared=squared, limit_frequencies=limit_frequencies) - theta_d = self.acoustic_debye_temp - factor1 = 0.849 * 3 * (4) ** (1. / 3.) / ( 20 * np.pi ** 3 * (1 - 0.514 * mean_g ** -1 + 0.228 * mean_g ** -2)) - factor2 = (const.k * theta_d / const.hbar) ** 2 - factor3 = const.k * average_mass * self.structure.volume ** (1. / 3.) * 1e-10 / (const.hbar * mean_g ** 2) - return factor1 * factor2 * factor3 + if theta_d is None: + theta_d = self.acoustic_debye_temp + mean_g = self.average_gruneisen(t=theta_d, squared=squared, limit_frequencies=limit_frequencies) + k = thermal_conductivity_slack(average_mass=average_mass, volume=self.structure.volume, + mean_g=mean_g, theta_d=theta_d, t=t) + + return k @property def debye_temp(self): """ Debye temperature in K obtained from the phonon DOS """ - if not self.phdos: raise ValueError('Debye temperature requires the phonon dos!') @@ -620,7 +662,6 @@ def acoustic_debye_temp(self): Acoustic Debye temperature in K, i.e. the Debye temperature divided by nsites**(1/3). Obtained from the phonon DOS """ - if not self.phdos: raise ValueError('Debye temperature requires the phonon dos!') @@ -640,7 +681,7 @@ def from_ddb_list(cls, ddb_list, nqsmall=10, qppa=None, ndivsm=20, line_density= nqsmall: Defines the homogeneous q-mesh used for the DOS. Gives the number of divisions used to sample the smallest lattice vector. If 0, DOS is not computed and (phbst, None) is returned. - qppa: Defines the homogeneous q-mesh used for the DOS in units of q-points per reciproval atom. + qppa: Defines the homogeneous q-mesh used for the DOS in units of q-points per reciprocal atom. Overrides nqsmall. ndivsm: Number of division used for the smallest segment of the q-path. line_density: Defines the a density of k-points per reciprocal atom to plot the phonon dispersion. @@ -661,10 +702,8 @@ def from_ddb_list(cls, ddb_list, nqsmall=10, qppa=None, ndivsm=20, line_density= workdir: Working directory. If None, a temporary directory is created. manager: |TaskManager| object. If None, the object is initialized from the configuration file. - Returns: - A GrunsNcFile object. + Returns: A GrunsNcFile object. """ - if len(ddb_list) % 2 != 1: raise ValueError("An odd number of ddb file paths should be provided") @@ -708,6 +747,63 @@ def from_ddb_list(cls, ddb_list, nqsmall=10, qppa=None, ndivsm=20, line_density= return gruns + @lru_cache() + def grun_vals_finite_differences(self, match_eigv=True): + """ + Gruneisen parameters along the high symmetry path calculated with finite differences. + """ + if not self.phbands_qpath_vol: + raise ValueError("Finite differences require the phonon bands") + + phbands = np.array([b.phfreqs for b in self.phbands_qpath_vol]) + if match_eigv: + eig = np.array([b.dyn_mat_eigenvect for b in self.phbands_qpath_vol]) + else: + eig = None + + dv = np.abs(self.volumes[0] - self.volumes[1]) + + return calculate_gruns_finite_differences(phbands, eig, self.iv0, self.structure.volume, dv) + + @lru_cache() + def split_gruns_finite_differences(self, match_eigv=True): + """ + Splits the values of the finite differences gruneisen along a path like for the phonon bands + """ + try: + return self._split_gruns_fd + except AttributeError: + # trigger the generation of the split in the phbands + self.phbands_qpath_vol[self.iv0].split_phfreqs + + indices = self.phbands_qpath_vol[self.iv0]._split_indices + g = self.grun_vals_finite_differences(match_eigv=match_eigv) + self._split_gruns_fd = [np.array(g[indices[i]:indices[i + 1] + 1]) for i in range(len(indices) - 1)] + return self._split_gruns_fd + + @lru_cache() + def gvals_qibz_finite_differences(self, match_eigv=True): + """ + Gruneisen parameters in the irreducible brillouin zone calculated with finite differences. + """ + if self.wvols_qibz is None: + raise ValueError("Finite differences require wvols_qibz") + + if match_eigv: + eig = np.zeros_like(self.phdispl_cart_qibz) + for i in range(self.nvols): + eig[:, i] = get_dyn_mat_eigenvec(self.phdispl_cart_qibz[:, i], self.structures[i], + amu_symbol=self.amu_symbol) + + eig = eig.transpose((1, 0, 2, 3)) + else: + eig = None + + dv = np.abs(self.volumes[0] - self.volumes[1]) + + return calculate_gruns_finite_differences(self.wvols_qibz.transpose(1, 0, 2), eig, self.iv0, + self.structure.volume, dv) + class GrunsReader(ETSF_Reader): """ @@ -740,7 +836,7 @@ class GrunsReader(ETSF_Reader): #nctkarr_t("gruns_xred", "dp", "three, number_of_atoms, gruns_nvols") & def __init__(self, filepath): - super(GrunsReader, self).__init__(filepath) + super().__init__(filepath) # Read and store important quantities. self.structure = self.read_structure() @@ -806,18 +902,12 @@ def read_phbands_on_qpath(self): lattices = self.read_value("gruns_rprimd") * abu.Bohr_Ang #, "dp", "three, three, gruns_nvols") gruns_xred = self.read_value("gruns_xred") #, "dp", "three, number_of_atoms, gruns_nvols") + structures = self.read_structures() + phbands_qpath_vol = [] for ivol in range(self.num_volumes): - # TODO structure depends on: - # volumes - # non_anal_ph - # amu: DONE - # phdispl_cart DONE - if ivol == self.iv0: - structure = self.structure - else: - structure = self.structure.__class__(lattices[ivol], self.structure.species, gruns_xred[ivol]) - + structure = structures[ivol] + # TODO non_anal_ph qpoints = Kpath(structure.reciprocal_lattice, qfrac_coords) phdispl_cart = phdispl_cart_qptsvol[:, ivol].copy() phb = PhononBands(structure, qpoints, freqs_vol[:, ivol], phdispl_cart, non_anal_ph=None, amu=amuz) @@ -841,3 +931,88 @@ def read_amuz_dict(self): amuz[znucl_typat[type_idx]] = amu_typat[type_idx] return amuz + + def read_structures(self): + """ + Resturns a list of structures at the different volumes + """ + lattices = self.read_value("gruns_rprimd") * abu.Bohr_Ang # , "dp", "three, three, gruns_nvols") + gruns_xred = self.read_value("gruns_xred") # , "dp", "three, number_of_atoms, gruns_nvols") + + structures = [] + for ivol in range(self.num_volumes): + if ivol == self.iv0: + structures.append(self.structure) + else: + structures.append(self.structure.__class__(lattices[ivol], self.structure.species, gruns_xred[ivol])) + + return structures + + +def calculate_gruns_finite_differences(phfreqs, eig, iv0, volume, dv): + """ + Calculates the Gruneisen parameters from finite differences on the phonon frequencies. + Uses the eigenvectors to match the frequencies at different volumes. + + Args: + phfreqs: numpy array with the phonon frequencies at different volumes. Shape (nvols, nqpts, 3*natoms) + eig: numpy array with the phonon eigenvectors at the different volumes. Shape (nvols, nqpts, 3*natoms, 3*natoms) + If None simple ordering will be used. + iv0: index of the 0 volume. + volume: volume of the structure at the central volume. + dv: volume variation. + + Returns: + A numpy array with the gruneisen parameters. Shape (nqpts, 3*natoms) + """ + phfreqs = phfreqs.copy() + + nvols = phfreqs.shape[0] + if eig is not None: + for i in range(nvols): + if i == iv0: + continue + for iq in range(phfreqs.shape[1]): + ind = match_eigenvectors(eig[iv0, iq], eig[i, iq]) + phfreqs[i, iq] = phfreqs[i, iq][ind] + + acc = nvols - 1 + g = np.zeros_like(phfreqs[0]) + for iq in range(phfreqs.shape[1]): + for im in range(phfreqs.shape[2]): + w = phfreqs[iv0, iq, im] + if w == 0: + g[iq, im] = 0 + else: + g[iq, im] = - finite_diff(phfreqs[:, iq, im], dv, order=1, acc=acc)[iv0] * volume / w + + return g + + +def thermal_conductivity_slack(average_mass, volume, mean_g, theta_d, t=None): + """ + Generic function for the calculation of the thermal conductivity at the acoustic Debye + temperature with the Slack formula, based on the quantities that can be calculated. + Can be used to calculate the thermal conductivity with different definitions of + the Gruneisen parameters or of the Debye temperature. + + Args: + average_mass: average mass in atomic units of the atoms of the system. + volume: volume of the unit cell. + mean_g: the mean of the Gruneisen parameters. + theta_d: the Debye temperature in the Slack formula. + t: temperature at which the thermal conductivity is estimated. If None theta_d is used. + The value is obtained as a simple rescaling of the value at the Debye temperature. + + Returns: + The value of the thermal conductivity in W/(m*K) + """ + + factor1 = 0.849 * 3 * (4 ** (1. / 3.)) / (20 * np.pi ** 3 * (1 - 0.514 * mean_g ** -1 + 0.228 * mean_g ** -2)) + factor2 = (const.k * theta_d / const.hbar) ** 2 + factor3 = const.k * average_mass * volume ** (1. / 3.) * 1e-10 / (const.hbar * mean_g ** 2) + k = factor1 * factor2 * factor3 + if t is not None: + k *= theta_d / t + + return k diff --git a/abipy/dfpt/ifc.py b/abipy/dfpt/ifc.py new file mode 100644 index 000000000..f5e3e1fa3 --- /dev/null +++ b/abipy/dfpt/ifc.py @@ -0,0 +1,302 @@ +# coding: utf-8 +"""The interatomic force constants calculated by anaddb.""" +import numpy as np + +from monty.functools import lazy_property +from abipy.core.mixins import Has_Structure +from abipy.iotools import ETSF_Reader +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt + + +class InteratomicForceConstants(Has_Structure): + """ + The interatomic force constants calculated by anaddb. + Read from anaddb.nc + """ + + def __init__(self, structure, atoms_indices, neighbours_indices, ifc_cart_coord, + ifc_cart_coord_short_range, local_vectors, distances): + """ + Args: + structure: |Structure| object. + atoms_index: List of integers representing the indices in the structure of the analyzed atoms. + neighbours_index: List of integers representing the indices in the structure of the neighbour atoms. + ifc_cart_coord: ifc in Cartesian coordinates + ifc_cart_coord_short_range: short range part of the ifc in Cartesian coordinates + local_vectors: local basis used to determine the ifc_local_coord + """ + self._structure = structure + self.atoms_indices = atoms_indices + self.neighbours_indices = neighbours_indices + self.ifc_cart_coord = ifc_cart_coord + self.ifc_cart_coord_short_range = ifc_cart_coord_short_range + self.local_vectors = local_vectors + self.distances = distances + + @property + def number_of_atoms(self): + """Number of atoms is structure.""" + return len(self.structure) + + @classmethod + def from_file(cls, filepath): + """Create the object from a netcdf_ file.""" + with ETSF_Reader(filepath) as r: + try: + structure = r.read_structure() + atoms_indices = r.read_value("ifc_atoms_indices") - 1 + neighbours_indices = r.read_value("ifc_neighbours_indices") - 1 + distances = r.read_value("ifc_distances") + ifc_cart_coord = r.read_value("ifc_matrix_cart_coord") + ifc_cart_coord_short_range = r.read_value("ifc_matrix_cart_coord_short_range", default=None) + local_vectors = r.read_value("ifc_local_vectors", default=None) + except Exception: + import traceback + msg = traceback.format_exc() + msg += ("Error while trying to read IFCs from file.\n" + "Verify that the required variables are used in anaddb: ifcflag, natifc, atifc, ifcout\n") + raise ValueError(msg) + + return cls(structure=structure, atoms_indices=atoms_indices, neighbours_indices=neighbours_indices, + ifc_cart_coord=ifc_cart_coord, + ifc_cart_coord_short_range=ifc_cart_coord_short_range, local_vectors=local_vectors, + distances=distances) + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + + return "\n".join(lines) + + @property + def number_of_neighbours(self): + """Number of neighbouring atoms for which the ifc are present. ifcout in anaddb.""" + return np.shape(self.neighbours_indices)[1] + + @lazy_property + def ifc_cart_coord_ewald(self): + """Ewald part of the ifcs in cartesian coordinates""" + if self.ifc_cart_coord_short_range is None: + return None + else: + return self.ifc_cart_coord-self.ifc_cart_coord_short_range + + @lazy_property + def ifc_local_coord(self): + """Ifcs in local coordinates""" + if self.local_vectors is None: + return None + else: + return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord, self.local_vectors) + + @lazy_property + def ifc_local_coord_short_range(self): + """Short range part of the ifcs in cartesian coordinates""" + if self.local_vectors is None: + return None + else: + return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord_short_range, self.local_vectors) + + @lazy_property + def ifc_local_coord_ewald(self): + """Ewald part of the ifcs in local coordinates""" + return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord_ewald, self.local_vectors) + + def _filter_ifc_indices(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): + """ + Internal method that provides the indices of the neighouring atoms in self.neighbours_indices that satisfy + the required conditions. All the arguments are optional. If None the filter will not be applied. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + """ + + if atom_indices is not None and atom_element is not None: + raise ValueError("atom_index and atom_element cannot be specified simultaneously") + + if atom_indices is not None and not isinstance(atom_indices, (list, tuple)): + atom_indices = [atom_indices] + + if atom_element: + atom_indices = self.structure.indices_from_symbol(atom_element) + + if atom_indices is None: + atom_indices = range(len(self.structure)) + + # apply the filter: construct matrices of num_atoms*num_neighbours size, all conditions should be satisfied. + ind = np.where( + (np.tile(np.in1d(self.atoms_indices, atom_indices), [self.number_of_neighbours, 1])).T & + (self.distances > min_dist if min_dist is not None else True) & + (self.distances < max_dist if max_dist is not None else True) & + (np.in1d(self.neighbours_indices, self.structure.indices_from_symbol(neighbour_element)) + .reshape(self.number_of_atoms, self.number_of_neighbours) if neighbour_element is not None else True) + ) + + return ind + + def get_ifc_cartesian(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): + """ + Filters the IFCs in cartesian coordinates + All the arguments are optional. If None the filter will not be applied. + Returns two arrays containing the distances and the corresponding filtered ifcs. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + """ + ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, + neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) + + return self.distances[ind], self.ifc_cart_coord[ind] + + def get_ifc_local(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): + """ + Filters the IFCs in local coordinates + All the arguments are optional. If None the filter will not be applied. + Returns two arrays containing the distances and the corresponding filtered ifcs. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + """ + if self.local_vectors is None: + raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") + + ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, + neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) + + return self.distances[ind], self.ifc_local_coord[ind] + + def get_plot_ifc(self, ifc, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, + max_dist=None, ax=None, **kwargs): + """ + Plots the specified ifcs, filtered according to the optional arguments. + An array with shape number_of_atoms*number_of_neighbours, so only one of the components of the ifc matrix can + be plotted at a time. + + Args: + ifc: an array with shape number_of_atoms * number_of_neighbours of the ifc that should be plotted + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + ax: |matplotlib-Axes| or None if a new figure should be created. + kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 + + Returns: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=ax) + + ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, + neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) + + dist, filtered_ifc = self.distances[ind], ifc[ind] + + if 'color' not in kwargs: kwargs['color'] = 'blue' + if 'marker' not in kwargs: kwargs['marker'] = 'o' + if 'linewidth' not in kwargs and 'lw' not in kwargs: kwargs['lw'] = 0 + + ax.set_xlabel('Distance (Bohr)') + ax.set_ylabel(r'IFC (Ha/Bohr$^2$)') + ax.grid(True) + ax.plot(dist, filtered_ifc, **kwargs) + + return fig + + @add_fig_kwargs + def plot_longitudinal_ifc(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, + max_dist=None, ax=None, **kwargs): + """ + Plots the total longitudinal ifcs in local coordinates, filtered according to the optional arguments. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + ax: |matplotlib-Axes| or None if a new figure should be created. + kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 + + Returns: |matplotlib-Figure| + """ + if self.local_vectors is None: + raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") + + return self.get_plot_ifc(self.ifc_local_coord[:, :, 0, 0], atom_indices=atom_indices, atom_element=atom_element, + neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist, ax=ax, **kwargs) + + @add_fig_kwargs + def plot_longitudinal_ifc_short_range(self, atom_indices=None, atom_element=None, neighbour_element=None, + min_dist=None, max_dist=None, ax=None, **kwargs): + """ + Plots the short range longitudinal ifcs in local coordinates, filtered according to the optional arguments. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + ax: |matplotlib-Axes| or None if a new figure should be created. + kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 + + Returns: |matplotlib-Figure| + """ + if self.local_vectors is None: + raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") + + if self.ifc_local_coord_short_range is None: + raise ValueError("Ewald contribution is missing, Run anaddb with dipdip=1") + + return self.get_plot_ifc(self.ifc_local_coord_short_range[:, :, 0, 0], atom_indices=atom_indices, + atom_element=atom_element, neighbour_element=neighbour_element, min_dist=min_dist, + max_dist=max_dist, ax=ax, **kwargs) + + @add_fig_kwargs + def plot_longitudinal_ifc_ewald(self, atom_indices=None, atom_element=None, neighbour_element=None, + min_dist=None, max_dist=None, ax=None, **kwargs): + """ + Plots the Ewald part of the ifcs in local coordinates, filtered according to the optional arguments. + + Args: + atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. + atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. + neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. + min_dist: minimum distance between atoms and neighbours. + max_dist: maximum distance between atoms and neighbours. + ax: |matplotlib-Axes| or None if a new figure should be created. + kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 + + Returns: |matplotlib-Figure| + """ + if self.local_vectors is None: + raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") + + if self.ifc_local_coord_ewald is None: + raise ValueError("Ewald contribution is missing, Run anaddb with dipdip=1") + + return self.get_plot_ifc(self.ifc_local_coord_ewald[:, :, 0, 0], atom_indices=atom_indices, + atom_element=atom_element, neighbour_element=neighbour_element, min_dist=min_dist, + max_dist=max_dist, ax=ax, **kwargs) diff --git a/abipy/dfpt/msqdos.py b/abipy/dfpt/msqdos.py new file mode 100644 index 000000000..f001e4f09 --- /dev/null +++ b/abipy/dfpt/msqdos.py @@ -0,0 +1,686 @@ +# coding: utf-8 +""" +Objects related to the computation of Debye-Waller tensors from the generalized phonon DOS. +""" +import numpy as np +import abipy.core.abinit_units as abu + +from collections import OrderedDict +from monty.string import list_strings, marquee +from monty.collections import dict2namedtuple +from monty.termcolor import cprint +from abipy.core.mixins import Has_Structure +from abipy.tools.plotting import add_fig_kwargs, set_axlims, get_axarray_fig_plt, set_visible +from abipy.tools.printing import print_dataframe + + +class _Component(object): + """ + Object used to select/plot the components of the DW tensor. + """ + + def __init__(self, name, ij, **plot_kwargs): + self.name = name + self.ij = ij + self.i, self.j = None, None + if self.ij is not None: + self.i, self.j = self.ij[0], self.ij[1] + self.plot_kwargs = plot_kwargs + + def get_tavg_label(self, what, with_units=False): + n = dict(displ="U", vel="V")[what] + unit = "" + if with_units: + unit = r"\;%s" % (dict(displ=r"\AA^2", vel="v")[what]) + + if self.name == "trace": + return r"$\langle {%s}^2 \rangle%s$" % (n, unit) + else: + return r"$\langle {%s}_{%s} \rangle%s$" % (n, self.name, unit) + + def eval33w(self, mat33w): + #assert mat33w.shape[:2] == (3, 3) + if self.ij is not None: + return mat33w[self.i, self.j] + if self.name == "trace": + return mat33w.trace() + + raise TypeError("Don't know how to extract data for `%s`" % self.name) + + +class MsqDos(Has_Structure): + """ + This object stores the generalized phonon DOS in CARTESIAN coords. + This DOS-like quantity allows one to calculate Debye Waller factors as a function of Temperature + by integration with 1/omega and the Bose-Einstein factor. + This object is usually instanciated via the read_msq_dos method of the PhdosReader + and stored as attribute of the PhdosFile instance. + + See :cite:`Lee1995` for the further details about the internal implementation and + :cite:`Trueblood1996` for the different conventions used by crystallographers. + + See also http://atztogo.github.io/phonopy/formulation.html#thermal-displacement + """ + C = _Component + ALL_COMPS = OrderedDict([ + ("trace", C(name="trace", ij=None, color="k")), + ("xx", C(name="xx", ij=(0, 0), color="r", ls="-")), + ("yy", C(name="yy", ij=(1, 1), color="g", ls="-")), + ("zz", C(name="zz", ij=(2, 2), color="b", ls="-")), + ("xy", C(name="xy", ij=(0, 1), color="c", ls="--")), + ("xz", C(name="xz", ij=(0, 2), color="m", ls="--")), + ("yz", C(name="yz", ij=(1, 2), color="y", ls="--")), + # Symmetric components. + #("yx", (1, 0)), + #("zx", (2, 0)), + #("zy", (2, 1)), + ]) + del C + + def __init__(self, structure, wmesh, values, amu_symbol): + """ + Arg: + structure: |Structure| object. + wmesh: Frequency mesh in eV + values: (natom, 3, 3, nomega) array with generalized DOS in Cartesian coordinates. + amu_symbol: Dictionary element.symbol -> mass in atomic units. + """ + self._structure = structure + self.wmesh = wmesh * abu.eV_Ha #### + self.nw = len(self.wmesh) + self.values = values * abu.Ha_eV ### + self.amu_symbol = amu_symbol + assert len(self.values) == len(self.structure) + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + def __str__(self): + """Invoked by str""" + return self.to_string() + + def to_string(self, verbose=0): + """ + Human-readable string with useful information on the object. + + Args: + verbose: Verbosity level. + """ + lines = []; app = lines.append + + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(marquee(r"Fullfilment of \int dw g_ij(w) = \delta_ij", mark="=")) + app("") + from scipy.integrate import simps + for iatom, site in enumerate(self.structure): + d = simps(self.values[iatom], x=self.wmesh) + app("For site: %s" % site) + app(str(d)) + app("Trace: %.4f, determinant: %.4f" % (d.trace(), np.linalg.det(d))) + app("") + + for fmt in ("cartesian", "cif"): + df = self.get_dataframe(temp=300, view="inequivalent", fmt=fmt, verbose=verbose) + s = print_dataframe(df, title="Format: %s" % fmt, file="string") + lines.extend(s.splitlines()) + + title = marquee("Constraints on tensor components in reduced coords induced by site symmetries", mark="=") + s = print_dataframe(self.structure.site_symmetries.get_tensor_rank2_dataframe(), file="string", title=title) + lines.extend(s.splitlines()) + + #if verbose > 1: + #max_err = self.check_site_symmetries(verbose=verbose) + + return "\n".join(lines) + + def get_json_doc(self, tstart=0, tstop=600, num=11): + """ + Return dictionary with results. Used by emmet builder. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. + """ + tmesh = np.linspace(tstart, tstop, num=num) + # (natom, 3, 3, nt) + ucart_t = self.get_msq_tmesh(tmesh, what_list=("displ")).displ + + # Convert tensor to U_CIF format + ucif_t = np.empty_like(ucart_t) + for it in range(num): + ucif_t[:,:,:,it] = self.convert_ucart(ucart_t[:,:,:,it], fmt="cif") + + jdoc = { + "natom": len(self.structure), + "nomega:": self.nw, # Number of frequencies + "ntemp": len(tmesh), # Number of temperatures + "tmesh": tmesh, # Temperature mesh in K + "wmesh": self.wmesh, # Frequency mesh in ?? + "gdos_aijw": self.values, # Generalized DOS in Cartesian coords. (natom, 3, 3, nomega) array. + "amu_symbol": self.amu_symbol, # Dict symbol --> Atomic mass in a.u. + "structure": self.structure, # Structure object + "ucif_t": ucif_t, # U tensors (natom, 3, 3, ntemp) as a function of T for T in tmesh in CIF format. + "ucif_string_t300k": self.get_cif_string(temp=300, symprec=None), # String with U tensor at T=300 in Cif format. + } + + return jdoc + + def get_msq_tmesh(self, tmesh, iatom_list=None, what_list=("displ", "vel")): + """ + Compute mean square displacement for each atom in `iatom_list` as a function of T. + in Cartesian coordinates and atomic-units. + + Args: + tmesh: array-like with temperatures in Kelvin. + iatom_list: List of atom sites to compute. None if all aomts are wanted. + what_list: "displ" for displacement, "vel" for velocity tensor. + + Return: + namedtuple with (tmesh=tmesh, displ=msq_d, vel=msq_v) + + msq_d = np.empty((natom, 3, 3, nt)) + """ + tmesh = np.array(tmesh) + nt = len(tmesh) + + # Frequency mesh starts at iomin to avoid 1/0 and ignore eventual negative frequencies. + for iomin, w in enumerate(self.wmesh): + if w > 1e-12: break + else: + raise ValueError("Cannot find index such that wmesh[i] > 1e-12 !!!") + wvals = self.wmesh[iomin:] + nw = len(wvals) + + # We will compute: Ucart(T, k, ij) = 1/M_k \int dw (n(w) + 1/2) g_ij(w) / w for the k-atom in a.u. + # Calculate Bose-Einstein occupation factors only once for each T (instead of for each atom). + npht = np.zeros((nt, nw)) + for it, temp in enumerate(tmesh): + npht[it] = abu.occ_be(wvals, temp * abu.kb_HaK) + 0.5 + + natom = len(self.structure) + msq_d = np.empty((natom, 3, 3, nt)) + msq_v = np.empty((natom, 3, 3, nt)) + what_list = list_strings(what_list) + + # Perform frequency integration to get tensor(T) + from scipy.integrate import simps + if iatom_list is not None: iatom_list = set(iatom_list) + for iatom in range(natom): + if iatom_list is not None and iatom not in iatom_list: continue + symbol = self.structure[iatom].specie.symbol + for it in range(nt): + fn = self.values[iatom, :, :, iomin:] * npht[it] + if "displ" in what_list: + # Mean square displacement for each atom as a function of T (bohr^2). + ys = fn / wvals + fact = 1.0 / (self.amu_symbol[symbol] * abu.amu_emass) + msq_d[iatom, :, :, it] = simps(ys, x=wvals) * fact * abu.Bohr_Ang ** 2 + if "vel" in what_list: + # Mean square velocity for each atom as a function of T (bohr^2/atomic time unit^2)" + ys = fn * wvals + fact = 1.0 / (self.amu_symbol[symbol] * abu.amu_emass) + msq_v[iatom, :, :, it] = simps(ys, x=wvals) * fact # * abu.velocity_at_to_si ** 2 + + return dict2namedtuple(tmesh=tmesh, displ=msq_d, vel=msq_v) + + def convert_ucart(self, ucart_mat, fmt): + """ + Convert the U tensor from Cartesian coordinates to format `fmt` + Return new tensor. See also :cite:`Grosse-Kunstleve2002`. + + Args: + ucart_mat: (natom,3,3) array with tensor in Cartesian coords. + fmt: Output format. Available options: "cif", "ustar", "beta", "cartesian" + + Return: (natom, 3, 3) tensor. + """ + natom = len(self.structure) + if fmt == "cartesian": + return ucart_mat.copy() + + #elif fmt == "B": + # # Eq 7 + # return ucart_mat * 8 * np.pi**2 + + elif fmt in ("cif", "ustar", "beta"): + # Build A matrix + amat = self.structure.lattice.matrix.T + ainv = np.linalg.inv(amat) + new_mat = np.zeros_like(ucart_mat) + # Eq 3b: A^-1 U_Cart A^-T + for iatom in range(natom): + new_mat[iatom] = np.matmul(ainv, np.matmul(ucart_mat[iatom], ainv.T)) + + # Now we have Ustar + if fmt == "ustar": return new_mat + if fmt == "beta": return new_mat * 8 * np.pi**2 # Eq 6 + + # CIF Format Eq 4a + # Build N matrix (no 2 pi factor) + lengths = self.structure.lattice.reciprocal_lattice_crystallographic.lengths + ninv = np.diag(1.0 / np.array(lengths, dtype=float)) + # N^-1 U_star N^-T + for iatom in range(natom): + new_mat[iatom] = np.matmul(ninv, np.matmul(new_mat[iatom], ninv.T)) + + return new_mat + + raise ValueError("Invalid format: `%s`" % str(fmt)) + + def get_dataframe(self, temp=300, fmt="cartesian", view="inequivalent", what="displ", decimals=4, + select_symbols=None, verbose=0): + """ + Return |pandas-DataFrame| with cartesian tensor components as columns and (inequivalent) sites along the rows. + + Args: + temp: Temperature in Kelvin. + fmt: "cartesian" for elements in Cartesian coordinates, "cif" for results in reduced coordinates + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + what: "displ" for displament, "vel" for velocity. + decimals: Number of decimal places to round to. + If decimals is negative, it specifies the number of positions to the left of the decimal point. + select_symbols: String or list of strings with chemical symbols. Used to select only atoms of this type. + verbose: Verbosity level. + + Return: |pandas-DataFrame| + """ + # Select atoms. + aview = self._get_atomview(view, select_symbols=select_symbols, verbose=verbose) + + # [natom, 3, 3, nt=1] + msq = self.get_msq_tmesh([float(temp)], iatom_list=aview.iatom_list, what_list=what) + ucart = getattr(msq, what) + natom = len(self.structure) + ucart = np.reshape(ucart, (natom, 3, 3)) + values = ucart + if what == "displ": + values = self.convert_ucart(ucart, fmt) + + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + inds = [(0, 0), (1, 1), (2, 2), (1, 2), (0, 2), (0, 1)] + rows = [] + for (iatom, wlabel) in zip(aview.iatom_list, aview.wyck_labels): + site = self.structure[iatom] + d = OrderedDict() + d["element"] = site.specie.symbol + d["site_index"] = iatom + d["frac_coords"] = np.round(site.frac_coords, decimals=decimals) + d["cart_coords"] = np.round(site.coords, decimals=decimals) + d["wyckoff"] = wlabel + if fmt == "cartesian": + d["isotropic"] = ucart[iatom].trace() / 3.0 + d["determinant"] = np.linalg.det(ucart[iatom]) + for col, ind in zip(columns, inds): + d[col] = values[iatom, ind[0], ind[1]] + rows.append(d) + + import pandas as pd + return pd.DataFrame(rows, columns=list(rows[0].keys()) if rows else None) + + def write_cif_file(self, filepath, temp=300, symprec=None): + """ + Write CIF file with structure and anisotropic U tensor in CIF format. + + Args: + filepath: Name of CIF file. If None, a temporary filepath is created. + temp: Temperature in Kelvin (used to compute U). + symprec (float): If not none, finds the symmetry of the structure + and writes the cif with symmetry information. Passes symprec to the SpacegroupAnalyzer + + Return: Filepath + """ + if filepath is None: + import tempfile + _, filepath = tempfile.mkstemp(suffix=".cif", text=True) + + with open(filepath, "wt") as fh: + fh.write(self.get_cif_string(temp=temp, symprec=symprec)) + + return filepath + + #def jsmol(self, temp=300, symprec=None, verbose=0): # pragma: no cover + # """ + # Args: + # symprec (float): If not none, finds the symmetry of the structure + # and writes the cif with symmetry information. Passes symprec to the SpacegroupAnalyzer + # verbose: Verbosity level. + # """ + # cif_string = self.get_cif_string(temp=temp, symprec=symprec) + + # try: + # from jupyter_jsmol import JsmolView + # except ImportError: + # raise ImportError("jupyter_jsmol is not installed. See https://github.com/fekad/jupyter-jsmol") + + # jsmol = JsmolView(color='white') + # from IPython.display import display, HTML + # FIXME TEMPORARY HACK + # display(HTML('')) + # display(jsmol) + + # cmd = 'load inline "%s" {1 1 1}; ellipsoid;' % cif_string + # if verbose: print("executing cmd:", cmd) + # jsmol.script(cmd) + + # return jsmol + + def vesta_open(self, temp=300): # pragma: no cover + """ + Visualize termal displacement ellipsoids at temperature `temp` (Kelvin) with Vesta_ application. + """ + filepath = self.write_cif_file(filepath=None, temp=temp) + cprint("Writing structure + Debye-Waller tensor in CIF format for T = %s (K) to file: %s" % (temp, filepath), "green") + cprint("In the Vesta GUI, select: Properties -> Atoms -> Show as displament ellipsoids.", "green") + from abipy.iotools import Visualizer + visu = Visualizer.from_name("vesta") + + return visu(filepath)() + + def get_cif_string(self, temp=300, symprec=None): + """ + Return string with structure and anisotropic U tensor in CIF format at temperature `temp` in Kelvin + + Args: + symprec (float): If not none, finds the symmetry of the structure + and writes the cif with symmetry information. Passes symprec + to the SpacegroupAnalyzer + """ + # Get string with structure in CIF format. + # Don't use symprec because it changes the order of the sites + # and we must be consistent with site_labels when writing aniso_U terms! + from pymatgen.io.cif import CifWriter + cif = CifWriter(self.structure, symprec=symprec) + + aniso_u = """loop_ +_atom_site_aniso_label +_atom_site_aniso_U_11 +_atom_site_aniso_U_22 +_atom_site_aniso_U_33 +_atom_site_aniso_U_23 +_atom_site_aniso_U_13 +_atom_site_aniso_U_12""".splitlines() + + # Compute U tensor in CIF format (reduced coords) + natom = len(self.structure) + msq = self.get_msq_tmesh([float(temp)], what_list="displ") + ucart = getattr(msq, "displ") + ucart = np.reshape(ucart, (natom, 3, 3)) + ucif = self.convert_ucart(ucart, fmt="cif") + + # Add matrix elements. Use 0 based index + for iatom, site in enumerate(self.structure): + site_label = "%s%d" % (site.specie.symbol, iatom) + m = ucif[iatom] + aniso_u.append("%s %10.5f %10.5f %10.5f %10.5f %10.5f %10.5f" % + (site_label, m[0, 0], m[1, 1], m[2, 2], m[1, 2], m[0, 2], m[0, 1])) + + return str(cif) + "\n".join(aniso_u) + + def check_site_symmetries(self, temp=300, verbose=0): + """ + Check site symmetries of the displacement tensor at temperature `temp` in Kelvin. + Return maximum error. + """ + msq = self.get_msq_tmesh([float(temp)], what_list="displ") + ucart = getattr(msq, "displ") + natom = len(self.structure) + ucart = np.reshape(ucart, (natom, 3, 3)) + + return self.structure.site_symmetries.check_site_symmetries(ucart, verbose=verbose) + + def _get_components(self, components): + """ + Return list of components to analyze from user input. + """ + if components == "all": + return list(self.ALL_COMPS.values()) + elif components == "upper": + return [self.ALL_COMPS[c] for c in ("xx", "yy", "zz", "yz", "xz", "xy")] + elif components == "diag": + return [self.ALL_COMPS[c] for c in ("xx", "yy", "zz")] + elif components == "offdiag": + return [self.ALL_COMPS[c] for c in ("xy", "xz", "yz")] + else: + return [self.ALL_COMPS[c] for c in list_strings(components)] + + @add_fig_kwargs + def plot(self, components="upper", view="inequivalent", units="eV", select_symbols=None, + xlims=None, ylims=None, sharey=False, fontsize=8, verbose=0, **kwargs): + """ + Plot the generalized phonon DOS g_ij(omega, atom) for each atom in the unit cell. + One subplot per atom. Each subplot shows the 9 independent components of the symmetric tensor. + as a function of frequency. By default, only "inequivalent" atoms are shown. + + Args: + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + components: List of cartesian tensor components to plot e.g. ["xx", "xy"]. + "all" for all components. "upper" for the upper triangle, "diag" for diagonal elements. + units: Units energy axis. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. + select_symbols: String or list of strings with chemical symbols. Used to select only atoms of this type. + xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used. + ylims: Set the data limits for the y-axis. + sharey: True if y-axis should be shared. + fontsize: Legend and title fontsize. + verbose: Verbosity level. + + Returns: |matplotlib-Figure| + """ + # TODO Decide units for internal arrays. + factor = abu.phfactor_ev2units(units) + + # Select atoms. + aview = self._get_atomview(view, select_symbols, verbose=verbose) + + num_plots = len(aview.iatom_list) + nrows, ncols = 1, 1 + if num_plots > 1: + ncols = 2 + nrows = num_plots // ncols + num_plots % ncols + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=True) + ax_list = np.reshape(ax_list, (nrows, ncols)).ravel() + # don't show the last ax if num_plots is odd. + if num_plots % ncols != 0: ax_list[-1].axis("off") + + xx = self.wmesh * factor + components = self._get_components(components) + + # For each atom in the view. + for ix, (ax, iatom, site_label) in enumerate(zip(ax_list, aview.iatom_list, aview.site_labels)): + irow, icol = divmod(ix, ncols) + ax.grid(True) + set_axlims(ax, xlims, "x") + set_axlims(ax, ylims, "y") + ax.set_title(site_label, fontsize=fontsize) + #site = self.structure[iatom] + #color = cmap(float(iatom) / max((len(iatom_list) - 1), 1)) + + # Plot components for this atom on the same ax. + for c in components: + yw = c.eval33w(self.values[iatom]) + label = r"$G_{%s}$" % c.name if ix == 0 else None + ax.plot(xx, yw / factor, label=label, **c.plot_kwargs) + + # Handle labels. + if irow == nrows - 1: + ax.set_xlabel('Frequency %s' % abu.phunit_tag(units)) + else: + set_visible(ax, False, "xlabel", "xticklabels") + + if ix == 0: + ax.set_ylabel(r"$g_{ij}(\omega)$ 1/%s (Cart coords)" % abu.phunit_tag(units)) + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + return fig + + @add_fig_kwargs + def plot_tensor(self, tstart=0, tstop=600, num=50, components="all", what="displ", view="inequivalent", + select_symbols=None, colormap="jet", xlims=None, ylims=None, fontsize=10, verbose=0, **kwargs): + """ + Plot tensor(T) for each atom in the unit cell. + One subplot for each component, each subplot show all inequivalent sites. + By default, only "inequivalent" atoms are shown. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. + components: "all" for all components. "diag" for diagonal elements, "offdiag" for off-diagonal terms only. + what: "displ" for displament, "vel" for velocity. + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + select_symbols: String or list of strings with chemical symbols. Used to select only atoms of this type. + colormap: matplotlib colormap. + xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used. + ylims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used + fontsize: Legend and title fontsize. + verbose: Verbosity level. + + Returns: |matplotlib-Figure| + """ + # Select atoms. + aview = self._get_atomview(view, select_symbols=select_symbols, verbose=verbose) + + # One subplot for each component + diag = ["xx", "yy", "zz"] + offdiag = ["xy", "xz", "yz"] + components = { + "all": diag + offdiag, "diag": diag, "offdiag": offdiag, + }[components] + + components = self._get_components(components) + shape = np.reshape(components, (-1, 3)).shape + nrows, ncols = shape[0], shape[1] + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=True, squeeze=True) + ax_list = np.reshape(ax_list, (nrows, ncols)).ravel() + cmap = plt.get_cmap(colormap) + + # Compute U(T) + tmesh = np.linspace(tstart, tstop, num=num) + msq = self.get_msq_tmesh(tmesh, iatom_list=aview.iatom_list, what_list=what) + # [natom,3,3,nt] array + values = getattr(msq, what) + + for ix, (ax, comp) in enumerate(zip(ax_list, components)): + irow, icol = divmod(ix, ncols) + ax.grid(True) + set_axlims(ax, xlims, "x") + set_axlims(ax, ylims, "y") + ylabel = comp.get_tavg_label(what, with_units=True) + ax.set_ylabel(ylabel, fontsize=fontsize) + + # Plot this component for all inequivalent atoms on the same subplot. + for ii, (iatom, site_label) in enumerate(zip(aview.iatom_list, aview.site_labels)): + color = cmap(float(ii) / max((len(aview.iatom_list) - 1), 1)) + ys = comp.eval33w(values[iatom]) + ax.plot(msq.tmesh, ys, label=site_label if ix == 0 else None, + color=color) #, marker="o") + if ix == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + if irow == 1: + ax.set_xlabel('Temperature (K)') + else: + set_visible(ax, False, "xlabel", "xticklabels") + + return fig + + @add_fig_kwargs + def plot_uiso(self, tstart=0, tstop=600, num=50, what="displ", view="inequivalent", + select_symbols=None, colormap="jet", xlims=None, ylims=None, sharey=False, + fontsize=10, verbose=0, **kwargs): + """ + Plot phonon PJDOS for each atom in the unit cell. + One subplot for each component, each subplot show all inequivalent sites. + By default, only "inequivalent" atoms are shown. + + comparison of Ueq values, which + are calculated as the mean of the diagonal elements of the harmonic ADP tensor, (d) + comparison of the ADP anisotropy factor, which is defined as the ratio between maximum Uii + and minimum Uii values. A ratio of 1 would correspond to an isotropic displacement. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. + components: "all" for all components. "diag" for diagonal elements, "offdiag" for off-diagonal terms only. + what: "displ" for displament, "vel" for velocity. + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + select_symbols: String or list of strings with chemical symbols. Used to select only atoms of this type. + colormap: matplotlib colormap. + xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used. + ylims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used + sharey: True if y-axis should be shared. + fontsize: Legend and title fontsize. + verbose: Verbosity level. + + Returns: |matplotlib-Figure| + """ + # Select atoms. + aview = self._get_atomview(view, select_symbols=select_symbols, verbose=verbose) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=2, ncols=1, + sharex=True, sharey=sharey, squeeze=True) + cmap = plt.get_cmap(colormap) + + # Compute U(T) + tmesh = np.linspace(tstart, tstop, num=num) + msq = self.get_msq_tmesh(tmesh, iatom_list=aview.iatom_list, what_list=what) + # [natom, 3, 3, nt] + values = getattr(msq, what) + ntemp = len(msq.tmesh) + + for ix, ax in enumerate(ax_list): + ax.grid(True) + set_axlims(ax, xlims, "x") + set_axlims(ax, ylims, "y") + if what == "displ": + ylabel = r"$U_{iso}\;(\AA^2)$" if ix == 0 else \ + r"Anisotropy factor ($\dfrac{\epsilon_{max}}{\epsilon_{min}}}$)" + elif what == "vel": + ylabel = r"$V_{iso}\;(m/s)^2$" if ix == 0 else \ + r"Anisotropy factor ($\dfrac{\epsilon_{max}}{\epsilon_{min}}}$)" + else: + raise ValueError("Unknown value for what: `%s`" % str(what)) + ax.set_ylabel(ylabel, fontsize=fontsize) + + # Plot this component for all inequivalent atoms on the same subplot. + for ii, (iatom, site_label) in enumerate(zip(aview.iatom_list, aview.site_labels)): + color = cmap(float(ii) / max((len(aview.iatom_list) - 1), 1)) + #msq.displ[iatom, 3, 3, nt] + if ix == 0: + # ISO calculated as the mean of the diagonal elements of the harmonic ADP tensor + ys = np.trace(values[iatom]) / 3.0 + elif ix == 1: + # Ratio between maximum Uii and minimum Uii values. + # A ratio of 1 would correspond to an isotropic displacement. + ys = np.empty(ntemp) + for itemp in range(ntemp): + eigs = np.linalg.eigvalsh(values[iatom, :, :, itemp], UPLO='U') + ys[itemp] = eigs.max() / eigs.min() + else: + raise ValueError("Invalid ix index: `%s" % ix) + + ax.plot(msq.tmesh, ys, label=site_label if ix == 0 else None, + color=color) #, marker="o") + if ix == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + if ix == len(ax_list) - 1: + ax.set_xlabel("Temperature (K)") + else: + set_visible(ax, False, "xlabel", "xticklabels") + + return fig diff --git a/abipy/dfpt/phonons.py b/abipy/dfpt/phonons.py index 462f4430c..426f9492a 100644 --- a/abipy/dfpt/phonons.py +++ b/abipy/dfpt/phonons.py @@ -1,34 +1,31 @@ # coding: utf-8 -from __future__ import print_function, division, absolute_import # unicode_literals, - -import sys import functools import numpy as np import itertools import pickle import os -import six import json import warnings import abipy.core.abinit_units as abu from collections import OrderedDict from monty.string import is_string, list_strings, marquee -from monty.collections import AttrDict, dict2namedtuple +from monty.collections import dict2namedtuple from monty.functools import lazy_property from monty.termcolor import cprint from pymatgen.core.units import eV_to_Ha, Energy from pymatgen.core.periodic_table import Element +from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine +from pymatgen.phonon.dos import CompletePhononDos as PmgCompletePhononDos, PhononDos as PmgPhononDos from abipy.core.func1d import Function1D from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_PhononBands, NotebookWriter from abipy.core.kpoints import Kpoint, Kpath from abipy.abio.robots import Robot from abipy.iotools import ETSF_Reader -from abipy.tools import gaussian, duck -from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, set_axlims, get_axarray_fig_plt, set_visible -from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine -from pymatgen.phonon.dos import CompletePhononDos as PmgCompletePhononDos, PhononDos as PmgPhononDos - +from abipy.tools import duck +from abipy.tools.numtools import gaussian, sort_and_groupby +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, set_axlims, get_axarray_fig_plt, set_visible, set_ax_xylabels +from .phtk import match_eigenvectors, get_dyn_mat_eigenvec, open_file_phononwebsite, NonAnalyticalPh __all__ = [ "PhononBands", @@ -40,6 +37,7 @@ "PhdosFile", ] + @functools.total_ordering class PhononMode(object): """ @@ -84,7 +82,7 @@ def to_string(self, with_displ=True, verbose=0): Args: verbose: Verbosity level. with_displ: True to print phonon displacement. - """ + """ lines = ["%s: q-point %s, frequency %.5f (eV)" % (self.__class__.__name__, self.qpoint, self.freq)] app = lines.append @@ -131,7 +129,7 @@ def from_file(cls, filepath): amu = {at: a for at, a in zip(atomic_numbers, amu_list)} else: cprint("Warning: file %s does not contain atomic_numbers.\nParticular methods need them!" % - filepath, "red") + filepath, "red") amu = None non_anal_ph = None @@ -143,12 +141,15 @@ def from_file(cls, filepath): # print("Found nonanal") # non_anal_ph = NonAnalyticalPh.from_file(filepath) + epsinf, zcart = r.read_epsinf_zcart() + return cls(structure=structure, qpoints=qpoints, phfreqs=r.read_phfreqs(), phdispl_cart=r.read_phdispl_cart(), amu=amu, - non_anal_ph=non_anal_ph + non_anal_ph=non_anal_ph, + epsinf=epsinf, zcart=zcart, ) @classmethod @@ -194,7 +195,8 @@ def read_non_anal_from_file(self, filepath): """ self.non_anal_ph = NonAnalyticalPh.from_file(filepath) - def __init__(self, structure, qpoints, phfreqs, phdispl_cart, non_anal_ph=None, amu=None, linewidths=None): + def __init__(self, structure, qpoints, phfreqs, phdispl_cart, non_anal_ph=None, amu=None, + epsinf=None, zcart=None, linewidths=None): """ Args: structure: |Structure| object. @@ -206,6 +208,10 @@ def __init__(self, structure, qpoints, phfreqs, phdispl_cart, non_anal_ph=None, None if contribution is not present. amu: dictionary that associates the atomic species present in the structure to the values of the atomic mass units used for the calculation. + epsinf: [3,3] matrix with electronic dielectric tensor in Cartesian coordinates. + None if not avaiable. + zcart: [natom, 3, 3] matrix with Born effective charges in Cartesian coordinates. + None if not available. linewidths: Array-like object with the linewidths (eV) stored as [q, num_modes] """ self.structure = structure @@ -240,6 +246,9 @@ def __init__(self, structure, qpoints, phfreqs, phdispl_cart, non_anal_ph=None, if linewidths is not None: self._linewidths = np.reshape(linewidths, self.phfreqs.shape) + self.epsinf = epsinf + self.zcart = zcart + # Dictionary with metadata e.g. nkpt, tsmear ... self.params = OrderedDict() @@ -247,11 +256,12 @@ def __init__(self, structure, qpoints, phfreqs, phdispl_cart, non_anal_ph=None, @property def nqpt(self): """An alias for num_qpoints.""" - return self.num_qpoints + return self.num_qpoints def __repr__(self): """String representation (short version)""" - return "<%s, nk=%d, %s, id=%s>" % (self.__class__.__name__, self.num_qpoints, self.structure.formula, id(self)) + return "<%s, nk=%d, %s, id=%s>" % ( + self.__class__.__name__, self.num_qpoints, self.structure.formula, id(self)) def __str__(self): return self.to_string() @@ -427,7 +437,8 @@ def to_xmgrace(self, filepath, units="meV"): Args: filepath: String with filename or stream. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. """ is_stream = hasattr(filepath, "write") @@ -459,7 +470,7 @@ def w(s): w("@link page off") w("@with g0") w("@world xmin 0.00") - w('@world xmax %d' % (self.num_qpoints -1)) + w('@world xmax %d' % (self.num_qpoints - 1)) w('@world ymin %s' % wqnu_units.min()) w('@world ymax %s' % wqnu_units.max()) w('@default linewidth 1.5') @@ -510,9 +521,7 @@ def w(s): # return PhononBands3D(self.structure, self.qpoints, has_timrev, self.phfreqs, fermie) def qindex(self, qpoint): - """ - Returns the index of the qpoint. Accepts integer or reduced coordinates. - """ + """Returns the index of the qpoint. Accepts integer or reduced coordinates.""" if duck.is_intlike(qpoint): return int(qpoint) else: @@ -648,26 +657,29 @@ def create_xyz_vib(self, iqpt, filename, pre_factor=200, do_real=True, scale_mat Create vibration XYZ file for visualization of phonons. Args: - iqpt: index of qpoint in self - filename: name of the XYZ file that will be created - pre_factor: Multiplication factor of the displacements - do_real: True if we want only real part of the displacement, False means imaginary part - scale_matrix: Scaling matrix of the supercell - max_supercell: Maximum size of the supercell with respect to primitive cell + iqpt: index of qpoint. + filename: name of the XYZ file that will be created. + pre_factor: Multiplication factor of the displacements. + do_real: True if we want only real part of the displacement, False means imaginary part. + scale_matrix: Scaling matrix of the supercell. + max_supercell: Maximum size of the supercell with respect to primitive cell. """ if scale_matrix is None: if max_supercell is None: - raise ValueError("If scale_matrix is not provided, please provide max_supercell !") + raise ValueError("If scale_matrix is None, max_supercell must be provided!") - scale_matrix = self.structure.get_smallest_supercell(self.qpoints[iqpt].frac_coords, max_supercell=max_supercell) + scale_matrix = self.structure.get_smallest_supercell(self.qpoints[iqpt].frac_coords, + max_supercell=max_supercell) + + natoms = int(np.round(len(self.structure) * np.linalg.det(scale_matrix))) - natoms = int(np.round(len(self.structure)*np.linalg.det(scale_matrix))) with open(filename, "wt") as xyz_file: for imode in np.arange(self.num_branches): xyz_file.write(str(natoms) + "\n") xyz_file.write("Mode " + str(imode) + " : " + str(self.phfreqs[iqpt, imode]) + "\n") self.structure.write_vib_file( - xyz_file, self.qpoints[iqpt].frac_coords, pre_factor * np.reshape(self.phdispl_cart[iqpt, imode,:],(-1,3)), + xyz_file, self.qpoints[iqpt].frac_coords, + pre_factor * np.reshape(self.phdispl_cart[iqpt, imode,:],(-1,3)), do_real=True, frac_coords=False, max_supercell=max_supercell, scale_matrix=scale_matrix) def create_ascii_vib(self, iqpts, filename, pre_factor=1): @@ -728,7 +740,7 @@ def create_ascii_vib(self, iqpts, filename, pre_factor=1): q[0], q[1], q[2], self.phfreqs[iqpt, imode])) for displ in displ_list[imode]: - line = "#; "+ "; ".join("{:.6f}".format(i) for i in displ.real) + "; " \ + line = "#; " + "; ".join("{:.6f}".format(i) for i in displ.real) + "; " \ + "; ".join("{:.6f}".format(i) for i in displ.imag) + " \\" lines.append(line) @@ -806,6 +818,11 @@ def split_non_collinear(qpts): return h + def reasonable_repetitions(natoms): + if (natoms < 4): return (3,3,3) + if (4 < natoms < 50): return (2,2,2) + if (50 < natoms): return (1,1,1) + # http://henriquemiranda.github.io/phononwebsite/index.html data = {} data["name"] = name or self.structure.composition.reduced_formula @@ -814,7 +831,7 @@ def split_non_collinear(qpts): data["atom_types"] = [e.name for e in self.structure.species] data["atom_numbers"] = self.structure.atomic_numbers data["formula"] = self.structure.formula.replace(" ", "") - data["repetitions"] = repetitions or (3, 3, 3) + data["repetitions"] = repetitions or reasonable_repetitions(self.num_atoms) data["atom_pos_car"] = self.structure.cart_coords.tolist() data["atom_pos_red"] = self.structure.frac_coords.tolist() data["chemical_symbols"] = self.structure.symbol_set @@ -830,7 +847,7 @@ def split_non_collinear(qpts): elif highsym_qpts_mode == 'split': data["highsym_qpts"] = split_non_collinear(qpoints) elif highsym_qpts_mode == 'std': - data["highsym_qpts"] = list(six.moves.zip(*self._make_ticks_and_labels(None))) + data["highsym_qpts"] = list(zip(*self._make_ticks_and_labels(None))) else: data["highsym_qpts"] = highsym_qpts @@ -858,7 +875,8 @@ def split_non_collinear(qpts): self.split_matched_indices[i][...,None], np.arange(vect.shape[2])[None, None,:]] v = vect.reshape((len(vect), self.num_branches,self.num_atoms, 3)) - v /= np.linalg.norm(v[0,0,0]) + norm = [np.linalg.norm(vi) for vi in v[0,0]] + v /= max(norm) v = np.stack([v.real, v.imag], axis=-1) vectors.extend(v.tolist()) @@ -906,17 +924,22 @@ def decorate_ax(self, ax, units='eV', **kwargs): ax.set_xlim(ticks[0], ticks[-1]) @add_fig_kwargs - def plot(self, ax=None, units="eV", qlabels=None, branch_range=None, match_bands=False, **kwargs): + def plot(self, ax=None, units="eV", qlabels=None, branch_range=None, match_bands=False, temp=None, + fontsize=12, **kwargs): r""" Plot the phonon band structure. Args: ax: |matplotlib-Axes| or None if a new figure should be created. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points. The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``. branch_range: Tuple specifying the minimum and maximum branch index to plot (default: all branches are plotted). match_bands: if True the bands will be matched based on the scalar product between the eigenvectors. + temp: Temperature in Kelvin. If not None, a scatter plot with the Bose-Einstein occupation factor + at temperature `temp` is added. + fontsize: Legend and title fontsize. Returns: |matplotlib-Figure| """ @@ -931,15 +954,28 @@ def plot(self, ax=None, units="eV", qlabels=None, branch_range=None, match_bands # Decorate the axis (e.g add ticks and labels). self.decorate_ax(ax, units=units, qlabels=qlabels) - if "color" not in kwargs: - kwargs["color"] = "black" - - if "linewidth" not in kwargs: - kwargs["linewidth"] = 2.0 + if "color" not in kwargs: kwargs["color"] = "black" + if "linewidth" not in kwargs: kwargs["linewidth"] = 2.0 # Plot the phonon branches. self.plot_ax(ax, branch_range, units=units, match_bands=match_bands, **kwargs) + if temp is not None: + # Scatter plot with Bose-Einstein occupation factors for T = temp + factor = abu.phfactor_ev2units(units) + if temp < 1: temp = 1 + ax.set_title("T = %.1f K" % temp, fontsize=fontsize) + xs = np.arange(self.num_qpoints) + for nu in self.branches: + ws = self.phfreqs[:, nu] + wkt = self.phfreqs[:, nu] / (abu.kb_eVK * temp) + # 1 / (np.exp(1e-6) - 1)) ~ 999999.5 + wkt = np.where(wkt > 1e-6, wkt, 1e-6) + occ = 1.0 / (np.exp(wkt) - 1.0) + s = np.where(occ < 2, occ, 2) * 50 + ax.scatter(xs, ws * factor, s=s, marker="o", c="b", alpha=0.6) + #ax.scatter(xs, ws, s=s, marker="o", c=occ, cmap="jet") + return fig def plot_ax(self, ax, branch, units='eV', match_bands=False, **kwargs): @@ -981,7 +1017,8 @@ def plot_colored_matched(self, ax=None, units="eV", qlabels=None, branch_range=N Args: ax: |matplotlib-Axes| or None if a new figure should be created. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points. The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``. branch_range: Tuple specifying the minimum and maximum branch_i index to plot @@ -1028,6 +1065,81 @@ def plot_colored_matched(self, ax=None, units="eV", qlabels=None, branch_range=N return fig + @add_fig_kwargs + def plot_lt_character(self, units="eV", qlabels=None, ax=None, xlims=None, ylims=None, + colormap="jet", fontsize=12, **kwargs): + r""" + Plot the phonon band structure with colored lines. The color of the lines indicates + the degree to which the mode is longitudinal: + Red corresponds to longitudinal modes and black to purely transverse modes. + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + units: Units for plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. + qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points. + The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``. + xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used. + ylims: y-axis limits. + colormap: Matplotlib colormap. + fontsize: legend and title fontsize. + + Returns: |matplotlib-Figure| + """ + if self.zcart is None: + cprint("Bandstructure does not have Born effective charges", "yellow") + return None + + factor = abu.phfactor_ev2units(units) + ax, fig, plt = get_ax_fig_plt(ax=ax) + cmap = plt.get_cmap(colormap) + + if "color" not in kwargs: kwargs["color"] = "black" + if "linewidth" not in kwargs: kwargs["linewidth"] = 2.0 + + first_xx = 0 + scatt_x, scatt_y, scatt_s = [], [], [] + for p_qpts, p_freqs, p_dcart in zip(self.split_qpoints, self.split_phfreqs, self.split_phdispl_cart): + xx = list(range(first_xx, first_xx + len(p_freqs))) + + for iq, (qpt, ws, dis) in enumerate(zip(p_qpts, p_freqs, p_dcart)): + qcart = self.structure.reciprocal_lattice.get_cartesian_coords(qpt) + qnorm = np.linalg.norm(qcart) + inv_qepsq = 0.0 + if qnorm > 1e-3: + qvers = qcart / qnorm + inv_qepsq = 1.0 / np.dot(qvers, np.dot(self.epsinf, qvers)) + + # We are not interested in the amplitudes so normalize all displacements to one. + dis = dis.reshape(self.num_branches, self.num_atoms, 3) + # q x Z[atom] x disp[q, nu, atom] + for nu in range(self.num_branches): + v = sum(np.dot(qcart, np.dot(self.zcart[iatom], dis[nu, iatom])) for iatom in range(self.num_atoms)) + scatt_x.append(xx[iq]) + scatt_y.append(ws[nu]) + scatt_s.append(v * inv_qepsq) + + p_freqs = p_freqs * factor + ax.plot(xx, p_freqs, **kwargs) + first_xx = xx[-1] + + scatt_y = np.array(scatt_y) * factor + scatt_s = np.abs(np.array(scatt_s)) + scatt_s /= scatt_s.max() + scatt_s *= 50 + print("scatt_s", scatt_s, "min", scatt_s.min(), "max", scatt_s.max()) + + ax.scatter(scatt_x, scatt_y, s=scatt_s, + #c=None, marker=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, + #linewidths=None, verts=None, edgecolors=None, *, data=None + ) + self.decorate_ax(ax, units=units, qlabels=qlabels) + set_axlims(ax, xlims, "x") + set_axlims(ax, ylims, "y") + + return fig + @property def split_qpoints(self): try: @@ -1228,11 +1340,12 @@ def plot_fatbands(self, use_eigvec=True, units="eV", colormap="jet", phdos_file= use_eigvec: True if the width of the phonon branch should be computed from the eigenvectors. False to use phonon displacements. Note that the PHDOS is always decomposed in terms of (orthonormal) eigenvectors. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. colormap: Have a look at the colormaps here and decide which one you like: http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html phdos_file: Used to activate fatbands + PJDOS plot. - Accept string with path of PHDOS.nc file or :class:`PhdosFile` object. + Accept string with path of PHDOS.nc file or |PhdosFile| object. alpha: The alpha blending value, between 0 (transparent) and 1 (opaque) max_stripe_width_mev: The maximum width of the stripe in meV. Will be rescaled according to ``units``. width_ratios: Ratio between the width of the fatbands plots and the DOS plots. @@ -1361,7 +1474,8 @@ def plot_with_phdos(self, phdos, units="eV", qlabels=None, ax_list=None, width_r Args: phdos: An instance of |PhononDos| or a netcdf file providing a PhononDos object. - units: Units for plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points. The values are the labels e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``. ax_list: The axes for the bandstructure plot and the DOS plot. If ax_list is None, a new figure @@ -1446,7 +1560,7 @@ def plot_phdispl(self, qpoint, cart_dir=None, use_reduced_coords=False, ax=None, summed on a separate group. if None all the atoms will be considered and grouped by type. labels_groups: If atoms_index is not None will provide the labels for each of the group in atoms_index. Should have the same length of atoms_index or be None. If None automatic labelling will be used. - branches: list of indices for the modes that shoul be represented. If None all the modes will be shown. + branches: list of indices for the modes that should be represented. If None all the modes will be shown. format_w: string used to format the values of the frequency. Default "%.3f". Returns: |matplotlib-Figure| @@ -1499,7 +1613,7 @@ def plot_phdispl(self, qpoint, cart_dir=None, use_reduced_coords=False, ax=None, hatches = list_strings(hatches) if hatches is not None else [] x = 0 - for nu in branches: + for inu, nu in enumerate(branches): # Select frequencies and cartesian displacements/eigenvectors if is_non_analytical_direction: w_qnu = self.non_anal_phfreqs[iq, nu] * factor @@ -1535,7 +1649,7 @@ def plot_phdispl(self, qpoint, cart_dir=None, use_reduced_coords=False, ax=None, ax.bar(x, height, width, bottom, align="center", color=cmap(float(itype) / max(1, ntypat - 1)), - label=symbol if nu == 0 else None, edgecolor='black', + label=symbol if inu == 0 else None, edgecolor='black', hatch=hatches[itype % len(hatches)] if hatches else None, ) bottom += height @@ -1556,7 +1670,7 @@ def plot_phdispl(self, qpoint, cart_dir=None, use_reduced_coords=False, ax=None, ax.bar(x, height, width, bottom, align="center", color=cmap(float(igroup) / max(1, len(atoms_index) - 1)), - label=symbol if nu == 0 else None, edgecolor='black', + label=symbol if inu == 0 else None, edgecolor='black', hatch=hatches[igroup % len(hatches)] if hatches else None, ) bottom += height @@ -1661,7 +1775,8 @@ def boxplot(self, ax=None, units="eV", mode_range=None, swarm=False, **kwargs): Args: ax: |matplotlib-Axes| or None if a new figure should be created. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. mode_range: Only modes such as `mode_range[0] <= mode_index < mode_range[1]` are included in the plot. swarm: True to show the datapoints on top of the boxes kwargs: Keyword arguments passed to seaborn boxplot. @@ -1717,7 +1832,7 @@ def to_pymatgen(self, qlabels=None): # not be repeated (if they are the real first or last point) or they will be already reapeated due # to the split. if any(np.allclose(q, labelled_q) for labelled_q in labelled_q_list): - if 0 < i = 9") + + # nctkarr_t('msqd_dos_atom', "dp", 'number_of_frequencies, three, three, number_of_atoms') & + # symmetric tensor still transpose (3,3) to be consistent. + values = self.read_value("msqd_dos_atom").transpose([0, 2, 1, 3]).copy() + + # Read atomic masses and build dictionary element_symbol --> amu + amu_symbol = self.read_amu_symbol() + + from abipy.dfpt.msqdos import MsqDos + return MsqDos(self.structure, self.wmesh, values, amu_symbol) class PhdosFile(AbinitNcFile, Has_Structure, NotebookWriter): @@ -2403,7 +2554,7 @@ class PhdosFile(AbinitNcFile, Has_Structure, NotebookWriter): def __init__(self, filepath): # Open the file, read data and create objects. - super(PhdosFile, self).__init__(filepath) + super().__init__(filepath) self.reader = r = PhdosReader(filepath) self.wmesh = r.wmesh @@ -2464,8 +2615,16 @@ def pjdos_symbol(self): """ return self.reader.read_pjdos_symbol_dict() + @lazy_property + def msqd_dos(self): + """ + |MsqDos| object with Mean square displacement tensor in cartesian coords. + Allows one to calculate Debye Waller factors by integration with 1/omega and the Bose-Einstein factor. + """ + return self.reader.read_msq_dos() + @add_fig_kwargs - def plot_pjdos_type(self, units="eV", stacked=True, colormap="jet", alpha=0.7, + def plot_pjdos_type(self, units="eV", stacked=True, colormap="jet", alpha=0.7, exchange_xy=False, ax=None, xlims=None, ylims=None, fontsize=12, **kwargs): """ Plot type-projected phonon DOS. @@ -2473,11 +2632,13 @@ def plot_pjdos_type(self, units="eV", stacked=True, colormap="jet", alpha=0.7, Args: ax: |matplotlib-Axes| or None if a new figure should be created. stacked: True if DOS partial contributions should be stacked on top of each other. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. colormap: Have a look at the colormaps `here `_ and decide which one you'd like: alpha: The alpha blending value, between 0 (transparent) and 1 (opaque). + exchange_xy: True to exchange x-y axis. xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` or scalar e.g. ``left``. If left (right) is None, default values are used. ylims: y-axis limits. @@ -2494,8 +2655,8 @@ def plot_pjdos_type(self, units="eV", stacked=True, colormap="jet", alpha=0.7, ax.grid(True) set_axlims(ax, xlims, "x") set_axlims(ax, ylims, "y") - ax.set_xlabel('Frequency %s' % abu.phunit_tag(units)) - ax.set_ylabel('PJDOS %s' % abu.phdos_label_from_units(units)) + xlabel, ylabel = 'Frequency %s' % abu.phunit_tag(units), 'PJDOS %s' % abu.phdos_label_from_units(units) + set_ax_xylabels(ax, xlabel, ylabel, exchange_xy) # Type projected DOSes. num_plots = len(self.pjdos_symbol) @@ -2503,19 +2664,27 @@ def plot_pjdos_type(self, units="eV", stacked=True, colormap="jet", alpha=0.7, for i, (symbol, pjdos) in enumerate(self.pjdos_symbol.items()): x, y = pjdos.mesh * factor, pjdos.values / factor + if exchange_xy: x, y = y, x if num_plots != 1: color = cmap(float(i) / (num_plots - 1)) else: color = cmap(0.0) + if not stacked: ax.plot(x, y, lw=lw, label=symbol, color=color) else: - ax.plot(x, cumulative + y, lw=lw, label=symbol, color=color) - ax.fill_between(x, cumulative, cumulative + y, facecolor=color, alpha=alpha) - cumulative += y + if not exchange_xy: + ax.plot(x, cumulative + y, lw=lw, label=symbol, color=color) + ax.fill_between(x, cumulative, cumulative + y, facecolor=color, alpha=alpha) + cumulative += y + else: + ax.plot(cumulative + x, y, lw=lw, label=symbol, color=color) + ax.fill_betweenx(y, cumulative, cumulative + x, facecolor=color, alpha=alpha) + cumulative += x # Total PHDOS x, y = self.phdos.mesh * factor, self.phdos.values / factor + if exchange_xy: x, y = y, x ax.plot(x, y, lw=lw, label="Total PHDOS", color='black') ax.legend(loc="best", fontsize=fontsize, shadow=True) @@ -2529,7 +2698,8 @@ def plot_pjdos_cartdirs_type(self, units="eV", stacked=True, colormap="jet", alp Three rows for each cartesian direction. Each row shows the contribution of each atomic type + Total Phonon DOS. Args: - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. stacked: True if DOS partial contributions should be stacked on top of each other. colormap: Have a look at the colormaps `here `_ @@ -2553,7 +2723,6 @@ def plot_pjdos_cartdirs_type(self, units="eV", stacked=True, colormap="jet", alp ax_list, fig, plt = get_axarray_fig_plt(ax_list, nrows=nrows, ncols=ncols, sharex=False, sharey=True, squeeze=True) ax_list = np.reshape(ax_list, (nrows, ncols)).ravel() - cmap = plt.get_cmap(colormap) # symbol --> [three, number_of_frequencies] in cart dirs @@ -2590,13 +2759,14 @@ def plot_pjdos_cartdirs_type(self, units="eV", stacked=True, colormap="jet", alp @add_fig_kwargs def plot_pjdos_cartdirs_site(self, view="inequivalent", units="eV", stacked=True, colormap="jet", alpha=0.7, - xlims=None, ylims=None, ax_list=None, fontsize=8, **kwargs): + xlims=None, ylims=None, ax_list=None, fontsize=8, verbose=0, **kwargs): """ Plot phonon PJDOS for each atom in the unit cell. By default, only "inequivalent" atoms are shown. Args: - view: "inequivalent", "all" - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + view: "inequivalent" to show only inequivalent atoms. "all" for all sites. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. stacked: True if DOS partial contributions should be stacked on top of each other. colormap: matplotlib colormap. alpha: The alpha blending value, between 0 (transparent) and 1 (opaque) @@ -2606,24 +2776,17 @@ def plot_pjdos_cartdirs_site(self, view="inequivalent", units="eV", stacked=True or scalar e.g. ``left``. If left (right) is None, default values are used ax_list: List of |matplotlib-Axes| or None if a new figure should be created. fontsize: Legend and title fontsize. + verbose: Verbosity level. Returns: |matplotlib-Figure| """ # Define num_plots and ax2atom depending on view. factor = abu.phfactor_ev2units(units) - natom, ntypat = len(self.structure), self.structure.ntypesp + #natom, ntypat = len(self.structure), self.structure.ntypesp lw = kwargs.pop("lw", 2) - if view == "all" or natom == 1: - iatom_list = np.arange(natom) - - elif view == "inequivalent": - print("Calling spglib to find inequivalent sites.") - print("Note that `symafm` magnetic symmetries (if any) are not taken into account.") - ea = self.structure.spget_equivalent_atoms(printout=True) - iatom_list = ea.irred_pos - else: - raise ValueError("Wrong value for view: %s" % str(view)) + # Select atoms. + aview = self._get_atomview(view, verbose=verbose) # Three rows for each cartesian direction. # Each row shows the contribution of each site + Total PH DOS. @@ -2648,10 +2811,10 @@ def plot_pjdos_cartdirs_site(self, view="inequivalent", units="eV", stacked=True # Plot Type projected DOSes along cartesian direction idir cumulative = np.zeros(len(self.wmesh)) - for iatom in iatom_list: + for iatom in aview.iatom_list: site = self.structure[iatom] symbol = str(site) - color = cmap(float(iatom) / (len(iatom_list) - 1)) + color = cmap(float(iatom) / max((len(aview.iatom_list) - 1), 1)) yy = pjdos_atdir[iatom, idir] / factor if not stacked: @@ -2675,6 +2838,14 @@ def yield_figs(self, **kwargs): # pragma: no cover units = kwargs.get("units", "mev") yield self.phdos.plot(units=units, show=False) yield self.plot_pjdos_type(units=units, show=False) + # Old formats do not have MSQDOS arrays. + try: + msqd_dos = self.msqd_dos + except Exception: + msqd_dos = None + if msqd_dos is not None: + yield msqd_dos.plot(units=units, show=False) + yield msqd_dos.plot_tensor(show=False) def write_notebook(self, nbpath=None): """ @@ -2690,6 +2861,10 @@ def write_notebook(self, nbpath=None): nbv.new_code_cell("ncfile.plot_pjdos_type();"), nbv.new_code_cell("ncfile.plot_pjdos_cartdirs_type(units='meV', stacked=True);"), nbv.new_code_cell("ncfile.plot_pjdos_cartdirs_site(view='inequivalent', units='meV', stacked=True);"), + # TODO + #msqd_dos = self.msqd_dos + #msqd_dos.plot(units=self.units, show=False) + #msqd_dos.plot_tensor(show=False) ]) return self._write_nb_nbpath(nb, nbpath) @@ -2728,7 +2903,8 @@ def phbands_gridplot(phb_objects, titles=None, phdos_objects=None, phdos_kwargs= titles: List of strings with the titles to be added to the subplots. phdos_kwargs: optional dictionary with the options passed to ``get_phdos`` to compute the phonon DOS. Used only if ``phdos_objects`` is not None. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. width_ratios: Ratio between the width of the phonon band plots and the DOS plots. Used if `phdos_objects` is not None fontsize: legend and title fontsize. @@ -2790,7 +2966,7 @@ def phbands_gridplot(phb_objects, titles=None, phdos_objects=None, phdos_kwargs= def dataframe_from_phbands(phbands_objects, index=None, with_spglib=True): """ - Build a pandas dataframe with the most important results available in a list of band structures. + Build pandas dataframe with the most important results available in a list of band structures. Args: phbands_objects: List of objects that can be converted to phonon bands objects.. @@ -2949,27 +3125,6 @@ def add_phbands(self, label, bands, phdos=None, dos=None, phdos_kwargs=None): if phdos is not None: self.phdoses_dict[label] = PhononDos.as_phdos(phdos, phdos_kwargs) - #def bands_statdiff(self, ref=0): - # """ - # Compare the reference bands with index ref with the other bands stored in the plotter. - # """ - # for i, label in enumerate(self._bands_dict.keys()): - # if i == ref: - # ref_label = label - # break - # else: - # raise ValueError("ref index %s is > number of bands" % ref) - - # ref_bands = self._bands_dict[ref_label] - - # text = [] - # for label, bands in self._bands_dict.items(): - # if label == ref_label: continue - # stat = ref_bands.statdiff(bands) - # text.append(str(stat)) - - # return "\n\n".join(text) - @add_fig_kwargs def combiplot(self, qlabels=None, units='eV', ylims=None, width_ratios=(2, 1), fontsize=8, linestyle_dict=None, **kwargs): @@ -2978,7 +3133,8 @@ def combiplot(self, qlabels=None, units='eV', ylims=None, width_ratios=(2, 1), f Use ``gridplot`` to plot band structures on different figures. Args: - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. qlabels: dictionary whose keys are tuples with the reduced coordinates of the k-points. The values are the labels e.g. ``klabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``. ylims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` @@ -3019,7 +3175,7 @@ def combiplot(self, qlabels=None, units='eV', ylims=None, width_ratios=(2, 1), f i = -1 nqpt_list = [phbands.nqpt for phbands in self._bands_dict.values()] if any(nq != nqpt_list[0] for nq in nqpt_list): - cprint("WARNING: Bands have different number of k-points:\n%s" % str(nqpt_list), "yellow") + cprint("WARNING combiblot: Bands have different number of k-points:\n%s" % str(nqpt_list), "yellow") for (label, phbands), lineopt in zip(self._bands_dict.items(), self.iter_lineopt()): i += 1 @@ -3070,7 +3226,8 @@ def gridplot(self, with_dos=True, units="eV", fontsize=8, **kwargs): Plot multiple phonon bandstructures and optionally DOSes on a grid. Args: - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. with_dos: True to plot phonon DOS (if available). fontsize: legend and title fontsize. @@ -3082,10 +3239,12 @@ def gridplot(self, with_dos=True, units="eV", fontsize=8, **kwargs): if self.phdoses_dict and with_dos: phdos_objects = list(self.phdoses_dict.values()) - return phbands_gridplot(phb_objects, titles=titles, phdos_objects=phdos_objects, units=units, fontsize=fontsize, show=False) + return phbands_gridplot(phb_objects, titles=titles, phdos_objects=phdos_objects, + units=units, fontsize=fontsize, show=False) @add_fig_kwargs - def gridplot_with_hue(self, hue, with_dos=False, units="eV", width_ratios=(2, 1), ylims=None, fontsize=8, **kwargs): + def gridplot_with_hue(self, hue, with_dos=False, units="eV", width_ratios=(2, 1), + ylims=None, fontsize=8, **kwargs): """ Plot multiple phonon bandstructures and optionally DOSes on a grid. Group results by ``hue``. @@ -3101,7 +3260,8 @@ def gridplot_with_hue(self, hue, with_dos=False, units="eV", width_ratios=(2, 1) Dot notation is also supported e.g. hue="structure.formula" --> abifile.structure.formula If callable, the output of hue(phbands) is used. with_dos: True to plot phonon DOS (if available). - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. width_ratios: Ratio between the width of the fatbands plots and the DOS plots. Used if plotter has PH DOSes is not None ylims: Set the data limits for the y-axis. Accept tuple e.g. `(left, right)` @@ -3117,17 +3277,17 @@ def gridplot_with_hue(self, hue, with_dos=False, units="eV", width_ratios=(2, 1) if self.phdoses_dict and with_dos: all_phdos_objects = list(self.phdoses_dict.values()) - from abipy.tools import sort_and_groupby, getattrd, hasattrd - # Need index to handle all_phdos_objects if DOSes are wanted. if callable(hue): items = [(hue(phb), phb, i, label) for i, (phb, label) in enumerate(zip(all_phb_objects, all_labels))] else: # Assume string. Either phbands.hue or phbands.params[hue]. - if hasattrd(all_phb_objects[0], hue): - items = [(getattrd(phb, hue), phb, i, label) for i, (phb, label) in enumerate(zip(all_phb_objects, all_labels))] + if duck.hasattrd(all_phb_objects[0], hue): + items = [(duck.getattrd(phb, hue), phb, i, label) + for i, (phb, label) in enumerate(zip(all_phb_objects, all_labels))] else: - items = [(phb.params[hue], phb, i, label) for i, (phb, label) in enumerate(zip(all_phb_objects, all_labels))] + items = [(phb.params[hue], phb, i, label) + for i, (phb, label) in enumerate(zip(all_phb_objects, all_labels))] # Group items by hue value. hvalues, groups = sort_and_groupby(items, key=lambda t: t[0], ret_lists=True) @@ -3216,7 +3376,8 @@ def boxplot(self, mode_range=None, units="eV", swarm=False, **kwargs): Args: mode_range: Only bands such as ``mode_range[0] <= nu_index < mode_range[1]`` are included in the plot. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. swarm: True to show the datapoints on top of the boxes kwargs: Keywork arguments passed to seaborn_ boxplot. """ @@ -3247,7 +3408,8 @@ def combiboxplot(self, mode_range=None, units="eV", swarm=False, ax=None, **kwar Args: mode_range: Only bands such as ``mode_range[0] <= nu_index < mode_range[1]`` are included in the plot. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. swarm: True to show the datapoints on top of the boxes ax: |matplotlib-Axes| or None if a new figure should be created. kwargs: Keyword arguments passed to seaborn_ boxplot. @@ -3284,7 +3446,7 @@ def combiboxplot(self, mode_range=None, units="eV", swarm=False, ax=None, **kwar def plot_phdispl(self, qpoint, **kwargs): """ Plot vertical bars with the contribution of the different atomic types to the phonon displacements - at a given q-point. One panel for all phbands stored in the plotter. + at a given q-point. One panel for all |PhononBands| stored in the plotter. Args: qpoint: integer, vector of reduced coordinates or |Kpoint| object. @@ -3313,10 +3475,11 @@ def animate(self, interval=500, savefile=None, units="eV", width_ratios=(2, 1), Args: interval: draws a new frame every interval milliseconds. savefile: Use e.g. 'myanimation.mp4' to save the animation in mp4 format. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. width_ratios: Ratio between the band structure plot and the dos plot. Used when there are DOS stored in the plotter. - show: True if the animation should be shown immediately + show: True if the animation should be shown immediately. Returns: Animation object. @@ -3397,6 +3560,11 @@ def _repr_html_(self): """Integration with jupyter_ notebooks.""" return self.ipw_select_plot() + def get_panel(self): + """Return tabs with widgets to interact with the |PhononBandsPlotter| file.""" + from abipy.panels.phonons import PhononBandsPlotterPanel + return PhononBandsPlotterPanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current @@ -3429,7 +3597,7 @@ class PhononDosPlotter(NotebookWriter): plotter = PhononDosPlotter() plotter.add_phdos("foo dos", "foo.nc") plotter.add_phdos("bar dos", "bar.nc") - fig = plotter.gridplot() + plotter.gridplot() """ def __init__(self, key_phdos=None, phdos_kwargs=None): self._phdoses_dict = OrderedDict() @@ -3472,7 +3640,8 @@ def combiplot(self, ax=None, units="eV", xlims=None, ylims=None, fontsize=8, **k Args: ax: |matplotlib-Axes| or None if a new figure should be created. - units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. xlims: Set the data limits for the x-axis. Accept tuple e.g. `(left, right)` or scalar e.g. `left`. If left (right) is None, default values are used ylims: y-axis limits. @@ -3518,7 +3687,6 @@ def gridplot(self, units="eV", xlims=None, ylims=None, fontsize=8, **kwargs): titles = list(self._phdoses_dict.keys()) phdos_list = list(self._phdoses_dict.values()) - import matplotlib.pyplot as plt nrows, ncols = 1, 1 numeb = len(phdos_list) if numeb > 1: @@ -3659,463 +3827,6 @@ def write_notebook(self, nbpath=None): return self._write_nb_nbpath(nb, nbpath) -class NonAnalyticalPh(Has_Structure): - """ - Phonon data at gamma including non analytical contributions - Read from anaddb.nc - """ - - def __init__(self, structure, directions, phfreqs, phdispl_cart, amu=None): - """ - Args: - structure: |Structure| object. - directions: Cartesian directions along which the non analytical frequencies have been calculated - phfreqs: Phonon frequencies with non analytical contribution in eV along directions - phdispl_cart: Displacement in Angstrom in Cartesian coordinates with non analytical contribution - along directions - amu: dictionary that associates the atomic species present in the structure to the values of the atomic - mass units used for the calculation - """ - self._structure = structure - self.directions = directions - self.phfreqs = phfreqs - self.phdispl_cart = phdispl_cart - self.amu = amu - self.amu_symbol = None - if amu is not None: - self.amu_symbol = {} - for z, m in amu.items(): - el = Element.from_Z(int(z)) - self.amu_symbol[el.symbol] = m - - @classmethod - def from_file(cls, filepath): - """ - Reads the non analytical directions, frequencies and displacements from the anaddb.nc file specified. - Non existence of displacements is accepted for compatibility with abinit 8.0.6 - Raises an error if the other values are not present in anaddb.nc. - """ - - with ETSF_Reader(filepath) as r: - directions = r.read_value("non_analytical_directions") - phfreq = r.read_value("non_analytical_phonon_modes") - - #needs a default as the first abinit version including IFCs in the netcdf doesn't have this attribute - phdispl_cart = r.read_value("non_analytical_phdispl_cart", cmode="c", default=None) - - structure = r.read_structure() - - amu_list = r.read_value("atomic_mass_units", default=None) - if amu_list is not None: - # ntypat arrays - atomic_numbers = r.read_value("atomic_numbers") - amu = {at: a for at, a in zip(atomic_numbers, amu_list)} - else: - amu = None - - return cls(structure=structure, directions=directions, phfreqs=phfreq, phdispl_cart=phdispl_cart, amu=amu) - - @lazy_property - def dyn_mat_eigenvect(self): - """ - [ndirection, 3*natom, 3*natom] array with the orthonormal eigenvectors of the dynamical matrix. - in Cartesian coordinates. - """ - return get_dyn_mat_eigenvec(self.phdispl_cart, self.structure, amu=self.amu) - - @property - def structure(self): - """|Structure| object.""" - return self._structure - - def index_direction(self, direction, cartesian=False): - """ - Returns: the index of direction. Raises: `ValueError` if not found. - - Args: - direction: a 3 element list indicating the direction. Can be a generic vector - cartesian: if True the direction are already in cartesian coordinates, if False it - will be converted to match the internal description of the directions. - """ - if not cartesian: - direction = self.structure.lattice.reciprocal_lattice_crystallographic.get_cartesian_coords(direction) - else: - direction = np.array(direction) - direction = direction / np.linalg.norm(direction) - - for i, d in enumerate(self.directions): - d = d / np.linalg.norm(d) - if np.allclose(d, direction): - return i - - raise ValueError("Cannot find direction: `%s` with cartesian: `%s` in non_analytical cartesian directions:\n%s" % - (str(direction), cartesian, str(self.directions))) - - def has_direction(self, direction, cartesian=False): - """ - Checks if the input direction is among those available. - - Args: - direction: a 3 element list indicating the direction. Can be a generic vector - cartesian: if True the direction are already in cartesian coordinates, if False it - will be converted to match the internal description of the directions. - """ - try: - self.index_direction(direction, cartesian=cartesian) - return True - except ValueError: - return False - - -class InteratomicForceConstants(Has_Structure): - """ - The interatomic force constants calculated by anaddb. - Read from anaddb.nc - """ - - def __init__(self, structure, atoms_indices, neighbours_indices, ifc_cart_coord, - ifc_cart_coord_short_range, local_vectors, distances): - """ - Args: - structure: |Structure| object. - atoms_index: List of integers representing the indices in the structure of the analyzed atoms. - neighbours_index: List of integers representing the indices in the structure of the neighbour atoms. - ifc_cart_coord: ifc in Cartesian coordinates - ifc_cart_coord_short_range: short range part of the ifc in Cartesian coordinates - local_vectors: local basis used to determine the ifc_local_coord - """ - self._structure = structure - self.atoms_indices = atoms_indices - self.neighbours_indices = neighbours_indices - self.ifc_cart_coord = ifc_cart_coord - self.ifc_cart_coord_short_range = ifc_cart_coord_short_range - self.local_vectors = local_vectors - self.distances = distances - - @property - def number_of_atoms(self): - """Number of atoms is structure.""" - return len(self.structure) - - @classmethod - def from_file(cls, filepath): - """Create the object from a netcdf_ file.""" - with ETSF_Reader(filepath) as r: - try: - structure = r.read_structure() - atoms_indices = r.read_value("ifc_atoms_indices") - 1 - neighbours_indices = r.read_value("ifc_neighbours_indices") - 1 - distances = r.read_value("ifc_distances") - ifc_cart_coord = r.read_value("ifc_matrix_cart_coord") - ifc_cart_coord_short_range = r.read_value("ifc_matrix_cart_coord_short_range", default=None) - local_vectors = r.read_value("ifc_local_vectors", default=None) - except: - import traceback - msg = traceback.format_exc() - msg += ("Error while trying to read IFCs from file.\n" - "Verify that the required variables are used in anaddb: ifcflag, natifc, atifc, ifcout\n") - raise ValueError(msg) - - return cls(structure=structure, atoms_indices=atoms_indices, neighbours_indices=neighbours_indices, - ifc_cart_coord=ifc_cart_coord, - ifc_cart_coord_short_range=ifc_cart_coord_short_range, local_vectors=local_vectors, - distances=distances) - - @property - def structure(self): - """|Structure| object.""" - return self._structure - - @property - def number_of_neighbours(self): - """Number of neighbouring atoms for which the ifc are present. ifcout in anaddb.""" - return np.shape(self.neighbours_indices)[1] - - @lazy_property - def ifc_cart_coord_ewald(self): - """Ewald part of the ifcs in cartesian coordinates""" - if self.ifc_cart_coord_short_range is None: - return None - else: - return self.ifc_cart_coord-self.ifc_cart_coord_short_range - - @lazy_property - def ifc_local_coord(self): - """Ifcs in local coordinates""" - if self.local_vectors is None: - return None - else: - return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord, self.local_vectors) - - @lazy_property - def ifc_local_coord_short_range(self): - """Short range part of the ifcs in cartesian coordinates""" - if self.local_vectors is None: - return None - else: - return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord_short_range, self.local_vectors) - - @lazy_property - def ifc_local_coord_ewald(self): - """Ewald part of the ifcs in local coordinates""" - return np.einsum("ktli,ktij,ktuj->ktlu", self.local_vectors, self.ifc_cart_coord_ewald, self.local_vectors) - - def _filter_ifc_indices(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): - """ - Internal method that provides the indices of the neighouring atoms in self.neighbours_indices that satisfy - the required conditions. All the arguments are optional. If None the filter will not be applied. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - """ - - if atom_indices is not None and atom_element is not None: - raise ValueError("atom_index and atom_element cannot be specified simultaneously") - - if atom_indices is not None and not isinstance(atom_indices, (list, tuple)): - atom_indices = [atom_indices] - - if atom_element: - atom_indices = self.structure.indices_from_symbol(atom_element) - - if atom_indices is None: - atom_indices = range(len(self.structure)) - - # apply the filter: construct matrices of num_atoms*num_neighbours size, all conditions should be satisfied. - ind = np.where( - (np.tile(np.in1d(self.atoms_indices, atom_indices), [self.number_of_neighbours, 1])).T & - (self.distances > min_dist if min_dist is not None else True) & - (self.distances < max_dist if max_dist is not None else True) & - (np.in1d(self.neighbours_indices, self.structure.indices_from_symbol(neighbour_element)) - .reshape(self.number_of_atoms, self.number_of_neighbours) if neighbour_element is not None else True) - ) - - return ind - - def get_ifc_cartesian(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): - """ - Filters the IFCs in cartesian coordinates - All the arguments are optional. If None the filter will not be applied. - Returns two arrays containing the distances and the corresponding filtered ifcs. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - """ - ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, - neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) - - return self.distances[ind], self.ifc_cart_coord[ind] - - def get_ifc_local(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, max_dist=None): - """ - Filters the IFCs in local coordinates - All the arguments are optional. If None the filter will not be applied. - Returns two arrays containing the distances and the corresponding filtered ifcs. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - """ - if self.local_vectors is None: - raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") - - ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, - neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) - - return self.distances[ind], self.ifc_local_coord[ind] - - def get_plot_ifc(self, ifc, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, - max_dist=None, ax=None, **kwargs): - """ - Plots the specified ifcs, filtered according to the optional arguments. - An array with shape number_of_atoms*number_of_neighbours, so only one of the components of the ifc matrix can - be plotted at a time. - - Args: - ifc: an array with shape number_of_atoms * number_of_neighbours of the ifc that should be plotted - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - ax: |matplotlib-Axes| or None if a new figure should be created. - kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 - - Returns: |matplotlib-Figure| - """ - ax, fig, plt = get_ax_fig_plt(ax=ax) - - ind = self._filter_ifc_indices(atom_indices=atom_indices, atom_element=atom_element, - neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist) - - dist, filtered_ifc = self.distances[ind], ifc[ind] - - if 'color' not in kwargs: - kwargs['color'] = 'blue' - - if 'marker' not in kwargs: - kwargs['marker'] = 'o' - - if 'linewidth' not in kwargs and 'lw' not in kwargs: - kwargs['lw'] = 0 - - ax.set_xlabel('Distance (Bohr)') - ax.set_ylabel(r'IFC (Ha/Bohr$^2$)') - ax.grid(True) - - ax.plot(dist, filtered_ifc, **kwargs) - - return fig - - @add_fig_kwargs - def plot_longitudinal_ifc(self, atom_indices=None, atom_element=None, neighbour_element=None, min_dist=None, - max_dist=None, ax=None, **kwargs): - """ - Plots the total longitudinal ifcs in local coordinates, filtered according to the optional arguments. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - ax: |matplotlib-Axes| or None if a new figure should be created. - kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 - - Returns: |matplotlib-Figure| - """ - if self.local_vectors is None: - raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") - - return self.get_plot_ifc(self.ifc_local_coord[:, :, 0, 0], atom_indices=atom_indices, atom_element=atom_element, - neighbour_element=neighbour_element, min_dist=min_dist, max_dist=max_dist, ax=ax, **kwargs) - - @add_fig_kwargs - def plot_longitudinal_ifc_short_range(self, atom_indices=None, atom_element=None, neighbour_element=None, - min_dist=None, max_dist=None, ax=None, **kwargs): - """ - Plots the short range longitudinal ifcs in local coordinates, filtered according to the optional arguments. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - ax: |matplotlib-Axes| or None if a new figure should be created. - kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 - - Returns: |matplotlib-Figure| - """ - if self.local_vectors is None: - raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") - - if self.ifc_local_coord_short_range is None: - raise ValueError("Ewald contribution is missing, Run anaddb with dipdip=1") - - return self.get_plot_ifc(self.ifc_local_coord_short_range[:, :, 0, 0], atom_indices=atom_indices, - atom_element=atom_element, neighbour_element=neighbour_element, min_dist=min_dist, - max_dist=max_dist, ax=ax, **kwargs) - - @add_fig_kwargs - def plot_longitudinal_ifc_ewald(self, atom_indices=None, atom_element=None, neighbour_element=None, - min_dist=None, max_dist=None, ax=None, **kwargs): - """ - Plots the Ewald part of the ifcs in local coordinates, filtered according to the optional arguments. - - Args: - atom_indices: a list of atom indices in the structure. Only neighbours of these atoms will be considered. - atom_element: symbol of an element in the structure. Only neighbours of these atoms will be considered. - neighbour_element: symbol of an element in the structure. Only neighbours of this specie will be considered. - min_dist: minimum distance between atoms and neighbours. - max_dist: maximum distance between atoms and neighbours. - ax: |matplotlib-Axes| or None if a new figure should be created. - kwargs: kwargs passed to the matplotlib function 'plot'. Color defaults to blue, symbol to 'o' and lw to 0 - - Returns: |matplotlib-Figure| - """ - if self.local_vectors is None: - raise ValueError("Local coordinates are missing. Run anaddb with ifcana=1") - - if self.ifc_local_coord_ewald is None: - raise ValueError("Ewald contribution is missing, Run anaddb with dipdip=1") - - return self.get_plot_ifc(self.ifc_local_coord_ewald[:, :, 0, 0], atom_indices=atom_indices, - atom_element=atom_element, neighbour_element=neighbour_element, min_dist=min_dist, - max_dist=max_dist, ax=ax, **kwargs) - - -# TODO: amu should become mandatory. -def get_dyn_mat_eigenvec(phdispl, structure, amu=None): - """ - Converts the phonon displacements to the orthonormal eigenvectors of the dynamical matrix. - Small discrepancies with the original values may be expected due to the different values of the atomic masses in - abinit and pymatgen. - - .. note:: - - These eigenvectors are orthonormalized and should be very close to the ones computed by Abinit in a.u. - Note, however, that the output vectors are given in atomic units so dividing then by the sqrt(Mass) - won't give the dipl_cart used in PhononBands that are in Angstrom. - - Args: - phdispl: a numpy array containing the displacements in cartesian coordinates. The last index should have - size 3*(num atoms), but the rest of the shape is arbitrary. If qpts is not None the first dimension - should match the q points. - structure: |Structure| object. - amu: dictionary that associates the atomic numbers present in the structure to the values of the atomic - mass units used for the calculation. If None, values from pymatgen will be used. Note that this will - almost always lead to inaccuracies in the conversion. - - Returns: - A |numpy-array| of the same shape as phdispl containing the eigenvectors of the dynamical matrix - """ - eigvec = np.zeros(np.shape(phdispl), dtype=np.complex) - - if amu is None: - warnings.warn("get_dyn_mat_eigenvec has been called with amu=None. Eigenvectors may not be orthonormal.") - amu = {e.number: e.atomic_mass for e in structure.composition.elements} - - for j, a in enumerate(structure): - eigvec[...,3*j:3*(j+1)] = phdispl[...,3*j:3*(j+1)] * np.sqrt(amu[a.specie.number]*abu.amu_emass) / abu.Bohr_Ang - - return eigvec - - -def match_eigenvectors(v1, v2): - """ - Given two list of vectors, returns the pair matching based on the complex scalar product. - Returns the indices of the second list that match the vectors of the first list in ascending order. - """ - prod = np.absolute(np.dot(v1, v2.transpose().conjugate())) - - indices = np.zeros(len(v1), dtype=np.int) - missing_v1 = [True] * len(v1) - missing_v2 = [True] * len(v1) - for m in reversed(np.argsort(prod, axis=None)): - i, j = np.unravel_index(m, prod.shape) - if missing_v1[i] and missing_v2[j]: - indices[i] = j - missing_v1[i] = missing_v2[j] = False - if not any(missing_v1): - if any(missing_v2): - raise RuntimeError('Something went wrong in matching vectors: {} {}'.format(v1, v2)) - break - - return indices - - class RobotWithPhbands(object): """ Mixin class for robots associated to files with |PhononBands|. @@ -4133,7 +3844,7 @@ def boxplot_phbands(self, **kwargs): return self.get_phbands_plotter().boxplot(**kwargs) def combiboxplot_phbands(self, **kwargs): - """Wraps combiboxplot method of |ElectronDosPlotter|. kwargs passed to combiboxplot.""" + """Wraps combiboxplot method of |PhononBandsPlotter|. kwargs passed to combiboxplot.""" return self.get_phbands_plotter().combiboxplot(**kwargs) #def combiplot_phdos(self, **kwargs): @@ -4193,6 +3904,7 @@ def get_phbands_code_cells(self, title=None): nbv.new_code_cell("#robot.plot_phdispl(qpoint=(0, 0, 0));"), ] + # TODO: PhdosRobot class PhbstRobot(Robot, RobotWithPhbands): """ @@ -4229,87 +3941,3 @@ def write_notebook(self, nbpath=None): nb.cells.extend(self.get_phbands_code_cells()) return self._write_nb_nbpath(nb, nbpath) - - -def open_file_phononwebsite(filename, port=8000, - website="http://henriquemiranda.github.io/phononwebsite", - host="localhost", browser=None): # pragma: no cover - """ - Take a file, detect the type and open it on the phonon website - Based on a similar function in - - Args: - filename: file with phonon data in phononwebsite format. - port: Initial port. - website: Website URL - host: localhost name. - browser: Open webpage in ``browser``. Use default if $BROWSER if None. - """ - if filename.endswith(".json"): - filetype = "json" - elif filename.endswith(".yaml"): - filetype = "yaml" - else: - filetype = "rest" - - try: - from http.server import HTTPServer, SimpleHTTPRequestHandler - except ImportError: - from BaseHTTPServer import HTTPServer - # python 2 requires internal implementation - from abipy.tools.SimpleHTTPServer import SimpleHTTPRequestHandler - - # Add CORS header to the website - class CORSRequestHandler (SimpleHTTPRequestHandler): - def end_headers (self): - #self.send_header('Access-Control-Allow-Origin', website) - self.send_header('Access-Control-Allow-Origin', "http://henriquemiranda.github.io") - SimpleHTTPRequestHandler.end_headers(self) - def log_message(self, format, *args): - return - - # Initialize http server thread - print('Starting HTTP server at port %d ...' % port, end=" ") - trial, max_ntrial = 0, 50 - while trial < max_ntrial: - try: - server = HTTPServer(('', port), CORSRequestHandler) - #print("got port:", port) - break - except OSError: - trial += 1 - port += 1 - print(port, end=", ") - else: - raise RuntimeError("Cannot find available port after %s attempts" % max_ntrial) - - # Create threads python - server.url = 'http://{}:{}'.format(host, server.server_port) - from threading import Thread - t = Thread(target=server.serve_forever) - t.daemon = True - t.start() - - # Open website with the file - try: - from urllib.parse import quote - except ImportError: - from urllib import quote - - url_filename = 'http://{}:{}/{}'.format(host, server.server_port, quote(filename)) - url = '%s/phonon.html?%s=%s' % (website, filetype, url_filename) - print("\nOpening URL:", url) - print("Using default browser, if the webpage is not displayed correctly", - "\ntry to change browser either via command line options or directly in the shell with e.g:\n\n" - " export BROWSER=firefox\n") - print('Press Ctrl+C to terminate HTTP server') - import webbrowser - webbrowser.get(browser).open_new_tab(url) - - # Quit application when SIGINT is received - def signal_handler(signal, frame): - sys.exit(0) - - import signal - signal.signal(signal.SIGINT, signal_handler) - signal.pause() \ No newline at end of file diff --git a/abipy/dfpt/phtk.py b/abipy/dfpt/phtk.py new file mode 100644 index 000000000..274ed2ccd --- /dev/null +++ b/abipy/dfpt/phtk.py @@ -0,0 +1,269 @@ +# coding: utf-8 +""" +Phonon Toolkit: This module gathers low-level tools to operate on phonons. +""" +import warnings +import sys +import numpy as np +import abipy.core.abinit_units as abu + +from monty.functools import lazy_property +from pymatgen.core.periodic_table import Element +from abipy.core.mixins import Has_Structure +from abipy.iotools import ETSF_Reader + + +# TODO: amu should become mandatory. +def get_dyn_mat_eigenvec(phdispl, structure, amu=None, amu_symbol=None): + """ + Converts the phonon displacements to the orthonormal eigenvectors of the dynamical matrix. + Small discrepancies with the original values may be expected due to the different values of the atomic masses in + abinit and pymatgen. + + .. note:: + + These eigenvectors are orthonormalized and should be very close to the ones computed by Abinit in a.u. + Note, however, that the output vectors are given in atomic units so dividing then by the sqrt(Mass) + won't give the dipl_cart used in PhononBands that are in Angstrom. + + Args: + phdispl: a numpy array containing the displacements in cartesian coordinates. The last index should have + size 3*(num atoms), but the rest of the shape is arbitrary. If qpts is not None the first dimension + should match the q points. + structure: |Structure| object. + amu: dictionary that associates the atomic numbers present in the structure to the values of the atomic + mass units used for the calculation. Incompatible with amu_sumbol. If None and amu_symbol is None, values + from pymatgen will be used. Note that this will almost always lead to inaccuracies in the conversion. + amu_symbol: dictionary that associates the symbol present in the structure to the values of the atomic + mass units used for the calculation. Incompatible with amu. If None and amu_symbol is None, values from + pymatgen will be used. that this will almost always lead to inaccuracies in the conversion. + + Returns: + A |numpy-array| of the same shape as phdispl containing the eigenvectors of the dynamical matrix + """ + eigvec = np.zeros(np.shape(phdispl), dtype=np.complex) + + if amu is not None and amu_symbol is not None: + raise ValueError("Only one between amu and amu_symbol should be provided!") + + if amu is not None: + amu_symbol = {Element.from_Z(n).symbol: v for n, v in amu.items()} + + if amu_symbol is None: + warnings.warn("get_dyn_mat_eigenvec has been called with amu=None. Eigenvectors may not be orthonormal.") + amu_symbol = {e.symbol: e.atomic_mass for e in structure.composition.elements} + + for j, a in enumerate(structure): + eigvec[...,3*j:3*(j+1)] = phdispl[...,3*j:3*(j+1)] * np.sqrt(amu_symbol[a.specie.symbol]*abu.amu_emass) / abu.Bohr_Ang + + return eigvec + + +def match_eigenvectors(v1, v2): + """ + Given two list of vectors, returns the pair matching based on the complex scalar product. + Returns the indices of the second list that match the vectors of the first list in ascending order. + """ + prod = np.absolute(np.dot(v1, v2.transpose().conjugate())) + + indices = np.zeros(len(v1), dtype=np.int) + missing_v1 = [True] * len(v1) + missing_v2 = [True] * len(v1) + for m in reversed(np.argsort(prod, axis=None)): + i, j = np.unravel_index(m, prod.shape) + if missing_v1[i] and missing_v2[j]: + indices[i] = j + missing_v1[i] = missing_v2[j] = False + if not any(missing_v1): + if any(missing_v2): + raise RuntimeError('Something went wrong in matching vectors: {} {}'.format(v1, v2)) + break + + return indices + + +class NonAnalyticalPh(Has_Structure): + """ + Phonon data at gamma including non analytical contributions + Read from anaddb.nc + """ + + def __init__(self, structure, directions, phfreqs, phdispl_cart, amu=None): + """ + Args: + structure: |Structure| object. + directions: Cartesian directions along which the non analytical frequencies have been calculated + phfreqs: Phonon frequencies with non analytical contribution in eV along directions + phdispl_cart: Displacement in Angstrom in Cartesian coordinates with non analytical contribution + along directions + amu: dictionary that associates the atomic species present in the structure to the values of the atomic + mass units used for the calculation + """ + self._structure = structure + self.directions = directions + self.phfreqs = phfreqs + self.phdispl_cart = phdispl_cart + self.amu = amu + self.amu_symbol = None + if amu is not None: + self.amu_symbol = {} + for z, m in amu.items(): + el = Element.from_Z(int(z)) + self.amu_symbol[el.symbol] = m + + @classmethod + def from_file(cls, filepath): + """ + Reads the non analytical directions, frequencies and displacements from the anaddb.nc file specified. + Non existence of displacements is accepted for compatibility with abinit 8.0.6 + Raises an error if the other values are not present in anaddb.nc. + """ + with ETSF_Reader(filepath) as r: + directions = r.read_value("non_analytical_directions") + phfreq = r.read_value("non_analytical_phonon_modes") + + # need a default as the first abinit version including IFCs in the netcdf doesn't have this attribute + phdispl_cart = r.read_value("non_analytical_phdispl_cart", cmode="c", default=None) + + structure = r.read_structure() + + amu_list = r.read_value("atomic_mass_units", default=None) + if amu_list is not None: + # ntypat arrays + atomic_numbers = r.read_value("atomic_numbers") + amu = {at: a for at, a in zip(atomic_numbers, amu_list)} + else: + amu = None + + return cls(structure=structure, directions=directions, phfreqs=phfreq, phdispl_cart=phdispl_cart, amu=amu) + + @lazy_property + def dyn_mat_eigenvect(self): + """ + [ndirection, 3*natom, 3*natom] array with the orthonormal eigenvectors of the dynamical matrix. + in Cartesian coordinates. + """ + return get_dyn_mat_eigenvec(self.phdispl_cart, self.structure, amu=self.amu) + + @property + def structure(self): + """|Structure| object.""" + return self._structure + + def index_direction(self, direction, cartesian=False): + """ + Returns: the index of direction. Raises: `ValueError` if not found. + + Args: + direction: a 3 element list indicating the direction. Can be a generic vector + cartesian: if True the direction are already in cartesian coordinates, if False it + will be converted to match the internal description of the directions. + """ + if not cartesian: + direction = self.structure.lattice.reciprocal_lattice_crystallographic.get_cartesian_coords(direction) + else: + direction = np.array(direction) + direction = direction / np.linalg.norm(direction) + + for i, d in enumerate(self.directions): + d = d / np.linalg.norm(d) + if np.allclose(d, direction): + return i + + raise ValueError("Cannot find direction: `%s` with cartesian: `%s` in non_analytical cartesian directions:\n%s" % + (str(direction), cartesian, str(self.directions))) + + def has_direction(self, direction, cartesian=False): + """ + Checks if the input direction is among those available. + + Args: + direction: a 3 element list indicating the direction. Can be a generic vector + cartesian: if True the direction are already in cartesian coordinates, if False it + will be converted to match the internal description of the directions. + """ + try: + self.index_direction(direction, cartesian=cartesian) + return True + except ValueError: + return False + + +def open_file_phononwebsite(filename, port=8000, + website="http://henriquemiranda.github.io/phononwebsite", + host="localhost", browser=None): # pragma: no cover + """ + Take a file, detect the type and open it on the phonon website + Based on a similar function in + + Args: + filename: file with phonon data in phononwebsite format. + port: Initial port. + website: Website URL + host: localhost name. + browser: Open webpage in ``browser``. Use default if $BROWSER if None. + """ + if filename.endswith(".json"): + filetype = "json" + elif filename.endswith(".yaml"): + filetype = "yaml" + else: + filetype = "rest" + + from http.server import HTTPServer, SimpleHTTPRequestHandler + + # Add CORS header to the website + class CORSRequestHandler(SimpleHTTPRequestHandler): + def end_headers(self): + #self.send_header('Access-Control-Allow-Origin', website) + self.send_header('Access-Control-Allow-Origin', "http://henriquemiranda.github.io") + SimpleHTTPRequestHandler.end_headers(self) + + def log_message(self, format, *args): + return + + # Initialize http server thread + print('Starting HTTP server at port %d ...' % port, end=" ") + trial, max_ntrial = 0, 50 + while trial < max_ntrial: + try: + server = HTTPServer(('', port), CORSRequestHandler) + #print("got port:", port) + break + except OSError: + trial += 1 + port += 1 + print(port, end=", ") + else: + raise RuntimeError("Cannot find available port after %s attempts" % max_ntrial) + + # Create threads python + server.url = 'http://{}:{}'.format(host, server.server_port) + from threading import Thread + t = Thread(target=server.serve_forever) + t.daemon = True + t.start() + + # Open website with the file + try: + from urllib.parse import quote + except ImportError: + from urllib import quote + + url_filename = 'http://{}:{}/{}'.format(host, server.server_port, quote(filename)) + url = '%s/phonon.html?%s=%s' % (website, filetype, url_filename) + print("\nOpening URL:", url) + print("Using default browser, if the webpage is not displayed correctly", + "\ntry to change browser either via command line options or directly in the shell with e.g:\n\n" + " export BROWSER=firefox\n") + print('Press Ctrl+C to terminate the HTTP server') + import webbrowser + webbrowser.get(browser).open_new_tab(url) + + def signal_handler(signal, frame): + """Quit application when SIGINT is received""" + sys.exit(0) + + import signal + signal.signal(signal.SIGINT, signal_handler) + signal.pause() diff --git a/abipy/dfpt/qha.py b/abipy/dfpt/qha.py index 0c7eefa07..a32deb4d5 100644 --- a/abipy/dfpt/qha.py +++ b/abipy/dfpt/qha.py @@ -1,43 +1,38 @@ # coding: utf-8 -from __future__ import print_function, division, absolute_import - import numpy as np import os -from scipy.interpolate import UnivariateSpline +import abc +import abipy.core.abinit_units as abu +from scipy.interpolate import UnivariateSpline from monty.collections import dict2namedtuple +from monty.functools import lazy_property from pymatgen.analysis.eos import EOS from abipy.core.func1d import Function1D -from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt from abipy.electrons.gsr import GsrFile -from abipy.dfpt.phonons import PhdosFile, PhononBandsPlotter -import abipy.core.abinit_units as abu - +from abipy.dfpt.ddb import DdbFile +from abipy.dfpt.phonons import PhononBandsPlotter, PhononDos, PhdosFile +from abipy.dfpt.gruneisen import GrunsNcFile -eVA3_GPa = 160.21766208 # 1 eV/A^3 to GPa - -class QHA(object): +class AbstractQHA(metaclass=abc.ABCMeta): """ - Object to extract results in the quasi-harmonic approximation from electronic and phonon calculations - at different volumes. + Abstract class for the quasi-harmonic approximation analysis. Provides some basic methods and plotting utils, plus a converter to write input files for phonopy-qha or to generate an instance of phonopy.qha.QHA. These can be used to obtain other quantities and plots. Does not include electronic entropic contributions for metals. """ - def __init__(self, structures, doses, energies, eos_name='vinet', pressure=0): + def __init__(self, structures, energies, eos_name='vinet', pressure=0): """ Args: structures: list of structures at different volumes. - doses: list of |PhononDos| at volumes corresponding to the structures. energies: list of SCF energies for the structures in eV. eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. pressure: value of the pressure in GPa that will be considered in the p*V contribution to the energy. """ - self.structures = structures - self.doses = doses self.energies = np.array(energies) self.eos = EOS(eos_name) self.pressure = pressure @@ -45,14 +40,6 @@ def __init__(self, structures, doses, energies, eos_name='vinet', pressure=0): self.volumes = np.array([s.volume for s in structures]) self.iv0 = np.argmin(energies) - @property - def nvols(self): - return len(self.volumes) - - @property - def natoms(self): - return len(self.structures[0]) - def fit_energies(self, tstart=0, tstop=800, num=100): """ Performs a fit of the energies as a function of the volume at different temperatures. @@ -73,13 +60,12 @@ def fit_energies(self, tstart=0, tstop=800, num=100): temp: numpy array with the temperatures considered """ - tmesh = np.linspace(tstart, tstop, num) # array with phonon energies and shape (n_vol, n_temp) - ph_energies = np.array([dos.get_free_energy(tstart, tstop, num).values for dos in self.doses]) + ph_energies = self.get_vib_free_energies(tstart, tstop, num) - tot_en = self.energies[np.newaxis, :].T + ph_energies + self.volumes[np.newaxis, :].T * self.pressure / eVA3_GPa + tot_en = self.energies[np.newaxis, :].T + ph_energies + self.volumes[np.newaxis, :].T * self.pressure / abu.eVA3_GPa # list of fits objects, one for each temperature fits = [self.eos.fit(self.volumes, e) for e in tot_en.T] @@ -90,40 +76,58 @@ def fit_energies(self, tstart=0, tstop=800, num=100): return dict2namedtuple(tot_en=tot_en, fits=fits, min_en=min_energies, min_vol=min_volumes, temp=tmesh) - def set_eos(self, eos_name): + @abc.abstractmethod + def get_vib_free_energies(self, tstart=0, tstop=800, num=100): """ - Updates the EOS used for the fit. + Generates the vibrational free energy corresponding to all the structures. Args: - eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. - """ + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. - self.eos = EOS(eos_name) + Returns: + A numpy array of `num` values of the vibrational contribution to the free energy + """ - @classmethod - def from_files(cls, gsr_files_paths, phdos_files_paths): + @abc.abstractmethod + def get_thermodynamic_properties(self, tstart=0, tstop=800, num=100): """ - Creates an instance of QHA from a list og GSR files and a list PHDOS.nc files. - The list should have the same size and the volumes should match. + Generates all the thermodynamic properties corresponding to all the volumes. Args: - gsr_files_paths: list of paths to GSR files - phdos_files_paths: list of paths to PHDOS.nc files + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. Returns: - A new instance of QHA + `namedtuple` with the following attributes for all the volumes: + + tmesh: numpy array with the list of temperatures. Shape (num). + cv: constant-volume specific heat, in eV/K. Shape (nvols, num). + free_energy: free energy, in eV. Shape (nvols, num). + entropy: entropy, in eV/K. Shape (nvols, num). + zpe: zero point energy in eV. Shape (nvols). """ - energies = [] - structures = [] - for gp in gsr_files_paths: - with GsrFile.from_file(gp) as g: - energies.append(g.energy) - structures.append(g.structure) + @property + def nvols(self): + """Number of volumes""" + return len(self.volumes) - doses = [PhdosFile(dp).phdos for dp in phdos_files_paths] + @property + def natoms(self): + """Number of atoms in the unit cell.""" + return len(self.structures[0]) - return cls(structures, doses, energies) + def set_eos(self, eos_name): + """ + Set the EOS model used for the fit. + + Args: + eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. + """ + self.eos = EOS(eos_name) @add_fig_kwargs def plot_energies(self, tstart=0, tstop=800, num=10, ax=None, **kwargs): @@ -138,7 +142,6 @@ def plot_energies(self, tstart=0, tstop=800, num=10, ax=None, **kwargs): Returns: |matplotlib-Figure| """ - f = self.fit_energies(tstart, tstop, num) ax, fig, plt = get_ax_fig_plt(ax) @@ -149,7 +152,7 @@ def plot_energies(self, tstart=0, tstop=800, num=10, ax=None, **kwargs): ax.scatter(self.volumes, e, label=t, color='b', marker='x', s=5) ax.plot(x, fit.func(x) - self.energies[self.iv0], color='b', lw=1) - ax.plot(f.min_vol, f.min_en - self.energies[self.iv0] , color='r', lw=1, marker='x', ms=5) + ax.plot(f.min_vol, f.min_en - self.energies[self.iv0], color='r', lw=1, marker='x', ms=5) ax.set_xlabel(r'V (${\AA}^3$)') ax.set_ylabel('E (eV)') @@ -168,7 +171,6 @@ def get_thermal_expansion_coeff(self, tstart=0, tstop=800, num=100): Returns: |Function1D| """ - f = self.fit_energies(tstart, tstop, num) dt = f.temp[1] - f.temp[0] @@ -189,7 +191,6 @@ def plot_thermal_expansion_coeff(self, tstart=0, tstop=800, num=100, ax=None, ** Returns: |matplotlib-Figure| """ - ax, fig, plt = get_ax_fig_plt(ax) if 'linewidth' not in kwargs and 'lw' not in kwargs: @@ -203,9 +204,9 @@ def plot_thermal_expansion_coeff(self, tstart=0, tstop=800, num=100, ax=None, ** ax.plot(alpha.mesh, alpha.values, **kwargs) ax.set_xlabel(r'T (K)') ax.set_ylabel(r'$\alpha$ (K$^{-1}$)') + ax.grid(True) ax.set_xlim(tstart, tstop) - ax.get_yaxis().get_major_formatter().set_powerlimits((0, 0)) return fig @@ -213,7 +214,7 @@ def plot_thermal_expansion_coeff(self, tstart=0, tstop=800, num=100, ax=None, ** @add_fig_kwargs def plot_vol_vs_t(self, tstart=0, tstop=800, num=100, ax=None, **kwargs): """ - Plots the volume as a function of the temperature. + Plot the volume as a function of the temperature. Args: tstart: The starting value (in Kelvin) of the temperature mesh. @@ -235,8 +236,8 @@ def plot_vol_vs_t(self, tstart=0, tstop=800, num=100, ax=None, **kwargs): ax.plot(f.temp, f.min_vol, **kwargs) ax.set_xlabel('T (K)') ax.set_ylabel(r'V (${\AA}^3$)') - ax.set_xlim(tstart, tstop) + ax.grid(True) return fig @@ -257,7 +258,6 @@ def plot_phbs(self, phbands, temperatures=None, t_max=1000, colormap="plasma", * Returns: |matplotlib-Figure| """ - if temperatures is None: tv = self.get_t_for_vols([b.structure.volume for b in phbands], t_max=t_max) temperatures = [] @@ -280,15 +280,6 @@ def plot_phbs(self, phbands, temperatures=None, t_max=1000, colormap="plasma", * fig = pbp.combiplot(show=False, **kwargs) - # ax, fig, plt = get_ax_fig_plt(ax) - # cmap = plt.get_cmap(colormap) - # for b, t in zip(phbands, temperatures): - # color = cmap(t / max(temperatures)) - # b.plot(ax=ax, units=units, match_bands=True, show=False, color=color, label="") - # ax.lines[-1].set_label("{%d} K".format(t)) - # - # ax.legend(loc="best") - return fig def get_vol_at_t(self, t): @@ -296,12 +287,11 @@ def get_vol_at_t(self, t): Calculates the volume corresponding to a specific temperature. Args: - t: a temperature in K + t: temperature in K Returns: The volume """ - f = self.fit_energies(t, t, 1) return f.min_vol[0] @@ -321,11 +311,9 @@ def get_t_for_vols(self, vols, t_max=1000): A list of lists of temperatures. For each volume more than one temperature can be identified. """ - if not isinstance(vols, (list, tuple, np.ndarray)): vols = [vols] - f = self.fit_energies(0, t_max, t_max+1) temps = [] @@ -347,15 +335,16 @@ def write_phonopy_qha_inputs(self, tstart=0, tstop=2100, num=211, path=None): num: int, optional Number of samples to generate. Default is 211. path: a path to a folder where the files will be stored """ - if path is None: path = os.getcwd() + thermo = self.get_thermodynamic_properties(tstart=tstart, tstop=tstop, num=num) + np.savetxt(os.path.join(path, 'e-v.dat'), np.array([self.volumes, self.energies]).T, fmt='%.10f') # generator for thermal_properties.yaml extracted from phonopy: # phonopy.phonon.thermal_properties.ThermalProperties._get_tp_yaml_lines - for j, d in enumerate(self.doses): + for j in range(self.nvols): lines = [] lines.append("# Thermal properties / unit cell (natom)") lines.append("") @@ -371,25 +360,25 @@ def write_phonopy_qha_inputs(self, tstart=0, tstop=2100, num=211, path=None): lines.append("num_integrated_modes: %d" % (3 * self.natoms)) lines.append("") - lines.append("zero_point_energy: %15.7f" % (d.zero_point_energy * abu.e_Cb * abu.Avogadro )) + lines.append("zero_point_energy: %15.7f" % (thermo.zpe[j] * abu.e_Cb * abu.Avogadro)) lines.append("high_T_entropy: %15.7f" % 0) # high_T_entropy is not used in QHA lines.append("") lines.append("thermal_properties:") - fe = d.get_free_energy(tstart, tstop, num) * abu.e_Cb * abu.Avogadro - entropy = d.get_entropy(tstart, tstop, num) * abu.e_Cb * abu.Avogadro - cv = d.get_cv(tstart, tstop, num) * abu.e_Cb * abu.Avogadro - temperatures = cv.mesh + fe = thermo.free_energy[j] * abu.e_Cb * abu.Avogadro + entropy = thermo.entropy[j] * abu.e_Cb * abu.Avogadro + cv = thermo.cv[j] * abu.e_Cb * abu.Avogadro + temperatures = thermo.tmesh for i, t in enumerate(temperatures): lines.append("- temperature: %15.7f" % t) - lines.append(" free_energy: %15.7f" % (fe.values[i] / 1000)) - lines.append(" entropy: %15.7f" % entropy.values[i]) + lines.append(" free_energy: %15.7f" % (fe[i] / 1000)) + lines.append(" entropy: %15.7f" % entropy[i]) # Sometimes 'nan' of C_V is returned at low temperature. - if np.isnan(cv.values[i]): + if np.isnan(cv[i]): lines.append(" heat_capacity: %15.7f" % 0) else: - lines.append(" heat_capacity: %15.7f" % cv.values[i]) + lines.append(" heat_capacity: %15.7f" % cv[i]) lines.append(" energy: %15.7f" % - (fe.values[i] / 1000 + entropy.values[i] * t / 1000)) + (fe[i] / 1000 + entropy[i] * t / 1000)) lines.append("") @@ -416,24 +405,631 @@ def get_phonopy_qha(self, tstart=0, tstop=2100, num=211, eos='vinet', t_max=None Returns: An instance of phonopy.qha.QHA """ - try: from phonopy.qha import QHA as QHA_phonopy except ImportError as exc: print("Phonopy is required to generate the QHA phonopy object") raise exc - fe = np.zeros((num, self.nvols)) - entropy = np.zeros((num, self.nvols)) - cv = np.zeros((num, self.nvols)) - for j, d in enumerate(self.doses): - fe[:,j] = (d.get_free_energy(tstart, tstop, num) * abu.e_Cb * abu.Avogadro / 1000).values - entropy[:,j] = (d.get_entropy(tstart, tstop, num) * abu.e_Cb * abu.Avogadro).values - cv[:,j] = (d.get_cv(tstart, tstop, num) * abu.e_Cb * abu.Avogadro).values - temperatures = self.doses[0].get_cv(tstart, tstop, num).mesh + thermo = self.get_thermodynamic_properties(tstart=tstart, tstop=tstop, num=num) - en = self.energies + self.volumes * self.pressure / eVA3_GPa + fe = thermo.free_energy.T * abu.e_Cb * abu.Avogadro / 1000 + entropy = thermo.entropy.T * abu.e_Cb * abu.Avogadro + cv = thermo.cv.T * abu.e_Cb * abu.Avogadro + temperatures = thermo.tmesh + + en = self.energies + self.volumes * self.pressure / abu.eVA3_GPa qha_p = QHA_phonopy(self.volumes, en, temperatures, cv, entropy, fe, eos, t_max, energy_plot_factor) - return qha_p \ No newline at end of file + return qha_p + + +class QHA(AbstractQHA): + """ + Object to extract results in the quasi-harmonic approximation from electronic and phonon calculations + at different volumes. + Provides some basic methods and plotting utils, plus a converter to write input files for phonopy-qha or to + generate an instance of phonopy.qha.QHA. These can be used to obtain other quantities and plots. + Does not include electronic entropic contributions for metals. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: QHA + """ + + @classmethod + def from_files(cls, gsr_paths, phdos_paths): + """ + Creates an instance of QHA from a list of GSR files and a list of PHDOS.nc files. + The list should have the same size and the volumes should match. + + Args: + gsr_paths: list of paths to GSR files. + phdos_paths: list of paths to PHDOS.nc files. + + Returns: A new instance of QHA + """ + energies = [] + structures = [] + for gp in gsr_paths: + with GsrFile.from_file(gp) as g: + energies.append(g.energy) + structures.append(g.structure) + + #doses = [PhononDos.as_phdos(dp) for dp in phdos_paths] + + doses = [] + structures_from_phdos = [] + for path in phdos_paths: + with PhdosFile(path) as p: + doses.append(p.phdos) + structures_from_phdos.append(p.structure) + + cls._check_volumes(structures, structures_from_phdos) + + return cls(structures, doses, energies) + + def __init__(self, structures, doses, energies, eos_name='vinet', pressure=0): + """ + Args: + structures: list of structures at different volumes. + doses: list of |PhononDos| at volumes corresponding to the structures. + energies: list of SCF energies for the structures in eV. + eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. + pressure: value of the pressure in GPa that will be considered in the p * V contribution to the energy. + """ + super().__init__(structures=structures, energies=energies, eos_name=eos_name, pressure=pressure) + self.doses = doses + + @staticmethod + def _check_volumes(struct_list1, struct_list2): + + lens = (len(struct_list1), len(struct_list2)) + if lens[0] != lens[1]: + raise RuntimeError("Expecting lists with same number of structures. Got %s" % str(lens)) + vols1 = [s.volume for s in struct_list1] + vols2 = [s.volume for s in struct_list2] + ierr = 0 + for v1, v2 in zip(vols1, vols2): + if abs(v1 - v2) > 1e-3: + ierr += 1 + print("Volume1: %s != Volume2: %s" % (v1, v2)) + + if ierr != 0: + raise RuntimeError("Expecting lists with same volumes!") + + def get_vib_free_energies(self, tstart=0, tstop=800, num=100): + """ + Generates the vibrational free energy from the phonon DOS. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + A numpy array of `num` values of the vibrational contribution to the free energy + """ + f = np.zeros((self.nvols, num)) + + for i, dos in enumerate(self.doses): + f[i] = dos.get_free_energy(tstart, tstop, num).values + + return f + + def get_thermodynamic_properties(self, tstart=0, tstop=800, num=100): + """ + Generates all the thermodynamic properties corresponding to all the volumes using the phonon DOS. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + `namedtuple` with the following attributes for all the volumes: + + tmesh: numpy array with the list of temperatures. Shape (num). + cv: constant-volume specific heat, in eV/K. Shape (nvols, num). + free_energy: free energy, in eV. Shape (nvols, num). + entropy: entropy, in eV/K. Shape (nvols, num). + zpe: zero point energy in eV. Shape (nvols). + """ + tmesh = np.linspace(tstart, tstop, num) + cv = np.zeros((self.nvols, num)) + free_energy = np.zeros((self.nvols, num)) + entropy = np.zeros((self.nvols, num)) + internal_energy = np.zeros((self.nvols, num)) + zpe = np.zeros(self.nvols) + + for i, d in enumerate(self.doses): + cv[i] = d.get_cv(tstart, tstop, num).values + free_energy[i] = d.get_free_energy(tstart, tstop, num).values + entropy[i] = d.get_entropy(tstart, tstop, num).values + zpe[i] = d.zero_point_energy + + return dict2namedtuple(tmesh=tmesh, cv=cv, free_energy=free_energy, entropy=entropy, + zpe=zpe) + + +class QHA3PF(AbstractQHA): + """ + Object to extract results in the quasi-harmonic approximation from several electronic energies at different + volumes and three phonon calculations. + Provides some basic methods and plotting utils, plus a converter to write input files for phonopy-qha or to + generate an instance of phonopy.qha.QHA. These can be used to obtain other quantities and plots. + Does not include electronic entropic contributions for metals. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: QHA3PF + """ + + @classmethod + def from_files(cls, gsr_paths, phdos_paths, ind_doses): + """ + Creates an instance of QHA from a list of GSR files and a list of PHDOS.nc files. + The list should have the same size and the volumes should match. + + Args: + gsr_paths: list of paths to GSR files. + phdos_paths: list of paths to three PHDOS.nc files. + ind_doses: list of three values indicating, for each of the three doses, the index of the + corresponding gsr_file in "gsr_paths". + + Returns: A new instance of QHA + """ + energies = [] + structures = [] + for gp in gsr_paths: + with GsrFile.from_file(gp) as g: + energies.append(g.energy) + structures.append(g.structure) + + doses = [PhononDos.as_phdos(dp) for dp in phdos_paths] + + return cls(structures, doses, energies, ind_doses) + + def __init__(self, structures, doses, energies, ind_doses, eos_name='vinet', pressure=0, fit_degree=2): + """ + Args: + structures: list of structures at different volumes. + doses: list of three |PhononDos| at different volumes corresponding to the some of the structures. + energies: list of SCF energies for the structures in eV. + ind_doses: list of three values indicating, for each of the three doses, the index of the + corresponding structure in "structures". + eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. + pressure: value of the pressure in GPa that will be considered in the p*V contribution to the energy. + """ + super().__init__(structures=structures, energies=energies, eos_name=eos_name, pressure=pressure) + self.doses = doses + self.ind_doses = ind_doses + self.fit_degree = fit_degree + self._ind_energy_only = [i for i in range(len(structures)) if i not in ind_doses] + + def get_thermodynamic_properties(self, tstart=0, tstop=800, num=100): + """ + Generates all the thermodynamic properties corresponding to all the volumes using the phonon DOS. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + `namedtuple` with the following attributes for all the volumes: + + tmesh: numpy array with the list of temperatures. Shape (num). + cv: constant-volume specific heat, in eV/K. Shape (nvols, num). + free_energy: free energy, in eV. Shape (nvols, num). + entropy: entropy, in eV/K. Shape (nvols, num). + zpe: zero point energy in eV. Shape (nvols). + """ + tmesh = np.linspace(tstart, tstop, num) + cv = self._get_thermodynamic_prop("cv", tstart, tstop, num) + free_energy = self._get_thermodynamic_prop("free_energy", tstart, tstop, num) + entropy = self._get_thermodynamic_prop("entropy", tstart, tstop, num) + zpe = np.zeros(self.nvols) + + for i, dos in zip(self.ind_doses, self.doses): + zpe[i] = dos.zero_point_energy + + dos_vols = self.volumes[self.ind_doses] + missing_vols = self.volumes[self._ind_energy_only] + + fit_params = np.polyfit(dos_vols, zpe[self.ind_doses], self.fit_degree) + zpe[self._ind_energy_only] = np.poly1d(fit_params)(missing_vols) + + return dict2namedtuple(tmesh=tmesh, cv=cv, free_energy=free_energy, entropy=entropy, + zpe=zpe) + + def _get_thermodynamic_prop(self, name, tstart, tstop, num): + """ + Helper function to get a generic thermodynamic property for all the volumes. + + Args: + name: name of the property to calculate. Possible values in "internal_energy", + "free_energy", "entropy", "c_v". + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + Numpy array with the values of the thermodynamic properties at the different + volumes with size (nvols, num). + """ + prop_doses = np.array([getattr(dos, "get_" + name)(tstart, tstop, num).values for dos in self.doses]) + + p = np.zeros((self.nvols, num)) + + for i, prop_dos in zip(self.ind_doses, prop_doses): + p[i] = prop_dos + + dos_vols = self.volumes[self.ind_doses] + missing_vols = self.volumes[self._ind_energy_only] + + # generate fit objects from the known dos values + for i_temp in range(num): + fit_params = np.polyfit(dos_vols, prop_doses[:, i_temp], self.fit_degree) + p[self._ind_energy_only, i_temp] = np.poly1d(fit_params)(missing_vols) + + return p + + def get_vib_free_energies(self, tstart=0, tstop=800, num=100): + """ + Generates the vibrational free energy corresponding to all the structures, either from the phonon DOS + or from a fit of the known values. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + A numpy array of `num` values of the vibrational contribution to the free energy + """ + + return self._get_thermodynamic_prop("free_energy", tstart, tstop, num) + + +class QHA3P(AbstractQHA): + """ + Object to extract results in the quasi-harmonic approximation from several electronic energies at different + volumes and three phonon calculations. + Provides some basic methods and plotting utils, plus a converter to write input files for phonopy-qha or to + generate an instance of phonopy.qha.QHA. These can be used to obtain other quantities and plots. + Does not include electronic entropic contributions for metals. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: QHA3P + """ + + @classmethod + def from_files(cls, gsr_paths, grun_file_path, ind_doses): + """ + Creates an instance of QHA from a list of GSR files and a list PHDOS.nc files. + The list should have the same size and the volumes should match. + + Args: + gsr_paths: list of paths to GSR files. + phdos_paths: list of paths to three PHDOS.nc files. + ind_doses: list of three values indicating, for each of the three doses, the index of the + corresponding gsr_file in "gsr_paths". + + Returns: + A new instance of QHA + """ + energies = [] + structures = [] + for gp in gsr_paths: + with GsrFile.from_file(gp) as g: + energies.append(g.energy) + structures.append(g.structure) + + gruns = GrunsNcFile(grun_file_path) + + return cls(structures, gruns, energies, ind_doses) + + def __init__(self, structures, gruns, energies, ind_grun, eos_name='vinet', pressure=0): + """ + Args: + structures: list of structures at different volumes. + doses: list of three |PhononDos| at different volumes corresponding to the some of the structures. + energies: list of SCF energies for the structures in eV. + ind_grun: list of three values indicating, for each of the three doses, the index of the + corresponding structure in "structures". + eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. + pressure: value of the pressure in GPa that will be considered in the p*V contribution to the energy. + """ + + super().__init__(structures=structures, energies=energies, eos_name=eos_name, pressure=pressure) + self.grun = gruns + self.ind_grun = ind_grun + self._ind_energy_only = [i for i in range(len(structures)) if i not in ind_grun] + + def close(self): + """Close files.""" + self.grun.close() + + def get_thermodynamic_properties(self, tstart=0, tstop=800, num=100): + """ + Generates the thermodynamic properties corresponding to all the structures, either from the phonon + frequencies or from a fit of the know values. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + `namedtuple` with the following attributes for all the volumes: + + tmesh: numpy array with the list of temperatures. Shape (num). + cv: constant-volume specific heat, in eV/K. Shape (nvols, num). + free_energy: free energy, in eV. Shape (nvols, num). + entropy: entropy, in eV/K. Shape (nvols, num). + zpe: zero point energy in eV. Shape (nvols). + """ + w = self.fitted_frequencies + + tmesh = np.linspace(tstart, tstop, num) + weights = self.grun.doses['qpoints'].weights + + free_energy = np.zeros((self.nvols, num)) + cv = np.zeros((self.nvols, num)) + entropy = np.zeros((self.nvols, num)) + zpe = np.zeros(self.nvols) + + for i in range(self.nvols): + free_energy[i] = [get_free_energy(w[i], weights, t) for t in tmesh] + cv[i] = [get_cv(w[i], weights, t) for t in tmesh] + entropy[i] = [get_entropy(w[i], weights, t) for t in tmesh] + zpe[i] = get_zero_point_energy(w, weights) + + return dict2namedtuple(tmesh=tmesh, cv=cv, free_energy=free_energy, entropy=entropy, + zpe=zpe) + + @lazy_property + def fitted_frequencies(self): + """ + A numpy array with size (nvols, nqpts_ibz, 3*natoms) containing the phonon frequencies + for all the volumes, either from the original phonon calculations or fitted + """ + w = self.grun.wvols_qibz + dv = np.abs(self.volumes[self.ind_grun[2]] - self.volumes[self.ind_grun[1]]) + + w0 = w[:, 0, :] + w2 = w[:, 2, :] + d1 = (w2 - w0) / (2 * dv) + w1 = w[:, 1, :] + d2 = (w0 - 2 * w1 + w2) / dv ** 2 + v0 = self.volumes[self.ind_grun[1]] + + w_full = np.zeros((self.nvols, w.shape[0], w.shape[2])) + + for i, ig in enumerate(self.ind_grun): + w_full[ig] = w[:, i, :] + + for i in self._ind_energy_only: + dv = self.volumes[i] - v0 + w_full[i] = w1 + d1 * dv + d2 * dv ** 2 / 2 + + return w_full + + def get_vib_free_energies(self, tstart=0, tstop=800, num=100): + """ + Generates the vibrational free energy corresponding to all the structures, either from the phonon DOS + or from a fit of the know values. + + Args: + tstart: The starting value (in Kelvin) of the temperature mesh. + tstop: The end value (in Kelvin) of the mesh. + num: int, optional Number of samples to generate. Default is 100. + + Returns: + A numpy array of `num` values of the vibrational contribution to the free energy + """ + w = self.fitted_frequencies + + tmesh = np.linspace(tstart, tstop, num) + weights = self.grun.doses['qpoints'].weights + + f = np.zeros((self.nvols, num)) + + for i in range(self.nvols): + f[i] = [get_free_energy(w[i], weights, t) for t in tmesh] + + return f + + +def get_free_energy(w, weights, t): + """ + Calculates the free energy in eV from the phonon frequencies on a regular grid. + + Args: + w: the phonon frequencies + weights: the weights of the q-points + t: the temperature + """ + wdkt = w / (abu.kb_eVK * t) + + # if w=0 set fe=0 + fe = np.choose(w > 0, (0, w / 2 + abu.kb_eVK * t * np.log(1 - np.exp(-wdkt)))) + ind = np.where(w >= 0) + + return np.dot(weights[ind[0]], fe[ind]).sum() + + +def get_cv(w, weights, t): + """ + Calculates the constant-volume specific heat in eV/K from the phonon frequencies on a regular grid. + + Args: + w: the phonon frequencies + weights: the weights of the q-points + t: the temperature + """ + wdkt = w / (abu.kb_eVK * t) + + # if w=0 set cv=0 + cv = np.choose(w > 0, (0, abu.kb_eVK * wdkt ** 2 * np.exp(wdkt) / (np.exp(wdkt) - 1) ** 2)) + ind = np.where(w >= 0) + + return np.dot(weights[ind[0]], cv[ind]).sum() + + +def get_zero_point_energy(w, weights): + """ + Calculates the zero point energy in eV from the phonon frequencies on a regular grid. + + Args: + w: the phonon frequencies + weights: the weights of the q-points + """ + zpe = np.choose(w > 0, (0, w / 2)) + ind = np.where(w >= 0) + + return np.dot(weights[ind[0]], zpe[ind]).sum() + + +def get_entropy(w, weights, t): + """ + Calculates the entropy in eV/K from the phonon frequencies on a regular grid. + + Args: + w: the phonon frequencies + weights: the weights of the q-points + t: the temperature + """ + wd2kt = w / (2 * abu.kb_eVK * t) + coth = lambda x: 1.0 / np.tanh(x) + + s = np.choose(w > 0, (0, w*coth(wd2kt) / 2 / t - abu.kb_eVK * np.log(2 * np.sinh(wd2kt)))) + ind = np.where(w >= 0) + + return np.dot(weights[ind[0]], s[ind]).sum() + + +class AbstractQmeshAnalyzer(metaclass=abc.ABCMeta): + """ + Abstract class for the analysis of the convergence wrt to the q-mesh used to compute the + phonon DOS. Relies on abstract methods implemented in AbstractQHA. + """ + + fontsize = 8 + colormap = "viridis" + + def _consistency_check(self): + if not hasattr(self, "qha_list") or not self.qha_list: + raise RuntimeError("Please call the run method to compute the QHA!") + + def set_eos(self, eos_name): + """ + Set the EOS model used for the fit. + + Args: + eos_name: string indicating the expression used to fit the energies. See pymatgen.analysis.eos.EOS. + """ + self._consistency_check() + for qha in self.qha_list: + qha.set_eos(eos_name) + + @add_fig_kwargs + def plot_energies(self, **kwargs): + """ + Plots the energies as a function of volume at different temperatures. + kwargs are propagated to the analogous method of QHA. + """ + self._consistency_check() + # Build grid of plots. + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=self.num_qmeshes, ncols=1, + sharex=True, sharey=True, squeeze=False) + ax_list = ax_list.ravel() + + for qha, ngqpt, ax in zip(self.qha_list, self.ngqpt_list, ax_list): + qha.plot_energies(ax=ax, show=False, **kwargs) + ax.set_title("ngpqt: %s" % str(ngqpt), fontsize=self.fontsize) + return fig + + @add_fig_kwargs + def plot_thermal_expansion_coeff(self, **kwargs): + """ + Plots the thermal expansion coefficient as a function of the temperature. + kwargs are propagated to the analogous method of QHA. + """ + self._consistency_check() + ax, fig, plt = get_ax_fig_plt(None) + cmap = plt.get_cmap(self.colormap) + for iq, (qha, ngqpt) in enumerate(zip(self.qha_list, self.ngqpt_list)): + qha.plot_thermal_expansion_coeff(ax=ax, + color=cmap(float(iq) / self.num_qmeshes), + label="ngqpt: %s" % str(ngqpt), show=False, **kwargs) + ax.legend(loc="best", fontsize=self.fontsize, shadow=True) + return fig + + @add_fig_kwargs + def plot_vol_vs_t(self, **kwargs): + """ + Plot the volume as a function of the temperature. + kwargs are propagated to the analogous method of QHA. + """ + self._consistency_check() + ax, fig, plt = get_ax_fig_plt(None) + cmap = plt.get_cmap(self.colormap) + for iq, (qha, ngqpt) in enumerate(zip(self.qha_list, self.ngqpt_list)): + qha.plot_vol_vs_t(ax=ax, + color=cmap(float(iq) / self.num_qmeshes), + label="ngqpt: %s" % str(ngqpt), show=False, **kwargs) + ax.legend(loc="best", fontsize=self.fontsize, shadow=True) + return fig + + +class QHAQmeshAnalyzer(AbstractQmeshAnalyzer): + + def __init__(self, gsr_paths, ddb_paths): + """ + Creates an instance of QHA from a list of GSR files and a list of PHDOS.nc files. + The list should have the same size and the volumes should match. + + Args: + gsr_paths: list of paths to GSR files. + phdos_paths: list of paths to PHDOS.nc files. + """ + self.gsr_paths = gsr_paths + self.ddb_paths = ddb_paths + + def run_qlist(self, nqsmall_list, **kwargs): + """ + """ + self.qha_list = [] + self.ngqpt_list = [] + + ddb_list = [DdbFile(p) for p in self.ddb_paths] + for nqsmall in nqsmall_list: + phdos_paths = [] + + for i, ddb in enumerate(ddb_list): + phbst_file, phdos_file = ddb.anaget_phbst_and_phdos_files( + nqsmall=nqsmall, qppa=None, ndivsm=1, line_density=None, asr=2, chneut=1, dipdip=1, + dos_method="tetra", lo_to_splitting="automatic", ngqpt=None, qptbounds=None, + anaddb_kwargs=None, verbose=0, spell_check=True, + mpi_procs=1, workdir=None, manager=None) + + phdos_paths.append(phdos_file.filepath) + if i == 0: + # These variables added in abinit v8.11. Use nqsmall is not available. + ngqpt = 3 * [nqsmall] + if "qptrlatt" in phdos_file.reader.rootgrp.variables: + ngqpt = np.diagonal(phdos_file.reader.read_value("qptrlatt").T) + #shiftq = phdos_file.reader.read_value("shiftq") + self.ngqpt_list.append(ngqpt) + + phbst_file.close() + phdos_file.close() + + qha = QHA.from_files(self.gsr_paths, phdos_paths) + self.qha_list.append(qha) + + self.ngqpt_list = np.reshape(self.ngqpt_list, (-1, 3)) + self.num_qmeshes = len(self.ngqpt_list) + for ddb in ddb_list: + ddb.close() diff --git a/abipy/dfpt/raman.py b/abipy/dfpt/raman.py new file mode 100644 index 000000000..7eac2f129 --- /dev/null +++ b/abipy/dfpt/raman.py @@ -0,0 +1,469 @@ +import numpy as np +import abipy.core.abinit_units as abu +from abipy.iotools import ETSF_Reader +from abipy.core.func1d import Function1D +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from collections import namedtuple + + +PowderIntensity = namedtuple("PowderIntensity", ("paral", "perp", "tot")) + + +class Raman: + """ + An object that allows to obtain the Raman intensities based on the calculated + susceptibilities. The expressions used to extract the different values of the + Raman intensities can be found for example in PRB 71, 214307, Physics of the + Earth and Planetary Interiors 174, 113 or PRB 71, 125107. + """ + + def __init__(self, susceptibility, phfreqs, non_anal_susceptibility=None, + non_anal_phfreqs=None, non_anal_directions=None): + """ + Args: + susceptibility: a numpy array with shape (n modes, 3 3) containing the + Raman susceptibilities of transverse zone-center phonon modes. + phfreqs: a numpy array with the phonon frequencies at Gamma, without non + analytical contributions. + non_anal_susceptibility: a numpy array with shape (n directions, n modes, 3 3) + containing the Raman susceptibilities of zone-center phonons, with non-analyticity + in different directions. + non_anal_phfreqs: a numpy array with the phonon frequencies with shape + (n directions, n modes), with non analytical contributions along the different + directions. + non_anal_directions: a numpy array with shape (n directions, 3) with the directions + along which the non analytical contribution has been calculated. + """ + self.susceptibility = susceptibility + self.phfreqs = phfreqs + self.non_anal_susceptibility = non_anal_susceptibility + self.non_anal_phfreqs = non_anal_phfreqs + self.non_anal_directions = non_anal_directions + + @classmethod + def from_file(cls, filepath): + """ + Create the object from an anaddb.nc netcdf file. + + Args: + filepath: path to the netcdf file. + + Returns: + An instance of Raman. + """ + + with ETSF_Reader(filepath) as r: + try: + susceptibility = r.read_value("raman_sus").T + phfreqs = r.read_value("gamma_phonon_modes") + non_anal_susceptibility = r.read_value("non_analytical_raman_sus", default=None) + if non_anal_susceptibility is not None: + non_anal_susceptibility = non_anal_susceptibility.T + non_anal_phfreqs = r.read_value("non_analytical_phonon_modes", default=None) + non_anal_directions = r.read_value("non_analytical_directions", default=None) + except Exception: + import traceback + msg = traceback.format_exc() + msg += ("Error while trying to read Raman from file.\n" + "Verify that the required variables are used in anaddb: nlflag\n") + raise ValueError(msg) + + return cls(susceptibility=susceptibility, phfreqs=phfreqs, non_anal_susceptibility=non_anal_susceptibility, + non_anal_phfreqs=non_anal_phfreqs, non_anal_directions=non_anal_directions) + + def get_modes_intensities(self, temp, laser_freq, non_anal_dir=None, relative=False, units="eV", + pol_in=None, pol_out=None): + """ + Calculates the Raman intensities for each mode in arbitrary units. It is possible to use the + susceptibilities from the transverse modes only or to specify one of the directions with non + analytical contributions. By default it returns an array with shape (n modes, 3, 3) where each + component of the 3x3 matrix are those with different incoming (the first index) and outgoing + (the second index) polarization. These are along the components along the standard axes (e.g. + "xx" or "yz" components). If pol_in and pol_out an array with shape (n modes) is returned + corresponding to the selected polarizations. + + Args: + temp: temperature in K. + laser_freq: frequency of the incident laser. The units are determined the "units" + argument. + non_anal_dir: index of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + relative: if True the intensities will be rescaled so that the largest value is 1. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + pol_in: the polarization of the incoming photon. If not None can be either either a string + with one of the cartesian components i.e. "x", "y", "z" or an array with 3 elements + representing the polarization direction. If not None pol_out can not be None. + pol_out: the polarization of the outgoing photon. If not None can be either either a string + with one of the cartesian components i.e. "x", "y", "z" or an array with 3 elements + representing the polarization direction. If not None pol_in can not be None. + + Returns: + An array with the Raman intensities. If pol_in==pol_out==None has shape (n modes, 3, 3) + with all the components. Otherwise an array with size (n modes) with the intensities of + the selected polarizations. + """ + + if non_anal_dir is None: + w = self.phfreqs + sus = self.susceptibility + else: + w = self.non_anal_phfreqs[non_anal_dir] + sus = self.non_anal_susceptibility[non_anal_dir] + + laser_freq = laser_freq / abu.phfactor_ev2units(units) + + c = self._get_prefactor(w=w, temp=temp, laser_freq=laser_freq) + if pol_in is None and pol_out is None: + i = c[:, np.newaxis, np.newaxis] * sus**2 + # this will make the indices of the i,j component such that the first + # will refer to the polarization of the incoming photon and the second + # to the polarization of the created one. + np.transpose(i, axes=(0, 2, 1)) + else: + if pol_in is None or pol_out is None: + raise ValueError("pol_in and pol_out should be either both None or both defined") + dxyz = {"x": [1, 0, 0], "y": [0, 1, 0], "z": [0, 0, 1]} + if isinstance(pol_in, str): + pol_in = dxyz[pol_in.lower()] + if isinstance(pol_out, str): + pol_out = dxyz[pol_out.lower()] + + pol_in = np.array(pol_in) / np.linalg.norm(pol_in) + pol_out = np.array(pol_out) / np.linalg.norm(pol_out) + + i = c * np.einsum("ijk, j, k -> i", sus, pol_out, pol_in) ** 2 + + if relative: + i /= i.max() + + return i + + @staticmethod + def _get_prefactor(w, temp, laser_freq): + """ + Helper method to calculate the coefficient for the Raman intensities. + + Args: + w: the selected frequencies in eV. + temp: the temperature in K. + laser_freq: the frequency of the laser in eV + + Returns: + An array with shape (n modes) with the coefficient for the Raman intensities. + """ + + c = np.zeros_like(w) + ind = np.where(w > 1e-5) + + bose_factor = 1 / (1 - np.exp(-w[ind] / (abu.kb_eVK * temp))) + + c[ind] = (w[ind] - laser_freq) ** 4 / (2 * w[ind]) * bose_factor + + return c + + def _get_lorentz_freqs_and_factor(self, intensity, non_anal_dir, min_freq, max_freq, num, width, units): + """ + Helper method to get the list of frequencies and the main spread factors to + calculate the broadened Raman intensities with a Lorentz distribution. + + Args: + intensity: the Raman intensities at specified frequencies. + non_anal_dir: ndex of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + min_freq: minimum frequency considered. If None it will be given by the minimum + frequency with non zero intensities minus 10 times the width of the distribution. + max_freq: maximum frequency considered. If None it will be given by the maximum + frequency with non zero intensities plus 10 times the width of the distribution. + width: the width of the Lorentz distribution. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + + Returns: + Tuple with list of "num" frequencies in eV and factors for the Lorentz broadening + with shape (n modes, num). + """ + + if non_anal_dir is None: + w = self.phfreqs + else: + w = self.non_anal_phfreqs[non_anal_dir] + + units_factor = abu.phfactor_ev2units(units) + + width = width / units_factor + + if min_freq is None: + min_ind = np.where(intensity/intensity.max() > 1e-10)[0].min() + min_freq = w[min_ind] - 10 * width + else: + min_freq = min_freq / units_factor + + if max_freq is None: + max_ind = np.where(intensity/intensity.max() > 1e-10)[0].max() + max_freq = w[max_ind] + 10 * width + else: + max_freq = max_freq / units_factor + + freqs = np.linspace(min_freq, max_freq, num) + + lorentz = width / ((freqs - w.reshape((-1, 1)))**2 + width**2) / np.pi + + return freqs, lorentz + + def get_lorentz_intensity(self, temp, laser_freq, width, non_anal_dir=None, min_freq=None, max_freq=None, + num=1000, relative=False, units="eV", pol_in=None, pol_out=None): + """ + Calculates the broadened Raman intensities in arbitrary units for frequencies in an interval. It is + possible to use the susceptibilities from the transverse modes only or to specify one of the directions + with non analytical contributions. By default it returns a 3x3 matrix where each component is a + Function1D object with the Raman intensities with different incoming (the first index) and outgoing + (the second index) polarization. These are along the components along the standard axes (e.g. "xx" or + "yz" components). If pol_in and pol_out a single Function1D is returned corresponding to the selected + polarizations. + + Args: + temp: temperature in K. + laser_freq: frequency of the incident laser. The units are determined the "units" + argument. + width: the width of the Lorentz distribution. The units are determined the "units" + argument. + non_anal_dir: index of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + min_freq: minimum frequency considered. If None it will be given by the minimum + frequency with non zero intensities minus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + max_freq: maximum frequency considered. If None it will be given by the maximum + frequency with non zero intensities plus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + num: number of frequencies in the interval (min_freq, max_freq). + relative: if True the intensities will be rescaled so that the largest value is 1. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + pol_in: the polarization of the incoming photon. If not None can be either either a string + with one of the cartesian components i.e. "x", "y", "z" or an array with 3 elements + representing the polarization direction. If not None pol_out can not be None. + pol_out: the polarization of the outgoing photon. If not None can be either either a string + with one of the cartesian components i.e. "x", "y", "z" or an array with 3 elements + representing the polarization direction. If not None pol_in can not be None. + + Returns: + If pol_in==pol_out==None a 3x3 list with a Function1D corresponding to the different + components of the intensities. Otherwise a single Function1D with the intensities of + the selected polarizations. Each Function1D has "num" points. + """ + + i = self.get_modes_intensities(temp=temp, laser_freq=laser_freq, non_anal_dir=non_anal_dir, + units=units, pol_in=pol_in, pol_out=pol_out) + + freqs, lorentz = self._get_lorentz_freqs_and_factor(intensity=i, non_anal_dir=non_anal_dir, min_freq=min_freq, + max_freq=max_freq, num=num, width=width, units=units) + + # convert the frequencies to the desired units for the output + x = freqs * abu.phfactor_ev2units(units) + + if pol_in is not None and pol_out is not None: + li = np.dot(i, lorentz) + if relative: + li /= li.max() + + return Function1D(x, li) + + else: + li = np.einsum("ij, ikl -> jkl", lorentz, i) + + li_func = [[None]*3]*3 + + for i in range(3): + for j in range(3): + y = li[:, i, j] + if relative: + y /= y.max() + li_func[i][j] = Function1D(x, y) + + return li_func + + def get_powder_intensity(self, temp, laser_freq, non_anal_dir=None, relative=False, units="eV"): + """ + Calculates the Raman intensities in arbitrary units for each mode integrated over all possible + orientation to reproduce the powder measurements. It is possible to use the susceptibilities from + transverse modes only or to specify one of the directions with non analytical contributions. + + Args: + temp: temperature in K. + laser_freq: frequency of the incident laser. The units are determined the "units" + argument. + non_anal_dir: index of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + relative: if True the intensities will be rescaled so that the largest value of the + total intensity is 1. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + + Returns: + A PowderIntensity with the parallel, perpendicular and total components of the powder + intensities. Each one is an array with length n modes. + """ + + if non_anal_dir is None: + w = self.phfreqs + sus = self.susceptibility + else: + w = self.non_anal_phfreqs[non_anal_dir] + sus = self.non_anal_susceptibility[non_anal_dir] + + g0 = np.trace(sus, axis1=1, axis2=2)**2 / 3 + g1 = ((sus[:, 0, 1] - sus[:, 1, 0])**2 + (sus[:, 0, 2] - sus[:, 2, 0])**2 + (sus[:, 2, 1] - sus[:, 1, 2])**2) / 2 + g2 = ((sus[:, 0, 1] + sus[:, 1, 0])**2 + (sus[:, 0, 2] + sus[:, 2, 0])**2 + (sus[:, 2, 1] + sus[:, 1, 2])**2) / 2 + \ + ((sus[:, 0, 0] - sus[:, 1, 1])**2 + (sus[:, 0, 0] - sus[:, 2, 2])**2 + (sus[:, 1, 1] - sus[:, 2, 2])**2) / 3 + + laser_freq = laser_freq / abu.phfactor_ev2units(units) + + c = self._get_prefactor(w=w, temp=temp, laser_freq=laser_freq) + + paral = c * (10 * g0 + 4 * g2) + perp = c * (5 * g1 + 3 * g2) + tot = paral + perp + if relative: + m = tot.max() + paral /= m + perp /= m + tot /= m + + return PowderIntensity(paral, perp, tot) + + def get_powder_lorentz_intensity(self, temp, laser_freq, width, non_anal_dir=None, min_freq=None, + max_freq=None, num=1000, relative=False, units="eV"): + """ + Calculates the broadened Raman intensities in arbitrary units integrated over all possible + orientation to reproduce the powder measurements for frequencies in an interval. It is possible to + use the susceptibilities from the transverse modes only or to specify one of the directions with non + analytical contributions. + + Args: + temp: temperature in K. + laser_freq: frequency of the incident laser. The units are determined the "units" + argument. + width: the width of the Lorentz distribution. The units are determined the "units" + argument. + non_anal_dir: index of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + min_freq: minimum frequency considered. If None it will be given by the minimum + frequency with non zero intensities minus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + max_freq: maximum frequency considered. If None it will be given by the maximum + frequency with non zero intensities plus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + num: number of frequencies in the interval (min_freq, max_freq). + relative: if True the intensities will be rescaled so that the largest value of the + total intensity is 1. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + + Returns: + A PowderIntensity with the parallel, perpendicular and total components of the powder + intensities. Each one is a Function1D with "num" points. + """ + + pi = self.get_powder_intensity(temp=temp, laser_freq=laser_freq, non_anal_dir=non_anal_dir, units=units) + + freqs, lorentz = self._get_lorentz_freqs_and_factor(intensity=pi.tot, non_anal_dir=non_anal_dir, min_freq=min_freq, + max_freq=max_freq, num=num, width=width, units=units) + + lpi = np.array([i.dot(lorentz) for i in pi]) + if relative: + lpi /= lpi[2].max() + + # now convert the frequencies to the desired units for the output + x = freqs * abu.phfactor_ev2units(units) + + return PowderIntensity(*(Function1D(x, y) for y in lpi)) + + @add_fig_kwargs + def plot_intensity(self, temp, laser_freq, width, value, non_anal_dir=None, min_freq=None, max_freq=None, + num=1000, relative=False, units="eV", ax=None, plot_phfreqs=False, **kwargs): + """ + Plot one representation of the broadened Raman intensities. + + Args: + temp: temperature in K. + laser_freq: frequency of the incident laser. The units are determined the "units" + argument. + width: the width of the Lorentz distribution. The units are determined the "units" + argument. If None or 0 a plot of only the frequencies for each mode will be given. + value: a string describing the value that should be plotted. Can be "powder" or + a string of the type "xz" with the polarization of the incoming and outgoing + phonon. All the combinations of "x", "y" and "z" are accepted. + non_anal_dir: index of the direction along which the non analytical contribution + has been calculated. Corresponds to the indices in the non_anal_directions attribute. + min_freq: minimum frequency considered. If None it will be given by the minimum + frequency with non zero intensities minus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + max_freq: maximum frequency considered. If None it will be given by the maximum + frequency with non zero intensities plus 10 times the width of the distribution. + If given the units are determined by the "units" argument. + num: number of frequencies in the interval (min_freq, max_freq). + relative: if True the intensities will be rescaled so that the largest value of the + total intensity is 1. + units: the units in which the input and the output frequencies will be given. + Possible values in ("eV", "meV", "Ha", "cm-1", "Thz") + ax: |matplotlib-Axes| or None if a new figure should be created. + plot_phfreqs: if True vertical dashed lines are added to the figure for all the + phonon modes. + **kwargs: arguments passed to the plot function. + + Returns: + |matplotlib-Figure| + """ + + ax, fig, plt = get_ax_fig_plt(ax=ax) + + if width: + if value == "powder": + f = self.get_powder_lorentz_intensity(temp=temp, laser_freq=laser_freq, width=width, + non_anal_dir=non_anal_dir, min_freq=min_freq, max_freq=max_freq, + num=num, relative=relative, units=units).tot + else: + pol_in = value[0] + pol_out = value[1] + f = self.get_lorentz_intensity(temp=temp, laser_freq=laser_freq, width=width, non_anal_dir=non_anal_dir, + min_freq=min_freq, max_freq=max_freq, num=num, relative=relative, + units=units, pol_in=pol_in, pol_out=pol_out) + + f.plot(ax=ax, **kwargs) + + if plot_phfreqs: + if non_anal_dir is None: + w = self.phfreqs + else: + w = self.non_anal_phfreqs[non_anal_dir] + + w = w * abu.phfactor_ev2units(units) + + min_freq = f.mesh[0] + max_freq = f.mesh[-1] + + for wi in w: + if min_freq < wi < max_freq: + ax.axvline(x=wi, ls="--", color="k", lw=0.5) + + else: + if value == "powder": + ri = self.get_powder_intensity(temp=temp, laser_freq=laser_freq, non_anal_dir=non_anal_dir, + relative=relative, units=units) + + i = ri.tot + else: + pol_in = value[0] + pol_out = value[1] + i = self.get_modes_intensities(temp=temp, laser_freq=laser_freq, non_anal_dir=non_anal_dir, + relative=relative, units=units, pol_in=pol_in, pol_out=pol_out) + + if non_anal_dir is None: + w = self.phfreqs * abu.phfactor_ev2units(units) + else: + w = self.non_anal_phfreqs[non_anal_dir] * abu.phfactor_ev2units(units) + + ax.stem(w, i, **kwargs) + + return fig diff --git a/abipy/dfpt/tensors.py b/abipy/dfpt/tensors.py deleted file mode 100644 index e6cef49a1..000000000 --- a/abipy/dfpt/tensors.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 -""" -This modules provides tensors objects extracted from dfpt calculations. -""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import numpy as np - -from pymatgen.analysis.elasticity.tensors import Tensor, SquareTensor -from abipy.iotools import ETSF_Reader - - -class NLOpticalSusceptibilityTensor(Tensor): - """ - Subclass of :class:`pymatgen.analysis.elasticity.tensors.Tensor` containing the - non-linear optical susceptibility tensor. - """ - - @classmethod - def from_file(cls, filepath): - """ - Creates the tensor from a anaddb.nc netcdf file containing ``dchide``. - This requires to run anaddb with ``tnlflag`` > 0 - """ - with ETSF_Reader(filepath) as reader: - try: - return cls(reader.read_value("dchide")) - except Exception as exc: - import traceback - msg = traceback.format_exc() - msg += ("Error while trying to read from file.\n" - "Verify that nlflag > 0 in anaddb\n") - raise ValueError(msg) - - -class DielectricTensor(SquareTensor): - """ - Subclass of :class:`pymatgen.analysis.elasticity.tensors.SquareTensor` - describing a dielectric tensor. - """ - - def reflectivity(self, tol=1e-6): - """ - If the tensor is diagonal (with off diagonal elements smaller than tol) - returns the three components of the reflectivity. - """ - - d = np.diag(self) - - if np.max(np.abs(self-np.diag(d))) > tol: - raise ValueError("The tensor is not diagonal.") - - d = np.sqrt(d) - - return np.abs((1-d)/(1+d))**2 diff --git a/abipy/dfpt/tests/test_anaddbnc.py b/abipy/dfpt/tests/test_anaddbnc.py index 2efdab519..7319dccd8 100644 --- a/abipy/dfpt/tests/test_anaddbnc.py +++ b/abipy/dfpt/tests/test_anaddbnc.py @@ -1,6 +1,4 @@ """Tests for phonons""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import abipy.data as abidata @@ -12,21 +10,39 @@ class AnaddbNcFileTest(AbipyTest): def test_base(self): - """Base tests for AnaddbNcFile""" + """Testing AnaddbNcFile API""" anaddbnc_fname = abidata.ref_file("AlAs_nl_dte_anaddb.nc") with AnaddbNcFile(anaddbnc_fname) as anc: repr(anc); str(anc) anc.to_string(verbose=2) assert anc.structure.formula == "Al1 As1" + assert not anc.has_elastic_data + assert not anc.has_piezoelectric_data assert anc.becs is not None - assert anc.emacro is not None - assert anc.emacro_rlx is not None + assert anc.epsinf is not None + assert anc.eps0 is not None assert anc.dchidt is not None assert anc.dchide is not None assert anc.oscillator_strength is not None assert anc.ifc is None - assert not anc.params + assert anc.params["chneut"] == 1 if self.has_nbformat(): - anc.write_notebook(nbpath=self.get_tmpname(text=True)) + assert anc.write_notebook(nbpath=self.get_tmpname(text=True)) + + +class AnaddbNcRobotTest(AbipyTest): + + def test_base(self): + """Testing AnaddbNcRobot API""" + from abipy import abilab + assert abilab.AnaddbNcRobot.class_handles_filename("anaddb.nc") + assert abilab.AnaddbNcRobot.class_handles_filename("/foo/bar/anaddb.nc") + robot = abilab.AnaddbNcRobot() + assert robot.EXT == "anaddb" + repr(robot); str(robot) + assert robot.to_string(verbose=2) + + if self.has_nbformat(): + assert robot.write_notebook(nbpath=self.get_tmpname(text=True)) diff --git a/abipy/dfpt/tests/test_ddb.py b/abipy/dfpt/tests/test_ddb.py index a4f5c2250..7aeb83434 100644 --- a/abipy/dfpt/tests/test_ddb.py +++ b/abipy/dfpt/tests/test_ddb.py @@ -1,9 +1,8 @@ """Tests for phonons""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import abipy.data as abidata +import abipy.core.abinit_units as abu from abipy import abilab from abipy.core.testing import AbipyTest @@ -20,11 +19,15 @@ class DdbTest(AbipyTest): def test_alas_ddb_1qpt_phonons(self): """Testing DDB with one q-point""" with DdbFile(os.path.join(test_dir, "AlAs_1qpt_DDB")) as ddb: - repr(ddb); print(ddb) + repr(ddb); str(ddb) # Test qpoints. assert len(ddb.qpoints) == 1 assert np.all(ddb.qpoints[0] == [0.25, 0, 0]) assert ddb.natom == len(ddb.structure) + s = ddb.get_string() + with DdbFile.from_string(s) as same_ddb: + assert same_ddb.qpoints[0] == ddb.qpoints[0] + assert same_ddb.structure == ddb.structure # Test header h = ddb.header @@ -36,6 +39,9 @@ def test_alas_ddb_1qpt_phonons(self): assert h.xred.shape == (h.natom, 3) and h.kpt.shape == (h.nkpt, 3) self.assert_equal(h.znucl, [13, 33]) assert ddb.version == 100401 + assert ddb.total_energy is None + assert ddb.cart_forces is None + assert ddb.cart_stress_tensor is None assert np.all(h.symrel[1].T.ravel() == [0, -1, 1, 0, -1, 0, 1, -1, 0]) assert np.all(h.symrel[2].T.ravel() == [-1, 0, 0, -1, 0, 1, -1, 1, 0]) @@ -45,7 +51,7 @@ def test_alas_ddb_1qpt_phonons(self): assert struct.formula == "Al1 As1" # Test interface with Anaddb. - print(ddb.qpoints[0]) + str(ddb.qpoints[0]) assert ddb.qindex(ddb.qpoints[0]) == 0 phbands = ddb.anaget_phmodes_at_qpoint(qpoint=ddb.qpoints[0], verbose=1) @@ -62,7 +68,7 @@ def test_alas_ddb_1qpt_phonons(self): ddb.anaget_phbst_and_phdos_files(ngqpt=(4, 4, 4), verbose=1) except Exception as exc: # This to test AnaddbError.__str__ - print(exc) + str(exc) raise # Cannot compute DOS since we need a mesh. @@ -71,16 +77,17 @@ def test_alas_ddb_1qpt_phonons(self): # Test notebook if self.has_nbformat(): - ddb.write_notebook(nbpath=self.get_tmpname(text=True)) + assert ddb.write_notebook(nbpath=self.get_tmpname(text=True)) # Test block parsing. blocks = ddb._read_blocks() assert len(blocks) == 1 assert blocks[0]["qpt"] == [0.25, 0, 0] + assert blocks[0]["dord"] == 2 lines = blocks[0]["data"] assert lines[0].rstrip() == " 2nd derivatives (non-stat.) - # elements : 36" - assert lines[2].rstrip() == " 1 1 1 1 0.80977066582497D+01 -0.46347282336361D-16" + assert lines[2].rstrip() == " 1 1 1 1 0.80977066582497D+01 -0.46347282336361D-16" assert lines[-1].rstrip() == " 3 2 3 2 0.49482344898401D+01 -0.44885664256253D-17" for qpt in ddb.qpoints: @@ -90,10 +97,11 @@ def test_alas_ddb_1qpt_phonons(self): assert ddb.replace_block_for_qpoint(ddb.qpoints[0], blocks[0]["data"]) # Write new DDB file. - tmp_file = nbpath=self.get_tmpname(text=True) + tmp_file = self.get_tmpname(text=True) ddb.write(tmp_file) with DdbFile(tmp_file) as new_ddb: assert ddb.qpoints == new_ddb.qpoints + assert DdbFile.as_ddb(new_ddb) is new_ddb # Call anaddb to check if we can read new DDB phbands = new_ddb.anaget_phmodes_at_qpoint(qpoint=new_ddb.qpoints[0], verbose=1) assert phbands is not None and hasattr(phbands, "phfreqs") @@ -122,8 +130,12 @@ def test_alas_ddb_444_nobecs(self): assert ddb.has_bec_terms(select="at_least_one") assert not ddb.has_bec_terms(select="all") - assert not ddb.has_emacro_terms() + assert not ddb.has_epsinf_terms() assert not ddb.has_lo_to_data() + assert not ddb.has_internalstrain_terms() + assert not ddb.has_piezoelectric_terms() + assert not ddb.has_strain_terms() + assert ddb.has_at_least_one_atomic_perturbation() ref_qpoints = np.reshape([ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00, @@ -157,13 +169,23 @@ def test_alas_ddb_444_nobecs(self): title="Phonon bands and DOS of %s" % phbands.structure.formula) assert phbands_file.plot_phbands(show=False) - # Get emacro and becs - emacro, becs = ddb.anaget_emacro_and_becs(chneut=1, verbose=1) + if self.has_panel(): + assert hasattr(ddb.get_panel(), "show") + + # Get epsinf and becs + r = ddb.anaget_epsinf_and_becs(chneut=1, verbose=1) + epsinf, becs = r.epsinf, r.becs assert np.all(becs.values == 0) - #assert np.all(emacro.values == 0) repr(becs); str(becs) assert becs.to_string(verbose=2) + same_becs = self.decode_with_MSON(becs) + self.assert_almost_equal(same_becs.values, becs.values) + + max_err = becs.check_site_symmetries(verbose=2) + #print(max_err) + assert max_err == 0 + self.assert_almost_equal(phdos.idos.values[-1], 3 * len(ddb.structure), decimal=1) phbands_file.close() phdos_file.close() @@ -179,9 +201,10 @@ def test_alas_ddb_444_nobecs(self): num_cpus=2, verbose=2) assert c.phdoses and c.plotter is not None - # Execute anaddb to compute the interatomic forces. + # Execute anaddb to compute the interatomic force constants. ifc = ddb.anaget_ifc() str(ifc); repr(ifc) + assert ifc.to_string(verbose=2) assert ifc.structure == ddb.structure assert ifc.number_of_atoms == len(ddb.structure) @@ -190,6 +213,15 @@ def test_alas_ddb_444_nobecs(self): assert ifc.plot_longitudinal_ifc_short_range(show=False) assert ifc.plot_longitudinal_ifc_ewald(show=False) + # Test get_coarse. + with ddb.get_coarse([2, 2, 2]) as coarse_ddb: + # Check whether anaddb can read the coarse DDB. + + with coarse_ddb.anaget_phbst_and_phdos_files(nqsmall=4, ndivsm=1, verbose=1) as g: + coarse_phbands_file, coarse_phdos_file = g + assert coarse_phbands_file.filepath == g.files[0].filepath + assert coarse_phdos_file.filepath == g.files[1].filepath + ddb.close() def test_zno_gamma_ddb_with_becs(self): @@ -216,13 +248,14 @@ def test_zno_gamma_ddb_with_becs(self): # Test Lru_cache as well assert ddb.has_bec_terms(select="at_least_one") assert ddb.has_bec_terms(select="at_least_one") - assert not ddb.has_bec_terms(select="all") - assert not ddb.has_bec_terms(select="all") - assert ddb.has_emacro_terms() + assert ddb.has_bec_terms(select="all") + assert ddb.has_bec_terms(select="all") + assert ddb.has_epsinf_terms() assert ddb.has_lo_to_data() - # Get emacro and becs - emacro, becs = ddb.anaget_emacro_and_becs(chneut=1, verbose=1) + # Get epsinf and becs + epsinf, becs = ddb.anaget_epsinf_and_becs(chneut=1, verbose=1) + ref_becs_values = [ [[ 2.15646571e+00, 0.00000000e+00, 3.26402110e-25], [ 0.00000000e+00, 2.15646571e+00, -5.46500204e-24], @@ -238,16 +271,27 @@ def test_zno_gamma_ddb_with_becs(self): [ 5.66391495e-24, 2.28904397e-24, -2.19362823e+00]] ] + ref_epsinf = [[ 5.42055574e+00, 8.88178420e-16, -1.30717901e-25], + [-8.88178420e-16, 5.42055574e+00, -2.26410045e-25], + [-1.30717901e-25, 2.26410045e-25, 4.98835236e+00]] + self.assert_almost_equal(becs.values, ref_becs_values) - #self.assert_almost_equal(emacro.values, ref_emacro_values) + self.assert_almost_equal(np.array(epsinf), ref_epsinf) repr(becs); str(becs) assert becs.to_string(verbose=2) + for arr, z in zip(becs.values, becs.zstars): + self.assert_equal(arr, z) + df = becs.get_voigt_dataframe(view="all", select_symbols="O", verbose=1) + assert len(df) == 2 + # Equivalent atoms should have same determinant. + self.assert_almost_equal(df["determinant"].values, df["determinant"].values[0]) # get the dielectric tensor generator from anaddb dtg = ddb.anaget_dielectric_tensor_generator(verbose=2) assert dtg is not None and hasattr(dtg, "phfreqs") + assert dtg.to_string(verbose=2) - def test_mgo_becs_emacro(self): + def test_mgo_becs_epsinf(self): """ Testing DDB for MgO with with Born effective charges and E_macro. Large breaking of the ASR. @@ -255,7 +299,8 @@ def test_mgo_becs_emacro(self): with abilab.abiopen(abidata.ref_file("mp-1009129-9x9x10q_ebecs_DDB")) as ddb: assert ddb.structure.formula == "Mg1 O1" assert len(ddb.qpoints) == 72 - assert ddb.has_emacro_terms() + assert ddb.has_epsinf_terms() + assert ddb.has_epsinf_terms(select="at_least_one_diagoterm") assert ddb.has_bec_terms() if self.has_matplotlib(): @@ -319,6 +364,33 @@ def test_ddb_from_mprester(self): assert robot.abifiles[1].structure.formula == "Li1 F1" assert robot.abifiles[1].header["ixc"] == -116133 + def test_alas_with_third_order(self): + """ + Testing DDB containing also third order derivatives. + """ + with abilab.abiopen(abidata.ref_file("refs/alas_nl_dfpt/AlAs_nl_dte_DDB")) as ddb: + repr(ddb); str(ddb) + assert ddb.to_string(verbose=2) + self.assert_almost_equal(ddb.total_energy.to("Ha"), -0.10085769246152e+02) + assert ddb.cart_forces is not None + stress = ddb.cart_stress_tensor + # Ha/Bohr^3 from DDB + ref_voigt = np.array([-0.31110177329142E-05, -0.31110177329142E-05, -0.31110177329146E-05, + 0.00000000000000E+00, 0.00000000000000E+00, 0.00000000000000E+00]) + # AbiPy stress is in GPa + self.assert_almost_equal(stress[0, 0], ref_voigt[0] * abu.HaBohr3_GPa) + self.assert_almost_equal(stress[1, 1], ref_voigt[1] * abu.HaBohr3_GPa) + self.assert_almost_equal(stress[2, 2], ref_voigt[2] * abu.HaBohr3_GPa) + self.assert_almost_equal(stress[1, 2], ref_voigt[3] * abu.HaBohr3_GPa) + self.assert_almost_equal(stress[0, 2], ref_voigt[4] * abu.HaBohr3_GPa) + self.assert_almost_equal(stress[0, 1], ref_voigt[5] * abu.HaBohr3_GPa) + + for qpoint in ddb.qpoints: + assert qpoint in ddb.computed_dynmat + + raman = ddb.anaget_raman() + self.assertAlmostEqual(raman.susceptibility[5, 0, 1], -0.0114683, places=5) + class DielectricTensorGeneratorTest(AbipyTest): @@ -328,20 +400,30 @@ def test_base(self): phbstnc_fname = abidata.ref_file("AlAs_nl_dte_PHBST.nc") d = DielectricTensorGenerator.from_files(phbstnc_fname, anaddbnc_fname) + assert d.eps0.shape == (3, 3) + df = d.epsinf.get_dataframe() + assert d.epsinf._repr_html_() + repr(d); str(d) + assert d.to_string(verbose=2) - self.assertAlmostEqual(d.tensor_at_frequency(0.001, units='Ha')[0,0], 11.917178540635028) + df = d.get_oscillator_dataframe(reim="all", tol=1e-8) + df = d.get_oscillator_dataframe(reim="im", tol=1e-8) + df = d.get_oscillator_dataframe(reim="re", tol=1e-8) + + self.assertAlmostEqual(d.tensor_at_frequency(0.001, units='Ha', gamma_ev=0.0)[0, 0], 11.917178540635028) d = DielectricTensorGenerator.from_objects(PhononBands.from_file(phbstnc_fname), AnaddbNcFile.from_file(anaddbnc_fname)) - self.assertAlmostEqual(d.tensor_at_frequency(0.001, units='Ha')[0,0], 11.917178540635028) + self.assertAlmostEqual(d.tensor_at_frequency(0.001, units='Ha', gamma_ev=0.0)[0, 0], 11.917178540635028) if self.has_matplotlib(): assert d.plot_vs_w(w_min=0.0001, w_max=0.01, num=10, units="Ha", show=False) assert d.plot_vs_w(w_min=0, w_max=None, num=10, units="cm-1", show=False) for comp in ["diag", "all", "diag_av"]: assert d.plot_vs_w(num=10, component=comp, units="cm-1", show=False) + assert d.plot_all(units="mev", show=False) class DdbRobotTest(AbipyTest): @@ -369,10 +451,54 @@ def test_ddb_robot(self): assert r.phdos_plotter.gridplot(show=False) if self.has_nbformat(): - robot.write_notebook(nbpath=self.get_tmpname(text=True)) + assert robot.write_notebook(nbpath=self.get_tmpname(text=True)) robot.close() + def test_robot_elastic(self): + """Test DdbRobot with anacompare_elastic method.""" + self.skip_if_abinit_not_ge("8.9.3") + filepaths = [abidata.ref_file("refs/alas_elastic_dfpt/AlAs_elastic_DDB")] + + with abilab.DdbRobot.from_files(filepaths) as robot: + robot.add_file("samefile", filepaths[0]) + assert len(robot) == 2 + + # Test anacompare_elastic + ddb_header_keys = ["nkpt", "tsmear"] + r = robot.anacompare_elastic(ddb_header_keys=ddb_header_keys, with_path=True, + with_structure=True, with_spglib=False, relaxed_ion="automatic", piezo="automatic", verbose=1) + df, edata_list = r.df, r.elastdata_list + assert "tensor_name" in df.keys() + assert "ddb_path" in df + for k in ddb_header_keys: + assert k in df + assert len(edata_list) == 2 + + def test_robot_becs_eps(self): + """Test DdbRobot with anacompare_becs and eps methods.""" + paths = ["out_ngkpt222_DDB", "out_ngkpt444_DDB", "out_ngkpt888_DDB"] + paths = [os.path.join(abidata.dirpath, "refs", "alas_eps_and_becs_vs_ngkpt", f) for f in paths] + + with abilab.DdbRobot.from_files(paths) as robot: + # Test anacompare_epsinf + rinf = robot.anacompare_epsinf(ddb_header_keys="nkpt", chneut=0, with_path=True, verbose=2) + assert "nkpt" in rinf.df + assert "ddb_path" in rinf.df + assert len(rinf.epsinf_list) == len(robot) + + # Test anacompare_eps0 + r0 = robot.anacompare_eps0(ddb_header_keys=["nkpt", "tsmear"], asr=0, tol=1e-5, with_path=True, verbose=2) + assert len(r0.eps0_list) == len(robot) + assert len(r0.dgen_list) == len(robot) + assert "ddb_path" in r0.df + + # Test anacompare_becs + rb = robot.anacompare_becs(ddb_header_keys=["nkpt", "tsmear"], chneut=0, tol=1e-5, with_path=True, verbose=2) + assert len(rb.becs_list) == len(robot) + for k in ["nkpt", "tsmear", "ddb_path"]: + assert k in rb.df + class PhononComputationTest(AbipyTest): @@ -381,8 +507,6 @@ def test_phonon_computation(self): path = os.path.join(abidata.dirpath, "refs", "mgb2_phonons_nkpt_tsmear", "mgb2_121212k_0.04tsmear_DDB") ddb = abilab.abiopen(path) - #for dos_method in ("gaussian",): - #for dos_method in ("tetra",): for dos_method in ("tetra", "gaussian"): # Get phonon bands and Dos with anaddb. phbands_file, phdos_file = ddb.anaget_phbst_and_phdos_files(nqsmall=4, ndivsm=2, @@ -399,7 +523,7 @@ def test_phonon_computation(self): self.assert_almost_equal(phbands.amu_symbol["B"], phbands.amu[5.0]) # Total PHDOS should integrate to 3 * natom - # Note that anaddb does not renormalize the DOS so we have to increate the tolerance. + # Note that anaddb does not renormalize the DOS so we have to increase the tolerance. #E Arrays are not almost equal to 2 decimals #E ACTUAL: 8.9825274146312282 #E DESIRED: 9 diff --git a/abipy/dfpt/tests/test_elastic.py b/abipy/dfpt/tests/test_elastic.py new file mode 100644 index 000000000..e226d0e42 --- /dev/null +++ b/abipy/dfpt/tests/test_elastic.py @@ -0,0 +1,68 @@ +"""Tests for phonons""" +import os +import numpy as np +import abipy.data as abidata + +from abipy import abilab +from abipy.core.testing import AbipyTest +#from abipy.dfpt.elastic import ElasticData + + +class ElasticDataFileTest(AbipyTest): + + def test_alas_elastic(self): + """ + Testing DDB containing also third order derivatives. + """ + self.skip_if_abinit_not_ge("8.9.3") + + with abilab.abiopen(abidata.ref_file("refs/alas_elastic_dfpt/AlAs_elastic_DDB")) as ddb: + assert ddb.has_strain_terms(select="at_least_one") + assert ddb.has_strain_terms(select="all") + assert ddb.has_internalstrain_terms(select="all") + assert ddb.has_piezoelectric_terms(select="all") + assert ddb.has_at_least_one_atomic_perturbation() + + # Get ElasticData by calling anaddb. + e = ddb.anaget_elastic(verbose=2) + assert e.params["elaflag"] == 3 + assert e.params["piezoflag"] == 3 + assert e.params["instrflag"] == 1 + assert e.params["asr"] == 2 and e.params["chneut"] == 1 + # Elastic tensors. + self.assert_almost_equal(e.elastic_relaxed[0,0,0,0], 122.23496623977118) + assert e.elastic_clamped is not None + assert e.elastic_stress_corr is None + assert e.elastic_relaxed_fixed_D is None + + # Piezoelectric tensors. + self.assert_almost_equal(e.piezo_relaxed[2,2,2], -0.041496005147475756) + assert e.piezo_clamped is not None + assert e.d_piezo_relaxed is None + assert e.g_piezo_relaxed is None + assert e.g_piezo_relaxed is None + + assert repr(e); assert str(e) + assert e.to_string(verbose=2) + assert e.structure.formula == "Al2 As2" + assert e.elastic_relaxed._repr_html_() + + name_tensor_list = e.name_tensor_list(tensor_type="elastic") + names = [nt[0] for nt in name_tensor_list] + assert "elastic_relaxed" in names + name_tensor_list = e.name_tensor_list(tensor_type="piezoelectric") + names = [nt[0] for nt in name_tensor_list] + assert "piezo_relaxed" in names + edata_fit = e.fit_to_structure() + assert edata_fit is not None + edata_ieee = e.convert_to_ieee() + assert edata_ieee is not None + + self.assertMSONable(e) + + df = e.get_elastic_tensor_dataframe(tensor_name="elastic_clamped", tol=1e-5) + df = e.get_piezoelectric_tensor_dataframe(tensor_name="piezo_clamped", tol=1e-8) + + df = e.get_voigt_dataframe("elastic_relaxed", voigt_as_index=False, tol=1e-1) + self.assert_almost_equal(df[(0, 0)][0], 122.23496623977118) + df = e.get_elastic_properties_dataframe(tensor_names="elastic_relaxed", fit_to_structure=True) diff --git a/abipy/dfpt/tests/test_frozen_phonons.py b/abipy/dfpt/tests/test_frozen_phonons.py index e196338f4..f2036ae9d 100644 --- a/abipy/dfpt/tests/test_frozen_phonons.py +++ b/abipy/dfpt/tests/test_frozen_phonons.py @@ -1,6 +1,4 @@ """Tests for frozen_phonons""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import abipy.data as abidata @@ -19,14 +17,14 @@ def test_frozen(self): phbands = PhononBands.from_file(filename) qpt_frac_coords = [0.5, 0.5, 0.5] - fp = FrozenPhonon.from_phbands(phbands, qpt_frac_coords, 0 , - etas=[-0.2, -0.1, 0, 0.1, 0.2], max_supercell=[5,5,5]) + fp = FrozenPhonon.from_phbands(phbands, qpt_frac_coords, 0, + etas=[-0.2, -0.1, 0, 0.1, 0.2], max_supercell=[5, 5, 5]) - self.assertArrayEqual(fp.scale_matrix, [[-1, 0, 1], [-1, 1, 0], [-1, -1, 0]]) + self.assertArrayEqual(fp.scale_matrix, [[-1, 0, 1], [-1, 1, 0], [-1, -1, 0]]) w = phbands.phfreqs[phbands.qindex(qpt_frac_coords), 0] - energies = [0.0704, 0.0176, 0. , 0.0175, 0.0703] + energies = [0.0704, 0.0176, 0., 0.0175, 0.0703] with self.assertRaises(ValueError): fp.energies = energies[:3] @@ -47,4 +45,4 @@ def test_frozen(self): if self.has_matplotlib(): assert fp.plot_fit_energies(freq=w, show=False) assert fp.plot_anharmonic_contribution(freq=w, show=False) - assert fp.plot_anharmonic_contribution(freq=w, relative=True, show=False) \ No newline at end of file + assert fp.plot_anharmonic_contribution(freq=w, relative=True, show=False) diff --git a/abipy/dfpt/tests/test_gruneisen.py b/abipy/dfpt/tests/test_gruneisen.py index b09dd1cf0..2cbd1907d 100644 --- a/abipy/dfpt/tests/test_gruneisen.py +++ b/abipy/dfpt/tests/test_gruneisen.py @@ -1,13 +1,11 @@ """Tests for Grunesein module.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import abipy.data as abidata from abipy.core.testing import AbipyTest from abipy import abilab -from abipy.dfpt.gruneisen import GrunsNcFile +from abipy.dfpt.gruneisen import GrunsNcFile, calculate_gruns_finite_differences class GrunsFileTest(AbipyTest): @@ -35,13 +33,22 @@ def test_gruns_ncfile(self): assert ncfile.phdos - self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=True, limit_frequencies=None), 1.4206573918609795) - self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=False, limit_frequencies="debye"), 1.2121437911186166) - self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=False, limit_frequencies="acoustic"), 1.213016691881557) - self.assertAlmostEqual(ncfile.thermal_conductivity_slack(squared=True, limit_frequencies=None), 14.553100876473687) + self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=True, limit_frequencies=None), + 1.4206573918609795) + self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=False, limit_frequencies="debye"), + 1.2121437911186166) + self.assertAlmostEqual(ncfile.average_gruneisen(t=None, squared=False, limit_frequencies="acoustic"), + 1.213016691881557) + self.assertAlmostEqual(ncfile.thermal_conductivity_slack(squared=True, limit_frequencies=None), + 14.553100876473687) + self.assertAlmostEqual(ncfile.thermal_conductivity_slack(squared=True, limit_frequencies=None, t=300), + 14.43141396698724) self.assertAlmostEqual(ncfile.debye_temp, 429.05702577371898) self.assertAlmostEqual(ncfile.acoustic_debye_temp, 297.49152615955893) + ncfile.grun_vals_finite_differences(match_eigv=False) + ncfile.gvals_qibz_finite_differences(match_eigv=False) + if self.has_matplotlib(): assert ncfile.plot_doses(title="DOSes", show=False) assert ncfile.plot_doses(with_idos=False, xlims=None, show=False) @@ -50,16 +57,19 @@ def test_gruns_ncfile(self): assert ncfile.plot_phbands_with_gruns(title="bands with gamma markers + DOSes", show=False) assert ncfile.plot_phbands_with_gruns(with_doses=None, gamma_fact=2, units="cm-1", show=False) assert ncfile.plot_phbands_with_gruns(fill_with="groupv", gamma_fact=2, units="cm-1", show=False) + assert ncfile.plot_phbands_with_gruns(fill_with="gruns_fd", gamma_fact=2, units="cm-1", show=False) plotter = ncfile.get_plotter() assert plotter.combiboxplot(show=False) - assert plotter.animate() + assert plotter.animate(show=False) assert ncfile.plot_gruns_scatter(units='cm-1', show=False) assert ncfile.plot_gruns_scatter(values="groupv", units='cm-1', show=False) + assert ncfile.plot_gruns_scatter(values="gruns_fd", units='cm-1', show=False) assert ncfile.plot_gruns_bs(match_bands=True, show=False) assert ncfile.plot_gruns_bs(values="groupv", match_bands=False, show=False) + assert ncfile.plot_gruns_bs(values="gruns_fd", match_bands=False, show=False) if self.has_nbformat(): assert ncfile.write_notebook(nbpath=self.get_tmpname(text=True)) @@ -74,3 +84,13 @@ def test_from_ddb_list(self): g = GrunsNcFile.from_ddb_list(ddb_list, ndivsm=3, nqsmall=3) + +class FunctionsTest(AbipyTest): + + def test_calculate_gruns_finite_differences(self): + phfreqs = np.array([[[0, 0, 0]], [[1, 2, 3]], [[2, 6, 4]]]) + eig = np.array([[[[1, 0, 0], [0, 1, 0], [0, 0, 1]]], [[[1, 0, 0], [0, 0, 1], [0, 1, 0]]], + [[[1, 0, 0], [0, 1, 0], [0, 0, 1]]]]) + + g = calculate_gruns_finite_differences(phfreqs, eig, iv0=1, volume=1, dv=1) + self.assertArrayEqual(g, [[-1, -1, -1]]) diff --git a/abipy/dfpt/tests/test_msqdos.py b/abipy/dfpt/tests/test_msqdos.py new file mode 100644 index 000000000..c96843d47 --- /dev/null +++ b/abipy/dfpt/tests/test_msqdos.py @@ -0,0 +1,132 @@ +"""Tests for msqdos module.""" +import os +import numpy as np +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy import abilab +from abipy.core.symmetries import indsym_from_symrel + + +class MsqdTest(AbipyTest): + + def test_from_ddb(self): + """Testing MsqDos from DDB file.""" + self.skip_if_abinit_not_ge("8.11.0") + + filepath = os.path.join(abidata.dirpath, "refs", "mp-7000_DDB.bz2") + with abilab.abiopen(filepath) as ddb: + phbst_file, phdos_file = ddb.anaget_phbst_and_phdos_files(nqsmall=2, ndivsm=1, mpi_procs=2) + msqd_dos = phdos_file.msqd_dos + # Read indsym from file and convert from F to C + indsym = phdos_file.reader.read_value("indsym") + indsym[:, :, 3] -= 1 + phbst_file.close() + phdos_file.close() + + repr(msqd_dos); str(msqd_dos) + assert msqd_dos.to_string(verbose=2) + for fmt in ("cartesian", "cif", "ustar", "beta"): #, "B"): + df = msqd_dos.get_dataframe(temp=100, view="all", select_symbols="Si", fmt=fmt) + abilab.print_dataframe(df, title="Format: %s" % fmt) + + # Equivalent atoms should have same determinant. + df = msqd_dos.get_dataframe(temp=300, view="all", fmt="cartesian") + for _, group in df.groupby(by="element"): + self.assert_almost_equal(group["determinant"].values, group["determinant"].values[0]) + + # Compare Abinit indsym with AbiPy version. + abispg = msqd_dos.structure.abi_spacegroup + abipy_indsym = indsym_from_symrel(abispg.symrel, abispg.tnons, msqd_dos.structure, tolsym=1e-8) + assert np.all(abipy_indsym == indsym) + assert np.all(abipy_indsym == msqd_dos.structure.indsym) + + cif_string = msqd_dos.get_cif_string(temp=300) + #print(cif_string) + + self.assertMultiLineEqual(cif_string, """\ +# generated using pymatgen +data_SiO2 +_symmetry_space_group_name_H-M 'P 1' +_cell_length_a 4.94990566 +_cell_length_b 4.94990566 +_cell_length_c 5.44089660 +_cell_angle_alpha 90.00000000 +_cell_angle_beta 90.00000000 +_cell_angle_gamma 120.00000000 +_symmetry_Int_Tables_number 1 +_chemical_formula_structural SiO2 +_chemical_formula_sum 'Si3 O6' +_cell_volume 115.45026866 +_cell_formula_units_Z 3 +loop_ + _symmetry_equiv_pos_site_id + _symmetry_equiv_pos_as_xyz + 1 'x, y, z' +loop_ + _atom_site_type_symbol + _atom_site_label + _atom_site_symmetry_multiplicity + _atom_site_fract_x + _atom_site_fract_y + _atom_site_fract_z + _atom_site_occupancy + Si Si0 1 0.528855 0.000000 0.833333 1 + Si Si1 1 0.471145 0.471145 0.500000 1 + Si Si2 1 0.000000 0.528855 0.166667 1 + O O3 1 0.413167 0.147706 0.620242 1 + O O4 1 0.852294 0.265462 0.953576 1 + O O5 1 0.734538 0.586833 0.286909 1 + O O6 1 0.265462 0.852294 0.046424 1 + O O7 1 0.147706 0.413167 0.379758 1 + O O8 1 0.586833 0.734538 0.713091 1 +loop_ +_atom_site_aniso_label +_atom_site_aniso_U_11 +_atom_site_aniso_U_22 +_atom_site_aniso_U_33 +_atom_site_aniso_U_23 +_atom_site_aniso_U_13 +_atom_site_aniso_U_12 +Si0 0.00850 0.00695 0.00611 -0.00019 -0.00009 0.00348 +Si1 0.00850 0.00850 0.00611 0.00009 -0.00009 0.00502 +Si2 0.00695 0.00850 0.00611 0.00009 0.00019 0.00348 +O3 0.01916 0.01120 0.01353 0.00249 -0.00411 0.00762 +O4 0.01120 0.01512 0.01353 -0.00660 -0.00249 0.00358 +O5 0.01512 0.01916 0.01353 0.00411 0.00660 0.01153 +O6 0.01512 0.01120 0.01353 0.00249 0.00660 0.00358 +O7 0.01120 0.01916 0.01353 0.00411 -0.00249 0.00762 +O8 0.01916 0.01512 0.01353 -0.00660 -0.00411 0.01153""") + + # Write CIF file with U_cif tensor + filepath = msqd_dos.write_cif_file(filepath=None, temp=300) + assert filepath.endswith(".cif") + same_structure = abilab.abiopen(filepath) + assert same_structure.formula == msqd_dos.structure.formula + assert len(same_structure) == len(msqd_dos.structure) + # NB: lattice.matrix and cart_coords are not necessarily the + # same when we read the structure from CIF because the lattice + # is initialized from_angles_and_lenghts + #self.assert_almost_equal(same_structure.lattice.matrix, msqd_dos.structure.lattice.matrix) + + for s1, s2 in zip(same_structure, msqd_dos.structure): + assert s1.specie.symbol == s2.specie.symbol + self.assert_almost_equal(s1.frac_coords, s2.frac_coords, decimal=5) + #self.assert_almost_equal(s1.coords, s2.coords, decimal=5) + + maxerr = msqd_dos.check_site_symmetries(temp=300, verbose=1) + assert maxerr < 1e-10 + + # Get dict with results and try to encode with MontyEncoder + jdoc = msqd_dos.get_json_doc(tstart=10, tstop=10, num=1) + from monty.json import json, MontyEncoder + assert json.dumps(jdoc, cls=MontyEncoder) + + if self.has_matplotlib(): + assert msqd_dos.plot(show=False) + assert msqd_dos.plot(view="all", show=False) + assert msqd_dos.plot_tensor(show=False) + assert msqd_dos.plot_tensor(view="all", show=False) + assert msqd_dos.plot_uiso(show=False) + assert msqd_dos.plot_uiso(view="all", show=False) + assert msqd_dos.plot_uiso(view="all", what="vel", show=False) diff --git a/abipy/dfpt/tests/test_phonons.py b/abipy/dfpt/tests/test_phonons.py index c39d7fe6b..0a6d49e6f 100644 --- a/abipy/dfpt/tests/test_phonons.py +++ b/abipy/dfpt/tests/test_phonons.py @@ -1,6 +1,4 @@ """Tests for phonons""" -from __future__ import print_function, division, unicode_literals, absolute_import - import unittest import sys import os @@ -10,7 +8,7 @@ import abipy.core.abinit_units as abu from abipy import abilab -from abipy.dfpt.phonons import (PhononBands, PhononDos, PhdosFile, InteratomicForceConstants, phbands_gridplot, +from abipy.dfpt.phonons import (PhononBands, PhononDos, PhdosFile, phbands_gridplot, PhononBandsPlotter, PhononDosPlotter, dataframe_from_phbands) from abipy.dfpt.ddb import DdbFile from abipy.core.testing import AbipyTest @@ -43,6 +41,7 @@ def test_base(self): assert phbands.phdispl_cart.shape == (phbands.nqpt, phbands.num_branches, phbands.num_branches) # a + b gives plotter assert hasattr(same_phbands_nc + phbands, "combiplot") + assert phbands.epsinf is None and phbands.zcart is None self.serialize_with_pickle(phbands, protocols=[-1], test_eq=False) @@ -95,7 +94,7 @@ def test_base(self): for iq in range(len(eig)): #print("About to test iq", iq, np.dot(eig[iq], eig[iq].T)) #assert np.allclose(np.dot(eig[iq], eig[iq].T), cidentity , atol=1e-5, rtol=1e-3) - assert np.allclose(np.dot(eig[iq].conjugate().T, eig[iq]), cidentity , atol=1e-5, rtol=1e-3) + assert np.allclose(np.dot(eig[iq].conjugate().T, eig[iq]), cidentity, atol=1e-5, rtol=1e-3) #self.assert_almost_equal(np.dot(eig[iq].conjugate().T, eig[iq]), cidentity) # Mapping reduced coordinates -> labels @@ -109,7 +108,7 @@ def test_base(self): } if self.has_matplotlib(): - assert phbands.plot(units="Thz", show=False) + assert phbands.plot(units="Thz", show=False, temp=300) assert phbands.plot_fatbands(units="ha", qlabels=qlabels, show=False) assert phbands.plot_fatbands(phdos_file=abidata.ref_file("trf2_5.out_PHDOS.nc"), units="thz", show=False) assert phbands.plot_colored_matched(units="cm^-1", show=False) @@ -379,6 +378,8 @@ def test_from_phdosfile(self): if self.has_matplotlib(): assert ncfile.plot_pjdos_type(show=False) assert ncfile.plot_pjdos_type(units="cm-1", stacked=False, colormap="viridis", show=False) + assert ncfile.plot_pjdos_type(units="eV", stacked=True, colormap="jet", + exchange_xy=True, fontsize=8, show=False) assert ncfile.plot_pjdos_cartdirs_type(units="Thz", stacked=True, show=False) assert ncfile.plot_pjdos_cartdirs_type(units="meV", stacked=False, alpha=0.5, show=False) assert ncfile.plot_pjdos_cartdirs_site(units="meV", stacked=False, alpha=0.5, show=False) diff --git a/abipy/dfpt/tests/test_qha.py b/abipy/dfpt/tests/test_qha.py index d9892d7e0..d29c2675b 100644 --- a/abipy/dfpt/tests/test_qha.py +++ b/abipy/dfpt/tests/test_qha.py @@ -1,10 +1,9 @@ """Tests for frozen_phonons""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os +import warnings import abipy.data as abidata -from abipy.dfpt.qha import QHA +from abipy.dfpt.qha import QHA, QHA3PF, QHA3P, QHAQmeshAnalyzer from abipy.dfpt.phonons import PhononBands from abipy.core.testing import AbipyTest @@ -14,15 +13,15 @@ class QhaTest(AbipyTest): @classmethod def setUpClass(cls): cls.strains = [-4, -2, 0, 2, 4, 6] - path = os.path.join(abidata.dirpath, "refs", "si_qha") - cls.gsr_paths = [os.path.join(path, "mp-149_{:+d}_GSR.nc".format(s)) for s in cls.strains] - cls.dos_paths = [os.path.join(path, "mp-149_{:+d}_PHDOS.nc".format(s)) for s in cls.strains] - cls.phbs = [PhononBands.from_file(os.path.join(path, "mp-149_{:+d}_PHBST.nc".format(s))) for s in - cls.strains[2:4]] + dirpath = os.path.join(abidata.dirpath, "refs", "si_qha") + cls.gsr_paths = [os.path.join(dirpath, "mp-149_{:+d}_GSR.nc".format(s)) for s in cls.strains] + cls.dos_paths = [os.path.join(dirpath, "mp-149_{:+d}_PHDOS.nc".format(s)) for s in cls.strains] + cls.ddb_paths = [os.path.join(dirpath, "mp-149_{:+d}_DDB".format(s)) for s in cls.strains] + cls.phbs_list = [PhononBands.from_file(os.path.join(dirpath, "mp-149_{:+d}_PHBST.nc".format(s))) for s in + cls.strains[2:4]] def test_qha(self): - """Base tests for QHA""" - + """Testing QHA""" qha = QHA.from_files(self.gsr_paths, self.dos_paths) self.assertEqual(qha.nvols, len(self.strains)) @@ -53,9 +52,15 @@ def test_qha(self): assert qha.plot_thermal_expansion_coeff(num=6, show=False) assert qha.plot_vol_vs_t(num=6, show=False) # fake temperatures to test the plotting function. - assert qha.plot_phbs(self.phbs, temperatures=[10, 20], show=False) + assert qha.plot_phbs(self.phbs_list, temperatures=[10, 20], show=False) + + with self.assertRaises(RuntimeError): + QHA.from_files(self.gsr_paths[0:2], self.dos_paths[2:0:-1]) + with self.assertRaises(RuntimeError): + QHA.from_files(self.gsr_paths[0:2], self.dos_paths[0:1]) def test_phonopy_object(self): + """Testing QHA phonopy object.""" self.skip_if_not_phonopy() qha = QHA.from_files(self.gsr_paths, self.dos_paths) @@ -67,3 +72,128 @@ def test_phonopy_object(self): if self.has_matplotlib(): qha_ph.plot_thermal_expansion() + def test_qha_qmesh_analyzer(self): + """Testing QHAQmeshAnalyzer.""" + qhana = QHAQmeshAnalyzer(self.gsr_paths[1:5], self.ddb_paths[1:5]) + with self.assertRaises(RuntimeError): + qhana.set_eos("murnaghan") + with self.assertRaises(RuntimeError): + assert qhana.plot_energies(title="Energies as a function of V for different T", show=False) + + qhana.run_qlist([2,]) + + qhana.set_eos("birch_murnaghan") + assert qhana.ngqpt_list.shape == (1, 3) + assert qhana.num_qmeshes == 1 + assert len(qhana.qha_list) == 1 + + if self.has_matplotlib(): + assert qhana.plot_energies(title="Energies as a function of V for different T", show=False) + assert qhana.plot_thermal_expansion_coeff(title="Thermal expansion as a function of T", show=False) + assert qhana.plot_vol_vs_t(title="Volume as a function of T", show=False) + + +class Qha3pfTest(AbipyTest): + + @classmethod + def setUpClass(cls): + cls.strains = [-4, -2, 0, 2, 4, 6] + path = os.path.join(abidata.dirpath, "refs", "si_qha") + cls.gsr_paths = [os.path.join(path, "mp-149_{:+d}_GSR.nc".format(s)) for s in cls.strains] + cls.dos_paths = [os.path.join(path, "mp-149_{:+d}_PHDOS.nc".format(s)) for s in cls.strains] + + def test_qha3pf(self): + """Testing QHA3PF""" + + qha = QHA3PF.from_files(self.gsr_paths, self.dos_paths[1:4], ind_doses=[1, 2, 3]) + + self.assertEqual(qha.nvols, len(self.strains)) + self.assertEqual(qha.natoms, 2) + + f = qha.fit_energies(tstart=0, tstop=300, num=3) + self.assertArrayEqual(f.tot_en.shape, (len(self.strains), 3)) + self.assertAlmostEqual(f.min_en[0], -230.15433223031306, places=6) + + self.assertEqual(qha.eos._eos_name, "vinet") + qha.set_eos("murnaghan") + self.assertEqual(qha.eos._eos_name, "murnaghan") + + te = qha.get_thermal_expansion_coeff(num=4) + self.assertAlmostEqual(te.values[1], 1.2773693323408941e-05) + + self.assertAlmostEqual(qha.get_vol_at_t(200), 41.10212044734946, places=4) + + tmpdir = self.mkdtemp() + qha.write_phonopy_qha_inputs(num=3, path=tmpdir) + + if self.has_matplotlib(): + assert qha.plot_energies(num=6, show=False) + assert qha.plot_thermal_expansion_coeff(num=6, show=False) + assert qha.plot_vol_vs_t(num=6, show=False) + + def test_phonopy_object(self): + self.skip_if_not_phonopy() + + qha = QHA3PF.from_files(self.gsr_paths, self.dos_paths[1:4], ind_doses=[1, 2, 3]) + + from phonopy.qha import QHA as QHA_phonopy + qha_ph = qha.get_phonopy_qha(tstop=500, num=11) + self.assertIsInstance(qha_ph, QHA_phonopy) + qha_ph.run() + if self.has_matplotlib(): + qha_ph.plot_thermal_expansion() + + +class Qha3pTest(AbipyTest): + + @classmethod + def setUpClass(cls): + cls.strains = [-4, -2, 0, 2, 4, 6] + path = os.path.join(abidata.dirpath, "refs", "si_qha") + cls.gsr_paths = [os.path.join(path, "mp-149_{:+d}_GSR.nc".format(s)) for s in cls.strains] + cls.gruns_path = os.path.join(path, "mp-149_GRUNS.nc") + warnings.simplefilter("ignore") + + def tearDown(self): + warnings.resetwarnings() + + def test_qha3p(self): + """Base tests for QHA3PF""" + qha = QHA3P.from_files(self.gsr_paths, self.gruns_path, ind_doses=[1, 2, 3]) + + self.assertEqual(qha.nvols, len(self.strains)) + self.assertEqual(qha.natoms, 2) + + f = qha.fit_energies(tstart=0, tstop=300, num=3) + self.assertArrayEqual(f.tot_en.shape, (len(self.strains), 3)) + self.assertAlmostEqual(f.min_en[0], -230.15458036894498, places=6) + + self.assertEqual(qha.eos._eos_name, "vinet") + qha.set_eos("murnaghan") + self.assertEqual(qha.eos._eos_name, "murnaghan") + + te = qha.get_thermal_expansion_coeff(num=4) + self.assertAlmostEqual(te.values[1], 1.2725767394824783e-05) + + self.assertAlmostEqual(qha.get_vol_at_t(200), 41.1083743159003, places=4) + + tmpdir = self.mkdtemp() + qha.write_phonopy_qha_inputs(num=3, path=tmpdir) + + if self.has_matplotlib(): + assert qha.plot_energies(num=6, show=False) + assert qha.plot_thermal_expansion_coeff(num=6, show=False) + assert qha.plot_vol_vs_t(num=6, show=False) + + def test_phonopy_object(self): + self.skip_if_not_phonopy() + + qha = QHA3P.from_files(self.gsr_paths, self.gruns_path, ind_doses=[1, 2, 3]) + + from phonopy.qha import QHA as QHA_phonopy + qha_ph = qha.get_phonopy_qha(tstop=500, num=11) + self.assertIsInstance(qha_ph, QHA_phonopy) + qha_ph.run() + if self.has_matplotlib(): + qha_ph.plot_thermal_expansion() + qha.close() diff --git a/abipy/dfpt/tests/test_raman.py b/abipy/dfpt/tests/test_raman.py new file mode 100644 index 000000000..823286991 --- /dev/null +++ b/abipy/dfpt/tests/test_raman.py @@ -0,0 +1,44 @@ +"""Tests for Raman module.""" +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy.dfpt.raman import Raman + + +class RamanTest(AbipyTest): + + def test_raman(self): + """Testsing Raman.""" + + r = Raman.from_file(abidata.ref_file("AlAs_nl_dte_anaddb.nc")) + + im = r.get_modes_intensities(temp=300, laser_freq=2.54, non_anal_dir=0) + self.assertArrayEqual(im.shape, (6, 3, 3)) + self.assertAlmostEqual(im[3, 0, 1], 0.03668238755672564) + + il = r.get_lorentz_intensity(temp=300, laser_freq=2.54, non_anal_dir=None, width=0.001, num=100) + self.assertAlmostEqual(il[0][1].values[50], 11.558435430746329) + + il = r.get_lorentz_intensity(temp=300, laser_freq=20491, non_anal_dir=None, width=5, + pol_in="x", pol_out="y", units="cm-1", relative=True) + self.assertAlmostEqual(il.values[501], 0.9991991198326963) + + pi = r.get_powder_intensity(temp=300, laser_freq=2.54, relative=True) + self.assertArrayEqual(pi.perp.shape, (6,)) + self.assertAlmostEqual(pi.tot[5], 1) + + pil = r.get_powder_lorentz_intensity(temp=300, laser_freq=2.54, non_anal_dir=0, width=0.001, num=100) + self.assertAlmostEqual(pil.tot.values[50], 109.47538037690873) + + if self.has_matplotlib(): + assert r.plot_intensity(temp=300, laser_freq=20491, non_anal_dir=None, width=5, + value="powder", units="cm-1", relative=True, show=False) + assert r.plot_intensity(temp=300, laser_freq=2.54, non_anal_dir=0, width=0.0001, + value="xy", units="eV", relative=False, show=False, plot_phfreqs=True) + + assert r.plot_intensity(temp=300, laser_freq=2.54, non_anal_dir=None, width=None, + value="xz", units="eV", relative=False, show=False) + + def test_fail_parse(self): + with self.assertRaises(ValueError): + Raman.from_file(abidata.ref_file("alas_anaddb.nc")) diff --git a/abipy/dfpt/tests/test_vsound.py b/abipy/dfpt/tests/test_vsound.py new file mode 100644 index 000000000..944ee561e --- /dev/null +++ b/abipy/dfpt/tests/test_vsound.py @@ -0,0 +1,34 @@ +"""Tests for phtk module.""" +import os +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy.dfpt.vsound import SoundVelocity + + +class SoundVelocityTest(AbipyTest): + + def test_from_ddb(self): + + ddb_path = os.path.join(abidata.dirpath, "refs", "si_sound_vel", "Si_DDB") + sv = SoundVelocity.from_ddb(ddb_path, num_points=5) + + self.assertAlmostEqual(sv.sound_velocities[0,0], 5573.880942238931, places=4) + self.assertEqual(sv.labels[0], "X") + + df = sv.get_dataframe() + + if self.has_matplotlib(): + assert sv.plot_fit_freqs_dir(0, show=False) + assert sv.plot(show=False) + + if self.has_nbformat(): + assert sv.write_notebook(nbpath=self.get_tmpname(text=True)) + + def test_from_phb(self): + phb_path = os.path.join(abidata.dirpath, "refs", "si_sound_vel", "Si_sound_PHBST.nc") + sv = SoundVelocity.from_phbst(phb_path, ignore_neg_freqs=False) + + self.assertAlmostEqual(sv.sound_velocities[1, 1], 5624.764713502484, places=4) + self.assertIsNone(sv.labels) + df = sv.get_dataframe() diff --git a/abipy/dfpt/vsound.py b/abipy/dfpt/vsound.py new file mode 100644 index 000000000..e60cc3b38 --- /dev/null +++ b/abipy/dfpt/vsound.py @@ -0,0 +1,380 @@ +# coding: utf-8 +"""Tools to compute speed of sound.""" +import os +import math +import numpy as np +import pandas as pd +import abipy.core.abinit_units as abu + +from abipy.core.mixins import Has_Structure, NotebookWriter +from abipy.dfpt.ddb import DdbFile +from abipy.dfpt.phonons import PhononBands, get_dyn_mat_eigenvec, match_eigenvectors +from abipy.abio.inputs import AnaddbInput +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, set_visible +from pymatgen.core.units import bohr_to_angstrom, eV_to_Ha + + +class SoundVelocity(Has_Structure, NotebookWriter): + """ + Compute the speed of sound by fitting phonon frequencies along selected directions + by linear least-squares fit. + """ + def __init__(self, directions, sound_velocities, mode_types, structure, + labels=None, phfreqs=None, qpts=None): + """ + Args: + directions: list of qpoints identifying the directions for the calculation + of the speed of sound. In fractional coordinates. + sound_velocities: array of shape (len(directions), 3) with the values of the + sound velocities in SI units. + mode_types: array of shape (len(directions), 3) with the type of modes (transverse, + longitudinal). None if not known. + structure: |Structure| object. + labels: list with the same length as direction with labels for the directions. + phfreqs: array with shape (len(directions), 3, num_points) with the acoustic phonon + frequencies along the directions. + qpts: array with shape (len(directions), num_points, 3) with the coordinates of + the qpoints in fractional used to fit the phonon frequencies. + """ + self.directions = np.array(directions) + self.sound_velocities = np.array(sound_velocities) + self.mode_types = mode_types + self.labels = labels + self.phfreqs = np.array(phfreqs) if phfreqs else None + self.qpts = np.array(qpts) if qpts else None + self._structure = structure + + @property + def structure(self): + """|Structure| object""" + return self._structure + + @property + def n_directions(self): + """Number of directions.""" + return len(self.directions) + + @classmethod + def from_ddb(cls, ddb_path, directions=None, labels=None, num_points=20, qpt_norm=0.1, + ignore_neg_freqs=True, asr=2, chneut=1, dipdip=1, ngqpt=None, spell_check=True, + anaddb_kwargs=None, verbose=0, mpi_procs=1, workdir=None, manager=None): + """ + Creates and instance of the object. Runs anaddb along the specified + directions or the standard directions in the standard paths given + in :cite:`Setyawan2010`. The values of the speed of sound + will be calculated as the slope of the linear fits along each direction. + + Args: + ddb_path (str): path to the ddb file. + directions (list): list of qpoints identifying the directions for the calculation + of the speed of sound. In fractional coordinates. + labels (list): list of string with the name of the directions. + num_points (int): number of points calculated along each direction and used to + fit the speed of sound. + qpt_norm (float): Norm of the largest point in fractional coordinates for + each of the directions considered. + ignore_neg_freqs (bool): if True points with negative frequencies will not be + considered in the fit, in order to ignore inaccuracies in the long range + behavior. + asr, chneut, dipdip: Anaddb input variable. See official documentation. + ngqpt: Number of divisions for the q-mesh in the DDB file. Auto-detected if None (default). + anaddb_kwargs: additional kwargs for anaddb. + verbose: verbosity level. Set it to a value > 0 to get more information. + mpi_procs: Number of MPI processes to use. + workdir: Working directory. If None, a temporary directory is created. + manager: |TaskManager| object. If None, the object is initialized from the configuration file. + + Returns: an instance of SoundVelocity + """ + with DdbFile(ddb_path) as ddb: + if ngqpt is None: ngqpt = ddb.guessed_ngqpt + + inp = AnaddbInput(ddb.structure, comment="ANADDB input for speed of sound", + anaddb_kwargs=anaddb_kwargs, spell_check=spell_check) + + q1shft = [[0, 0, 0]] + inp.set_vars( + ifcflag=1, + ngqpt=np.array(ngqpt), + q1shft=q1shft, + nqshft=len(q1shft), + asr=asr, + chneut=chneut, + dipdip=dipdip, + ) + + if not directions: + hs = ddb.structure.hsym_kpath + kpath = hs.kpath + + directions = [] + labels = [] + + for chunk in kpath["path"]: + for i, q in enumerate(chunk): + if "Gamma" in q: + if i > 0 and q not in labels: + new_q = kpath["kpoints"][chunk[i - 1]] + directions.append(new_q) + labels.append(chunk[i - 1]) + if i < len(chunk) - 1 and q not in labels: + new_q = kpath["kpoints"][chunk[i + 1]] + directions.append(new_q) + labels.append(chunk[i + 1]) + + qpts = [] + for q in directions: + q = qpt_norm * q / np.linalg.norm(q) + steps = q / num_points + qpts.extend((steps[:, None] * np.arange(num_points)).T) + + n_qpoints = len(qpts) + qph1l = np.zeros((n_qpoints, 4)) + + qph1l[:, :-1] = qpts + qph1l[:, -1] = 1 + + inp['qph1l'] = qph1l.tolist() + inp['nph1l'] = n_qpoints + + task = ddb._run_anaddb_task(inp, mpi_procs=mpi_procs, workdir=workdir, manager=manager, + verbose=verbose) + + phbst_path = os.path.join(task.workdir, "run.abo_PHBST.nc") + + return cls.from_phbst(phbst_path, ignore_neg_freqs=ignore_neg_freqs, labels=labels) + + @classmethod + def from_phbst(cls, phbst_path, ignore_neg_freqs=True, labels=None): + """ + Creates an instance of the object starting interpolating the acoustic frequencies + from a PHBST netcdf file. + The file should contain a series of directions starting from gamma and with the + same number of points for each direction, as the one produced in the from_ddb method. + + Args: + phbst_path: path to the PHBST netcdf file. + ignore_neg_freqs (bool): if True points with negative frequencies will not be + considered in the fit, in order to ignore inaccuracies in the long range + behavior. + labels (list): list of string with the name of the directions. + + Returns: an instance of SoundVelocity + """ + phb = PhononBands.from_file(phbst_path) + structure = phb.structure + + rlatt = structure.lattice.reciprocal_lattice + # q points in cartesian coordinate in 1/bohr, the original units are 1/A + qpt_cart_coords = [rlatt.get_cartesian_coords(c) * bohr_to_angstrom for c in + phb.qpoints.frac_coords] + qpt_cart_norms = np.linalg.norm(qpt_cart_coords, axis=1) + + # find the indices of the gamma points + gamma_ind = [] + for i, q in enumerate(phb.qpoints.frac_coords): + if np.array_equal(q, [0,0,0]): + gamma_ind.append(i) + + n_directions = len(gamma_ind) + + n_points = len(phb.qpoints) / n_directions + if not n_points.is_integer(): + raise ValueError('Error extracting information from {}'.format(phbst_path)) + n_points = int(n_points) + + phfreqs = phb.phfreqs + eigdisp = phb.phdispl_cart + + sound_velocities = [] + mode_types = [] + directions = [] + + all_acoustic_freqs = [] + all_qpts = [] + + for i in range(n_directions): + start = n_points * i + # index of the end point used for the slice + # (the position of the last point is actually end-1) + end = n_points * (i + 1) + dir_freqs = phfreqs[start: end] + dir_displ = eigdisp[start: end] + + # matching bands + dir_eigv = get_dyn_mat_eigenvec(dir_displ, structure, amu=phb.amu) + n_freqs = 3 * len(structure) + ind_match = np.zeros((n_points, n_freqs), dtype=np.int) + ind_match[0] = range(n_freqs) + + for j in range(1, n_points): + k = j - 1 + match = match_eigenvectors(dir_eigv[k], dir_eigv[j]) + ind_match[j] = [match[m] for m in ind_match[k]] + + acoustic_freqs = (dir_freqs[np.arange(n_points)[:, None], ind_match])[:, 0:3] + acoustic_displ = (dir_displ[np.arange(n_points)[:, None], ind_match])[:, 0:3] + + direction = phb.qpoints[end - 1].frac_coords + direction = np.array(direction) / np.linalg.norm(direction) + directions.append(direction) + + # identify the first (not gamma) qpoint with all positive frequencies + first_positive_freq_ind = None + for j in range(1, n_points): + if min(acoustic_freqs[j]) > 0: + first_positive_freq_ind = j + break + + if first_positive_freq_ind is None or first_positive_freq_ind - n_points / 2 > 0: + raise ValueError("Too many negative frequencies along direction {}".format(direction)) + + sv = [] + mt = [] + + cart_versor = qpt_cart_coords[end - 1] / np.linalg.norm(qpt_cart_coords[end - 1]) + for k in range(3): + start_fit = 0 + if ignore_neg_freqs and first_positive_freq_ind > 1: + start_fit = first_positive_freq_ind + slope, se, _, _ = np.linalg.lstsq(qpt_cart_norms[start+start_fit:end][:, np.newaxis], + acoustic_freqs[start_fit:, k] * eV_to_Ha, rcond=None) + sv.append(slope[0] * abu.velocity_at_to_si) + + # identify the type of the mode (longitudinal/transversal) based on the + # scalar product between the eigendisplacement and the direction. + disp_0 = acoustic_displ[first_positive_freq_ind + 1, k, 0:3] + disp_0 = disp_0 / np.linalg.norm(disp_0) + + scalar_prod = np.abs(np.dot(disp_0, cart_versor)) + if scalar_prod > 0.9: + mt.append("longitudinal") + elif scalar_prod < 0.1: + mt.append("transversal") + else: + mt.append(None) + + # sort the lists based on the sound velocites + sv, mt, freqs = zip(*sorted(zip(sv, mt, acoustic_freqs.T))) + + sound_velocities.append(sv) + mode_types.append(mt) + all_acoustic_freqs.append(freqs) + all_qpts.append(phb.qpoints.frac_coords[start:end]) + + return cls(directions=directions, sound_velocities=sound_velocities, mode_types=mode_types, + structure=structure, labels=labels, phfreqs=all_acoustic_freqs, qpts=all_qpts) + + def get_dataframe(self): + """ + Return a |pandas-DataFrame| with the data of the speed of sound. + """ + columns = ["direction", "label", "sound velocity (m/s)", "mode type"] + rows = [] + for i in range(self.n_directions): + for m in range(3): + rows.append([ + tuple(np.round(self.directions[i], decimals=3)), + self.labels[i] if self.labels else "", + self.sound_velocities[i][m], + self.mode_types[i][m] + ]) + + return pd.DataFrame(rows, columns=columns).set_index(["direction", "label"]) + + @add_fig_kwargs + def plot_fit_freqs_dir(self, idir, ax=None, units="eV", fontsize=8, **kwargs): + """ + Plots the phonon frequencies, if available, along the specified direction. + The line representing the fitted value will be shown as well. + + Args: + idir: index of the direction. + ax: |matplotlib-Axes| or None if a new figure should be created. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + fontsize: fontsize for legends and titles + + Returns: |matplotlib-Figure| + """ + if self.phfreqs is None or self.qpts is None: + raise ValueError("The plot requires phonon frequencies and qpoints.") + + ax, fig, plt = get_ax_fig_plt(ax=ax) + + ax.margins(x=0, y=0) + rlatt = self.structure.lattice.reciprocal_lattice + freqs = self.phfreqs[idir] + qpt_cart_coords = np.array([np.linalg.norm(rlatt.get_cartesian_coords(c)) for c in self.qpts[idir]]) + slope = self.sound_velocities[idir] / abu.velocity_at_to_si * bohr_to_angstrom / eV_to_Ha + + units_factor = abu.phfactor_ev2units(units) + + title = "[{:.3f}, {:.3f}, {:.3f}]".format(*self.directions[idir]) + if self.labels: + title += " - {}".format(self.labels[idir]) + + for i, c in enumerate(["r", "b", "g"]): + ax.scatter(qpt_cart_coords, freqs[i] * units_factor, color=c, marker="x") + ax.plot(qpt_cart_coords, slope[i] * qpt_cart_coords * units_factor, color=c, ls="-") + + ax.set_title(title, fontsize=fontsize) + ax.grid(True) + ax.set_xlabel("Wave Vector") + ax.set_ylabel(abu.wlabel_from_units(units)) + + return fig + + @add_fig_kwargs + def plot(self, units="eV", fontsize=8, **kwargs): + """ + Plots the phonon frequencies, if available, along all the directions. + The lines representing the fitted values will be shown as well. + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + fontsize: fontsize for legends and titles + + Returns: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=None) + from matplotlib.gridspec import GridSpec + + nrows, ncols = math.ceil(self.n_directions / 2), 2 + gspec = GridSpec(nrows=nrows, ncols=ncols, wspace=0.15, hspace=0.25) + + for i in range(self.n_directions): + axi = plt.subplot(gspec[i]) + self.plot_fit_freqs_dir(i, ax=axi, units=units, fontsize=fontsize, show=False) + if i != self.n_directions - 1: + set_visible(axi, False, "xlabel") + if i != 0: + set_visible(axi, False, "ylabel") + + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + """ + for i in range(self.n_directions): + yield self.plot_fit_freqs_dir(i) + + def write_notebook(self, nbpath=None): + """ + Write an jupyter_ notebook to nbpath. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + tmpfile = self.pickle_dump() + + nb.cells.extend([ + nbv.new_code_cell("sv = abilab.SoundVelocity.pickle_load('{}')".format(tmpfile)), + nbv.new_code_cell("sv.get_dataframe()") + ]) + if self.phfreqs is not None and self.qpts is not None: + for i in range(self.n_directions): + nb.cells.append(nbv.new_code_cell("sv.plot_fit_freqs_dir({});".format(i))) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/display/mvtk.py b/abipy/display/mvtk.py index 57a6db4d1..41674fd1c 100644 --- a/abipy/display/mvtk.py +++ b/abipy/display/mvtk.py @@ -4,8 +4,6 @@ WARNING: This code is still under development. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import itertools import numpy as np @@ -307,4 +305,4 @@ def anim(): t = (t + 1) % self.num_files yield - anim() \ No newline at end of file + anim() diff --git a/abipy/display/pandasw.py b/abipy/display/pandasw.py deleted file mode 100644 index 16bcbff0e..000000000 --- a/abipy/display/pandasw.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 -"""Widgets for Pandas Dataframes.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import pandas as pd -import ipywidgets as ipw -import abipy.display.utils as ut - -from functools import wraps - - -@wraps(pd.DataFrame.plot) -def plot(data, **kwargs): - - def plot_dataframe(x, y, kind, sharex, sharey, subplots, grid, legend, - logx, logy, loglog, colorbar, sort_columns): # pragma: no cover - - x, y = ut.widget2py(x, y) - sharex, colorbar = ut.str2bool_or_none(sharex, colorbar) - data.plot(x=x, y=y, kind=kind, subplots=subplots, sharex=None, sharey=sharey, - layout=None, figsize=None, use_index=True, title=None, grid=grid, legend=legend, style=None, - logx=logx, logy=logy, loglog=loglog, xticks=None, yticks=None, xlim=None, ylim=None, - rot=None, fontsize=None, colormap=colorbar, table=False, yerr=None, xerr=None, secondary_y=False, - sort_columns=sort_columns, **kwargs) - # There's a typo in the documentation (colorbar/colormap!) - #import matplotlib.pyplot as plt - #return plt.gcf() - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - plot_dataframe, - x=allcols, - y=allcols, - sharex=["None", "True", "False"], - sharey=False, - kind=["line", "bar", "barh", "hist", "box", "kde", "density", "area", "pie", "scatter", "hexbin"], - subplots=False, - grid=True, - legend=True, - logx=False, - logy=False, - loglog=False, - colorbar=["None", "True", "False"], - sort_columns=False, - ) \ No newline at end of file diff --git a/abipy/display/seabornw.py b/abipy/display/seabornw.py deleted file mode 100644 index 27d448d40..000000000 --- a/abipy/display/seabornw.py +++ /dev/null @@ -1,492 +0,0 @@ -# coding: utf-8 -r""" -Widgets for Pandas Dataframes based on seaborn API. - -API reference - -Distribution plots -jointplot(x, y[, data, kind, stat_func, ...]) Draw a plot of two variables with bivariate and univariate graphs. -pairplot(data[, hue, hue_order, palette, ...]) Plot pairwise relationships in a dataset. -distplot(a[, bins, hist, kde, rug, fit, ...]) Flexibly plot a univariate distribution of observations. -kdeplot(data[, data2, shade, vertical, ...]) Fit and plot a univariate or bivariate kernel density estimate. -rugplot(a[, height, axis, ax]) Plot datapoints in an array as sticks on an axis. - -Regression plots -lmplot(x, y, data[, hue, col, row, palette, ...]) Plot data and regression model fits across a FacetGrid. -regplot(x, y[, data, x_estimator, x_bins, ...]) Plot data and a linear regression model fit. -residplot(x, y[, data, lowess, x_partial, ...]) Plot the residuals of a linear regression. -coefplot(formula, data[, groupby, ...]) Plot the coefficients from a linear model. - -# Categorical plots -factorplot([x, y, hue, data, row, col, ...]) Draw a categorical plot onto a FacetGrid. -boxplot([x, y, hue, data, order, hue_order, ...]) Draw a box plot to show distributions with respect to categories. -violinplot([x, y, hue, data, order, ...]) Draw a combination of boxplot and kernel density estimate. -stripplot([x, y, hue, data, order, ...]) Draw a scatterplot where one variable is categorical. -swarmplot([x, y, hue, data, order, ...]) Draw a categorical scatterplot with non-overlapping points. -pointplot([x, y, hue, data, order, ...]) Show point estimates and confidence intervals using scatter plot glyphs. -barplot([x, y, hue, data, order, hue_order, ...]) Show point estimates and confidence intervals as rectangular bars. -countplot([x, y, hue, data, order, ...]) Show the counts of observations in each categorical bin using bars. - -Matrix plots -heatmap(data[, vmin, vmax, cmap, center, ...]) Plot rectangular data as a color-encoded matrix. -clustermap(data[, pivot_kws, method, ...]) Plot a hierarchically clustered heatmap of a pandas DataFrame - -Timeseries plots -tsplot(data[, time, unit, condition, value, ...]) Plot one or more timeseries with flexible representation of uncertainty. - -Miscellaneous plots -palplot(pal[, size]) Plot the values in a color palette as a horizontal array. - -Axis grids -FacetGrid(data[, row, col, hue, col_wrap, ...]) Subplot grid for plotting conditional relationships. -PairGrid(data[, hue, hue_order, palette, ...]) Subplot grid for plotting pairwise relationships in a dataset. -JointGrid(x, y[, data, size, ratio, space, ...]) Grid for drawing a bivariate plot with marginal univariate plots. -""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import sys -import ipywidgets as ipw -import seaborn as sns -import abipy.display.utils as ut - -from functools import wraps -from collections import OrderedDict -from IPython.display import display, clear_output - -__all__ = [ - #"api_selector", - # Distribution plots - "jointplot", - "pairplot", - #"distplot", - #"kdeplot", - #"rugplot", - # Regression plots - "lmplot", - #"regplot", - #"residplot", - #"coefplot", - # Categorical plots - "factorplot", - "boxplot", - "violinplot", - "stripplot", - "swarmplot", - "pointplot", - "barplot", - "countplot", - # Matrix plots - #"heatmap", - #"clustermap", - # Timeseries plots - #"tsplot", - # Miscellaneous plots - #"palplot", -] - - -#def api_selector(data, funcname="countplot"): -# """ -# A widgets with ToogleButtons that allow the user to select and display -# the widget associated to the different seaborn functions. -# """ -# this_module = sys.modules[__name__] -# name2wfunc = OrderedDict() -# for a in __all__: -# if a == "api_selector": continue -# func = this_module.__dict__.get(a) -# if not callable(func): continue -# name2wfunc[func.__name__] = func -# -# w1 = ipw.ToggleButtons(description='seaborn API', options=list(name2wfunc.keys())) -# w1.value = funcname -# w2 = name2wfunc[funcname](data) -# box = ipw.VBox(children=[w1, w2]) -# -# def on_value_change(change): -# #print(change) -# box.close() -# clear_output() -# api_selector(data, funcname=change["new"]) -# w1.observe(on_value_change, names='value') -# -# return display(box) - -#def _help_button(funcname): -# btn = ipw.Button(description="Help", button_style='info', tooltip='Click me', icon='check') -# btn.value = "help" -# def func(btn): -# open_seaborn_doc(funcname) -# btn.on_click(func) -# return btn -# -# -#def open_seaborn_doc(funcname): -# # http://seaborn.pydata.org/generated/seaborn.pairplot.html#seaborn.pairplot" -# url = "http://seaborn.pydata.org/generated/seaborn.%s.html#seaborn.%s" % (funcname, funcname) -# import webbrowser -# try: -# return webbrowser.open(url) -# except webbrowser.Error as exc: -# # Warn the user and ignore the exception. -# import warnings -# warnings.warn(str(exc) + "\nwhile trying to open url: %s" % url) - - -@wraps(sns.jointplot) -def jointplot(data, joint_kws=None, marginal_kws=None, annot_kws=None, **kwargs): - - def sns_joinplot(x, y, kind, color): # pragma: no cover - x, y, color = ut.widget2py(x, y, color) - # TODO: stat_func - return sns.jointplot(x, y, data=data, kind=kind, # stat_func=, - color=color, size=6, ratio=5, space=0.2, dropna=True, xlim=None, ylim=None, - joint_kws=joint_kws, marginal_kws=marginal_kws, annot_kws=annot_kws, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_joinplot, - x=allcols, - y=allcols, - kind=["scatter", "reg", "resid", "kde", "hex"], - color=ut.colors_dropdow(), - #button=_help_button("joinplot"), - ) - - -@wraps(sns.pairplot) -def pairplot(data, plot_kws=None, diag_kws=None, grid_kws=None): - # TODO: Write widget with multiple checkboxes to implement lists. - - def sns_pairplot(x_vars, y_vars, hue, kind, diag_kind): # pragma: no cover - x_vars, y_vars, hue = ut.widget2py(x_vars, y_vars, hue) - return sns.pairplot(data, hue=hue, hue_order=None, palette=None, vars=None, x_vars=x_vars, y_vars=y_vars, - kind=kind, diag_kind=diag_kind, markers=None, size=2.5, aspect=1, dropna=True, - plot_kws=plot_kws, diag_kws=diag_kws, grid_kws=grid_kws) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_pairplot, - x_vars=allcols, - y_vars=allcols, - hue=allcols, - kind=["scatter", "ref"], - diag_kind=["hist", "kde"], - ) - - -""" -@wraps(sns.distplot) -def distplot(data, fit=None, hist_kws=None, kde_kws=None, rug_kws=None, fit_kws=None): - - def sns_distplot(hist, kde, rug, color, vertical, norm_hist): - color = ut.widget2py(color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.distplot(a, bins=None, hist=hist, kde=kde, rug=rug, fit=fit, - hist_kws=hist_kws, kde_kws=kde_kws, rug_kws=rug_kws, fit_kws=fit_kws, - color=clor, vertical=vertical, norm_hist=norm_hist, axlabel=None, label=None, ax=ax) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_distplot, - hist=True, - kde=True, - rug=False, - color=ut.colors_dropdow(), - vertical=False, - norm_hist=False, - ) - - -@wraps(sns.kdeplot) -def kdeplot(data, **kwargs): - - def sns_kdeplot() - color = ut.widget2py(color) - ax, fig, _ = ut.get_ax_fig_plt() - - return sns.kdeplot(data, data2=None, shade=False, vertical=False, kernel='gau', bw='scott', - gridsize=100, cut=3, clip=None, legend=True, cumulative=False, shade_lowest=True, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_kdeplot, - color=ut.colors_dropdow(), - ) -""" - -#################### -# Regression plots # -#################### - -@wraps(sns.lmplot) -def lmplot(data, scatter_kws=None, line_kws=None): - - def sns_lmplot(x, y, hue, col, row, legend, size): # pragma: no cover - x, y, hue, col, row = ut.widget2py(x, y, hue, col, row) - - return sns.lmplot(x, y, data, hue=hue, col=col, row=row, palette=None, col_wrap=None, - size=size, aspect=1, markers='o', sharex=True, sharey=True, hue_order=None, - col_order=None, row_order=None, legend=legend, legend_out=True, - x_estimator=None, x_bins=None, x_ci='ci', scatter=True, fit_reg=True, - ci=95, n_boot=1000, units=None, order=1, logistic=False, lowess=False, robust=False, - logx=False, x_partial=None, y_partial=None, truncate=False, x_jitter=None, y_jitter=None, - scatter_kws=scatter_kws, line_kws=line_kws) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_lmplot, - x=allcols, - y=allcols, - hue=allcols, - col=allcols, - row=allcols, - legend=True, - size=ut.size_slider(default=5), - ) - - -#@wraps(sns.interactplot) -#def interactplot(data, contour_kws=None, scatter_kws=None, **kwargs): -# -# def sns_interactplot(x1, x2, y, filled, colorbar, logistic): -# ax, fig, _ = ut.get_ax_fig_plt() -# return sns.interactplot(x1, x2, y, data=data, filled=filled, cmap='RdBu_r', colorbar=colorbar, -# levels=30, logistic=logistic, contour_kws=contour_kws, scatter_kws=scatter_kws, -# ax=ax, **kwargs) -# -# allcols = list(data.keys()) -# return ipw.interact_manual( -# sns_interactplot, -# x1=allcols, -# x2=allcols, -# y=allcols, -# filled=False, -# colorbar=True, -# logistic=False, -# ) - - -##################### -# Categorical plots # -##################### - -@wraps(sns.factorplot) -def factorplot(data, facet_kws=None, **kwargs): - - def sns_factorplot(x, y, hue, color, kind, size, legend): # pragma: no cover - x, y, hue, color = ut.widget2py(x, y, hue, color) - return sns.factorplot(x=x, y=y, hue=hue, data=data, row=None, col=None, col_wrap=None, # estimator=, - ci=95, n_boot=1000, units=None, order=None, hue_order=None, row_order=None, col_order=None, - kind=kind, size=size, aspect=1, orient=None, color=color, palette=None, - legend=legend, legend_out=True, sharex=True, sharey=True, margin_titles=False, - facet_kws=facet_kws, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_factorplot, - x=allcols, - y=allcols, - hue=allcols, - color=ut.colors_dropdow(), - kind=["point", "bar", "count", "box", "violin", "strip"], - size=ut.size_slider(default=4), - legend=True, - ) - - -@wraps(sns.boxplot) -def boxplot(data, **kwargs): - - def sns_boxplot(x, y, hue, orient, color, saturation, notch): # pragma: no cover - x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.boxplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, orient=orient, - color=color, palette=None, saturation=saturation, width=0.8, fliersize=5, linewidth=None, - whis=1.5, notch=notch, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_boxplot, - x=allcols, - y=allcols, - hue=allcols, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - saturation=ut.saturation_slider(default=0.75), - notch=False, - ) - - -@wraps(sns.violinplot) -def violinplot(data, **kwargs): - - def sns_violinplot(x, y, hue, bw, scale, inner, split, orient, color, saturation): # pragma: no cover - x, y, hue, inner, orient, color = ut.widget2py(x, y, hue, inner, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - - sns.violinplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, - bw=bw, cut=2, scale=scale, scale_hue=True, - gridsize=100, width=0.8, inner=inner, split=split, orient=orient, - linewidth=None, color=color, palette=None, saturation=saturation, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_violinplot, - x=allcols, - y=allcols, - hue=allcols, - bw=["scott", "silverman", "float"], - scale=["area", "count", "width"], - inner=["box", "quartile", "point", "stick", "None"], - split=False, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - saturation=ut.saturation_slider(default=0.75), - ) - - -@wraps(sns.stripplot) -def stripplot(data, **kwargs): - - def sns_stripplot(x, y, hue, split, orient, color, size, linewidth): # pragma: no cover - x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.stripplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, jitter=False, - split=split, orient=orient, color=color, palette=None, size=size, edgecolor='gray', - linewidth=linewidth, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_stripplot, - x=allcols, - y=allcols, - hue=allcols, - split=False, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - size=ut.size_slider(default=5), - linewidth=ut.linewidth_slider(default=0), - ) - - -@wraps(sns.swarmplot) -def swarmplot(data, **kwargs): - - def sns_swarmplot(x, y, hue, split, orient, color, size, linewidth): # pragma: no cover - x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.swarmplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, - split=split, orient=orient, color=color, palette=None, size=size, - edgecolor='gray', linewidth=linewidth, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_swarmplot, - x=allcols, - y=allcols, - hue=allcols, - split=False, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - size=ut.size_slider(default=5), - linewidth=ut.linewidth_slider(default=0), - ) - - -@wraps(sns.pointplot) -def pointplot(data, **kwargs): - - def sns_pointplot(x, y, hue, split, join, orient, color, linewidth): # pragma: no cover - x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.pointplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, # estimator=, - ci=95, n_boot=1000, units=None, markers='o', linestyles='-', dodge=False, join=join, scale=1, - orient=orient, color=color, palette=None, ax=ax, errwidth=None, capsize=None, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_pointplot, - x=allcols, - y=allcols, - hue=allcols, - split=False, - join=True, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - linewidth=ut.linewidth_slider(default=0), - ) - - -@wraps(sns.barplot) -def barplot(data, **kwargs): - - def sns_barplot(x, y, hue, orient, color, saturation): # pragma: no cover - x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.barplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, # estimator=, - ci=95, n_boot=1000, units=None, orient=orient, color=color, palette=None, - saturation=saturation, errcolor='.26', ax=ax, **kwargs) # errwidth=None, capsize=None, # New args added in ?? - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_barplot, - x=allcols, - y=allcols, - hue=allcols, - orient=["None", "v", "h"], - color=ut.colors_dropdow(), - saturation=ut.saturation_slider(default=0.75), - ) - - -@wraps(sns.countplot) -def countplot(data, **kwargs): - - def sns_countplot(x, y, hue, color, saturation): # pragma: no cover - x, y, hue, color = ut.widget2py(x, y, hue, color) - ax, fig, _ = ut.get_ax_fig_plt() - return sns.countplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None, orient=None, - color=color, palette=None, saturation=saturation, ax=ax, **kwargs) - - allcols = ["None"] + list(data.keys()) - return ipw.interact_manual( - sns_countplot, - x=allcols, - y=allcols, - hue=allcols, - color=ut.colors_dropdow(), - saturation=ut.saturation_slider(default=0.75), - ) - -################ -# Matrix plots # -################ - -@wraps(sns.heatmap) -def heatmap(data, annot_kws=None, cbar_kws=None, **kwargs): - - def sns_heatmap(): # pragma: no cover - ax, fig, _ = ut.get_ax_fig_plt() - return sns.heatmap(data, vmin=None, vmax=None, cmap=None, center=None, robust=False, annot=None, - fmt='.2g', annot_kws=annot_kws, linewidths=0, linecolor='white', cbar=True, - cbar_kws=cbar_kws, cbar_ax=None, square=False, ax=ax, - xticklabels=True, yticklabels=True, mask=None, **kwargs) - - return ipw.interact_manual( - sns_heatmap, - ) - - -@wraps(sns.clustermap) -def clustermap(data, pivot_kws=None, cbar_kws=None, **kwargs): - - def sns_clustermap(): # pragma: no cover - return sns.clustermap(data, pivot_kws=pivot_kws, method='average', metric='euclidean', - z_score=None, standard_scale=None, figsize=None, cbar_kws=cbar_kws, - row_cluster=True, col_cluster=True, row_linkage=None, col_linkage=None, - row_colors=None, col_colors=None, mask=None, **kwargs) - - return ipw.interact_manual( - sns_clustermap, - ) diff --git a/abipy/display/tests/test_mvtk.py b/abipy/display/tests/test_mvtk.py index f9c58fe0c..688a328b3 100644 --- a/abipy/display/tests/test_mvtk.py +++ b/abipy/display/tests/test_mvtk.py @@ -1,7 +1,4 @@ """Tests for psps module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - -#import numpy as np import abipy.data as abidata from abipy.core.testing import AbipyTest diff --git a/abipy/display/tests/test_pandasw.py b/abipy/display/tests/test_pandasw.py deleted file mode 100644 index 6c0b9d5f7..000000000 --- a/abipy/display/tests/test_pandasw.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Tests for pandasw module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - -import abipy.display.pandasw as pdw - -from abipy.core.testing import AbipyTest - - -class PandasWidgetTest(AbipyTest): - - def test_pandasw(self): - """Test ipython widget for pandas.""" - if not self.has_ipywidgets(): - raise self.SkipTest("This test requires ipywidgets") - - import seaborn as sns - data = sns.load_dataset("iris") - assert pdw.plot(data) diff --git a/abipy/display/tests/test_seabornw.py b/abipy/display/tests/test_seabornw.py deleted file mode 100644 index 71147f75e..000000000 --- a/abipy/display/tests/test_seabornw.py +++ /dev/null @@ -1,56 +0,0 @@ -"""Tests for seabornw module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - -import numpy as np -import pandas as pd -import seaborn as sns -import abipy.display.seabornw as snw - -from abipy.core.testing import AbipyTest - - -class SeabornWidgetTest(AbipyTest): - - def test_seabornw(self): - """Test ipython widget for seaborn.""" - if not self.has_ipywidgets(): - raise self.SkipTest("This test requires ipywidgets") - - tips = sns.load_dataset("tips") - snw.jointplot(tips) - - titanic = sns.load_dataset("titanic") - snw.countplot(titanic) - - tips = sns.load_dataset("tips") - snw.jointplot(tips) - snw.swarmplot(tips) - snw.lmplot(tips) - - exercise = sns.load_dataset("exercise") - snw.factorplot(exercise) - snw.violinplot(tips) - snw.stripplot(tips) - snw.swarmplot(tips) - snw.pointplot(tips) - snw.barplot(tips) - - np.random.seed(0) - uniform_data = np.random.rand(10, 12) - snw.heatmap(uniform_data) - - flights = sns.load_dataset("flights") - flights = flights.pivot("month", "year", "passengers") - snw.clustermap(flights) - - # Generate a random dataset with strong simple effects and an interaction - #n = 80 - #rs = np.random.RandomState(11) - #x1 = rs.randn(n) - #x2 = x1 / 5 + rs.randn(n) - #b0, b1, b2, b3 = .5, .25, -1, 2 - #y = b0 + b1 * x1 + b2 * x2 + b3 * x1 * x2 + rs.randn(n) - #df = pd.DataFrame(np.c_[x1, x2, y], columns=["x1", "x2", "y"]) - - # Show a scatterplot of the predictors with the estimated model surface - #snw.interactplot(df) diff --git a/abipy/display/utils.py b/abipy/display/utils.py index a0e4b6d02..ec2d79c13 100644 --- a/abipy/display/utils.py +++ b/abipy/display/utils.py @@ -1,11 +1,9 @@ # coding: utf-8 """Tools to build ipython widgets.""" -from __future__ import print_function, division, unicode_literals, absolute_import import ipywidgets as ipw from collections import OrderedDict -from abipy.tools.plotting import get_ax_fig_plt #def add_docstrings(*tuples): @@ -164,10 +162,11 @@ def saturation_slider(default=0.75, orientation="horizontal"): readout_format='.1f' ) + # Have colormaps separated into categories: # http://matplotlib.org/examples/color/colormaps_reference.html _mpl_categ_cmaps = OrderedDict([ - #('Perceptually Uniform Sequential', + #('Perceptually Uniform Sequential', ('Uniform', ['viridis', 'inferno', 'plasma', 'magma']), ('Sequential', ['Blues', 'BuGn', 'BuPu', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', @@ -191,6 +190,7 @@ def saturation_slider(default=0.75, orientation="horizontal"): # flat list. _mpl_cmaps = [cm for sublist in _mpl_categ_cmaps.values() for cm in sublist] + def colormap_widget(default=None): options = _mpl_cmaps value = options[0] diff --git a/abipy/dynamics/hist.py b/abipy/dynamics/hist.py index 6f17a1b60..7158cf6c8 100644 --- a/abipy/dynamics/hist.py +++ b/abipy/dynamics/hist.py @@ -1,7 +1,5 @@ # coding: utf-8 """History file with structural relaxation results.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import pymatgen.core.units as units @@ -17,6 +15,7 @@ from abipy.core.mixins import AbinitNcFile, NotebookWriter from abipy.abio.robots import Robot from abipy.iotools import ETSF_Reader +import abipy.core.abinit_units as abu class HistFile(AbinitNcFile, NotebookWriter): @@ -40,7 +39,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(HistFile, self).__init__(filepath) + super().__init__(filepath) self.reader = HistReader(filepath) def close(self): @@ -66,7 +65,6 @@ def __str__(self): # """Number of independent spin densities.""" # return self.reader.read_dimvalue("nspden") - #@lazy_property #def nspinor(self): # """Number of spinor components.""" @@ -126,7 +124,7 @@ def to_string(self, verbose=0, title=None): app("") cart_stress_tensors, pressures = self.reader.read_cart_stress_tensors() - app("Stress tensor (Cartesian coordinates in Ha/Bohr**3):\n%s" % cart_stress_tensors[-1]) + app("Stress tensor (Cartesian coordinates in GPa):\n%s" % cart_stress_tensors[-1]) app("Pressure: %.3f [GPa]" % pressures[-1]) return "\n".join(lines) @@ -167,18 +165,20 @@ def get_relaxation_analyzer(self): """ return RelaxationAnalyzer(self.initial_structure, self.final_structure) - def to_xdatcar(self, filepath=None, groupby_type=True, **kwargs): + def to_xdatcar(self, filepath=None, groupby_type=True, to_unit_cell=False, **kwargs): """ Return Xdatcar pymatgen object. See write_xdatcar for the meaning of arguments. Args: + to_unit_cell (bool): Whether to translate sites into the unit cell. kwargs: keywords arguments passed to Xdatcar constructor. """ - filepath = self.write_xdatcar(filepath=filepath, groupby_type=groupby_type, overwrite=True) + filepath = self.write_xdatcar(filepath=filepath, groupby_type=groupby_type, + to_unit_cell=to_unit_cell, overwrite=True) from pymatgen.io.vasp.outputs import Xdatcar return Xdatcar(filepath, **kwargs) - def write_xdatcar(self, filepath="XDATCAR", groupby_type=True, overwrite=False): + def write_xdatcar(self, filepath="XDATCAR", groupby_type=True, overwrite=False, to_unit_cell=False): """ Write Xdatcar file with unit cell and atomic positions to file ``filepath``. @@ -189,6 +189,7 @@ def write_xdatcar(self, filepath="XDATCAR", groupby_type=True, overwrite=False): there are post-processing tools (e.g. ovito) that do not work as expected if the atoms in the structure are not grouped by type. overwrite: raise RuntimeError, if False and filepath exists. + to_unit_cell (bool): Whether to translate sites into the unit cell. Return: path to Xdatcar file. @@ -242,6 +243,9 @@ def write_xdatcar(self, filepath="XDATCAR", groupby_type=True, overwrite=False): # Write atomic positions in reduced coordinates. xred_list = self.reader.read_value("xred") + if to_unit_cell: + xred_list = xred_list % 1 + for step in range(self.num_steps): fh.write("Direct configuration= %d\n" % (step + 1)) frac_coords = xred_list[step, group_ids] @@ -250,10 +254,13 @@ def write_xdatcar(self, filepath="XDATCAR", groupby_type=True, overwrite=False): return filepath - def visualize(self, appname="ovito"): # pragma: no cover + def visualize(self, appname="ovito", to_unit_cell=False): # pragma: no cover """ Visualize the crystalline structure with visualizer. See :class:`Visualizer` for the list of applications and formats supported. + + Args: + to_unit_cell (bool): Whether to translate sites into the unit cell. """ if appname == "mayavi": return self.mayaview() @@ -263,7 +270,7 @@ def visualize(self, appname="ovito"): # pragma: no cover if visu.name != "ovito": raise NotImplementedError("visualizer: %s" % visu.name) - filepath = self.write_xdatcar(filepath=None, groupby_type=True) + filepath = self.write_xdatcar(filepath=None, groupby_type=True, to_unit_cell=to_unit_cell) return visu(filepath)() #if options.trajectories: @@ -271,13 +278,13 @@ def visualize(self, appname="ovito"): # pragma: no cover #else: # hist.mvanimate() - def plot_ax(self, ax, what, fontsize=12, **kwargs): + def plot_ax(self, ax, what, fontsize=8, **kwargs): """ Helper function to plot quantity ``what`` on axis ``ax``. Args: - fontsize: fontsize for legend - kwargs are passed to matplotlib plot method + fontsize: fontsize for legend. + kwargs are passed to matplotlib plot method. """ label = None if what == "energy": @@ -297,7 +304,7 @@ def plot_ax(self, ax, what, fontsize=12, **kwargs): ax.set_ylabel("abc (A)") elif what in ("a", "b", "c"): - i = ("a", "b", "c").index(what) + i = ("a", "b", "c").index(what) marker = kwargs.pop("marker", None) if marker is None: marker = {"a": "o", "b": "^", "c": "v"}[what] @@ -316,7 +323,7 @@ def plot_ax(self, ax, what, fontsize=12, **kwargs): ax.set_ylabel(r"$\alpha\beta\gamma$ (degree)") elif what in ("alpha", "beta", "gamma"): - i = ("alpha", "beta", "gamma").index(what) + i = ("alpha", "beta", "gamma").index(what) marker = kwargs.pop("marker", None) if marker is None: marker = {"alpha": "o", "beta": "^", "gamma": "v"}[what] @@ -366,33 +373,45 @@ def plot_ax(self, ax, what, fontsize=12, **kwargs): if label is not None: ax.legend(loc='best', fontsize=fontsize, shadow=True) - @add_fig_kwargs - def plot(self, ax_list=None, fontsize=8, **kwargs): + def plot(self, what_list=None, ax_list=None, fontsize=8, **kwargs): """ Plot the evolution of structural parameters (lattice lengths, angles and volume) as well as pressure, info on forces and total energy. Args: + what_list: ax_list: List of |matplotlib-Axes|. If None, a new figure is created. fontsize: fontsize for legend Returns: |matplotlib-Figure| """ - what_list = ["abc", "angles", "volume", "pressure", "forces", "energy"] - nrows, ncols = 3, 2 - ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + if what_list is None: + what_list = ["abc", "angles", "volume", "pressure", "forces", "energy"] + else: + what_list = list_strings(what_list) + + nplots = len(what_list) + nrows, ncols = 1, 1 + if nplots > 1: + ncols = 2 + nrows = nplots // ncols + nplots % ncols + + ax_list, fig, plt = get_axarray_fig_plt(ax_list, nrows=nrows, ncols=ncols, sharex=True, sharey=False, squeeze=False) ax_list = ax_list.ravel() assert len(ax_list) == len(what_list) + # don't show the last ax if nplots is odd. + if nplots % ncols != 0: ax_list[-1].axis("off") + for what, ax in zip(what_list, ax_list): self.plot_ax(ax, what, fontsize=fontsize, marker="o") return fig @add_fig_kwargs - def plot_energies(self, ax=None, fontsize=12, **kwargs): + def plot_energies(self, ax=None, fontsize=8, **kwargs): """ Plot the total energies as function of the iteration step. @@ -483,8 +502,8 @@ def mvanimate(self, delay=500): # pragma: no cover @mlab.animate(delay=delay, ui=True) def anim(): """Animate.""" - for it, structure in enumerate(self.structures): #for it in range(self.num_steps): + for it, structure in enumerate(self.structures): print('Updating scene for iteration:', it) #mlab.clf(figure=figure) mvtk.plot_structure(structure, style=style, figure=figure) @@ -496,6 +515,11 @@ def anim(): anim() + def get_panel(self): + """Build panel with widgets to interact with the |HistFile| either in a notebook or in panel app.""" + from abipy.panels.hist import HistFilePanel + return HistFilePanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current @@ -527,7 +551,7 @@ def to_string(self, verbose=0): """String representation with verbosity level ``verbose``.""" s = "" if verbose: - s = super(HistRobot, self).to_string(verbose=0) + s = super().to_string(verbose=0) df = self.get_dataframe() s_df = "Table with final structures, pressures in GPa and force stats in eV/Ang:\n\n%s" % str(df) if s: @@ -662,7 +686,7 @@ def combiplot(self, what_list=None, colormap="jet", fontsize=6, **kwargs): for i, (ax, what) in enumerate(zip(ax_list, what_list)): for ih, hist in enumerate(self.abifiles): - label= None if i != 0 else hist.relpath + label = None if i != 0 else hist.relpath hist.plot_ax(ax, what, color=cmap(ih / len(self)), label=label, fontsize=fontsize) if label is not None: @@ -780,7 +804,7 @@ def read_reduced_forces(self): def read_cart_stress_tensors(self): """ - Return the stress tensors (nstep x 3 x 3) in cartesian coordinates (Hartree/Bohr^3) + Return the stress tensors (nstep x 3 x 3) in cartesian coordinates (GPa) and the list of pressures in GPa unit. """ # Abinit stores 6 unique components of this symmetric 3x3 tensor: @@ -794,9 +818,9 @@ def read_cart_stress_tensors(self): tensors[step, i,j] = c[step, 3+p] tensors[step, j,i] = c[step, 3+p] - HaBohr3_GPa = 29421.033 # 1 Ha/Bohr^3, in GPa + tensors *= abu.HaBohr3_GPa pressures = np.empty(self.num_steps) for step, tensor in enumerate(tensors): - pressures[step] = - (HaBohr3_GPa/3) * tensor.trace() + pressures[step] = - tensor.trace() / 3 return tensors, pressures diff --git a/abipy/dynamics/tests/test_hist.py b/abipy/dynamics/tests/test_hist.py index 19d74c137..df5203616 100644 --- a/abipy/dynamics/tests/test_hist.py +++ b/abipy/dynamics/tests/test_hist.py @@ -1,10 +1,9 @@ """"Tests for HIST.nc files.""" -from __future__ import division, print_function, unicode_literals - import abipy.data as abidata from abipy import abilab from abipy.core.testing import AbipyTest from abipy.dynamics.hist import HistFile, HistRobot +import abipy.core.abinit_units as abu class HistFileTest(AbipyTest): @@ -52,7 +51,7 @@ def test_hist_api(self): self.assert_almost_equal(pressures[-1], -1.4745E-03) self.assert_almost_equal(cart_stress_tensors[-1, 1, 0], 0.0) for i in range(3): - self.assert_almost_equal(cart_stress_tensors[-1, i, i], 5.01170783E-08) + self.assert_almost_equal(cart_stress_tensors[-1, i, i], 5.01170783E-08 * abu.HaBohr3_GPa) same_structure = abilab.Structure.from_file(abidata.ref_file("sic_relax_HIST.nc")) self.assert_almost_equal(same_structure.frac_coords, hist.final_structure.frac_coords) @@ -64,8 +63,8 @@ def test_hist_api(self): self.assert_almost_equal(xdatcar.structures[-1].frac_coords, hist.structures[-1].frac_coords) xdatcar_nogroup = hist.to_xdatcar(filepath=None, groupby_type=False) - assert xdatcar.structures[0] == xdatcar_nogroup.structures[0] - assert xdatcar.structures[-1] == xdatcar_nogroup.structures[-1] + assert xdatcar.structures[0] == xdatcar_nogroup.structures[0] + assert xdatcar.structures[-1] == xdatcar_nogroup.structures[-1] # Test matplotlib plots. if self.has_matplotlib(): @@ -80,6 +79,9 @@ def test_hist_api(self): assert hist.mvplot_trajectories(show=False) #assert hist.mvanimate(delay=100) + if self.has_panel(): + assert hasattr(hist.get_panel(), "show") + hist.close() def test_hist_robot(self): diff --git a/abipy/electrons/__init__.py b/abipy/electrons/__init__.py index aac3ffbc1..3d849bd66 100644 --- a/abipy/electrons/__init__.py +++ b/abipy/electrons/__init__.py @@ -1,4 +1,5 @@ """This module provides classes and functions for the analysis of electronic properties.""" +# flake8: noqa from .ebands import * from .gsr import * from .gw import * diff --git a/abipy/electrons/arpes.py b/abipy/electrons/arpes.py index d98a8833e..016a606ad 100644 --- a/abipy/electrons/arpes.py +++ b/abipy/electrons/arpes.py @@ -2,16 +2,10 @@ """ Arpese Plotter (still under development) """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np -#from collections import OrderedDict from scipy.interpolate import UnivariateSpline -#from monty.string import marquee # is_string, list_strings -#from monty.functools import lazy_property from monty.collections import dict2namedtuple -#from monty.termcolor import cprint from abipy.core.mixins import Has_Structure, Has_ElectronBands, NotebookWriter from abipy.electrons import ElectronBands from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_ax3d_fig_plt, get_axarray_fig_plt #set_axlims, @@ -19,7 +13,6 @@ class ArpesPlotter(Has_Structure, Has_ElectronBands, NotebookWriter): """ - Usage example: .. code-block:: python @@ -35,7 +28,7 @@ def model_from_ebands(cls, ebands, tmesh=(0, 300, 600), poorman_polaron=False): ebands = ElectronBands.as_ebands(ebands) ntemp = len(tmesh) - nwr = 1000 + nwr = 1000 wr_step = 0.01 aw = np.empty((ebands.nsppol, ebands.nkpt, ebands.mband, ntemp, nwr)) @@ -126,31 +119,31 @@ def with_points_along_path(self, frac_bounds=None, knames=None, dist_tol=1e-12): dist_tol: A point is considered to be on the path if its distance from the line is less than dist_tol. """ - r = self.ebands.with_points_along_path(frac_bounds=frac_coords, knames=knames, dist_tol=dist_tol) + r = self.ebands.with_points_along_path(frac_bounds=frac_bounds, knames=knames, dist_tol=dist_tol) # Transfer data using r.ik_new2prev table. return self.__class__(r.ebands, aw=self.aw[:, :, :, r.ik_new2prev, :].copy(), aw_meshes=self.aw_meshes[:, r.ik_new2prev, :].copy(), tmesh=self.tmesh) - def interpolate(self): - new_ebands = self.ebands.interpolate(lpratio=5, vertices_names=None, line_density=20, - kmesh=None, is_shift=None, filter_params=None, verbose=0) + #def interpolate(self): + # new_ebands = self.ebands.interpolate(lpratio=5, vertices_names=None, line_density=20, + # kmesh=None, is_shift=None, filter_params=None, verbose=0) - # Build interpolator. - #from abipy.core.skw import SkwInterpolator - #my_kcoords = [k.frac_coords for k in self.kpoints] - #cell = (self.structure.lattice.matrix, self.structure.frac_coords, - # self.structure.atomic_numbers) + # # Build interpolator. + # #from abipy.core.skw import SkwInterpolator + # #my_kcoords = [k.frac_coords for k in self.kpoints] + # #cell = (self.structure.lattice.matrix, self.structure.frac_coords, + # # self.structure.atomic_numbers) - #skw = SkwInterpolator(lpratio, my_kcoords, self.eigens, self.fermie, self.nelect, - # cell, fm_symrel, self.has_timrev, - # filter_params=filter_params, verbose=verbose) + # #skw = SkwInterpolator(lpratio, my_kcoords, self.eigens, self.fermie, self.nelect, + # # cell, fm_symrel, self.has_timrev, + # # filter_params=filter_params, verbose=verbose) - # Interpolate energies. - #eigens_kpath = skw.interp_kpts(kfrac_coords).eigens + # # Interpolate energies. + # #eigens_kpath = skw.interp_kpts(kfrac_coords).eigens - return self.__class__(new_ebands, new_aw, aw_meshes, self.tmesh) + # return self.__class__(new_ebands, new_aw, aw_meshes, self.tmesh) def get_emesh_eminmax(self, estep): """Compute linear mesh covering entire energy range.""" @@ -325,7 +318,7 @@ def plot_ak_vs_temp(self, temp_inds=None, spins=None, band_inds=None, kpt_inds=N for it, itemp in enumerate(temp_inds): ys = spin_sign * atw[it] + (it * apad) ax.plot(xs, ys, lw=2, alpha=0.8, color=cmap(float(it) / ntemp), - label = "T = %.1f K" % self.tmesh[itemp] if (ik, isp) == (0, 0) else None) + label="T = %.1f K" % self.tmesh[itemp] if (ik, isp) == (0, 0) else None) if spin == 0: kpt = self.ebands.kpoints[ikpt] diff --git a/abipy/electrons/bse.py b/abipy/electrons/bse.py index c37cf6759..bfaf1a944 100644 --- a/abipy/electrons/bse.py +++ b/abipy/electrons/bse.py @@ -1,22 +1,17 @@ # coding: utf-8 """Classes for the analysis of BSE calculations""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import sys import os import itertools import numpy as np import pandas as pd from collections import OrderedDict -from monty.collections import AttrDict from monty.functools import lazy_property from monty.string import marquee, is_string from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt from abipy.core.func1d import Function1D from abipy.core.kpoints import Kpoint, KpointList from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter -from abipy.core.tensor import SymmetricTensor from abipy.iotools import ETSF_Reader from abipy.tools.plotting import set_axlims from abipy.tools import duck @@ -25,7 +20,6 @@ __all__ = [ - "DielectricTensor", "DielectricFunction", "MdfFile", "MdfReader", @@ -34,7 +28,8 @@ ] -class DielectricTensor(object): +# Deprecated: should be rewritten from scratch. +class _DielectricTensor(object): """ This object stores the frequency-dependent macroscopic dielectric tensor obtained from the dielectric functions for different q-directions. @@ -54,7 +49,7 @@ def __init__(self, mdf, structure): # One tensor for each frequency all_tensors = [] for ifrq, freq in enumerate(mdf.wmesh): - tensor = SymmetricTensor.from_directions(mdf.qfrac_coords, all_emacros[:,ifrq], + tensor = _SymmetricTensor.from_directions(mdf.qfrac_coords, all_emacros[:,ifrq], structure.lattice.reciprocal_lattice, space="g") all_tensors.append(tensor) @@ -235,12 +230,6 @@ def qfrac_coords(self): # """String with the type of calculation.""" # return self.info["calc_type"] - #def show_info(self, stream=sys.stdout): - # """Pretty print of the info.""" - # import pprint - # printer = pprint.PrettyPrinter(self, width=80, depth=None, stream=stream) - # printer.pprint(self.info) - @add_fig_kwargs def plot(self, ax=None, **kwargs): """ @@ -332,7 +321,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(MdfFile, self).__init__(filepath) + super().__init__(filepath) self.reader = MdfReader(filepath) # TODO Add electron Bands. @@ -460,7 +449,7 @@ def plot_mdfs(self, cplx_mode="Im", mdf_type="all", qpoint=None, **kwargs): def get_tensor(self, mdf_type="exc"): """Get the macroscopic dielectric tensor from the MDF.""" - return DielectricTensor(self.get_mdf(mdf_type), self.structure) + return _DielectricTensor(self.get_mdf(mdf_type), self.structure) def yield_figs(self, **kwargs): # pragma: no cover """ @@ -503,7 +492,7 @@ class MdfReader(ETSF_Reader): #ElectronsReader """ def __init__(self, path): """Initialize the object from a filename.""" - super(MdfReader, self).__init__(path) + super().__init__(path) # Read the structure here to facilitate the creation of the other objects. self._structure = self.read_structure() @@ -669,7 +658,7 @@ class MultipleMdfPlotter(object): MDF_TYPECPLX2TEX = { "exc": dict(re=r"$\Re(\varepsilon_{exc})$", im=r"$\Im(\varepsilon_{exc}$)", abs=r"$|\varepsilon_{exc}|$"), "rpa": dict(re=r"$\Re(\varepsilon_{rpa})$", im=r"$\Im(\varepsilon_{rpa})$", abs=r"$|\varepsilon_{rpa}|$"), - "gwrpa": dict(re=r"$\Re(\varepsilon_{gw-rpa})$", im=r"$\Im(\varepsilon_{gw-rpa})$", abs= r"$|\varepsilon_{gw-rpa}|$"), + "gwrpa": dict(re=r"$\Re(\varepsilon_{gw-rpa})$", im=r"$\Im(\varepsilon_{gw-rpa})$", abs=r"$|\varepsilon_{gw-rpa}|$"), } #alpha = 0.6 @@ -1023,3 +1012,158 @@ def write_notebook(self, nbpath=None): nb.cells.extend(self.get_ebands_code_cells()) return self._write_nb_nbpath(nb, nbpath) + + +def _from_cart_to_red(cartesian_tensor,lattice): + mat = lattice.inv_matrix + red_tensor = np.dot(np.dot(np.transpose(mat), cartesian_tensor), mat) + return red_tensor + + +# TODO Remove +class _Tensor(object): + """Representation of a 3x3 tensor""" + + def __init__(self, red_tensor, lattice, space="r"): + """ + Args: + red_tensor: array-like object with the 9 cartesian components of the tensor + lattice: Lattice object defining the reference system + space: + "r" if the lattice is a real space lattice + "g" if the lattice is a reciprocal space lattice + """ + self._reduced_tensor = red_tensor + self._lattice = lattice + self.space = space + + if space == "g": + self._is_real_space = False + elif space == "r": + self._is_real_space = True + else: + raise ValueError("space should be either 'g' or 'r'") + + def __eq__(self, other): + if other is None: return False + return (np.allclose(self.reduced_tensor, other.reduced_tensor) and + self.lattice == other.lattice and + self.space == other.space) + + def __ne__(self, other): + return not (self == other) + + def __repr__(self): + return self.to_string() + + def __str__(self): + return repr(self) + + def to_string(self, verbose=0, with_reduced=False): + lines = [] + app = lines.append + + app("Tensor in %s space." % self.space) + app("") + app("Cartesian coordinates:") + app(str(self.cartesian_tensor)) + + if with_reduced: + app("") + app(str(self.lattice)) + app("Reduced coordinates:") + app(str(self.reduced_tensor)) + + return "\n".join(lines) + + @property + def lattice(self): + return self._lattice + + @property + def reduced_tensor(self): + return self._reduced_tensor + + @property + def is_real_space(self): + return self._is_real_space + + @property + def cartesian_tensor(self): + mat = self._lattice.matrix + return np.dot(np.dot(np.transpose(mat), self._reduced_tensor), mat) + + @classmethod + def from_cartesian_tensor(cls, cartesian_tensor, lattice, space="r"): + red_tensor = _from_cart_to_red(cartesian_tensor, lattice) + return cls(red_tensor, lattice,space) + + def symmetrize(self, structure): + tensor = self._reduced_tensor + + if self._is_real_space: + real_lattice = self._lattice + else: + real_lattice = self._lattice.reciprocal_lattice + + # I guess this is the reason why tensor.symmetrize (omega) is so slow! + from pymatgen.symmetry.analyzer import SpacegroupAnalyzer + real_finder = SpacegroupAnalyzer(structure) + + real_symmops = real_finder.get_point_group_operations(cartesian=True) + + cartesian_tensor = self.cartesian_tensor + + sym_tensor = np.zeros((3,3)) + + my_tensor = cartesian_tensor + + for real_sym in real_symmops: + mat = real_sym.rotation_matrix + prod_sym = np.dot(np.transpose(mat),np.dot(cartesian_tensor,mat)) + sym_tensor = sym_tensor + prod_sym + + sym_tensor = sym_tensor/len(real_symmops) + + self._reduced_tensor = _from_cart_to_red(sym_tensor,self._lattice) + + +class _SymmetricTensor(_Tensor): + """Representation of a 3x3 symmetric tensor""" + + @classmethod + def from_directions(cls, qpoints, values, lattice, space): + """ + Build a `_SymmetricTensor` from the values computed along 6 directions. + + Args: + qpoints: fractional coordinates of 6 independent q-directions + values: values of (q^T E q)/(q^T q) along the 6 qpoints + lattice: `Lattice` object defining the reference system + space: "r" if the lattice is a real space lattice + "g" if the lattice is a reciprocal space lattice + """ + assert len(qpoints) == 6 and len(values) == len(qpoints) + + mat = lattice.matrix + metric = np.dot(np.transpose(mat),mat) + + coeffs_red = np.zeros((6,6)) + + for (iqpt,qpt) in enumerate(qpoints): + metqpt = np.dot(metric,qpt) + + coeffs_red[iqpt,:] = [metqpt[0]**2,metqpt[1]**2,metqpt[2]**2, + 2*metqpt[0]*metqpt[1],2*metqpt[0]*metqpt[2],2*metqpt[1]*metqpt[2]] + + normqpt_red = np.dot(np.transpose(qpt),np.dot(metric,qpt)) + + coeffs_red[iqpt,:] = coeffs_red[iqpt,:] / normqpt_red + + red_symm = np.linalg.solve(coeffs_red,values) + + red_tensor = [[red_symm[0],red_symm[3],red_symm[4]], + [red_symm[3],red_symm[1],red_symm[5]], + [red_symm[4],red_symm[5],red_symm[2]]] + + return cls(red_tensor, lattice, space) diff --git a/abipy/electrons/charges.py b/abipy/electrons/charges.py index 39c4ab2d6..d942e7bc6 100644 --- a/abipy/electrons/charges.py +++ b/abipy/electrons/charges.py @@ -1,7 +1,5 @@ # coding: utf-8 """HirshfeldCharges.""" -from __future__ import print_function, division, unicode_literals, absolute_import - from abipy.core.mixins import Has_Structure from abipy.core.fields import Density from abipy.electrons.denpot import DensityFortranFile @@ -14,6 +12,7 @@ import numpy as np import os import tempfile + import logging logger = logging.getLogger(__name__) @@ -90,7 +89,6 @@ def from_cut3d_outfile(cls, filepath, structure): else: raise RuntimeError('The file does not contain Hirshfeld charges') - for i in range(start_hirshfeld_i, start_hirshfeld_i+len(structure)): l = lines[i] electron_charges.append(float(l.split()[2])) @@ -181,4 +179,4 @@ def from_files(cls, density_path, pseudopotential_paths, with_core=True, workdir charges = [ba.get_charge(i) for i in range(len(structure))] - return cls(charges, structure, atomic_charges) \ No newline at end of file + return cls(charges, structure, atomic_charges) diff --git a/abipy/electrons/ddk.py b/abipy/electrons/ddk.py deleted file mode 100644 index 2ff7faf8f..000000000 --- a/abipy/electrons/ddk.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 -"""DDK.nc file.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import numpy as np -import pymatgen.core.units as units - -from monty.string import marquee # is_string, list_strings, -from monty.functools import lazy_property -from monty.collections import dict2namedtuple -from abipy.core.func1d import Function1D -from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter -from abipy.tools import gaussian, duck -from abipy.electrons.ebands import ElectronsReader -from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt #, set_axlims - - -class DdksAnalyzer(object): - """ - This object received three ddks files with derivatives along the 3 reduced directions. - """ - - def __init__(self, ddk_paths): - # Open files here. The order of input ddk_paths does not matter as long as we can fill all ddks. - self.ddks = ddks = 3 * [None] - for path in ddk_paths: - ddk = DdkFile(path) - ddks[ddk.idir - 1] = ddk - if any(ddk is None for ddk in ddks): - raise ValueError("Cannot find 3 DDK files with different idir.") - - # Consistency check - errors = [] - eapp = errors.append - if any(ddk.structure != ddks[0].structure for ddk in ddks[1:]): - eapp("Structures in DDK files do not agree with each other.") - if any(ddk.kptopt != ddks[0].kptopt for ddk in ddks[1:]): - eapp("Found different values of kptopt.") - if any(ddk.ebands.kpoints != ddks[0].ebands.kpoints for ddk in ddks[1:]): - eapp("Found different list of k-kpoints.") - for aname in ("nsppol", "nspden", "nspinor"): - if any(getattr(ddk.ebands, aname) != getattr(ddks[0].ebands, aname) for ddk in ddks[1:]): - eapp("Found different value of %s" % aname) - if errors: - raise ValueError("\n".join(errors)) - - # Get useful dimensions. - eb0 = ddks[0].ebands - self.nsppol, self.nspinor, self.nspden = eb0.nsppol, eb0.nspinor, eb0.nspden - self.nband = eb0.nband - self.kpoints = eb0.kpoints - self.nkpt = len(eb0.kpoints) - self.weights = eb0.kpoints.weights - self.eigens = eb0.eigens - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - for ddk in self.ddks: - try: - ddk.close() - except Exception: - pass - - def __str__(self): - """String representation.""" - return self.to_string() - - def to_string(self, verbose=0): - """String representation.""" - return "\n\n".join(ddk.to_string(verbose=verbose) for ddk in self.ddks) - - @lazy_property - def v_skb(self): - v_skb = np.empty((self.nsppol, self.nkpt, self.nband, 3)) - for i, ddk in enumerate(self.ddks): - v_skb[:, :, :, i] = ddk.reader.read_ddk_diagonal() - return v_skb - - #def get_averaged_v(self, isolevels): - - def get_doses(self, method="gaussian", step=0.1, width=0.2): - """ - Compute the electronic DOS on a linear mesh. - - Args: - method: String defining the method for the computation of the DOS. - step: Energy step (eV) of the linear mesh. - width: Standard deviation (eV) of the gaussian. - - Returns: |ElectronDos| object. - """ - self.kpoints.check_weights() - edos = self.ddks[0].ebands.get_edos(method=method, step=step, width=width) - values = np.zeros((self.nsppol, nw)) - mesh = edos[0].mesh - #vmod_skb = self.vskb - if method == "gaussian": - for spin in range(self.nsppol): - for k, kpoint in enumerate(self.kpoints): - wk = kpoint.weight - for band in range(self.nband): - e = self.eigens[spin, k, band] - values[spin] += wk * vmod[spin, k, band] * gaussian(mesh, width, center=e) - else: - raise NotImplementedError("Method %s is not supported" % method) - - vdos_spin = [Function1D(mesh, values[spin]) for spin in range(self.nsppol)] - vdos = 2 * Function1D(mesh, values[0]) if self.nsppol == 1 else vdos_spin[0] + vdos_spin[1] - - return dict2namedtuple(edos=edos, vdos=vdos, vdos_spin=vdos_spin) - - @add_fig_kwargs - def plot_vdos(self, method="gaussian", step=0.1, width=0.2, **kwargs): - """ - - Return: |matplotlib-Figure| - """ - import matplotlib.pyplot as plt - fig, ax_mat = plt.subplots(nrows=2, ncols=1, sharex=True, sharey=False, squeeze=True) - r = self.get_doses(method=method, step=step, width=width) - #r.edos - #r.vdos - return fig - - @add_fig_kwargs - def plot_ebands_with_doses(self, ebands_kpath, doses, ylims=None, **kwargs): - """ - Plot band structure and doses - - Args: - ebands_kpath: - doses: - ylims: Set the data limits for the x-axis in eV. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used - - Return: |matplotlib-Figure| - """ - # Build grid plot. - import matplotlib.pyplot as plt - from matplotlib.gridspec import GridSpec - fig = plt.figure() - ncols = 3 - width_ratios = [2, 0.2, 0.2] - gspec = GridSpec(1, ncols, width_ratios=width_ratios) - gspec.update(wspace=0.05) - - ax_ebands = plt.subplot(gspec[0]) - ax_doses = [] - for i in range(2): - ax = plt.subplot(gspec[i + 1], sharey=ax_ebands) - ax_doses.append(ax) - ax.grid(True) - set_axlims(ax, ylims, "y") - - # Plot electron bands. - ebands_kpath.plot(ax=ax_ebands, ylims=ylims, show=False) - - # Plot DOSes. - #doses.edos.plot - #vdos.edos.plot - #ax.set_ylabel("") - - return fig - - # TODO - #def plot_vfield(self, **kwargs): - #def plot_v_on_isosurface(self, **kwargs): - - -class DdkFile(AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter): - """ - File containing the DDK matrix elements for a single `idir` direction - - Usage example: - - .. code-block:: python - - with DdkFile("out_DDK.nc") as ddk: - ddk.ebands.plot() - """ - @classmethod - def from_file(cls, filepath): - """Initialize the object from a netcdf_ file.""" - return cls(filepath) - - def __init__(self, filepath): - super(DdkFile, self).__init__(filepath) - self.reader = DdkReader(filepath) - - # Get info on perturbation and k-point sampling. - self.kptopt = self.reader.read_value("kptopt") - #assert self.kptopt == 2 - pertcase = self.reader.read_value("pertcase") - self.idir = ((pertcase - 1) % 3) + 1 - self.ipert = (pertcase - self.idir) // 3 + 1 - - #@lazy_property - #def dedk_idir - # return self.reader.read_value("dedk_bbmat_idir") - - def __str__(self): - """String representation.""" - return self.to_string() - - def to_string(self, verbose=0): - """String representation.""" - lines = []; app = lines.append - - app(marquee("File Info", mark="=")) - app(self.filestat(as_string=True)) - app("") - app(self.structure.to_string(verbose=verbose, title="Structure")) - app("") - app(self.ebands.to_string(with_structure=False, title="Electronic Bands")) - app(marquee("DDK perturbation", mark="=")) - app("idir: {}, ipert: {}, kptopt: {}".format(self.idir, self.ipert, self.kptopt)) - - if verbose > 1: - app("") - app(self.hdr.to_string(verbose=verbose, title="Abinit Header")) - - return "\n".join(lines) - - @lazy_property - def ebands(self): - """|ElectronBands| object.""" - return self.reader.read_ebands() - - @property - def structure(self): - """|Structure| object.""" - return self.ebands.structure - - @lazy_property - def params(self): - """:class:`OrderedDict` with parameters that might be subject to convergence studies.""" - od = self.get_ebands_params() - return od - - def close(self): - """Close the file.""" - self.reader.close() - - def yield_figs(self, **kwargs): # pragma: no cover - """ - This function *generates* a predefined list of matplotlib figures with minimal input from the user. - Used in abiview.py to get a quick look at the results. - """ - yield self.structure.plot(show=False) - #yield self.ebands.plot(show=False) - - def write_notebook(self, nbpath=None, title=None): - """ - Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current - working directory is created. Return path to the notebook. - """ - nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=title) - - nb.cells.extend([ - nbv.new_code_cell("ddk = abilab.abiopen('%s')" % self.filepath), - nbv.new_code_cell("print(ddk)"), - nbv.new_code_cell("ddk.ebands.plot();"), - #nbv.new_code_cell("ddk.ebands.kpoints.plot();"), - nbv.new_code_cell("""\ -if ddk.ebands.kpoints.is_ibz: - ddk.ebands.get_edos().plot();"""), - ]) - - return self._write_nb_nbpath(nb, nbpath) - - -class DdkReader(ElectronsReader): - """ - This object reads the results stored in the DDK.nc file - It provides helper function to access the most important quantities. - """ - def __init__(self, filepath): - super(DdkReader, self).__init__(filepath) - nband_sk = self.read_nband_sk() - if np.any(nband_sk != nband_sk[0, 0]): - raise NotImplementedError("Found different number of bands per k-point, spin.\nnband_sk: %s\n" % - str(nband_sk)) - self.mband = nband_sk[0, 0] - - def read_ddk_diagonal(self): - """ - Read the group velocities i.e the diagonal matrix elements. - Return (nsppol, nkpt) |numpy-array| of real numbers. - """ - var = self.read_variable("h1_matrix") - vels = np.diagonal(var[:, :, :, :, :], axis1=2, axis=3) - # Cartesian? Ha --> eV? - return np.real(vels).copy() * (units.Ha_to_eV / units.bohr_to_ang) - - def read_ddk_skbb(self): - return self.read_value("h1_matrix", cplx_mode="cplx") * (units.Ha_to_eV / units.bohr_to_ang) diff --git a/abipy/electrons/denpot.py b/abipy/electrons/denpot.py index 0134dc11f..8f5709246 100644 --- a/abipy/electrons/denpot.py +++ b/abipy/electrons/denpot.py @@ -1,10 +1,8 @@ # coding: utf-8 """Density/potential files in netcdf/fortran format.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import tempfile -import numpy as np +#import numpy as np from monty.string import marquee from monty.termcolor import cprint @@ -36,7 +34,7 @@ class Cut3dDenPotNcFile(AbinitNcFile, Has_Structure): .. inheritance-diagram:: Cut3dDenPotNcFile """ def __init__(self, filepath): - super(Cut3dDenPotNcFile, self).__init__(filepath) + super().__init__(filepath) self.reader = FieldReader(filepath) self.field = self.reader.read_field() @@ -71,7 +69,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(_NcFileWithField, self).__init__(filepath) + super().__init__(filepath) self.reader = _DenPotNcReader(filepath) @lazy_property @@ -187,7 +185,7 @@ def density(self): def to_string(self, verbose=0): """String representation.""" - s = super(DensityNcFile, self).to_string(verbose=verbose) + s = super().to_string(verbose=verbose) # Add density related stuff. lines = [" "] diff --git a/abipy/electrons/ebands.py b/abipy/electrons/ebands.py index 830cdf433..93c738685 100644 --- a/abipy/electrons/ebands.py +++ b/abipy/electrons/ebands.py @@ -1,8 +1,5 @@ # coding: utf-8 """Classes to analyse electronic structures.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import sys import os import copy import itertools @@ -11,32 +8,29 @@ import tempfile import pickle import numpy as np +import pandas as pd import pymatgen.core.units as units -from collections import OrderedDict, namedtuple, Iterable +from collections import OrderedDict, namedtuple +from collections.abc import Iterable from monty.string import is_string, list_strings, marquee from monty.termcolor import cprint -from monty.json import MSONable, MontyEncoder +from monty.json import MontyEncoder from monty.collections import AttrDict, dict2namedtuple from monty.functools import lazy_property from monty.bisect import find_le, find_gt -try: - from pymatgen.util.serialization import pmg_serialize -except ImportError: - from pymatgen.serializers.json_coders import pmg_serialize +from pymatgen.util.serialization import pmg_serialize from pymatgen.electronic_structure.core import Spin as PmgSpin from abipy.core.func1d import Function1D from abipy.core.mixins import Has_Structure, NotebookWriter from abipy.core.kpoints import (Kpoint, KpointList, Kpath, IrredZone, KSamplingInfo, KpointsReaderMixin, - Ktables, has_timrev_from_kptopt, map_grid2ibz, kmesh_from_mpdivs) + Ktables, has_timrev_from_kptopt, map_grid2ibz) #, kmesh_from_mpdivs) from abipy.core.structure import Structure from abipy.iotools import ETSF_Reader -from abipy.tools import gaussian, duck +from abipy.tools import duck +from abipy.tools.numtools import gaussian from abipy.tools.plotting import (set_axlims, add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, - get_ax3d_fig_plt, rotate_ticklabels, set_visible, plot_unit_cell) - -import logging -logger = logging.getLogger(__name__) + get_ax3d_fig_plt, rotate_ticklabels, set_visible, plot_unit_cell, set_ax_xylabels) __all__ = [ @@ -56,7 +50,7 @@ class Electron(namedtuple("Electron", "spin kpoint band eig occ kidx")): spin: spin index (C convention, i.e >= 0) kpoint: |Kpoint| object. - band: band index. (C convention, i.e >= 0). + band: band index. (C convention, i.e >= 0) eig: KS eigenvalue. occ: Occupation factor. kidx: Index of the k-point in the initial array. @@ -73,7 +67,7 @@ def __ne__(self, other): return not (self == other) def __str__(self): - return "spin=%d, kpt=%s, band=%d, eig=%.3f, occ=%.3f" % ( + return "spin: %d, kpt: %s, band: %d, eig: %.3f, occ: %.3f" % ( self.spin, self.kpoint, self.band, self.eig, self.occ) @property @@ -95,7 +89,7 @@ def get_fields(cls, exclude=()): def as_dict(self): """Convert self into a dict.""" - return super(Electron, self)._asdict() + return super()._asdict() def to_strdict(self, fmt=None): """Ordered dictionary mapping fields --> strings.""" @@ -265,7 +259,7 @@ def as_smearing(cls, obj): raise TypeError("Don't know how to convert %s into Smearing object:\n%s" % (type(obj), str(exc))) def __init__(self, *args, **kwargs): - super(Smearing, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) for mkey in self._MANDATORY_KEYS: if mkey not in self: raise ValueError("Mandatory key %s must be provided" % str(mkey)) @@ -292,7 +286,7 @@ class ElectronBandsError(Exception): class ElectronBands(Has_Structure): """ - Immutable object storing the electron band structure. + Object storing the electron band structure. .. attribute:: fermie @@ -308,6 +302,7 @@ class ElectronBands(Has_Structure): # FIXME # Increase a bit the value of fermie used in bisection routines to solve the problem mentioned below pad_fermie = 1e-3 + # One should check whether fermie is recomputed at the end of the SCF cyle # I have problems in finding homos/lumos in semiconductors (e.g. Si) # because fermie is slightly smaller than the CBM: @@ -335,7 +330,7 @@ def from_file(cls, filepath): @classmethod def from_dict(cls, d): - """Reconstruct object from dictionary ``d``.""" + """Reconstruct object from the dictionary in MSONable format produced by as_dict.""" d = d.copy() kd = d["kpoints"].copy() kd.pop("@module") @@ -354,7 +349,7 @@ def from_dict(cls, d): @pmg_serialize def as_dict(self): - """Return dictionary with JSON_ serialization.""" + """Return dictionary with JSON serialization.""" linewidths = None if not self.has_linewidths else self.linewidths.tolist() return dict( structure=self.structure.as_dict(), @@ -401,10 +396,10 @@ def as_ebands(cls, obj): @classmethod def from_mpid(cls, material_id, api_key=None, endpoint=None, - nelect=None, has_timerev=True, nspinor=1, nspden=None): + nelect=None, has_timerev=True, nspinor=1, nspden=None, line_mode=True): """ Read bandstructure data corresponding to a materials project ``material_id``. - and return Abipy ElectronBands object. + and return Abipy ElectronBands object. Return None if bands are not available. Args: material_id (str): Materials Project material_id (a string, e.g., mp-1234). @@ -420,21 +415,24 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None, can be changed to other urls implementing a similar interface. nelect: Number of electrons in the unit cell. nspinor: Number of spinor components. + line_mode (bool): If True, fetch a BandStructureSymmLine object + (default). If False, return the uniform band structure. """ # Get pytmatgen structure and convert it to abipy structure from abipy.core import restapi with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: - pmgb = rest.get_bandstructure_by_material_id(material_id=material_id) + pmgb = rest.get_bandstructure_by_material_id(material_id=material_id, line_mode=line_mode) + if pmgb is None: return None # Structure is set to None so we have to perform another request and patch the object. structure = rest.get_structure_by_material_id(material_id, final=True) if pmgb.structure is None: pmgb.structure = structure - #pmgb = pmgb.__class__.from_dict(pmgb.as_dict()) if nelect is None: # Get nelect from valence band maximum index. if pmgb.is_metal(): - raise RuntimeError("Nelect must be specified if metallic bands.") + cprint("Nelect must be specified if metallic bands.", "red") + return None else: d = pmgb.get_vbm() iv_up = max(d["band_index"][PmgSpin.up]) @@ -445,13 +443,12 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None, assert iv_down == iv_up #ksampling = KSamplingInfo.from_kbounds(kbounds) - return cls.from_pymatgen(pmgb, nelect, weights=None, has_timerev=has_timerev, ksampling=None, smearing=None, nspinor=nspinor, nspden=nspden) def to_json(self): """ - Returns a JSON_ string representation of the MSONable object. + Returns a JSON string representation of the MSONable object. """ return json.dumps(self.as_dict(), cls=MontyEncoder) @@ -500,11 +497,6 @@ def __init__(self, structure, kpoints, eigens, fermie, occfacts, nelect, nspinor self.nelect = float(nelect) self.fermie = float(fermie) - # Recompute the Fermi level (in principle should do this only if - # bands are computed on a BZ mesh with a NSCF run. - #if self.kpoints.is_ibz: # and iscf < 0 - # self.recalc_fermie() - @property def structure(self): """|Structure| object.""" @@ -629,23 +621,45 @@ def has_metallic_scheme(self): cprint("ebands.smearing is not defined, assuming has_metallic_scheme = False", "red") return False - #@lazy_property - #def likely_semiconductor(self): - # """ - # True if energy gap is present in the band structure, - # independently on the use of metallic scheme for occupancies - # """ + def set_fermie_to_vbm(self): + """ + Set the Fermi energy to the valence band maximum (VBM). + Useful when the initial fermie energy comes from a GS-SCF calculation + that may underestimate the Fermi energy because e.g. the IBZ sampling + is shifted whereas the true VMB is at Gamma. - #def new_with_fermie(self, nelect=None, method="gaussian", step=0.001, width=0.002): - # """ - # Recompute the Fermi level. - # """ - # if nelect is None: nelect = self.nelect - # edos = self.get_edos(method=method, step=step, width=width) - # ef = edos.find_mu(nelect) - # self.set_fermie(ef) - # # TODO: Recalculate occupations. - # return ef + Return: New fermi energy in eV. + + .. warning: + + Assume spin-unpolarized band energies. + """ + iv = int(self.nelect * self.nspinor) // 2 - 1 + new_fermie = self.eigens[:, :, iv].max() + return self.set_fermie(new_fermie) + + def set_fermie_from_edos(self, edos, nelect=None): + """ + Set the Fermi level using the integrated DOS computed in edos. + + Args: + edos: |ElectronDos| object. + nelect: Number of electrons. If None, the number of electrons in self. is used + + Return: New fermi energy in eV. + """ + if nelect is None: + new_fermie = edos.find_mu(self.nelect) + else: + new_fermie = edos.find_mu(nelect) + + return self.set_fermie(new_fermie) + + def set_fermie(self, new_fermie): + """Set the new fermi energy. Return new value""" + self.fermie = new_fermie + # TODO change occfacts + return self.fermie def with_points_along_path(self, frac_bounds=None, knames=None, dist_tol=1e-12): """ @@ -660,7 +674,9 @@ def with_points_along_path(self, frac_bounds=None, knames=None, dist_tol=1e-12): dist_tol: A point is considered to be on the path if its distance from the line is less than dist_tol. - Return: namedtuple with: + Return: + namedtuple with the following attributes:: + ebands: |ElectronBands| object. ik_new2prev: Correspondence between the k-points in the new ebands and the kpoint of the previous band structure (self). @@ -735,18 +751,26 @@ def with_points_along_path(self, frac_bounds=None, knames=None, dist_tol=1e-12): # self.nelect, self.nspinor, self.nspden, # smearing=self.smearing, linewidths=new_linewidths) - #@classmethod - #def empty_with_ibz(cls, ngkpt, structure, fermie, nelect, nsppol, nspinor, nspden, mband, - # shiftk=(0, 0, 0), kptopt=1, smearing=None, linewidths=None): - # kpoints = IrredZone.from_ngkpt_or_kppa(structure, ngkpt, shiftk, kptopt=kptopt) - # new_eigens = np.zeros((nsppol, len(kpoints), mband)) - # new_occfacts = np.zeros_like(new_eigens) + @classmethod + def empty_with_ibz(cls, ngkpt, structure, fermie, nelect, nsppol, nspinor, nspden, mband, + shiftk=(0, 0, 0), kptopt=1, smearing=None, linewidths=None): + from abipy.abio.factories import gs_input + from abipy.data.hgh_pseudos import HGH_TABLE + gsinp = gs_input(structure, HGH_TABLE, spin_mode="unpolarized") + ibz = gsinp.abiget_ibz(ngkpt=ngkpt, shiftk=shiftk, kptopt=kptopt) + ksampling = KSamplingInfo.from_mpdivs(ngkpt, shiftk, kptopt) + + kpoints = IrredZone(structure.reciprocal_lattice, ibz.points, weights=ibz.weights, + names=None, ksampling=ksampling) + + new_eigens = np.zeros((nsppol, len(kpoints), mband)) + new_occfacts = np.zeros_like(new_eigens) - # return cls(structure, kpoints, new_eigens, fermie, new_occfacts, - # nelect, nspinor, nspden, - # smearing=smearing, linewidths=linewidths) + return cls(structure, kpoints, new_eigens, fermie, new_occfacts, + nelect, nspinor, nspden, + smearing=smearing, linewidths=linewidths) - def get_dict4pandas(self, with_spglib=True): + def get_dict4pandas(self, with_geo=True, with_spglib=True): """ Return a :class:`OrderedDict` with the most important parameters: @@ -758,6 +782,7 @@ def get_dict4pandas(self, with_spglib=True): Useful to construct pandas DataFrames Args: + with_geo: True if structure info should be added to the dataframe with_spglib: If True, spglib_ is invoked to get the spacegroup symbol and number. """ odict = OrderedDict([ @@ -766,7 +791,11 @@ def get_dict4pandas(self, with_spglib=True): ("nelect", self.nelect), ("fermie", self.fermie), ]) - odict.update(self.structure.get_dict4pandas(with_spglib=with_spglib)) + + # Add info on structure. + if with_geo: + odict.update(self.structure.get_dict4pandas(with_spglib=with_spglib)) + odict.update(self.smearing) bws = self.bandwidths @@ -780,6 +809,22 @@ def get_dict4pandas(self, with_spglib=True): for spin in self.spins: odict["dirgap_spin%d" % spin] = self.direct_gaps[spin].energy + # Select min gap over spins. + min_fgap = self.fundamental_gaps[0] + min_dgap = self.direct_gaps[0] + if self.nsppol == 2: + fgap0, fgap1 = self.fundamental_gaps[0], self.fundamental_gaps[1] + min_fgap = fgap0 if fgap0.energy < fgap1.energy else fgap1 + dgap0, dgap1 = self.direct_gaps[0], self.direct_gaps[1] + min_dgap = dgap0 if dgap0.energy < dgap1.energy else dgap1 + + # These quantities are not spin-dependent. + odict["gap_type"] = "direct" if min_fgap.is_direct else "indirect" + odict["fundgap_kstart"] = repr(min_fgap.in_state.kpoint) + odict["fundgap_kend"] = repr(min_fgap.out_state.kpoint) + odict["dirgap_kstart"] = repr(min_dgap.in_state.kpoint) + odict["dirgap_kend"] = repr(min_dgap.out_state.kpoint) + return odict @lazy_property @@ -806,6 +851,18 @@ def has_timrev(self): """True if time-reversal symmetry is used in the BZ sampling.""" return has_timrev_from_kptopt(self.kptopt) + @lazy_property + def supports_fermi_surface(self): + """ + True if the kpoints used for the energies can be employed to visualize Fermi surface. + Fermi surface viewers require gamma-centered k-mesh. + """ + if self.kpoints.is_mpmesh: + mpdivs, shifts = self.kpoints.mpdivs_shifts + if shifts is not None and np.all(shifts == 0.0): + return True + return False + def kindex(self, kpoint): """ The index of the k-point in the internal list of k-points. @@ -816,12 +873,6 @@ def kindex(self, kpoint): else: return self.kpoints.index(kpoint) - #def sb_iter(self, ik): - # """Iterator over (spin, band) indices.""" - # for spin in self.spins: - # for band in range(self.nband_sk[spin, ik]): - # yield spin, band - def skb_iter(self): """Iterator over (spin, k, band) indices.""" for spin in self.spins: @@ -829,13 +880,9 @@ def skb_iter(self): for band in range(self.nband_sk[spin, ik]): yield spin, ik, band - #def copy(self): - # """Shallow copy of self.""" - # return copy.copy(self) - - #def deepcopy(self): - # """Deep copy of self.""" - # return copy.deepcopy(self) + def deepcopy(self): + """Deep copy of the ElectronBands object.""" + return copy.deepcopy(self) def degeneracies(self, spin, kpoint, bands_range, tol_ediff=1.e-3): """ @@ -983,7 +1030,6 @@ def get_dataframe(self, e0="fermie"): - None: Don't shift energies, equivalent to e0=0 The Fermi energy is saved in frame.fermie """ - import pandas as pd rows = [] e0 = self.get_e0(e0) for spin in self.spins: @@ -1061,13 +1107,13 @@ def from_pymatgen(cls, pmg_bands, nelect, weights=None, has_timerev=True, The Abipy bandstructure contains more information than the pymatgen object so the conversion is not complete, especially if you rely on the default values. - Please read the docstring and the code carefully and use the optional arguments to pass - additional data required by Abipy if you need a complete conversion. + Please read carefylly the docstring and the code and use the optional arguments to pass + additional data required by AbiPy if you need a complete conversion. """ from pymatgen.electronic_structure.bandstructure import BandStructure, BandStructureSymmLine # Cast to abipy structure and call spglib to init AbinitSpaceGroup. - abipy_structure= Structure.as_structure(pmg_bands.structure.copy()) + abipy_structure = Structure.as_structure(pmg_bands.structure.copy()) if not abipy_structure.has_abi_spacegroup: abipy_structure.spgset_abi_spacegroup(has_timerev) @@ -1116,7 +1162,7 @@ def from_pymatgen(cls, pmg_bands, nelect, weights=None, has_timerev=True, def to_pymatgen(self): """ - Return a pymatgen bandstructure object from an Abipt |ElectronBands| object. + Return a pymatgen bandstructure object from an Abipy |ElectronBands| object. """ from pymatgen.electronic_structure.bandstructure import BandStructure, BandStructureSymmLine assert np.all(self.nband_sk == self.nband_sk[0, 0]) @@ -1153,7 +1199,7 @@ def _electron_state(self, spin, kpoint, band): #fermie=self.fermie ) - @lazy_property + @property def lomos(self): """lomo states for each spin channel as a list of nsppol :class:`Electron`.""" lomos = self.nsppol * [None] @@ -1199,11 +1245,9 @@ def lumo_sk(self, spin, kpoint): b = find_gt(self.eigens[spin,k,:], self.fermie + self.pad_fermie) return self._electron_state(spin, k, b) - @lazy_property + @property def homos(self): - """ - homo states for each spin channel as a list of nsppol :class:`Electron`. - """ + """homo states for each spin channel as a list of nsppol :class:`Electron`.""" homos = self.nsppol * [None] for spin in self.spins: @@ -1222,7 +1266,7 @@ def homos(self): return homos - @lazy_property + @property def lumos(self): """ lumo states for each spin channel as a list of nsppol :class:`Electron`. @@ -1263,17 +1307,17 @@ def lumos(self): # for spin in self.spins: # if abs(fun_gaps.ene) < TOL_EGAP - @lazy_property + @property def bandwidths(self): """The bandwidth for each spin channel i.e. the energy difference (homo - lomo).""" return [self.homos[spin].eig - self.lomos[spin].eig for spin in self.spins] - @lazy_property + @property def fundamental_gaps(self): """List of :class:`ElectronTransition` with info on the fundamental gaps for each spin.""" return [ElectronTransition(self.homos[spin], self.lumos[spin]) for spin in self.spins] - @lazy_property + @property def direct_gaps(self): """List of `nsppol` :class:`ElectronTransition` with info on the direct gaps for each spin.""" dirgaps = self.nsppol * [None] @@ -1286,8 +1330,7 @@ def direct_gaps(self): # Find the index of the k-point where the direct gap is located. # If there multiple k-points along the path, prefer the one in the center - # If not possible e.g. direct at G with G-X-L-G path avoid points on - # the right border of the graph + # If not possible e.g. direct at G with G-X-L-G path avoid points on the right border of the graph gaps = np.array(gaps) kinds = np.where(gaps == gaps.min())[0] kdir = kinds[0] @@ -1298,26 +1341,69 @@ def direct_gaps(self): return dirgaps - def get_gaps_string(self): + def get_gaps_string(self, with_latex=True): """ Return string with info about fundamental and direct gap (if not metallic scheme) + + Args: + with_latex: True to get latex symbols for the gap names else text. """ enough_bands = (self.mband > self.nspinor * self.nelect // 2) + dg_name, fg_name = "direct gap", "fundamental gap" + if with_latex: + dg_name, fg_name = "$E^{dir}_{gap}$", "$E^{fund}_{gap}$" + if enough_bands and not self.has_metallic_scheme: if self.nsppol == 1: - s = "%s: direct gap = %.2f, fundamental gap = %.2f (eV)" % ( + s = "%s: %s = %.2f, %s = %.2f (eV)" % ( self.structure.latex_formula, - self.direct_gaps[0].energy, self.fundamental_gaps[0].energy) + dg_name, self.direct_gaps[0].energy, + fg_name, self.fundamental_gaps[0].energy) else: dgs = [t.energy for t in self.direct_gaps] fgs = [t.energy for t in self.fundamental_gaps] - s = "%s: direct gap = %.2f (%.2f), fundamental gap = %.2f (%.2f) (eV)" % ( - self.structure.latex_formula, dgs[0], dgs[1], fgs[0], fgs[1]) + s = "%s: %s = %.2f (%.2f), %s = %.2f (%.2f) (eV)" % ( + self.structure.latex_formula, + dg_name, dgs[0], dgs[1], + fg_name, fgs[0], fgs[1]) else: s = "" return s + def get_kpoints_and_band_range_for_edges(self): + """ + Find the reduced coordinates and the band indice associate to the band edges. + Important: Call set_fermie_to_vbm() to set the Fermi level to the VBM before calling this method. + + Return: (k0_list, effmass_bands_f90) (Fortran notation) + """ + from collections import defaultdict + k0_list, effmass_bands_f90 = [], [] + for spin in self.spins: + d = defaultdict(lambda: [np.inf, -np.inf]) + homo, lumo = self.homos[spin], self.lumos[spin] + k = tuple(homo.kpoint.frac_coords) + d[k][0] = min(d[k][0], homo.band + 1) # C --> F index + k = tuple(lumo.kpoint.frac_coords) + d[k][1] = max(d[k][1], lumo.band + 1) + + for k in d: + if d[k][0] == np.inf: d[k][0] = d[k][1] + if d[k][1] == -np.inf: d[k][1] = d[k][0] + if d[k][0] == np.inf or d[k][1] == -np.inf: + raise RuntimeError("Cannot find band extrema, dict:\n%s:" % str(d)) + + for k, v in d.items(): + k0_list.append(k) + effmass_bands_f90.append(v) + + k0_list = np.reshape(k0_list, (-1, 3)) + effmass_bands_f90 = np.reshape(effmass_bands_f90, (-1, 2)) + #print("k0_list:\n", k0_list, "\neffmass_bands_f90:\n", effmass_bands_f90) + + return k0_list, effmass_bands_f90 + def to_string(self, title=None, with_structure=True, with_kpoints=False, verbose=0): """ Human-readable string with useful info such as band gaps, position of HOMO, LOMO... @@ -1358,7 +1444,9 @@ def indent(s): app("Bandwidth: %.3f (eV)" % self.bandwidths[spin]) if verbose: app("Valence minimum located at:\n%s" % indent(str(self.lomos[spin]))) + app("Valence maximum located at:\n%s" % indent(str(self.homos[spin]))) + try: # Cannot assume enough states for this! app("Conduction minimum located at:\n%s" % indent(str(self.lumos[spin]))) @@ -1366,6 +1454,8 @@ def indent(s): except Exception: pass + app("TIP: Call set_fermie_to_vbm() to set the Fermi level to the VBM if this is a non-magnetic semiconductor\n") + if with_kpoints: app(self.kpoints.to_string(verbose=verbose, title="K-points")) @@ -1504,9 +1594,9 @@ def compare_gauss_edos(self, widths, step=0.1): """ edos_plotter = ElectronDosPlotter() for width in widths: - edos = self.get_edos(method="gaussian", step=0.1, width=width) - label=r"$\sigma = %s$ (eV)" % width - edos_plotter.add_edos(label, edos) + edos = self.get_edos(method="gaussian", step=0.1, width=width) + label = r"$\sigma = %s$ (eV)" % width + edos_plotter.add_edos(label, edos) return edos_plotter @@ -1762,7 +1852,7 @@ def apply_scissors(self, scissors): @add_fig_kwargs def plot(self, spin=None, band_range=None, klabels=None, e0="fermie", ax=None, ylims=None, - points=None, with_gaps=False, max_phfreq=None, fontsize=8, **kwargs): + points=None, with_gaps=False, max_phfreq=None, fontsize=8, **kwargs): r""" Plot the electronic band structure. @@ -1819,7 +1909,8 @@ def plot(self, spin=None, band_range=None, klabels=None, e0="fermie", ax=None, y if "lw" in kwargs: opts.pop("linewidth") opts.update(kwargs) - for band in band_list: + for ib, band in enumerate(band_list): + if ib != 0: opts.pop("label", None) self.plot_ax(ax, e0, spin=spin, band=band, **opts) if points is not None: @@ -1841,9 +1932,11 @@ def plot(self, spin=None, band_range=None, klabels=None, e0="fermie", ax=None, y scatter_opts.update(marker="o", alpha=1.0, s=80, zorder=100, edgecolor='black') # Fundamental gap. + mgap = -1 for ik1, ik2 in f_gap.all_kinds: posA = (ik1, f_gap.in_state.eig - e0) posB = (ik2, f_gap.out_state.eig - e0) + mgap = max(mgap, posA[1], posB[1]) ax.scatter(posA[0], posA[1], **scatter_opts) ax.scatter(posB[0], posB[1], **scatter_opts) if need_arrows: @@ -1854,11 +1947,16 @@ def plot(self, spin=None, band_range=None, klabels=None, e0="fermie", ax=None, y for ik1, ik2 in d_gap.all_kinds: posA = (ik1, d_gap.in_state.eig - e0) posB = (ik2, d_gap.out_state.eig - e0) + mgap = max(mgap, posA[1], posB[1]) ax.scatter(posA[0], posA[1], **scatter_opts) ax.scatter(posB[0], posB[1], **scatter_opts) if need_arrows: ax.add_patch(FancyArrowPatch(posA=posA, posB=posB, **arrow_opts)) + # Try to set nice limits if not given by user. + if ylims is None: + set_axlims(ax, (-mgap - 5, +mgap + 5), "y") + gaps_string = self.get_gaps_string() if gaps_string: ax.set_title(gaps_string, fontsize=fontsize) @@ -1954,7 +2052,6 @@ def decorate_ax(self, ax, **kwargs): #print("ticks", ticks, "\nlabels", labels) ax.set_xticks(ticks, minor=False) ax.set_xticklabels(labels, fontdict=None, minor=False, size=kwargs.pop("klabel_size", "large")) - #print("ticks", len(ticks), ticks) ax.set_xlim(ticks[0], ticks[-1]) @@ -2116,7 +2213,7 @@ def plot_with_edos(self, edos, klabels=None, ax_list=None, e0="fermie", points=N def plot_lws_vs_e0(self, ax=None, e0="fermie", function=lambda x: x, exchange_xy=False, xlims=None, ylims=None, fontsize=12, **kwargs): r""" - Plot the electronic linewidths vs KS energy. + Plot electronic linewidths vs KS energy. Args: ax: |matplotlib-Axes| or None if a new figure should be created. @@ -2293,54 +2390,59 @@ def effective_masses(self, spin, band, acc=4): ders2 = self.derivatives(spin, band, order=2, acc=acc) * (units.eV_to_Ha / units.bohr_to_ang**2) return 1. / ders2 - def effmass_line(self, spin, kpoint, band, acc=4): + def get_effmass_line(self, spin, kpoint, band, acc=4): """ - Compute the effective masses along a line. Requires band energies on a k-path. + Compute the effective masses along a k-line. Requires band energies on a k-path. Args: spin: Spin index. - kpoint: integer or |Kpoint| object. Note that if kpoint is not an integer, - and the path contains duplicated k-points, the first k-point is selected. + kpoint: integer, list of fractional coordinates or |Kpoint| object. band: Band index. acc: accuracy """ - if not self.kpoints.is_path: - raise ValueError("effmass_line requires points along a path.") - warnings.warn("This code is still under development. API may change!") - - # Find index associate to the k-point - ik = self.kindex(kpoint) + if not self.kpoints.is_path: + raise ValueError("get_effmass_line requires k-points along a path. Got:\n %s" % repr(self.kpoints)) # We have to understand if the k-point is a vertex or not. - # If it's a vertex, indeed, we have to compute the left and right derivative + # If it is a vertex, we have to compute the left and right derivative # If kpt is inside the line, left and right derivatives are supposed to be equal - for iline, line in enumerate(self.kpoints.lines): - if line[-1] >= ik >= line[0]: break - else: - raise ValueError("Cannot find k-index %s in lines: %s" % (ik, self.kpoints.lines)) - - kpos = line.index(ik) - is_inside = kpos not in (0, len(line)-1) - do_right = (not is_inside) and kpos != 0 and iline != len(self.kpoints.lines) - 1 - from abipy.tools.derivatives import finite_diff - evals_on_line, h_left, vers_left = self._eigens_hvers_iline(spin, band, iline) - d2line = finite_diff(evals_on_line, h_left, order=2, acc=acc) * (units.eV_to_Ha / units.bohr_to_ang**2) - em_left = 1. / d2line[kpos] - em_right = em_left - h_right, vers_right = h_left, vers_left - - if do_right: - kpos_right = self.kpoints.lines[iline+1].index(ik) - assert kpos_right == 0 - evals_on_line, h_right, vers_right = self._eigens_hvers_iline(spin, band, iline+1) - d2line = finite_diff(evals_on_line, h_right, order=2, acc=acc) * (units.eV_to_Ha / units.bohr_to_ang**2) - em_right = 1. / d2line[kpos_right] - - return EffectiveMassAlongLine(spin, self.kpoints[ik], band, self.eigens[spin, ik, band], - acc, self.structure.reciprocal_lattice, - is_inside, h_left, vers_left, em_left, h_right, vers_right, em_right) + + for ik in self.kpoints.get_all_kindices(kpoint): + for iline, line in enumerate(self.kpoints.lines): + if line[-1] >= ik >= line[0]: break + else: + raise ValueError("Cannot find k-index `%s` in lines: `%s`" % (ik, self.kpoints.lines)) + + kpos = line.index(ik) + is_inside = kpos not in (0, len(line) - 1) + do_right = (not is_inside) and kpos != 0 and iline != len(self.kpoints.lines) - 1 + + evals_on_line, h_left, vers_left = self._eigens_hvers_iline(spin, band, iline) + d2 = finite_diff(evals_on_line, h_left, order=2, acc=acc, index=kpos) + em_left = 1. / (d2.value * (units.eV_to_Ha / units.bohr_to_ang ** 2)) + em_right = em_left + h_right, vers_right = h_left, vers_left + + if do_right: + kpos_right = self.kpoints.lines[iline + 1].index(ik) + assert kpos_right == 0 + evals_on_line, h_right, vers_right = self._eigens_hvers_iline(spin, band, iline + 1) + d2 = finite_diff(evals_on_line, h_right, order=2, acc=acc, index=kpos_right) + em_right = 1. / (d2.value * (units.eV_to_Ha / units.bohr_to_ang ** 2)) + + lines = []; app = lines.append + app("For spin: %s, band: %s, k-point: %s, eig: %.3f [eV], accuracy: %s" % ( + spin, band, repr(self.kpoints[ik]), self.eigens[spin, ik, band], acc)) + #app("K-point: %s, eigenvalue: %s (eV)" % (repr(self.kpoint), self.eig)) + #app("h_left: %s, h_right %s" % (self.h_left, self.h_right)) + #app("is_inside: %s, vers_left: %s, vers_right: %s" % (self.is_inside, self.vers_left, self.vers_right)) + if em_left != em_right: + app("emass_left: %.3f, emass_right: %.3f" % (em_left, em_right)) + else: + app("emass: %.3f" % em_left) + print("\n".join(lines)) def _eigens_hvers_iline(self, spin, band, iline): line = self.kpoints.lines[iline] @@ -2394,6 +2496,10 @@ def interpolate(self, lpratio=5, knames=None, vertices_names=None, line_density= fm_symrel = [s for (s, afm) in zip(abispg.symrel, abispg.symafm) if afm == 1] + if self.nband > self.nelect and self.nband > 20 and bstart == 0 and bstop is None: + cprint("Bands object contains nband %s with nelect %s. You may want to use bstart, bstop to select bands." % ( + self.nband, self.nelect), "yellow") + # Build interpolator. from abipy.core.skw import SkwInterpolator cell = (self.structure.lattice.matrix, self.structure.frac_coords, @@ -2417,7 +2523,7 @@ def interpolate(self, lpratio=5, knames=None, vertices_names=None, line_density= # Build new ebands object. occfacts_kpath = np.zeros_like(eigens_kpath) ebands_kpath = self.__class__(self.structure, kpath, eigens_kpath, self.fermie, occfacts_kpath, - self.nelect, self.nspinor, self.nspden) + self.nelect, self.nspinor, self.nspden, smearing=self.smearing) ebands_kmesh = None if kmesh is not None: # Get kpts and weights in IBZ. @@ -2432,34 +2538,11 @@ def interpolate(self, lpratio=5, knames=None, vertices_names=None, line_density= occfacts_kmesh = np.zeros_like(eigens_kmesh) ebands_kmesh = self.__class__(self.structure, kpts_kmesh, eigens_kmesh, self.fermie, occfacts_kmesh, - self.nelect, self.nspinor, self.nspden) + self.nelect, self.nspinor, self.nspden, smearing=self.smearing) return dict2namedtuple(ebands_kpath=ebands_kpath, ebands_kmesh=ebands_kmesh, interpolator=skw) -class EffectiveMassAlongLine(object): - """ - Store the value of the effective mass computed along a line. - """ - def __init__(self, spin, kpoint, band, eig, acc, lattice, - is_inside, h_left, vers_left, em_left, h_right, vers_right, em_right): - self.spin, self.kpoint, self.eig, self.band, self.acc, self.lattice = spin, kpoint, band, eig, acc, lattice, - self.is_inside, self.h_left, self.vers_left, self.em_left, self.h_right, self.vers_right, self.em_right = \ - is_inside, h_left, vers_left, em_left, h_right, vers_right, em_right - - def __repr__(self): - return "em_left: %s, em_right: %s" % (self.em_left, self.em_right) - - def __str__(self): - lines = []; app = lines.append - app("Effective masses for spin: %s, band: %s, accuracy: %s" % (self.spin, self.band, self.acc)) - app("K-point: %s, eigenvalue: %s (eV)" % (self.kpoint, self.eig)) - app("h_left: %s, h_right %s" % (self.h_left, self.h_right)) - app("is_inside: %s, vers_left: %s, vers_right: %s" % (self.is_inside, self.vers_left, self.vers_right)) - app("em_left: %s, em_right: %s" % (self.em_left, self.em_right)) - return "\n".join(lines) - - def dataframe_from_ebands(ebands_objects, index=None, with_spglib=True): """ Build a pandas dataframe with the most important results available in a list of band structures. @@ -2477,9 +2560,8 @@ def dataframe_from_ebands(ebands_objects, index=None, with_spglib=True): # Use OrderedDict to have columns ordered nicely. odict_list = [(ebands.get_dict4pandas(with_spglib=with_spglib)) for ebands in ebands_list] - import pandas as pd - return pd.DataFrame(odict_list, index=index) - #columns=list(odict_list[0].keys()) if odict_list else None) + return pd.DataFrame(odict_list, index=index, + columns=list(odict_list[0].keys()) if odict_list else None) class ElectronBandsPlotter(NotebookWriter): @@ -2535,6 +2617,9 @@ def __str__(self): """Invoked by str""" return self.to_string(func=str) + def __len__(self): + return len(self.ebands_dict) + def add_plotter(self, other): """Merge two plotters, return new plotter.""" if not isinstance(other, self.__class__): @@ -2578,7 +2663,7 @@ def edoses_list(self): def iter_lineopt(self): """Generates matplotlib linestyles.""" - for o in itertools.product( self._LINE_WIDTHS, self._LINE_STYLES, self._LINE_COLORS): + for o in itertools.product(self._LINE_WIDTHS, self._LINE_STYLES, self._LINE_COLORS): yield {"linewidth": o[0], "linestyle": o[1], "color": o[2]} def add_ebands(self, label, bands, edos=None, edos_kwargs=None): @@ -2886,10 +2971,8 @@ def combiboxplot(self, e0="fermie", brange=None, swarm=False, ax=None, **kwargs) if ebands.nsppol == 2: spin_polarized = True # Merge frames ignoring index (not meaningful) - import pandas as pd data = pd.concat(frames, ignore_index=True) - import matplotlib.pyplot as plt import seaborn as sns if not spin_polarized: ax, fig, plt = get_ax_fig_plt(ax=ax) @@ -2899,6 +2982,7 @@ def combiboxplot(self, e0="fermie", brange=None, swarm=False, ax=None, **kwargs) sns.swarmplot(x="band", y="eig", data=data, hue="label", color=".25", ax=ax) else: # Generate two subplots for spin-up / spin-down channels. + import matplotlib.pyplot as plt if ax is not None: raise NotImplementedError("ax == None not implemented when nsppol==2") fig, ax_list = plt.subplots(nrows=2, ncols=1, sharex=True, squeeze=False) @@ -2911,6 +2995,58 @@ def combiboxplot(self, e0="fermie", brange=None, swarm=False, ax=None, **kwargs) return fig + @add_fig_kwargs + def plot_band_edges(self, e0="fermie", epad_ev=1.0, set_fermie_to_vbm=True, colormap="viridis", fontsize=8, **kwargs): + """ + Plot the band edges for electrons and holes on two separated plots for all ebands in ebands_dict. + Useful for comparing band structures obtained with/without SOC or bands obtained with different settings. + + Args: + e0: Option used to define the zero of energy in the band structure plot. Possible values: + - ``fermie``: shift all eigenvalues to have zero energy at the Fermi energy (`self.fermie`). + - Number e.g e0=0.5: shift all eigenvalues to have zero energy at 0.5 eV + - None: Don't shift energies, equivalent to e0=0 + epad_ev: Add this energy window in eV above VBM and below CBM. + set_fermie_to_vbm: True if Fermi energy should be recomputed and fixed at max occupied energy level. + colormap: matplotlib colormap. + fontsize: legend and title fontsize. + """ + # Two subplots for CBM and VBM + num_plots, ncols, nrows = 2, 1, 2 + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + ax_list = ax_list.ravel() + cmap = plt.get_cmap(colormap) + nb = len(self.ebands_dict.items()) + + for ix, ax in enumerate(ax_list): + for iband, (label, ebands) in enumerate(self.ebands_dict.items()): + if set_fermie_to_vbm: + # This is needed when the fermi energy is computed in the GS part + # with a mesh that does not contain the band edges. + ebands.set_fermie_to_vbm() + + if ix == 0: + # Conduction + ymin = min((ebands.lumos[spin].eig for spin in ebands.spins)) - 0.1 + ymax = ymin + epad_ev + elif ix == 1: + # Valence + ymax = max((ebands.homos[spin].eig for spin in ebands.spins)) + 0.1 + ymin = ymax - epad_ev + else: + raise ValueError("Wrong ix: %s" % ix) + + # Defin ylims and energy shift. + this_e0 = ebands.get_e0(e0) + ylims = (ymin - this_e0, ymax - this_e0) + ebands.plot(ax=ax, e0=e0, color=cmap(float(iband) / nb), ylims=ylims, + label=label if ix == 0 else None, show=False) + if ix == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + return fig + def animate(self, e0="fermie", interval=500, savefile=None, width_ratios=(2, 1), show=True): """ Use matplotlib_ to animate a list of band structure plots (with or without DOS). @@ -3248,7 +3384,7 @@ def find_mu(self, nelect, spin=None): # If the last point in IDOS is sufficiently close to nelect # use it as Fermi level. if abs(idos.values[-1] - nelect) < 1e-3: - i = len(idos) -1 + i = len(idos) - 1 else: raise ValueError("Cannot find I(e) such that I(e) > nelect") @@ -3291,7 +3427,7 @@ def get_e0(self, e0): else: try: return float(e0) - except: + except Exception: raise TypeError("Wrong value for e0: %s" % str(e0)) else: # Assume number @@ -3328,7 +3464,7 @@ def plot_ax(self, ax, e0, spin=None, what="dos", fact=1.0, exchange_xy=False, ** return lines @add_fig_kwargs - def plot(self, e0="fermie", spin=None, ax=None, xlims=None, **kwargs): + def plot(self, e0="fermie", spin=None, ax=None, exchange_xy=False, xlims=None, ylims=None, **kwargs): """ Plot electronic DOS @@ -3339,8 +3475,10 @@ def plot(self, e0="fermie", spin=None, ax=None, xlims=None, **kwargs): - None: Don't shift energies, equivalent to ``e0 = 0``. spin: Selects the spin component, None if total DOS is wanted. ax: |matplotlib-Axes| or None if a new figure should be created. + exchange_xy: True to exchange x-y axis. xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` or scalar e.g. ``left``. If left (right) is None, default values are used + ylims: Set data limits for the y-axis. kwargs: options passed to ``ax.plot``. Return: |matplotlib-Figure| @@ -3354,12 +3492,14 @@ def plot(self, e0="fermie", spin=None, ax=None, xlims=None, **kwargs): opts.update(kwargs) spin_sign = +1 if spin == 0 else -1 x, y = self.spin_dos[spin].mesh - e0, spin_sign * self.spin_dos[spin].values + if exchange_xy: x, y = y, x ax.plot(x, y, **opts) ax.grid(True) - ax.set_xlabel('Energy (eV)') - ax.set_ylabel('DOS (states/eV)') + xlabel, ylabel = 'Energy (eV)', 'DOS (states/eV)' + set_ax_xylabels(ax, xlabel, ylabel, exchange_xy) set_axlims(ax, xlims, "x") + set_axlims(ax, ylims, "y") return fig @@ -3450,7 +3590,7 @@ def plot_up_minus_down(self, e0="fermie", ax=None, xlims=None, **kwargs): class ElectronDosPlotter(NotebookWriter): """ - Class for plotting electronic DOSes. + Class for plotting multiple electronic DOSes. Usage example: @@ -3491,7 +3631,7 @@ def add_edos(self, label, edos, edos_kwargs=None): self.edoses_dict[label] = ElectronDos.as_edos(edos, edos_kwargs) @add_fig_kwargs - def combiplot(self, what_list="dos", spin_mode="total", e0="fermie", + def combiplot(self, what_list="dos", spin_mode="automatic", e0="fermie", ax_list=None, xlims=None, fontsize=8, **kwargs): """ Plot the the DOSes on the same figure. Use ``gridplot`` to plot DOSes on different figures. @@ -3501,6 +3641,7 @@ def combiplot(self, what_list="dos", spin_mode="total", e0="fermie", "dos" for DOS only and "idos" for IDOS only spin_mode: "total" for total (I)DOS, "resolved" for plotting individual contributions. Meaningful only if nsppol == 2. + "automatic" to use "resolved" if at least one DOS is polarized. e0: Option used to define the zero of energy in the band structure plot. Possible values: - ``fermie``: shift all eigenvalues to have zero energy at the Fermi energy (``self.fermie``). - Number e.g ``e0 = 0.5``: shift all eigenvalues to have zero energy at 0.5 eV @@ -3512,6 +3653,9 @@ def combiplot(self, what_list="dos", spin_mode="total", e0="fermie", Return: |matplotlib-Figure| """ + if spin_mode == "automatic": + spin_mode = "resolved" if any(edos.nsppol == 2 for edos in self.edoses_dict.values()) else "total" + what_list = list_strings(what_list) nrows, ncols = len(what_list), 1 ax_list, fig, plt = get_axarray_fig_plt(ax_list, nrows=nrows, ncols=ncols, @@ -3535,6 +3679,7 @@ def combiplot(self, what_list="dos", spin_mode="total", e0="fermie", elif spin_mode == "resolved": # Plot spin resolved quantiies with sign. # Note get_color to have same color for both spins. + lines = None for spin in range(edos.nsppol): fact = 1 if spin == 0 else -1 lines = edos.plot_ax(ax, e0, what=what, spin=spin, fact=fact, @@ -3556,7 +3701,7 @@ def combiplot(self, what_list="dos", spin_mode="total", e0="fermie", plot = combiplot @add_fig_kwargs - def gridplot(self, what="dos", spin_mode="total", e0="fermie", + def gridplot(self, what="dos", spin_mode="automatic", e0="fermie", sharex=True, sharey=True, xlims=None, fontsize=8, **kwargs): """ Plot multiple DOSes on a grid. @@ -3565,6 +3710,7 @@ def gridplot(self, what="dos", spin_mode="total", e0="fermie", what: "dos" to plot DOS, "idos" for integrated DOS. spin_mode: "total" for total (I)DOS, "resolved" for plotting individual contributions. Meaningful only if nsppol == 2. + "automatic" to use "resolved" if at least one DOS is polarized. e0: Option used to define the zero of energy in the band structure plot. Possible values:: - ``fermie``: shift all eigenvalues and the DOS to have zero energy at the Fermi energy. @@ -3585,6 +3731,9 @@ def gridplot(self, what="dos", spin_mode="total", e0="fermie", Return: |matplotlib-Figure| """ + if spin_mode == "automatic": + spin_mode = "resolved" if any(edos.nsppol == 2 for edos in self.edoses_dict.values()) else "total" + titles = list(self.edoses_dict.keys()) edos_list = self.edos_list @@ -3613,6 +3762,7 @@ def gridplot(self, what="dos", spin_mode="total", e0="fermie", elif spin_mode == "resolved": # Plot spin resolved quantiies with sign. # Note get_color to have same color for both spins. + lines = None for spin in range(edos.nsppol): fact = 1 if spin == 0 else -1 lines = edos.plot_ax(ax, e0, what=what, spin=spin, fact=fact, @@ -3813,7 +3963,7 @@ def symmetrize_ibz_scalars(self, scalars, inshape="skb"): for ikuc, ik_ibz in enumerate(self.uc2ibz): ucdata_sbk[:, :, ikuc] = scalars[:, :, ik_ibz] else: - raise ValueError("Wrong inshape: %s" % str(insp)) + raise ValueError("Wrong inshape: %s" % str(inshape)) return ucdata_sbk @@ -3900,7 +4050,7 @@ def get_e0(self, e0): return e0 @add_fig_kwargs - def plot_isosurfaces(self, e0="fermie", verbose=0, **kwargs): + def plot_isosurfaces(self, e0="fermie", cmap=None, verbose=0, **kwargs): """ Plot isosurface with matplotlib_ @@ -3914,29 +4064,27 @@ def plot_isosurfaces(self, e0="fermie", verbose=0, **kwargs): Return: |matplotlib-Figure| """ - try: - import skimage - except ImportError: - raise ImportError("scikit-image not installed.\n" - "Please install with it with `conda install scikit-image` or `pip install scikit-image`") - try: from skimage.measure import marching_cubes_lewiner as marching_cubes except ImportError: - from skimage.measure import marching_cubes + try: + from skimage.measure import marching_cubes + except ImportError: + raise ImportError("scikit-image not installed.\n" + "Please install with it with `conda install scikit-image` or `pip install scikit-image`") e0 = self.get_e0(e0) isobands = self.get_isobands(e0) if isobands is None: return None if verbose: print("Bands for isosurface:", isobands) - from pymatgen.electronic_structure.plotter import plot_lattice_vectors, plot_wigner_seitz + #from pymatgen.electronic_structure.plotter import plot_lattice_vectors, plot_wigner_seitz ax, fig, plt = get_ax3d_fig_plt(ax=None) plot_unit_cell(self.reciprocal_lattice, ax=ax, color="k", linewidth=1) #plot_wigner_seitz(self.reciprocal_lattice, ax=ax, color="k", linewidth=1) for spin in self.spins: - for band in isobands[spin]: + for ib, band in enumerate(isobands[spin]): # From http://scikit-image.org/docs/stable/api/skimage.measure.html#marching-cubes # verts: (V, 3) array # Spatial coordinates for V unique mesh vertices. Coordinate order matches input volume (M, N, P). @@ -3952,9 +4100,17 @@ def plot_isosurfaces(self, e0="fermie", verbose=0, **kwargs): verts, faces, normals, values = marching_cubes(voldata, level=e0, spacing=tuple(self.spacing)) #verts, faces, normals, values = marching_cubes_lewiner(voldata, level=e0, spacing=tuple(self.spacing)) verts = self.reciprocal_lattice.get_cartesian_coords(verts) - ax.plot_trisurf(verts[:, 0], verts[:, 1], faces, verts[:, 2]) #, cmap='Spectral', lw=1, antialiased=True) + + if cmap is not None: + cmap = plt.get_cmap(cmap) + kwargs["color"] = cmap(float(ib) / len(isobands[spin])) + + ax.plot_trisurf(verts[:, 0], verts[:, 1], faces, verts[:, 2], **kwargs) + #, cmap='Spectral', lw=1, antialiased=True) + # mayavi package: - #mlab.triangular_mesh([v[0] for v in verts], [v[1] for v in verts], [v[2] for v in verts], faces) #, color=(0, 0, 0)) + #mlab.triangular_mesh([v[0] for v in verts], [v[1] for v in verts], [v[2] for v in verts], faces) + #, color=(0, 0, 0)) ax.set_axis_off() @@ -4101,6 +4257,7 @@ def mvplot_cutplanes(self, band, spin=0, figure=None, show=True, **kwargs): # pr class ElectronBands3D(Bands3D): pass + #def make_fermisurfer_dir(self, workdir) #class PhononBands3D(Bands3D): # pass @@ -4134,11 +4291,14 @@ def gridplot_edos(self, **kwargs): """Wraps gridplot method of |ElectronDosPlotter|. kwargs passed to gridplot.""" return self.get_edos_plotter().gridplot(**kwargs) - def get_ebands_plotter(self, filter_abifile=None, cls=None): + def get_ebands_plotter(self, kselect=None, filter_abifile=None, cls=None): """ - Build and return an instance of |ElectronBandsPlotter| or a subclass is ``cls`` is not None. + Build and return an instance of |ElectronBandsPlotter| or a subclass if ``cls`` is not None. Args: + kselect (str): Used to select particula `ebands`. + "path" to select bands given on a k-path, "ibz" for bands with IBZ sampling. + None has not effect filter_abifile: Function that receives an ``abifile`` object and returns True if the file should be added to the plotter. cls: subclass of |ElectronBandsPlotter|. @@ -4147,6 +4307,9 @@ def get_ebands_plotter(self, filter_abifile=None, cls=None): for label, abifile in self.items(): if filter_abifile is not None and not filter_abifile(abifile): continue + if kselect is not None: + if kselect == "path" and not abifile.ebands.kpoints.is_path: continue + if kselect == "ibz" and not abifile.ebands.kpoints.is_ibz: continue plotter.add_ebands(label, abifile.ebands) return plotter diff --git a/abipy/electrons/effmass_analyzer.py b/abipy/electrons/effmass_analyzer.py new file mode 100644 index 000000000..167e22a18 --- /dev/null +++ b/abipy/electrons/effmass_analyzer.py @@ -0,0 +1,378 @@ +# coding: utf-8 +""" +Objects to compute electronic effective masses via finite differences starting from an |ElectronBands| object. +""" + +import numpy as np +import pandas as pd +import pymatgen.core.units as units + +from collections import OrderedDict +from monty.termcolor import cprint +from abipy.core.mixins import Has_Structure, Has_ElectronBands +from abipy.tools.derivatives import finite_diff +from abipy.tools.printing import print_dataframe +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, set_visible + + +class EffMassAnalyzer(Has_Structure, Has_ElectronBands): + """ + This objects provides a high-level API to compute electronic effective masses + via finite differences starting from an |ElectronBands| object. + + Usage example: + + .. code-block:: python + + emana = EffmassAnalyzer.from_file("out_GSR.nc") + print(emana) + emana.select_vbm() + #emana.select_kpoint_band(kpoint=[0, 0, 0], band=3) + emans.plot_emass() + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EffMassAnalyzer + """ + + @classmethod + def from_file(cls, filepath): + """Initialize the object from a netcdf file with an ebands object.""" + from abipy.abilab import abiopen + with abiopen(filepath) as ncfile: + return cls(ncfile.ebands, copy=False) + + def __init__(self, ebands, copy=True): + """Initialize the object from an ebands object with k-points along a path.""" + if not ebands.kpoints.is_path: + raise ValueError("EffmassAnalyzer requires k-points along a path. Got:\n %s" % repr(ebands.kpoints)) + + # Copy ebands before changing fermie because we don't want side effects! + self._ebands = ebands.deepcopy() if copy else ebands + self._ebands.set_fermie_to_vbm() + self.segments = [] + + def __repr__(self): + """Invoked by repr""" + return repr(self.ebands) + + def __str__(self): + """Invoked by str""" + return self.ebands.to_string() + + def to_string(self, verbose): + """ + Human-readable string with useful info such as band gaps, position of HOMO, LOMO... + + Args: + verbose: Verbosity level. + """ + return self.ebands.to_string(with_structure=True, with_kpoints=True, verbose=verbose) + + def select_kpoint_band(self, kpoint, band, spin=0, etol_ev=1e-3): + """ + Construct line segments based on the k-point ``kpoint`` and the band index ``band``. + This is the most flexible interface and allows one to include extra bands + by increasing the value of `etol_ev`. + + Args: + kpoint: Fractional coordinates or |Kpoint| object. + band: Band index + spin: Spin index. + etol_ev: Include all bands at this k-point whose energy differ from the one at + (kpoint, band) less that ``etol_ev`` in eV. + """ + # Find all k-indices associated to the input kpoint. + ik_indices = self.kpoints.get_all_kindices(kpoint) + ik = ik_indices[0] + + # Find band indices of "degenerate" states within tolerance etol_ev. + e0 = self.ebands.eigens[spin, ik, band] + band_inds_k = [be[0] for be in enumerate(self.ebands.eigens[spin, ik]) if abs(be[1] - e0) <= etol_ev] + band_inds_k = len(ik_indices) * [band_inds_k] + self._build_segments(spin, ik_indices, band_inds_k) + + def select_cbm(self, spin=0, etol_ev=1e-3): + """Select conduction band minimum.""" + ik_indices, band_inds_k = self._select(["cbm"], spin, etol_ev) + self._build_segments(spin, ik_indices, band_inds_k) + + def select_vbm(self, spin=0, etol_ev=1e-3): + """Select valence band maximum.""" + ik_indices, band_inds_k = self._select(["vbm"], spin, etol_ev) + self._build_segments(spin, ik_indices, band_inds_k) + + def select_band_edges(self, spin=0, etol_ev=1e-3): + """Select conduction band minimum and valence band maximum.""" + ik_indices, band_inds_k = self._select(["cbm", "vbm"], spin, etol_ev) + self._build_segments(spin, ik_indices, band_inds_k) + + def _select(self, what_list, spin, etol_ev): + ik_indices, band_inds_k = [], [] + + if "vbm" in what_list: + homo = self.ebands.homos[spin] + homo_iks = self.kpoints.get_all_kindices(homo.kpoint) + ik = homo_iks[0] + e0 = self.ebands.eigens[spin, ik, homo.band] + homo_bands = [be[0] for be in enumerate(self.ebands.eigens[spin, ik]) if abs(be[1] - e0) <= etol_ev] + ik_indices.extend(homo_iks) + for i in range(len(homo_iks)): + band_inds_k.append(homo_bands) + + if "cbm" in what_list: + lumo = self.ebands.lumos[spin] + lumo_iks = self.kpoints.get_all_kindices(lumo.kpoint) + ik = lumo_iks[0] + e0 = self.ebands.eigens[spin, ik, lumo.band] + lumo_bands = [be[0] for be in enumerate(self.ebands.eigens[spin, ik]) if abs(be[1] - e0) <= etol_ev] + ik_indices.extend(lumo_iks) + for i in range(len(lumo_iks)): + band_inds_k.append(lumo_bands) + + return ik_indices, band_inds_k + + def _build_segments(self, spin, ik_indices, band_inds_k): + """ + Build list of segments. + + Args: + spin: Spin index. + ik_indices: List of k-point indices [nk][kids] + band_inds_k: [nk][kids] + """ + #print("in build_segments with:\n\tik_indices:", ik_indices, "\n\tband_inds_k:", band_inds_k) + self.spin = spin + + dims = len(ik_indices), len(band_inds_k) + if dims[0] != dims[1]: + raise RuntimeError("len(ik_indices) %s != len(band_inds_k) %s" % (dims[0], dims[1])) + + self.segments = [] + for ik, bids in zip(ik_indices, band_inds_k): + for iline, line in enumerate(self.kpoints.lines): + if line[-1] >= ik >= line[0]: break + else: + raise ValueError("Cannot find k-index `%s` in lines: `%s`" % (ik, self.kpoints.lines)) + #print("line[-1]", line[-1], "ik", ik, "line[0]", line[0]) + + self.segments.append(Segment(ik, spin, line, bids, self.ebands)) + + @property + def ebands(self): + """|ElectronBands| object.""" + return self._ebands + + @property + def structure(self): + """|Structure| object.""" + return self.ebands.structure + + def _consistency_check(self): + if not self.segments: + methods = ", ".join(["select_cbm", "select_vbm", "select_band_edges", "select_kpoint_band"]) + raise RuntimeError("You must call one among: `%s`\nto build segments before analyzing data." % methods) + + def summarize(self, acc=4): + self._consistency_check() + for segment in self.segments: + df = segment.get_dataframe_with_accuracies(acc_list=[acc]) + title = "k: %s, spin: %s, nbands: %d" % (repr(segment.k0), segment.spin, segment.nb) + #label="direction: %s" % segment.kdir.tos(m="fracart") if ib == 0 else None) + print_dataframe(df, title=title) + #print("") + + #def print_segments(self): + # self._consistency_check() + # for segment in self.segments + + @add_fig_kwargs + def plot_emass(self, acc=4, fontsize=6, colormap="viridis", **kwargs): + """ + Plot electronic dispersion and quadratic curve based on the + effective masses computed along each segment. + + Args: + acc: + fontsize: legend and title fontsize. + colormap: matplotlib colormap + """ + self._consistency_check() + + # Build grid of plots for this spin. + num_plots, ncols, nrows = len(self.segments), 1, 1 + if num_plots > 1: + ncols = 2 + nrows = (num_plots // ncols) + (num_plots % ncols) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=True, squeeze=False) + ax_list = ax_list.ravel() + + for iseg, (segment, ax) in enumerate(zip(self.segments, ax_list)): + irow, icol = divmod(iseg, ncols) + segment.plot_emass(ax=ax, acc=acc, fontsize=fontsize, colormap=colormap, show=False) + if iseg != 0: set_visible(ax, False, "ylabel") + if irow != nrows - 1: set_visible(ax, False, "xticklabels") + + # don't show the last ax if numeb is odd. + if num_plots % ncols != 0: ax_list[-1].axis("off") + + return fig + + @add_fig_kwargs + def plot_all_segments(self, ax=None, colormap="viridis", fontsize=8, **kwargs): + """ + + Args: + colormap: matplotlib colormap + fontsize: legend and title fontsize. + + Return: |matplotlib-Figure| + """ + self._consistency_check() + + ax, fig, plt = get_ax_fig_plt(ax=ax) + cmap = plt.get_cmap(colormap) + markers = ["o", "s", "x", "D", "+", "v", ">", "<"] * 8 + + ax.grid(True) + ax.set_ylabel('Energy (eV)') + pad = 0 + for iseg, segment in enumerate(self.segments): + color = cmap(float(iseg / len(self.segments))) + for ib in range(segment.nb): + ax.plot(segment.kpoint_indices + pad, segment.energies_bk[ib], + linestyle=":", marker=markers[ib], markersize=2, color=color, + label="direction: %s" % segment.kdir.tos(m="fracart") if ib == 0 else None) + pad += 10 + + ax.legend(loc="best", fontsize=fontsize, shadow=True) + #title = "k: %s, spin: %s, nband: %d" % (repr(self.efm_kpoint), self.spin, segment.nb) + #ax.set_title(title, fontsize=fontsize) + + return fig + + +class Segment: + """ + .. attribute:: Z + + Atomic number + """ + def __init__(self, ik, spin, line, band_inds, ebands): + """ + Args: + kpoint_indices (list(int)): the kpoint indices of the segment + """ + self.ik = ik + self.spin = spin + self.kpos = line.index(ik) + self.kpos_type = "central" + if self.kpos == 0: self.kpos_type = "right" + if self.kpos == len(line) - 1: self.kpos_type = "left" + + self.kdir = ebands.kpoints.versors[line[0]] + self.dk = ebands.kpoints.ds[line[0]] + if not np.allclose(self.dk, ebands.kpoints.ds[line[:-1]]): + raise ValueError("For finite difference derivatives, the path must be homogeneous!\n" + + str(ebands.kpoints.ds[line[:-1]])) + + self.kpoint_indices = np.asarray(line) + self.band_inds = band_inds + # The reference point and |k-k0|^2 + self.k0 = ebands.kpoints[ik] + self.kmk0_2 = np.array([(k - self.k0).norm ** 2 for k in (ebands.kpoints[l] for l in line)]) + + self.energies_bk = [] + for band in band_inds: + self.energies_bk.append(ebands.eigens[spin, line, band]) + + self.energies_bk = np.reshape(self.energies_bk, (len(band_inds), len(line))) + self.nb = len(self.energies_bk) + self.ebands = ebands + + def __repr__(self): + return "k0: %s, kdir: %s, dk: %.3f (Ang-1)" % (repr(self.k0), repr(self.kdir), self.dk) + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + app("k-point: %s, nband: %s, spin: %d" % (self.k0.to_string(verbose=verbose), self.nb, self.spin)) + return "\n".join(lines) + + def __str__(self): + return self.to_string() + + def get_fd_emass_d2(self, enes_kline, acc): + d2 = finite_diff(enes_kline, self.dk, order=2, acc=acc, index=self.kpos) + emass = 1. / (d2.value * (units.eV_to_Ha / units.bohr_to_ang ** 2)) + return emass, d2 + + def get_dataframe_with_accuracies(self, acc_list=(2, 4, 6, 8)): + """ + Build and return a |pandas-Dataframe| with effective masses computed with different accuracies (npts) + """ + rows = [] + for acc in acc_list: + emass_dict = OrderedDict() + for ib, enes_kline in enumerate(self.energies_bk): + emass, d2 = self.get_fd_emass_d2(enes_kline, acc) + emass_dict["m%d" % ib] = emass + + od = OrderedDict([ + ("acc", acc), ("npts", d2.npts), + ]) + od.update(emass_dict) + rows.append(od) + + return pd.DataFrame(rows, columns=list(rows[0].keys())) + + @add_fig_kwargs + def plot_emass(self, acc=4, ax=None, fontsize=8, colormap="viridis", **kwargs): + """ + + Args: + acc: + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: legend and title fontsize. + colormap: matplotlib colormap + + Return: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=ax) + ax.grid(True) + cmap = plt.get_cmap(colormap) + + for ib, enes_kline in enumerate(self.energies_bk): + # Plot KS-DFT points. + xs = range(len(enes_kline)) + ax.scatter(xs, enes_kline, marker="o", color=cmap(float(ib) / self.nb)) + + # Compute effective masses + try: + emass, d2 = self.get_fd_emass_d2(enes_kline, acc) + except Exception as exc: + cprint("Eception for segment: %s" % str(self), "red") + raise exc + + ys = ((self.kmk0_2 * units.bohr_to_ang ** 2) / (2 * emass)) * units.Ha_to_eV + self.energies_bk[ib, self.kpos] + label = r"$m^*$ = %.3f, %d-pts %s finite-diff" % (emass, d2.npts, d2.mode) + ax.plot(xs, ys, linestyle="--", color=cmap(float(ib) / self.nb), label=label) + + ax.legend(loc="best", fontsize=fontsize, shadow=True) + title = r"${\bf k}_0$: %s, direction: %s" % (repr(self.k0), self.kdir.tos(m="fracart")) + ax.set_title(title, fontsize=fontsize) + ax.set_ylabel('Energy (eV)') + + return fig + + +#class MultipleEffMassAnalyzer: +# +# @classmethod +# def from_files(cls, filepaths): +# """Initialize the object from a list of files providing an |ElectronBands| object.""" +# return cls([ElectronBands.from_file(f, copy=False) for f in list_strings(filepaths)]) +# +# def __init__(self, eband_list) +# self.eband_list = eband_list diff --git a/abipy/electrons/eskw.py b/abipy/electrons/eskw.py new file mode 100644 index 000000000..cb7508bca --- /dev/null +++ b/abipy/electrons/eskw.py @@ -0,0 +1,111 @@ +# coding: utf-8 +""" +Interface to the ESKW.nc file storing the (star-function) interpolated band structure produced by Abinit. +""" +from monty.functools import lazy_property +from monty.string import marquee +from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter +from abipy.electrons.ebands import ElectronsReader + + +class EskwFile(AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter): + """ + This file contains the (star-function) interpolated band structure produced by Abinit. + It's similar to the GSR file but it does not contain the header and energies. + + Usage example: + + .. code-block:: python + + with EskwFile("foo_ESKW.nc") as eskw: + eskw.ebands.plot() + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EskwFile + """ + @classmethod + def from_file(cls, filepath): + """Initialize the object from a netcdf_ file.""" + return cls(filepath) + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = ElectronsReader(filepath) + + @lazy_property + def einterp(self): + return self.reader.read_value("einterp") + + @lazy_property + def band_block(self): + # band_block(2)=Initial and final band index to be interpolated. [0, 0] if all bands are used. + band_block = self.reader.read_value("band_block") + if all(band_block != [0, 0]): band_block -= 1 + return band_block + + def __str__(self): + """String representation.""" + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(self.ebands.to_string(with_structure=False, verbose=verbose, title="Electronic Bands")) + app("band_block: %s" % str(self.band_block)) + app("einterp: %s" % str(self.einterp)) + + return "\n".join(lines) + + def close(self): + self.reader.close() + + @property + def ebands(self): + """|ElectronBands| object.""" + return self.reader.read_ebands() + + @property + def structure(self): + """|Structure| object.""" + return self.ebands.structure + + @lazy_property + def params(self): + """:class:`OrderedDict` with parameters that might be subject to convergence studies.""" + od = self.get_ebands_params() + od["einterp"] = self.interp + od["einterp"] = self.einterp + return od + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + """ + #for fig in self.yield_structure_figs(**kwargs): yield fig + for fig in self.yield_ebands_figs(**kwargs): yield fig + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("eskw = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(eskw)"), + nbv.new_code_cell("eskw.ebands.plot();"), + nbv.new_code_cell("eskw.ebands.kpoints.plot();"), + nbv.new_code_cell("# eskw.ebands.plot_transitions(omega_ev=3.0, qpt=(0, 0, 0), atol_ev=0.1);"), + nbv.new_code_cell("""\ +if eskw.ebands.kpoints.is_ibz: + eskw.ebands.get_edos().plot();"""), + ]) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/electrons/fatbands.py b/abipy/electrons/fatbands.py index 4f7db9417..165d3b59a 100644 --- a/abipy/electrons/fatbands.py +++ b/abipy/electrons/fatbands.py @@ -1,6 +1,5 @@ # coding: utf-8 """Classes for the analysis of electronic fatbands and projected DOSes.""" -from __future__ import print_function, division, unicode_literals, absolute_import import traceback import numpy as np @@ -9,12 +8,12 @@ from tabulate import tabulate from monty.termcolor import cprint from monty.functools import lazy_property -from monty.string import marquee, list_strings +from monty.string import marquee from pymatgen.core.periodic_table import Element from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter from abipy.electrons.ebands import ElectronsReader -from abipy.tools import gaussian -from abipy.tools.plotting import set_axlims, get_axarray_fig_plt, add_fig_kwargs, get_ax_fig_plt +from abipy.tools.numtools import gaussian +from abipy.tools.plotting import set_axlims, get_axarray_fig_plt, add_fig_kwargs def gaussians_dos(dos, mesh, width, values, energies, weights): @@ -89,7 +88,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(FatBandsFile, self).__init__(filepath) + super().__init__(filepath) self.reader = r = ElectronsReader(filepath) # Initialize the electron bands from file @@ -257,7 +256,7 @@ def _read_walm_sbk(self, key="dos_fraction_m"): else: print("natsph < natom. Will set to zero the PJDOS contributions for the atoms that are not included.") assert self.natsph < self.natom - filedata = np.reshape(r.read_value(key), + filedata = np.reshape(self.reader.read_value(key), (self.natsph, self.mbesslang**2, self.nsppol, self.mband, self.nkpt)) for i, iatom in enumerate(self.iatsph): walm_sbk[iatom] = filedata[i] @@ -307,9 +306,9 @@ def to_string(self, verbose=0): app(self.ebands.to_string(with_structure=True, title="Electronic Bands")) app("") app(marquee("Fatbands Info", mark="=")) - app("prtdos=%d, prtdosm=%d, mbesslang=%d, pawprtdos=%d, usepaw=%d" % ( + app("prtdos: %d, prtdosm: %d, mbesslang: %d, pawprtdos: %d, usepaw: %d" % ( self.prtdos, self.prtdosm, self.mbesslang, self.pawprtdos, self.usepaw)) - app("nsppol=%d, nkpt=%d, mband=%d" % (self.nsppol, self.nkpt, self.mband)) + app("nsppol: %d, nkpt: %d, mband: %d" % (self.nsppol, self.nkpt, self.mband)) app("") if self.prtdos == 3: @@ -555,8 +554,9 @@ def plot_fatbands_lview(self, e0="fermie", fact=1.0, ax_mat=None, lmax=None, # Only the first column show labels. # Trick: Don't change the labels but set their fontsize to 0 otherwise # also the other axes are affected (likely due to sharey=True). + #ax.yaxis.set_tick_params(fontsize=0) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(0) + tick.label1.set_fontsize(0) for ib, band in enumerate(mybands): yup = ebands.eigens[spin, :, band] - e0 @@ -608,7 +608,7 @@ def plot_fatbands_mview(self, iatom, e0="fermie", fact=1.0, lmax=None, # Build plot grid. import matplotlib.pyplot as plt - from matplotlib.gridspec import GridSpec, GridSpecFromSubplotSpec + from matplotlib.gridspec import GridSpec #, GridSpecFromSubplotSpec fig = plt.figure() nrows, ncols = 2 * (mylmax+1), mylmax + 1 gspec = GridSpec(nrows=nrows, ncols=ncols, wspace=0.1, hspace=0.1) @@ -639,7 +639,7 @@ def plot_fatbands_mview(self, iatom, e0="fermie", fact=1.0, lmax=None, ebands.plot_ax(ax, e0, spin=spin, **self.eb_plotax_kwargs(spin)) if im == 2 * l: - ebands.decorate_ax(ax) + ebands.decorate_ax(ax) #if l > 0: # ax.set_ylabel("") @@ -845,8 +845,7 @@ def plot_spilling(self, e0="fermie", fact=1.0, ax_list=None, ylims=None, blist=N # # Only the first column show labels. # # Trick: Don't change the labels but set their fontsize to 0 otherwise # # also the other axes are affecred (likely due to sharey=True). - # for tick in ax.yaxis.get_major_ticks(): - # tick.label.set_fontsize(0) + # #ax.yaxis.set_tick_params(fontsize=0) # idx = term2idx[term] # color = self.spinors2color[term] @@ -1041,7 +1040,7 @@ def plot_pjdos_lview(self, e0="fermie", lmax=None, method="gaussian", step=0.1, for isymb, symbol in enumerate(self.symbols): yup = stack[isymb] ydown = stack[isymb-1] if isymb != 0 else zerodos - label ="%s (stacked)" % symbol if (l, spin) == (0, 0) else None + label = "%s (stacked)" % symbol if (l, spin) == (0, 0) else None fill = ax.fill_between if not exchange_xy else ax.fill_betweenx fill(mesh, yup, ydown, alpha=self.alpha, facecolor=self.symbol2color[symbol], label=label if with_info else None) @@ -1080,10 +1079,10 @@ def plot_pjdos_lview(self, e0="fermie", lmax=None, method="gaussian", step=0.1, else: # Plots in the middle: don't show labels. # Trick: Don't change the labels but set their fontsize to 0 otherwise - # also the other axes are affecred (likely due to sharey=True). - # ax.set_yticklabels([]) + # also the other axes are affected (likely due to sharey=True). + #ax.yaxis.set_tick_params(fontsize=0) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(0) + tick.label1.set_fontsize(0) return fig @@ -1197,7 +1196,7 @@ def plot_pjdos_typeview(self, e0="fermie", lmax=None, method="gaussian", step=0. for l in range(min(self.lmax_symbol[symbol] + 1, mylsize)): yup = stack[l] ydown = stack[l-1] if l != 0 else zerodos - label ="%s (stacked)" % self.l2tex[l] if (isymb, spin) == (0, 0) else None + label = "%s (stacked)" % self.l2tex[l] if (isymb, spin) == (0, 0) else None fill = ax.fill_between if not exchange_xy else ax.fill_betweenx fill(mesh, yup, ydown, alpha=self.alpha, facecolor=self.l2color[l], label=label if with_info else None) @@ -1236,9 +1235,9 @@ def plot_pjdos_typeview(self, e0="fermie", lmax=None, method="gaussian", step=0. # Plots in the middle: don't show labels. # Trick: Don't change the labels but set their fontsize to 0 otherwise # also the other axes are affected (likely due to sharey=True). - # ax.set_yticklabels([]) + #ax.yaxis.set_tick_params(fontsize=0) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(0) + tick.label1.set_fontsize(0) return fig @@ -1329,9 +1328,11 @@ def plot_fatbands_with_pjdos(self, e0="fermie", fact=1.0, lmax=None, blist=None, for ax in pjdos_axmat.ravel(): ax.set_xlabel("") ax.set_ylabel("") + #ax.xaxis.set_tick_params(fontsize=0) + #ax.yaxis.set_tick_params(fontsize=0) for xtick, ytick in zip(ax.xaxis.get_major_ticks(), ax.yaxis.get_major_ticks()): - xtick.label.set_fontsize(0) - ytick.label.set_fontsize(0) + xtick.label1.set_fontsize(0) + ytick.label1.set_fontsize(0) if closeit: pjdosfile.close() return fig @@ -1406,6 +1407,7 @@ def plot_pawdos_terms(self, lmax=None, method="gaussian", step=0.1, width=0.2, x # Build plot grid. nrows, ncols = np.count_nonzero(self.has_atom), self.lsize + ax_mat = None ax_mat, fig, plt = get_axarray_fig_plt(ax_mat, nrows=nrows, ncols=ncols, sharex=True, sharey=True, squeeze=False) ax_mat = np.reshape(ax_mat, (nrows, ncols)) @@ -1425,8 +1427,9 @@ def plot_pawdos_terms(self, lmax=None, method="gaussian", step=0.1, width=0.2, x if l != 0: ax.set_ylabel("") # Only the first column show labels. + #ax.yaxis.set_tick_params(fontsize=0) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(0) + tick.label1.set_fontsize(0) for spin in range(self.nsppol): spin_sign = +1 if spin == 0 else -1 @@ -1539,6 +1542,13 @@ def yield_figs(self, **kwargs): # pragma: no cover yield self.plot_pjdos_lview(show=False) yield self.plot_pjdos_typeview(show=False) + def get_panel(self): + """ + Build panel with widgets to interact with the |FatbandsFile| either in a notebook or in panel app. + """ + from abipy.panels.fatbands import FatBandsFilePanel + return FatBandsFilePanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to nbpath. If nbpath is None, a temporay file in the current @@ -1584,9 +1594,10 @@ def write_notebook(self, nbpath=None): if self.prtdos == 3 and self.ebands.kpoints.is_path: nb.cells.extend([ - nbv.new_markdown_cell("## L-DOSes with fatbands\n" - "(require `prtdos=3`, `fbnc` must contain a k-path, " - "`pjdosfile` is a `FATBANDS.nc` file with a BZ sampling)"), + nbv.new_markdown_cell( + "## L-DOSes with fatbands\n" + "(require `prtdos=3`, `fbnc` must contain a k-path, " + "`pjdosfile` is a `FATBANDS.nc` file with a BZ sampling)"), nbv.new_code_cell("fbnc.plot_fatbands_with_pjdos(pjdosfile=None, ylims=ylims, view='type');"), ]) diff --git a/abipy/electrons/fold2bloch.py b/abipy/electrons/fold2bloch.py index 861d889d3..d383824e7 100644 --- a/abipy/electrons/fold2bloch.py +++ b/abipy/electrons/fold2bloch.py @@ -1,12 +1,9 @@ # coding: utf-8 """Fold2Bloch netcdf file.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np -from collections import OrderedDict -from monty.string import marquee # is_string, list_strings, +from monty.string import marquee from monty.functools import lazy_property from monty.collections import dict2namedtuple from monty.termcolor import cprint @@ -64,15 +61,15 @@ def from_wfkpath(cls, wfkpath, folds, workdir=None, manager=None, mpi_procs=1, v return cls(ncpath) def __init__(self, filepath): - super(Fold2BlochNcfile, self).__init__(filepath) + super().__init__(filepath) self.reader = ElectronsReader(filepath) # Initialize the electron bands from file. # Spectral weights are dimensioned with `nss` - # Fortran arrays. - # nctkarr_t("reduced_coordinates_of_unfolded_kpoints", "dp", "number_of_reduced_dimensions, nk_unfolded") - # nctkarr_t("unfolded_eigenvalues", "dp", "max_number_of_states, nk_unfolded, number_of_spins") - # nctkarr_t("spectral_weights", "dp", "max_number_of_states, nk_unfolded, nsppol_times_nspinor") + # Fortran arrays. + # nctkarr_t("reduced_coordinates_of_unfolded_kpoints", "dp", "number_of_reduced_dimensions, nk_unfolded") + # nctkarr_t("unfolded_eigenvalues", "dp", "max_number_of_states, nk_unfolded, number_of_spins") + # nctkarr_t("spectral_weights", "dp", "max_number_of_states, nk_unfolded, nsppol_times_nspinor") self._ebands = self.reader.read_ebands() self.nss = max(self.nsppol, self.nspinor) self.fold_matrix = self.reader.read_value("fold_matrix") @@ -201,7 +198,7 @@ def plot_unfolded(self, kbounds, klabels, ylims=None, dist_tol=1e-12, verbose=0, fontsize: Legend and title fontsize. Returns: |matplotlib-Figure| - """ + """ cart_bounds = [self.pc_lattice.reciprocal_lattice.get_cartesian_coords(c) for c in np.reshape(kbounds, (-1, 3))] uf_cart = self.uf_kpoints.get_cart_coords() diff --git a/abipy/electrons/gsr.py b/abipy/electrons/gsr.py index 8f393250d..b9bb03c55 100644 --- a/abipy/electrons/gsr.py +++ b/abipy/electrons/gsr.py @@ -1,27 +1,26 @@ # coding: utf-8 -"""GSR.nc_ file.""" -from __future__ import print_function, division, unicode_literals, absolute_import - +""" +Interface to the GSR.nc_ file storing the Ground-state results and the electron band structure. +""" import numpy as np import pandas as pd import pymatgen.core.units as units +import abipy.core.abinit_units as abu -from collections import OrderedDict, Iterable, defaultdict +from collections import OrderedDict from tabulate import tabulate -from monty.string import is_string, list_strings, marquee +from monty.string import list_strings, marquee from monty.termcolor import cprint from monty.collections import AttrDict, dict2namedtuple from monty.functools import lazy_property -from pymatgen.core.units import EnergyArray, ArrayWithUnit +from pymatgen.core.units import ArrayWithUnit from pymatgen.entries.computed_entries import ComputedEntry, ComputedStructureEntry from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter from abipy.tools.plotting import add_fig_kwargs, get_axarray_fig_plt +from abipy.tools.tensors import Stress from abipy.abio.robots import Robot from abipy.electrons.ebands import ElectronsReader, RobotWithEbands -import logging -logger = logging.getLogger(__name__) - __all__ = [ "GsrFile", @@ -51,8 +50,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(GsrFile, self).__init__(filepath) - + super().__init__(filepath) self.reader = r = GsrReader(filepath) # Initialize the electron bands from file @@ -76,7 +74,10 @@ def to_string(self, verbose=0): app(self.structure.to_string(verbose=verbose, title="Structure")) if self.is_scf_run: app("") - app("Stress tensor (Cartesian coordinates in Ha/Bohr**3):\n%s" % self.cart_stress_tensor) + app("Stress tensor (Cartesian coordinates in GPa):\n%s" % self.cart_stress_tensor) + #if verbose: + # app("Stress tensor (Cartesian coordinates in Ha/Bohr**3):\n%s" % self.cart_stress_tensor / abu.HaBohr3_GPa) + app("") app("Pressure: %.3f (GPa)" % self.pressure) app("Energy: %.8f (eV)" % self.energy) app("") @@ -133,6 +134,7 @@ def cart_forces(self): @lazy_property def max_force(self): + """Max cart force in eV / Ang""" fmods = np.sqrt([np.dot(force, force) for force in self.cart_forces]) return fmods.max() @@ -159,14 +161,13 @@ def force_stats(self, **kwargs): @lazy_property def cart_stress_tensor(self): - """Stress tensor in Ha/Bohr**3""" + """Stress tensor in GPa.""" return self.reader.read_cart_stress_tensor() @lazy_property def pressure(self): - """Pressure in Gpa""" - HaBohr3_GPa = 29421.033 # 1 Ha/Bohr^3, in GPa - pressure = - (HaBohr3_GPa/3) * self.cart_stress_tensor.trace() + """Pressure in GPa.""" + pressure = - self.cart_stress_tensor.trace() / 3 return units.FloatWithUnit(pressure, unit="GPa", unit_type="pressure") @lazy_property @@ -199,6 +200,10 @@ def params(self): def close(self): self.reader.close() + # FIXME: This is deprecated. Must keep it to avoid breaking ScfTask.get_results + def as_dict(self): + return {} + def get_computed_entry(self, inc_structure=True, parameters=None, data=None): """ Returns a pymatgen :class:`ComputedStructureEntry` from the GSR file. @@ -226,32 +231,12 @@ def get_computed_entry(self, inc_structure=True, parameters=None, data=None): return ComputedEntry(self.structure.composition, self.energy, parameters=parameters, data=data) - def as_dict(self, **kwargs): - # TODO: Add info depending on the run_type e.g. max_resid is NSCF - return dict( - structure=self.structure.as_dict(), - final_energy=self.energy, - final_energy_per_atom=self.energy_per_atom, - max_force=self.max_force, - cart_stress_tensor=self.cart_stress_tensor, - pressure=self.pressure, - number_of_electrons=self.nelect, - ) - # FIXME: this call raises - #> if kpointcbm.label is not None: - #E AttributeError: 'NoneType' object has no attribute 'label' - #ebands=self.ebands.to_pymatgen().as_dict(), - #max_residual= - #magnetization=self.magnetization, - #band_gap= - #optical_gap= - #is_direct= - #cbm= - #vbm= - #efermi= - #band_gap: - #optical_gap: - #efermi: + def get_panel(self): + """ + Build panel with widgets to interact with the |GsrFile| either in a notebook or in panel app. + """ + from abipy.panels.gsr import GsrFilePanel + return GsrFilePanel(self).get_panel() def yield_figs(self, **kwargs): # pragma: no cover """ @@ -371,8 +356,8 @@ def read_cart_forces(self, unit="eV ang^-1"): def read_cart_stress_tensor(self): """ - Return the stress tensor (3x3 matrix) in cartesian coordinates (Hartree/Bohr^3) - If MaskedArray (i.e. tensor was not computed e.g. Nscf run) set it to + Return the stress tensor (3x3 matrix) in cartesian coordinates in GPa. + If MaskedArray (i.e. tensor was not computed e.g. Nscf run) set it to _INVALID_STRESS_TENSOR """ # Abinit stores 6 unique components of this symmetric 3x3 tensor: # Given in order (1,1), (2,2), (3,3), (3,2), (3,1), (2,1). @@ -387,15 +372,23 @@ def read_cart_stress_tensor(self): for p, (i, j) in enumerate(((2, 1), (2, 0), (1, 0))): tensor[i, j] = c[3 + p] tensor[j, i] = c[3 + p] + tensor *= abu.HaBohr3_GPa - return tensor + return Stress(tensor) def read_energy_terms(self, unit="eV"): """ Return a dictionary with the different contributions to the total electronic energy. """ convert = lambda e: units.Energy(e, unit="Ha").to(unit) - d = {k: convert(self.read_value(k)) for k in EnergyTerms.ALL_KEYS} + d = OrderedDict() + for k in EnergyTerms.ALL_KEYS: + if k == "e_nonlocalpsp" and k not in self.rootgrp.variables: + # Renamed in 8.9 + d[k] = convert(self.read_value("e_nlpsp_vfock")) + else: + d[k] = convert(self.read_value(k)) + return EnergyTerms(**d) @@ -613,6 +606,13 @@ def yield_figs(self, **kwargs): # pragma: no cover yield self.plot_gsr_convergence(show=False) for fig in self.get_ebands_plotter().yield_figs(): yield fig + def get_panel(self): + """ + Build panel with widgets to interact with the |GsrRobot| either in a notebook or in panel app. + """ + from abipy.panels.gsr import GsrRobotPanel + return GsrRobotPanel(self).get_panel() + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current diff --git a/abipy/electrons/gw.py b/abipy/electrons/gw.py index 314a05d00..25a56e568 100644 --- a/abipy/electrons/gw.py +++ b/abipy/electrons/gw.py @@ -1,18 +1,16 @@ # coding: utf-8 """Classes for the analysis of GW calculations.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import copy import warnings import numpy as np import pandas as pd -from collections import namedtuple, OrderedDict, Iterable, defaultdict -from six.moves import cStringIO +from collections import namedtuple, OrderedDict +from io import StringIO from tabulate import tabulate from monty.string import list_strings, is_string, marquee -from monty.collections import AttrDict, dict2namedtuple +from monty.collections import dict2namedtuple from monty.functools import lazy_property from monty.termcolor import cprint from monty.bisect import find_le, find_ge @@ -21,7 +19,7 @@ from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter from abipy.iotools import ETSF_Reader from abipy.tools.plotting import (ArrayPlotter, add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, Marker, - set_axlims, set_visible, rotate_ticklabels, ax_append_title) + set_axlims, set_visible, rotate_ticklabels) from abipy.tools import duck from abipy.abio.robots import Robot from abipy.electrons.ebands import ElectronBands, RobotWithEbands @@ -213,7 +211,7 @@ class QPList(list): A list of quasiparticle corrections for a given spin. """ def __init__(self, *args, **kwargs): - super(QPList, self).__init__(*args) + super().__init__(*args) self.is_e0sorted = kwargs.get("is_e0sorted", False) def __repr__(self): @@ -327,7 +325,7 @@ def plot_qps_vs_e0(self, with_fields="all", exclude_fields=None, fermie=None, qps = self if self.is_e0sorted else self.sort_by_e0() e0mesh = qps.get_e0mesh() xlabel = r"$\epsilon_{KS}\;(eV)$" - print("fermie", fermie) + #print("fermie", fermie) if fermie is not None: xlabel = r"$\epsilon_{KS}-\epsilon_F\;(eV)$" e0mesh -= fermie @@ -599,7 +597,7 @@ def from_file(cls, filepath): def __init__(self, filepath): """Read data from the netcdf file path.""" - super(SigresFile, self).__init__(filepath) + super().__init__(filepath) # Keep a reference to the SigresReader. self.reader = reader = SigresReader(self.filepath) @@ -687,8 +685,8 @@ def to_string(self, verbose=0): app("") # Show QP results - strio = cStringIO() - self.print_qps(precision=3, ignore_imag=verbose==0, file=strio) + strio = StringIO() + self.print_qps(precision=3, ignore_imag=verbose == 0, file=strio) strio.seek(0) app("") app(marquee("QP results for each k-point and spin (all in eV)", mark="=")) @@ -1270,7 +1268,7 @@ def interpolate(self, lpratio=5, ks_ebands_kpath=None, ks_ebands_kmesh=None, ks_ ks_ebands_kmesh = ElectronBands.as_ebands(ks_ebands_kmesh) if bstop > ks_ebands_kmesh.nband: raise ValueError("Not enough bands in ks_ebands_kmesh, found %s, minimum expected %d\n" % ( - ks_ebands_kmesh%nband, bstop)) + ks_ebands_kmesh.nband, bstop)) if ks_ebands_kpath.structure != self.structure: cprint("sigres.structure and ks_ebands_kpath.structures differ. Check your files!", "red") #raise ValueError("sigres.structure and ks_ebands_kmesh.structures differ. Check your files!") @@ -1493,7 +1491,7 @@ class SigresReader(ETSF_Reader): def __init__(self, path): self.ks_bands = ElectronBands.from_file(path) self.nsppol = self.ks_bands.nsppol - super(SigresReader, self).__init__(path) + super().__init__(path) try: self.nomega_r = self.read_dimvalue("nomega_r") @@ -1734,7 +1732,7 @@ def read_params(self): params = OrderedDict() for pname in param_names: v = self.read_value(pname, default=None) - params[pname] = v if v is None else np.asscalar(v) + params[pname] = v if v is None else np.asarray(v).item() # Other quantities that might be subject to convergence studies. #params["nkibz"] = len(self.ibz) @@ -1764,7 +1762,7 @@ class SigresRobot(Robot, RobotWithEbands): EXT = "SIGRES" def __init__(self, *args): - super(SigresRobot, self).__init__(*args) + super().__init__(*args) if len(self.abifiles) in (0, 1): return # TODO @@ -2070,7 +2068,7 @@ def plot_qpfield_vs_e0(self, field, sortby=None, hue=None, fontsize=8, if sortby is not None: label = "%s: %s" % (self._get_label(sortby), param) fig = ncfile.plot_qps_vs_e0(with_fields=list_strings(field), - e0=e0, ax_list=ax_list, color=cmap(i/ len(lnp_list)), fontsize=fontsize, + e0=e0, ax_list=ax_list, color=cmap(i / len(lnp_list)), fontsize=fontsize, sharey=sharey, label=label, show=False) ax_list = fig.axes else: @@ -2084,7 +2082,7 @@ def plot_qpfield_vs_e0(self, field, sortby=None, hue=None, fontsize=8, ax_mat[0, ig].set_title(subtitle, fontsize=fontsize) for i, (nclabel, ncfile, param) in enumerate(g): fig = ncfile.plot_qps_vs_e0(with_fields=list_strings(field), - e0=e0, ax_list=ax_mat[:, ig], color=cmap(i/ len(g)), fontsize=fontsize, + e0=e0, ax_list=ax_mat[:, ig], color=cmap(i / len(g)), fontsize=fontsize, sharey=sharey, label="%s: %s" % (self._get_label(sortby), param), show=False) if ig != 0: @@ -2189,4 +2187,4 @@ def write_notebook(self, nbpath=None): nb.cells.extend(self.get_baserobot_code_cells()) nb.cells.extend(self.get_ebands_code_cells()) - return self._write_nb_nbpath(nb, nbpath) \ No newline at end of file + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/electrons/lobster.py b/abipy/electrons/lobster.py index d064f1478..bd40ab2a0 100644 --- a/abipy/electrons/lobster.py +++ b/abipy/electrons/lobster.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tools to analyze the output files produced by Lobster.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import re import glob @@ -203,8 +201,8 @@ def from_file(cls, filepath): # second (down) spin. Here N is the number of interactions. float_patt = r'-?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?' - header_patt = re.compile(r'\s+(\d+)\s+(\d+)\s+(\d+)\s+('+float_patt+ - r')\s+('+float_patt+r')\s+('+float_patt+r')') + header_patt = re.compile(r'\s+(\d+)\s+(\d+)\s+(\d+)\s+(' + float_patt + + r')\s+(' + float_patt + r')\s+(' + float_patt + r')') pair_patt = re.compile(r'No\.\d+:([a-zA-Z]+)(\d+)(?:\[([a-z0-9_\-^]+)\])?->([a-zA-Z]+)(\d+)(?:\[([a-z0-9_\-^]+)\])?') new = cls(filepath) @@ -424,7 +422,7 @@ def plot(self, what="d", spin=None, ax=None, exchange_xy=False, fontsize=12, **k @add_fig_kwargs def plot_average_pairs(self, with_site_index, what="single", exchange_xy=False, - fontsize=8, **kwargs): + fontsize=8, **kwargs): """ Plot COXP total overlap for all sites containg `with_site_index` and average sum (multiplied by the number of pairs) @@ -704,8 +702,8 @@ def from_file(cls, filepath): """ float_patt = r'-?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?' header_patt = re.compile(r'.*?(over+\s#\s+bonds)?\s+for\s+spin\s+(\d).*') - data_patt = re.compile(r'\s+\d+\s+([a-zA-Z]+)(\d+)\s+([a-zA-Z]+)(\d+)\s+('+ - float_patt+r')\s+('+float_patt+r')(\d+)?') + data_patt = re.compile(r'\s+\d+\s+([a-zA-Z]+)(\d+)\s+([a-zA-Z]+)(\d+)\s+(' + + float_patt + r')\s+(' + float_patt + r')(\d+)?') new = cls(filepath) new.values = tree() @@ -1087,7 +1085,7 @@ def _get_basis_functions_from_potcar(cls, potcar): """ basis_functions = [] for p in potcar: - basis_functions.append(p.element +" "+ " ".join(str(vs[0]) + vs[1] for vs in p.electron_configuration)) + basis_functions.append(p.element + " " + " ".join(str(vs[0]) + vs[1] for vs in p.electron_configuration)) return basis_functions def set_basis_functions_from_potcar(self, potcar): @@ -1138,7 +1136,7 @@ def to_string(self, verbose=0): lines.append("COHPSteps {}".format(self.en_steps)) if self.gaussian_smearing: - lines.append("gaussianSmearingWidth {}".format(self.gaussing_smearing)) + lines.append("gaussianSmearingWidth {}".format(self.gaussian_smearing)) if self.bwdf: lines.append("BWDF {}".format(self.bwdf)) @@ -1210,10 +1208,10 @@ def from_dir(cls, dirpath, dE=0.01, **kwargs): end_en = en_max - fermie # shift the energies so that are divisible by dE and the value for the fermi level (0 eV) is included - start_en = np.floor(start_en/dE)*dE - end_en= np.ceil(end_en/dE)*dE + start_en = np.floor(start_en / dE) * dE + end_en = np.ceil(end_en / dE) * dE - en_steps = int((end_en-start_en)/dE) + en_steps = int((end_en - start_en) / dE) return cls(basis_functions=basis_functions, start_en=start_en, end_en=end_en, en_steps=en_steps, **kwargs) diff --git a/abipy/electrons/optic.py b/abipy/electrons/optic.py index 3fe758297..09e99672e 100644 --- a/abipy/electrons/optic.py +++ b/abipy/electrons/optic.py @@ -2,8 +2,6 @@ """ Objects to read and analyze optical properties stored in the optic.nc file produced by optic executable. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import abipy.core.abinit_units as abu @@ -117,7 +115,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(OpticNcFile, self).__init__(filepath) + super().__init__(filepath) self.reader = OpticReader(filepath) # Read optic input variables and info on k-point sampling and store them in self. @@ -405,7 +403,7 @@ class OpticReader(ElectronsReader): .. inheritance-diagram:: OpticReader """ def __init__(self, filepath): - super(OpticReader, self).__init__(filepath) + super().__init__(filepath) self.ntemp = self.read_dimvalue("ntemp") self.computed_components = OrderedDict() diff --git a/abipy/electrons/psps.py b/abipy/electrons/psps.py index 4b0dce5ef..c9c4e3573 100644 --- a/abipy/electrons/psps.py +++ b/abipy/electrons/psps.py @@ -1,13 +1,11 @@ # coding: utf-8 """PSPS file with tabulated data.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np +from collections import OrderedDict from monty.bisect import find_gt from monty.functools import lazy_property from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt -from abipy.flowtk import Pseudo from abipy.iotools import ETSF_Reader from abipy.core.mixins import AbinitNcFile @@ -15,27 +13,6 @@ logger = logging.getLogger(__name__) -#def compare_pseudos(filepaths, ecut=30): -# """ -# This function receives a list of pseudopotential files, call -# Abinit to produced the PSPS.nc files and produces matplotlib plots -# comparing the behaviour of the pseudos in real and in reciprocal space. -# -# Args: -# filepaths: List of file names. -# ecut: Cutoff energy in Ha for the wavefunctions. -# """ -# pseudos = [Pseudo.from_file(path) for path in filepaths] -# -# psps_files = [p.open_pspsfile(ecut=ecut) for p in pseudos] -# -# p0 = psps_files[0] -# p0.compare(psps_files[1:]) -# -# for pfile in psps_files: -# pfile.close() - - def mklabel(fsym, der, arg): """mklabel(f, 2, x) --> $f''(x)$""" if der == 0: @@ -54,6 +31,35 @@ def rescale(arr, scale=1.0): return fact * arr, fact +def dataframe_from_pseudos(pseudos, index=None): + """ + Build pandas dataframe with the most important info associated to + a list of pseudos or a list of objects that can be converted into pseudos. + + Args: + pseudos: List of objects that can be converted to pseudos. + index: Index of the dataframe. + + Return: pandas Dataframe. + """ + from abipy.flowtk import PseudoTable + pseudos = PseudoTable.as_table(pseudos) + + import pandas as pd + attname = ["Z_val", "l_max", "l_local", "nlcc_radius", "xc", "supports_soc", "type"] + rows = [] + for p in pseudos: + row = OrderedDict([(k, getattr(p, k, None)) for k in attname]) + row["ecut_normal"], row["pawecutdg_normal"] = None, None + if p.has_hints: + hint = p.hint_for_accuracy(accuracy="normal") + row["ecut_normal"] = hint.ecut + if hint.pawecutdg: row["pawecutdg_normal"] = hint.pawecutdg + rows.append(row) + + return pd.DataFrame(rows, index=index, columns=list(rows[0].keys()) if rows else None) + + class PspsFile(AbinitNcFile): """ Netcdf file with the tables used in Abinit to apply the @@ -75,7 +81,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(PspsFile, self).__init__(filepath) + super().__init__(filepath) self.reader = r = PspsReader(filepath) def close(self): @@ -318,7 +324,7 @@ def mkcolor(count): return {0: "red", 1: "blue"}[count] else: cmap = plt.get_cmap("jet") - return cmap(float(count)/ (1 + len(others))) + return cmap(float(count) / (1 + len(others))) ic = 0; ax = ax_list[ic] self.plot_tcore_rspace(ax=ax, color=mkcolor(0), show=False, with_legend=False) @@ -349,7 +355,7 @@ class PspsReader(ETSF_Reader): It provides helper function to access the most important quantities. """ def __init__(self, filepath): - super(PspsReader, self).__init__(filepath) + super().__init__(filepath) # Get important quantities. self.usepaw, self.useylm = self.read_value("usepaw"), self.read_value("useylm") diff --git a/abipy/electrons/scissors.py b/abipy/electrons/scissors.py index 56fd1ac8d..d7ef28ec4 100644 --- a/abipy/electrons/scissors.py +++ b/abipy/electrons/scissors.py @@ -1,11 +1,9 @@ # coding: utf-8 """Scissors operator.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np +import pickle -from six.moves import cPickle as pickle from collections import OrderedDict from monty.collections import AttrDict from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt @@ -72,7 +70,7 @@ def __init__(self, func_list, domains, residues, bounds=None): if blow.lower() == "c": try: self.func_low = lambda x: float(bounds[0][1]) - except: + except Exception: x_low = self.domains[0,0] fx_low = func_list[0](x_low) self.func_low = lambda x: fx_low @@ -82,7 +80,7 @@ def __init__(self, func_list, domains, residues, bounds=None): if bhigh.lower() == "c": try: self.func_high = lambda x: float(bounds[1][1]) - except: + except Exception: x_high = self.domains[1, -1] fx_high = func_list[-1](x_high) self.func_high = lambda x: fx_high diff --git a/abipy/electrons/scr.py b/abipy/electrons/scr.py index 64a05d878..9aa73b8cf 100644 --- a/abipy/electrons/scr.py +++ b/abipy/electrons/scr.py @@ -1,25 +1,21 @@ # coding: utf-8 """Objects to analyze the screening files produced by the GW code (optdriver 3).""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np -import six -import abc import pymatgen.core.units as pmgu -from monty.string import marquee # is_string, list_strings, +from monty.string import marquee from monty.inspect import all_subclasses from monty.termcolor import cprint from monty.collections import AttrDict from monty.functools import lazy_property from monty.bisect import index as bs_index from abipy.core.func1d import Function1D -from abipy.core.kpoints import Kpoint, KpointList +from abipy.core.kpoints import KpointList from abipy.core.gsphere import GSphere -from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter +from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, NotebookWriter from abipy.electrons.ebands import ElectronBands from abipy.iotools import ETSF_Reader -from abipy.tools.plotting import ArrayPlotter, plot_array, data_from_cplx_mode, add_fig_kwargs, get_ax_fig_plt, set_axlims +from abipy.tools.plotting import ArrayPlotter, data_from_cplx_mode, add_fig_kwargs, get_ax_fig_plt, set_axlims from abipy.tools import duck import logging @@ -59,7 +55,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(ScrFile, self).__init__(filepath) + super().__init__(filepath) self.reader = ScrReader(filepath) def close(self): @@ -270,7 +266,7 @@ class ScrReader(ETSF_Reader): .. inheritance-diagram:: ScrReader """ def __init__(self, filepath): - super(ScrReader, self).__init__(filepath) + super().__init__(filepath) # Read and store important quantities. self.structure = self.read_structure() @@ -321,7 +317,8 @@ def read_params(self): def convert(arr): """Convert to scalar if size == 1""" - return np.asscalar(arr) if arr.size == 1 else arr + #return np.asscalar(arr) if arr.size == 1 else arr + return np.asarray(arr).item() if arr.size == 1 else arr return AttrDict({k: convert(self.read_value(k)) for k in keys}) @@ -369,7 +366,7 @@ def read_eelf(self, kpoint=(0, 0, 0)): # eelf = -Im(1 / eM) emacro_lf = self.read_emacro_lf(kpoint=kpoint) #emacro_lf = self.read_emacro_nlf(kpoint=kpoint) - values = (-1 / emacro_lf.values).imag + values = (-1 / emacro_lf.values).imag return Function1D(emacro_lf.mesh.copy(), values) @@ -746,7 +743,7 @@ class InverseDielectricFunction(_AwggMatrix): # return fig -#class PPModel(six.with_metaclass(abc.ABCMeta, object)): +#class PPModel(metaclas=abc.ABCMeta): # """ # Abstract base class for Plasmonpole models. # """ diff --git a/abipy/electrons/tests/test_arpes.py b/abipy/electrons/tests/test_arpes.py index 2307c2928..4eef84ee3 100644 --- a/abipy/electrons/tests/test_arpes.py +++ b/abipy/electrons/tests/test_arpes.py @@ -1,11 +1,6 @@ """Tests for electrons.arpes module""" -from __future__ import print_function, division, unicode_literals, absolute_import - -#import os -#import numpy as np import abipy.data as abidata -#from abipy import abilab from abipy.core.testing import AbipyTest from abipy.electrons.arpes import ArpesPlotter diff --git a/abipy/electrons/tests/test_bse.py b/abipy/electrons/tests/test_bse.py index 17ea96684..f5e919f7c 100644 --- a/abipy/electrons/tests/test_bse.py +++ b/abipy/electrons/tests/test_bse.py @@ -1,6 +1,4 @@ """Tests for electrons.bse module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np import abipy.data as abidata diff --git a/abipy/electrons/tests/test_charges.py b/abipy/electrons/tests/test_charges.py index 413c6ac90..8477c5d49 100644 --- a/abipy/electrons/tests/test_charges.py +++ b/abipy/electrons/tests/test_charges.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for charges.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import numpy as np import os import abipy.data as abidata diff --git a/abipy/electrons/tests/test_ddk.py b/abipy/electrons/tests/test_ddk.py deleted file mode 100644 index fd4c3b1d8..000000000 --- a/abipy/electrons/tests/test_ddk.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 -"""Tests for ddk module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - -import numpy as np -import abipy.data as abidata - -from abipy.core.testing import AbipyTest -from abipy.electrons.ddk import DdkFile, DdksAnalyzer -from abipy import abilab - - -class DdkTest(AbipyTest): - - def test_ddk_api(self): - """Testing DDK API""" - with abilab.abiopen(abidata.ref_file("gaas_444_dir1_DDK.nc")) as ddk: - repr(ddk); str(ddk) - assert ddk.to_string(verbose=2) - - assert ddk.structure.formula == "Ga1 As1" - assert ddk.ebands.nsppol == 1 and ddk.ebands.nspden == 1 and ddk.ebands.nspinor == 1 - assert ddk.ebands.nband == 20 - assert ddk.idir == 1 and ddk.ipert == len(ddk.structure) + 1 - assert ddk.kptopt == 2 - ksamp = ddk.kpoints.ksampling - self.assert_equal(ksamp.kptrlatt_orig.ravel(), [4, 0, 0, 0, 4, 0, 0, 0, 4]) - self.assert_equal(ksamp.shifts_orig.ravel(), - [0.5, 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5]) - assert ddk.kpoints.is_ibz - ddk.kpoints.check_weights() - assert np.all(ddk.hdr["qptn"] == 0) - #assert ddk.xc == "LDA" - - assert ddk.params["nband"] == 20 - - if self.has_nbformat(): - assert ddk.write_notebook(nbpath=self.get_tmpname(text=True)) - - -class DdkAnalyzerTest(AbipyTest): - - def test_ddk_analyzer(self): - """Testing DDK analyzer.""" - - ddk_paths = abidata.ref_files( - "gaas_444_dir1_DDK.nc", - "gaas_444_dir2_DDK.nc", - "gaas_444_dir3_DDK.nc", - ) - - with DdksAnalyzer(ddk_paths) as dka: - repr(dka); str(dka) - assert dka.to_string(verbose=2) - assert dka.nsppol == 1 and dka.nspden == 1 and dka.nspinor == 1 - - #dka.v_skb - #r = dka.get_doses() - #assert np.all(r.edos.mesh == e.vdos.mesh) - - #if self.has_matplotlib(): - # assert dka.plot_vdos(show=False) - - #if self.has_nbformat(): - # assert dka.write_notebook(nbpath=self.get_tmpname(text=True)) diff --git a/abipy/electrons/tests/test_denpot.py b/abipy/electrons/tests/test_denpot.py index ce34166ce..fad03390c 100644 --- a/abipy/electrons/tests/test_denpot.py +++ b/abipy/electrons/tests/test_denpot.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for DEN/POT files.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import numpy as np import abipy.data as abidata diff --git a/abipy/electrons/tests/test_ebands.py b/abipy/electrons/tests/test_ebands.py index 2e44b1b16..c7b3c705b 100644 --- a/abipy/electrons/tests/test_ebands.py +++ b/abipy/electrons/tests/test_ebands.py @@ -1,6 +1,4 @@ """Tests for electrons.ebands module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import numpy as np import unittest @@ -93,8 +91,8 @@ def test_nickel_ebands_spin(self): assert smearing.scheme == "gaussian" assert not ni_ebands_kmesh.get_gaps_string() - #ni_ebands_kmesh.copy() - #ni_ebands_kmesh.deepcopy() + same = ni_ebands_kmesh.deepcopy() + assert same.structure == ni_ebands_kmesh.structure ni_edos = ni_ebands_kmesh.get_edos() repr(ni_edos); str(ni_edos) @@ -107,7 +105,7 @@ def test_nickel_ebands_spin(self): # Combiplot. assert edos_plotter.combiplot(title="default values", show=False) assert edos_plotter.combiplot(what_list=("dos", "idos"), spin_mode="resolved", show=False) - assert edos_plotter.combiplot(e0=0, what_list="dos", spin_mode="resolved", fontsize=12, show=False) + assert edos_plotter.combiplot(e0=0, what_list="dos", spin_mode="automatic", fontsize=12, show=False) # Gridplot assert edos_plotter.gridplot(title="default values", show=False) assert edos_plotter.gridplot(what="idos", spin_mode="resolved", xlims=(-10, 10), show=False) @@ -297,7 +295,7 @@ def test_silicon_ebands(self): # Test plot methods if self.has_matplotlib(): klabels = { - (0,0,0): "$\Gamma$", + (0,0,0): r"$\Gamma$", (0.375, 0.375, 0.7500): "K", (0.5, 0.5, 1.0): "X", (0.5, 0.5, 0.5): "L", @@ -386,6 +384,14 @@ def test_silicon_ebands(self): e2 = si_ebands_kpath.lomo_sk(spin=0, kpoint=si_ebands_kpath.kpoints[0]) assert e1.eig == e2.eig + # Find k0_list and effmass_bands_f90 (Fortran notation) + k0_list, effmass_bands_f90 = si_ebands_kpath.get_kpoints_and_band_range_for_edges() + + self.assert_equal(effmass_bands_f90, [[4, 4], [5, 5]]) + self.assert_almost_equal(k0_list, np.array( + [[0., 0. , 0. ], + [0., 0.42857143, 0.42857143]])) + # Test abipy-->pymatgen converter pmg_bands_kpath = si_ebands_kpath.to_pymatgen() assert hasattr(pmg_bands_kpath, "get_branch") # Should be BandStructureSymmLine @@ -464,7 +470,7 @@ def test_derivatives(self): self.assert_almost_equal(np.array(values), 1.0) - em = ebands.effmass_line(spin=0, kpoint=(0, 0, 0), band=0) + em = ebands.get_effmass_line(spin=0, kpoint=(0, 0, 0), band=0) repr(em); str(em) #self.assert_almost_equal(np.array(values), 1.0) @@ -473,6 +479,7 @@ def test_fermi_surface(self): with abilab.abiopen(abidata.ref_file("mgb2_kmesh181818_FATBANDS.nc")) as fbnc_kmesh: ebands = fbnc_kmesh.ebands str(ebands) + assert ebands.supports_fermi_surface ebands.to_bxsf(self.get_tmpname(text=True)) # Test Ebands3d @@ -483,7 +490,7 @@ def test_fermi_surface(self): if self.has_matplotlib(): assert eb3d.plot_contour(band=4, spin=0, plane="xy", elevation=0, show=False) if self.has_skimage(): - assert eb3d.plot_isosurfaces(e0="fermie", verbose=1, show=False) + assert eb3d.plot_isosurfaces(e0="fermie", cmap="rainbow", verbose=1, show=False) # Test Mayavi if self.has_mayavi(): @@ -497,7 +504,7 @@ def test_frame_from_ebands(self): gsr_nscf_path = abidata.ref_file("si_nscf_GSR.nc") index = ["foo", "bar", "hello"] df = dataframe_from_ebands([gsr_kmesh, si_ebands_kmesh, gsr_nscf_path], index=index, with_spglib=True) - str(df) + #str(df) assert all(f == "Si2" for f in df["formula"]) assert all(num == 227 for num in df["abispg_num"]) assert all(df["spglib_num"] == df["abispg_num"]) @@ -517,9 +524,16 @@ def test_from_mpid(self): # Results are very sensitive to the value of lpratio. The default is not enough in this case!! r = ebands.interpolate(lpratio=50, kmesh=[10, 10, 10]) + new_fermie = r.ebands_kpath.set_fermie_to_vbm() + assert new_fermie == r.ebands_kpath.fermie + assert not r.ebands_kpath.supports_fermi_surface + + edos = r.ebands_kmesh.get_edos() + new_fermie = r.ebands_kpath.set_fermie_from_edos(edos) + assert new_fermie == edos.fermie + if self.has_matplotlib(): # Plot bands + dos using interpolated energies. - edos = r.ebands_kmesh.get_edos() assert r.ebands_kpath.plot_with_edos(edos, show=False) @@ -542,7 +556,7 @@ def test_ebands_plotter(self): assert len(p2.edoses_list) == 0 assert hasattr(p2, "combiplot") - print(plotter.bands_statdiff()) + assert plotter.bands_statdiff() df = plotter.get_ebands_frame() assert df is not None @@ -554,6 +568,7 @@ def test_ebands_plotter(self): plotter.combiboxplot(title="Silicon band structure", swarm=True, show=False) assert plotter.gridplot(title="Silicon band structure", with_gaps=True, show=False) assert plotter.boxplot(title="Silicon band structure", swarm=True, show=False) + assert plotter.plot_band_edges(epad_ev=2.0, show=False) assert plotter.animate(show=False) if self.has_ipywidgets(): diff --git a/abipy/electrons/tests/test_effmass_analyzer.py b/abipy/electrons/tests/test_effmass_analyzer.py new file mode 100644 index 000000000..39671a7ff --- /dev/null +++ b/abipy/electrons/tests/test_effmass_analyzer.py @@ -0,0 +1,39 @@ +"""Tests for electrons.effmass_analyzer module""" +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy.electrons.effmass_analyzer import EffMassAnalyzer + + +class EffMassAnalyzerTest(AbipyTest): + + def test_api(self): + """Testing EffMassAnalyzer.""" + emana = EffMassAnalyzer.from_file(abidata.ref_file("si_nscf_GSR.nc")) + repr(emana); str(emana) + assert emana.to_string(verbose=2) + + with self.assertRaises(RuntimeError): + emana.summarize() + + emana.select_kpoint_band((0, 0, 0), band=3, spin=0, etol_ev=0.1) + emana.summarize() + + emana.select_band_edges() + emana.select_cbm() + emana.select_vbm(etol_ev=1e-3) + emana.summarize() + + segment = emana.segments[0] + repr(segment); str(segment) + assert segment.to_string(verbose=2) + df = segment.get_dataframe_with_accuracies(acc_list=(2, 4)) + + #assert len(emana.segments) == 1 + #for segment in emana.segments[0]: + # segment.get_effmass_line(acc=2) + + if self.has_matplotlib(): + assert emana.plot_emass(acc=4, show=False) + assert emana.plot_all_segments(show=False) + assert emana.segments[0].plot_emass(show=False) diff --git a/abipy/electrons/tests/test_fatbands.py b/abipy/electrons/tests/test_fatbands.py index e3e73931b..98475f763 100644 --- a/abipy/electrons/tests/test_fatbands.py +++ b/abipy/electrons/tests/test_fatbands.py @@ -1,6 +1,4 @@ """Tests for electrons.bse module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import itertools import abipy.data as abidata @@ -41,6 +39,9 @@ def test_MgB2_fatbands(self): if self.has_nbformat(): fbnc_kpath.write_notebook(nbpath=self.get_tmpname(text=True)) + if self.has_panel(): + assert hasattr(fbnc_kpath.get_panel(), "show") + fbnc_kmesh = FatBandsFile(abidata.ref_file("mgb2_kmesh181818_FATBANDS.nc")) repr(fbnc_kmesh); str(fbnc_kmesh) assert fbnc_kmesh.ebands.kpoints.is_ibz diff --git a/abipy/electrons/tests/test_fold2bloch.py b/abipy/electrons/tests/test_fold2bloch.py index 0be2f400a..cad30f8d6 100644 --- a/abipy/electrons/tests/test_fold2bloch.py +++ b/abipy/electrons/tests/test_fold2bloch.py @@ -1,6 +1,4 @@ """Tests for Fold2Bloch module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import numpy as np import abipy.data as abidata @@ -30,6 +28,6 @@ def test_fold2bloch_h6(self): if self.has_matplotlib(): kbounds = [0, 1/2, 0, 0, 0, 0, 0, 0, 1/2] - klabels = ["Y", "$\Gamma$", "X"] + klabels = ["Y", r"$\Gamma$", "X"] assert fb.plot_unfolded(kbounds, klabels, dist_tol=1e-12, verbose=1, colormap="afmhot", facecolor="black") diff --git a/abipy/electrons/tests/test_gsr.py b/abipy/electrons/tests/test_gsr.py index 51686f7c4..02ee97226 100644 --- a/abipy/electrons/tests/test_gsr.py +++ b/abipy/electrons/tests/test_gsr.py @@ -1,10 +1,9 @@ """Test for GSR module""" -from __future__ import division, print_function, unicode_literals, absolute_import - import os import numpy as np import abipy.data as abidata import abipy.core +import abipy.core.abinit_units as abu from pprint import pprint from abipy.core.testing import AbipyTest @@ -114,15 +113,9 @@ def test_gsr_silicon(self): # sigma(1 1)= 1.77139311E-04 sigma(3 2)= 0.00000000E+00 # sigma(2 2)= 1.77139311E-04 sigma(3 1)= 0.00000000E+00 # sigma(3 3)= 1.77139311E-04 sigma(2 1)= 2.67294316E-15 - self.assert_almost_equal(gsr.pressure, -5.21162150) - - # Test as_dict - d = gsr.as_dict() - assert d and "structure" in d - #import json - #with open("hello.json", "w") as fp: - # json.dump(gsr.as_dict(), fp) - #assert 0 + for i in range(3): + self.assert_almost_equal(gsr.cart_stress_tensor[0, 0], 1.77139311E-04 * abu.HaBohr3_GPa) + self.assert_almost_equal(gsr.pressure, -5.211617575719521) # Test pymatgen computed_entries for inc_structure in (True, False): @@ -135,20 +128,23 @@ def test_gsr_silicon(self): if self.has_matplotlib(): assert gsr.plot_ebands(show=False) - assert gsr.plot_ebands_with_edos(edos=gsr.ebands.get_edos(), show=False) + assert gsr.plot_ebands_with_edos(edos=gsr.get_edos(), show=False) if self.has_nbformat(): gsr.write_notebook(nbpath=self.get_tmpname(text=True)) + if self.has_panel(): + assert hasattr(gsr.get_panel(), "show") + class GsrRobotTest(AbipyTest): def test_gsr_robot(self): """Testing GSR robot""" from abipy import abilab - gsr_path = abidata.ref_file("si_scf_GSR.nc") + gsr_ibz = abidata.ref_file("si_scf_GSR.nc") robot = abilab.GsrRobot() - robot.add_file("gsr0", gsr_path) + robot.add_file("gsr0", gsr_ibz) assert len(robot.abifiles) == 1 assert "gsr0" in robot.keys() assert "gsr0" in robot.labels @@ -158,10 +154,10 @@ def test_gsr_robot(self): # Cannot have same label with self.assertRaises(ValueError): - robot.add_file("gsr0", gsr_path) + robot.add_file("gsr0", gsr_ibz) assert len(robot) == 1 and not robot.exceptions - robot.add_file("gsr1", abilab.abiopen(gsr_path)) + robot.add_file("gsr1", abilab.abiopen(gsr_ibz)) assert len(robot) == 2 robot.show_files() assert not robot.has_different_structures() @@ -178,6 +174,10 @@ def test_gsr_robot(self): assert dfs.coords is not None assert len(dfs.structures) == len(robot) + assert len(robot.get_ebands_plotter(kselect="path")) == 0 + filter_abifile = lambda gsr: gsr.ebands.kpoints.is_ibz + assert len(robot.get_ebands_plotter(filter_abifile=filter_abifile)) == 2 + ebands_plotter = robot.get_ebands_plotter() edos_plotter = robot.get_edos_plotter() @@ -201,6 +201,9 @@ def test_gsr_robot(self): assert robot.plot_egaps(sortby="nkpt", hue="tsmear") assert robot.gridplot_with_hue("structure.formula", show=False) + if self.has_panel(): + assert hasattr(robot.get_panel(), "show") + # Get pandas dataframe. df = robot.get_dataframe() assert "energy" in df diff --git a/abipy/electrons/tests/test_gw.py b/abipy/electrons/tests/test_gw.py index 2351b5869..5eb06156f 100644 --- a/abipy/electrons/tests/test_gw.py +++ b/abipy/electrons/tests/test_gw.py @@ -1,6 +1,4 @@ """Tests for electrons.gw module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import os import collections import numpy as np @@ -25,7 +23,7 @@ def tearDown(self): def test_qplist(self): """Test QPList object.""" qplist = self.qplist - assert isinstance(qplist, collections.Iterable) + assert isinstance(qplist, collections.abc.Iterable) self.serialize_with_pickle(qplist, protocols=[-1]) repr(qplist); str(qplist) @@ -120,7 +118,7 @@ def test_base(self): # Ignore imaginary part. df_real = sigres.get_dataframe_sk(spin=0, kpoint=ik, ignore_imag=True) - assert np.all(df["qpe"].real == df_real["qpe"]) + assert np.all(df["qpe"].to_numpy().real == df_real["qpe"]) full_df = sigres.to_dataframe() diff --git a/abipy/electrons/tests/test_lobster.py b/abipy/electrons/tests/test_lobster.py index 5e194a8ee..4b79def47 100644 --- a/abipy/electrons/tests/test_lobster.py +++ b/abipy/electrons/tests/test_lobster.py @@ -1,6 +1,4 @@ """Tests for electrons.lobster module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import numpy as np diff --git a/abipy/electrons/tests/test_optic.py b/abipy/electrons/tests/test_optic.py index 89f74afc1..6b1b1bd5c 100644 --- a/abipy/electrons/tests/test_optic.py +++ b/abipy/electrons/tests/test_optic.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for optic module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import abipy.data as abidata from abipy.core.testing import AbipyTest @@ -36,7 +34,6 @@ def test_opticfile(self): assert optic.reader.computed_components["leo"] == ["xyz"] #assert not optic.reader.computed_components["leo2"] - # Test plot methods if self.has_matplotlib(): assert optic.plot_linear_epsilon(show=False) diff --git a/abipy/electrons/tests/test_psps.py b/abipy/electrons/tests/test_psps.py index 7db994ea1..3de33027d 100644 --- a/abipy/electrons/tests/test_psps.py +++ b/abipy/electrons/tests/test_psps.py @@ -1,6 +1,4 @@ """Tests for psps module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import numpy as np import abipy.data as abidata import abipy.core diff --git a/abipy/electrons/tests/test_scissors.py b/abipy/electrons/tests/test_scissors.py index 33b82a2ed..6b415f59f 100644 --- a/abipy/electrons/tests/test_scissors.py +++ b/abipy/electrons/tests/test_scissors.py @@ -1,6 +1,4 @@ """Tests for electrons.bse module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import abipy.data as abidata from abipy.core.testing import AbipyTest diff --git a/abipy/electrons/tests/test_scr.py b/abipy/electrons/tests/test_scr.py index bf0695c8d..756ecf3ef 100644 --- a/abipy/electrons/tests/test_scr.py +++ b/abipy/electrons/tests/test_scr.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for scr module.""" -from __future__ import division, print_function, unicode_literals, absolute_import - import numpy as np import pymatgen.core.units as pmgu import abipy.data as abidata diff --git a/abipy/eph/a2f.py b/abipy/eph/a2f.py index 61a55c09e..8db645ce7 100644 --- a/abipy/eph/a2f.py +++ b/abipy/eph/a2f.py @@ -6,8 +6,6 @@ Warning: Work in progress, DO NOT USE THIS CODE. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import pymatgen.core.units as units import abipy.core.abinit_units as abu @@ -19,7 +17,7 @@ from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter from abipy.core.kpoints import Kpath from abipy.tools.plotting import (add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, set_axlims, set_visible, - rotate_ticklabels) + rotate_ticklabels) from abipy.tools import duck from abipy.electrons.ebands import ElectronDos, RobotWithEbands from abipy.dfpt.phonons import PhononBands, PhononDos, RobotWithPhbands @@ -103,7 +101,8 @@ def to_string(self, title=None, verbose=0): app("Eliashberg Function" if not title else str(title)) # TODO: Add ElectronDos #app("Isotropic lambda: %.3f" % (self.lambda_iso)) - app("Isotropic lambda: %.2f, omega_log: %.3f (eV), %.3f (K)" % (self.lambda_iso, self.omega_log, self.omega_log * abu.eV_to_K)) + app("Isotropic lambda: %.2f, omega_log: %.3f (eV), %.3f (K)" % ( + self.lambda_iso, self.omega_log, self.omega_log * abu.eV_to_K)) app("Q-mesh: %s" % str(self.ngqpt)) app("Mesh from %.4f to %.4f (eV) with %d points" % ( self.mesh[0], self.mesh[-1], len(self.mesh))) @@ -111,6 +110,7 @@ def to_string(self, title=None, verbose=0): if verbose: for mustar in (0.1, 0.12, 0.2): app("\tFor mustar %s: McMillan Tc: %s [K]" % (mustar, self.get_mcmillan_tc(mustar))) + if verbose > 1: # $\int dw [a2F(w)/w] w^n$ for n in [0, 4]: @@ -209,7 +209,7 @@ def plot(self, what="a2f", units="eV", exchange_xy=False, ax=None, exchange_xy: True to exchange x-y axes. ax: |matplotlib-Axes| or None if a new figure should be created. xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used + or scalar e.g. ``left``. If left (right) is None, default values are used ylims: Limits for y-axis. See xlims for API. label: True to add legend label to each curve. fontsize: Legend and title fontsize @@ -271,7 +271,7 @@ def plot_with_lambda(self, units="eV", ax=None, xlims=None, fontsize=12, **kwarg units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. ax: |matplotlib-Axes| or None if a new figure should be created. xlims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used + or scalar e.g. ``left``. If left (right) is None, default values are used fontsize: Legend and title fontsize Returns: |matplotlib-Figure| @@ -298,7 +298,7 @@ def plot_nuterms(self, units="eV", ax_mat=None, with_lambda=True, fontsize=12, ax_mat: Matrix of axis of shape [natom, 3]. None if a new figure should be created. fontsize: Legend and title fontsize. xlims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used + or scalar e.g. ``left``. If left (right) is None, default values are used ylims: Limits for y-axis. See xlims for API. label: True to add legend label to each curve. @@ -347,7 +347,7 @@ def plot_nuterms(self, units="eV", ax_mat=None, with_lambda=True, fontsize=12, #ax.set_yticklabels([]) #ax.set_yticks([]) - if iatom == self.natom -1: + if iatom == self.natom - 1: ax.set_xlabel(abu.wlabel_from_units(units)) #set_axlims(ax, xlims, "x") #set_axlims(ax, ylims, "y") @@ -445,10 +445,10 @@ def __init__(self, mesh, vals_in, vals_out): """ Args: mesh: Energy mesh in eV - vals_in(nomega,3,3,0:natom3,nsppol): - Eliashberg transport functions for in and out scattering - vals_in(w,3,3,1:natom3,1:nsppol): a2f_tr(w) decomposed per phonon branch and spin - vals_in(w,3,3,0,1:nsppol): a2f_tr(w) summed over phonons modes, decomposed in spin + vals_in(nomega,3,3,0:natom3,nsppol): + Eliashberg transport functions for in and out scattering + vals_in(w,3,3,1:natom3,1:nsppol): a2f_tr(w) decomposed per phonon branch and spin + vals_in(w,3,3,0,1:nsppol): a2f_tr(w) summed over phonons modes, decomposed in spin """ self.mesh = mesh @@ -488,7 +488,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(A2fFile, self).__init__(filepath) + super().__init__(filepath) self.reader = A2fReader(filepath) def __str__(self): @@ -773,6 +773,7 @@ def plot(self, what="gamma", units="eV", scale=None, alpha=0.6, ylims=None, ax=N cqn = lambdas else: raise ValueError("Invalid what: `%s`" % str(what)) + vmin, vmax = cqn.min(), cqn.max() sc = ax.scatter(np.tile(xvals, len(self.phbands.branches)), @@ -837,7 +838,7 @@ def plot_with_a2f(self, what="gamma", units="eV", qsamp="qintp", phdos=None, yli qsamp: phdos: |PhononDos| object. Used to plot the PhononDos on the right. ylims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used + or scalar e.g. ``left``. If left (right) is None, default values are used Returns: |matplotlib-Figure| """ @@ -911,13 +912,18 @@ def yield_figs(self, **kwargs): # pragma: no cover yield self.plot(show=False) #yield self.plot_eph_strength(show=False) yield self.plot_with_a2f(show=False) + for qsamp in ["qcoarse", "qintp"]: a2f = self.get_a2f_qsamp(qsamp) - yield a2f.plot_with_lambda(show=False) + yield a2f.plot_with_lambda(title="q-sampling: %s (%s)" % (str(a2f.ngqpt), qsamp), show=False) + #yield self.plot_nuterms(show=False) #yield self.plot_a2(show=False) #yield self.plot_tc_vs_mustar(show=False) + #if self.has_a2ftr: + # ncfile.a2ftr.plot(); + def write_notebook(self, nbpath=None): """ Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current @@ -1182,6 +1188,7 @@ def plot_a2fdata_convergence(self, sortby=None, hue=None, qsamps="all", what_lis if hue is None: params_are_string = duck.is_string(params[0]) xvals = params if not params_are_string else range(len(params)) + l = None for iq, qsamp in enumerate(qsamps): a2f_list = [ncfile.get_a2f_qsamp(qsamp) for ncfile in ncfiles] yvals = [getattr(a2f, what) for a2f in a2f_list] @@ -1222,7 +1229,7 @@ def gridplot_a2f(self, xlims=None, fontsize=8, sharex=True, sharey=True, **kwarg Args: xlims: Set the data limits for the y-axis. Accept tuple e.g. ``(left, right)`` - or scalar e.g. ``left``. If left (right) is None, default values are used + or scalar e.g. ``left``. If left (right) is None, default values are used sharex, sharey: True to share x- and y-axis. fontsize: Legend and title fontsize """ @@ -1418,7 +1425,7 @@ def read_a2f(self, qsamp): Read and return the Eliashberg function :class:`A2F`. """ assert qsamp in ("qcoarse", "qintp") - mesh = self.read_value("a2f_mesh_" + qsamp) * units.Ha_to_eV + mesh = self.read_value("a2f_mesh_" + qsamp) * units.Ha_to_eV # C shape [nsppol, natom + 1, nomega] data = self.read_value("a2f_values_" + qsamp) # * 0.25 values_spin = data[:, 0, :].copy() diff --git a/abipy/eph/common.py b/abipy/eph/common.py index 83dd0e5cc..db6050e48 100644 --- a/abipy/eph/common.py +++ b/abipy/eph/common.py @@ -2,14 +2,16 @@ """ Objects common to the other eph modules. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np +import abipy.core.abinit_units as abu from collections import OrderedDict from monty.functools import lazy_property from abipy.electrons.ebands import ElectronsReader +# Phonon frequency in Ha below which e-ph matrix elements are set to zero. +EPH_WTOL = 1e-6 + class BaseEphReader(ElectronsReader): """ @@ -57,3 +59,46 @@ def common_eph_params(self): od[vname] = value return od + + +def glr_frohlich(qpoint, becs_cart, epsinf_cart, phdispl_cart_bohr, phfreqs_ha, structure, + qdamp=None, eph_wtol=EPH_WTOL, tol_qnorm=1e-6): + """ + Compute the long-range part of the e-ph matrix element with the simplified Frohlich model + i.e. we include only G = 0 and the coefficient is replaced by delta_{b1, b2} + + Args: + qpoint: |Kpoint| object. + becs_cart: (natom, 3, 3) arrays with Born effective charges in Cartesian coordinates. + epsinf_cart: (3, 3) array with macroscopic dielectric tensor in Cartesian coordinates. + phdispl_cart_bohr: (natom3_nu, natom3) complex array with phonon displacement in Cartesian coordinates (Bohr) + phfreqs_ha: (3 * natom) array with phonon frequencies in Ha. + structure: |Structure| object. + qdamp: Exponential damping. + eph_wtol: Set g to zero below this phonon frequency. + tol_qnorm: Tolerance of the norm of the q-point. + + Return: + (natom3) complex array with glr_nu. + """ + natom = len(structure) + natom3 = natom * 3 + # 2pi factor already included in frac_coords + qcs = qpoint.cart_coords + q_eps_q = np.dot(qcs, np.matmul(epsinf_cart, qcs)) + phdispl_cart_bohr = np.reshape(phdispl_cart_bohr, (natom3, natom, 3)) + + xred = structure.frac_coords + # Acoustic modes are included --> assume BECS fullfill charge neutrality + glr_nu = np.empty(natom3, dtype=np.complex) + for nu in range(natom3): + if phfreqs_ha[nu] < EPH_WTOL or q_eps_q < tol_qnorm: continue + num = 0.0j + for iat in range(natom): + cdd = phdispl_cart_bohr[nu, iat] * np.exp(-2.0j * np.pi * np.dot(qpoint.frac_coords, xred[iat])) + num += np.dot(qcs, np.matmul(becs_cart[iat], cdd)) + glr_nu[nu] = num / (q_eps_q * np.sqrt(2.0 * phfreqs_ha[nu])) + + fact = 1 + if (qdamp is not None): fact = np.exp(-qpoint.norm**2/(4*qdamp)) + return fact * glr_nu * 4j * np.pi / (structure.volume*abu.Ang_Bohr**3) diff --git a/abipy/eph/eph_plotter.py b/abipy/eph/eph_plotter.py new file mode 100644 index 000000000..1a968d74a --- /dev/null +++ b/abipy/eph/eph_plotter.py @@ -0,0 +1,190 @@ +# coding: utf-8 +""" +Objects to plot electronic, vibrational and e-ph properties. +""" +import numpy as np + +from abipy.tools.plotting import (add_fig_kwargs, get_axarray_fig_plt, set_axlims, set_visible, ax_share) +from abipy.tools import duck +from abipy.electrons.ebands import ElectronBands +from abipy.dfpt.ddb import DdbFile +from abipy.dfpt.phonons import PhbstFile, PhdosFile +from abipy.eph.sigeph import SigEPhFile + + +class EphPlotter(object): + """ + This object provides methods to plot electron and phonons for a single system. + An EphPlotter has: + + - An |ElectronBands| on a k-path + - An |ElectronBands| on a k-mesh (optional) + - A |PhbstFile| with phonons along a q-path. + - A |PhdosFile| with different kinds of phonon DOSes. + + EphPlotter uses these objects/files and other inputs/files provided by + the user to generate matplotlib plots related to e-ph interaction. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EphPlotter + """ + @classmethod + def from_ddb(cls, ddb, ebands_kpath, ebands_kmesh=None, **kwargs): + """ + Build the object from the ddb file, invoke anaddb to get phonon properties. + This entry point is needed to have phonon plots with LO-TO splitting + as AbiPy will generate an anaddb input with the different q --> 0 directions + required in phbands.plot to plot the LO-TO splitting correctly. + + Args: + ddb: |DdbFile| or filepath. + ebands_kpath: |ElectronBands| with energies on a k-path or filepath. + ebands_kpath: (optional) |ElectronBands| with energies on a k-mesh or filepath. + kwargs: Passed to anaget_phbst_and_phdos_files + """ + ddb = DdbFile.as_ddb(ddb) + phbst_file, phdos_file = ddb.anaget_phbst_and_phdos_files(**kwargs) + return cls(ebands_kpath, phbst_file, phdos_file, ebands_kmesh=ebands_kmesh) + + def __init__(self, ebands_kpath, phbst_file, phdos_file, ebands_kmesh=None): + self.eb_kpath = ElectronBands.as_ebands(ebands_kpath) + self.eb_kmesh = ElectronBands.as_ebands(ebands_kmesh) if ebands_kmesh is not None else None + + self.phbst_file = phbst_file + if duck.is_string(self.phbst_file): + self.phbst_file = PhbstFile(self.phbst_file) + self.phb_qpath = self.phbst_file.phbands + + self.phdos_file = phdos_file + if duck.is_string(self.phdos_file): + self.phdos_file = PhdosFile(phdos_file) + + @add_fig_kwargs + def plot(self, eb_ylims=None, **kwargs): + """ + Plot electrons with possible (phonon-mediated) scattering channels for the CBM and VBM. + Also plot phonon band structure and phonon PJDOS. + + Args: + eb_ylims: Set the data limits for the y-axis of the electron band. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If None, limits are selected automatically. + + Return: |matplotlib-Figure| + """ + # Build grid. Share y-axis for Phbands and Phdos + import matplotlib.pyplot as plt + fig = plt.figure() + ax0 = plt.subplot2grid((3, 3), (0, 0), colspan=3, rowspan=2) + ax1 = plt.subplot2grid((3, 3), (2, 0), colspan=2, rowspan=1) + ax2 = plt.subplot2grid((3, 3), (2, 2), colspan=1, rowspan=1) + ax1.get_shared_y_axes().join(ax1, ax2) + + # Plot electrons with possible e-ph scattering channels. + self.eb_kpath.plot(ax=ax0, with_gaps=True, ylims=eb_ylims, max_phfreq=self.phb_qpath.maxfreq, show=False) + + # Plot phonon bands + self.phb_qpath.plot(ax=ax1, show=False) + #ax1.yaxis.set_visible(False) + #set_visible(ax1, False, "ylabel") + + # Plot phonon PJDOS + self.phdos_file.plot_pjdos_type(ax=ax2, fontsize=8, exchange_xy=True, show=False) + set_visible(ax2, False, "ylabel") + ax2.tick_params("y", left=False, labelleft=False) + ax2.tick_params("y", right=True, labelright=True) + + # Adjust y-limits for phonons + ylims = self.phb_qpath.minfreq, self.phb_qpath.maxfreq + 0.1 * abs(self.phb_qpath.maxfreq) + for ax in (ax1, ax2): + set_axlims(ax, ylims, "y") + + return fig + + @add_fig_kwargs + def plot_phonons_occ(self, temps=(100, 200, 300, 400), **kwargs): + """ + Plot phonon band structure with markers proportional to the occupation + of each phonon mode for different temperatures. + + Args: + temps: List of temperatures in Kelvin. + + Return: |matplotlib-Figure| + """ + temps = np.array(temps) + ntemp = len(temps) + + # Build plot grid. + num_plots, ncols, nrows = ntemp, 1, 1 + if num_plots > 1: + ncols = 2 + nrows = (num_plots // ncols) + (num_plots % ncols) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=True, squeeze=False) + ax_list = ax_list.ravel() + + for ax, temp in zip(ax_list, temps.ravel()): + self.phb_qpath.plot(ax=ax, units="eV", temp=temp, fontsize=8, show=False) + + return fig + + @add_fig_kwargs + def plot_linewidths_sigeph(self, sigeph, eb_ylims=None, **kwargs): + """ + Plot e-bands + e-DOS + Im(Sigma_{eph}) + phonons + gkq^2 + + Args: + sigeph: |SigephFile| or string with path to file. + eb_ylims: Set the data limits for the y-axis of the electron band. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If None, limits are selected automatically. + """ + closeit = False + if duck.is_string(sigeph): + sigeph = SigEPhFile.from_file(sigeph) + closeit = True + + # Build grid. share y-axis for Phbands and Phdos + import matplotlib.pyplot as plt + fig = plt.figure() + + # Electrons + ax0 = plt.subplot2grid((2, 4), (0, 0), colspan=2, rowspan=1) + ax1 = plt.subplot2grid((2, 4), (0, 2), colspan=1, rowspan=1) + ax2 = plt.subplot2grid((2, 4), (0, 3), colspan=1, rowspan=1) + # Share y-axis + ax_share("y", ax0, ax1, ax2) + + # Phonons + ax3 = plt.subplot2grid((2, 4), (1, 0), colspan=2, rowspan=1) + ax4 = plt.subplot2grid((2, 4), (1, 2), colspan=1, rowspan=1) + ax5 = plt.subplot2grid((2, 4), (1, 3), colspan=1, rowspan=1) + # Share y-axis + ax_share("y", ax3, ax4, ax5) + + e0 = "fermie" + + # Plot electrons with possible e-ph scattering channels. + self.eb_kpath.plot(ax=ax0, e0=e0, with_gaps=True, ylims=eb_ylims, max_phfreq=self.phb_qpath.maxfreq, show=False) + sigeph.plot_lws_vs_e0(ax=ax1, e0=e0, exchange_xy=True, show=False) + sigeph.edos.plot(ax=ax2, e0=e0, exchange_xy=True, show=False) + + # Plot phonon bands + self.phb_qpath.plot(ax=ax3, show=False) + sigeph.plot_a2fw_skb_sum(ax=ax4, what="gkq2", exchange_xy=True, fontsize=8, show=False) + # Plot phonon PJDOS + self.phdos_file.plot_pjdos_type(ax=ax5, fontsize=8, exchange_xy=True, show=False) + #set_visible(ax4, False, "ylabel") + #ax4.tick_params("y", left=False, labelleft=False) + #ax4.tick_params("y", right=True, labelright=True) + + if closeit: sigeph.close() + + return fig + + #def close(self): + # self.phbst_file.close() + # self.phdos_file.close() + + +#class EphMultiPlotter(object): diff --git a/abipy/eph/gkq.py b/abipy/eph/gkq.py new file mode 100644 index 000000000..99caa39f7 --- /dev/null +++ b/abipy/eph/gkq.py @@ -0,0 +1,562 @@ +""" +Interface to the GKQ.nc file storing the e-ph matrix elements +in the atomic representation (idir, ipert) for a single q-point. +This file is produced by the eph code with eph_task -4. +To analyze the e-ph scattering potentials, use v1qavg and eph_task 15 or -15 +""" +import numpy as np +import abipy.core.abinit_units as abu + +from collections import OrderedDict +from monty.string import marquee +from monty.functools import lazy_property +from abipy.core.kpoints import Kpoint +from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt +from abipy.tools import duck +from abipy.abio.robots import Robot +from abipy.electrons.ebands import ElectronsReader, RobotWithEbands +from abipy.eph.common import glr_frohlich, EPH_WTOL + + +class GkqFile(AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter): + + @classmethod + def from_file(cls, filepath): + """Initialize the object from a netcdf_ file.""" + return cls(filepath) + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = GkqReader(filepath) + + def __str__(self): + """String representation.""" + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(self.ebands.to_string(with_structure=False, verbose=verbose, title="Electronic Bands")) + app("qpoint: %s" % str(self.qpoint)) + app("Macroscopic dielectric tensor in Cartesian coordinates") + app(str(self.epsinf_cart)) + app("") + app("Born effective charges in Cartesian coordinates:") + for i, (site, bec) in enumerate(zip(self.structure, self.becs_cart)): + app("[%d]: %s" % (i, repr(site))) + app(str(bec)) + app("") + + app(r"Fulfillment of charge neutrality, F_{ij} = \sum_{atom} Z^*_{ij,atom}") + f = np.sum(self.becs_cart, axis=0) + app(str(f) + "\n") + + return "\n".join(lines) + + def close(self): + self.reader.close() + + @lazy_property + def ebands(self): + """|ElectronBands| object.""" + return self.reader.read_ebands() + + @lazy_property + def structure(self): + """|Structure| object.""" + return self.ebands.structure + + @lazy_property + def uses_interpolated_dvdb(self): + """True if the matrix elements have been computed with an interpolated potential.""" + return int(self.reader.read_value("interpolated")) == 1 + + @lazy_property + def params(self): + """Dict with parameters that might be subject to convergence studies.""" + od = self.get_ebands_params() + return od + + @lazy_property + def qpoint(self): + """Q-point object.""" + return Kpoint(self.reader.read_value('qpoint'), self.structure.reciprocal_lattice) + + @lazy_property + def phfreqs_ha(self): + """(3 * natom) array with phonon frequencies in Ha.""" + return self.reader.read_value("phfreqs") + + @lazy_property + def phdispl_cart_bohr(self): + """(natom3_nu, natom3) complex array with phonon displacement in cartesian coordinates in Bohr.""" + return self.reader.read_value("phdispl_cart", cmode="c") + + @lazy_property + def phdispl_red(self): + """(natom3_nu, natom3) complex array with phonon displacement in reduced coordinates.""" + return self.reader.read_value("phdispl_red", cmode="c") + + @lazy_property + def becs_cart(self): + """(natom, 3, 3) array with the Born effective charges in Cartesian coordinates.""" + return self.reader.read_value("becs_cart").transpose(0, 2, 1).copy() + + @lazy_property + def epsinf_cart(self): + """(3, 3) array with electronic macroscopic dielectric tensor in Cartesian coordinates.""" + return self.reader.read_value("emacro_cart").T.copy() + + @lazy_property + def eigens_kq(self): + """(spin, nkpt, mband) array with eigenvalues on the k+q grid in eV.""" + return self.reader.read_value("eigenvalues_kq") * abu.Ha_eV + + def read_all_gkq(self, mode="phonon"): + """ + Read all eph matrix stored on disk. + + Args: + mode: "phonon" if for eph matrix elements in phonon representation, + "atom" for perturbation along (idir, iatom). + + Return: (nsppol, nkpt, 3*natom, mband, mband) complex array. + """ + if mode not in ("atom", "phonon"): + raise ValueError("Invalid mode: %s" % mode) + + # Read e-ph matrix element in the atomic representation (idir, ipert) + # Fortran array on disk has shape: + # nctkarr_t('gkq', "dp", & + # 'complex, max_number_of_states, max_number_of_states, number_of_phonon_modes, number_of_kpoints, number_of_spins') + gkq_atm = self.reader.read_value("gkq", cmode="c") + if mode == "atom": return gkq_atm + + # Convert from atomic to phonon representation. + # May use np.einsum for better efficiency but oh well! + nband = gkq_atm.shape[-1] + nb2 = nband ** 2 + assert nband == gkq_atm.shape[-2] and nband == self.ebands.nband + natom = len(self.structure) + natom3 = natom * 3 + phfreqs_ha, phdispl_red = self.phfreqs_ha, self.phdispl_red + gkq_nu = np.empty_like(gkq_atm) + cwork = np.empty((natom3, nb2), dtype=np.complex) + for spin in range(self.ebands.nsppol): + for ik in range(self.ebands.nkpt): + g = np.reshape(gkq_atm[spin, ik], (-1, nb2)) + for nu in range(natom3): + if phfreqs_ha[nu] > EPH_WTOL: + cwork[nu] = np.dot(phdispl_red[nu], g) / np.sqrt(2.0 * phfreqs_ha[nu]) + else: + cwork[nu] = 0.0 + gkq_nu[spin, ik] = np.reshape(cwork, (natom3, nband, nband)) + + return gkq_nu + + #def get_averaged_gkq(self, spin, ik, band_k, band_kq, tol_deg=1e-3): + # natom3 = len(self.structure) * 3 + # e_k = self.ebands.eigens[spin, ik, band_k]) + # e_kq = self.eigens_kq[spin, ik, band_kq] + # e_k, ndeg_k, bids_k = _find_deg(spin, ik, self.ebands.eigens) + # e_kq, ndeg_kq, bids_kq = _find_deg(spin, ik, self.eigens_kq) + # + # gkq2_nu = np.zeros(natom3)) + # ncvar = abifile.reader.read_variable("gkq") + # for ib_k in bids_k: + # + # for ib_kq in bids_kq: + # gkq_atm = ncvar[spin, ik, :, ib_k, ib_kq] + # gkq_atm = gkq_atm[:, 0] + 1j * gkq_atm[:, 1] + # + # # Transform the gkk matrix elements from (atom, red_direction) basis to phonon-mode basis. + # gkq_nu = np.zeros(natom3), dtype=np.complex) + # for nu in range(natom3): + # if self.phfreqs_ha[nu] < eph_wtol: continue + # gkq_nu[nu] = np.dot(self.phdispl_red[nu], gkq_atm) / np.sqrt(2.0 * self.phfreqs_ha[nu]) + # gkq2_nu += np.abs(gkq_nu[nu]) ** 2 + # + # return np.sqrt(gkq2_nu) + + @add_fig_kwargs + def plot(self, mode="phonon", with_glr=True, fontsize=8, colormap="viridis", sharey=True, **kwargs): + """ + Plot the gkq matrix elements for a given q-point. + + Args: + mode: "phonon" to plot eph matrix elements in the phonon representation, + "atom" for atomic representation. + with_glr: True to plot the long-range component estimated from Verdi's model. + fontsize: Label and title fontsize. + colormap: matplotlib colormap + sharey: True if yaxis should be shared among axes. + + Return: |matplotlib-Figure| + """ + gkq = np.abs(self.read_all_gkq(mode=mode)) + if mode == "phonon": gkq *= abu.Ha_meV + + # Compute e_{k+q} - e_k for all possible (b, b') + ediffs = np.empty_like(gkq) + for spin in range(self.ebands.nsppol): + for ik in range(self.ebands.nkpt): + for ib_kq in range(self.ebands.mband): + for ib_k in range(self.ebands.mband): + ed = np.abs(self.eigens_kq[spin, ik, ib_kq] - self.ebands.eigens[spin, ik, ib_k]) + ediffs[spin, ik, :, ib_k, ib_kq] = ed + + if with_glr and mode == "phonon": + # Add horizontal bar with matrix elements computed from Verdi's model (only G = 0, \delta_nm in bands). + dcart_bohr = self.phdispl_cart_bohr + #dcart_bohr = self.reader.read_value("phdispl_cart_qvers", cmode="c").real + gkq_lr = glr_frohlich(self.qpoint, self.becs_cart, self.epsinf_cart, + dcart_bohr, self.phfreqs_ha, self.structure) + # self.phdispl_cart_bohr, self.phfreqs_ha, self.structure) + gkq2_lr = np.abs(gkq_lr) * abu.Ha_meV + + natom = len(self.structure) + num_plots, ncols, nrows = 3 * natom, 3, natom + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + ax_list = ax_list.ravel() + cmap = plt.get_cmap(colormap) + + for nu, ax in enumerate(ax_list): + idir = nu % 3 + iat = (nu - idir) // 3 + data, c = gkq[:, :, nu, :, :].ravel(), ediffs[:,:,nu,:,:].ravel() + # Filter items according to ediff + index = c <= 1.2 * self.phfreqs_ha.max() * abu.Ha_eV + data, c = data[index], c[index] + sc = ax.scatter(np.arange(len(data)), data, alpha=0.9, s=30, c=c, cmap=cmap) + #facecolors='none', edgecolors='orange') + plt.colorbar(sc, ax=ax) + + ax.grid(True) + if iat == natom - 1: + ax.set_xlabel("Matrix element index") + if idir == 0: + ylabel = r"$|g^{atm}_{\bf q}|$" if mode == "atom" else r"$|g_{\bf q}|$ (meV)" + ax.set_ylabel(ylabel) + + ax.set_title(r"$\nu$: %d, $\omega_{{\bf q}\nu}$ = %.2E (meV)" % + (nu, self.phfreqs_ha[nu] * abu.Ha_meV), fontsize=fontsize) + + if with_glr: + ax.axhline(gkq2_lr[nu], color='k', linestyle='dashed', linewidth=2) + + fig.suptitle("qpoint: %s" % repr(self.qpoint), fontsize=fontsize) + return fig + + @add_fig_kwargs + def plot_diff_with_other(self, other, mode="phonon", ax_list=None, labels=None, fontsize=8, **kwargs): + """ + Produce scatter plot and histogram to compare the gkq matrix elements stored in two files. + + other: other GkqFile instance. + mode: "phonon" to plot eph matrix elements in the phonon representation, + "atom" for atomic representation. + ax_list: List with 2 matplotlib axis. None if new ax_list should be created. + labels: Labels associated to self and other + fontsize: Label and title fontsize. + + Return: |matplotlib-Figure| + """ + if self.qpoint != other.qpoint: + raise ValueError("Found different q-points: %s and %s" % (self.qpoint, other.qpoint)) + + if labels is None: + labels = ["this (interpolated: %s)" % self.uses_interpolated_dvdb, + "other (interpolated: %s)" % other.uses_interpolated_dvdb] + + this_gkq = np.abs(self.read_all_gkq(mode=mode)) + other_gkq = np.abs(other.read_all_gkq(mode=mode)) + if mode == "phonon": + this_gkq *= abu.Ha_meV + other_gkq *= abu.Ha_meV + + absdiff_gkq = np.abs(this_gkq - other_gkq) + + stats = OrderedDict([ + ("min", absdiff_gkq.min()), + ("max", absdiff_gkq.max()), + ("mean", absdiff_gkq.mean()), + ("std", absdiff_gkq.std()), + ]) + + num_plots, ncols, nrows = 2, 2, 1 + ax_list, fig, plt = get_axarray_fig_plt(ax_list, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + ax_list = ax_list.ravel() + + # Downsample datasets. Show only points with error > threshold. + ntot = absdiff_gkq.size + threshold = stats["mean"] + stats["std"] + data = this_gkq[absdiff_gkq > threshold].ravel() + nshown = len(data) + xs = np.arange(len(data)) + + ax = ax_list[0] + ax.scatter(xs, data, alpha=0.9, s=30, label=labels[0], + facecolors='none', edgecolors='orange') + + data = other_gkq[absdiff_gkq > threshold].ravel() + ax.scatter(xs, data, alpha=0.3, s=10, marker="x", label=labels[1], + facecolors="g", edgecolors="none") + + ax.grid(True) + ax.set_xlabel("Matrix element index") + ylabel = r"$|g^{atm}_{\bf q}|$" if mode == "atom" else r"$|g_{\bf q}|$ (meV)" + ax.set_ylabel(ylabel) + ax.set_title(r"qpt: %s, $\Delta$ > %.1E (%.1f %%)" % ( + repr(self.qpoint), threshold, 100 * nshown / ntot), + fontsize=fontsize) + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + ax = ax_list[1] + ax.hist(absdiff_gkq.ravel(), facecolor='g', alpha=0.75) + ax.grid(True) + ax.set_xlabel("Absolute Error" if mode == "atom" else "Absolute Error (meV)") + ax.set_ylabel("Count") + + ax.axvline(stats["mean"], color='k', linestyle='dashed', linewidth=1) + _, max_ = ax.get_ylim() + ax.text(0.7, 0.7, "\n".join("%s = %.1E" % item for item in stats.items()), + fontsize=fontsize, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes) + + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + Used in abiview.py to get a quick look at the results. + """ + yield self.plot() + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("gkq = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(gkq)"), + nbv.new_code_cell("gkq.ebands.plot();"), + nbv.new_code_cell("gkq.epsinf_cart;"), + nbv.new_code_cell("gkq.becs_cart;"), + nbv.new_code_cell(""" + #with abilab.abiopen('other_GKQ.nc') as other: + # gkq.plot_diff_with_other(other); + """) + ]) + + return self._write_nb_nbpath(nb, nbpath) + + +class GkqReader(ElectronsReader): + """ + This object reads the results stored in the GKQ file produced by ABINIT. + It provides helper function to access the most important quantities. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: GkqReader + """ + + +class GkqRobot(Robot, RobotWithEbands): + """ + This robot analyzes the results contained in multiple GKQ.nc files. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: GkqRobot + """ + EXT = "GKQ" + + @lazy_property + def kpoints(self): + # Consistency check: kmesh should be the same in each file. + ref_kpoints = self.abifiles[0].ebands.kpoints + for i, abifile in enumerate(self.abifiles): + if i == 0: continue + if abifile.kpoints != ref_kpoints: + for k1, k2 in zip(ref_kpoints, abifile.kpoints): + print("k1:", k1, "--- k2:", k2) + raise ValueError("Found different list of kpoints in %s" % str(abifile.filepath)) + return ref_kpoints + + def _check_qpoints_equal(self): + """Raises ValueError if different `qpoint` in files.""" + ref_qpoint = self.abifiles[0].qpoint + for i, abifile in enumerate(self.abifiles): + if i == 0: continue + if abifile.qpoint != ref_qpoint: + raise ValueError("Found different qpoint in %s" % str(abifile.filepath)) + + @add_fig_kwargs + def plot_gkq2_qpath(self, band_kq, band_k, kpoint=0, with_glr=False, qdamp=None, nu_list=None, # spherical_average=False, + ax=None, fontsize=8, eph_wtol=EPH_WTOL, **kwargs): + r""" + Plot the magnitude of the electron-phonon matrix elements + for a given set of (band_kq, band, k) as a function of the q-point. + + Args: + band_ks: Band index of the k+q states (starts at 0) + band_k: Band index of the k state (starts at 0) + kpoint: |Kpoint| object or index. + with_glr: True to plot the long-range component estimated from Verdi's model. + qdamp: + nu_list: List of phonons modes to be selected (starts at 0). None to select all modes. + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: Label and title fontsize. + + Return: |matplotlib-Figure| + """ + if duck.is_intlike(kpoint): + ik = kpoint + kpoint = self.kpoints[ik] + else: + kpoint = Kpoint.as_kpoint(kpoint, self.abifiles[0].structure.reciprocal_lattice) + ik = self.kpoints.index(kpoint) + + # Assume abifiles are already ordered according to q-path. + xs = list(range(len(self.abifiles))) + natom3 = len(self.abifiles[0].structure) * 3 + nsppol = self.abifiles[0].nsppol + nqpt = len(self.abifiles) + gkq_snuq = np.empty((nsppol, natom3, nqpt), dtype=np.complex) + if with_glr: gkq_lr = np.empty((nsppol, natom3, nqpt), dtype=np.complex) + + # TODO: Should take into account possible degeneracies in k and kq... + xticks, xlabels = [], [] + for iq, abifile in enumerate(self.abifiles): + qpoint = abifile.qpoint + #d3q_fact = one if not spherical_average else np.sqrt(4 * np.pi) * qpoint.norm + + name = qpoint.name if qpoint.name is not None else abifile.structure.findname_in_hsym_stars(qpoint) + if qpoint.name is not None: + xticks.append(iq) + xlabels.append(name) + + phfreqs_ha, phdispl_red = abifile.phfreqs_ha, abifile.phdispl_red + ncvar = abifile.reader.read_variable("gkq") + for spin in range(nsppol): + gkq_atm = ncvar[spin, ik, :, band_k, band_kq] + gkq_atm = gkq_atm[:, 0] + 1j * gkq_atm[:, 1] + + # Transform the gkk matrix elements from (atom, red_direction) basis to phonon-mode basis. + gkq_snuq[spin, :, iq] = 0.0 + for nu in range(natom3): + if phfreqs_ha[nu] < eph_wtol: continue + gkq_snuq[spin, nu, iq] = np.dot(phdispl_red[nu], gkq_atm) / np.sqrt(2.0 * phfreqs_ha[nu]) + + if with_glr: + # Compute long range part with (simplified) generalized Frohlich model. + gkq_lr[spin, :, iq] = glr_frohlich(qpoint, abifile.becs_cart, abifile.epsinf_cart, + abifile.phdispl_cart_bohr, phfreqs_ha, abifile.structure, qdamp=qdamp) + + ax, fig, plt = get_ax_fig_plt(ax=ax) + + nu_list = list(range(natom3)) if nu_list is None else list(nu_list) + for spin in range(nsppol): + for nu in nu_list: + ys = np.abs(gkq_snuq[spin, nu]) * abu.Ha_meV + pre_label = kwargs.pop("pre_label",r"$g_{\bf q}$") + if nsppol == 1: label = r"%s $\nu$: %s" % (pre_label, nu) + if nsppol == 2: label = r"%s $\nu$: %s, spin: %s" % (pre_label, nu, spin) + ax.plot(xs, ys, linestyle="--", label=label) + if with_glr: + # Plot model with G = 0 and delta_nn' + ys = np.abs(gkq_lr[spin, nu]) * abu.Ha_meV + label = r"$g_{\bf q}^{\mathrm{lr0}}$ $\nu$: %s" % nu + ax.plot(xs, ys, linestyle="", marker="o", label=label) + + ax.grid(True) + ax.set_xlabel("Wave Vector") + ax.set_ylabel(r"$|g_{\bf q}|$ (meV)") + if xticks: + ax.set_xticks(xticks, minor=False) + ax.set_xticklabels(xlabels, fontdict=None, minor=False, size=kwargs.pop("klabel_size", "large")) + + ax.legend(loc="best", fontsize=fontsize, shadow=True) + title = r"$band_{{\bf k} + {\bf q}: %s, band_{\bf{k}}: %s, kpoint: %s" % (band_kq, band_k, repr(kpoint)) + ax.set_title(title, fontsize=fontsize) + + return fig + + #@add_fig_kwargs + #def plot_gkq2_qpath_with_robots(self, other_robots, all_labels, band_kq, band_k, kpoint=0, ax=None, **kwargs): + # if not isinstance(other_robots, (list, tuple)): + # raise TypeError("other_robots should be a list. Received: %s" % type(other_robots)) + # if len(all_labels) /= 1 + len(other_robots): + # raise ValueError("len(all_labels) should be equal to 1 + len(other_robots)") + + # ax, fig, plt = get_ax_fig_plt(ax=ax) + # #self.plot_gkq2_qpath(self, band_kq, band_k, kpoint=kpoint, + # # with_glr=False, qdamp=None, nu_list=None, # spherical_average=False, + # # ax=ax, fontsize=8, eph_wtol=EPH_WTOL, **kwargs): + + # return fig + + @add_fig_kwargs + def plot_gkq2_diff(self, iref=0, **kwargs): + """ + Wraps gkq.plot_diff_with_other + Produce scatter and histogram plot to compare the gkq matrix elements stored in all the files + contained in the robot. Assume all files have the same q-point. Compare the `iref` file with others. + kwargs are passed to `plot_diff_with_other`. + """ + if len(self) <= 1: return None + self._check_qpoints_equal() + + ncols, nrows = 2, len(self) - 1 + num_plots = ncols * nrows + ax_mat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + + ref_gkq, ref_label = self.abifiles[iref], self.labels[iref] + cnt = -1 + for ifile, (other_label, other_gkq) in enumerate(zip(self.labels, self.abifiles)): + if ifile == iref: continue + cnt += 1 + labels = [ref_label, other_label] + ref_gkq.plot_diff_with_other(other_gkq, ax_list=ax_mat[cnt], labels=labels, show=False, **kwargs) + + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + Used in abiview.py to get a quick look at the results. + """ + for fig in self.get_ebands_plotter().yield_figs(): yield fig + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to `nbpath`. If nbpath is None, a temporary file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + args = [(l, f.filepath) for l, f in self.items()] + nb.cells.extend([ + #nbv.new_markdown_cell("# This is a markdown cell"), + nbv.new_code_cell("robot = abilab.GkqRobot(*%s)\nrobot.trim_paths()\nrobot" % str(args)), + nbv.new_code_cell("# robot.plot_gkq2_diff();"), + nbv.new_code_cell("# robot.plot_gkq2_qpath(band_kq=0, band_k=0, kpoint=0, with_glr=True, qdamp=None);") + ]) + + # Mixins + nb.cells.extend(self.get_baserobot_code_cells()) + nb.cells.extend(self.get_ebands_code_cells()) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/eph/sigeph.py b/abipy/eph/sigeph.py index 40708e24d..ac456bf0a 100644 --- a/abipy/eph/sigeph.py +++ b/abipy/eph/sigeph.py @@ -8,16 +8,15 @@ Work in progress, DO NOT USE THIS CODE """ -from __future__ import print_function, division, unicode_literals, absolute_import - import tempfile import pickle +import os import numpy as np import pandas as pd -import pymatgen.core.units as units import abipy.core.abinit_units as abu -from collections import OrderedDict, namedtuple, Iterable +from collections import OrderedDict, namedtuple +from collections.abc import Iterable from tabulate import tabulate from monty.string import marquee, list_strings from monty.functools import lazy_property @@ -25,10 +24,10 @@ from abipy.core.mixins import AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter from abipy.core.kpoints import Kpoint, KpointList, Kpath, IrredZone, has_timrev_from_kptopt from abipy.tools.plotting import (add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt, set_axlims, set_visible, - rotate_ticklabels, ax_append_title) -from abipy.tools import gaussian, duck + rotate_ticklabels, ax_append_title, set_ax_xylabels, linestyles) +from abipy.tools import duck +from abipy.tools.numtools import gaussian from abipy.electrons.ebands import ElectronBands, ElectronDos, RobotWithEbands, ElectronBandsPlotter, ElectronDosPlotter -#from abipy.dfpt.phonons import PhononBands, RobotWithPhbands, factor_ev2units, unit_tag, dos_label_from_units from abipy.abio.robots import Robot from abipy.eph.common import BaseEphReader @@ -46,7 +45,8 @@ # __eq__ based on skb? # broadening, adiabatic ?? -class QpTempState(namedtuple("QpTempState", "spin kpoint band tmesh e0 qpe ze0 fan0 dw qpe_adb")): + +class QpTempState(namedtuple("QpTempState", "spin kpoint band tmesh e0 qpe ze0 fan0 dw qpe_oms")): """ Quasi-particle result for given (spin, kpoint, band). @@ -54,14 +54,15 @@ class QpTempState(namedtuple("QpTempState", "spin kpoint band tmesh e0 qpe ze0 f spin: Spin index (C convention, i.e >= 0) kpoint: |Kpoint| object. - band: band index. (C convention, i.e >= 0). + band: band index. Global index in the band structure. (C convention, i.e >= 0). tmesh: Temperature mesh in Kelvin. e0: Initial KS energy. qpe: Quasiparticle energy (complex) computed with the perturbative approach. - ze0: Renormalization factor computed at e=e0. + ze0: Renormalization factor computed at e = e0. fan0: Fan term (complex) at e_KS - dw: Debye-Waller - qpe_adb: Quasiparticle energy (real) in the adiabatic approximation. + dw: Debye-Waller (static, real) + qpe_oms: Quasiparticle energy (real) in the on-the-mass-shell approximation: + qpe_oms = e0 + Sigma(e0) .. note:: @@ -70,8 +71,8 @@ class QpTempState(namedtuple("QpTempState", "spin kpoint band tmesh e0 qpe ze0 f @lazy_property def qpeme0(self): - """E_QP[T] - E_0""" - return self.qpe - self.e0 + """E_QP[T] - E_0 (Real part)""" + return (self.qpe - self.e0).real @lazy_property def re_qpe(self): @@ -93,6 +94,16 @@ def imag_fan0(self): """Imaginary part of the Fan term at KS.""" return self.fan0.imag + @lazy_property + def re_sig0(self): + """Real part of the self-energy computed at the KS energy.""" + return self.re_fan0 + self.dw + + @lazy_property + def imag_sig0(self): + """Imaginary part of the self-energy computed at the KS energy.""" + return self.imag_fan0 + @lazy_property def skb(self): """Tuple with (spin, kpoint, band)""" @@ -119,21 +130,32 @@ def to_string(self, verbose=0, title=None): s = str(self.get_dataframe()) return "\n".join([marquee(title, mark="="), s]) if title is not None else s - def get_dataframe(self, index=None, params=None): + def get_dataframe(self, index=None, with_spin=True, params=None): """ Build pandas dataframe with QP data Args: index: dataframe index. + with_spin: False if spin index is not wanted. params: Optional (Ordered) dictionary with extra parameters. Return: |pandas-DataFrame| """ + # TODO Add more entries (tau?) od = OrderedDict() - for k in "tmesh e0 qpe qpeme0 ze0 spin kpoint band".split(): + tokens = "band e0 re_qpe qpeme0 re_sig0 imag_sig0 ze0 re_fan0 dw tmesh" + if with_spin: + tokens = "spin " + tokens + + for k in tokens.split(): if k in ("e0", "spin", "kpoint", "band"): + # This quantities do not depend on temp. od[k] = [getattr(self, k)] * len(self.tmesh) else: + # TODO + #if k == "tmesh": + # od["T"] = getattr(self, k) + #else: od[k] = getattr(self, k) if params is not None: od.update(params) @@ -231,12 +253,13 @@ def plot(self, with_fields="all", exclude_fields=None, ax_list=None, label=None, #fig.tight_layout() return fig + class QpTempList(list): """ A list of quasiparticle corrections (usually for a given spin). """ def __init__(self, *args, **kwargs): - super(QpTempList, self).__init__(*args) + super().__init__(*args) self.is_e0sorted = kwargs.get("is_e0sorted", False) @property @@ -261,9 +284,9 @@ def __str__(self): def to_string(self, verbose=0, title=None): """String representation.""" lines = []; app = lines.append - app(marquee("QpTempList",mark="=")) - app("nqps: %d"%len(self)) - app("ntemps: %d"%self.ntemp) + app(marquee("QpTempList", mark="=")) + app("nqps: %d" % len(self)) + app("ntemps: %d" % self.ntemp) return "\n".join(lines) #def copy(self): @@ -319,8 +342,8 @@ def merge(self, other, copy=False): # TODO: Linewidths @add_fig_kwargs def plot_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=lambda x: x, - exclude_fields=None, fermie=None, - colormap="jet", ax_list=None, xlims=None, fontsize=12, **kwargs): + exclude_fields=None, fermie=None, colormap="jet", ax_list=None, xlims=None, ylims=None, + exchange_xy=False, fontsize=12, **kwargs): """ Plot the QP results as a function of the initial KS energy. @@ -335,8 +358,9 @@ def plot_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=l fermie: Value of the Fermi level used in plot. None for absolute e0s. colormap: matplotlib color map. ax_list: List of |matplotlib-Axes| for plot. If None, new figure is produced. - xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + xlims, ylims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` or scalar e.g. ``left``. If left (right) is None, default values are used. + exchange_xy: True to exchange x-y axis. fontsize: Legend and title fontsize. kwargs: linestyle, color, label, marker @@ -345,9 +369,9 @@ def plot_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=l fields = QpTempState.get_fields_for_plot("e0", with_fields, exclude_fields) if not fields: return None - if reim == "real": ylabel_mask = "Re(%s)" - elif reim == "imag": ylabel_mask = "Im(%s)" - else: return ValueError("Invalid option for reim, should be 'real' or 'imag'") + if reim == "real": ylabel_mask = r"$\Re(%s)$" + elif reim == "imag": ylabel_mask = r"$\Im(%s)$" + else: raise ValueError("Invalid option for reim, should be 'real' or 'imag'") num_plots, ncols, nrows = len(fields), 1, 1 if num_plots > 1: @@ -377,23 +401,34 @@ def plot_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=l irow, icol = divmod(ix, ncols) ax.grid(True) if irow == nrows - 1: - ax.set_xlabel(xlabel) - ax.set_ylabel(ylabel_mask%field, fontsize=fontsize) + if not exchange_xy: + ax.set_xlabel(xlabel) + else: + ax.set_ylabel(xlabel) + + if not exchange_xy: + ax.set_ylabel(ylabel_mask % field, fontsize=fontsize) + else: + ax.set_xlabel(ylabel_mask % field, fontsize=fontsize) + has_legend = False # Plot different temperatures. for itemp in itemp_list: yt = qps.get_field_itemp(field, itemp) - yt_reim = getattr(yt,reim) + yt_reim = getattr(yt, reim) label = kw_label if kw_label is None: label = "T = %.1f K" % self.tmesh[itemp] if ix == 0 else None has_legend = has_legend or bool(label) - ax.plot(e0mesh, function(yt_reim), kw_linestyle, + xs = e0mesh + ys = function(yt_reim) + if exchange_xy: xs, ys = ys, xs + ax.plot(xs, ys, kw_linestyle, color=cmap(itemp / self.ntemp) if kw_color is None else kw_color, label=label, **kwargs) set_axlims(ax, xlims, "x") - #print("ix", ix, "has", has_legend, "label", label) + set_axlims(ax, ylims, "y") if ix == 0 and has_legend: ax.legend(loc="best", fontsize=fontsize, shadow=True) @@ -402,6 +437,7 @@ def plot_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=l return fig + class EphSelfEnergy(object): r""" Electron self-energy due to phonon interaction :math:`\Sigma_{nk}(\omega,T)` @@ -414,7 +450,8 @@ class EphSelfEnergy(object): spfunc=r"$A(\omega)}$", ) - def __init__(self, wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_wr): + def __init__(self, wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_wr, + frohl_vals_e0ks=None, frohl_dvals_de0ks=None, frohl_spfunc_wr=None): """ Args: wmesh: Frequency mesh in eV. @@ -424,6 +461,8 @@ def __init__(self, wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_w dw_vals: [ntemp] array with Debye-Waller term (static) vals_wr: [ntemp, nwr] complex array with Sigma_eph(omega, kT). enk_KS corresponds to nwr//2 + 1. spfunc_wr: [ntemp, nwr] real array with spectral function. + frohl_vals_e0ks, frohl_dvals_de0ks, frohl_spfunc_wr: Contribution to the eph self-energy + computed with the Frohlich model for gkq (optional). """ self.qp = qp self.spin, self.kpoint, self.band = qp.spin, qp.kpoint, qp.band @@ -442,6 +481,10 @@ def __init__(self, wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_w self.spfunc_wr = spfunc_wr assert self.spfunc_wr.shape == (self.ntemp, self.nwr) + self.frohl_vals_e0ks = frohl_vals_e0ks + self.frohl_dvals_de0ks = frohl_dvals_de0ks + self.frohl_spfunc_wr = frohl_spfunc_wr + def __str__(self): return self.to_string() @@ -452,6 +495,8 @@ def to_string(self, verbose=0, title=None): app("K-point: %s, band: %d, spin: %d" % (repr(self.kpoint), self.band, self.spin)) app("Number of temperatures: %d, from %.1f to %.1f (K)" % (self.ntemp, self.tmesh[0], self.tmesh[-1])) app("Number of frequencies: %d, from %.1f to %.1f (eV)" % (self.nwr, self.wmesh[0], self.wmesh[-1])) + if self.frohl_vals_e0ks is not None: + app("Contains contribution given by Frohlich term.") app(self.qp.to_string(verbose=verbose, title="QP data")) return "\n".join(lines) @@ -463,7 +508,7 @@ def _get_wmesh_xlabel(self, zero_energy): xlabel = r"$\omega\;(eV)$" elif zero_energy == "e0": xx = self.wmesh - self.qp.e0 - xlabel = r"$\omega - \epsilon_{nk}\;(eV)$" + xlabel = r"$\omega - \epsilon^0\;(eV)$" # TODO: chemical potential? but then I have mu(T) to handle in plots! #elif zero_energy == "fermie": # xx = self.wmesh - self.fermie @@ -473,13 +518,22 @@ def _get_wmesh_xlabel(self, zero_energy): return xx.copy(), xlabel - def _get_ys_itemp(self, what, itemp): - """Return array(T) to plot from what and itemp index.""" - return dict( - re=self.vals_wr[itemp].real, - im=self.vals_wr[itemp].imag, - spfunc=self.spfunc_wr[itemp], - )[what] + def _get_ys_itemp(self, what, itemp, select_frohl=False): + """ + Return array(T) to plot from what and itemp index. + """ + if not select_frohl: + return dict( + re=self.vals_wr[itemp].real, + im=self.vals_wr[itemp].imag, + spfunc=self.spfunc_wr[itemp], + )[what] + else: + return dict( + re=self.frohl_vals_wr[itemp].real, + im=self.frohl_vals_wr[itemp].imag, + spfunc=self.frohl_spfunc_wr[itemp], + )[what] def _get_itemps_labels(self, itemps): """Return list of temperature indices and labels from itemps.""" @@ -499,7 +553,7 @@ def _get_itemps_labels(self, itemps): @add_fig_kwargs def plot_tdep(self, itemps="all", zero_energy="e0", colormap="jet", ax_list=None, - what_list=("re", "im", "spfunc"), xlims=None, fontsize=8, **kwargs): + what_list=("re", "im", "spfunc"), with_frohl=False, xlims=None, fontsize=8, **kwargs): """ Plot the real/imaginary part of self-energy as well as the spectral function for the different temperatures with a color map. @@ -510,6 +564,7 @@ def plot_tdep(self, itemps="all", zero_energy="e0", colormap="jet", ax_list=None colormap: matplotlib color map. ax_list: List of |matplotlib-Axes|. If None, new figure is produced. what_list: List of strings selecting the quantity to plot. + with_frohl: Visualize Frohlich contribution (if present). xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` or scalar e.g. ``left``. If left (right) is None, default values are used. fontsize: legend and label fontsize. @@ -526,6 +581,7 @@ def plot_tdep(self, itemps="all", zero_energy="e0", colormap="jet", ax_list=None itemps, tlabels = self._get_itemps_labels(itemps) kw_color = kwargs.get("color", None) kw_label = kwargs.get("label", None) + for ix, (what, ax) in enumerate(zip(what_list, ax_list)): ax.grid(True) ax.set_ylabel(self.latex_symbol[what]) @@ -535,6 +591,14 @@ def plot_tdep(self, itemps="all", zero_energy="e0", colormap="jet", ax_list=None color=cmap(itemp / self.ntemp) if kw_color is None else kw_color, label=tlabels[itemp] if (ix == 0 and kw_label is None) else kw_label, ) + if with_frohl: + # Add Frohlich contribution. + ax.plot(xs, self._get_ys_itemp(what, itemp, select_frohl=True), + color=cmap(itemp / self.ntemp) if kw_color is None else kw_color, + label="Frohlich", + #label=tlabels[itemp] if (ix == 0 and kw_label is None) else kw_label, + ) + if ix == 0: ax.legend(loc="best", shadow=True, fontsize=fontsize) set_axlims(ax, xlims, "x") @@ -546,10 +610,166 @@ def plot_tdep(self, itemps="all", zero_energy="e0", colormap="jet", ax_list=None plot = plot_tdep + @add_fig_kwargs + def plot_qpsolution(self, itemp=0, ax_list=None, xlims=None, fontsize=8, **kwargs): + """ + Graphical representation of the QP solution(s) along the real axis. + + Produce two subplots: + 1. Re/Imag part and intersection with omega - eKs + 2. A(w) + + Args: + itemp: List of temperature indices. "all" to plot'em all. + ax_list: List of |matplotlib-Axes|. If None, new figure is produced. + xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used. + fontsize: legend and label fontsize. + kwargs: Keyword arguments passed to ax.plot + + Returns: |matplotlib-Figure| + """ + ax_list, fig, plt = get_axarray_fig_plt(ax_list, nrows=2, ncols=1, sharex=True, sharey=False) + xs, xlabel = self._get_wmesh_xlabel("e0") + ax0, ax1 = ax_list + + ax0.grid(True) + ax0.plot(xs, self.vals_wr[itemp].real, label=r"$\Re(\Sigma)$") + ax0.plot(xs, self.vals_wr[itemp].imag, ls="--", label=r"$\Im(\Sigma)$") + ls = linestyles["dashed"] + ax0.plot(xs, self.wmesh - self.qp.e0, color="k", lw=1, ls=ls, label=r"$\omega - \epsilon^0$") + + # Add linearized solution + sig0 = self.vals_wr[itemp][self.nwr // 2 + 1] + aa = self.dvals_de0ks[itemp].real + ze0 = self.qp.ze0[itemp].real + line = sig0.real + aa * xs + ls = linestyles["densely_dotted"] + ax0.plot(xs, line, color="k", lw=1, ls=ls, + label=r"$\Re(\Sigma^0) + \dfrac{\partial\Sigma}{\partial\omega}(\omega - \epsilon^0$)") + + x0 = self.qp.qpe[itemp].real - self.qp.e0 + y0 = sig0.real + aa * x0 + scatter_opts = dict(color="blue", marker="o", alpha=1.0, s=50, zorder=100, edgecolor='black') + ax0.scatter(x0, y0, label="Linearized solution", **scatter_opts) + text = r"$Z = %.2f$" % ze0 + #ax0.annotate(text, (x0 + 0.2, y0), textcoords='data', size=8) + ax0.annotate(text, (0.02, sig0.real - 0.02), textcoords='data', size=8) + + ax0.set_ylabel(r"$\Sigma(\omega)\,$(eV)") + ax0.legend(loc="best", fontsize=fontsize, shadow=True) + set_axlims(ax0, xlims, "x") + + ymin = min(self.vals_wr[itemp].real.min(), self.vals_wr[itemp].imag.min()) + ymin = ymin - abs(ymin) * 0.2 + ymax = max(self.vals_wr[itemp].real.max(), self.vals_wr[itemp].imag.max()) + ymax = ymax + abs(ymax) * 0.2 + set_axlims(ax0, [ymin, ymax], "y") + + ax1.grid(True) + ax1.plot(xs, self.spfunc_wr[itemp]) + ax1.set_xlabel(xlabel) + ax1.set_ylabel(r"$A(\omega)\,$(1/eV)") + set_axlims(ax1, xlims, "x") + + if "title" not in kwargs: + title = "K-point: %s, band: %d, spin: %d, T=%.1f K" % ( + repr(self.kpoint), self.band, self.spin, self.tmesh[itemp]) + ax0.set_title(title, fontsize=fontsize) + + return fig + + +class A2feph(object): + r""" + Eliashberg function :math:`\alpha^2F_{nk}(\omega)` + obained within the adiabatic approximation (phonon freqs in Sigma are ignored) + """ + # Symbols used in matplotlib plots. + latex_symbol = dict( + gkq2=r"$|g|^2$", + fan=r"$\alpha^2F_{FAN}$", + dw=r"$\alpha^2F_{DW}$", + tot=r"$\alpha^2F_{TOT}$", + a2f=r"$\alpha^2F_{n{\bf{k}}}(\omega)$", + ) + + def __init__(self, mesh, gkq2, fan, dw, spin, kpoint, band): + """ + Args: + mesh: Frequency mesh in eV + gkq2: + fan: + dw: + spin: + kpoint: + band: + """ + self.mesh = mesh + self.gkq2, self.fan, self.dw = gkq2, fan, dw + self.spin, self.kpoint, self.band = spin, kpoint, band + + @add_fig_kwargs + def plot(self, ax=None, units="meV", what="fandw", exchange_xy=False, with_ahc_zpr=False, fontsize=12, **kwargs): + """ + Plot the Eliashberg function. + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + what=: fandw for FAN, DW. gkq2 for |gkq|^2 + exchange_xy: True to exchange x-y axis. + with_ahc_zpr: + fontsize: legend and title fontsize. + """ + # Read mesh in Ha and convert to units. + # TODO: Convert yvalues + wmesh = self.mesh * abu.phfactor_ev2units(units) + + ax, fig, plt = get_ax_fig_plt(ax=ax) + ax.grid(True) + + def get_xy(x, y): + return (x, y) if not exchange_xy else (y, x) + + if what == "fandw": + xs, ys = get_xy(wmesh, self.fan) + ax.plot(xs, ys, label=self.latex_symbol["fan"], **kwargs) + xs, ys = get_xy(wmesh, self.dw) + ax.plot(xs, ys, label=self.latex_symbol["dw"], **kwargs) + sig_tot = self.fan + self.dw + xs, ys = get_xy(wmesh, sig_tot) + ax.plot(xs, ys, label=self.latex_symbol["tot"], **kwargs) + if with_ahc_zpr: + from scipy.integrate import cumtrapz + integral = cumtrapz(sig_tot, x=self.wmesh, initial=True) #/ 2.0 + print("ZPR: ", integral[-1]) + xs, ys = get_xy(wmesh, integral) + ax2 = ax.twinx() + ax2.plot(xs, ys, label=r"$ZPR(\omega)$", **kwargs) + #ax2.set_ylabel('Y2 data', color='b') + + ax.plot(xs, ys, label=self.latex_symbol["tot"], **kwargs) + xlabel, ylabel = abu.wlabel_from_units(units), self.latex_symbol["a2f"] + set_ax_xylabels(ax, xlabel, ylabel, exchange_xy) + + elif what == "gkq2": + xs, ys = get_xy(wmesh, self.gkq2) + ax.plot(xs, ys, label=self.latex_symbol["gkq2"], **kwargs) + xlabel, ylabel = abu.wlabel_from_units(units), self.latex_symbol["gkq2"] + set_ax_xylabels(ax, xlabel, ylabel, exchange_xy) + else: + raise NotImplementedError("%s" % what) + + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + return fig + class _MyQpkindsList(list): """Returned by find_qpkinds.""" + class SigEPhFile(AbinitNcFile, Has_Structure, Has_ElectronBands, NotebookWriter): """ This file contains the Fan-Migdal Debye-Waller self-energy, the |ElectronBands| on the k-mesh. @@ -576,7 +796,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(SigEPhFile, self).__init__(filepath) + super().__init__(filepath) self.reader = r = SigmaPhReader(filepath) # Get important dimensions. @@ -587,6 +807,9 @@ def __init__(self, filepath): self.ngqpt = r.ngqpt self.symsigma = r.read_value("symsigma") + # 4 for FAN+DW, -4 for Fan Imaginary part + #self.eph_task == r.read_value("eph_task", default=4) + self.imag_only = r.read_value("imag_only", default=0) == 1 # TODO zcut? self.zcut = r.read_value("eta") self.nbsum = int(r.read_value("nbsum")) @@ -602,7 +825,7 @@ def get_fundamental_gaps(self): ib_homo = ib_lumo - 1 # nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") - qpes = self.reader.read_value("qp_enes", cmode="c").real * units.Ha_to_eV + qpes = self.reader.read_value("qp_enes", cmode="c").real * abu.Ha_eV for spin in range(self.nsppol): for ikc, kpoint in enumerate(self.sigma_kpoints): qpes[spin, ikc, :, :] @@ -617,7 +840,7 @@ def difference_matrix(a): ik_homo = self.sigkpt2index(kset.in_state.kpoint) ik_lumo = self.sigkpt2index(kset.out_state.kpoint) # nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") - qpes = self.reader.read_value("qp_enes", cmode="c") * units.Ha_to_eV + qpes = self.reader.read_value("qp_enes", cmode="c") * units.Ha_eV qpes[spin, ik_homo, ib_homo].real qpes[spin, ik_lumo, ib_lumo].real """ @@ -635,19 +858,31 @@ def to_string(self, verbose=0): app("") app(self.structure.to_string(verbose=verbose, title="Structure")) app("") - app(self.ebands.to_string(with_structure=False, verbose=verbose, title="KS Electronic Bands")) + app(self.ebands.to_string(with_structure=False, verbose=verbose, title="KS Electron Bands")) app("") # SigmaEPh section. app(marquee("SigmaEPh calculation", mark="=")) + if self.imag_only: + app("Calculation type: Imaginary part of SigmaEPh") + else: + app("Calculation type: Real + Imaginary part of SigmaEPh") app("Number of k-points computed: %d" % (self.nkcalc)) + # These variables have added recently + sigma_ngkpt = self.reader.read_value("sigma_ngkpt", default=None) + sigma_erange = self.reader.read_value("sigma_erange", default=None) + #dvdb_add_lr = self.reader.read_value("dvdb_add_lr", default=None) + app("sigma_ngkpt: %s, sigma_erange: %s" % (sigma_ngkpt, sigma_erange)) app("Max bstart: %d, min bstop: %d" % (self.reader.max_bstart, self.reader.min_bstop)) - app("Q-mesh: nqibz: %s, nqbz: %s, ngqpt: %s" % (self.nqibz, self.nqbz, str(self.ngqpt))) + app("Ab-initio q-mesh: nqibz: %s, nqbz: %s, ngqpt: %s" % (self.nqibz, self.nqbz, str(self.ngqpt))) + eph_ngqpt_fine = self.reader.read_value("eph_ngqpt_fine") + app("q-mesh for self-energy integration (eph_ngqpt_fine): %s" % (str(eph_ngqpt_fine))) app("K-mesh for electrons:") app(self.ebands.kpoints.ksampling.to_string(verbose=verbose)) app("Number of bands included in self-energy: %d" % (self.nbsum)) - app("zcut: %.3f [Ha], %.3f (eV)" % (self.zcut, self.zcut * units.Ha_to_eV)) + app("zcut: %.5f [Ha], %.3f (eV)" % (self.zcut, self.zcut * abu.Ha_eV)) app("Number of temperatures: %d, from %.1f to %.1f (K)" % (self.ntemp, self.tmesh[0], self.tmesh[-1])) app("symsigma: %s" % (self.symsigma)) + app("Has Eliashberg function: %s" % (self.has_eliashberg_function)) app("Has Spectral function: %s" % (self.has_spectral_function)) # Build Table with direct gaps. Only the results for the first and the last T are shown if not verbose. @@ -656,17 +891,21 @@ def to_string(self, verbose=0): else: it_list = [0, -1] if self.ntemp != 1 else [0] - for it in it_list: - app("\nKS and QP direct gaps for T = %.1f K:" % self.tmesh[it]) - data = [] - for ikc, kpoint in enumerate(self.sigma_kpoints): - for spin in range(self.nsppol): - ks_gap = self.ks_dirgaps[spin, ikc] - qp_gap = self.qp_dirgaps_t[spin, ikc, it] - #qp_gap_adb = self.qp_dirgaps_adb_t[spin, ikc, it] - data.append([spin, repr(kpoint), ks_gap, qp_gap, qp_gap - ks_gap]) - app(str(tabulate(data, headers=["Spin", "k-point", "KS_gap", "QP_gap", "QP - KS"], floatfmt=".3f"))) - app("") + if not self.imag_only: + # QP corrections + for it in it_list: + app("\nKS and QP direct gaps for T = %.1f K:" % self.tmesh[it]) + data = [] + for ikc, kpoint in enumerate(self.sigma_kpoints): + for spin in range(self.nsppol): + ks_gap = self.ks_dirgaps[spin, ikc] + qp_gap = self.qp_dirgaps_t[spin, ikc, it] + #qp_gap_adb = self.qp_dirgaps_adb_t[spin, ikc, it] + data.append([spin, repr(kpoint), ks_gap, qp_gap, qp_gap - ks_gap]) + app(str(tabulate(data, headers=["Spin", "k-point", "KS_gap", "QP_gap", "QP - KS"], floatfmt=".3f"))) + app("") + #else: + # Print info on Lifetimes? if verbose > 1: app("K-points and bands included in self-energy corrections:") @@ -692,11 +931,16 @@ def close(self): """Close the file.""" self.reader.close() - @property + @lazy_property def has_spectral_function(self): """True if file contains spectral function data.""" return self.reader.nwr != 0 + @lazy_property + def has_eliashberg_function(self): + """True if file contains Eliashberg functions.""" + return self.reader.gfw_nomega > 0 + @property def sigma_kpoints(self): """The K-points where QP corrections have been calculated.""" @@ -709,7 +953,11 @@ def tmesh(self): @lazy_property def kcalc2ibz(self): - """Return a mapping of the kpoints at which the self energy was calculated and the ibz""" + """ + Return a mapping of the kpoints at which the self energy was calculated and the ibz + i.e. the list of k-points in the band structure used to construct the self-energy. + """ + # TODO: This field is not available in the netcdf file. if (len(self.sigma_kpoints) == len(self.ebands.kpoints) and all(k1 == k2 for (k1, k2) in zip(self.sigma_kpoints, self.ebands.kpoints))): return np.arange(len(self.sigma_kpoints)) @@ -720,26 +968,55 @@ def kcalc2ibz(self): for ikc, sigkpt in enumerate(self.sigma_kpoints): kcalc2ibz[ikc] = self.ebands.kpoints.index(sigkpt) + #assert np.all(kcalc2ibz == self.reader.read_value("kcalc2ibz")[0] - 1) return kcalc2ibz + @lazy_property + def ibz2kcalc(self): + """ + Mapping IBZ --> K-points in self-energy. + Set to -1 if IBZ k-point not present. + """ + ibz2kcalc = np.ones(len(self.ebands.kpoints), dtype=np.int) + for ikc, ik_ibz in enumerate(self.kcalc2ibz): + ibz2kcalc[ik_ibz] = ikc + return ibz2kcalc + @lazy_property def ks_dirgaps(self): """ |numpy-array| of shape [nsppol, nkcalc] with the KS gaps in eV ordered as kcalc. """ - return self.reader.read_value("ks_gaps") * units.Ha_to_eV + return self.reader.read_value("ks_gaps") * abu.Ha_eV @lazy_property def qp_dirgaps_t(self): """ |numpy-array| of shape [nsppol, nkcalc, ntemp] with the QP gaps in eV ordered as kcalc. """ - return self.reader.read_value("qp_gaps") * units.Ha_to_eV + return self.reader.read_value("qp_gaps") * abu.Ha_to_eV @lazy_property def mu_e(self): """mu_e[ntemp] chemical potential (eV) of electrons for the different temperatures.""" - return self.reader.read_value("mu_e") * units.Ha_to_eV + return self.reader.read_value("mu_e") * abu.Ha_eV + + @lazy_property + def edos(self): + """ + |ElectronDos| object computed by Abinit with the input WFK file without doping (if any). + Since this field is optional, None is returned if netcdf variable is not present + """ + if "edos_mesh" not in self.reader.rootgrp.variables: return None + # See m_ebands.edos_ncwrite for fileformat + mesh = self.reader.read_value("edos_mesh") * abu.Ha_eV + # nctkarr_t("edos_dos", "dp", "edos_nw, nsppol_plus1"), & + # dos(nw,0:nsppol) Total DOS, spin up and spin down component. + spin_dos = self.reader.read_value("edos_dos") / abu.Ha_eV + nelect = self.ebands.nelect + fermie = self.ebands.fermie + + return ElectronDos(mesh, spin_dos[1:], nelect, fermie=fermie) def sigkpt2index(self, kpoint): """ @@ -762,7 +1039,7 @@ def find_qpkinds(self, qp_kpoints): if qp_kpoints is None or (duck.is_string(qp_kpoints) and qp_kpoints == "all"): # qp_kpoints in (None, "all") - items = self.sigma_kpoints, list(range(self.nkpt)) + items = self.sigma_kpoints, list(range(self.nkcalc)) elif duck.is_intlike(qp_kpoints): # qp_kpoints = 1 @@ -780,7 +1057,7 @@ def find_qpkinds(self, qp_kpoints): qp_kpoints = [self.sigma_kpoints[ikc] for ikc in ik_list] items = qp_kpoints, ik_list else: - raise TypeError("Dont' know how to interpret `%s`" % (type(qp_kpoints))) + raise TypeError("Don't know how to interpret `%s`" % (type(qp_kpoints))) # Check indices errors = [] @@ -821,23 +1098,64 @@ def get_sigeph_skb(self, spin, kpoint, band): # arpes_ebands = self.ebands.select_bands(range(minb, maxb), kinds=kinds) # return ArpesPlotter(arpes_ebands, aw, aw_meshes, self.tmesh) - def get_dataframe(self, with_params=True, ignore_imag=False): + def get_dataframe(self, itemp=None, with_params=True, with_spin="auto", ignore_imag=False): """ Returns |pandas-Dataframe| with QP results for all k-points, bands and spins included in the calculation. Args: + itemp: Temperature index, if None all temperatures are returned. with_params: False to exclude calculation parameters from the dataframe. ignore_imag: only real part is returned if ``ignore_imag``. """ df_list = []; app = df_list.append + with_spin = self.nsppol == 2 if with_spin == "auto" else with_spin for spin in range(self.nsppol): for ikc, kpoint in enumerate(self.sigma_kpoints): - app(self.get_dataframe_sk(spin, ikc, with_params=with_params, ignore_imag=ignore_imag)) + app(self.get_dataframe_sk(spin, ikc, itemp=itemp, with_params=with_params, + with_spin=with_spin, ignore_imag=ignore_imag)) return pd.concat(df_list) - def get_dataframe_sk(self, spin, kpoint, itemp=None, index=None, with_params=False, ignore_imag=False): + def get_gaps_dataframe(self, itemp=None, with_params=False, ignore_imag=False): + """ + Returns |pandas-DataFrame| with QP results for the VBM and CBM. + + Args: + with_params: False to exclude calculation parameters from the dataframe. + itemp: Temperature index, if None all temperatures are returned. + ignore_imag: Only real part is returned if ``ignore_imag``. + """ + ebands = self.ebands + # Assume non magnetic semiconductor. + #iv = int(ebands.nelect) // 2 - 1 + + #enough_bands = (ebands.mband > ebands.nspinor * ebands.nelect // 2) + #if enough_bands and not ebands.has_metallic_scheme: + spin = 0 + + gap = ebands.direct_gaps[spin] + #kpoint = gap.kpoint + #gap.in_state.band + #gap.out_state.band + #fgap = ebands.fundamental_gaps[spin].energy + #ignore_imag = True + #ikc = self.sigkpt2index(kpoint) + + with_spin = self.nsppol == 2 + rows = [] + for state in (gap.in_state, gap.out_state): + # Read QP data. + qp = self.reader.read_qp(spin, state.kpoint, state.band, ignore_imag=ignore_imag) + # Convert to dataframe and add other entries useful when comparing different calculations. + rows.append(qp.get_dataframe(with_spin=with_spin, params=self.params if with_params else None)) + + df = pd.concat(rows) + if itemp is not None: df = df[df["tmesh"] == self.tmesh[itemp]] + return df + + def get_dataframe_sk(self, spin, kpoint, itemp=None, index=None, + with_params=False, with_spin="auto", ignore_imag=False): """ Returns |pandas-DataFrame| with QP results for the given (spin, k-point). @@ -847,21 +1165,23 @@ def get_dataframe_sk(self, spin, kpoint, itemp=None, index=None, with_params=Fal itemp: Temperature index, if None all temperatures are returned. index: dataframe index. with_params: False to exclude calculation parameters from the dataframe. + with_spin: True to add column with spin index. "auto" to add it only if nsppol == 2 ignore_imag: Only real part is returned if ``ignore_imag``. """ ikc = self.sigkpt2index(kpoint) + with_spin = self.nsppol == 2 if with_spin == "auto" else with_spin rows = [] for band in range(self.bstart_sk[spin, ikc], self.bstop_sk[spin, ikc]): # Read QP data. qp = self.reader.read_qp(spin, ikc, band, ignore_imag=ignore_imag) # Convert to dataframe and add other entries useful when comparing different calculations. - rows.append(qp.get_dataframe(params=self.params if with_params else None)) + rows.append(qp.get_dataframe(with_spin=with_spin, params=self.params if with_params else None)) df = pd.concat(rows) if itemp is not None: df = df[df["tmesh"] == self.tmesh[itemp]] return df - def get_linewidth_dos(self,method="gaussian",e0="fermie",step=0.1,width=0.2): + def get_linewidth_dos(self, method="gaussian", e0="fermie", step=0.1, width=0.2): """ Calculate linewidth density of states @@ -877,38 +1197,138 @@ def get_linewidth_dos(self,method="gaussian",e0="fermie",step=0.1,width=0.2): ntemp = self.ntemp tmesh = self.tmesh - #Compute linear mesh + # Compute linear mesh nelect = ebands.nelect fermie = ebands.get_e0(e0) epad = 3.0 * width min_band = np.min(self.bstart_sk) max_band = np.max(self.bstop_sk) e_min = np.min(ebands.eigens[:,:,min_band]) - epad - e_max = np.max(ebands.eigens[:,:,max_band]) + epad + e_max = np.max(ebands.eigens[:,:,max_band-1]) + epad nw = int(1 + (e_max - e_min) / step) mesh, step = np.linspace(e_min, e_max, num=nw, endpoint=True, retstep=True) - #get dos + # get dos if method == "gaussian": dos = np.zeros((ntemp,self.nsppol,nw)) for spin in range(self.nsppol): - for i,ik in enumerate(self.kcalc2ibz): + for i, ik in enumerate(self.kcalc2ibz): weight = ebands.kpoints.weights[ik] for band in range(self.bstart_sk[spin, i], self.bstop_sk[spin, i]): qp = self.reader.read_qp(spin,i,band) e0 = qp.e0 for it in range(ntemp): linewidth = abs(qp.fan0.imag[it]) - dos[it,spin] += weight * linewidth * gaussian(mesh,width,center=e0) + dos[it,spin] += weight * linewidth * gaussian(mesh, width, center=e0) else: raise NotImplementedError("Method %s is not supported" % method) + # TODO: Specialized object with ElectronDos list? return [ElectronDos(mesh, dos_t, nelect, fermie=fermie) for dos_t in dos] - #def get_dirgaps_dataframe(self): + def get_qp_array(self,ks_ebands_kpath=None,mode="qp"): + """ + Get the lifetimes in an array with spin, kpoint and band dimensions + """ + if mode == "qp": + # Read QP energies from file (real + imag part) and compute corrections if ks_ebands_kpath. + # nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") + qpes = self.reader.read_value("qp_enes", cmode="c") * abu.Ha_eV + elif mode == "ks+lifetimes": + qpes_im = self.reader.read_value("vals_e0ks", cmode="c").imag * abu.Ha_to_eV + qpes_re = self.reader.read_value("ks_enes") * abu.Ha_to_eV + qpes = qpes_re[:,:,:,np.newaxis] + 1j * qpes_im + else: + raise ValueError("Invalid interpolation mode: %s can be either 'qp' or 'ks+lifetimes'") + + if ks_ebands_kpath is not None: + if ks_ebands_kpath.structure != self.structure: + cprint("sigres.structure and ks_ebands_kpath.structures differ. Check your files!", "red") + # nctkarr_t("ks_enes", "dp", "max_nbcalc, nkcalc, nsppol") + ks_enes = self.reader.read_value("ks_enes") * abu.Ha_to_eV + for itemp in range(self.ntemp): + qpes[:, :, :, itemp] -= ks_enes - def interpolate(self, itemp_list=None, lpratio=5, mode="qp", ks_ebands_kpath=None, ks_ebands_kmesh=None, ks_degatol=1e-4, - vertices_names=None, line_density=20, filter_params=None, only_corrections=False, verbose=0): # pragma: no cover + # Note there's no guarantee that the sigma_kpoints and the corrections have the same k-point index. + # Be careful because the order of the k-points and the band range stored in the SIGRES file may differ ... + # HM: Map the bands from sigeph to the electron bandstructure + nkpoints = len(self.sigma_kpoints) + nbands = self.reader.bstop_sk.max() + qpes_new = np.zeros((self.nsppol,nkpoints,nbands,self.ntemp),dtype=np.complex) + for spin in range(self.nsppol): + for i,ik in enumerate(self.kcalc2ibz): + for nb,band in enumerate(range(self.bstart_sk[spin, i], self.bstop_sk[spin, i])): + qpes_new[spin,ik,band] = qpes[spin,ik,nb] + + return qpes_new + + def get_lifetimes_boltztrap(self, basename, workdir=None): + """ + Get basename.tau and basename.energy text files to be used in Boltztrap code + for transport calculations + + Args: + basename: The basename of the files to be produced + workdir: Directory where files will be produced. None for current working directory. + """ + #TODO move this to AbipyBoltztrap class + workdir = os.getcwd() if workdir is None else str(workdir) + + # get the lifetimes as an array + qpes = self.get_qp_array(mode='ks+lifetimes') + + # read from this class + nspn = self.nspden + nkpt = self.nkpt + kpoints = self.kpoints + bstart = self.reader.max_bstart + bstop = self.reader.min_bstop + ntemp = self.ntemp + tmesh = self.tmesh + fermie = self.ebands.fermie * abu.eV_Ry + struct = self.ebands.structure + + def write_file(filename, tag, function, T=None): + """Function to write files for BoltzTraP""" + with open(os.path.join(workdir, filename), 'wt') as f: + ttag = ' for T=%12.6lf' % T if T else '' + f.write('BoltzTraP %s file generated by abipy%s.\n' % (tag,ttag)) + f.write('%5d %5d %20.12e ! nk, nspin : lifetimes below in s \n' % (nkpt, nspn, fermie)) + for ispin in range(nspn): + for ik in range(nkpt): + kpt = kpoints[ik] + fmt = '%20.12e ' * 3 + '%d !kpt nband\n' % (bstop - bstart) + f.write(fmt % tuple(kpt)) + for ibnd in range(bstart,bstop): + f.write('%20.12e\n' % (function(qpes[ispin,ik,ibnd,itemp]))) + + # write tau + for itemp in range(ntemp): + T = tmesh[itemp] + filename_tau = basename + '_%dK_BLZTRP.tau_k' % T + function = lambda x: 1.0 / (2 * abs(x.imag) * abu.eV_s) + write_file(filename_tau, 'tau_k', function,T) + + # write energies + filename_ene = basename + '_BLZTRP.energy' + function = lambda x: x.real * abu.eV_Ry + write_file(filename_ene, 'eigen-enegies', function) + + # write structure + fmt3 = "%20.12e "*3 + '\n' + path = os.path.join(workdir, basename + '_BLZTRP.structure') + with open(path, 'wt') as f: + f.write('BoltzTraP geometry file generated by abipy.\n') + f.write(fmt3 % tuple(struct.lattice.matrix[0] * abu.Ang_Bohr)) + f.write(fmt3 % tuple(struct.lattice.matrix[1] * abu.Ang_Bohr)) + f.write(fmt3 % tuple(struct.lattice.matrix[2] * abu.Ang_Bohr)) + f.write("%d\n" % len(struct)) + for atom in struct: + f.write("%s " % atom.specie + fmt3 % tuple(atom.coords * abu.Ang_Bohr)) + + def interpolate(self, itemp_list=None, lpratio=5, mode="qp", ks_ebands_kpath=None, ks_ebands_kmesh=None, + ks_degatol=1e-4, vertices_names=None, line_density=20, filter_params=None, + only_corrections=False, verbose=0): # pragma: no cover """ Interpolated the self-energy corrections in k-space on a k-path and, optionally, on a k-mesh. @@ -994,36 +1414,7 @@ def interpolate(self, itemp_list=None, lpratio=5, mode="qp", ks_ebands_kpath=Non # and re-apply them on top of the KS band structure. gw_kcoords = [k.frac_coords for k in self.sigma_kpoints] - if mode == "qp": - # Read QP energies from file (real + imag part) and compute corrections if ks_ebands_kpath. - # nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") - qpes = self.reader.read_value("qp_enes", cmode="c") * units.Ha_to_eV - elif mode == "ks+lifetimes": - qpes_im = self.reader.read_value("vals_e0ks", cmode="c").imag * units.Ha_to_eV - qpes_re = self.reader.read_value("ks_enes") * units.Ha_to_eV - qpes = qpes_re[:,:,:,np.newaxis] + 1j*qpes_im - else: - raise ValueError("Invalid interpolation mode: %s can be either 'qp' or 'ks+lifetimes'") - - if ks_ebands_kpath is not None: - if ks_ebands_kpath.structure != self.structure: - cprint("sigres.structure and ks_ebands_kpath.structures differ. Check your files!", "red") - # nctkarr_t("ks_enes", "dp", "max_nbcalc, nkcalc, nsppol") - ks_enes = self.reader.read_value("ks_enes") * units.Ha_to_eV - for itemp in range(self.ntemp): - qpes[:, :, :, itemp] -= ks_enes - - # Note there's no guarantee that the sigma_kpoints and the corrections have the same k-point index. - # Be careful because the order of the k-points and the band range stored in the SIGRES file may differ ... - # HM: Map the bands from sigeph to the electronic bandstructure - nkpoints = len(self.sigma_kpoints) - nbands = self.reader.bstop_sk.max() - qpes_new = np.zeros((self.nsppol,nkpoints,nbands,self.ntemp),dtype=np.complex) - for spin in range(self.nsppol): - for ik in self.kcalc2ibz: - for nb,band in enumerate(range(self.bstart_sk[spin, ik], self.bstop_sk[spin, ik])): - qpes_new[spin,ik,band] = qpes[spin,ik,nb] - qpes = qpes_new + qpes = self.get_qp_array(ks_ebands_kpath=ks_ebands_kpath,mode=mode) # Build interpolator for QP corrections. from abipy.core.skw import SkwInterpolator @@ -1058,15 +1449,8 @@ def interpolate(self, itemp_list=None, lpratio=5, mode="qp", ks_ebands_kpath=Non else: lw_kpath = qp_corrs - if ks_ebands_kmesh is None: - #interpolate QP energies - if reim == "real": - eigens_kmesh = skw.interp_kpts(dos_kcoords).eigens - else: - linewidths_kmesh = skw.interp_kpts(dos_kcoords).eigens - - else: - #interpolate QP energies corrections and add them to KS + if ks_ebands_kmesh is not None: + # Interpolate QP energies corrections and add them to KS ref_eigens = ks_ebands_kmesh.eigens[:, :, bstart:bstop] if reim == "real": eigens_kmesh = skw.interp_kpts_and_enforce_degs(dos_kcoords, ref_eigens, atol=ks_degatol).eigens @@ -1149,7 +1533,7 @@ def plot_qpgaps_t(self, qp_kpoints=0, ax_list=None, plot_qpmks=True, fontsize=8, if ix == len(qpkinds) - 1: ax.set_xlabel("Temperature (K)") if plot_qpmks: - ax.set_ylabel("QP-KS gap (eV)") + ax.set_ylabel("QP - KS gap (eV)") else: ax.set_ylabel("QP direct gap (eV)") ax.set_title("k:%s" % (repr(kpt)), fontsize=fontsize) @@ -1211,7 +1595,7 @@ def qplist_spin(self): @add_fig_kwargs def plot_qps_vs_e0(self, itemp_list=None, with_fields="all", reim="real", function=lambda x: x, exclude_fields=None, e0="fermie", - colormap="jet", xlims=None, ax_list=None, fontsize=8, **kwargs): + colormap="jet", xlims=None, ylims=None, ax_list=None, fontsize=8, **kwargs): """ Plot the QP results in the SIGEPH file as function of the initial KS energy. @@ -1231,6 +1615,7 @@ def plot_qps_vs_e0(self, itemp_list=None, with_fields="all", reim="real", colormap: matplotlib color map. xlims: Set the data limits for the x-axis. Accept tuple e.g. ``(left, right)`` or scalar e.g. ``left``. If left (right) is None, default values are used. + ylims: Similar to xlims but for y-axis. fontsize: Legend and title fontsize. Returns: |matplotlib-Figure| @@ -1239,7 +1624,7 @@ def plot_qps_vs_e0(self, itemp_list=None, with_fields="all", reim="real", for spin in range(self.nsppol): fig = self.qplist_spin[spin].plot_vs_e0(itemp_list=itemp_list, with_fields=with_fields, reim=reim, function=function, exclude_fields=exclude_fields, fermie=fermie, - colormap=colormap, xlims=xlims, ax_list=ax_list, fontsize=fontsize, marker=self.marker_spin[spin], + colormap=colormap, xlims=xlims, ylims=ylims, ax_list=ax_list, fontsize=fontsize, marker=self.marker_spin[spin], show=False, **kwargs) ax_list = fig.axes @@ -1280,7 +1665,7 @@ def plot_qpbands_ibzt(self, itemp_list=None, e0="fermie", colormap="jet", ylims= cmap = plt.get_cmap(colormap) # Read QP energies: nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") - qpes = self.reader.read_value("qp_enes", cmode="c") * units.Ha_to_eV + qpes = self.reader.read_value("qp_enes", cmode="c") * abu.Ha_eV band_range = (self.reader.max_bstart, self.reader.min_bstop) for spin, ax in zip(range(self.nsppol), ax_list): @@ -1301,22 +1686,271 @@ def plot_qpbands_ibzt(self, itemp_list=None, e0="fermie", colormap="jet", ylims= return fig + @add_fig_kwargs + def plot_lws_vs_e0(self, itemp_list=None, ax=None, e0="fermie", exchange_xy=False, + colormap="jet", xlims=None, ylims=None, fontsize=8, **kwargs): + r""" + Plot electron linewidths vs KS energy at temperature ``itemp`` + + Args: + itemp_list: List of temperature indices to interpolate. None for all. + ax: |matplotlib-Axes| or None if a new figure should be created. + e0: Option used to define the zero of energy in the band structure plot. Possible values: + - ``fermie``: shift all eigenvalues to have zero energy at the Fermi energy (``self.fermie``). + - Number e.g e0=0.5: shift all eigenvalues to have zero energy at 0.5 eV + - None: Don't shift energies, equivalent to e0=0 + function: Apply this function to the values before plotting + exchange_xy: True to exchange x-y axis. + colormap: matplotlib color map. + xlims, ylims: Set the data limits for the x-axis or the y-axis. Accept tuple e.g. ``(left, right)`` + or scalar e.g. ``left``. If left (right) is None, default values are used + fontsize: fontsize for titles and legend. + + Returns: |matplotlib-Figure| + """ + # This is a bit slow if several k-points but data is scattered due to symsigma. + ax, fig, plt = get_ax_fig_plt(ax=ax) + if "markersize" not in kwargs: kwargs["markersize"] = 2 + + return self.plot_qps_vs_e0(itemp_list=itemp_list, with_fields="fan0", reim="imag", + function=abs, e0=e0, colormap=colormap, xlims=xlims, ylims=ylims, + exchange_xy=exchange_xy, ax_list=[ax], fontsize=fontsize, show=False, + **kwargs) + + @add_fig_kwargs + def plot_tau_vtau(self, itemp=0, ax_list=None, **kwargs): + + r = self.reader + # Diagonal elements of velocity operator in cartesian coordinates for all states in Sigma_nk. + # nctkarr_t("vcar_calc", "dp", "three, max_nbcalc, nkcalc, nsppol")])) + # nctkarr_t("ks_enes", "dp", "max_nbcalc, nkcalc, nsppol") + # nctkarr_t("vals_e0ks", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") + v_var = r.read_variable("vcar_calc") + ks_enes_var = r.read_variable("ks_enes") + vals_e0ks_var = r.read_variable("vals_e0ks") + + ks_enes, taus, vels = [], [], [] + for spin in range(self.nsppol): + for ikc, kpoint in enumerate(self.sigma_kpoints): + nb = r.nbcalc_sk[spin, ikc] + ks_enes.extend(ks_enes_var[spin, ikc, :nb] * abu.Ha_eV) + # TODO: times conversion fact! + asimag = np.abs(vals_e0ks_var[spin, ikc, :nb, itemp, 1]) + asimag = np.where(asimag > 1e-8, asimag, 1e-8) + print(asimag) + taus.extend(1.0 / (2.0 * asimag)) + vels.extend(np.linalg.norm(v_var[spin, ikc, :nb, :], axis=-1)) + + ks_enes = np.reshape(np.array(ks_enes), (self.nsppol, -1)) + taus = np.reshape(np.array(taus), (self.nsppol, -1)) + vels = np.reshape(np.array(vels), (self.nsppol, -1)) + #ks_enes, taus, vels = [np.reshape(a, (self.nsppol, -1)) for a in map(np.array, (ks_enes, taus, vels))] + + #v = np.linalg.norm(v, axis=-1) + #nctkarr_t("vals_e0ks", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol"), & + #tau_var = r.read_variable("vals_e0ks")[..., itemp, 1] + #tau = 1.0 / (2.0 * np.abs(tau)) # TODO: times conversion fact! + #ks_enes = r.read_value("ks_enes") * abu.Ha_eV + + nrows, ncols = 3, 1 + axmat, fig, plt = get_axarray_fig_plt(ax_list, nrows=nrows, ncols=ncols, + sharex=True, sharey=False, squeeze=True) + + data = { + 0: dict(vals=taus, ylabel="Tau"), + 1: dict(vals=vels, ylabel="Group velocity"), + 2: dict(vals=vels * taus, ylabel="Tau V"), + } + + for ix, ax in enumerate(axmat): + d = data[ix] + for spin in range(self.nsppol): + xs, ys = ks_enes[spin].ravel(), d["vals"][spin].ravel() + ax.scatter(xs, ys) + if ix == len(axmat) - 1: + ax.set_xlabel("Energy (eV)") + if spin == 0: + ax.set_ylabel(d["ylabel"]) + ax.grid(True) + #ax.legend(loc="best", fontsize=fontsize, shadow=True) + + return fig + + @add_fig_kwargs + def plot_a2fw_skb(self, spin, kpoint, band, what="auto", ax=None, fontsize=12, units="meV", **kwargs): + """ + Plot the Eliashberg function a2F_{n,k,spin}(w) (gkq2/Fan-Migdal/DW/Total contribution) + for a given (spin, kpoint, band) + + Args: + spin: Spin index + kpoint: K-point in self-energy. Accepts |Kpoint|, vector or index. + band: Band index. + what: fandw for FAN, DW. gkq2 for $|gkq|^2$. Auto for automatic selection based on imag_only + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive. + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: legend and title fontsize. + + Returns: |matplotlib-Figure| + """ + if not self.has_eliashberg_function: + cprint("SIGEPH file does not have Eliashberg function", "red") + return None + + if what == "auto": + what = "gkq2" if self.imag_only else "fandw" + + a2f = self.reader.read_a2feph_skb(spin, kpoint, band) + return a2f.plot(ax=ax, units=units, what=what, fontsize=fontsize, show=False) + + @add_fig_kwargs + def plot_a2fw_skb_sum(self, what="auto", ax=None, exchange_xy=False, fontsize=12, **kwargs): + """ + Plot the sum of the Eliashberg functions a2F_{n,k,spin}(w) (gkq2/Fan-Migdal/DW/Total contribution) + over the k-points and bands for which self-energy matrix elements have been computed. + + .. note:: + + This quantity is supposed to give a qualitative + The value indeed is not an integral in the BZ, besides the absolute value depends + on the number of bands in the self-energy. + + Args: + what: fandw for FAN, DW. gkq2 for $|gkq|^2$. Auto for automatic selection based on imag_only + ax: |matplotlib-Axes| or None if a new figure should be created. + exchange_xy: True to exchange x-y axis. + fontsize: legend and title fontsize. + + Returns: |matplotlib-Figure| + """ + if not self.has_eliashberg_function: + cprint("SIGEPH file does not have Eliashberg function", "red") + return None + + if what == "auto": + what = "gkq2" if self.imag_only else "fandw" + + ax, fig, plt = get_ax_fig_plt(ax=ax) + ax.grid(True) + + # nctkarr_t("gfw_mesh", "dp", "gfw_nomega") + # nctkarr_t("gfw_vals", "dp", "gfw_nomega, three, max_nbcalc, nkcalc, nsppol") + # 1: gkk^2 with delta(en - em) + # 2:3 (Fan-Migdal/DW contribution) + # Access arrays directly instead of using read_a2feph_skb because it's gonna be faster. + #a2f = self.reader.read_a2feph_skb(spin, kpoint, band) + wmesh = self.reader.read_value("gfw_mesh") * abu.Ha_eV + vals = self.reader.read_value("gfw_vals") * abu.Ha_eV # TODO check units + + xlabel = "Energy (eV)" + for spin in range(self.nsppol): + asum = np.zeros(self.reader.gfw_nomega) + spin_sign = +1 if spin == 0 else -1 + for ikc, kpoint in enumerate(self.sigma_kpoints): + # This is not an integral in the BZ. + wtk = 1.0 / len(self.sigma_kpoints) + for band in range(self.bstart_sk[spin, ikc], self.bstop_sk[spin, ikc]): + if what == "gkq2": + vs = vals[spin, ikc, band, 0] + ylabel = what + elif what == "fandw": + vs = vals[spin, ikc, band, 1:3, :].sum(axis=0) + ylabel = what + else: + raise ValueError("Invalid value for what: `%s`" % what) + asum += (spin_sign * wtk) * vs + + xs, ys = wmesh, asum + if exchange_xy: xs, ys = ys, xs + + color = "black" if spin == 0 else "red" + ax.plot(xs, ys, color=color, **kwargs) + if spin == 0: + set_ax_xylabels(ax, xlabel, ylabel, exchange_xy) + + #ax.legend(loc="best", fontsize=fontsize, shadow=True) + + return fig + + #@add_fig_kwargs + #def plot_sigeph_vcbm(self, units="meV", sharey=True, fontsize=8, **kwargs): + + @add_fig_kwargs + def plot_a2fw_all(self, units="meV", what="auto", sharey=False, fontsize=8, **kwargs): + """ + Plot the Eliashberg function a2F_{n,k,spin}(w) (gkq2/Fan-Migdal/DW/Total contribution) + for all k-points, spin and the VBM/CBM for these k-points. + + Args: + units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). + Case-insensitive. + what: fandw for FAN, DW. gkq2 for $|gkq|^2$. Auto for automatic selection based on imag_only + sharey: True if Y axes should be shared. + fontsize: legend and title fontsize. + + Returns: |matplotlib-Figure| + """ + # Build plot grid with (CBM, VBM) on each col. k-points along rows + num_plots, ncols, nrows = self.nkcalc * 2, 2, self.nkcalc + + axmat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + + marker_spin = {0: "^", 1: "v"} + count = -1 + if what == "auto": + what = "gkq2" if self.imag_only else "fandw" + + for ikc, kpoint in enumerate(self.sigma_kpoints): + for spin in range(self.nsppol): + count += 1 + # Assume non magnetic semiconductor. + iv = int(self.nelect) // 2 - 1 + ax = axmat[ikc, 0] + self.plot_a2fw_skb(spin, kpoint, iv, ax=ax, fontsize=fontsize, units=units, what=what, show=False) + ax.set_title("k:%s, band:%d" % (repr(kpoint), iv), fontsize=fontsize) + ax = axmat[ikc, 1] + self.plot_a2fw_skb(spin, kpoint, iv + 1, ax=ax, fontsize=fontsize, units=units, what=what, show=False) + ax.set_title("k:%s, band:%d" % (repr(kpoint), iv + 1), fontsize=fontsize) + if count != 0: + for ax in axmat[ikc]: + set_visible(ax, False, "legend") + + # Show legend only for the first ax. + for i, ax in enumerate(axmat.ravel()): + if i != 0: set_visible(ax, False, "legend") + + # Show x(y)labels only if first column (last row) + for irow in range(nrows): + for icol in range(ncols): + ax = axmat[irow, icol] + if icol != 0: set_visible(ax, False, "ylabel") + if irow != nrows - 1: set_visible(ax, False, "xlabel") + + return fig + def yield_figs(self, **kwargs): # pragma: no cover """ This function *generates* a predefined list of matplotlib figures with minimal input from the user. Used in abiview.py to get a quick look at the results. """ verbose = kwargs.pop("verbose", 0) + if self.imag_only: + yield self.plot_qps_vs_e0(with_fields="fan0", reim="imag", function=abs, show=False) + yield self.plot_tau_vtau(show=False) - yield self.plot_qpbands_ibzt(show=False) - #yield self.plot_qpgaps_t(qp_kpoints=0, show=False) - for i, qp_kpt in enumerate(self.sigma_kpoints): - if i > 5 and not verbose: - print("File contains more than 5 k-points. Only the first five k-points are displayed.") - break - yield self.plot_qpgaps_t(qp_kpoints=qp_kpt, show=False) - yield self.plot_qps_vs_e0(show=False) - yield self.plot_qps_vs_e0(with_fields="fan0", reim="imag", function=abs, show=False) + else: + yield self.plot_qpbands_ibzt(show=False) + #yield self.plot_qpgaps_t(qp_kpoints=0, show=False) + for i, qp_kpt in enumerate(self.sigma_kpoints): + if i > 2 and not verbose: + print("File contains more than 3 k-points. Only the first three k-points are displayed.") + break + yield self.plot_qpgaps_t(qp_kpoints=qp_kpt, show=False) + yield self.plot_qps_vs_e0(show=False) + + if self.edos is not None: + yield self.edos.plot(show=False) def write_notebook(self, nbpath=None, title=None): """ @@ -1330,7 +1964,7 @@ def write_notebook(self, nbpath=None, title=None): nbv.new_code_cell("print(ncfile)"), nbv.new_code_cell("ncfile.ebands.plot();"), #nbv.new_code_cell("ncfile.get_dirgaps_dataframe()"), - #nbv.new_code_cell("alldata = ncfile.get_dataframe()\nalldata"), + #nbv.new_code_cell("ncfile.get_dataframe()"), nbv.new_code_cell("ncfile.plot_qpgaps_t();"), nbv.new_code_cell("#ncfile.plot_qpgaps_t(plot_qpmks=True);"), nbv.new_code_cell("ncfile.plot_qps_vs_e0();"), @@ -1355,7 +1989,7 @@ class SigEPhRobot(Robot, RobotWithEbands): EXT = "SIGEPH" def __init__(self, *args): - super(SigEPhRobot, self).__init__(*args) + super().__init__(*args) if len(self.abifiles) in (0, 1): return # Check dimensions and self-energy states and issue warning. @@ -1416,29 +2050,35 @@ def get_dataframe_sk(self, spin, kpoint, with_params=True, ignore_imag=False): Args: spin: Spin index kpoint: K-point in self-energy. Accepts |Kpoint|, vector or index. - with_params: + with_params: True to add convergence parameters. ignore_imag: only real part is returned if ``ignore_imag``. """ df_list = []; app = df_list.append for label, ncfile in self.items(): df = ncfile.get_dataframe_sk(spin, kpoint, index=None, with_params=with_params, ignore_imag=ignore_imag) + app(df) return pd.concat(df_list) - def get_dataframe(self, with_params=True, ignore_imag=False): + def get_dataframe(self, with_params=True, with_spin="auto", ignore_imag=False): """ Return |pandas-Dataframe| with QP results for all k-points, bands and spins present in the files treated by the robot. Args: with_params: + with_spin: True to add column with spin index. "auto" to add it only if nsppol == 2 ignore_imag: only real part is returned if ``ignore_imag``. """ + with_spin = any(ncfile.nsppol == 2 for ncfile in self.abifiles) if with_spin == "auto" else with_spin + df_list = []; app = df_list.append for label, ncfile in self.items(): for spin in range(ncfile.nsppol): for ikc, kpoint in enumerate(ncfile.sigma_kpoints): - app(ncfile.get_dataframe_sk(spin, ikc, with_params=with_params, ignore_imag=ignore_imag)) + app(ncfile.get_dataframe_sk(spin, ikc, with_params=with_params, + with_spin=with_spin, ignore_imag=ignore_imag)) + return pd.concat(df_list) @add_fig_kwargs @@ -1487,7 +2127,7 @@ def plot_selfenergy_conv(self, spin, kpoint, band, itemp=0, sortby=None, hue=Non groups = self.group_and_sortby(hue, sortby) nrows, ncols = 3, len(groups) ax_mat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, - sharex=True, sharey=True, squeeze=False) + sharex=True, sharey=True, squeeze=False) for ig, g in enumerate(groups): subtitle = "%s: %s" % (self._get_label(hue), g.hvalue) ax_mat[0, ig].set_title(subtitle, fontsize=fontsize) @@ -1563,7 +2203,7 @@ def plot_qpgaps_t(self, qp_kpoints=0, plot_qpmks=True, sortby=None, hue=None, fo return fig @add_fig_kwargs - def plot_qpgaps_convergence(self, qp_kpoints=0, itemp=0, sortby=None, hue=None, + def plot_qpgaps_convergence(self, qp_kpoints="all", itemp=0, sortby=None, hue=None, plot_qpmks=True, fontsize=8, **kwargs): """ Plot the convergence of the direct QP gaps at given temperature @@ -1571,7 +2211,7 @@ def plot_qpgaps_convergence(self, qp_kpoints=0, itemp=0, sortby=None, hue=None, Args: qp_kpoints: List of k-points in self-energy. Accept integers (list or scalars), list of vectors, - or None to plot all k-points. + or "all" to plot all k-points. itemp: Temperature index. sortby: Define the convergence parameter, sort files and produce plot labels. Can be None, string or function. If None, no sorting is performed. @@ -1593,6 +2233,9 @@ def plot_qpgaps_convergence(self, qp_kpoints=0, itemp=0, sortby=None, hue=None, nc0 = self.abifiles[0] nsppol = nc0.nsppol qpkinds = nc0.find_qpkinds(qp_kpoints) + if len(qpkinds) > 10: + cprint("More that 10 k-points in file. Only 10 k-points will be show. Specify kpt index expliclty", "yellow") + qpkinds = qpkinds[:10] # Build grid with (nkpt, 1) plots. nrows, ncols = len(qpkinds), 1 @@ -1934,17 +2577,17 @@ def pickle_dump(self, filepath=None): return filepath @add_fig_kwargs - def plot_itemp_with_lws_vs_e0(self, itemp, ax_list=None, width_ratios=(2,1), + def plot_itemp_with_lws_vs_e0(self, itemp, ax_list=None, width_ratios=(2, 1), function=lambda x: x, fact=10.0, **kwargs): """ Plot bandstructure with linewidth at temperature ``itemp`` and linewidth vs the KS energies. Args: - itemp: Temperature index + itemp: Temperature index. ax_list: The axes for the bandstructure plot and the DOS plot. If ax_list is None, a new figure is created and the two axes are automatically generated. width_ratios: Defines the ratio between the band structure plot and the dos plot. - function: Apply this function to the values before plotting + function: Apply this function to the values before plotting. Return: |matplotlib-Figure| """ @@ -1961,18 +2604,19 @@ def plot_itemp_with_lws_vs_e0(self, itemp, ax_list=None, width_ratios=(2,1), ax0, ax1 = ax_list fig = plt.gcf() - #plot the band structure - self.plot_itemp(itemp,ax=ax0,fact=fact,show=False) + # plot the band structure + self.plot_itemp(itemp, ax=ax0, fact=fact, show=False) - #plot the dos + # plot the dos dos_markersize = kwargs.pop("markersize", 4) self.plot_lws_vs_e0(itemp_list=[itemp],ax=ax1, - exchange_xy=True,function=abs, - markersize=dos_markersize,show=False) + exchange_xy=True, function=abs, + markersize=dos_markersize, show=False) ax1.grid(True) ax1.yaxis.set_ticks_position("right") ax1.yaxis.set_label_position("right") + return fig @add_fig_kwargs @@ -2048,7 +2692,7 @@ def plot(self, e0="fermie", ylims=None, fontsize=8, **kwargs): def plot_lws_vs_e0(self, itemp_list=None, ax=None, e0="fermie", function=lambda x: x, exchange_xy=False, colormap="jet", xlims=None, ylims=None, fontsize=8, **kwargs): r""" - Plot the electronic linewidths vs KS energy at temperature ``itemp`` + Plot electron linewidths vs KS energy at temperature ``itemp`` Args: itemp_list: List of temperature indices to interpolate. None for all. @@ -2114,7 +2758,7 @@ def get_ebands_plotter(self, edos_kwargs=None, with_edos=True): edos_kwargs=edos_kwargs) for itemp in range(self.ntemp): - label="T = %.1f K" % self.tmesh[itemp] + label = "T = %.1f K" % self.tmesh[itemp] ebands_plotter.add_ebands(label, self.qp_ebands_kpath_t[itemp], edos=self.qp_ebands_kmesh_t[itemp] if (self.has_kmesh and with_edos) else None, edos_kwargs=edos_kwargs) @@ -2136,11 +2780,12 @@ def get_edos_plotter(self, edos_kwargs=None): edos_plotter.add_edos("KS", edos=self.ks_ebands_kmesh, edos_kwargs=edos_kwargs) for itemp in range(self.ntemp): - label="T = %.1f K" % self.tmesh[itemp] + label = "T = %.1f K" % self.tmesh[itemp] edos_plotter.add_edos(label, edos=self.qp_ebands_kmesh_t[itemp], edos_kwargs=edos_kwargs) return edos_plotter + class SigmaPhReader(BaseEphReader): """ Reads data from file and constructs objects. @@ -2149,7 +2794,7 @@ class SigmaPhReader(BaseEphReader): .. inheritance-diagram:: SigmaPhReader """ def __init__(self, path): - super(SigmaPhReader, self).__init__(path) + super().__init__(path) self.nsppol = self.read_dimvalue("nsppol") @@ -2160,17 +2805,16 @@ def __init__(self, path): self.nqibz = self.read_dimvalue("nqibz") self.ngqpt = self.read_value("ngqpt") - # T and frequency meshes. + # T mesh and frequency meshes. self.ktmesh = self.read_value("kTmesh") self.tmesh = self.ktmesh / abu.kb_HaK - self.ktmesh *= units.Ha_to_eV + self.ktmesh *= abu.Ha_eV # The K-points where QP corrections have been calculated. structure = self.read_structure() self.sigma_kpoints = KpointList(structure.reciprocal_lattice, self.read_value("kcalc")) for kpoint in self.sigma_kpoints: - name = structure.findname_in_hsym_stars(kpoint) - kpoint.set_name(name) + kpoint.set_name(structure.findname_in_hsym_stars(kpoint)) # [nsppol, nkcalc] arrays with index of KS bands computed. # Note conversion between Fortran and python convention. @@ -2184,6 +2828,10 @@ def __init__(self, path): # This dimension is optional, its presence signals that we have Sigma(w) self.nwr = self.read_dimvalue("nwr", default=0) + # Number of frequency points in Eliashberg functions + # This quantity is optional, 0 means *not available* + self.gfw_nomega = self.read_dimvalue("gfw_nomega", default=0) + def get_sigma_skb_kpoint(self, spin, kpoint, band): """ Check k-point, band and spin index. Raise ValueError if invalid. @@ -2248,40 +2896,80 @@ def read_sigeph_skb(self, spin, kpoint, band): # wrmesh_b(nwr, max_nbcalc, nkcalc, nsppol) # Frequency mesh along the real axis (Ha units) used for the different bands #print(spin, ikc, ib, self.read_variable("wrmesh_b").shape) - wmesh = self.read_variable("wrmesh_b")[spin, ikc, ib, :] * units.Ha_to_eV + wmesh = self.read_variable("wrmesh_b")[spin, ikc, ib, :] * abu.Ha_eV # complex(dpc) :: vals_e0ks(ntemp, max_nbcalc, nkcalc, nsppol) # Sigma_eph(omega=eKS, kT, band) - vals_e0ks = self.read_variable("vals_e0ks")[spin, ikc, ib, :, :] * units.Ha_to_eV + vals_e0ks = self.read_variable("vals_e0ks")[spin, ikc, ib, :, :] * abu.Ha_eV vals_e0ks = vals_e0ks[:, 0] + 1j * vals_e0ks[:, 1] # complex(dpc) :: dvals_de0ks(ntemp, max_nbcalc, nkcalc, nsppol) # d Sigma_eph(omega, kT, band, kcalc, spin) / d omega (omega=eKS) - dvals_de0ks = self.read_variable("dvals_de0ks")[spin, ikc, ib, :, :] * units.Ha_to_eV + dvals_de0ks = self.read_variable("dvals_de0ks")[spin, ikc, ib, :, :] dvals_de0ks = dvals_de0ks[:, 0] + 1j * dvals_de0ks[:, 1] # real(dp) :: dw_vals(ntemp, max_nbcalc, nkcalc, nsppol) # Debye-Waller term (static). - dw_vals = self.read_variable("dw_vals")[spin, ikc, ib, :] * units.Ha_to_eV + dw_vals = self.read_variable("dw_vals")[spin, ikc, ib, :] * abu.Ha_eV # complex(dpc) :: vals_wr(nwr, ntemp, max_nbcalc, nkcalc, nsppol) # Sigma_eph(omega, kT, band) for given (k, spin). # Note: enk_KS corresponds to nwr/2 + 1. - vals_wr = self.read_variable("vals_wr")[spin, ikc, ib, :, :, :] * units.Ha_to_eV + vals_wr = self.read_variable("vals_wr")[spin, ikc, ib, :, :, :] * abu.Ha_eV vals_wr = vals_wr[:, :, 0] + 1j * vals_wr[:, :, 1] # Spectral function # nctkarr_t("spfunc_wr", "dp", "nwr, ntemp, max_nbcalc, nkcalc, nsppol") - spfunc_wr = self.read_variable("spfunc_wr")[spin, ikc, ib, :, :] / units.Ha_to_eV + spfunc_wr = self.read_variable("spfunc_wr")[spin, ikc, ib, :, :] / abu.Ha_eV # Read QP data. Note band instead of ib index. qp = self.read_qp(spin, ikc, band) - return EphSelfEnergy(wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_wr) + # Read contributions given by the Frohlich model (optional) + frohl_vals_e0ks = None; frohl_dvals_de0ks = None; frohl_spfunc_wr = None + #if self.read_variable("frohl_model", default=0): + # frohl_vals_e0ks = self.read_variable("frohl_vals_e0ks")[spin, ikc, ib, :, :] * abu.Ha_eV + # frohl_vals_e0ks = frohl_vals_e0ks[:, 0] + 1j * frohl_vals_e0ks[:, 1] + # frohl_dvals_de0ks = self.read_variable("frohl_dvals_de0ks")[spin, ikc, ib, :, :] + # frohl_dvals_de0ks = frohl_dvals_de0ks[:, 0] + 1j * frohl_dvals_de0ks[:, 1] + # frohl_spfunc_wr = self.read_variable("frohl_spfunc_wr")[spin, ikc, ib, :, :] / abu.Ha_eV + + return EphSelfEnergy(wmesh, qp, vals_e0ks, dvals_de0ks, dw_vals, vals_wr, spfunc_wr, + frohl_vals_e0ks=frohl_vals_e0ks, + frohl_dvals_de0ks=frohl_dvals_de0ks, + frohl_spfunc_wr=frohl_spfunc_wr) + + def read_a2feph_skb(self, spin, kpoint, band): + """ + Read and return the Eliashberg function for the given (spin, k-point, band). + + Args: + spin: Spin index + kpoint: K-point in self-energy. Accepts |Kpoint|, vector or index. + band: band index. + + Return: :class:`A2feph` object. + """ + # Access netcdf arrays directly instead of building a2f objects because it's gonna be faster. + # nctkarr_t("gfw_mesh", "dp", "gfw_nomega") + # nctkarr_t("gfw_vals", "dp", "gfw_nomega, three, max_nbcalc, nkcalc, nsppol") + # 1: gkk^2 with delta(en - em) + # 2:3 (Fan-Migdal/DW contribution) + wmesh = self.read_value("gfw_mesh") * abu.Ha_eV + #values = self.read_value("gfw_vals") # * abu.Ha_eV # TODO + + # Get a2f_{sbk}(w) + spin, ikc, ibc, kpoint = self.get_sigma_skb_kpoint(spin, kpoint, band) + var = self.read_variable("gfw_vals") + values = var[spin, ikc, ibc] * abu.Ha_eV # TODO check units + gkq2, fan, dw = values[0], values[1], values[2] + + return A2feph(wmesh, gkq2, fan, dw, spin, kpoint, band) def read_qp(self, spin, kpoint, band, ignore_imag=False): """ - Return :class:`QpTempState` for the given (spin, kpoint, band). + Return :class:`QpTempState` for the given (spin, kpoint, band) + (NB: band is a global index i.e. unshifted) Only real part is returned if ``ignore_imag``. """ spin, ikc, ibc, kpoint = self.get_sigma_skb_kpoint(spin, kpoint, band) @@ -2292,27 +2980,32 @@ def ri(a): # (Complex) QP energies computed with the dynamic formalism. # nctkarr_t("qp_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") var = self.read_variable("qp_enes") - qpe = (var[spin, ikc, ibc, :, 0] + 1j * var[spin, ikc, ibc, :, 1]) * units.Ha_to_eV + qpe = (var[spin, ikc, ibc, :, 0] + 1j * var[spin, ikc, ibc, :, 1]) * abu.Ha_eV + + # On-the-mass-shell QP energies. + # nctkarr_t("qpoms_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") + try: + var = self.read_variable("qpoms_enes") + except Exception: + cprint("Reading old deprecated sigeph file!", "yellow") + var = self.read_variable("qpadb_enes") - # Adiabatic energies. - # nctkarr_t("qpadb_enes", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") - var = self.read_variable("qpadb_enes") - qpe_adb = var[spin, ikc, ibc, :, 0] * units.Ha_to_eV + qpe_oms = var[spin, ikc, ibc, :, 0] * abu.Ha_eV # Debye-Waller term (static). # nctkarr_t("dw_vals", "dp", "ntemp, max_nbcalc, nkcalc, nsppol"), var = self.read_variable("dw_vals") - dw = var[spin, ikc, ibc, :] * units.Ha_to_eV + dw = var[spin, ikc, ibc, :] * abu.Ha_eV # Sigma_eph(omega=eKS, kT, band, ikcalc, spin) # nctkarr_t("vals_e0ks", "dp", "two, ntemp, max_nbcalc, nkcalc, nsppol") # TODO: Add Fan0 instead of computing Sigma - DW? var = self.read_variable("vals_e0ks") - sigc = (var[spin, ikc, ibc, :, 0] + 1j * var[spin, ikc, ibc, :, 1]) * units.Ha_to_eV + sigc = (var[spin, ikc, ibc, :, 0] + 1j * var[spin, ikc, ibc, :, 1]) * abu.Ha_eV fan0 = sigc - dw # nctkarr_t("ks_enes", "dp", "max_nbcalc, nkcalc, nsppol") - e0 = self.read_variable("ks_enes")[spin, ikc, ibc] * units.Ha_to_eV + e0 = self.read_variable("ks_enes")[spin, ikc, ibc] * abu.Ha_eV # nctkarr_t("ze0_vals", "dp", "ntemp, max_nbcalc, nkcalc, nsppol") ze0 = self.read_variable("ze0_vals")[spin, ikc, ibc] @@ -2327,7 +3020,7 @@ def ri(a): ze0=ze0, fan0=ri(fan0), dw=dw, - qpe_adb=qpe_adb, + qpe_oms=qpe_oms, ) def read_allqps(self, ignore_imag=False): @@ -2339,6 +3032,7 @@ def read_allqps(self, ignore_imag=False): """ qps_spin = self.nsppol * [None] + # TODO: Try to optimize this part. for spin in range(self.nsppol): qps = [] for ikc, kpoint in enumerate(self.sigma_kpoints): @@ -2347,5 +3041,3 @@ def read_allqps(self, ignore_imag=False): qps_spin[spin] = QpTempList(qps) return tuple(qps_spin) - - diff --git a/abipy/eph/tests/test_a2f.py b/abipy/eph/tests/test_a2f.py index 262f2bcf1..9f7e2c3dd 100644 --- a/abipy/eph/tests/test_a2f.py +++ b/abipy/eph/tests/test_a2f.py @@ -1,6 +1,4 @@ """Tests for a2f module.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import abipy.data as abidata diff --git a/abipy/eph/tests/test_sigeph.py b/abipy/eph/tests/test_sigeph.py index ce0ad7223..417e4325d 100644 --- a/abipy/eph/tests/test_sigeph.py +++ b/abipy/eph/tests/test_sigeph.py @@ -1,6 +1,4 @@ """Tests for sigeph module.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import collections import numpy as np @@ -14,7 +12,6 @@ class SigEPhFileTest(AbipyTest): def test_sigeph_file(self): """Tests for SigEPhFile.""" - #raise self.SkipTest("Disabled") sigeph = abilab.abiopen(abidata.ref_file("diamond_444q_SIGEPH.nc")) repr(sigeph); str(sigeph) assert sigeph.to_string(verbose=2) @@ -25,14 +22,16 @@ def test_sigeph_file(self): assert sigeph.nkcalc == 2 self.assert_equal(sigeph.ngqpt.flatten(), [4, 4, 4]) + assert not sigeph.imag_only assert sigeph.symsigma == 0 - assert sigeph.ntemp == 6 + assert sigeph.ntemp == 6 assert sigeph.nband == 54 assert sigeph.nqbz == sigeph.ngqpt.prod() assert sigeph.nqibz == 8 # FIXME #self.assert_almost_equal(sigeph.zcut, 0.001) assert sigeph.has_spectral_function and sigeph.reader.nwr == 101 + assert not sigeph.has_eliashberg_function assert len(sigeph.mu_e) == sigeph.ntemp assert "nbsum" in sigeph.params assert "eph_fsewin" in sigeph.params @@ -76,10 +75,10 @@ def test_sigeph_file(self): assert ksamp.to_string(title="Ksampling") # Test Dataframe construction. - data_sk = sigeph.get_dataframe_sk(spin=0, kpoint=[0.5, 0.0, 0.0]) + data_sk = sigeph.get_dataframe_sk(spin=0, kpoint=[0.5, 0.0, 0.0], with_spin=True) assert "qpeme0" in data_sk assert np.all(data_sk["spin"] == 0) - self.assert_almost_equal(data_sk["kpoint"].values[0].frac_coords, [0.5, 0.0, 0.0]) + #self.assert_almost_equal(data_sk["kpoint"].values[0].frac_coords, [0.5, 0.0, 0.0]) itemp = 0 data_sk = sigeph.get_dataframe_sk(spin=0, kpoint=[0.5, 0.0, 0.0], itemp=itemp) @@ -125,7 +124,7 @@ def test_sigeph_file(self): assert qp.spin == 0 and qp.kpoint == [0, 0, 0] and qp.band == 3 assert qp.skb == (0, [0, 0, 0], 3) #assert len(qp.qpeme0) == qpt.ntemp - self.assert_equal(qp.qpeme0, qp.qpe - qp.e0) + self.assert_equal(qp.qpeme0, (qp.qpe - qp.e0).real) self.assert_equal(qp.re_qpe + 1j * qp.imag_qpe, qp.qpe) self.assert_equal(qp.re_fan0 + 1j * qp.imag_fan0, qp.fan0) fields = qp.get_fields() @@ -140,7 +139,7 @@ def test_sigeph_file(self): # Test QPList qplist = sigeph.reader.read_qplist_sk(spin=0, kpoint=[0, 0, 0], ignore_imag=False) - assert isinstance(qplist, collections.Iterable) + assert isinstance(qplist, collections.abc.Iterable) # TODO #self.serialize_with_pickle(qplist, protocols=[-1]) @@ -188,73 +187,77 @@ def test_sigeph_file(self): sigeph.close() # TODO: Need new files with IBZ. - #def test_sigeph_interpolation(self): - # """Test interpolation and TdepElectronBands""" - # sigeph = abilab.abiopen(abidata.ref_file("diamond_444q_SIGEPH.nc")) - - # # Test interpolation without KS bands. - # tdep_nopath = sigeph.interpolate(itemp_list=0) - # repr(tdep_nopath); str(tdep_nopath) - # assert tdep_nopath.to_string(verbose=2) - # assert tdep_nopath.ntemp == 1 - # assert not tdep_nopath.has_kpath - # assert not tdep_nopath.ks_ebands_kpath is None - # assert not tdep_nopath.has_kmesh - # assert not tdep_nopath.ks_ebands_kmesh is None - # same_tdep_nopath = tdep_nopath.__class__.pickle_load(tdep_nopath.pickle_dump()) - - # if self.has_matplotlib(): - # assert tdep_nopath.plot_itemp(itemp=0, fontsize=8, show=False) - # assert tdep_nopath.plot(show=False) - # assert tdep_nopath.plot_lws_vs_e0(itemp_list=[0, -1], show=False) - # assert tdep_nopath.get_ebands_plotter() - # assert tdep_nopath.get_edos_plotter() is None - - # # Test interpolation with KS bands. - # #tdep = sigeph.interpolate(self, itemp_list=None, lpratio=5, ks_ebands_kpath=None, ks_ebands_kmesh=None, ks_degatol=1e-4, - # # vertices_names=None, line_density=20, filter_params=None, only_corrections=False, verbose=0) - # #repr(tdep); str(tdep) - # #assert tdep.to_string(verbose=2) - # #assert tdep_nopath.ntemp == 1 - # #assert not tdep_nopath.ks_ebands_kpath is None - # #assert tdep.has_kpath - # #assert not tdep_nopath.has_kmesh - # #assert not tdep_nopath.ks_ebands_kmesh is None - - # #if self.has_matplotlib(): - # # assert tdep_nopath.plot_itemp(itemp=0, fontsize=8, show=False) - # # assert tdep_nopath.plot(show=False) - # # assert tdep_nopath.plot_lws_vs_e0(itemp_list=[0, -1], show=False) - # # assert tdep.get_ebands_plotter() - # # assert tdep.get_edos_plotter() is None - - # sigeph.close() + def test_sigeph_interpolation(self): + """Test interpolation and TdepElectronBands""" + sigeph = abilab.abiopen(abidata.ref_file("diamond_444q_full_SIGEPH.nc")) + + # Test interpolation without KS bands. + tdep_nopath = sigeph.interpolate(itemp_list=0) + repr(tdep_nopath); str(tdep_nopath) + assert tdep_nopath.to_string(verbose=2) + assert tdep_nopath.ntemp == 1 + #assert not tdep_nopath.has_kpath + #assert not tdep_nopath.ks_ebands_kpath is None + #assert not tdep_nopath.has_kmesh + #assert not tdep_nopath.ks_ebands_kmesh is None + same_tdep_nopath = tdep_nopath.__class__.pickle_load(tdep_nopath.pickle_dump()) + + if self.has_matplotlib(): + assert tdep_nopath.plot_itemp(itemp=0, fontsize=8, show=False) + assert tdep_nopath.plot_itemp_with_lws_vs_e0(itemp=0, fontsize=8, with_ratios=(3, 1), show=False) + assert tdep_nopath.plot(show=False) + assert tdep_nopath.plot_lws_vs_e0(itemp_list=[0, -1], show=False) + assert tdep_nopath.get_ebands_plotter() + #assert tdep_nopath.get_edos_plotter() is None + + # Test interpolation with KS bands. + tdep = sigeph.interpolate(itemp_list=None, lpratio=5, ks_ebands_kpath=None, ks_ebands_kmesh=None, ks_degatol=1e-4, + vertices_names=None, line_density=20, filter_params=None, only_corrections=False, verbose=0) + repr(tdep); str(tdep) + assert tdep.to_string(verbose=2) + assert tdep_nopath.ntemp == 1 + #assert not tdep_nopath.ks_ebands_kpath is None + #assert tdep.has_kpath + #assert not tdep_nopath.has_kmesh + #assert not tdep_nopath.ks_ebands_kmesh is None + + if self.has_matplotlib(): + assert tdep_nopath.plot_itemp(itemp=0, fontsize=8, show=False) + assert tdep_nopath.plot_itemp_with_lws_vs_e0(itemp=0, fontsize=8, show=False) + assert tdep_nopath.plot(show=False) + assert tdep_nopath.plot_lws_vs_e0(itemp_list=[0, -1], show=False) + assert tdep.get_ebands_plotter() + #assert tdep.get_edos_plotter() is None + + sigeph.close() + + # TODO: Need new files with IBZ. + def test_sigeph_boltztrap(self): + """Test boltztrap interpolation""" + sigeph = abilab.abiopen(abidata.ref_file("diamond_444q_full_SIGEPH.nc")) + sigeph.get_lifetimes_boltztrap("diamond", workdir=self.mkdtemp()) + sigeph.close() def test_sigeph_robot(self): """Tests for SigEPhRobot.""" - #raise self.SkipTest("Disabled") filepaths = [ abidata.ref_file("diamond_444q_SIGEPH.nc"), ] with abilab.SigEPhRobot.from_files(filepaths) as robot: robot.add_file("same_file", filepaths[0]) repr(robot); str(robot) - robot.to_string(verbose=2) + assert robot.to_string(verbose=2) assert len(robot) == 2 data = robot.get_dataframe() - assert "qpe" in data + assert "re_qpe" in data # Test plot methods if self.has_matplotlib(): assert robot.plot_selfenergy_conv(spin=0, kpoint=0, band=0, show=False) assert robot.plot_selfenergy_conv(spin=0, kpoint=0, band=0, sortby="nbsum", hue="nqibz", show=False) - #try: assert robot.plot_qpgaps_t(show=False) assert robot.plot_qpgaps_t(plot_qpmks=True, show=False) - #except ValueError: - # workaround for matplotlib bug - #pass assert robot.plot_qpgaps_convergence(itemp=0, sortby="nbsum", show=False) assert robot.plot_qpgaps_convergence(itemp=0, sortby="nbsum", hue="nqibz", show=False) diff --git a/abipy/eph/tests/test_transportfile.py b/abipy/eph/tests/test_transportfile.py new file mode 100644 index 000000000..76986685c --- /dev/null +++ b/abipy/eph/tests/test_transportfile.py @@ -0,0 +1,26 @@ +"""Tests for the transport module.""" +import os +import collections +import numpy as np +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy import abilab + + +class TransportFileTest(AbipyTest): + + def test_transportfile(self): + """Test abinit transport file""" + + with abilab.abiopen(abidata.ref_file('sio_DS1_TRANSPORT.nc')) as si_transport: + assert repr(si_transport); assert str(si_transport); assert si_transport.to_string(verbose=2) + si_transport.get_mobility_mu(0, 0) + + if self.has_matplotlib(): + assert si_transport.plot_dos(title="default values", show=False) + assert si_transport.plot_vvdos(colormap="viridis", component="yy", show=False) + assert si_transport.plot_mobility(colormap="viridis", component="yy", show=False) + + if self.has_nbformat(): + assert si_transport.write_notebook(nbpath=self.get_tmpname(text=True)) diff --git a/abipy/eph/tests/test_v1qavg.py b/abipy/eph/tests/test_v1qavg.py new file mode 100644 index 000000000..61ff489b3 --- /dev/null +++ b/abipy/eph/tests/test_v1qavg.py @@ -0,0 +1,71 @@ +"""Tests for v1qavg module.""" +import abipy.data as abidata + +from abipy import abilab +from abipy.core.testing import AbipyTest +from abipy.eph.v1qavg import V1qAvgFile, V1qAvgRobot + + +class V1qavgTest(AbipyTest): + + def test_v1qavg_file(self): + """Testing V1qAvgFile.""" + with V1qAvgFile(abidata.ref_file("abinitio_qpath_V1QAVG.nc")) as ncfile: + repr(ncfile); str(ncfile) + assert ncfile.to_string(verbose=2) + assert not ncfile.params + assert ncfile.structure.formula == "Ga1 P1" and len(ncfile.structure) == 2 + + assert ncfile.has_zeff + assert ncfile.has_dielt + assert not ncfile.has_quadrupoles + assert not ncfile.has_efield + assert ncfile.dvdb_add_lr == 1 + assert ncfile.symv1scf == 0 + assert not ncfile.interpolated + assert not ncfile.has_maxw + assert ncfile.qdamp == -1.0 + + assert len(ncfile.qpoints) == 12 + + # Test matplotlib methods + if self.has_matplotlib(): + assert ncfile.plot(what_list="all", ispden=0, show=False) + assert ncfile.plot_maxw(show=False) is None + assert ncfile.plot_maxw_perts(scale="semilogy", sharey=False, fontsize=8, show=False) is None + + # Test jupyter notebook creation + if self.has_nbformat(): + ncfile.write_notebook(nbpath=self.get_tmpname(text=True)) + + +class V1qAvgRobotTest(AbipyTest): + + def test_v1qavg_robot(self): + """Testing V1qAvgRobot.""" + files = abidata.ref_files( + "abinitio_qpath_V1QAVG.nc", + "interpolated_qpath_V1QAVG.nc", + ) + + with V1qAvgRobot.from_files(files[0]) as robot: + robot.add_file("interpolated_v1qavg", files[1]) + assert len(robot) == 2 + repr(robot); str(robot) + robot.to_string(verbose=2) + + interp_ncfile = robot.abifiles[1] + assert interp_ncfile.interpolated + assert interp_ncfile.has_maxw + + # Test matplotlib methods + if self.has_matplotlib(): + assert robot.plot(ispden=0, vname="v1scf_avg", show=False) + assert robot.plot_maxw(show=False) is None + + assert interp_ncfile.plot_maxw(show=False) + assert interp_ncfile.plot_maxw_perts(scale="semilogy", sharey=False, fontsize=8, show=False) + + # Test jupyter notebook creation + if self.has_nbformat(): + robot.write_notebook(nbpath=self.get_tmpname(text=True)) diff --git a/abipy/eph/transportfile.py b/abipy/eph/transportfile.py new file mode 100644 index 000000000..17f3ade84 --- /dev/null +++ b/abipy/eph/transportfile.py @@ -0,0 +1,302 @@ +# coding: utf-8 +"""TRANSPORT.nc file.""" + +import numpy as np +import abipy.core.abinit_units as abu + +from monty.functools import lazy_property +from monty.string import marquee +from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter +from abipy.electrons.ebands import ElectronsReader #, RobotWithEbands +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +#from abipy.abio.robots import Robot + + +__all__ = [ + "TransportFile", +] + + +class TransportFile(AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter): + + @classmethod + def from_file(cls, filepath): + """Initialize the object from a netcdf file.""" + return cls(filepath) + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = TransportReader(filepath) + + #self.fermi = self.ebands.fermie * abu.eV_Ha + #self.volume = self.ebands.structure.volume * abu.Ang_Bohr**3 + self.tmesh = self.reader.tmesh + + @property + def ntemp(self): + """Number of temperatures.""" + return len(self.tmesh) + + @lazy_property + def ebands(self): + """|ElectronBands| object.""" + return self.reader.read_ebands() + + @property + def structure(self): + """|Structure| object.""" + return self.ebands.structure + + @lazy_property + def params(self): + """:class:`OrderedDict` with parameters that might be subject to convergence studies.""" + od = self.get_ebands_params() + return od + + @add_fig_kwargs + def plot_dos(self, ax=None, **kwargs): + """ + Plot the density of states + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + + Return: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=ax) + wmesh, dos, idos = self.reader.read_dos() + ax.plot(wmesh, dos, **kwargs) + ax.grid(True) + ax.set_xlabel('Fermi level (eV)') + ax.set_ylabel('DOS') + return fig + + @add_fig_kwargs + def plot_vvdos(self, component='xx', ax=None, colormap='jet', fontsize=8, **kwargs): + """ + Plot velocity * lifetime density of states + + Args: + component: Component to plot: "xx", "yy" "xy" ... + ax: |matplotlib-Axes| or None if a new figure should be created. + colormap: matplotlib colormap. + fontsize (int): fontsize for titles and legend + + Return: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=ax) + cmap = plt.get_cmap(colormap) + for itemp in range(self.ntemp): + temp = self.tmesh[itemp] + wmesh, vvdos = self.reader.read_vvdos_tau(itemp, component=component) + ax.plot(wmesh, vvdos, c=cmap(itemp / self.ntemp), label='T = %dK' % temp) + + ax.grid(True) + ax.set_xlabel('Fermi level (eV)') + ax.set_ylabel('VVDOS') + ax.set_yscale('log') + ax.legend(loc="best", shadow=True, fontsize=fontsize) + + return fig + + @add_fig_kwargs + def plot_mobility(self, component='xx', ax=None, colormap='jet', fontsize=8, **kwargs): + """ + Read the Mobility from the netcdf file and plot it + + Args: + component: Component to plot: "xx", "yy" "xy" ... + ax: |matplotlib-Axes| or None if a new figure should be created. + colormap: matplotlib colormap. + fontsize (int): fontsize for titles and legend + + Return: |matplotlib-Figure| + """ + ax, fig, plt = get_ax_fig_plt(ax=ax) + cmap = plt.get_cmap(colormap) + for itemp in range(self.ntemp): + temp = self.tmesh[itemp] + wmesh, mu = self.reader.read_mobility(0, itemp, component,0) + ax.plot(wmesh, mu, c=cmap(itemp / self.ntemp), label='T = %dK' % temp) + + ax.grid(True) + ax.set_xlabel('Fermi level (eV)') + ax.set_ylabel(r'mobility $\mu(\epsilon_F)$ [cm$^2$/Vs]') + ax.set_yscale('log') + ax.legend(loc="best", shadow=True, fontsize=fontsize) + + return fig + + def get_mobility_mu(self, eh, itemp, component='xx', ef=None, spin=0): + """ + Get the value of the mobility at a chemical potential Ef + + Args: + eh: + itemp: Index of the temperature. + component: Component to plot: "xx", "yy" "xy" ... + ef: Value of the doping in eV. The default None uses the chemical potential at the temperature + spin: Spin index. + """ + from scipy import interpolate + if ef is None: ef = self.reader.read_value('transport_mu_e')[itemp] + wmesh, mobility = self.reader.read_mobility(eh,itemp,component,spin) + f = interpolate.interp1d(wmesh,mobility) + return f(ef) + + def __str__(self): + """String representation""" + return self.to_string() + + def to_string(self, verbose=0): + """String representation""" + lines = []; app = lines.append + + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(self.ebands.to_string(with_structure=False, verbose=verbose, title="KS Electron Bands")) + app("") + + # Transport section. + app(marquee("Transport calculation", mark="=")) + app("Number of temperatures: %d" % self.ntemp) + app("Mobility:") + app("Temperature [K] Electrons [cm^2/Vs] Holes [cm^2/Vs]") + for itemp in range(self.ntemp): + temp = self.tmesh[itemp] + mobility_mu_e = self.get_mobility_mu(0, itemp) + mobility_mu_h = self.get_mobility_mu(1, itemp) + app("%14.1lf %18.6lf %18.6lf" % (temp, mobility_mu_e, mobility_mu_h)) + + return "\n".join(lines) + + def yield_figs(self, **kwargs): # pragma: no cover + """ + Return figures plotting the transport data + """ + yield self.plot_dos(show=False) + yield self.plot_vvdos(show=False) + yield self.plot_mobility(show=False) + + def close(self): + """Close the file.""" + self.reader.close() + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("nfile = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(ncfile)"), + nbv.new_code_cell("ncfile.plot_dos();"), + nbv.new_code_cell("ncfile.plot_vvdos();"), + nbv.new_code_cell("ncfile.plot_mobility();"), + ]) + + return self._write_nb_nbpath(nb, nbpath) + + +class TransportReader(ElectronsReader): + """ + This class reads the results stored in the TRANSPORT.nc file + It provides helper function to access the most important quantities. + """ + def __init__(self, filepath): + self.filepath = filepath + super().__init__(filepath) + ktmesh = self.read_value("kTmesh") + self.tmesh = ktmesh / abu.kb_HaK + self.nsppol = self.read_dimvalue('nsppol') + + def read_vvdos(self, component='xx', spin=1): + """ + Read the group velocity density of states + The vvdos_vals array has 3 dimensions (9,nsppolplus1,nw) + 1. 3x3 components of the tensor + 2. the spin polarization + 1 for the sum + 3. the number of frequencies + """ + i,j = abu.s2itup(component) + wmesh = self.read_variable("vvdos_mesh")[:] * abu.Ha_eV + vals = self.read_variable("vvdos_vals") + vvdos = vals[i,j,spin,:] + return wmesh, vvdos + + def read_vvdos_tau(self, itemp, component='xx', spin=1): + """ + Read the group velocity density of states times lifetime for different temperatures + The vvdos_tau array has 4 dimensions (ntemp,9,nsppolplus1,nw) + 1. the number of temperatures + 2. 3x3 components of the tensor + 3. the spin polarization + 1 for the sum + 4. the number of frequencies + """ + i,j = abu.s2itup(component) + wmesh = self.read_variable("vvdos_mesh")[:] * abu.Ha_eV + vals = self.read_variable("vvdos_tau") + vvdos_tau = vals[itemp,i,j,spin,:] / (2 * abu.Ha_s) + return wmesh, vvdos_tau + + def read_dos(self, spin=0): + """ + Read the density of states + """ + vals = self.read_variable("edos_mesh") + wmesh = vals[:] + vals = self.read_variable("edos_dos") + dos = vals[spin,:] + vals = self.read_variable("edos_idos") + idos = vals[spin,:] + return wmesh, dos, idos + + def read_onsager(self, itemp): + """ + Read the Onsager coefficients computed in the transport driver in Abinit + """ + L0 = np.moveaxis(self.read_variable("L0")[itemp,:], [0,1,2,3], [3,2,0,1]) + L1 = np.moveaxis(self.read_variable("L1")[itemp,:], [0,1,2,3], [3,2,0,1]) + L2 = np.moveaxis(self.read_variable("L2")[itemp,:], [0,1,2,3], [3,2,0,1]) + return L0, L1, L2 + + def read_transport(self, itemp): + sigma = np.moveaxis(self.read_variable("sigma")[itemp,:], [0,1,2,3],[3,2,0,1]) + kappa = np.moveaxis(self.read_variable("kappa")[itemp,:], [0,1,2,3],[3,2,0,1]) + seebeck = np.moveaxis(self.read_variable("seebeck")[itemp,:], [0,1,2,3],[3,2,0,1]) + pi = np.moveaxis(self.read_variable("pi")[itemp,:], [0,1,2,3],[3,2,0,1]) + return sigma, kappa, seebeck, pi + + def read_mobility(self, eh, itemp, component, spin): + """ + Read mobility from the TRANSPORT.nc file + The mobility is computed separately for electrons and holes. + """ + i,j = abu.s2itup(component) + wvals = self.read_variable("vvdos_mesh") + mobility = self.read_variable("mobility")[eh,itemp,i,j,spin,:] + return wvals, mobility + + def read_evk_diagonal(self): + """ + Read the group velocities i.e the diagonal matrix elements. + Return (nsppol, nkpt) |numpy-array| of real numbers. + """ + vels = self.read_variable("vred_diagonal") + # Cartesian? Ha --> eV? + return vels * (abu.Ha_to_eV / abu.Bohr_Ang) + + +#class TransportRobot(Robot, RobotWithEbands): +# """ +# This robot analyzes the results contained in multiple TRANSPORT.nc files. +# +# .. rubric:: Inheritance Diagram +# .. inheritance-diagram:: TransportRobot +# """ +# EXT = "TRANSPORT" diff --git a/abipy/eph/v1qavg.py b/abipy/eph/v1qavg.py new file mode 100644 index 000000000..ac4eec000 --- /dev/null +++ b/abipy/eph/v1qavg.py @@ -0,0 +1,519 @@ +# coding: utf-8 +""" +Tools to analyze the V1QAVG file produced by the E-PH code (eph_task +15 or -15) +""" +import numpy as np + +from collections import OrderedDict +from monty.string import list_strings, marquee +from monty.functools import lazy_property +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt +from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter +from abipy.core.kpoints import Kpath +from abipy.abio.robots import Robot +from abipy.iotools import ETSF_Reader + + +def _get_style(reim, what, marker=None, markersize=None, alpha=2.0): + lw = 1 + symbol, linestyle, linewidth = { + "v1scf_avg": (r"v1_{\bf q}", "-", lw), + "v1scf_abs_avg": (r"|v1_{\bf q}|", "-", lw), + "v1lr_avg": (r"v1_{\mathrm{lr}}", "--", lw), + "v1lr_abs_avg": (r"|v1_{\mathrm{lr}}|", "--", lw), + "v1scfmlr_avg": (r"(v1_{\bf q} - v1_{\mathrm{lr}})", "-.", lw), + "v1scfmlr_abs_avg": (r"(|v1_{\bf q} - v1_{\mathrm{lr}|})", "-.", lw), + "v1scf_gsmall": (r"v1_{\bf q}(G)", "-", lw), + "v1lr_gsmall": (r"v1lr_{\bf q}(G)", "-.", lw), + "v1scfmlr_gsmall": (r"(v1_{\bf q}(G) - v1_{\mathrm{lr}}(G))", "-.", lw), + }[what] + + return dict( + marker=marker, + markersize=markersize, + label=r"$\langle \%s %s \rangle$" % ({0: "Re", 1: "Im"}[reim], symbol), + color={0: "blue", 1: "red"}[reim], + linestyle=linestyle, + linewidth=linewidth, + alpha=alpha, + ) + + +class V1qAvgFile(AbinitNcFile, Has_Structure, NotebookWriter): + """ + The V1QAVG.nc file contains the average over the unit cell of the periodic part the DFPT scattering potential. + This file is produced by the E-PH code by setting eph_task to +15 or -15. + If eph_task is +15, the input DVDB contains a q-mesh and the potentials are interpolated on a list of q-points + (usually a q-path) specified by the user. In this case the V1QAVG.nc file also contains an extra array + with Max_r |W(R, r)|, useful to study the decay of the scattering potentials in R-space. + If eph_task is -15, the netcdf file contains the average for the q-points found in the DVDB file. + This option is usually used to visualize the ab-initio potentials and compare then with the model for the LR part. + """ + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = r = ETSF_Reader(filepath) + # Read medadata + self.has_zeff = bool(r.read_value("has_zeff")) + self.has_dielt = bool(r.read_value("has_dielt")) + self.has_quadrupoles = bool(r.read_value("has_quadrupoles")) + self.has_efield = bool(r.read_value("has_efield", default=False)) + self.dvdb_add_lr = r.read_value("dvdb_add_lr") + self.symv1scf = r.read_value("symv1scf") + self.interpolated = bool(r.read_value("interpolated")) + self.qdamp = r.read_value("qdamp") + + @lazy_property + def structure(self): + """|Structure| object.""" + return self.reader.read_structure() + + @lazy_property + def qpoints(self): + """List of Q-points.""" + frac_coords = self.reader.read_value('qpoints') + return Kpath(self.structure.reciprocal_lattice, frac_coords, ksampling=None) + + @lazy_property + def has_maxw(self): + """True if ncfile contains Max_r |W(R, r)|""" + return "maxw" in self.reader.rootgrp.variables + + def close(self): + self.reader.close() + + @lazy_property + def params(self): + """Dict with parameters that might be subject to convergence studies.""" + return {} + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app(self.qpoints.to_string(verbose=verbose, title="Q-path")) + app("") + app("has_dielt: %s, has_zeff: %s, has_quadrupoles: %s, has_efield: %s" % ( + self.has_dielt, self.has_zeff, self.has_quadrupoles, self.has_efield)) + app("dvdb_add_lr: %s, symv1scf: %s, interpolated: %s, qdamp: %s" % ( + self.dvdb_add_lr, self.symv1scf, self.interpolated, self.qdamp)) + + return "\n".join(lines) + + def make_ticks_and_labels(self): + """Find the k-point names in the pymatgen database.""" + + od = OrderedDict() + # If the first or the last k-point are not recognized in findname_in_hsym_stars + # matplotlib won't show the full band structure along the k-path + # because the labels are not defined. So we have to make sure that + # the labels for the extrema of the path are always defined. + od[0] = " " + + for idx, qpoint in enumerate(self.qpoints): + name = qpoint.name if qpoint.name is not None else self.structure.findname_in_hsym_stars(qpoint) + if name: + od[idx] = name + if qpoint.name is None: qpoint.set_name(name) + + last = len(self.qpoints) - 1 + if last not in od: od[last] = " " + + return list(od.keys()), list(od.values()) + + @add_fig_kwargs + def plot(self, what_list="all", ispden=0, fontsize=6, sharey=False, **kwargs): + """ + Plot + + Args: + what_list: + ispden: Spin density component to plot. + fontsize: fontsize for legends and titles + sharey: True to share y-axes. + + Return: |matplotlib-Figure| + """ + #all_varnames = ["v1scf_avg", "v1lr_avg", "v1scfmlr_avg", "v1scfmlr_abs_avg", "v1scf_abs_avg"] + what_list = list_strings(what_list) if what_list != "all" else ["v1scf_avg", "v1lr_avg"] + data = {} + for vname in what_list: + # Fortran array: nctkarr_t("v1scf_avg", "dp", "two, nspden, three, natom, nqpt") + data[vname] = self.reader.read_value(vname) + + # Build [natom, 3] grid plot. + natom = len(self.structure) + nrows, ncols = natom, 3 + ax_mat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + + xs = np.arange(len(self.qpoints)) + ticks, labels = self.make_ticks_and_labels() + + for ip, ax in enumerate(ax_mat.ravel()): + idir = ip % 3 + iat = (ip - idir) // 3 + for reim in (0, 1): + for vname in what_list: + ys = data[vname][:, iat, idir, ispden, reim] + ax.plot(xs, ys, **_get_style(reim, vname)) + + ax.grid(True) + if iat == natom - 1: ax.set_xlabel("Q Wave Vector") + if idir == 0: ax.set_ylabel(r"(Hartree/Bohr)") + + if ticks: + ax.set_xticks(ticks, minor=False) + ax.set_xticklabels(labels, fontdict=None, minor=False, size=kwargs.get("qlabel_size", "large")) + ax.set_xlim(ticks[0], ticks[-1]) + + if ip == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + site = self.structure[iat] + s = "%s [%.3f, %.3f, %.3f]" % (site.specie.symbol, site.frac_coords[0], site.frac_coords[1], site.frac_coords[2]) + ax.set_title("idir: %d, iat: %d, %s" % (idir, iat, s), fontsize=fontsize) + + return fig + + @add_fig_kwargs + def plot_gvec(self, gvec, ispden=0, fontsize=6, sharey=False, **kwargs): + """ + Plot + + Args: + gvec + ispden: Spin density component to plot. + fontsize: fontsize for legends and titles + sharey: True to share y-axes. + + Return: |matplotlib-Figure| + """ + gsmall = self.reader.read_value("gsmall") + for ig, g in enumerate(gsmall): + if np.all(g == gvec): break + else: + raise RuntimeError("Cannot find gvec %s in gsmall array" % str(gvec)) + + # nctkarr_t("v1scf_gsmall", "dp", "two, ngsmall, nspden, three, natom, nqpt"), & + # nctkarr_t("v1lr_gsmall", "dp", "two, ngsmall, nspden, three, natom, nqpt"), & + what_list = ["v1scf_gsmall", "v1lr_gsmall"] + data = {} + for vname in what_list: + ncvar = self.reader.read_variable(vname) + data[vname] = ncvar[..., ig, :] + + # Build [natom, 3] grid plot. + natom = len(self.structure) + nrows, ncols = natom, 3 + ax_mat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + + xs = np.arange(len(self.qpoints)) + ticks, labels = self.make_ticks_and_labels() + + for ip, ax in enumerate(ax_mat.ravel()): + idir = ip % 3 + iat = (ip - idir) // 3 + for reim in (0, 1): + for vname in what_list: + ys = data[vname][:, iat, idir, ispden, reim] + ax.plot(xs, ys, **_get_style(reim, vname)) + + # plot difference. + ys = (data["v1scf_gsmall"][:, iat, idir, ispden, reim] + -data["v1lr_gsmall"][:, iat, idir, ispden, reim]) # * 10 + ax.plot(xs, ys, **_get_style(reim, "v1scfmlr_gsmall")) + + ax.grid(True) + if iat == natom - 1: ax.set_xlabel("Q Wave Vector") + if idir == 0: ax.set_ylabel(r"(Hartree/Bohr)") + + if ticks: + ax.set_xticks(ticks, minor=False) + ax.set_xticklabels(labels, fontdict=None, minor=False, size=kwargs.get("qlabel_size", "large")) + ax.set_xlim(ticks[0], ticks[-1]) + + if ip == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + site = self.structure[iat] + s = "%s [%.3f, %.3f, %.3f]" % (site.specie.symbol, site.frac_coords[0], site.frac_coords[1], site.frac_coords[2]) + ax.set_title("idir: %d, iat: %d, %s" % (idir, iat, s), fontsize=fontsize) + + fig.suptitle("G = %s" % str(gvec)) + + return fig + + @add_fig_kwargs + def plot_maxw(self, scale="semilogy", ax=None, fontsize=8, **kwargs): + """ + Plot the decay of max_{r,idir,ipert} |W(R,r,idir,ipert)| + + Args: + scale: "semilogy", "loglog" or "plot". + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: fontsize for legends and titles + + Return: |matplotlib-Figure| + """ + if not self.has_maxw: return None + ax, fig, plt = get_ax_fig_plt(ax=ax) + + # Fortran array: nctkarr_t("maxw", "dp", "nrpt, natom3") + maxw = self.reader.read_value("maxw") + rmod = self.reader.read_value("rmod") + data = np.max(maxw, axis=0) + f = {"plot": ax.plot, "semilogy": ax.semilogy, "loglog": ax.loglog}[scale] + f(rmod, data, marker="o", ls=":", lw=0, **kwargs) + + ax.grid(True) + ax.set_ylabel(r"$Max_{({\bf{r}}, idir, ipert)} \| W({\bf{r}}, {\bf{R}}, idir, ipert) \|$") + ax.set_xlabel(r"$\|{\bf{R}}\|$ (Bohr)") + + #if kwargs.pop("with_title", True): + # ax.set_title("dvdb_add_lr %d, qdamp: %s, symv1scf: %d" % (self.dvdb_add_lr, self.qdamp, self.symv1scf), + # fontsize=fontsize) + return fig + + @add_fig_kwargs + def plot_maxw_perts(self, scale="semilogy", sharey=False, fontsize=8, **kwargs): + """ + Plot the decay of max_r |W(R,r,idir,ipert)| for the individual atomic perturbations. + + Args: + scale: "semilogy", "loglog" or "plot". + sharey: True is y-axes should be shared. + fontsize: fontsize for legends and titles. + + Return: |matplotlib-Figure| + """ + if not self.has_maxw: return None + # Build grid of plots. + natom = len(self.structure) + ncols, nrows = (2, natom // 2) if natom % 2 == 0 else (1, natom) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + ax_list = ax_list.ravel() + + # Fortran array: nctkarr_t("maxw", "dp", "nrpt, natom3") + nrpt = self.reader.read_dimvalue("nrpt") + maxw = np.reshape(self.reader.read_value("maxw"), (natom, 3, nrpt)) + rmod = self.reader.read_value("rmod") + + for iatom, ax in enumerate(ax_list.ravel()): + site = self.structure[iatom] + title = "{} [{:.4f} {:.4f} {:.4f}]".format(site.specie.symbol, *site.frac_coords) + ax.set_title(title, fontsize=fontsize) + f = {"plot": ax.plot, "semilogy": ax.semilogy, "loglog": ax.loglog}[scale] + f(rmod, maxw[iatom, 0], marker="o", ls=":", lw=0, label="$L_x$" if iatom == 0 else None) + f(rmod, maxw[iatom, 1], marker="o", ls=":", lw=0, label="$L_y$" if iatom == 0 else None) + f(rmod, maxw[iatom, 2], marker="o", ls=":", lw=0, label="$L_z$" if iatom == 0 else None) + ax.grid(True) + if iatom == 0: + ax.set_ylabel(r"$Max_{{\bf{r}}} \| W({\bf{r}}, {\bf{R}}) \|$") + ax.legend(loc="best", fontsize=fontsize, shadow=True) + if iatom == len(ax_list) - 1: ax.set_xlabel(r"$\|{\bf{R}}\|$ (Bohr)") + + #fig.suptitle("dvdb_add_lr %d, qdamp: %s, symv1scf: %d" % (self.dvdb_add_lr, self.qdamp, self.symv1scf), + # fontsize=fontsize) + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function generates a predefined list of matplotlib figures with minimal input from the user. + """ + title = r"$\langle v1_{\bf q} \rangle \,vs\, \langle v1_{\bfq}^{\mathrm{LR}} \rangle$" + yield self.plot(title=title, show=False) + yield self.plot(what_list="v1scfmlr_avg", title=r"$v1_{\bf q} - v1_{\bf q}^{\mathrm{LR}}$", show=False) + #yield self.plot(what_list=["v1scf_abs_avg", "v1lr_abs_avg"], title=r"ABS", show=False) + #yield self.plot(what_list="v1scfmlr_abs_avg", title=r"$|v1_{\bf q} - v1_{\bf q}^{\mathrm{LR}|}$", show=False) + + for gvec in [[0, 0, 0], [1, 0, 0], [0, 1, 1], [1, 1, 1], [2, 2, 2]]: + yield self.plot_gvec(gvec, show=False) + + if self.has_maxw: + if kwargs.get("verbose", 0) > 0: + yield self.plot_maxw(show=False) + yield self.plot_maxw_perts(show=False) + else: + print("Use verbose to print the decay of W(r,R)") + + def write_notebook(self, nbpath=None): + """ + Write a jupyter notebook to ``nbpath``. If nbpath is None, a temporary file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("ncfile = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(ncfile)"), + nbv.new_code_cell("ncfile.plot();"), + ]) + + if self.has_maxw: + nbv.new_code_cell("ncfile.plot_maxw();"), + nbv.new_code_cell("ncfile.plot_maxw_perts();"), + + return self._write_nb_nbpath(nb, nbpath) + + +class V1qAvgRobot(Robot): + """ + This robot analyzes the results contained in multiple V1qAvgFile.nc files. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: V1qAvgRobot + """ + EXT = "V1QAVG" + + # Absolute tolerance used to compare q-points. + atol = 1e-2 + + @lazy_property + def qpoints(self): + """List of q-points.""" + if len(self) == 1: return self.abifiles[0].qpoints + + if (any(len(ncfile.qpoints) != len(self.abifiles[0].qpoints) for ncfile in self.abifiles)): + raise RuntimeError("Assuming ncfiles with same number of q-points.\nFound %s" % ( + str([len(ncfile.qpoints) for ncfile in self.abifiles]))) + + for abifile in self.abifiles[1:]: + if np.any(np.abs(abifile.qpoints.frac_coords - self.abifiles[0].qpoints.frac_coords) > self.atol): + for q1, q2 in zip(self.abifiles[0].qpoints, abifile.qpoints): + print("q1:", q1, ", q2:", q2) + raise RuntimeError("Found different q-points with tolerance: %s!" % self.atol) + + return self.abifiles[0].qpoints + + @add_fig_kwargs + def plot(self, ispden=0, vname="v1scf_avg", sharey=False, fontsize=8, **kwargs): + """ + Plot + + Args: + ispden: Spin density component to plot. + sharey: True to share y-axes. + fontsize: fontsize for legends and titles + + Return: |matplotlib-Figure| + """ + # Caveat: No check is done on the consistency among structures. + ref_file = self.abifiles[0] + structure = ref_file.structure + + natom = len(structure) + nrows, ncols = natom, 3 + ax_mat, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=True, sharey=sharey, squeeze=False) + + xs = np.arange(len(self.qpoints)) + ticks, labels = ref_file.make_ticks_and_labels() + + data_file = {abilabel: abifile.reader.read_value(vname) for abilabel, abifile in self.items()} + style = dict(marker=".", markersize=2) + + for ip, ax in enumerate(ax_mat.ravel()): + idir = ip % 3 + iat = (ip - idir) // 3 + + for ifile, (abilabel, abifile) in enumerate(self.items()): + v1scf_avg = data_file[abilabel] + for reim in (0, 1): + style = _get_style(reim, vname) + label = "%s %s" % (style.pop("label"), abilabel) + style["linestyle"] = {0: "-", 1: "--", 2: "-.", 3: ":"}[ifile] + ax.plot(xs, v1scf_avg[:, iat, idir, ispden, reim], label=label if ip == 0 else None, **style) + + if ip == 0: + ax.legend(loc="best", fontsize=fontsize, shadow=True) + + ax.grid(True) + if iat == natom - 1: ax.set_xlabel("Q Wave Vector") + if idir == 0: ax.set_ylabel(r"(Hartree/Bohr)") + + site = ref_file.structure[iat] + s = "%s [%.3f, %.3f, %.3f]" % (site.specie.symbol, site.frac_coords[0], site.frac_coords[1], site.frac_coords[2]) + ax.set_title("idir: %d, iat: %d, %s" % (idir, iat, s), fontsize=fontsize) + + if ticks: + ax.set_xticks(ticks, minor=False) + ax.set_xticklabels(labels, fontdict=None, minor=False, size=kwargs.get("qlabel_size", "large")) + ax.set_xlim(ticks[0], ticks[-1]) + + return fig + + @add_fig_kwargs + def plot_maxw(self, ax=None, **kwargs): + """ + Plot + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: fontsize for legends and titles + + Return: |matplotlib-Figure| + """ + if any(not abifile.has_maxw for abifile in self.abifiles): return None + ax, fig, plt = get_ax_fig_plt(ax=ax) + for label, abifile in self.items(): + abifile.plot_maxw(ax=ax, label=label, with_title=False, show=False, **kwargs) + + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + """ + for vname in ("v1scf_avg", "v1scf_abs_avg"): + yield self.plot(vname=vname, title=vname, show=False) + + if all(abifile.has_maxw for abifile in self.abifiles): + yield self.plot_maxw(self, show=False, **kwargs) + + def write_notebook(self, nbpath=None): + """ + Write a jupyter notebook to `nbpath`. If nbpath is None, a temporary file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + args = [(l, f.filepath) for l, f in self.items()] + nb.cells.extend([ + #nbv.new_markdown_cell("# This is a markdown cell"), + nbv.new_code_cell("robot = abilab.V1qAvgRobot(*%s)\nrobot.trim_paths()\nrobot" % str(args)), + nbv.new_code_cell("robot.plot();"), + ]) + + return self._write_nb_nbpath(nb, nbpath) + + +#class V1qAvgPlotter(object): +# +# def __init__(self, v1q_dfpt_path, v1q_frohl_path, v1q_frohl_quad_path, v1q_froh_quad_efield_path): +# self.v1q_dfpt = V1qAvgFile.from_file(v1q_dfpt_path) +# #v1q_frohl = V1qAvgFile.from_file(v1q_frohl_path) if v1q_frohl_path is not None else None +# #v1q_frohl_quad_path = +# #v1q_frohl_quad_efield_path = +# +# #def close(self): +# # for k in ("v1q_frohl", "v1q_frohl_quad_path", "v1q_frohl_quad_efield_path"): +# # ncfile = getattr(self, k) +# # if ncfile is not None: ncfile.close() +# +# @add_fig_kwargs +# def plot(self, iatom, idir, ax=None, ispden=0, fontsize=6, **kwargs): +# +# ax, fig, plt = get_ax_fig_plt(ax=ax) +# +# return fig diff --git a/abipy/eph/v1qnu.py b/abipy/eph/v1qnu.py new file mode 100644 index 000000000..2243aa11a --- /dev/null +++ b/abipy/eph/v1qnu.py @@ -0,0 +1,168 @@ +# coding: utf-8 +""" +Object to plot DFPT potentials in the phonon mode representation. +""" +import numpy as np + +from collections import OrderedDict +from monty.string import marquee +from monty.functools import lazy_property +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter +from abipy.core.kpoints import KpointList, Kpoint +from abipy.tools import duck +from abipy.iotools import Visualizer, xsf, ETSF_Reader #, cube + + +class V1qnuFile(AbinitNcFile, Has_Structure, NotebookWriter): + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = r = ETSF_Reader(filepath) + # Read dimensions. + self.nfft = r.read_dimvalue("nfft") + self.nspden = r.read_dimvalue("nspden") + self.natom3 = len(self.structure) * 3 + # Read FFT grid. + self.ngfft = r.read_value("ngfft") + + @lazy_property + def structure(self): + """|Structure| object.""" + return self.reader.read_structure() + + def close(self): + self.reader.close() + + @lazy_property + def params(self): + """:class:`OrderedDict` with parameters that might be subject to convergence studies.""" + return {} + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + for iq, qpt in enumerate(self.qpoints): + app("[%d] %s" % (iq, repr(qpt))) + + return "\n".join(lines) + + @lazy_property + def qpoints(self): + return KpointList(self.structure.reciprocal_lattice, frac_coords=self.reader.read_value("qlist")) + + def _find_iqpt_qpoint(self, qpoint): + if duck.is_intlike(qpoint): + iq = qpoint + qpoint = self.qpoints[iq] + else: + qpoint = Kpoint.as_kpoint(qpoint, self.structure.reciprocal_lattice) + iq = self.qpoints.index(qpoint) + + return iq, qpoint + + def visualize_qpoint_nu(self, qpoint, nu, spin=0, appname="vesta"): + iq, qpoint = self._find_iqpt_qpoint(qpoint) + + # Fortran array nctkarr_t("v1_qnu", "dp", "two, nfft, nspden, natom3, nqlist")]) + v1_qnu = self.reader.read_variable("v1_qnu")[iq, nu, spin] + v1_qnu = v1_qnu[:, 0] + 1j * v1_qnu[:, 1] + #wqnu = self.reader.read_variable["phfreqs"][nu] + #v1_qnu /= np.sqrt(2 * wqnu) + datar = np.reshape(np.abs(v1_qnu), self.ngfft) + + visu = Visualizer.from_name(appname) + ext = "xsf" + if ext not in visu.supported_extensions(): + raise ValueError("Visualizer %s does not support XSF files" % visu) + from abipy.core.globals import abinb_mkstemp + _, filename = abinb_mkstemp(suffix="." + ext, text=True) + + with open(filename, mode="wt") as fh: + if ext == "xsf": + xsf.xsf_write_structure(fh, self.structure) + xsf.xsf_write_data(fh, self.structure, datar, add_replicas=True) + else: + raise NotImplementedError("extension %s is not supported." % ext) + + return visu(filename) + + @add_fig_kwargs + def plot_v1qnu_vs_lr(self, ax=None, fontsize=8, **kwargs): + """ + Plot the difference between the ab-initio v1_qnu and the potential obtained with Verdi's model + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: Label and title fontsize. + + Return: |matplotlib-Figure| + """ + # Fortran array nctkarr_t("v1_qnu", "dp", "two, nfft, nspden, natom3, nqlist")]) + v1_qnu = self.reader.read_value("v1_qnu", cmode="c") + v1lr_qnu = self.reader.read_value("v1lr_qnu", cmode="c") + + stats = OrderedDict([ + ("min", []), + ("max", []), + ("mean", []), + ("std", []), + ]) + + qnorms = [] + for iq, qpt in enumerate(self.qpoints): + qnorms.append(qpt.norm) + abs_diff = np.abs(v1_qnu[iq] - v1lr_qnu[iq]) + for key in stats.keys(): + stats[key].append(getattr(abs_diff, key)()) + + # Sort values by |q|. + qindex = np.arange(len(qnorms)) + items = sorted(list(zip(qnorms, qindex)), key=lambda t: t[0]) + qnorm = np.array([t[0] for t in items]) + qindex = np.array([t[1] for t in items]) + #print(qnorm, "\n", qindex) + for key in stats.keys(): + stats[key] = np.array(stats[key])[qindex] + + ax, fig, plt = get_ax_fig_plt(ax=ax) + for key, values in stats.items(): + ax.plot(values, label=key) + + ax.grid(True) + ax.set_xlabel(r"$|\bf{q}|$ 1/Ang") + #ax.set_ylabel(r"$|g_{\bf q}|$ (meV)") + ax.legend(loc="best", fontsize=fontsize, shadow=True) + #title = "band_kq: %s, band_k: %s, kpoint: %s" % (band_kq, band_k, repr(kpoint)) + #ax.set_title(title, fontsize=fontsize) + + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + """ + yield self.plot_v1qnu_vs_lr(show=False) + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("ncfile = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(ncfile)"), + nbv.new_code_cell("# ncfile.visualize_qpoint_nu(qpoint, nu, spin=0, appname='vesta'") + ]) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/eph/v1sym.py b/abipy/eph/v1sym.py new file mode 100644 index 000000000..c20da7b0f --- /dev/null +++ b/abipy/eph/v1sym.py @@ -0,0 +1,261 @@ +# coding: utf-8 +""" +Object to analyze the results stored in the V1SYM.nc file (mainly for debugging purposes) +""" +import numpy as np + +from collections import OrderedDict +from monty.string import marquee +from monty.functools import lazy_property +from abipy.tools.plotting import add_fig_kwargs, get_axarray_fig_plt +from abipy.core.mixins import AbinitNcFile, Has_Structure, NotebookWriter +from abipy.core.kpoints import KpointList, Kpoint +from abipy.iotools import ETSF_Reader +from abipy.tools import duck + + +class V1symFile(AbinitNcFile, Has_Structure, NotebookWriter): + + def __init__(self, filepath): + super().__init__(filepath) + self.reader = r = ETSF_Reader(filepath) + # Read dimensions. + self.nfft = r.read_dimvalue("nfft") + self.nspden = r.read_dimvalue("nspden") + self.natom3 = len(self.structure) * 3 + self.symv1scf = r.read_value("symv1scf") + # Read FFT mesh. + #self.ngfft = r.read_value("ngfft") + + @lazy_property + def structure(self): + """|Structure| object.""" + return self.reader.read_structure() + + @lazy_property + def pertsy_qpt(self): + """ + Determine the symmetrical perturbations. Meaning of pertsy: + + 0 for non-target perturbations. + 1 for basis perturbations. + -1 for perturbations that can be found from basis perturbations. + """ + # Fortran array: nctkarr_t("pertsy_qpt", "int", "three, mpert, nqpt"))) + return self.reader.read_value("pertsy_qpt") + + def close(self): + self.reader.close() + + @lazy_property + def params(self): + """:class:`OrderedDict` with parameters that might be subject to convergence studies.""" + return {} + + def __str__(self): + return self.to_string() + + def to_string(self, verbose=0): + """String representation.""" + lines = []; app = lines.append + app(marquee("File Info", mark="=")) + app(self.filestat(as_string=True)) + app("") + app(self.structure.to_string(verbose=verbose, title="Structure")) + app("") + app("symv1scf: %s" % self.symv1scf) + + return "\n".join(lines) + + @lazy_property + def qpoints(self): + return KpointList(self.structure.reciprocal_lattice, frac_coords=self.reader.read_value("qpts")) + + def _find_iqpt_qpoint(self, qpoint): + if duck.is_intlike(qpoint): + iq = qpoint + qpoint = self.qpoints[iq] + else: + qpoint = Kpoint.as_kpoint(qpoint, self.structure.reciprocal_lattice) + iq = self.qpoints.index(qpoint) + + return iq, qpoint + + def read_v1_at_iq(self, key, iq, reshape_nfft_nspden=False): + # Fortran array ("two, nfft, nspden, natom3, nqpt") + v1 = self.reader.read_variable(key)[iq] + v1 = v1[..., 0] + 1j * v1[..., 1] + # reshape (nspden, nfft) dims because we are not interested in the spin dependence. + if reshape_nfft_nspden: v1 = np.reshape(v1, (self.natom3, self.nspden * self.nfft)) + return v1 + + @add_fig_kwargs + def plot_diff_at_qpoint(self, qpoint=0, fontsize=8, **kwargs): + """ + Args: + qpoint: + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: fontsize for legends and titles + + Return: |matplotlib-Figure| + """ + iq, qpoint = self._find_iqpt_qpoint(qpoint) + + # complex arrays with shape: (natom3, nspden * nfft) + origin_v1 = self.read_v1_at_iq("origin_v1scf", iq, reshape_nfft_nspden=True) + symm_v1 = self.read_v1_at_iq("recons_v1scf", iq, reshape_nfft_nspden=True) + + num_plots, ncols, nrows = self.natom3, 3, self.natom3 // 3 + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + + for nu, ax in enumerate(ax_list.ravel()): + idir = nu % 3 + ipert = (nu - idir) // 3 + + # l1_rerr(f1, f2) = \int |f1 - f2| dr / (\int |f2| dr + abs_diff = np.abs(origin_v1[nu] - symm_v1[nu]) + l1_rerr = np.sum(abs_diff) / np.sum(np.abs(origin_v1[nu])) + + stats = OrderedDict([ + ("max", abs_diff.max()), + ("min", abs_diff.min()), + ("mean", abs_diff.mean()), + ("std", abs_diff.std()), + ("L1_rerr", l1_rerr), + ]) + + xs = np.arange(len(abs_diff)) + ax.hist(abs_diff, facecolor='g', alpha=0.75) + ax.grid(True) + ax.set_title("idir: %d, iat: %d, pertsy: %d" % (idir, ipert, self.pertsy_qpt[iq, ipert, idir]), + fontsize=fontsize) + + ax.axvline(stats["mean"], color='k', linestyle='dashed', linewidth=1) + _, max_ = ax.get_ylim() + ax.text(0.7, 0.7, "\n".join("%s = %.1E" % item for item in stats.items()), + fontsize=fontsize, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes) + + fig.suptitle("qpoint: %s" % repr(qpoint)) + return fig + + @add_fig_kwargs + def plot_pots_at_qpoint(self, qpoint=0, fontsize=8, **kwargs): + """ + Args: + qpoint: + ax: |matplotlib-Axes| or None if a new figure should be created. + fontsize: fontsize for legends and titles + + Return: |matplotlib-Figure| + """ + iq, qpoint = self._find_iqpt_qpoint(qpoint) + + # complex arrays with shape: (natom3, nspden * nfft) + origin_v1 = self.read_v1_at_iq("origin_v1scf", iq, reshape_nfft_nspden=True) + symm_v1 = self.read_v1_at_iq("recons_v1scf", iq, reshape_nfft_nspden=True) + + num_plots, ncols, nrows = self.natom3, 3, self.natom3 // 3 + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + + natom = len(self.structure) + xs = np.arange(self.nspden * self.nfft) + for nu, ax in enumerate(ax_list.ravel()): + idir = nu % 3 + ipert = (nu - idir) // 3 + + # l1_rerr(f1, f2) = \int |f1 - f2| dr / (\int |f2| dr + abs_diff = np.abs(origin_v1[nu] - symm_v1[nu]) + l1_rerr = np.sum(abs_diff) / np.sum(np.abs(origin_v1[nu])) + + stats = OrderedDict([ + ("max", abs_diff.max()), + ("min", abs_diff.min()), + ("mean", abs_diff.mean()), + ("std", abs_diff.std()), + ("L1_rerr", l1_rerr), + ]) + + ax.grid(True) + ax.set_title("idir: %d, iat: %d, pertsy: %d" % (idir, ipert, self.pertsy_qpt[iq, ipert, idir]), + fontsize=fontsize) + # Plot absolute error + #ax.plot(xs, abs_diff, linestyle="-", color="red", alpha=1.0, label="Abs diff" if nu == 0 else None) + + # Plot absolute values + #ax.plot(xs, np.abs(origin_v1[nu]), linestyle="--", color="red", alpha=0.4, label="Origin" if nu == 0 else None) + #ax.plot(xs, -np.abs(symm_v1[nu]), linestyle="--", color="blue", alpha=0.4, label="-Symm" if nu == 0 else None) + + # Plot real and imag + #ax.plot(xs, origin_v1[nu].real, linestyle="--", color="red", alpha=0.4, label="Re Origin" if nu == 0 else None) + #ax.plot(xs, -symm_v1[nu].real, linestyle="--", color="blue", alpha=0.4, label="Re Symm" if nu == 0 else None) + + data = np.angle(origin_v1[nu], deg=True) - np.angle(symm_v1[nu], deg=True) + #data = data[abs_diff > stats["mean"]] + data = data[np.abs(origin_v1[nu]) > 1e-5] + ax.plot(np.arange(len(data)), data, + linestyle="--", color="red", alpha=0.4, label="diff angle degrees" if nu == 0 else None) + + #ax.plot(xs, origin_v1[nu].real, linestyle="--", color="red", alpha=0.4, label="Re Origin" if nu == 0 else None) + #ax.plot(xs, -symm_v1[nu].real, linestyle="--", color="blue", alpha=0.4, label="Re Symm" if nu == 0 else None) + + #ax.plot(xs, origin_v1[nu].real - symm_v1[nu].real, linestyle="--", color="red", alpha=0.4, + # label="Re Origin" if nu == 0 else None) + + #ax.plot(xs, origin_v1[nu].imag, linestyle=":", color="red", alpha=0.4, label="Imag Origin" if nu == 0 else None) + #ax.plot(xs, -symm_v1[nu].imag, linestyle=":", color="blue", alpha=0.4, label="Imag Symm" if nu == 0 else None) + + #ax.plot(xs, origin_v1[nu].imag - symm_v1[nu].imag, linestyle="--", color="blue", alpha=0.4, + # label="Re Origin" if nu == 0 else None) + + if nu == 0: + ax.set_ylabel(r"Abs diff") + ax.legend(loc="best", fontsize=fontsize, shadow=True) + if ipert == natom - 1: + ax.set_xlabel(r"FFT index") + + #ax.axvline(stats["mean"], color='k', linestyle='dashed', linewidth=1) + _, max_ = ax.get_ylim() + ax.text(0.7, 0.7, "\n".join("%s = %.1E" % item for item in stats.items()), + fontsize=fontsize, horizontalalignment='center', verticalalignment='center', + transform=ax.transAxes) + + #ax2 = ax.twinx() + #rerr = 100 * abs_diff / np.abs(origin_v1[nu]) + #ax2.plot(xs, rerr, linestyle="--", color="blue", alpha=0.4, + # label=r"|V_{\mathrm{origin}}|" if nu == 0 else None) + + fig.suptitle("qpoint: %s" % repr(qpoint)) + return fig + + def yield_figs(self, **kwargs): # pragma: no cover + """ + This function *generates* a predefined list of matplotlib figures with minimal input from the user. + """ + maxnq = 3 + for iq, qpoint in enumerate(self.qpoints): + if iq > maxnq: + print("Only the first %d q-points are show..." % maxnq) + break + #yield self.plot_diff_at_qpoint(qpoint=iq, **kwargs, show=False) + yield self.plot_pots_at_qpoint(qpoint=iq, **kwargs, show=False) + + def write_notebook(self, nbpath=None): + """ + Write a jupyter_ notebook to ``nbpath``. If nbpath is None, a temporay file in the current + working directory is created. Return path to the notebook. + """ + nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) + + nb.cells.extend([ + nbv.new_code_cell("ncfile = abilab.abiopen('%s')" % self.filepath), + nbv.new_code_cell("print(ncfile)"), + ]) + + for iq, qpoint in enumerate(self.qpoints): + nb.cells.append(nbv.new_code_cell("ncfile.plot_diff_at_qpoint(qpoint=%d);" % iq)) + #nb.cells.append(nbv.new_code_cell("ncfile.plot_diff_at_qpoint(qpoint=%d);" % iq)) + + return self._write_nb_nbpath(nb, nbpath) diff --git a/abipy/examples/_make_readme.py b/abipy/examples/_make_readme.py index 358790459..924b39f81 100755 --- a/abipy/examples/_make_readme.py +++ b/abipy/examples/_make_readme.py @@ -2,8 +2,6 @@ """ This script extracts the docstrings from the run_*.py scripts located in this directory. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os diff --git a/abipy/examples/_runflows.py b/abipy/examples/_runflows.py index 5255fbf99..a7863348f 100755 --- a/abipy/examples/_runflows.py +++ b/abipy/examples/_runflows.py @@ -1,19 +1,16 @@ #!/usr/bin/env python """ -This script runs all the python scripts located in this directory +This script runs all the python scripts located in this directory """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys -import os +import os import argparse import shutil import tempfile -from subprocess import call, Popen +from subprocess import call from abipy import __version__ - -#root = os.path.abspath(os.path.join(os.path.dirname(__file__)), "flows") +from abipy import flowtk def main(): @@ -27,7 +24,7 @@ def str_examples(): def show_examples_and_exit(err_msg=None, error_code=1): """Display the usage of the script.""" sys.stderr.write(str_examples()) - if err_msg: + if err_msg: sys.stderr.write("Fatal Error\n" + err_msg + "\n") sys.exit(error_code) @@ -52,7 +49,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): options = parser.parse_args() - # loglevel is bound to the string value obtained from the command line argument. + # loglevel is bound to the string value obtained from the command line argument. # Convert to upper case to allow the user to specify --loglevel=DEBUG or --loglevel=debug import logging numeric_level = getattr(logging, options.loglevel.upper(), None) @@ -83,11 +80,11 @@ def show_examples_and_exit(err_msg=None, error_code=1): ret = call(["python", script, "--workdir", workdir]) retcode += ret - if ret != 0: + if ret != 0: e = "python %s returned retcode !=0" % script print(e) errors.append(e) - if options.bail_on_failure: + if options.bail_on_failure: print("Exiting now since bail_on_failure") break @@ -98,7 +95,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): cnt += 1 ret = 0 try: - flow = Flow.pickle_load(workdir) + flow = flowtk.Flow.pickle_load(workdir) flow.make_scheduler().start() if not flow.all_ok: retcode += 1 @@ -107,7 +104,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): s = "Exception raised during flow execution: %s\n:%s" % (flow, exc) print(s) errors.append(s) - if options.bail_on_failure: + if options.bail_on_failure: print("Exiting now since bail_on_failure") break retcode += ret diff --git a/abipy/examples/_runplots.py b/abipy/examples/_runplots.py index 1214216f2..9ae84c332 100755 --- a/abipy/examples/_runplots.py +++ b/abipy/examples/_runplots.py @@ -6,15 +6,12 @@ Usage: _runplots.py [backend] """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import time import argparse from subprocess import call, Popen -#from abipy.core.testing import change_matplotlib_backend, revert_matplotlib_backend def str_examples(): diff --git a/abipy/examples/flows/README.md b/abipy/examples/flows/README.md index 11c44cd7d..2d48d9e5f 100644 --- a/abipy/examples/flows/README.md +++ b/abipy/examples/flows/README.md @@ -89,15 +89,15 @@ ``run_relax``: This script shows how to perform a structural relaxation in two steps: - + 1) Relaxation of atomic positions with unit cell parameters fixed. - + 2) Full relaxation (atoms + cell) with the initial configuration read from step 1) ``run_relax_and_ebands``: This script shows how to perform a structural relaxation and a band structure calculation - + WARNING: The API could change! ``run_si_ebands``: diff --git a/abipy/examples/flows/README.txt b/abipy/examples/flows/README.txt index 04c75ef92..15f171463 100644 --- a/abipy/examples/flows/README.txt +++ b/abipy/examples/flows/README.txt @@ -5,13 +5,21 @@ Flow Gallery This gallery contains python scripts to generate AbiPy flows from the command line. -Run the scripts to generate the directory with the flow and then use :ref:`abirun.py` to execute the flow. -Alternatively, one can use the ``-s`` option to generate the flow and run it immediately with the scheduler. -Use ``--help`` to further information on the available options. +Run the scripts to generate the directory with the flow, then use the :ref:`abirun.py` script to execute the flow. +Alternatively, one can use the ``-s`` option to generate the flow and run it immediately with the scheduler. +Use ``--help`` for further information on the available options. + +Note that the figures can only show the initial configuration of the Flow. +Additional Works generated at runtime won't be displayed. +To visualize the entire Flow, you need to run the script and then use:: + + abirun.py FLOWDIR graphviz + +where `FLOWDIR` is the directory of the Flow. .. warning:: - The following examples show how to use python and the AbiPy API to generate and run - Abinit calculations in a semi-automatic way. - These examples are not supposed to produce physically meaningful results + The following examples show how to use python and the AbiPy API to generate and run + Abinit calculations in a semi-automatic way. + These examples are not supposed to produce physically meaningful results as input parameters are usually underconverged. diff --git a/abipy/examples/flows/develop/run_gruneisen_phonopy_si.py b/abipy/examples/flows/develop/run_gruneisen_phonopy_si.py index da584e97e..e82ab0594 100755 --- a/abipy/examples/flows/develop/run_gruneisen_phonopy_si.py +++ b/abipy/examples/flows/develop/run_gruneisen_phonopy_si.py @@ -22,6 +22,7 @@ def build_flow(options): """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: + __file__ = os.path.join(os.getcwd(), "run_gruneisen_phonopy_si.py") options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") # Initialize structure and pseudos @@ -47,11 +48,11 @@ def build_flow(options): # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/develop/run_optic_old.py b/abipy/examples/flows/develop/run_optic_old.py index 3c9dd2c20..d76ef2fe2 100755 --- a/abipy/examples/flows/develop/run_optic_old.py +++ b/abipy/examples/flows/develop/run_optic_old.py @@ -130,7 +130,7 @@ def optic_flow_from_files(): # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) diff --git a/abipy/examples/flows/develop/run_qha.py b/abipy/examples/flows/develop/run_qha.py index 53e175982..e6ae022c8 100755 --- a/abipy/examples/flows/develop/run_qha.py +++ b/abipy/examples/flows/develop/run_qha.py @@ -5,14 +5,12 @@ Warning: This code is still under development. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.abilab as abilab import abipy.data as abidata -from abipy import flowtk +from abipy import flowtk from abipy.flowtk.qha import QhaFlow @@ -22,6 +20,7 @@ def build_flow(options): """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: + __file__ = os.path.join(os.getcwd(), "run_qha.py") options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") # Initialize structure and pseudos @@ -29,21 +28,23 @@ def build_flow(options): pseudos = abidata.pseudos("14si.pspnc") # Build input for GS calculation. - gsinp = abilab.AbinitInput(structure, pseudos) - gsinp.set_vars(ecut=4, nband=4, toldff=1.e-6) - gsinp.set_autokmesh(nksmall=2) + scf_input = abilab.AbinitInput(structure, pseudos) + scf_input.set_vars(ecut=12, nband=8, tolvrs=1e-8) + scf_input.set_kmesh(ngkpt=[4, 4, 4], shiftk=[0, 0, 0]) - volumes = [gsinp.structure.volume] - return QhaFlow.from_gsinp(options.workdir, gsinp, volumes, ngqpt=[2,2,2]) + v0 = scf_input.structure.volume + volumes = [0.08 * v0, v0, v0 * 1.02] + return QhaFlow.from_scf_input(options.workdir, scf_input, volumes, + ngqpt=[2, 2, 2], with_becs=False, edos_ngkpt=(4, 4, 4)) # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/develop/run_qptdmscr.py b/abipy/examples/flows/develop/run_qptdmscr.py index 8bc3fa82d..e0189f4d5 100755 --- a/abipy/examples/flows/develop/run_qptdmscr.py +++ b/abipy/examples/flows/develop/run_qptdmscr.py @@ -68,7 +68,6 @@ def all_inputs(paral_kgb=1): # Dataset3: Calculation of the screening. scr.set_kmesh(**gw_kmesh) - scr.set_vars( optdriver=3, nband=6, @@ -80,7 +79,6 @@ def all_inputs(paral_kgb=1): # Dataset4: Calculation of the Self-Energy matrix elements (GW corrections) sigma.set_kmesh(**gw_kmesh) - sigma.set_vars( optdriver=4, nband=8, @@ -100,7 +98,6 @@ def all_inputs(paral_kgb=1): ] bdgw = [1, 8] - sigma.set_kptgw(kptgw, bdgw) return multi.split_datasets() @@ -114,6 +111,7 @@ def build_flow(options): """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: + __file__ = os.path.join(os.getcwd(), "run_qptdmscr.py") options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") # Build the input files for GS, NSCF, SCR and SIGMA runs. @@ -126,11 +124,11 @@ def build_flow(options): # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None - #import tempfile - #options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - #build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/develop/run_wyckoff.py b/abipy/examples/flows/develop/run_wyckoff.py index c68d4c018..56996d3cb 100755 --- a/abipy/examples/flows/develop/run_wyckoff.py +++ b/abipy/examples/flows/develop/run_wyckoff.py @@ -90,7 +90,7 @@ def make_workflow(structure, pseudos, paral_kgb=1): # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) diff --git a/abipy/examples/flows/run_becs_and_epsilon_vs_kpts.py b/abipy/examples/flows/run_becs_and_epsilon_vs_kpts.py new file mode 100755 index 000000000..012a2aeb6 --- /dev/null +++ b/abipy/examples/flows/run_becs_and_epsilon_vs_kpts.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +r""" +Flow for Born effective charges and dielectric tensors with DFPT +================================================================ + +This example shows how to compute the Born effective charges and +the dielectric tensors (e0, einf) of AlAs with AbiPy flows. +We perform multiple calculations by varying the number of k-points +to analyze the convergence of the results wrt nkpt +""" +import sys +import os +import abipy.abilab as abilab +import abipy.data as abidata + +from abipy import flowtk + + +def make_scf_input(ngkpt, paral_kgb=0): + """ + This function constructs the input file for the GS calculation for a given IBZ sampling. + """ + # Crystalline AlAs: computation of the second derivative of the total energy + structure = abidata.structure_from_ucell("AlAs") + pseudos = abidata.pseudos("13al.981214.fhi", "33as.pspnc") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + gs_inp.set_vars( + nband=4, + ecut=2.0, + ngkpt=ngkpt, + nshiftk=4, + shiftk=[0.0, 0.0, 0.5, # This gives the usual fcc Monkhorst-Pack grid + 0.0, 0.5, 0.0, + 0.5, 0.0, 0.0, + 0.5, 0.5, 0.5], + #shiftk=[0, 0, 0], + paral_kgb=paral_kgb, + tolvrs=1.0e-10, + ixc=1, + diemac=9.0, + #iomode=3, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for phonon calculations. The flow has two works. + + The first work contains a single GS task that produces the WFK file used in DFPT + Then we have multiple Works that are generated automatically + in order to compute the dynamical matrix on a [4, 4, 4] mesh. + Symmetries are taken into account: only q-points in the IBZ are generated and + for each q-point only the independent atomic perturbations are computed. + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + flow = flowtk.Flow(workdir=options.workdir) + + for ngkpt in [(2, 2, 2), (4, 4, 4), (8, 8, 8)]: + # Build input for GS calculation + scf_input = make_scf_input(ngkpt=ngkpt) + flow.register_scf_task(scf_input, append=True) + + for scf_task in flow[0]: + bec_work = flowtk.BecWork.from_scf_task(scf_task) + flow.register_work(bec_work) + + return flow + + +# This block generates the thumbnails in the AbiPy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_becs_and_epsilon_vs_kpts.py -s +# +# Use: +# +# abirun.py flow_becs_and_epsilon_vs_kpts/ listext DDB +# +# to list all the DDB files produced by the flow. +# +# Now use abicomp.py to create a DdbRobot to analyze the DDB files produced by the 3 Works: +# +# abicomp.py ddb flow_becs_and_epsilon_vs_kpts/w*/outdata/out_DDB +# +# the inside the ipython terminal use the anacompare methods to analyze the results. e.g. +# +# .. code-block:: ipython +# +# In [1]: r = robot.anacompare_epsinf() +# In [2]: r.df +# Out[2]: +# xx yy zz yz xz xy formula chneut \ +# 0 13.584082 13.584082 13.584082 0.0 0.0 0.0 Al1 As1 1 +# 0 9.268425 9.268425 9.268425 0.0 0.0 0.0 Al1 As1 1 +# 0 8.873178 8.873178 8.873178 0.0 0.0 0.0 Al1 As1 1 +# diff --git a/abipy/examples/flows/run_effmass_dfpt.py b/abipy/examples/flows/run_effmass_dfpt.py new file mode 100755 index 000000000..b0cfe241e --- /dev/null +++ b/abipy/examples/flows/run_effmass_dfpt.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python +r""" +Effective masses with DFPT +========================== + +Flow to compute effective masses with DFPT. +Two options are available: + + - EffMassDFPTWork --> Run DFPT calculation directly assuming the location of the band edges is already known. + - EffMassAutoDFPTWork --> Run NSCF calculation to find band edges, then use DFPT. +""" + +import sys +import os +import abipy.data as abidata +import abipy.abilab as abilab +import abipy.flowtk as flowtk + + +def make_scf_input(usepaw=0, nspinor=1): + """Returns input for GS-SCF calculation.""" + if nspinor == 1: + pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") + else: + pseudos = abidata.pseudos("Si_r.psp8") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") + + # https://docs.abinit.org/tests/v7/Input/t82.in + structure = dict( + ntypat=1, + natom=2, + typat=[1, 1], + znucl=14, + #acell=3 * [10.26310667319252], + acell=3 * [10.2073557], # 5.4015 Ang + rprim=[[0.0, 0.5, 0.5], + [0.5, 0.0, 0.5], + [0.5, 0.5, 0.0]], + xred=[[0.0 , 0.0 , 0.0], + [0.25, 0.25, 0.25]], + ) + + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + + # Global variables + nband = 8 if nspinor == 1 else 16 + scf_input.set_vars( + ecut=8, + nband=nband, + nspinor=nspinor, + nstep=100, + tolvrs=1e-8, + ) + + if scf_input.ispaw: + scf_input.set_vars(pawecutdg=2 * scf_input["ecut"]) + + # Set k-mesh + scf_input.set_kmesh(ngkpt=[8, 8, 8], shiftk=[0, 0, 0]) + + return scf_input + + +def build_flow(options): + # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Get the SCF input (without SOC) + scf_input = make_scf_input(nspinor=1, usepaw=1) + + # Build the flow. + from abipy.flowtk.effmass_works import EffMassDFPTWork, EffMassAutoDFPTWork + flow = flowtk.Flow(workdir=options.workdir, manager=options.manager) + + # Compute effective masses for each k in k0_list. + # effmass_bands_f90 defines the band range for each k in k0_list + # Here we are interested in the effective masses at the Gamma point for the valence bands + effmass_bands_f90 = [1, 4] if scf_input["nspinor"] == 1 else [1, 8] + work = EffMassDFPTWork.from_scf_input(scf_input, k0_list=(0, 0, 0), effmass_bands_f90=effmass_bands_f90) + flow.register_work(work) + + # or use this Work to detect band edges automatically but increase ndivsm and decrease tolwfr! + work = EffMassAutoDFPTWork.from_scf_input(scf_input, ndivsm=5, tolwfr=1e-12) + flow.register_work(work) + + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_effmass_dfpt -s +# diff --git a/abipy/examples/flows/run_effmass_finitediff.py b/abipy/examples/flows/run_effmass_finitediff.py new file mode 100755 index 000000000..ec4b6a962 --- /dev/null +++ b/abipy/examples/flows/run_effmass_finitediff.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python +r""" +Effective masses with finite difference +======================================= + +Flow to compute effective masses with finite difference method. +Derivatives are computed along lines in k-space. +""" + +import sys +import os +import abipy.data as abidata +import abipy.abilab as abilab +import abipy.flowtk as flowtk + + +def make_scf_input(nspinor=1, usepaw=0): + """Returns GS input file for Silicon""" + if nspinor == 1: + pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") + else: + pseudos = abidata.pseudos("Si_r.psp8") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") + + structure = dict( + ntypat=1, + natom=2, + typat=[1, 1], + znucl=14, + #acell=3 * [10.26310667319252], # https://docs.abinit.org/tests/v7/Input/t82.in + acell=3 * [10.2073557], # 5.4015 Ang + rprim=[[0.0, 0.5, 0.5], + [0.5, 0.0, 0.5], + [0.5, 0.5, 0.0]], + xred=[ [0.0 , 0.0 , 0.0], + [0.25, 0.25, 0.25]], + ) + + # Build input + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + + # Set variables + scf_input.set_vars( + ecut=12, + nband=8 if nspinor == 1 else 16, + nspinor=nspinor, + tolvrs=1e-8, + ) + + if scf_input.ispaw: + scf_input.set_vars(pawecutdg=2 * scf_input["ecut"]) + + scf_input.set_kmesh(ngkpt=[8, 8, 8], shiftk=[0, 0, 0]) + + return scf_input + + +def build_flow(options): + # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Get the SCF input (here NC with SOC) + scf_input = make_scf_input(nspinor=2, usepaw=0) + + # Build the flow with different steps. + from abipy.flowtk.effmass_works import EffMassLineWork + flow = flowtk.Flow(workdir=options.workdir, manager=options.manager) + + # Multiple calculations with different step for finite difference. + for i, step in enumerate((0.01, 0.005)): + if i == 0: den_node = None + work = EffMassLineWork.from_scf_input(scf_input, k0_list=(0, 0, 0), + step=step, npts=10, + red_dirs=[[1, 0, 0], [1, 1, 0]], + cart_dirs=[[1, 0, 0], [1, 1, 1], [1, 1, 0]], + den_node=den_node) + # Will start from the DEN file produced in the first iteration. + if i == 0: den_node = work[0] + flow.register_work(work) + + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_effmass_finitediff -s diff --git a/abipy/examples/flows/run_elastic.py b/abipy/examples/flows/run_elastic.py new file mode 100755 index 000000000..ace29aaff --- /dev/null +++ b/abipy/examples/flows/run_elastic.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python +r""" +Flow for elastic constants and piezoelectric tensor with DFPT +============================================================= + +This example shows how to use AbiPy to calculate physical properties +related to strain for an insulator. + + - the rigid-atom elastic tensor + - the rigid-atom piezoelectric tensor (insulators only) + - the internal strain tensor + - the atomic relaxation corrections to the elastic and piezoelectric tensor + +Here we follow the discussion presented in +in the `the official tutorial `_ + +The DDB file with all the perturbations will be produced automatically at the end of the run +and saved in ``flow_elastic/w0/outdata/out_DDB``. +""" +import sys +import os +import numpy as np +import abipy.abilab as abilab +import abipy.data as abidata + +from abipy import flowtk + + +def make_scf_input(paral_kgb=0): + """ + This function constructs the input file for the GS calculation of + AlAs in hypothetical wurzite (hexagonal) structure. + In principle, the stucture should be relaxed before starting the calculation + """ + + # Initialize structure. Use enough significant digits + # so that Abinit will recognize the correct spacegroup + # (Hexagonal and rhombohedral lattices are a bit problematic). + structure = abilab.Structure.from_abivars( + acell=[7.5389648144E+00, 7.5389648144E+00, 1.2277795374E+01], + natom=4, + ntypat=2, + rprim=[np.sqrt(0.75), 0.5, 0.0, + -np.sqrt(0.75), 0.5, 0.0, + 0.0, 0.0, 1.0], + typat=[1, 1, 2, 2], + xred=[1/3, 2/3, 0, + 2/3, 1/3, 1/2, + 1/3, 2/3, 3.7608588373E-01, + 2/3, 1/3, 8.7608588373E-01], + znucl=[13, 33], + ) + + pseudos = abidata.pseudos("13al.pspnc", "33as.pspnc") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + # Set other important variables (consistent with tutorial) + # Aall the other DFPT runs will inherit these parameters. + gs_inp.set_vars( + nband=8, + ecut=6.0, + ecutsm=0.5, # Important when performing structural optimization + # with variable cell. All DFPT calculations should use + # the same value to be consistent. + ngkpt=[4, 4, 4], + nshiftk=1, + shiftk=[0.0, 0.0, 0.5], # This choice preserves the hexagonal symmetry of the grid. + diemac=9.0, + nstep=40, + paral_kgb=paral_kgb, + tolvrs=1.0e-18, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for phonon calculations. The flow has one work with: + + - 1 GS Task + - 3 DDK Task + - 4 Phonon Tasks (Gamma point) + - 6 Elastic tasks (3 uniaxial + 3 shear strain) + + The Phonon tasks and the elastic task will read the DDK produced at the beginning + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + flow = flowtk.Flow(workdir=options.workdir) + + # Build input for GS calculation and register the first work. + scf_input = make_scf_input() + + elast_work = flowtk.ElasticWork.from_scf_input(scf_input, with_relaxed_ion=True, with_piezo=True) + + flow.register_work(elast_work) + + return flow + + +# This block generates the thumbnails in the AbiPy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_elastic.py -s +# +# then use: +# +# abirun.py flow_elastic deps +# +# to get the list of dependencies in the flow. +# Note, in particular, how the ``ElasticTasks`` depend on 3 DdkTasks and the initial ScfTask +# +# .. code-block:: bash +# +# +# +-- +# +-- +# | +-- +# +-- +# | +-- +# +-- +# +-- +# +# Use: +# +# abiopen.py flow_elastic/w0/outdata/out_DDB -p +# +# to print information about the DDB file. You should see that the DDB file contains: +# +# .. code-block:: bash +# +# Has (at least one) atomic pertubation: True +# Has (at least one) electric-field perturbation: True +# Has (at least one) Born effective charge: True +# Has (all) strain terms: True +# Has (all) internal strain terms: True +# Has (all) piezoelectric terms: True +# +# Now open the final DDB file with: +# +# abiopen.py flow_elastic/w0/outdata/out_DDB +# +# and invoke anaddb to compute the elastic and piezoelectric properties +# +# .. code-block:: ipython +# +# In [1]: edata = abifile.anaget_elastic() +# In [2]: print(edata) diff --git a/abipy/examples/flows/run_eos.py b/abipy/examples/flows/run_eos.py index ccf00ba03..4ad905f7a 100755 --- a/abipy/examples/flows/run_eos.py +++ b/abipy/examples/flows/run_eos.py @@ -5,21 +5,17 @@ Flow to compute the equation of state by fitting E(V) at T = 0. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import os import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk -exclude_py_versions = ["2.7"] - def build_flow(options): # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Build GS input file. pseudos = abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") @@ -53,13 +49,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/develop/run_eph_al.py b/abipy/examples/flows/run_eph_al.py similarity index 81% rename from abipy/examples/flows/develop/run_eph_al.py rename to abipy/examples/flows/run_eph_al.py index 67f2e45d2..dcfd16684 100755 --- a/abipy/examples/flows/develop/run_eph_al.py +++ b/abipy/examples/flows/run_eph_al.py @@ -5,8 +5,6 @@ This flow computes the phonon linewidths and the Eliashberg function in Al. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -17,7 +15,7 @@ def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Preparatory run for E-PH calculations. # The sequence of datasets makes the ground states and @@ -43,20 +41,17 @@ def build_flow(options): gs_inp = abilab.AbinitInput(structure, pseudos) gs_inp.set_vars( - istwfk="*1", ecut=8.0, nband=5, occopt=7, # include metallic occupation function with a small smearing tsmear=0.04, tolvrs=1e-7, - #timeopt=-1, ) # The kpoint grid is minimalistic to keep the calculation manageable. gs_inp.set_kmesh( ngkpt=[8, 8, 8], shiftk=[0.0, 0.0, 0.0], - #kptopt=3, ) # Phonon calculation with 4x4x4 @@ -76,10 +71,10 @@ def build_flow(options): # Build input file for E-PH run. eph_inp = gs_inp.new_with_vars( optdriver=7, - ddb_ngqpt=ddb_ngqpt, # q-mesh used to produce the DDB file (must be consistent with DDB data) - eph_intmeth=2, # Tetra method - eph_fsewin="0.8 eV", # Energy window around Ef - eph_mustar=0.12, # mustar parameter + ddb_ngqpt=ddb_ngqpt, # q-mesh used to produce the DDB file (must be consistent with DDB data) + eph_intmeth=2, # Tetra method + eph_fsewin="0.8 eV", # Energy window around Ef + eph_mustar=0.12, # mustar parameter eph_ngqpt_fine=eph_ngqpt_fine, # Interpolate DFPT potentials if != ddb_ngqpt ) @@ -96,13 +91,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_eph_pot.py b/abipy/examples/flows/run_eph_pot.py new file mode 100755 index 000000000..9af65cdde --- /dev/null +++ b/abipy/examples/flows/run_eph_pot.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python +r""" +Flow to compute e-ph scattering potentials +========================================== + +This example shows how to compute e-ph scattering potentials +along a q-path, merge the POT files in the DVDB file and use the +DVDB and the DDB file to analyze the average over the unit cell of the +periodic part as a function of q +""" +import sys +import os +import abipy.abilab as abilab +import abipy.data as abidata + +from abipy import flowtk + + +def make_scf_input(ngkpt): + """ + This function constructs the input file for the GS calculation: + """ + structure = dict( + angdeg=3*[60.0], + acell=3*[7.1992351952], + natom=2, + ntypat=2, + typat=[1, 2], + znucl=[31, 15], + xred=[ + 0.0000000000, 0.0000000000, 0.0000000000, + 0.2500000000, 0.2500000000, 0.2500000000, + ]) + + pseudos = abidata.pseudos("Ga.oncvpsp", "P.psp8") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + gs_inp.set_vars( + nband=8, + ecut=20.0, # Too low + ngkpt=ngkpt, + nshiftk=1, + shiftk=[0, 0, 0], + tolvrs=1.0e-8, + nstep=150, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for phonon calculations. The flow has two works. + + The first work contains a single GS task that produces the WFK file used in DFPT + Then we have multiple Works that are generated automatically + in order to compute the dynamical matrix on a [2, 2, 2] mesh. + Symmetries are taken into account: only q-points in the IBZ are generated and + for each q-point only the independent atomic perturbations are computed. + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Use 2x2x2 both for k-mesh and q-mesh + # Build input for GS calculation + scf_input = make_scf_input(ngkpt=(2, 2, 2)) + + # Create flow to compute all the independent atomic perturbations + # corresponding to a [4, 4, 4] q-mesh. + # Electric field and Born effective charges are also computed. + from abipy.flowtk.eph_flows import EphPotFlow + ngqpt = (2, 2, 2) + + qpath_list = [ + +0.10000, +0.10000, +0.10000, # L -> G + +0.00000, +0.00000, +0.00000, # $\Gamma$ + +0.10000, +0.00000, +0.10000, # G -> X + + #+0.50000, +0.50000, +0.50000, # L + #+0.00000, +0.00000, +0.00000, # $\Gamma$ + #+0.50000, +0.00000, +0.50000, # X + #+0.50000, +0.25000, +0.75000, # W + #+0.37500, +0.37500, +0.75000, # K + #+0.00000, +0.00000, +0.00000, # $\Gamma$ + #+0.50000, +0.25000, +0.75000, # W + #+0.62500 +0.25000 +0.62500 # U + #+0.50000 +0.25000 +0.75000 # W + #+0.50000 +0.50000 +0.50000 # L + #+0.37500 +0.37500 +0.75000 # K + #+0.62500 +0.25000 +0.62500 # U + #+0.50000 +0.00000 +0.50000 # X + ] + + # Use small ndivsm to reduce computing time. + flow = EphPotFlow.from_scf_input(options.workdir, scf_input, + ngqpt, qpath_list, ndivsm=2, ddk_tolerance={"tolwfr": 1e-12}, + with_becs=True) + + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/abipy/examples/flows/run_fe_ebands.py b/abipy/examples/flows/run_fe_ebands.py index 4cdb47d17..08348bcf7 100755 --- a/abipy/examples/flows/run_fe_ebands.py +++ b/abipy/examples/flows/run_fe_ebands.py @@ -6,8 +6,6 @@ Calculation of the band structure of Fe with and without magnetization. See also <~abinit/tutorial/Input/tspin_1.in> """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import sys import abipy.data as data @@ -54,7 +52,7 @@ def make_scf_nscf_inputs(nsppol, paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Create the Flow. flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -68,13 +66,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_frohlich_zpr.py b/abipy/examples/flows/run_frohlich_zpr.py new file mode 100755 index 000000000..ffd94d9ce --- /dev/null +++ b/abipy/examples/flows/run_frohlich_zpr.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python +r""" +Estimate the ZPR at band edges with the generalized Frohlich model +================================================================== + +Flow to estimate the zero-point renormalization at the band edges +using the generalized Frohlich model. The flow uses DFPT to compute +the effective masses at the band edges (automatically detected by performing a NSCF run with a k-path), +BECS, eps_inf and phonon frequencies at Gamma +""" + +import sys +import os +import abipy.data as abidata +import abipy.abilab as abilab +import abipy.flowtk as flowtk + + +def make_scf_input(usepaw=0): + """Returns the GS input file""" + # Here we use parameters similar to https://docs.abinit.org/tests/v8/Input/t57.in + pseudos = abidata.pseudos("Ca.psp8", "O.psp8") + + structure = dict( + acell=3 * [9.136], + xred=[ + 0.0000000000, 0.0000000000, 0.0000000000, + 0.5000000000, 0.5000000000, 0.5000000000], + rprim=[ + 0 , 0.5, 0.5, + 0.5, 0 , 0.5, + 0.5, 0.5, 0], + typat=[1, 2], + natom=2, + ntypat=2, + znucl=[20, 8], + ) + + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + + scf_input.set_vars( + nband=12, + nbdbuf=2, + diemac=6, + ecut=30, # Underconverged ecut. + #ecut=15, + nstep=100, + tolvrs=1e-16, + kptrlatt=[-2, 2, 2, # In cartesian coordinates, this grid is simple cubic + 2, -2, 2, + 2, 2, -2], + ) + + return scf_input + + +def build_flow(options): + # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Build the SCF input. + scf_input = make_scf_input() + + # Build the flow. + from abipy.flowtk.effmass_works import FrohlichZPRFlow + flow = FrohlichZPRFlow.from_scf_input(options.workdir, scf_input, ndivsm=4, tolwfr=1e-16, + manager=options.manager) + + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_frohlich_zpr -s +# diff --git a/abipy/examples/flows/run_frohlich_zpr_from_ddb.py b/abipy/examples/flows/run_frohlich_zpr_from_ddb.py new file mode 100755 index 000000000..c024cdbfd --- /dev/null +++ b/abipy/examples/flows/run_frohlich_zpr_from_ddb.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python +r""" +Estimate the ZPR of band edges with generalized Frohlich mode +============================================================= + +Flow to estimate the zero-point renormalization at the band edges +using the generalized Frohlich model. The flow uses DFPT to compute +the effective masses at the band edges (automatically detected by performing a NSCF run with a k-path), +and uses an external DDB file providing BECS, eps_inf and phonon frequencies at Gamma. +""" + +import sys +import os +import abipy.data as abidata +import abipy.abilab as abilab +import abipy.flowtk as flowtk + + +def build_flow(options): + + # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Get structure from DDB file. + ddb_path = abidata.ref_file("refs/mgo_v8t57/mgo_zpr_t57o_DS3_DDB") + with abilab.abiopen(ddb_path) as ddb: + structure = ddb.structure + + # Build SCF input using structure from DDB file. + pseudos = abidata.pseudos("Ca.psp8", "O.psp8") + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + + # Set other input variables. These quantities are system-depedent. + # Here we use parameters similar to https://docs.abinit.org/tests/v8/Input/t57.in + scf_input.set_vars( + nband=12, + nbdbuf=2, + diemac=6, + ecut=30, # Underconverged ecut. + #ecut=15, + nstep=100, + tolvrs=1e-16, + kptrlatt=[-2, 2, 2, # In cartesian coordinates, this grid is simple cubic + 2, -2, 2, + 2, 2, -2], + ) + + # Build the flow to detect band edges, compute effective masses and finally obtain an estimate for the ZPR + # BECS/phonons/eps_inf are taken from ddb_node. + from abipy.flowtk.effmass_works import FrohlichZPRFlow + flow = FrohlichZPRFlow.from_scf_input(options.workdir, scf_input, ddb_node=ddb_path, ndivsm=2, tolwfr=1e-14, + manager=options.manager) + return flow + + +# This block generates the thumbnails in the Abipy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_frohlich_zpr_from_ddb.py -s +# diff --git a/abipy/examples/flows/run_from_files.py b/abipy/examples/flows/run_from_files.py index 16db2b2af..088d73d7a 100755 --- a/abipy/examples/flows/run_from_files.py +++ b/abipy/examples/flows/run_from_files.py @@ -6,8 +6,6 @@ This example shows how to build a flow for Nscf calculations in which the dependency is given by an external density file. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -57,7 +55,7 @@ def make_scf_nscf_inputs(paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Get the SCF and the NSCF input. scf_input, nscf_input = make_scf_nscf_inputs() @@ -77,13 +75,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_gaas_ebands_soc.py b/abipy/examples/flows/run_gaas_ebands_soc.py index cc8e4a3e9..9f5a5ef98 100755 --- a/abipy/examples/flows/run_gaas_ebands_soc.py +++ b/abipy/examples/flows/run_gaas_ebands_soc.py @@ -12,8 +12,6 @@ We use relativistic NC pseudos made of two terms: scalar pseudo + SOC term. The SOC term can be deactivated with the input variable `so_psp`. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -24,7 +22,7 @@ def build_flow(options): # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") structure = abidata.structure_from_ucell("GaAs") pseudos = abidata.pseudos("Ga-low_r.psp8", "As_r.psp8") @@ -33,7 +31,7 @@ def build_flow(options): # Usa same shifts in all tasks. ngkpt = [4, 4, 4] - shiftk= [ + shiftk = [ [0.5, 0.5, 0.5], [0.5, 0.0, 0.0], [0.0, 0.5, 0.0], @@ -81,13 +79,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_gkq.py b/abipy/examples/flows/run_gkq.py new file mode 100755 index 000000000..6387eda8b --- /dev/null +++ b/abipy/examples/flows/run_gkq.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +r""" +Flow to compute e-ph matrix elements along a q-path +=================================================== + +This example shows how to compute the e-ph matrix elements in AlAs along a q-path with AbiPy flows. +The final results are stored in the GKQ.nc file (one file for q-point) in the outdata of each task. +""" +import sys +import os +import abipy.abilab as abilab +import abipy.data as abidata + +from abipy import flowtk + + +def make_scf_input(ngkpt): + """ + This function constructs the input file for the GS calculation: + """ + structure = abidata.structure_from_ucell("AlAs") + pseudos = abidata.pseudos("13al.981214.fhi", "33as.pspnc") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + gs_inp.set_vars( + nband=6, + ecut=6.0, + ngkpt=ngkpt, + nshiftk=1, + shiftk=[0, 0, 0], + tolvrs=1.0e-10, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for the computation of e-ph matrix elements + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + # Use 2x2x2 both for k-mesh. + # Build input for GS calculation + scf_input = make_scf_input(ngkpt=(2, 2, 2)) + + # corresponding to a [2, 2, 2] q-mesh. + ngqpt = (2, 2, 2) + + # Create flow to compute all the independent atomic perturbations + # Use ndivsm = 0 to pass an explicit list of q-points. + # If ndivsm > 0, qpath_list is interpreted as a list of boundaries for the q-path + qpath_list = [[0.0, 0.0, 0.0], [0.01, 0, 0], [0.1, 0, 0], + [0.24, 0, 0], [0.3, 0, 0], [0.45, 0, 0], [0.5, 0.0, 0.0]] + + from abipy.flowtk.eph_flows import GkqPathFlow + flow = GkqPathFlow.from_scf_input(options.workdir, scf_input, + ngqpt, qpath_list, ndivsm=0, with_becs=True, + ddk_tolerance={"tolwfr": 1e-8}) + + return flow + + +# This block generates the thumbnails in the AbiPy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_gkq.py -s +# +# then use: +# +# abirun.py flow_phonons history diff --git a/abipy/examples/flows/develop/run_gruneisen_abinit.py b/abipy/examples/flows/run_gruneisen_abinit.py similarity index 54% rename from abipy/examples/flows/develop/run_gruneisen_abinit.py rename to abipy/examples/flows/run_gruneisen_abinit.py index 61c66c2ea..3391a6b4e 100755 --- a/abipy/examples/flows/develop/run_gruneisen_abinit.py +++ b/abipy/examples/flows/run_gruneisen_abinit.py @@ -3,32 +3,31 @@ Gruneisen parameters with DFPT phonons and finite difference ============================================================ -The flow computes the dynamical matrix of AlAs for three different volumens -around the equilibrium configuration. -Gruneisen parameters are then computed in anaddb by approximating the derivative -of the dynamical matrix wrt volume with finite differences. +This script compute the Grüneisen parameters (derivative of frequencies wrt Volume) +using finite differences and the phonons obtained with the DFPT part of Abinit. +The Anaddb input file needed to compute Grüneisen parameters will be generated +in the outdata directory of the flow. + +It is necessary to run three DFPT phonon calculations. +One is calculated at the equilibrium volume and the remaining two are calculated +at the slightly larger volume and smaller volume than the equilibrium volume. +The unitcells at these volumes have to be fully relaxed under the constraint of each volume. """ -from __future__ import division, print_function, unicode_literals, absolute_import - import sys import os -import numpy as np import abipy.abilab as abilab import abipy.data as abidata from abipy import flowtk + def build_flow(options): """ - Create a `Flow` for phonon calculations: - - 1) One workflow for the GS run. - 2) nqpt works for phonon calculations. Each work contains - nirred tasks where nirred is the number of irreducible phonon perturbations - for that particular q-point. + Create a `Flow` for Grüneisen calculations: + Three relaxations at fixed volume followed by phonon calculation on a q-mesh. """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") flow = flowtk.Flow(workdir=options.workdir) @@ -39,9 +38,6 @@ def build_flow(options): gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) - # List of q-points for the phonon calculation. - #qpoints = np.reshape(qpoints, (-1, 3)) - # Global variables used both for the GS and the DFPT run. gs_inp.set_vars( nband=4, @@ -52,28 +48,24 @@ def build_flow(options): 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.5], - #shiftk=[0, 0, 0], - paral_kgb=0, diemac=12.0, iomode=3, tolvrs=1.0e-18, ) - # Get the qpoints in the IBZ. Note that here we use a q-mesh with ngkpt=(4,4,4) and shiftk=(0,0,0) - qpoints = gs_inp.abiget_ibz(ngkpt=(4, 4, 4), shiftk=(0, 0, 0)).points - - # Build input for GS calculation and register the first work. - #work0 = flow.register_scf_task(scf_input) - #ph_work = flowtk.PhononWork.from_scf_task(work0[0], qpoints=qpoints, is_ngqpt=True) - #flow.register_work(ph_work) + from abipy.flowtk.gruneisen import GruneisenWork + voldelta = gs_inp.structure.volume * 0.02 - ph_inputs = abilab.MultiDataset(structure, pseudos=pseudos, ndtset=len(qpoints)) + # k-mesh and q-mesh must be commensurate. + work = GruneisenWork.from_gs_input(gs_inp, voldelta, ngqpt=[2, 2, 2], with_becs=False) + flow.register_work(work) return flow -# This block generates the thumbnails in the Abipy gallery. + +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. -if os.getenv("GENERATE_SPHINX_GALLERY", False): +if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) diff --git a/abipy/examples/flows/run_gwconv_ecuteps.py b/abipy/examples/flows/run_gwconv_ecuteps.py index c14b45268..1c859b816 100755 --- a/abipy/examples/flows/run_gwconv_ecuteps.py +++ b/abipy/examples/flows/run_gwconv_ecuteps.py @@ -5,8 +5,6 @@ G0W0 convergence study wrt ecuteps and the number of bands in W. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import numpy as np @@ -83,7 +81,7 @@ def make_inputs(paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Get our templates scf_inp, nscf_inp, scr_inp, sig_inp = make_inputs() @@ -120,13 +118,14 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. + +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main @@ -138,5 +137,6 @@ def main(options): """ return build_flow(options) -if __name__=="__main__": + +if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/examples/flows/run_ht_si_bsemdf.py b/abipy/examples/flows/run_ht_si_bsemdf.py index 021e121fe..99dc632d3 100755 --- a/abipy/examples/flows/run_ht_si_bsemdf.py +++ b/abipy/examples/flows/run_ht_si_bsemdf.py @@ -5,8 +5,6 @@ Calculation of the BSE spectrum with the High-throuhput interface (factory functions). """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -18,7 +16,7 @@ def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Initialize pseudos and Structure. pseudos = abidata.pseudos("14si.pspnc") @@ -53,13 +51,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_ht_si_ebands.py b/abipy/examples/flows/run_ht_si_ebands.py index b5319a8a8..76f5f0740 100755 --- a/abipy/examples/flows/run_ht_si_ebands.py +++ b/abipy/examples/flows/run_ht_si_ebands.py @@ -6,8 +6,6 @@ This example show how to build a flow to compute the band structure and the DOS of silicon. Input files are automatically generated with factory functions designed for automatic calculations. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -15,10 +13,11 @@ from abipy import abilab + def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Initialize structure and pseudos. structure = abilab.Structure.from_file(abidata.cif_file("si.cif")) @@ -38,13 +37,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_ht_si_g0w0ppm.py b/abipy/examples/flows/run_ht_si_g0w0ppm.py index eebe33c8a..6baff6bbd 100755 --- a/abipy/examples/flows/run_ht_si_g0w0ppm.py +++ b/abipy/examples/flows/run_ht_si_g0w0ppm.py @@ -5,7 +5,6 @@ G0W0 corrections with the HT interface. """ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os @@ -21,7 +20,7 @@ def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Initialize the flow. flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -54,7 +53,7 @@ def build_flow(options): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_ldaus.py b/abipy/examples/flows/run_ldaus.py index 8bbe0e573..0aee091dc 100755 --- a/abipy/examples/flows/run_ldaus.py +++ b/abipy/examples/flows/run_ldaus.py @@ -6,11 +6,9 @@ This example shows how to compute the LDA+U band structure of NiO with PAW for several values of U-J. """ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os -import numpy as np import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk @@ -80,7 +78,7 @@ def make_scf_nscf_dos_inputs(structure, pseudos, luj_params, paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -109,13 +107,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_mgb2_edoses.py b/abipy/examples/flows/run_mgb2_edoses.py index 33c92de6c..e5453d725 100755 --- a/abipy/examples/flows/run_mgb2_edoses.py +++ b/abipy/examples/flows/run_mgb2_edoses.py @@ -6,7 +6,6 @@ This examples shows how to build a Flow to compute the band structure and the electron DOS of MgB2 with different k-point samplings. """ -from __future__ import print_function, division, unicode_literals, absolute_import import os import sys @@ -48,13 +47,13 @@ def make_scf_nscf_inputs(structure, pseudos, paral_kgb=1): ) # return GS, NSCF (band structure), DOSes input. - return multi.split_datasets() + return multi.split_datasets() def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") structure = abidata.structure_from_ucell("MgB2") @@ -72,13 +71,13 @@ def build_flow(options): dos_inputs=dos_inputs, manager=options.manager) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_mgb2_phonons_nkpt_tsmear.py b/abipy/examples/flows/run_mgb2_phonons_nkpt_tsmear.py index 3a6143020..1160bee6e 100755 --- a/abipy/examples/flows/run_mgb2_phonons_nkpt_tsmear.py +++ b/abipy/examples/flows/run_mgb2_phonons_nkpt_tsmear.py @@ -7,7 +7,6 @@ phonon band structure in a metallic system (MgB2) with different k-point samplings and values of the electronic smearing tsmear """ -from __future__ import print_function, division, unicode_literals, absolute_import import os import sys @@ -28,6 +27,7 @@ def make_scf_input(structure, ngkpt, tsmear, pseudos, paral_kgb=1): occopt=4, # Marzari smearing tsmear=tsmear, paral_kgb=paral_kgb, + iomode=3, ) # Dataset 1 (GS run) @@ -40,7 +40,7 @@ def make_scf_input(structure, ngkpt, tsmear, pseudos, paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") structure = abidata.structure_from_ucell("MgB2") @@ -71,13 +71,13 @@ def build_flow(options): return flow.allocate(use_smartio=True) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_nonlinear.py b/abipy/examples/flows/run_nonlinear.py index f09770ee3..07451b3c3 100755 --- a/abipy/examples/flows/run_nonlinear.py +++ b/abipy/examples/flows/run_nonlinear.py @@ -5,7 +5,6 @@ Flow to compute non-linear optical properties with DFPT (static limit). """ -from __future__ import division, print_function, unicode_literals import sys import os @@ -56,21 +55,20 @@ def make_scf_input(ecut=10, ngkpt=(8, 8, 8)): def build_flow(options): if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") scf_input = make_scf_input(ecut=10, ngkpt=(6, 6, 6)) return flowtk.NonLinearCoeffFlow.from_scf_input(options.workdir, scf_input) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile # Temporarily disabled in v8.8.2 options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - #build_flow(options).plot_networkx(with_edge_labels=False, tight_layout=True) - + build_flow(options).graphviz_imshow() @flowtk.flow_main @@ -81,7 +79,7 @@ def main(options): Command line args are stored in `options`. """ # Temporarily disabled in v8.8.2 - return 0 + #return 0 return build_flow(options) diff --git a/abipy/examples/flows/run_optic.py b/abipy/examples/flows/run_optic.py index 6732a57a2..06b6f26ce 100755 --- a/abipy/examples/flows/run_optic.py +++ b/abipy/examples/flows/run_optic.py @@ -7,7 +7,6 @@ (independent particle approximation, no local field effects) and perform a convergence study with respect to the k-point sampling. """ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os @@ -24,16 +23,16 @@ def build_flow(options, paral_kgb=0): """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") multi = abilab.MultiDataset(structure=abidata.structure_from_ucell("GaAs"), pseudos=abidata.pseudos("31ga.pspnc", "33as.pspnc"), ndtset=2) # Usa same shifts in all tasks. - shiftk= [[0.5, 0.5, 0.5], - [0.5, 0.0, 0.0], - [0.0, 0.5, 0.0], - [0.0, 0.0, 0.5]] + shiftk = [[0.5, 0.5, 0.5], + [0.5, 0.0, 0.0], + [0.0, 0.5, 0.0], + [0.0, 0.0, 0.5]] # Global variables. multi.set_vars(ecut=2, paral_kgb=paral_kgb) @@ -88,13 +87,13 @@ def build_flow(options, paral_kgb=0): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=False, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_phfrozen_ebands.py b/abipy/examples/flows/run_phfrozen_ebands.py index e6236cfb7..ad4f92460 100755 --- a/abipy/examples/flows/run_phfrozen_ebands.py +++ b/abipy/examples/flows/run_phfrozen_ebands.py @@ -5,7 +5,6 @@ Electronic band structure of silicon in a distorted geometry (frozen phonon at q=0) """ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os @@ -54,7 +53,7 @@ def make_scf_nscf_inputs(structure, paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # build the structures base_structure = abilab.Structure.from_file(data.cif_file("si.cif")) @@ -79,13 +78,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_phonons.py b/abipy/examples/flows/run_phonons.py index 576323312..c38f35847 100755 --- a/abipy/examples/flows/run_phonons.py +++ b/abipy/examples/flows/run_phonons.py @@ -7,9 +7,8 @@ Symmetries are taken into account: only q-points in the IBZ are generated and for each q-point only the independent atomic perturbations are computed. The final results (out_DDB, out_DVDB) will be produced automatically at the end of the run -and saved in ``flow_phonons/w1/outdata/``. +and saved in ``flow_phonons/outdata/``. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -18,10 +17,10 @@ from abipy import flowtk + def make_scf_input(paral_kgb=0): """ - This function constructs the input files for the phonon calculation: - GS input + the input files for the phonon calculation. + This function constructs the input file for the GS calculation: """ # Crystalline AlAs: computation of the second derivative of the total energy structure = abidata.structure_from_ucell("AlAs") @@ -42,7 +41,7 @@ def make_scf_input(paral_kgb=0): tolvrs=1.0e-10, ixc=1, diemac=9.0, - iomode=3, + #iomode=3, ) return gs_inp @@ -53,36 +52,34 @@ def build_flow(options): Create a `Flow` for phonon calculations. The flow has two works. The first work contains a single GS task that produces the WFK file used in DFPT - The second work contains multiple PhononTasks that are generated automatically + Then we have multiple Works that are generated automatically in order to compute the dynamical matrix on a [4, 4, 4] mesh. Symmetries are taken into account: only q-points in the IBZ are generated and for each q-point only the independent atomic perturbations are computed. """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") - - flow = flowtk.Flow(workdir=options.workdir) + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") - # Build input for GS calculation and register the first work. + # Build input for GS calculation scf_input = make_scf_input() - work0 = flow.register_scf_task(scf_input) - # This call uses the information reported in the GS task (work0[0]) to - # compute all the independent atomic perturbations corresponding to a [4, 4, 4] q-mesh. - ph_work = flowtk.PhononWork.from_scf_task(work0[0], qpoints=[4, 4, 4], is_ngqpt=True) - flow.register_work(ph_work) + # Create flow to compute all the independent atomic perturbations + # corresponding to a [4, 4, 4] q-mesh. + # Electric field and Born effective charges are also computed. + flow = flowtk.PhononFlow.from_scf_input(options.workdir, scf_input, + ph_ngqpt=(4, 4, 4), with_becs=True) return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=False, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main @@ -115,14 +112,14 @@ def main(options): # .. code-block:: bash # # =================================================================================================================================== -# ====================================== ====================================== +# ====================================== =============================== # =================================================================================================================================== # [Thu Dec 7 22:55:02 2017] Finalized set to True # [Thu Dec 7 22:55:02 2017] Will call mrgddb to merge [ .... ] # # Now open the final DDB file with: # -# abiopen.py flow_phonons/w1/outdata/out_DDB +# abiopen.py flow_phonons/outdata/out_DDB # # and invoke anaddb to compute the phonon band structure and the phonon DOS with: # diff --git a/abipy/examples/flows/run_phonons_wkq.py b/abipy/examples/flows/run_phonons_wkq.py new file mode 100755 index 000000000..4e845ad25 --- /dev/null +++ b/abipy/examples/flows/run_phonons_wkq.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python +r""" +Phonons with WFQ files (q-mesh denser than k-mesh) +================================================== + +This example shows how to use WFQ files to compute phonons on a q-mesh +that is not necessarily commensurate with the k-mesh used for electrons. +Symmetries are taken into account: only q-points in the IBZ are generated. +Moreover WFQ files are computed only if k + q does not belong to the initial mesh and, +for each q-point, only the independent atomic perturbations are computed. +The final results (out_DDB, out_DVDB) will be produced automatically at the end of the run +and saved in the ``outdata/`` of the work. +""" + +import sys +import os +import abipy.abilab as abilab +import abipy.data as abidata + +from abipy import flowtk + + +def make_scf_input(paral_kgb=0): + """ + This function constructs the input file for the GS calculation: + """ + # Crystalline AlAs: computation of the second derivative of the total energy + structure = abidata.structure_from_ucell("AlAs") + pseudos = abidata.pseudos("13al.981214.fhi", "33as.pspnc") + gs_inp = abilab.AbinitInput(structure, pseudos=pseudos) + + gs_inp.set_vars( + nband=4, + ecut=2.0, + ngkpt=[2, 2, 2], + nshiftk=1, + shiftk=[0, 0, 0], + #nshiftk=4, + #shiftk=[0.0, 0.0, 0.5, # This gives the usual fcc Monkhorst-Pack grid + # 0.0, 0.5, 0.0, + # 0.5, 0.0, 0.0, + # 0.5, 0.5, 0.5], + paral_kgb=paral_kgb, + tolvrs=1.0e-10, + diemac=9.0, + ) + + return gs_inp + + +def build_flow(options): + """ + Create a `Flow` for phonon calculations. The flow has two works. + """ + # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") + if not options.workdir: + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") + + flow = flowtk.Flow(workdir=options.workdir) + + # Build input for GS calculation and create first work with 1 ScfTask. + scf_input = make_scf_input() + work = flow.register_scf_task(scf_input) + scf_task = work[0] + + # Create work for phonon calculation with WFQ files with a [4, 4, 4] q-mesh. + # Electric field and Born effective charges are also computed. + wfkq_work = flowtk.PhononWfkqWork.from_scf_task(scf_task, ngqpt=[4, 4, 4], with_becs=True) + flow.register_work(wfkq_work) + + return flow + + +# This block generates the thumbnails in the AbiPy gallery. +# You can safely REMOVE this part if you are using this script for production runs. +if os.getenv("READTHEDOCS", False): + __name__ = None + import tempfile + options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) + build_flow(options).graphviz_imshow() + + +@flowtk.flow_main +def main(options): + """ + This is our main function that will be invoked by the script. + flow_main is a decorator implementing the command line interface. + Command line args are stored in `options`. + """ + return build_flow(options) + + +if __name__ == "__main__": + sys.exit(main()) + + +############################################################################ +# +# Run the script with: +# +# run_phonons_wfq.py -s +# +# then use: +# +# abirun.py flow_phonons_wkq history +# +# to get the list of actions perfomed by AbiPy to complete the flow. +# Note how the ``PhononWfkqWork`` has merged all the partial DDB/DVDB files +# and removed the WFQ files at runtime to optimize the disk space. +# +# .. code-block:: bash +# +# ========================================================================================================================= +# ============================= ============================= +# ========================================================================================================================= +# [Tue Sep 18 00:04:18 2018] Removing WFQ: flow_phonons_wkq/w1/t5/outdata/out_WFQ +# [Tue Sep 18 00:04:54 2018] Removing WFQ: flow_phonons_wkq/w1/t14/outdata/out_WFQ +# +# Now open the final DDB file with: +# +# abiopen.py flow_phonons_wkq/w1/outdata/out_DDB +# +# and invoke anaddb to compute the phonon band structure and the phonon DOS with: +# +# .. code-block:: ipython +# +# In [1]: phbst_file, phdos_file = abifile.anaget_phbst_and_phdos_files() +# In [2]: %matplotlib +# In [3]: phbst_file.plot_phbands() +# +# .. image:: https://github.com/abinit/abipy_assets/blob/master/run_phonons.png?raw=true +# :alt: Phonon band structure of AlAs. +# diff --git a/abipy/examples/flows/run_phonopy_si.py b/abipy/examples/flows/run_phonopy_si.py index 004c6359d..1203fb798 100755 --- a/abipy/examples/flows/run_phonopy_si.py +++ b/abipy/examples/flows/run_phonopy_si.py @@ -10,7 +10,6 @@ This example requires the `phonopy package `_ """ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os @@ -27,7 +26,7 @@ def build_flow(options): """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Initialize structure and pseudos structure = abilab.Structure.from_file(abidata.cif_file("si.cif")) @@ -51,13 +50,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_raman_bse.py b/abipy/examples/flows/run_raman_bse.py index 47682c055..2d92ac68c 100755 --- a/abipy/examples/flows/run_raman_bse.py +++ b/abipy/examples/flows/run_raman_bse.py @@ -6,7 +6,6 @@ This script shows how to perform a Raman calculation with excitonic effects included with the BSE formalism. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -19,7 +18,7 @@ def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_","flow_") flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -113,13 +112,13 @@ def raman_work(structure, pseudos, shiftk, paral_kgb=1): return flowtk.BseMdfWork(scf_inp, nscf_inp, bse_inp) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_raman_optic.py b/abipy/examples/flows/run_raman_optic.py index e89cc81b9..b7f4fe5eb 100755 --- a/abipy/examples/flows/run_raman_optic.py +++ b/abipy/examples/flows/run_raman_optic.py @@ -6,7 +6,6 @@ This script shows how to perform a Raman calculation with excitonic effects included with the BSE formalism. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -38,7 +37,7 @@ def build_flow(options): # Initialize flow. Each workflow in the flow defines a complete BSE calculation for given eta. if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -128,7 +127,6 @@ def raman_work(structure, pseudos, ngkpt, shiftk): ddk_t = work.register_ddk_task(inp, deps={nscf_t: "WFK"}) ddk_nodes.append(ddk_t) - optic_input = abilab.OpticInput( broadening=0.002, # Value of the smearing factor, in Hartree domega=0.0003, # Frequency mesh. @@ -147,13 +145,13 @@ def raman_work(structure, pseudos, ngkpt, shiftk): return work -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=False, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_relax.py b/abipy/examples/flows/run_relax.py index 4968055dc..bb10386fd 100755 --- a/abipy/examples/flows/run_relax.py +++ b/abipy/examples/flows/run_relax.py @@ -8,7 +8,6 @@ 1) Relaxation of atomic positions with unit cell parameters fixed. 2) Full relaxation (atoms + cell) with the initial configuration read from step 1) """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -73,7 +72,7 @@ def make_ion_ioncell_inputs(paral_kgb=0): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Create the flow flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -96,13 +95,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_relax_and_ebands.py b/abipy/examples/flows/run_relax_and_ebands.py index 5b06270a2..4a1f83c75 100755 --- a/abipy/examples/flows/run_relax_and_ebands.py +++ b/abipy/examples/flows/run_relax_and_ebands.py @@ -7,7 +7,6 @@ WARNING: The API could change! """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -112,7 +111,7 @@ def make_scf_nscf_inputs(paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Create the flow flow = flowtk.Flow(options.workdir, manager=options.manager) @@ -153,13 +152,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_relax_vs_kpts.py b/abipy/examples/flows/run_relax_vs_kpts.py index 8d9c68a39..62a089041 100755 --- a/abipy/examples/flows/run_relax_vs_kpts.py +++ b/abipy/examples/flows/run_relax_vs_kpts.py @@ -12,7 +12,6 @@ overestimate the lattice parameters and ecut is way too low. If you replace GGA with LDA, you will observe that LDA tends to underestimate the parameters. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -28,7 +27,7 @@ def build_flow(options): """ # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # List of k-meshes. ngkpt_list = [ @@ -66,13 +65,14 @@ def build_flow(options): return flowtk.Flow.from_inputs(options.workdir, inputs=multi.split_datasets(), task_class=flowtk.RelaxTask) -# This block generates the thumbnails in the Abipy gallery. + +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_relax_vs_kpts_tsmear.py b/abipy/examples/flows/run_relax_vs_kpts_tsmear.py index 4d2e75e23..eb4f24b43 100755 --- a/abipy/examples/flows/run_relax_vs_kpts_tsmear.py +++ b/abipy/examples/flows/run_relax_vs_kpts_tsmear.py @@ -12,7 +12,6 @@ overestimate the lattice parameters and ecut is way too low. If you replace GGA with LDA, you will observe that LDA tends to underestimate the parameters. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -59,13 +58,14 @@ def relax_input(tsmear, nksmall): return inp + def build_flow(options): """ Build and return a flow performing structural relaxations with different k-point samplings. """ # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Let generate multiple inputs for different (tsmear, nksmall) # Product computes the Cartesian product of input iterables. @@ -87,13 +87,13 @@ def build_flow(options): return flowtk.Flow.from_inputs(options.workdir, inputs=inputs, task_class=flowtk.RelaxTask) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_si_ebands.py b/abipy/examples/flows/run_si_ebands.py index eac65694a..bd2237a61 100755 --- a/abipy/examples/flows/run_si_ebands.py +++ b/abipy/examples/flows/run_si_ebands.py @@ -5,7 +5,6 @@ Flow to compute the band structure of silicon. """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os @@ -16,7 +15,7 @@ def make_scf_nscf_inputs(paral_kgb=0, usepaw=0): """Returns two input files: GS run and NSCF on a high symmetry k-mesh.""" - pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else data.pseudos("Si.GGA_PBE-JTH-paw.xml") + pseudos = abidata.pseudos("14si.pspnc") if usepaw == 0 else abidata.pseudos("Si.GGA_PBE-JTH-paw.xml") # Get structure from cif file. multi = abilab.MultiDataset(structure=abidata.cif_file("si.cif"), pseudos=pseudos, ndtset=2) @@ -56,7 +55,7 @@ def make_scf_nscf_inputs(paral_kgb=0, usepaw=0): def build_flow(options): # Set working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") # Get the SCF and the NSCF input. scf_input, nscf_input = make_scf_nscf_inputs() @@ -65,13 +64,13 @@ def build_flow(options): return flowtk.bandstructure_flow(options.workdir, scf_input, nscf_input, manager=options.manager) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_si_g0w0.py b/abipy/examples/flows/run_si_g0w0.py index 8aeb55cb5..7df36ed1f 100755 --- a/abipy/examples/flows/run_si_g0w0.py +++ b/abipy/examples/flows/run_si_g0w0.py @@ -8,7 +8,6 @@ wrt to the number of bands in the self-energy. More complicated convergence studies can be implemented on the basis of this example. """ -from __future__ import division, print_function, unicode_literals, absolute_import import os import sys @@ -117,7 +116,7 @@ def make_inputs(ngkpt, paral_kgb=1): def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_","flow_") # Change the value of ngkpt below to perform a GW calculation with a different k-mesh. scf, nscf, scr, sig1, sig2, sig3 = make_inputs(ngkpt=[2, 2, 2]) @@ -125,13 +124,13 @@ def build_flow(options): return flowtk.g0w0_flow(options.workdir, scf, nscf, scr, [sig1, sig2, sig3], manager=options.manager) -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main diff --git a/abipy/examples/flows/run_sic_relax.py b/abipy/examples/flows/run_sic_relax.py index a186bc626..4867aa23d 100755 --- a/abipy/examples/flows/run_sic_relax.py +++ b/abipy/examples/flows/run_sic_relax.py @@ -6,11 +6,9 @@ This example shows how to build a very simple Flow for the structural relaxation of SiC. One could use a similar logic to perform multiple relaxations with different input parameters... """ -from __future__ import division, print_function, unicode_literals, absolute_import import sys import os -import numpy as np import abipy.abilab as abilab import abipy.data as data @@ -20,7 +18,7 @@ def build_flow(options): # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: - options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") + options.workdir = os.path.basename(sys.argv[0]).replace(".py", "").replace("run_", "flow_") pseudos = data.pseudos("14si.pspnc", "6c.pspnc") structure = data.structure_from_ucell("SiC") @@ -45,7 +43,7 @@ def build_flow(options): ) # K-points sampling - shiftk=[ + shiftk = [ [0.5,0.5,0.5], [0.5,0.0,0.0], [0.0,0.5,0.0], @@ -62,13 +60,13 @@ def build_flow(options): return flow -# This block generates the thumbnails in the Abipy gallery. +# This block generates the thumbnails in the AbiPy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) - build_flow(options).plot_networkx(with_edge_labels=True, tight_layout=True) + build_flow(options).graphviz_imshow() @flowtk.flow_main @@ -81,7 +79,7 @@ def main(options): return build_flow(options) -if __name__=="__main__": +if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/examples/plot/README.txt b/abipy/examples/plot/README.txt index b7cdf97fa..e916827a2 100644 --- a/abipy/examples/plot/README.txt +++ b/abipy/examples/plot/README.txt @@ -11,4 +11,8 @@ the :ref:`abiopen.py` script and the command:: abiopen.py FILE -nb -or use one of the options of :ref:`abiview.py` to plot the results automatically. +issue + + abiopen.py FILE --expose + +to generate plots automatically or use one of the options of :ref:`abiview.py` to plot the results automatically. diff --git a/abipy/examples/plot/develop/plot_ddk.py b/abipy/examples/plot/develop/plot_ddk.py deleted file mode 100755 index 097012ff0..000000000 --- a/abipy/examples/plot/develop/plot_ddk.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -r""" -DDK.nc -====== - -This example shows how to analyze DDK.nc files -containing the velocity matrix elements. -""" -from abipy.abilab import abiopen -import abipy.data as abidata - -# Here we use the DDK.nc files shipped with abipy. -# Replace ddk_paths with the paths to your files. -ddk_paths = abidata.ref_files( - "gaas_444_dir1_DDK.nc", - "gaas_444_dir2_DDK.nc", - "gaas_444_dir3_DDK.nc", -) - -from abipy.electrons.ddk import DdksAnalyzer - -with DdksAnalyzer(ddk_paths) as van: - print(van) - #ddk_doses = van.get_doses(method="gaussian", step=0.1, width=0.2) - #ddk_doses.plot() - #ddk_doses.plot_with_ebands(ebands_kpath) diff --git a/abipy/examples/plot/develop/plot_ederivatives.py b/abipy/examples/plot/develop/plot_ederivatives.py index 0187efede..9c643f443 100755 --- a/abipy/examples/plot/develop/plot_ederivatives.py +++ b/abipy/examples/plot/develop/plot_ederivatives.py @@ -34,8 +34,8 @@ #ebands.plot() -#emasses = ebands.effective_masses(spin=0, band=0, acc=2) -#print("emasses", emasses) +emasses = ebands.effective_masses(spin=0, band=0, acc=2) +print("emasses", emasses) #emasses = ebands.effmass(spin=0, kpoint=[0,0,0], bands=0, acc=2) #print("emasses", emasses) diff --git a/abipy/examples/plot/plot_ddb_asr.py b/abipy/examples/plot/plot_ddb_asr.py index c56c04766..271753048 100755 --- a/abipy/examples/plot/plot_ddb_asr.py +++ b/abipy/examples/plot/plot_ddb_asr.py @@ -21,3 +21,5 @@ # Set nqsmall to 0 to disable DOS computation. plotter = ddb.anacompare_asr(asr_list=(0, 2), nqsmall=0, ndivsm=10) plotter.gridplot() + +ddb.close() diff --git a/abipy/examples/plot/plot_edos_vs_broad.py b/abipy/examples/plot/plot_edos_vs_broad.py index d85412ab0..c5ae3a112 100755 --- a/abipy/examples/plot/plot_edos_vs_broad.py +++ b/abipy/examples/plot/plot_edos_vs_broad.py @@ -30,7 +30,7 @@ edos_plotter = ni_ebands_kmesh.compare_gauss_edos(widths=[0.1, 0.2, 0.3], step=0.2) -title="e-DOS as function of the Gaussian broadening" +title = "e-DOS as function of the Gaussian broadening" edos_plotter.combiplot(dos_mode="idos+dos") edos_plotter.combiplot(dos_mode="dos", spin_mode="resolved") diff --git a/abipy/examples/plot/plot_eph_from_mp.py b/abipy/examples/plot/plot_eph_from_mp.py index 730f9c8a9..7f02b9364 100755 --- a/abipy/examples/plot/plot_eph_from_mp.py +++ b/abipy/examples/plot/plot_eph_from_mp.py @@ -1,37 +1,37 @@ #!/usr/bin/env python r""" Electrons and Phonons from the materials project website -========================================================= +======================================================== This example shows how to dowload the electronic band structure and the DDB file using the mp identifier and use the AbiPy API to generate a matplotlib grid with electrons + phonons. IMPORTANT: Electrons and Phonons have been obtained with different codes -and different computational settings! - +and different computational settings! Of course, one can always +initialize ElectronBands and PhononBands from local netcdf files +obtained with Abinit """ from abipy import abilab -import abipy.data as abidata -import os # List of mp ids for Si, Diamond mpids = ["mp-149", "mp-66"] -# Get list of AbiPy ebands from mpids +# Get list of AbiPy ebands from mpids ebands_list = [abilab.ElectronBands.from_mpid(mpid) for mpid in mpids] # Get list of DDB files from the MP website and run anaddb to get the phonon bands. phbands_list = [] -for mpid in mpids: - print("Downloading DDB for mpid:", mpid) +for i, mpid in enumerate(mpids): + print("Downloading DDB for mpid %s (%s) ..." % (mpid, ebands_list[i].structure.formula)) ddb = abilab.DdbFile.from_mpid(mpid) - if ddb is None: + if ddb is None: raise RuntimeError("%d does not provide DDB" % mpid) - print("Invoking anaddb...") + print("Invoking anaddb to compute phonon bands...") phbst, _ = ddb.anaget_phbst_and_phdos_files(nqsmall=0) phbands_list.append(phbst.phbands) phbst.close() + ddb.close() # The figure has [len(mpids), 2] subplots # The i-th row contains electrons and phonons for the i-th mp identifier. @@ -40,11 +40,16 @@ sharex=False, sharey=False, squeeze=False) # Use the `ax` keyword argument to select the matplotlib Axes used to plot the object. -# In the bans structure plot, we show the fundamental/direct gap as well as the possible -# phonon-absorption (-emission) processes allowed by energy-conservation +# In the band structure plot, we show the fundamental/direct gap as well as the possible +# phonon-absorption (-emission) processes allowed by energy-conservation. # (This is a qualitative analysis of e-ph scattering, quasi-momentum and ph dispersion are not taken into account). for i, (ebands, phbands) in enumerate(zip(ebands_list, phbands_list)): ebands.plot(ax=ax_mat[i, 0], with_gaps=True, ylims=(-5, 10), max_phfreq=phbands.maxfreq, show=False) phbands.plot(ax=ax_mat[i, 1], show=False) + # Hide xlabel if not last row. + if i != len(ebands_list) - 1: + for ax in ax_mat[i]: + ax.xaxis.label.set_visible(False) + plt.show() diff --git a/abipy/examples/plot/plot_fold2bloch.py b/abipy/examples/plot/plot_fold2bloch.py index 6b8354687..29c4fc68f 100755 --- a/abipy/examples/plot/plot_fold2bloch.py +++ b/abipy/examples/plot/plot_fold2bloch.py @@ -10,7 +10,7 @@ from abipy import abilab import abipy.data as abidata -import numpy as np + with abilab.abiopen(abidata.ref_file("h6_FOLD2BLOCH.nc")) as ncfile: print(ncfile) diff --git a/abipy/examples/plot/plot_gruneisen.py b/abipy/examples/plot/plot_gruneisen.py index f6ee9b8b5..7351b87b4 100755 --- a/abipy/examples/plot/plot_gruneisen.py +++ b/abipy/examples/plot/plot_gruneisen.py @@ -23,6 +23,12 @@ # sphinx_gallery_thumbnail_number = 2 ncfile.plot_phbands_with_gruns(title="Phonon bands with markers proportional to Gruneisen parameters + DOSes") +ncfile.plot_gruns_bs(title="Gruneisen along high-symmetry path.") + +ncfile.plot_phbands_with_gruns(fill_with="gruns_fd", title="Gruneisen parameters with finite differences.", with_doses=None) + +ncfile.plot_gruns_scatter(units='cm-1',title="Scatter plot with Gruneisen parameters") + # Construct plotter object to analyze multiple phonon bands. plotter = ncfile.get_plotter() plotter.combiboxplot() diff --git a/abipy/examples/plot/plot_phbands_and_dos.py b/abipy/examples/plot/plot_phbands_and_dos.py index 8f7b1e499..ee85601a0 100755 --- a/abipy/examples/plot/plot_phbands_and_dos.py +++ b/abipy/examples/plot/plot_phbands_and_dos.py @@ -30,4 +30,4 @@ # Plot the phonon band structure with different color for each line. phbands.plot_colored_matched(units="cm-1", - title="AlAs with different color for each line.") + title="AlAs with different color for each line.") diff --git a/abipy/examples/plot/plot_phbands_nkpt_tsmear.py b/abipy/examples/plot/plot_phbands_nkpt_tsmear.py index de1491886..c9bb42e55 100755 --- a/abipy/examples/plot/plot_phbands_nkpt_tsmear.py +++ b/abipy/examples/plot/plot_phbands_nkpt_tsmear.py @@ -40,5 +40,6 @@ r.phbands_plotter.gridplot_with_hue("tsmear", with_dos=True) - #r.phbands_plotter.gridplot_with_hue("nkpt") + +robot.close() diff --git a/abipy/examples/plot/plot_phonons_infrared.py b/abipy/examples/plot/plot_phonons_infrared.py new file mode 100755 index 000000000..1ecb528c9 --- /dev/null +++ b/abipy/examples/plot/plot_phonons_infrared.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +r""" +Infrared spectrum of AlAs +========================= + +This example shows how to plot the infrared spectrum of a polar semiconductor (AlAs) +from the DDB file See tutorial/lesson_rf2.html + +For a command line interfase, use: + + abiview.py ddb_ir in_DDB +""" +import os +import abipy.data as abidata + +from abipy import abilab + +# Open DDB file for alpha-SiO2 taken from https://materialsproject.org/materials/mp-7000/ +filepath = os.path.join(abidata.dirpath, "refs", "mp-7000_DDB.bz2") +ddb = abilab.abiopen(filepath) + +# Invoke anaddb to compute dielectric tensor and oscillator strength. +tgen = ddb.anaget_dielectric_tensor_generator(asr=2, chneut=1, dipdip=1, verbose=1) +print(tgen) + +# Set phonon damping factor in eV (full width). +gamma_ev = 1e-3 + +# Plot IR spectrum in Cartesian coordinates. +tgen.plot_all(gamma_ev=gamma_ev, title="Diagonal and off-diagonal components") + +tgen.plot(component="diag", reim="re", gamma_ev=gamma_ev, title="Real part, diagonal components") + +tgen.plot(component="diag", reim="im", gamma_ev=gamma_ev, title="Imaginary part, diagonal components") + +ddb.close() diff --git a/abipy/examples/plot/plot_phonons_msqd.py b/abipy/examples/plot/plot_phonons_msqd.py new file mode 100755 index 000000000..3efad0a6c --- /dev/null +++ b/abipy/examples/plot/plot_phonons_msqd.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +r""" +Projected phonon DOS +==================== + +This example shows how to plot the generalized phonon DOS with the mean square +displacement tensor in cartesian coords and how to calculate Debye Waller factors +as a function of temperature. +See :cite:`Lee1995` for the further details about the internal implementation and +:cite:`Trueblood1996` for the different conventions used by crystallographers. +""" +import os +import abipy.data as abidata + +from abipy import abilab + +# Open DDB file for alpha-SiO2 taken from https://materialsproject.org/materials/mp-7000/ +filepath = os.path.join(abidata.dirpath, "refs", "mp-7000_DDB.bz2") +ddb = abilab.abiopen(filepath) + +# Invoke anaddb to compute phonon bands and dos. +#dos_method = "gaussian" +dos_method = "tetra" +phbst_file, phdos_file = ddb.anaget_phbst_and_phdos_files(nqsmall=4, dos_method=dos_method, ndivsm=1, mpi_procs=2) + +# Extract msqd_dos +msqd_dos = phdos_file.msqd_dos +#print(msqd_dos) + +#for fmt in ("cartesian", "cif", "ustar", "beta", "B"): +for fmt in ("cartesian", "cif"): + df = msqd_dos.get_dataframe(temp=300, view="all", fmt=fmt) + abilab.print_dataframe(df, title="Format: %s" % fmt) + +# Plot generalized phonon DOS for each inequivalent atom in the unit cell. +msqd_dos.plot() + +# Plot tensor(T) for each inequivalent atom. +msqd_dos.plot_tensor() + +msqd_dos.plot_uiso() + +# To save the structure and the U tensor at T=300K in CIF format, use: +#msqd_dos.write_cif_file("DW.cif", temp=300) + +# To visualize the thermal ellipsoids with Vesta, use: +#msqd_dos.vesta_open(temp=300) + +# Remember to close the files. +phbst_file.close() +phdos_file.close() +ddb.close() diff --git a/abipy/examples/plot/plot_qha.py b/abipy/examples/plot/plot_qha.py new file mode 100755 index 000000000..f8f8c5808 --- /dev/null +++ b/abipy/examples/plot/plot_qha.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +r""" +Quasi-harmonic approximation +============================ + +This example shows how to use the GSR.nc and PHDOS.nc files computed with different volumes +to compute thermodynamic properties within the quasi-harmonic approximation. +""" +import os +import abipy.data as abidata + +from abipy.dfpt.phonons import PhononBands +from abipy.dfpt.qha import QHA + +# We use a list of GSR.nc and PHDOS.nc files corresponding to different isotropic strains. +# These files are shipped with AbiPy so that we don't need to run calculations from scratch. +strains = [-4, -2, 0, 2, 4, 6] +dirpath = os.path.join(abidata.dirpath, "refs", "si_qha") + +gsr_paths = [os.path.join(dirpath, "mp-149_{:+d}_GSR.nc".format(s)) for s in strains] +dos_paths = [os.path.join(dirpath, "mp-149_{:+d}_PHDOS.nc".format(s)) for s in strains] + +# Initialize QHA object from files. +# The PHDOS.nc files can be obtained from the DDB used ddb.anaget_phbst_and_phdos_files(...) +qha = QHA.from_files(gsr_paths, dos_paths) + +# To change the default EOS (vinet), use +#qha.set_eos("murnaghan") + +qha.plot_energies(title="Energies as a function of volume for different T") + +qha.plot_thermal_expansion_coeff(title="Thermal expansion coefficient as a function of T") + +qha.plot_vol_vs_t(title="Volume as a function of T") + +# Fake temperatures to test the plotting function. +phbs_list = [PhononBands.from_file(os.path.join(dirpath, "mp-149_{:+d}_PHBST.nc".format(s))) for s in + strains[2:4]] + +qha.plot_phbs(phbs_list, temperatures=[10, 20], title="Phonon band structures with color depending on T") + +# Here we build a Phonopy QHA object. +# Cannot run this code because it breaks sphinx-gallery + +#qha_phonopy = qha.get_phonopy_qha(tstop=500, num=11) +#qha_phonopy.run() +#qha_phonopy.plot_bulk_modulus_temperature().show() diff --git a/abipy/examples/plot/plot_qha_vs_qmesh.py b/abipy/examples/plot/plot_qha_vs_qmesh.py new file mode 100755 index 000000000..f46f85f49 --- /dev/null +++ b/abipy/examples/plot/plot_qha_vs_qmesh.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +r""" +Quasi-harmonic approximation (convergence wrt Q-mesh) +===================================================== + +This example shows how to use the GSR.nc and PHDOS.nc files computed with different volumes +to analyze the convergence of QHA thermodynamic properties with respect to the number of q-points +used to compute the phonon DOS. +""" +import os +import abipy.data as abidata + +from abipy.dfpt.qha import QHAQmeshAnalyzer + +# We use a list of GSR.nc and PHDOS.nc files corresponding to different isotropic strains. +# These files are shipped with AbiPy so that we don't need to run calculations from scratch. +#strains = [-4, -2, 0, 2, 4, 6] +strains = [-2, 0, 2, 4] +dirpath = os.path.join(abidata.dirpath, "refs", "si_qha") + +gsr_paths = [os.path.join(dirpath, "mp-149_{:+d}_GSR.nc".format(s)) for s in strains] +ddb_paths = [os.path.join(dirpath, "mp-149_{:+d}_DDB".format(s)) for s in strains] + +# Initialize QHA object from files. +qhana = QHAQmeshAnalyzer(gsr_paths, ddb_paths) + +# To change the default EOS (vinet), use +#qhana.set_eos("vinet") + +# Compute ph-DOS with this list of nqsmall values. +qhana.run_qlist([2, 4]) + +# Analyze convergence. API similar to QHA. +qhana.plot_energies(title="Energies as a function of volume for different T") + +qhana.plot_thermal_expansion_coeff(title="Thermal expansion coefficient as a function of T") + +qhana.plot_vol_vs_t(title="Volume as a function of T") diff --git a/abipy/examples/plot/plot_qpconverge.py b/abipy/examples/plot/plot_qpconvergence.py similarity index 100% rename from abipy/examples/plot/plot_qpconverge.py rename to abipy/examples/plot/plot_qpconvergence.py diff --git a/abipy/examples/plot/plot_speed_of_sound.py b/abipy/examples/plot/plot_speed_of_sound.py new file mode 100755 index 000000000..5311f3726 --- /dev/null +++ b/abipy/examples/plot/plot_speed_of_sound.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +r""" +Speed of Sound +============== + +This example shows how to compute the speed of sound by fitting phonon frequencies +along selected directions by linear least-squares fit. +For a command line interface use: + + abiview.py ddb_vs input_DDB +""" +from __future__ import print_function + +import os +import abipy.data as abidata + +from abipy import abilab +from abipy.dfpt.vsound import SoundVelocity + +# Initialize object from DDB file. +ddb_path = os.path.join(abidata.dirpath, "refs", "si_sound_vel", "Si_DDB") +sv = SoundVelocity.from_ddb(ddb_path) + +# Get pandas dataframe with results. +df = sv.get_dataframe() +abilab.print_dataframe(df) + +# Plot fit +sv.plot() diff --git a/abipy/examples/plot/plot_wannier90_wout.py b/abipy/examples/plot/plot_wannier90_wout.py index 1a1d72d04..f10352b1d 100755 --- a/abipy/examples/plot/plot_wannier90_wout.py +++ b/abipy/examples/plot/plot_wannier90_wout.py @@ -1,6 +1,6 @@ #!/usr/bin/env python r""" -Band structure plot +Wannier90 wout file =================== This example shows how to plot the convergence diff --git a/abipy/examples/tests/test_flows.py b/abipy/examples/tests/test_flows.py index 1617bb306..748d9806d 100644 --- a/abipy/examples/tests/test_flows.py +++ b/abipy/examples/tests/test_flows.py @@ -1,8 +1,6 @@ """ This script runs all the flows in the `flow` directory. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import tempfile @@ -72,4 +70,4 @@ def test_build_flow_method_in_scripts(self): print(i, e, file=sys.stderr) print(80 * "*", file=sys.stderr) - assert not errors \ No newline at end of file + assert not errors diff --git a/abipy/examples/tests/test_plots.py b/abipy/examples/tests/test_plots.py index a543796d0..9df66dbd9 100644 --- a/abipy/examples/tests/test_plots.py +++ b/abipy/examples/tests/test_plots.py @@ -1,8 +1,6 @@ """ This script runs all the python scripts located in this directory """ -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import unittest diff --git a/abipy/extensions/klib.pyx b/abipy/extensions/klib.pyx deleted file mode 100644 index 626d178b7..000000000 --- a/abipy/extensions/klib.pyx +++ /dev/null @@ -1,203 +0,0 @@ -#!python -#cython: boundscheck=False -#cython: nonecheck=False -#cython: wraparound=False -from __future__ import print_function, division - -import numpy as np - -cimport cython -cimport numpy as np - -from libc.stdlib cimport malloc #, free -from cpython.mem cimport PyMem_Malloc #, PyMem_Realloc, PyMem_Free - -cdef extern from "math.h": - double floor(double x) - -cdef inline int nint(double num): - """Truncate to the nearest integer.""" - return int(floor(num + 0.5)) - - -cdef inline timrotk(int time_sign, int symrec[3][3], double kpt[3], double krot[3]): - """Rotate the kpoint kpt in reduced coordinates""" - cdef int i, j - - for i in range(3): - krot[i] = 0.0 - for j in range(3): - krot[i] += symrec[i][j] * kpt[j] - krot[i] *= time_sign - - -def map_bz2ibz(structure, - #const double [:,:] bz, - #const double [:,:] ibz, - np.ndarray [np.double_t, ndim=2] bz, - np.ndarray [np.double_t, ndim=2] ibz, - #long int [:] bz2ibz, - atol=1.e-8 - ): - - bz2ibz = -np.ones(len(bz), dtype=np.int) - - # allocate number * sizeof(double) bytes of memory - #cdef int *bz2ibz = malloc(len(bz) * sizeof(int)) - #cdef int *bz2ibz = PyMem_Malloc(len(bz) * sizeof(int)) - #if not bz2ibz: - # raise MemoryError() - - cdef: - int ik_bz, ik_ibz, found, i, j, isym - int nsym = len(structure.spacegroup), len_bz=len(bz), len_ibz=len(ibz) - int time_sign - double kdiff[3], kbz[3], kibz[3], krot[3] - int int_kdiff[3] #, rot_g[3][3] - double _atol = atol - #cdef int [:] bz2ibz_view = bz2ibz - #int bz2ibz[10000000] # This is much faster, don't know why - #cdef long int *p = bz2ibz.data - #cdef double [:,:] bz_arr = bz - #cdef double [:,:] ibz_arr = ibz - #FIXME - int nsym_tr = len(structure.spacegroup) - int rot_g[128][3][3] - - for isym, symmop in enumerate(structure.spacegroup): - time_sign = symmop.time_sign - rg = symmop.rot_g - rot_g[isym][0][0] = time_sign * rg[0,0] - rot_g[isym][0][1] = time_sign * rg[0,1] - rot_g[isym][0][2] = time_sign * rg[0,2] - rot_g[isym][1][0] = time_sign * rg[1,0] - rot_g[isym][1][1] = time_sign * rg[1,1] - rot_g[isym][1][2] = time_sign * rg[1,2] - rot_g[isym][2][0] = time_sign * rg[2,0] - rot_g[isym][2][1] = time_sign * rg[2,1] - rot_g[isym][2][2] = time_sign * rg[2,2] - - #_capi_mesh2ibz(len_bz, - # bz_arr, - # len_ibz, - # ibz_arr, - # nsym, - # 1, - # rot_g, - # atol, - # bz2ibz, - # #int bz2ibz[len_bz], - # #int bz2ibz[len_bz], - # ) - #print(bz2ibz) - #return - - for ik_bz in range(len_bz): - kbz[0] = bz[ik_bz,0] - kbz[1] = bz[ik_bz,1] - kbz[2] = bz[ik_bz,2] - - found = 0 - for ik_ibz in range(len_ibz): - if found != 0: break - kibz[0] = ibz[ik_ibz,0] - kibz[1] = ibz[ik_ibz,1] - kibz[2] = ibz[ik_ibz,2] - - for isym in range(nsym_tr): - #timrotk(time_sign, rot_g[isym], kibz, krot) - for i in range(3): - krot[i] = 0.0 - for j in range(3): - krot[i] += rot_g[isym][i][j] * kibz[j] - #krot[i] = krot[i] * time_sign - - kdiff[0] = krot[0] - kbz[0] - kdiff[1] = krot[1] - kbz[1] - kdiff[2] = krot[2] - kbz[2] - - int_kdiff[0] = nint(kdiff[0]) - int_kdiff[1] = nint(kdiff[1]) - int_kdiff[2] = nint(kdiff[2]) - - if (abs(int_kdiff[0] - kdiff[0]) < _atol and - abs(int_kdiff[1] - kdiff[1]) < _atol and - abs(int_kdiff[2] - kdiff[2]) < _atol): - - #bz2ibz_view[ik_bz] = ik_ibz - bz2ibz[ik_bz] = ik_ibz - #print(ik_bz, ik_ibz) - #p[ik_bz] = ik_ibz - #ktabi[ik_bz] = isym - #ktabo[ik_bz] = itime - #umklp[ik_bz] = g0 - found = 1 - break - - return bz2ibz - #print([bz2ibz[i] for i in range(len(bz))]) - #return [bz2ibz[i] for i in range(len(bz))] - #return np.asarray(bz2ibz) - #return np.asarray(bz2ibz) - - -cdef _capi_mesh2ibz(const int len_bz, - const double bz_arr[][3], - const int len_ibz, - const double ibz_arr[][3], - const int nsym, - const int timrev, - const int symrec[][3][3], - const double atol, - long int bz2ibz[], - #int bz2ibz[], - #int bz2ibz[], - ): - - cdef: - unsigned int ik_bz, ik_ibz, found, i, j, isym, itime - int time_sign, - int int_kdiff[3] - double kdiff[3], kbz[3], kibz[3], krot[3] - - for ik_bz in range(len_bz): - kbz[0] = bz_arr[ik_bz][0] - kbz[1] = bz_arr[ik_bz][1] - kbz[2] = bz_arr[ik_bz][2] - - found = 0 - for ik_ibz in range(len_ibz): - if found != 0: break - kibz[0] = ibz_arr[ik_ibz][0] - kibz[1] = ibz_arr[ik_ibz][1] - kibz[2] = ibz_arr[ik_ibz][2] - - for itime in range(timrev): - time_sign = +1 - if itime == 2: time_sign = -1 - - for isym in range(nsym): - for i in range(3): - krot[i] = 0.0 - for j in range(3): - krot[i] += symrec[isym][i][j] * kibz[j] - krot[i] = krot[i] * time_sign - - kdiff[0] = krot[0] - kbz[0] - kdiff[1] = krot[1] - kbz[1] - kdiff[2] = krot[2] - kbz[2] - - int_kdiff[0] = int(floor(kdiff[0]+0.5)) - int_kdiff[1] = int(floor(kdiff[1]+0.5)) - int_kdiff[2] = int(floor(kdiff[2]+0.5)) - - if (abs(int_kdiff[0] - kdiff[0]) < atol and - abs(int_kdiff[1] - kdiff[1]) < atol and - abs(int_kdiff[2] - kdiff[2]) < atol): - - bz2ibz[ik_bz] = ik_ibz - #ktabo[ik_bz] = isym - #ktabi[ik_bz] = itime - #umklp[ik_bz,:] = g0 - found = 1 - break diff --git a/abipy/extensions/test_kpoints.py b/abipy/extensions/test_kpoints.py deleted file mode 100755 index e6ac233f5..000000000 --- a/abipy/extensions/test_kpoints.py +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, division, unicode_literals, absolute_import - -import numpy as np - -from abipy.core.kpoints import issamek - -def slow_mesh2ibz(structure, bz, ibz): - #print("bz",bz) - #print("ibz",ibz) - bz2ibz = -np.ones(len(bz), dtype=np.int) - - for ik_bz, kbz in enumerate(bz): - #print("kbz",kbz) - found = False - - for ik_ibz, kibz in enumerate(ibz): - #print("kibz",kibz) - if found: break - for symmop in structure.spacegroup: - krot = symmop.rotate_k(kibz.frac_coords) - if issamek(krot, kbz): - bz2ibz[ik_bz] = ik_ibz - found = True - break - - return bz2ibz - - -def map_mesh2ibz(structure, mpdivs, shifts, ibz): - """ - This function computes the mapping between the - points in the full BZ and the points in the IBZ. - - Args: - structure: - pymatgen `Structure` instance. - mpdivs - The three MP divisions - shifts: - Array-like object with the MP shift. - ibz: - array-like object with the reduced coordinates of the - points in the IBZ. - - Returns - ndarray array that maps the full mesh onto ibz i.e. - - bzmap[idx_bz] = id_ibz - - where idx_bz is the index the BZ and idx_ibz the index in the IBZ. - """ - # Build bz grid. - mpdivs = np.asarray(mpdivs) - - shifts = np.reshape(shifts, (-1,3)) - num_shifts = len(shifts) - - from collections import namedtuple - class KSymmetryTables(namedtuple("KSymmetryTables", "bz2ibz ktabi ktabo")): - pass - - spg = structure.spacegroup - - timrev = 2 if spg.has_timerev else 1 - spg_fdata = spg.to_fortran_arrays() - - # Build mapping. - ibz_fdata = ibz.to_fortran_arrays() - - tables = num_shifts * [None] - - for ish, shift in enumerate(shifts): - kbz, count = np.empty((mpdivs.prod(), 3)), 0 - - for i in range(mpdivs[0]): - x = (i + shift[0]) / mpdivs[0] - for j in range(mpdivs[1]): - y = (j + shift[1]) / mpdivs[1] - for k in range(mpdivs[2]): - z = (k + shift[2]) / mpdivs[2] - kbz[count] = (x, y, z) - count += 1 - - bz2ibz, ktabi, ktabo, ierr = mod.map_bz2ibz(kibz=ibz_fdata.frac_coords, - kbz=np.asfortranarray(kbz.T), - timrev=timrev, - symrec=spg_fdata.symrec, - symafm=spg_fdata.symafm - ) - if ierr != 0: - msg = "map_bz2ibz returned ierr %d, Kmesh is not symmetric" % ierr - #raise KmeshNotSymmetricError(msg) - raise ValueError(msg) - - #for (ik_bz, full_kpt) in enumerate(kbz): - # ik_ibz = bz2ibz[ik_bz] - # isym = ktabo[ik_bz] - # itime = ktabi[ik_bz] - # op = spg[isym + itime - # krot = op.rotate_k(ibz[ik_ibz].frac_coords, wrap_tows=True) - # assert full_kpt == krot - - tables[ish] = KSymmetryTables(bz2ibz=bz2ibz, ktabi=ktabi, ktabo=ktabo) - - return tuple(tables) - - -def main(): - #import m_kpoints - #from m_kpoints import m_kpoints as mod - #print(m_kpoints.__doc__) - #v1 = np.zeros(3) - #v2 = v1 + 1.0 - #print(v1, v2) - - #ans, g0 = mod.isamek(v1, v2) - #print(ans,g0) - - from abipy.core.kpoints import IrredZone, kmesh_from_mpdivs - - filename = "/Users/gmatteo/Coding/abipy/abipy/data/runs/data_si_ebands/outdata/si_scf_GSR.nc" - structure = Structure.from_file(filename) - - ibz = IrredZone.from_file(filename) - #print(ibz) - - mpdivs = [8, 8, 8] - shifts = [0.0, 0.0, 0.0] - - #tables = map_mesh2ibz(structure, mpdivs, shifts, ibz) - - bz = kmesh_from_mpdivs(mpdivs, shifts) - - ktab = slow_map_mesh2ibz(structure, bz, ibz.frac_coords) - -if __name__ == "__main__": - main() diff --git a/abipy/flowtk/__init__.py b/abipy/flowtk/__init__.py index 905bc8f78..373b84d71 100644 --- a/abipy/flowtk/__init__.py +++ b/abipy/flowtk/__init__.py @@ -1,32 +1,27 @@ -from __future__ import division, print_function, unicode_literals, absolute_import - +# flake8: noqa import os import tempfile from monty.termcolor import cprint from pymatgen.io.abinit.abiobjects import * -#from pymatgen.io.abinit.calculations import * -from pymatgen.io.abinit.events import EventsParser, autodoc_event_handlers -#from pymatgen.io.abinit.qadapters import * -from pymatgen.io.abinit.qadapters import show_qparams, all_qtypes -from pymatgen.io.abinit.netcdf import NetcdfReader -from pymatgen.io.abinit.launcher import PyFlowScheduler, PyLauncher from pymatgen.io.abinit.pseudos import Pseudo, PseudoTable, PseudoParser -from pymatgen.io.abinit.wrappers import Mrgscr, Mrgddb, Mrggkk, Cut3D # Fold2Bloch -try: - from pymatgen.io.abinit.wrappers import Fold2Bloch -except ImportError: - pass -from pymatgen.io.abinit.nodes import Status -from pymatgen.io.abinit.tasks import * -from pymatgen.io.abinit.tasks import EphTask -from pymatgen.io.abinit.works import * -from pymatgen.io.abinit.flows import (Flow, G0W0WithQptdmFlow, bandstructure_flow, PhononFlow, - g0w0_flow, phonon_flow, phonon_conv_flow, NonLinearCoeffFlow) -from pymatgen.io.abinit.abitimer import AbinitTimerParser, AbinitTimerSection -from pymatgen.io.abinit.abiinspect import GroundStateScfCycle, D2DEScfCycle - -from abipy.flowtk.works import * +from pymatgen.io.abinit.netcdf import NetcdfReader +from .launcher import PyFlowScheduler, PyLauncher +from .qadapters import show_qparams, all_qtypes +from .wrappers import Mrgscr, Mrgddb, Cut3D, Fold2Bloch +from .nodes import Status +from .tasks import * +from .tasks import EphTask, ElasticTask +from .works import * +from .flows import (Flow, G0W0WithQptdmFlow, bandstructure_flow, PhononFlow, phonon_conv_flow, + g0w0_flow, NonLinearCoeffFlow) +from .abitimer import AbinitTimerParser, AbinitTimerSection +from pymatgen.io.abinit.abiinspect import GroundStateScfCycle, D2DEScfCycle, yaml_read_kpoints, yaml_read_irred_perts + +from .events import EventsParser, autodoc_event_handlers +#from abipy.flowtk.works import * +#from abipy.flowtk.gs_works import EosWork +from abipy.flowtk.dfpt_works import ElasticWork, NscfDdksWork def flow_main(main): # pragma: no cover @@ -87,7 +82,7 @@ def execute(): if e.retcode == 0: continue lines = e.log_file.readlines() i = len(lines) - 50 if len(lines) >= 50 else 0 - print("Last 50 line from logfile:") + print("Last 50 line from log file:") print("".join(lines[i:])) raise RuntimeError("flow.abivalidate_input failed. See messages above.") else: diff --git a/abipy/flowtk/abiinspect.py b/abipy/flowtk/abiinspect.py index a7a462df6..8a5782290 100644 --- a/abipy/flowtk/abiinspect.py +++ b/abipy/flowtk/abiinspect.py @@ -1,3 +1,2 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - +# flake8: noqa from pymatgen.io.abinit.abiinspect import * diff --git a/abipy/flowtk/abiobjects.py b/abipy/flowtk/abiobjects.py index f0174d77f..a7fb83796 100644 --- a/abipy/flowtk/abiobjects.py +++ b/abipy/flowtk/abiobjects.py @@ -1,16 +1,10 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - +# flake8: noqa import collections from pymatgen.core.units import Energy from pymatgen.io.abinit.abiobjects import * -#__all__ = [ -# "LdauParams", -# "LexxParams", -#] - class LujForSpecie(collections.namedtuple("LdauForSpecie", "l u j unit")): """ This object stores the value of l, u, j used for a single atomic specie. @@ -25,7 +19,7 @@ def __new__(cls, l, u, j, unit): """ l = l u, j = Energy(u, unit), Energy(j, unit) - return super(cls, LujForSpecie).__new__(cls, l, u, j, unit) + return super().__new__(cls, l, u, j, unit) class LdauParams(object): diff --git a/abipy/flowtk/abiphonopy.py b/abipy/flowtk/abiphonopy.py index a963e62cb..20b832538 100644 --- a/abipy/flowtk/abiphonopy.py +++ b/abipy/flowtk/abiphonopy.py @@ -1,6 +1,5 @@ # coding: utf-8 """Interface between phonopy and abipy workflow model.""" -from __future__ import print_function, division, unicode_literals, absolute_import import os import numpy as np @@ -13,8 +12,8 @@ import warnings warnings.warn("phonopy is required by abiphonopy. Install it with conda or pip install phonopy") -from pymatgen.io.abinit.works import Work from abipy.core.structure import Structure +from abipy.flowtk.works import Work __all__ = [ @@ -50,22 +49,22 @@ class PhonopyWork(Work): .. attribute:: scdims(3) - numpy arrays with the number of cells in the supercell along the three reduced directions + numpy arrays with the number of cells in the supercell along the three reduced directions .. attribute:: phonon - :class:`Phonopy` object used to construct the supercells with displaced atoms. + :class:`Phonopy` object used to construct the supercells with displaced atoms. .. attribute:: phonopy_tasks - List of :class:`ScfTask`. Each task compute the forces in one perturbed supercell. + List of :class:`ScfTask`. Each task compute the forces in one perturbed supercell. .. attribute:: bec_tasks .. attribute:: cpdata2dst - If not None, the work will copy the output results to the outdir of the flow - once all_ok is invoked. Note that cpdata2dst must be an absolute path. + If not None, the work will copy the output results to the outdir of the flow + once all_ok is invoked. Note that cpdata2dst must be an absolute path. """ @classmethod @@ -73,18 +72,13 @@ def from_gs_input(cls, gsinp, scdims, phonopy_kwargs=None, displ_kwargs=None): """ Build the work from an :class:`AbinitInput` object representing a GS calculations. - Args: - gsinp: - :class:`AbinitInput` object representing a GS calculation in the initial unit cell. - scdims: - Number of unit cell replicas along the three reduced directions. - phonopy_kwargs: - (Optional) dictionary with arguments passed to Phonopy constructor. - displ_kwargs: - (Optional) dictionary with arguments passed to generate_displacements. - - Return: - PhonopyWork instance. + Args: + gsinp::class:`AbinitInput` object representing a GS calculation in the initial unit cell. + scdims: Number of unit cell replicas along the three reduced directions. + phonopy_kwargs: (Optional) dictionary with arguments passed to Phonopy constructor. + displ_kwargs: (Optional) dictionary with arguments passed to generate_displacements. + + Return: PhonopyWork instance. """ new = cls() new.phonopy_tasks, new.bec_tasks = [], [] @@ -125,15 +119,15 @@ def on_all_ok(self): """ phonon = self.phonon - # Write POSCAR with initial unit cell. + # Write POSCAR with initial unit cell. structure = structure_from_atoms(phonon.get_primitive()) structure.to(filename=self.outdir.path_in("POSCAR")) - # Write yaml file with displacements. + # Write yaml file with displacements. supercell = phonon.get_supercell() displacements = phonon.get_displacements() - directions = phonon.get_displacement_directions() - file_IO.write_disp_yaml(displacements, supercell, directions=directions, + #directions = phonon.get_displacement_directions() + file_IO.write_disp_yaml(displacements, supercell, # directions=directions, filename=self.outdir.path_in('disp.yaml')) # Extract forces from the main Abinit output files. @@ -141,7 +135,7 @@ def on_all_ok(self): num_atoms = supercell.get_number_of_atoms() force_sets = parse_set_of_forces(num_atoms, forces_filenames) - # Write FORCE_SETS file. + # Write FORCE_SETS file. displacements = file_IO.parse_disp_yaml(filename=self.outdir.path_in('disp.yaml')) num_atoms = displacements['natom'] for forces, disp in zip(force_sets, displacements['first_atoms']): @@ -191,7 +185,7 @@ def on_all_ok(self): if self.cpdata2dst: self.outdir.copy_r(self.cpdata2dst) - return super(PhonopyWork, self).on_all_ok() + return super().on_all_ok() class PhonopyGruneisenWork(Work): @@ -205,33 +199,26 @@ class PhonopyGruneisenWork(Work): .. attribute:: scdims(3) - numpy arrays with the number of cells in the supercell along the three reduced directions. - + numpy arrays with the number of cells in the supercell along the three reduced directions. """ @classmethod def from_gs_input(cls, gsinp, voldelta, scdims, phonopy_kwargs=None, displ_kwargs=None): """ Build the work from an :class:`AbinitInput` object representing a GS calculations. - Args: - gsinp: - :class:`AbinitInput` object representing a GS calculation in the initial unit cell. - voldelta: - Absolute increment for unit cell volume. The three volumes are: - [v0 - voldelta, v0, v0 + voldelta] where v0 is taken from gsinp.structure. - scdims: - Number of unit cell replicas along the three reduced directions. - phonopy_kwargs: - (Optional) dictionary with arguments passed to Phonopy constructor. - displ_kwargs: - (Optional) dictionary with arguments passed to generate_displacements. - - Return: - `PhonopyGruneisenWork` instance. + Args: + gsinp: :class:`AbinitInput` object representing a GS calculation in the initial unit cell. + voldelta: Absolute increment for unit cell volume. The three volumes are: + [v0 - voldelta, v0, v0 + voldelta] where v0 is taken from gsinp.structure. + scdims: Number of unit cell replicas along the three reduced directions. + phonopy_kwargs: (Optional) dictionary with arguments passed to Phonopy constructor. + displ_kwargs: (Optional) dictionary with arguments passed to generate_displacements. + + Return: `PhonopyGruneisenWork` instance. """ new = cls() - # Save arguments that will be used to call phonopy for creating + # Save arguments that will be used to call phonopy for creating # the supercells with the displacements once the three volumes have been relaxed. new.scdims = np.array(scdims) if new.scdims.shape != (3,): @@ -243,7 +230,7 @@ def from_gs_input(cls, gsinp, voldelta, scdims, phonopy_kwargs=None, displ_kwarg v0 = gsinp.structure.volume if voldelta <= 0: raise ValueError("voldelta must be > 0 but got %s" % voldelta) - volumes = [v0 - voldelta, v0, v0 + voldelta] + volumes = [v0 - voldelta, v0, v0 + voldelta] if any(v <= 0 for v in volumes): raise ValueError("volumes must be > 0 but got %s" % str(volumes)) @@ -266,7 +253,7 @@ def on_all_ok(self): have reached status S_OK. """ self.add_phonopy_works_and_build() - return super(PhonopyGruneisenWork, self).on_all_ok() + return super().on_all_ok() def add_phonopy_works_and_build(self): """ diff --git a/abipy/flowtk/abitimer.py b/abipy/flowtk/abitimer.py new file mode 100644 index 000000000..6093e3363 --- /dev/null +++ b/abipy/flowtk/abitimer.py @@ -0,0 +1,2 @@ +# flake8: noqa +from pymatgen.io.abinit.abitimer import AbinitTimerParserError, AbinitTimerParser, AbinitTimerSection diff --git a/abipy/flowtk/db.py b/abipy/flowtk/db.py new file mode 100644 index 000000000..5bcd57f8c --- /dev/null +++ b/abipy/flowtk/db.py @@ -0,0 +1,166 @@ +# coding: utf-8 +# Copyright (c) Pymatgen Development Team. +# Distributed under the terms of the MIT License. +""" +Objects and helper function used to store the results in a MongoDb database +""" +import collections +import copy + +from .utils import as_bool + + +#def mongo_getattr(rec, key): +# """ +# Get value from dict using MongoDB dot-separated path semantics. +# For example: +# +# >>> assert mongo_getattr({'a': {'b': 1}, 'x': 2}, 'a.b') == 1 +# >>> assert mongo_getattr({'a': {'b': 1}, 'x': 2}, 'x') == 2 +# >>> assert mongo_getattr({'a': {'b': 1}, 'x': 2}, 'a.b.c') is None +# +# :param rec: mongodb document +# :param key: path to mongo value +# :param default: default to return if not found +# :return: value, potentially nested, or default if not found +# :raise: AttributeError, if record is not a dict or key is not found. +# """ +# if not isinstance(rec, collections..abc.Mapping): +# raise AttributeError('input record must act like a dict') +# if not rec: +# raise AttributeError('Empty dict') +# +# if not '.' in key: +# return rec.get(key) +# +# for key_part in key.split('.'): +# if not isinstance(rec, collections.abc.Mapping): +# raise AttributeError('not a mapping for rec_part %s' % key_part) +# if not key_part in rec: +# raise AttributeError('key %s not in dict %s' % key) +# rec = rec[key_part] +# +# return rec + + +def scan_nestdict(d, key): + """ + Scan a nested dict d, and return the first value associated to the given key. + Returns None if key is not found. + + >>> d = {0: 1, 1: {"hello": {"world": {None: [1,2,3]}}}, "foo": [{"bar": 1}, {"color": "red"}]} + >>> assert scan_nestdict(d, 1) == {"hello": {"world": {None: [1,2,3]}}} + >>> assert scan_nestdict(d, "hello") == {"world": {None: [1,2,3]}} + >>> assert scan_nestdict(d, "world") == {None: [1,2,3]} + >>> assert scan_nestdict(d, None) == [1,2,3] + >>> assert scan_nestdict(d, "color") == "red" + """ + if isinstance(d, (list, tuple)): + for item in d: + res = scan_nestdict(item, key) + if res is not None: + return res + return None + + if not isinstance(d, collections.abc.Mapping): + return None + + if key in d: + return d[key] + else: + for v in d.values(): + res = scan_nestdict(v, key) + if res is not None: + return res + return None + + +class DBConnector(object): + + #DEFAULTS = dict( + # database="abinit", + # collection=None, + # port=None, + # host=None, + # user=None, + # password=None, + #} + + @classmethod + def autodoc(cls): + return """ + enabled: # yes or no (default yes) + database: # Name of the mongodb database (default abinit) + collection: # Name of the collection (default test) + host: # host address e.g. 0.0.0.0 (default None) + port: # port e.g. 8080 (default None) + user: # user name (default None) + password: # password for authentication (default None) + """ + + def __init__(self, **kwargs): + if not kwargs: + self.enabled = False + return + + self.enabled = as_bool(kwargs.pop("enabled", True)) + self.dbname = kwargs.pop("database", "abinit") + self.collection = kwargs.pop("collection", "test") + self.host = kwargs.pop("host", None) + self.port = kwargs.pop("port", None) + self.user = kwargs.pop("user", None) + self.password = kwargs.pop("password", None) + + if kwargs: + raise ValueError("Found invalid keywords in the database section:\n %s" % kwargs.keys()) + + def __bool__(self): + return self.enabled + + __nonzero__ = __bool__ + + def __repr__(self): + return "<%s object at %s>" % (self.__class__.__name__, id(self)) + + #def __str__(self): + # return str(self.config) + + def deepcopy(self): + return copy.deepcopy(self) + + def set_collection_name(self, value): + """Set the name of the collection, return old value""" + old = self.collection + self.collection = str(value) + return old + + def get_collection(self, **kwargs): + """ + Establish a connection with the database. + + Returns MongoDb collection + """ + from pymongo import MongoClient + + if self.host and self.port: + client = MongoClient(host=self.config.host, port=self.config.port) + else: + client = MongoClient() + db = client[self.dbname] + + # Authenticate if needed + if self.user and self.password: + db.autenticate(self.user, password=self.password) + + return db[self.collection] + + +if __name__ == "__main__": + connector = DBConnector() + print(connector.get_collection()) + #connector.set_collection_name("foo") + print(connector) + print(connector.get_collection()) + + #import unittest + #unittest.main() diff --git a/abipy/flowtk/dfpt_works.py b/abipy/flowtk/dfpt_works.py index 354c10299..8f60a1661 100644 --- a/abipy/flowtk/dfpt_works.py +++ b/abipy/flowtk/dfpt_works.py @@ -1,10 +1,115 @@ # coding: utf-8 """Work subclasses related to DFTP.""" -from __future__ import print_function, division, unicode_literals, absolute_import -import numpy as np +from .works import Work, MergeDdb -from .works import Work + +class ElasticWork(Work, MergeDdb): + """ + This Work computes the elastic constants and (optionally) the piezoelectric tensor. + It consists of Response function calculations for: + + * rigid-atom elastic tensor + * rigid-atom piezoelectric tensor + * interatomic force constants at gamma + * Born effective charges + + The structure is assumed to be already relaxed + + Create a `Flow` for phonon calculations. The flow has one works with: + + - 1 GS Task + - 3 DDK Task + - 4 Phonon Tasks (Gamma point) + - 6 Elastic tasks (3 uniaxial + 3 shear strain) + + The Phonon tasks and the elastic task will read the DDK produced at the beginning + """ + @classmethod + def from_scf_input(cls, scf_input, with_relaxed_ion=True, with_piezo=False, with_dde=False, + tolerances=None, den_deps=None, manager=None): + """ + Args: + scf_input: + with_relaxed_ion: + with_piezo: + with_dde: Compute electric field perturbations. + tolerances: Dict of tolerances + den_deps: + manager: + + Similar to `from_scf_task`, the difference is that this method requires + an input for SCF calculation instead of a ScfTask. All the tasks (Scf + Phonon) + are packed in a single Work whereas in the previous case we usually have multiple works. + """ + if tolerances is None: tolerances = {} + new = cls(manager=manager) + + # Register task for WFK0 calculation (either SCF or NCSCF if den_deps is given) + if den_deps is None: + wfk_task = new.register_scf_task(scf_input) + else: + tolwfr = 1.0e-20 + if "nscf" in tolerances: + tolwfr = tolerances["nscf"]["tolwfr"] + nscf_input = scf_input.new_with_vars(iscf=-2, tolwfr=tolwfr) + wfk_task = new.register_nscf_task(nscf_input, deps=den_deps) + + if with_piezo or with_dde: + # Calculate the ddk wf's needed for piezoelectric tensor and Born effective charges. + #ddk_tolerance = {"tolwfr": 1.0e-20} + ddk_tolerance = tolerances.get("ddk", None) + ddk_multi = scf_input.make_ddk_inputs(tolerance=ddk_tolerance, manager=manager) + ddk_tasks = [] + for inp in ddk_multi: + ddk_task = new.register_ddk_task(inp, deps={wfk_task: "WFK"}) + ddk_tasks.append(ddk_task) + ddk_deps = {ddk_task: "DDK" for ddk_task in ddk_tasks} + + if with_dde: + # Add tasks for electric field perturbation. + #dde_tolerance = None + dde_tolerance = tolerances.get("dde", None) + dde_multi = scf_input.make_dde_inputs(tolerance=dde_tolerance, use_symmetries=True, manager=manager) + dde_deps = {wfk_task: "WFK"} + dde_deps.update(ddk_deps) + for inp in dde_multi: + new.register_dde_task(inp, deps=dde_deps) + + # Build input files for strain and (optionally) phonons. + #strain_tolerance = {"tolvrs": 1e-10} + strain_tolerance = tolerances.get("strain", None) + strain_multi = scf_input.make_strain_perts_inputs(tolerance=strain_tolerance, manager=manager, + phonon_pert=with_relaxed_ion, kptopt=2) + + if with_relaxed_ion: + # Phonon perturbation (read DDK if piezo). + ph_deps = {wfk_task: "WFK"} + if with_piezo: ph_deps.update(ddk_deps) + for inp in strain_multi: + if inp.get("rfphon", 0) == 1: + new.register_phonon_task(inp, deps=ph_deps) + + # Finally compute strain pertubations (read DDK if piezo). + elast_deps = {wfk_task: "WFK"} + if with_piezo: elast_deps.update(ddk_deps) + for inp in strain_multi: + if inp.get("rfstrs", 0) != 0: + new.register_elastic_task(inp, deps=elast_deps) + + return new + + def on_all_ok(self): + """ + This method is called when all the tasks of the Work reach S_OK. + Ir runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the `Work`. + """ + # Merge DDB files. + out_ddb = self.merge_ddb_files(delete_source_ddbs=False, only_dfpt_tasks=False) + results = self.Results(node=self, returncode=0, message="DDB merge done") + + return results class NscfDdksWork(Work): @@ -20,14 +125,12 @@ class NscfDdksWork(Work): def from_scf_task(cls, scf_task, ddk_ngkpt, ddk_shiftk, ddk_nband, manager=None): """ Build NscfDdksWork from a scf_task. - Args: scf_task: GS task. Must produce the DEN file required for the NSCF run. ddk_ngkpt: k-mesh used for the NSCF run and the non self-consistent DDK tasks. ddk_shiftk: k-mesh shifts ddk_nband: Number of bands (occupied + empty) used in the NSCF task and the DDKs tasks. manager: TaskManager instance. Use default if None. - Return: NscfDdksWork instance """ new = cls(manager=manager) diff --git a/abipy/flowtk/effmass_works.py b/abipy/flowtk/effmass_works.py new file mode 100644 index 000000000..dd897509c --- /dev/null +++ b/abipy/flowtk/effmass_works.py @@ -0,0 +1,299 @@ +# coding: utf-8 +"""Work subclasses related to effective mass calculations.""" + +import numpy as np +import os + +from monty.json import jsanitize +from abipy.core.kpoints import build_segments +from .nodes import Node +from .works import Work, PhononWork +from .flows import Flow + + +def _get_red_dirs_from_opts(red_dirs, cart_dirs, reciprocal_lattice): + """ + Helper function to compute the list of directions from user input. Return numpy array. + """ + all_red_dirs = [] + if red_dirs is not None: + all_red_dirs.extend(np.reshape(red_dirs, (-1, 3))) + + if cart_dirs is not None: + frac_coords = reciprocal_lattice.get_fractional_coords(np.reshape(cart_dirs, (-1, 3))) + all_red_dirs.extend(frac_coords) + + return np.reshape(all_red_dirs, (-1, 3)) + + +class EffMassLineWork(Work): + """ + Work for the computation of effective masses via finite differences along a k-line. + Useful for cases such as NC+SOC where DFPT is not implemented or if one is interested + in non-parabolic behaviour. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EffMassLineWork + """ + + @classmethod + def from_scf_input(cls, scf_input, k0_list, step=0.01, npts=15, + red_dirs=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], cart_dirs=None, + den_node=None, manager=None): + """ + Build the Work from an |AbinitInput| representing a GS-SCF calculation. + + Args: + scf_input: |AbinitInput| for GS-SCF used as template to generate the other inputs. + k0_list: List with the reduced coordinates of the k-points where effective masses are wanted. + step: Step for finite difference in Angstrom^-1 + npts: Number of points sampled around each k-point for each direction. + red_dirs: List of reduced directions used to generate the segments passing through the k-point + cart_dirs: List of Cartesian directions used to generate the segments passing through the k-point + den_node: Path to the DEN file or Task object producing a DEN file. + Can be used to avoid the initial SCF calculation if a DEN file is already available. + If None, a GS calculation is performed. + manager: |TaskManager| instance. Use default if None. + """ + if npts < 3: + raise ValueError("Number of points: `%s` should be >= 3 for finite differences" % npts) + + # Define list of directions from user input. + reciprocal_lattice = scf_input.structure.lattice.reciprocal_lattice + all_red_dirs = _get_red_dirs_from_opts(red_dirs, cart_dirs, reciprocal_lattice) + kpts = build_segments(k0_list, npts, step, all_red_dirs, reciprocal_lattice) + + # Now build NSCF input with explicit list of k-points. + nscf_input = scf_input.make_nscf_kptopt0_input(kpts) + + new = cls(manager=manager) + + # Need to perform SCF run if DEN file is not available. + scf_task = new.register_scf_task(scf_input) if den_node is None else Node.as_node(den_node) + + new.register_nscf_task(nscf_input, deps={scf_task: "DEN"}) + return new + + +class EffMassDFPTWork(Work): + """ + Work for the computation of effective masses with DFPT. + Requires explicit list of k-points and range of bands. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EffMassDFPTWork + """ + + @classmethod + def from_scf_input(cls, scf_input, k0_list, effmass_bands_f90, den_node=None, manager=None): + """ + Build the Work from an |AbinitInput| representing a GS-SCF calculation. + + Args: + scf_input: |AbinitInput| for GS-SCF used as template to generate the other inputs. + k0_list: List with the reduced coordinates of the k-points where effective masses are wanted. + effmass_bands_f90: (nkpt, 2) array with band range for effmas computation. + WARNING: Assumes Fortran convention with indices starting from 1. + den_node: Path to the DEN file or Task object producing a DEN file. + Can be used to avoid the initial SCF calculation if a DEN file is already available. + If None, a GS calculation is performed. + manager: |TaskManager| instance. Use default if None. + """ + multi = scf_input.make_dfpt_effmass_input(k0_list, effmass_bands_f90) + nscf_input, effmass_input = multi[0], multi[1] + + new = cls(manager=manager) + + # Important: keep a reference to the Frohlich input that can be used to run EPH calculations if needed. + new.frohlich_input = multi[2] + + # Need to perform SCF run if DEN file is not available + scf_task = new.register_scf_task(scf_input) if den_node is None else Node.as_node(den_node) + + nscf_task = new.register_nscf_task(nscf_input, deps={scf_task: "DEN"}) + new.register_effmass_task(effmass_input, deps={scf_task: "DEN", nscf_task: "WFK"}) + return new + + +class EffMassAutoDFPTWork(Work): + """ + Work for the automatic computation of effective masses with DFPT. + Band extrema are automatically detected by performing a NSCF calculation + along a high-symmetry k-path with ndivsm. + Requires more computation that EffMassWork since input variables (kpoints and band range) + are computed at runtime. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: EffMassAutoDFPTWork + """ + + @classmethod + def from_scf_input(cls, scf_input, ndivsm=15, tolwfr=1e-20, manager=None): + """ + Build the Work from an |AbinitInput| representing a GS-SCF calculation. + + Args: + scf_input: |AbinitInput| for GS-SCF used as template to generate the other inputs. + ndivsm: Number of divisions used to sample the smallest segment of the k-path. + tolwfr: Tolerance on residuals for NSCF calculation + manager: |TaskManager| instance. Use default if None. + """ + if scf_input.get("nsppol", 1) != 1: + raise NotImplementedError("Magnetic semiconductors with nsppol = 2 are not implemented!") + + new = cls(manager=manager) + # Keep a copy of the initial input. + new.scf_input = scf_input.deepcopy() + + # Need SCF run to get DEN file. + new.scf_task = new.register_scf_task(new.scf_input) + + # Perform NSCF run along k-path that will be used to find band extrema. + bands_input = scf_input.make_ebands_input(ndivsm=ndivsm, tolwfr=tolwfr) + new.bands_task = new.register_nscf_task(bands_input, deps={new.scf_task: "DEN"}) + + return new + + def on_all_ok(self): + """ + This method is called once the `Work` is completed i.e. when all tasks have reached status S_OK. + Here, we read the band structure from GSR to find the position of the band edges and use these values + to generate a new work for effective masses with DFPT. + """ + with self.bands_task.open_gsr() as gsr: + ebands = gsr.ebands + # Warning: Assuming semiconductor with spin-unpolarized band energies. + # At present, Abinit input variables do not take into account nsppol. + ebands.set_fermie_to_vbm() + # Find k0_list and effmass_bands_f90 + k0_list, effmass_bands_f90 = ebands.get_kpoints_and_band_range_for_edges() + + # Create the work for effective mass computation with DFPT and add it to the flow. + # Keep a reference in generated_effmass_dfpt_work. + work = EffMassDFPTWork.from_scf_input(self.scf_input, k0_list, effmass_bands_f90, den_node=self.scf_task) + + self.generated_effmass_dfpt_work = work + self.flow.register_work(work) + self.flow.allocate() + self.flow.build_and_pickle_dump() + self.flow.finalized = False + + return super().on_all_ok() + + +class FrohlichZPRFlow(Flow): + """ + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: FrohlichZPRFlow + """ + + @classmethod + def from_scf_input(cls, workdir, scf_input, ddb_node=None, ndivsm=15, tolwfr=1e-20, metadata=None, manager=None): + """ + Build the Work from an |AbinitInput| representing a GS-SCF calculation. + Final results are stored in the "zprfrohl_results.json" in the outdata directory of the flow. + + Args: + workdir: Working directory. + scf_input: |AbinitInput| for GS-SCF used as template to generate the other inputs. + ddb_node: Path to an external DDB file that is used to avoid the calculation of BECS/eps_inf and phonons. + If None, a DFPT calculation is automatically performed by the flow. + ndivsm: Number of divisions used to sample the smallest segment of the k-path. + tolwfr: Tolerance on residuals for NSCF calculation + manager: |TaskManager| instance. Use default if None. + metadata: Dictionary with metadata addeded to the final JSON file. + """ + new = cls(workdir=workdir, manager=manager) + new.metadata = jsanitize(metadata) if metadata is not None else None + + # Build work for the automatic computation of effective masses. + new.effmass_auto_work = EffMassAutoDFPTWork.from_scf_input(scf_input, ndivsm=ndivsm, tolwfr=tolwfr) + new.register_work(new.effmass_auto_work) + new.scf_task, new.ebands_kpath_task = new.effmass_auto_work[0], new.effmass_auto_work[1] + + if ddb_node is not None: + new.ddb_node = Node.as_node(ddb_node) + new.ddb_file_path_if_ddb_node = os.path.abspath(ddb_node) + else: + # Compute DDB with BECS and eps_inf. + new.ddb_file_path_if_ddb_node = None + ph_work = PhononWork.from_scf_task(new.scf_task, qpoints=[0, 0, 0], + is_ngqpt=False, tolerance=None, with_becs=True, + ddk_tolerance=None) + new.register_work(ph_work) + new.ddb_node = ph_work + + return new + + def on_all_ok(self): + """ + This method is called when all the works in the flow have reached S_OK. + This method shall return True if the calculation is completed or + False if the execution should continue due to side-effects such as adding a new work to the flow. + """ + if self.on_all_ok_num_calls > 0: return True + self.on_all_ok_num_calls += 1 + + work = Work() + inp = self.effmass_auto_work.generated_effmass_dfpt_work.frohlich_input + wfk_task = self.effmass_auto_work.generated_effmass_dfpt_work[0] + self.effmass_task = self.effmass_auto_work.generated_effmass_dfpt_work[1] + + deps = {wfk_task: "WFK", self.ddb_node: "DDB", self.effmass_task: "EFMAS.nc"} + self.frohl_task = work.register_eph_task(inp, deps=deps) + self.register_work(work) + + self.allocate() + self.build_and_pickle_dump() + return False + + def finalize(self): + """ + This method is called when the flow is completed. + Here we write the final results in the "zprfrohl_results.json" file + in the `outdata` directory of the flow + """ + d = {} + if self.metadata is not None: d.update({"metadata": self.metadata}) + + # Add GS results. + with self.scf_task.open_gsr() as gsr: + d["gsr_scf_path"] = gsr.filepath + d["pressure_GPa"] = float(gsr.pressure) + d["max_force_eV_Ang"] = float(gsr.max_force) + d["structure"] = gsr.structure + + # Add NSCF band structure. + with self.ebands_kpath_task.open_gsr() as gsr: + d["gsr_nscf_kpath"] = gsr.filepath + gsr.ebands.set_fermie_to_vbm() + d["ebands_kpath"] = gsr.ebands + #d["ebands_info"] = gsr.ebands.get_dict4pandas(with_geo=False, with_spglib=False) + + # TODO + # Extract results from run.abo + #d["effmass_results"] = self.effmass_task.yaml_parse_results() + #d["frohl_results"] = self.frohl_task.yaml_parse_results() + + # Add epsinf, e0, BECS, alpha and DDB as string. + from abipy import abilab + if self.ddb_file_path_if_ddb_node is not None: + ddb_filepath = self.ddb_file_path_if_ddb_node + else: + ddb_filepath = self.ddb_node.outdir.path_in("out_DDB") + + with abilab.abiopen(ddb_filepath) as ddb: + d["ddb_path"] = ddb.filepath + d["ddb_string"] = ddb.get_string() + epsinf, becs = ddb.anaget_epsinf_and_becs(chneut=1) + gen = ddb.anaget_dielectric_tensor_generator(asr=2, chneut=1, dipdip=1) + eps0 = gen.tensor_at_frequency(w=0.0) + d["becs"] = becs + d["epsinf_cart"] = epsinf + # FIXME Complex is not supported by JSON. + d["eps0_cart"] = eps0.real + + #print(d) + abilab.mjson_write(d, self.outdir.path_in("zprfrohl_results.json"), indent=4) + + return super().finalize() diff --git a/abipy/flowtk/eph_flows.py b/abipy/flowtk/eph_flows.py new file mode 100644 index 000000000..b9c6f0c58 --- /dev/null +++ b/abipy/flowtk/eph_flows.py @@ -0,0 +1,206 @@ +# coding: utf-8 +""" +Flows for electron-phonon calculations (high-level interface) +""" +import numpy as np + +from abipy.core.kpoints import kpath_from_bounds_and_ndivsm +from .works import Work, PhononWork, PhononWfkqWork +from .flows import Flow + + +class EphPotFlow(Flow): + r""" + This flow computes the e-ph scattering potentials on a q-mesh defined by ngqpt + and a list of q-points (usually a q-path) specified by the user. + The DFPT potentials on the q-mesh are merged in the DVDB located in the outdata + of the second work while the DFPT potentials on the q-path are merged in the DVDB + located in the outdata of the third work. + These DVDB files are then passed to the EPH code to compute the average over the unit + cell of the periodic part of the scattering potentials as a function of q. + Results are stored in the V1QAVG.nc files of the outdata of the tasks in the fourth work. + """ + + @classmethod + def from_scf_input(cls, workdir, scf_input, ngqpt, qbounds, + ndivsm=5, with_becs=True, ddk_tolerance=None, prepgkk=0, manager=None): + """ + Build the flow from an input file representing a GS calculation. + + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + ngqpt: 3 integers defining the q-mesh. + qbounds: List of boundaries defining the q-path used for the computation of the GKQ files. + The q-path is automatically generated using `ndivsm` and the reciprocal-space metric. + If `ndivsm` is 0, the code assumes that `qbounds` contains the full list of q-points + and no pre-processing is performed. + ndivsm: Number of points in the smallest segment of the path defined by `qbounds`. + Use 0 to pass list of q-points. + with_becs: Activate calculation of Electric field and Born effective charges. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run if `with_becs`. + prepgkk: 1 to activate computation of all 3 * natom perts (debugging option). + manager: |TaskManager| object. + """ + flow = cls(workdir=workdir, manager=manager) + + # First work with GS run. + scf_task = flow.register_scf_task(scf_input)[0] + + # Second work to compute phonons on the input nqgpt q-mesh. + work_qmesh = PhononWork.from_scf_task(scf_task, qpoints=ngqpt, is_ngqpt=True, + with_becs=with_becs, ddk_tolerance=ddk_tolerance) + flow.register_work(work_qmesh) + + if ndivsm > 0: + # Generate list of q-points from qbounds and ndivsm. + qpath_list = kpath_from_bounds_and_ndivsm(qbounds, ndivsm, scf_input.structure) + elif ndivsm == 0: + # Use input list of q-points. + qpath_list = np.reshape(qbounds, (-1, 3)) + else: + raise ValueError("ndivsm cannot be negative. Received ndivsm: %s" % ndivsm) + + # Third Work: compute WFK/WFQ and phonons for qpt in qpath_list. + # Don't include BECS because they have been already computed in the previous work. + work_qpath = PhononWfkqWork.from_scf_task( + scf_task, qpath_list, ph_tolerance=None, tolwfr=1.0e-22, nband=None, + with_becs=False, ddk_tolerance=None, shiftq=(0, 0, 0), is_ngqpt=False, remove_wfkq=True, + prepgkk=prepgkk, manager=manager) + + flow.register_work(work_qpath) + + # Now we compute matrix elements fully ab-initio for each q-point. + eph_work = Work() + + for eph_task in (-15, 15): + eph_inp = scf_input.new_with_vars( + optdriver=7, + ddb_ngqpt=ngqpt, # q-mesh associated to the DDB file. + #dvdb_ngqpt=ngqpt, # q-mesh associated to the DDVDB file. + prtphdos=0, + eph_task=eph_task + ) + + if eph_task == -15: + # Use DVDB with ab-initio POTS along q-path to produce V1QAVG + deps = {work_qmesh: "DDB", work_qpath: "DVDB"} + elif eph_task == 15: + # Use q-mesh to interpolate along the same q-path as above. + deps = {work_qmesh: ["DDB", "DVDB"]} + eph_inp.set_vars(ph_nqpath=len(qpath_list), ph_qpath=qpath_list) + + eph_work.register_eph_task(eph_inp, deps=deps) + + flow.register_work(eph_work) + + return flow + + +class GkqPathFlow(Flow): + r""" + This flow computes the gkq e-ph matrix elements for a list of q-points (usually a q-path). + The results are stored in the GKQ.nc files for the different q-points. These files can be used to analyze the behaviour + of the e-ph matrix elements as a function of qpts with the the objects provided by the abipy.eph.gkq module. + It is also possible to compute the e-ph matrix elements using the interpolated DFPT potentials + if test_ft_interpolation is set to True. + """ + + @classmethod + def from_scf_input(cls, workdir, scf_input, ngqpt, qbounds, + ndivsm=5, with_becs=True, ddk_tolerance=None, + test_ft_interpolation=False, prepgkk=0, manager=None): + """ + Build the flow from an input file representing a GS calculation. + + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + ngqpt: 3 integers defining the q-mesh. + qbounds: List of boundaries defining the q-path used for the computation of the GKQ files. + The q-path is automatically generated using `ndivsm` and the reciprocal-space metric. + If `ndivsm` is 0, the code assumes that `qbounds` contains the full list of q-points + and no pre-processing is performed. + ndivsm: Number of points in the smallest segment of the path defined by `qbounds`. + Use 0 to pass list of q-points. + with_becs: Activate calculation of Electric field and Born effective charges. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run if `with_becs`. + test_ft_interpolation: True to add an extra Work in which the GKQ files are computed + using the interpolated DFPT potentials and the q-mesh defined by `ngqpt`. + The quality of the interpolation depends on the convergence of the BECS, epsinf and `ngqpt`. + prepgkk: 1 to activate computation of all 3 * natom perts (debugging option). + manager: |TaskManager| object. + """ + flow = cls(workdir=workdir, manager=manager) + + # First work with GS run. + scf_task = flow.register_scf_task(scf_input)[0] + + # Second work to compute phonons on the input nqgpt q-mesh. + work_qmesh = PhononWork.from_scf_task(scf_task, qpoints=ngqpt, is_ngqpt=True, + with_becs=with_becs, ddk_tolerance=ddk_tolerance) + flow.register_work(work_qmesh) + + if ndivsm > 0: + # Generate list of q-points from qbounds and ndivsm. + qpath_list = kpath_from_bounds_and_ndivsm(qbounds, ndivsm, scf_input.structure) + elif ndivsm == 0: + # Use input list of q-points. + qpath_list = np.reshape(qbounds, (-1, 3)) + else: + raise ValueError("ndivsm cannot be negative. Received ndivsm: %s" % ndivsm) + + # Third Work. Compute WFK/WFQ and phonons for qpt in qpath_list. + # Don't include BECS because they have been already computed in the previous work. + work_qpath = PhononWfkqWork.from_scf_task( + scf_task, qpath_list, ph_tolerance=None, tolwfr=1.0e-22, nband=None, + with_becs=False, ddk_tolerance=None, shiftq=(0, 0, 0), is_ngqpt=False, remove_wfkq=False, + prepgkk=prepgkk, manager=manager) + + flow.register_work(work_qpath) + + def make_eph_input(scf_inp, ngqpt, qpt): + """ + Build input file to compute GKQ.nc file from GS SCF input. + The calculation requires GS wavefunctions WFK, WFQ, a DDB file and a DVDB file + """ + return scf_inp.new_with_vars( + optdriver=7, + eph_task=-2, + nqpt=1, + qpt=qpt, + ddb_ngqpt=ngqpt, # q-mesh associated to the DDB file. + prtphdos=0, + ) + + # Now we compute matrix elements fully ab-initio for each q-point. + eph_work = Work() + + qseen = set() + for task in work_qpath.phonon_tasks: + qpt = tuple(task.input["qpt"]) + if qpt in qseen: continue + qseen.add(qpt) + t = eph_work.register_eph_task(make_eph_input(scf_input, ngqpt, qpt), deps=task.deps) + t.add_deps({work_qmesh: "DDB", work_qpath: "DVDB"}) + + flow.register_work(eph_work) + + # Here we build another work to compute the gkq matrix elements + # with interpolated potentials along the q-path. + # The potentials are interpolated using the input ngqpt q-mesh. + if test_ft_interpolation: + inteph_work = Work() + qseen = set() + for task in work_qpath.phonon_tasks: + qpt = tuple(task.input["qpt"]) + if qpt in qseen: continue + qseen.add(qpt) + eph_inp = make_eph_input(scf_input, ngqpt, qpt) + # Note eph_use_ftinterp 1 to force the interpolation of the DFPT potentials with eph_task -2. + eph_inp["eph_use_ftinterp"] = 1 + t = inteph_work.register_eph_task(eph_inp, deps=task.deps) + t.add_deps({work_qmesh: ["DDB", "DVDB"]}) + flow.register_work(inteph_work) + + return flow diff --git a/abipy/flowtk/events.py b/abipy/flowtk/events.py index d0c88031d..66911b39c 100644 --- a/abipy/flowtk/events.py +++ b/abipy/flowtk/events.py @@ -1,3 +1,875 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +""" +This module defines the events signaled by abinit during the execution. It also +provides a parser to extract these events form the main output file and the log file. +""" +import sys +import os.path +import datetime +import collections +import ruamel.yaml as yaml +import abc +import logging +import numpy as np -from pymatgen.io.abinit.events import * +from monty.string import indent, is_string +from monty.fnmatch import WildCard +from monty.termcolor import colored +from monty.inspect import all_subclasses +from monty.json import MontyDecoder +from pymatgen.core.structure import Structure +from monty.json import MSONable +from pymatgen.util.serialization import pmg_serialize +from pymatgen.io.abinit.abiinspect import YamlTokenizer + +logger = logging.getLogger(__name__) + +__all__ = [ + "EventsParser", + "get_event_handler_classes", + "ScfConvergenceWarning", + "NscfConvergenceWarning", + "RelaxConvergenceWarning", + "Correction", + "DilatmxError", + "DilatmxErrorHandler", +] + + +def straceback(): + """Returns a string with the traceback.""" + import traceback + return traceback.format_exc() + + +class AbinitEvent(yaml.YAMLObject): + """ + Example (YAML syntax):: + + Normal warning without any handler: + + --- !Warning + message: | + This is a normal warning that won't + trigger any handler in the python code! + src_file: routine_name + src_line: 112 + ... + + Critical warning that will trigger some action in the python code. + + --- !ScfConvergeWarning + message: | + The human-readable message goes here! + src_file: foo.F90 + src_line: 112 + tolname: tolwfr + actual_tol: 1.0e-8 + required_tol: 1.0e-10 + nstep: 50 + ... + + The algorithm to extract the YAML sections is very simple. + + 1) We use YamlTokenizer to extract the documents from the output file + 2) If we have a tag that ends with "Warning", "Error", "Bug", "Comment + we know we have encountered a new ABINIT event + 3) We parse the document with yaml.safe_load(doc.text) and we get the object + + Note that: + # --- and ... become reserved words (whey they are placed at + the begining of a line) since they are used to mark the beginning and + the end of YAML documents. + + # All the possible events should subclass `AbinitEvent` and define + the class attribute yaml_tag so that yaml.safe_load will know how to + build the instance. + """ + color = None + + def __init__(self, src_file, src_line, message): + """ + Basic constructor for :class:`AbinitEvent`. + + Args: + message: String with human-readable message providing info on the event. + src_file: String with the name of the Fortran file where the event is raised. + src_line Integer giving the line number in src_file. + """ + #print("src_file", src_file, "src_line", src_line) + self.message = message + self.src_file = src_file + self.src_line = src_line + + @pmg_serialize + def as_dict(self): + # This is needed because the events printed in the main output file do not define scr_file and src_line + src_file = getattr(self, "src_file", "Unknown") + src_line = getattr(self, "src_line", 0) + return dict(message=self.message, src_file=src_file, src_line=src_line, yaml_tag=self.yaml_tag) + + @classmethod + def from_dict(cls, d): + cls = as_event_class(d.get("yaml_tag")) + return cls(**{k: v for k, v in d.items() if k != "yaml_tag" and not k.startswith("@")}) + + @property + def header(self): + try: + return "<%s at %s:%s>" % (self.name, self.src_file, self.src_line) + except AttributeError: + # This is needed because the events printed in the main output file do not define scr_file and src_line + return "<%s at %s:%s>" % (self.name, "Unknown", 0) + + def __repr__(self): + return self.header + + def __str__(self): + return "\n".join((self.header, self.message)) + + def __eq__(self, other): + if other is None: return False + return self.message == other.message + + def __ne__(self, other): + return not self.__eq__(other) + + @property + def name(self): + """Name of the event (class name)""" + return self.__class__.__name__ + + @property + def baseclass(self): + """The baseclass of self.""" + for cls in _BASE_CLASSES: + if isinstance(self, cls): + return cls + + raise ValueError("Cannot determine the base class of %s" % self.__class__.__name__) + + def correct(self, task): + """ + This method is called when an error is detected in a :class:`Task` + It should perform any corrective measures relating to the detected error. + The idea is similar to the one used in custodian but the handler receives + a :class:`Task` object so that we have access to its methods. + + Returns: + (dict) JSON serializable dict that describes the errors and actions taken. E.g. + {"errors": list_of_errors, "actions": list_of_actions_taken}. + If this is an unfixable error, actions should be set to None. + """ + return 0 + + +class AbinitComment(AbinitEvent): + """Base class for Comment events""" + yaml_tag = '!COMMENT' + color = "blue" + + +class AbinitError(AbinitEvent): + """Base class for Error events""" + yaml_tag = '!ERROR' + color = "red" + + +class AbinitYamlError(AbinitError): + """ + Raised if the YAML parser cannot parse the document and the doc tag is an Error. + It's an AbinitError because the msg produced by the code is not valid YAML! + """ + + +class AbinitBug(AbinitEvent): + """Base class for Bug events""" + yaml_tag = '!BUG' + color = "red" + + +class AbinitWarning(AbinitEvent): + """ + Base class for Warning events (the most important class). + Developers should subclass this class to define the different exceptions + raised by the code and the possible actions that can be performed. + """ + yaml_tag = '!WARNING' + color = "magenta" + + +class AbinitCriticalWarning(AbinitWarning): + color = "red" + + +class AbinitYamlWarning(AbinitCriticalWarning): + """ + Raised if the YAML parser cannot parse the document and the doc tas is a Warning. + """ + +############################### +# Warnings triggering restart # +############################### + + +class ScfConvergenceWarning(AbinitCriticalWarning): + """Warning raised when the GS SCF cycle did not converge.""" + yaml_tag = '!ScfConvergenceWarning' + + +class NscfConvergenceWarning(AbinitCriticalWarning): + """Warning raised when the GS NSCF cycle did not converge.""" + yaml_tag = '!NscfConvergenceWarning' + + +class RelaxConvergenceWarning(AbinitCriticalWarning): + """Warning raised when the structural relaxation did not converge.""" + yaml_tag = '!RelaxConvergenceWarning' + + +# TODO: for the time being we don't discern between GS and PhononCalculations. +#class PhononConvergenceWarning(AbinitCriticalWarning): +# """Warning raised when the phonon calculation did not converge.""" +# yaml_tag = u'!PhononConvergenceWarning' + + +class QPSConvergenceWarning(AbinitCriticalWarning): + """Warning raised when the QPS iteration (GW) did not converge.""" + yaml_tag = '!QPSConvergenceWarning' + + +class HaydockConvergenceWarning(AbinitCriticalWarning): + """Warning raised when the Haydock method (BSE) did not converge.""" + yaml_tag = '!HaydockConvergenceWarning' + + +# Error classes providing a correct method. + +# Register the concrete base classes. +_BASE_CLASSES = [ + AbinitComment, + AbinitError, + AbinitBug, + AbinitWarning, +] + + +class EventReport(collections.abc.Iterable, MSONable): + """ + Iterable storing the events raised by an ABINIT calculation. + + Attributes:: + + stat: information about a file as returned by os.stat + """ + def __init__(self, filename, events=None): + """ + List of ABINIT events. + + Args: + filename: Name of the file + events: List of Event objects + """ + self.filename = os.path.abspath(filename) + self.stat = os.stat(self.filename) + self.start_datetime, self.end_datetime = None, None + + self._events = [] + self._events_by_baseclass = collections.defaultdict(list) + + if events is not None: + for ev in events: + self.append(ev) + + def __len__(self): + return len(self._events) + + def __iter__(self): + return self._events.__iter__() + + def __getitem__(self, slice): + return self._events[slice] + + def __str__(self): + #has_colours = stream_has_colours(stream) + has_colours = True + + lines = [] + app = lines.append + + app("Events found in %s\n" % self.filename) + for i, event in enumerate(self): + if has_colours: + app("[%d] %s" % (i+1, colored(event.header, color=event.color))) + app(indent(event.message, 4)) + else: + app("[%d] %s" % (i+1, str(event))) + + app("num_errors: %s, num_warnings: %s, num_comments: %s, completed: %s\n" % ( + self.num_errors, self.num_warnings, self.num_comments, self.run_completed)) + + return "\n".join(lines) + + def append(self, event): + """Add an event to the list.""" + self._events.append(event) + self._events_by_baseclass[event.baseclass].append(event) + + def set_run_completed(self, boolean, start_datetime, end_datetime): + """Set the value of _run_completed.""" + self._run_completed = boolean + + if (start_datetime, end_datetime) != (None, None): + # start_datetime: Sat Feb 28 23:54:27 2015 + # end_datetime: Sat Feb 28 23:54:30 2015 + try: + fmt = "%a %b %d %H:%M:%S %Y" + self.start_datetime = datetime.datetime.strptime(start_datetime, fmt) + self.end_datetime = datetime.datetime.strptime(end_datetime, fmt) + except Exception as exc: + # Maybe LOCALE != en_US + logger.warning(str(exc)) + + @property + def run_etime(self): + """Wall-time of the run as `timedelta` object.""" + if self.start_datetime is None or self.end_datetime is None: + return None + + return self.end_datetime - self.start_datetime + + @property + def run_completed(self): + """True if the calculation terminated.""" + try: + return self._run_completed + except AttributeError: + return False + + @property + def comments(self): + """List of comments found.""" + return self.select(AbinitComment) + + @property + def errors(self): + """List of errors + bugs found.""" + return self.select(AbinitError) + self.select(AbinitBug) + + @property + def warnings(self): + """List of warnings found.""" + return self.select(AbinitWarning) + + @property + def num_warnings(self): + """Number of warnings reported.""" + return len(self.warnings) + + @property + def num_errors(self): + """Number of errors reported.""" + return len(self.errors) + + @property + def num_comments(self): + """Number of comments reported.""" + return len(self.comments) + + def select(self, base_class): + """ + Return the list of events that inherits from class base_class + """ + return self._events_by_baseclass[base_class] + + def filter_types(self, event_types): + events = [] + for ev in self: + if type(ev) in event_types: events.append(ev) + return self.__class__(filename=self.filename, events=events) + + def get_events_of_type(self, event_class): + """Return a list of events of the given class.""" + return [ev for ev in self if type(ev) == event_class] + + @pmg_serialize + def as_dict(self): + return dict(filename=self.filename, events=[e.as_dict() for e in self._events]) + + @classmethod + def from_dict(cls, d): + return cls(filename=d["filename"], events=[AbinitEvent.from_dict(e) for e in d["events"]]) + + +class EventsParserError(Exception): + """Base class for the exceptions raised by :class:`EventsParser`.""" + + +class EventsParser(object): + """ + Parses the output or the log file produced by ABINIT and extract the list of events. + """ + Error = EventsParserError + + def parse(self, filename, verbose=0): + """ + Parse the given file. Return :class:`EventReport`. + """ + run_completed, start_datetime, end_datetime = False, None, None + filename = os.path.abspath(filename) + report = EventReport(filename) + + w = WildCard("*Error|*Warning|*Comment|*Bug|*ERROR|*WARNING|*COMMENT|*BUG") + import warnings + warnings.simplefilter('ignore', yaml.error.UnsafeLoaderWarning) + with YamlTokenizer(filename) as tokens: + for doc in tokens: + if w.match(doc.tag): + #print("got doc.tag", doc.tag,"--") + try: + #print(doc.text) + event = yaml.load(doc.text) # Can't use ruamel safe_load! + #yaml.load(doc.text, Loader=ruamel.yaml.Loader) + #print(event.yaml_tag, type(event)) + except Exception: + #raise + # Wrong YAML doc. Check tha doc tag and instantiate the proper event. + message = "Malformatted YAML document at line: %d\n" % doc.lineno + message += doc.text + + # This call is very expensive when we have many exceptions due to malformatted YAML docs. + if verbose: + message += "Traceback:\n %s" % straceback() + + if "error" in doc.tag.lower(): + print("It seems an error. doc.tag:", doc.tag) + event = AbinitYamlError(message=message, src_file=__file__, src_line=0) + else: + event = AbinitYamlWarning(message=message, src_file=__file__, src_line=0) + + event.lineno = doc.lineno + report.append(event) + + # Check whether the calculation completed. + if doc.tag == "!FinalSummary": + #print(doc) + run_completed = True + d = doc.as_dict() + #print(d) + start_datetime, end_datetime = d["start_datetime"], d["end_datetime"] + + report.set_run_completed(run_completed, start_datetime, end_datetime) + return report + + def report_exception(self, filename, exc): + """ + This method is used when self.parser raises an Exception so that + we can report a customized :class:`EventReport` object with info the exception. + """ + # Build fake event. + event = AbinitError(src_file="Unknown", src_line=0, message=str(exc)) + return EventReport(filename, events=[event]) + + +class EventHandler(MSONable, metaclass=abc.ABCMeta): + """ + Abstract base class defining the interface for an EventHandler. + + The__init__ should always provide default values for its arguments so that we can + easily instantiate the handlers with: + + handlers = [cls() for cls in get_event_handler_classes()] + + The defaul values should be chosen so to cover the most typical cases. + + Each EventHandler should define the class attribute `can_change_physics` + that is true if the handler changes `important` parameters of the + run that are tightly connected to the physics of the system. + + For example, an `EventHandler` that changes the value of `dilatmx` and + prepare the restart is not changing the physics. Similarly a handler + that changes the mixing algorithm. On the contrary, a handler that + changes the value of the smearing is modifying an important physical + parameter, and the user should be made aware of this so that + there's an explicit agreement between the user and the code. + + The default handlers are those that do not change the physics, + other handlers can be installed by the user when constructing with the flow with + + TODO + + .. warning:: + + The EventHandler should perform any action at the level of the input files + needed to solve the problem and then prepare the task for a new submission + The handler should never try to resubmit the task. The submission must be + delegated to the scheduler or Fireworks. + """ + + event_class = AbinitEvent + """AbinitEvent subclass associated to this handler.""" + + #can_change_physics + + FIXED = 1 + NOT_FIXED = 0 + + def __init__(self): + """Simple init for compatibility with introspection in as_dict/from_dict""" + return super().__init__() + + @classmethod + def cls2str(cls): + lines = [] + app = lines.append + + ecls = cls.event_class + app("event name = %s" % ecls.yaml_tag) + app("event documentation: ") + lines.extend(ecls.__doc__.split("\n")) + app("handler documentation: ") + lines.extend(cls.__doc__.split("\n")) + + return "\n".join(lines) + + def __str__(self): + return "<%s>" % self.__class__.__name__ + + def can_handle(self, event): + """True if this handler is associated to the given :class:`AbinitEvent`""" + return self.event_class == event.__class__ + + # TODO: defined CorrectionRecord object and provide helper functions to build it + + def count(self, task): + """ + Return the number of times the event associated to this handler + has been already fixed in the :class:`Task`. + """ + return len([c for c in task.corrections if c["event"]["@class"] == self.event_class]) + + @abc.abstractmethod + def handle_task_event(self, task, event): + """ + Method to handle Abinit events. + + Args: + task: :class:`Task` object. + event: :class:`AbinitEvent` found in the log file. + + Return: + 0 if no action has been applied, 1 if the problem has been fixed. + """ + + @pmg_serialize + def as_dict(self): + """ + Basic implementation of as_dict if __init__ has no arguments. Subclasses may need to overwrite. + """ + + d = {} + return d + + @classmethod + def from_dict(cls, d): + """ + Basic implementation of from_dict if __init__ has no arguments. Subclasses may need to overwrite. + """ + + return cls() + + @classmethod + def compare_inputs(cls, new_input, old_input): + + def vars_dict(d): + """ + make a simple dictionary and convert numpy arrays to lists + """ + new_d = {} + for key, value in d.items(): + if isinstance(value, np.ndarray): value = value.tolist() + new_d[key] = value + + return new_d + + new_vars = vars_dict(new_input) + old_vars = vars_dict(old_input) + + new_keys = set(new_vars.keys()) + old_keys = set(old_vars.keys()) + intersect = new_keys.intersection(old_keys) + + added_keys = new_keys - intersect + removed_keys = old_keys - intersect + changed_keys = set(v for v in intersect if new_vars[v] != old_vars[v]) + + log_diff = {} + if added_keys: + log_diff['_set'] = {k: new_vars[k] for k in added_keys} + + if changed_keys: + log_diff['_update'] = ({k: {'new': new_vars[k], 'old': old_vars[k]} for k in changed_keys}) + + if new_input.structure != old_input.structure: + log_diff['_change_structure'] = new_input.structure.as_dict() + + if removed_keys: + log_diff['_pop'] = {k: old_vars[k] for k in removed_keys} + + return log_diff + + +class Correction(MSONable): + + def __init__(self, handler, actions, event, reset=False): + self.handler = handler + self.actions = actions + self.event = event + self.reset = reset + + @pmg_serialize + def as_dict(self): + return dict(handler=self.handler.as_dict(), actions=self.actions, event=self.event.as_dict(), reset=self.reset) + + @classmethod + def from_dict(cls, d): + dec = MontyDecoder() + return cls(handler=dec.process_decoded(d['handler']), actions=d['actions'], + event=dec.process_decoded(d['event']), reset=d['reset']) + + +#class WarningHandler(EventHandler): +# """Base class for handlers associated to ABINIT warnings.""" +# event_class = AbinitWarning +# +#class BugHandler(EventHandler): +# """Base class for handlers associated to ABINIT bugs.""" +# event_class = AbinitBug + + +class ErrorHandler(EventHandler): + """Base class for handlers associated to ABINIT errors.""" + event_class = AbinitError + + +_ABC_EVHANDLER_CLASSES = set([ErrorHandler,]) + + +# Public API +def autodoc_event_handlers(stream=sys.stdout): + """ + Print to the given string, the documentation for the events + and the associated handlers. + """ + lines = [] + for cls in all_subclasses(EventHandler): + if cls in _ABC_EVHANDLER_CLASSES: continue + event_class = cls.event_class + lines.extend(cls.cls2str().split("\n")) + + # Here we enforce the abstract protocol of the class + # The unit test in tests_events will detect the problem. + if not hasattr(cls, "can_change_physics"): + raise RuntimeError("%s: can_change_physics must be defined" % cls) + + stream.write("\n".join(lines) + "\n") + + +def get_event_handler_classes(categories=None): + """Return the list of handler classes.""" + classes = [c for c in all_subclasses(EventHandler) if c not in _ABC_EVHANDLER_CLASSES] + return classes + + +def as_event_class(obj): + """ + Convert obj into a subclass of AbinitEvent. + obj can be either a class or a string with the class name or the YAML tag + """ + if is_string(obj): + for c in all_subclasses(AbinitEvent): + if c.__name__ == obj or c.yaml_tag == obj: return c + raise ValueError("Cannot find event class associated to %s" % obj) + + # Assume class. + assert obj in all_subclasses(AbinitEvent) + return obj + + +############################################ +########## Concrete classes ################ +############################################ + +class DilatmxError(AbinitError): + """ + This Error occurs in variable cell calculations when the increase in the + unit cell volume is too large. + """ + yaml_tag = '!DilatmxError' + + +class DilatmxErrorHandler(ErrorHandler): + """ + Handle DilatmxError. Abinit produces a netcdf file with the last structure before aborting + The handler changes the structure in the input with the last configuration and modify the value of dilatmx. + """ + event_class = DilatmxError + + can_change_physics = False + + def __init__(self, max_dilatmx=1.3): + self.max_dilatmx = max_dilatmx + + @pmg_serialize + def as_dict(self): + return {'max_dilatmx': self.max_dilatmx} + + @classmethod + def from_dict(cls, d): + return cls(max_dilatmx=d['max_dilatmx']) + + def handle_task_event(self, task, event): + # Read the last structure dumped by ABINIT before aborting. + filepath = task.outdir.has_abiext("DILATMX_STRUCT.nc") + last_structure = Structure.from_file(filepath) + + task._change_structure(last_structure) + + #read the suggested dilatmx + # new_dilatmx = 1.05 + # if new_dilatmx > self.max_dilatmx: + # msg = "Suggested dilatmx ({}) exceeds maximux configured value ({}).".format(new_dilatmx, self.max_dilatmx) + # return self.NOT_FIXED + # task.strategy.abinit_input.set_vars(dilatmx=new_dilatmx) + msg = "Take last structure from DILATMX_STRUCT.nc, will try to restart with dilatmx %s" % task.get_inpvar("dilatmx") + task.log_correction(event, msg) + # Note that we change the structure but we don't try restart from the previous WFK|DEN file + # because Abinit called mpi_abort and therefore no final WFK|DEN file has been produced. + + return self.FIXED + + def handle_input_event(self, abiinput, outdir, event): + try: + old_abiinput = abiinput.deepcopy() + # Read the last structure dumped by ABINIT before aborting. + filepath = outdir.has_abiext("DILATMX_STRUCT.nc") + last_structure = Structure.from_file(filepath) + abiinput.set_structure(last_structure) + #FIXME restart from DEN files not always working with interpolation + return Correction(self, self.compare_inputs(abiinput, old_abiinput), event, reset=True) + # return Correction(self, self.compare_inputs(abiinput, old_abiinput), event, event=False) + except Exception as exc: + logger.warning('Error while trying to apply the handler {}.'.format(str(self)), exc) + return None + + +class TolSymError(AbinitError): + """ + Class of errors raised by Abinit when it cannot detect the symmetries of the system. + The handler assumes the structure makes sense and the error is just due to numerical inaccuracies. + We increase the value of tolsym in the input file (default 1-8) so that Abinit can find the space group + and re-symmetrize the input structure. + """ + yaml_tag = '!TolSymError' + + +class TolSymErrorHandler(ErrorHandler): + """ + Increase the value of tolsym in the input file. + """ + event_class = TolSymError + + can_change_physics = False + + def __init__(self, max_nfixes=3): + self.max_nfixes = max_nfixes + + @pmg_serialize + def as_dict(self): + return {'max_nfixes': self.max_nfixes} + + @classmethod + def from_dict(cls, d): + return cls(max_nfixes=d['max_nfixes']) + + def handle_task_event(self, task, event): + # TODO: Add limit on the number of fixes one can do for the same error + # For example in this case, the scheduler will stop after 20 submissions + if self.count(task) > self.max_nfixes: + return self.NOT_FIXED + + old_tolsym = task.get_inpvar("tolsym") + new_tolsym = 1e-6 if old_tolsym is None else old_tolsym * 10 + task.set_vars(tolsym=new_tolsym) + + task.log_correction(event, "Increasing tolsym from %s to %s" % (old_tolsym, new_tolsym)) + return self.FIXED + + def handle_input_event(self, abiinput, outdir, event): + try: + old_abiinput = abiinput.deepcopy() + old_tolsym = abiinput["tolsym"] + new_tolsym = 1e-6 if old_tolsym is None else old_tolsym * 10 + abiinput.set_vars(tolsym=new_tolsym) + return Correction(self, self.compare_inputs(abiinput, old_abiinput), event, reset=False) + except Exception as exc: + logger.warning('Error while trying to apply the handler {}.'.format(str(self)), exc) + return None + + +class MemanaError(AbinitError): + """ + Class of errors raised by the memory analyzer. + (the section that estimates the memory requirements from the input parameters). + """ + yaml_tag = '!MemanaError' + + +class MemanaErrorHandler(ErrorHandler): + """ + Set mem_test to 0 to bypass the memory check. + """ + event_class = MemanaError + + can_change_physics = False + + def handle_task_event(self, task, event): + task.set_vars(mem_test=0) + task.log_correction(event, "Find MemanaError. Setting mem_test to 0 in input file.") + return self.FIXED + + def handle_input_event(self, abiinput, outdir, event): + try: + old_abiinput = abiinput.deepcopy() + abiinput.set_vars(mem_test=0) + return Correction(self, self.compare_inputs(abiinput, old_abiinput), event, reset=False) + except Exception as exc: + logger.warning('Error while trying to apply the handler {}.'.format(str(self)), exc) + return None + + +class MemoryError(AbinitError): + """ + This error occurs when a checked allocation fails in Abinit + The only way to go is to increase memory + """ + yaml_tag = '!MemoryError' + + +class MemoryErrorHandler(ErrorHandler): + """ + Handle MemoryError. Increase the resources requirements + """ + event_class = MemoryError + + can_change_physics = False + + def handle_task_event(self, task, event): + task.manager.increase_resources() + return self.FIXED + + def handle_input_event(self, abiinput, outdir, event): + """ + Shouldn't do anything on the input + """ + return None diff --git a/abipy/flowtk/flows.py b/abipy/flowtk/flows.py index 664628768..0ac4f67a3 100644 --- a/abipy/flowtk/flows.py +++ b/abipy/flowtk/flows.py @@ -1,3 +1,3252 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +""" +A Flow is a container for Works, and works consist of tasks. +Flows are the final objects that can be dumped directly to a pickle file on disk +Flows are executed using abirun (abipy). +""" +import os +import sys +import time +import collections +import warnings +import shutil +import tempfile +import numpy as np -from pymatgen.io.abinit.flows import * +from io import StringIO +from pprint import pprint +from tabulate import tabulate +from pydispatch import dispatcher +from collections import OrderedDict +from monty.collections import dict2namedtuple +from monty.string import list_strings, is_string, make_banner +from monty.operator import operator_from_str +from monty.io import FileLock +from monty.pprint import draw_tree +from monty.termcolor import cprint, colored, cprint_map, get_terminal_size +from monty.inspect import find_top_pyfile +from monty.json import MSONable +from pymatgen.util.serialization import pmg_pickle_load, pmg_pickle_dump, pmg_serialize +from pymatgen.core.units import Memory +from pymatgen.util.io_utils import AtomicFile +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from abipy.tools.printing import print_dataframe +from abipy.flowtk import wrappers +from .nodes import Status, Node, NodeError, NodeResults, Dependency, GarbageCollector, check_spectator +from .tasks import ScfTask, TaskManager, FixQueueCriticalError +from .utils import File, Directory, Editor +from .works import NodeContainer, Work, BandStructureWork, PhononWork, BecWork, G0W0Work, QptdmWork, DteWork +from .events import EventsParser + +__author__ = "Matteo Giantomassi" +__copyright__ = "Copyright 2013, The Materials Project" +__version__ = "0.1" +__maintainer__ = "Matteo Giantomassi" + + +__all__ = [ + "Flow", + "G0W0WithQptdmFlow", + "bandstructure_flow", + "g0w0_flow", +] + + +def as_set(obj): + """ + Convert obj into a set, returns None if obj is None. + + >>> assert as_set(None) is None and as_set(1) == set([1]) and as_set(range(1,3)) == set([1, 2]) + """ + if obj is None or isinstance(obj, collections.abc.Set): + return obj + + if not isinstance(obj, collections.abc.Iterable): + return set((obj,)) + else: + return set(obj) + + +class FlowResults(NodeResults): + + JSON_SCHEMA = NodeResults.JSON_SCHEMA.copy() + #JSON_SCHEMA["properties"] = { + # "queries": {"type": "string", "required": True}, + #} + + @classmethod + def from_node(cls, flow): + """Initialize an instance from a Work instance.""" + new = super().from_node(flow) + + # Will put all files found in outdir in GridFs + d = {os.path.basename(f): f for f in flow.outdir.list_filepaths()} + + # Add the pickle file. + d["pickle"] = flow.pickle_file if flow.pickle_protocol != 0 else (flow.pickle_file, "t") + new.add_gridfs_files(**d) + + return new + + +class FlowError(NodeError): + """Base Exception for :class:`Node` methods""" + + +class Flow(Node, NodeContainer, MSONable): + """ + This object is a container of work. Its main task is managing the + possible inter-dependencies among the work and the creation of + dynamic workflows that are generated by callbacks registered by the user. + + Attributes: + + creation_date: String with the creation_date + pickle_protocol: Protocol for Pickle database (default: -1 i.e. latest protocol) + + Important methods for constructing flows: + + register_work: register (add) a work to the flow + resister_task: register a work that contains only this task returns the work + allocate: propagate the workdir and manager of the flow to all the registered tasks + build: + build_and_pickle_dump: + """ + VERSION = "0.1" + PICKLE_FNAME = "__AbinitFlow__.pickle" + + Error = FlowError + + Results = FlowResults + + @classmethod + def from_inputs(cls, workdir, inputs, manager=None, pickle_protocol=-1, task_class=ScfTask, + work_class=Work, remove=False): + + """ + Construct a simple flow from a list of inputs. The flow contains a single Work with + tasks whose class is given by task_class. + + .. warning:: + + Don't use this interface if you have dependencies among the tasks. + + Args: + workdir: String specifying the directory where the works will be produced. + inputs: List of inputs. + manager: |TaskManager| object responsible for the submission of the jobs. + If manager is None, the object is initialized from the yaml file + located either in the working directory or in the user configuration dir. + pickle_protocol: Pickle protocol version used for saving the status of the object. + -1 denotes the latest version supported by the python interpreter. + task_class: The class of the |Task|. + work_class: The class of the |Work|. + remove: attempt to remove working directory `workdir` if directory already exists. + """ + if not isinstance(inputs, (list, tuple)): inputs = [inputs] + + flow = cls(workdir, manager=manager, pickle_protocol=pickle_protocol, remove=remove) + work = work_class() + for inp in inputs: + work.register(inp, task_class=task_class) + flow.register_work(work) + + return flow.allocate() + + @classmethod + def as_flow(cls, obj): + """Convert obj into a Flow. Accepts filepath, dict, or Flow object.""" + if isinstance(obj, cls): return obj + if is_string(obj): + return cls.pickle_load(obj) + elif isinstance(obj, collections.abc.Mapping): + return cls.from_dict(obj) + else: + raise TypeError("Don't know how to convert type %s into a Flow" % type(obj)) + + def __init__(self, workdir, manager=None, pickle_protocol=-1, remove=False): + """ + Args: + workdir: String specifying the directory where the works will be produced. + if workdir is None, the initialization of the working directory + is performed by flow.allocate(workdir). + manager: |TaskManager| object responsible for the submission of the jobs. + If manager is None, the object is initialized from the yaml file + located either in the working directory or in the user configuration dir. + pickle_protocol: Pickle protocol version used for saving the status of the object. + -1 denotes the latest version supported by the python interpreter. + remove: attempt to remove working directory `workdir` if directory already exists. + """ + super().__init__() + + if workdir is not None: + if remove and os.path.exists(workdir): shutil.rmtree(workdir) + self.set_workdir(workdir) + + self.creation_date = time.asctime() + + if manager is None: manager = TaskManager.from_user_config() + self.manager = manager.deepcopy() + + # List of works. + self._works = [] + + self._waited = 0 + + # List of callbacks that must be executed when the dependencies reach S_OK + self._callbacks = [] + + # Install default list of handlers at the flow level. + # Users can override the default list by calling flow.install_event_handlers in the script. + # Example: + # + # # flow level (common case) + # flow.install_event_handlers(handlers=my_handlers) + # + # # task level (advanced mode) + # flow[0][0].install_event_handlers(handlers=my_handlers) + # + self.install_event_handlers() + + self.pickle_protocol = int(pickle_protocol) + + # ID used to access mongodb + self._mongo_id = None + + # Save the location of the script used to generate the flow. + # This trick won't work if we are running with nosetests, py.test etc + pyfile = find_top_pyfile() + if "python" in pyfile or "ipython" in pyfile: pyfile = "<" + pyfile + ">" + self.set_pyfile(pyfile) + + # TODO + # Signal slots: a dictionary with the list + # of callbacks indexed by node_id and SIGNAL_TYPE. + # When the node changes its status, it broadcast a signal. + # The flow is listening to all the nodes of the calculation + # [node_id][SIGNAL] = list_of_signal_handlers + #self._sig_slots = slots = {} + #for work in self: + # slots[work] = {s: [] for s in work.S_ALL} + + #for task in self.iflat_tasks(): + # slots[task] = {s: [] for s in work.S_ALL} + + self.on_all_ok_num_calls = 0 + + @pmg_serialize + def as_dict(self, **kwargs): + """ + JSON serialization, note that we only need to save + a string with the working directory since the object will be + reconstructed from the pickle file located in workdir + """ + return {"workdir": self.workdir} + + # This is needed for fireworks. + to_dict = as_dict + + @classmethod + def from_dict(cls, d, **kwargs): + """Reconstruct the flow from the pickle file.""" + return cls.pickle_load(d["workdir"], **kwargs) + + @classmethod + def temporary_flow(cls, manager=None): + """Return a Flow in a temporary directory. Useful for unit tests.""" + return cls(workdir=tempfile.mkdtemp(), manager=manager) + + def set_workdir(self, workdir, chroot=False): + """ + Set the working directory. Cannot be set more than once unless chroot is True + """ + if not chroot and hasattr(self, "workdir") and self.workdir != workdir: + raise ValueError("self.workdir != workdir: %s, %s" % (self.workdir, workdir)) + + # Directories with (input|output|temporary) data. + self.workdir = os.path.abspath(workdir) + self.indir = Directory(os.path.join(self.workdir, "indata")) + self.outdir = Directory(os.path.join(self.workdir, "outdata")) + self.tmpdir = Directory(os.path.join(self.workdir, "tmpdata")) + self.wdir = Directory(self.workdir) + + def reload(self): + """ + Reload the flow from the pickle file. Used when we are monitoring the flow + executed by the scheduler. In this case, indeed, the flow might have been changed + by the scheduler and we have to reload the new flow in memory. + """ + new = self.__class__.pickle_load(self.workdir) + self = new + + @classmethod + def pickle_load(cls, filepath, spectator_mode=True, remove_lock=False): + """ + Loads the object from a pickle file and performs initial setup. + + Args: + filepath: Filename or directory name. It filepath is a directory, we + scan the directory tree starting from filepath and we + read the first pickle database. Raise RuntimeError if multiple + databases are found. + spectator_mode: If True, the nodes of the flow are not connected by signals. + This option is usually used when we want to read a flow + in read-only mode and we want to avoid callbacks that can change the flow. + remove_lock: + True to remove the file lock if any (use it carefully). + """ + if os.path.isdir(filepath): + # Walk through each directory inside path and find the pickle database. + for dirpath, dirnames, filenames in os.walk(filepath): + fnames = [f for f in filenames if f == cls.PICKLE_FNAME] + if fnames: + if len(fnames) == 1: + filepath = os.path.join(dirpath, fnames[0]) + break # Exit os.walk + else: + err_msg = "Found multiple databases:\n %s" % str(fnames) + raise RuntimeError(err_msg) + else: + err_msg = "Cannot find %s inside directory %s" % (cls.PICKLE_FNAME, filepath) + raise ValueError(err_msg) + + if remove_lock and os.path.exists(filepath + ".lock"): + try: + os.remove(filepath + ".lock") + except Exception: + pass + + with FileLock(filepath): + with open(filepath, "rb") as fh: + flow = pmg_pickle_load(fh) + + # Check if versions match. + if flow.VERSION != cls.VERSION: + msg = ("File flow version %s != latest version %s\n." + "Regenerate the flow to solve the problem " % (flow.VERSION, cls.VERSION)) + warnings.warn(msg) + + flow.set_spectator_mode(spectator_mode) + + # Recompute the status of each task since tasks that + # have been submitted previously might be completed. + flow.check_status() + return flow + + # Handy alias + from_file = pickle_load + + @classmethod + def pickle_loads(cls, s): + """Reconstruct the flow from a string.""" + strio = StringIO() + strio.write(s) + strio.seek(0) + flow = pmg_pickle_load(strio) + return flow + + def get_panel(self): + """Build panel with widgets to interact with the |Flow| either in a notebook or in panel app.""" + from abipy.panels.flows import FlowPanel + return FlowPanel(self).get_panel() + + def __len__(self): + return len(self.works) + + def __iter__(self): + return self.works.__iter__() + + def __getitem__(self, slice): + return self.works[slice] + + def set_pyfile(self, pyfile): + """ + Set the path of the python script used to generate the flow. + + .. Example: + + flow.set_pyfile(__file__) + """ + # TODO: Could use a frame hack to get the caller outside abinit + # so that pyfile is automatically set when we __init__ it! + self._pyfile = os.path.abspath(pyfile) + + @property + def pyfile(self): + """ + Absolute path of the python script used to generate the flow. Set by `set_pyfile` + """ + try: + return self._pyfile + except AttributeError: + return None + + @property + def pid_file(self): + """The path of the pid file created by PyFlowScheduler.""" + return os.path.join(self.workdir, "_PyFlowScheduler.pid") + + @property + def has_scheduler(self): + """True if there's a scheduler running the flow.""" + return os.path.exists(self.pid_file) + + def check_pid_file(self): + """ + This function checks if we are already running the |Flow| with a :class:`PyFlowScheduler`. + Raises: Flow.Error if the pid file of the scheduler exists. + """ + if not os.path.exists(self.pid_file): + return 0 + + self.show_status() + raise self.Error("""\n\ + pid_file + %s + already exists. There are two possibilities: + + 1) There's an another instance of PyFlowScheduler running + 2) The previous scheduler didn't exit in a clean way + + To solve case 1: + Kill the previous scheduler (use 'kill pid' where pid is the number reported in the file) + Then you can restart the new scheduler. + + To solve case 2: + Remove the pid_file and restart the scheduler. + + Exiting""" % self.pid_file) + + @property + def pickle_file(self): + """The path of the pickle file.""" + return os.path.join(self.workdir, self.PICKLE_FNAME) + + @property + def mongo_id(self): + return self._mongo_id + + @mongo_id.setter + def mongo_id(self, value): + if self.mongo_id is not None: + raise RuntimeError("Cannot change mongo_id %s" % self.mongo_id) + self._mongo_id = value + + #def mongodb_upload(self, **kwargs): + # from abiflows.core.scheduler import FlowUploader + # FlowUploader().upload(self, **kwargs) + + def validate_json_schema(self): + """Validate the JSON schema. Return list of errors.""" + errors = [] + + for work in self: + for task in work: + if not task.get_results().validate_json_schema(): + errors.append(task) + if not work.get_results().validate_json_schema(): + errors.append(work) + if not self.get_results().validate_json_schema(): + errors.append(self) + + return errors + + def get_mongo_info(self): + """ + Return a JSON dictionary with information on the flow. + Mainly used for constructing the info section in `FlowEntry`. + The default implementation is empty. Subclasses must implement it + """ + return {} + + def mongo_assimilate(self): + """ + This function is called by client code when the flow is completed + Return a JSON dictionary with the most important results produced + by the flow. The default implementation is empty. Subclasses must implement it + """ + return {} + + @property + def works(self): + """List of |Work| objects contained in self..""" + return self._works + + @property + def all_ok(self): + """True if all the tasks in works have reached `S_OK`.""" + all_ok = all(work.all_ok for work in self) + if all_ok: + all_ok = self.on_all_ok() + return all_ok + + @property + def num_tasks(self): + """Total number of tasks""" + return len(list(self.iflat_tasks())) + + @property + def errored_tasks(self): + """List of errored tasks.""" + etasks = [] + for status in [self.S_ERROR, self.S_QCRITICAL, self.S_ABICRITICAL]: + etasks.extend(list(self.iflat_tasks(status=status))) + + return set(etasks) + + @property + def num_errored_tasks(self): + """The number of tasks whose status is `S_ERROR`.""" + return len(self.errored_tasks) + + @property + def unconverged_tasks(self): + """List of unconverged tasks.""" + return list(self.iflat_tasks(status=self.S_UNCONVERGED)) + + @property + def num_unconverged_tasks(self): + """The number of tasks whose status is `S_UNCONVERGED`.""" + return len(self.unconverged_tasks) + + @property + def status_counter(self): + """ + Returns a :class:`Counter` object that counts the number of tasks with + given status (use the string representation of the status as key). + """ + # Count the number of tasks with given status in each work. + counter = self[0].status_counter + for work in self[1:]: + counter += work.status_counter + + return counter + + @property + def ncores_reserved(self): + """ + Returns the number of cores reserved in this moment. + A core is reserved if the task is not running but + we have submitted the task to the queue manager. + """ + return sum(work.ncores_reserved for work in self) + + @property + def ncores_allocated(self): + """ + Returns the number of cores allocated in this moment. + A core is allocated if it's running a task or if we have + submitted a task to the queue manager but the job is still pending. + """ + return sum(work.ncores_allocated for work in self) + + @property + def ncores_used(self): + """ + Returns the number of cores used in this moment. + A core is used if there's a job that is running on it. + """ + return sum(work.ncores_used for work in self) + + @property + def has_chrooted(self): + """ + Returns a string that evaluates to True if we have changed + the workdir for visualization purposes e.g. we are using sshfs. + to mount the remote directory where the `Flow` is located. + The string gives the previous workdir of the flow. + """ + try: + return self._chrooted_from + except AttributeError: + return "" + + def chroot(self, new_workdir): + """ + Change the workir of the |Flow|. Mainly used for + allowing the user to open the GUI on the local host + and access the flow from remote via sshfs. + + .. note:: + Calling this method will make the flow go in read-only mode. + """ + self._chrooted_from = self.workdir + self.set_workdir(new_workdir, chroot=True) + + for i, work in enumerate(self): + new_wdir = os.path.join(self.workdir, "w" + str(i)) + work.chroot(new_wdir) + + def groupby_status(self): + """ + Returns a ordered dictionary mapping the task status to + the list of named tuples (task, work_index, task_index). + """ + Entry = collections.namedtuple("Entry", "task wi ti") + d = collections.defaultdict(list) + + for task, wi, ti in self.iflat_tasks_wti(): + d[task.status].append(Entry(task, wi, ti)) + + # Sort keys according to their status. + return OrderedDict([(k, d[k]) for k in sorted(list(d.keys()))]) + + def groupby_task_class(self): + """ + Returns a dictionary mapping the task class to the list of tasks in the flow + """ + # Find all Task classes + class2tasks = OrderedDict() + for task in self.iflat_tasks(): + cls = task.__class__ + if cls not in class2tasks: class2tasks[cls] = [] + class2tasks[cls].append(task) + + return class2tasks + + def iflat_nodes(self, status=None, op="==", nids=None): + """ + Generators that produces a flat sequence of nodes. + if status is not None, only the tasks with the specified status are selected. + nids is an optional list of node identifiers used to filter the nodes. + """ + nids = as_set(nids) + + if status is None: + if not (nids and self.node_id not in nids): + yield self + + for work in self: + if nids and work.node_id not in nids: continue + yield work + for task in work: + if nids and task.node_id not in nids: continue + yield task + else: + # Get the operator from the string. + op = operator_from_str(op) + + # Accept Task.S_FLAG or string. + status = Status.as_status(status) + + if not (nids and self.node_id not in nids): + if op(self.status, status): yield self + + for wi, work in enumerate(self): + if nids and work.node_id not in nids: continue + if op(work.status, status): yield work + + for ti, task in enumerate(work): + if nids and task.node_id not in nids: continue + if op(task.status, status): yield task + + def node_from_nid(self, nid): + """Return the node in the `Flow` with the given `nid` identifier""" + for node in self.iflat_nodes(): + if node.node_id == nid: return node + raise ValueError("Cannot find node with node id: %s" % nid) + + def iflat_tasks_wti(self, status=None, op="==", nids=None): + """ + Generator to iterate over all the tasks of the `Flow`. + Yields: + + (task, work_index, task_index) + + If status is not None, only the tasks whose status satisfies + the condition (task.status op status) are selected + status can be either one of the flags defined in the |Task| class + (e.g Task.S_OK) or a string e.g "S_OK" + nids is an optional list of node identifiers used to filter the tasks. + """ + return self._iflat_tasks_wti(status=status, op=op, nids=nids, with_wti=True) + + def iflat_tasks(self, status=None, op="==", nids=None): + """ + Generator to iterate over all the tasks of the |Flow|. + + If status is not None, only the tasks whose status satisfies + the condition (task.status op status) are selected + status can be either one of the flags defined in the |Task| class + (e.g Task.S_OK) or a string e.g "S_OK" + nids is an optional list of node identifiers used to filter the tasks. + """ + return self._iflat_tasks_wti(status=status, op=op, nids=nids, with_wti=False) + + def _iflat_tasks_wti(self, status=None, op="==", nids=None, with_wti=True): + """ + Generators that produces a flat sequence of task. + if status is not None, only the tasks with the specified status are selected. + nids is an optional list of node identifiers used to filter the tasks. + + Returns: + (task, work_index, task_index) if with_wti is True else task + """ + nids = as_set(nids) + + if status is None: + for wi, work in enumerate(self): + for ti, task in enumerate(work): + if nids and task.node_id not in nids: continue + if with_wti: + yield task, wi, ti + else: + yield task + + else: + # Get the operator from the string. + op = operator_from_str(op) + + # Accept Task.S_FLAG or string. + status = Status.as_status(status) + + for wi, work in enumerate(self): + for ti, task in enumerate(work): + if nids and task.node_id not in nids: continue + if op(task.status, status): + if with_wti: + yield task, wi, ti + else: + yield task + + def abivalidate_inputs(self): + """ + Run ABINIT in dry mode to validate all the inputs of the flow. + + Return: + (isok, tuples) + + isok is True if all inputs are ok. + tuples is List of `namedtuple` objects, one for each task in the flow. + Each namedtuple has the following attributes: + + retcode: Return code. 0 if OK. + log_file: log file of the Abinit run, use log_file.read() to access its content. + stderr_file: stderr file of the Abinit run. use stderr_file.read() to access its content. + + Raises: + `RuntimeError` if executable is not in $PATH. + """ + if not self.allocated: + self.allocate() + + isok, tuples = True, [] + for task in self.iflat_tasks(): + t = task.input.abivalidate() + if t.retcode != 0: isok = False + tuples.append(t) + + return isok, tuples + + def check_dependencies(self): + """Test the dependencies of the nodes for possible deadlocks.""" + deadlocks = [] + + for task in self.iflat_tasks(): + for dep in task.deps: + if dep.node.depends_on(task): + deadlocks.append((task, dep.node)) + + if deadlocks: + lines = ["Detect wrong list of dependecies that will lead to a deadlock:"] + lines.extend(["%s <--> %s" % nodes for nodes in deadlocks]) + raise RuntimeError("\n".join(lines)) + + def find_deadlocks(self): + """ + This function detects deadlocks + + Return: + named tuple with the tasks grouped in: deadlocks, runnables, running + """ + # Find jobs that can be submitted and and the jobs that are already in the queue. + runnables = [] + for work in self: + runnables.extend(work.fetch_alltasks_to_run()) + runnables.extend(list(self.iflat_tasks(status=self.S_SUB))) + + # Running jobs. + running = list(self.iflat_tasks(status=self.S_RUN)) + + # Find deadlocks. + err_tasks = self.errored_tasks + deadlocked = [] + if err_tasks: + for task in self.iflat_tasks(): + if any(task.depends_on(err_task) for err_task in err_tasks): + deadlocked.append(task) + + return dict2namedtuple(deadlocked=deadlocked, runnables=runnables, running=running) + + def check_status(self, **kwargs): + """ + Check the status of the works in self. + + Args: + show: True to show the status of the flow. + kwargs: keyword arguments passed to show_status + """ + for work in self: + work.check_status() + + if kwargs.pop("show", False): + self.show_status(**kwargs) + + @property + def status(self): + """The status of the |Flow| i.e. the minimum of the status of its tasks and its works""" + return min(work.get_all_status(only_min=True) for work in self) + + #def restart_unconverged_tasks(self, max_nlauch, excs): + # nlaunch = 0 + # for task in self.unconverged_tasks: + # try: + # self.history.info("Flow will try restart task %s" % task) + # fired = task.restart() + # if fired: + # nlaunch += 1 + # max_nlaunch -= 1 + + # if max_nlaunch == 0: + # self.history.info("Restart: too many jobs in the queue, returning") + # self.pickle_dump() + # return nlaunch, max_nlaunch + + # except task.RestartError: + # excs.append(straceback()) + + # return nlaunch, max_nlaunch + + def fix_abicritical(self): + """ + This function tries to fix critical events originating from ABINIT. + Returns the number of tasks that have been fixed. + """ + count = 0 + for task in self.iflat_tasks(status=self.S_ABICRITICAL): + count += task.fix_abicritical() + + return count + + def fix_queue_critical(self): + """ + This function tries to fix critical events originating from the queue submission system. + + Returns the number of tasks that have been fixed. + """ + count = 0 + for task in self.iflat_tasks(status=self.S_QCRITICAL): + self.history.info("Will try to fix task %s" % str(task)) + try: + print(task.fix_queue_critical()) + count += 1 + except FixQueueCriticalError: + self.history.info("Not able to fix task %s" % task) + + return count + + def show_info(self, **kwargs): + """ + Print info on the flow i.e. total number of tasks, works, tasks grouped by class. + + Example: + + Task Class Number + ------------ -------- + ScfTask 1 + NscfTask 1 + ScrTask 2 + SigmaTask 6 + """ + stream = kwargs.pop("stream", sys.stdout) + + lines = [str(self)] + app = lines.append + + app("Number of works: %d, total number of tasks: %s" % (len(self), self.num_tasks)) + app("Number of tasks with a given class:\n") + + # Build Table + data = [[cls.__name__, len(tasks)] + for cls, tasks in self.groupby_task_class().items()] + app(str(tabulate(data, headers=["Task Class", "Number"]))) + + stream.write("\n".join(lines)) + + def compare_abivars(self, varnames, nids=None, wslice=None, printout=False, with_colors=False): + """ + Print the input of the tasks to the given stream. + + Args: + varnames: + List of Abinit variables. If not None, only the variable in varnames + are selected and printed. + nids: List of node identifiers. By defaults all nodes are shown + wslice: Slice object used to select works. + printout: True to print dataframe. + with_colors: True if task status should be colored. + """ + varnames = [s.strip() for s in list_strings(varnames)] + index, rows = [], [] + for task in self.select_tasks(nids=nids, wslice=wslice): + index.append(task.pos_str) + dstruct = task.input.structure.as_dict(fmt="abivars") + + od = OrderedDict() + for vname in varnames: + value = task.input.get(vname, None) + if value is None: # maybe in structure? + value = dstruct.get(vname, None) + od[vname] = value + + od["task_class"] = task.__class__.__name__ + od["status"] = task.status.colored if with_colors else str(task.status) + rows.append(od) + + import pandas as pd + df = pd.DataFrame(rows, index=index) + if printout: + print_dataframe(df, title="Input variables:") + + return df + + def get_dims_dataframe(self, nids=None, printout=False, with_colors=False): + """ + Analyze output files produced by the tasks. Print pandas DataFrame with dimensions. + + Args: + nids: List of node identifiers. By defaults all nodes are shown + printout: True to print dataframe. + with_colors: True if task status should be colored. + """ + abo_paths, index, status, abo_relpaths, task_classes, task_nids = [], [], [], [], [], [] + + for task in self.iflat_tasks(nids=nids): + if task.status not in (self.S_OK, self.S_RUN): continue + if not task.is_abinit_task: continue + + abo_paths.append(task.output_file.path) + index.append(task.pos_str) + status.append(task.status.colored if with_colors else str(task.status)) + abo_relpaths.append(os.path.relpath(task.output_file.relpath)) + task_classes.append(task.__class__.__name__) + task_nids.append(task.node_id) + + if not abo_paths: return + + # Get dimensions from output files as well as walltime/cputime + from abipy.abio.outputs import AboRobot + robot = AboRobot.from_files(abo_paths) + df = robot.get_dims_dataframe(with_time=True, index=index) + + # Add columns to the dataframe. + status = [str(s) for s in status] + df["task_class"] = task_classes + df["relpath"] = abo_relpaths + df["node_id"] = task_nids + df["status"] = status + + if printout: + print_dataframe(df, title="Table with Abinit dimensions:\n") + + return df + + def compare_structures(self, nids=None, with_spglib=False, what="io", verbose=0, + precision=3, printout=False, with_colors=False): + """ + Analyze structures of the tasks (input and output structures if it's a relaxation task. + Print pandas DataFrame + + Args: + nids: List of node identifiers. By defaults all nodes are shown + with_spglib: If True, spglib is invoked to get the spacegroup symbol and number + what (str): "i" for input structures, "o" for output structures. + precision: Floating point output precision (number of significant digits). + This is only a suggestion + printout: True to print dataframe. + with_colors: True if task status should be colored. + """ + from abipy.core.structure import dataframes_from_structures + structures, index, status, max_forces, pressures, task_classes = [], [], [], [], [], [] + + def push_data(post, task, structure, cart_forces, pressure): + """Helper function to fill lists""" + index.append(task.pos_str + post) + structures.append(structure) + status.append(task.status.colored if with_colors else str(task.status)) + if cart_forces is not None: + fmods = np.sqrt([np.dot(f, f) for f in cart_forces]) + max_forces.append(fmods.max()) + else: + max_forces.append(None) + pressures.append(pressure) + task_classes.append(task.__class__.__name__) + + for task in self.iflat_tasks(nids=nids): + if "i" in what: + push_data("_in", task, task.input.structure, cart_forces=None, pressure=None) + + if "o" not in what: + continue + + # Add final structure, pressure and max force if relaxation task or GS task + if task.status in (task.S_RUN, task.S_OK): + if hasattr(task, "open_hist"): + # Structural relaxations produce HIST.nc and we can get + # the final structure or the structure of the last relaxation step. + try: + with task.open_hist() as hist: + final_structure = hist.final_structure + stress_cart_tensors, pressures_hist = hist.reader.read_cart_stress_tensors() + forces = hist.reader.read_cart_forces(unit="eV ang^-1")[-1] + push_data("_out", task, final_structure, forces, pressures_hist[-1]) + except Exception as exc: + cprint("Exception while opening HIST.nc file of task: %s\n%s" % (task, str(exc)), "red") + + elif hasattr(task, "open_gsr") and task.status == task.S_OK and task.input.get("iscf", 7) >= 0: + with task.open_gsr() as gsr: + forces = gsr.reader.read_cart_forces(unit="eV ang^-1") + push_data("_out", task, gsr.structure, forces, gsr.pressure) + + dfs = dataframes_from_structures(structures, index=index, with_spglib=with_spglib, cart_coords=False) + + if any(f is not None for f in max_forces): + # Add pressure and forces to the dataframe + dfs.lattice["P [GPa]"] = pressures + dfs.lattice["Max|F| eV/ang"] = max_forces + + # Add columns to the dataframe. + status = [str(s) for s in status] + dfs.lattice["task_class"] = task_classes + dfs.lattice["status"] = dfs.coords["status"] = status + + if printout: + print_dataframe(dfs.lattice, title="Lattice parameters:", precision=precision) + if verbose: + print_dataframe(dfs.coords, title="Atomic positions (columns give the site index):") + else: + print("Use `--verbose` to print atoms.") + + return dfs + + def compare_ebands(self, nids=None, with_path=True, with_ibz=True, with_spglib=False, verbose=0, + precision=3, printout=False, with_colors=False): + """ + Analyze electron bands produced by the tasks. + Return pandas DataFrame and |ElectronBandsPlotter|. + + Args: + nids: List of node identifiers. By default, all nodes are shown + with_path: Select files with ebands along k-path. + with_ibz: Select files with ebands in the IBZ. + with_spglib: If True, spglib is invoked to get the spacegroup symbol and number + precision: Floating point output precision (number of significant digits). + This is only a suggestion + printout: True to print dataframe. + with_colors: True if task status should be colored. + + Return: (df, ebands_plotter) + """ + ebands_list, index, status, ncfiles, task_classes, task_nids = [], [], [], [], [], [] + + # Cannot use robots because ElectronBands can be found in different filetypes + for task in self.iflat_tasks(nids=nids, status=self.S_OK): + # Read ebands from GSR or SIGRES files. + for ext in ("gsr", "sigres"): + task_open_ncfile = getattr(task, "open_%s" % ext, None) + if task_open_ncfile is not None: break + else: + continue + + try: + with task_open_ncfile() as ncfile: + if not with_path and ncfile.ebands.kpoints.is_path: continue + if not with_ibz and ncfile.ebands.kpoints.is_ibz: continue + ebands_list.append(ncfile.ebands) + index.append(task.pos_str) + status.append(task.status.colored if with_colors else str(task.status)) + ncfiles.append(os.path.relpath(ncfile.filepath)) + task_classes.append(task.__class__.__name__) + task_nids.append(task.node_id) + except Exception as exc: + cprint("Exception while opening nc file of task: %s\n%s" % (task, str(exc)), "red") + + if not ebands_list: return (None, None) + + from abipy.electrons.ebands import dataframe_from_ebands + df = dataframe_from_ebands(ebands_list, index=index, with_spglib=with_spglib) + ncfiles = [os.path.relpath(p, self.workdir) for p in ncfiles] + + # Add columns to the dataframe. + status = [str(s) for s in status] + df["task_class"] = task_classes + df["ncfile"] = ncfiles + df["node_id"] = task_nids + df["status"] = status + + if printout: + from abipy.tools.printing import print_dataframe + print_dataframe(df, title="KS electronic bands:", precision=precision) + + from abipy.electrons.ebands import ElectronBandsPlotter + ebands_plotter = ElectronBandsPlotter(key_ebands=zip(ncfiles, ebands_list)) + + return df, ebands_plotter + + def compare_hist(self, nids=None, with_spglib=False, verbose=0, + precision=3, printout=False, with_colors=False): + """ + Analyze HIST nc files produced by the tasks. Print pandas DataFrame with final results. + Return: (df, hist_plotter) + + Args: + nids: List of node identifiers. By defaults all nodes are shown + with_spglib: If True, spglib is invoked to get the spacegroup symbol and number + precision: Floating point output precision (number of significant digits). + This is only a suggestion + printout: True to print dataframe. + with_colors: True if task status should be colored. + """ + hist_paths, index, status, ncfiles, task_classes, task_nids = [], [], [], [], [], [] + + for task in self.iflat_tasks(nids=nids): + if task.status not in (self.S_OK, self.S_RUN): continue + hist_path = task.outdir.has_abiext("HIST") + if not hist_path: continue + + hist_paths.append(hist_path) + index.append(task.pos_str) + status.append(task.status.colored if with_colors else str(task.status)) + ncfiles.append(os.path.relpath(hist_path)) + task_classes.append(task.__class__.__name__) + task_nids.append(task.node_id) + + if not hist_paths: return (None, None) + from abipy.dynamics.hist import HistRobot + robot = HistRobot.from_files(hist_paths, labels=hist_paths) + df = robot.get_dataframe(index=index, with_spglib=with_spglib) + ncfiles = [os.path.relpath(p, self.workdir) for p in ncfiles] + + # Add columns to the dataframe. + status = [str(s) for s in status] + df["task_class"] = task_classes + df["ncfile"] = ncfiles + df["node_id"] = task_nids + df["status"] = status + + if printout: + title = "Table with final structures, pressures in GPa and force stats in eV/Ang:\n" + from abipy.tools.printing import print_dataframe + print_dataframe(df, title=title, precision=precision) + + return df, robot + + def show_summary(self, **kwargs): + """ + Print a short summary with the status of the flow and a counter task_status --> number_of_tasks + + Args: + stream: File-like object, Default: sys.stdout + + Example: + + Status Count + --------- ------- + Completed 10 + + , num_tasks=10, all_ok=True + """ + stream = kwargs.pop("stream", sys.stdout) + stream.write("\n") + table = list(self.status_counter.items()) + s = tabulate(table, headers=["Status", "Count"]) + stream.write(s + "\n") + stream.write("\n") + stream.write("%s, num_tasks=%s, all_ok=%s\n" % (str(self), self.num_tasks, self.all_ok)) + stream.write("\n") + + def show_status(self, **kwargs): + """ + Report the status of the works and the status of the different tasks on the specified stream. + + Args: + stream: File-like object, Default: sys.stdout + nids: List of node identifiers. By defaults all nodes are shown + wslice: Slice object used to select works. + verbose: Verbosity level (default 0). > 0 to show only the works that are not finalized. + """ + stream = kwargs.pop("stream", sys.stdout) + nids = as_set(kwargs.pop("nids", None)) + wslice = kwargs.pop("wslice", None) + verbose = kwargs.pop("verbose", 0) + wlist = None + if wslice is not None: + # Convert range to list of work indices. + wlist = list(range(wslice.start, wslice.step, wslice.stop)) + + #has_colours = stream_has_colours(stream) + has_colours = True + red = "red" if has_colours else None + + for i, work in enumerate(self): + if nids and work.node_id not in nids: continue + print("", file=stream) + cprint_map("Work #%d: %s, Finalized=%s" % (i, work, work.finalized), cmap={"True": "green"}, file=stream) + if wlist is not None and i in wlist: continue + if verbose == 0 and work.finalized: + print(" Finalized works are not shown. Use verbose > 0 to force output.", file=stream) + continue + + headers = ["Task", "Status", "Queue", "MPI|Omp|Gb", + "Warn|Com", "Class", "Sub|Rest|Corr", "Time", + "Node_ID"] + table = [] + tot_num_errors = 0 + for task in work: + if nids and task.node_id not in nids: continue + task_name = os.path.basename(task.name) + + # FIXME: This should not be done here. + # get_event_report should be called only in check_status + # Parse the events in the main output. + report = task.get_event_report() + + # Get time info (run-time or time in queue or None) + stime = None + timedelta = task.datetimes.get_runtime() + if timedelta is not None: + stime = str(timedelta) + "R" + else: + timedelta = task.datetimes.get_time_inqueue() + if timedelta is not None: + stime = str(timedelta) + "Q" + + events = "|".join(2*["NA"]) + if report is not None: + events = '{:>4}|{:>3}'.format(*map(str, ( + report.num_warnings, report.num_comments))) + + para_info = '{:>4}|{:>3}|{:>3}'.format(*map(str, ( + task.mpi_procs, task.omp_threads, "%.1f" % task.mem_per_proc.to("Gb")))) + + task_info = list(map(str, [task.__class__.__name__, + (task.num_launches, task.num_restarts, task.num_corrections), stime, task.node_id])) + + qinfo = "None" + if task.queue_id is not None: + qname = str(task.qname) + if not verbose: + qname = qname[:min(5, len(qname))] + qinfo = str(task.queue_id) + "@" + qname + + if task.status.is_critical: + tot_num_errors += 1 + task_name = colored(task_name, red) + + if has_colours: + table.append([task_name, task.status.colored, qinfo, + para_info, events] + task_info) + else: + table.append([task_name, str(task.status), qinfo, events, + para_info] + task_info) + + # Print table and write colorized line with the total number of errors. + print(tabulate(table, headers=headers, tablefmt="grid"), file=stream) + if tot_num_errors: + cprint("Total number of errors: %d" % tot_num_errors, "red", file=stream) + print("", file=stream) + + if self.all_ok: + cprint("\nall_ok reached\n", "green", file=stream) + + def show_events(self, status=None, nids=None, stream=sys.stdout): + """ + Print the Abinit events (ERRORS, WARNIING, COMMENTS) to stdout + + Args: + status: if not None, only the tasks with this status are select + nids: optional list of node identifiers used to filter the tasks. + stream: File-like object, Default: sys.stdout + """ + nrows, ncols = get_terminal_size() + + for task in self.iflat_tasks(status=status, nids=nids): + report = task.get_event_report() + if report: + print(make_banner(str(task), width=ncols, mark="="), file=stream) + print(report, file=stream) + #report = report.filter_types() + + def show_corrections(self, status=None, nids=None, stream=sys.stdout): + """ + Show the corrections applied to the flow at run-time. + + Args: + status: if not None, only the tasks with this status are select. + nids: optional list of node identifiers used to filter the tasks. + stream: File-like object, Default: sys.stdout + + Return: The number of corrections found. + """ + nrows, ncols = get_terminal_size() + count = 0 + for task in self.iflat_tasks(status=status, nids=nids): + if task.num_corrections == 0: continue + count += 1 + print(make_banner(str(task), width=ncols, mark="="), file=stream) + for corr in task.corrections: + pprint(corr, stream=stream) + + if not count: print("No correction found.", file=stream) + return count + + def show_history(self, status=None, nids=None, full_history=False, metadata=False, stream=sys.stdout): + """ + Print the history of the flow to stream + + Args: + status: if not None, only the tasks with this status are select + full_history: Print full info set, including nodes with an empty history. + nids: optional list of node identifiers used to filter the tasks. + metadata: print history metadata (experimental) + stream: File-like object, Default: sys.stdout + """ + nrows, ncols = get_terminal_size() + + works_done = [] + # Loop on the tasks and show the history of the work is not in works_done + for task in self.iflat_tasks(status=status, nids=nids): + work = task.work + + if work not in works_done: + works_done.append(work) + if work.history or full_history: + cprint(make_banner(str(work), width=ncols, mark="="), file=stream, **work.status.color_opts) + print(work.history.to_string(metadata=metadata), file=stream) + + if task.history or full_history: + cprint(make_banner(str(task), width=ncols, mark="="), file=stream, **task.status.color_opts) + print(task.history.to_string(metadata=metadata), file=stream) + + # Print the history of the flow. + if self.history or full_history: + cprint(make_banner(str(self), width=ncols, mark="="), file=stream, **self.status.color_opts) + print(self.history.to_string(metadata=metadata), file=stream) + + def show_inputs(self, varnames=None, nids=None, wslice=None, stream=sys.stdout): + """ + Print the input of the tasks to the given stream. + + Args: + varnames: List of Abinit variables. If not None, only the variable in varnames + are selected and printed. + nids: List of node identifiers. By defaults all nodes are shown + wslice: Slice object used to select works. + stream: File-like object, Default: sys.stdout + """ + if varnames is not None: + # Build dictionary varname --> [(task1, value1), (task2, value2), ...] + varnames = [s.strip() for s in list_strings(varnames)] + dlist = collections.defaultdict(list) + for task in self.select_tasks(nids=nids, wslice=wslice): + dstruct = task.input.structure.as_dict(fmt="abivars") + + for vname in varnames: + value = task.input.get(vname, None) + if value is None: # maybe in structure? + value = dstruct.get(vname, None) + if value is not None: + dlist[vname].append((task, value)) + + for vname in varnames: + tv_list = dlist[vname] + if not tv_list: + stream.write("[%s]: Found 0 tasks with this variable\n" % vname) + else: + stream.write("[%s]: Found %s tasks with this variable\n" % (vname, len(tv_list))) + for i, (task, value) in enumerate(tv_list): + stream.write(" %s --> %s\n" % (str(value), task)) + stream.write("\n") + + else: + lines = [] + for task in self.select_tasks(nids=nids, wslice=wslice): + s = task.make_input(with_header=True) + + # Add info on dependencies. + if task.deps: + s += "\n\nDependencies:\n" + "\n".join(str(dep) for dep in task.deps) + else: + s += "\n\nDependencies: None" + + lines.append(2*"\n" + 80 * "=" + "\n" + s + 2*"\n") + + stream.writelines(lines) + + def listext(self, ext, stream=sys.stdout): + """ + Print to the given `stream` a table with the list of the output files + with the given `ext` produced by the flow. + """ + nodes_files = [] + for node in self.iflat_nodes(): + filepath = node.outdir.has_abiext(ext) + if filepath: + nodes_files.append((node, File(filepath))) + + if nodes_files: + print("Found %s files with extension `%s` produced by the flow" % (len(nodes_files), ext), file=stream) + + table = [[f.relpath, "%.2f" % (f.get_stat().st_size / 1024**2), + node.node_id, node.__class__.__name__] + for node, f in nodes_files] + print(tabulate(table, headers=["File", "Size [Mb]", "Node_ID", "Node Class"]), file=stream) + + else: + print("No output file with extension %s has been produced by the flow" % ext, file=stream) + + def select_tasks(self, nids=None, wslice=None, task_class=None): + """ + Return a list with a subset of tasks. + + Args: + nids: List of node identifiers. + wslice: Slice object used to select works. + task_class: String or class used to select tasks. Ignored if None. + + .. note:: + + nids and wslice are mutually exclusive. + If no argument is provided, the full list of tasks is returned. + """ + if nids is not None: + assert wslice is None + tasks = self.tasks_from_nids(nids) + + elif wslice is not None: + tasks = [] + for work in self[wslice]: + tasks.extend([t for t in work]) + else: + # All tasks selected if no option is provided. + tasks = list(self.iflat_tasks()) + + # Filter by task class + if task_class is not None: + tasks = [t for t in tasks if t.isinstance(task_class)] + + return tasks + + def get_task_scfcycles(self, nids=None, wslice=None, task_class=None, exclude_ok_tasks=False): + """ + Return list of (taks, scfcycle) tuples for all the tasks in the flow with a SCF algorithm + e.g. electronic GS-SCF iteration, DFPT-SCF iterations etc. + + Args: + nids: List of node identifiers. + wslice: Slice object used to select works. + task_class: String or class used to select tasks. Ignored if None. + exclude_ok_tasks: True if only running tasks should be considered. + + Returns: + List of `ScfCycle` subclass instances. + """ + select_status = [self.S_RUN] if exclude_ok_tasks else [self.S_RUN, self.S_OK] + tasks_cycles = [] + + for task in self.select_tasks(nids=nids, wslice=wslice): + # Fileter + if task.status not in select_status or task.cycle_class is None: + continue + if task_class is not None and not task.isinstance(task_class): + continue + try: + cycle = task.cycle_class.from_file(task.output_file.path) + if cycle is not None: + tasks_cycles.append((task, cycle)) + except Exception: + # This is intentionally ignored because from_file can fail for several reasons. + pass + + return tasks_cycles + + def show_tricky_tasks(self, verbose=0, stream=sys.stdout): + """ + Print list of tricky tasks i.e. tasks that have been restarted or + launched more than once or tasks with corrections. + + Args: + verbose: Verbosity level. If > 0, task history and corrections (if any) are printed. + stream: File-like object. Default: sys.stdout + """ + nids, tasks = [], [] + for task in self.iflat_tasks(): + if task.num_launches > 1 or any(n > 0 for n in (task.num_restarts, task.num_corrections)): + nids.append(task.node_id) + tasks.append(task) + + if not nids: + cprint("Everything's fine, no tricky tasks found", color="green", file=stream) + else: + self.show_status(nids=nids, stream=stream) + if not verbose: + print("Use --verbose to print task history.", file=stream) + return + + for nid, task in zip(nids, tasks): + cprint(repr(task), **task.status.color_opts, stream=stream) + self.show_history(nids=[nid], full_history=False, metadata=False, stream=stream) + #if task.num_restarts: + # self.show_restarts(nids=[nid]) + if task.num_corrections: + self.show_corrections(nids=[nid], stream=stream) + + def inspect(self, nids=None, wslice=None, **kwargs): + """ + Inspect the tasks (SCF iterations, Structural relaxation ...) and + produces matplotlib plots. + + Args: + nids: List of node identifiers. + wslice: Slice object used to select works. + kwargs: keyword arguments passed to `task.inspect` method. + + .. note:: + + nids and wslice are mutually exclusive. + If nids and wslice are both None, all tasks in self are inspected. + + Returns: + List of `matplotlib` figures. + """ + figs = [] + for task in self.select_tasks(nids=nids, wslice=wslice): + if hasattr(task, "inspect"): + fig = task.inspect(**kwargs) + if fig is None: + cprint("Cannot inspect Task %s" % task, color="blue") + else: + figs.append(fig) + else: + cprint("Task %s does not provide an inspect method" % task, color="blue") + + return figs + + def get_results(self, **kwargs): + results = self.Results.from_node(self) + results.update(self.get_dict_for_mongodb_queries()) + return results + + def get_dict_for_mongodb_queries(self): + """ + This function returns a dictionary with the attributes that will be + put in the mongodb document to facilitate the query. + Subclasses may want to replace or extend the default behaviour. + """ + d = {} + return d + # TODO + all_structures = [task.input.structure for task in self.iflat_tasks()] + all_pseudos = [task.input.pseudos for task in self.iflat_tasks()] + + def look_before_you_leap(self): + """ + This method should be called before running the calculation to make + sure that the most important requirements are satisfied. + + Return: + List of strings with inconsistencies/errors. + """ + errors = [] + + try: + self.check_dependencies() + except self.Error as exc: + errors.append(str(exc)) + + if self.has_db: + try: + self.manager.db_connector.get_collection() + except Exception as exc: + errors.append(""" + ERROR while trying to connect to the MongoDB database: + Exception: + %s + Connector: + %s + """ % (exc, self.manager.db_connector)) + + return "\n".join(errors) + + @property + def has_db(self): + """True if flow uses `MongoDB` to store the results.""" + return self.manager.has_db + + def db_insert(self): + """ + Insert results in the `MongDB` database. + """ + assert self.has_db + # Connect to MongoDb and get the collection. + coll = self.manager.db_connector.get_collection() + print("Mongodb collection %s with count %d", coll, coll.count()) + + start = time.time() + for work in self: + for task in work: + results = task.get_results() + pprint(results) + results.update_collection(coll) + results = work.get_results() + pprint(results) + results.update_collection(coll) + print("MongoDb update done in %s [s]" % time.time() - start) + + results = self.get_results() + pprint(results) + results.update_collection(coll) + + # Update the pickle file to save the mongo ids. + self.pickle_dump() + + for d in coll.find(): + pprint(d) + + def tasks_from_nids(self, nids): + """ + Return the list of tasks associated to the given list of node identifiers (nids). + + .. note:: + + Invalid ids are ignored + """ + if not isinstance(nids, collections.abc.Iterable): nids = [nids] + + n2task = {task.node_id: task for task in self.iflat_tasks()} + return [n2task[n] for n in nids if n in n2task] + + def wti_from_nids(self, nids): + """Return the list of (w, t) indices from the list of node identifiers nids.""" + return [task.pos for task in self.tasks_from_nids(nids)] + + def open_files(self, what="o", status=None, op="==", nids=None, editor=None): + """ + Open the files of the flow inside an editor (command line interface). + + Args: + what: string with the list of characters selecting the file type + Possible choices: + + i ==> input_file, + o ==> output_file, + f ==> files_file, + j ==> job_file, + l ==> log_file, + e ==> stderr_file, + q ==> qout_file, + all ==> all files. + + status: if not None, only the tasks with this status are select + op: status operator. Requires status. A task is selected + if task.status op status evaluates to true. + nids: optional list of node identifiers used to filter the tasks. + editor: Select the editor. None to use the default editor ($EDITOR shell env var) + """ + # Build list of files to analyze. + files = [] + for task in self.iflat_tasks(status=status, op=op, nids=nids): + lst = task.select_files(what) + if lst: + files.extend(lst) + + return Editor(editor=editor).edit_files(files) + + def parse_timing(self, nids=None): + """ + Parse the timer data in the main output file(s) of Abinit. + Requires timopt /= 0 in the input file (usually timopt = -1) + + Args: + nids: optional list of node identifiers used to filter the tasks. + + Return: :class:`AbinitTimerParser` instance, None if error. + """ + # Get the list of output files according to nids. + paths = [task.output_file.path for task in self.iflat_tasks(nids=nids)] + + # Parse data. + from abipy.flowtk.abitimer import AbinitTimerParser + parser = AbinitTimerParser() + read_ok = parser.parse(paths) + if read_ok: + return parser + return None + + def show_abierrors(self, nids=None, stream=sys.stdout): + """ + Write to the given stream the list of ABINIT errors for all tasks whose status is S_ABICRITICAL. + + Args: + nids: optional list of node identifiers used to filter the tasks. + stream: File-like object. Default: sys.stdout + """ + lines = [] + app = lines.append + + for task in self.iflat_tasks(status=self.S_ABICRITICAL, nids=nids): + header = "=== " + task.qout_file.path + "===" + app(header) + report = task.get_event_report() + + if report is not None: + app("num_errors: %s, num_warnings: %s, num_comments: %s" % ( + report.num_errors, report.num_warnings, report.num_comments)) + app("*** ERRORS ***") + app("\n".join(str(e) for e in report.errors)) + app("*** BUGS ***") + app("\n".join(str(b) for b in report.bugs)) + + else: + app("get_envent_report returned None!") + + app("=" * len(header) + 2*"\n") + + return stream.writelines(lines) + + def show_qouts(self, nids=None, stream=sys.stdout): + """ + Write to the given stream the content of the queue output file for all tasks whose status is S_QCRITICAL. + + Args: + nids: optional list of node identifiers used to filter the tasks. + stream: File-like object. Default: sys.stdout + """ + lines = [] + + for task in self.iflat_tasks(status=self.S_QCRITICAL, nids=nids): + header = "=== " + task.qout_file.path + "===" + lines.append(header) + if task.qout_file.exists: + with open(task.qout_file.path, "rt") as fh: + lines += fh.readlines() + else: + lines.append("File does not exist!") + + lines.append("=" * len(header) + 2*"\n") + + return stream.writelines(lines) + + def debug(self, status=None, nids=None, stream=sys.stdout): + """ + This method is usually used when the flow didn't completed succesfully + It analyzes the files produced the tasks to facilitate debugging. + Info are printed to stdout. + + Args: + status: If not None, only the tasks with this status are selected + nids: optional list of node identifiers used to filter the tasks. + stream: File-like object. Default: sys.stdout + """ + nrows, ncols = get_terminal_size() + + # Test for scheduler exceptions first. + sched_excfile = os.path.join(self.workdir, "_exceptions") + if os.path.exists(sched_excfile): + with open(sched_excfile, "r") as fh: + cprint("Found exceptions raised by the scheduler", "red", file=stream) + cprint(fh.read(), color="red", file=stream) + return + + if status is not None: + tasks = list(self.iflat_tasks(status=status, nids=nids)) + else: + errors = list(self.iflat_tasks(status=self.S_ERROR, nids=nids)) + qcriticals = list(self.iflat_tasks(status=self.S_QCRITICAL, nids=nids)) + abicriticals = list(self.iflat_tasks(status=self.S_ABICRITICAL, nids=nids)) + tasks = errors + qcriticals + abicriticals + + # For each task selected: + # 1) Check the error files of the task. If not empty, print the content to stdout and we are done. + # 2) If error files are empty, look at the master log file for possible errors + # 3) If also this check failes, scan all the process log files. + # TODO: This check is not needed if we introduce a new __abinit_error__ file + # that is created by the first MPI process that invokes MPI abort! + # + ntasks = 0 + for task in tasks: + print(make_banner(str(task), width=ncols, mark="="), file=stream) + ntasks += 1 + + # Start with error files. + for efname in ["qerr_file", "stderr_file",]: + err_file = getattr(task, efname) + if err_file.exists: + s = err_file.read() + if not s: continue + print(make_banner(str(err_file), width=ncols, mark="="), file=stream) + cprint(s, color="red", file=stream) + #count += 1 + + # Check main log file. + try: + report = task.get_event_report() + if report and report.num_errors: + print(make_banner(os.path.basename(report.filename), width=ncols, mark="="), file=stream) + s = "\n".join(str(e) for e in report.errors) + else: + s = None + except Exception as exc: + s = str(exc) + + count = 0 # count > 0 means we found some useful info that could explain the failures. + if s is not None: + cprint(s, color="red", file=stream) + count += 1 + + if not count: + # Inspect all log files produced by the other nodes. + log_files = task.tmpdir.list_filepaths(wildcard="*LOG_*") + if not log_files: + cprint("No *LOG_* file in tmpdir. This usually happens if you are running with many CPUs", + color="magenta", file=stream) + + for log_file in log_files: + try: + report = EventsParser().parse(log_file) + if report.errors: + print(report, file=stream) + count += 1 + break + except Exception as exc: + cprint(str(exc), color="red", file=stream) + count += 1 + break + + if not count: + cprint("Houston, we could not find any error message that can explain the problem", + color="magenta", file=stream) + + print("Number of tasks analyzed: %d" % ntasks, file=stream) + + def cancel(self, nids=None): + """ + Cancel all the tasks that are in the queue. + nids is an optional list of node identifiers used to filter the tasks. + + Returns: + Number of jobs cancelled, negative value if error + """ + if self.has_chrooted: + # TODO: Use paramiko to kill the job? + warnings.warn("Cannot cancel the flow via sshfs!") + return -1 + + # If we are running with the scheduler, we must send a SIGKILL signal. + if os.path.exists(self.pid_file): + cprint("Found scheduler attached to this flow.", "yellow") + cprint("Sending SIGKILL to the scheduler before cancelling the tasks!", "yellow") + + with open(self.pid_file, "rt") as fh: + pid = int(fh.readline()) + + retcode = os.system("kill -9 %d" % pid) + self.history.info("Sent SIGKILL to the scheduler, retcode: %s" % retcode) + try: + os.remove(self.pid_file) + except IOError: + pass + + num_cancelled = 0 + for task in self.iflat_tasks(nids=nids): + num_cancelled += task.cancel() + + return num_cancelled + + def get_njobs_in_queue(self, username=None): + """ + returns the number of jobs in the queue, None when the number of jobs cannot be determined. + + Args: + username: (str) the username of the jobs to count (default is to autodetect) + """ + return self.manager.qadapter.get_njobs_in_queue(username=username) + + def rmtree(self, ignore_errors=False, onerror=None): + """Remove workdir (same API as shutil.rmtree).""" + if not os.path.exists(self.workdir): return + shutil.rmtree(self.workdir, ignore_errors=ignore_errors, onerror=onerror) + + def rm_and_build(self): + """Remove the workdir and rebuild the flow.""" + self.rmtree() + self.build() + + def build(self, *args, **kwargs): + """Make directories and files of the `Flow`.""" + # Allocate here if not done yet! + if not self.allocated: self.allocate() + + self.indir.makedirs() + self.outdir.makedirs() + self.tmpdir.makedirs() + + # Check the nodeid file in workdir + nodeid_path = os.path.join(self.workdir, ".nodeid") + + if os.path.exists(nodeid_path): + with open(nodeid_path, "rt") as fh: + node_id = int(fh.read()) + + if self.node_id != node_id: + msg = ("\nFound node_id %s in file:\n\n %s\n\nwhile the node_id of the present flow is %d.\n" + "This means that you are trying to build a new flow in a directory already used by another flow.\n" + "Possible solutions:\n" + " 1) Change the workdir of the new flow.\n" + " 2) remove the old directory either with `rm -r` or by calling the method flow.rmtree()\n" + % (node_id, nodeid_path, self.node_id)) + raise RuntimeError(msg) + + else: + with open(nodeid_path, "wt") as fh: + fh.write(str(self.node_id)) + + if self.pyfile and os.path.isfile(self.pyfile): + shutil.copy(self.pyfile, self.workdir) + + for work in self: + work.build(*args, **kwargs) + + def build_and_pickle_dump(self, abivalidate=False): + """ + Build dirs and file of the `Flow` and save the object in pickle format. + Returns 0 if success + + Args: + abivalidate: If True, all the input files are validate by calling + the abinit parser. If the validation fails, ValueError is raise. + """ + self.build() + if not abivalidate: return self.pickle_dump() + + # Validation with Abinit. + isok, errors = self.abivalidate_inputs() + if isok: return self.pickle_dump() + errlines = [] + for i, e in enumerate(errors): + errlines.append("[%d] %s" % (i, e)) + raise ValueError("\n".join(errlines)) + + @check_spectator + def pickle_dump(self): + """ + Save the status of the object in pickle format. + Returns 0 if success + """ + if self.has_chrooted: + warnings.warn("Cannot pickle_dump since we have chrooted from %s" % self.has_chrooted) + return -1 + + #if self.in_spectator_mode: + # warnings.warn("Cannot pickle_dump since flow is in_spectator_mode") + # return -2 + + protocol = self.pickle_protocol + + # Atomic transaction with FileLock. + with FileLock(self.pickle_file): + with AtomicFile(self.pickle_file, mode="wb") as fh: + pmg_pickle_dump(self, fh, protocol=protocol) + + return 0 + + def pickle_dumps(self, protocol=None): + """ + Return a string with the pickle representation. + `protocol` selects the pickle protocol. self.pickle_protocol is used if `protocol` is None + """ + strio = StringIO() + pmg_pickle_dump(self, strio, + protocol=self.pickle_protocol if protocol is None + else protocol) + return strio.getvalue() + + def register_task(self, input, deps=None, manager=None, task_class=None, append=False): + """ + Utility function that generates a `Work` made of a single task + + Args: + input: |AbinitInput| + deps: List of :class:`Dependency` objects specifying the dependency of this node. + An empy list of deps implies that this node has no dependencies. + manager: The |TaskManager| responsible for the submission of the task. + If manager is None, we use the |TaskManager| specified during the creation of the work. + task_class: Task subclass to instantiate. Default: |AbinitTask| + append: If true, the task is added to the last work (a new Work is created if flow is empty) + + Returns: + The generated |Work| for the task, work[0] is the actual task. + """ + # append True is much easier to use. In principle should be the default behaviour + # but this would break the previous API so ... + if not append: + work = Work(manager=manager) + else: + if not self.works: + work = Work(manager=manager) + append = False + else: + work = self.works[-1] + + task = work.register(input, deps=deps, task_class=task_class) + if not append: self.register_work(work) + + return work + + def register_work(self, work, deps=None, manager=None, workdir=None): + """ + Register a new |Work| and add it to the internal list, taking into account possible dependencies. + + Args: + work: |Work| object. + deps: List of :class:`Dependency` objects specifying the dependency of this node. + An empy list of deps implies that this node has no dependencies. + manager: The |TaskManager| responsible for the submission of the task. + If manager is None, we use the `TaskManager` specified during the creation of the work. + workdir: The name of the directory used for the |Work|. + + Returns: + The registered |Work|. + """ + if getattr(self, "workdir", None) is not None: + # The flow has a directory, build the name of the directory of the work. + work_workdir = None + if workdir is None: + work_workdir = os.path.join(self.workdir, "w" + str(len(self))) + else: + work_workdir = os.path.join(self.workdir, os.path.basename(workdir)) + + work.set_workdir(work_workdir) + + if manager is not None: + work.set_manager(manager) + + self.works.append(work) + + if deps: + deps = [Dependency(node, exts) for node, exts in deps.items()] + work.add_deps(deps) + + return work + + def register_work_from_cbk(self, cbk_name, cbk_data, deps, work_class, manager=None): + """ + Registers a callback function that will generate the :class:`Task` of the :class:`Work`. + + Args: + cbk_name: Name of the callback function (must be a bound method of self) + cbk_data: Additional data passed to the callback function. + deps: List of :class:`Dependency` objects specifying the dependency of the work. + work_class: |Work| class to instantiate. + manager: The |TaskManager| responsible for the submission of the task. + If manager is None, we use the `TaskManager` specified during the creation of the |Flow|. + + Returns: + The |Work| that will be finalized by the callback. + """ + # TODO: pass a Work factory instead of a class + # Directory of the Work. + work_workdir = os.path.join(self.workdir, "w" + str(len(self))) + + # Create an empty work and register the callback + work = work_class(workdir=work_workdir, manager=manager) + + self._works.append(work) + + deps = [Dependency(node, exts) for node, exts in deps.items()] + if not deps: + raise ValueError("A callback must have deps!") + + work.add_deps(deps) + + # Wrap the callable in a Callback object and save + # useful info such as the index of the work and the callback data. + cbk = FlowCallback(cbk_name, self, deps=deps, cbk_data=cbk_data) + self._callbacks.append(cbk) + + return work + + @property + def allocated(self): + """Numer of allocations. Set by `allocate`.""" + try: + return self._allocated + except AttributeError: + return 0 + + def allocate(self, workdir=None, use_smartio=False): + """ + Allocate the `Flow` i.e. assign the `workdir` and (optionally) + the |TaskManager| to the different tasks in the Flow. + + Args: + workdir: Working directory of the flow. Must be specified here + if we haven't initialized the workdir in the __init__. + + Return: + self + """ + if workdir is not None: + # We set the workdir of the flow here + self.set_workdir(workdir) + for i, work in enumerate(self): + work.set_workdir(os.path.join(self.workdir, "w" + str(i))) + + if not hasattr(self, "workdir"): + raise RuntimeError("You must call flow.allocate(workdir) if the workdir is not passed to __init__") + + for work in self: + # Each work has a reference to its flow. + work.allocate(manager=self.manager) + work.set_flow(self) + # Each task has a reference to its work. + for task in work: + task.set_work(work) + + self.check_dependencies() + + if not hasattr(self, "_allocated"): self._allocated = 0 + self._allocated += 1 + + if use_smartio: + self.use_smartio() + + return self + + def use_smartio(self): + """ + This function should be called when the entire `Flow` has been built. + It tries to reduce the pressure on the hard disk by using Abinit smart-io + capabilities for those files that are not needed by other nodes. + Smart-io means that big files (e.g. WFK) are written only if the calculation + is unconverged so that we can restart from it. No output is produced if + convergence is achieved. + + Return: self + """ + if not self.allocated: + #raise RuntimeError("You must call flow.allocate() before invoking flow.use_smartio()") + self.allocate() + + for task in self.iflat_tasks(): + children = task.get_children() + if not children: + # Change the input so that output files are produced + # only if the calculation is not converged. + task.history.info("Will disable IO for task") + task.set_vars(prtwf=-1, prtden=0) # TODO: prt1wf=-1, + else: + must_produce_abiexts = [] + for child in children: + # Get the list of dependencies. Find that task + for d in child.deps: + must_produce_abiexts.extend(d.exts) + + must_produce_abiexts = set(must_produce_abiexts) + #print("must_produce_abiexts", must_produce_abiexts) + + # Variables supporting smart-io. + smart_prtvars = { + "prtwf": "WFK", + } + + # Set the variable to -1 to disable the output + for varname, abiext in smart_prtvars.items(): + if abiext not in must_produce_abiexts: + print("%s: setting %s to -1" % (task, varname)) + task.set_vars({varname: -1}) + + return self + + def show_dependencies(self, stream=sys.stdout): + """ + Writes to the given stream the ASCII representation of the dependency tree. + """ + def child_iter(node): + return [d.node for d in node.deps] + + def text_str(node): + return colored(str(node), color=node.status.color_opts["color"]) + + for task in self.iflat_tasks(): + print(draw_tree(task, child_iter, text_str), file=stream) + + def on_all_ok(self): + """ + This method is called when all the works in the flow have reached S_OK. + This method shall return True if the calculation is completed or + False if the execution should continue due to side-effects such as adding a new work to the flow. + + This methods allows subclasses to implement customized logic such as extending the flow by adding new works. + The flow has an internal counter: on_all_ok_num_calls + that shall be incremented by client code when subclassing this method. + This counter can be used to decide if futher actions are needed or not. + + An example of flow that adds a new work (only once) when all_ok is reached for the first time: + + def on_all_ok(self): + if self.on_all_ok_num_calls > 0: return True + self.on_all_ok_num_calls += 1 + + `implement_logic_to_create_new_work` + + self.register_work(work) + self.allocate() + self.build_and_pickle_dump() + + return False # The scheduler will keep on running the flow. + """ + return True + + def on_dep_ok(self, signal, sender): + # TODO + # Replace this callback with dynamic dispatch + # on_all_S_OK for work + # on_S_OK for task + self.history.info("on_dep_ok with sender %s, signal %s" % (str(sender), signal)) + + for i, cbk in enumerate(self._callbacks): + if not cbk.handle_sender(sender): + self.history.info("%s does not handle sender %s" % (cbk, sender)) + continue + + if not cbk.can_execute(): + self.history.info("Cannot execute %s" % cbk) + continue + + # Execute the callback and disable it + self.history.info("flow in on_dep_ok: about to execute callback %s" % str(cbk)) + cbk() + cbk.disable() + + # Update the database. + self.pickle_dump() + + @check_spectator + def finalize(self): + """ + This method is called when the flow is completed. Return 0 if success + """ + self.history.info("Calling flow.finalize.") + if self.finalized: + self.history.warning("Calling finalize on an already finalized flow. Returning 1") + return 1 + + self.finalized = True + + if self.has_db: + self.history.info("Saving results in database.") + try: + self.flow.db_insert() + self.finalized = True + except Exception: + self.history.critical("MongoDb insertion failed.") + return 2 + + # Here we remove the big output files if we have the garbage collector + # and the policy is set to "flow." + if self.gc is not None and self.gc.policy == "flow": + self.history.info("gc.policy set to flow. Will clean task output files.") + for task in self.iflat_tasks(): + task.clean_output_files() + + return 0 + + def set_garbage_collector(self, exts=None, policy="task"): + """ + Enable the garbage collector that will remove the big output files that are not needed. + + Args: + exts: string or list with the Abinit file extensions to be removed. A default is + provided if exts is None + policy: Either `flow` or `task`. If policy is set to 'task', we remove the output + files as soon as the task reaches S_OK. If 'flow', the files are removed + only when the flow is finalized. This option should be used when we are dealing + with a dynamic flow with callbacks generating other tasks since a |Task| + might not be aware of its children when it reached S_OK. + """ + assert policy in ("task", "flow") + exts = list_strings(exts) if exts is not None else ("WFK", "SUS", "SCR", "BSR", "BSC") + + gc = GarbageCollector(exts=set(exts), policy=policy) + + self.set_gc(gc) + for work in self: + #work.set_gc(gc) # TODO Add support for Works and flow policy + for task in work: + task.set_gc(gc) + + def connect_signals(self): + """ + Connect the signals within the `Flow`. + The `Flow` is responsible for catching the important signals raised from its works. + """ + # Connect the signals inside each Work. + for work in self: + work.connect_signals() + + # Observe the nodes that must reach S_OK in order to call the callbacks. + for cbk in self._callbacks: + #cbk.enable() + for dep in cbk.deps: + self.history.info("Connecting %s \nwith sender %s, signal %s" % (str(cbk), dep.node, dep.node.S_OK)) + dispatcher.connect(self.on_dep_ok, signal=dep.node.S_OK, sender=dep.node, weak=False) + + # Associate to each signal the callback _on_signal + # (bound method of the node that will be called by `Flow` + # Each node will set its attribute _done_signal to True to tell + # the flow that this callback should be disabled. + + # Register the callbacks for the Work. + #for work in self: + # slot = self._sig_slots[work] + # for signal in S_ALL: + # done_signal = getattr(work, "_done_ " + signal, False) + # if not done_sig: + # cbk_name = "_on_" + str(signal) + # cbk = getattr(work, cbk_name, None) + # if cbk is None: continue + # slot[work][signal].append(cbk) + # print("connecting %s\nwith sender %s, signal %s" % (str(cbk), dep.node, dep.node.S_OK)) + # dispatcher.connect(self.on_dep_ok, signal=signal, sender=dep.node, weak=False) + + # Register the callbacks for the Tasks. + #self.show_receivers() + + def disconnect_signals(self): + """Disable the signals within the `Flow`.""" + # Disconnect the signals inside each Work. + for work in self: + work.disconnect_signals() + + # Disable callbacks. + for cbk in self._callbacks: + cbk.disable() + + def show_receivers(self, sender=None, signal=None): + sender = sender if sender is not None else dispatcher.Any + signal = signal if signal is not None else dispatcher.Any + print("*** live receivers ***") + for rec in dispatcher.liveReceivers(dispatcher.getReceivers(sender, signal)): + print("receiver -->", rec) + print("*** end live receivers ***") + + def set_spectator_mode(self, mode=True): + """ + When the flow is in spectator_mode, we have to disable signals, pickle dump and possible callbacks + A spectator can still operate on the flow but the new status of the flow won't be saved in + the pickle file. Usually the flow is in spectator mode when we are already running it via + the scheduler or other means and we should not interfere with its evolution. + This is the reason why signals and callbacks must be disabled. + Unfortunately preventing client-code from calling methods with side-effects when + the flow is in spectator mode is not easy (e.g. flow.cancel will cancel the tasks submitted to the + queue and the flow used by the scheduler won't see this change! + """ + # Set the flags of all the nodes in the flow. + mode = bool(mode) + self.in_spectator_mode = mode + for node in self.iflat_nodes(): + node.in_spectator_mode = mode + + # connect/disconnect signals depending on mode. + if not mode: + self.connect_signals() + else: + self.disconnect_signals() + + #def get_results(self, **kwargs) + + def rapidfire(self, check_status=True, max_nlaunch=-1, max_loops=1, sleep_time=5, **kwargs): + """ + Use :class:`PyLauncher` to submits tasks in rapidfire mode. + kwargs contains the options passed to the launcher. + + Args: + check_status: + max_nlaunch: Maximum number of launches. default: no limit. + max_loops: Maximum number of loops + sleep_time: seconds to sleep between rapidfire loop iterations + + Return: Number of tasks submitted. + """ + self.check_pid_file() + self.set_spectator_mode(False) + if check_status: self.check_status() + from .launcher import PyLauncher + return PyLauncher(self, **kwargs).rapidfire(max_nlaunch=max_nlaunch, max_loops=max_loops, sleep_time=sleep_time) + + def single_shot(self, check_status=True, **kwargs): + """ + Use :class:`PyLauncher` to submits one task. + kwargs contains the options passed to the launcher. + + Return: Number of tasks submitted. + """ + self.check_pid_file() + self.set_spectator_mode(False) + if check_status: self.check_status() + from .launcher import PyLauncher + return PyLauncher(self, **kwargs).single_shot() + + def make_scheduler(self, **kwargs): + """ + Build and return a :class:`PyFlowScheduler` to run the flow. + + Args: + kwargs: if empty we use the user configuration file. + if `filepath` in kwargs we init the scheduler from filepath. + else pass kwargs to :class:`PyFlowScheduler` __init__ method. + """ + from .launcher import PyFlowScheduler + if not kwargs: + # User config if kwargs is empty + sched = PyFlowScheduler.from_user_config() + else: + # Use from_file if filepath if present, else call __init__ + filepath = kwargs.pop("filepath", None) + if filepath is not None: + assert not kwargs + sched = PyFlowScheduler.from_file(filepath) + else: + sched = PyFlowScheduler(**kwargs) + + sched.add_flow(self) + return sched + + def batch(self, timelimit=None): + """ + Run the flow in batch mode, return exit status of the job script. + Requires a manager.yml file and a batch_adapter adapter. + + Args: + timelimit: Time limit (int with seconds or string with time given with the slurm convention: + "days-hours:minutes:seconds"). If timelimit is None, the default value specified in the + `batch_adapter` entry of `manager.yml` is used. + """ + from .launcher import BatchLauncher + # Create a batch dir from the flow.workdir. + prev_dir = os.path.join(*self.workdir.split(os.path.sep)[:-1]) + prev_dir = os.path.join(os.path.sep, prev_dir) + workdir = os.path.join(prev_dir, os.path.basename(self.workdir) + "_batch") + + return BatchLauncher(workdir=workdir, flows=self).submit(timelimit=timelimit) + + def make_light_tarfile(self, name=None): + """Lightweight tarball file. Mainly used for debugging. Return the name of the tarball file.""" + name = os.path.basename(self.workdir) + "-light.tar.gz" if name is None else name + return self.make_tarfile(name=name, exclude_dirs=["outdata", "indata", "tmpdata"]) + + def make_tarfile(self, name=None, max_filesize=None, exclude_exts=None, exclude_dirs=None, verbose=0, **kwargs): + """ + Create a tarball file. + + Args: + name: Name of the tarball file. Set to os.path.basename(`flow.workdir`) + "tar.gz"` if name is None. + max_filesize (int or string with unit): a file is included in the tar file if its size <= max_filesize + Can be specified in bytes e.g. `max_files=1024` or with a string with unit e.g. `max_filesize="1 Mb"`. + No check is done if max_filesize is None. + exclude_exts: List of file extensions to be excluded from the tar file. + exclude_dirs: List of directory basenames to be excluded. + verbose (int): Verbosity level. + kwargs: keyword arguments passed to the :class:`TarFile` constructor. + + Returns: The name of the tarfile. + """ + def any2bytes(s): + """Convert string or number to memory in bytes.""" + if is_string(s): + return int(Memory.from_string(s).to("b")) + else: + return int(s) + + if max_filesize is not None: + max_filesize = any2bytes(max_filesize) + + if exclude_exts: + # Add/remove ".nc" so that we can simply pass "GSR" instead of "GSR.nc" + # Moreover this trick allows one to treat WFK.nc and WFK file on the same footing. + exts = [] + for e in list_strings(exclude_exts): + exts.append(e) + if e.endswith(".nc"): + exts.append(e.replace(".nc", "")) + else: + exts.append(e + ".nc") + exclude_exts = exts + + def filter(tarinfo): + """ + Function that takes a TarInfo object argument and returns the changed TarInfo object. + If it instead returns None the TarInfo object will be excluded from the archive. + """ + # Skip links. + if tarinfo.issym() or tarinfo.islnk(): + if verbose: print("Excluding link: %s" % tarinfo.name) + return None + + # Check size in bytes + if max_filesize is not None and tarinfo.size > max_filesize: + if verbose: print("Excluding %s due to max_filesize" % tarinfo.name) + return None + + # Filter filenames. + if exclude_exts and any(tarinfo.name.endswith(ext) for ext in exclude_exts): + if verbose: print("Excluding %s due to extension" % tarinfo.name) + return None + + # Exlude directories (use dir basenames). + if exclude_dirs and any(dir_name in exclude_dirs for dir_name in tarinfo.name.split(os.path.sep)): + if verbose: print("Excluding %s due to exclude_dirs" % tarinfo.name) + return None + + return tarinfo + + back = os.getcwd() + os.chdir(os.path.join(self.workdir, "..")) + + import tarfile + name = os.path.basename(self.workdir) + ".tar.gz" if name is None else name + with tarfile.open(name=name, mode='w:gz', **kwargs) as tar: + tar.add(os.path.basename(self.workdir), arcname=None, recursive=True, filter=filter) + + # Add the script used to generate the flow. + if self.pyfile is not None and os.path.exists(self.pyfile): + tar.add(self.pyfile) + + os.chdir(back) + return name + + def get_graphviz(self, engine="automatic", graph_attr=None, node_attr=None, edge_attr=None): + """ + Generate flow graph in the DOT language. + + Args: + engine: Layout command used. ['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage'] + graph_attr: Mapping of (attribute, value) pairs for the graph. + node_attr: Mapping of (attribute, value) pairs set for all nodes. + edge_attr: Mapping of (attribute, value) pairs set for all edges. + + Returns: graphviz.Digraph + """ + self.allocate() + + from graphviz import Digraph + fg = Digraph("flow", #filename="flow_%s.gv" % os.path.basename(self.relworkdir), + engine="fdp" if engine == "automatic" else engine) + + # Set graph attributes. https://www.graphviz.org/doc/info/ + fg.attr(label=repr(self)) + fg.attr(rankdir="LR", pagedir="BL") + fg.node_attr.update(color='lightblue2', style='filled') + + # Add input attributes. + if graph_attr is not None: fg.graph_attr.update(**graph_attr) + if node_attr is not None: fg.node_attr.update(**node_attr) + if edge_attr is not None: fg.edge_attr.update(**edge_attr) + + def node_kwargs(node): + return dict( + #shape="circle", + color=node.color_hex, + fontsize="8.0", + label=(str(node) if not hasattr(node, "pos_str") else + node.pos_str + "\n" + node.__class__.__name__), + ) + + edge_kwargs = dict(arrowType="vee", style="solid") + cluster_kwargs = dict(rankdir="LR", pagedir="BL", style="rounded", bgcolor="azure2") + + for work in self: + # Build cluster with tasks. + cluster_name = "cluster%s" % work.name + with fg.subgraph(name=cluster_name) as wg: + wg.attr(**cluster_kwargs) + wg.attr(label="%s (%s)" % (work.__class__.__name__, work.name)) + for task in work: + wg.node(task.name, **node_kwargs(task)) + # Connect children to task. + for child in task.get_children(): + # Find file extensions required by this task + i = [dep.node for dep in child.deps].index(task) + edge_label = "+".join(child.deps[i].exts) + fg.edge(task.name, child.name, label=edge_label, color=task.color_hex, + **edge_kwargs) + + # Treat the case in which we have a work producing output for other tasks. + for work in self: + children = work.get_children() + if not children: continue + cluster_name = "cluster%s" % work.name + seen = set() + for child in children: + # This is not needed, too much confusing + #fg.edge(cluster_name, child.name, color=work.color_hex, **edge_kwargs) + # Find file extensions required by work + i = [dep.node for dep in child.deps].index(work) + for ext in child.deps[i].exts: + out = "%s (%s)" % (ext, work.name) + fg.node(out) + fg.edge(out, child.name, **edge_kwargs) + key = (cluster_name, out) + if key not in seen: + seen.add(key) + fg.edge(cluster_name, out, color=work.color_hex, **edge_kwargs) + + # Treat the case in which we have a task that depends on external files. + seen = set() + for task in self.iflat_tasks(): + #print(task.get_parents()) + for node in (p for p in task.get_parents() if p.is_file): + #print("parent file node", node) + #infile = "%s (%s)" % (ext, work.name) + infile = node.filepath + if infile not in seen: + seen.add(infile) + fg.node(infile, **node_kwargs(node)) + + fg.edge(infile, task.name, color=node.color_hex, **edge_kwargs) + + return fg + + @add_fig_kwargs + def graphviz_imshow(self, ax=None, figsize=None, dpi=300, fmt="png", **kwargs): + """ + Generate flow graph in the DOT language and plot it with matplotlib. + + Args: + ax: |matplotlib-Axes| or None if a new figure should be created. + figsize: matplotlib figure size (None to use default) + dpi: DPI value. + fmt: Select format for output image + + Return: |matplotlib-Figure| + """ + graph = self.get_graphviz(**kwargs) + graph.format = fmt + graph.attr(dpi=str(dpi)) + _, tmpname = tempfile.mkstemp() + path = graph.render(tmpname, view=False, cleanup=True) + ax, fig, _ = get_ax_fig_plt(ax=ax, figsize=figsize, dpi=dpi) + import matplotlib.image as mpimg + ax.imshow(mpimg.imread(path, format="png")) #, interpolation="none") + ax.axis("off") + + return fig + + @add_fig_kwargs + def plot_networkx(self, mode="network", with_edge_labels=False, ax=None, arrows=False, + node_size="num_cores", node_label="name_class", layout_type="spring", **kwargs): + """ + Use networkx to draw the flow with the connections among the nodes and + the status of the tasks. + + Args: + mode: `networkx` to show connections, `status` to group tasks by status. + with_edge_labels: True to draw edge labels. + ax: |matplotlib-Axes| or None if a new figure should be created. + arrows: if True draw arrowheads. + node_size: By default, the size of the node is proportional to the number of cores used. + node_label: By default, the task class is used to label node. + layout_type: Get positions for all nodes using `layout_type`. e.g. pos = nx.spring_layout(g) + + .. warning:: + + Requires networkx package. + """ + self.allocate() + + # Build the graph + import networkx as nx + g = nx.Graph() if not arrows else nx.DiGraph() + edge_labels = {} + for task in self.iflat_tasks(): + g.add_node(task, name=task.name) + for child in task.get_children(): + g.add_edge(task, child) + # TODO: Add getters! What about locked nodes! + i = [dep.node for dep in child.deps].index(task) + edge_labels[(task, child)] = " ".join(child.deps[i].exts) + + filedeps = [d for d in task.deps if d.node.is_file] + for d in filedeps: + #print(d.node, d.exts) + g.add_node(d.node, name="%s (%s)" % (d.node.basename, d.node.node_id)) + g.add_edge(d.node, task) + edge_labels[(d.node, task)] = "+".join(d.exts) + + # This part is needed if we have a work that produces output used by other nodes. + for work in self: + children = work.get_children() + if not children: + continue + g.add_node(work, name=work.name) + for task in work: + g.add_edge(task, work) + edge_labels[(task, work)] = "all_ok " + for child in children: + g.add_edge(work, child) + i = [dep.node for dep in child.deps].index(work) + edge_labels[(work, child)] = "+".join(child.deps[i].exts) + + # Get positions for all nodes using layout_type. + # e.g. pos = nx.spring_layout(g) + pos = getattr(nx, layout_type + "_layout")(g) + + # Select function used to compute the size of the node + def make_node_size(node): + if node.is_task: + return 300 * node.manager.num_cores + else: + return 600 + + # Function used to build the label + def make_node_label(node): + if node_label == "name_class": + if node.is_file: + return "%s\n(%s)" % (node.basename, node.node_id) + else: + return (node.pos_str + "\n" + node.__class__.__name__ + if hasattr(node, "pos_str") else str(node)) + else: + raise NotImplementedError("node_label: %s" % str(node_label)) + + labels = {node: make_node_label(node) for node in g.nodes()} + ax, fig, plt = get_ax_fig_plt(ax=ax) + + # Select plot type. + if mode == "network": + nx.draw_networkx(g, pos, labels=labels, + node_color=[node.color_rgb for node in g.nodes()], + node_size=[make_node_size(node) for node in g.nodes()], + width=1, style="dotted", with_labels=True, arrows=arrows, ax=ax) + + # Draw edge labels + if with_edge_labels: + nx.draw_networkx_edge_labels(g, pos, edge_labels=edge_labels, ax=ax) + + elif mode == "status": + # Group tasks by status (only tasks are show here). + for status in self.ALL_STATUS: + tasks = list(self.iflat_tasks(status=status)) + + # Draw nodes (color is given by status) + node_color = status.color_opts["color"] + if node_color is None: node_color = "black" + #print("num nodes %s with node_color %s" % (len(tasks), node_color)) + + nx.draw_networkx_nodes(g, pos, + nodelist=tasks, + node_color=node_color, + node_size=[make_node_size(task) for task in tasks], + alpha=0.5, ax=ax + #label=str(status), + ) + # Draw edges. + nx.draw_networkx_edges(g, pos, width=2.0, alpha=0.5, arrows=arrows, ax=ax) # edge_color='r') + + # Draw labels + nx.draw_networkx_labels(g, pos, labels, font_size=12, ax=ax) + + # Draw edge labels + if with_edge_labels: + nx.draw_networkx_edge_labels(g, pos, edge_labels=edge_labels, ax=ax) + #label_pos=0.5, font_size=10, font_color='k', font_family='sans-serif', font_weight='normal', + # alpha=1.0, bbox=None, ax=None, rotate=True, **kwds) + + else: + raise ValueError("Unknown value for mode: %s" % str(mode)) + + ax.axis("off") + return fig + + def write_open_notebook(flow, foreground): + """ + Generate an ipython notebook and open it in the browser. + Return system exit code. + """ + import nbformat + nbf = nbformat.v4 + nb = nbf.new_notebook() + + nb.cells.extend([ + #nbf.new_markdown_cell("This is an auto-generated notebook for %s" % os.path.basename(pseudopath)), + nbf.new_code_cell("""\ + import sys, os + import numpy as np + + %matplotlib notebook + from IPython.display import display + + # This to render pandas DataFrames with https://github.com/quantopian/qgrid + #import qgrid + #qgrid.nbinstall(overwrite=True) # copies javascript dependencies to your /nbextensions folder + + from abipy import abilab + + # Tell AbiPy we are inside a notebook and use seaborn settings for plots. + # See https://seaborn.pydata.org/generated/seaborn.set.html#seaborn.set + abilab.enable_notebook(with_seaborn=True) + """), + + nbf.new_code_cell("flow = abilab.Flow.pickle_load('%s')" % flow.workdir), + nbf.new_code_cell("if flow.num_errored_tasks: flow.debug()"), + nbf.new_code_cell("flow.check_status(show=True, verbose=0)"), + nbf.new_code_cell("flow.show_dependencies()"), + nbf.new_code_cell("flow.plot_networkx();"), + nbf.new_code_cell("#flow.get_graphviz();"), + nbf.new_code_cell("flow.show_inputs(nids=None, wslice=None)"), + nbf.new_code_cell("flow.show_history()"), + nbf.new_code_cell("flow.show_corrections()"), + nbf.new_code_cell("flow.show_event_handlers()"), + nbf.new_code_cell("flow.inspect(nids=None, wslice=None)"), + nbf.new_code_cell("flow.show_abierrors()"), + nbf.new_code_cell("flow.show_qouts()"), + ]) + + import tempfile, io + _, nbpath = tempfile.mkstemp(suffix='.ipynb', text=True) + + with io.open(nbpath, 'wt', encoding="utf8") as fh: + nbformat.write(nb, fh) + + from monty.os.path import which + has_jupyterlab = which("jupyter-lab") is not None + appname = "jupyter-lab" if has_jupyterlab else "jupyter notebook" + if not has_jupyterlab: + if which("jupyter") is None: + raise RuntimeError("Cannot find jupyter in $PATH. Install it with `pip install`") + + appname = "jupyter-lab" if has_jupyterlab else "jupyter notebook" + + if foreground: + return os.system("%s %s" % (appname, nbpath)) + else: + fd, tmpname = tempfile.mkstemp(text=True) + print(tmpname) + cmd = "%s %s" % (appname, nbpath) + print("Executing:", cmd, "\nstdout and stderr redirected to %s" % tmpname) + import subprocess + process = subprocess.Popen(cmd.split(), shell=False, stdout=fd, stderr=fd) + cprint("pid: %s" % str(process.pid), "yellow") + return process.returncode + + +class G0W0WithQptdmFlow(Flow): + + def __init__(self, workdir, scf_input, nscf_input, scr_input, sigma_inputs, manager=None): + """ + Build a :class:`Flow` for one-shot G0W0 calculations. + The computation of the q-points for the screening is parallelized with qptdm + i.e. we run independent calculations for each q-point and then we merge the final results. + + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + nscf_input: Input for the NSCF run (band structure run). + scr_input: Input for the SCR run. + sigma_inputs: Input(s) for the SIGMA run(s). + manager: |TaskManager| object used to submit the jobs. Initialized from manager.yml if manager is None. + """ + super().__init__(workdir, manager=manager) + + # Register the first work (GS + NSCF calculation) + bands_work = self.register_work(BandStructureWork(scf_input, nscf_input)) + + # Register the callback that will be executed the work for the SCR with qptdm. + scr_work = self.register_work_from_cbk(cbk_name="cbk_qptdm_workflow", cbk_data={"input": scr_input}, + deps={bands_work.nscf_task: "WFK"}, work_class=QptdmWork) + + # The last work contains a list of SIGMA tasks + # that will use the data produced in the previous two works. + if not isinstance(sigma_inputs, (list, tuple)): + sigma_inputs = [sigma_inputs] + + sigma_work = Work() + for sigma_input in sigma_inputs: + sigma_work.register_sigma_task(sigma_input, deps={bands_work.nscf_task: "WFK", scr_work: "SCR"}) + self.register_work(sigma_work) + + self.allocate() + + def cbk_qptdm_workflow(self, cbk): + """ + This callback is executed by the flow when bands_work.nscf_task reaches S_OK. + + It computes the list of q-points for the W(q,G,G'), creates nqpt tasks + in the second work (QptdmWork), and connect the signals. + """ + scr_input = cbk.data["input"] + # Use the WFK file produced by the second + # Task in the first Work (NSCF step). + nscf_task = self[0][1] + wfk_file = nscf_task.outdir.has_abiext("WFK") + + work = self[1] + work.set_manager(self.manager) + work.create_tasks(wfk_file, scr_input) + work.add_deps(cbk.deps) + + work.set_flow(self) + # Each task has a reference to its work. + for task in work: + task.set_work(work) + # Add the garbage collector. + if self.gc is not None: task.set_gc(self.gc) + + work.connect_signals() + work.build() + + return work + + +class FlowCallbackError(Exception): + """Exceptions raised by FlowCallback.""" + + +class FlowCallback(object): + """ + This object implements the callbacks executed by the |Flow| when + particular conditions are fulfilled. See on_dep_ok method of |Flow|. + + .. note:: + + I decided to implement callbacks via this object instead of a standard + approach based on bound methods because: + + 1) pickle (v<=3) does not support the pickling/unplickling of bound methods + + 2) There's some extra logic and extra data needed for the proper functioning + of a callback at the flow level and this object provides an easy-to-use interface. + """ + Error = FlowCallbackError + + def __init__(self, func_name, flow, deps, cbk_data): + """ + Args: + func_name: String with the name of the callback to execute. + func_name must be a bound method of flow with signature: + + func_name(self, cbk) + + where self is the Flow instance and cbk is the callback + flow: Reference to the |Flow|. + deps: List of dependencies associated to the callback + The callback is executed when all dependencies reach S_OK. + cbk_data: Dictionary with additional data that will be passed to the callback via self. + """ + self.func_name = func_name + self.flow = flow + self.deps = deps + self.data = cbk_data or {} + self._disabled = False + + def __str__(self): + return "%s: %s bound to %s" % (self.__class__.__name__, self.func_name, self.flow) + + def __call__(self): + """Execute the callback.""" + if self.can_execute(): + # Get the bound method of the flow from func_name. + # We use this trick because pickle (format <=3) does not support bound methods. + try: + func = getattr(self.flow, self.func_name) + except AttributeError as exc: + raise self.Error(str(exc)) + + return func(self) + + else: + raise self.Error("You tried to __call_ a callback that cannot be executed!") + + def can_execute(self): + """True if we can execute the callback.""" + return not self._disabled and all(dep.status == dep.node.S_OK for dep in self.deps) + + def disable(self): + """ + True if the callback has been disabled. This usually happens when the callback has been executed. + """ + self._disabled = True + + def enable(self): + """Enable the callback""" + self._disabled = False + + def handle_sender(self, sender): + """ + True if the callback is associated to the sender + i.e. if the node who sent the signal appears in the + dependencies of the callback. + """ + return sender in [d.node for d in self.deps] + + +# Factory functions. +def bandstructure_flow(workdir, scf_input, nscf_input, dos_inputs=None, manager=None, flow_class=Flow, allocate=True): + """ + Build a |Flow| for band structure calculations. + + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + nscf_input: Input for the NSCF run (band structure run). + dos_inputs: Input(s) for the NSCF run (dos run). + manager: |TaskManager| object used to submit the jobs. Initialized from manager.yml if manager is None. + flow_class: Flow subclass + allocate: True if the flow should be allocated before returning. + + Returns: |Flow| object + """ + flow = flow_class(workdir, manager=manager) + work = BandStructureWork(scf_input, nscf_input, dos_inputs=dos_inputs) + flow.register_work(work) + + # Handy aliases + flow.scf_task, flow.nscf_task, flow.dos_tasks = work.scf_task, work.nscf_task, work.dos_tasks + + if allocate: flow.allocate() + return flow + + +def g0w0_flow(workdir, scf_input, nscf_input, scr_input, sigma_inputs, manager=None, flow_class=Flow, allocate=True): + """ + Build a |Flow| for one-shot $G_0W_0$ calculations. + + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + nscf_input: Input for the NSCF run (band structure run). + scr_input: Input for the SCR run. + sigma_inputs: List of inputs for the SIGMA run. + flow_class: Flow class + manager: |TaskManager| object used to submit the jobs. Initialized from manager.yml if manager is None. + allocate: True if the flow should be allocated before returning. + + Returns: |Flow| object + """ + flow = flow_class(workdir, manager=manager) + work = G0W0Work(scf_input, nscf_input, scr_input, sigma_inputs) + flow.register_work(work) + if allocate: flow.allocate() + return flow + + +class PhononFlow(Flow): + """ + This Flow provides a high-level interface to compute phonons with DFPT + The flow consists of + + 1) One workflow for the GS run. + + 2) nqpt works for phonon calculations. Each work contains + nirred tasks where nirred is the number of irreducible phonon perturbations + for that particular q-point. + + .. note: + + For a much more flexible interface, use the DFPT works defined in works.py + For instance, EPH calculations are much easier to implement by connecting a single + work that computes all the q-points with the EPH tasks instead of using PhononFlow. + """ + @classmethod + def from_scf_input(cls, workdir, scf_input, ph_ngqpt, with_becs=True, manager=None, allocate=True): + """ + Create a `PhononFlow` for phonon calculations from an `AbinitInput` defining a ground-state run. + + Args: + workdir: Working directory of the flow. + scf_input: |AbinitInput| object with the parameters for the GS-SCF run. + ph_ngqpt: q-mesh for phonons. Must be a sub-mesh of the k-mesh used for + electrons. e.g if ngkpt = (8, 8, 8). ph_ngqpt = (4, 4, 4) is a valid choice + whereas ph_ngqpt = (3, 3, 3) is not! + with_becs: True if Born effective charges are wanted. + manager: |TaskManager| object. Read from `manager.yml` if None. + allocate: True if the flow should be allocated before returning. + + Return: + :class:`PhononFlow` object. + """ + flow = cls(workdir, manager=manager) + + # Register the SCF task + flow.register_scf_task(scf_input) + scf_task = flow[0][0] + + # Make sure k-mesh and q-mesh are compatible. + scf_ngkpt, ph_ngqpt = np.array(scf_input["ngkpt"]), np.array(ph_ngqpt) + + if any(scf_ngkpt % ph_ngqpt != 0): + raise ValueError("ph_ngqpt %s should be a sub-mesh of scf_ngkpt %s" % (ph_ngqpt, scf_ngkpt)) + + # Get the q-points in the IBZ from Abinit + qpoints = scf_input.abiget_ibz(ngkpt=ph_ngqpt, shiftk=(0, 0, 0), kptopt=1).points + + # Create a PhononWork for each q-point. Add DDK and E-field if q == Gamma and with_becs. + for qpt in qpoints: + if np.allclose(qpt, 0) and with_becs: + ph_work = BecWork.from_scf_task(scf_task) + else: + ph_work = PhononWork.from_scf_task(scf_task, qpoints=qpt) + + flow.register_work(ph_work) + + if allocate: flow.allocate() + + return flow + + def open_final_ddb(self): + """ + Open the DDB file located in the output directory of the flow. + + Return: + :class:`DdbFile` object, None if file could not be found or file is not readable. + """ + ddb_path = self.outdir.has_abiext("DDB") + if not ddb_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a GSR file in %s" % (self, self.outdir)) + return None + + from abipy.dfpt.ddb import DdbFile + try: + return DdbFile(ddb_path) + except Exception as exc: + self.history.critical("Exception while reading DDB file at %s:\n%s" % (ddb_path, str(exc))) + return None + + def finalize(self): + """This method is called when the flow is completed.""" + # Merge all the out_DDB files found in work.outdir. + ddb_files = list(filter(None, [work.outdir.has_abiext("DDB") for work in self])) + + # Final DDB file will be produced in the outdir of the work. + out_ddb = self.outdir.path_in("out_DDB") + desc = "DDB file merged by %s on %s" % (self.__class__.__name__, time.asctime()) + + mrgddb = wrappers.Mrgddb(manager=self.manager, verbose=0) + mrgddb.merge(self.outdir.path, ddb_files, out_ddb=out_ddb, description=desc) + print("Final DDB file available at %s" % out_ddb) + + # Call the method of the super class. + retcode = super().finalize() + return retcode + + +class NonLinearCoeffFlow(Flow): + """ + 1) One workflow for the GS run. + + 2) nqpt works for electric field calculations. Each work contains + nirred tasks where nirred is the number of irreducible perturbations + for that particular q-point. + """ + @classmethod + def from_scf_input(cls, workdir, scf_input, manager=None, allocate=True): + """ + Create a `NonlinearFlow` for second order susceptibility calculations from + an `AbinitInput` defining a ground-state run. + + Args: + workdir: Working directory of the flow. + scf_input: |AbinitInput| object with the parameters for the GS-SCF run. + manager: |TaskManager| object. Read from `manager.yml` if None. + allocate: True if the flow should be allocated before returning. + + Return: + :class:`NonlinearFlow` object. + """ + flow = cls(workdir, manager=manager) + + flow.register_scf_task(scf_input) + scf_task = flow[0][0] + + nl_work = DteWork.from_scf_task(scf_task) + + flow.register_work(nl_work) + + if allocate: flow.allocate() + + return flow + + def open_final_ddb(self): + """ + Open the DDB file located in the output directory of the flow. + + Return: + |DdbFile| object, None if file could not be found or file is not readable. + """ + ddb_path = self.outdir.has_abiext("DDB") + if not ddb_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a GSR file in %s" % (self, self.outdir)) + return None + + from abipy.dfpt.ddb import DdbFile + try: + return DdbFile(ddb_path) + except Exception as exc: + self.history.critical("Exception while reading DDB file at %s:\n%s" % (ddb_path, str(exc))) + return None + + def finalize(self): + """This method is called when the flow is completed.""" + # Merge all the out_DDB files found in work.outdir. + ddb_files = list(filter(None, [work.outdir.has_abiext("DDB") for work in self])) + + # Final DDB file will be produced in the outdir of the work. + out_ddb = self.outdir.path_in("out_DDB") + desc = "DDB file merged by %s on %s" % (self.__class__.__name__, time.asctime()) + + mrgddb = wrappers.Mrgddb(manager=self.manager, verbose=0) + mrgddb.merge(self.outdir.path, ddb_files, out_ddb=out_ddb, description=desc) + + print("Final DDB file available at %s" % out_ddb) + + # Call the method of the super class. + retcode = super().finalize() + print("retcode", retcode) + #if retcode != 0: return retcode + return retcode + + +def phonon_conv_flow(workdir, scf_input, qpoints, params, manager=None, allocate=True): + """ + Create a |Flow| to perform convergence studies for phonon calculations. + + Args: + workdir: Working directory of the flow. + scf_input: |AbinitInput| object defining a GS-SCF calculation. + qpoints: List of list of lists with the reduced coordinates of the q-point(s). + params: + To perform a converge study wrt ecut: params=["ecut", [2, 4, 6]] + manager: |TaskManager| object responsible for the submission of the jobs. + If manager is None, the object is initialized from the yaml file + located either in the working directory or in the user configuration dir. + allocate: True if the flow should be allocated before returning. + + Return: |Flow| object. + """ + qpoints = np.reshape(qpoints, (-1, 3)) + + flow = Flow(workdir=workdir, manager=manager) + + for qpt in qpoints: + for gs_inp in scf_input.product(*params): + # Register the SCF task + work = flow.register_scf_task(gs_inp) + + # Add the PhononWork connected to this scf_task. + flow.register_work(PhononWork.from_scf_task(work[0], qpoints=qpt)) + + if allocate: flow.allocate() + return flow diff --git a/abipy/flowtk/gruneisen.py b/abipy/flowtk/gruneisen.py index 025e8037e..670999793 100644 --- a/abipy/flowtk/gruneisen.py +++ b/abipy/flowtk/gruneisen.py @@ -1,154 +1,149 @@ # coding: utf-8 """ -Flow for the computation of Grunesein parameters with Abinit DFPT and finite differences. +Work for computing Grüneisen parameters with finite differences on DFPT phonons WARNING: This code must be tested more carefully. """ -from __future__ import print_function, division, unicode_literals, absolute_import +import numpy as np from abipy.core.structure import Structure +from .works import Work, PhononWork -from .flows import Flow -from .works import Work - -class GruneseinenFlow(Flow): +class GruneisenWork(Work): """ - This work compute the Grüneisen parameters with the DFPT part of Abinit and - finite differences in anaddb. + This work computes the Grüneisen parameters (derivative of frequencies wrt Volume) + using finite differences and the phonons obtained with the DFPT part of Abinit. + The Anaddb input file needed to compute Grüneisen parameters will be generated + in the outdata directory of the flow. - It is necessary to run three phonon calculations with DFPT. + It is necessary to run three DFPT phonon calculations. One is calculated at the equilibrium volume and the remaining two are calculated at the slightly larger volume and smaller volume than the equilibrium volume. The unitcells at these volumes have to be fully relaxed under the constraint of each volume. + This Work automates the entire procedure starting from an input for GS calculations. """ + @classmethod - def from_gs_input(cls, gsinp, voldelta, workdir=None, manager=None): + def from_gs_input(cls, gs_inp, voldelta, ngqpt, tolerance=None, with_becs=False, + ddk_tolerance=None, workdir=None, manager=None): """ - Build the work from an :class:`AbinitInput` object representing a GS calculations. - - Args: - gsinp: - :class:`AbinitInput` object representing a GS calculation in the initial unit cell. - voldelta: - Absolute increment for unit cell volume. The three volumes are: - [v0 - voldelta, v0, v0 + voldelta] where v0 is taken from gsinp.structure. - - Return: + Build the work from an |AbinitInput| representing a GS calculations. + + Args: + gs_inp: |AbinitInput| representing a GS calculation in the initial unit cell. + voldelta: Absolute increment for unit cell volume. The three volumes are: + [v0 - voldelta, v0, v0 + voldelta] where v0 is taken from gs_inp.structure. + ngqpt: three integers defining the q-mesh for phonon calculations. + tolerance: dict {"varname": value} with the tolerance to be used in the phonon run. + None to use AbiPy default. + with_becs: Activate calculation of Electric field and Born effective charges. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run if with_becs. + None to use AbiPy default. """ new = cls(workdir=workdir, manager=manager) + new.ngqpt = np.reshape(ngqpt, (3,)) + new.with_becs = with_becs + new.ddk_tolerance = ddk_tolerance + new.tolerance = tolerance - # Save arguments that will be used to call phonopy for creating - # the supercells with the displacements once the three volumes have been relaxed. - #new.scdims = np.array(scdims) - #if new.scdims.shape != (3,): - # raise ValueError("Expecting 3 int in scdims but got %s" % str(new.scdims)) - #new.phonopy_kwargs = phonopy_kwargs if phonopy_kwargs is not None else {} - #new.displ_kwargs = displ_kwargs if displ_kwargs is not None else {} + if any(gs_inp["ngkpt"] % new.ngqpt != 0): + raise ValueError("Kmesh and Qmesh must be commensurate.\nGot ngkpt: `%s`\nand ngqpt: `%s`" % ( + str(gs_inp["ngkpt"]), str(new.ngqpt))) # Build three tasks for structural optimization at constant volume. - v0 = gsinp.structure.volume + v0 = gs_inp.structure.volume if voldelta <= 0: raise ValueError("voldelta must be > 0 but got %s" % voldelta) - volumes = [v0 - voldelta, v0, v0 + voldelta] + volumes = [v0 - voldelta, v0, v0 + voldelta] if any(v <= 0 for v in volumes): raise ValueError("volumes must be > 0 but got %s" % str(volumes)) + # Keep a copy of the GS input that will be used to generate the Phonon Works + new.gs_inp = gs_inp.deepcopy() + + new.relax_tasks = [] for vol in volumes: # Build new structure - new_lattice = gsinp.structure.lattice.scale(vol) - new_structure = Structure(new_lattice, gsinp.structure.species, gsinp.structure.frac_coords) - new_input = gsinp.new_with_structure(new_structure) + new_lattice = gs_inp.structure.lattice.scale(vol) + new_structure = Structure(new_lattice, gs_inp.structure.species, gs_inp.structure.frac_coords) + new_input = gs_inp.new_with_structure(new_structure) # Set variables for structural optimization at constant volume. new_input.pop_tolerances() new_input.set_vars(optcell=3, ionmov=3, tolvrs=1e-10, toldff=1.e-6) new_input.set_vars_ifnotin(ecutsm=0.5, dilatmx=1.05) - new.register_relax_task(new_input) + t = new.register_relax_task(new_input) + new.relax_tasks.append(t) return new - -class GruneseinenWork(Work): - def on_all_ok(self): """ - This method is called once the `Work` is completed i.e. when all the tasks - have reached status S_OK. + This method is called once the `Work` is completed i.e. when all the tasks have reached status S_OK. """ - self.add_phonopy_works_and_build() - return super(GruneisenWork, self).on_all_ok() + self.add_phonon_works_and_build() + return super().on_all_ok() - def add_phonopy_works_and_build(self): + def add_phonon_works_and_build(self): """ - Get relaxed structures from the tasks, build Phonopy works with supercells - constructed from the new structures, add them to the flow and build new directories. + Get relaxed structures from the tasks, build Phonons works with new structures. + Add works to the flow and build new directories. """ - for i, task in enumerate(self): - relaxed_structure = task.get_final_structure() - gsinp = task.input.new_with_structure(relaxed_structure) - - work = PhonopyWork.from_gs_input(gsinp, self.scdims, - phonopy_kwargs=self.phonopy_kwargs, - displ_kwargs=self.displ_kwargs) + ddb_paths, struct_middle, middle_idx = [], None, None + relaxed_structs = [] + for i, task in enumerate(self.relax_tasks): + relaxed_structure = task.get_final_structure() + relaxed_structs.append(relaxed_structure) + if i == len(self.relax_tasks) // 2: + middle_idx, struct_middle = i, relaxed_structure + + # work to compute phonons with new structure. + gsinp_vol = self.gs_inp.new_with_structure(relaxed_structure) + work = PhononWork.from_scf_input(gsinp_vol, self.ngqpt, is_ngqpt=True, tolerance=self.tolerance, + with_becs=self.with_becs, ddk_tolerance=self.ddk_tolerance) + # Add it to the flow. self.flow.register_work(work) - # Tell the work to copy the results to e.g. `flow/outdir/w0/minus` - dst = os.path.join(self.pos_str, {0: "minus", 1: "orig", 2: "plus"}[i]) - work.cpdata2dst = self.flow.outdir.path_in(dst) + + ddb_paths.append(work.outdir.path_in("out_DDB")) + + # Write Anaddb input file to compute Gruneisen parameters in flow.outdata. + from abipy.abio.inputs import AnaddbInput + anaddb_inp = AnaddbInput.phbands_and_dos(struct_middle, self.ngqpt, nqsmall=20, ndivsm=20, + chneut=1 if self.with_becs else 0, + dipdip=1 if self.with_becs else 0, + lo_to_splitting=self.with_becs, + comment="Anaddb input file for Grunesein parameters") + # Add DDB files for Gruns + anaddb_inp["gruns_nddbs"] = len(ddb_paths) + anaddb_inp["gruns_ddbs"] = "\n" + "\n".join('"%s"' % p for p in ddb_paths) + in_path = self.flow.outdir.path_in("anaddb_gruns.in") + anaddb_inp.write(in_path) + + files_file = [] + app = files_file.append + app(in_path) # 1) Path of the input file + app(self.flow.outdir.path_in("anaddb_gruns.out")) # 2) Path of the output file + app(ddb_paths[middle_idx]) # 3) Input derivative database (not used if Gruns) + for i in range(4): + app("FOOBAR") + + with open(self.flow.outdir.path_in("anaddb_gruns.files"), "wt") as fh: + fh.write("\n".join(files_file)) + + #with_ebands = False + #if with_ebands: + # bands_work = Work(manager=self.manager) + # for i, structure in enumerate(relaxed_structs): + # nscf_inp = self.gs_inp.new_with_structure(structure) + # nscf_inp.pop_tolerances() + # nscf_inp.set_kpath(ndivsm, kptbounds=None, iscf=-2) + # nscf_inp["tolwfr"] = 1e-18 + # work.register_nscf_task(nscf_inp, deps={self.relax_tasks[i]: "DEN"}) + + # # Add it to the flow. + # self.flow.register_work(work) # Allocate new works and update the pickle database. self.flow.allocate() self.flow.build_and_pickle_dump() - - -#class RelaxAndAddPhGammaWork(RelaxWork): -# """ -# Work for structural relaxations. The first task relaxes the atomic position -# while keeping the unit cell parameters fixed. The second task uses the final -# structure to perform a structural relaxation in which both the atomic positions -# and the lattice parameters are optimized. -# """ -# -# def on_all_ok(self): -# """ -# Here I extend the implementation of super in order to create a new workflow -# for phonons with the optimized structural parameters. -# """ -# results = super(RelaxAndAddPhGammaWork, self).on_all_ok() -# -# # Get the relaxed structure. -# relax_task = self[1] -# final_structure = relax_task.get_final_structure() -# -# # Use new structure in GS + DFPT runs and change some values. -# scf_input = relax_task.input.deepcopy() -# scf_input.set_structure(final_structure) -# -# # Remove input variables that can enter into conflict with DFPT. -# scf_input.pop_tolerances() -# scf_input.pop_par_vars() -# scf_input.pop_irdvars() -# scf_input.pop_vars(["ionmov", "optcell", "ntime", "dilatmx"]) -# scf_input.set_vars(tolwfr=1e-20, nstep=80, nbdbuf=4) -# #nval = scf_input.num_valence_electrons -# -# # Build GS work and Phonon Work -# work = PhononDojoWork.from_scf_input(scf_input, self.dojo_qpt) -# for task in work[1:]: -# task.set_vars(prtwf=-1) -# -# # Monkey patch work -# work.dojo_kppa = self.dojo_kppa -# work.dojo_qpt = self.dojo_qpt -# work.ecut = self.ecut -# work.dojo_pawecutdg = self.dojo_pawecutdg -# work.dojo_include_soc = self.dojo_include_soc -# work._dojo_trial = "phgamma" if not self.dojo_include_soc else "phgamma_soc" -# work._pseudo = self.dojo_pseudo -# -# self.flow.register_work(work) -# # Allocate new tasks and update the pickle database. -# self.flow.allocate() -# self.flow.build_and_pickle_dump() -# -# return results diff --git a/abipy/flowtk/gs_works.py b/abipy/flowtk/gs_works.py index fc26238ed..983c5eaae 100644 --- a/abipy/flowtk/gs_works.py +++ b/abipy/flowtk/gs_works.py @@ -1,8 +1,6 @@ # coding: utf-8 """Work subclasses related to GS calculations.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import numpy as np +import json from .works import Work from abipy.core.structure import Structure @@ -109,7 +107,6 @@ def getnwrite_eosdata(self, write_json=True): eos_data[model] = {"exception": str(exc)} if write_json: - import json with open(self.outdir.path_in("eos_data.json"), "wt") as fh: json.dump(eos_data, fh, indent=4, sort_keys=True) @@ -123,3 +120,94 @@ def on_all_ok(self): """ self.getnwrite_eosdata() return dict(returncode=0, message="EOS computed and file written") + + +#class FiniteDiffStressWork(Work): +# """ +# Work for the computation of the stress tensor +# """ +# +# @classmethod +# def from_scf_input(cls, scf_input, delta=1e-4, ecutsm=0.5, manager=None): +# """ +# Build a EosWork from an AbinitInput representing a SCF-GS calculation. +# +# Args: +# scf_input: AbinitInput for SCF-GS used as template to generate the other inputs. +# delta: +# ecutsm: Value of ecutsm input variable. If `scf_input` does not provide ecutsm, this +# value will be used else the vale in `scf_input`. +# manager: TaskManager instance. Use default if None. +# +# Return: EosWork instance. +# """ +# scf_input = scf_input.deepcopy() +# +# if "ecutsm" not in scf_input: +# scf_input.set_vars(ecutsm=ecutsm) +# print("Input does not define ecutsm input variable.\n", +# "A default value of %s will be added to all the EOS inputs" % ecutsm) +# +# new_work = cls(manager=manager) +# self.unstrained_task = new_work.register_scf_task(scf_input) +# +# voigt_inds = [(0, 0)] +# +# self.delta = float(delta) +# self.tasks_voigt = {} +# for voigt in voigt_inds: +# self.tasks_voigt[voigt] = defaultdict(list) +# for isign in (-1, +1): +# # Apply strain to the lattice. +# strain = np.zeros((3, 3)) +# strain[voigt] = float(isign) * delta +# new_structure = scf_input.structure.deepcopy() +# new_structure.apply_strain(strain) +# new_input = scf_input.new_with_structure(new_structure) +# +# # Perform GS calculations with strained cell. +# task = new_work.register_scf_task(new_input) +# self.tasks_voigt[voigt].append(task) +# +# return new_work +# +# def compute_and_write_stress(self): +# """ +# This method is called when all tasks reach S_OK. +# It reads the energies and the volumes from the GSR file, computes the EOS and produce a +# JSON file `eos_data.json` in outdata. +# """ +# with self.unstrained_task.open_gsr() as gsr0: +# e0, v0 = gsr0.energy, gsr0.structure.volume +# cart_stress_tensor = gsr0.cart_stress_tensor +# +# fd_tensor = np.empty((3, 3)) +# for voigt in voigt_inds: +# tasks = self.tasks_voigt[voigt] +# energies_ev, volumes = np.empty(len(tasks), np.empty(len(tasks)) +# for i, task in enumerate(task): +# with task.open_gsr() as gsr: +# energies_ev[i] = float(gsr.energy)) +# +# d = (e_plus - e_minus) / (2 * self.delta * v0) +# fd_tensor[voigt] = d +# fd_tensor[voigt[1], voigt[0]] = d +# +# data = { +# "dfpt_cart_stress_tensor": cart_stress_tensor, +# "finite_diff_cart_stress_tensor": fd_cart_stress_tensor, +# } +# +# with open(self.outdir.path_in("stress.json"), "wt") as fh: +# json.dump(data, fh, indent=4, sort_keys=True) +# +# return data +# +# def on_all_ok(self): +# """ +# This method is called when all tasks reach S_OK. It reads the energies +# and the volumes from the GSR file, computes the EOS and produce a +# JSON file `eos_data.json` in outdata. +# """ +# self.compute_and_write_stress() +# return dict(returncode=0, message="EOS computed and file written") diff --git a/abipy/flowtk/launcher.py b/abipy/flowtk/launcher.py new file mode 100644 index 000000000..6c5be4ada --- /dev/null +++ b/abipy/flowtk/launcher.py @@ -0,0 +1,1322 @@ +# coding: utf-8 +# Copyright (c) Pymatgen Development Team. +# Distributed under the terms of the MIT License. +"""Tools for the submission of Tasks.""" + +import os +import time +import ruamel.yaml as yaml +import pickle + +from collections import deque +from datetime import timedelta +from io import StringIO +from monty.io import get_open_fds +from monty.string import boxed, is_string +from monty.os.path import which +from monty.collections import AttrDict, dict2namedtuple +from monty.termcolor import cprint +from .utils import as_bool, File, Directory +from . import qutils as qu +from pymatgen.util.io_utils import ask_yesno + +try: + import apscheduler + has_apscheduler = True + has_sched_v3 = apscheduler.version >= "3.0.0" +except ImportError: + has_apscheduler = False + +import logging +logger = logging.getLogger(__name__) + +__all__ = [ + "ScriptEditor", + "PyLauncher", + "PyFlowScheduler", +] + + +def straceback(): + """Returns a string with the traceback.""" + import traceback + return traceback.format_exc() + + +class ScriptEditor(object): + """Simple editor that simplifies the writing of shell scripts""" + _shell = '/bin/bash' + + def __init__(self): + self._lines = [] + + @property + def shell(self): + return self._shell + + def _add(self, text, pre=""): + if is_string(text): + self._lines.append(pre + text) + else: + self._lines.extend([pre + t for t in text]) + + def reset(self): + """Reset the editor.""" + try: + del self._lines + except AttributeError: + pass + + def shebang(self): + """Adds the shebang line.""" + self._lines.append('#!' + self.shell) + + def declare_var(self, key, val): + """Declare a env variable. If val is None the variable is unset.""" + if val is not None: + line = "export " + key + '=' + str(val) + else: + line = "unset " + key + + self._add(line) + + def declare_vars(self, d): + """Declare the variables defined in the dictionary d.""" + for k, v in d.items(): + self.declare_var(k, v) + + def export_envar(self, key, val): + """Export an environment variable.""" + line = "export " + key + "=" + str(val) + self._add(line) + + def export_envars(self, env): + """Export the environment variables contained in the dict env.""" + for k, v in env.items(): + self.export_envar(k, v) + + def add_emptyline(self): + """Add an empty line.""" + self._add("", pre="") + + def add_comment(self, comment): + """Add a comment""" + self._add(comment, pre="# ") + + def load_modules(self, modules): + """Load the list of specified modules.""" + for module in modules: + self.load_module(module) + + def load_module(self, module): + self._add('module load ' + module + " 2>> mods.err") + + def add_line(self, line): + self._add(line) + + def add_lines(self, lines): + self._add(lines) + + def get_script_str(self, reset=True): + """Returns a string with the script and reset the editor if reset is True""" + s = "\n".join(l for l in self._lines) + if reset: + self.reset() + return s + + +class PyLauncherError(Exception): + """Error class for PyLauncher.""" + + +class PyLauncher(object): + """This object handle the submission of the tasks contained in a |Flow|.""" + Error = PyLauncherError + + def __init__(self, flow, **kwargs): + """ + Initialize the object + + Args: + flow: |Flow| object + max_njobs_inqueue: The launcher will stop submitting jobs when the + number of jobs in the queue is >= Max number of jobs + """ + self.flow = flow + self.max_njobs_inqueue = kwargs.get("max_njobs_inqueue", 200) + + #self.flow.check_pid_file() + + def single_shot(self): + """ + Run the first :class:`Task` than is ready for execution. + + Returns: + Number of jobs launched. + """ + num_launched = 0 + + # Get the tasks that can be executed in each workflow. + tasks = [] + for work in self.flow: + try: + task = work.fetch_task_to_run() + + if task is not None: + tasks.append(task) + else: + # No task found, this usually happens when we have dependencies. + # Beware of possible deadlocks here! + logger.debug("No task to run! Possible deadlock") + + except StopIteration: + logger.info("All tasks completed.") + + # Submit the tasks and update the database. + if tasks: + tasks[0].start() + num_launched += 1 + + self.flow.pickle_dump() + + return num_launched + + def rapidfire(self, max_nlaunch=-1, max_loops=1, sleep_time=5): + """ + Keeps submitting `Tasks` until we are out of jobs or no job is ready to run. + + Args: + max_nlaunch: Maximum number of launches. default: no limit. + max_loops: Maximum number of loops + sleep_time: seconds to sleep between rapidfire loop iterations + + Returns: + The number of tasks launched. + """ + num_launched, do_exit, launched = 0, False, [] + + for count in range(max_loops): + if do_exit: + break + if count > 0: + time.sleep(sleep_time) + + tasks = self.fetch_tasks_to_run() + + # I don't know why but we receive duplicated tasks. + if any(task in launched for task in tasks): + logger.critical("numtasks %d already in launched list:\n%s" % (len(tasks), launched)) + + # Preventive test. + tasks = [t for t in tasks if t not in launched] + + if not tasks: + continue + + for task in tasks: + fired = task.start() + if fired: + launched.append(task) + num_launched += 1 + + if num_launched >= max_nlaunch > 0: + logger.info('num_launched >= max_nlaunch, going back to sleep') + do_exit = True + break + + # Update the database. + self.flow.pickle_dump() + + return num_launched + + def fetch_tasks_to_run(self): + """ + Return the list of tasks that can be submitted. + Empty list if no task has been found. + """ + tasks_to_run = [] + + for work in self.flow: + tasks_to_run.extend(work.fetch_alltasks_to_run()) + + return tasks_to_run + + +class PyFlowSchedulerError(Exception): + """Exceptions raised by `PyFlowScheduler`.""" + + +class PyFlowScheduler(object): + """ + This object schedules the submission of the tasks in a |Flow|. + There are two types of errors that might occur during the execution of the jobs: + + #. Python exceptions + #. Errors in the ab-initio code + + Python exceptions are easy to detect and are usually due to a bug in the python code or random errors such as IOError. + The set of errors in the ab-initio is much much broader. It includes wrong input data, segmentation + faults, problems with the resource manager, etc. The flow tries to handle the most common cases + but there's still a lot of room for improvement. + Note, in particular, that `PyFlowScheduler` will shutdown automatically in the following cases: + + #. The number of python exceptions is > max_num_pyexcs + + #. The number of task errors (i.e. the number of tasks whose status is S_ERROR) is > max_num_abierrs + + #. The number of jobs launched becomes greater than (`safety_ratio` * total_number_of_tasks). + + #. The scheduler will send an email to the user (specified by `mailto`) every `remindme_s` seconds. + If the mail cannot be sent, the scheduler will shutdown automatically. + This check prevents the scheduler from being trapped in an infinite loop. + """ + # Configuration file. + YAML_FILE = "scheduler.yml" + USER_CONFIG_DIR = os.path.join(os.path.expanduser("~"), ".abinit", "abipy") + + Error = PyFlowSchedulerError + + @classmethod + def autodoc(cls): + i = cls.__init__.__doc__.index("Args:") + return cls.__init__.__doc__[i+5:] + + def __init__(self, **kwargs): + """ + Args: + weeks: number of weeks to wait (DEFAULT: 0). + days: number of days to wait (DEFAULT: 0). + hours: number of hours to wait (DEFAULT: 0). + minutes: number of minutes to wait (DEFAULT: 0). + seconds: number of seconds to wait (DEFAULT: 0). + mailto: The scheduler will send an email to `mailto` every `remindme_s` seconds. + (DEFAULT: None i.e. not used). + verbose: (int) verbosity level. (DEFAULT: 0) + use_dynamic_manager: "yes" if the |TaskManager| must be re-initialized from + file before launching the jobs. (DEFAULT: "no") + max_njobs_inqueue: Limit on the number of jobs that can be present in the queue. (DEFAULT: 200) + max_ncores_used: Maximum number of cores that can be used by the scheduler. + remindme_s: The scheduler will send an email to the user specified + by `mailto` every `remindme_s` seconds. (int, DEFAULT: 1 day). + max_num_pyexcs: The scheduler will exit if the number of python exceptions is > max_num_pyexcs + (int, DEFAULT: 0) + max_num_abierrs: The scheduler will exit if the number of errored tasks is > max_num_abierrs + (int, DEFAULT: 0) + safety_ratio: The scheduler will exits if the number of jobs launched becomes greater than + `safety_ratio` * total_number_of_tasks_in_flow. (int, DEFAULT: 5) + max_nlaunches: Maximum number of tasks launched in a single iteration of the scheduler. + (DEFAULT: -1 i.e. no limit) + debug: Debug level. Use 0 for production (int, DEFAULT: 0) + fix_qcritical: "yes" if the launcher should try to fix QCritical Errors (DEFAULT: "no") + rmflow: If "yes", the scheduler will remove the flow directory if the calculation + completed successfully. (DEFAULT: "no") + killjobs_if_errors: "yes" if the scheduler should try to kill all the runnnig jobs + before exiting due to an error. (DEFAULT: "yes") + """ + # Options passed to the scheduler. + self.sched_options = AttrDict( + weeks=kwargs.pop("weeks", 0), + days=kwargs.pop("days", 0), + hours=kwargs.pop("hours", 0), + minutes=kwargs.pop("minutes", 0), + seconds=kwargs.pop("seconds", 0), + #start_date=kwargs.pop("start_date", None), + ) + if all(not v for v in self.sched_options.values()): + raise self.Error("Wrong set of options passed to the scheduler.") + + self.mailto = kwargs.pop("mailto", None) + self.verbose = int(kwargs.pop("verbose", 0)) + self.use_dynamic_manager = as_bool(kwargs.pop("use_dynamic_manager", False)) + self.max_njobs_inqueue = kwargs.pop("max_njobs_inqueue", 200) + self.max_ncores_used = kwargs.pop("max_ncores_used", None) + self.contact_resource_manager = as_bool(kwargs.pop("contact_resource_manager", False)) + + self.remindme_s = float(kwargs.pop("remindme_s", 1 * 24 * 3600)) + self.max_num_pyexcs = int(kwargs.pop("max_num_pyexcs", 0)) + self.max_num_abierrs = int(kwargs.pop("max_num_abierrs", 0)) + self.safety_ratio = int(kwargs.pop("safety_ratio", 5)) + #self.max_etime_s = kwargs.pop("max_etime_s", ) + self.max_nlaunches = kwargs.pop("max_nlaunches", -1) + self.debug = kwargs.pop("debug", 0) + self.fix_qcritical = as_bool(kwargs.pop("fix_qcritical", False)) + self.rmflow = as_bool(kwargs.pop("rmflow", False)) + self.killjobs_if_errors = as_bool(kwargs.pop("killjobs_if_errors", True)) + + self.customer_service_dir = kwargs.pop("customer_service_dir", None) + if self.customer_service_dir is not None: + self.customer_service_dir = Directory(self.customer_service_dir) + self._validate_customer_service() + + if kwargs: + raise self.Error("Unknown arguments %s" % kwargs) + + if not has_apscheduler: + raise RuntimeError("Install apscheduler with pip") + + if has_sched_v3: + logger.warning("Using scheduler v>=3.0.0") + from apscheduler.schedulers.blocking import BlockingScheduler + self.sched = BlockingScheduler() + else: + from apscheduler.scheduler import Scheduler + self.sched = Scheduler(standalone=True) + + self.nlaunch = 0 + self.num_reminders = 1 + + # Used to keep track of the exceptions raised while the scheduler is running + self.exceptions = deque(maxlen=self.max_num_pyexcs + 10) + + # Used to push additional info during the execution. + self.history = deque(maxlen=100) + + @classmethod + def from_file(cls, filepath): + """Read the configuration parameters from a Yaml file.""" + with open(filepath, "rt") as fh: + return cls(**yaml.safe_load(fh)) + + @classmethod + def from_string(cls, s): + """Create an istance from string s containing a YAML dictionary.""" + stream = StringIO(s) + stream.seek(0) + return cls(**yaml.safe_load(stream)) + + @classmethod + def from_user_config(cls): + """ + Initialize the :class:`PyFlowScheduler` from the YAML file 'scheduler.yml'. + Search first in the working directory and then in the configuration directory of abipy. + + Raises: + `RuntimeError` if file is not found. + """ + # Try in the current directory. + path = os.path.join(os.getcwd(), cls.YAML_FILE) + + if os.path.exists(path): + return cls.from_file(path) + + # Try in the configuration directory. + path = os.path.join(cls.USER_CONFIG_DIR, cls.YAML_FILE) + + if os.path.exists(path): + return cls.from_file(path) + + raise cls.Error("Cannot locate %s neither in current directory nor in %s" % (cls.YAML_FILE, path)) + + def __str__(self): + """String representation.""" + lines = [self.__class__.__name__ + ", Pid: %d" % self.pid] + app = lines.append + app("Scheduler options: %s" % str(self.sched_options)) + + if self.flow is not None: + app(80 * "=") + app(str(self.flow)) + + return "\n".join(lines) + + @property + def pid(self): + """The pid of the process associated to the scheduler.""" + try: + return self._pid + except AttributeError: + self._pid = os.getpid() + return self._pid + + @property + def pid_file(self): + """ + Absolute path of the file with the pid. + The file is located in the workdir of the flow + """ + return self._pid_file + + @property + def flow(self): + """`Flow`.""" + try: + return self._flow + except AttributeError: + return None + + @property + def num_excs(self): + """Number of exceptions raised so far.""" + return len(self.exceptions) + + def get_delta_etime(self): + """Returns a `timedelta` object representing with the elapsed time.""" + return timedelta(seconds=(time.time() - self.start_time)) + + def add_flow(self, flow): + """ + Add a flow to the scheduler. + """ + if hasattr(self, "_flow"): + raise self.Error("Only one flow can be added to the scheduler.") + + # Check if we are already using a scheduler to run this flow + flow.check_pid_file() + flow.set_spectator_mode(False) + + # Build dirs and files (if not yet done) + flow.build() + + with open(flow.pid_file, "wt") as fh: + fh.write(str(self.pid)) + + self._pid_file = flow.pid_file + self._flow = flow + + def _validate_customer_service(self): + """ + Validate input parameters if customer service is on then + create directory for tarball files with correct premissions for user and group. + """ + direc = self.customer_service_dir + if not direc.exists: + mode = 0o750 + print("Creating customer_service_dir %s with mode %s" % (direc, mode)) + direc.makedirs() + os.chmod(direc.path, mode) + + if self.mailto is None: + raise RuntimeError("customer_service_dir requires mailto option in scheduler.yml") + + def _do_customer_service(self): + """ + This method is called before the shutdown of the scheduler. + If customer_service is on and the flow didn't completed successfully, + a lightweight tarball file with inputs and the most important output files + is created in customer_servide_dir. + """ + if self.customer_service_dir is None: return + doit = self.exceptions or not self.flow.all_ok + doit = True + if not doit: return + + prefix = os.path.basename(self.flow.workdir) + "_" + + import tempfile, datetime + suffix = str(datetime.datetime.now()).replace(" ", "-") + # Remove milliseconds + i = suffix.index(".") + if i != -1: suffix = suffix[:i] + suffix += ".tar.gz" + + #back = os.getcwd() + #os.chdir(self.customer_service_dir.path) + + _, tmpname = tempfile.mkstemp(suffix="_" + suffix, prefix=prefix, + dir=self.customer_service_dir.path, text=False) + + print("Dear customer,\n We are about to generate a tarball in\n %s" % tmpname) + self.flow.make_light_tarfile(name=tmpname) + #os.chdir(back) + + def start(self): + """ + Starts the scheduler in a new thread. Returns 0 if success. + In standalone mode, this method will block until there are no more scheduled jobs. + """ + self.history.append("Started on %s" % time.asctime()) + self.start_time = time.time() + + if not has_apscheduler: + raise RuntimeError("Install apscheduler with pip") + + if has_sched_v3: + self.sched.add_job(self.callback, "interval", **self.sched_options) + else: + self.sched.add_interval_job(self.callback, **self.sched_options) + + errors = self.flow.look_before_you_leap() + if errors: + self.exceptions.append(errors) + return 1 + + # Try to run the job immediately. If something goes wrong return without initializing the scheduler. + self._runem_all() + + if self.exceptions: + self.cleanup() + self.send_email(msg="Error while trying to run the flow for the first time!\n %s" % self.exceptions) + return 1 + + try: + self.sched.start() + return 0 + + except KeyboardInterrupt: + self.shutdown(msg="KeyboardInterrupt from user") + if ask_yesno("Do you want to cancel all the jobs in the queue? [Y/n]"): + print("Number of jobs cancelled:", self.flow.cancel()) + + self.flow.pickle_dump() + return -1 + + def _runem_all(self): + """ + This function checks the status of all tasks, + tries to fix tasks that went unconverged, abicritical, or queuecritical + and tries to run all the tasks that can be submitted.+ + """ + excs = [] + flow = self.flow + + # Allow to change the manager at run-time + if self.use_dynamic_manager: + from pymatgen.io.abinit.tasks import TaskManager + new_manager = TaskManager.from_user_config() + for work in flow: + work.set_manager(new_manager) + + nqjobs = 0 + if self.contact_resource_manager: # and flow.TaskManager.qadapter.QTYPE == "shell": + # This call is expensive and therefore it's optional (must be activate in manager.yml) + nqjobs = flow.get_njobs_in_queue() + if nqjobs is None: + nqjobs = 0 + if flow.manager.has_queue: + logger.warning('Cannot get njobs_inqueue') + else: + # Here we just count the number of tasks in the flow who are running. + # This logic breaks down if there are multiple schedulers runnig + # but it's easy to implement without having to contact the resource manager. + nqjobs = (len(list(flow.iflat_tasks(status=flow.S_RUN))) + + len(list(flow.iflat_tasks(status=flow.S_SUB)))) + + if nqjobs >= self.max_njobs_inqueue: + print("Too many jobs in the queue: %s. No job will be submitted." % nqjobs) + flow.check_status(show=False) + return + + if self.max_nlaunches == -1: + max_nlaunch = self.max_njobs_inqueue - nqjobs + else: + max_nlaunch = min(self.max_njobs_inqueue - nqjobs, self.max_nlaunches) + + # check status. + flow.check_status(show=False) + + # This check is not perfect, we should make a list of tasks to sumbit + # and select only the subset so that we don't exceeed mac_ncores_used + # Many sections of this code should be rewritten. + #if self.max_ncores_used is not None and flow.ncores_used > self.max_ncores_used: + if self.max_ncores_used is not None and flow.ncores_allocated > self.max_ncores_used: + print("Cannot exceed max_ncores_used %s" % self.max_ncores_used) + return + + # Try to restart the unconverged tasks + # TODO: do not fire here but prepare for fireing in rapidfire + for task in self.flow.unconverged_tasks: + try: + logger.info("Flow will try restart task %s" % task) + fired = task.restart() + if fired: + self.nlaunch += 1 + max_nlaunch -= 1 + if max_nlaunch == 0: + logger.info("Restart: too many jobs in the queue, returning") + flow.pickle_dump() + return + + except task.RestartError: + excs.append(straceback()) + + # Temporarily disable by MG because I don't know if fix_critical works after the + # introduction of the new qadapters + # reenabled by MsS disable things that do not work at low level + # fix only prepares for restarting, and sets to ready + if self.fix_qcritical: + nfixed = flow.fix_queue_critical() + if nfixed: print("Fixed %d QCritical error(s)" % nfixed) + + nfixed = flow.fix_abicritical() + if nfixed: print("Fixed %d AbiCritical error(s)" % nfixed) + + # update database + flow.pickle_dump() + + # Submit the tasks that are ready. + try: + nlaunch = PyLauncher(flow).rapidfire(max_nlaunch=max_nlaunch, sleep_time=10) + self.nlaunch += nlaunch + if nlaunch: + cprint("[%s] Number of launches: %d" % (time.asctime(), nlaunch), "yellow") + + except Exception: + excs.append(straceback()) + + # check status. + flow.show_status() + + if excs: + logger.critical("*** Scheduler exceptions:\n *** %s" % "\n".join(excs)) + self.exceptions.extend(excs) + + def callback(self): + """The function that will be executed by the scheduler.""" + try: + return self._callback() + except Exception: + # All exceptions raised here will trigger the shutdown! + s = straceback() + self.exceptions.append(s) + + # This is useful when debugging + #try: + # print("Exception in callback, will cancel all tasks") + # for task in self.flow.iflat_tasks(): + # task.cancel() + #except Exception: + # pass + + self.shutdown(msg="Exception raised in callback!\n" + s) + + def _callback(self): + """The actual callback.""" + if self.debug: + # Show the number of open file descriptors + print(">>>>> _callback: Number of open file descriptors: %s" % get_open_fds()) + + self._runem_all() + + all_ok = self.flow.all_ok + #if all_ok: all_ok = self.flow.on_all_ok() + + # Mission accomplished. Shutdown the scheduler. + if all_ok: + return self.shutdown(msg="All tasks have reached S_OK. Will shutdown the scheduler and exit") + + # Handle failures. + err_lines = [] + + # Shall we send a reminder to the user? + delta_etime = self.get_delta_etime() + + if delta_etime.total_seconds() > self.num_reminders * self.remindme_s: + self.num_reminders += 1 + msg = ("Just to remind you that the scheduler with pid %s, flow %s\n has been running for %s " % + (self.pid, self.flow, delta_etime)) + retcode = self.send_email(msg, tag="[REMINDER]") + + if retcode: + # Cannot send mail, shutdown now! + msg += ("\nThe scheduler tried to send an e-mail to remind the user\n" + + " but send_email returned %d. Error is not critical though!" % retcode) + print(msg) + #err_lines.append(msg) + + #if delta_etime.total_seconds() > self.max_etime_s: + # err_lines.append("\nExceeded max_etime_s %s. Will shutdown the scheduler and exit" % self.max_etime_s) + + # Too many exceptions. Shutdown the scheduler. + if self.num_excs > self.max_num_pyexcs: + msg = "Number of exceptions %s > %s. Will shutdown the scheduler and exit" % ( + self.num_excs, self.max_num_pyexcs) + err_lines.append(boxed(msg)) + + # Paranoid check: disable the scheduler if we have submitted + # too many jobs (it might be due to some bug or other external reasons + # such as race conditions between difference callbacks!) + if self.nlaunch > self.safety_ratio * self.flow.num_tasks: + msg = "Too many jobs launched %d. Total number of tasks = %s, Will shutdown the scheduler and exit" % ( + self.nlaunch, self.flow.num_tasks) + err_lines.append(boxed(msg)) + + # Count the number of tasks with status == S_ERROR. + if self.flow.num_errored_tasks > self.max_num_abierrs: + msg = "Number of tasks with ERROR status %s > %s. Will shutdown the scheduler and exit" % ( + self.flow.num_errored_tasks, self.max_num_abierrs) + err_lines.append(boxed(msg)) + + # Test on the presence of deadlocks. + g = self.flow.find_deadlocks() + if g.deadlocked: + # Check the flow again so that status are updated. + self.flow.check_status() + + g = self.flow.find_deadlocks() + #print("deadlocked:\n", g.deadlocked, "\nrunnables:\n", g.runnables, "\nrunning\n", g.running) + print("deadlocked:", len(g.deadlocked), ", runnables:", len(g.runnables), ", running:", len(g.running)) + if g.deadlocked and not g.runnables and not g.running: + err_lines.append("No runnable job with deadlocked tasks:\n%s." % str(g.deadlocked)) + + if not g.runnables and not g.running: + # Check the flow again so that status are updated. + self.flow.check_status() + g = self.flow.find_deadlocks() + if not g.runnables and not g.running: + err_lines.append("No task is running and cannot find other tasks to submit.") + + # Something wrong. Quit + if err_lines: + # Cancel all jobs. + if self.killjobs_if_errors: + cprint("killjobs_if_errors set to 'yes' in scheduler file. Will kill jobs before exiting.", "yellow") + try: + num_cancelled = 0 + for task in self.flow.iflat_tasks(): + num_cancelled += task.cancel() + cprint("Killed %d tasks" % num_cancelled, "yellow") + except Exception as exc: + cprint("Exception while trying to kill jobs:\n%s" % str(exc), "red") + + self.shutdown("\n".join(err_lines)) + + return len(self.exceptions) + + def cleanup(self): + """Cleanup routine: remove the pid file and save the pickle database""" + try: + os.remove(self.pid_file) + except OSError as exc: + logger.critical("Could not remove pid_file: %s", exc) + + # Save the final status of the flow. + self.flow.pickle_dump() + + def shutdown(self, msg): + """Shutdown the scheduler.""" + try: + self.cleanup() + + self.history.append("Completed on: %s" % time.asctime()) + self.history.append("Elapsed time: %s" % self.get_delta_etime()) + + if self.debug: + print(">>>>> shutdown: Number of open file descriptors: %s" % get_open_fds()) + + retcode = self.send_email(msg) + if self.debug: + print("send_mail retcode", retcode) + + # Write file with the list of exceptions: + if self.exceptions: + dump_file = os.path.join(self.flow.workdir, "_exceptions") + with open(dump_file, "wt") as fh: + fh.writelines(self.exceptions) + fh.write("Shutdown message:\n%s" % msg) + + lines = [] + app = lines.append + app("Submitted on: %s" % time.ctime(self.start_time)) + app("Completed on: %s" % time.asctime()) + app("Elapsed time: %s" % str(self.get_delta_etime())) + + if self.flow.all_ok: + app("Flow completed successfully") + else: + app("Flow %s didn't complete successfully" % repr(self.flow.workdir)) + app("use `abirun.py FLOWDIR debug` to analyze the problem.") + app("Shutdown message:\n%s" % msg) + + print("") + print("\n".join(lines)) + print("") + + self._do_customer_service() + + if self.flow.all_ok: + print("Calling flow.finalize()...") + self.flow.finalize() + #print("finalized:", self.flow.finalized) + if self.rmflow: + app("Flow directory will be removed...") + try: + self.flow.rmtree() + except Exception: + logger.warning("Ignoring exception while trying to remove flow dir.") + + finally: + # Shutdown the scheduler thus allowing the process to exit. + logger.debug('This should be the shutdown of the scheduler') + + # Unschedule all the jobs before calling shutdown + #self.sched.print_jobs() + if not has_sched_v3: + for job in self.sched.get_jobs(): + self.sched.unschedule_job(job) + #self.sched.print_jobs() + + self.sched.shutdown() + # Uncomment the line below if shutdown does not work! + #os.system("kill -9 %d" % os.getpid()) + + def send_email(self, msg, tag=None): + """ + Send an e-mail before completing the shutdown. + Returns 0 if success. + """ + try: + return self._send_email(msg, tag) + except Exception: + self.exceptions.append(straceback()) + return -2 + + def _send_email(self, msg, tag): + if self.mailto is None: + return -1 + + header = msg.splitlines() + app = header.append + + app("Submitted on: %s" % time.ctime(self.start_time)) + app("Completed on: %s" % time.asctime()) + app("Elapsed time: %s" % str(self.get_delta_etime())) + app("Number of errored tasks: %d" % self.flow.num_errored_tasks) + app("Number of unconverged tasks: %d" % self.flow.num_unconverged_tasks) + + strio = StringIO() + strio.writelines("\n".join(header) + 4 * "\n") + + # Add the status of the flow. + self.flow.show_status(stream=strio) + + if self.exceptions: + # Report the list of exceptions. + strio.writelines(self.exceptions) + + if tag is None: + tag = " [ALL OK]" if self.flow.all_ok else " [WARNING]" + + return sendmail(subject=self.flow.name + tag, text=strio.getvalue(), mailto=self.mailto) + + +def sendmail(subject, text, mailto, sender=None): + """ + Sends an e-mail with unix sendmail. + + Args: + subject: String with the subject of the mail. + text: String with the body of the mail. + mailto: String or list of string with the recipients. + sender: string with the sender address. + If sender is None, username@hostname is used. + + Returns: + Exit status + """ + def user_at_host(): + from socket import gethostname + return os.getlogin() + "@" + gethostname() + + # Body of the message. + try: + sender = user_at_host() if sender is None else sender + except OSError: + sender = 'abipyscheduler@youknowwhere' + + if is_string(mailto): mailto = [mailto] + + from email.mime.text import MIMEText + mail = MIMEText(text) + mail["Subject"] = subject + mail["From"] = sender + mail["To"] = ", ".join(mailto) + + msg = mail.as_string() + + # sendmail works much better than the python interface. + # Note that sendmail is available only on Unix-like OS. + from subprocess import Popen, PIPE + import sys + + sendmail = which("sendmail") + if sendmail is None: return -1 + if sys.version_info[0] < 3: + p = Popen([sendmail, "-t"], stdin=PIPE, stderr=PIPE) + else: + # msg is string not bytes so must use universal_newlines + p = Popen([sendmail, "-t"], stdin=PIPE, stderr=PIPE, universal_newlines=True) + + outdata, errdata = p.communicate(msg) + return len(errdata) + + +def __test_sendmail(): + retcode = sendmail("sendmail_test", text="hello\nworld", mailto="nobody@nowhere.com") + print("Retcode", retcode) + assert retcode == 0 + + +class BatchLauncherError(Exception): + """Exceptions raised by :class:`BatchLauncher`.""" + + +class BatchLauncher(object): + """ + This object automates the execution of multiple flow. It generates a job script + that uses abirun.py to run each flow stored in self with a scheduler. + The execution of the flows is done in sequential but each scheduler will start + to submit the tasks of the flow in autoparal mode. + + The `BatchLauncher` is pickleable, hence one can reload it, check if all flows are completed + and rerun only those that are not completed due to the timelimit. + """ + PICKLE_FNAME = "__BatchLauncher__.pickle" + + Error = BatchLauncherError + + @classmethod + def from_dir(cls, top, workdir=None, name=None, manager=None, max_depth=2): + """ + Find all flows located withing the directory `top` and build the `BatchLauncher`. + + Args: + top: Top level directory or list of directories. + workdir: Batch workdir. + name: + manager: |TaskManager| object. If None, the manager is read from `manager.yml` + In this case the YAML file must provide the entry `batch_manager` that defined + the queue adapter used to submit the batch script. + max_depth: Search in directory only if it is N or fewer levels below top + """ + from .flows import Flow + + def find_pickles(dirtop): + # Walk through each directory inside path and find the pickle database. + paths = [] + for dirpath, dirnames, filenames in os.walk(dirtop): + fnames = [f for f in filenames if f == Flow.PICKLE_FNAME] + paths.extend([os.path.join(dirpath, f) for f in fnames]) + return paths + + if is_string(top): + pickle_paths = find_pickles(top) + else: + # List of directories. + pickle_paths = [] + for p in top: + pickle_paths.extend(find_pickles(p)) + + #workdir = os.path.join(top, "batch") if workdir is None else workdir + workdir = "batch" if workdir is None else workdir + new = cls(workdir, name=name, manager=manager) + + for path in pickle_paths: + new.add_flow(path) + + return new + + @classmethod + def pickle_load(cls, filepath): + """ + Loads the object from a pickle file. + + Args: + filepath: Filename or directory name. It filepath is a directory, we + scan the directory tree starting from filepath and we + read the first pickle database. Raise RuntimeError if multiple + databases are found. + """ + if os.path.isdir(filepath): + # Walk through each directory inside path and find the pickle database. + for dirpath, dirnames, filenames in os.walk(filepath): + fnames = [f for f in filenames if f == cls.PICKLE_FNAME] + if fnames: + if len(fnames) == 1: + filepath = os.path.join(dirpath, fnames[0]) + break # Exit os.walk + else: + err_msg = "Found multiple databases:\n %s" % str(fnames) + raise RuntimeError(err_msg) + else: + err_msg = "Cannot find %s inside directory %s" % (cls.PICKLE_FNAME, filepath) + raise ValueError(err_msg) + + with open(filepath, "rb") as fh: + new = pickle.load(fh) + + # new.flows is a list of strings with the workdir of the flows (see __getstate__). + # Here we read the Flow from the pickle file so that we have + # and up-to-date version and we set the flow in visitor_mode + from .flows import Flow + flow_workdirs, new.flows = new.flows, [] + for flow in map(Flow.pickle_load, flow_workdirs): + new.add_flow(flow) + + return new + + def pickle_dump(self): + """Save the status of the object in pickle format.""" + with open(os.path.join(self.workdir, self.PICKLE_FNAME), mode="wb") as fh: + pickle.dump(self, fh) + + def __getstate__(self): + """ + Return state is pickled as the contents for the instance. + + Here we replace the flow objects with their workdir because we are observing + the flows and we want to have the updated version when we reload the `BatchLauncher` from pickle. + """ + d = {k: v for k, v in self.__dict__.items() if k not in ["flows"]} + d["flows"] = [flow.workdir for flow in self.flows] + return d + + def __init__(self, workdir, name=None, flows=None, manager=None, timelimit=None): + """ + Args: + workdir: Working directory + name: Name assigned to the `BatchLauncher`. + flows: List of |Flow| objects. + manager: |TaskManager| object responsible for the submission of the jobs. + If manager is None, the object is initialized from the yaml file + located either in the working directory or in the user configuration dir. + timelimit: Time limit (int with seconds or string with time given with + the slurm convention: "days-hours:minutes:seconds". + If timelimit is None, the default value specified in the `batch_adapter` is taken. + """ + self.workdir = os.path.abspath(workdir) + + if not os.path.exists(self.workdir): + os.makedirs(self.workdir) + else: + pass + #raise RuntimeError("Directory %s already exists. Use BatchLauncher.pickle_load()" % self.workdir) + + self.name = os.path.basename(self.workdir) if name is None else name + self.script_file = File(os.path.join(self.workdir, "run.sh")) + self.qerr_file = File(os.path.join(self.workdir, "queue.qerr")) + self.qout_file = File(os.path.join(self.workdir, "queue.qout")) + self.log_file = File(os.path.join(self.workdir, "run.log")) + self.batch_pidfile = File(os.path.join(self.workdir, "batch.pid")) + + from .tasks import TaskManager + manager = TaskManager.as_manager(manager) + + # Extract the qadapater to be used for the batch script. + try: + self.qadapter = qad = manager.batch_adapter + except AttributeError: + raise RuntimeError("Your manager.yml file does not define an entry for the batch_adapter") + + if qad is None: + raise RuntimeError("Your manager.yml file does not define an entry for the batch_adapter") + + # Set mpi_procs to 1 just to be on the safe side + # Then allow the user to change the timelimit via __init__ + qad.set_mpi_procs(1) + if timelimit is not None: + self.set_timelimit(timelimit) + # FIXME: Remove me! + self.set_timelimit(36000) + + # Initialize list of flows. + if flows is None: flows = [] + if not isinstance(flows, (list, tuple)): flows = [flows] + self.flows = flows + + def set_timelimit(self, timelimit): + """ + Set the timelimit of the batch launcher. + + Args: + timelimit: Time limit (int with seconds or string with time given + with the slurm convention: "days-hours:minutes:seconds". + """ + self.qad.set_timelimit(qu.timelimit_parser(timelimit)) + + def to_string(self, **kwargs): + lines = [] + lines.extend(str(self.qadapter).splitlines()) + + for i, flow in enumerate(self.flows): + lines.append("Flow [%d] " % i + str(flow)) + + return "\n".join(lines) + + def __str__(self): + return self.to_string() + + def add_flow(self, flow): + """ + Add a flow. Accept filepath or |Flow| object. Return 1 if flow was added else 0. + """ + from .flows import Flow + flow = Flow.as_flow(flow) + + if flow in self.flows: + raise self.Error("Cannot add same flow twice!") + + if not flow.allocated: + # Set the workdir of the flow here. Create a dir in self.workdir with name flow.name + flow_workdir = os.path.join(self.workdir, os.path.basename(flow.name)) + if flow_workdir in (flow.workdir for flow in self.flows): + raise self.Error("Two flows have the same name and hence the same workdir!") + flow.allocate(workdir=flow_workdir) + + # Check if we are already using a scheduler to run this flow + flow.check_pid_file() + flow.set_spectator_mode(False) + + flow.check_status(show=False) + + #if flow.all_ok: + # print("flow.all_ok: Ignoring %s" % flow) + # return 0 + + self.flows.append(flow) + #print("Flow %s added to the BatchLauncher" % flow) + + return 1 + + def submit(self, **kwargs): + """ + Submit a job script that will run the schedulers with `abirun.py`. + + Args: + verbose: Verbosity level + dry_run: Don't submit the script if dry_run. Default: False + + Returns: + namedtuple with attributes: + retcode: Return code as returned by the submission script. + qjob: :class:`QueueJob` object. + num_flows_inbatch: Number of flows executed by the batch script + + Return code of the job script submission. + """ + verbose, dry_run = kwargs.pop("verbose", 0), kwargs.pop("dry_run", False) + + if not self.flows: + print("Cannot submit an empty list of flows!") + return 0 + + if hasattr(self, "qjob"): + # This usually happens when we have loaded the object from pickle + # and we have already submitted to batch script to the queue. + # At this point we need to understand if the previous batch job + # is still running before trying to submit it again. There are three cases: + # + # 1) The batch script has completed withing timelimit and therefore + # the pid_file has been removed by the script. In this case, we + # should not try to submit it again. + + # 2) The batch script has been killed due to timelimit (other reasons are possible + # but we neglect them). In this case the pid_file exists but there's no job with + # this pid runnig and we can resubmit it again. + + # 3) The batch script is still running. + print("BatchLauncher has qjob %s" % self.qjob) + + if not self.batch_pid_file.exists: + print("It seems that the batch script reached the end. Wont' try to submit it again") + return 0 + + msg = ("Here I have to understand if qjob is in the queue." + " but I need an abstract API that can retrieve info from the queue id") + raise RuntimeError(msg) + + # TODO: Temptative API + if self.qjob.in_status("Running|Queued"): + print("Job is still running. Cannot submit") + else: + del self.qjob + + script, num_flows_inbatch = self._get_script_nflows() + + if num_flows_inbatch == 0: + print("All flows have reached all_ok! Batch script won't be submitted") + return 0 + + if verbose: + print("*** submission script ***") + print(script) + + # Write the script. + self.script_file.write(script) + self.script_file.chmod(0o740) + + # Builf the flow. + for flow in self.flows: + flow.build_and_pickle_dump() + + # Submit the task and save the queue id. + if dry_run: return -1 + + print("Will submit %s flows in batch script" % len(self.flows)) + self.qjob, process = self.qadapter.submit_to_queue(self.script_file.path) + + # Save the queue id in the pid file + # The file will be removed by the job script if execution is completed. + self.batch_pidfile.write(str(self.qjob.qid)) + + self.pickle_dump() + process.wait() + + return dict2namedtuple(retcode=process.returncode, qjob=self.qjob, + num_flows_inbatch=num_flows_inbatch) + + def _get_script_nflows(self): + """ + Write the submission script. Return (script, num_flows_in_batch) + """ + flows_torun = [f for f in self.flows if not f.all_ok] + if not flows_torun: + return "", 0 + + executable = [ + 'export _LOG=%s' % self.log_file.path, + 'date1=$(date +"%s")', + 'echo Running abirun.py in batch mode > ${_LOG}', + " ", + ] + app = executable.append + + # Build list of abirun commands and save the name of the log files. + self.sched_logs, num_flows = [], len(flows_torun) + for i, flow in enumerate(flows_torun): + + logfile = os.path.join(self.workdir, "log_" + os.path.basename(flow.workdir)) + + app("echo Starting flow %d/%d on: `date` >> ${LOG}" % (i+1, num_flows)) + app("\nabirun.py %s scheduler > %s" % (flow.workdir, logfile)) + app("echo Returning from abirun on `date` with retcode $? >> ${_LOG}") + + assert logfile not in self.sched_logs + self.sched_logs.append(logfile) + + # Remove the batch pid_file and compute elapsed time. + executable.extend([ + " ", + "# Remove batch pid file", + 'rm %s' % self.batch_pidfile.path, + " ", + "# Compute elapsed time", + 'date2=$(date +"%s")', + 'diff=$(($date2-$date1))', + 'echo $(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed. >> ${_LOG}' + ]) + + return self.qadapter.get_script_str( + job_name=self.name, + launch_dir=self.workdir, + executable=executable, + qout_path=self.qout_file.path, + qerr_path=self.qerr_file.path, + ), num_flows + + def show_summary(self, **kwargs): + """ + Show a summary with the status of the flows. + """ + for flow in self.flows: + flow.show_summary() + + def show_status(self, **kwargs): + """ + Report the status of the flows. + + Args: + stream: File-like object, Default: sys.stdout + verbose: Verbosity level (default 0). > 0 to show only the works that are not finalized. + """ + for flow in self.flows: + flow.show_status(**kwargs) diff --git a/abipy/flowtk/mocks.py b/abipy/flowtk/mocks.py index e5b179fad..0431c2da8 100644 --- a/abipy/flowtk/mocks.py +++ b/abipy/flowtk/mocks.py @@ -1,10 +1,9 @@ # coding: utf-8 """Mock objects for unit tests.""" -from __future__ import print_function, division, unicode_literals, absolute_import -from pymatgen.io.abinit.nodes import Status -from pymatgen.io.abinit.tasks import AbinitTask -from pymatgen.io.abinit.flows import Flow +from .nodes import Status +from .tasks import AbinitTask +from .flows import Flow def change_task_start(task, mocked_status="Error"): @@ -30,7 +29,7 @@ def infinite_flow(flow): class InfiniteFlow(Flow): """A Flow that will never reach `all_ok`""" def check_status(self, **kwargs): - super(InfiniteFlow, self).check_status(**kwargs) + super().check_status(**kwargs) for task in self.iflat_tasks(status=self.S_OK): task.set_status(task.S_INIT) diff --git a/abipy/flowtk/netcdf.py b/abipy/flowtk/netcdf.py index 82e9264fc..bf63064a5 100644 --- a/abipy/flowtk/netcdf.py +++ b/abipy/flowtk/netcdf.py @@ -1,3 +1,2 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - +# flake8: noqa from pymatgen.io.abinit.netcdf import * diff --git a/abipy/flowtk/nodes.py b/abipy/flowtk/nodes.py new file mode 100644 index 000000000..42f47f4ad --- /dev/null +++ b/abipy/flowtk/nodes.py @@ -0,0 +1,1311 @@ +# coding: utf-8 +""" +This module defines the Node class that is inherited by Task, Work and Flow objects. +""" + +import sys +import os +import time +import collections +import abc +import numpy as np + +from collections import OrderedDict +from pprint import pprint +from pymatgen.util.io_utils import AtomicFile +from pydispatch import dispatcher +from monty.termcolor import colored +from monty.serialization import loadfn +from monty.string import is_string +from monty.io import FileLock +from monty.collections import AttrDict, Namespace +from monty.functools import lazy_property +from monty.json import MSONable +from pymatgen.util.serialization import json_pretty_dump, pmg_serialize +from .utils import File, Directory, Dirviz, irdvars_for_ext, abi_extensions + + +import logging +logger = logging.getLogger(__name__) + + +def _2attrs(item): + return item if item is None or isinstance(list, tuple) else (item,) + + +class Status(int): + """This object is an integer representing the status of the `Node`.""" + + # Possible status of the node. See monty.termocolor for the meaning of color, on_color and attrs. + _STATUS_INFO = [ + # (value, name, color, on_color, attrs) + # Node has been initialized + (1, "Initialized", None, None, None), + # Task is locked an must be explicitly unlocked by an external subject (Work). + (2, "Locked", "grey", None, None), + # Node is ready i.e. all the depencies of the node have status S_OK + (3, "Ready", None, None, None), + # Node has been submitted (The `Task` is running or we have started to finalize the Work) + (4, "Submitted", "blue", None, None), + # Node is running. + (5, "Running", "magenta", None, None), + # Node done, This does not imply that results are ok or that the calculation completed successfully + (6, "Done", None, None, None), + # raised an Error by ABINIT. + (7, "AbiCritical", "red", None, None), + # Node raised an Error by submitting submission script, or by executing it + (8, "QCritical", "red", "on_white", None), + # This usually means that an iterative algorithm didn't converge. + (9, "Unconverged", "red", "on_yellow", None), + # Node raised an unrecoverable error, usually raised when an attempt to fix one of other types failed. + (10, "Error", "red", None, None), + # Execution completed successfully. + (11, "Completed", "green", None, None), + ] + _STATUS2STR = OrderedDict([(t[0], t[1]) for t in _STATUS_INFO]) + _STATUS2COLOR_OPTS = OrderedDict([(t[0], {"color": t[2], "on_color": t[3], "attrs": _2attrs(t[4])}) for t in _STATUS_INFO]) + + def __repr__(self): + return "<%s: %s, at %s>" % (self.__class__.__name__, str(self), id(self)) + + def __str__(self): + """String representation.""" + return self._STATUS2STR[self] + + @classmethod + def as_status(cls, obj): + """Convert obj into Status.""" + if obj is None: return None + return obj if isinstance(obj, cls) else cls.from_string(obj) + + @classmethod + def from_string(cls, s): + """Return a `Status` instance from its string representation.""" + for num, text in cls._STATUS2STR.items(): + if text == s: + return cls(num) + else: + raise ValueError("Wrong string %s" % s) + + @classmethod + def all_status_strings(cls): + """List of strings with all possible values status.""" + return [info[1] for info in cls._STATUS_INFO] + + @property + def is_critical(self): + """True if status is critical.""" + return str(self) in ("AbiCritical", "QCritical", "Unconverged", "Error") + + @property + def color_opts(self): + return self._STATUS2COLOR_OPTS[self] + + @property + def colored(self): + """Return colorized text used to print the status if the stream supports it.""" + return colored(str(self), **self.color_opts) + + +class Dependency(object): + """ + This object describes the dependencies among the nodes of a calculation. + + A `Dependency` consists of a `Node` that produces a list of products (files) + that are used by the other nodes (`Task` or `Work`) to start the calculation. + One usually creates the object by calling work.register + + Example: + + # Register the SCF task in work. + scf_task = work.register(scf_strategy) + + # Register the NSCF calculation and its dependency on the SCF run via deps. + nscf_task = work.register(nscf_strategy, deps={scf_task: "DEN"}) + """ + def __init__(self, node, exts=None): + """ + Args: + node: The task or the worfklow associated to the dependency or string with a filepath. + exts: Extensions of the output files that are needed for running the other tasks. + """ + self._node = Node.as_node(node) + + if exts and is_string(exts): exts = exts.split() + + # Extract extensions. + self.exts = [e for e in exts if not e.startswith("@")] + + # Save getters + self.getters = [e for e in exts if e.startswith("@")] + #if self.getters: print(self.getters) + + def __hash__(self): + return hash(self._node) + + def __repr__(self): + return "node %s will produce: %s " % (repr(self.node), repr(self.exts)) + + def __str__(self): + return "node %s will produce: %s " % (str(self.node), str(self.exts)) + + @property + def info(self): + return str(self.node) + + @property + def node(self): + """The |Node| associated to the dependency.""" + return self._node + + @property + def status(self): + """The status of the dependency, i.e. the status of the |Node|.""" + return self.node.status + + @lazy_property + def products(self): + """List of output files produces by self.""" + _products = [] + for ext in self.exts: + prod = Product(ext, self.node.opath_from_ext(ext)) + _products.append(prod) + + return _products + + def apply_getters(self, task): + """ + This function is called when we specify the task dependencies with the syntax: + + deps={node: "@property"} + + In this case the task has to the get `property` from `node` before starting the calculation. + + At present, the following properties are supported: + + - @structure + """ + if not self.getters: return + + for getter in self.getters: + if getter == "@structure": + task.history.info("Getting structure from %s" % self.node) + new_structure = self.node.get_final_structure() + task._change_structure(new_structure) + else: + raise ValueError("Wrong getter %s" % getter) + + def connecting_vars(self): + """ + Returns a dictionary with the variables that must be added to the + input file in order to connect this |Node| to its dependencies. + """ + vars = {} + for prod in self.products: + vars.update(prod.connecting_vars()) + + return vars + + def get_filepaths_and_exts(self): + """Returns the paths of the output files produced by self and its extensions""" + filepaths = [prod.filepath for prod in self.products] + exts = [prod.ext for prod in self.products] + + return filepaths, exts + + +class Product(object): + """ + A product represents an output file produced by ABINIT instance. + This file is needed to start another `Task` or another `Work`. + """ + def __init__(self, ext, path): + """ + Args: + ext: ABINIT file extension + path: (asbolute) filepath + """ + if ext not in abi_extensions(): + raise ValueError("Extension `%s` has not been registered in the internal database" % str(ext)) + + self.ext = ext + self.file = File(path) + + @classmethod + def from_file(cls, filepath): + """Build a :class:`Product` instance from a filepath.""" + # Find the abinit extension. + for i in range(len(filepath)): + if filepath[i:] in abi_extensions(): + ext = filepath[i:] + break + else: + raise ValueError("Cannot detect abinit extension in %s" % filepath) + + return cls(ext, filepath) + + def __str__(self): + return "File=%s, Extension=%s, " % (self.file.path, self.ext) + + @property + def filepath(self): + """Absolute path of the file.""" + return self.file.path + + def connecting_vars(self): + """ + Returns a dictionary with the ABINIT variables that + must be used to make the code use this file. + """ + return irdvars_for_ext(self.ext) + + +class GridFsFile(AttrDict): + """Information on a file that will stored in the MongoDb gridfs collection.""" + def __init__(self, path, fs_id=None, mode="b"): + super().__init__(path=path, fs_id=fs_id, mode=mode) + + +class NodeResults(dict, MSONable): + """Dictionary used to store the most important results produced by a |Node|.""" + JSON_SCHEMA = { + "type": "object", + "properties": { + "node_id": {"type": "integer", "required": True}, + "node_finalized": {"type": "boolean", "required": True}, + "node_history": {"type": "array", "required": True}, + "node_class": {"type": "string", "required": True}, + "node_name": {"type": "string", "required": True}, + "node_status": {"type": "string", "required": True}, + "in": {"type": "object", "required": True, "description": "dictionary with input parameters"}, + "out": {"type": "object", "required": True, "description": "dictionary with the output results"}, + "exceptions": {"type": "array", "required": True}, + "files": {"type": "object", "required": True}, + }, + } + + @classmethod + def from_node(cls, node): + """Initialize an instance of `NodeResults` from a `Node` subclass.""" + kwargs = dict( + node_id=node.node_id, + node_finalized=node.finalized, + node_history=list(node.history), + node_name=node.name, + node_class=node.__class__.__name__, + node_status=str(node.status), + ) + + return node.Results(node, **kwargs) + + def __init__(self, node, **kwargs): + super().__init__(**kwargs) + self.node = node + + if "in" not in self: self["in"] = Namespace() + if "out" not in self: self["out"] = Namespace() + if "exceptions" not in self: self["exceptions"] = [] + if "files" not in self: self["files"] = Namespace() + + @property + def exceptions(self): + return self["exceptions"] + + @property + def gridfs_files(self): + """List with the absolute paths of the files to be put in GridFs.""" + return self["files"] + + def register_gridfs_files(self, **kwargs): + """ + This function registers the files that will be saved in GridFS. + kwargs is a dictionary mapping the key associated to the file (usually the extension) + to the absolute path. By default, files are assumed to be in binary form, for formatted files + one should pass a tuple ("filepath", "t"). + + Example:: + + results.register_gridfs(GSR="path/to/GSR.nc", text_file=("/path/to/txt_file", "t")) + + The GSR file is a binary file, whereas text_file is a text file. + """ + d = {} + for k, v in kwargs.items(): + mode = "b" + if isinstance(v, (list, tuple)): v, mode = v + d[k] = GridFsFile(path=v, mode=mode) + + self["files"].update(d) + return self + + def push_exceptions(self, *exceptions): + for exc in exceptions: + newstr = str(exc) + if newstr not in self.exceptions: + self["exceptions"] += [newstr,] + + @pmg_serialize + def as_dict(self): + return self.copy() + + @classmethod + def from_dict(cls, d): + return cls({k: v for k, v in d.items() if k not in ("@module", "@class")}) + + def json_dump(self, filename): + json_pretty_dump(self.as_dict(), filename) + + @classmethod + def json_load(cls, filename): + return cls.from_dict(loadfn(filename)) + + def validate_json_schema(self): + import validictory + d = self.as_dict() + try: + validictory.validate(d, self.JSON_SCHEMA) + return True + except ValueError as exc: + pprint(d) + print(exc) + return False + + def update_collection(self, collection): + """ + Update a mongodb collection. + """ + node = self.node + flow = node if node.is_flow else node.flow + + # Build the key used to store the entry in the document. + key = node.name + if node.is_task: + key = "w" + str(node.pos[0]) + "_t" + str(node.pos[1]) + elif node.is_work: + key = "w" + str(node.pos) + + db = collection.database + + # Save files with GridFs first in order to get the ID. + if self.gridfs_files: + import gridfs + fs = gridfs.GridFS(db) + for ext, gridfile in self.gridfs_files.items(): + logger.info("gridfs: about to put file:", str(gridfile)) + # Here we set gridfile.fs_id that will be stored in the mondodb document + try: + with open(gridfile.path, "r" + gridfile.mode) as f: + gridfile.fs_id = fs.put(f, filename=gridfile.path) + except IOError as exc: + logger.critical(str(exc)) + + if flow.mongo_id is None: + # Flow does not have a mongo_id, allocate doc for the flow and save its id. + flow.mongo_id = collection.insert({}) + print("Creating flow.mongo_id", flow.mongo_id, type(flow.mongo_id)) + + # Get the document from flow.mongo_id and update it. + doc = collection.find_one({"_id": flow.mongo_id}) + if key in doc: + raise ValueError("%s is already in doc!" % key) + doc[key] = self.as_dict() + + collection.save(doc) + #collection.update({'_id':mongo_id}, {"$set": doc}, upsert=False) + + +def check_spectator(node_method): + """ + Decorator for |Node| methods. Raise `SpectatorNodeError`. + """ + from functools import wraps + @wraps(node_method) + def wrapper(*args, **kwargs): + node = args[0] + if node.in_spectator_mode: + #raise node.SpectatorError("You should not call this method when the node in spectator_mode") + import warnings + warnings.warn("You should not call %s when the node in spectator_mode" % str(node_method)) + + return node_method(*args, **kwargs) + + return wrapper + + +class NodeError(Exception): + """Base Exception raised by |Node| subclasses""" + + +class SpectatorNodeError(NodeError): + """ + Exception raised by |Node| methods when the node is in spectator mode + and we are calling a method with side effects. + """ + + +class Node(metaclass=abc.ABCMeta): + """ + Abstract base class defining the interface that must be + implemented by the nodes of the calculation. + + Nodes are hashable and can be tested for equality + """ + Results = NodeResults + + Error = NodeError + SpectatorError = SpectatorNodeError + + # Possible status of the node. + S_INIT = Status.from_string("Initialized") + S_LOCKED = Status.from_string("Locked") + S_READY = Status.from_string("Ready") + S_SUB = Status.from_string("Submitted") + S_RUN = Status.from_string("Running") + S_DONE = Status.from_string("Done") + S_ABICRITICAL = Status.from_string("AbiCritical") + S_QCRITICAL = Status.from_string("QCritical") + S_UNCONVERGED = Status.from_string("Unconverged") + #S_CANCELLED = Status.from_string("Cancelled") + S_ERROR = Status.from_string("Error") + S_OK = Status.from_string("Completed") + + ALL_STATUS = [ + S_INIT, + S_LOCKED, + S_READY, + S_SUB, + S_RUN, + S_DONE, + S_ABICRITICAL, + S_QCRITICAL, + S_UNCONVERGED, + #S_CANCELLED, + S_ERROR, + S_OK, + ] + + # Color used to plot the network in networkx + color_rgb = np.array((105, 105, 105)) / 255 + + def __init__(self): + self._in_spectator_mode = False + # Node identifier. + self._node_id = get_newnode_id() + + # List of dependencies + self._deps = [] + + # List of files (products) needed by this node. + self._required_files = [] + + # Used to push additional info during the execution. + self.history = NodeHistory(maxlen=80) + + # Actions performed to fix abicritical events. + self._corrections = NodeCorrections() + + # Set to true if the node has been finalized. + self._finalized = False + self._status = self.S_INIT + + def __eq__(self, other): + if not isinstance(other, Node): return False + return self.node_id == other.node_id + + def __ne__(self, other): + return not self.__eq__(other) + + def __hash__(self): + return hash(self.node_id) + + def __repr__(self): + try: + return "<%s, node_id=%s, workdir=%s>" % ( + self.__class__.__name__, self.node_id, self.relworkdir) + except AttributeError: + # this usually happens when workdir has not been initialized + return "<%s, node_id=%s, workdir=None>" % (self.__class__.__name__, self.node_id) + + #def __setattr__(self, name, value): + # if self.in_spectator_mode: + # raise RuntimeError("You should not call __setattr__ in spectator_mode") + # return super().__setattr__(name,value) + + @lazy_property + def color_hex(self): + """Node color as Hex Triplet https://en.wikipedia.org/wiki/Web_colors#Hex_triplet""" + def clamp(x): + return max(0, min(int(x), 255)) + + r, g, b = np.trunc(self.color_rgb * 255) + return "#{0:02x}{1:02x}{2:02x}".format(clamp(r), clamp(g), clamp(b)) + + def isinstance(self, class_or_string): + """ + Check whether the node is a instance of `class_or_string`. + Unlinke the standard isinstance builtin, the method accepts either a class or a string. + In the later case, the string is compared with self.__class__.__name__ (case insensitive). + """ + if class_or_string is None: + return False + import inspect + if inspect.isclass(class_or_string): + return isinstance(self, class_or_string) + else: + return self.__class__.__name__.lower() == class_or_string.lower() + + @classmethod + def as_node(cls, obj): + """ + Convert obj into a Node instance. + + Return: + obj if obj is a Node instance, + cast obj to :class:`FileNode` instance of obj is a string. + None if obj is None + """ + if isinstance(obj, cls): + return obj + elif is_string(obj): + # Assume filepath. + return FileNode(obj) + elif obj is None: + return obj + else: + raise TypeError("Don't know how to convert %s to Node instance." % obj) + + @property + def name(self): + """ + The name of the node + (only used for facilitating its identification in the user interface). + """ + try: + return self._name + except AttributeError: + if self.is_task: + try: + return self.pos_str + except Exception: + return os.path.basename(self.workdir) + else: + return os.path.basename(self.workdir) + + @property + def relworkdir(self): + """Return a relative version of the workdir""" + if getattr(self, "workdir", None) is None: + return None + try: + return os.path.relpath(self.workdir) + except OSError: + # current working directory may not be defined! + return self.workdir + + def set_name(self, name): + """Set the name of the Node.""" + self._name = name + + @property + def node_id(self): + """Node identifier.""" + return self._node_id + + @check_spectator + def set_node_id(self, node_id): + """Set the node identifier. Use it carefully!""" + self._node_id = node_id + + @property + def finalized(self): + """True if the `Node` has been finalized.""" + return self._finalized + + @finalized.setter + def finalized(self, boolean): + self._finalized = boolean + self.history.info("Finalized set to %s" % self._finalized) + + @property + def in_spectator_mode(self): + return self._in_spectator_mode + + @in_spectator_mode.setter + def in_spectator_mode(self, mode): + self._in_spectator_mode = bool(mode) + #self.history.info("in_spectator_mode set to %s" % mode) + + @property + def corrections(self): + """ + List of dictionaries with infornation on the actions performed to solve `AbiCritical` Events. + Each dictionary contains the `AbinitEvent` who triggered the correction and + a human-readable message with the description of the operation performed. + """ + return self._corrections + + @property + def num_corrections(self): + return len(self.corrections) + + def log_correction(self, event, action): + """ + This method should be called once we have fixed the problem associated to this event. + It adds a new entry in the correction history of the node. + + Args: + event: :class:`AbinitEvent` that triggered the correction. + action (str): Human-readable string with info on the action perfomed to solve the problem. + """ + # TODO: Create CorrectionObject + action = str(action) + self.history.info(action) + + self._corrections.append(dict( + event=event.as_dict(), + action=action, + )) + + @property + def is_file(self): + """True if this node is a file""" + return isinstance(self, FileNode) + + @property + def is_task(self): + """True if this node is a Task""" + from .tasks import Task + return isinstance(self, Task) + + @property + def is_work(self): + """True if this node is a Work""" + from .works import Work + return isinstance(self, Work) + + @property + def is_flow(self): + """True if this node is a Flow""" + from .flows import Flow + return isinstance(self, Flow) + + @property + def deps(self): + """ + List of :class:`Dependency` objects defining the dependencies + of this `Node`. Empty list if this |Node| does not have dependencies. + """ + return self._deps + + @check_spectator + def add_deps(self, deps): + """ + Add a list of dependencies to the |Node|. + + Args: + deps: List of :class:`Dependency` objects specifying the dependencies of the node. + or dictionary mapping nodes to file extensions e.g. {task: "DEN"} + """ + if isinstance(deps, collections.abc.Mapping): + # Convert dictionary into list of dependencies. + deps = [Dependency(node, exts) for node, exts in deps.items()] + + # We want a list + if not isinstance(deps, (list, tuple)): + deps = [deps] + + assert all(isinstance(d, Dependency) for d in deps) + + # Add the dependencies to the node and merge possibly duplicated keys. + self._deps.extend(deps) + self.merge_deps() + + if self.is_work: + # The task in the work should inherit the same dependency. + for task in self: + task.add_deps(deps) + task.merge_deps() + + # If we have a FileNode as dependency, add self to its children + # Node.get_parents will use this list if node.is_isfile. + for dep in (d for d in deps if d.node.is_file): + dep.node.add_filechild(self) + + def merge_deps(self): + """ + Group all extensions associated to the same node in a single list. + Useful for cases in which we may end up with the same node appearing more than once + in self.deps. See e.g. ``add_deps``. + """ + from collections import defaultdict + node2exts = defaultdict(list) + for dep in self.deps: + node2exts[dep.node].extend(dep.exts) + self._deps = [Dependency(node, exts) for node, exts in node2exts.items()] + + @check_spectator + def remove_deps(self, deps): + """ + Remove a list of dependencies from the |Node|. + + Args: + deps: List of :class:`Dependency` objects specifying the dependencies of the node. + """ + if not isinstance(deps, (list, tuple)): + deps = [deps] + + assert all(isinstance(d, Dependency) for d in deps) + + self._deps = [d for d in self._deps if d not in deps] + + if self.is_work: + # remove the same list of dependencies from the task in the work + for task in self: + task.remove_deps(deps) + + @property + def deps_status(self): + """Returns a list with the status of the dependencies.""" + if not self.deps: + return [self.S_OK] + + return [d.status for d in self.deps] + + def depends_on(self, other): + """True if this node depends on the other node.""" + return other in [d.node for d in self.deps] + + def find_parent_with_ext(self, ext): + """ + Return the parent (usually a |Task|) that produces the file with extension `ext`. + Raises ValueError if multiple parents are found. + Return None if no parent is found. + """ + parent, count = None, 0 + for dep in self.deps: + if ext in dep.exts: + parent = dep.node + count += 1 + + if count > 1: + raise ValueError("Cannot have multiple parents producing the same file extension!\n%s" % self.str_deps()) + + return parent + + def get_parents(self): + """Return the list of nodes in the |Flow| required by this |Node|""" + return [d.node for d in self.deps] + + def get_children(self): + """ + Return the list of nodes in the |Flow| that depends on this |Node| + + .. note:: + + This routine assumes the entire flow has been allocated. + """ + # Specialized branch for FileNode. + if self.is_file: + return self.filechildren + + # Inspect the entire flow to get children. + children = [] + for work in self.flow: + if work.depends_on(self): children.append(work) + for task in work: + if task.depends_on(self): children.append(task) + return children + + def str_deps(self): + """Return the string representation of the dependencies of the node.""" + lines = [] + app = lines.append + + app("Dependencies of node %s:" % str(self)) + for i, dep in enumerate(self.deps): + app("%d) %s, status=%s" % (i, dep.info, str(dep.status))) + + return "\n".join(lines) + + def get_vars_dataframe(self, *varnames): + """ + Return pandas DataFrame with the value of the variables specified in `varnames`. + Can be used for task/works/flow. It's recursive! + + .. example: + + flow.get_vars_dataframe("ecut", "ngkpt") + work.get_vars_dataframe("acell", "usepawu") + """ + import pandas as pd + if self.is_task: + df = pd.DataFrame([{v: self.input.get(v, None) for v in varnames}], index=[self.name], columns=varnames) + df["class"] = self.__class__.__name__ + return df + + elif self.is_work: + frames = [task.get_vars_dataframe(*varnames) for task in self] + return pd.concat(frames) + + elif self.is_flow: + frames = [work.get_vars_dataframe(*varnames) for work in self] + return pd.concat(frames) + + else: + #print("Ignoring node of type: `%s`" % type(self)) + return pd.DataFrame(index=[self.name]) + + def get_graphviz_dirtree(self, engine="automatic", **kwargs): + """ + Generate directory graph in the DOT language. The graph show the files and directories + in the node workdir. + + Returns: graphviz.Digraph + """ + if engine == "automatic": + engine = "fdp" + + return Dirviz(self.workdir).get_cluster_graph(engine=engine, **kwargs) + + def set_gc(self, gc): + """ + Set the garbage collector. + """ + assert isinstance(gc, GarbageCollector) + self._gc = gc + + @property + def gc(self): + """ + Garbage collector. None if garbage collection is deactivated. + Use flow.set_garbage_collector to initialize the object. + """ + try: + return self._gc + except AttributeError: + #if not self.is_flow and self.flow.gc: return self.flow.gc + return None + + @property + def event_handlers(self): + """ + The list of handlers registered for this node. + If the node is not a `Flow` and does not have its own list of + `handlers` the handlers registered at the level of the flow are returned. + + This trick allows one to registered different handlers at the level of the Task + for testing purposes. By default, we have a common list of handlers for all the nodes in the flow. + This choice facilitates the automatic installation of the handlers when we use callbacks to generate + new Works and Tasks! + """ + if self.is_flow: + return self._event_handlers + + try: + return self._event_handlers + except AttributeError: + return self.flow._event_handlers + + @check_spectator + def install_event_handlers(self, categories=None, handlers=None): + """ + Install the `EventHandlers for this `Node`. If no argument is provided + the default list of handlers is installed. + + Args: + categories: List of categories to install e.g. base + can_change_physics + handlers: explicit list of :class:`EventHandler` instances. + This is the most flexible way to install handlers. + + .. note:: + + categories and handlers are mutually exclusive. + """ + if categories is not None and handlers is not None: + raise ValueError("categories and handlers are mutually exclusive!") + + from .events import get_event_handler_classes + if categories: + raise NotImplementedError() + handlers = [cls() for cls in get_event_handler_classes(categories=categories)] + else: + handlers = handlers or [cls() for cls in get_event_handler_classes()] + + self._event_handlers = handlers + + def show_event_handlers(self, stream=sys.stdout, verbose=0): + """Print to `stream` the event handlers installed for this flow.""" + lines = ["List of event handlers installed:"] + for handler in self.event_handlers: + if verbose: + lines.extend(handler.__class__.cls2str().split("\n")) + else: + lines.extend(str(handler).split("\n")) + + stream.write("\n".join(lines)) + stream.write("\n") + + def send_signal(self, signal): + """ + Send signal from this node to all connected receivers unless the node is in spectator mode. + + signal -- (hashable) signal value, see `dispatcher` connect for details + + Return a list of tuple pairs [(receiver, response), ... ] + or None if the node is in spectator mode. + + if any receiver raises an error, the error propagates back + through send, terminating the dispatch loop, so it is quite + possible to not have all receivers called if a raises an error. + """ + if self.in_spectator_mode: return None + self.history.debug("Node %s broadcasts signal %s" % (self, signal)) + dispatcher.send(signal=signal, sender=self) + + ########################## + ### Abstract protocol #### + ########################## + + @property + @abc.abstractmethod + def status(self): + """The status of the `Node`.""" + + @abc.abstractmethod + def check_status(self): + """Check the status of the `Node`.""" + + +class FileNode(Node): + """ + A Node that consists of a file. May be not yet existing + + Mainly used to connect |Task| objects to external files produced in previous runs. + """ + color_rgb = np.array((102, 51, 255)) / 255 + + def __init__(self, filename): + super().__init__() + self.filepath = os.path.abspath(filename) + + # Directories with input|output|temporary data. + self.workdir = os.path.dirname(self.filepath) + + self.indir = Directory(self.workdir) + self.outdir = Directory(self.workdir) + self.tmpdir = Directory(self.workdir) + + self._filechildren = [] + + def __repr__(self): + try: + return "<%s, node_id=%s, rpath=%s>" % ( + self.__class__.__name__, self.node_id, os.path.relpath(self.filepath)) + except AttributeError: + # this usually happens when workdir has not been initialized + return "<%s, node_id=%s, path=%s>" % (self.__class__.__name__, self.node_id, self.filepath) + + @lazy_property + def basename(self): + """Basename of the file.""" + return os.path.basename(self.filepath) + + @property + def products(self): + return [Product.from_file(self.filepath)] + + def opath_from_ext(self, ext): + return self.filepath + + @property + def status(self): + return self.S_OK if os.path.exists(self.filepath) else self.S_ERROR + + def check_status(self): + return self.status + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + #results.register_gridfs_files(filepath=self.filepath) + return results + + def add_filechild(self, node): + """Add a node (usually Task) to the children of this FileNode.""" + self._filechildren.append(node) + + @property + def filechildren(self): + """List with the children (nodes) of this FileNode.""" + return self._filechildren + + # This part provides IO capabilities to FileNode with API similar to the one implemented in Task. + # We may need it at runtime to extract information from netcdf files e.g. + # a NscfTask will change the FFT grid to match the one used in the GsTask. + + def abiopen(self): + from abipy import abilab + return abilab.abiopen(self.filepath) + + def open_gsr(self): + return self._abiopen_abiext("_GSR.nc") + + def _abiopen_abiext(self, abiext): + import glob + from abipy import abilab + if not self.filepath.endswith(abiext): + msg = """\n +File type does not match the abinit file extension. +Caller asked for abiext: `%s` whereas filepath: `%s`. +Continuing anyway assuming that the netcdf file provides the API/dims/vars neeeded by the caller. +""" % (abiext, self.filepath) + self.history.warning(msg) + + #try to find file in the same path + filepath = os.path.dirname(self.filepath) + glob_result = glob.glob(os.path.join(filepath, "*%s" % abiext)) + if len(glob_result): return abilab.abiopen(glob_result[0]) + return self.abiopen() + + +class HistoryRecord(object): + """ + A `HistoryRecord` instance represents an entry in the :class:`NodeHistory`. + + `HistoryRecord` instances are created every time something is logged. + They contain all the information pertinent to the event being logged. + The main information passed in is in msg and args, which are combined + using str(msg) % args to create the message field of the record. + The record also includes information such as when the record was created, + the source line where the logging call was made + + .. attribute:: levelno + + Numeric logging level for the message (DEBUG, INFO, WARNING, ERROR, CRITICAL) + + .. attribute:: levelname + + Text logging level for the message ("DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL") + + .. attribute:: pathname + + Full pathname of the source file where the logging call was issued (if available) + + .. attribute:: filename + + Filename portion of pathname + + .. attribute:: module + + Module (name portion of filename) + + .. attribute:: lineno + + Source line number where the logging call was issued (if available) + + .. attribute:: func_name + + Function name + + .. attribute:: created + + Time when the HistoryRecord was created (time.time() return value) + + .. attribute:: asctime + + Textual time when the HistoryRecord was created + + .. attribute:: message + The result of record.getMessage(), computed just as the record is emitted + """ + def __init__(self, level, pathname, lineno, msg, args, exc_info, func=None): + """ + Initialize a logging record with interesting information. + """ + # + # The following statement allows passing of a dictionary as a sole + # argument, so that you can do something like + # logging.debug("a %(a)d b %(b)s", {'a':1, 'b':2}) + # Suggested by Stefan Behnel. + # Note that without the test for args[0], we get a problem because + # during formatting, we test to see if the arg is present using + # 'if self.args:'. If the event being logged is e.g. 'Value is %d' + # and if the passed arg fails 'if self.args:' then no formatting + # is done. For example, logger.warn('Value is %d', 0) would log + # 'Value is %d' instead of 'Value is 0'. + # For the use case of passing a dictionary, this should not be a problem. + if args and len(args) == 1 and isinstance(args[0], dict) and args[0]: + args = args[0] + self.args = args + self.levelno = level + self.pathname = pathname + self.msg = msg + + self.levelname = "FOOBAR" #getLevelName(level) + + try: + self.filename = os.path.basename(pathname) + self.module = os.path.splitext(self.filename)[0] + except (TypeError, ValueError, AttributeError): + self.filename = pathname + self.module = "Unknown module" + + self.exc_info = exc_info + self.exc_text = None # used to cache the traceback text + self.lineno = lineno + self.func_name = func + self.created = time.time() + self.asctime = time.asctime() + # Remove milliseconds + i = self.asctime.find(".") + if i != -1: self.asctime = self.asctime[:i] + + def __repr__(self): + return '<%s, %s, %s, %s,\n"%s">' % (self.__class__.__name__, self.levelno, self.pathname, self.lineno, self.msg) + + def __str__(self): + return self.get_message(metadata=False) + + def get_message(self, metadata=False, asctime=True): + """ + Return the message after merging any user-supplied arguments with the message. + + Args: + metadata: True if function and module name should be added. + asctime: True if time string should be added. + """ + msg = self.msg if is_string(self.msg) else str(self.msg) + if self.args: + try: + msg = msg % self.args + except Exception: + msg += str(self.args) + + if asctime: msg = "[" + self.asctime + "] " + msg + + # Add metadata + if metadata: + msg += "\nCalled by %s at %s:%s\n" % (self.func_name, self.pathname, self.lineno) + + return msg + + @pmg_serialize + def as_dict(self): + return {'level': self.levelno, 'pathname': self.pathname, 'lineno': self.lineno, 'msg': self.msg, + 'args': self.args, 'exc_info': self.exc_info, 'func': self.func_name} + + @classmethod + def from_dict(cls, d): + return cls(level=d['level'], pathname=d['pathname'], lineno=int(d['lineno']), msg=d['msg'], args=d['args'], + exc_info=d['exc_info'], func=d['func']) + + +class NodeHistory(collections.deque): + """Logger-like object""" + + def __str__(self): + return self.to_string() + + def to_string(self, metadata=False): + """Returns a string with the history. Set metadata to True to have info on function and module.""" + return "\n".join(rec.get_message(metadata=metadata) for rec in self) + + def info(self, msg, *args, **kwargs): + """Log 'msg % args' with the info severity level""" + self._log("INFO", msg, args, kwargs) + + def warning(self, msg, *args, **kwargs): + """Log 'msg % args' with the warning severity level""" + self._log("WARNING", msg, args, kwargs) + + def critical(self, msg, *args, **kwargs): + """Log 'msg % args' with the critical severity level""" + self._log("CRITICAL", msg, args, kwargs) + + def debug(self, msg, *args, **kwargs): + """Log 'msg % args' with the critical severity level""" + self._log("DEBUG", msg, args, kwargs) + + def _log(self, level, msg, args, exc_info=None, extra=None): + """Low-level logging routine which creates a :class:`HistoryRecord`.""" + if exc_info and not isinstance(exc_info, tuple): + exc_info = sys.exc_info() + + self.append(HistoryRecord(level, "unknown filename", 0, msg, args, exc_info, func="unknown func")) + + +class NodeCorrections(list): + """Iterable storing the correctios performed by the :class:`EventHandler`""" + #TODO + # Correction should have a human-readable message + # and a list of operatins in JSON format (Modder?) so that + # we can read them and re-apply the corrections to another task if needed. + + #def count_event_class(self, event_class): + # """ + # Return the number of times the event class has been already fixed. + # """ + # #return len([c for c in self if c["event"]["@class"] == str(event_class)]) + + #def _find(self, event_class) + + +class GarbageCollector(object): + """This object stores information on the """ + def __init__(self, exts, policy): + self.exts, self.policy = set(exts), policy + + +# The code below initializes a counter from a file when the module is imported +# and save the counter's updated value automatically when the program terminates +# without relying on the application making an explicit call into this module at termination. + +_COUNTER = None +_COUNTER_FILE = os.path.join(os.path.expanduser("~"), ".abinit", "abipy", "nodecounter") + + +def init_counter(): + global _COUNTER + + # Make dir and file if not present. + if not os.path.exists(os.path.dirname(_COUNTER_FILE)): + os.makedirs(os.path.dirname(_COUNTER_FILE)) + + if not os.path.exists(_COUNTER_FILE): + with open(_COUNTER_FILE, "wt") as fh: + fh.write("%d\n" % -1) + + if _COUNTER is None: + with open(_COUNTER_FILE, "r") as fh: + s = fh.read().strip() + if not s: s = "-1" + _COUNTER = int(s) + + +def get_newnode_id(): + """ + Returns a new node identifier used for |Task|, |Work| and |Flow| objects. + + .. warning: + + The id is unique inside the same python process so be careful when + Works and Tasks are constructed at run-time or when threads are used. + """ + init_counter() + + global _COUNTER + _COUNTER += 1 + return _COUNTER + + +def save_lastnode_id(): + """Save the id of the last node created.""" + init_counter() + + with FileLock(_COUNTER_FILE): + with AtomicFile(_COUNTER_FILE, mode="w") as fh: + fh.write("%d\n" % _COUNTER) + + +# Register function atexit +import atexit +atexit.register(save_lastnode_id) diff --git a/abipy/flowtk/pseudos.py b/abipy/flowtk/pseudos.py index ab199d7d0..d62d5ff6d 100644 --- a/abipy/flowtk/pseudos.py +++ b/abipy/flowtk/pseudos.py @@ -1,3 +1,2 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -from pymatgen.io.abinit.pseudos import * +# flake8: noqa +from pymatgen.io.abinit.pseudos import Pseudo, PseudoTable, PseudoParser diff --git a/abipy/flowtk/qadapters.py b/abipy/flowtk/qadapters.py new file mode 100644 index 000000000..a6b98890b --- /dev/null +++ b/abipy/flowtk/qadapters.py @@ -0,0 +1,2100 @@ +# coding: utf-8 +""" +The initial version of this module was based on a similar implementation +present in FireWorks (https://pypi.python.org/pypi/FireWorks). +Work done by D. Waroquiers, A. Jain, and M. Kocher. + +The main difference wrt the Fireworks implementation is that the QueueAdapter +objects provide a programmatic interface for setting important attributes +such as the number of MPI nodes, the number of OMP threads and the memory requirements. +This programmatic interface is used by the `TaskManager` for optimizing the parameters +of the run before submitting the job (Abinit provides the autoparal option that +allows one to get a list of parallel configuration and their expected efficiency). +""" + +import sys +import os +import abc +import string +import copy +import getpass +import json +import math +from . import qutils as qu + +from collections import namedtuple +from subprocess import Popen, PIPE +from pymatgen.util.io_utils import AtomicFile +from monty.string import is_string, list_strings +from monty.collections import AttrDict +from monty.functools import lazy_property +from monty.inspect import all_subclasses +from monty.io import FileLock +from monty.json import MSONable +from pymatgen.core.units import Memory +from .utils import Condition +from .launcher import ScriptEditor +from .qjobs import QueueJob + +import logging +logger = logging.getLogger(__name__) + +__all__ = [ + "make_qadapter", +] + + +__author__ = "Matteo Giantomassi" +__copyright__ = "Copyright 2013, The Materials Project" +__version__ = "0.1" +__maintainer__ = "Matteo Giantomassi" + + +class SubmitResults(namedtuple("SubmitResult", "qid, out, err, process")): + """ + named tuple createc by the concrete implementation of _submit_to_que to pass the results of the process of + submitting the jobfile to the que. + qid: queue id of the submission + out: stdout of the submission + err: stdrr of the submisison + process: process object of the submission + """ + + +class MpiRunner(object): + """ + This object provides an abstraction for the mpirunner provided + by the different MPI libraries. It's main task is handling the + different syntax and options supported by the different mpirunners. + """ + def __init__(self, name, type=None, options=""): + """ + Args: + name (str): Name of the mpirunner e.g. mpirun, mpiexec, srun ... + type: Type of the mpirunner (not used at present) + options (str): String with options passed to the mpi runner e.g. "--bind-to None" + """ + self.name = name if name else "" + self.type = None + self.options = str(options) + + def string_to_run(self, qad, executable, stdin=None, stdout=None, stderr=None, exec_args=None): + """ + Build and return a string with the command required to launch `executable` with the qadapter `qad`. + + Args + qad: Qadapter instance. + executable (str): Executable name or path + stdin (str): Name of the file to be used as standard input. None means no redirection. + stdout (str): Name of the file to be used as standard output. None means no redirection. + stderr (str): Name of the file to be used as standard error. None means no redirection. + exec_args: Optional list of strings with options passed to `executable`. + + Return: + String with command to execute. + """ + stdin = "< " + stdin if stdin is not None else "" + stdout = "> " + stdout if stdout is not None else "" + stderr = "2> " + stderr if stderr is not None else "" + + if exec_args: + executable = executable + " " + " ".join(list_strings(exec_args)) + + basename = os.path.basename(self.name) + if basename in ["mpirun", "mpiexec", "srun"]: + if self.type is None: + # $MPIRUN -n $MPI_PROCS $EXECUTABLE < $STDIN > $STDOUT 2> $STDERR + num_opt = "-n " + str(qad.mpi_procs) + cmd = " ".join([self.name, self.options, num_opt, executable, stdin, stdout, stderr]) + else: + raise NotImplementedError("type %s is not supported!" % self.type) + + elif basename == "runjob": + #runjob --ranks-per-node 2 --exp-env OMP_NUM_THREADS --exe $ABINIT < $STDIN > $STDOUT 2> $STDERR + #runjob -n 2 --exp-env=OMP_NUM_THREADS --exe $ABINIT < $STDIN > $STDOUT 2> $STDERR + # exe must be absolute path or relative to cwd. + bg_size, rpn = qad.bgsize_rankspernode() + #num_opt = "-n " + str(qad.mpi_procs) + num_opt = "--ranks-per-node " + str(rpn) + cmd = " ".join([self.name, self.options, num_opt, "--exp-env OMP_NUM_THREADS", + "--exe `which " + executable + "` ", stdin, stdout, stderr]) + else: + if qad.mpi_procs != 1: + raise ValueError("Cannot use mpi_procs > when mpi_runner basename=%s" % basename) + cmd = " ".join([executable, stdin, stdout, stderr]) + + return cmd + + #@property + #def has_mpirun(self): + # """True if we are running via mpirun, mpiexec ...""" + # return self.name in ("mpirun", "mpiexec", "srun", "runjob") + + +class OmpEnv(AttrDict): + """ + Dictionary with the OpenMP environment variables + see https://computing.llnl.gov/tutorials/openMP/#EnvironmentVariables + """ + _KEYS = [ + "OMP_SCHEDULE", + "OMP_NUM_THREADS", + "OMP_DYNAMIC", + "OMP_PROC_BIND", + "OMP_NESTED", + "OMP_STACKSIZE", + "OMP_WAIT_POLICY", + "OMP_MAX_ACTIVE_LEVELS", + "OMP_THREAD_LIMIT", + "OMP_STACKSIZE", + "OMP_PROC_BIND", + ] + + @classmethod + def as_ompenv(cls, obj): + """Convert an object into a OmpEnv""" + if isinstance(obj, cls): return obj + if obj is None: return cls() + return cls(**obj) + + def __init__(self, *args, **kwargs): + """ + Constructor method inherited from dictionary: + + >>> assert OmpEnv(OMP_NUM_THREADS=1).OMP_NUM_THREADS == "1" + + To create an instance from an INI file, use: OmpEnv.from_file(filename) + """ + super().__init__(*args, **kwargs) + + err_msg = "" + for key, value in self.items(): + self[key] = str(value) + if key not in self._KEYS: + err_msg += "unknown option %s\n" % key + + if err_msg: + raise ValueError(err_msg) + + def export_str(self): + """Return a string with the bash statements needed to setup the OMP env.""" + return "\n".join("export %s=%s" % (k, v) for k, v in self.items()) + + +class Hardware(object): + """ + This object collects information on the hardware available in a given queue. + + Basic definitions: + + - A node refers to the physical box, i.e. cpu sockets with north/south switches connecting memory systems + and extension cards, e.g. disks, nics, and accelerators + + - A cpu socket is the connector to these systems and the cpu cores + + - A cpu core is an independent computing with its own computing pipeline, logical units, and memory controller. + Each cpu core will be able to service a number of cpu threads, each having an independent instruction stream + but sharing the cores memory controller and other logical units. + """ + def __init__(self, **kwargs): + self.num_nodes = int(kwargs.pop("num_nodes")) + self.sockets_per_node = int(kwargs.pop("sockets_per_node")) + self.cores_per_socket = int(kwargs.pop("cores_per_socket")) + + # Convert memory to megabytes. + m = str(kwargs.pop("mem_per_node")) + self.mem_per_node = int(Memory.from_string(m).to("Mb")) + + if self.mem_per_node <= 0 or self.sockets_per_node <= 0 or self.cores_per_socket <= 0: + raise ValueError("invalid parameters: %s" % kwargs) + + if kwargs: + raise ValueError("Found invalid keywords in the partition section:\n %s" % list(kwargs.keys())) + + def __str__(self): + """String representation.""" + lines = [] + app = lines.append + app(" num_nodes: %d, sockets_per_node: %d, cores_per_socket: %d, mem_per_node %s," % + (self.num_nodes, self.sockets_per_node, self.cores_per_socket, self.mem_per_node)) + return "\n".join(lines) + + @property + def num_cores(self): + """Total number of cores available""" + return self.cores_per_socket * self.sockets_per_node * self.num_nodes + + @property + def cores_per_node(self): + """Number of cores per node.""" + return self.cores_per_socket * self.sockets_per_node + + @property + def mem_per_core(self): + """Memory available on a single node.""" + return self.mem_per_node / self.cores_per_node + + def can_use_omp_threads(self, omp_threads): + """True if omp_threads fit in a node.""" + return self.cores_per_node >= omp_threads + + def divmod_node(self, mpi_procs, omp_threads): + """Use divmod to compute (num_nodes, rest_cores)""" + return divmod(mpi_procs * omp_threads, self.cores_per_node) + + def as_dict(self): + return {'num_nodes': self.num_nodes, + 'sockets_per_node': self.sockets_per_node, + 'cores_per_socket': self.cores_per_socket, + 'mem_per_node': str(Memory(val=self.mem_per_node, unit='Mb'))} + + @classmethod + def from_dict(cls, dd): + return cls(num_nodes=dd['num_nodes'], + sockets_per_node=dd['sockets_per_node'], + cores_per_socket=dd['cores_per_socket'], + mem_per_node=dd['mem_per_node']) + + +class _ExcludeNodesFile(object): + """ + This file contains the list of nodes to be excluded. + Nodes are indexed by queue name. + """ + DIRPATH = os.path.join(os.path.expanduser("~"), ".abinit", "abipy") + FILEPATH = os.path.join(DIRPATH, "exclude_nodes.json") + + def __init__(self): + if not os.path.exists(self.FILEPATH): + if not os.path.exists(self.DIRPATH): os.makedirs(self.DIRPATH) + with FileLock(self.FILEPATH): + with open(self.FILEPATH, "w") as fh: + json.dump({}, fh) + + def read_nodes(self, qname): + with open(self.FILEPATH, "w") as fh: + return json.load(fh).get(qname, []) + + def add_nodes(self, qname, nodes): + nodes = (nodes,) if not isinstance(nodes, (tuple, list)) else nodes + with FileLock(self.FILEPATH): + with AtomicFile(self.FILEPATH, mode="w+") as fh: + d = json.load(fh) + if qname in d: + d["qname"].extend(nodes) + d["qname"] = list(set(d["qname"])) + else: + d["qname"] = nodes + json.dump(d, fh) + + +_EXCL_NODES_FILE = _ExcludeNodesFile() + + +def show_qparams(qtype, stream=sys.stdout): + """Print to the given stream the template of the :class:`QueueAdapter` of type `qtype`.""" + for cls in all_subclasses(QueueAdapter): + if cls.QTYPE == qtype: return stream.write(cls.QTEMPLATE) + + raise ValueError("Cannot find class associated to qtype %s" % qtype) + + +def all_qtypes(): + """Return sorted list with all qtypes supported.""" + return sorted([cls.QTYPE for cls in all_subclasses(QueueAdapter)]) + + +def make_qadapter(**kwargs): + """ + Return the concrete :class:`QueueAdapter` class from a string. + Note that one can register a customized version with: + + .. code-block:: python + + from qadapters import SlurmAdapter + + class MyAdapter(SlurmAdapter): + QTYPE = "myslurm" + # Add your customized code here + + # Register your class. + SlurmAdapter.register(MyAdapter) + + make_qadapter(qtype="myslurm", **kwargs) + + .. warning:: + + MyAdapter should be pickleable, hence one should declare it + at the module level so that pickle can import it at run-time. + """ + # Get all known subclasses of QueueAdapter. + d = {c.QTYPE: c for c in all_subclasses(QueueAdapter)} + + # Preventive copy before pop + kwargs = copy.deepcopy(kwargs) + qtype = kwargs["queue"].pop("qtype") + + return d[qtype](**kwargs) + + +class QScriptTemplate(string.Template): + delimiter = '$$' + + +class QueueAdapterError(Exception): + """Base Error class for exceptions raise by QueueAdapter.""" + + +class MaxNumLaunchesError(QueueAdapterError): + """Raised by `submit_to_queue` if we try to submit more than `max_num_launches` times.""" + + +class QueueAdapter(MSONable, metaclass=abc.ABCMeta): + """ + The `QueueAdapter` is responsible for all interactions with a specific queue management system. + This includes handling all details of queue script format as well as queue submission and management. + + This is the **abstract** base class defining the methods that must be implemented by the concrete classes. + Concrete classes should extend this class with implementations that work on specific queue systems. + + .. note:: + + A `QueueAdapter` has a handler (:class:`QueueJob`) defined in qjobs.py that allows one + to contact the resource manager to get info about the status of the job. + Each concrete implementation of `QueueAdapter` should have a corresponding `QueueJob`. + """ + Error = QueueAdapterError + + MaxNumLaunchesError = MaxNumLaunchesError + + @classmethod + def all_qtypes(cls): + """Return sorted list with all qtypes supported.""" + return sorted([subcls.QTYPE for subcls in all_subclasses(cls)]) + + @classmethod + def autodoc(cls): + return """ +# Dictionary with info on the hardware available on this queue. +hardware: + num_nodes: # Number of nodes available on this queue (integer, MANDATORY). + sockets_per_node: # Number of sockets per node (integer, MANDATORY). + cores_per_socket: # Number of cores per socket (integer, MANDATORY). + # The total number of cores available on this queue is + # `num_nodes * sockets_per_node * cores_per_socket`. + +# Dictionary with the options used to prepare the enviroment before submitting the job +job: + setup: # List of commands (strings) executed before running (DEFAULT: empty) + omp_env: # Dictionary with OpenMP environment variables (DEFAULT: empty i.e. no OpenMP) + modules: # List of modules to be imported before running the code (DEFAULT: empty). + # NB: Error messages produced by module load are redirected to mods.err + shell_env: # Dictionary with shell environment variables. + mpi_runner: # MPI runner. Possible values in ["mpirun", "mpiexec", "srun", None] + # DEFAULT: None i.e. no mpirunner is used. + mpi_runner_options # String with optional options passed to the `mpi_runner` e.g. "--bind-to None" + shell_runner: # Used for running small sequential jobs on the front-end. Set it to None + # if mpirun or mpiexec are not available on the fron-end. If not + # given, small sequential jobs are executed with `mpi_runner`. + shell_runner_options # Similar to mpi_runner_options but for the runner used on the front-end. + pre_run: # List of commands (strings) executed before the run (DEFAULT: empty) + post_run: # List of commands (strings) executed after the run (DEFAULT: empty) + +# dictionary with the name of the queue and optional parameters +# used to build/customize the header of the submission script. +queue: + qtype: # String defining the qapapter type e.g. slurm, shell ... + qname: # Name of the submission queue (string, MANDATORY) + qparams: # Dictionary with values used to generate the header of the job script + # We use the *normalized* version of the options i.e dashes in the official name + # are replaced by underscores e.g. ``--mail-type`` becomes ``mail_type`` + # See pymatgen.io.abinit.qadapters.py for the list of supported values. + # Use ``qverbatim`` to pass additional options that are not included in the template. + +# dictionary with the constraints that must be fulfilled in order to run on this queue. +limits: + min_cores: # Minimum number of cores (integer, DEFAULT: 1) + max_cores: # Maximum number of cores (integer, MANDATORY). Hard limit to hint_cores: + # it's the limit beyond which the scheduler will not accept the job (MANDATORY). + hint_cores: # The limit used in the initial setup of jobs. + # Fix_Critical method may increase this number until max_cores is reached + min_mem_per_proc: # Minimum memory per MPI process in Mb, units can be specified e.g. 1.4 Gb + # (DEFAULT: hardware.mem_per_core) + max_mem_per_proc: # Maximum memory per MPI process in Mb, units can be specified e.g. `1.4Gb` + # (DEFAULT: hardware.mem_per_node) + timelimit: # Initial time-limit. Accepts time according to slurm-syntax i.e: + # "days-hours" or "days-hours:minutes" or "days-hours:minutes:seconds" or + # "minutes" or "minutes:seconds" or "hours:minutes:seconds", + timelimit_hard: # The hard time-limit for this queue. Same format as timelimit. + # Error handlers could try to submit jobs with increased timelimit + # up to timelimit_hard. If not specified, timelimit_hard == timelimit + condition: # MongoDB-like condition (DEFAULT: empty, i.e. not used) + allocation: # String defining the policy used to select the optimal number of CPUs. + # possible values are in ["nodes", "force_nodes", "shared"] + # "nodes" means that we should try to allocate entire nodes if possible. + # This is a soft limit, in the sense that the qadapter may use a configuration + # that does not fulfill this requirement. In case of failure, it will try to use the + # smallest number of nodes compatible with the optimal configuration. + # Use `force_nodes` to enfore entire nodes allocation. + # `shared` mode does not enforce any constraint (DEFAULT: shared). + max_num_launches: # Limit to the number of times a specific task can be restarted (integer, DEFAULT: 5) +""" + + def __init__(self, **kwargs): + """ + Args: + qname: Name of the queue. + qparams: Dictionary with the parameters used in the template. + setup: String or list of commands to execute during the initial setup. + modules: String or list of modules to load before running the application. + shell_env: Dictionary with the environment variables to export before running the application. + omp_env: Dictionary with the OpenMP variables. + pre_run: String or list of commands to execute before launching the calculation. + post_run: String or list of commands to execute once the calculation is completed. + mpi_runner: Path to the MPI runner or :class:`MpiRunner` instance. None if not used + mpi_runner_options: Optional string with options passed to the mpi_runner. + max_num_launches: Maximum number of submissions that can be done for a specific task. Defaults to 5 + qverbatim: + min_cores, max_cores, hint_cores: Minimum, maximum, and hint limits of number of cores that can be used + min_mem_per_proc=Minimum memory per process in megabytes. + max_mem_per_proc=Maximum memory per process in megabytes. + timelimit: initial time limit in seconds + timelimit_hard: hard limelimit for this queue + priority: Priority level, integer number > 0 + condition: Condition object (dictionary) + + .. note:: + + priority is a non-negative integer used to order the qadapters. The :class:`TaskManager` will + try to run jobs on the qadapter with the highest priority if possible + """ + # TODO + #task_classes + + # Make defensive copies so that we can change the values at runtime. + kwargs = copy.deepcopy(kwargs) + self.priority = int(kwargs.pop("priority")) + + self.hw = Hardware(**kwargs.pop("hardware")) + self._parse_queue(kwargs.pop("queue")) + self._parse_limits(kwargs.pop("limits")) + self._parse_job(kwargs.pop("job")) + + self.set_master_mem_overhead(kwargs.pop("master_mem_overhead", 0)) + + # List of dictionaries with the parameters used to submit jobs + # The launcher will use this information to increase the resources + self.launches = [] + + if kwargs: + raise ValueError("Found unknown keywords:\n%s" % list(kwargs.keys())) + + self.validate_qparams() + + # Initialize some values from the info reported in the partition. + self.set_mpi_procs(self.min_cores) + self.set_mem_per_proc(self.min_mem_per_proc) + + # Final consistency check. + self.validate_qparams() + + def as_dict(self): + """ + Provides a simple though not complete dict serialization of the object (OMP missing, not all limits are + kept in the dictionary, ... other things to be checked) + + Raise: + `ValueError` if errors. + """ + if self.has_omp: + raise NotImplementedError('as_dict method of QueueAdapter not yet implemented when OpenMP is activated') + return {'@module': self.__class__.__module__, + '@class': self.__class__.__name__, + 'priority': self.priority, + 'hardware': self.hw.as_dict(), + 'queue': {'qtype': self.QTYPE, + 'qname': self._qname, + 'qnodes': self.qnodes, + 'qparams': self._qparams}, + 'limits': {'timelimit_hard': self._timelimit_hard, + 'timelimit': self._timelimit, + 'min_cores': self.min_cores, + 'max_cores': self.max_cores, + 'min_mem_per_proc': self.min_mem_per_proc, + 'max_mem_per_proc': self.max_mem_per_proc, + 'memory_policy': self.memory_policy + }, + 'job': {}, + 'mpi_procs': self._mpi_procs, + 'mem_per_proc': self._mem_per_proc, + 'master_mem_overhead': self._master_mem_overhead + } + + @classmethod + def from_dict(cls, dd): + priority = dd.pop('priority') + hardware = dd.pop('hardware') + queue = dd.pop('queue') + limits = dd.pop('limits') + job = dd.pop('job') + qa = make_qadapter(priority=priority, hardware=hardware, queue=queue, limits=limits, job=job) + qa.set_mpi_procs(dd.pop('mpi_procs')) + qa.set_mem_per_proc(dd.pop('mem_per_proc')) + qa.set_master_mem_overhead(dd.pop('master_mem_overhead', 0)) + timelimit = dd.pop('timelimit', None) + if timelimit is not None: + qa.set_timelimit(timelimit=timelimit) + dd.pop('@module', None) + dd.pop('@class', None) + if dd: + raise ValueError("Found unknown keywords:\n%s" % list(dd.keys())) + return qa + + def validate_qparams(self): + """ + Check if the keys specified by the user in qparams are supported. + + Raise: + `ValueError` if errors. + """ + # No validation for ShellAdapter. + if isinstance(self, ShellAdapter): return + + # Parse the template so that we know the list of supported options. + err_msg = "" + for param in self.qparams: + if param not in self.supported_qparams: + err_msg += "Unsupported QUEUE parameter name %s\n" % param + err_msg += "Supported parameters:\n" + for param_sup in self.supported_qparams: + err_msg += " %s \n" % param_sup + + if err_msg: + raise ValueError(err_msg) + + def _parse_limits(self, d): + # Time limits. + self.set_timelimit(qu.timelimit_parser(d.pop("timelimit"))) + tl_hard = d.pop("timelimit_hard",None) + tl_hard = qu.timelimit_parser(tl_hard) if tl_hard is not None else self.timelimit + self.set_timelimit_hard(tl_hard) + + # Cores + self.min_cores = int(d.pop("min_cores", 1)) + self.max_cores = int(d.pop("max_cores")) + self.hint_cores = int(d.pop("hint_cores", self.max_cores)) + self.memory_policy = d.pop("memory_policy", "mem") + if self.min_cores > self.max_cores: + raise ValueError("min_cores %s cannot be greater than max_cores %s" % (self.min_cores, self.max_cores)) + + # Memory + # FIXME: Neeed because autoparal 1 with paral_kgb 1 is not able to estimate memory + self.min_mem_per_proc = qu.any2mb(d.pop("min_mem_per_proc", self.hw.mem_per_core)) + self.max_mem_per_proc = qu.any2mb(d.pop("max_mem_per_proc", self.hw.mem_per_node)) + + # Misc + self.max_num_launches = int(d.pop("max_num_launches", 5)) + self.condition = Condition(d.pop("condition", {})) + self.allocation = d.pop("allocation", "shared") + if self.allocation not in ("nodes", "force_nodes", "shared"): + raise ValueError("Wrong value for `allocation` option") + + if d: + raise ValueError("Found unknown keyword(s) in limits section:\n %s" % list(d.keys())) + + def _parse_job(self, d): + setup = d.pop("setup", None) + if is_string(setup): setup = [setup] + self.setup = setup[:] if setup is not None else [] + + omp_env = d.pop("omp_env", None) + self.omp_env = omp_env.copy() if omp_env is not None else {} + + modules = d.pop("modules", None) + if is_string(modules): modules = [modules] + self.modules = modules[:] if modules is not None else [] + + shell_env = d.pop("shell_env", None) + self.shell_env = shell_env.copy() if shell_env is not None else {} + + mpi_options = d.pop("mpi_runner_options", "") + self.mpi_runner = d.pop("mpi_runner", None) + if not isinstance(self.mpi_runner, MpiRunner): + self.mpi_runner = MpiRunner(self.mpi_runner, options=mpi_options) + + self.shell_runner = d.pop("shell_runner", None) + shell_runner_options = d.pop("shell_runner_options", "") + if self.shell_runner is not None: + self.shell_runner = MpiRunner(self.shell_runner, options=shell_runner_options) + + pre_run = d.pop("pre_run", None) + if is_string(pre_run): pre_run = [pre_run] + self.pre_run = pre_run[:] if pre_run is not None else [] + + post_run = d.pop("post_run", None) + if is_string(post_run): post_run = [post_run] + self.post_run = post_run[:] if post_run is not None else [] + + if d: + raise ValueError("Found unknown keyword(s) in job section:\n %s" % list(d.keys())) + + def _parse_queue(self, d): + # Init params + qparams = d.pop("qparams", None) + self._qparams = copy.deepcopy(qparams) if qparams is not None else {} + + self.set_qname(d.pop("qname", "")) + self.qnodes = d.pop("qnodes", "standard") + if self.qnodes not in ["standard", "shared", "exclusive"]: + raise ValueError("Nodes must be either in standard, shared or exclusive mode " + "while qnodes parameter was {}".format(self.qnodes)) + if d: + raise ValueError("Found unknown keyword(s) in queue section:\n %s" % list(d.keys())) + + def __str__(self): + lines = ["%s:%s" % (self.__class__.__name__, self.qname)] + app = lines.append + app("Hardware:\n" + str(self.hw)) + #lines.extend(["qparams:\n", str(self.qparams)]) + if self.has_omp: app(str(self.omp_env)) + + return "\n".join(lines) + + @property + def qparams(self): + """Dictionary with the parameters used to construct the header.""" + return self._qparams + + @lazy_property + def supported_qparams(self): + """ + Dictionary with the supported parameters that can be passed to the + queue manager (obtained by parsing QTEMPLATE). + """ + import re + return re.findall(r"\$\$\{(\w+)\}", self.QTEMPLATE) + + @property + def has_mpi(self): + """True if we are using MPI""" + return bool(self.mpi_runner) + + @property + def has_omp(self): + """True if we are using OpenMP threads""" + return hasattr(self, "omp_env") and bool(getattr(self, "omp_env")) + + @property + def num_cores(self): + """Total number of cores employed""" + return self.mpi_procs * self.omp_threads + + @property + def omp_threads(self): + """Number of OpenMP threads.""" + if self.has_omp: + return self.omp_env["OMP_NUM_THREADS"] + else: + return 1 + + @property + def pure_mpi(self): + """True if only MPI is used.""" + return self.has_mpi and not self.has_omp + + @property + def pure_omp(self): + """True if only OpenMP is used.""" + return self.has_omp and not self.has_mpi + + @property + def hybrid_mpi_omp(self): + """True if we are running in MPI+Openmp mode.""" + return self.has_omp and self.has_mpi + + @property + def run_info(self): + """String with info on the run.""" + return "MPI: %d, OMP: %d" % (self.mpi_procs, self.omp_threads) + + def deepcopy(self): + """Deep copy of the object.""" + return copy.deepcopy(self) + + def record_launch(self, queue_id): # retcode): + """Save submission""" + self.launches.append( + AttrDict(queue_id=queue_id, mpi_procs=self.mpi_procs, omp_threads=self.omp_threads, + mem_per_proc=self.mem_per_proc, timelimit=self.timelimit)) + return len(self.launches) + + def remove_launch(self, index): + """Remove launch with the given index.""" + self.launches.pop(index) + + @property + def num_launches(self): + """Number of submission tried with this adapter so far.""" + return len(self.launches) + + @property + def last_launch(self): + """Return the last launch.""" + if len(self.launches) > 0: + return self.launches[-1] + else: + return None + + def validate(self): + """Validate the parameters of the run. Raises self.Error if invalid parameters.""" + errors = [] + app = errors.append + + if not self.hint_cores >= self.mpi_procs * self.omp_threads >= self.min_cores: + app("self.hint_cores >= mpi_procs * omp_threads >= self.min_cores not satisfied") + + if self.omp_threads > self.hw.cores_per_node: + app("omp_threads > hw.cores_per_node") + + if self.mem_per_proc > self.hw.mem_per_node: + app("mem_mb >= self.hw.mem_per_node") + + if not self.max_mem_per_proc >= self.mem_per_proc >= self.min_mem_per_proc: + app("self.max_mem_per_proc >= mem_mb >= self.min_mem_per_proc not satisfied") + + if self.priority <= 0: + app("priority must be > 0") + + if not (1 <= self.min_cores <= self.hw.num_cores >= self.hint_cores): + app("1 <= min_cores <= hardware num_cores >= hint_cores not satisfied") + + if errors: + raise self.Error(str(self) + "\n".join(errors)) + + def set_omp_threads(self, omp_threads): + """Set the number of OpenMP threads.""" + self.omp_env["OMP_NUM_THREADS"] = omp_threads + + @property + def mpi_procs(self): + """Number of CPUs used for MPI.""" + return self._mpi_procs + + def set_mpi_procs(self, mpi_procs): + """Set the number of MPI processes to mpi_procs""" + self._mpi_procs = mpi_procs + + @property + def qname(self): + """The name of the queue.""" + return self._qname + + def set_qname(self, qname): + """Set the name of the queue.""" + self._qname = qname + + # todo this assumes only one wall time. i.e. the one in the mananager file is the one always used. + # we should use the standard walltime to start with but also allow to increase the walltime + + @property + def timelimit(self): + """Returns the walltime in seconds.""" + return self._timelimit + + @property + def timelimit_hard(self): + """Returns the walltime in seconds.""" + return self._timelimit_hard + + def set_timelimit(self, timelimit): + """Set the start walltime in seconds, fix method may increase this one until timelimit_hard is reached.""" + self._timelimit = timelimit + + def set_timelimit_hard(self, timelimit_hard): + """Set the maximal possible walltime in seconds.""" + self._timelimit_hard = timelimit_hard + + @property + def mem_per_proc(self): + """The memory per process in megabytes.""" + return self._mem_per_proc + + @property + def master_mem_overhead(self): + """The memory overhead for the master process in megabytes.""" + return self._master_mem_overhead + + def set_mem_per_proc(self, mem_mb): + """ + Set the memory per process in megabytes. If mem_mb <=0, min_mem_per_proc is used. + """ + # Hack needed because abinit is still not able to estimate memory. + # COMMENTED by David. + # This is not needed anymore here because the "hack" is performed directly in select_qadapter/_use_qadpos_pconf + # methods of TaskManager. Moreover, this hack should be performed somewhere else (this part should be + # independent of abinit ... and if we want to have less memory than the average memory available per node, we + # have to allow it!) + #if mem_mb <= self.min_mem_per_proc: mem_mb = self.min_mem_per_proc + self._mem_per_proc = int(mem_mb) + + def set_master_mem_overhead(self, mem_mb): + """ + Set the memory overhead for the master process in megabytes. + """ + if mem_mb < 0: + raise ValueError("Memory overhead for the master process should be >= 0") + self._master_mem_overhead = int(mem_mb) + + @property + def total_mem(self): + """Total memory required by the job in megabytes.""" + return Memory(self.mem_per_proc * self.mpi_procs + self.master_mem_overhead, "Mb") + + @abc.abstractmethod + def cancel(self, job_id): + """ + Cancel the job. + + Args: + job_id: Job identifier. + + Returns: + Exit status. + """ + + def can_run_pconf(self, pconf): + """True if the qadapter in principle is able to run the :class:`ParalConf` pconf""" + if not self.hint_cores >= pconf.num_cores >= self.min_cores: return False + if not self.hw.can_use_omp_threads(self.omp_threads): return False + if pconf.mem_per_proc > self.hw.mem_per_node: return False + if self.allocation == "force_nodes" and pconf.num_cores % self.hw.cores_per_node != 0: + return False + + return self.condition(pconf) + + def distribute(self, mpi_procs, omp_threads, mem_per_proc): + """ + Returns (num_nodes, mpi_per_node) + + Aggressive: When Open MPI thinks that it is in an exactly- or under-subscribed mode + (i.e., the number of running processes is equal to or less than the number of available processors), + MPI processes will automatically run in aggressive mode, meaning that they will never voluntarily give + up the processor to other processes. With some network transports, this means that Open MPI will spin + in tight loops attempting to make message passing progress, effectively causing other processes to not get + any CPU cycles (and therefore never make any progress) + """ + class Distrib(namedtuple("Distrib", "num_nodes mpi_per_node exact")): + pass + #@property + #def mem_per_node + # return self.mpi_per_node * mem_per_proc + #def set_nodes(self, nodes): + + hw = self.hw + + # TODO: Add check on user-memory + if mem_per_proc <= 0: + logger.warning("mem_per_proc <= 0") + mem_per_proc = hw.mem_per_core + + if mem_per_proc > hw.mem_per_node: + raise self.Error( + "mem_per_proc > mem_per_node.\n Cannot distribute mpi_procs %d, omp_threads %d, mem_per_proc %s" % + (mpi_procs, omp_threads, mem_per_proc)) + + # Try to use all then cores in the node. + num_nodes, rest_cores = hw.divmod_node(mpi_procs, omp_threads) + + if num_nodes == 0 and mpi_procs * mem_per_proc <= hw.mem_per_node: + # One node is enough + return Distrib(num_nodes=1, mpi_per_node=mpi_procs, exact=True) + + if num_nodes == 0: num_nodes = 2 + mpi_per_node = mpi_procs // num_nodes + if mpi_per_node * mem_per_proc <= hw.mem_per_node and rest_cores == 0: + # Commensurate with nodes. + return Distrib(num_nodes=num_nodes, mpi_per_node=mpi_per_node, exact=True) + + #if mode == "block", "cyclic" + + # Try first to pack MPI processors in a node as much as possible + mpi_per_node = int(hw.mem_per_node / mem_per_proc) + assert mpi_per_node != 0 + num_nodes = (mpi_procs * omp_threads) // mpi_per_node + print("exact --> false", num_nodes, mpi_per_node) + + if mpi_per_node * omp_threads <= hw.cores_per_node and mem_per_proc <= hw.mem_per_node: + return Distrib(num_nodes=num_nodes, mpi_per_node=mpi_per_node, exact=False) + + if (mpi_procs * omp_threads) % mpi_per_node != 0: + # Have to reduce the number of MPI procs per node + for mpi_per_node in reversed(range(1, mpi_per_node)): + if mpi_per_node > hw.cores_per_node: continue + num_nodes = (mpi_procs * omp_threads) // mpi_per_node + if (mpi_procs * omp_threads) % mpi_per_node == 0 and mpi_per_node * mem_per_proc <= hw.mem_per_node: + return Distrib(num_nodes=num_nodes, mpi_per_node=mpi_per_node, exact=False) + else: + raise self.Error("Cannot distribute mpi_procs %d, omp_threads %d, mem_per_proc %s" % + (mpi_procs, omp_threads, mem_per_proc)) + + def optimize_params(self, qnodes=None): + """ + This method is called in get_subs_dict. Return a dict with parameters to be added to qparams + Subclasses may provide a specialized version. + """ + #logger.debug("optimize_params of baseclass --> no optimization available!!!") + return {} + + def get_subs_dict(self, qnodes=None): + """ + Return substitution dict for replacements into the template + Subclasses may want to customize this method. + """ + #d = self.qparams.copy() + d = self.qparams + d.update(self.optimize_params(qnodes=qnodes)) + # clean null values + subs_dict = {k: v for k, v in d.items() if v is not None} + #print("subs_dict:", subs_dict) + return subs_dict + + def _make_qheader(self, job_name, qout_path, qerr_path): + """Return a string with the options that are passed to the resource manager.""" + # get substitution dict for replacements into the template + subs_dict = self.get_subs_dict() + + # Set job_name and the names for the stderr and stdout of the + # queue manager (note the use of the extensions .qout and .qerr + # so that we can easily locate this file. + subs_dict['job_name'] = job_name.replace('/', '_') + subs_dict['_qout_path'] = qout_path + subs_dict['_qerr_path'] = qerr_path + + qtemplate = QScriptTemplate(self.QTEMPLATE) + # might contain unused parameters as leftover $$. + unclean_template = qtemplate.safe_substitute(subs_dict) + + # Remove lines with leftover $$. + clean_template = [] + for line in unclean_template.split('\n'): + if '$$' not in line: + clean_template.append(line) + + return '\n'.join(clean_template) + + def get_script_str(self, job_name, launch_dir, executable, qout_path, qerr_path, + stdin=None, stdout=None, stderr=None, exec_args=None): + """ + Returns a (multi-line) String representing the queue script, e.g. PBS script. + Uses the template_file along with internal parameters to create the script. + + Args: + job_name: Name of the job. + launch_dir: (str) The directory the job will be launched in. + executable: String with the name of the executable to be executed or list of commands + qout_path Path of the Queue manager output file. + qerr_path: Path of the Queue manager error file. + exec_args: List of arguments passed to executable (used only if executable is a string, default: empty) + """ + # PbsPro does not accept job_names longer than 15 chars. + if len(job_name) > 14 and isinstance(self, PbsProAdapter): + job_name = job_name[:14] + + # Construct the header for the Queue Manager. + qheader = self._make_qheader(job_name, qout_path, qerr_path) + + # Add the bash section. + se = ScriptEditor() + + # Cd to launch_dir immediately. + se.add_line("cd " + os.path.abspath(launch_dir)) + + if self.setup: + se.add_comment("Setup section") + se.add_lines(self.setup) + se.add_emptyline() + + if self.modules: + # stderr is redirected to mods.err file. + # module load 2>> mods.err + se.add_comment("Load Modules") + se.add_line("module purge") + se.load_modules(self.modules) + se.add_emptyline() + + se.add_comment("OpenMp Environment") + if self.has_omp: + se.declare_vars(self.omp_env) + se.add_emptyline() + else: + se.declare_vars({"OMP_NUM_THREADS": 1}) + + if self.shell_env: + se.add_comment("Shell Environment") + se.declare_vars(self.shell_env) + se.add_emptyline() + + if self.pre_run: + se.add_comment("Commands before execution") + se.add_lines(self.pre_run) + se.add_emptyline() + + # Construct the string to run the executable with MPI and mpi_procs. + if is_string(executable): + line = self.mpi_runner.string_to_run(self, executable, + stdin=stdin, stdout=stdout, stderr=stderr, exec_args=exec_args) + se.add_line(line) + else: + assert isinstance(executable, (list, tuple)) + se.add_lines(executable) + + if self.post_run: + se.add_emptyline() + se.add_comment("Commands after execution") + se.add_lines(self.post_run) + + return qheader + se.get_script_str() + "\n" + + def submit_to_queue(self, script_file): + """ + Public API: wraps the concrete implementation _submit_to_queue + + Raises: + `self.MaxNumLaunchesError` if we have already tried to submit the job max_num_launches + `self.Error` if generic error + """ + if not os.path.exists(script_file): + raise self.Error('Cannot find script file located at: {}'.format(script_file)) + + if self.num_launches == self.max_num_launches: + raise self.MaxNumLaunchesError("num_launches %s == max_num_launches %s" % (self.num_launches, self.max_num_launches)) + + # Call the concrete implementation. + s = self._submit_to_queue(script_file) + self.record_launch(s.qid) + + if s.qid is None: + raise self.Error("Error in job submission with %s. file %s \n" % + (self.__class__.__name__, script_file) + + "The error response reads:\n %s \n " % s.err + + "The out response reads:\n %s \n" % s.out) + + # Here we create a concrete instance of QueueJob + return QueueJob.from_qtype_and_id(self.QTYPE, s.qid, self.qname), s.process + + @abc.abstractmethod + def _submit_to_queue(self, script_file): + """ + Submits the job to the queue, probably using subprocess or shutil + This method must be provided by the concrete classes and will be called by submit_to_queue + + Args: + script_file: (str) name of the script file to use (String) + + Returns: + queue_id, process + """ + + def get_njobs_in_queue(self, username=None): + """ + returns the number of jobs in the queue, probably using subprocess or shutil to + call a command like 'qstat'. returns None when the number of jobs cannot be determined. + + Args: + username: (str) the username of the jobs to count (default is to autodetect) + """ + if username is None: username = getpass.getuser() + njobs, process = self._get_njobs_in_queue(username=username) + + if process is not None and process.returncode != 0: + # there's a problem talking to squeue server? + err_msg = ('Error trying to get the number of jobs in the queue' + + 'The error response reads:\n {}'.format(process.stderr.read())) + logger.critical(err_msg) + + if not isinstance(self, ShellAdapter): + logger.info('The number of jobs currently in the queue is: {}'.format(njobs)) + + return njobs + + @abc.abstractmethod + def _get_njobs_in_queue(self, username): + """ + Concrete Subclasses must implement this method. Return (njobs, process) + """ + + # Methods to fix problems + def add_exclude_nodes(self, nodes): + return _EXCL_NODES_FILE.add_nodes(self.qname, nodes) + + def get_exclude_nodes(self): + return _EXCL_NODES_FILE.read_nodes(self.qname) + + @abc.abstractmethod + def exclude_nodes(self, nodes): + """Method to exclude nodes in the calculation. Return True if nodes have been excluded""" + + def more_mem_per_proc(self, factor=1): + """ + Method to increase the amount of memory asked for, by factor. + Return: new memory if success, 0 if memory cannot be increased. + """ + base_increase = 2000 + old_mem = self.mem_per_proc + new_mem = old_mem + factor*base_increase + + if new_mem < self.hw.mem_per_node: + self.set_mem_per_proc(new_mem) + return new_mem + + raise self.Error('could not increase mem_per_proc further') + + def more_master_mem_overhead(self, mem_increase_mb=1000): + """ + Method to increase the amount of memory overheaded asked for the master node. + Return: new master memory overhead if success, 0 if it cannot be increased. + """ + old_master_mem_overhead = self.master_mem_overhead + new_master_mem_overhead = old_master_mem_overhead + mem_increase_mb + if new_master_mem_overhead + self.mem_per_proc < self.hw.mem_per_node: + self.set_master_mem_overhead(new_master_mem_overhead) + return new_master_mem_overhead + + raise self.Error('could not increase master_mem_overhead further') + + def more_cores(self, factor=1): + """ + Method to increase the number of MPI procs. + Return: new number of processors if success, 0 if processors cannot be increased. + """ + # TODO : find a formula that works for all max_cores + if self.max_cores > 40: + base_increase = 4 * int(self.max_cores / 40) + else: + base_increase = 4 + + new_cores = self.hint_cores + factor * base_increase + + if new_cores < self.max_cores: + self.hint_cores = new_cores + return new_cores + + raise self.Error('%s hint_cores reached limit on max_core %s' % (new_cores, self.max_cores)) + + def more_time(self, factor=1): + """ + Method to increase the wall time + """ + base_increase = int(self.timelimit_hard / 10) + + new_time = self.timelimit + base_increase*factor + print('qadapter: trying to increase time') + if new_time < self.timelimit_hard: + self.set_timelimit(new_time) + print('new time set: ', new_time) + return new_time + + self.priority = -1 + + raise self.Error("increasing time is not possible, the hard limit has been reached") + +#################### +# Concrete classes # +#################### + + +class ShellAdapter(QueueAdapter): + """Simple Adapter used to submit runs through the shell.""" + QTYPE = "shell" + + QTEMPLATE = """\ +#!/bin/bash +$${qverbatim} +""" + + def cancel(self, job_id): + return os.system("kill -9 %d" % job_id) + + def _submit_to_queue(self, script_file): + # submit the job, return process and pid. + process = Popen(("/bin/bash", script_file), stderr=PIPE) + return SubmitResults(qid=process.pid, out='no out in shell submission', err='no err in shell submission', process=process) + + def _get_njobs_in_queue(self, username): + return None, None + + def exclude_nodes(self, nodes): + return False + + +class SlurmAdapter(QueueAdapter): + """Adapter for SLURM.""" + QTYPE = "slurm" + + QTEMPLATE = """\ +#!/bin/bash + +#SBATCH --partition=$${partition} +#SBATCH --job-name=$${job_name} +#SBATCH --nodes=$${nodes} +#SBATCH --total_tasks=$${total_tasks} +#SBATCH --ntasks=$${ntasks} +#SBATCH --ntasks-per-node=$${ntasks_per_node} +#SBATCH --cpus-per-task=$${cpus_per_task} +#####SBATCH --mem=$${mem} +#SBATCH --mem-per-cpu=$${mem_per_cpu} +#SBATCH --hint=$${hint} +#SBATCH --time=$${time} +#SBATCH --exclude=$${exclude_nodes} +#SBATCH --account=$${account} +#SBATCH --mail-user=$${mail_user} +#SBATCH --mail-type=$${mail_type} +#SBATCH --constraint=$${constraint} +#SBATCH --gres=$${gres} +#SBATCH --requeue=$${requeue} +#SBATCH --nodelist=$${nodelist} +#SBATCH --propagate=$${propagate} +#SBATCH --licenses=$${licenses} +#SBATCH --output=$${_qout_path} +#SBATCH --error=$${_qerr_path} +#SBATCH --qos=$${qos} +$${qverbatim} +""" + + def set_qname(self, qname): + super().set_qname(qname) + if qname: + self.qparams["partition"] = qname + + def set_mpi_procs(self, mpi_procs): + """Set the number of CPUs used for MPI.""" + super().set_mpi_procs(mpi_procs) + self.qparams["ntasks"] = mpi_procs + + def set_omp_threads(self, omp_threads): + super().set_omp_threads(omp_threads) + self.qparams["cpus_per_task"] = omp_threads + + def set_mem_per_proc(self, mem_mb): + """Set the memory per process in megabytes""" + super().set_mem_per_proc(mem_mb) + self.qparams["mem_per_cpu"] = self.mem_per_proc + # Remove mem if it's defined. + #self.qparams.pop("mem", None) + + def set_timelimit(self, timelimit): + super().set_timelimit(timelimit) + self.qparams["time"] = qu.time2slurm(timelimit) + + def cancel(self, job_id): + return os.system("scancel %d" % job_id) + + def optimize_params(self, qnodes=None): + params = {} + if self.allocation == "nodes": + # run on the smallest number of nodes compatible with the configuration + params["nodes"] = max(int(math.ceil(self.mpi_procs / self.hw.cores_per_node)), + int(math.ceil(self.total_mem / self.hw.mem_per_node))) + return params + + #dist = self.distribute(self.mpi_procs, self.omp_threads, self.mem_per_proc) + ##print(dist) + + #if False and dist.exact: + # # Can optimize parameters + # self.qparams["nodes"] = dist.num_nodes + # self.qparams.pop("ntasks", None) + # self.qparams["ntasks_per_node"] = dist.mpi_per_node + # self.qparams["cpus_per_task"] = self.omp_threads + # self.qparams["mem"] = dist.mpi_per_node * self.mem_per_proc + # self.qparams.pop("mem_per_cpu", None) + #else: + # # Delegate to slurm. + # self.qparams["ntasks"] = self.mpi_procs + # self.qparams.pop("nodes", None) + # self.qparams.pop("ntasks_per_node", None) + # self.qparams["cpus_per_task"] = self.omp_threads + # self.qparams["mem_per_cpu"] = self.mem_per_proc + # self.qparams.pop("mem", None) + #return {} + + def _submit_to_queue(self, script_file): + """Submit a job script to the queue.""" + if sys.version_info[0] < 3: + process = Popen(['sbatch', script_file], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['sbatch', script_file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + + # grab the returncode. SLURM returns 0 if the job was successful + queue_id = None + if process.returncode == 0: + try: + # output should of the form '2561553.sdb' or '352353.jessup' - just grab the first part for job id + queue_id = int(out.split()[3]) + logger.info('Job submission was successful and queue_id is {}'.format(queue_id)) + except Exception: + # probably error parsing job code + logger.critical('Could not parse job id following slurm...') + return SubmitResults(qid=queue_id, out=out, err=err, process=process) + + def exclude_nodes(self, nodes): + try: + if 'exclude_nodes' not in self.qparams: + self.qparams.update({'exclude_nodes': 'node' + nodes[0]}) + print('excluded node %s' % nodes[0]) + + for node in nodes[1:]: + self.qparams['exclude_nodes'] += ',node' + node + print('excluded node %s' % node) + + return True + + except (KeyError, IndexError): + raise self.Error('qadapter failed to exclude nodes') + + def _get_njobs_in_queue(self, username): + if sys.version_info[0] < 3: + process = Popen(['squeue', '-o "%u"', '-u', username], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['squeue', '-o "%u"', '-u', username], stdout=PIPE, stderr=PIPE, + universal_newlines=True) + + out, err = process.communicate() + njobs = None + if process.returncode == 0: + # parse the result. lines should have this form: + # username + # count lines that include the username in it + outs = out.splitlines() + njobs = len([line.split() for line in outs if username in line]) + + return njobs, process + + +class PbsProAdapter(QueueAdapter): + """Adapter for PbsPro""" + QTYPE = "pbspro" + +#PBS -l select=$${select}:ncpus=$${ncpus}:mem=$${mem}mb:mpiprocs=$${mpiprocs}:ompthreads=$${ompthreads} +#PBS -l select=$${select}:ncpus=1:mem=$${mem}mb:mpiprocs=1:ompthreads=$${ompthreads} + + QTEMPLATE = """\ +#!/bin/bash + +#PBS -q $${queue} +#PBS -N $${job_name} +#PBS -A $${account} +#PBS -l select=$${select} +#PBS -l walltime=$${walltime} +#PBS -l model=$${model} +#PBS -l place=$${place} +#PBS -W group_list=$${group_list} +#PBS -M $${mail_user} +#PBS -m $${mail_type} +#PBS -o $${_qout_path} +#PBS -e $${_qerr_path} +$${qverbatim} +""" + + def set_qname(self, qname): + super().set_qname(qname) + if qname: + self.qparams["queue"] = qname + + def set_timelimit(self, timelimit): + super().set_timelimit(timelimit) + self.qparams["walltime"] = qu.time2pbspro(timelimit) + + def set_mem_per_proc(self, mem_mb): + """Set the memory per process in megabytes""" + super().set_mem_per_proc(mem_mb) + #self.qparams["mem"] = self.mem_per_proc + + def cancel(self, job_id): + return os.system("qdel %d" % job_id) + + def optimize_params(self, qnodes=None): + return {"select": self.get_select(qnodes=qnodes)} + + def get_select(self, ret_dict=False, qnodes=None, memory_policy=None): + """ + Select is not the most intuitive command. For more info see: + + * http://www.cardiff.ac.uk/arcca/services/equipment/User-Guide/pbs.html + * https://portal.ivec.org/docs/Supercomputers/PBS_Pro + """ + hw, mem_per_proc = self.hw, int(self.mem_per_proc) + #dist = self.distribute(self.mpi_procs, self.omp_threads, mem_per_proc) + """ + if self.pure_mpi: + num_nodes, rest_cores = hw.divmod_node(self.mpi_procs, self.omp_threads) + + if num_nodes == 0: + logger.info("IN_CORE PURE MPI: %s" % self.run_info) + chunks = 1 + ncpus = rest_cores + mpiprocs = rest_cores + mem = mem_per_proc * ncpus + ompthreads = 1 + + elif rest_cores == 0: + # Can allocate entire nodes because self.mpi_procs is divisible by cores_per_node. + logger.info("PURE MPI run commensurate with cores_per_node %s" % self.run_info) + chunks = num_nodes + ncpus = hw.cores_per_node + mpiprocs = hw.cores_per_node + mem = ncpus * mem_per_proc + ompthreads = 1 + + else: + logger.info("OUT-OF-CORE PURE MPI (not commensurate with cores_per_node): %s" % self.run_info) + chunks = self.mpi_procs + ncpus = 1 + mpiprocs = 1 + mem = mem_per_proc + ompthreads = 1 + + elif self.pure_omp: + # Pure OMP run. + logger.info("PURE OPENMP run: %s" % self.run_info) + assert hw.can_use_omp_threads(self.omp_threads) + chunks = 1 + ncpus = self.omp_threads + mpiprocs = 1 + mem = mem_per_proc + ompthreads = self.omp_threads + + elif self.hybrid_mpi_omp: + assert hw.can_use_omp_threads(self.omp_threads) + num_nodes, rest_cores = hw.divmod_node(self.mpi_procs, self.omp_threads) + #print(num_nodes, rest_cores) + # TODO: test this + + if rest_cores == 0 or num_nodes == 0: + logger.info("HYBRID MPI-OPENMP run, perfectly divisible among nodes: %s" % self.run_info) + chunks = max(num_nodes, 1) + mpiprocs = self.mpi_procs // chunks + + chunks = chunks + ncpus = mpiprocs * self.omp_threads + mpiprocs = mpiprocs + mem = mpiprocs * mem_per_proc + ompthreads = self.omp_threads + + else: + logger.info("HYBRID MPI-OPENMP, NOT commensurate with nodes: %s" % self.run_info) + chunks=self.mpi_procs + ncpus=self.omp_threads + mpiprocs=1 + mem= mem_per_proc + ompthreads=self.omp_threads + + else: + raise RuntimeError("You should not be here") + """ + if memory_policy is None: + memory_policy = self.memory_policy + if qnodes is None: + qnodes = self.qnodes + else: + if qnodes not in ["standard", "shared", "exclusive"]: + raise ValueError("Nodes must be either in standard, shared or exclusive mode " + "while qnodes parameter was {}".format(self.qnodes)) + if qnodes == "standard": + return self._get_select_standard(ret_dict=ret_dict, memory_policy=memory_policy) + else: + return self._get_select_with_master_mem_overhead(ret_dict=ret_dict, qnodes=qnodes, + memory_policy=memory_policy) + + def _get_select_with_master_mem_overhead(self, ret_dict=False, qnodes=None, memory_policy='mem'): + if self.has_omp: + raise NotImplementedError("select with master mem overhead not yet implemented with has_omp") + if qnodes is None: + qnodes = self.qnodes + else: + if qnodes not in ["standard", "shared", "exclusive"]: + raise ValueError("Nodes must be either in standard, shared or exclusive mode " + "while qnodes parameter was {}".format(self.qnodes)) + if qnodes == "exclusive": + return self._get_select_with_master_mem_overhead_exclusive(ret_dict=ret_dict, memory_policy=memory_policy) + elif qnodes == "shared": + return self._get_select_with_master_mem_overhead_shared(ret_dict=ret_dict, memory_policy=memory_policy) + else: + raise ValueError("Wrong value of qnodes parameter : {}".format(self.qnodes)) + + def _get_select_with_master_mem_overhead_shared(self, ret_dict=False, memory_policy='mem'): + chunk_master, ncpus_master, vmem_master, mpiprocs_master = 1, 1, self.mem_per_proc+self.master_mem_overhead, 1 + if self.mpi_procs > 1: + chunks_slaves, ncpus_slaves, vmem_slaves, mpiprocs_slaves = self.mpi_procs - 1, 1, self.mem_per_proc, 1 + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, vmem_master=int(vmem_master), + chunks_slaves=chunks_slaves, ncpus_slaves=ncpus_slaves, + mpiprocs_slaves=mpiprocs_slaves, vmem_slaves=int(vmem_slaves)) + if memory_policy == 'vmem': + s = "{chunk_master}:ncpus={ncpus_master}:vmem={vmem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_slaves}:vmem={vmem_slaves}mb:" \ + "mpiprocs={mpiprocs_slaves}".format(**select_params) + elif memory_policy == 'mem': + s = "{chunk_master}:ncpus={ncpus_master}:mem={vmem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_slaves}:mem={vmem_slaves}mb:" \ + "mpiprocs={mpiprocs_slaves}".format(**select_params) + tot_ncpus = chunk_master*ncpus_master + chunks_slaves*ncpus_slaves + if tot_ncpus != self.mpi_procs: + raise ValueError('Total number of cpus is different from mpi_procs ...') + else: + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, vmem_master=int(vmem_master)) + if memory_policy == 'vmem': + s = "{chunk_master}:ncpus={ncpus_master}:vmem={vmem_master}mb:" \ + "mpiprocs={mpiprocs_master}".format(**select_params) + elif memory_policy == 'mem': + s = "{chunk_master}:ncpus={ncpus_master}:mem={vmem_master}mb:" \ + "mpiprocs={mpiprocs_master}".format(**select_params) + if ret_dict: + return s, select_params + return s + + def _get_select_with_master_mem_overhead_exclusive(self, ret_dict=False, memory_policy='mem'): + max_ncpus_master = min(self.hw.cores_per_node, + int((self.hw.mem_per_node-self.mem_per_proc-self.master_mem_overhead) + / self.mem_per_proc) + 1) + if max_ncpus_master >= self.mpi_procs: + chunk, ncpus, mem, mpiprocs = 1, self.mpi_procs, self.hw.mem_per_node, self.mpi_procs + if memory_policy == 'vmem': + select_params = AttrDict(chunks=chunk, ncpus=ncpus, mpiprocs=mpiprocs, vmem=int(mem)) + s = "{chunks}:ncpus={ncpus}:vmem={vmem}mb:mpiprocs={mpiprocs}".format(**select_params) + elif memory_policy == 'mem': + select_params = AttrDict(chunks=chunk, ncpus=ncpus, mpiprocs=mpiprocs, mem=int(mem)) + s = "{chunks}:ncpus={ncpus}:mem={mem}mb:mpiprocs={mpiprocs}".format(**select_params) + tot_ncpus = chunk*ncpus + else: + ncpus_left = self.mpi_procs-max_ncpus_master + max_ncpus_per_slave_node = min(self.hw.cores_per_node, int(self.hw.mem_per_node/self.mem_per_proc)) + nslaves_float = float(ncpus_left)/float(max_ncpus_per_slave_node) + ncpus_per_slave = max_ncpus_per_slave_node + mpiprocs_slaves = max_ncpus_per_slave_node + chunk_master = 1 + mem_slaves = self.hw.mem_per_node + explicit_last_slave = False + chunk_last_slave, ncpus_last_slave, mem_last_slave, mpiprocs_last_slave = None, None, None, None + if nslaves_float > int(nslaves_float): + chunks_slaves = int(nslaves_float) + 1 + pot_ncpus_all_slaves = chunks_slaves*ncpus_per_slave + if pot_ncpus_all_slaves >= self.mpi_procs-1: + explicit_last_slave = True + chunks_slaves = chunks_slaves-1 + chunk_last_slave = 1 + ncpus_master = 1 + ncpus_last_slave = self.mpi_procs - 1 - chunks_slaves*ncpus_per_slave + mem_last_slave = self.hw.mem_per_node + mpiprocs_last_slave = ncpus_last_slave + else: + ncpus_master = self.mpi_procs-pot_ncpus_all_slaves + if ncpus_master > max_ncpus_master: + raise ValueError('ncpus for the master node exceeds the maximum ncpus for the master ... this' + 'should not happen ...') + if ncpus_master < 1: + raise ValueError('ncpus for the master node is 0 ... this should not happen ...') + elif nslaves_float == int(nslaves_float): + chunks_slaves = int(nslaves_float) + ncpus_master = max_ncpus_master + else: + raise ValueError('nslaves_float < int(nslaves_float) ...') + mem_master, mpiprocs_master = self.hw.mem_per_node, ncpus_master + if explicit_last_slave: + if memory_policy == 'vmem': + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, vmem_master=int(mem_master), + chunks_slaves=chunks_slaves, ncpus_per_slave=ncpus_per_slave, + mpiprocs_slaves=mpiprocs_slaves, vmem_slaves=int(mem_slaves), + chunk_last_slave=chunk_last_slave, ncpus_last_slave=ncpus_last_slave, + vmem_last_slave=int(mem_last_slave), + mpiprocs_last_slave=mpiprocs_last_slave) + s = "{chunk_master}:ncpus={ncpus_master}:vmem={vmem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_per_slave}:vmem={vmem_slaves}mb:mpiprocs={mpiprocs_slaves}+" \ + "{chunk_last_slave}:ncpus={ncpus_last_slave}:vmem={vmem_last_slave}mb:" \ + "mpiprocs={mpiprocs_last_slave}".format(**select_params) + elif memory_policy == 'mem': + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, mem_master=int(mem_master), + chunks_slaves=chunks_slaves, ncpus_per_slave=ncpus_per_slave, + mpiprocs_slaves=mpiprocs_slaves, mem_slaves=int(mem_slaves), + chunk_last_slave=chunk_last_slave, ncpus_last_slave=ncpus_last_slave, + mem_last_slave=int(mem_last_slave), + mpiprocs_last_slave=mpiprocs_last_slave) + s = "{chunk_master}:ncpus={ncpus_master}:mem={mem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_per_slave}:mem={mem_slaves}mb:mpiprocs={mpiprocs_slaves}+" \ + "{chunk_last_slave}:ncpus={ncpus_last_slave}:mem={mem_last_slave}mb:" \ + "mpiprocs={mpiprocs_last_slave}".format(**select_params) + tot_ncpus = chunk_master*ncpus_master+chunks_slaves*ncpus_per_slave+chunk_last_slave*ncpus_last_slave + else: + if memory_policy == 'vmem': + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, vmem_master=int(mem_master), + chunks_slaves=chunks_slaves, ncpus_per_slave=ncpus_per_slave, + mpiprocs_slaves=mpiprocs_slaves, vmem_slaves=int(mem_slaves)) + s = "{chunk_master}:ncpus={ncpus_master}:vmem={vmem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_per_slave}:vmem={vmem_slaves}mb:" \ + "mpiprocs={mpiprocs_slaves}".format(**select_params) + elif memory_policy == 'mem': + select_params = AttrDict(chunk_master=chunk_master, ncpus_master=ncpus_master, + mpiprocs_master=mpiprocs_master, mem_master=int(mem_master), + chunks_slaves=chunks_slaves, ncpus_per_slave=ncpus_per_slave, + mpiprocs_slaves=mpiprocs_slaves, mem_slaves=int(mem_slaves)) + s = "{chunk_master}:ncpus={ncpus_master}:mem={mem_master}mb:mpiprocs={mpiprocs_master}+" \ + "{chunks_slaves}:ncpus={ncpus_per_slave}:mem={mem_slaves}mb:" \ + "mpiprocs={mpiprocs_slaves}".format(**select_params) + tot_ncpus = chunk_master*ncpus_master + chunks_slaves*ncpus_per_slave + + if tot_ncpus != self.mpi_procs: + raise ValueError('Total number of cpus is different from mpi_procs ...') + if ret_dict: + return s, select_params + return s + + def _get_select_standard(self, ret_dict=False, memory_policy='mem'): + if not self.has_omp: + chunks, ncpus, mem, mpiprocs = self.mpi_procs, 1, self.mem_per_proc, 1 + if memory_policy == 'vmem': + select_params = AttrDict(chunks=chunks, ncpus=ncpus, mpiprocs=mpiprocs, vmem=int(mem)) + s = "{chunks}:ncpus={ncpus}:vmem={vmem}mb:mpiprocs={mpiprocs}".format(**select_params) + elif memory_policy == 'mem': + select_params = AttrDict(chunks=chunks, ncpus=ncpus, mpiprocs=mpiprocs, mem=int(mem)) + s = "{chunks}:ncpus={ncpus}:mem={mem}mb:mpiprocs={mpiprocs}".format(**select_params) + else: + chunks, ncpus, mem, mpiprocs, ompthreads = self.mpi_procs, self.omp_threads, self.mem_per_proc, 1, self.omp_threads + if memory_policy == 'vmem': + select_params = AttrDict(chunks=chunks, ncpus=ncpus, mpiprocs=mpiprocs, vmem=int(mem), + ompthreads=ompthreads) + s = "{chunks}:ncpus={ncpus}:vmem={vmem}mb:mpiprocs={mpiprocs}:ompthreads={ompthreads}".format(**select_params) + elif memory_policy == 'mem': + select_params = AttrDict(chunks=chunks, ncpus=ncpus, mpiprocs=mpiprocs, mem=int(mem), + ompthreads=ompthreads) + s = "{chunks}:ncpus={ncpus}:mem={mem}mb:mpiprocs={mpiprocs}:ompthreads={ompthreads}".format( + **select_params) + + if ret_dict: + return s, select_params + return s + + def _submit_to_queue(self, script_file): + """Submit a job script to the queue.""" + if sys.version_info[0] < 3: + process = Popen(['qsub', script_file], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['qsub', script_file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + # grab the return code. PBS returns 0 if the job was successful + queue_id = None + if process.returncode == 0: + try: + # output should of the form '2561553.sdb' or '352353.jessup' - just grab the first part for job id + queue_id = int(out.split('.')[0]) + except Exception: + # probably error parsing job code + logger.critical("Could not parse job id following qsub...") + return SubmitResults(qid=queue_id, out=out, err=err, process=process) + + def _get_njobs_in_queue(self, username): + if sys.version_info[0] < 3: + process = Popen(['qstat', '-a', '-u', username], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['qstat', '-a', '-u', username], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + njobs = None + if process.returncode == 0: + # parse the result + # lines should have this form + # '1339044.sdb username queuename 2012-02-29-16-43 20460 -- -- -- 00:20 C 00:09' + # count lines that include the username in it + + # TODO: only count running or queued jobs. or rather, *don't* count jobs that are 'C'. + outs = out.split('\n') + njobs = len([line.split() for line in outs if username in line]) + + return njobs, process + + def exclude_nodes(self, nodes): + return False + + +class TorqueAdapter(PbsProAdapter): + """Adapter for Torque.""" + QTYPE = "torque" + + QTEMPLATE = """\ +#!/bin/bash + +#PBS -q $${queue} +#PBS -N $${job_name} +#PBS -A $${account} +####PBS -l mppwidth=$${mppwidth} +#PBS -l nodes=$${nodes}:ppn=$${ppn} +#PBS -l walltime=$${walltime} +#PBS -l model=$${model} +#PBS -l place=$${place} +#PBS -W group_list=$${group_list} +#PBS -M $${mail_user} +#PBS -m $${mail_type} +# Submission environment +#PBS -V +#PBS -o $${_qout_path} +#PBS -e $${_qerr_path} +$${qverbatim} +""" + + def set_mem_per_proc(self, mem_mb): + """Set the memory per process in megabytes""" + QueueAdapter.set_mem_per_proc(self, mem_mb) + #self.qparams["mem"] = self.mem_per_proc + + def set_mpi_procs(self, mpi_procs): + """Set the number of CPUs used for MPI.""" + QueueAdapter.set_mpi_procs(self, mpi_procs) + + num_nodes, rest_cores = self.hw.divmod_node(mpi_procs, omp_threads=1) + if num_nodes == 0: + self.qparams["nodes"] = 1 + self.qparams["ppn"] = mpi_procs + else: + if rest_cores != 0: + # Pack cores as much as possible. + num_nodes += 1 + self.qparams["nodes"] = num_nodes + self.qparams["ppn"] = self.hw.cores_per_node + + def exclude_nodes(self, nodes): + raise self.Error('qadapter failed to exclude nodes, not implemented yet in torque') + + +class SGEAdapter(QueueAdapter): + """ + Adapter for Sun Grid Engine (SGE) task submission software. + + See also: + + * https://www.wiki.ed.ac.uk/display/EaStCHEMresearchwiki/How+to+write+a+SGE+job+submission+script + * http://www.uibk.ac.at/zid/systeme/hpc-systeme/common/tutorials/sge-howto.html + """ + QTYPE = "sge" + + QTEMPLATE = """\ +#!/bin/bash + +#$ -account_name $${account_name} +#$ -N $${job_name} +#$ -q $${queue_name} +#$ -pe $${parallel_environment} $${ncpus} +#$ -l h_rt=$${walltime} +# request a per slot memory limit of size bytes. +##$ -l h_vmem=$${mem_per_slot} +##$ -l mf=$${mem_per_slot} +###$ -j no +#$ -M $${mail_user} +#$ -m $${mail_type} +# Submission environment +##$ -S /bin/bash +###$ -cwd # Change to current working directory +###$ -V # Export environment variables into script +#$ -e $${_qerr_path} +#$ -o $${_qout_path} +$${qverbatim} +""" + + def set_qname(self, qname): + super().set_qname(qname) + if qname: + self.qparams["queue_name"] = qname + + def set_mpi_procs(self, mpi_procs): + """Set the number of CPUs used for MPI.""" + super().set_mpi_procs(mpi_procs) + self.qparams["ncpus"] = mpi_procs + + def set_omp_threads(self, omp_threads): + super().set_omp_threads(omp_threads) + logger.warning("Cannot use omp_threads with SGE") + + def set_mem_per_proc(self, mem_mb): + """Set the memory per process in megabytes""" + super().set_mem_per_proc(mem_mb) + self.qparams["mem_per_slot"] = str(int(self.mem_per_proc)) + "M" + + def set_timelimit(self, timelimit): + super().set_timelimit(timelimit) + # Same convention as pbspro e.g. [hours:minutes:]seconds + self.qparams["walltime"] = qu.time2pbspro(timelimit) + + def cancel(self, job_id): + return os.system("qdel %d" % job_id) + + def _submit_to_queue(self, script_file): + """Submit a job script to the queue.""" + if sys.version_info[0] < 3: + process = Popen(['qsub', script_file], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['qsub', script_file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + # grab the returncode. SGE returns 0 if the job was successful + queue_id = None + if process.returncode == 0: + try: + # output should of the form + # Your job 1659048 ("NAME_OF_JOB") has been submitted + queue_id = int(out.split(' ')[2]) + except Exception: + # probably error parsing job code + logger.critical("Could not parse job id following qsub...") + return SubmitResults(qid=queue_id, out=out, err=err, process=process) + + def exclude_nodes(self, nodes): + """Method to exclude nodes in the calculation""" + raise self.Error('qadapter failed to exclude nodes, not implemented yet in sge') + + def _get_njobs_in_queue(self, username): + if sys.version_info[0] < 3: + process = Popen(['qstat', '-u', username], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['qstat', '-u', username], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + njobs = None + if process.returncode == 0: + # parse the result + # lines should contain username + # count lines that include the username in it + + # TODO: only count running or queued jobs. or rather, *don't* count jobs that are 'C'. + outs = out.splitlines() + njobs = len([line.split() for line in outs if username in line]) + + return njobs, process + + +class MOABAdapter(QueueAdapter): + """Adapter for MOAB. See https://computing.llnl.gov/tutorials/moab/""" + QTYPE = "moab" + + QTEMPLATE = """\ +#!/bin/bash + +#MSUB -a $${eligible_date} +#MSUB -A $${account} +#MSUB -c $${checkpoint_interval} +#MSUB -l feature=$${feature} +#MSUB -l gres=$${gres} +#MSUB -l nodes=$${nodes} +#MSUB -l partition=$${partition} +#MSUB -l procs=$${procs} +#MSUB -l ttc=$${ttc} +#MSUB -l walltime=$${walltime} +#MSUB -l $${resources} +#MSUB -p $${priority} +#MSUB -q $${queue} +#MSUB -S $${shell} +#MSUB -N $${job_name} +#MSUB -v $${variable_list} + +#MSUB -o $${_qout_path} +#MSUB -e $${_qerr_path} +$${qverbatim} +""" + + def set_mpi_procs(self, mpi_procs): + """Set the number of CPUs used for MPI.""" + super().set_mpi_procs(mpi_procs) + self.qparams["procs"] = mpi_procs + + def set_timelimit(self, timelimit): + super().set_timelimit(timelimit) + self.qparams["walltime"] = qu.time2slurm(timelimit) + + def set_mem_per_proc(self, mem_mb): + super().set_mem_per_proc(mem_mb) + #TODO + #raise NotImplementedError("set_mem_per_cpu") + + def exclude_nodes(self, nodes): + raise self.Error('qadapter failed to exclude nodes, not implemented yet in moad') + + def cancel(self, job_id): + return os.system("canceljob %d" % job_id) + + def _submit_to_queue(self, script_file): + """Submit a job script to the queue.""" + if sys.version_info[0] < 3: + process = Popen(['msub', script_file], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['msub', script_file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + queue_id = None + if process.returncode == 0: + # grab the returncode. MOAB returns 0 if the job was successful + try: + # output should be the queue_id + queue_id = int(out.split()[0]) + except Exception: + # probably error parsing job code + logger.critical('Could not parse job id following msub...') + + return SubmitResults(qid=queue_id, out=out, err=err, process=process) + + def _get_njobs_in_queue(self, username): + if sys.version_info[0] < 3: + process = Popen(['showq', '-s -u', username], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['showq', '-s -u', username], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + njobs = None + if process.returncode == 0: + # parse the result + # lines should have this form: + ## + ## active jobs: N eligible jobs: M blocked jobs: P + ## + ## Total job: 1 + ## + # Split the output string and return the last element. + out = out.splitlines()[-1] + njobs = int(out.split()[-1]) + + return njobs, process + + +class BlueGeneAdapter(QueueAdapter): + """ + Adapter for LoadLever on BlueGene architectures. + + See: + http://www.prace-ri.eu/best-practice-guide-blue-gene-q-html/#id-1.5.4.8 + https://www.lrz.de/services/compute/supermuc/loadleveler/ + """ + QTYPE = "bluegene" + + QTEMPLATE = """\ +#!/bin/bash +# @ job_name = $${job_name} +# @ class = $${class} +# @ error = $${_qout_path} +# @ output = $${_qerr_path} +# @ wall_clock_limit = $${wall_clock_limit} +# @ notification = $${notification} +# @ notify_user = $${mail_user} +# @ environment = $${environment} +# @ account_no = $${account_no} +# @ job_type = bluegene +# @ bg_connectivity = $${bg_connectivity} +# @ bg_size = $${bg_size} +$${qverbatim} +# @ queue +""" + + def set_qname(self, qname): + super().set_qname(qname) + if qname: + self.qparams["class"] = qname + + #def set_mpi_procs(self, mpi_procs): + # """Set the number of CPUs used for MPI.""" + # super().set_mpi_procs(mpi_procs) + # #self.qparams["ntasks"] = mpi_procs + + #def set_omp_threads(self, omp_threads): + # super().set_omp_threads(omp_threads) + # #self.qparams["cpus_per_task"] = omp_threads + + #def set_mem_per_proc(self, mem_mb): + # """Set the memory per process in megabytes""" + # super().set_mem_per_proc(mem_mb) + # #self.qparams["mem_per_cpu"] = self.mem_per_proc + + def set_timelimit(self, timelimit): + """Limits are specified with the format hh:mm:ss (hours:minutes:seconds)""" + super().set_timelimit(timelimit) + self.qparams["wall_clock_limit"] = qu.time2loadlever(timelimit) + + def cancel(self, job_id): + return os.system("llcancel %d" % job_id) + + def bgsize_rankspernode(self): + """Return (bg_size, ranks_per_node) from mpi_procs and omp_threads.""" + bg_size = int(math.ceil((self.mpi_procs * self.omp_threads) / self.hw.cores_per_node)) + bg_size = max(bg_size, 32) # TODO hardcoded + ranks_per_node = int(math.ceil(self.mpi_procs / bg_size)) + + return bg_size, ranks_per_node + + def optimize_params(self, qnodes=None): + params = {} + bg_size, rpn = self.bgsize_rankspernode() + print("in optimize params") + print("mpi_procs:", self.mpi_procs, "omp_threads:",self.omp_threads) + print("bg_size:",bg_size,"ranks_per_node",rpn) + + return {"bg_size": bg_size} + + def _submit_to_queue(self, script_file): + """Submit a job script to the queue.""" + if sys.version_info[0] < 3: + process = Popen(['llsubmit', script_file], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['llsubmit', script_file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + # grab the return code. llsubmit returns 0 if the job was successful + queue_id = None + if process.returncode == 0: + try: + # on JUQUEEN, output should of the form + #llsubmit: The job "juqueen1c1.zam.kfa-juelich.de.281506" has been submitted. + token = out.split()[3] + s = token.split(".")[-1].replace('"', "") + queue_id = int(s) + except Exception: + # probably error parsing job code + logger.critical("Could not parse job id following llsubmit...") + raise + + return SubmitResults(qid=queue_id, out=out, err=err, process=process) + + def _get_njobs_in_queue(self, username): + if sys.version_info[0] < 3: + process = Popen(['llq', '-u', username], stdout=PIPE, stderr=PIPE) + else: + # need string not bytes so must use universal_newlines + process = Popen(['llq', '-u', username], stdout=PIPE, stderr=PIPE, universal_newlines=True) + + out, err = process.communicate() + njobs = None + if process.returncode == 0: + # parse the result. lines should have this form: + # + # Id Owner Submitted ST PRI Class Running On + # ------------------------ ---------- ----------- -- --- ------------ ----------- + # juqueen1c1.281508.0 paj15530 1/23 13:20 I 50 n001 + # 1 job step(s) in query, 1 waiting, 0 pending, 0 running, 0 held, 0 preempted + # + # count lines that include the username in it + outs = out.split('\n') + njobs = len([line.split() for line in outs if username in line]) + + return njobs, process + + def exclude_nodes(self, nodes): + return False diff --git a/abipy/flowtk/qha.py b/abipy/flowtk/qha.py index 83fd89919..5de04ebed 100644 --- a/abipy/flowtk/qha.py +++ b/abipy/flowtk/qha.py @@ -1,139 +1,177 @@ # coding: utf-8 """ -Tools and workflows for calculations within the quasi-harmonic approximation. - -WARNING: This code is still under development. +Workflows for calculations within the quasi-harmonic approximation. """ -from __future__ import print_function, division, unicode_literals, absolute_import - -import os import numpy as np -from pymatgen.io.abinit.flows import Flow -from pymatgen.io.abinit.works import Work, RelaxWork, PhononWork, MergeDdb -from abipy.core.structure import Structure -from abipy.abio.inputs import AbinitInput +from monty.json import jsanitize +from abipy.flowtk.works import Work, PhononWork +from abipy.flowtk.flows import Flow -import logging -logger = logging.getLogger(__name__) - -class RelaxAndPhononWork(Work, MergeDdb): +class RelaxAndPhononWork(Work): """ - This work perform a structural relaxation and use the relaxed structure to - compute phonon frequencies with DFPT. + This work performs a structural relaxation for different volumes, then it uses + the relaxed structures to compute phonons, BECS and the dielectric tensor with DFPT. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: RelaxAndPhononWork """ - _relax_done, _phonons_done = False, False @classmethod - def from_gsinp(cls, gsinp, ngqpt, optcell, ionmov): + def from_scf_input(cls, scf_input, volumes, ngqpt, with_becs, optcell, ionmov, edos_ngkpt=None): + """ + Build the work from an |AbinitInput| for GS-SCF calculation. + + Args: + scf_input: |AbinitInput| for GS-SCF used as template to generate the other inputs. + volumes: List of volumes in Ang**3 + with_becs: Activate calculation of Electric field and Born effective charges. + optcell, ionmov: Abinit input variables. + edos_ngkpt: Three integers defining the the k-sampling for the computation of the + electron DOS with the relaxed structures. Useful for metals or small gap semiconductors + in which the electronic contribution should be included. + None disables the computation of the e-DOS. + """ work = cls() - work.initial_gsinp, work.ngqpt = gsinp, ngqpt - # Create input for relaxation and register relaxation task. - relaxinp = gsinp.deepcopy() - relaxinp.pop_tolerances() - relaxinp.set_vars(tolvrs=1e-10, toldff=1.e-6) - relaxinp.set_vars(optcell=optcell, ionmov=ionmov) - if optcell is not None and optcell != 0 : - relaxinp.set_vars_ifnotin(ecutsm=0.5, dilatmx=1.05) - - work.relax_task = work.register_relax_task(relaxinp) + work.initial_scf_input = scf_input + work.ngqpt = np.reshape(ngqpt, (3,)) + work.edos_ngkpt = edos_ngkpt if edos_ngkpt is None else np.reshape(edos_ngkpt, (3,)) + work.volumes = np.array(volumes) + work.with_becs = with_becs + + # Create input for relaxation and register the relaxation task. + relax_template = scf_input.deepcopy() + relax_template.pop_tolerances() + relax_template.set_vars(tolvrs=1e-10, toldff=1.e-6, optcell=optcell, ionmov=ionmov) + if optcell is not None and optcell != 0: + relax_template.set_vars_ifnotin(ecutsm=0.5, dilatmx=1.05) + + # Construct len(volumes) works. Each work performs a structural relaxation + # at fixed volume followed by a DFPT calculation with the relaxed structure. + work.relax_tasks_vol = [] + for new_volume in work.volumes: + new_structure = relax_template.structure.scale_lattice(new_volume) + new_input = relax_template.new_with_structure(new_structure) + task = work.register_relax_task(new_input) + work.relax_tasks_vol.append(task) + + work.ph_works_vol = len(volumes) * [None] + work.edos_work = None return work - def add_phonon_tasks_and_build(self): + def on_all_ok(self): """ - Called by on_all_ok when the structural relaxation is completed. - Here the phonon tasks with the relaxed structure and constructed - and added to the work. + This callback is called when all tasks in the Work reach status `S_OK`. + Here are add a new PhononWork for each volume using the relaxed structure. """ - # Get relaxed structure and build tasks for phonon calculations. - relaxed_structure = self.relax_task.get_final_structure() - scf_input = self.initial_gsinp.new_with_structure(relaxed_structure) - scf_task = self.register_scf_task(scf_input) + if self.edos_ngkpt is not None: self.edos_work = Work() - qpoints = scf_input.abiget_ibz(ngkpt=self.ngqpt, shiftk=[0, 0, 0]).points - for qpt in qpoints: - for ph_inp in scf_task.input.make_ph_inputs_qpoint(qpt, tolerance=None): - self.register_phonon_task(ph_inp, deps={scf_task: "WFK"}) + # Build phonon works for the different volumes. + for ivol, task in enumerate(self.relax_tasks_vol): + relaxed_structure = task.get_final_structure() + scf_input = self.initial_scf_input.new_with_structure(relaxed_structure) + ph_work = PhononWork.from_scf_input(scf_input, self.ngqpt, is_ngqpt=True, tolerance=None, + with_becs=self.with_becs, ddk_tolerance=None) + self.ph_works_vol[ivol] = ph_work - # Allocate new works and update the pickle database. - self.flow.allocate() - self.flow.build_and_pickle_dump() + # Add e-DOS calculation. + if self.edos_ngkpt is not None: + edos_input = scf_input.make_edos_input(self.edos_ngkpt) + self.edos_work.register_nscf_task(edos_input, deps={ph_work[0]: "DEN"}) - def on_all_ok(self): - """ - This method is called when all the task reach S_OK. - The first time we enter here, we construct the phonon tasks. - The second call runs `mrgddb` in sequential on the local machine to produce - the final DDB file in the outdir of the `Work`. - """ - if not self._relax_done: - # Build phonon tasks. - self._relax_done = True - self.add_phonon_tasks_and_build() - self.finalized = False + self.flow.register_work(ph_work) - elif not self._phonons_done: - # Merge DDB files. - self._phonons_done = True - self.merge_ddb_files() - self.finalized = True + if self.edos_ngkpt is not None: self.flow.register_work(self.edos_work) + self.flow.allocate() + self.flow.build_and_pickle_dump() - return super(RelaxAndPhononWork, self).on_all_ok() + return super().on_all_ok() class QhaFlow(Flow): + """ + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: QhaFlow + """ @classmethod - def from_gsinp(cls, workdir, gsinp, volumes, ngqpt, manager=None): + def from_scf_input(cls, workdir, scf_input, volumes, ngqpt, with_becs, + edos_ngkpt=None, metadata=None, manager=None): """ + Build a |Flow| for QHA calculations from an |AbinitInput| for GS-SCF calculations. Args: - workdir: - gsinp: - volumes: - ngqpt: - manager: + workdir: Working directory. + scf_input: |AbinitInput| for GS-SCF run used as template to generate the other inputs. + volumes: List of volumes in Ang**3. + ngqpt: Three integers defining the q-mesh for phonon calculation. + with_becs: Activate calculation of Electric field and Born effective charges. + edos_ngkpt: Three integers defining the the k-sampling for the computation of the + electron DOS with the relaxed structures. Useful for metals or small gap semiconductors + in which the electronic contribution should be included. + None disables the computation of the e-DOS. + metadata: Dictionary with metadata to be be added to the final JSON file. + manager: |TaskManager| instance. Use default if None. """ ngqpt = np.reshape(ngqpt, 3) flow = cls(workdir=workdir, manager=manager) + flow.metadata = jsanitize(metadata) if metadata is not None else None - # Construct len(volumes) works. Each work performs the structure relaxation - # at fixed volume followed by DFPT calculation with the relaxed structure. - for vol in volumes: - # Build GS input file for new structure with rescaled volume. - new_lattice = gsinp.structure.lattice.scale(vol) - new_structure = Structure(new_lattice, gsinp.structure.species, gsinp.structure.frac_coords) - new_input = gsinp.new_with_structure(new_structure) - - # Register work. - work = RelaxAndPhononWork.from_gsinp(new_input, ngqpt, optcell=3, ionmov=3) - flow.register_work(work) + work = RelaxAndPhononWork.from_scf_input(scf_input, volumes, ngqpt, + with_becs=with_becs, optcell=3, ionmov=3, edos_ngkpt=edos_ngkpt) + flow.relax_and_phonon_work = work + flow.register_work(work) return flow def finalize(self): """ This method is called when the flow is completed. - It transfer the most important results to flow/outdir and perform - some basic post-processing of the results to facilitate further analysis. + It performs some basic post-processing of the results to facilitate further analysis. """ - #data = {} - #for work in self: - # ddb_path = work.outdir.has_abiext("DDB") - # with work.relax_task.open_gsr() as gsr - # data.append(dict( + d = {} + if self.metadata is not None: d.update({"metadata": self.metadata}) + + #QHA.from_files(cls, gsr_paths, phdos_paths) + # Build list of strings with path to the relevant output files ordered by V. + d["gsr_relax_paths"] = [task.gsr_path for task in self.relax_and_phonon_work.relax_tasks_vol] + d["ddb_paths"] = [ph_work.outdir.has_abiext("DDB") for ph_work in self.relax_and_phonon_work.ph_works_vol] + d["gsr_edos_path"] = [] + if self.relax_and_phonon_work.edos_ngkpt is not None: + d["gsr_edos_paths"] = [task.gsr_path for task in self.relax_and_phonon_work.edos_work] + + from abipy import abilab + #entries = [] + #items = zip(self.relax_and_phonon_work.relax_tasks_vol, self.relax_and_phonon_work.ph_works_vol) + #for ivol, (relax_task, ph_work) in enumerate(items): + # ddb_path = ph_work.outdir.has_abiext("DDB") + # with relax_task.open_gsr() as gsr: + # entry = dict( # volume=gsr.structure.volume, - # etotal=gsr.etotal, - # structure=gsr.structure, + # energy_eV=gsr.energy, # pressure_GPa=gsr.pressure, - # stress_tensor=gsr.stress_tensor, - # forces=gsr.forces, + # structure=gsr.structure, + # gsr_edos_path=None, # ddb_path=ddb_path, - # gsr_path=gsr.path, - # )) + # ) + + # if self.relax_and_phonon_work.edos_ngkpt is not None: + # task = self.relax_and_phonon_work.edos_work[ivol] + # entry["gsr_edos_path"] = task.gsr_path + + # entries.append(entry) + #d["entries_for_each_volume"] = entries + + abilab.mjson_write(d, self.outdir.path_in("qha.json"), indent=4) - #with open(self.outdir.path_in("qha.sjon"), "wt") as fh: - # json.dump(fh, data) + #pyscript = """ + #from abipy import abilab + #from abipy.qha import Qha + #data = abilab.mjson_read("qha.json") + #data + #qha = from_files(gsr_files_paths, phdos_files_paths): + #""" - return super(QhaFlow, self).finalize() + return super().finalize() diff --git a/abipy/flowtk/qjobs.py b/abipy/flowtk/qjobs.py new file mode 100644 index 000000000..03bb07a2d --- /dev/null +++ b/abipy/flowtk/qjobs.py @@ -0,0 +1,464 @@ +# coding: utf-8 +""" +Objects and methods to contact the resource manager to get info on the status of the job and useful statistics. +Note that this is not a wrapper for the C API but a collection of simple wrappers around the shell commands +provided by the resource manager (qsub, qdel and qstat for PBS, sinfo, squeue... for Slurm). +The main goal indeed is providing a simplified common interface for different resource managers without +having to rely on external libraries. +""" + +import shlex + +from collections import OrderedDict, defaultdict +from subprocess import Popen, PIPE +from monty.collections import AttrDict +from monty.inspect import all_subclasses + +import logging +logger = logging.getLogger(__name__) + + +class JobStatus(int): + """ + This object is an integer representing the status of a :class:`QueueJob`. + + Slurm API, see `man squeue`. + + JOB STATE CODES + Jobs typically pass through several states in the course of their execution. The typical states are + PENDING, RUNNING, SUSPENDED, COMPLETING, and COMPLETED. An explanation of each state follows:: + + BF BOOT_FAIL Job terminated due to launch failure, typically due to a hardware failure (e.g. + unable to boot the node or block and the job can not be requeued). + CA CANCELLED Job was explicitly cancelled by the user or system administrator. + The job may or may not have been initiated. + CD COMPLETED Job has terminated all processes on all nodes. + CF CONFIGURING Job has been allocated resources, but are waiting for them to become ready for use (e.g. booting). + CG COMPLETING Job is in the process of completing. Some processes on some nodes may still be active. + F FAILED Job terminated with non-zero exit code or other failure condition. + NF NODE_FAIL Job terminated due to failure of one or more allocated nodes. + PD PENDING Job is awaiting resource allocation. + PR PREEMPTED Job terminated due to preemption. + R RUNNING Job currently has an allocation. + S SUSPENDED Job has an allocation, but execution has been suspended. + TO TIMEOUT Job terminated upon reaching its time limit. + SE SPECIAL_EXIT The job was requeued in a special state. This state can be set by users, typically + in EpilogSlurmctld, if the job has terminated with a particular exit value. + + """ + + _STATUS_TABLE = OrderedDict([ + (-1, "UNKNOWN"), + (0, "PENDING"), + (1, "RUNNING"), + (2, "RESIZING"), + (3, "SUSPENDED"), + (4, "COMPLETED"), + (5, "CANCELLED"), + (6, "FAILED"), + (7, "TIMEOUT"), + (8, "PREEMPTED"), + (9, "NODEFAIL"), + ]) + + def __repr__(self): + return "<%s: %s, at %s>" % (self.__class__.__name__, str(self), id(self)) + + def __str__(self): + """String representation.""" + return self._STATUS_TABLE[self] + + @classmethod + def from_string(cls, s): + """Return a :class:`JobStatus` instance from its string representation.""" + for num, text in cls._STATUS_TABLE.items(): + if text == s: return cls(num) + else: + #raise ValueError("Wrong string %s" % s) + logger.warning("Got unknown status: %s" % s) + return cls.from_string("UNKNOWN") + + +class QueueJob(object): + """ + This object provides methods to contact the resource manager to get info on the status + of the job and useful statistics. This is an abstract class. + """ + QTYPE = None + + # Used to handle other resource managers. + S_UNKNOWN = JobStatus.from_string("UNKNOWN") + # Slurm status + S_PENDING = JobStatus.from_string("PENDING") + S_RUNNING = JobStatus.from_string("RUNNING") + S_RESIZING = JobStatus.from_string("RESIZING") + S_SUSPENDED = JobStatus.from_string("SUSPENDED") + S_COMPLETED = JobStatus.from_string("COMPLETED") + S_CANCELLED = JobStatus.from_string("CANCELLED") + S_FAILED = JobStatus.from_string("FAILED") + S_TIMEOUT = JobStatus.from_string("TIMEOUT") + S_PREEMPTED = JobStatus.from_string("PREEMPTED") + S_NODEFAIL = JobStatus.from_string("NODEFAIL") + + @staticmethod + def from_qtype_and_id(qtype, queue_id, qname=None): + """ + Return a new istance of the appropriate subclass. + + Args: + qtype: String specifying the Resource manager type. + queue_id: Job identifier. + qname: Name of the queue (optional). + """ + for cls in all_subclasses(QueueJob): + if cls.QTYPE == qtype: break + else: + logger.critical("Cannot find QueueJob subclass registered for qtype %s" % qtype) + cls = QueueJob + + return cls(queue_id, qname=qname) + + def __init__(self, queue_id, qname="UnknownQueue"): + """ + Args: + queue_id: Job identifier. + qname: Name of the queue (optional). + """ + self.qid, self.qname = queue_id, qname + + # Initialize properties. + self.status, self.exitcode, self.signal = None, None, None + + def __repr__(self): + return "<%s, qid=%s, status=%s, exit_code=%s>" % ( + self.__class__.__name__, self.qid, self.status, self.exitcode) + + def __bool__(self): + return self.qid is not None + + __nonzero__ = __bool__ + + #In many cases, we only need to know if job is terminated or not + #def is_terminated() + + @property + def is_completed(self): + return self.status == self.S_COMPLETED + + @property + def is_running(self): + return self.status == self.S_RUNNING + + @property + def is_failed(self): + return self.status == self.S_FAILED + + @property + def timeout(self): + return self.status == self.S_TIMEOUT + + @property + def has_node_failures(self): + return self.status == self.S_NODEFAIL + + @property + def unknown_status(self): + return self.status == self.S_UNKNOWN + + def set_status_exitcode_signal(self, status, exitcode, signal): + self.status, self.exitcode, self.signal = status, exitcode, signal + + def likely_code_error(self): + """ + See + + ========= ========= ======= ======================================================================== + SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process + SIGINT 2 Term Interrupt from keyboard + SIGQUIT 3 Core Quit from keyboard + SIGILL 4 Core Illegal Instruction + SIGABRT 6 Core Abort signal from abort(3) + SIGFPE 8 Core Floating point exception + SIGKILL 9 Term Kill signal + SIGSEGV 11 Core Invalid memory reference + SIGPIPE 13 Term Broken pipe: write to pipe with no readers + SIGALRM 14 Term Timer signal from alarm(2) + SIGTERM 15 Term Termination signal + SIGUSR1 30,10,16 Term User-defined signal 1 + SIGUSR2 31,12,17 Term User-defined signal 2 + SIGCHLD 20,17,18 Ign Child stopped or terminated + SIGCONT 19,18,25 Cont Continue if stopped + SIGSTOP 17,19,23 Stop Stop process + SIGTSTP 18,20,24 Stop Stop typed at terminal + SIGTTIN 21,21,26 Stop Terminal input for background process + SIGTTOU 22,22,27 Stop Terminal output for background process + ========= ========= ======= ======================================================================== + + The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. + Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001. + + ========== ========= ======== ======================================== + Signal Value Action Comment + SIGBUS 10,7,10 Core Bus error (bad memory access) + SIGPOLL Term Pollable event (Sys V). + Synonym for SIGIO + SIGPROF 27,27,29 Term Profiling timer expired + SIGSYS 12,31,12 Core Bad argument to routine (SVr4) + SIGTRAP 5 Core Trace/breakpoint trap + SIGURG 16,23,21 Ign Urgent condition on socket (4.2BSD) + SIGVTALRM 26,26,28 Term Virtual alarm clock (4.2BSD) + SIGXCPU 24,24,30 Core CPU time limit exceeded (4.2BSD) + SIGXFSZ 25,25,31 Core File size limit exceeded (4.2BSD) + ========== ========= ======== ======================================== + """ + for sig_name in ("SIGFPE",): + if self.received_signal(sig_name): return sig_name + + return False + + def received_signal(self, sig_name): + if self.signal is None: return False + # Get the numeric value from signal and compare it with self.signal + import signal + try: + return self.signal == getattr(signal, sig_name) + except AttributeError: + # invalid sig_name or sig_name not available on this OS. + return False + + def estimated_start_time(self): + """Return date with estimated start time. None if it cannot be detected""" + return None + + def get_info(self, **kwargs): + return None + + def get_nodes(self, **kwargs): + return None + + def get_stats(self, **kwargs): + return None + + +class ShellJob(QueueJob): + """Handler for Shell jobs.""" + QTYPE = "shell" + + +class SlurmJob(QueueJob): + """Handler for Slurm jobs.""" + QTYPE = "slurm" + + def estimated_start_time(self): + #squeue --start -j 116791 + # JOBID PARTITION NAME USER ST START_TIME NODES NODELIST(REASON) + # 116791 defq gs6q2wop username PD 2014-11-04T09:27:15 16 (QOSResourceLimit) + cmd = "squeue" "--start", "--job %d" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + logger.critical(err) + return None + + lines = out.splitlines() + if len(lines) <= 2: return None + + from datetime import datetime + for line in lines: + tokens = line.split() + if int(tokens[0]) == self.qid: + date_string = tokens[5] + if date_string == "N/A": return None + return datetime.strptime(date_string, "%Y-%m-%dT%H:%M:%S") + + return None + + def get_info(self, **kwargs): + # See https://computing.llnl.gov/linux/slurm/sacct.html + #If SLURM job ids are reset, some job numbers will + #probably appear more than once refering to different jobs. + #Without this option only the most recent jobs will be displayed. + + #state Displays the job status, or state. + #Output can be RUNNING, RESIZING, SUSPENDED, COMPLETED, CANCELLED, FAILED, TIMEOUT, + #PREEMPTED or NODE_FAIL. If more information is available on the job state than will fit + #into the current field width (for example, the uid that CANCELLED a job) the state will be followed by a "+". + + #gmatteo@master2:~ + #sacct --job 112367 --format=jobid,exitcode,state --allocations --parsable2 + #JobID|ExitCode|State + #112367|0:0|RUNNING + #scontrol show job 800197 --oneliner + + # For more info + #login1$ scontrol show job 1676354 + + #cmd = "sacct --job %i --format=jobid,exitcode,state --allocations --parsable2" % self.qid + cmd = "scontrol show job %i --oneliner" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + logger.critical(err) + return None + + tokens = out.splitlines() + info = AttrDict() + for line in tokens: + #print(line) + k, v = line.split("=") + info[k] = v + #print(info) + + qid = int(info.JobId) + assert qid == self.qid + exitcode = info.ExitCode + status = info.JobState + + if ":" in exitcode: + exitcode, signal = map(int, exitcode.split(":")) + else: + exitcode, signal = int(exitcode), None + + i = status.find("+") + if i != -1: status = status[:i] + + self.set_status_exitcode_signal(JobStatus.from_string(status), exitcode, signal) + return AttrDict(exitcode=exitcode, signal=signal, status=status) + + def get_stats(self, **kwargs): + cmd = "sacct --long --job %s --parsable2" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + logger.critical(err) + return {} + + lines = out.splitlines() + keys = lines[0].strip().split("|") + values = lines[1].strip().split("|") + #print("lines0", lines[0]) + return dict(zip(keys, values)) + + +class PbsProJob(QueueJob): + """ + Handler for PbsPro Jobs. + + See also https://github.com/plediii/pbs_util for a similar project. + """ + QTYPE = "pbspro" + # Mapping PrbPro --> Slurm. From `man qstat` + # + # S The job’s state: + # B Array job has at least one subjob running. + # E Job is exiting after having run. + # F Job is finished. + # H Job is held. + # M Job was moved to another server. + # Q Job is queued. + # R Job is running. + # S Job is suspended. + # T Job is being moved to new location. + # U Cycle-harvesting job is suspended due to keyboard activity. + # W Job is waiting for its submitter-assigned start time to be reached. + # X Subjob has completed execution or has been deleted. + + PBSSTAT_TO_SLURM = defaultdict(lambda x: QueueJob.S_UNKNOWN, [ + ("E", QueueJob.S_FAILED), + ("F", QueueJob.S_COMPLETED), + ("Q", QueueJob.S_PENDING), + ("R", QueueJob.S_RUNNING), + ("S", QueueJob.S_SUSPENDED), + ]) + + def estimated_start_time(self): + # qstat -T - Shows the estimated start time for all jobs in the queue. + # Est + # Req'd Req'd Start + #Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time + #--------------- -------- -------- ---------- ------ --- --- ------ ----- - ----- + #5669001.frontal username large gs.Pt -- 96 96 -- 03:00 Q -- + cmd = "qstat %s -T" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + logger.critical(err) + return None + + line = out.splitlines()[-1] + sdate = line.split()[-1] + if sdate in ("--", "?"): + return None + + # TODO One should convert to datetime + return sdate + + def get_info(self, **kwargs): + + # See also qstat -f + #http://sc.tamu.edu/help/origins/batch.shtml#qstat + + #$> qstat 5666289 + #frontal1: + # Req'd Req'd Elap + #Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time + #--------------- -------- -------- ---------- ------ --- --- ------ ----- - ----- + #5666289.frontal username main_ivy MorfeoTChk 57546 1 4 -- 08:00 R 00:17 + + cmd = "qstat %d" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + # qstat: 5904257.frontal1 Job has finished, use -x or -H to obtain historical job information\n + cmd = "qstat %d -x" % self.qid + process = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) + out, err = process.communicate() + + if process.returncode != 0: + logger.critical(out) + logger.critical(err) + return None + + # Here I don't know what's happeing but I get an output that differs from the one obtained in the terminal. + # Job id Name User Time Use S Queue + # ---------------- ---------------- ---------------- -------- - ----- + # 5905011.frontal1 t0 gmatteo 01:37:08 F main_wes + #print(out) + + line = out.splitlines()[-1] + #print(line.split()) + status = self.PBSSTAT_TO_SLURM[line.split()[4]] + + # Exit code and signal are not available. + # Once could use tracejob.... + # See also http://docs.adaptivecomputing.com/torque/3-0-5/a.gprologueepilogue.php + self.set_status_exitcode_signal(status, None, None) + + +################################# +# Unsupported resource managers # +################################# + +class TorqueJob(QueueJob): + """Not supported""" + QTYPE = "torque" + + +class SgeJob(QueueJob): + """Not supported""" + QTYPE = "sge" + + +class MoabJob(QueueJob): + """Not supported""" + QTYPE = "moab" + + +class BlueGeneJob(QueueJob): + """Not supported""" + QTYPE = "bluegene" diff --git a/abipy/flowtk/qutils.py b/abipy/flowtk/qutils.py index 6c31ef35d..29fd23daf 100644 --- a/abipy/flowtk/qutils.py +++ b/abipy/flowtk/qutils.py @@ -1,3 +1,133 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +""" +Collection of low-level tools that faciliate the interface with resource managers. -from pymatgen.io.abinit.qutils import * +The preferred way of importing this module is: + + import qutils as qu +""" +from monty.string import is_string +from pymatgen.core.units import Time, Memory +from abipy.tools import duck + +import logging +logger = logging.getLogger(__name__) + + +def slurm_parse_timestr(s): + """ + A slurm time parser. Accepts a string in one the following forms: + + # "days-hours", + # "days-hours:minutes", + # "days-hours:minutes:seconds". + # "minutes", + # "minutes:seconds", + # "hours:minutes:seconds", + + Returns: Time in seconds. + + Raises: + `ValueError` if string is not valid. + """ + days, hours, minutes, seconds = 0, 0, 0, 0 + + if duck.is_number_like(s): + return Time(s, "s") + + if '-' in s: + # "days-hours", + # "days-hours:minutes", + # "days-hours:minutes:seconds". + days, s = s.split("-") + days = int(days) + + if ':' not in s: + hours = int(float(s)) + elif s.count(':') == 1: + hours, minutes = map(int, s.split(':')) + elif s.count(':') == 2: + hours, minutes, seconds = map(int, s.split(':')) + else: + raise ValueError("More that 2 ':' in string!") + + else: + # "minutes", + # "minutes:seconds", + # "hours:minutes:seconds", + if ':' not in s: + minutes = int(float(s)) + elif s.count(':') == 1: + minutes, seconds = map(int, s.split(':')) + elif s.count(':') == 2: + hours, minutes, seconds = map(int, s.split(':')) + else: + raise ValueError("More than 2 ':' in string!") + + return Time((days*24 + hours)*3600 + minutes*60 + seconds, "s") + + +def time2slurm(timeval, unit="s"): + """ + Convert a number representing a time value in the given unit (Default: seconds) + to a string following the slurm convention: "days-hours:minutes:seconds". + + >>> assert time2slurm(61) == '0-0:1:1' and time2slurm(60*60+1) == '0-1:0:1' + >>> assert time2slurm(0.5, unit="h") == '0-0:30:0' + """ + d, h, m, s = 24*3600, 3600, 60, 1 + + timeval = Time(timeval, unit).to("s") + days, hours = divmod(timeval, d) + hours, minutes = divmod(hours, h) + minutes, secs = divmod(minutes, m) + + return "%d-%d:%d:%d" % (days, hours, minutes, secs) + + +def time2pbspro(timeval, unit="s"): + """ + Convert a number representing a time value in the given unit (Default: seconds) + to a string following the PbsPro convention: "hours:minutes:seconds". + + >>> assert time2pbspro(2, unit="d") == '48:0:0' + """ + h, m, s = 3600, 60, 1 + + timeval = Time(timeval, unit).to("s") + hours, minutes = divmod(timeval, h) + minutes, secs = divmod(minutes, m) + + return "%d:%d:%d" % (hours, minutes, secs) + + +def time2loadlever(timeval, unit="s"): + """ + Convert a number representing a time value in the given unit (Default: seconds) + to a string following the LoadLever convention. format hh:mm:ss (hours:minutes:seconds) + + >>> assert time2loadlever(2, unit="d") == '48:00:00' + """ + h, m, s = 3600, 60, 1 + + timeval = Time(timeval, unit).to("s") + hours, minutes = divmod(timeval, h) + minutes, secs = divmod(minutes, m) + + return "%d:%02d:%02d" % (hours, minutes, secs) + + +def timelimit_parser(s): + """Convert a float or a string into time in seconds.""" + try: + return Time(float(s), "s") + except ValueError: + return slurm_parse_timestr(s) + + +def any2mb(s): + """Convert string or number to memory in megabytes.""" + if is_string(s): + return int(Memory.from_string(s).to("Mb")) + else: + return int(s) diff --git a/abipy/flowtk/scheduler_error_handlers.py b/abipy/flowtk/scheduler_error_handlers.py new file mode 100644 index 000000000..47aee18bb --- /dev/null +++ b/abipy/flowtk/scheduler_error_handlers.py @@ -0,0 +1,82 @@ +# coding: utf-8 +""" +Error handlers for errors originating from the Submission systems. +""" + +__author__ = "Michiel van Setten" +__copyright__ = " " +__version__ = "0.9" +__maintainer__ = "Michiel van Setten" +__email__ = "mjvansetten@gmail.com" +__date__ = "May 2014" + +from abipy.flowtk.scheduler_error_parsers import get_parser +try: + from custodian.custodian import ErrorHandler +except ImportError: + ErrorHandler = object + + +class SchedulerErrorHandler(ErrorHandler): + """ + Custodian error handler for scheduler related errors + scheduler_adapter takes the scheduler, it should at least provide a .name attribute indentifying the scheduler, + currently 'slurm' is supported. + If the scheduler adapter also provides the methods defined in CorrectorProtocolScheduler, problems can also be + fixed by .apply_corrections. + If a application_adapter is also provided and it provides the methods defined in CorrectorProtocolApplication + problems can also be fixed a the level of the application, e.g. making the application require less memory. + """ + def __init__(self, scheduler_adapter, application_adapter=None, err_file='queue.err', out_file='queue.out', + run_err_file='run.err', batch_err_file='batch.err'): + self.scheduler_adapter = scheduler_adapter + self.application_adapter = application_adapter + self.err_file = err_file + self.out_file = out_file + self.run_err_file = run_err_file + self.batch_err_file = batch_err_file + self.errors = [] + self.corrections = {} + + def check(self): + """ + Check for the defined errors, put all found errors in self.errors, return True if any were found False if no + errors were found + """ + parser = get_parser(self.scheduler_adapter.name, err_file=self.err_file, out_file=self.out_file, + run_err_file=self.run_err_file, batch_err_file=self.batch_err_file) + parser.parse() + self.errors = parser.errors + if len(self.errors) == 0: + return False + else: + return True + + def correct(self): + """ + For custodian compatibility + """ + self.return_corrections() + + def return_corrections(self): + + for error in self.errors: + self.corrections.update({error: {'scheduler_adapter_solutions': [], 'aplication_adapter_solutions': []}}) + self.corrections[error]['scheduler_adapter_solutions'].append(error.scheduler_adapter_solutions) + self.corrections[error]['application_adapter_solutions'].append(error.application_adapter_solutions) + return self.corrections + + def apply_corrections(self): + """ + Method to directly apply the corrections. + """ + for error in self.errors: + for solution in error.scheduler_adapter_solutions: + if self.scheduler_adapter is not None: + if self.scheduler_adapter.__getattribut__(solution[0].__name__)(solution[1]): + return True + for solution in error.application_adapter_solutions: + if self.application_adapter is not None: + if self.application_adapter.__getattribut__(solution[0].__name__)(solution[1]): + return True + return False diff --git a/abipy/flowtk/scheduler_error_parsers.py b/abipy/flowtk/scheduler_error_parsers.py new file mode 100644 index 000000000..bce680bca --- /dev/null +++ b/abipy/flowtk/scheduler_error_parsers.py @@ -0,0 +1,425 @@ +# coding: utf-8 +""" +Error handlers for errors originating from the Submission systems. +""" +import re +import abc + +from abc import ABCMeta, abstractmethod + +__author__ = "Michiel van Setten" +__copyright__ = " " +__version__ = "0.9" +__maintainer__ = "Michiel van Setten" +__email__ = "mjvansetten@gmail.com" +__date__ = "May 2014" + +__all_errors__ = ['SubmitError', 'FullQueueError', 'DiskError', 'TimeCancelError', 'MemoryCancelError', + 'NodeFailureError'] + + +class CorrectorProtocolScheduler(metaclass=ABCMeta): + """ + Abstract class to define the protocol / interface for correction operators. The client code qadapters / submission + script generator method / ... should implement these methods. + """ + + @property + @abc.abstractmethod + def name(self): + return str() + + @abstractmethod + def exclude_nodes(self, nodes): + """ + Method to exclude certain nodes from being used in the calculation. It is called when a calculation seemed to + have been crashed due to a hardware failure at the nodes specified. + + nodes: list of node numbers that were found to cause problems + + returns True if the memory could be increased False otherwise + """ + + @abstractmethod + def increase_mem(self): + """ + Method to increase then memory in the calculation. It is called when a calculation seemed to have been crashed + due to a insufficient memory. + + returns True if the memory could be increased False otherwise + """ + + @abstractmethod + def increase_time(self): + """ + Method to increase te time for the calculation. It is called when a calculation seemed to + have been crashed due to a time limit. + + returns True if the memory could be increased False otherwise + """ + + @abstractmethod + def increase_cpus(self): + """ + Method to increse the number of cpus being used in the calculation. It is called when a calculation seemed to + have been crashed due to time or memory limits being broken. + + returns True if the memory could be increased False otherwise + """ + + +class CorrectorProtocolApplication(metaclass=ABCMeta): + """ + Abstract class to define the protocol / interface for correction operators. The client code quadapters / submission + script generator method / ... should implement these methods. + """ + + @property + @abc.abstractmethod + def name(self): + return str() + + @abstractmethod + def decrease_mem(self): + """ + Method to increase then memory in the calculation. It is called when a calculation seemed to have been crashed + due to a insufficient memory. + + returns True if the memory could be increased False otherwise + """ + + @abstractmethod + def speed_up(self): + """ + Method to speed_up the calculation. It is called when a calculation seemed to time limits being broken. + + returns True if the memory could be increased False otherwise + """ + + +class AbstractError(metaclass=ABCMeta): + """ + Error base class + """ + + def __init__(self, errmsg, meta_data): + self.errmsg = errmsg + self.meta_data = meta_data if meta_data is not None else {} + + def __str__(self): + _message = '%s %s\n' \ + ' error message : %s \n' \ + ' meta data : %s' % (self.name, self.__doc__, self.errmsg, str(self.meta_data)) + return _message + + @property + def name(self): + return self.__class__.__name__ + + @property + def scheduler_adapter_solutions(self): + """ + to be implemented by concrete errors returning a list of tuples defining corrections. The First element of the + tuple should be a string of one of the methods in CorrectorProtocolScheduler, the second element should + contain the arguments. + """ + return [] + + @property + def application_adapter_solutions(self): + """ + to be implemented by concrete errors returning a list of tuples defining corrections. The First element of the + tuple should be a string of one of the methods in CorrectorProtocolApplication, the second element should + contain the arguments. + """ + return [] + + def last_resort_solution(self): + """ + what to do if every thing else fails... + """ + print('non of the defined solutions for %s returned success...' % self.name) + return + + +class SubmitError(AbstractError): + """ + Errors occurring at submission. The limits on the cluster may have changed. + """ + + +class FullQueueError(AbstractError): + """ + Errors occurring at submission. To many jobs in the queue / total cpus / .. . + """ + + +class DiskError(AbstractError): + """ + Errors involving problems writing to disk. + """ + + +class TimeCancelError(AbstractError): + """ + Error due to exceeding the time limit for the job. + .limit will return a list of limits that were broken, None if it could not be determined. + """ + + @property + def limit(self): + return self.meta_data.get('broken_limit') + + @property + def scheduler_adapter_solutions(self): + return [(CorrectorProtocolScheduler.increase_time,)] + + @property + def application_adapter_solutions(self): + return [(CorrectorProtocolApplication.speed_up,)] + + +class MemoryCancelError(AbstractError): + """ + Error due to exceeding the memory limit for the job. + .limit will return a list of limits that were broken, None if it could not be determined. + """ + + @property + def limit(self): + return self.meta_data.get('broken_limit') + + @property + def scheduler_adapter_solutions(self): + return [(CorrectorProtocolScheduler.increase_mem,)] + + @property + def application_adapter_solutions(self): + return [(CorrectorProtocolApplication.decrease_mem,)] + + +class MasterProcessMemoryCancelError(AbstractError): + """ + Error due to exceeding the memory limit for the job on the master node. + """ + + +class SlaveProcessMemoryCancelError(AbstractError): + """ + Error due to exceeding the memory limit for the job on a node different from the master. + """ + + +class NodeFailureError(AbstractError): + """ + Error due the hardware failure of a specific node. + .node will return a list of problematic nodes, None if it could not be determined. + """ + + @property + def nodes(self): + return self.meta_data.get('nodes') + + @property + def scheduler_adapter_solutions(self): + return [(CorrectorProtocolScheduler.exclude_nodes, [self.nodes])] + + +class AbstractErrorParser(metaclass=ABCMeta): + """ + Abstract class for parsing errors originating from the scheduler system and error that are not reported by the + program itself, i.e. segmentation faults. + + A concrete implementation of this class for a specific scheduler needs a class attribute ERRORS for containing a + dictionary specifying error: + + ERRORS = {ErrorClass: { + 'file_specifier' : { + 'string': "the string to be looked for", + 'meta_filter': "string specifing the regular expression to obtain the meta data" + } + } + + """ + def __init__(self, err_file, out_file=None, run_err_file=None, batch_err_file=None): + self.files = {'err': err_file, 'out': out_file, 'run_err': run_err_file, 'batch_err': batch_err_file} + self.errors = [] + + @property + @abc.abstractmethod + def error_definitions(self): + return dict() + + @staticmethod + def extract_metadata(lines, meta_filter): + meta_dict = {} + for key in meta_filter.keys(): + values = [] + for line in lines: + match = re.match(meta_filter[key][0], line) + if match is not None: + values.append(re.match(meta_filter[key][0], line).group(meta_filter[key][1])) + values = sorted(set(values)) + meta_dict.update({key: values}) + return meta_dict + + def parse_single(self, errmsg): + """ + Parse the provided files for the corresponding strings. + """ + found = False + message = None + metadata = None + for k in errmsg.keys(): + if self.files[k] is not None: + #print('parsing ', self.files[k], ' for ', errmsg[k]['string']) + try: + with open(self.files[k], mode='r') as f: + lines = f.read().split('\n') + for line in lines: + if errmsg[k]['string'] in line: + message = line + found = True + if found: + metadata = self.extract_metadata(lines, errmsg[k]['meta_filter']) + except (IOError, OSError): + print(self.files[k], 'not found') + pass + except TypeError: + print('type error', self.files[k], ' has type ', self.files[k].cls(), ' should be string.') + pass + + return found, message, metadata + + def parse(self): + """ + Parse for the occurens of all errors defined in ERRORS + """ + errors_tested = 0 + for error in self.error_definitions: + errors_tested += 1 + result = self.parse_single(self.error_definitions[error]) + if result[0]: + self.errors.append(error(result[1], result[2])) + if len(self.errors) > 0: + print('QUEUE_ERROR FOUND') + for error in self.errors: + print(error) + + return errors_tested + + +class SlurmErrorParser(AbstractErrorParser): + """ + Implementation of the error definitions for the Slurm scheduler + """ + @property + def error_definitions(self): + return { + SubmitError: { + 'batch_err': { + 'string': "Batch job submission failed", + 'meta_filter': {} + } + }, + FullQueueError: { + 'batch_err': { + 'string': "Job violates accounting/QOS policy", + 'meta_filter': {} + } + }, + MemoryCancelError: { + 'err': { + 'string': "Exceeded job memory limit", + 'meta_filter': {} + } + }, +#slurmstepd: error: *** JOB 1803480 CANCELLED AT 2015-12-16T14:57:32 DUE TO TIME LIMIT on lmWn009 *** +#slurmstepd: error: *** JOB 1803712 CANCELLED AT 2015-12-17T15:21:41 DUE TO TIME LIMIT on lmWn001 *** + TimeCancelError: { + 'err': { + 'string': "DUE TO TIME LIMIT", + 'meta_filter': { + 'time_of_cancel': [r"(.*)JOB (\d+) CANCELLED AT (\S*) DUE TO TIME LIMIT(.*)", 3] + } + } + }, + NodeFailureError: { + 'run_err': { + 'string': "can't open /dev/ipath, network down", + 'meta_filter': { + 'nodes': [r"node(\d+)\.(\d+)can't open (\S*), network down \(err=26\)", 1] + } + } + }, + AbstractError: { + 'out': { + 'string': "a string to be found", + 'meta_filter': {} + } + } + } + + +class PBSErrorParser(AbstractErrorParser): + """ + Implementation for the PBS scheduler + PBS: job killed: walltime 932 exceeded limit 900 + PBS: job killed: walltime 46 exceeded limit 30 + PBS: job killed: vmem 2085244kb exceeded limit 1945600kb + """ + + @property + def error_definitions(self): + return { + TimeCancelError: { + 'out': { + 'string': "job killed: walltime", + 'meta_filter': { + 'broken_limit': [r"=>> PBS: job killed: walltime (\d+) exceeded limit (\d+)", 2] + } + } + }, + AbstractError: { + 'out': { + 'string': "a string to be found", + 'meta_filter': {} + } + }, + MemoryCancelError: { + 'out': { + 'string': "job killed: vmem", + 'meta_filter': { + 'broken_limit': [r"(.*)job killed: vmem (\d+)kb exceeded limit (\d+)kb", 3] + } + } + } + } + + +ALL_PARSERS = {'slurm': SlurmErrorParser, 'pbspro': PBSErrorParser, 'torque': PBSErrorParser} + + +def get_parser(scheduler, err_file, out_file=None, run_err_file=None, batch_err_file=None): + """ + Factory function to provide the parser for the specified scheduler. If the scheduler is not implemented None is + returned. The files, string, correspond to file names of the out and err files: + err_file stderr of the scheduler + out_file stdout of the scheduler + run_err_file stderr of the application + batch_err_file stderr of the submission + + Returns: + None if scheduler is not supported. + """ + cls = ALL_PARSERS.get(scheduler) + return cls if cls is None else cls(err_file, out_file, run_err_file, batch_err_file) + + +if __name__ == "__main__": + my_parser = get_parser('pbs', err_file='queue.err', out_file='queue.out', run_err_file='run.err', + batch_err_file='sbatch.err') + my_parser.parse() + print('parser.errors', my_parser.errors) + for my_error in my_parser.errors: + print(my_error) diff --git a/abipy/flowtk/tasks.py b/abipy/flowtk/tasks.py index 1de661bb5..30da9c0d0 100644 --- a/abipy/flowtk/tasks.py +++ b/abipy/flowtk/tasks.py @@ -1,41 +1,4702 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +"""This module provides functions and classes related to Task objects.""" +import os +import time +import datetime +import shutil +import collections +import abc +import copy +import ruamel.yaml as yaml +from io import StringIO +import numpy as np -from pymatgen.io.abinit.tasks import * +from pprint import pprint +from itertools import product +from monty.string import is_string, list_strings +from monty.termcolor import colored, cprint +from monty.collections import AttrDict +from monty.functools import lazy_property, return_none_if_raise +from monty.json import MSONable +from monty.fnmatch import WildCard +from pymatgen.core.units import Memory +from pymatgen.util.serialization import json_pretty_dump, pmg_serialize +from .utils import File, Directory, irdvars_for_ext, abi_splitext, FilepathFixer, Condition, SparseHistogram +from .qadapters import make_qadapter, QueueAdapter, QueueAdapterError +from . import qutils as qu +from .db import DBConnector +from .nodes import Status, Node, NodeError, NodeResults, FileNode #, check_spectator +from . import abiinspect +from . import events +from .abitimer import AbinitTimerParser -class BoxcuttedPhononTask(PhononTask): +__author__ = "Matteo Giantomassi" +__copyright__ = "Copyright 2013, The Materials Project" +__version__ = "0.1" +__maintainer__ = "Matteo Giantomassi" + +__all__ = [ + "TaskManager", + "AbinitBuild", + "ParalHintsParser", + "ParalHints", + "AbinitTask", + "ScfTask", + "NscfTask", + "RelaxTask", + "DdkTask", + "EffMassTask", + "PhononTask", + "ElasticTask", + "SigmaTask", + "EphTask", + "OpticTask", + "AnaddbTask", + "set_user_config_taskmanager", +] + +import logging +logger = logging.getLogger(__name__) + +# Tools and helper functions. + + +def straceback(): + """Returns a string with the traceback.""" + import traceback + return traceback.format_exc() + + +def nmltostring(nml): + """Convert a dictionary representing a Fortran namelist into a string.""" + if not isinstance(nml, dict): + raise ValueError("nml should be a dict !") + + curstr = "" + for key, group in nml.items(): + namelist = ["&" + key] + for k, v in group.items(): + if isinstance(v, list) or isinstance(v, tuple): + namelist.append(k + " = " + ",".join(map(str, v)) + ",") + elif is_string(v): + namelist.append(k + " = '" + str(v) + "',") + else: + namelist.append(k + " = " + str(v) + ",") + namelist.append("/") + curstr = curstr + "\n".join(namelist) + "\n" + + return curstr + + +class TaskResults(NodeResults): + + JSON_SCHEMA = NodeResults.JSON_SCHEMA.copy() + JSON_SCHEMA["properties"] = { + "executable": {"type": "string", "required": True}, + } + + @classmethod + def from_node(cls, task): + """Initialize an instance from an |AbinitTask| instance.""" + new = super().from_node(task) + + new.update( + executable=task.executable, + #executable_version: + #task_events= + pseudos=[p.as_dict() for p in task.input.pseudos], + #input=task.input + ) + + new.register_gridfs_files( + run_abi=(task.input_file.path, "t"), + run_abo=(task.output_file.path, "t"), + ) + + return new + + +class ParalConf(AttrDict): + """ + This object store the parameters associated to one + of the possible parallel configurations reported by ABINIT. + Essentially it is a dictionary whose values can also be accessed + as attributes. It also provides default values for selected keys + that might not be present in the ABINIT dictionary. + + Example: + + --- !Autoparal + info: + version: 1 + autoparal: 1 + max_ncpus: 108 + configurations: + - tot_ncpus: 2 # Total number of CPUs + mpi_ncpus: 2 # Number of MPI processes. + omp_ncpus: 1 # Number of OMP threads (1 if not present) + mem_per_cpu: 10 # Estimated memory requirement per MPI processor in Megabytes. + efficiency: 0.4 # 1.0 corresponds to an "expected" optimal efficiency (strong scaling). + vars: { # Dictionary with the variables that should be added to the input. + varname1: varvalue1 + varname2: varvalue2 + } + - + ... + + For paral_kgb we have: + nproc npkpt npspinor npband npfft bandpp weight + 108 1 1 12 9 2 0.25 + 108 1 1 108 1 2 27.00 + 96 1 1 24 4 1 1.50 + 84 1 1 12 7 2 0.25 + """ + _DEFAULTS = { + "omp_ncpus": 1, + "mem_per_cpu": 0.0, + "vars": {} + } + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + # Add default values if not already in self. + for k, v in self._DEFAULTS.items(): + if k not in self: + self[k] = v + + def __str__(self): + stream = StringIO() + pprint(self, stream=stream) + return stream.getvalue() + + @property + def num_cores(self): + return self.mpi_procs * self.omp_threads + + @property + def mem_per_proc(self): + return self.mem_per_cpu + + @property + def mpi_procs(self): + return self.mpi_ncpus + + @property + def omp_threads(self): + return self.omp_ncpus + + @property + def speedup(self): + """Estimated speedup reported by ABINIT.""" + return self.efficiency * self.num_cores + + @property + def tot_mem(self): + """Estimated total memory in Mbs (computed from mem_per_proc)""" + return self.mem_per_proc * self.mpi_procs + + +class ParalHintsError(Exception): + """Base error class for `ParalHints`.""" + + +class ParalHintsParser(object): + + Error = ParalHintsError + + def __init__(self): + # Used to push error strings. + self._errors = collections.deque(maxlen=100) + + def add_error(self, errmsg): + self._errors.append(errmsg) + + def parse(self, filename): + """ + Read the `AutoParal` section (YAML format) from filename. + Assumes the file contains only one section. + """ + with abiinspect.YamlTokenizer(filename) as r: + doc = r.next_doc_with_tag("!Autoparal") + try: + d = yaml.safe_load(doc.text_notag) + return ParalHints(info=d["info"], confs=d["configurations"]) + except Exception: + import traceback + sexc = traceback.format_exc() + err_msg = "Wrong YAML doc:\n%s\n\nException:\n%s" % (doc.text, sexc) + self.add_error(err_msg) + raise self.Error(err_msg) + + +class ParalHints(collections.abc.Iterable): + """ + Iterable with the hints for the parallel execution reported by ABINIT. + """ + Error = ParalHintsError + + def __init__(self, info, confs): + self.info = info + self._confs = [ParalConf(**d) for d in confs] + + @classmethod + def from_mpi_omp_lists(cls, mpi_procs, omp_threads): + """ + Build a list of Parallel configurations from two lists + containing the number of MPI processes and the number of OpenMP threads + i.e. product(mpi_procs, omp_threads). + The configuration have parallel efficiency set to 1.0 and no input variables. + Mainly used for preparing benchmarks. + """ + info = {} + confs = [ParalConf(mpi_ncpus=p, omp_ncpus=p, efficiency=1.0) + for p, t in product(mpi_procs, omp_threads)] + + return cls(info, confs) + + def __getitem__(self, key): + return self._confs[key] + + def __iter__(self): + return self._confs.__iter__() + + def __len__(self): + return self._confs.__len__() + + def __repr__(self): + return "\n".join(str(conf) for conf in self) + + def __str__(self): + return repr(self) + + @lazy_property + def max_cores(self): + """Maximum number of cores.""" + return max(c.mpi_procs * c.omp_threads for c in self) + + @lazy_property + def max_mem_per_proc(self): + """Maximum memory per MPI process.""" + return max(c.mem_per_proc for c in self) + + @lazy_property + def max_speedup(self): + """Maximum speedup.""" + return max(c.speedup for c in self) + + @lazy_property + def max_efficiency(self): + """Maximum parallel efficiency.""" + return max(c.efficiency for c in self) + + @pmg_serialize + def as_dict(self, **kwargs): + return {"info": self.info, "confs": self._confs} + + @classmethod + def from_dict(cls, d): + return cls(info=d["info"], confs=d["confs"]) + + def copy(self): + """Shallow copy of self.""" + return copy.copy(self) + + def select_with_condition(self, condition, key=None): + """ + Remove all the configurations that do not satisfy the given condition. + + Args: + condition: dict or :class:`Condition` object with operators expressed with a Mongodb-like syntax + key: Selects the sub-dictionary on which condition is applied, e.g. key="vars" + if we have to filter the configurations depending on the values in vars + """ + condition = Condition.as_condition(condition) + new_confs = [] + + for conf in self: + # Select the object on which condition is applied + obj = conf if key is None else AttrDict(conf[key]) + add_it = condition(obj=obj) + #if key is "vars": print("conf", conf, "added:", add_it) + if add_it: new_confs.append(conf) + + self._confs = new_confs + + def sort_by_efficiency(self, reverse=True): + """Sort the configurations in place. items with highest efficiency come first""" + self._confs.sort(key=lambda c: c.efficiency, reverse=reverse) + return self + + def sort_by_speedup(self, reverse=True): + """Sort the configurations in place. items with highest speedup come first""" + self._confs.sort(key=lambda c: c.speedup, reverse=reverse) + return self + + def sort_by_mem_per_proc(self, reverse=False): + """Sort the configurations in place. items with lowest memory per proc come first.""" + # Avoid sorting if mem_per_cpu is not available. + if any(c.mem_per_proc > 0.0 for c in self): + self._confs.sort(key=lambda c: c.mem_per_proc, reverse=reverse) + return self + + def multidimensional_optimization(self, priorities=("speedup", "efficiency")): + # Mapping property --> options passed to sparse_histogram + opts = dict(speedup=dict(step=1.0), efficiency=dict(step=0.1), mem_per_proc=dict(memory=1024)) + #opts = dict(zip(priorities, bin_widths)) + + opt_confs = self._confs + for priority in priorities: + histogram = SparseHistogram(opt_confs, key=lambda c: getattr(c, priority), **opts[priority]) + pos = 0 if priority == "mem_per_proc" else -1 + opt_confs = histogram.values[pos] + + #histogram.plot(show=True, savefig="hello.pdf") + return self.__class__(info=self.info, confs=opt_confs) + + #def histogram_efficiency(self, step=0.1): + # """Returns a :class:`SparseHistogram` with configuration grouped by parallel efficiency.""" + # return SparseHistogram(self._confs, key=lambda c: c.efficiency, step=step) + + #def histogram_speedup(self, step=1.0): + # """Returns a :class:`SparseHistogram` with configuration grouped by parallel speedup.""" + # return SparseHistogram(self._confs, key=lambda c: c.speedup, step=step) + + #def histogram_memory(self, step=1024): + # """Returns a :class:`SparseHistogram` with configuration grouped by memory.""" + # return SparseHistogram(self._confs, key=lambda c: c.speedup, step=step) + + #def filter(self, qadapter): + # """Return a new list of configurations that can be executed on the `QueueAdapter` qadapter.""" + # new_confs = [pconf for pconf in self if qadapter.can_run_pconf(pconf)] + # return self.__class__(info=self.info, confs=new_confs) + + def get_ordered_with_policy(self, policy, max_ncpus): + """ + Sort and return a new list of configurations ordered according to the :class:`TaskPolicy` policy. + """ + # Build new list since we are gonna change the object in place. + hints = self.__class__(self.info, confs=[c for c in self if c.num_cores <= max_ncpus]) + + # First select the configurations satisfying the condition specified by the user (if any) + bkp_hints = hints.copy() + if policy.condition: + logger.info("Applying condition %s" % str(policy.condition)) + hints.select_with_condition(policy.condition) + + # Undo change if no configuration fullfills the requirements. + if not hints: + hints = bkp_hints + logger.warning("Empty list of configurations after policy.condition") + + # Now filter the configurations depending on the values in vars + bkp_hints = hints.copy() + if policy.vars_condition: + logger.info("Applying vars_condition %s" % str(policy.vars_condition)) + hints.select_with_condition(policy.vars_condition, key="vars") + + # Undo change if no configuration fullfills the requirements. + if not hints: + hints = bkp_hints + logger.warning("Empty list of configurations after policy.vars_condition") + + if len(policy.autoparal_priorities) == 1: + # Example: hints.sort_by_speedup() + if policy.autoparal_priorities[0] in ['efficiency', 'speedup', 'mem_per_proc']: + getattr(hints, "sort_by_" + policy.autoparal_priorities[0])() + elif isinstance(policy.autoparal_priorities[0], collections.Mapping): + if policy.autoparal_priorities[0]['meta_priority'] == 'highest_speedup_minimum_efficiency_cutoff': + min_efficiency = policy.autoparal_priorities[0].get('minimum_efficiency', 1.0) + hints.select_with_condition({'efficiency': {'$gte': min_efficiency}}) + hints.sort_by_speedup() + else: + hints = hints.multidimensional_optimization(priorities=policy.autoparal_priorities) + if len(hints) == 0: raise ValueError("len(hints) == 0") + + #TODO: make sure that num_cores == 1 is never selected when we have more than one configuration + #if len(hints) > 1: + # hints.select_with_condition(dict(num_cores={"$eq": 1))) + + # Return final (orderded ) list of configurations (best first). + return hints + + +class TaskPolicy(object): + """ + This object stores the parameters used by the |TaskManager| to + create the submission script and/or to modify the ABINIT variables + governing the parallel execution. A `TaskPolicy` object contains + a set of variables that specify the launcher, as well as the options + and the conditions used to select the optimal configuration for the parallel run + """ + @classmethod + def as_policy(cls, obj): + """ + Converts an object obj into a `:class:`TaskPolicy. Accepts: + + * None + * TaskPolicy + * dict-like object + """ + if obj is None: + # Use default policy. + return TaskPolicy() + else: + if isinstance(obj, cls): + return obj + elif isinstance(obj, collections.abc.Mapping): + return cls(**obj) + else: + raise TypeError("Don't know how to convert type %s to %s" % (type(obj), cls)) + + @classmethod + def autodoc(cls): + return """ + autoparal: # (integer). 0 to disable the autoparal feature (DEFAULT: 1 i.e. autoparal is on) + condition: # condition used to filter the autoparal configurations (Mongodb-like syntax). + # DEFAULT: empty i.e. ignored. + vars_condition: # Condition used to filter the list of ABINIT variables reported by autoparal + # (Mongodb-like syntax). DEFAULT: empty i.e. ignored. + frozen_timeout: # A job is considered frozen and its status is set to ERROR if no change to + # the output file has been done for `frozen_timeout` seconds. Accepts int with seconds or + # string in slurm form i.e. days-hours:minutes:seconds. DEFAULT: 1 hour. + precedence: # Under development. + autoparal_priorities: # Under development. +""" + + def __init__(self, **kwargs): + """ + See autodoc + """ + self.autoparal = kwargs.pop("autoparal", 1) + self.condition = Condition(kwargs.pop("condition", {})) + self.vars_condition = Condition(kwargs.pop("vars_condition", {})) + self.precedence = kwargs.pop("precedence", "autoparal_conf") + self.autoparal_priorities = kwargs.pop("autoparal_priorities", ["speedup"]) + #self.autoparal_priorities = kwargs.pop("autoparal_priorities", ["speedup", "efficiecy", "memory"] + # TODO frozen_timeout could be computed as a fraction of the timelimit of the qadapter! + self.frozen_timeout = qu.slurm_parse_timestr(kwargs.pop("frozen_timeout", "0-1:00:00")) + + if kwargs: + raise ValueError("Found invalid keywords in policy section:\n %s" % str(kwargs.keys())) + + # Consistency check. + if self.precedence not in ("qadapter", "autoparal_conf"): + raise ValueError("Wrong value for policy.precedence, should be qadapter or autoparal_conf") + + def __str__(self): + lines = [] + app = lines.append + for k, v in self.__dict__.items(): + if k.startswith("_"): continue + app("%s: %s" % (k, v)) + return "\n".join(lines) + + +class ManagerIncreaseError(Exception): + """ + Exception raised by the manager if the increase request failed + """ + + +class FixQueueCriticalError(Exception): + """ + Error raised when an error could not be fixed at the task level + """ + + +# Global variable used to store the task manager returned by `from_user_config`. +_USER_CONFIG_TASKMANAGER = None + + +def set_user_config_taskmanager(manager): + """Change the default manager returned by TaskManager.from_user_config.""" + global _USER_CONFIG_TASKMANAGER + _USER_CONFIG_TASKMANAGER = manager + + +class TaskManager(MSONable): + """ + A `TaskManager` is responsible for the generation of the job script and the submission + of the task, as well as for the specification of the parameters passed to the resource manager + (e.g. Slurm, PBS ...) and/or the run-time specification of the ABINIT variables governing the parallel execution. + A `TaskManager` delegates the generation of the submission script and the submission of the task to the :class:`QueueAdapter`. + A `TaskManager` has a :class:`TaskPolicy` that governs the specification of the parameters for the parallel executions. + Ideally, the TaskManager should be the **main entry point** used by the task to deal with job submission/optimization + """ + YAML_FILE = "manager.yml" + USER_CONFIG_DIR = os.path.join(os.path.expanduser("~"), ".abinit", "abipy") + + ENTRIES = {"policy", "qadapters", "db_connector", "batch_adapter"} + + @classmethod + def autodoc(cls): + s = """ +# TaskManager configuration file (YAML Format) + +policy: + # Dictionary with options used to control the execution of the tasks. + +qadapters: + # List of qadapters objects (mandatory) + - # qadapter_1 + - # qadapter_2 + +db_connector: + # Connection to MongoDB database (optional) + +batch_adapter: + # Adapter used to submit flows with batch script. (optional) + +########################################## +# Individual entries are documented below: +########################################## + +""" + s += "policy: " + TaskPolicy.autodoc() + "\n" + s += "qadapter: " + QueueAdapter.autodoc() + "\n" + return s + + @classmethod + def from_user_config(cls): + """ + Initialize the |TaskManager| from the YAML file 'manager.yaml'. + Search first in the working directory and then in the AbiPy configuration directory. + + Raises: + RuntimeError if file is not found. + """ + global _USER_CONFIG_TASKMANAGER + if _USER_CONFIG_TASKMANAGER is not None: + return _USER_CONFIG_TASKMANAGER + + # Try in the current directory then in user configuration directory. + path = os.path.join(os.getcwd(), cls.YAML_FILE) + if not os.path.exists(path): + path = os.path.join(cls.USER_CONFIG_DIR, cls.YAML_FILE) + + if not os.path.exists(path): + raise RuntimeError(colored( + "\nCannot locate %s neither in current directory nor in %s\n" + "PLEASE READ THIS: !!!\n" + "To use AbiPy to run jobs this file must be present\n" + "It provides a description of the cluster/computer you are running on\n" + "Examples are provided in abipy/data/managers." % (cls.YAML_FILE, path), color="red")) + + _USER_CONFIG_TASKMANAGER = cls.from_file(path) + return _USER_CONFIG_TASKMANAGER + + @classmethod + def from_file(cls, filename): + """Read the configuration parameters from the Yaml file filename.""" + try: + with open(filename, "rt") as fh: + return cls.from_dict(yaml.safe_load(fh)) + except Exception as exc: + print("Error while reading TaskManager parameters from %s\n" % filename) + raise + + @classmethod + def from_string(cls, s): + """Create an instance from string s containing a YAML dictionary.""" + return cls.from_dict(yaml.safe_load(s)) + + @classmethod + def as_manager(cls, obj): + """ + Convert obj into TaskManager instance. Accepts string, filepath, dictionary, `TaskManager` object. + If obj is None, the manager is initialized from the user config file. + """ + if isinstance(obj, cls): return obj + if obj is None: return cls.from_user_config() + + if is_string(obj): + if os.path.exists(obj): + return cls.from_file(obj) + else: + return cls.from_string(obj) + + elif isinstance(obj, collections.abc.Mapping): + return cls.from_dict(obj) + else: + raise TypeError("Don't know how to convert type %s to TaskManager" % type(obj)) + + @classmethod + def from_dict(cls, d): + """Create an instance from a dictionary.""" + return cls(**{k: v for k, v in d.items() if k in cls.ENTRIES}) + + @pmg_serialize + def as_dict(self): + return copy.deepcopy(self._kwargs) + + def __init__(self, **kwargs): + """ + Args: + policy:None + qadapters:List of qadapters in YAML format + db_connector:Dictionary with data used to connect to the database (optional) + """ + # Keep a copy of kwargs + self._kwargs = copy.deepcopy(kwargs) + + self.policy = TaskPolicy.as_policy(kwargs.pop("policy", None)) + + # Initialize database connector (if specified) + self.db_connector = DBConnector(**kwargs.pop("db_connector", {})) + + # Build list of QAdapters. Neglect entry if priority == 0 or `enabled: no" + qads = [] + for d in kwargs.pop("qadapters"): + if d.get("enabled", False): continue + qad = make_qadapter(**d) + if qad.priority > 0: + qads.append(qad) + elif qad.priority < 0: + raise ValueError("qadapter cannot have negative priority:\n %s" % qad) + + if not qads: + raise ValueError("Received emtpy list of qadapters") + #if len(qads) != 1: + # raise NotImplementedError("For the time being multiple qadapters are not supported! Please use one adapter") + + # Order qdapters according to priority. + qads = sorted(qads, key=lambda q: q.priority) + priorities = [q.priority for q in qads] + if len(priorities) != len(set(priorities)): + raise ValueError("Two or more qadapters have same priority. This is not allowed. Check taskmanager.yml") + + self._qads, self._qadpos = tuple(qads), 0 + + # Initialize the qadapter for batch script submission. + d = kwargs.pop("batch_adapter", None) + self.batch_adapter = None + if d: self.batch_adapter = make_qadapter(**d) + #print("batch_adapter", self.batch_adapter) + + if kwargs: + raise ValueError("Found invalid keywords in the taskmanager file:\n %s" % str(list(kwargs.keys()))) + + @lazy_property + def abinit_build(self): + """:class:`AbinitBuild` object with Abinit version and options used to build the code""" + return AbinitBuild(manager=self) + + def to_shell_manager(self, mpi_procs=1): + """ + Returns a new |TaskManager| with the same parameters as self but replace the :class:`QueueAdapter` + with a :class:`ShellAdapter` with mpi_procs so that we can submit the job without passing through the queue. + """ + my_kwargs = copy.deepcopy(self._kwargs) + my_kwargs["policy"] = TaskPolicy(autoparal=0) + + # On BlueGene we need at least two qadapters. + # One for running jobs on the computing nodes and another one + # for running small jobs on the fronted. These two qadapters + # will have different enviroments and different executables. + # If None of the q-adapters has qtype==shell, we change qtype to shell + # and we return a new Manager for sequential jobs with the same parameters as self. + # If the list contains a qadapter with qtype == shell, we ignore the remaining qadapters + # when we build the new Manager. + has_shell_qad = False + for d in my_kwargs["qadapters"]: + if d["queue"]["qtype"] == "shell": has_shell_qad = True + if has_shell_qad: + my_kwargs["qadapters"] = [d for d in my_kwargs["qadapters"] if d["queue"]["qtype"] == "shell"] + + for d in my_kwargs["qadapters"]: + d["queue"]["qtype"] = "shell" + d["limits"]["min_cores"] = mpi_procs + d["limits"]["max_cores"] = mpi_procs + + # If shell_runner is specified, replace mpi_runner with shell_runner + # in the script used to run jobs on the frontend. + # On same machines based on Slurm, indeed, mpirun/mpiexec is not available + # and jobs should be executed with `srun -n4 exec` when running on the computing nodes + # or with `exec` when running in sequential on the frontend. + if "job" in d and "shell_runner" in d["job"]: + shell_runner = d["job"]["shell_runner"] + #print("shell_runner:", shell_runner, type(shell_runner)) + if not shell_runner or shell_runner == "None": shell_runner = "" + d["job"]["mpi_runner"] = shell_runner + #print("shell_runner:", shell_runner) + + #print(my_kwargs) + new = self.__class__(**my_kwargs) + new.set_mpi_procs(mpi_procs) + + return new + + def new_with_fixed_mpi_omp(self, mpi_procs, omp_threads): + """ + Return a new `TaskManager` in which autoparal has been disabled. + The jobs will be executed with `mpi_procs` MPI processes and `omp_threads` OpenMP threads. + Useful for generating input files for benchmarks. + """ + new = self.deepcopy() + new.policy.autoparal = 0 + new.set_mpi_procs(mpi_procs) + new.set_omp_threads(omp_threads) + return new + + @property + def has_queue(self): + """True if we are submitting jobs via a queue manager.""" + return self.qadapter.QTYPE.lower() != "shell" + + @property + def qads(self): + """List of :class:`QueueAdapter` objects sorted according to priorities (highest comes first)""" + return self._qads + + @property + def qadapter(self): + """The qadapter used to submit jobs.""" + return self._qads[self._qadpos] + + def select_qadapter(self, pconfs): + """ + Given a list of parallel configurations, pconfs, this method select an `optimal` configuration + according to some criterion as well as the :class:`QueueAdapter` to use. + + Args: + pconfs: :class:`ParalHints` object with the list of parallel configurations + + Returns: + :class:`ParallelConf` object with the `optimal` configuration. + """ + # Order the list of configurations according to policy. + policy, max_ncpus = self.policy, self.max_cores + pconfs = pconfs.get_ordered_with_policy(policy, max_ncpus) + + if policy.precedence == "qadapter": + + # Try to run on the qadapter with the highest priority. + for qadpos, qad in enumerate(self.qads): + possible_pconfs = [pc for pc in pconfs if qad.can_run_pconf(pc)] + + if qad.allocation == "nodes": + #if qad.allocation in ["nodes", "force_nodes"]: + # Select the configuration divisible by nodes if possible. + for pconf in possible_pconfs: + if pconf.num_cores % qad.hw.cores_per_node == 0: + return self._use_qadpos_pconf(qadpos, pconf) + + # Here we select the first one. + if possible_pconfs: + return self._use_qadpos_pconf(qadpos, possible_pconfs[0]) + + elif policy.precedence == "autoparal_conf": + # Try to run on the first pconf irrespectively of the priority of the qadapter. + for pconf in pconfs: + for qadpos, qad in enumerate(self.qads): + + if qad.allocation == "nodes" and not pconf.num_cores % qad.hw.cores_per_node == 0: + continue # Ignore it. not very clean + + if qad.can_run_pconf(pconf): + return self._use_qadpos_pconf(qadpos, pconf) + + else: + raise ValueError("Wrong value of policy.precedence = %s" % policy.precedence) + + # No qadapter could be found + raise RuntimeError("Cannot find qadapter for this run!") + + def _use_qadpos_pconf(self, qadpos, pconf): + """ + This function is called when we have accepted the :class:`ParalConf` pconf. + Returns pconf + """ + self._qadpos = qadpos + + # Change the number of MPI/OMP cores. + self.set_mpi_procs(pconf.mpi_procs) + if self.has_omp: self.set_omp_threads(pconf.omp_threads) + + # Set memory per proc. + #FIXME: Fixer may have changed the memory per proc and should not be resetted by ParalConf + #self.set_mem_per_proc(pconf.mem_per_proc) + return pconf + + def __str__(self): + """String representation.""" + lines = [] + app = lines.append + #app("[Task policy]\n%s" % str(self.policy)) + + for i, qad in enumerate(self.qads): + app("[Qadapter %d]\n%s" % (i, str(qad))) + app("Qadapter selected: %d" % self._qadpos) + + if self.has_db: + app("[MongoDB database]:") + app(str(self.db_connector)) + + return "\n".join(lines) + + @property + def has_db(self): + """True if we are using MongoDB database""" + return bool(self.db_connector) + + @property + def has_omp(self): + """True if we are using OpenMP parallelization.""" + return self.qadapter.has_omp + + @property + def num_cores(self): + """Total number of CPUs used to run the task.""" + return self.qadapter.num_cores + + @property + def mpi_procs(self): + """Number of MPI processes.""" + return self.qadapter.mpi_procs + + @property + def mem_per_proc(self): + """Memory per MPI process.""" + return self.qadapter.mem_per_proc + + @property + def omp_threads(self): + """Number of OpenMP threads""" + return self.qadapter.omp_threads + + def deepcopy(self): + """Deep copy of self.""" + return copy.deepcopy(self) + + def set_mpi_procs(self, mpi_procs): + """Set the number of MPI processes to use.""" + self.qadapter.set_mpi_procs(mpi_procs) + + def set_omp_threads(self, omp_threads): + """Set the number of OpenMp threads to use.""" + self.qadapter.set_omp_threads(omp_threads) + + def set_mem_per_proc(self, mem_mb): + """Set the memory (in Megabytes) per CPU.""" + self.qadapter.set_mem_per_proc(mem_mb) + + @property + def max_cores(self): + """ + Maximum number of cores that can be used. + This value is mainly used in the autoparal part to get the list of possible configurations. + """ + return max(q.hint_cores for q in self.qads) + + def get_njobs_in_queue(self, username=None): + """ + returns the number of jobs in the queue, + returns None when the number of jobs cannot be determined. + + Args: + username: (str) the username of the jobs to count (default is to autodetect) + """ + return self.qadapter.get_njobs_in_queue(username=username) + + def cancel(self, job_id): + """Cancel the job. Returns exit status.""" + return self.qadapter.cancel(job_id) + + def write_jobfile(self, task, **kwargs): + """ + Write the submission script. Return the path of the script + + ================ ============================================ + kwargs Meaning + ================ ============================================ + exec_args List of arguments passed to task.executable. + Default: no arguments. + + ================ ============================================ + """ + script = self.qadapter.get_script_str( + job_name=task.name, + launch_dir=task.workdir, + executable=task.executable, + qout_path=task.qout_file.path, + qerr_path=task.qerr_file.path, + stdin=task.files_file.path, + stdout=task.log_file.path, + stderr=task.stderr_file.path, + exec_args=kwargs.pop("exec_args", []), + ) + + # Write the script. + with open(task.job_file.path, "w") as fh: + fh.write(script) + task.job_file.chmod(0o740) + return task.job_file.path + + def launch(self, task, **kwargs): + """ + Build the input files and submit the task via the :class:`Qadapter` + + Args: + task: |Task| object. + + Returns: + Process object. + """ + if task.status == task.S_LOCKED: + raise ValueError("You shall not submit a locked task!") + + # Build the task + task.build() + + # Pass information on the time limit to Abinit (we always assume ndtset == 1) + if isinstance(task, AbinitTask): + args = kwargs.get("exec_args", []) + if args is None: args = [] + args = args[:] + args.append("--timelimit %s" % qu.time2slurm(self.qadapter.timelimit)) + kwargs["exec_args"] = args + + # Write the submission script + script_file = self.write_jobfile(task, **kwargs) + + # Submit the task and save the queue id. + try: + qjob, process = self.qadapter.submit_to_queue(script_file) + task.set_status(task.S_SUB, msg='Submitted to queue') + task.set_qjob(qjob) + return process + + except self.qadapter.MaxNumLaunchesError as exc: + # TODO: Here we should try to switch to another qadapter + # 1) Find a new parallel configuration in those stored in task.pconfs + # 2) Change the input file. + # 3) Regenerate the submission script + # 4) Relaunch + task.set_status(task.S_ERROR, msg="max_num_launches reached: %s" % str(exc)) + raise + + def get_collection(self, **kwargs): + """Return the MongoDB collection used to store the results.""" + return self.db_connector.get_collection(**kwargs) + + def increase_mem(self): + # OLD + # with GW calculations in mind with GW mem = 10, + # the response fuction is in memory and not distributed + # we need to increase memory if jobs fail ... + # return self.qadapter.more_mem_per_proc() + try: + self.qadapter.more_mem_per_proc() + except QueueAdapterError: + # here we should try to switch to an other qadapter + raise ManagerIncreaseError('manager failed to increase mem') + + def increase_ncpus(self): + """ + increase the number of cpus, first ask the current qadapter, if that one raises a QadapterIncreaseError + switch to the next qadapter. If all fail raise an ManagerIncreaseError + """ + try: + self.qadapter.more_cores() + except QueueAdapterError: + # here we should try to switch to an other qadapter + raise ManagerIncreaseError('manager failed to increase ncpu') + + def increase_resources(self): + try: + self.qadapter.more_cores() + return + except QueueAdapterError: + pass + + try: + self.qadapter.more_mem_per_proc() + except QueueAdapterError: + # here we should try to switch to an other qadapter + raise ManagerIncreaseError('manager failed to increase resources') + + def exclude_nodes(self, nodes): + try: + self.qadapter.exclude_nodes(nodes=nodes) + except QueueAdapterError: + # here we should try to switch to an other qadapter + raise ManagerIncreaseError('manager failed to exclude nodes') + + def increase_time(self): + try: + self.qadapter.more_time() + except QueueAdapterError: + # here we should try to switch to an other qadapter + raise ManagerIncreaseError('manager failed to increase time') + + +class AbinitBuild(object): + """ + This object stores information on the options used to build Abinit + + .. attribute:: info + String with build information as produced by `abinit -b` + + .. attribute:: version + Abinit version number e.g 8.0.1 (string) + + .. attribute:: has_netcdf + True if netcdf is enabled. + + .. attribute:: has_libxc + True if libxc is enabled. + + .. attribute:: has_omp + True if OpenMP is enabled. + + .. attribute:: has_mpi + True if MPI is enabled. + + .. attribute:: has_mpiio + True if MPI-IO is supported. + """ + def __init__(self, workdir=None, manager=None): + manager = TaskManager.as_manager(manager).to_shell_manager(mpi_procs=1) + + # Build a simple manager to run the job in a shell subprocess + import tempfile + workdir = tempfile.mkdtemp() if workdir is None else workdir + + # Generate a shell script to execute `abinit -b` + stdout = os.path.join(workdir, "run.abo") + script = manager.qadapter.get_script_str( + job_name="abinit_b", + launch_dir=workdir, + executable="abinit", + qout_path=os.path.join(workdir, "queue.qout"), + qerr_path=os.path.join(workdir, "queue.qerr"), + #stdin=os.path.join(workdir, "run.files"), + stdout=stdout, + stderr=os.path.join(workdir, "run.err"), + exec_args=["-b"], + ) + + # Execute the script. + script_file = os.path.join(workdir, "job.sh") + with open(script_file, "wt") as fh: + fh.write(script) + qjob, process = manager.qadapter.submit_to_queue(script_file) + process.wait() + + if process.returncode != 0: + logger.critical("Error while executing %s" % script_file) + print("stderr:\n", process.stderr.read()) + #print("stdout:", process.stdout.read()) + + # To avoid: ResourceWarning: unclosed file <_io.BufferedReader name=87> in py3k + process.stderr.close() + + with open(stdout, "rt") as fh: + self.info = fh.read() + + # info string has the following format. + """ + === Build Information === + Version : 8.0.1 + Build target : x86_64_darwin15.0.0_gnu5.3 + Build date : 20160122 + + === Compiler Suite === + C compiler : gnu + C++ compiler : gnuApple + Fortran compiler : gnu5.3 + CFLAGS : -g -O2 -mtune=native -march=native + CXXFLAGS : -g -O2 -mtune=native -march=native + FCFLAGS : -g -ffree-line-length-none + FC_LDFLAGS : + + === Optimizations === + Debug level : basic + Optimization level : standard + Architecture : unknown_unknown + + === Multicore === + Parallel build : yes + Parallel I/O : yes + openMP support : no + GPU support : no + + === Connectors / Fallbacks === + Connectors on : yes + Fallbacks on : yes + DFT flavor : libxc-fallback+atompaw-fallback+wannier90-fallback + FFT flavor : none + LINALG flavor : netlib + MATH flavor : none + TIMER flavor : abinit + TRIO flavor : netcdf+etsf_io-fallback + + === Experimental features === + Bindings : @enable_bindings@ + Exports : no + GW double-precision : yes + + === Bazaar branch information === + Branch ID : gmatteo@gmac-20160112110440-lf6exhneqim9082h + Revision : 1226 + Committed : 0 + """ + self.version = "0.0.0" + self.has_netcdf = False + self.has_omp = False + self.has_mpi, self.has_mpiio = False, False + self.has_libxc = False + + def yesno2bool(line): + ans = line.split()[-1].lower() + try: + return dict(yes=True, no=False, auto=True)[ans] + except KeyError: + # Temporary hack for abinit v9 + return True + + # Parse info. + # flavor options were used in Abinit v8 + for line in self.info.splitlines(): + if "Version" in line: self.version = line.split()[-1] + if "TRIO flavor" in line: + self.has_netcdf = "netcdf" in line + if "NetCDF Fortran" in line: + self.has_netcdf = yesno2bool(line) + if "DFT flavor" in line: + self.has_libxc = "libxc" in line + if "LibXC" in line: + self.has_libxc = yesno2bool(line) + if "openMP support" in line: + self.has_omp = yesno2bool(line) + if "Parallel build" in line: + ans = line.split()[-1].lower() + if ans == "@enable_mpi@": + # Temporary hack for abinit v9 + self.has_mpi = True + else: + self.has_mpi = yesno2bool(line) + if "Parallel I/O" in line: + self.has_mpiio = yesno2bool(line) + + # Temporary hack for abinit v9 + #from abipy.core.testing import cmp_version + #if cmp_version(self.version, "9.0.0", op=">="): + # self.has_netcdf = True + + def __str__(self): + lines = [] + app = lines.append + app("Abinit Build Information:") + app(" Abinit version: %s" % self.version) + app(" MPI: %s, MPI-IO: %s, OpenMP: %s" % (self.has_mpi, self.has_mpiio, self.has_omp)) + app(" Netcdf: %s" % self.has_netcdf) + return "\n".join(lines) + + def version_ge(self, version_string): + """True is Abinit version is >= version_string""" + return self.compare_version(version_string, ">=") + + def compare_version(self, version_string, op): + """Compare Abinit version to `version_string` with operator `op`""" + from pkg_resources import parse_version + from monty.operator import operator_from_str + op = operator_from_str(op) + return op(parse_version(self.version), parse_version(version_string)) + + +class FakeProcess(object): + """ + This object is attached to a |Task| instance if the task has not been submitted + This trick allows us to simulate a process that is still running so that + we can safely poll task.process. + """ + def poll(self): + return None + + def wait(self): + raise RuntimeError("Cannot wait a FakeProcess") + + def communicate(self, input=None): + raise RuntimeError("Cannot communicate with a FakeProcess") + + def kill(self): + raise RuntimeError("Cannot kill a FakeProcess") + + @property + def returncode(self): + return None + + +class MyTimedelta(datetime.timedelta): + """A customized version of timedelta whose __str__ method doesn't print microseconds.""" + def __new__(cls, days, seconds, microseconds): + return datetime.timedelta.__new__(cls, days, seconds, microseconds) + + def __str__(self): + """Remove microseconds from timedelta default __str__""" + s = super().__str__() + microsec = s.find(".") + if microsec != -1: s = s[:microsec] + return s + + @classmethod + def as_timedelta(cls, delta): + """Convert delta into a MyTimedelta object.""" + # Cannot monkey patch the __class__ and must pass through __new__ as the object is immutable. + if isinstance(delta, cls): return delta + return cls(delta.days, delta.seconds, delta.microseconds) + + +class TaskDateTimes(object): + """ + Small object containing useful :class:`datetime.datatime` objects associated to important events. + + .. attributes: + + init: initialization datetime + submission: submission datetime + start: Begin of execution. + end: End of execution. + """ + def __init__(self): + self.init = datetime.datetime.now() + self.submission, self.start, self.end = None, None, None + + def __str__(self): + lines = [] + app = lines.append + + app("Initialization done on: %s" % self.init) + if self.submission is not None: app("Submitted on: %s" % self.submission) + if self.start is not None: app("Started on: %s" % self.start) + if self.end is not None: app("Completed on: %s" % self.end) + + return "\n".join(lines) + + def reset(self): + """Reinitialize the counters.""" + self = self.__class__() + + def get_runtime(self): + """:class:`timedelta` with the run-time, None if the Task is not running""" + if self.start is None: return None + + if self.end is None: + delta = datetime.datetime.now() - self.start + else: + delta = self.end - self.start + + return MyTimedelta.as_timedelta(delta) + + def get_time_inqueue(self): + """ + :class:`timedelta` with the time spent in the Queue, None if the Task is not running + + .. note: + + This value is always greater than the real value computed by the resource manager + as we start to count only when check_status sets the `Task` status to S_RUN. + """ + if self.submission is None: return None + + if self.start is None: + delta = datetime.datetime.now() - self.submission + else: + delta = self.start - self.submission + # This happens when we read the exact start datetime from the ABINIT log file. + if delta.total_seconds() < 0: delta = datetime.timedelta(seconds=0) + + return MyTimedelta.as_timedelta(delta) + + +class TaskError(NodeError): + """Base Exception for |Task| methods""" + + +class TaskRestartError(TaskError): + """Exception raised while trying to restart the |Task|.""" + + +class Task(Node, metaclass=abc.ABCMeta): + """ + A Task is a node that performs some kind of calculation. + This is base class providing low-level methods. + """ + # Use class attributes for TaskErrors so that we don't have to import them. + Error = TaskError + RestartError = TaskRestartError + + # List of `AbinitEvent` subclasses that are tested in the check_status method. + # Subclasses should provide their own list if they need to check the converge status. + CRITICAL_EVENTS = [] + + # Prefixes for Abinit (input, output, temporary) files. + Prefix = collections.namedtuple("Prefix", "idata odata tdata") + pj = os.path.join + + prefix = Prefix(pj("indata", "in"), pj("outdata", "out"), pj("tmpdata", "tmp")) + del Prefix, pj + + def __init__(self, input, workdir=None, manager=None, deps=None): + """ + Args: + input: |AbinitInput| object. + workdir: Path to the working directory. + manager: |TaskManager| object. + deps: Dictionary specifying the dependency of this node. + None means that this Task has no dependency. + """ + # Init the node + super().__init__() + + self._input = input + + if workdir is not None: + self.set_workdir(workdir) + + if manager is not None: + self.set_manager(manager) + + # Handle possible dependencies. + if deps: + self.add_deps(deps) + + # Date-time associated to submission, start and end. + self.datetimes = TaskDateTimes() + + # Count the number of restarts. + self.num_restarts = 0 + + self._qjob = None + self.queue_errors = [] + self.abi_errors = [] + + # two flags that provide, dynamically, information on the scaling behavious of a task. If any process of fixing + # finds none scaling behaviour, they should be switched. If a task type is clearly not scaling they should be + # swiched. + self.mem_scales = True + self.load_scales = True + + def __getstate__(self): + """ + Return state is pickled as the contents for the instance. + + In this case we just remove the process since Subprocess objects cannot be pickled. + This is the reason why we have to store the returncode in self._returncode instead + of using self.process.returncode. + """ + return {k: v for k, v in self.__dict__.items() if k not in ["_process"]} + + #@check_spectator + def set_workdir(self, workdir, chroot=False): + """Set the working directory. Cannot be set more than once unless chroot is True""" + if not chroot and hasattr(self, "workdir") and self.workdir != workdir: + raise ValueError("self.workdir != workdir: %s, %s" % (self.workdir, workdir)) + + self.workdir = os.path.abspath(workdir) + + # Files required for the execution. + self.input_file = File(os.path.join(self.workdir, "run.abi")) + self.output_file = File(os.path.join(self.workdir, "run.abo")) + self.files_file = File(os.path.join(self.workdir, "run.files")) + self.job_file = File(os.path.join(self.workdir, "job.sh")) + self.log_file = File(os.path.join(self.workdir, "run.log")) + self.stderr_file = File(os.path.join(self.workdir, "run.err")) + self.start_lockfile = File(os.path.join(self.workdir, "__startlock__")) + # This file is produced by Abinit if nprocs > 1 and MPI_ABORT. + self.mpiabort_file = File(os.path.join(self.workdir, "__ABI_MPIABORTFILE__")) + + # Directories with input|output|temporary data. + self.wdir = Directory(self.workdir) + self.indir = Directory(os.path.join(self.workdir, "indata")) + self.outdir = Directory(os.path.join(self.workdir, "outdata")) + self.tmpdir = Directory(os.path.join(self.workdir, "tmpdata")) + + # stderr and output file of the queue manager. Note extensions. + self.qerr_file = File(os.path.join(self.workdir, "queue.qerr")) + self.qout_file = File(os.path.join(self.workdir, "queue.qout")) + + def set_manager(self, manager): + """Set the |TaskManager| used to launch the Task.""" + self.manager = manager.deepcopy() + + @property + def work(self): + """The |Work| containing this `Task`.""" + return self._work + + def set_work(self, work): + """Set the |Work| associated to this |Task|.""" + if not hasattr(self, "_work"): + self._work = work + else: + if self._work != work: + raise ValueError("self._work != work") + + @property + def flow(self): + """The |Flow| containing this |Task|.""" + return self.work.flow + + @lazy_property + def pos(self): + """The position of the task in the |Flow|""" + for i, task in enumerate(self.work): + if self == task: + return self.work.pos, i + raise ValueError("Cannot find the position of %s in flow %s" % (self, self.flow)) + + @property + def pos_str(self): + """String representation of self.pos""" + return "w" + str(self.pos[0]) + "_t" + str(self.pos[1]) + + @property + def num_launches(self): + """ + Number of launches performed. This number includes both possible ABINIT restarts + as well as possible launches done due to errors encountered with the resource manager + or the hardware/software.""" + return sum(q.num_launches for q in self.manager.qads) + + @property + def input(self): + """AbinitInput object.""" + return self._input + + def get_inpvar(self, varname, default=None): + """Return the value of the ABINIT variable varname, None if not present.""" + return self.input.get(varname, default) + + def set_vars(self, *args, **kwargs): + """ + Set the values of the ABINIT variables in the input file. Return dict with old values. + """ + kwargs.update(dict(*args)) + old_values = {vname: self.input.get(vname) for vname in kwargs} + self.input.set_vars(**kwargs) + if kwargs or old_values: + self.history.info("Setting input variables: %s" % str(kwargs)) + self.history.info("Old values: %s" % str(old_values)) + + return old_values + + @property + def initial_structure(self): + """Initial structure of the task.""" + return self.input.structure + + def make_input(self, with_header=False): + """Construct the input file of the calculation.""" + s = str(self.input) + if with_header: s = str(self) + "\n" + s + return s + + def ipath_from_ext(self, ext): + """ + Returns the path of the input file with extension ext. + Use it when the file does not exist yet. + """ + return os.path.join(self.workdir, self.prefix.idata + "_" + ext) + + def opath_from_ext(self, ext): + """ + Returns the path of the output file with extension ext. + Use it when the file does not exist yet. + """ + return os.path.join(self.workdir, self.prefix.odata + "_" + ext) + + @property + @abc.abstractmethod + def executable(self): + """ + Path to the executable associated to the task (internally stored in self._executable). + """ + + def set_executable(self, executable): + """Set the executable associate to this task.""" + self._executable = executable + + @property + def process(self): + try: + return self._process + except AttributeError: + # Attach a fake process so that we can poll it. + return FakeProcess() + + @property + def is_abinit_task(self): + """True if this task is a subclass of AbinitTask.""" + return isinstance(self, AbinitTask) + + @property + def is_anaddb_task(self): + """True if this task is a subclass of OpticTask.""" + return isinstance(self, AnaddbTask) + + @property + def is_optic_task(self): + """True if this task is a subclass of OpticTask.""" + return isinstance(self, OpticTask) + + @property + def is_completed(self): + """True if the task has been executed.""" + return self.status >= self.S_DONE + + @property + def can_run(self): + """The task can run if its status is < S_SUB and all the other dependencies (if any) are done!""" + all_ok = all(stat == self.S_OK for stat in self.deps_status) + return self.status < self.S_SUB and self.status != self.S_LOCKED and all_ok + + #@check_spectator + def cancel(self): + """Cancel the job. Returns 1 if job was cancelled.""" + if self.queue_id is None: return 0 + if self.status >= self.S_DONE: return 0 + + exit_status = self.manager.cancel(self.queue_id) + if exit_status != 0: + self.history.warning("manager.cancel returned exit_status: %s" % exit_status) + return 0 + + # Remove output files and reset the status. + self.history.info("Job %s cancelled by user" % self.queue_id) + self.reset() + return 1 + + def with_fixed_mpi_omp(self, mpi_procs, omp_threads): + """ + Disable autoparal and force execution with `mpi_procs` MPI processes + and `omp_threads` OpenMP threads. Useful for generating benchmarks. + """ + manager = self.manager if hasattr(self, "manager") else self.flow.manager + self.manager = manager.new_with_fixed_mpi_omp(mpi_procs, omp_threads) + + #def set_max_ncores(self, max_ncores): + # """ + # """ + # manager = self.manager if hasattr(self, "manager") else self.flow.manager + # self.manager = manager.new_with_max_ncores(mpi_procs, omp_threads) + + #@check_spectator + def _on_done(self): + self.fix_ofiles() + + #@check_spectator + def _on_ok(self): + # Fix output file names. + self.fix_ofiles() + + # Get results + results = self.on_ok() + + self.finalized = True + + return results + + #@check_spectator + def on_ok(self): + """ + This method is called once the `Task` has reached status S_OK. + Subclasses should provide their own implementation + + Returns: + Dictionary that must contain at least the following entries: + returncode: + 0 on success. + message: + a string that should provide a human-readable description of what has been performed. + """ + return dict(returncode=0, message="Calling on_all_ok of the base class!") + + #@check_spectator + def fix_ofiles(self): + """ + This method is called when the task reaches S_OK. + It changes the extension of particular output files + produced by Abinit so that the 'official' extension + is preserved e.g. out_1WF14 --> out_1WF + """ + filepaths = self.outdir.list_filepaths() + #self.history.info("in fix_ofiles with filepaths %s" % list(filepaths)) + + old2new = FilepathFixer().fix_paths(filepaths) + + for old, new in old2new.items(): + self.history.info("will rename old %s to new %s" % (old, new)) + os.rename(old, new) + + #@check_spectator + def _restart(self, submit=True): + """ + Called by restart once we have finished preparing the task for restarting. + + Return: + True if task has been restarted + """ + self.set_status(self.S_READY, msg="Restarted on %s" % time.asctime()) + + # Increase the counter. + self.num_restarts += 1 + self.history.info("Restarted, num_restarts %d" % self.num_restarts) + + # Reset datetimes + self.datetimes.reset() + + # Remove the lock file + self.start_lockfile.remove() + + if submit: + # Relaunch the task. + fired = self.start() + if not fired: self.history.warning("Restart failed") + else: + fired = False + + return fired + + #@check_spectator + def restart(self): + """ + Restart the calculation. Subclasses should provide a concrete version that + performs all the actions needed for preparing the restart and then calls self._restart + to restart the task. The default implementation is empty. + + Returns: + 1 if job was restarted, 0 otherwise. + """ + self.history.debug("Calling the **empty** restart method of the base class") + return 0 + + def poll(self): + """Check if child process has terminated. Set and return returncode attribute.""" + self._returncode = self.process.poll() + + if self._returncode is not None: + self.set_status(self.S_DONE, "status set to DONE") + + return self._returncode + + def wait(self): + """Wait for child process to terminate. Set and return returncode attribute.""" + self._returncode = self.process.wait() + try: + self.process.stderr.close() + except Exception: + pass + self.set_status(self.S_DONE, "status set to DONE") + + return self._returncode + + def communicate(self, input=None): + """ + Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. + Wait for process to terminate. The optional input argument should be a string to be sent to the + child process, or None, if no data should be sent to the child. + + communicate() returns a tuple (stdoutdata, stderrdata). + """ + stdoutdata, stderrdata = self.process.communicate(input=input) + self._returncode = self.process.returncode + self.set_status(self.S_DONE, "status set to DONE") + + return stdoutdata, stderrdata + + def kill(self): + """Kill the child.""" + self.process.kill() + self.set_status(self.S_ERROR, "status set to ERROR by task.kill") + self._returncode = self.process.returncode + + @property + def returncode(self): + """ + The child return code, set by poll() and wait() (and indirectly by communicate()). + A None value indicates that the process hasn't terminated yet. + A negative value -N indicates that the child was terminated by signal N (Unix only). + """ + try: + return self._returncode + except AttributeError: + return 0 + + def reset(self): + """ + Reset the task status. Mainly used if we made a silly mistake in the initial + setup of the queue manager and we want to fix it and rerun the task. + + Returns: + 0 on success, 1 if reset failed. + """ + # Can only reset tasks that are done. + # One should be able to reset 'Submitted' tasks (sometimes, they are not in the queue + # and we want to restart them) + #if self.status != self.S_SUB and self.status < self.S_DONE: return 1 + + # Remove output files otherwise the EventParser will think the job is still running + self.output_file.remove() + self.log_file.remove() + self.stderr_file.remove() + self.start_lockfile.remove() + self.qerr_file.remove() + self.qout_file.remove() + if self.mpiabort_file.exists: + self.mpiabort_file.remove() + + self.set_status(self.S_INIT, msg="Reset on %s" % time.asctime()) + self.num_restarts = 0 + self.set_qjob(None) + + # Reset finalized flags. + self.work.finalized = False + self.flow.finalized = False + + return 0 + + @property + @return_none_if_raise(AttributeError) + def queue_id(self): + """Queue identifier returned by the Queue manager. None if not set""" + return self.qjob.qid + + @property + @return_none_if_raise(AttributeError) + def qname(self): + """Queue name identifier returned by the Queue manager. None if not set""" + return self.qjob.qname + + @property + def qjob(self): + return self._qjob + + def set_qjob(self, qjob): + """Set info on queue after submission.""" + self._qjob = qjob + + @property + def has_queue(self): + """True if we are submitting jobs via a queue manager.""" + return self.manager.qadapter.QTYPE.lower() != "shell" + + @property + def num_cores(self): + """Total number of CPUs used to run the task.""" + return self.manager.num_cores + + @property + def mpi_procs(self): + """Number of CPUs used for MPI.""" + return self.manager.mpi_procs + + @property + def omp_threads(self): + """Number of CPUs used for OpenMP.""" + return self.manager.omp_threads + + @property + def mem_per_proc(self): + """Memory per MPI process.""" + return Memory(self.manager.mem_per_proc, "Mb") + + @property + def status(self): + """Gives the status of the task.""" + return self._status + + def lock(self, source_node): + """Lock the task, source is the |Node| that applies the lock.""" + if self.status != self.S_INIT: + raise ValueError("Trying to lock a task with status %s" % self.status) + + self._status = self.S_LOCKED + self.history.info("Locked by node %s", source_node) + + def unlock(self, source_node, check_status=True): + """ + Unlock the task, set its status to `S_READY` so that the scheduler can submit it. + source_node is the |Node| that removed the lock + Call task.check_status if check_status is True. + """ + if self.status != self.S_LOCKED: + raise RuntimeError("Trying to unlock a task with status %s" % self.status) + + self._status = self.S_READY + if check_status: self.check_status() + self.history.info("Unlocked by %s", source_node) + + #@check_spectator + def set_status(self, status, msg): + """ + Set and return the status of the task. + + Args: + status: Status object or string representation of the status + msg: string with human-readable message used in the case of errors. + """ + # truncate string if it's long. msg will be logged in the object and we don't want to waste memory. + if len(msg) > 2000: + msg = msg[:2000] + msg += "\n... snip ...\n" + + # Locked files must be explicitly unlocked + if self.status == self.S_LOCKED or status == self.S_LOCKED: + err_msg = ( + "Locked files must be explicitly unlocked before calling set_status but\n" + "task.status = %s, input status = %s" % (self.status, status)) + raise RuntimeError(err_msg) + + status = Status.as_status(status) + + changed = True + if hasattr(self, "_status"): + changed = (status != self._status) + + self._status = status + + if status == self.S_RUN: + # Set datetimes.start when the task enters S_RUN + if self.datetimes.start is None: + self.datetimes.start = datetime.datetime.now() + + # Add new entry to history only if the status has changed. + if changed: + if status == self.S_SUB: + self.datetimes.submission = datetime.datetime.now() + self.history.info("Submitted with MPI=%s, Omp=%s, Memproc=%.1f [Gb] %s " % ( + self.mpi_procs, self.omp_threads, self.mem_per_proc.to("Gb"), msg)) + + elif status == self.S_OK: + self.history.info("Task completed %s", msg) + + elif status == self.S_ABICRITICAL: + self.history.info("Status set to S_ABI_CRITICAL due to: %s", msg) + + else: + self.history.info("Status changed to %s. msg: %s", status, msg) + + ####################################################### + # The section belows contains callbacks that should not + # be executed if we are in spectator_mode + ####################################################### + if status == self.S_DONE: + # Execute the callback + self._on_done() + + if status == self.S_OK: + # Finalize the task. + if not self.finalized: + self._on_ok() + + # here we remove the output files of the task and of its parents. + if self.gc is not None and self.gc.policy == "task": + self.clean_output_files() + + if self.status == self.S_OK: + # Because _on_ok might have changed the status. + self.send_signal(self.S_OK) + + return status + + def check_status(self): + """ + This function checks the status of the task by inspecting the output and the + error files produced by the application and by the queue manager. + """ + # 1) see it the job is blocked + # 2) see if an error occured at submitting the job the job was submitted, TODO these problems can be solved + # 3) see if there is output + # 4) see if abinit reports problems + # 5) see if both err files exist and are empty + # 6) no output and no err files, the job must still be running + # 7) try to find out what caused the problems + # 8) there is a problem but we did not figure out what ... + # 9) the only way of landing here is if there is a output file but no err files... + + # 1) A locked task can only be unlocked by calling set_status explicitly. + # an errored task, should not end up here but just to be sure + black_list = (self.S_LOCKED, self.S_ERROR) + #if self.status in black_list: return self.status + + # 2) Check the returncode of the job script + if self.returncode != 0: + msg = "job.sh return code: %s\nPerhaps the job was not submitted properly?" % self.returncode + return self.set_status(self.S_QCRITICAL, msg=msg) + + # If we have an abort file produced by Abinit + if self.mpiabort_file.exists: + return self.set_status(self.S_ABICRITICAL, msg="Found ABINIT abort file") + + # Analyze the stderr file for Fortran runtime errors. + # getsize is 0 if the file is empty or it does not exist. + err_msg = None + if self.stderr_file.getsize() != 0: + err_msg = self.stderr_file.read() + + # Analyze the stderr file of the resource manager runtime errors. + # TODO: Why are we looking for errors in queue.qerr? + qerr_info = None + if self.qerr_file.getsize() != 0: + qerr_info = self.qerr_file.read() + + # Analyze the stdout file of the resource manager (needed for PBS !) + qout_info = None + if self.qout_file.getsize(): + qout_info = self.qout_file.read() + + # Start to check ABINIT status if the output file has been created. + #if self.output_file.getsize() != 0: + if self.output_file.exists: + try: + report = self.get_event_report() + except Exception as exc: + msg = "%s exception while parsing event_report:\n%s" % (self, exc) + return self.set_status(self.S_ABICRITICAL, msg=msg) + + if report is None: + return self.set_status(self.S_ERROR, msg="got None report!") + + if report.run_completed: + # Here we set the correct timing data reported by Abinit + self.datetimes.start = report.start_datetime + self.datetimes.end = report.end_datetime + + # Check if the calculation converged. + not_ok = report.filter_types(self.CRITICAL_EVENTS) + if not_ok: + return self.set_status(self.S_UNCONVERGED, msg='status set to UNCONVERGED based on abiout') + else: + return self.set_status(self.S_OK, msg="status set to OK based on abiout") + + # Calculation still running or errors? + if report.errors: + # Abinit reported problems + self.history.debug('Found errors in report') + for error in report.errors: + self.history.debug(str(error)) + try: + self.abi_errors.append(error) + except AttributeError: + self.abi_errors = [error] + + # The job is unfixable due to ABINIT errors + self.history.debug("%s: Found Errors or Bugs in ABINIT main output!" % self) + msg = "\n".join(map(repr, report.errors)) + return self.set_status(self.S_ABICRITICAL, msg=msg) + + # 5) + if self.stderr_file.exists and not err_msg: + if self.qerr_file.exists and not qerr_info: + # there is output and no errors + # The job still seems to be running + return self.set_status(self.S_RUN, msg='there is output and no errors: job still seems to be running') + + # 6) + if not self.output_file.exists: + #self.history.debug("output_file does not exists") + if not self.stderr_file.exists and not self.qerr_file.exists: + # No output at allThe job is still in the queue. + return self.status + + # 7) Analyze the files of the resource manager and abinit and execution err (mvs) + # MG: This section has been disabled: several portability issues + # Need more robust logic in error_parser, perhaps logic provided by users via callbacks. + """ + if False and (qerr_info or qout_info): + from abipy.flowtk.scheduler_error_parsers import get_parser + scheduler_parser = get_parser(self.manager.qadapter.QTYPE, err_file=self.qerr_file.path, + out_file=self.qout_file.path, run_err_file=self.stderr_file.path) + + if scheduler_parser is None: + return self.set_status(self.S_QCRITICAL, + msg="Cannot find scheduler_parser for qtype %s" % self.manager.qadapter.QTYPE) + + scheduler_parser.parse() + + if scheduler_parser.errors: + # Store the queue errors in the task + self.queue_errors = scheduler_parser.errors + # The job is killed or crashed and we know what happened + msg = "scheduler errors found:\n%s" % str(scheduler_parser.errors) + return self.set_status(self.S_QCRITICAL, msg=msg) + + elif lennone(qerr_info) > 0: + # if only qout_info, we are not necessarily in QCRITICAL state, + # since there will always be info in the qout file + self.history.info('Found unknown message in the queue qerr file: %s' % str(qerr_info)) + #try: + # rt = self.datetimes.get_runtime().seconds + #except Exception: + # rt = -1.0 + #tl = self.manager.qadapter.timelimit + #if rt > tl: + # msg += 'set to error : runtime (%s) exceded walltime (%s)' % (rt, tl) + # print(msg) + # return self.set_status(self.S_ERROR, msg=msg) + # The job may be killed or crashed but we don't know what happened + # It may also be that an innocent message was written to qerr, so we wait for a while + # it is set to QCritical, we will attempt to fix it by running on more resources + """ + + # 8) analyzing the err files and abinit output did not identify a problem + # but if the files are not empty we do have a problem but no way of solving it: + # The job is killed or crashed but we don't know what happend + # it is set to QCritical, we will attempt to fix it by running on more resources + if err_msg: + msg = 'Found error message:\n %s' % str(err_msg) + self.history.warning(msg) + #return self.set_status(self.S_QCRITICAL, msg=msg) + + # 9) if we still haven't returned there is no indication of any error and the job can only still be running + # but we should actually never land here, or we have delays in the file system .... + # print('the job still seems to be running maybe it is hanging without producing output... ') + + # Check time of last modification. + if self.output_file.exists and \ + (time.time() - self.output_file.get_stat().st_mtime > self.manager.policy.frozen_timeout): + msg = "Task seems to be frozen, last change more than %s [s] ago" % self.manager.policy.frozen_timeout + return self.set_status(self.S_ERROR, msg=msg) + + # Handle weird case in which either run.abo, or run.log have not been produced + #if self.status not in (self.S_INIT, self.S_READY) and (not self.output.file.exists or not self.log_file.exits): + # msg = "Task have been submitted but cannot find the log file or the output file" + # return self.set_status(self.S_ERROR, msg) + + return self.set_status(self.S_RUN, msg='final option: nothing seems to be wrong, the job must still be running') + + def reduce_memory_demand(self): + """ + Method that can be called by the scheduler to decrease the memory demand of a specific task. + Returns True in case of success, False in case of Failure. + Should be overwritten by specific tasks. + """ + return False + + def speed_up(self): + """ + Method that can be called by the flow to decrease the time needed for a specific task. + Returns True in case of success, False in case of Failure + Should be overwritten by specific tasks. + """ + return False + + def out_to_in(self, out_file): + """ + Move an output file to the output data directory of the `Task` + and rename the file so that ABINIT will read it as an input data file. + + Returns: + The absolute path of the new file in the indata directory. + """ + in_file = os.path.basename(out_file).replace("out", "in", 1) + dest = os.path.join(self.indir.path, in_file) + + if os.path.exists(dest) and not os.path.islink(dest): + self.history.warning("Will overwrite %s with %s" % (dest, out_file)) + + os.rename(out_file, dest) + return dest + + def inlink_file(self, filepath): + """ + Create a symbolic link to the specified file in the + directory containing the input files of the task. + """ + if not os.path.exists(filepath): + self.history.debug("Creating symbolic link to not existent file %s" % filepath) + + # Extract the Abinit extension and add the prefix for input files. + root, abiext = abi_splitext(filepath) + + infile = "in_" + abiext + infile = self.indir.path_in(infile) + + # Link path to dest if dest link does not exist. + # else check that it points to the expected file. + self.history.info("Linking path %s --> %s" % (filepath, infile)) + + if not os.path.exists(infile): + os.symlink(filepath, infile) + else: + if os.path.realpath(infile) != filepath: + raise self.Error("infile %s does not point to filepath %s" % (infile, filepath)) + + def make_links(self): + """ + Create symbolic links to the output files produced by the other tasks. + + .. warning:: + + This method should be called only when the calculation is READY because + it uses a heuristic approach to find the file to link. + """ + for dep in self.deps: + filepaths, exts = dep.get_filepaths_and_exts() + + for path, ext in zip(filepaths, exts): + self.history.info("Need path %s with ext %s" % (path, ext)) + dest = self.ipath_from_ext(ext) + + if not os.path.exists(path): + # Try netcdf file. + # TODO: this case should be treated in a cleaner way. + path += ".nc" + if os.path.exists(path): dest += ".nc" + + if not os.path.exists(path): + raise self.Error("\n%s: path `%s`\n is needed by this task but it does not exist" % (self, path)) + + if path.endswith(".nc") and not dest.endswith(".nc"): # NC --> NC file + dest += ".nc" + + # Link path to dest if dest link does not exist. + # else check that it points to the expected file. + self.history.debug("Linking path %s --> %s" % (path, dest)) + if not os.path.exists(dest): + os.symlink(path, dest) + else: + # check links but only if we haven't performed the restart. + # in this case, indeed we may have replaced the file pointer with the + # previous output file of the present task. + if os.path.realpath(dest) != path and self.num_restarts == 0: + raise self.Error("\nDestination:\n `%s`\ndoes not point to path:\n `%s`" % (dest, path)) + + @abc.abstractmethod + def setup(self): + """Public method called before submitting the task.""" + + def _setup(self): + """ + This method calls self.setup after having performed additional operations + such as the creation of the symbolic links needed to connect different tasks. + """ + self.make_links() + self.setup() + + def get_event_report(self, source="log"): + """ + Analyzes the main logfile of the calculation for possible Errors or Warnings. + If the ABINIT abort file is found, the error found in this file are added to + the output report. + + Args: + source: "output" for the main output file,"log" for the log file. + + Returns: + :class:`EventReport` instance or None if the source file file does not exist. + """ + # By default, we inspect the main log file. + ofile = { + "output": self.output_file, + "log": self.log_file}[source] + + parser = events.EventsParser() + + if not ofile.exists: + if not self.mpiabort_file.exists: + return None + else: + # ABINIT abort file without log! + abort_report = parser.parse(self.mpiabort_file.path) + return abort_report + + try: + report = parser.parse(ofile.path) + #self._prev_reports[source] = report + + # Add events found in the ABI_MPIABORTFILE. + if self.mpiabort_file.exists: + self.history.critical("Found ABI_MPIABORTFILE!!!!!") + abort_report = parser.parse(self.mpiabort_file.path) + if len(abort_report) != 1: + self.history.critical("Found more than one event in ABI_MPIABORTFILE") + + # Weird case: empty abort file, let's skip the part + # below and hope that the log file contains the error message. + #if not len(abort_report): return report + + # Add it to the initial report only if it differs + # from the last one found in the main log file. + last_abort_event = abort_report[-1] + if report and last_abort_event != report[-1]: + report.append(last_abort_event) + else: + report.append(last_abort_event) + + return report + + #except parser.Error as exc: + except Exception as exc: + # Return a report with an error entry with info on the exception. + msg = "%s: Exception while parsing ABINIT events:\n %s" % (ofile, str(exc)) + self.set_status(self.S_ABICRITICAL, msg=msg) + return parser.report_exception(ofile.path, exc) + + def get_results(self, **kwargs): + """ + Returns :class:`NodeResults` instance. + Subclasses should extend this method (if needed) by adding + specialized code that performs some kind of post-processing. + """ + # Check whether the process completed. + if self.returncode is None: + raise self.Error("return code is None, you should call wait, communicate or poll") + + if self.status is None or self.status < self.S_DONE: + raise self.Error("Task is not completed") + + return self.Results.from_node(self) + + def move(self, dest, is_abspath=False): + """ + Recursively move self.workdir to another location. This is similar to the Unix "mv" command. + The destination path must not already exist. If the destination already exists + but is not a directory, it may be overwritten depending on os.rename() semantics. + + Be default, dest is located in the parent directory of self.workdir. + Use is_abspath=True to specify an absolute path. + """ + if not is_abspath: + dest = os.path.join(os.path.dirname(self.workdir), dest) + + shutil.move(self.workdir, dest) + + def in_files(self): + """Return all the input data files used.""" + return self.indir.list_filepaths() + + def out_files(self): + """Return all the output data files produced.""" + return self.outdir.list_filepaths() + + def tmp_files(self): + """Return all the input data files produced.""" + return self.tmpdir.list_filepaths() + + def path_in_workdir(self, filename): + """Create the absolute path of filename in the top-level working directory.""" + return os.path.join(self.workdir, filename) + + def rename(self, src_basename, dest_basename, datadir="outdir"): + """ + Rename a file located in datadir. + + src_basename and dest_basename are the basename of the source file + and of the destination file, respectively. + """ + directory = { + "indir": self.indir, + "outdir": self.outdir, + "tmpdir": self.tmpdir, + }[datadir] + + src = directory.path_in(src_basename) + dest = directory.path_in(dest_basename) + + os.rename(src, dest) + + #@check_spectator + def build(self, *args, **kwargs): + """ + Creates the working directory and the input files of the |Task|. + It does not overwrite files if they already exist. + """ + # Create dirs for input, output and tmp data. + self.indir.makedirs() + self.outdir.makedirs() + self.tmpdir.makedirs() + + # Write files file and input file. + if not self.files_file.exists: + self.files_file.write(self.filesfile_string) + + self.input_file.write(self.make_input()) + self.manager.write_jobfile(self) + + #@check_spectator + def rmtree(self, exclude_wildcard=""): + """ + Remove all files and directories in the working directory + + Args: + exclude_wildcard: Optional string with regular expressions separated by |. + Files matching one of the regular expressions will be preserved. + example: exclude_wildcard="*.nc|*.txt" preserves all the files whose extension is in ["nc", "txt"]. + """ + if not exclude_wildcard: + shutil.rmtree(self.workdir) + + else: + w = WildCard(exclude_wildcard) + + for dirpath, dirnames, filenames in os.walk(self.workdir): + for fname in filenames: + filepath = os.path.join(dirpath, fname) + if not w.match(fname): + os.remove(filepath) + + def remove_files(self, *filenames): + """Remove all the files listed in filenames.""" + filenames = list_strings(filenames) + + for dirpath, dirnames, fnames in os.walk(self.workdir): + for fname in fnames: + if fname in filenames: + filepath = os.path.join(dirpath, fname) + os.remove(filepath) + + def clean_output_files(self, follow_parents=True): + """ + This method is called when the task reaches S_OK. It removes all the output files + produced by the task that are not needed by its children as well as the output files + produced by its parents if no other node needs them. + + Args: + follow_parents: If true, the output files of the parents nodes will be removed if possible. + + Return: + list with the absolute paths of the files that have been removed. + """ + paths = [] + if self.status != self.S_OK: + self.history.warning("Calling task.clean_output_files on a task whose status != S_OK") + + # Remove all files in tmpdir. + self.tmpdir.clean() + + # Find the file extensions that should be preserved since these files are still + # needed by the children who haven't reached S_OK + except_exts = set() + for child in self.get_children(): + if child.status == self.S_OK: continue + # Find the position of self in child.deps and add the extensions. + i = [dep.node for dep in child.deps].index(self) + except_exts.update(child.deps[i].exts) + + # Remove the files in the outdir of the task but keep except_exts. + exts = self.gc.exts.difference(except_exts) + #print("Will remove its extensions: ", exts) + paths += self.outdir.remove_exts(exts) + if not follow_parents: return paths + + # Remove the files in the outdir of my parents if all the possible dependencies have been fulfilled. + for parent in self.get_parents(): + + # Here we build a dictionary file extension --> list of child nodes requiring this file from parent + # e.g {"WFK": [node1, node2]} + ext2nodes = collections.defaultdict(list) + for child in parent.get_children(): + if child.status == child.S_OK: continue + i = [d.node for d in child.deps].index(parent) + for ext in child.deps[i].exts: + ext2nodes[ext].append(child) + + # Remove extension only if no node depends on it! + except_exts = [k for k, lst in ext2nodes.items() if lst] + exts = self.gc.exts.difference(except_exts) + #print("%s removes extensions %s from parent node %s" % (self, exts, parent)) + paths += parent.outdir.remove_exts(exts) + + self.history.info("Removed files: %s" % paths) + return paths + + def setup(self): # noqa: E731,F811 + """Base class does not provide any hook.""" + + #@check_spectator + def start(self, **kwargs): + """ + Starts the calculation by performing the following steps: + + - build dirs and files + - call the _setup method + - execute the job file by executing/submitting the job script. + + Main entry point for the `Launcher`. + + ============== ============================================================== + kwargs Meaning + ============== ============================================================== + autoparal False to skip the autoparal step (default True) + exec_args List of arguments passed to executable. + ============== ============================================================== + + Returns: + 1 if task was started, 0 otherwise. + """ + if self.status >= self.S_SUB: + raise self.Error("Task status: %s" % str(self.status)) + + if self.start_lockfile.exists: + self.history.warning("Found lock file: %s" % self.start_lockfile.path) + return 0 + + self.start_lockfile.write("Started on %s" % time.asctime()) + + self.build() + self._setup() + + # Add the variables needed to connect the node. + for d in self.deps: + cvars = d.connecting_vars() + self.history.info("Adding connecting vars %s" % cvars) + self.set_vars(cvars) + + # Get (python) data from other nodes + d.apply_getters(self) + + # Automatic parallelization + if kwargs.pop("autoparal", True) and hasattr(self, "autoparal_run"): + try: + self.autoparal_run() + #except QueueAdapterError as exc: + # # If autoparal cannot find a qadapter to run the calculation raises an Exception + # self.history.critical(exc) + # msg = "Error while trying to run autoparal in task:%s\n%s" % (repr(task), straceback()) + # cprint(msg, "yellow") + # self.set_status(self.S_QCRITICAL, msg=msg) + # return 0 + except Exception as exc: + # Sometimes autoparal_run fails because Abinit aborts + # at the level of the parser e.g. cannot find the spacegroup + # due to some numerical noise in the structure. + # In this case we call fix_abicritical and then we try to run autoparal again. + self.history.critical("First call to autoparal failed with `%s`. Will try fix_abicritical" % exc) + msg = "autoparal_fake_run raised:\n%s" % straceback() + self.history.critical(msg) + + fixed = self.fix_abicritical() + if not fixed: + self.set_status(self.S_ABICRITICAL, msg="fix_abicritical could not solve the problem") + return 0 + + try: + self.autoparal_run() + self.history.info("Second call to autoparal succeeded!") + #cprint("Second call to autoparal succeeded!", "green") + + except Exception as exc: + self.history.critical("Second call to autoparal failed with %s. Cannot recover!", exc) + msg = "Tried autoparal again but got:\n%s" % straceback() + cprint(msg, "red") + self.set_status(self.S_ABICRITICAL, msg=msg) + return 0 + + # Start the calculation in a subprocess and return. + self._process = self.manager.launch(self, **kwargs) + return 1 + + def start_and_wait(self, *args, **kwargs): + """ + Helper method to start the task and wait for completion. + + Mainly used when we are submitting the task via the shell without passing through a queue manager. + """ + self.start(*args, **kwargs) + retcode = self.wait() + return retcode + + def get_graphviz(self, engine="automatic", graph_attr=None, node_attr=None, edge_attr=None): + """ + Generate task graph in the DOT language (only parents and children of this task). + + Args: + engine: ['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage'] + graph_attr: Mapping of (attribute, value) pairs for the graph. + node_attr: Mapping of (attribute, value) pairs set for all nodes. + edge_attr: Mapping of (attribute, value) pairs set for all edges. + + Returns: graphviz.Digraph + """ + # https://www.graphviz.org/doc/info/ + from graphviz import Digraph + fg = Digraph("task", # filename="task_%s.gv" % os.path.basename(self.workdir), + engine="dot" if engine == "automatic" else engine) + + # Set graph attributes. + #fg.attr(label="%s@%s" % (self.__class__.__name__, self.relworkdir)) + fg.attr(label=repr(self)) + #fg.attr(fontcolor="white", bgcolor='purple:pink') + #fg.attr(rankdir="LR", pagedir="BL") + #fg.attr(constraint="false", pack="true", packMode="clust") + fg.node_attr.update(color='lightblue2', style='filled') + + # Add input attributes. + if graph_attr is not None: + fg.graph_attr.update(**graph_attr) + if node_attr is not None: + fg.node_attr.update(**node_attr) + if edge_attr is not None: + fg.edge_attr.update(**edge_attr) + + def node_kwargs(node): + return dict( + #shape="circle", + color=node.color_hex, + label=(str(node) if not hasattr(node, "pos_str") else + node.pos_str + "\n" + node.__class__.__name__), + ) + + edge_kwargs = dict(arrowType="vee", style="solid") + cluster_kwargs = dict(rankdir="LR", pagedir="BL", style="rounded", bgcolor="azure2") + + # Build cluster with tasks. + cluster_name = "cluster%s" % self.work.name + with fg.subgraph(name=cluster_name) as wg: + wg.attr(**cluster_kwargs) + wg.attr(label="%s (%s)" % (self.__class__.__name__, self.name)) + wg.node(self.name, **node_kwargs(self)) + + # Connect task to children. + for child in self.get_children(): + # Test if child is in the same work. + myg = wg if child in self.work else fg + myg.node(child.name, **node_kwargs(child)) + # Find file extensions required by this task + i = [dep.node for dep in child.deps].index(self) + edge_label = "+".join(child.deps[i].exts) + myg.edge(self.name, child.name, label=edge_label, color=self.color_hex, + **edge_kwargs) + + # Connect task to parents + for parent in self.get_parents(): + # Test if parent is in the same work. + myg = wg if parent in self.work else fg + myg.node(parent.name, **node_kwargs(parent)) + # Find file extensions required by self (task) + i = [dep.node for dep in self.deps].index(parent) + edge_label = "+".join(self.deps[i].exts) + myg.edge(parent.name, self.name, label=edge_label, color=parent.color_hex, + **edge_kwargs) + + # Treat the case in which we have a work producing output for other tasks. + #for work in self: + # children = work.get_children() + # if not children: continue + # cluster_name = "cluster%s" % work.name + # seen = set() + # for child in children: + # # This is not needed, too much confusing + # #fg.edge(cluster_name, child.name, color=work.color_hex, **edge_kwargs) + # # Find file extensions required by work + # i = [dep.node for dep in child.deps].index(work) + # for ext in child.deps[i].exts: + # out = "%s (%s)" % (ext, work.name) + # fg.node(out) + # fg.edge(out, child.name, **edge_kwargs) + # key = (cluster_name, out) + # if key not in seen: + # fg.edge(cluster_name, out, color=work.color_hex, **edge_kwargs) + # seen.add(key) + + return fg + + +class DecreaseDemandsError(Exception): + """ + exception to be raised by a task if the request to decrease some demand, load or memory, could not be performed + """ + + +class AbinitTask(Task): + """ + Base class defining an ABINIT calculation + """ + Results = TaskResults + + @classmethod + def from_input(cls, input, workdir=None, manager=None): + """ + Create an instance of `AbinitTask` from an ABINIT input. + + Args: + ainput: |AbinitInput| object. + workdir: Path to the working directory. + manager: |TaskManager| object. + """ + return cls(input, workdir=workdir, manager=manager) + + @classmethod + def temp_shell_task(cls, inp, mpi_procs=1, workdir=None, manager=None): + """ + Build a Task with a temporary workdir. The task is executed via the shell with 1 MPI proc. + Mainly used for invoking Abinit to get important parameters needed to prepare the real task. + + Args: + mpi_procs: Number of MPI processes to use. + """ + # Build a simple manager to run the job in a shell subprocess + import tempfile + workdir = tempfile.mkdtemp() if workdir is None else workdir + if manager is None: manager = TaskManager.from_user_config() + + # Construct the task and run it + task = cls.from_input(inp, workdir=workdir, manager=manager.to_shell_manager(mpi_procs=mpi_procs)) + task.set_name('temp_shell_task') + return task + + def setup(self): + """ + Abinit has the very *bad* habit of changing the file extension by appending the characters in [A,B ..., Z] + to the output file, and this breaks a lot of code that relies of the use of a unique file extension. + Here we fix this issue by renaming run.abo to run.abo_[number] if the output file "run.abo" already + exists. A few lines of code in python, a lot of problems if you try to implement this trick in Fortran90. + """ + def rename_file(afile): + """Helper function to rename :class:`File` objects. Return string for logging purpose.""" + # Find the index of the last file (if any). + # TODO: Maybe it's better to use run.abo --> run(1).abo + fnames = [f for f in os.listdir(self.workdir) if f.startswith(afile.basename)] + nums = [int(f) for f in [f.split("_")[-1] for f in fnames] if f.isdigit()] + last = max(nums) if nums else 0 + new_path = afile.path + "_" + str(last+1) + + os.rename(afile.path, new_path) + return "Will rename %s to %s" % (afile.path, new_path) + + logs = [] + if self.output_file.exists: logs.append(rename_file(self.output_file)) + if self.log_file.exists: logs.append(rename_file(self.log_file)) + + if logs: + self.history.info("\n".join(logs)) + + @property + def executable(self): + """Path to the executable required for running the Task.""" + try: + return self._executable + except AttributeError: + return "abinit" + + @property + def pseudos(self): + """List of pseudos used in the calculation.""" + return self.input.pseudos + + @property + def isnc(self): + """True if norm-conserving calculation.""" + return self.input.isnc + + @property + def ispaw(self): + """True if PAW calculation""" + return self.input.ispaw + + @property + def is_gs_task(self): + """True if task is GsTask subclass.""" + return isinstance(self, GsTask) + + @property + def is_dfpt_task(self): + """True if task is a DftpTask subclass.""" + return isinstance(self, DfptTask) + + @lazy_property + def cycle_class(self): + """ + Return the subclass of ScfCycle associated to the task or + None if no SCF algorithm if associated to the task. + """ + if isinstance(self, RelaxTask): + return abiinspect.Relaxation + elif isinstance(self, GsTask): + return abiinspect.GroundStateScfCycle + elif self.is_dfpt_task: + return abiinspect.D2DEScfCycle + + return None + + @property + def filesfile_string(self): + """String with the list of files and prefixes needed to execute ABINIT.""" + lines = [] + app = lines.append + pj = os.path.join + + app(self.input_file.path) # Path to the input file + app(self.output_file.path) # Path to the output file + app(pj(self.workdir, self.prefix.idata)) # Prefix for input data + app(pj(self.workdir, self.prefix.odata)) # Prefix for output data + app(pj(self.workdir, self.prefix.tdata)) # Prefix for temporary data + + # Paths to the pseudopotential files. + # Note that here the pseudos **must** be sorted according to znucl. + # Here we reorder the pseudos if the order is wrong. + ord_pseudos = [] + + znucl = [specie.number for specie in + self.input.structure.types_of_specie] + + for z in znucl: + for p in self.pseudos: + if p.Z == z: + ord_pseudos.append(p) + break + else: + raise ValueError("Cannot find pseudo with znucl %s in pseudos:\n%s" % (z, self.pseudos)) + + for pseudo in ord_pseudos: + app(pseudo.path) + + return "\n".join(lines) + + def set_pconfs(self, pconfs): + """Set the list of autoparal configurations.""" + self._pconfs = pconfs + + @property + def pconfs(self): + """List of autoparal configurations.""" + try: + return self._pconfs + except AttributeError: + return None + + def uses_paral_kgb(self, value=1): + """True if the task is a GS Task and uses paral_kgb with the given value.""" + paral_kgb = self.get_inpvar("paral_kgb", 0) + # paral_kgb is used only in the GS part. + return paral_kgb == value and isinstance(self, GsTask) + + def _change_structure(self, new_structure): + """Change the input structure.""" + # Compare new and old structure for logging purpose. + # TODO: Write method of structure to compare self and other and return a dictionary + old_structure = self.input.structure + old_lattice = old_structure.lattice + + abc_diff = np.array(new_structure.lattice.abc) - np.array(old_lattice.abc) + angles_diff = np.array(new_structure.lattice.angles) - np.array(old_lattice.angles) + cart_diff = new_structure.cart_coords - old_structure.cart_coords + displs = np.array([np.sqrt(np.dot(v, v)) for v in cart_diff]) + + recs, tol_angle, tol_length = [], 10**-2, 10**-5 + + if np.any(np.abs(angles_diff) > tol_angle): + recs.append("new_agles - old_angles = %s" % angles_diff) + + if np.any(np.abs(abc_diff) > tol_length): + recs.append("new_abc - old_abc = %s" % abc_diff) + + if np.any(np.abs(displs) > tol_length): + min_pos, max_pos = displs.argmin(), displs.argmax() + recs.append("Mean displ: %.2E, Max_displ: %.2E (site %d), min_displ: %.2E (site %d)" % + (displs.mean(), displs[max_pos], max_pos, displs[min_pos], min_pos)) + + self.history.info("Changing structure (only significant diffs are shown):") + if not recs: + self.history.info("Input and output structure seems to be equal within the given tolerances") + else: + for rec in recs: + self.history.info(rec) + + self.input.set_structure(new_structure) + #assert self.input.structure == new_structure + + def autoparal_run(self): + """ + Find an optimal set of parameters for the execution of the task + This method can change the ABINIT input variables and/or the + submission parameters e.g. the number of CPUs for MPI and OpenMp. + + Set: + self.pconfs where pconfs is a :class:`ParalHints` object with the configuration reported by + autoparal and optimal is the optimal configuration selected. + Returns 0 if success + """ + policy = self.manager.policy + + if policy.autoparal == 0: # or policy.max_ncpus in [None, 1]: + self.history.info("Nothing to do in autoparal, returning (None, None)") + return 0 + + if policy.autoparal != 1: + raise NotImplementedError("autoparal != 1") + + ############################################################################ + # Run ABINIT in sequential to get the possible configurations with max_ncpus + ############################################################################ + + # Set the variables for automatic parallelization + # Will get all the possible configurations up to max_ncpus + # Return immediately if max_ncpus == 1 + max_ncpus = self.manager.max_cores + if max_ncpus == 1: return 0 + + autoparal_vars = dict(autoparal=policy.autoparal, max_ncpus=max_ncpus, mem_test=0) + self.set_vars(autoparal_vars) + + # Run the job in a shell subprocess with mpi_procs = 1 + # we don't want to make a request to the queue manager for this simple job! + # Return code is always != 0 + process = self.manager.to_shell_manager(mpi_procs=1).launch(self) + self.history.pop() + retcode = process.wait() + # To avoid: ResourceWarning: unclosed file <_io.BufferedReader name=87> in py3k + process.stderr.close() + #process.stdout.close() + + # Remove the variables added for the automatic parallelization + self.input.remove_vars(list(autoparal_vars.keys())) + + ############################################################## + # Parse the autoparal configurations from the main output file + ############################################################## + parser = ParalHintsParser() + try: + pconfs = parser.parse(self.output_file.path) + except parser.Error: + # In principle Abinit should have written a complete log file + # because we called .wait() but sometimes the Yaml doc is incomplete and + # the parser raises. Let's wait 5 secs and then try again. + time.sleep(5) + try: + pconfs = parser.parse(self.output_file.path) + except parser.Error: + self.history.critical("Error while parsing Autoparal section:\n%s" % straceback()) + return 2 + + ###################################################### + # Select the optimal configuration according to policy + ###################################################### + optconf = self.find_optconf(pconfs) + + #################################################### + # Change the input file and/or the submission script + #################################################### + self.set_vars(optconf.vars) + + # Write autoparal configurations to JSON file. + d = pconfs.as_dict() + d["optimal_conf"] = optconf + json_pretty_dump(d, os.path.join(self.workdir, "autoparal.json")) + + ############## + # Finalization + ############## + # Reset the status, remove garbage files ... + self.set_status(self.S_INIT, msg='finished autoparal run') + + # Remove the output file since Abinit likes to create new files + # with extension .outA, .outB if the file already exists. + os.remove(self.output_file.path) + os.remove(self.log_file.path) + os.remove(self.stderr_file.path) + + return 0 + + def find_optconf(self, pconfs): + """Find the optimal Parallel configuration.""" + # Save pconfs for future reference. + self.set_pconfs(pconfs) + + # Select the partition on which we'll be running and set MPI/OMP cores. + optconf = self.manager.select_qadapter(pconfs) + return optconf + + def select_files(self, what="o"): + """ + Helper function used to select the files of a task. + + Args: + what: string with the list of characters selecting the file type + Possible choices: + i ==> input_file, + o ==> output_file, + f ==> files_file, + j ==> job_file, + l ==> log_file, + e ==> stderr_file, + q ==> qout_file, + all ==> all files. + """ + choices = collections.OrderedDict([ + ("i", self.input_file), + ("o", self.output_file), + ("f", self.files_file), + ("j", self.job_file), + ("l", self.log_file), + ("e", self.stderr_file), + ("q", self.qout_file), + ]) + + if what == "all": + return [getattr(v, "path") for v in choices.values()] + + selected = [] + for c in what: + try: + selected.append(getattr(choices[c], "path")) + except KeyError: + self.history.warning("Wrong keyword %s" % c) + + return selected + + def restart(self): + """ + general restart used when scheduler problems have been taken care of + """ + return self._restart() + + #@check_spectator + def reset_from_scratch(self): + """ + Restart from scratch, this is to be used if a job is restarted with more resources after a crash + + Move output files produced in workdir to _reset otherwise check_status continues + to see the task as crashed even if the job did not run + """ + # Create reset directory if not already done. + reset_dir = os.path.join(self.workdir, "_reset") + reset_file = os.path.join(reset_dir, "_counter") + if not os.path.exists(reset_dir): + os.mkdir(reset_dir) + num_reset = 1 + else: + with open(reset_file, "rt") as fh: + num_reset = 1 + int(fh.read()) + + # Move files to reset and append digit with reset index. + def move_file(f): + if not f.exists: return + try: + f.move(os.path.join(reset_dir, f.basename + "_" + str(num_reset))) + except OSError as exc: + self.history.warning("Couldn't move file {}. exc: {}".format(f, str(exc))) + + for fname in ("output_file", "log_file", "stderr_file", "qout_file", "qerr_file"): + move_file(getattr(self, fname)) + + with open(reset_file, "wt") as fh: + fh.write(str(num_reset)) + + self.start_lockfile.remove() + + # Reset datetimes + self.datetimes.reset() + + return self._restart(submit=False) + + #@check_spectator + def fix_abicritical(self): + """ + method to fix crashes/error caused by abinit + + Returns: + 1 if task has been fixed else 0. + """ + event_handlers = self.event_handlers + if not event_handlers: + self.set_status(status=self.S_ERROR, msg='Empty list of event handlers. Cannot fix abi_critical errors') + return 0 + + count, done = 0, len(event_handlers) * [0] + + report = self.get_event_report() + if report is None: + self.set_status(status=self.S_ERROR, msg='get_event_report returned None') + return 0 + + # Note we have loop over all possible events (slow, I know) + # because we can have handlers for Error, Bug or Warning + # (ideally only for CriticalWarnings but this is not done yet) + for event in report: + for i, handler in enumerate(self.event_handlers): + + if handler.can_handle(event) and not done[i]: + self.history.info("handler %s will try to fix event %s" % (handler, event)) + try: + d = handler.handle_task_event(self, event) + if d: + done[i] += 1 + count += 1 + + except Exception as exc: + self.history.critical(str(exc)) + + if count: + self.reset_from_scratch() + return 1 + + self.set_status(status=self.S_ERROR, msg='We encountered AbiCritical events that could not be fixed') + return 0 + + #@check_spectator + def fix_queue_critical(self): + """ + This function tries to fix critical events originating from the queue submission system. + + General strategy, first try to increase resources in order to fix the problem, + if this is not possible, call a task specific method to attempt to decrease the demands. + + Returns: + 1 if task has been fixed else 0. + """ + from abipy.flowtk.scheduler_error_parsers import NodeFailureError, MemoryCancelError, TimeCancelError + #assert isinstance(self.manager, TaskManager) + + self.history.info('fixing queue critical') + ret = "task.fix_queue_critical: " + + if not self.queue_errors: + # TODO + # paral_kgb = 1 leads to nasty sigegv that are seen as Qcritical errors! + # Try to fallback to the conjugate gradient. + #if self.uses_paral_kgb(1): + # self.history.critical("QCRITICAL with PARAL_KGB==1. Will try CG!") + # self.set_vars(paral_kgb=0) + # self.reset_from_scratch() + # return + # queue error but no errors detected, try to solve by increasing ncpus if the task scales + # if resources are at maximum the task is definitively turned to errored + if self.mem_scales or self.load_scales: + try: + self.manager.increase_resources() # acts either on the policy or on the qadapter + self.reset_from_scratch() + ret += "increased resources" + return ret + except ManagerIncreaseError: + self.set_status(self.S_ERROR, msg='unknown queue error, could not increase resources any further') + raise FixQueueCriticalError + else: + self.set_status(self.S_ERROR, msg='unknown queue error, no options left') + raise FixQueueCriticalError + + else: + print("Fix_qcritical: received %d queue_errors" % len(self.queue_errors)) + print("type_list: %s" % list(type(qe) for qe in self.queue_errors)) + + for error in self.queue_errors: + self.history.info('fixing: %s' % str(error)) + ret += str(error) + if isinstance(error, NodeFailureError): + # if the problematic node is known, exclude it + if error.nodes is not None: + try: + self.manager.exclude_nodes(error.nodes) + self.reset_from_scratch() + self.set_status(self.S_READY, msg='excluding nodes') + except Exception: + raise FixQueueCriticalError + else: + self.set_status(self.S_ERROR, msg='Node error but no node identified.') + raise FixQueueCriticalError + + elif isinstance(error, MemoryCancelError): + # ask the qadapter to provide more resources, i.e. more cpu's so more total memory if the code + # scales this should fix the memeory problem + # increase both max and min ncpu of the autoparalel and rerun autoparalel + if self.mem_scales: + try: + self.manager.increase_ncpus() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased ncps to solve memory problem') + return + except ManagerIncreaseError: + self.history.warning('increasing ncpus failed') + + # if the max is reached, try to increase the memory per cpu: + try: + self.manager.increase_mem() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased mem') + return + except ManagerIncreaseError: + self.history.warning('increasing mem failed') + + # if this failed ask the task to provide a method to reduce the memory demand + try: + self.reduce_memory_demand() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='decreased mem demand') + return + except DecreaseDemandsError: + self.history.warning('decreasing demands failed') + + msg = ('Memory error detected but the memory could not be increased neither could the\n' + 'memory demand be decreased. Unrecoverable error.') + self.set_status(self.S_ERROR, msg) + raise FixQueueCriticalError + + elif isinstance(error, TimeCancelError): + # ask the qadapter to provide more time + print('trying to increase time') + try: + self.manager.increase_time() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased wall time') + return + except ManagerIncreaseError: + self.history.warning('increasing the waltime failed') + + # if this fails ask the qadapter to increase the number of cpus + if self.load_scales: + try: + self.manager.increase_ncpus() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased number of cpus') + return + except ManagerIncreaseError: + self.history.warning('increase ncpus to speed up the calculation to stay in the walltime failed') + + # if this failed ask the task to provide a method to speed up the task + try: + self.speed_up() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='task speedup') + return + except DecreaseDemandsError: + self.history.warning('decreasing demands failed') + + msg = ('Time cancel error detected but the time could not be increased neither could\n' + 'the time demand be decreased by speedup of increasing the number of cpus.\n' + 'Unrecoverable error.') + self.set_status(self.S_ERROR, msg) + + else: + msg = 'No solution provided for error %s. Unrecoverable error.' % error.name + self.set_status(self.S_ERROR, msg) + + return 0 + + def parse_timing(self): + """ + Parse the timer data in the main output file of Abinit. + Requires timopt /= 0 in the input file (usually timopt = -1) + + Return: :class:`AbinitTimerParser` instance, None if error. + """ + + parser = AbinitTimerParser() + read_ok = parser.parse(self.output_file.path) + if read_ok: + return parser + return None + + +class ProduceHist(object): + """ + Mixin class for a |Task| producing a HIST file. + Provide the method `open_hist` that reads and return a HIST file. + """ + @property + def hist_path(self): + """Absolute path of the HIST file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._hist_path + except AttributeError: + path = self.outdir.has_abiext("HIST") + if path: self._hist_path = path + return path + + def open_hist(self): + """ + Open the HIST file located in the in self.outdir. + Returns |HistFile| object, None if file could not be found or file is not readable. + """ + if not self.hist_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a HIST file in %s" % (self, self.outdir)) + return None + + # Open the HIST file + from abipy.dynamics.hist import HistFile + try: + return HistFile(self.hist_path) + except Exception as exc: + self.history.critical("Exception while reading HIST file at %s:\n%s" % (self.hist_path, str(exc))) + return None + + +class GsTask(AbinitTask): + """ + Base class for ground-state tasks. A ground state task produces a GSR file + Provides the method `open_gsr` that reads and returns a GSR file. + """ + @property + def gsr_path(self): + """Absolute path of the GSR file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._gsr_path + except AttributeError: + path = self.outdir.has_abiext("GSR") + if path: self._gsr_path = path + return path + + def open_gsr(self): + """ + Open the GSR file located in the in self.outdir. + Returns |GsrFile| object, None if file could not be found or file is not readable. + """ + gsr_path = self.gsr_path + if not gsr_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a GSR file in %s" % (self, self.outdir)) + return None + + # Open the GSR file. + from abipy.electrons.gsr import GsrFile + try: + return GsrFile(gsr_path) + except Exception as exc: + self.history.critical("Exception while reading GSR file at %s:\n%s" % (gsr_path, str(exc))) + return None + + +class ScfTask(GsTask): + """ + Self-consistent ground-state calculations. + Provide support for in-place restart via (WFK|DEN) files + """ + CRITICAL_EVENTS = [ + events.ScfConvergenceWarning, + ] + + color_rgb = np.array((255, 0, 0)) / 255 + + def restart(self): + """SCF calculations can be restarted if we have either the WFK file or the DEN file.""" + # Prefer WFK over DEN files since we can reuse the wavefunctions. + for ext in ("WFK", "DEN"): + restart_file = self.outdir.has_abiext(ext) + irdvars = irdvars_for_ext(ext) + if restart_file: break + else: + raise self.RestartError("%s: Cannot find WFK or DEN file to restart from." % self) + + # Move out --> in. + self.out_to_in(restart_file) + + # Add the appropriate variable for restarting. + self.set_vars(irdvars) + + # Now we can resubmit the job. + self.history.info("Will restart from %s", restart_file) + return self._restart() + + def inspect(self, **kwargs): + """ + Plot the SCF cycle results with matplotlib. + + Returns: |matplotlib-Figure| or None if some error occurred. + """ + try: + scf_cycle = abiinspect.GroundStateScfCycle.from_file(self.output_file.path) + except IOError: + return None + + if scf_cycle is not None: + if "title" not in kwargs: kwargs["title"] = str(self) + return scf_cycle.plot(**kwargs) + + return None + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + + # Open the GSR file and add its data to results.out + with self.open_gsr() as gsr: + results["out"].update(gsr.as_dict()) + # Add files to GridFS + results.register_gridfs_files(GSR=gsr.filepath) + + return results + + +class CollinearThenNonCollinearScfTask(ScfTask): + """ + A specialized ScfTaks that performs an initial SCF run with nsppol = 2. + The spin polarized WFK file is then used to start a non-collinear SCF run (nspinor == 2) + initialized from the previous WFK file. + """ + def __init__(self, input, workdir=None, manager=None, deps=None): + super().__init__(input, workdir=workdir, manager=manager, deps=deps) + # Enforce nspinor = 1, nsppol = 2 and prtwf = 1. + self._input = self.input.deepcopy() + self.input.set_spin_mode("polarized") + self.input.set_vars(prtwf=1) + self.collinear_done = False + + def _on_ok(self): + results = super()._on_ok() + if not self.collinear_done: + self.input.set_spin_mode("spinor") + self.collinear_done = True + self.finalized = False + self.restart() + + return results + + +class NscfTask(GsTask): + """ + Non-Self-consistent GS calculation. Provide in-place restart via WFK files + """ + CRITICAL_EVENTS = [ + events.NscfConvergenceWarning, + ] + + color_rgb = np.array((200, 80, 100)) / 255 + + def setup(self): + """ + NSCF calculations should use the same FFT mesh as the one employed in the GS task + (in principle, it's possible to interpolate inside Abinit but tests revealed some numerical noise + Here we change the input file of the NSCF task to have the same FFT mesh. + """ + for dep in self.deps: + if "DEN" in dep.exts: + parent_task = dep.node + break + else: + raise RuntimeError("Cannot find parent node producing DEN file") + + with parent_task.open_gsr() as gsr: + den_mesh = 3 * [None] + den_mesh[0] = gsr.reader.read_dimvalue("number_of_grid_points_vector1") + den_mesh[1] = gsr.reader.read_dimvalue("number_of_grid_points_vector2") + den_mesh[2] = gsr.reader.read_dimvalue("number_of_grid_points_vector3") + if self.ispaw: + self.set_vars(ngfftdg=den_mesh) + else: + self.set_vars(ngfft=den_mesh) + + super().setup() + + def restart(self): + """NSCF calculations can be restarted only if we have the WFK file.""" + ext = "WFK" + restart_file = self.outdir.has_abiext(ext) + if not restart_file: + raise self.RestartError("%s: Cannot find the WFK file to restart from." % self) + + # Move out --> in. + self.out_to_in(restart_file) + + # Add the appropriate variable for restarting. + irdvars = irdvars_for_ext(ext) + self.set_vars(irdvars) + + # Now we can resubmit the job. + self.history.info("Will restart from %s", restart_file) + return self._restart() + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + + # Read the GSR file. + with self.open_gsr() as gsr: + results["out"].update(gsr.as_dict()) + # Add files to GridFS + results.register_gridfs_files(GSR=gsr.filepath) + + return results + + +class RelaxTask(GsTask, ProduceHist): """ - This task compute phonons with a two-step algorithm. - The first DFPT run is done with low-accuracy settings for boxcutmin and ecut - The second DFPT run uses boxcutmin 2.0 and normal ecut and restarts from - the 1WFK file generated previously. + Task for structural optimizations. """ - @classmethod - def patch_flow(cls, flow): - for task in flow.iflat_tasks(): - if isinstance(task, PhononTask): task.__class__ = cls + # TODO possible ScfConvergenceWarning? + CRITICAL_EVENTS = [ + events.RelaxConvergenceWarning, + ] - def setup(self): - super(BoxcuttedPhononTask, self).setup() - self.final_dfp_done = False if not hasattr(self, "final_dfp_done") else self.final_dfp_done - if not self.final_dfp_done: - # First run: use boxcutmin 1.5 and low-accuracy hints (assume pseudos with hints). - pseudos = self.input.pseudos - ecut = max(p.hint_for_accuracy("low").ecut for p in pseudos) - pawecutdg = max(p.hint_for_accuracy("low").pawecutdg for p in pseudos) if self.input.ispaw else None - self.set_vars(boxcutmin=1.5, ecut=ecut, pawecutdg=pawecutdg, prtwf=1) + color_rgb = np.array((255, 61, 255)) / 255 + + def get_final_structure(self): + """Read the final structure from the GSR file.""" + try: + with self.open_gsr() as gsr: + return gsr.structure + except AttributeError: + raise RuntimeError("Cannot find the GSR file with the final structure to restart from.") + + def restart(self): + """ + Restart the structural relaxation. + + Structure relaxations can be restarted only if we have the WFK file or the DEN or the GSR file + from which we can read the last structure (mandatory) and the wavefunctions (not mandatory but useful). + Prefer WFK over other files since we can reuse the wavefunctions. + + .. note:: + + The problem in the present approach is that some parameters in the input + are computed from the initial structure and may not be consistent with + the modification of the structure done during the structure relaxation. + """ + restart_file = None + + # Try to restart from the WFK file if possible. + # FIXME: This part has been disabled because WFK=IO is a mess if paral_kgb == 1 + # This is also the reason why I wrote my own MPI-IO code for the GW part! + wfk_file = self.outdir.has_abiext("WFK") + if False and wfk_file: + irdvars = irdvars_for_ext("WFK") + restart_file = self.out_to_in(wfk_file) + + # Fallback to DEN file. Note that here we look for out_DEN instead of out_TIM?_DEN + # This happens when the previous run completed and task.on_done has been performed. + # ******************************************************************************** + # Note that it's possible to have an undetected error if we have multiple restarts + # and the last relax died badly. In this case indeed out_DEN is the file produced + # by the last run that has executed on_done. + # ******************************************************************************** + if restart_file is None: + for ext in ("", ".nc"): + out_den = self.outdir.path_in("out_DEN" + ext) + if os.path.exists(out_den): + irdvars = irdvars_for_ext("DEN") + restart_file = self.out_to_in(out_den) + break + + if restart_file is None: + # Try to restart from the last TIM?_DEN file. + # This should happen if the previous run didn't complete in clean way. + # Find the last TIM?_DEN file. + last_timden = self.outdir.find_last_timden_file() + if last_timden is not None: + if last_timden.path.endswith(".nc"): + ofile = self.outdir.path_in("out_DEN.nc") + else: + ofile = self.outdir.path_in("out_DEN") + os.rename(last_timden.path, ofile) + restart_file = self.out_to_in(ofile) + irdvars = irdvars_for_ext("DEN") + + if restart_file is None: + # Don't raise RestartError as we can still change the structure. + self.history.warning("Cannot find the WFK|DEN|TIM?_DEN file to restart from.") + else: + # Add the appropriate variable for restarting. + self.set_vars(irdvars) + self.history.info("Will restart from %s", restart_file) + + # FIXME Here we should read the HIST file but restartxf if broken! + #self.set_vars({"restartxf": -1}) + + # Read the relaxed structure from the GSR file and change the input. + self._change_structure(self.get_final_structure()) + + # Now we can resubmit the job. + return self._restart() + + def inspect(self, **kwargs): + """ + Plot the evolution of the structural relaxation with matplotlib. + + Args: + what: Either "hist" or "scf". The first option (default) extracts data + from the HIST file and plot the evolution of the structural + parameters, forces, pressures and energies. + The second option, extracts data from the main output file and + plot the evolution of the SCF cycles (etotal, residuals, etc). + + Returns: |matplotlib-Figure| or None if some error occurred. + """ + what = kwargs.pop("what", "hist") + + if what == "hist": + # Read the hist file to get access to the structure. + with self.open_hist() as hist: + return hist.plot(**kwargs) if hist else None + + elif what == "scf": + # Get info on the different SCF cycles + relaxation = abiinspect.Relaxation.from_file(self.output_file.path) + if "title" not in kwargs: kwargs["title"] = str(self) + return relaxation.plot(**kwargs) if relaxation is not None else None + + else: + raise ValueError("Wrong value for what %s" % what) + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + + # Open the GSR file and add its data to results.out + with self.open_gsr() as gsr: + results["out"].update(gsr.as_dict()) + # Add files to GridFS + results.register_gridfs_files(GSR=gsr.filepath) + + return results + + def reduce_dilatmx(self, target=1.01): + actual_dilatmx = self.get_inpvar('dilatmx', 1.) + new_dilatmx = actual_dilatmx - min((actual_dilatmx-target), actual_dilatmx*0.05) + self.set_vars(dilatmx=new_dilatmx) + + def fix_ofiles(self): + """ + Note that ABINIT produces lots of out_TIM1_DEN files for each step. + Here we list all TIM*_DEN files, we select the last one and we rename it in out_DEN + + This change is needed so that we can specify dependencies with the syntax {node: "DEN"} + without having to know the number of iterations needed to converge the run in node! + """ + super().fix_ofiles() + + # Find the last TIM?_DEN file. + last_timden = self.outdir.find_last_timden_file() + if last_timden is None: + self.history.warning("Cannot find TIM?_DEN files") + return + + # Rename last TIMDEN with out_DEN. + ofile = self.outdir.path_in("out_DEN") + if last_timden.path.endswith(".nc"): ofile += ".nc" + self.history.info("Renaming last_denfile %s --> %s" % (last_timden.path, ofile)) + os.rename(last_timden.path, ofile) + + +class DfptTask(AbinitTask): + """ + Base class for DFPT tasks (Phonons, DdeTask, DdkTask, ElasticTask ...) + Mainly used to implement methods that are common to DFPT calculations with Abinit. + Provide the method `open_ddb` that reads and return a Ddb file. + + .. warning:: + + This class should not be instantiated directly. + """ + # TODO: + # for the time being we don't discern between GS and PhononCalculations. + CRITICAL_EVENTS = [ + events.ScfConvergenceWarning, + ] + + def __repr__(self): + # Get info about DFT perturbation from input file. + qpt = self.input.get("qpt", [0, 0, 0]) + rfphon = self.input.get("rfphon", 0) + rfatpol = self.input.get("rfatpol", [1, 1]) + rfelfd = self.input.get("rfelfd", 0) + rfstrs = self.input.get("rfstrs", 0) + rfdir = self.input.get("rfdir", [0, 0, 0]) + irdddk = self.input.get("irdddk", 0) + + dfpt_info = "" + if rfphon != 0: + dfpt_info = "qpt: {}, rfphon: {}, rfatpol: {}, rfdir: {}, irdddk: {}".format( + qpt, rfphon, rfatpol, rfdir, irdddk) + + elif rfelfd != 0: + dfpt_info = "qpt: {}, rfelfd: {} rfdir: {}, irdddk: {}".format( + qpt, rfelfd, rfdir, irdddk) + + elif rfstrs != 0: + dfpt_info = "qpt: {}, rfstrs: {}, rfdir: {}, irdddk: {}".format( + qpt, rfstrs, rfdir, irdddk) + + try: + return "<%s, node_id=%s, workdir=%s, %s>" % ( + self.__class__.__name__, self.node_id, self.relworkdir, dfpt_info) + except AttributeError: + # this usually happens when workdir has not been initialized + return "<%s, node_id=%s, workdir=None, %s>" % ( + self.__class__.__name__, self.node_id, dfpt_info) + + @property + def ddb_path(self): + """Absolute path of the DDB file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._ddb_path + except AttributeError: + path = self.outdir.has_abiext("DDB") + if path: self._ddb_path = path + return path + + def open_ddb(self): + """ + Open the DDB file located in the in self.outdir. + Returns a |DdbFile| object, None if file could not be found or file is not readable. + """ + ddb_path = self.ddb_path + if not ddb_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a DDB file in %s" % (self, self.outdir)) + return None + + # Open the DDB file. + from abipy.dfpt.ddb import DdbFile + try: + return DdbFile(ddb_path) + except Exception as exc: + self.history.critical("Exception while reading DDB file at %s:\n%s" % (ddb_path, str(exc))) + return None + + def make_links(self): + """ + Replace the default behaviour of make_links. More specifically, this method + implements the logic required to connect DFPT calculation to `DDK` files. + Remember that DDK is an extension introduced in AbiPy to deal with the + irdddk input variable and the fact that the 3 files with du/dk produced by Abinit + have a file extension constructed from the number of atom (e.g. 1WF[3natom +1]). + + AbiPy uses the user-friendly syntax deps={node: "DDK"} to specify that + the children will read the DDK from `node` but this also means that + we have to implement extract logic to handle this case at runtime. + """ + for dep in self.deps: + for d in dep.exts: + + if d == "DDK": + ddk_task = dep.node + out_ddk = ddk_task.outdir.has_abiext("DDK") + if not out_ddk: + raise RuntimeError("%s didn't produce the DDK file" % ddk_task) + + # Get (fortran) idir and costruct the name of the 1WF expected by Abinit + rfdir = list(ddk_task.input["rfdir"]) + if rfdir.count(1) != 1: + raise RuntimeError("Only one direction should be specifned in rfdir but rfdir = %s" % rfdir) + + idir = rfdir.index(1) + 1 + ddk_case = idir + 3 * len(ddk_task.input.structure) + + infile = self.indir.path_in("in_1WF%d" % ddk_case) + if out_ddk.endswith(".nc"): infile = infile + ".nc" + os.symlink(out_ddk, infile) + + elif d in ("WFK", "WFQ"): + gs_task = dep.node + out_wfk = gs_task.outdir.has_abiext(d) + if not out_wfk: + raise RuntimeError("%s didn't produce the %s file" % (gs_task, d)) + + if d == "WFK": + bname = "in_WFK" + elif d == "WFQ": + bname = "in_WFQ" + else: + raise ValueError("Don't know how to handle `%s`" % d) + + # Ensure link has .nc extension if iomode 3 + if out_wfk.endswith(".nc"): bname = bname + ".nc" + #print(d, out_wfk, "bname", bname) + if not os.path.exists(self.indir.path_in(bname)): + os.symlink(out_wfk, self.indir.path_in(bname)) + + elif d == "DEN": + gs_task = dep.node + out_wfk = gs_task.outdir.has_abiext("DEN") + if not out_wfk: + raise RuntimeError("%s didn't produce the DEN file" % gs_task) + infile = self.indir.path_in("in_DEN") + if out_wfk.endswith(".nc"): infile = infile + ".nc" + if not os.path.exists(infile): + os.symlink(out_wfk, infile) + + elif d == "1WF": + gs_task = dep.node + out_wfk = gs_task.outdir.has_abiext("1WF") + if not out_wfk: + raise RuntimeError("%s didn't produce the 1WF file" % gs_task) + dest = self.indir.path_in("in_" + out_wfk.split("_")[-1]) + if out_wfk.endswith(".nc"): dest = dest + ".nc" + if not os.path.exists(dest): + os.symlink(out_wfk, dest) + + elif d == "1DEN": + gs_task = dep.node + out_wfk = gs_task.outdir.has_abiext("DEN") + if not out_wfk: + raise RuntimeError("%s didn't produce the 1DEN file" % gs_task) + dest = self.indir.path_in("in_" + out_wfk.split("_")[-1]) + if out_wfk.endswith(".nc"): dest = dest + ".nc" + if not os.path.exists(dest): + os.symlink(out_wfk, dest) + + else: + raise ValueError("Don't know how to handle extension: %s" % str(dep.exts)) + + def restart(self): + """ + DFPT calculations can be restarted only if we have the 1WF file or the 1DEN file. + from which we can read the first-order wavefunctions or the first order density. + Prefer 1WF over 1DEN since we can reuse the wavefunctions. + """ + # Abinit adds the idir-ipert index at the end of the file and this breaks the extension + # e.g. out_1WF4, out_DEN4. find_1wf_files and find_1den_files returns the list of files found + restart_file, irdvars = None, None + + # Highest priority to the 1WF file because restart is more efficient. + wf_files = self.outdir.find_1wf_files() + if wf_files is not None: + restart_file = wf_files[0].path + irdvars = irdvars_for_ext("1WF") + if len(wf_files) != 1: + restart_file = None + self.history.critical("Found more than one 1WF file in outdir. Restart is ambiguous!") + + if restart_file is None: + den_files = self.outdir.find_1den_files() + if den_files is not None: + restart_file = den_files[0].path + irdvars = {"ird1den": 1} + if len(den_files) != 1: + restart_file = None + self.history.critical("Found more than one 1DEN file in outdir. Restart is ambiguous!") + + if restart_file is None: + # Raise because otherwise restart is equivalent to a run from scratch --> infinite loop! + raise self.RestartError("%s: Cannot find the 1WF|1DEN file to restart from." % self) + + # Move file. + self.history.info("Will restart from %s", restart_file) + restart_file = self.out_to_in(restart_file) + + # Add the appropriate variable for restarting. + self.set_vars(irdvars) + # Now we can resubmit the job. + return self._restart() + + +class DdeTask(DfptTask): + """Task for DDE calculations (perturbation wrt electric field).""" + + color_rgb = np.array((61, 158, 255)) / 255 + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + return results.register_gridfs_file(DDB=(self.outdir.has_abiext("DDE"), "t")) + + +class DteTask(DfptTask): + """Task for DTE calculations.""" + color_rgb = np.array((204, 0, 204)) / 255 + + # @check_spectator + def start(self, **kwargs): + kwargs['autoparal'] = False + return super().start(**kwargs) + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + return results.register_gridfs_file(DDB=(self.outdir.has_abiext("DDE"), "t")) + + +class DdkTask(DfptTask): + """Task for DDK calculations.""" + color_rgb = np.array((0, 204, 204)) / 255 + + #@check_spectator def _on_ok(self): - results = super(BoxcuttedPhononTask, self)._on_ok() - if not self.final_dfp_done: - # Second run: use exact box and normal-accuracy hints (assume pseudos with hints). - pseudos = self.input.pseudos - ecut = max(p.hint_for_accuracy("normal").ecut for p in pseudos) - pawecutdg = max(p.hint_for_accuracy("normal").pawecutdg for p in pseudos) if self.input.ispaw else None - self.set_vars(boxcutmin=2.0, ecut=ecut, pawecutdg=pawecutdg, prtwf=-1) - self.finalized = True - self.final_dfp_done = True - self.restart() + super()._on_ok() + # Client code expects to find du/dk in DDK file. + # Here I create a symbolic link out_1WF13 --> out_DDK + # so that we can use deps={ddk_task: "DDK"} in the high-level API. + # The price to pay is that we have to handle the DDK extension in make_links. + # See DfptTask.make_links + self.outdir.symlink_abiext('1WF', 'DDK') + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + return results.register_gridfs_file(DDK=(self.outdir.has_abiext("DDK"), "t")) + + +class BecTask(DfptTask): + """ + Task for the calculation of Born effective charges. + + bec_deps = {ddk_task: "DDK" for ddk_task in ddk_tasks} + bec_deps.update({scf_task: "WFK"}) + """ + color_rgb = np.array((122, 122, 255)) / 255 + + +class EffMassTask(DfptTask): + """Task for effective mass calculations with DFPT.""" + color_rgb = np.array((0, 122, 204)) / 255 + + +class PhononTask(DfptTask): + """ + DFPT calculations for a single atomic perturbation. + Provide support for in-place restart via (1WF|1DEN) files + """ + color_rgb = np.array((0, 150, 250)) / 255 + + def inspect(self, **kwargs): + """ + Plot the Phonon SCF cycle results with matplotlib. + + Returns: |matplotlib-Figure| or None if some error occurred. + """ + scf_cycle = abiinspect.PhononScfCycle.from_file(self.output_file.path) + if scf_cycle is not None: + if "title" not in kwargs: kwargs["title"] = str(self) + return scf_cycle.plot(**kwargs) + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + return results.register_gridfs_files(DDB=(self.outdir.has_abiext("DDB"), "t")) + + +class ElasticTask(DfptTask): + """ + DFPT calculations for a single strain perturbation (uniaxial or shear strain). + Provide support for in-place restart via (1WF|1DEN) files + """ + color_rgb = np.array((255, 204, 255)) / 255 + + +class EphTask(AbinitTask): + """ + Class for electron-phonon calculations. + """ + color_rgb = np.array((255, 128, 0)) / 255 + + +class ManyBodyTask(AbinitTask): + """ + Base class for Many-body tasks (Screening, Sigma, Bethe-Salpeter) + Mainly used to implement methods that are common to MBPT calculations with Abinit. + + .. warning:: + + This class should not be instantiated directly. + """ + def reduce_memory_demand(self): + """ + Method that can be called by the scheduler to decrease the memory demand of a specific task. + Returns True in case of success, False in case of Failure. + """ + # The first digit governs the storage of W(q), the second digit the storage of u(r) + # Try to avoid the storage of u(r) first since reading W(q) from file will lead to a drammatic slowdown. + prev_gwmem = int(self.get_inpvar("gwmem", default=11)) + first_dig, second_dig = prev_gwmem // 10, prev_gwmem % 10 + + if second_dig == 1: + self.set_vars(gwmem="%.2d" % (10 * first_dig)) + return True + + if first_dig == 1: + self.set_vars(gwmem="%.2d" % 00) + return True + + # gwmem 00 d'oh! + return False + + +class ScrTask(ManyBodyTask): + """Tasks for SCREENING calculations """ + + color_rgb = np.array((255, 128, 0)) / 255 + + @property + def scr_path(self): + """Absolute path of the SCR file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._scr_path + except AttributeError: + path = self.outdir.has_abiext("SCR.nc") + if path: self._scr_path = path + return path + + def open_scr(self): + """ + Open the SIGRES file located in the in self.outdir. + Returns |ScrFile| object, None if file could not be found or file is not readable. + """ + scr_path = self.scr_path + + if not scr_path: + self.history.critical("%s didn't produce a SCR.nc file in %s" % (self, self.outdir)) + return None + + # Open the GSR file and add its data to results.out + from abipy.electrons.scr import ScrFile + try: + return ScrFile(scr_path) + except Exception as exc: + self.history.critical("Exception while reading SCR file at %s:\n%s" % (scr_path, str(exc))) + return None + + +class SigmaTask(ManyBodyTask): + """ + Tasks for SIGMA calculations. Provides support for in-place restart via QPS files + """ + CRITICAL_EVENTS = [ + events.QPSConvergenceWarning, + ] + + color_rgb = np.array((0, 255, 0)) / 255 + + def restart(self): + # G calculations can be restarted only if we have the QPS file + # from which we can read the results of the previous step. + ext = "QPS" + restart_file = self.outdir.has_abiext(ext) + if not restart_file: + raise self.RestartError("%s: Cannot find the QPS file to restart from." % self) + + self.out_to_in(restart_file) + + # Add the appropriate variable for restarting. + irdvars = irdvars_for_ext(ext) + self.set_vars(irdvars) + + # Now we can resubmit the job. + self.history.info("Will restart from %s", restart_file) + return self._restart() + + #def inspect(self, **kwargs): + # """Plot graph showing the number of k-points computed and the wall-time used""" + + @property + def sigres_path(self): + """Absolute path of the SIGRES file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._sigres_path + except AttributeError: + path = self.outdir.has_abiext("SIGRES") + if path: self._sigres_path = path + return path + + def open_sigres(self): + """ + Open the SIGRES file located in the in self.outdir. + Returns |SigresFile| object, None if file could not be found or file is not readable. + """ + sigres_path = self.sigres_path + + if not sigres_path: + self.history.critical("%s didn't produce a SIGRES file in %s" % (self, self.outdir)) + return None + + # Open the SIGRES file and add its data to results.out + from abipy.electrons.gw import SigresFile + try: + return SigresFile(sigres_path) + except Exception as exc: + self.history.critical("Exception while reading SIGRES file at %s:\n%s" % (sigres_path, str(exc))) + return None + + def get_scissors_builder(self): + """ + Returns an instance of :class:`ScissorsBuilder` from the SIGRES file. + + Raise: + `RuntimeError` if SIGRES file is not found. + """ + from abipy.electrons.scissors import ScissorsBuilder + if self.sigres_path: + return ScissorsBuilder.from_file(self.sigres_path) + else: + raise RuntimeError("Cannot find SIGRES file!") + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + + # Open the SIGRES file and add its data to results.out + with self.open_sigres() as sigres: + #results["out"].update(sigres.as_dict()) + results.register_gridfs_files(SIGRES=sigres.filepath) + + return results + + +class BseTask(ManyBodyTask): + """ + Task for Bethe-Salpeter calculations. + + .. note:: + + The BSE codes provides both iterative and direct schemes for the computation of the dielectric function. + The direct diagonalization cannot be restarted whereas Haydock and CG support restarting. + """ + CRITICAL_EVENTS = [ + events.HaydockConvergenceWarning, + #events.BseIterativeDiagoConvergenceWarning, + ] + + color_rgb = np.array((128, 0, 255)) / 255 + + def restart(self): + """ + BSE calculations with Haydock can be restarted only if we have the + excitonic Hamiltonian and the HAYDR_SAVE file. + """ + # TODO: This version seems to work but the main output file is truncated + # TODO: Handle restart if CG method is used + # TODO: restart should receive a list of critical events + # the log file is complete though. + irdvars = {} + + # Move the BSE blocks to indata. + # This is done only once at the end of the first run. + # Successive restarts will use the BSR|BSC files in the indir directory + # to initialize the excitonic Hamiltonian + count = 0 + for ext in ("BSR", "BSC"): + ofile = self.outdir.has_abiext(ext) + if ofile: + count += 1 + irdvars.update(irdvars_for_ext(ext)) + self.out_to_in(ofile) + + if not count: + # outdir does not contain the BSR|BSC file. + # This means that num_restart > 1 and the files should be in task.indir + count = 0 + for ext in ("BSR", "BSC"): + ifile = self.indir.has_abiext(ext) + if ifile: + count += 1 + + if not count: + raise self.RestartError("%s: Cannot find BSR|BSC files in %s" % (self, self.indir)) + + # Rename HAYDR_SAVE files + count = 0 + for ext in ("HAYDR_SAVE", "HAYDC_SAVE"): + ofile = self.outdir.has_abiext(ext) + if ofile: + count += 1 + irdvars.update(irdvars_for_ext(ext)) + self.out_to_in(ofile) + + if not count: + raise self.RestartError("%s: Cannot find the HAYDR_SAVE file to restart from." % self) + + # Add the appropriate variable for restarting. + self.set_vars(irdvars) + + # Now we can resubmit the job. + #self.history.info("Will restart from %s", restart_file) + return self._restart() + + #def inspect(self, **kwargs): + # """ + # Plot the Haydock iterations with matplotlib. + # + # Returns: |matplotlib-Figure| or None if some error occurred. + # """ + # haydock_cycle = abiinspect.HaydockIterations.from_file(self.output_file.path) + # if haydock_cycle is not None: + # if "title" not in kwargs: kwargs["title"] = str(self) + # return haydock_cycle.plot(**kwargs) + + @property + def mdf_path(self): + """Absolute path of the MDF file. Empty string if file is not present.""" + # Lazy property to avoid multiple calls to has_abiext. + try: + return self._mdf_path + except AttributeError: + path = self.outdir.has_abiext("MDF.nc") + if path: self._mdf_path = path + return path + + def open_mdf(self): + """ + Open the MDF file located in the in self.outdir. + Returns |MdfFile| object, None if file could not be found or file is not readable. + """ + mdf_path = self.mdf_path + if not mdf_path: + self.history.critical("%s didn't produce a MDF file in %s" % (self, self.outdir)) + return None + + # Open the DFF file and add its data to results.out + from abipy.electrons.bse import MdfFile + try: + return MdfFile(mdf_path) + except Exception as exc: + self.history.critical("Exception while reading MDF file at %s:\n%s" % (mdf_path, str(exc))) + return None + + def get_results(self, **kwargs): + results = super().get_results(**kwargs) + + with self.open_mdf() as mdf: + #results["out"].update(mdf.as_dict()) + #epsilon_infinity optical_gap + results.register_gridfs_files(MDF=mdf.filepath) return results + +class OpticTask(Task): + """ + Task for the computation of optical spectra with optic i.e. + RPA without local-field effects and velocity operator computed from DDK files. + """ + color_rgb = np.array((255, 204, 102)) / 255 + + def __init__(self, optic_input, nscf_node, ddk_nodes, use_ddknc=False, workdir=None, manager=None): + """ + Create an instance of :class:`OpticTask` from n string containing the input. + + Args: + optic_input: :class:`OpticInput` object with optic variables. + nscf_node: The task that will produce the WFK file with the KS energies or path to the WFK file. + ddk_nodes: List of :class:`DdkTask` nodes that will produce the DDK files or list of DDK filepaths. + Order (x, y, z) + workdir: Path to the working directory. + manager: |TaskManager| object. + """ + # Convert paths to FileNodes + self.nscf_node = Node.as_node(nscf_node) + self.ddk_nodes = [Node.as_node(n) for n in ddk_nodes] + assert len(ddk_nodes) == 3 + #print(self.nscf_node, self.ddk_nodes) + + # Use DDK extension instead of 1WF + if use_ddknc: + deps = {n: "DDK.nc" for n in self.ddk_nodes} + else: + deps = {n: "1WF" for n in self.ddk_nodes} + + deps.update({self.nscf_node: "WFK"}) + + super().__init__(optic_input, workdir=workdir, manager=manager, deps=deps) + + def set_workdir(self, workdir, chroot=False): + """Set the working directory of the task.""" + super().set_workdir(workdir, chroot=chroot) + # Small hack: the log file of optics is actually the main output file. + self.output_file = self.log_file + + def set_vars(self, *args, **kwargs): + """ + Optic does not use `get` or `ird` variables hence we should never try + to change the input when we connect this task + """ + kwargs.update(dict(*args)) + self.history.info("OpticTask intercepted set_vars with args %s" % kwargs) + + if "autoparal" in kwargs: self.input.set_vars(autoparal=kwargs["autoparal"]) + if "max_ncpus" in kwargs: self.input.set_vars(max_ncpus=kwargs["max_ncpus"]) + + @property + def executable(self): + """Path to the executable required for running the :class:`OpticTask`.""" + try: + return self._executable + except AttributeError: + return "optic" + + @property + def filesfile_string(self): + """String with the list of files and prefixes needed to execute ABINIT.""" + lines = [] + app = lines.append + + app(self.input_file.path) # Path to the input file + app(os.path.join(self.workdir, "unused")) # Path to the output file + app(os.path.join(self.workdir, self.prefix.odata)) # Prefix for output data + + return "\n".join(lines) + + @property + def wfk_filepath(self): + """Returns (at runtime) the absolute path of the WFK file produced by the NSCF run.""" + return self.nscf_node.outdir.has_abiext("WFK") + + @property + def ddk_filepaths(self): + """Returns (at runtime) the absolute path of the DDK files produced by the DDK runs.""" + # This to support new version of optic that used DDK.nc + paths = [ddk_task.outdir.has_abiext("DDK.nc") for ddk_task in self.ddk_nodes] + if all(p for p in paths): + return paths + + # This is deprecated and can be removed when new version of Abinit is released. + return [ddk_task.outdir.has_abiext("1WF") for ddk_task in self.ddk_nodes] + + def make_input(self): + """Construct and write the input file of the calculation.""" + # Set the file paths. + all_files = {"ddkfile_" + str(n + 1): ddk for n, ddk in enumerate(self.ddk_filepaths)} + all_files.update({"wfkfile": self.wfk_filepath}) + files_nml = {"FILES": all_files} + files = nmltostring(files_nml) + + # Get the input specified by the user + user_file = nmltostring(self.input.as_dict()) + + # Join them. + return files + user_file + + def setup(self): + """Public method called before submitting the task.""" + + def make_links(self): + """ + Optic allows the user to specify the paths of the input file. + hence we don't need to create symbolic links. + """ + + def get_results(self, **kwargs): + return super().get_results(**kwargs) + + def fix_abicritical(self): + """ + Cannot fix abicritical errors for optic + """ + return 0 + + #@check_spectator + def reset_from_scratch(self): + """ + restart from scratch, this is to be used if a job is restarted with more resources after a crash + """ + # Move output files produced in workdir to _reset otherwise check_status continues + # to see the task as crashed even if the job did not run + # Create reset directory if not already done. + reset_dir = os.path.join(self.workdir, "_reset") + reset_file = os.path.join(reset_dir, "_counter") + if not os.path.exists(reset_dir): + os.mkdir(reset_dir) + num_reset = 1 + else: + with open(reset_file, "rt") as fh: + num_reset = 1 + int(fh.read()) + + # Move files to reset and append digit with reset index. + def move_file(f): + if not f.exists: return + try: + f.move(os.path.join(reset_dir, f.basename + "_" + str(num_reset))) + except OSError as exc: + self.history.warning("Couldn't move file {}. exc: {}".format(f, str(exc))) + + for fname in ("output_file", "log_file", "stderr_file", "qout_file", "qerr_file", "mpiabort_file"): + move_file(getattr(self, fname)) + + with open(reset_file, "wt") as fh: + fh.write(str(num_reset)) + + self.start_lockfile.remove() + + # Reset datetimes + self.datetimes.reset() + + return self._restart(submit=False) + + def fix_queue_critical(self): + """ + This function tries to fix critical events originating from the queue submission system. + + General strategy, first try to increase resources in order to fix the problem, + if this is not possible, call a task specific method to attempt to decrease the demands. + + Returns: + 1 if task has been fixed else 0. + """ + from abipy.flowtk.scheduler_error_parsers import NodeFailureError, MemoryCancelError, TimeCancelError + + if not self.queue_errors: + if self.mem_scales or self.load_scales: + try: + self.manager.increase_resources() # acts either on the policy or on the qadapter + self.reset_from_scratch() + return + except ManagerIncreaseError: + self.set_status(self.S_ERROR, msg='unknown queue error, could not increase resources any further') + raise FixQueueCriticalError + else: + self.set_status(self.S_ERROR, msg='unknown queue error, no options left') + raise FixQueueCriticalError + + else: + for error in self.queue_errors: + self.history.info('fixing: %s' % str(error)) + + if isinstance(error, NodeFailureError): + # if the problematic node is known, exclude it + if error.nodes is not None: + try: + self.manager.exclude_nodes(error.nodes) + self.reset_from_scratch() + self.set_status(self.S_READY, msg='excluding nodes') + except Exception: + raise FixQueueCriticalError + else: + self.set_status(self.S_ERROR, msg='Node error but no node identified.') + raise FixQueueCriticalError + + elif isinstance(error, MemoryCancelError): + # ask the qadapter to provide more resources, i.e. more cpu's so more total memory if the code + # scales this should fix the memeory problem + # increase both max and min ncpu of the autoparalel and rerun autoparalel + if self.mem_scales: + try: + self.manager.increase_ncpus() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased ncps to solve memory problem') + return + except ManagerIncreaseError: + self.history.warning('increasing ncpus failed') + + # if the max is reached, try to increase the memory per cpu: + try: + self.manager.increase_mem() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased mem') + return + except ManagerIncreaseError: + self.history.warning('increasing mem failed') + + # if this failed ask the task to provide a method to reduce the memory demand + try: + self.reduce_memory_demand() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='decreased mem demand') + return + except DecreaseDemandsError: + self.history.warning('decreasing demands failed') + + msg = ('Memory error detected but the memory could not be increased neither could the\n' + 'memory demand be decreased. Unrecoverable error.') + self.set_status(self.S_ERROR, msg) + raise FixQueueCriticalError + + elif isinstance(error, TimeCancelError): + # ask the qadapter to provide more time + try: + self.manager.increase_time() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased wall time') + return + except ManagerIncreaseError: + self.history.warning('increasing the walltime failed') + + # if this fails ask the qadapter to increase the number of cpus + if self.load_scales: + try: + self.manager.increase_ncpus() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='increased number of cpus') + return + except ManagerIncreaseError: + self.history.warning('increase ncpus to speed up the calculation to stay in the walltime failed') + + # if this failed ask the task to provide a method to speed up the task + try: + self.speed_up() + self.reset_from_scratch() + self.set_status(self.S_READY, msg='task speedup') + return + except DecreaseDemandsError: + self.history.warning('decreasing demands failed') + + msg = ('Time cancel error detected but the time could not be increased neither could\n' + 'the time demand be decreased by speedup of increasing the number of cpus.\n' + 'Unrecoverable error.') + self.set_status(self.S_ERROR, msg) + + else: + msg = 'No solution provided for error %s. Unrecoverable error.' % error.name + self.set_status(self.S_ERROR, msg) + + return 0 + + def autoparal_run(self): + """ + Find an optimal set of parameters for the execution of the Optic task + This method can change the submission parameters e.g. the number of CPUs for MPI and OpenMp. + + Returns 0 if success + """ + policy = self.manager.policy + + if policy.autoparal == 0: # or policy.max_ncpus in [None, 1]: + self.history.info("Nothing to do in autoparal, returning (None, None)") + return 0 + + if policy.autoparal != 1: + raise NotImplementedError("autoparal != 1") + + ############################################################################ + # Run ABINIT in sequential to get the possible configurations with max_ncpus + ############################################################################ + + # Set the variables for automatic parallelization + # Will get all the possible configurations up to max_ncpus + # Return immediately if max_ncpus == 1 + max_ncpus = self.manager.max_cores + if max_ncpus == 1: return 0 + + autoparal_vars = dict(autoparal=policy.autoparal, max_ncpus=max_ncpus) + self.set_vars(autoparal_vars) + + # Run the job in a shell subprocess with mpi_procs = 1 + # we don't want to make a request to the queue manager for this simple job! + # Return code is always != 0 + process = self.manager.to_shell_manager(mpi_procs=1).launch(self) + self.history.pop() + retcode = process.wait() + # To avoid: ResourceWarning: unclosed file <_io.BufferedReader name=87> in py3k + process.stderr.close() + #process.stdout.close() + + # Remove the variables added for the automatic parallelization + self.input.remove_vars(list(autoparal_vars.keys())) + + ############################################################## + # Parse the autoparal configurations from the main output file + ############################################################## + parser = ParalHintsParser() + try: + pconfs = parser.parse(self.output_file.path) + except parser.Error: + # In principle Abinit should have written a complete log file + # because we called .wait() but sometimes the Yaml doc is incomplete and + # the parser raises. Let's wait 5 secs and then try again. + time.sleep(5) + try: + pconfs = parser.parse(self.output_file.path) + except parser.Error: + self.history.critical("Error while parsing Autoparal section:\n%s" % straceback()) + return 2 + + ###################################################### + # Select the optimal configuration according to policy + ###################################################### + #optconf = self.find_optconf(pconfs) + # Select the partition on which we'll be running and set MPI/OMP cores. + optconf = self.manager.select_qadapter(pconfs) + + #################################################### + # Change the input file and/or the submission script + #################################################### + self.set_vars(optconf.vars) + + # Write autoparal configurations to JSON file. + d = pconfs.as_dict() + d["optimal_conf"] = optconf + json_pretty_dump(d, os.path.join(self.workdir, "autoparal.json")) + + ############## + # Finalization + ############## + # Reset the status, remove garbage files ... + self.set_status(self.S_INIT, msg='finished auto paralell') + + # Remove the output file since Abinit likes to create new files + # with extension .outA, .outB if the file already exists. + os.remove(self.output_file.path) + #os.remove(self.log_file.path) + os.remove(self.stderr_file.path) + + return 0 + + +class AnaddbTask(Task): + """Task for Anaddb runs (post-processing of DFPT calculations).""" + + color_rgb = np.array((204, 102, 255)) / 255 + + def __init__(self, anaddb_input, ddb_node, + gkk_node=None, md_node=None, ddk_node=None, workdir=None, manager=None): + """ + Create an instance of AnaddbTask from a string containing the input. + + Args: + anaddb_input: string with the anaddb variables. + ddb_node: The node that will produce the DDB file. Accept |Task|, |Work| or filepath. + gkk_node: The node that will produce the GKK file (optional). Accept |Task|, |Work| or filepath. + md_node: The node that will produce the MD file (optional). Accept |Task|, |Work| or filepath. + gkk_node: The node that will produce the GKK file (optional). Accept |Task|, |Work| or filepath. + workdir: Path to the working directory (optional). + manager: |TaskManager| object (optional). + """ + # Keep a reference to the nodes. + self.ddb_node = Node.as_node(ddb_node) + deps = {self.ddb_node: "DDB"} + + self.gkk_node = Node.as_node(gkk_node) + if self.gkk_node is not None: + deps.update({self.gkk_node: "GKK"}) + + # I never used it! + self.md_node = Node.as_node(md_node) + if self.md_node is not None: + deps.update({self.md_node: "MD"}) + + self.ddk_node = Node.as_node(ddk_node) + if self.ddk_node is not None: + deps.update({self.ddk_node: "DDK"}) + + super().__init__(input=anaddb_input, workdir=workdir, manager=manager, deps=deps) + + @classmethod + def temp_shell_task(cls, inp, ddb_node, mpi_procs=1, + gkk_node=None, md_node=None, ddk_node=None, workdir=None, manager=None): + """ + Build a |AnaddbTask| with a temporary workdir. The task is executed via + the shell with 1 MPI proc. Mainly used for post-processing the DDB files. + + Args: + mpi_procs: Number of MPI processes to use. + anaddb_input: string with the anaddb variables. + ddb_node: The node that will produce the DDB file. Accept |Task|, |Work| or filepath. + + See `AnaddbInit` for the meaning of the other arguments. + """ + # Build a simple manager to run the job in a shell subprocess + import tempfile + workdir = tempfile.mkdtemp() if workdir is None else workdir + if manager is None: manager = TaskManager.from_user_config() + + # Construct the task and run it + return cls(inp, ddb_node, + gkk_node=gkk_node, md_node=md_node, ddk_node=ddk_node, + workdir=workdir, manager=manager.to_shell_manager(mpi_procs=mpi_procs)) + + @property + def executable(self): + """Path to the executable required for running the |AnaddbTask|.""" + try: + return self._executable + except AttributeError: + return "anaddb" + + @property + def filesfile_string(self): + """String with the list of files and prefixes needed to execute ABINIT.""" + lines = [] + app = lines.append + + app(self.input_file.path) # 1) Path of the input file + app(self.output_file.path) # 2) Path of the output file + app(self.ddb_filepath) # 3) Input derivative database e.g. t13.ddb.in + app(self.md_filepath) # 4) Output molecular dynamics e.g. t13.md + app(self.gkk_filepath) # 5) Input elphon matrix elements (GKK file) + app(self.outdir.path_join("out")) # 6) Base name for elphon output files e.g. t13 + app(self.ddk_filepath) # 7) File containing ddk filenames for elphon/transport. + + return "\n".join(lines) + + @property + def ddb_filepath(self): + """Returns (at runtime) the absolute path of the input DDB file.""" + # This is not very elegant! A possible approach could to be path self.ddb_node.outdir! + if isinstance(self.ddb_node, FileNode): return self.ddb_node.filepath + path = self.ddb_node.outdir.has_abiext("DDB") + return path if path else "DDB_FILE_DOES_NOT_EXIST" + + @property + def md_filepath(self): + """Returns (at runtime) the absolute path of the input MD file.""" + if self.md_node is None: return "MD_FILE_DOES_NOT_EXIST" + if isinstance(self.md_node, FileNode): return self.md_node.filepath + + path = self.md_node.outdir.has_abiext("MD") + return path if path else "MD_FILE_DOES_NOT_EXIST" + + @property + def gkk_filepath(self): + """Returns (at runtime) the absolute path of the input GKK file.""" + if self.gkk_node is None: return "GKK_FILE_DOES_NOT_EXIST" + if isinstance(self.gkk_node, FileNode): return self.gkk_node.filepath + + path = self.gkk_node.outdir.has_abiext("GKK") + return path if path else "GKK_FILE_DOES_NOT_EXIST" + + @property + def ddk_filepath(self): + """Returns (at runtime) the absolute path of the input DKK file.""" + if self.ddk_node is None: return "DDK_FILE_DOES_NOT_EXIST" + if isinstance(self.ddk_node, FileNode): return self.ddk_node.filepath + + path = self.ddk_node.outdir.has_abiext("DDK") + return path if path else "DDK_FILE_DOES_NOT_EXIST" + + def setup(self): + """Public method called before submitting the task.""" + + def make_links(self): + """ + Anaddb allows the user to specify the paths of the input file. + hence we don't need to create symbolic links. + """ + + def open_phbst(self): + """Open PHBST file produced by Anaddb and returns |PhbstFile| object.""" + from abipy.dfpt.phonons import PhbstFile + phbst_path = os.path.join(self.workdir, "run.abo_PHBST.nc") + if not phbst_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a PHBST file in %s" % (self, self.outdir)) + return None + + try: + return PhbstFile(phbst_path) + except Exception as exc: + self.history.critical("Exception while reading GSR file at %s:\n%s" % (phbst_path, str(exc))) + return None + + def open_phdos(self): + """Open PHDOS file produced by Anaddb and returns |PhdosFile| object.""" + from abipy.dfpt.phonons import PhdosFile + phdos_path = os.path.join(self.workdir, "run.abo_PHDOS.nc") + if not phdos_path: + if self.status == self.S_OK: + self.history.critical("%s reached S_OK but didn't produce a PHBST file in %s" % (self, self.outdir)) + return None + + try: + return PhdosFile(phdos_path) + except Exception as exc: + self.history.critical("Exception while reading GSR file at %s:\n%s" % (phdos_path, str(exc))) + return None + + def get_results(self, **kwargs): + return super().get_results(**kwargs) + + +#class BoxcuttedPhononTask(PhononTask): +# """ +# This task compute phonons with a two-step algorithm. +# The first DFPT run is done with low-accuracy settings for boxcutmin and ecut +# The second DFPT run uses boxcutmin 2.0 and normal ecut and restarts from +# the 1WFK file generated previously. +# """ +# @classmethod +# def patch_flow(cls, flow): +# for task in flow.iflat_tasks(): +# if isinstance(task, PhononTask): task.__class__ = cls +# +# def setup(self): +# super().setup() +# self.final_dfp_done = False if not hasattr(self, "final_dfp_done") else self.final_dfp_done +# if not self.final_dfp_done: +# # First run: use boxcutmin 1.5 and low-accuracy hints (assume pseudos with hints). +# pseudos = self.input.pseudos +# ecut = max(p.hint_for_accuracy("low").ecut for p in pseudos) +# pawecutdg = max(p.hint_for_accuracy("low").pawecutdg for p in pseudos) if self.input.ispaw else None +# self.set_vars(boxcutmin=1.5, ecut=ecut, pawecutdg=pawecutdg, prtwf=1) +# +# def _on_ok(self): +# results = super()._on_ok() +# if not self.final_dfp_done: +# # Second run: use exact box and normal-accuracy hints (assume pseudos with hints). +# pseudos = self.input.pseudos +# ecut = max(p.hint_for_accuracy("normal").ecut for p in pseudos) +# pawecutdg = max(p.hint_for_accuracy("normal").pawecutdg for p in pseudos) if self.input.ispaw else None +# self.set_vars(boxcutmin=2.0, ecut=ecut, pawecutdg=pawecutdg, prtwf=-1) +# self.finalized = True +# self.final_dfp_done = True +# self.restart() +# +# return results diff --git a/abipy/flowtk/tests/test_abiobjects.py b/abipy/flowtk/tests/test_abiobjects.py index bde43734b..1b64f39b5 100644 --- a/abipy/flowtk/tests/test_abiobjects.py +++ b/abipy/flowtk/tests/test_abiobjects.py @@ -1,6 +1,4 @@ """Tests for flowtk.abiobjects module.""" -from __future__ import print_function, division, unicode_literals - import numpy as np import abipy.data as abidata @@ -25,9 +23,9 @@ def test_nio(self): self.serialize_with_pickle(luj_params, test_eq=False) atrue(avars["usepawu"] == 1) - aequal(avars["lpawu"], "2 -1"), - aequal(avars["upawu"], "8.0 0.0 eV") - aequal(avars["jpawu"], "0.8 0.0 eV") + aequal(avars["lpawu"], "-1 2"), + aequal(avars["upawu"], "0.0 8.0 eV") + aequal(avars["jpawu"], "0.0 0.8 eV") # Cannot add UJ for non-existent species. with self.assertRaises(ValueError): @@ -44,7 +42,7 @@ def test_nio(self): self.serialize_with_pickle(lexx_params, test_eq=False) aequal(avars["useexexch"], 1), - aequal(avars["lexexch"], "2 -1") + aequal(avars["lexexch"], "-1 2") # Cannot add LEXX for non-existent species. with self.assertRaises(ValueError): diff --git a/abipy/flowtk/tests/test_abiphonopy.py b/abipy/flowtk/tests/test_abiphonopy.py index 310f17411..8d8501f83 100644 --- a/abipy/flowtk/tests/test_abiphonopy.py +++ b/abipy/flowtk/tests/test_abiphonopy.py @@ -1,6 +1,4 @@ """Tests for abiphonopy module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.data as abidata import abipy.flowtk as flowtk import abipy.flowtk.abiphonopy as abiph diff --git a/abipy/flowtk/tests/test_dfpt_works.py b/abipy/flowtk/tests/test_dfpt_works.py index 6308cc729..60389bcaa 100644 --- a/abipy/flowtk/tests/test_dfpt_works.py +++ b/abipy/flowtk/tests/test_dfpt_works.py @@ -1,12 +1,8 @@ """Tests for dfpt_works module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.data as abidata import abipy.flowtk as flowtk -#import abipy.flowtk from abipy.core.testing import AbipyTest -from abipy.flowtk import dfpt_works class TestDfptWorks(AbipyTest): @@ -14,6 +10,27 @@ class TestDfptWorks(AbipyTest): def test_nscfddkswork(self): """Testing NscfDdksWork.""" scf_task = self.get_gsinput_si(as_task=True) - work = dfpt_works.NscfDdksWork.from_scf_task(scf_task, ddk_ngkpt=[8, 8, 8], - ddk_shiftk=[0, 0, 0], ddk_nband=10) + work = flowtk.NscfDdksWork.from_scf_task(scf_task, ddk_ngkpt=[8, 8, 8], ddk_shiftk=[0, 0, 0], ddk_nband=10) assert len(work) == 4 + self.abivalidate_work(work) + + def test_elastic_work(self): + """Testing ElasticWork.""" + scf_task = self.get_gsinput_si(as_task=True) + scf_input = scf_task.input + den_deps = {scf_task: "DEN"} + tolerances = dict(nscf={"tolwfr": 1.0e-10}, ddk={"tolwfr": 1.0e-12}, strain={"tolvrs": 1.0e-10}) + work = flowtk.ElasticWork.from_scf_input(scf_input, + with_relaxed_ion=True, with_piezo=True, with_dde=True, tolerances=tolerances, + den_deps=den_deps, manager=None) + self.abivalidate_work(work) + + assert work[0].input["iscf"] == -2 + assert work[0].input["tolwfr"] == tolerances["nscf"]["tolwfr"] + assert isinstance(work[0], flowtk.NscfTask) + + for task in work[1:]: + assert task.input["kptopt"] == 2 + assert all(isinstance(task, flowtk.ElasticTask) for task in work[-6:]) + for task in work[-6:]: + assert task.input["tolvrs"] == tolerances["strain"]["tolvrs"] diff --git a/abipy/flowtk/tests/test_effmass_works.py b/abipy/flowtk/tests/test_effmass_works.py new file mode 100644 index 000000000..2721e29a3 --- /dev/null +++ b/abipy/flowtk/tests/test_effmass_works.py @@ -0,0 +1,122 @@ +"""Tests for abiphonopy module""" +import abipy.data as abidata +import abipy.flowtk as flowtk +import abipy.data as abidata + +from abipy.core.testing import AbipyTest +from abipy.abio.factories import gs_input +from abipy.flowtk.effmass_works import EffMassLineWork, EffMassDFPTWork, EffMassAutoDFPTWork, FrohlichZPRFlow + + +class TestEffMassWorks(AbipyTest): + + def test_effmassline_work(self): + """Testing EffMassLineWork.""" + si_structure = abidata.structure_from_cif("si.cif") + + scf_input = gs_input(si_structure, pseudos=abidata.pseudos("14si.pspnc"), ecut=4, spin_mode="unpolarized") + flow = flowtk.Flow.temporary_flow() + + with self.assertRaises(ValueError): + work = EffMassLineWork.from_scf_input(scf_input, k0_list=(0, 0, 0), step=0.01, npts=2) + + # Run SCF from scratch. + work = EffMassLineWork.from_scf_input(scf_input, k0_list=(0, 0, 0), step=0.01, npts=9) + + t0, t1 = work[0], work[1] + assert t1.depends_on(t0) + assert t1.input["kptopt"] == 0 + assert t1.input["iscf"] == -2 + + flow.register_work(work) + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + # From DEN file + flow = flowtk.Flow.temporary_flow() + work = EffMassLineWork.from_scf_input(scf_input, k0_list=(0, 0, 0), step=0.01, npts=10, + red_dirs=(1, 0, 0), + cart_dirs=[(1, 0, 0), (1, 1, 0)], + den_node=abidata.ref_file("si_DEN.nc")) + flow.register_work(work) + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + def test_effmass_dfpt_work(self): + """Testing EffMassDFPTWork.""" + si_structure = abidata.structure_from_cif("si.cif") + + scf_input = gs_input(si_structure, pseudos=abidata.pseudos("14si.pspnc"), ecut=4, spin_mode="unpolarized") + flow = flowtk.Flow.temporary_flow() + + # Run SCF from scratch. + work = EffMassDFPTWork.from_scf_input(scf_input, k0_list=(0, 0, 0), effmass_bands_f90=[2, 4]) + + assert len(work) == 3 + t0, t1, t2 = work + assert t1.input["iscf"] == -2 + assert t2.input["kptopt"] == 0 + assert t2.input["efmas"] == 1 and t2.input["rfelfd"] == 2 + assert t2.depends_on(t1) + + flow.register_work(work) + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + def test_effmass_autodfpt_work(self): + """Testing EffMassAutoDFPTWork.""" + si_structure = abidata.structure_from_cif("si.cif") + + scf_input = gs_input(si_structure, pseudos=abidata.pseudos("14si.pspnc"), ecut=4, spin_mode="unpolarized") + flow = flowtk.Flow.temporary_flow() + + # Run SCF from scratch. + work = EffMassAutoDFPTWork.from_scf_input(scf_input) + + assert len(work) == 2 + assert work[1].depends_on(work[0]) + + flow.register_work(work) + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + def test_frohlich_zpr_flow(self): + """Testing FrohlichZPRFlow""" + # Read structure from DDB file. + from abipy import abilab + ddb_path = abidata.ref_file("refs/mgo_v8t57/mgo_zpr_t57o_DS3_DDB") + with abilab.abiopen(ddb_path) as ddb: + structure = ddb.structure + + pseudos = abidata.pseudos("Ca.psp8", "O.psp8") + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + # Set other input variables. These quantities are system-depedent. + # Here we use parameters similar to https://docs.abinit.org/tests/v8/Input/t57.in + scf_input.set_vars( + nband=12, + nbdbuf=2, + diemac=6, + ecut=30, # Underconverged ecut. + #ecut=15, + nstep=100, + tolvrs=1e-16, + kptrlatt=[-2, 2, 2, # In cartesian coordinates, this grid is simple cubic + 2, -2, 2, + 2, 2, -2], + ) + + workdir = self.mkdtemp() + flow = FrohlichZPRFlow.from_scf_input(workdir, scf_input, ddb_node=ddb_path, ndivsm=2, tolwfr=1e-20, + metadata={"mp_id": "mp-149"}) + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok diff --git a/abipy/flowtk/tests/test_epw_flows.py b/abipy/flowtk/tests/test_epw_flows.py new file mode 100644 index 000000000..e0ce03a32 --- /dev/null +++ b/abipy/flowtk/tests/test_epw_flows.py @@ -0,0 +1,50 @@ +"""Tests for eph_flows module""" + +from abipy.core.testing import AbipyTest +from abipy.flowtk.eph_flows import EphPotFlow, GkqPathFlow + + +class TestEphFlows(AbipyTest): + """Unit tests for eph_flows module.""" + + def test_ephpot_flows(self): + """Testing EphPotFlow.""" + self.skip_if_abinit_not_ge("8.11.0") + + gs_inp = self.get_gsinput_alas_ngkpt(ngkpt=[4, 4, 4]) + + ngqpt = (2, 2, 2) + qbounds = [[0, 0, 0], [0.5, 0, 0]] + + workdir = self.mkdtemp() + flow = EphPotFlow.from_scf_input(workdir, gs_inp, ngqpt, qbounds, ndivsm=2, with_becs=True, ddk_tolerance=None, + prepgkk=1) + + #assert len(work.relax_tasks) == 3 + #assert all(t.input["dilatmx"] == 1.05 for t in work) + + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + + def test_gkqpath_flows(self): + """Testing GkqPathFlow.""" + self.skip_if_abinit_not_ge("8.11.0") + + gs_inp = self.get_gsinput_alas_ngkpt(ngkpt=[4, 4, 4]) + ngqpt = (2, 2, 2) + qbounds = [[0, 0, 0], [0.5, 0, 0]] + + workdir = self.mkdtemp() + flow = GkqPathFlow.from_scf_input(workdir, gs_inp, ngqpt, qbounds, ndivsm=2, with_becs=True, ddk_tolerance=None, + test_ft_interpolation=True, prepgkk=0) + + #assert len(work.relax_tasks) == 3 + #assert all(t.input["dilatmx"] == 1.05 for t in work) + + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok diff --git a/abipy/flowtk/tests/test_events.py b/abipy/flowtk/tests/test_events.py new file mode 100644 index 000000000..adbe62935 --- /dev/null +++ b/abipy/flowtk/tests/test_events.py @@ -0,0 +1,78 @@ +# coding: utf-8 +import os +import datetime + +from abipy.core.testing import AbipyTest +from abipy.flowtk import events + +_test_dir = os.path.join(os.path.dirname(__file__), "..", "..", 'test_files') + +def ref_file(filename): + return os.path.join(_test_dir, filename) + + +def ref_files(*filenames): + return list(map(ref_file, filenames)) + + +class EventsParserTest(AbipyTest): + + def test_mgb2_outputs(self): + """Testing MgB2 output files.""" + # Analyze scf log + parser = events.EventsParser() + report = parser.parse(ref_file("mgb2_scf.log"), verbose=1) + self.assertMSONable(report) + + print(report) + assert (report.num_errors, report.num_warnings, report.num_comments) == (0, 0, 0) + assert report.run_completed + fmt = "%a %b %d %H:%M:%S %Y" + assert report.start_datetime == datetime.datetime.strptime("Fri Mar 13 20:08:51 2015", fmt) + assert report.end_datetime == datetime.datetime.strptime("Fri Mar 13 20:08:57 2015", fmt) + + # Analyze nscf log + report = events.EventsParser().parse(ref_file("mgb2_nscf.log"), verbose=0) + assert (report.num_errors, report.num_warnings, report.num_comments) == (0, 2, 0) + print(report) + self.assertMSONable(report) + + #d = report.as_dict() + #print(d) + #assert 0 + + for i, warning in enumerate(report.warnings): + print(warning) + assert warning == report[i] + # Msonable is conflict with YAMLObject + #self.assertMSONable(warning, check_inst=False) + + report = parser.report_exception(ref_file("mgb2_scf.log"), "exception") + assert len(report.errors) == 1 + + def test_parse_bad_yaml_doc(self): + """Parsing Abinit log file with wrong YAML document.""" + parser = events.EventsParser() + report = parser.parse(ref_file("badyaml.log"), verbose=1) + print(report) + assert not report.run_completed + assert (report.num_errors, report.num_warnings, report.num_comments) == (1, 1, 0) + + # The event parser should have registered a AbinitYamlWarning and an AbinitYamlError + assert len(report.get_events_of_type(events.AbinitYamlWarning)) == 1 + assert len(report.get_events_of_type(events.AbinitYamlError)) == 1 + + +class EventHandlersTest(AbipyTest): + def test_events(self): + # Autodoc + events.autodoc_event_handlers() + + for cls in events.get_event_handler_classes(): + # Test pickle + handler = cls() + self.serialize_with_pickle(handler, test_eq=False) + self.assertMSONable(handler) + + assert events.as_event_class(events.AbinitWarning) == events.AbinitWarning + assert events.as_event_class('!WARNING') == events.AbinitWarning diff --git a/abipy/flowtk/tests/test_flows.py b/abipy/flowtk/tests/test_flows.py new file mode 100644 index 000000000..8588d82a1 --- /dev/null +++ b/abipy/flowtk/tests/test_flows.py @@ -0,0 +1,417 @@ +# coding: utf-8 +import os +import tempfile +import shutil +import abipy.data as abidata + +from monty.functools import lazy_property +from pymatgen.core.lattice import Lattice +from pymatgen.core.structure import Structure +from abipy.flowtk.launcher import BatchLauncher +from abipy.flowtk.flows import * +from abipy.flowtk.works import * +from abipy.flowtk.tasks import * +from abipy.core.testing import AbipyTest +from abipy import abilab +from abipy import flowtk + + +class FakeAbinitInput(object): + """Emulate an Abinit input.""" + @lazy_property + def pseudos(self): + return [abidata.pseudo("14si.pspnc")] + + @lazy_property + def structure(self): + coords = [] + coords.append([0, 0, 0]) + coords.append([0.75, 0.5, 0.75]) + lattice = Lattice([[3.8401979337, 0.00, 0.00], + [1.9200989668, 3.3257101909, 0.00], + [0.00, -2.2171384943, 3.1355090603]]) + return Structure(lattice, ["Si", "Si"], coords) + + def get(self, key, default=None): + """The real AbinitInput is a dict-like object.""" + if default is not None: return default + return key + + +class FlowUnitTest(AbipyTest): + """Provides helper function for testing Abinit flows.""" + MANAGER = """\ +policy: + autoparal: 1 +qadapters: + - &batch + priority: 1 + queue: + qtype: slurm + qname: Oban + qparams: + mail_user: nobody@nowhere + limits: + timelimit: 0:20:00 + min_cores: 4 + max_cores: 12 + #condition: {"$eq": {omp_threads: 2}} + hardware: + num_nodes: 10 + sockets_per_node: 1 + cores_per_socket: 2 + mem_per_node: 4 Gb + job: + modules: + - intel/compilerpro/13.0.1.117 + - fftw3/intel/3.3 + shell_env: + PATH: /home/user/tmp_intel13/src/98_main/:/home/user//NAPS/intel13/bin:$PATH + LD_LIBRARY_PATH: /home/user/NAPS/intel13/lib:$LD_LIBRARY_PATH + mpi_runner: mpirun + +# Connection to the MongoDb database (optional) +db_connector: + database: abinit + collection: test + #host: 0.0.0.0 + #port: 8080 + #user: gmatteo + #password: helloworld + +batch_adapter: *batch +""" + def setUp(self): + """Initialization phase.""" + super().setUp() + + # Temporary directory for the flow. + self.workdir = tempfile.mkdtemp() + + # Create the TaskManager. + self.manager = TaskManager.from_string(self.MANAGER) + + # Fake input file + self.fake_input = FakeAbinitInput() + + def tearDown(self): + """Delete workdir""" + shutil.rmtree(self.workdir) + + +class FlowTest(FlowUnitTest): + + def test_base(self): + """Testing Flow...""" + aequal = self.assertEqual + flow = Flow(workdir=self.workdir, manager=self.manager) + assert flow.isinstance(Flow) + assert not flow.isinstance(None) + assert not flow.has_scheduler + + # Build a work with a task + work = flow.register_task(self.fake_input) + assert work.is_work + assert len(work.color_hex) == 7 + assert work.color_hex.startswith("#") + task0_w0 = work[0] + assert task0_w0.is_task + str(task0_w0.status.colored) + assert len(flow) == 1 + assert flow.num_tasks == 1 + assert flow.has_db + + #print(task0_w0.input_structure) + str(task0_w0.make_input) + + # Task history + assert len(task0_w0.history) == 0 + task0_w0.history.info("Hello %s", "world") + assert len(task0_w0.history) == 1 + str(task0_w0.history) + record = task0_w0.history.pop() + print(record, repr(record)) + assert record.get_message(asctime=False) == "Hello world" + assert len(task0_w0.history) == 0 + assert flow.select_tasks(nids=task0_w0.node_id)[0] == task0_w0 + assert flow.select_tasks(wslice=slice(0,1,1)) == [task0_w0] + assert flow.select_tasks(task_class="DfptTask") == [] + assert flow.get_task_scfcycles() == [] + + # Build a workflow containing two tasks depending on task0_w0 + work = Work() + assert work.is_work + work.register(self.fake_input) + work.register(self.fake_input) + assert len(work) == 2 + + flow.register_work(work, deps={task0_w0: "WFK"}) + assert flow.is_flow + assert len(flow) == 2 + + # Add another work without dependencies. + task0_w2 = flow.register_task(self.fake_input)[0] + assert len(flow) == 3 + assert not flow.is_work + + # Allocate internal tables + flow.allocate() + + # Check dependecies. + #task0_w1 = flow[1][0] + assert flow[1].depends_on(task0_w0) + assert flow[1][0].depends_on(task0_w0) + assert flow[1][0] in task0_w0.get_children() + assert task0_w0 in flow[1][0].get_parents() + assert flow[1][0].find_parent_with_ext("WFK") == task0_w0 + assert flow[1][0].find_parent_with_ext("FOOBAR") is None + assert not flow[2][0].depends_on(task0_w0) + assert not flow[2][0] in task0_w0.get_children() + assert not task0_w0 in flow[2][0].get_parents() + assert flow[1].pos == 1 + assert flow[1][0].pos == (1, 0) + assert flow[2][0].pos == (2, 0) + + assert not flow.all_ok + assert flow.num_tasks == 4 + assert flow.ncores_used == 0 + + # API for iterations + aequal(len(list(flow.iflat_tasks(status="Initialized"))), sum(len(work) for work in flow)) + aequal(list(flow.iflat_tasks(nids=task0_w0.node_id)), [task0_w0]) + + aequal([task0_w0], flow.tasks_from_nids(task0_w0.node_id)) + aequal([(0, 0)], flow.wti_from_nids(task0_w0.node_id)) + aequal([task0_w2], flow.tasks_from_nids([task0_w2.node_id])) + aequal([(2, 0)], flow.wti_from_nids([task0_w2.node_id])) + + # Check for deadlocks + flow.check_dependencies() + + # Save the flow in pickle format. + flow.build_and_pickle_dump() + + # Find the pickle file in workdir and recreate the flow. + same_flow = Flow.pickle_load(self.workdir) + assert same_flow == flow + + # to/from string + # FIXME This does not work with py3k + #s = flow.pickle_dumps(protocol=0) + #same_flow = Flow.pickle_loads(s) + #aequal(same_flow, flow) + + self.assertMSONable(flow) + + flow.show_info() + flow.show_summary() + flow.show_inputs() + flow.show_inputs(varnames="znucl") + + df_vars = flow.get_vars_dataframe("ecut", "acell") + assert "ecut" in df_vars + + # Test show_status + flow.show_status() + flow.show_tricky_tasks() + flow.show_event_handlers() + + df = flow.compare_abivars(varnames=["ecut", "natom"], printout=True, with_colors=True) + assert "ecut" in df + + dfs = flow.compare_structures(with_spglib=False, verbose=2, printout=True, with_colors=True) + assert "alpha" in dfs.lattice + + dfs, ebands_plotter = flow.compare_ebands(verbose=0) + assert not dfs and not ebands_plotter + + dfs, hist_plotter = flow.compare_hist(with_spglib=False, verbose=2, printout=True, with_colors=True) + assert not dfs and not hist_plotter + + if self.has_networkx(): + assert flow.plot_networkx(mode="network", with_edge_labels=False, arrows=False, + node_size="num_cores", node_label="name_class", layout_type="spring", show=False) + assert flow.plot_networkx(mode="status", with_edge_labels=True, arrows=True, + node_size="num_cores", node_label="name_class", layout_type="spring", show=False) + + if self.has_python_graphviz(): + assert flow.get_graphviz(engine="automatic", graph_attr=None, node_attr=None, edge_attr=None) + assert flow.graphviz_imshow(ax=None, figsize=None, dpi=300, fmt="png", show=False) + + if self.has_panel(): + assert hasattr(flow.get_panel(), "show") + + def test_workdir(self): + """Testing if one can use workdir=None in flow.__init__ and then flow.allocate(workdir).""" + flow = Flow(workdir=None, manager=self.manager) + flow.register_task(self.fake_input) + #flow.register_work(work) + work = Work() + work.register_scf_task(self.fake_input) + flow.register_work(work) + + # If flow.workdir is None, we should used flow.allocate(workdir) + with self.assertRaises(RuntimeError): flow.allocate() + + tmpdir = tempfile.mkdtemp() + flow.allocate(workdir=tmpdir) + + str(flow) + assert len(flow) == 2 + flow.build() + + for i, work in enumerate(flow): + assert work.workdir == os.path.join(tmpdir, "w%d" % i) + for t, task in enumerate(work): + assert task.workdir == os.path.join(work.workdir, "t%d" % t) + + def test_nscf_flow_with_append(self): + """Test creation of NSCF tasks from flow with append = True""" + + def make_scf_nscf_inputs(): + """Build ands return the input files for the GS-SCF and the GS-NSCF tasks.""" + + multi = abilab.MultiDataset(structure=abidata.cif_file("si.cif"), + pseudos=abidata.pseudos("14si.pspnc"), ndtset=2) + + # Set global variables (dataset1 and dataset2) + multi.set_vars(ecut=6, nband=8) + + # Dataset 1 (GS-SCF run) + multi[0].set_kmesh(ngkpt=[8, 8, 8], shiftk=[0, 0, 0]) + multi[0].set_vars(tolvrs=1e-6) + + # Dataset 2 (GS-NSCF run on a k-path) + kptbounds = [ + [0.5, 0.0, 0.0], # L point + [0.0, 0.0, 0.0], # Gamma point + [0.0, 0.5, 0.5], # X point + ] + + multi[1].set_kpath(ndivsm=6, kptbounds=kptbounds) + multi[1].set_vars(tolwfr=1e-12) + + # Return two input files for the GS and the NSCF run + scf_input, nscf_input = multi.split_datasets() + return scf_input, nscf_input + + scf_input, nscf_input = make_scf_nscf_inputs() + hello_flow = flowtk.Flow(workdir=self.mkdtemp()) + hello_flow.register_scf_task(scf_input, append=True) + hello_flow.register_nscf_task(nscf_input, deps={hello_flow[0][0]: "DEN"}, append=True) + + #flow[0].get_graphviz_dirtree() + #abilab.print_doc(flowtk.PhononWork) + + hello_flow = flowtk.Flow(workdir=self.mkdtemp()) + hello_flow.register_scf_task(scf_input, append=True) + hello_flow.register_nscf_task(nscf_input, deps={hello_flow[0][0]: "DEN"}, append=False) + + + +class TestFlowInSpectatorMode(FlowUnitTest): + + def test_spectator(self): + flow = Flow(workdir=self.workdir, manager=self.manager) + + work0 = Work() + gs_task = work0.register_scf_task(self.fake_input) + assert gs_task.isinstance(ScfTask) + assert gs_task.isinstance("ScfTask") + task = work0.register_scf_task(self.fake_input) + assert task.is_abinit_task + assert not task.is_optic_task + assert not task.is_anaddb_task + + work1 = Work() + work1.register_scf_task(self.fake_input) + + flow.register_work(work0) + flow.register_work(work1) + + flow.disconnect_signals() + flow.disconnect_signals() + + flow.connect_signals() + flow.connect_signals() + + for mode in [False, True]: + flow.set_spectator_mode(mode=mode) + assert flow.in_spectator_mode == mode + for node in flow.iflat_nodes(): + assert node.in_spectator_mode == mode + + assert len(list(flow.iflat_nodes())) == 1 + len(flow.works) + sum(len(work) for work in flow) + assert flow.node_from_nid(flow.node_id) == flow + + flow.set_spectator_mode(mode=False) + flow.build_and_pickle_dump() + + # picke load always returns a flow in spectator mode. + flow = Flow.pickle_load(flow.workdir) + assert flow.in_spectator_mode + + #with self.assertRaises(flow.SpectatorError): flow.pickle_dump() + #with self.assertRaises(flow.SpectatorError): flow.make_scheduler().start() + + work = flow[0] + assert work.send_signal(work.S_OK) is None + #with self.assertRaises(work.SpectatorError): work.on_ok() + #with self.assertRaises(work.SpectatorError): work.on_all_ok() + + task = work[0] + assert task.send_signal(task.S_OK) is None + #with self.assertRaises(task.SpectatorError): task._on_done() + #with self.assertRaises(task.SpectatorError): task.on_ok() + #with self.assertRaises(task.SpectatorError): task._on_ok() + + +class TestBatchLauncher(FlowUnitTest): + + def test_batchlauncher(self): + """Testing BatchLauncher methods.""" + # Create the TaskManager. + manager = TaskManager.from_string(self.MANAGER) + print("batch_adapter", manager.batch_adapter) + assert manager.batch_adapter is not None + + def build_flow_with_name(name): + """Build a flow with workdir None and the given name.""" + flow = Flow(workdir=None, manager=self.manager) + flow.set_name(name) + + flow.register_task(self.fake_input) + work = Work() + work.register_scf_task(self.fake_input) + flow.register_work(work) + + return flow + + tmpdir = tempfile.mkdtemp() + batch = BatchLauncher(workdir=tmpdir, manager=manager) + str(batch) + + flow0 = build_flow_with_name("flow0") + flow1 = build_flow_with_name("flow1") + flow2_same_name = build_flow_with_name("flow1") + + batch.add_flow(flow0) + + # Cannot add the same flow twice. + with self.assertRaises(batch.Error): + batch.add_flow(flow0) + + batch.add_flow(flow1) + + # Cannot add two flows with the same name. + with self.assertRaises(batch.Error): + batch.add_flow(flow2_same_name) + + batch.submit(dry_run=True) + + for i, flow in enumerate([flow0, flow1]): + assert flow.workdir == os.path.join(batch.workdir, "flow%d" % i) + + batch.pickle_dump() + batch_from_pickle = BatchLauncher.pickle_load(batch.workdir) + assert all(f1 == f2 for f1, f2 in zip(batch.flows, batch_from_pickle.flows)) diff --git a/abipy/flowtk/tests/test_flowtk.py b/abipy/flowtk/tests/test_flowtk.py index 20d130c65..434232400 100644 --- a/abipy/flowtk/tests/test_flowtk.py +++ b/abipy/flowtk/tests/test_flowtk.py @@ -1,6 +1,4 @@ """Tests for flowtk __init__ module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.flowtk as flowtk from abipy.core.testing import AbipyTest diff --git a/abipy/flowtk/tests/test_gruneisen.py b/abipy/flowtk/tests/test_gruneisen.py new file mode 100644 index 000000000..240cab7f8 --- /dev/null +++ b/abipy/flowtk/tests/test_gruneisen.py @@ -0,0 +1,35 @@ +"""Tests for abiphonopy module""" +import abipy.data as abidata +import abipy.flowtk as flowtk + +from abipy.core.testing import AbipyTest +from abipy.abio.factories import gs_input +from abipy.flowtk.gruneisen import GruneisenWork + + +class TestGruneisenWork(AbipyTest): + """Unit tests for gruneisen module.""" + + def test_gruneisen_work(self): + """Testing GruneisenWork.""" + si_structure = abidata.structure_from_cif("si.cif") + + gs_inp = gs_input(si_structure, pseudos=abidata.pseudos("14si.pspnc"), ecut=4, spin_mode="unpolarized") + flow = flowtk.Flow.temporary_flow() + voldelta = gs_inp.structure.volume * 0.02 + work = GruneisenWork.from_gs_input(gs_inp, voldelta, ngqpt=[2, 2, 2], with_becs=False) + flow.register_work(work) + + assert len(work.relax_tasks) == 3 + assert all(t.input["optcell"] == 3 for t in work) + assert all(t.input["ionmov"] == 3 for t in work) + assert all(t.input["ecutsm"] == 0.5 for t in work) + assert all(t.input["dilatmx"] == 1.05 for t in work) + + flow.allocate() + flow.check_status() + isok, checks = flow.abivalidate_inputs() + assert isok + + with self.assertRaises(ValueError): + GruneisenWork.from_gs_input(gs_inp, voldelta, ngqpt=[3, 3, 3], with_becs=False) diff --git a/abipy/flowtk/tests/test_gs_works.py b/abipy/flowtk/tests/test_gs_works.py index 710bcdc13..ff95799ae 100644 --- a/abipy/flowtk/tests/test_gs_works.py +++ b/abipy/flowtk/tests/test_gs_works.py @@ -1,18 +1,14 @@ """Tests for gs_works module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.data as abidata import abipy.flowtk as flowtk from abipy.core.testing import AbipyTest -#from abipy.abio.factories import gs_input from abipy.flowtk import gs_works -#from abipy.flowtk import mocks class TestGsWorks(AbipyTest): - def test_eoswork(self): + def test_eos_work(self): """Testing EosWork.""" scf_input = self.get_gsinput_si() work = gs_works.EosWork.from_scf_input(scf_input, npoints=4, deltap_vol=0.25, ecutsm=2.0, move_atoms=True) @@ -24,3 +20,4 @@ def test_eoswork(self): work = gs_works.EosWork.from_scf_input(scf_input, npoints=3, deltap_vol=0.25, ecutsm=0.5, move_atoms=False) assert len(work) == 7 assert all(isinstance(task, flowtk.ScfTask) for task in work) + self.abivalidate_work(work) diff --git a/abipy/flowtk/tests/test_launcher.py b/abipy/flowtk/tests/test_launcher.py new file mode 100644 index 000000000..38e861a7c --- /dev/null +++ b/abipy/flowtk/tests/test_launcher.py @@ -0,0 +1,20 @@ +# coding: utf-8 + +import unittest + +from abipy.core.testing import AbipyTest +from abipy.flowtk.launcher import ScriptEditor + + +class ScriptEditorTest(AbipyTest): + + def test_base(self): + "base test" + se = ScriptEditor() + se.shebang() + se.declare_var("FOO", "BAR") + se.add_emptyline() + se.add_comment("This is a comment") + se.declare_vars({"FOO1": "BAR1"}) + se.load_modules(["module1", "module2"]) + print(se.get_script_str()) diff --git a/abipy/flowtk/tests/test_mocks.py b/abipy/flowtk/tests/test_mocks.py index 24332fc2d..bd670b8af 100644 --- a/abipy/flowtk/tests/test_mocks.py +++ b/abipy/flowtk/tests/test_mocks.py @@ -1,6 +1,4 @@ """Tests for mocks module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import abipy.data as abidata import abipy.flowtk as flowtk diff --git a/abipy/flowtk/tests/test_qadapters.py b/abipy/flowtk/tests/test_qadapters.py new file mode 100644 index 000000000..050d60ef3 --- /dev/null +++ b/abipy/flowtk/tests/test_qadapters.py @@ -0,0 +1,462 @@ +# coding: utf-8 +import ruamel.yaml as yaml +import unittest +import sys + +from abipy.core.testing import AbipyTest +from abipy.flowtk.tasks import ParalConf +from abipy.flowtk.qadapters import * +from abipy.flowtk.qadapters import QueueAdapter, SlurmAdapter, OmpEnv +from abipy.flowtk import qutils as qu + + +class OmpEnvTest(AbipyTest): + def test_base(self): + assert OmpEnv(OMP_NUM_THREADS=1).OMP_NUM_THREADS == "1" + + +class ParseTimestr(AbipyTest): + def test_slurm_parse_timestr(self): + days, hours, minutes, secs = 24*60*60, 60*60, 60, 1 + aequal = self.assertEqual + + slurm_parse_timestr = qu.slurm_parse_timestr + + # "days-hours", + aequal(slurm_parse_timestr("2-1"), 2*days + hours) + # "days-hours:minutes", + aequal(slurm_parse_timestr("2-1:1"), 2*days + hours + minutes) + # "days-hours:minutes:seconds". + aequal(slurm_parse_timestr("3-4:2:20"), 3*days + 4*hours + 2*minutes + 20*secs) + # "minutes", + aequal(slurm_parse_timestr("10"), 10*minutes) + # "minutes:seconds", + aequal(slurm_parse_timestr("3:20"), 3*minutes + 20*secs) + # "hours:minutes:seconds", + aequal(slurm_parse_timestr("3:2:5"), 3*hours + 2*minutes + 5*secs) + # Support numbers as well + aequal(slurm_parse_timestr(60), 1*minutes) + + +@unittest.skipIf(sys.platform.startswith("win"), "Skipping for Windows") +class QadapterTest(AbipyTest): + QDICT = yaml.safe_load("""\ +priority: 1 +queue: + qtype: slurm + qname: Oban +limits: + timelimit: 2:00 + min_cores: 1 + max_cores: 24 + #condition: {"$eq": {omp_threads: 2}} +job: + modules: + - intel/compilerpro/13.0.1.117 + - fftw3/intel/3.3 + shell_env: + PATH: /home/user/tmp_intel13/src/98_main/:/home/user//NAPS/intel13/bin:$PATH + mpi_runner: mpirun +hardware: + num_nodes: 3 + sockets_per_node: 2 + cores_per_socket: 4 + mem_per_node: 8 Gb +""") + + def test_base(self): + """unit tests for Qadapter subclasses. A more complete coverage would require integration testing.""" + self.maxDiff = None + aequal, atrue, afalse = self.assertEqual, self.assertTrue, self.assertFalse + sub_classes = QueueAdapter.__subclasses__() + + # Test if we can instantiate the concrete classes with the abc protocol. + for subc in sub_classes: + print("subclass: ", subc) + + # Create the adapter subclass. + self.QDICT["queue"]["qtype"] = subc.QTYPE + qad = make_qadapter(**self.QDICT) + print(qad) + hw = qad.hw + giga = 1024 + + # Test the programmatic interface used to change job parameters. + aequal(qad.num_launches, 0) + afalse(qad.has_omp) + atrue(qad.has_mpi) + qad.set_mpi_procs(2) + aequal(qad.mpi_procs, 2) + atrue(qad.pure_mpi) + afalse(qad.pure_omp) + afalse(qad.hybrid_mpi_omp) + aequal(qad.mem_per_proc, giga) + qad.set_mem_per_proc(2 * giga) + aequal(qad.mem_per_proc, 2 * giga) + aequal(qad.timelimit, 120) + + # Enable OMP + qad.set_omp_threads(2) + aequal(qad.omp_threads, 2) + atrue(qad.has_omp) + afalse(qad.pure_mpi) + afalse(qad.pure_omp) + atrue(qad.hybrid_mpi_omp) + + atrue(qad.hw.can_use_omp_threads(hw.sockets_per_node * hw.cores_per_socket)) + afalse(qad.hw.can_use_omp_threads(hw.sockets_per_node * hw.cores_per_socket + 1)) + + # Test the creation of the script + script = qad.get_script_str("job.sh", "/launch/dir", "executable", "qout_path", "qerr_path", + stdin="STDIN", stdout="STDOUT", stderr="STDERR") + + # Test whether qad can be serialized with Pickle. + deserialized_qads = self.serialize_with_pickle(qad, test_eq=False) + + for new_qad in deserialized_qads: + new_script = new_qad.get_script_str("job.sh", "/launch/dir", "executable", "qout_path", "qerr_path", + stdin="STDIN", stdout="STDOUT", stderr="STDERR") + aequal(new_script, script) + + # Test can_run and distribute + # The hardware has num_nodes=3, sockets_per_node=2, cores_per_socket=4, mem_per_node="8 Gb" + afalse(qad.can_run_pconf(ParalConf(mpi_ncpus=hw.num_cores+1, omp_ncpus=1, mem_per_cpu=0.1))) + afalse(qad.can_run_pconf(ParalConf(mpi_ncpus=4, omp_ncpus=9, mem_per_cpu=0.1))) + afalse(qad.can_run_pconf(ParalConf(mpi_ncpus=4, omp_ncpus=1, mem_per_cpu=10 * giga))) + + d = qad.distribute(mpi_procs=4, omp_threads=1, mem_per_proc=giga) + assert d.num_nodes == 1 and d.mpi_per_node == 4 and d.exact + + d = qad.distribute(mpi_procs=16, omp_threads=1, mem_per_proc=giga) + assert d.num_nodes == 2 and d.mpi_per_node == 8 and d.exact + + # not enough memory per node but can distribute. + d = qad.distribute(mpi_procs=8, omp_threads=1, mem_per_proc=2 * giga) + assert d.num_nodes == 2 and d.mpi_per_node == 4 and not d.exact + + # mem_per_proc > mem_per_node! + with self.assertRaises(qad.Error): + d = qad.distribute(mpi_procs=9, omp_threads=1, mem_per_proc=10 * giga) + + # TODO + # not commensurate with node + #d = qad.distribute(mpi_procs=9, omp_threads=1, mem_per_proc=giga) + #assert d.num_nodes == 3 and d.mpi_per_node == 3 and not d.exact + + with self.assertRaises(qad.Error): + qad.set_mpi_procs(25) + qad.validate() + with self.assertRaises(qad.Error): + qad.set_mpi_procs(100) + qad.validate() + with self.assertRaises(qad.Error): + qad.set_omp_threads(10) + qad.validate() + with self.assertRaises(qad.Error): + qad.set_mem_per_proc(9 * giga) + qad.validate() + + # Test if one can register a customized class. + class MyAdapter(SlurmAdapter): + QTYPE = "myslurm" + + SlurmAdapter.register(MyAdapter) + assert issubclass(MyAdapter, QueueAdapter) + + self.QDICT["queue"]["qtype"] = "myslurm" + qad = make_qadapter(**self.QDICT) + assert isinstance(qad, MyAdapter) + + +@unittest.skipIf(sys.platform.startswith("win"), "Skipping for Windows") +class ShellAdapterTest(AbipyTest): + """Test suite for Shell adapter.""" + QDICT = yaml.safe_load("""\ +priority: 1 +queue: + qname: localhost + qtype: shell +job: + mpi_runner: /home/local/bin/mpirun + pre_run: + - "source ~/env1.sh" +limits: + timelimit: 10:00 + min_cores: 1 + max_cores: 1 +hardware: + num_nodes: 1 + sockets_per_node: 1 + cores_per_socket: 1 + mem_per_node: 4 Gb +""") + def test_methods(self): + qad = make_qadapter(**self.QDICT) + print(qad) + print(qad.mpi_runner) + + assert qad.QTYPE == "shell" and qad.has_mpi and not qad.has_omp + assert (qad.mpi_procs, qad.omp_threads) == (1, 1) + assert qad.priority == 1 and qad.num_launches == 0 and qad.last_launch is None + + qad.set_omp_threads(1) + assert qad.has_omp + + s = qad.get_script_str("job_name", "/launch_dir", "executable", "qout_path", "qerr_path", + stdin="stdin", stdout="stdout", stderr="stderr") + self.assertMultiLineEqual(s, """\ +#!/bin/bash +cd /launch_dir +# OpenMp Environment +export OMP_NUM_THREADS=1 + +# Commands before execution +source ~/env1.sh + +/home/local/bin/mpirun -n 1 executable < stdin > stdout 2> stderr +""") + + +@unittest.skipIf(sys.platform.startswith("win"), "Skipping for Windows") +class SlurmAdapterTest(AbipyTest): + """Test suite for Slurm adapter.""" + QDICT = yaml.safe_load("""\ +priority: 5 +queue: + qtype: slurm + qname: Oban + qparams: + account: user_account + mail_user: user@mail.com +limits: + timelimit: 10:00 + min_cores: 3 + max_cores: 16 +job: + mpi_runner: mpirun + mpi_runner_options: --bind-to None + # pre_run is a string in verbatim mode (note |) + setup: + - echo ${SLURM_JOB_NODELIST} + - ulimit -s unlimited + modules: + - intel/compilerpro/13.0.1.117 + - fftw3/intel/3.3 + shell_env: + PATH: /home/user/bin:$PATH +hardware: + # Mandatory + num_nodes: 2 + sockets_per_node: 2 + cores_per_socket: 4 + mem_per_node: 8 Gb +""") + + def test_methods(self): + self.maxDiff = None + + qad = make_qadapter(**self.QDICT) + print(qad) + print(qad.mpi_runner) + + assert qad.QTYPE == "slurm" + assert qad.has_mpi and not qad.has_omp + assert (qad.mpi_procs, qad.omp_threads) == (3, 1) + assert qad.priority == 5 and qad.num_launches == 0 and qad.last_launch is None + + qad.set_mpi_procs(4) + + s = qad.get_script_str("job_name", "/launch_dir", "executable", "qout_path", "qerr_path", + stdin="stdin", stdout="stdout", stderr="stderr") + print(s) + self.assertMultiLineEqual(s, """\ +#!/bin/bash + +#SBATCH --partition=Oban +#SBATCH --job-name=job_name +#SBATCH --ntasks=4 +#SBATCH --mem-per-cpu=1024 +#SBATCH --time=0-0:10:0 +#SBATCH --account=user_account +#SBATCH --mail-user=user@mail.com +#SBATCH --output=qout_path +#SBATCH --error=qerr_path +cd /launch_dir +# Setup section +echo ${SLURM_JOB_NODELIST} +ulimit -s unlimited + +# Load Modules +module purge +module load intel/compilerpro/13.0.1.117 2>> mods.err +module load fftw3/intel/3.3 2>> mods.err + +# OpenMp Environment +export OMP_NUM_THREADS=1 +# Shell Environment +export PATH=/home/user/bin:$PATH + +mpirun --bind-to None -n 4 executable < stdin > stdout 2> stderr +""") + #assert 0 + #qad.set_omp_threads(1) + #assert qad.has_omp + + +@unittest.skipIf(sys.platform.startswith("win"), "Skipping for Windows") +class PbsProadapterTest(AbipyTest): + """Test suite for PbsPro adapter.""" + QDICT = yaml.safe_load("""\ +priority: 1 +queue: + qtype: pbspro + qname: fat + qparams: + group_list: naps +limits: + timelimit: 0:0:10 + min_cores: 3 + max_cores: 200 +job: + mpi_runner: mpirun +hardware: + num_nodes: 100 + sockets_per_node: 2 + cores_per_socket: 4 + mem_per_node: 8 Gb""") + QDICT_SHARED = yaml.safe_load("""\ +priority: 1 +queue: + qtype: pbspro + qname: fat_shared + qnodes: shared + qparams: + group_list: naps +limits: + timelimit: 0:0:10 + min_cores: 3 + max_cores: 200 + min_mem_per_proc: 2000 +master_mem_overhead: 1000 +job: + mpi_runner: mpirun +hardware: + num_nodes: 100 + sockets_per_node: 2 + cores_per_socket: 12 + mem_per_node: 48000 Mb""") + QDICT_EXCLUSIVE = yaml.safe_load("""\ +priority: 1 +queue: + qtype: pbspro + qname: fat_exclusive + qnodes: exclusive + qparams: + group_list: naps +limits: + timelimit: 0:0:10 + min_cores: 3 + max_cores: 200 + min_mem_per_proc: 2000 +master_mem_overhead: 1000 +job: + mpi_runner: mpirun +hardware: + num_nodes: 100 + sockets_per_node: 2 + cores_per_socket: 12 + mem_per_node: 48000 Mb""") + + def test_methods(self): + self.maxDiff = None + aequal = self.assertEqual + + qad = make_qadapter(**self.QDICT) + self.assertMSONable(qad) + print(qad) + print(qad.mpi_runner) + + assert qad.QTYPE == "pbspro" and qad.has_mpi and not qad.has_omp + assert (qad.mpi_procs, qad.omp_threads) == (3, 1) + assert qad.priority == 1 and qad.num_launches == 0 and qad.last_launch is None + + #qad.set_mpi_procs(4) + s = qad.get_script_str("job_name", "/launch_dir", "executable", "qout_path", "qerr_path", + stdin="stdin", stdout="stdout", stderr="stderr") + print(s) + self.assertMultiLineEqual(s, """\ +#!/bin/bash + +#PBS -q fat +#PBS -N job_name +#PBS -l select=3:ncpus=1:mem=1024mb:mpiprocs=1 +#PBS -l walltime=0:0:10 +#PBS -W group_list=naps +#PBS -o qout_path +#PBS -e qerr_path +cd /launch_dir +# OpenMp Environment +export OMP_NUM_THREADS=1 +mpirun -n 3 executable < stdin > stdout 2> stderr +""") + mem = 1024 + qad.set_mem_per_proc(mem) + print(qad) + + qad.set_mpi_procs(4) + s, params = qad.get_select(ret_dict=True) + # IN_CORE PURE MPI: MPI: 4, OMP: 1 + aequal(params, + {'ncpus': 1, 'chunks': 4, 'mpiprocs': 1, "mem": mem}) + + qad.set_omp_threads(2) + s, params = qad.get_select(ret_dict=True) + # HYBRID MPI-OPENMP run, perfectly divisible among nodes: MPI: 4, OMP: 2 + aequal(params, + {'mem': mem, 'ncpus': 2, 'chunks': 4, 'ompthreads': 2, 'mpiprocs': 1}) + + qad.set_mpi_procs(12) + s, params = qad.get_select(ret_dict=True) + # HYBRID MPI-OPENMP run, perfectly divisible among nodes: MPI: 12, OMP: 2 + aequal(params, + {'mem': mem, 'ncpus': 2, 'chunks': 12, 'ompthreads': 2, 'mpiprocs': 1}) + + qad.set_omp_threads(5) + qad.set_mpi_procs(3) + s, params = qad.get_select(ret_dict=True) + # HYBRID MPI-OPENMP, NOT commensurate with nodes: MPI: 3, OMP: 5 + aequal(params, + {'mem': mem, 'ncpus': 5, 'chunks': 3, 'ompthreads': 5, 'mpiprocs': 1}) + + # Testing the handling of master memory overhead + # Shared mode (the nodes might be shared amongst different jobs from different users) + qad_shared = make_qadapter(**self.QDICT_SHARED) + aequal(qad_shared.hw.mem_per_node, 48000) + qad_shared.set_mpi_procs(15) + qad_shared.set_mem_per_proc(6000) + aequal(qad_shared.get_select(), '1:ncpus=1:mem=7000mb:mpiprocs=1+' + '14:ncpus=1:mem=6000mb:mpiprocs=1') + qad_shared.set_mpi_procs(64) + qad_shared.set_mem_per_proc(3500) + qad_shared.set_master_mem_overhead(4000) + self.assertMSONable(qad_shared) + aequal(qad_shared.get_select(), '1:ncpus=1:mem=7500mb:mpiprocs=1+' + '63:ncpus=1:mem=3500mb:mpiprocs=1') + + # Exclusive mode (the nodes are attributed exclusively to a given user) + qad_exclusive = make_qadapter(**self.QDICT_EXCLUSIVE) + aequal(qad_exclusive.hw.mem_per_node, 48000) + qad_exclusive.set_mpi_procs(47) + qad_exclusive.set_mem_per_proc(2000) + qad_exclusive.set_master_mem_overhead(1) + self.assertMSONable(qad_exclusive) + aequal(qad_exclusive.get_select(), '1:ncpus=23:mem=48000mb:mpiprocs=23+' + '1:ncpus=24:mem=48000mb:mpiprocs=24') + qad_exclusive.set_mpi_procs(48) + aequal(qad_exclusive.get_select(), '1:ncpus=1:mem=48000mb:mpiprocs=1+' + '1:ncpus=24:mem=48000mb:mpiprocs=24+' + '1:ncpus=23:mem=48000mb:mpiprocs=23') + qad_exclusive.set_mpi_procs(50) + aequal(qad_exclusive.get_select(), '1:ncpus=2:mem=48000mb:mpiprocs=2+' + '2:ncpus=24:mem=48000mb:mpiprocs=24') + diff --git a/abipy/flowtk/tests/test_qha.py b/abipy/flowtk/tests/test_qha.py new file mode 100644 index 000000000..3746cb588 --- /dev/null +++ b/abipy/flowtk/tests/test_qha.py @@ -0,0 +1,22 @@ +"""Tests for qha module.""" + +from abipy.core.testing import AbipyTest +from abipy.flowtk.qha import QhaFlow + + +class TestQha(AbipyTest): + + def test_qhaflow(self): + """Testing QhaFlow.""" + workdir = self.mkdtemp() + scf_input = self.get_gsinput_alas_ngkpt(ngkpt=[4, 4, 4]) + v0 = scf_input.structure.volume + volumes = [0.98 * v0, v0, v0 * 1.02] + flow = QhaFlow.from_scf_input(workdir, scf_input, volumes, ngqpt=[2, 2, 2], + with_becs=False, edos_ngkpt=[4, 4, 4], metadata={"mpi_id": 123}) + + flow.allocate() + flow.check_status() + assert len(flow) == 1 + isok, checks = flow.abivalidate_inputs() + assert isok diff --git a/abipy/flowtk/tests/test_tasks.py b/abipy/flowtk/tests/test_tasks.py new file mode 100644 index 000000000..fa9c872d2 --- /dev/null +++ b/abipy/flowtk/tests/test_tasks.py @@ -0,0 +1,193 @@ +# coding: utf-8 +import os + +from abipy.core.testing import AbipyTest +from abipy.flowtk.tasks import * +from abipy.flowtk.tasks import TaskPolicy, ParalHints + +test_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", + 'test_files', "abinit") + + +class TaskManagerTest(AbipyTest): + MANAGER = """\ +#policy: +# autoparal: 1 +qadapters: + - priority: 1 + queue: + qtype: slurm + qname: Oban + qparams: + mail_user: nobody@nowhere + limits: + timelimit: 0:20:00 + min_cores: 4 + max_cores: 12 + #condition: {"$eq": {omp_threads: 2}} + hardware: + num_nodes: 10 + sockets_per_node: 1 + cores_per_socket: 2 + mem_per_node: 4 Gb + job: + modules: + - intel/compilerpro/13.0.1.117 + - fftw3/intel/3.3 + shell_env: + PATH: /home/user/tmp_intel13/src/98_main/:/home/user//NAPS/intel13/bin:$PATH + LD_LIBRARY_PATH: /home/user/NAPS/intel13/lib:$LD_LIBRARY_PATH + mpi_runner: mpirun + +# Connection to the MongoDb database (optional) +db_connector: + enabled: no + database: abinit + collection: test + #host: 0.0.0.0 + #port: 8080 + #user: gmatteo + #password: helloworld +""" + def test_base(self): + """ + Simple unit tests for Qadapter subclasses. + A more complete coverage would require integration testing. + """ + aequal, atrue, afalse = self.assertEqual, self.assertTrue, self.assertFalse + # Initialize the object from YAML file. + slurm_manager = TaskManager.from_string(self.MANAGER) + + repr(slurm_manager); str(slurm_manager) + aequal(slurm_manager.num_cores, 4) + aequal(slurm_manager.mpi_procs, 4) + aequal(slurm_manager.omp_threads, 1) + afalse(slurm_manager.has_db) + + # Make a simple shell manager that will inherit the initial configuration. + shell_manager = slurm_manager.to_shell_manager(mpi_procs=1) + aequal(shell_manager.mpi_procs, 1) + aequal(shell_manager.num_cores, 1) + + # check that the initial slurm_manger has not been modified + aequal(slurm_manager.num_cores, 4) + + # Test pickle + self.serialize_with_pickle(slurm_manager, test_eq=False) + + self.assertMSONable(slurm_manager) + + +class ParalHintsTest(AbipyTest): + def test_base(self): + """Testing ParalHints.""" + s = \ +"""--- !Autoparal +#Autoparal section for Sigma runs. +info: + autoparal: 1 + max_ncpus: 4 + nkpt: 6 + nsppol: 1 + nspinor: 1 + nbnds: 10 +configurations: + - tot_ncpus: 1 + mpi_ncpus: 1 + efficiency: 1.000000000 + mem_per_cpu: 11.54 + vars: {npfft: 1, npkpt: 1} + - tot_ncpus: 2 + mpi_ncpus: 2 + efficiency: 1.000000000 + mem_per_cpu: 7.42 + vars: {npfft: 1, npkpt: 2} + - tot_ncpus: 2 + mpi_ncpus: 2 + efficiency: 0.100000000 + mem_per_cpu: 9.42 + vars: {npfft: 2, npkpt: 1} + - tot_ncpus: 3 + mpi_ncpus: 3 + efficiency: 0.833333333 + mem_per_cpu: 6.60 + vars: {npfft: 3, npkpt: 1} + - tot_ncpus: 4 + mpi_ncpus: 4 + efficiency: 0.833333333 + mem_per_cpu: 15.77 + vars: {npfft: 2, npkpt: 2} +... +""" + tmpfile = self.tmpfile_write(s) + aequal = self.assertEqual + + # Parse the file with the configurations. + confs = ParalHintsParser().parse(tmpfile) + print("all_confs:\n", confs) + aequal(confs.max_cores, 4) + aequal(confs.max_mem_per_proc, 15.77) + aequal(confs.max_speedup, 3.333333332) + aequal(confs.max_efficiency, 1.0) + # Test as_dict, from_dict + ParalHints.from_dict(confs.as_dict()) + + # MG: Disabled after refactoring. + # TODO: Write new units tests + # Optimize speedup with ncpus <= max_ncpus + #policy = TaskPolicy(autoparal=1, max_ncpus=3) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 3) + + # Optimize speedup with ncpus <= max_ncpus and condition on efficiency. + #policy = TaskPolicy(autoparal=1, max_ncpus=4, condition={"efficiency": {"$ge": 0.9}}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 2) + + # Optimize speedup with ncpus <= max_ncpus and conditions on efficiency and mem_per_cpu. + #policy = TaskPolicy(autoparal=1, mode="default", max_ncpus=4, + # condition={"$and": [{"efficiency": {"$ge": 0.8}}, {"mem_per_cpu": {"$le": 7.0}}]}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 3) + + # If no configuration satisfies the constraints, we return the conf with the highest speedup. + #policy = TaskPolicy(autoparal=1, max_ncpus=4, condition={"efficiency": {"$ge": 100}}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 4) + + # Wrong conditions --> dump a warning and return the conf with the highest speedup. + #policy = TaskPolicy(autoparal=1, max_ncpus=4, condition={"foobar": {"$ge": 100}}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 4) + + # Select configuration with npfft == 1 + #policy = TaskPolicy(autoparal=1, max_ncpus=4, vars_condition={"npfft": {"$eq": 3}}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 3) + #aequal(optimal.vars["npfft"], 3) + + # Select configuration with npfft == 2 and npkpt == 1 + #policy = TaskPolicy(autoparal=1, max_ncpus=4, + # vars_condition={"$and": [{"npfft": {"$eq": 2}}, {"npkpt": {"$eq": 1}}]}) + #optimal = confs.select_optimal_conf(policy) + #aequal(optimal.num_cores, 2) + #aequal(optimal.vars["npfft"], 2) + #aequal(optimal.vars["npkpt"], 1) + #assert 0 + + +class AbinitBuildTest(AbipyTest): + + def test_abinit_build(self): + from abipy.flowtk import AbinitBuild + build = AbinitBuild() + print(build) + assert build.has_netcdf + #assert not build.has_omp + #assert build.has_mpi + #assert build.has_mpiio + #assert build.has_libxc + + assert build.version_ge("4.0") + assert build.compare_version(build.version, "==") + assert build.compare_version(build.version, ">=") diff --git a/abipy/flowtk/tests/test_utils.py b/abipy/flowtk/tests/test_utils.py new file mode 100644 index 000000000..174e681e6 --- /dev/null +++ b/abipy/flowtk/tests/test_utils.py @@ -0,0 +1,72 @@ +# coding: utf-8 +from abipy.core.testing import AbipyTest +from abipy.flowtk.utils import * + + +# FIXME +#class FilePathFixerTest(AbipyTest): +# +# def test_base(self): +# fixer = FilepathFixer() +# #assert fixer.fix_paths('/foo/out_1WF17') == {'/foo/out_1WF17': '/foo/out_1WF'} +# #assert fixer.fix_paths('/foo/out_1WF5.nc') == {'/foo/out_1WF5.nc': '/foo/out_1WF.nc'} +# assert fixer.fix_paths('/foo/out_1DEN17') == {'/foo/out_1DEN17': '/foo/out_1DEN'} +# assert fixer.fix_paths('/foo/out_1DEN5.nc') == {'/foo/out_1DEN5.nc': '/foo/out_1DEN.nc'} + +class RpnTest(AbipyTest): + + def test_mongodb_like_conditions(self): + class Foo(object): + one = 1.0 + two = 2.0 + three = 3.0 + four = 4.0 + + map_res = [ + ( {"one": 1.0}, True), + ( {"one": {"$eq": 1.0}}, True), + ( {"one": {"$eq": "one"}}, True), + ( {"one": {"$ne": "two"}}, True), + ( {"one": {"$ne": 1.0}}, False), + ( {"four": {"$divisible": 2.0}}, True), + ( {"four": {"$divisible": 3.0}}, False), + ( {"two": {"$gt": "one"}}, True ), + ( {"$and": [ {"one": 1.0}, {"two": {"$lt": 3}}]}, True), + ( {"$and": [{"one": {"$ge": 0.8}}, {"two": {"$le": 6.0}}]}, True), + ( {"$or": [ {"$not": {"one": 1.0}}, {"two": {"$lt": 20}}]}, True), + ( {"$not": {"$and": [ {"$not": {"one": 1.0}}, {"two": {"$lt": 3}}] }}, True), + ] + + for map, res in map_res: + print("map", map) + rpn = map2rpn(map, obj=Foo) + print("rpn", rpn) + self.assertEqual(res, evaluate_rpn(rpn), msg="map %s" % map) + + +class ConditionTest(AbipyTest): + def test_condition(self): + c = Condition({}) + assert not c + print(c) + + class A(object): + def __init__(self): + self.one = 1.0 + + aobj = A() + assert Condition({"one": 1.0})(aobj) + assert not Condition({"one": 2.0})(aobj) + + +class SparseHistogramTest(AbipyTest): + def test_sparse(self): + items = [1, 2, 2.9, 4] + hist = SparseHistogram(items, step=1) + assert hist.binvals == [1.0, 2.0, 3.0] + assert hist.values == [[1], [2, 2.9], [4]] + #hist.plot() + + hist = SparseHistogram([iv for iv in enumerate(items)], key=lambda t: t[1], step=1) + assert hist.binvals == [1.0, 2.0, 3.0] + assert hist.values == [[(0, 1)], [(1, 2), (2, 2.9)], [(3, 4)]] diff --git a/abipy/flowtk/tests/test_works.py b/abipy/flowtk/tests/test_works.py new file mode 100644 index 000000000..158e64816 --- /dev/null +++ b/abipy/flowtk/tests/test_works.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +import os.path +import collections + +from tempfile import mkdtemp +from abipy.core.testing import AbipyTest +from pymatgen.io.abinit import * + +_test_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", + 'test_files', "abinit") + +def ref_file(filename): + return os.path.join(_test_dir, filename) + + +#class WorkTestCase(AbipyTest): +# +# def test_pseudoconvergence(self): +# workdir = mkdtemp(prefix="test_pseudoconvergence") +# manager = TaskManager.sequential() +# pseudo = ref_file("14si.pspnc") +# ecut_list = range(10, 40, 2) +# +# pptest_wf = PseudoConvergence(pseudo, ecut_list, atols_mev=(10, 1, 0.1), +# workdir=workdir, manager=manager) +# pptest_wf.allocate() +# +# # Test pickle +# # FIXME: protocol 2 does not work due to __new__ +# self.serialize_with_pickle(pptest_wf, protocols=[0,1], test_eq=True) +# +# print(repr(pptest_wf)) +# print(pptest_wf) +# +# self.assertTrue(isinstance(pptest_wf, collections.Iterable)) +# self.assertTrue(pptest_wf.isnc) +# +# pptest_wf.build() +# pptest_wf.rmtree() diff --git a/abipy/flowtk/utils.py b/abipy/flowtk/utils.py index 2f3c9876d..16b1ffcf4 100644 --- a/abipy/flowtk/utils.py +++ b/abipy/flowtk/utils.py @@ -1,3 +1,989 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +"""Tools and helper functions for abinit calculations""" +import os +import re +import collections +import shutil +import operator +import numpy as np -from pymatgen.io.abinit.utils import * +from fnmatch import fnmatch +from monty.collections import dict2namedtuple +from monty.string import list_strings +from monty.fnmatch import WildCard +from monty.shutil import copy_r +from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt + +import logging +logger = logging.getLogger(__name__) + + +def as_bool(s): + """ + Convert a string into a boolean. + + >>> assert as_bool(True) is True and as_bool("Yes") is True and as_bool("false") is False + """ + if s in (False, True): return s + # Assume string + s = s.lower() + if s in ("yes", "true"): + return True + elif s in ("no", "false"): + return False + else: + raise ValueError("Don't know how to convert type %s: %s into a boolean" % (type(s), s)) + + +class File(object): + """ + Very simple class used to store file basenames, absolute paths and directory names. + Provides wrappers for the most commonly used functions defined in os.path. + """ + def __init__(self, path): + self._path = os.path.abspath(path) + + def __repr__(self): + return "<%s at %s, %s>" % (self.__class__.__name__, id(self), self.path) + + def __str__(self): + return "<%s, %s>" % (self.__class__.__name__, self.path) + + def __eq__(self, other): + return False if other is None else self.path == other.path + + def __ne__(self, other): + return not self.__eq__(other) + + @property + def path(self): + """Absolute path of the file.""" + return self._path + + @property + def basename(self): + """File basename.""" + return os.path.basename(self.path) + + @property + def relpath(self): + """Relative path.""" + try: + return os.path.relpath(self.path) + except OSError: + # current working directory may not be defined! + return self.path + + @property + def dirname(self): + """Absolute path of the directory where the file is located.""" + return os.path.dirname(self.path) + + @property + def exists(self): + """True if file exists.""" + return os.path.exists(self.path) + + @property + def isncfile(self): + """True if self is a NetCDF file""" + return self.basename.endswith(".nc") + + def chmod(self, mode): + """Change the access permissions of a file.""" + os.chmod(self.path, mode) + + def read(self): + """Read data from file.""" + with open(self.path, "r") as f: + return f.read() + + def readlines(self): + """Read lines from files.""" + with open(self.path, "r") as f: + return f.readlines() + + def write(self, string): + """Write string to file.""" + self.make_dir() + with open(self.path, "w") as f: + if not string.endswith("\n"): + return f.write(string + "\n") + else: + return f.write(string) + + def writelines(self, lines): + """Write a list of strings to file.""" + self.make_dir() + with open(self.path, "w") as f: + return f.writelines(lines) + + def make_dir(self): + """Make the directory where the file is located.""" + if not os.path.exists(self.dirname): + os.makedirs(self.dirname) + + def remove(self): + """Remove the file.""" + try: + os.remove(self.path) + except Exception: + pass + + def move(self, dst): + """ + Recursively move a file or directory to another location. This is + similar to the Unix "mv" command. + """ + shutil.move(self.path, dst) + + def get_stat(self): + """Results from os.stat""" + return os.stat(self.path) + + def getsize(self): + """ + Return the size, in bytes, of path. + Return 0 if the file is empty or it does not exist. + """ + if not self.exists: return 0 + return os.path.getsize(self.path) + + +class Directory(object): + """ + Very simple class that provides helper functions + wrapping the most commonly used functions defined in os.path. + """ + def __init__(self, path): + self._path = os.path.abspath(path) + + def __repr__(self): + return "<%s at %s, %s>" % (self.__class__.__name__, id(self), self.path) + + def __str__(self): + return self.path + + def __eq__(self, other): + return False if other is None else self.path == other.path + + def __ne__(self, other): + return not self.__eq__(other) + + @property + def path(self): + """Absolute path of the directory.""" + return self._path + + @property + def relpath(self): + """Relative path.""" + return os.path.relpath(self.path) + + @property + def basename(self): + """Directory basename.""" + return os.path.basename(self.path) + + def path_join(self, *p): + """ + Join two or more pathname components, inserting '/' as needed. + If any component is an absolute path, all previous path components will be discarded. + """ + return os.path.join(self.path, *p) + + @property + def exists(self): + """True if file exists.""" + return os.path.exists(self.path) + + def makedirs(self): + """ + Super-mkdir; create a leaf directory and all intermediate ones. + Works like mkdir, except that any intermediate path segment (not + just the rightmost) will be created if it does not exist. + """ + if not self.exists: + os.makedirs(self.path) + + def rmtree(self): + """Recursively delete the directory tree""" + shutil.rmtree(self.path, ignore_errors=True) + + def copy_r(self, dst): + """ + Implements a recursive copy function similar to Unix's "cp -r" command. + """ + return copy_r(self.path, dst) + + def clean(self): + """Remove all files in the directory tree while preserving the directory""" + for path in self.list_filepaths(): + try: + os.remove(path) + except Exception: + pass + + def path_in(self, file_basename): + """Return the absolute path of filename in the directory.""" + return os.path.join(self.path, file_basename) + + def list_filepaths(self, wildcard=None): + """ + Return the list of absolute filepaths in the directory. + + Args: + wildcard: String of tokens separated by "|". Each token represents a pattern. + If wildcard is not None, we return only those files whose basename matches + the given shell pattern (uses fnmatch). + Example: + wildcard="*.nc|*.pdf" selects only those files that end with .nc or .pdf + """ + # Select the files in the directory. + fnames = [f for f in os.listdir(self.path)] + filepaths = filter(os.path.isfile, [os.path.join(self.path, f) for f in fnames]) + + if wildcard is not None: + # Filter using shell patterns. + w = WildCard(wildcard) + filepaths = [path for path in filepaths if w.match(os.path.basename(path))] + #filepaths = WildCard(wildcard).filter(filepaths) + + return filepaths + + def has_abiext(self, ext, single_file=True): + """ + Returns the absolute path of the ABINIT file with extension ext. + Support both Fortran files and netcdf files. In the later case, + we check whether a file with extension ext + ".nc" is present + in the directory. Returns empty string is file is not present. + + Raises: + `ValueError` if multiple files with the given ext are found. + This implies that this method is not compatible with multiple datasets. + """ + if ext != "abo": + ext = ext if ext.startswith('_') else '_' + ext + + files = [] + for f in self.list_filepaths(): + # For the time being, we ignore DDB files in nc format. + if ext == "_DDB" and f.endswith(".nc"): continue + # Ignore BSE text files e.g. GW_NLF_MDF + if ext == "_MDF" and not f.endswith(".nc"): continue + # Ignore DDK.nc files (temporary workaround for v8.8.2 in which + # the DFPT code produces a new file with DDK.nc extension that enters + # into conflict with AbiPy convention. + if ext == "_DDK" and f.endswith(".nc"): continue + + if f.endswith(ext) or f.endswith(ext + ".nc"): + files.append(f) + + # This should fix the problem with the 1WF files in which the file extension convention is broken + if not files: + files = [f for f in self.list_filepaths() if fnmatch(f, "*%s*" % ext)] + + if not files: + return "" + + if len(files) > 1 and single_file: + # ABINIT users must learn that multiple datasets are bad! + raise ValueError("Found multiple files with the same extensions:\n %s\n" % files + + "Please avoid multiple datasets!") + + return files[0] if single_file else files + + def symlink_abiext(self, inext, outext): + """ + Create a simbolic link (outext --> inext). The file names are implicitly + given by the ABINIT file extension. + + Example: + + outdir.symlink_abiext('1WF', 'DDK') + + creates the link out_DDK that points to out_1WF + + Return: 0 if success. + + Raise: RuntimeError + """ + infile = self.has_abiext(inext) + if not infile: + raise RuntimeError('no file with extension %s in %s' % (inext, self)) + + for i in range(len(infile) - 1, -1, -1): + if infile[i] == '_': + break + else: + raise RuntimeError('Extension %s could not be detected in file %s' % (inext, infile)) + + outfile = infile[:i] + '_' + outext + + if os.path.exists(outfile): + if os.path.islink(outfile): + if os.path.realpath(outfile) == infile: + logger.debug("link %s already exists but it's ok because it points to the correct file" % outfile) + return 0 + else: + raise RuntimeError("Expecting link at %s already exists but it does not point to %s" % (outfile, infile)) + else: + raise RuntimeError('Expecting link at %s but found file.' % outfile) + + os.symlink(infile, outfile) + return 0 + + def rename_abiext(self, inext, outext): + """Rename the Abinit file with extension inext with the new extension outext""" + infile = self.has_abiext(inext) + if not infile: + raise RuntimeError('no file with extension %s in %s' % (inext, self)) + + for i in range(len(infile) - 1, -1, -1): + if infile[i] == '_': + break + else: + raise RuntimeError('Extension %s could not be detected in file %s' % (inext, infile)) + + outfile = infile[:i] + '_' + outext + shutil.move(infile, outfile) + return 0 + + def copy_abiext(self, inext, outext): + """Copy the Abinit file with extension inext to a new file with the extension outext""" + infile = self.has_abiext(inext) + if not infile: + raise RuntimeError('no file with extension %s in %s' % (inext, self)) + + for i in range(len(infile) - 1, -1, -1): + if infile[i] == '_': + break + else: + raise RuntimeError('Extension %s could not be detected in file %s' % (inext, infile)) + + outfile = infile[:i] + '_' + outext + shutil.copy(infile, outfile) + return 0 + + def remove_exts(self, exts): + """ + Remove the files with the given extensions. Unlike rmtree, this function preserves the directory path. + Return list with the absolute paths of the files that have been removed. + """ + paths = [] + + for ext in list_strings(exts): + path = self.has_abiext(ext) + if not path: continue + try: + os.remove(path) + paths.append(path) + except IOError: + logger.warning("Exception while trying to remove file %s" % path) + + return paths + + def find_last_timden_file(self): + """ + ABINIT produces lots of out_TIM1_DEN files for each step and we need to find the lat + one in order to prepare the restart or to connect other tasks to the structural relaxation. + + This function finds all the TIM?_DEN files in self and return a namedtuple (path, step) + where `path` is the path of the last TIM?_DEN file and step is the iteration number. + Returns None if the directory does not contain TIM?_DEN files. + """ + regex = re.compile(r"out_TIM(\d+)_DEN(.nc)?$") + + timden_paths = [f for f in self.list_filepaths() if regex.match(os.path.basename(f))] + if not timden_paths: return None + + # Build list of (step, path) tuples. + stepfile_list = [] + for path in timden_paths: + name = os.path.basename(path) + match = regex.match(name) + step, ncext = match.groups() + stepfile_list.append((int(step), path)) + + # DSU sort. + last = sorted(stepfile_list, key=lambda t: t[0])[-1] + return dict2namedtuple(step=last[0], path=last[1]) + + def find_1wf_files(self): + """ + Abinit adds the idir-ipert index at the end of the 1WF file and this breaks the extension + e.g. out_1WF4. This method scans the files in the directories and returns a list of namedtuple + Each named tuple gives the `path` of the 1FK file and the `pertcase` index. + """ + regex = re.compile(r"out_1WF(\d+)(\.nc)?$") + + wf_paths = [f for f in self.list_filepaths() if regex.match(os.path.basename(f))] + if not wf_paths: return None + + # Build list of (pertcase, path) tuples. + pertfile_list = [] + for path in wf_paths: + name = os.path.basename(path) + match = regex.match(name) + pertcase, ncext = match.groups() + pertfile_list.append((int(pertcase), path)) + + # DSU sort. + pertfile_list = sorted(pertfile_list, key=lambda t: t[0]) + return [dict2namedtuple(pertcase=item[0], path=item[1]) for item in pertfile_list] + + def find_1den_files(self): + """ + Abinit adds the idir-ipert index at the end of the 1DEN file and this breaks the extension + e.g. out_DEN1. This method scans the files in the directories and returns a list of namedtuple + Each named tuple gives the `path` of the 1DEN file and the `pertcase` index. + """ + regex = re.compile(r"out_DEN(\d+)(\.nc)?$") + den_paths = [f for f in self.list_filepaths() if regex.match(os.path.basename(f))] + if not den_paths: return None + + # Build list of (pertcase, path) tuples. + pertfile_list = [] + for path in den_paths: + name = os.path.basename(path) + match = regex.match(name) + pertcase, ncext = match.groups() + pertfile_list.append((int(pertcase), path)) + + # DSU sort. + pertfile_list = sorted(pertfile_list, key=lambda t: t[0]) + return [dict2namedtuple(pertcase=item[0], path=item[1]) for item in pertfile_list] + + +# This dictionary maps ABINIT file extensions to the variables that must be used to read the file in input. +# +# TODO: In Abinit9, it's possible to specify absolute paths with e.g., getden_path +# Now it's possible to avoid creating symbolic links before running but +# moving to the new approach requires some careful testing besides not all files support the get*_path syntax! + +_EXT2VARS = { + "DEN": {"irdden": 1}, + "WFK": {"irdwfk": 1}, + "WFQ": {"irdwfq": 1}, + "SCR": {"irdscr": 1}, + "QPS": {"irdqps": 1}, + "1WF": {"ird1wf": 1}, + "1DEN": {"ird1den": 1}, + "BSR": {"irdbsreso": 1}, + "BSC": {"irdbscoup": 1}, + "HAYDR_SAVE": {"irdhaydock": 1}, + "DDK": {"irdddk": 1}, + "DDB": {}, + "DVDB": {}, + "GKK": {}, + "DKK": {}, + "EFMAS.nc": {"irdefmas": 1}, + # Abinit does not implement getkden and irdkden but relies on irden + "KDEN": {}, #{"irdkden": 1}, +} + + +def irdvars_for_ext(ext): + """ + Returns a dictionary with the ABINIT variables + that must be used to read the file with extension ext. + """ + return _EXT2VARS[ext].copy() + + +def abi_extensions(): + """List with all the ABINIT extensions that are registered.""" + return list(_EXT2VARS.keys())[:] + + +def abi_splitext(filename): + """ + Split the ABINIT extension from a filename. + "Extension" are found by searching in an internal database. + + Returns "(root, ext)" where ext is the registered ABINIT extension + The final ".nc" is included (if any) + + >>> assert abi_splitext("foo_WFK") == ('foo_', 'WFK') + >>> assert abi_splitext("/home/guido/foo_bar_WFK.nc") == ('foo_bar_', 'WFK.nc') + """ + filename = os.path.basename(filename) + is_ncfile = False + if filename.endswith(".nc"): + is_ncfile = True + filename = filename[:-3] + + known_extensions = abi_extensions() + + # This algorith fails if we have two files + # e.g. HAYDR_SAVE, ANOTHER_HAYDR_SAVE + for i in range(len(filename) - 1, -1, -1): + ext = filename[i:] + if ext in known_extensions: + break + + else: + raise ValueError("Cannot find a registered extension in %s" % filename) + + root = filename[:i] + if is_ncfile: ext += ".nc" + + return root, ext + + +class FilepathFixer(object): + """ + This object modifies the names of particular output files + produced by ABINIT so that the file extension is preserved. + Having a one-to-one mapping between file extension and data format + is indeed fundamental for the correct behaviour of abinit since: + + - We locate the output file by just inspecting the file extension + + - We select the variables that must be added to the input file + on the basis of the extension specified by the user during + the initialization of the `AbinitFlow`. + + Unfortunately, ABINIT developers like to append extra stuff + to the initial extension and therefore we have to call + `FilepathFixer` to fix the output files produced by the run. + + Example: + + fixer = FilepathFixer() + fixer.fix_paths('/foo/out_1WF17') == {'/foo/out_1WF17': '/foo/out_1WF'} + fixer.fix_paths('/foo/out_1WF5.nc') == {'/foo/out_1WF5.nc': '/foo/out_1WF.nc'} + """ + def __init__(self): + # dictionary mapping the *official* file extension to + # the regular expression used to tokenize the basename of the file + # To add a new file it's sufficient to add a new regexp and + # a static method _fix_EXTNAME + self.regs = regs = {} + import re + regs["1WF"] = re.compile(r"(\w+_)1WF(\d+)(\.nc)?$") + regs["1DEN"] = re.compile(r"(\w+_)1DEN(\d+)(\.nc)?$") + + @staticmethod + def _fix_1WF(match): + root, pert, ncext = match.groups() + if ncext is None: ncext = "" + return root + "1WF" + ncext + + @staticmethod + def _fix_1DEN(match): + root, pert, ncext = match.groups() + if ncext is None: ncext = "" + return root + "1DEN" + ncext + + def _fix_path(self, path): + for ext, regex in self.regs.items(): + head, tail = os.path.split(path) + + match = regex.match(tail) + if match: + newtail = getattr(self, "_fix_" + ext)(match) + newpath = os.path.join(head, newtail) + return newpath, ext + + return None, None + + def fix_paths(self, paths): + """ + Fix the filenames in the iterable paths + + Returns: + old2new: Mapping old_path --> new_path + """ + old2new, fixed_exts = {}, [] + + for path in list_strings(paths): + newpath, ext = self._fix_path(path) + + if newpath is not None: + #if ext not in fixed_exts: + # if ext == "1WF": continue + # raise ValueError("Unknown extension %s" % ext) + #print(ext, path, fixed_exts) + #if ext != '1WF': + # assert ext not in fixed_exts + if ext not in fixed_exts: + if ext == "1WF": continue + raise ValueError("Unknown extension %s" % ext) + fixed_exts.append(ext) + old2new[path] = newpath + + return old2new + + +def _bop_not(obj): + """Boolean not.""" + return not bool(obj) + + +def _bop_and(obj1, obj2): + """Boolean and.""" + return bool(obj1) and bool(obj2) + + +def _bop_or(obj1, obj2): + """Boolean or.""" + return bool(obj1) or bool(obj2) + + +def _bop_divisible(num1, num2): + """Return True if num1 is divisible by num2.""" + return (num1 % num2) == 0.0 + + +# Mapping string --> operator. +_UNARY_OPS = { + "$not": _bop_not, +} + +_BIN_OPS = { + "$eq": operator.eq, + "$ne": operator.ne, + "$gt": operator.gt, + "$ge": operator.ge, + "$gte": operator.ge, + "$lt": operator.lt, + "$le": operator.le, + "$lte": operator.le, + "$divisible": _bop_divisible, + "$and": _bop_and, + "$or": _bop_or, +} + + +_ALL_OPS = list(_UNARY_OPS.keys()) + list(_BIN_OPS.keys()) + + +def map2rpn(map, obj): + """ + Convert a Mongodb-like dictionary to a RPN list of operands and operators. + + Reverse Polish notation (RPN) is a mathematical notation in which every + operator follows all of its operands, e.g. + + 3 - 4 + 5 --> 3 4 - 5 + + + >>> d = {2.0: {'$eq': 1.0}} + >>> assert map2rpn(d, None) == [2.0, 1.0, '$eq'] + """ + rpn = [] + + for k, v in map.items(): + + if k in _ALL_OPS: + if isinstance(v, collections.abc.Mapping): + # e.g "$not": {"$gt": "one"} + # print("in op_vmap",k, v) + values = map2rpn(v, obj) + rpn.extend(values) + rpn.append(k) + + elif isinstance(v, (list, tuple)): + # e.g "$and": [{"$not": {"one": 1.0}}, {"two": {"$lt": 3}}]} + # print("in_op_list",k, v) + for d in v: + rpn.extend(map2rpn(d, obj)) + + rpn.append(k) + + else: + # Examples + # 1) "$eq"": "attribute_name" + # 2) "$eq"": 1.0 + try: + #print("in_otherv",k, v) + rpn.append(getattr(obj, v)) + rpn.append(k) + + except TypeError: + #print("in_otherv, raised",k, v) + rpn.extend([v, k]) + else: + try: + k = getattr(obj, k) + except TypeError: + k = k + + if isinstance(v, collections.abc.Mapping): + # "one": {"$eq": 1.0}} + values = map2rpn(v, obj) + rpn.append(k) + rpn.extend(values) + else: + #"one": 1.0 + rpn.extend([k, v, "$eq"]) + + return rpn + + +def evaluate_rpn(rpn): + """ + Evaluates the RPN form produced my map2rpn. + + Returns: bool + """ + vals_stack = [] + + for item in rpn: + + if item in _ALL_OPS: + # Apply the operator and push to the task. + v2 = vals_stack.pop() + + if item in _UNARY_OPS: + res = _UNARY_OPS[item](v2) + + elif item in _BIN_OPS: + v1 = vals_stack.pop() + res = _BIN_OPS[item](v1, v2) + else: + raise ValueError("%s not in unary_ops or bin_ops" % str(item)) + + vals_stack.append(res) + + else: + # Push the operand + vals_stack.append(item) + + assert len(vals_stack) == 1 + assert isinstance(vals_stack[0], bool) + + return vals_stack[0] + + +class Condition(object): + """ + This object receives a dictionary that defines a boolean condition whose syntax is similar + to the one used in mongodb (albeit not all the operators available in mongodb are supported here). + + Example: + + $gt: {field: {$gt: value} } + + $gt selects those documents where the value of the field is greater than (i.e. >) the specified value. + + $and performs a logical AND operation on an array of two or more expressions (e.g. , , etc.) + and selects the documents that satisfy all the expressions in the array. + + { $and: [ { }, { } , ... , { } ] } + + Consider the following example: + + db.inventory.find( { qty: { $gt: 20 } } ) + This query will select all documents in the inventory collection where the qty field value is greater than 20. + Consider the following example: + + db.inventory.find( { qty: { $gt: 20 } } ) + db.inventory.find({ $and: [ { price: 1.99 }, { qty: { $lt: 20 } }, { sale: true } ] } ) + """ + @classmethod + def as_condition(cls, obj): + """Convert obj into :class:`Condition`""" + if isinstance(obj, cls): + return obj + else: + return cls(cmap=obj) + + def __init__(self, cmap=None): + self.cmap = {} if cmap is None else cmap + + def __str__(self): + return str(self.cmap) + + def __bool__(self): + return bool(self.cmap) + + __nonzero__ = __bool__ + + def __call__(self, obj): + if not self: return True + try: + return evaluate_rpn(map2rpn(self.cmap, obj)) + except Exception as exc: + logger.warning("Condition(%s) raised Exception:\n %s" % (type(obj), str(exc))) + return False + + +class Editor(object): + """ + Wrapper class that calls the editor specified by the user + or the one specified in the $EDITOR env variable. + """ + def __init__(self, editor=None): + """If editor is None, $EDITOR is used.""" + self.editor = os.getenv("EDITOR", "vi") if editor is None else str(editor) + + def edit_files(self, fnames, ask_for_exit=True): + exit_status = 0 + for idx, fname in enumerate(fnames): + exit_status = self.edit_file(fname) + if ask_for_exit and idx != len(fnames)-1 and self.user_wants_to_exit(): + break + return exit_status + + def edit_file(self, fname): + from subprocess import call + retcode = call([self.editor, fname]) + + if retcode != 0: + import warnings + warnings.warn("Error while trying to edit file: %s" % fname) + + return retcode + + @staticmethod + def user_wants_to_exit(): + """Show an interactive prompt asking if exit is wanted.""" + # Fix python 2.x. + try: + answer = input("Do you want to continue [Y/n]") + except EOFError: + return True + + return answer.lower().strip() in ["n", "no"] + + +class SparseHistogram(object): + + def __init__(self, items, key=None, num=None, step=None): + if num is None and step is None: + raise ValueError("Either num or step must be specified") + + from collections import defaultdict + + values = [key(item) for item in items] if key is not None else items + start, stop = min(values), max(values) + if num is None: + num = int((stop - start) / step) + if num == 0: num = 1 + mesh = np.linspace(start, stop, num, endpoint=False) + + from monty.bisect import find_le + + hist = defaultdict(list) + for item, value in zip(items, values): + # Find rightmost value less than or equal to x. + # hence each bin contains all items whose value is >= value + pos = find_le(mesh, value) + hist[mesh[pos]].append(item) + + #new = OrderedDict([(pos, hist[pos]) for pos in sorted(hist.keys(), reverse=reverse)]) + self.binvals = sorted(hist.keys()) + self.values = [hist[pos] for pos in self.binvals] + self.start, self.stop, self.num = start, stop, num + + @add_fig_kwargs + def plot(self, ax=None, **kwargs): + """ + Plot the histogram with matplotlib, returns `matplotlib` figure. + """ + ax, fig, plt = get_ax_fig_plt(ax) + + yy = [len(v) for v in self.values] + ax.plot(self.binvals, yy, **kwargs) + + return fig + + +class Dirviz(object): + + #file_color = np.array((255, 0, 0)) / 255 + #dir_color = np.array((0, 0, 255)) / 255 + + def __init__(self, top): + #if not os.path.isdir(top): + # raise TypeError("%s should be a directory!" % str(top)) + self.top = os.path.abspath(top) + + def get_cluster_graph(self, engine="fdp", graph_attr=None, node_attr=None, edge_attr=None): + """ + Generate directory graph in the DOT language. Directories are shown as clusters + + .. warning:: + + This function scans the entire directory tree starting from top so the resulting + graph can be really big. + + Args: + engine: Layout command used. ['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage'] + graph_attr: Mapping of (attribute, value) pairs for the graph. + node_attr: Mapping of (attribute, value) pairs set for all nodes. + edge_attr: Mapping of (attribute, value) pairs set for all edges. + + Returns: graphviz.Digraph + """ + # https://www.graphviz.org/doc/info/ + from graphviz import Digraph + g = Digraph("directory", #filename="flow_%s.gv" % os.path.basename(self.relworkdir), + engine=engine) # if engine == "automatic" else engine) + + # Set graph attributes. + #g.attr(label="%s@%s" % (self.__class__.__name__, self.relworkdir)) + g.attr(label=self.top) + #g.attr(fontcolor="white", bgcolor='purple:pink') + #g.attr(rankdir="LR", pagedir="BL") + #g.attr(constraint="false", pack="true", packMode="clust") + g.node_attr.update(color='lightblue2', style='filled') + #g.node_attr.update(ranksep='equally') + + # Add input attributes. + if graph_attr is not None: + g.graph_attr.update(**graph_attr) + if node_attr is not None: + g.node_attr.update(**node_attr) + if edge_attr is not None: + g.edge_attr.update(**edge_attr) + + def node_kwargs(path): + return dict( + #shape="circle", + #shape="none", + #shape="plaintext", + #shape="point", + shape="record", + #color=node.color_hex, + fontsize="8.0", + label=os.path.basename(path), + ) + + edge_kwargs = dict(arrowType="vee", style="solid", minlen="1") + cluster_kwargs = dict(rankdir="LR", pagedir="BL", style="rounded", bgcolor="azure2") + + # TODO: Write other method without clusters if not walk. + exclude_top_node = False + for root, dirs, files in os.walk(self.top): + if exclude_top_node and root == self.top: continue + cluster_name = "cluster_%s" % root + #print("root", root, cluster_name, "dirs", dirs, "files", files, sep="\n") + + with g.subgraph(name=cluster_name) as d: + d.attr(**cluster_kwargs) + d.attr(rank="source" if (files or dirs) else "sink") + d.attr(label=os.path.basename(root)) + for f in files: + filepath = os.path.join(root, f) + d.node(filepath, **node_kwargs(filepath)) + if os.path.islink(filepath): + # Follow the link and use the relpath wrt link as label. + realp = os.path.realpath(filepath) + realp = os.path.relpath(realp, filepath) + #realp = os.path.relpath(realp, self.top) + #print(filepath, realp) + #g.node(realp, **node_kwargs(realp)) + g.edge(filepath, realp, **edge_kwargs) + + for dirname in dirs: + dirpath = os.path.join(root, dirname) + #head, basename = os.path.split(dirpath) + new_cluster_name = "cluster_%s" % dirpath + #rank = "source" if os.listdir(dirpath) else "sink" + #g.node(dirpath, rank=rank, **node_kwargs(dirpath)) + #g.edge(dirpath, new_cluster_name, **edge_kwargs) + #d.edge(cluster_name, new_cluster_name, minlen="2", **edge_kwargs) + d.edge(cluster_name, new_cluster_name, **edge_kwargs) + return g diff --git a/abipy/flowtk/works.py b/abipy/flowtk/works.py index fcfea9aad..2bf53b402 100644 --- a/abipy/flowtk/works.py +++ b/abipy/flowtk/works.py @@ -1,6 +1,1969 @@ # coding: utf-8 -from __future__ import print_function, division, unicode_literals, absolute_import +""" +Works for Abinit +""" +import os +import shutil +import time +import abc +import collections import numpy as np -from pymatgen.io.abinit.works import Work +from monty.collections import AttrDict +from monty.itertools import chunks +from monty.functools import lazy_property +from monty.fnmatch import WildCard +from pydispatch import dispatcher +from pymatgen.core.units import EnergyArray +from . import wrappers +from .nodes import Dependency, Node, NodeError, NodeResults, FileNode #, check_spectator +from .tasks import (Task, AbinitTask, ScfTask, NscfTask, DfptTask, PhononTask, ElasticTask, DdkTask, EffMassTask, + BseTask, RelaxTask, DdeTask, BecTask, ScrTask, SigmaTask, TaskManager, + DteTask, EphTask, CollinearThenNonCollinearScfTask) + +from .utils import Directory +from .netcdf import ETSF_Reader, NetcdfReader +from .abitimer import AbinitTimerParser + +__author__ = "Matteo Giantomassi" +__copyright__ = "Copyright 2013, The Materials Project" +__version__ = "0.1" +__maintainer__ = "Matteo Giantomassi" + + +__all__ = [ + "Work", + "BandStructureWork", + "RelaxWork", + "G0W0Work", + "QptdmWork", + "SigmaConvWork", + "BseMdfWork", + "PhononWork", + "PhononWfkqWork", + "GKKPWork", + "BecWork", + "DteWork", +] + + +class WorkResults(NodeResults): + JSON_SCHEMA = NodeResults.JSON_SCHEMA.copy() + + @classmethod + def from_node(cls, work): + """Initialize an instance from a |Work| instance.""" + new = super().from_node(work) + + # Will put all files found in outdir in GridFs + # Warning: assuming binary files. + d = {os.path.basename(f): f for f in work.outdir.list_filepaths()} + new.register_gridfs_files(**d) + + return new + + +class WorkError(NodeError): + """Base class for the exceptions raised by Work objects.""" + + +class BaseWork(Node, metaclass=abc.ABCMeta): + """ + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: BaseWork + """ + Error = WorkError + + Results = WorkResults + + # interface modeled after subprocess.Popen + @property + @abc.abstractmethod + def processes(self): + """Return a list of objects that support the `subprocess.Popen` protocol.""" + + def poll(self): + """ + Check if all child processes have terminated. Set and return returncode attribute. + """ + return [task.poll() for task in self] + + def wait(self): + """ + Wait for child processed to terminate. Set and return returncode attribute. + """ + return [task.wait() for task in self] + + def communicate(self, input=None): + """ + Interact with processes: Send data to stdin. Read data from stdout and + stderr, until end-of-file is reached. + Wait for process to terminate. The optional input argument should be a + string to be sent to the child processed, or None, if no data should be + sent to the children. + + communicate() returns a list of tuples (stdoutdata, stderrdata). + """ + return [task.communicate(input) for task in self] + + @property + def returncodes(self): + """ + The children return codes, set by poll() and wait() (and indirectly by communicate()). + A None value indicates that the process hasn't terminated yet. + A negative value -N indicates that the child was terminated by signal N (Unix only). + """ + return [task.returncode for task in self] + + @property + def ncores_reserved(self): + """ + Returns the number of cores reserved in this moment. + A core is reserved if it's still not running but + we have submitted the task to the queue manager. + """ + return sum(task.manager.num_cores for task in self if task.status == task.S_SUB) + + @property + def ncores_allocated(self): + """ + Returns the number of CPUs allocated in this moment. + A core is allocated if it's running a task or if we have + submitted a task to the queue manager but the job is still pending. + """ + return sum(task.manager.num_cores for task in self if task.status in [task.S_SUB, task.S_RUN]) + + @property + def ncores_used(self): + """ + Returns the number of cores used in this moment. + A core is used if there's a job that is running on it. + """ + return sum(task.manager.num_cores for task in self if task.status == task.S_RUN) + + def fetch_task_to_run(self): + """ + Returns the first task that is ready to run or + None if no task can be submitted at present" + + Raises: + `StopIteration` if all tasks are done. + """ + # All the tasks are done so raise an exception + # that will be handled by the client code. + if all(task.is_completed for task in self): + raise StopIteration("All tasks completed.") + + for task in self: + if task.can_run: + return task + + # No task found, this usually happens when we have dependencies. + # Beware of possible deadlocks here! + self.history.warning("Possible deadlock in fetch_task_to_run!") + return None + + def fetch_alltasks_to_run(self): + """ + Returns a list with all the tasks that can be submitted. + Empty list if not task has been found. + """ + return [task for task in self if task.can_run] + + @abc.abstractmethod + def setup(self, *args, **kwargs): + """Method called before submitting the calculations.""" + + def _setup(self, *args, **kwargs): + self.setup(*args, **kwargs) + + def connect_signals(self): + """ + Connect the signals within the work. + The |Work| is responsible for catching the important signals raised from + its task and raise new signals when some particular condition occurs. + """ + for task in self: + dispatcher.connect(self.on_ok, signal=task.S_OK, sender=task) + + def disconnect_signals(self): + """ + Disable the signals within the work. This function reverses the process of `connect_signals` + """ + for task in self: + try: + dispatcher.disconnect(self.on_ok, signal=task.S_OK, sender=task) + except dispatcher.errors.DispatcherKeyError as exc: + self.history.debug(str(exc)) + + @property + def all_ok(self): + return all(task.status == task.S_OK for task in self) + + #@check_spectator + def on_ok(self, sender): + """ + This callback is called when one task reaches status `S_OK`. + It executes on_all_ok when all tasks in self have reached `S_OK`. + """ + self.history.debug("In on_ok with sender %s" % sender) + + if self.all_ok: + if self.finalized: + return AttrDict(returncode=0, message="Work has been already finalized") + else: + # Set finalized here, because on_all_ok might change it (e.g. Relax + EOS in a single work) + self.finalized = True + try: + results = AttrDict(**self.on_all_ok()) + except Exception as exc: + self.history.critical("on_all_ok raises %s" % str(exc)) + self.finalized = False + raise + + # Signal to possible observers that the `Work` reached S_OK + self.history.info("Work %s is finalized and broadcasts signal S_OK" % str(self)) + if self._finalized: + self.send_signal(self.S_OK) + + return results + + return AttrDict(returncode=1, message="Not all tasks are OK!") + + #@check_spectator + def on_all_ok(self): + """ + This method is called once the `Work` is completed i.e. when all tasks have reached status S_OK. + Subclasses should provide their own implementation + + Returns: + Dictionary that must contain at least the following entries: + returncode: 0 on success. + message: a string that should provide a human-readable description of what has been performed. + """ + return dict(returncode=0, message="Calling on_all_ok of the base class!") + + def get_results(self, **kwargs): + """ + Method called once the calculations are completed. + The base version returns a dictionary task_name: TaskResults for each task in self. + """ + results = self.Results.from_node(self) + return results + + def get_graphviz(self, engine="automatic", graph_attr=None, node_attr=None, edge_attr=None): + """ + Generate task graph in the DOT language (only parents and children of this work). + + Args: + engine: Layout command used. ['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage'] + graph_attr: Mapping of (attribute, value) pairs for the graph. + node_attr: Mapping of (attribute, value) pairs set for all nodes. + edge_attr: Mapping of (attribute, value) pairs set for all edges. + + Returns: graphviz.Digraph + """ + from graphviz import Digraph + fg = Digraph("work", #filename="work_%s.gv" % os.path.basename(self.workdir), + engine="fdp" if engine == "automatic" else engine) + + # Set graph attributes. + # https://www.graphviz.org/doc/info/ + #fg.attr(label="%s@%s" % (self.__class__.__name__, self.relworkdir)) + fg.attr(label=repr(self)) + #fg.attr(fontcolor="white", bgcolor='purple:pink') + fg.attr(rankdir="LR", pagedir="BL") + #fg.attr(constraint="false", pack="true", packMode="clust") + fg.node_attr.update(color='lightblue2', style='filled') + #fg.node_attr.update(ranksep='equally') + + # Add input attributes. + if graph_attr is not None: + fg.graph_attr.update(**graph_attr) + if node_attr is not None: + fg.node_attr.update(**node_attr) + if edge_attr is not None: + fg.edge_attr.update(**edge_attr) + + def node_kwargs(node): + return dict( + #shape="circle", + color=node.color_hex, + label=(str(node) if not hasattr(node, "pos_str") else + node.pos_str + "\n" + node.__class__.__name__), + ) + + edge_kwargs = dict(arrowType="vee", style="solid") + cluster_kwargs = dict(rankdir="LR", pagedir="BL", style="rounded", bgcolor="azure2") + + # Build cluster with tasks in *this* work + cluster_name = "cluster%s" % self.name + with fg.subgraph(name=cluster_name) as wg: + wg.attr(**cluster_kwargs) + wg.attr(label="%s (%s)" % (self.__class__.__name__, self.name)) + for task in self: + wg.node(task.name, **node_kwargs(task)) + # Connect task to children + for child in task.get_children(): + # Test if child is in this cluster (self). + myg = wg if child in self else fg + myg.node(child.name, **node_kwargs(child)) + # Find file extensions required by this task + i = [dep.node for dep in child.deps].index(task) + edge_label = "+".join(child.deps[i].exts) + myg.edge(task.name, child.name, label=edge_label, color=task.color_hex, + **edge_kwargs) + + # Connect task to parents + for parent in task.get_parents(): + # Test if parent is in this cluster (self). + myg = wg if parent in self else fg + myg.node(parent.name, **node_kwargs(parent)) + # Find file extensions required by this task + i = [dep.node for dep in task.deps].index(parent) + edge_label = "+".join(task.deps[i].exts) + myg.edge(parent.name, task.name, label=edge_label, color=parent.color_hex, + **edge_kwargs) + + # Treat the case in which we have a work producing output for tasks in *this* work. + #for work in self.flow: + # children = work.get_children() + # if not children or all(child not in self for child in children): + # continue + # cluster_name = "cluster%s" % work.name + # seen = set() + # for child in children: + # if child not in self: continue + # # This is not needed, too much confusing + # #fg.edge(cluster_name, child.name, color=work.color_hex, **edge_kwargs) + # # Find file extensions required by work + # i = [dep.node for dep in child.deps].index(work) + # for ext in child.deps[i].exts: + # out = "%s (%s)" % (ext, work.name) + # fg.node(out) + # fg.edge(out, child.name, **edge_kwargs) + # key = (cluster_name, out) + # if key not in seen: + # fg.edge(cluster_name, out, color=work.color_hex, **edge_kwargs) + # seen.add(key) + + return fg + + +class NodeContainer(metaclass=abc.ABCMeta): + """ + Mixin classes for `Work` and `Flow` objects providing helper functions + to register tasks in the container. The helper function call the + `register` method of the container. + """ + # Abstract protocol for containers + + @abc.abstractmethod + def register_task(self, *args, **kwargs): + """ + Register a task in the container. + """ + # TODO: shall flow.register_task return a Task or a Work? + + # Helper functions to register Task subclasses. + def register_scf_task(self, *args, **kwargs): + """Register a Scf task.""" + kwargs["task_class"] = ScfTask + return self.register_task(*args, **kwargs) + + def register_collinear_then_noncollinear_scf_task(self, *args, **kwargs): + """Register a Scf task that perform a SCF run first with nsppol = 2 and then nspinor = 2""" + kwargs["task_class"] = CollinearThenNonCollinearScfTask + return self.register_task(*args, **kwargs) + + def register_nscf_task(self, *args, **kwargs): + """Register a nscf task.""" + kwargs["task_class"] = NscfTask + task = self.register_task(*args, **kwargs) + + # Make sure parent producing DEN file is given + if task.is_work: task = task[-1] + den_parent = task.find_parent_with_ext("DEN") + if den_parent is None: + raise ValueError("NSCF task %s\nrequires parent producing DEN file!" % repr(task)) + + if task.input.get("usekden", 0) == 1: + # Meta-GGA calculation --> Add KDEN if not explicitly given. + # Assuming prtkden already set to 1 + # TODO: Abinit should automatically set it to 1 if usekden --> I'm not gonna fix the input at this level + kden_parent = task.find_parent_with_ext("KDEN") + if kden_parent is None: + task.add_deps({den_parent: "KDEN"}) + + return task + + def register_relax_task(self, *args, **kwargs): + """Register a task for structural optimization.""" + kwargs["task_class"] = RelaxTask + return self.register_task(*args, **kwargs) + + def register_phonon_task(self, *args, **kwargs): + """Register a phonon task.""" + kwargs["task_class"] = PhononTask + return self.register_task(*args, **kwargs) + + def register_elastic_task(self, *args, **kwargs): + """Register an elastic task.""" + kwargs["task_class"] = ElasticTask + return self.register_task(*args, **kwargs) + + def register_ddk_task(self, *args, **kwargs): + """Register a DDK task.""" + kwargs["task_class"] = DdkTask + return self.register_task(*args, **kwargs) + + def register_effmass_task(self, *args, **kwargs): + """Register a effective mass task.""" + kwargs["task_class"] = EffMassTask + # FIXME: Hack to run it in sequential because effmass task does not support parallelism. + kwargs.update({"manager": TaskManager.from_user_config().new_with_fixed_mpi_omp(1, 1)}) + return self.register_task(*args, **kwargs) + + def register_scr_task(self, *args, **kwargs): + """Register a screening task.""" + kwargs["task_class"] = ScrTask + return self.register_task(*args, **kwargs) + + def register_sigma_task(self, *args, **kwargs): + """Register a sigma task.""" + kwargs["task_class"] = SigmaTask + return self.register_task(*args, **kwargs) + + def register_dde_task(self, *args, **kwargs): + """Register a Dde task.""" + kwargs["task_class"] = DdeTask + return self.register_task(*args, **kwargs) + + def register_dte_task(self, *args, **kwargs): + """Register a Dte task.""" + kwargs["task_class"] = DteTask + return self.register_task(*args, **kwargs) + + def register_bec_task(self, *args, **kwargs): + """Register a BEC task.""" + kwargs["task_class"] = BecTask + return self.register_task(*args, **kwargs) + + def register_bse_task(self, *args, **kwargs): + """Register a Bethe-Salpeter task.""" + kwargs["task_class"] = BseTask + return self.register_task(*args, **kwargs) + + def register_eph_task(self, *args, **kwargs): + """Register an electron-phonon task.""" + kwargs["task_class"] = EphTask + eph_inp = args[0] + seq_manager = TaskManager.from_user_config().new_with_fixed_mpi_omp(1, 1) + if eph_inp.get("eph_frohlichm", 0) != 0 or abs(eph_inp.get("eph_task", 0)) == 15: + # FIXME: Hack to run task in sequential if calculation does not support MPI with nprocs > 1. + kwargs.update({"manager": seq_manager}) + + return self.register_task(*args, **kwargs) + + def walknset_vars(self, task_class=None, *args, **kwargs): + """ + Set the values of the ABINIT variables in the input files of the nodes + + Args: + task_class: If not None, only the input files of the tasks belonging + to class `task_class` are modified. + + Example: + + flow.walknset_vars(ecut=10, kptopt=4) + """ + def change_task(task): + if task_class is not None and task.__class__ is not task_class: return False + return True + + if self.is_work: + for task in self: + if not change_task(task): continue + task.set_vars(*args, **kwargs) + + elif self.is_flow: + for task in self.iflat_tasks(): + if not change_task(task): continue + task.set_vars(*args, **kwargs) + + else: + raise TypeError("Don't know how to set variables for object class %s" % self.__class__.__name__) + + +class Work(BaseWork, NodeContainer): + """ + A Work is a list of (possibly connected) tasks. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: Work + """ + def __init__(self, workdir=None, manager=None): + """ + Args: + workdir: Path to the working directory. + manager: |TaskManager| object. + """ + super().__init__() + + self._tasks = [] + + if workdir is not None: + self.set_workdir(workdir) + + if manager is not None: + self.set_manager(manager) + + def set_manager(self, manager): + """Set the |TaskManager| to use to launch the |Task|.""" + self.manager = manager.deepcopy() + for task in self: + task.set_manager(manager) + + @property + def flow(self): + """The flow containing this |Work|.""" + return self._flow + + def set_flow(self, flow): + """Set the flow associated to this |Work|.""" + if not hasattr(self, "_flow"): + self._flow = flow + else: + if self._flow != flow: + raise ValueError("self._flow != flow") + + @lazy_property + def pos(self): + """The position of self in the |Flow|""" + for i, work in enumerate(self.flow): + if self == work: + return i + raise ValueError("Cannot find the position of %s in flow %s" % (self, self.flow)) + + @property + def pos_str(self): + """String representation of self.pos""" + return "w" + str(self.pos) + + def set_workdir(self, workdir, chroot=False): + """Set the working directory. Cannot be set more than once unless chroot is True""" + if not chroot and hasattr(self, "workdir") and self.workdir != workdir: + raise ValueError("self.workdir != workdir: %s, %s" % (self.workdir, workdir)) + + self.workdir = os.path.abspath(workdir) + + # Directories with (input|output|temporary) data. + # The work will use these directories to connect + # itself to other works and/or to produce new data + # that will be used by its children. + self.indir = Directory(os.path.join(self.workdir, "indata")) + self.outdir = Directory(os.path.join(self.workdir, "outdata")) + self.tmpdir = Directory(os.path.join(self.workdir, "tmpdata")) + self.wdir = Directory(self.workdir) + + def chroot(self, new_workdir): + self.set_workdir(new_workdir, chroot=True) + + for i, task in enumerate(self): + new_tdir = os.path.join(self.workdir, "t" + str(i)) + task.set_workdir(new_tdir, chroot=True) + + def __len__(self): + return len(self._tasks) + + def __iter__(self): + return self._tasks.__iter__() + + def __getitem__(self, slice): + return self._tasks[slice] + + def chunks(self, chunk_size): + """Yield successive chunks of tasks of lenght chunk_size.""" + for tasks in chunks(self, chunk_size): + yield tasks + + def ipath_from_ext(self, ext): + """ + Returns the path of the output file with extension ext. + Use it when the file does not exist yet. + """ + return self.indir.path_in("in_" + ext) + + def opath_from_ext(self, ext): + """ + Returns the path of the output file with extension ext. + Use it when the file does not exist yet. + """ + return self.outdir.path_in("out_" + ext) + + @property + def processes(self): + return [task.process for task in self] + + @property + def all_done(self): + """True if all the |Task| objects in the |Work| are done.""" + return all(task.status >= task.S_DONE for task in self) + + @property + def isnc(self): + """True if norm-conserving calculation.""" + return all(task.isnc for task in self) + + @property + def ispaw(self): + """True if PAW calculation.""" + return all(task.ispaw for task in self) + + @property + def status_counter(self): + """ + Returns a `Counter` object that counts the number of task with + given status (use the string representation of the status as key). + """ + counter = collections.Counter() + + for task in self: + counter[str(task.status)] += 1 + + return counter + + def allocate(self, manager=None): + """ + This function is called once we have completed the initialization + of the |Work|. It sets the manager of each task (if not already done) + and defines the working directories of the tasks. + + Args: + manager: |TaskManager| object or None + """ + for i, task in enumerate(self): + + if not hasattr(task, "manager"): + # Set the manager + # Use the one provided in input else the one of the work/flow. + if manager is not None: + task.set_manager(manager) + else: + # Look first in work and then in the flow. + if hasattr(self, "manager"): + task.set_manager(self.manager) + else: + task.set_manager(self.flow.manager) + + task_workdir = os.path.join(self.workdir, "t" + str(i)) + + if not hasattr(task, "workdir"): + task.set_workdir(task_workdir) + else: + if task.workdir != task_workdir: + raise ValueError("task.workdir != task_workdir: %s, %s" % (task.workdir, task_workdir)) + + def register(self, obj, deps=None, required_files=None, manager=None, task_class=None): + """ + Registers a new |Task| and add it to the internal list, taking into account possible dependencies. + + Args: + obj: |AbinitInput| instance or |Task| object. + deps: Dictionary specifying the dependency of this node or list of dependencies + None means that this obj has no dependency. + required_files: List of strings with the path of the files used by the task. + Note that the files must exist when the task is registered. + Use the standard approach based on Works, Tasks and deps + if the files will be produced in the future. + manager: + The |TaskManager| responsible for the submission of the task. If manager is None, we use + the `TaskManager` specified during the creation of the |Work|. + task_class: Task subclass to instantiate. Default: :class:`AbinitTask` + + Returns: |Task| object + """ + task_workdir = None + if hasattr(self, "workdir"): + task_workdir = os.path.join(self.workdir, "t" + str(len(self))) + + if isinstance(obj, Task): + task = obj + + else: + # Set the class + if task_class is None: + task_class = AbinitTask + + task = task_class.from_input(obj, task_workdir, manager) + + self._tasks.append(task) + + # Handle possible dependencies given either as dict or list. + if deps is not None: + if hasattr(deps, "items"): + deps = [Dependency(node, exts) for node, exts in deps.items()] + task.add_deps(deps) + + # Handle possible dependencies. + if required_files is not None: + task.add_required_files(required_files) + + return task + + # Needed by NodeContainer + register_task = register + + def path_in_workdir(self, filename): + """Create the absolute path of filename in the working directory.""" + return os.path.join(self.workdir, filename) + + def setup(self, *args, **kwargs): + """ + Method called before running the calculations. + The default implementation is empty. + """ + + def build(self, *args, **kwargs): + """Creates the top level directory.""" + # Create the directories of the work. + self.indir.makedirs() + self.outdir.makedirs() + self.tmpdir.makedirs() + + # Build dirs and files of each task. + for task in self: + task.build(*args, **kwargs) + + # Connect signals within the work. + self.connect_signals() + + @property + def status(self): + """ + Returns the status of the work i.e. the minimum of the status of the tasks. + """ + return self.get_all_status(only_min=True) + + def get_all_status(self, only_min=False): + """ + Returns a list with the status of the tasks in self. + + Args: + only_min: If True, the minimum of the status is returned. + """ + if len(self) == 0: + # The work will be created in the future. + if only_min: + return self.S_INIT + else: + return [self.S_INIT] + + self.check_status() + status_list = [task.status for task in self] + + if only_min: + return min(status_list) + else: + return status_list + + def check_status(self): + """Check the status of the tasks.""" + # Recompute the status of the tasks + # Ignore OK and LOCKED tasks. + for task in self: + if task.status in (task.S_OK, task.S_LOCKED): continue + task.check_status() + + # Take into account possible dependencies. Use a list instead of generators + for task in self: + if task.status == task.S_LOCKED: continue + if task.status < task.S_SUB and all(status == task.S_OK for status in task.deps_status): + task.set_status(task.S_READY, "Status set to Ready") + + def rmtree(self, exclude_wildcard=""): + """ + Remove all files and directories in the working directory + + Args: + exclude_wildcard: Optional string with regular expressions separated by `|`. + Files matching one of the regular expressions will be preserved. + example: exclude_wildard="*.nc|*.txt" preserves all the files + whose extension is in ["nc", "txt"]. + """ + if not exclude_wildcard: + shutil.rmtree(self.workdir) + + else: + w = WildCard(exclude_wildcard) + for dirpath, dirnames, filenames in os.walk(self.workdir): + for fname in filenames: + path = os.path.join(dirpath, fname) + if not w.match(fname): + os.remove(path) + + def rm_indatadir(self): + """Remove all the indata directories.""" + for task in self: + task.rm_indatadir() + + def rm_outdatadir(self): + """Remove all the indata directories.""" + for task in self: + task.rm_outatadir() + + def rm_tmpdatadir(self): + """Remove all the tmpdata directories.""" + for task in self: + task.rm_tmpdatadir() + + def move(self, dest, isabspath=False): + """ + Recursively move self.workdir to another location. This is similar to the Unix "mv" command. + The destination path must not already exist. If the destination already exists + but is not a directory, it may be overwritten depending on os.rename() semantics. + + Be default, dest is located in the parent directory of self.workdir, use isabspath=True + to specify an absolute path. + """ + if not isabspath: + dest = os.path.join(os.path.dirname(self.workdir), dest) + + shutil.move(self.workdir, dest) + + def submit_tasks(self, wait=False): + """ + Submits the task in self and wait. + TODO: change name. + """ + for task in self: + task.start() + + if wait: + for task in self: task.wait() + + def start(self, *args, **kwargs): + """ + Start the work. Calls build and _setup first, then submit the tasks. + Non-blocking call unless wait is set to True + """ + wait = kwargs.pop("wait", False) + + # Initial setup + self._setup(*args, **kwargs) + + # Build dirs and files. + self.build(*args, **kwargs) + + # Submit tasks (does not block) + self.submit_tasks(wait=wait) + + def read_etotals(self, unit="Ha"): + """ + Reads the total energy from the GSR file produced by the task. + + Return a numpy array with the total energies in Hartree + The array element is set to np.inf if an exception is raised while reading the GSR file. + """ + if not self.all_done: + raise self.Error("Some task is still in running/submitted state") + + etotals = [] + for task in self: + # Open the GSR file and read etotal (Hartree) + gsr_path = task.outdir.has_abiext("GSR") + etot = np.inf + if gsr_path: + with ETSF_Reader(gsr_path) as r: + etot = r.read_value("etotal") + + etotals.append(etot) + + return EnergyArray(etotals, "Ha").to(unit) + + def parse_timers(self): + """ + Parse the TIMER section reported in the ABINIT output files. + + Returns: + :class:`AbinitTimerParser` object + """ + filenames = list(filter(os.path.exists, [task.output_file.path for task in self])) + + parser = AbinitTimerParser() + parser.parse(filenames) + + return parser + + +class BandStructureWork(Work): + """ + Work for band structure calculations. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: BandStructureWork + """ + + def __init__(self, scf_input, nscf_input, dos_inputs=None, workdir=None, manager=None): + """ + Args: + scf_input: Input for the SCF run + nscf_input: Input for the NSCF run defining the band structure calculation. + dos_inputs: Input(s) for the DOS. DOS is computed only if dos_inputs is not None. + workdir: Working directory. + manager: |TaskManager| object. + """ + super().__init__(workdir=workdir, manager=manager) + + # Register the GS-SCF run. + self.scf_task = self.register_scf_task(scf_input) + + # Register the NSCF run and its dependency. + self.nscf_task = self.register_nscf_task(nscf_input, deps={self.scf_task: "DEN"}) + + # Add DOS computation(s) if requested. + self.dos_tasks = [] + if dos_inputs is not None: + if not isinstance(dos_inputs, (list, tuple)): + dos_inputs = [dos_inputs] + + for dos_input in dos_inputs: + dos_task = self.register_nscf_task(dos_input, deps={self.scf_task: "DEN"}) + self.dos_tasks.append(dos_task) + + def plot_ebands(self, **kwargs): + """ + Plot the band structure. kwargs are passed to the plot method of |ElectronBands|. + + Return: |matplotlib-Figure| + """ + with self.nscf_task.open_gsr() as gsr: + return gsr.ebands.plot(**kwargs) + + def plot_ebands_with_edos(self, dos_pos=0, method="gaussian", step=0.01, width=0.1, **kwargs): + """ + Plot the band structure and the DOS. + + Args: + dos_pos: Index of the task from which the DOS should be obtained (note: 0 refers to the first DOS task). + method: String defining the method for the computation of the DOS. + step: Energy step (eV) of the linear mesh. + width: Standard deviation (eV) of the gaussian. + kwargs: Keyword arguments passed to `plot_with_edos` method to customize the plot. + + Return: |matplotlib-Figure| + """ + with self.nscf_task.open_gsr() as gsr: + gs_ebands = gsr.ebands + + with self.dos_tasks[dos_pos].open_gsr() as gsr: + dos_ebands = gsr.ebands + + edos = dos_ebands.get_edos(method=method, step=step, width=width) + return gs_ebands.plot_with_edos(edos, **kwargs) + + def plot_edoses(self, dos_pos=None, method="gaussian", step=0.01, width=0.1, **kwargs): + """ + Plot the band structure and the DOS. + + Args: + dos_pos: Index of the task from which the DOS should be obtained. + None is all DOSes should be displayed. Accepts integer or list of integers. + method: String defining the method for the computation of the DOS. + step: Energy step (eV) of the linear mesh. + width: Standard deviation (eV) of the gaussian. + kwargs: Keyword arguments passed to `plot` method to customize the plot. + + Return: |matplotlib-Figure| + """ + if dos_pos is not None and not isinstance(dos_pos, (list, tuple)): dos_pos = [dos_pos] + + from abipy.electrons.ebands import ElectronDosPlotter + plotter = ElectronDosPlotter() + for i, task in enumerate(self.dos_tasks): + if dos_pos is not None and i not in dos_pos: continue + with task.open_gsr() as gsr: + edos = gsr.ebands.get_edos(method=method, step=step, width=width) + ngkpt = task.get_inpvar("ngkpt") + plotter.add_edos("ngkpt %s" % str(ngkpt), edos) + + return plotter.combiplot(**kwargs) + + +class RelaxWork(Work): + """ + Work for structural relaxations. The first task relaxes the atomic position + while keeping the unit cell parameters fixed. The second task uses the final + structure to perform a structural relaxation in which both the atomic positions + and the lattice parameters are optimized. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: RelaxWork + """ + def __init__(self, ion_input, ioncell_input, workdir=None, manager=None, target_dilatmx=None): + """ + Args: + ion_input: Input for the relaxation of the ions (cell is fixed) + ioncell_input: Input for the relaxation of the ions and the unit cell. + workdir: Working directory. + manager: |TaskManager| object. + """ + super().__init__(workdir=workdir, manager=manager) + + self.ion_task = self.register_relax_task(ion_input) + + # Note: + # 1) It would be nice to restart from the WFK file but ABINIT crashes due to the + # different unit cell parameters if paral_kgb == 1 + #paral_kgb = ion_input[0]["paral_kgb"] + #if paral_kgb == 1: + + #deps = {self.ion_task: "WFK"} # --> FIXME: Problem in rwwf + #deps = {self.ion_task: "DEN"} + deps = None + + self.ioncell_task = self.register_relax_task(ioncell_input, deps=deps) + + # Lock ioncell_task as ion_task should communicate to ioncell_task that + # the calculation is OK and pass the final structure. + self.ioncell_task.lock(source_node=self) + self.transfer_done = False + + self.target_dilatmx = target_dilatmx + + #@check_spectator + def on_ok(self, sender): + """ + This callback is called when one task reaches status S_OK. + If sender == self.ion_task, we update the initial structure + used by self.ioncell_task and we unlock it so that the job can be submitted. + """ + self.history.debug("In on_ok with sender %s" % sender) + + if sender == self.ion_task and not self.transfer_done: + # Get the relaxed structure from ion_task + ion_structure = self.ion_task.get_final_structure() + + # Transfer it to the ioncell task (we do it only once). + self.ioncell_task._change_structure(ion_structure) + self.transfer_done = True + + # Unlock ioncell_task so that we can submit it. + self.ioncell_task.unlock(source_node=self) + + elif sender == self.ioncell_task and self.target_dilatmx: + actual_dilatmx = self.ioncell_task.get_inpvar('dilatmx', 1.) + if self.target_dilatmx < actual_dilatmx: + self.ioncell_task.reduce_dilatmx(target=self.target_dilatmx) + self.history.info('Converging dilatmx. Value reduce from {} to {}.' + .format(actual_dilatmx, self.ioncell_task.get_inpvar('dilatmx'))) + self.ioncell_task.reset_from_scratch() + + return super().on_ok(sender) + + def plot_ion_relaxation(self, **kwargs): + """ + Plot the history of the ion-cell relaxation. + kwargs are passed to the plot method of |HistFile| + + Return: |matplotlib-Figure| or None if hist file is not found. + """ + with self.ion_task.open_hist() as hist: + return hist.plot(**kwargs) if hist else None + + def plot_ioncell_relaxation(self, **kwargs): + """ + Plot the history of the ion-cell relaxation. + kwargs are passed to the plot method of |HistFile| + + Return: |matplotlib-Figure| or None if hist file is not found. + """ + with self.ioncell_task.open_hist() as hist: + return hist.plot(**kwargs) if hist else None + + +class G0W0Work(Work): + """ + Work for general G0W0 calculations. + All input can be either single inputs or lists of inputs + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: G0W0Work + """ + def __init__(self, scf_inputs, nscf_inputs, scr_inputs, sigma_inputs, + workdir=None, manager=None): + """ + Args: + scf_inputs: Input(s) for the SCF run, if it is a list add all but only link + to the last input (used for convergence studies on the KS band gap) + nscf_inputs: Input(s) for the NSCF run, if it is a list add all but only + link to the last (i.e. addditiona DOS and BANDS) + scr_inputs: Input for the screening run + sigma_inputs: List of |AbinitInput| for the self-energy run. + if scr and sigma are lists of the same length, every sigma gets its own screening. + if there is only one screening all sigma inputs are linked to this one + workdir: Working directory of the calculation. + manager: |TaskManager| object. + """ + super().__init__(workdir=workdir, manager=manager) + + spread_scr = (isinstance(sigma_inputs, (list, tuple)) and + isinstance(scr_inputs, (list, tuple)) and + len(sigma_inputs) == len(scr_inputs)) + #print("spread_scr", spread_scr) + + self.sigma_tasks = [] + + # Register the GS-SCF run. + # register all scf_inputs but link the nscf only the last scf in the list + # multiple scf_inputs can be provided to perform convergence studies + if isinstance(scf_inputs, (list, tuple)): + for scf_input in scf_inputs: + self.scf_task = self.register_scf_task(scf_input) + else: + self.scf_task = self.register_scf_task(scf_inputs) + + # Register the NSCF run (s). + if isinstance(nscf_inputs, (list, tuple)): + for nscf_input in nscf_inputs: + self.nscf_task = nscf_task = self.register_nscf_task(nscf_input, deps={self.scf_task: "DEN"}) + else: + self.nscf_task = nscf_task = self.register_nscf_task(nscf_inputs, deps={self.scf_task: "DEN"}) + + # Register the SCR and SIGMA run(s). + if spread_scr: + for scr_input, sigma_input in zip(scr_inputs, sigma_inputs): + scr_task = self.register_scr_task(scr_input, deps={nscf_task: "WFK"}) + sigma_task = self.register_sigma_task(sigma_input, deps={nscf_task: "WFK", scr_task: "SCR"}) + self.sigma_tasks.append(sigma_task) + else: + # Sigma work(s) connected to the same screening. + scr_task = self.register_scr_task(scr_inputs, deps={nscf_task: "WFK"}) + if isinstance(sigma_inputs, (list, tuple)): + for inp in sigma_inputs: + task = self.register_sigma_task(inp, deps={nscf_task: "WFK", scr_task: "SCR"}) + self.sigma_tasks.append(task) + else: + task = self.register_sigma_task(sigma_inputs, deps={nscf_task: "WFK", scr_task: "SCR"}) + self.sigma_tasks.append(task) + + +class SigmaConvWork(Work): + """ + Work for self-energy convergence studies. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: SigmaConvWork + """ + def __init__(self, wfk_node, scr_node, sigma_inputs, workdir=None, manager=None): + """ + Args: + wfk_node: The node who has produced the WFK file or filepath pointing to the WFK file. + scr_node: The node who has produced the SCR file or filepath pointing to the SCR file. + sigma_inputs: List of |AbinitInput| for the self-energy runs. + workdir: Working directory of the calculation. + manager: |TaskManager| object. + """ + # Cast to node instances. + wfk_node, scr_node = Node.as_node(wfk_node), Node.as_node(scr_node) + + super().__init__(workdir=workdir, manager=manager) + + # Register the SIGMA runs. + if not isinstance(sigma_inputs, (list, tuple)): + sigma_inputs = [sigma_inputs] + + for sigma_input in sigma_inputs: + self.register_sigma_task(sigma_input, deps={wfk_node: "WFK", scr_node: "SCR"}) + + +class BseMdfWork(Work): + """ + Work for simple BSE calculations in which the self-energy corrections + are approximated by the scissors operator and the screening is modeled + with the model dielectric function. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: BseMdfWork + """ + def __init__(self, scf_input, nscf_input, bse_inputs, workdir=None, manager=None): + """ + Args: + scf_input: Input for the SCF run. + nscf_input: Input for the NSCF run. + bse_inputs: List of Inputs for the BSE run. + workdir: Working directory of the calculation. + manager: |TaskManager| + """ + super().__init__(workdir=workdir, manager=manager) + + # Register the GS-SCF run. + self.scf_task = self.register_scf_task(scf_input) + + # Construct the input for the NSCF run. + self.nscf_task = self.register_nscf_task(nscf_input, deps={self.scf_task: "DEN"}) + + # Construct the input(s) for the BSE run. + if not isinstance(bse_inputs, (list, tuple)): + bse_inputs = [bse_inputs] + + for bse_input in bse_inputs: + self.register_bse_task(bse_input, deps={self.nscf_task: "WFK"}) + + def get_mdf_robot(self): + """Builds and returns a :class:`MdfRobot` for analyzing the results in the MDF files.""" + from abilab.robots import MdfRobot + robot = MdfRobot() + for task in self[2:]: + mdf_path = task.outdir.has_abiext(robot.EXT) + if mdf_path: + robot.add_file(str(task), mdf_path) + return robot + + +class QptdmWork(Work): + """ + This work parallelizes the calculation of the q-points of the screening. + It also provides the callback `on_all_ok` that calls mrgscr to merge + all the partial screening files produced. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: QptdmWork + """ + def create_tasks(self, wfk_file, scr_input): + """ + Create the SCR tasks and register them in self. + + Args: + wfk_file: Path to the ABINIT WFK file to use for the computation of the screening. + scr_input: Input for the screening calculation. + """ + assert len(self) == 0 + wfk_file = self.wfk_file = os.path.abspath(wfk_file) + + # Build a temporary work in the tmpdir that will use a shell manager + # to run ABINIT in order to get the list of q-points for the screening. + shell_manager = self.manager.to_shell_manager(mpi_procs=1) + + w = Work(workdir=self.tmpdir.path_join("_qptdm_run"), manager=shell_manager) + + fake_input = scr_input.deepcopy() + fake_task = w.register(fake_input) + w.allocate() + w.build() + + # Create the symbolic link and add the magic value + # nqpdm = -1 to the input to get the list of q-points. + fake_task.inlink_file(wfk_file) + fake_task.set_vars({"nqptdm": -1}) + fake_task.start_and_wait() + + # Parse the section with the q-points + with NetcdfReader(fake_task.outdir.has_abiext("qptdms.nc")) as reader: + qpoints = reader.read_value("reduced_coordinates_of_kpoints") + + # Now we can register the task for the different q-points + for qpoint in qpoints: + qptdm_input = scr_input.deepcopy() + qptdm_input.set_vars(nqptdm=1, qptdm=qpoint) + new_task = self.register_scr_task(qptdm_input, manager=self.manager) + # Add the garbage collector. + if self.flow.gc is not None: + new_task.set_gc(self.flow.gc) + + self.allocate() + + def merge_scrfiles(self, remove_scrfiles=True): + """ + This method is called when all the q-points have been computed. + It runs `mrgscr` in sequential on the local machine to produce + the final SCR file in the outdir of the `Work`. + If remove_scrfiles is True, the partial SCR files are removed after the merge. + """ + scr_files = list(filter(None, [task.outdir.has_abiext("SCR") for task in self])) + + self.history.info("Will call mrgscr to merge %s SCR files:\n" % len(scr_files)) + assert len(scr_files) == len(self) + + mrgscr = wrappers.Mrgscr(manager=self[0].manager, verbose=1) + final_scr = mrgscr.merge_qpoints(self.outdir.path, scr_files, out_prefix="out") + + if remove_scrfiles: + for scr_file in scr_files: + try: + os.remove(scr_file) + except IOError: + pass + + return final_scr + + #@check_spectator + def on_all_ok(self): + """ + This method is called when all the q-points have been computed. + It runs `mrgscr` in sequential on the local machine to produce + the final SCR file in the outdir of the `Work`. + """ + final_scr = self.merge_scrfiles() + return self.Results(node=self, returncode=0, message="mrgscr done", final_scr=final_scr) + +# TODO: MergeDdb --> DfptWork(Work) postpone it because it may break pickle. + + +class MergeDdb(object): + """ + Mixin class for Works that have to merge the DDB files produced by the tasks. + """ + + def add_becs_from_scf_task(self, scf_task, ddk_tolerance, ph_tolerance): + """ + Build tasks for the computation of Born effective charges and add them to the work. + + Args: + scf_task: |ScfTask| object. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run. None to use AbiPy default. + ph_tolerance: dict {"varname": value} with the tolerance used in the phonon run. None to use AbiPy default. + + Return: (ddk_tasks, bec_tasks) + """ + if not isinstance(scf_task, ScfTask): + raise TypeError("task `%s` does not inherit from ScfTask" % scf_task) + + # DDK calculations (self-consistent to get electric field). + multi_ddk = scf_task.input.make_ddk_inputs(tolerance=ddk_tolerance) + + ddk_tasks = [] + for ddk_inp in multi_ddk: + ddk_task = self.register_ddk_task(ddk_inp, deps={scf_task: "WFK"}) + ddk_tasks.append(ddk_task) + + # Build the list of inputs for electric field perturbation and phonons + # Each BEC task is connected to all the previous DDK task and to the scf_task. + bec_deps = {ddk_task: "DDK" for ddk_task in ddk_tasks} + bec_deps.update({scf_task: "WFK"}) + + bec_inputs = scf_task.input.make_bec_inputs(tolerance=ph_tolerance) + bec_tasks = [] + for bec_inp in bec_inputs: + bec_task = self.register_bec_task(bec_inp, deps=bec_deps) + bec_tasks.append(bec_task) + + return ddk_tasks, bec_tasks + + def merge_ddb_files(self, delete_source_ddbs=False, only_dfpt_tasks=True, + exclude_tasks=None, include_tasks=None): + """ + This method is called when all the q-points have been computed. + It runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the `Work`. + + Args: + delete_source_ddbs: True if input DDB should be removed once final DDB is created. + only_dfpt_tasks: False to merge all DDB files produced by the tasks of the work + Useful e.g. for finite stress corrections in which the stress in the + initial configuration should be merged in the final DDB. + exclude_tasks: List of tasks that should be excluded when merging the partial DDB files. + include_tasks: List of tasks that should be included when merging the partial DDB files. + Mutually exclusive with exclude_tasks. + + Returns: + path to the output DDB file + """ + if exclude_tasks: + my_tasks = [task for task in self if task not in exclude_tasks] + elif include_tasks: + my_tasks = [task for task in self if task in include_tasks] + else: + my_tasks = [task for task in self] + + if only_dfpt_tasks: + ddb_files = list(filter(None, [task.outdir.has_abiext("DDB") for task in my_tasks + if isinstance(task, DfptTask)])) + else: + ddb_files = list(filter(None, [task.outdir.has_abiext("DDB") for task in my_tasks])) + + self.history.info("Will call mrgddb to merge %s DDB files:" % len(ddb_files)) + # DDB files are always produces so this should never happen! + if not ddb_files: + raise RuntimeError("Cannot find any DDB file to merge by the task of " % self) + + # Final DDB file will be produced in the outdir of the work. + out_ddb = self.outdir.path_in("out_DDB") + + if len(ddb_files) == 1: + # Avoid the merge. Just copy the DDB file to the outdir of the work. + shutil.copy(ddb_files[0], out_ddb) + else: + # Call mrgddb + desc = "DDB file merged by %s on %s" % (self.__class__.__name__, time.asctime()) + mrgddb = wrappers.Mrgddb(manager=self[0].manager, verbose=0) + mrgddb.merge(self.outdir.path, ddb_files, out_ddb=out_ddb, description=desc, + delete_source_ddbs=delete_source_ddbs) + + return out_ddb + + def merge_pot1_files(self, delete_source=True): + """ + This method is called when all the q-points have been computed. + It runs `mrgdvdb` in sequential on the local machine to produce + the final DVDB file in the outdir of the `Work`. + + Args: + delete_source: True if POT1 files should be removed after (successful) merge. + + Returns: path to the output DVDB file. None if not DFPT POT file is found. + """ + natom = len(self[0].input.structure) + max_pertcase = 3 * natom + + pot1_files = [] + for task in self: + if not isinstance(task, DfptTask): continue + paths = task.outdir.list_filepaths(wildcard="*_POT*") + for path in paths: + # Include only atomic perturbations i.e. files whose ext <= 3 * natom + i = path.rindex("_POT") + pertcase = int(path[i+4:].replace(".nc", "")) + if pertcase <= max_pertcase: + pot1_files.append(path) + + # prtpot = 0 disables the output of the DFPT POT files so an empty list is not fatal here. + if not pot1_files: return None + + self.history.info("Will call mrgdvdb to merge %s files:" % len(pot1_files)) + + # Final DDB file will be produced in the outdir of the work. + out_dvdb = self.outdir.path_in("out_DVDB") + + if len(pot1_files) == 1: + # Avoid the merge. Just move the DDB file to the outdir of the work + shutil.copy(pot1_files[0], out_dvdb) + else: + # FIXME: The merge may require a non-negligible amount of memory if lots of qpts. + # Besides there are machines such as lemaitre3 that are problematic when + # running MPI applications on the front-end + mrgdvdb = wrappers.Mrgdvdb(manager=self[0].manager, verbose=0) + mrgdvdb.merge(self.outdir.path, pot1_files, out_dvdb, delete_source=delete_source) + + return out_dvdb + + +class PhononWork(Work, MergeDdb): + """ + This work consists of nirred Phonon tasks where nirred is + the number of irreducible atomic perturbations for a given set of q-points. + It provides the callback method (on_all_ok) that calls mrgddb (mrgdv) to merge + all the partial DDB (POT) files produced. The two files are available in the + output directory of the Work. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: PhononWork + """ + + @classmethod + def from_scf_task(cls, scf_task, qpoints, is_ngqpt=False, tolerance=None, with_becs=False, + ddk_tolerance=None, manager=None): + """ + Construct a `PhononWork` from a |ScfTask| object. + The input file for phonons is automatically generated from the input of the ScfTask. + Each phonon task depends on the WFK file produced by the `scf_task`. + + Args: + scf_task: |ScfTask| object. + qpoints: q-points in reduced coordinates. Accepts single q-point, list of q-points + or three integers defining the q-mesh if `is_ngqpt`. + is_ngqpt: True if `qpoints` should be interpreted as divisions instead of q-points. + tolerance: dict {"varname": value} with the tolerance to be used in the phonon run. + None to use AbiPy default. + with_becs: Activate calculation of Electric field and Born effective charges. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run if with_becs. + None to use AbiPy default. + manager: |TaskManager| object. + """ + if not isinstance(scf_task, ScfTask): + raise TypeError("task `%s` does not inherit from ScfTask" % scf_task) + + if is_ngqpt: + qpoints = scf_task.input.abiget_ibz(ngkpt=qpoints, shiftk=[0, 0, 0], kptopt=1).points + qpoints = np.reshape(qpoints, (-1, 3)) + + new = cls(manager=manager) + if with_becs: + new.add_becs_from_scf_task(scf_task, ddk_tolerance, ph_tolerance=tolerance) + + for qpt in qpoints: + if with_becs and np.sum(qpt ** 2) < 1e-12: continue + multi = scf_task.input.make_ph_inputs_qpoint(qpt, tolerance=tolerance) + for ph_inp in multi: + new.register_phonon_task(ph_inp, deps={scf_task: "WFK"}) + + return new + + @classmethod + def from_scf_input(cls, scf_input, qpoints, is_ngqpt=False, tolerance=None, + with_becs=False, ddk_tolerance=None, manager=None): + """ + Similar to `from_scf_task`, the difference is that this method requires + an input for SCF calculation. A new |ScfTask| is created and added to the Work. + This API should be used if the DDB of the GS task should be merged. + """ + if is_ngqpt: + qpoints = scf_input.abiget_ibz(ngkpt=qpoints, shiftk=[0, 0, 0], kptopt=1).points + + qpoints = np.reshape(qpoints, (-1, 3)) + + new = cls(manager=manager) + # Create ScfTask + scf_task = new.register_scf_task(scf_input) + + if with_becs: + new.add_becs_from_scf_task(scf_task, ddk_tolerance, ph_tolerance=tolerance) + + for qpt in qpoints: + if with_becs and np.sum(qpt ** 2) < 1e-12: continue + multi = scf_task.input.make_ph_inputs_qpoint(qpt, tolerance=tolerance) + for ph_inp in multi: + new.register_phonon_task(ph_inp, deps={scf_task: "WFK"}) + + return new + + #@check_spectator + def on_all_ok(self): + """ + This method is called when all the q-points have been computed. + Ir runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the |Work|. + """ + # Merge DDB files. + out_ddb = self.merge_ddb_files() + # Merge DVDB files. + out_dvdb = self.merge_pot1_files() + + return self.Results(node=self, returncode=0, message="DDB merge done") + + +class PhononWfkqWork(Work, MergeDdb): + """ + This work computes phonons with DFPT on an arbitrary q-mesh (usually denser than the k-mesh for electrons) + by computing WKQ files for each q-point. + The number of irreducible atomic perturbations for each q-point are taken into account. + It provides the callback method (on_all_ok) that calls mrgddb (mrgdv) to merge + all the partial DDB (POT) files produced. The two files are available in the + output directory of the Work. The WKQ files are removed at runtime. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: PhononWfkqWork + """ + + @classmethod + def from_scf_task(cls, scf_task, ngqpt, ph_tolerance=None, tolwfr=1.0e-22, nband=None, + with_becs=False, ddk_tolerance=None, shiftq=(0, 0, 0), is_ngqpt=True, remove_wfkq=True, + prepgkk=0, manager=None): + """ + Construct a `PhononWfkqWork` from a |ScfTask| object. + The input files for WFQ and phonons are automatically generated from the input of the ScfTask. + Each phonon task depends on the WFK file produced by scf_task and the associated WFQ file. + + Args: + scf_task: |ScfTask| object. + ngqpt: three integers defining the q-mesh + with_becs: Activate calculation of Electric field and Born effective charges. + ph_tolerance: dict {"varname": value} with the tolerance for the phonon run. + None to use AbiPy default. + tolwfr: tolerance used to compute WFQ. + ddk_tolerance: dict {"varname": value} with the tolerance used in the DDK run if with_becs. + None to use AbiPy default. + shiftq: Q-mesh shift. Multiple shifts are not supported. + is_ngqpt: the ngqpt is interpreted as a set of integers defining the q-mesh, otherwise + is an explicit list of q-points + remove_wfkq: Remove WKQ files when the children are completed. + prepgkk: 1 to activate computation of all 3*natom perts (debugging option). + manager: |TaskManager| object. + + .. note: + + Use k-meshes with one shift and q-meshes that are multiple of ngkpt + to decrease the number of WFQ files to be computed. + """ + if not isinstance(scf_task, ScfTask): + raise TypeError("task `%s` does not inherit from ScfTask" % scf_task) + + shiftq = np.reshape(shiftq, (3,)) + if is_ngqpt: + qpoints = scf_task.input.abiget_ibz(ngkpt=ngqpt, shiftk=shiftq, kptopt=1).points + else: + qpoints = np.reshape(ngqpt, (-1, 3)) + + new = cls(manager=manager) + new.remove_wfkq = remove_wfkq + new.phonon_tasks = [] + new.wfkq_tasks = [] + new.wfkq_task_children = collections.defaultdict(list) + + if with_becs: + # Add DDK and BECS. + new.add_becs_from_scf_task(scf_task, ddk_tolerance, ph_tolerance) + + # Get ngkpt, shift for electrons from input. + # Won't try to skip WFQ if multiple shifts or off-diagonal kptrlatt + ngkpt, shiftk = scf_task.input.get_ngkpt_shiftk() + try_to_skip_wfkq = True + if ngkpt is None or len(shiftk) > 1 and is_ngqpt: + try_to_skip_wfkq = True + + # TODO: One could avoid kptopt 3 by computing WFK in the IBZ and then rotating. + # but this has to be done inside Abinit. + for qpt in qpoints: + is_gamma = np.sum(qpt ** 2) < 1e-12 + if with_becs and is_gamma: continue + + # Avoid WFQ if k + q = k (requires ngkpt, multiple shifts are not supported) + need_wfkq = True + if is_gamma: + need_wfkq = False + elif try_to_skip_wfkq: + # k = (i + shiftk) / ngkpt + qinds = np.rint(qpt * ngqpt - shiftq) + f = (qinds * ngkpt) % ngqpt + need_wfkq = np.any(f != 0) + + #neee_wfkq = True + + if need_wfkq: + nscf_inp = scf_task.input.new_with_vars(qpt=qpt, nqpt=1, iscf=-2, kptopt=3, tolwfr=tolwfr) + if nband: + nbdbuf = max(2, nband*0.1) + nscf_inp.set_vars(nband=nband+nbdbuf, nbdbuf=nbdbuf) + wfkq_task = new.register_nscf_task(nscf_inp, deps={scf_task: ["DEN", "WFK"]}) + new.wfkq_tasks.append(wfkq_task) + + multi = scf_task.input.make_ph_inputs_qpoint(qpt, tolerance=ph_tolerance, prepgkk=prepgkk) + for ph_inp in multi: + deps = {scf_task: "WFK", wfkq_task: "WFQ"} if need_wfkq else {scf_task: "WFK"} + #ph_inp["prtwf"] = -1 + t = new.register_phonon_task(ph_inp, deps=deps) + new.phonon_tasks.append(t) + if need_wfkq: + new.wfkq_task_children[wfkq_task].append(t) + + return new + + def on_ok(self, sender): + """ + This callback is called when one task reaches status `S_OK`. + It removes the WFKQ file if all its children have reached `S_OK`. + """ + if self.remove_wfkq: + for task in self.wfkq_tasks: + if task.status != task.S_OK: continue + children = self.wfkq_task_children[task] + if all(child.status == child.S_OK for child in children): + path = task.outdir.has_abiext("WFQ") + if path: + self.history.info("Removing WFQ: %s" % path) + os.remove(path) + + return super().on_ok(sender) + + #@check_spectator + def on_all_ok(self): + """ + This method is called when all the q-points have been computed. + Ir runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the |Work|. + """ + # Merge DDB files. + out_ddb = self.merge_ddb_files() + + # Merge DVDB files. + out_dvdb = self.merge_pot1_files() + + return self.Results(node=self, returncode=0, message="DDB merge done") + + +class GKKPWork(Work): + """ + This work computes electron-phonon matrix elements for all the q-points + present in a DVDB and DDB file + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: GKKPWork + """ + @classmethod + def from_den_ddb_dvdb(cls, inp, den_path, ddb_path, dvdb_path, mpiprocs=1, remove_wfkq=True, + qpath=None, with_ddk=True, expand=True, manager=None): + """ + Construct a `PhononWfkqWork` from a DDB and DVDB file. + For each q found, a WFQ task and an EPH task computing the matrix elements are created. + """ + import abipy.abilab as abilab + + # Create file nodes + den_file = FileNode(den_path) + ddb_file = FileNode(ddb_path) + dvdb_file = FileNode(dvdb_path) + + # Create new work + new = cls(manager=manager) + new.remove_wfkq = remove_wfkq + new.wfkq_tasks = [] + new.wfkq_task_children = collections.defaultdict(list) + if manager is None: manager = TaskManager.from_user_config() + tm = manager.new_with_fixed_mpi_omp(mpiprocs, 1) + + # Create a WFK task + kptopt = 1 if expand else 3 + nscf_inp = inp.new_with_vars(iscf=-2, kptopt=kptopt) + wfk_task = new.register_nscf_task(nscf_inp, deps={den_file: "DEN"},manager=tm) + new.wfkq_tasks.append(wfk_task) + new.wfk_task = wfk_task + + # Read path and regular grid from DDB file + with abilab.abiopen(ddb_path) as ddb: + q_frac_coords = np.array([k.frac_coords for k in ddb.qpoints]) + ddb_ngqpt = ddb.guessed_ngqpt + + # If qpath is set, we read the list of q-points to be used to interpolate the DVDB file. + # The DVDB and DDB file have to correspond to a regular grid. + dvdb = dvdb_file + if qpath is None: + qpath = q_frac_coords + else: + interp_inp = inp.new_with_vars(optdriver=7, eph_task=-5, ddb_ngqpt=ddb_ngqpt, + ph_nqpath=len(qpath), ph_qpath=qpath, prtphdos=0) + dvdb = new.register_eph_task(interp_inp, deps={wfk_task: "WFK", ddb_file: "DDB", dvdb_file: "DVDB"}, + manager=tm) + + # Create a WFK expansion task + if expand: + fbz_nscf_inp = inp.new_with_vars(optdriver=8) + fbz_nscf_inp.set_spell_check(False) + fbz_nscf_inp.set_vars(wfk_task="wfk_fullbz") + tm_serial = manager.new_with_fixed_mpi_omp(1,1) + wfk_task = new.register_nscf_task(fbz_nscf_inp, deps={wfk_task: "WFK", den_file: "DEN"}, + manager=tm_serial) + new.wfkq_tasks.append(wfk_task) + new.wfk_task = wfk_task + + if with_ddk: + kptopt = 3 if expand else 1 + ddk_inp = inp.new_with_vars(optdriver=8,kptopt=kptopt) + ddk_inp.set_spell_check(False) + ddk_inp.set_vars(wfk_task="wfk_ddk") + ddk_task = new.register_nscf_task(ddk_inp, deps={wfk_task: "WFK", den_file: "DEN"}, manager=tm) + new.wfkq_tasks.append(ddk_task) + + # For each qpoint + for qpt in qpath: + is_gamma = np.sum(qpt ** 2) < 1e-12 + if is_gamma: + # Create a link from WFK to WFQ on_ok + wfkq_task = wfk_task + deps = {wfk_task: ["WFK", "WFQ"], ddb_file: "DDB", dvdb: "DVDB"} + else: + # Create a WFQ task + nscf_inp = nscf_inp.new_with_vars(kptopt=3, qpt=qpt, nqpt=1) + wfkq_task = new.register_nscf_task(nscf_inp, deps={den_file: "DEN"}, manager=tm) + new.wfkq_tasks.append(wfkq_task) + deps = {wfk_task: "WFK", wfkq_task: "WFQ", ddb_file: "DDB", dvdb: "DVDB"} + + # Create a EPH task + eph_inp = inp.new_with_vars(optdriver=7, prtphdos=0, eph_task=-2, kptopt=3, + ddb_ngqpt=[1, 1, 1], nqpt=1, qpt=qpt) + t = new.register_eph_task(eph_inp, deps=deps, manager=tm) + new.wfkq_task_children[wfkq_task].append(t) + + return new + + @classmethod + def from_phononwfkq_work(cls, phononwfkq_work, nscf_vars={}, remove_wfkq=True, with_ddk=True, manager=None): + """ + Construct a `GKKPWork` from a `PhononWfkqWork` object. + The WFQ are the ones used for PhononWfkqWork so in principle have only valence bands + """ + # Get list of qpoints from the the phonon tasks in this work + qpoints = [] + qpoints_deps = [] + for task in phononwfkq_work: + if isinstance(task,PhononTask): + # Store qpoints + qpt = task.input.get("qpt", [0, 0, 0]) + qpoints.append(qpt) + # Store dependencies + qpoints_deps.append(task.deps) + + # Create file nodes + ddb_path = phononwfkq_work.outdir.has_abiext("DDB") + dvdb_path = phononwfkq_work.outdir.has_abiext("DVDB") + ddb_file = FileNode(ddb_path) + dvdb_file = FileNode(dvdb_path) + + # Get scf_task from first q-point + for dep in qpoints_deps[0]: + if isinstance(dep.node,ScfTask) and dep.exts[0] == 'WFK': + scf_task = dep.node + + # Create new work + new = cls(manager=manager) + new.remove_wfkq = remove_wfkq + new.wfkq_tasks = [] + new.wfk_task = [] + + # Add one eph task per qpoint + for qpt,qpoint_deps in zip(qpoints,qpoints_deps): + # Create eph task + eph_input = scf_task.input.new_with_vars(optdriver=7, prtphdos=0, eph_task=-2, + ddb_ngqpt=[1, 1, 1], nqpt=1, qpt=qpt) + deps = {ddb_file: "DDB", dvdb_file: "DVDB"} + for dep in qpoint_deps: + deps[dep.node] = dep.exts[0] + # If no WFQ in deps link the WFK with WFQ extension + if 'WFQ' not in deps.values(): + inv_deps = dict((v, k) for k, v in deps.items()) + wfk_task = inv_deps['WFK'] + wfk_path = wfk_task.outdir.has_abiext("WFK") + # Check if netcdf + filename, extension = os.path.splitext(wfk_path) + infile = 'out_WFQ' + extension + wfq_path = os.path.join(os.path.dirname(wfk_path), infile) + if not os.path.isfile(wfq_path): os.symlink(wfk_path, wfq_path) + deps[FileNode(wfq_path)] = 'WFQ' + new.register_eph_task(eph_input, deps=deps) + + return new + + def on_ok(self, sender): + """ + This callback is called when one task reaches status `S_OK`. + It removes the WFKQ file if all its children have reached `S_OK`. + """ + if self.remove_wfkq: + for task in self.wfkq_tasks: + if task.status != task.S_OK: continue + children = self.wfkq_task_children[task] + if all(child.status == child.S_OK for child in children): + path = task.outdir.has_abiext("WFQ") + if path: + self.history.info("Removing WFQ: %s" % path) + os.remove(path) + + # If wfk task we create a link to a wfq file so abinit is happy + if sender == self.wfk_task: + wfk_path = self.wfk_task.outdir.has_abiext("WFK") + # Check if netcdf + filename, extension = os.path.splitext(wfk_path) + infile = 'out_WFQ' + extension + infile = os.path.join(os.path.dirname(wfk_path), infile) + os.symlink(wfk_path, infile) + + return super().on_ok(sender) + + +class BecWork(Work, MergeDdb): + """ + Work for the computation of the Born effective charges. + + This work consists of DDK tasks and phonon + electric field perturbation + It provides the callback method (on_all_ok) that calls mrgddb to merge the + partial DDB files produced by the work. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: BecWork + """ + + @classmethod + def from_scf_task(cls, scf_task, ddk_tolerance=None, ph_tolerance=None, manager=None): + """ + Build tasks for the computation of Born effective charges from a ground-state task. + + Args: + scf_task: |ScfTask| object. + ddk_tolerance: tolerance used in the DDK run if with_becs. None to use AbiPy default. + ph_tolerance: dict {"varname": value} with the tolerance used in the phonon run. + None to use AbiPy default. + manager: |TaskManager| object. + """ + new = cls(manager=manager) + new.add_becs_from_scf_task(scf_task, ddk_tolerance, ph_tolerance) + return new + + def on_all_ok(self): + """ + This method is called when all tasks reach S_OK + Ir runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the |Work|. + """ + # Merge DDB files. + out_ddb = self.merge_ddb_files() + return self.Results(node=self, returncode=0, message="DDB merge done") + + +class DteWork(Work, MergeDdb): + """ + Work for the computation of the third derivative of the energy. + + This work consists of DDK tasks and electric field perturbation. + It provides the callback method (on_all_ok) that calls mrgddb to merge the partial DDB files produced + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: DteWork + """ + @classmethod + def from_scf_task(cls, scf_task, ddk_tolerance=None, manager=None): + """ + Build a DteWork from a ground-state task. + + Args: + scf_task: |ScfTask| object. + ddk_tolerance: tolerance used in the DDK run if with_becs. None to use AbiPy default. + manager: |TaskManager| object. + """ + if not isinstance(scf_task, ScfTask): + raise TypeError("task `%s` does not inherit from ScfTask" % scf_task) + + new = cls(manager=manager) + + # DDK calculations + multi_ddk = scf_task.input.make_ddk_inputs(tolerance=ddk_tolerance) + + ddk_tasks = [] + for ddk_inp in multi_ddk: + ddk_task = new.register_ddk_task(ddk_inp, deps={scf_task: "WFK"}) + ddk_tasks.append(ddk_task) + + # Build the list of inputs for electric field perturbation + # Each task is connected to all the previous DDK, DDE task and to the scf_task. + multi_dde = scf_task.input.make_dde_inputs(use_symmetries=False) + + # To compute the nonlinear coefficients all the directions of the perturbation + # have to be taken in consideration + # DDE calculations + dde_tasks = [] + dde_deps = {ddk_task: "DDK" for ddk_task in ddk_tasks} + dde_deps.update({scf_task: "WFK"}) + for dde_inp in multi_dde: + dde_task = new.register_dde_task(dde_inp, deps=dde_deps) + dde_tasks.append(dde_task) + + # DTE calculations + dte_deps = {scf_task: "WFK DEN"} + dte_deps.update({dde_task: "1WF 1DEN" for dde_task in dde_tasks}) + + multi_dte = scf_task.input.make_dte_inputs() + dte_tasks = [] + for dte_inp in multi_dte: + dte_task = new.register_dte_task(dte_inp, deps=dte_deps) + dte_tasks.append(dte_task) + + return new + + def on_all_ok(self): + """ + This method is called when all tasks reach S_OK + It runs `mrgddb` in sequential on the local machine to produce + the final DDB file in the outdir of the `Work`. + """ + # Merge DDB files. + out_ddb = self.merge_ddb_files() + return self.Results(node=self, returncode=0, message="DDB merge done") diff --git a/abipy/flowtk/wrappers.py b/abipy/flowtk/wrappers.py index e84736560..a1dc411c2 100644 --- a/abipy/flowtk/wrappers.py +++ b/abipy/flowtk/wrappers.py @@ -1,3 +1,329 @@ -from __future__ import print_function, division, unicode_literals, absolute_import +# coding: utf-8 +"""Wrappers for ABINIT main executables""" +import os +import numpy as np -from pymatgen.io.abinit.wrappers import * +from monty.string import list_strings +from io import StringIO + +import logging +logger = logging.getLogger(__name__) + +__author__ = "Matteo Giantomassi" +__copyright__ = "Copyright 2013, The Materials Project" +__version__ = "0.1" +__maintainer__ = "Matteo Giantomassi" +__email__ = "gmatteo at gmail.com" +__status__ = "Development" +__date__ = "$Feb 21, 2013M$" + +__all__ = [ + "Mrgscr", + "Mrgddb", + "Mrgdvdb", +] + + +class ExecError(Exception): + """Error class raised by :class:`ExecWrapper`""" + + +class ExecWrapper(object): + """Base class that runs an executable in a subprocess.""" + Error = ExecError + + def __init__(self, manager=None, executable=None, verbose=0): + """ + Args: + manager: :class:`TaskManager` object responsible for the submission of the jobs. + if manager is None, the default manager is used. + executable: path to the executable. + verbose: Verbosity level. + """ + from .tasks import TaskManager + self.manager = manager if manager is not None else TaskManager.from_user_config() + self.manager = self.manager.to_shell_manager(mpi_procs=1) + + self.executable = executable if executable is not None else self.name + assert os.path.basename(self.executable) == self.name + self.verbose = int(verbose) + + def __str__(self): + return "%s" % self.executable + + @property + def name(self): + return self._name + + def execute(self, workdir, exec_args=None): + # Try to execute binary without and with mpirun. + try: + return self._execute(workdir, with_mpirun=True, exec_args=exec_args) + except self.Error: + return self._execute(workdir, with_mpirun=False, exec_args=exec_args) + + def _execute(self, workdir, with_mpirun=False, exec_args=None): + """ + Execute the executable in a subprocess inside workdir. + + Some executables fail if we try to launch them with mpirun. + Use with_mpirun=False to run the binary without it. + """ + qadapter = self.manager.qadapter + if not with_mpirun: qadapter.name = None + if self.verbose: + print("Working in:", workdir) + + script = qadapter.get_script_str( + job_name=self.name, + launch_dir=workdir, + executable=self.executable, + qout_path="qout_file.path", + qerr_path="qerr_file.path", + stdin=self.stdin_fname, + stdout=self.stdout_fname, + stderr=self.stderr_fname, + exec_args=exec_args + ) + + # Write the script. + script_file = os.path.join(workdir, "run" + self.name + ".sh") + with open(script_file, "w") as fh: + fh.write(script) + os.chmod(script_file, 0o740) + + qjob, process = qadapter.submit_to_queue(script_file) + self.stdout_data, self.stderr_data = process.communicate() + self.returncode = process.returncode + #raise self.Error("%s returned %s\n cmd_str: %s" % (self, self.returncode, self.cmd_str)) + + return self.returncode + + +class Mrgscr(ExecWrapper): + _name = "mrgscr" + + def merge_qpoints(self, workdir, files_to_merge, out_prefix): + """ + Execute mrgscr inside directory `workdir` to merge `files_to_merge`. + Produce new file with prefix `out_prefix` + """ + # We work with absolute paths. + files_to_merge = [os.path.abspath(s) for s in list_strings(files_to_merge)] + nfiles = len(files_to_merge) + + if self.verbose: + print("Will merge %d files with output_prefix %s" % (nfiles, out_prefix)) + for (i, f) in enumerate(files_to_merge): + print(" [%d] %s" % (i, f)) + + if nfiles == 1: + raise self.Error("merge_qpoints does not support nfiles == 1") + + self.stdin_fname, self.stdout_fname, self.stderr_fname = \ + map(os.path.join, 3 * [workdir], ["mrgscr.stdin", "mrgscr.stdout", "mrgscr.stderr"]) + + inp = StringIO() + inp.write(str(nfiles) + "\n") # Number of files to merge. + inp.write(out_prefix + "\n") # Prefix for the final output file: + + for filename in files_to_merge: + inp.write(filename + "\n") # List with the files to merge. + + inp.write("1\n") # Option for merging q-points. + + self.stdin_data = [s for s in inp.getvalue()] + + with open(self.stdin_fname, "w") as fh: + fh.writelines(self.stdin_data) + # Force OS to write data to disk. + fh.flush() + os.fsync(fh.fileno()) + + self.execute(workdir) + + +class Mrgddb(ExecWrapper): + _name = "mrgddb" + + def merge(self, workdir, ddb_files, out_ddb, description, delete_source_ddbs=True): + """Merge DDB file, return the absolute path of the new database in workdir.""" + # We work with absolute paths. + ddb_files = [os.path.abspath(s) for s in list_strings(ddb_files)] + if not os.path.isabs(out_ddb): + out_ddb = os.path.join(os.path.abspath(workdir), os.path.basename(out_ddb)) + + if self.verbose: + print("Will merge %d files into output DDB %s" % (len(ddb_files), out_ddb)) + for i, f in enumerate(ddb_files): + print(" [%d] %s" % (i, f)) + + # Handle the case of a single file since mrgddb uses 1 to denote GS files! + if len(ddb_files) == 1: + with open(ddb_files[0], "r") as inh, open(out_ddb, "w") as out: + for line in inh: + out.write(line) + return out_ddb + + self.stdin_fname, self.stdout_fname, self.stderr_fname = \ + map(os.path.join, 3 * [os.path.abspath(workdir)], ["mrgddb.stdin", "mrgddb.stdout", "mrgddb.stderr"]) + + inp = StringIO() + inp.write(out_ddb + "\n") # Name of the output file. + inp.write(str(description) + "\n") # Description. + inp.write(str(len(ddb_files)) + "\n") # Number of input DDBs. + + # Names of the DDB files. + for fname in ddb_files: + inp.write(fname + "\n") + + self.stdin_data = [s for s in inp.getvalue()] + + with open(self.stdin_fname, "wt") as fh: + fh.writelines(self.stdin_data) + # Force OS to write data to disk. + fh.flush() + os.fsync(fh.fileno()) + + retcode = self.execute(workdir, exec_args=['--nostrict']) + if retcode == 0 and delete_source_ddbs: + # Remove ddb files. + for f in ddb_files: + try: + os.remove(f) + except IOError: + pass + + return out_ddb + + +class Mrgdvdb(ExecWrapper): + _name = "mrgdv" + + def merge(self, workdir, pot_files, out_dvdb, delete_source=True): + """ + Merge POT files containing 1st order DFPT potential + return the absolute path of the new database in workdir. + + Args: + delete_source: True if POT1 files should be removed after (successful) merge. + """ + # We work with absolute paths. + pot_files = [os.path.abspath(s) for s in list_strings(pot_files)] + if not os.path.isabs(out_dvdb): + out_dvdb = os.path.join(os.path.abspath(workdir), os.path.basename(out_dvdb)) + + if self.verbose: + print("Will merge %d files into output DVDB %s" % (len(pot_files), out_dvdb)) + for i, f in enumerate(pot_files): + print(" [%d] %s" % (i, f)) + + # Handle the case of a single file since mrgddb uses 1 to denote GS files! + if len(pot_files) == 1: + with open(pot_files[0], "r") as inh, open(out_dvdb, "w") as out: + for line in inh: + out.write(line) + return out_dvdb + + self.stdin_fname, self.stdout_fname, self.stderr_fname = \ + map(os.path.join, 3 * [os.path.abspath(workdir)], ["mrgdvdb.stdin", "mrgdvdb.stdout", "mrgdvdb.stderr"]) + + inp = StringIO() + inp.write(out_dvdb + "\n") # Name of the output file. + inp.write(str(len(pot_files)) + "\n") # Number of input POT files. + + # Names of the POT files. + for fname in pot_files: + inp.write(fname + "\n") + + self.stdin_data = [s for s in inp.getvalue()] + + with open(self.stdin_fname, "wt") as fh: + fh.writelines(self.stdin_data) + # Force OS to write data to disk. + fh.flush() + os.fsync(fh.fileno()) + + retcode = self.execute(workdir) + if retcode == 0 and delete_source: + # Remove pot files. + for f in pot_files: + try: + os.remove(f) + except IOError: + pass + + return out_dvdb + + +class Cut3D(ExecWrapper): + _name = "cut3d" + + def cut3d(self, cut3d_input, workdir): + """ + Runs cut3d with a Cut3DInput + + Args: + cut3d_input: a Cut3DInput object. + workdir: directory where cut3d is executed. + + Returns: + (string) absolute path to the standard output of the cut3d execution. + (string) absolute path to the output filepath. None if output is required. + """ + self.stdin_fname, self.stdout_fname, self.stderr_fname = \ + map(os.path.join, 3 * [os.path.abspath(workdir)], ["cut3d.stdin", "cut3d.stdout", "cut3d.stderr"]) + + cut3d_input.write(self.stdin_fname) + + retcode = self._execute(workdir, with_mpirun=False) + + if retcode != 0: + raise RuntimeError("Error while running cut3d in %s." % workdir) + + output_filepath = cut3d_input.output_filepath + + if output_filepath is not None: + if not os.path.isabs(output_filepath): + output_filepath = os.path.abspath(os.path.join(workdir, output_filepath)) + + if not os.path.isfile(output_filepath): + raise RuntimeError("The file was not converted correctly in %s." % workdir) + + return self.stdout_fname, output_filepath + + +class Fold2Bloch(ExecWrapper): + """Wrapper for fold2Bloch Fortran executable.""" + _name = "fold2Bloch" + + def unfold(self, wfkpath, folds, workdir=None): + import tempfile + workdir = tempfile.mkdtemp() if workdir is None else workdir + + self.stdin_fname = None + self.stdout_fname, self.stderr_fname = \ + map(os.path.join, 2 * [workdir], ["fold2bloch.stdout", "fold2bloch.stderr"]) + + folds = np.array(folds, dtype=np.int).flatten() + if len(folds) not in (3, 9): + raise ValueError("Expecting 3 ints or 3x3 matrix but got %s" % (str(folds))) + fold_arg = ":".join((str(f) for f in folds)) + wfkpath = os.path.abspath(wfkpath) + if not os.path.isfile(wfkpath): + raise RuntimeError("WFK file `%s` does not exist in %s" % (wfkpath, workdir)) + + # Usage: $ fold2Bloch file_WFK x:y:z (folds) + retcode = self.execute(workdir, exec_args=[wfkpath, fold_arg]) + if retcode: + print("stdout:") + print(self.stdout_data) + print("stderr:") + print(self.stderr_data) + raise RuntimeError("fold2bloch returned %s in %s" % (retcode, workdir)) + + filepaths = [f for f in os.listdir(workdir) if f.endswith("_FOLD2BLOCH.nc")] + if len(filepaths) != 1: + raise RuntimeError("Cannot find *_FOLD2BLOCH.nc file in: %s" % str(os.listdir(workdir))) + + return os.path.join(workdir, filepaths[0]) diff --git a/abipy/gui/awx/buttons.py b/abipy/gui/awx/buttons.py index f97175340..ae8b710da 100644 --- a/abipy/gui/awx/buttons.py +++ b/abipy/gui/awx/buttons.py @@ -1,7 +1,7 @@ from __future__ import division, print_function import io -import wxversion +#import wxversion #wxversion.ensureMinimal('2.8') import wx from wx.lib import buttons diff --git a/abipy/gui/baseviewer.py b/abipy/gui/baseviewer.py index 1fb11c785..8493b22e2 100644 --- a/abipy/gui/baseviewer.py +++ b/abipy/gui/baseviewer.py @@ -1,17 +1,13 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import abc -import six import wx.lib.agw.flatnotebook as fnb import abipy.gui.awx as awx -from monty.string import list_strings +from monty.string import list_strings -@six.add_metaclass(abc.ABCMeta) -class MultiViewerFrame(awx.Frame): +class MultiViewerFrame(awx.Frame, metaclass=abc.ABCMeta): """ Base class for Viewers that can handle the multiple netcdf files of the same type. A `MultiViewerFrame` has a notebook where diff --git a/abipy/gui/browser.py b/abipy/gui/browser.py deleted file mode 100644 index 10824f22f..000000000 --- a/abipy/gui/browser.py +++ /dev/null @@ -1,359 +0,0 @@ -"""Widgets for browsing and/or analyzing the output files produced by Abinit.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import os -import wx -import abipy.gui.awx as awx -import wx.lib.mixins.listctrl as listmix - -from collections import namedtuple -from monty.string import list_strings, is_string -from monty.fnmatch import WildCard -from abipy.gui.popupmenus import popupmenu_for_filename - - -def frameclass_from_filepath(filepath): - """ - Factory function that returns the class of the viewer (wx frame) associated to the file. - Returns None if no viewer has been registered for this filepath. - """ - from abipy.gui.wfkviewer import WfkViewerFrame - from abipy.gui.sigresviewer import SigresViewerFrame - from abipy.gui.gsrviewer import GsrViewerFrame - from abipy.gui.mdfviewer import MdfViewerFrame - from abipy.gui.editor import MyEditorFrame - from abipy.gui.wxncview import NcViewerFrame - - VIEWER_FRAMES = { - "WFK-etsf.nc": WfkViewerFrame, - "SIGRES.nc": SigresViewerFrame, - "GSR.nc": GsrViewerFrame, - "MDF.nc": MdfViewerFrame, - ".abi": MyEditorFrame, - ".abo": MyEditorFrame, - ".log": MyEditorFrame, - ".sh": MyEditorFrame, - ".err": MyEditorFrame, - ".files": MyEditorFrame, - } - - ext = filepath.split("_")[-1] - try: - return VIEWER_FRAMES[ext] - - except KeyError: - root, ext = os.path.splitext(filepath) - try: - return VIEWER_FRAMES[ext] - except KeyError: - # No frame registered for the file: return NcViewerFrame if netcdf file else None - return NcViewerFrame if filepath.endswith(".nc") else None - - -def frame_from_filepath(parent, filepath): - """ - Factory function that returns the viewer (wx frame) associated to the file. - None if no viewer has been registered for this filename. - """ - frame_class = frameclass_from_filepath(filepath) - return frame_class if frame_class is None else frame_class(parent, filepath) - - -class NcFileDirCtrl(wx.GenericDirCtrl): - def __init__(self, *args, **kwargs): - - if "filter" not in kwargs: - kwargs["filter"] = "Netcdf files (*.nc)|*.nc|All files (*.*)|*.*" - - if "dir" not in kwargs: - kwargs["dir"] = os.getcwd() - - if "style" not in kwargs: - kwargs["style"] = wx.TR_MULTIPLE - - super(NcFileDirCtrl, self).__init__(*args, **kwargs) - - self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnItemActivated) - self.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK, self.OnRightClick) - - def OnItemActivated(self, event): - path = self.GetFilePath() - if not path: return - - frame = frame_from_filepath(self, path) - if frame is not None: - frame.Show() - - def OnRightClick(self, event): - path = self.GetFilePath() - if not path: return - - # Open the popup menum then destroy it to avoid mem leak. - popmenu = popupmenu_for_filename(self, path) - self.PopupMenu(popmenu, event.GetPoint()) - popmenu.Destroy() - - -class MyListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin): - """ Mixin class to resize the last column appropriately.""" - def __init__(self, parent, **kwargs): - wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.BORDER_SUNKEN, **kwargs) - listmix.ListCtrlAutoWidthMixin.__init__(self) - - -class FileDataObj(namedtuple("FileDataObj", "filename type directory")): - """The fields of the row in `FileListPanel`""" - @property - def abspath(self): - """Absolute path ofthe file.""" - return os.path.join(self.directory, self.filename) - - #@property - #def basename(self) - # """Basename of the file.""" - # return os.path.basename(self.abspath)) - - @property - def relpath(self): - """Relative path""" - return os.path.relpath(self.abspath) - - @property - def reldirpath(self): - """Relative path of the directory""" - return os.path.relpath(self.directory) - - @classmethod - def from_abspath(cls, abspath): - return cls(filename=os.path.basename(abspath), - type=os.path.splitext(abspath)[-1], - directory=os.path.dirname(abspath)) - - -class FileListPanel(awx.Panel, listmix.ColumnSorterMixin): - """ - This panel shows a list of files (strings), supports column sorting - and provides specific popup menus for the different type of files - (file type detection is based on file extensions). - """ - def __init__(self, parent, filepaths, **kwargs): - """ - Args: - parent: - parent window - filepaths: - List of file paths. - """ - super(FileListPanel, self).__init__(parent, -1, **kwargs) - - if filepaths is not None and is_string(filepaths): - filepaths = [filepaths] - - self.filepaths = filepaths if filepaths is not None else [] - self.filepaths = map(os.path.abspath, self.filepaths) - - self.BuildUi() - - def BuildUi(self): - self.file_list = file_list = MyListCtrl(self) - - file_list.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClick) - file_list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated) - - self.columns = columns = ["filename", "type", "reldirpath"] - - # Used to store the Max width in pixels for the data in the column. - column_widths = [awx.get_width_height(self, s)[0] for s in columns] - - self.id2filedata = {} - for (index, colname) in enumerate(columns): - file_list.InsertColumn(index, colname) - - for filepath in self.filepaths: - entry = self.AppendFilepath(filepath) - - w = [awx.get_width_height(self, s)[0] for s in entry] - column_widths = map(max, zip(w, column_widths)) - - for (index, colname) in enumerate(columns): - #file_list.SetColumnWidth(index, wx.LIST_AUTOSIZE) - file_list.SetColumnWidth(index, column_widths[index]) - - # Now that the list exists we can init the other base class, see wx/lib/mixins/listctrl.py - self.itemDataMap = self.id2filedata - listmix.ColumnSorterMixin.__init__(self, len(columns)) - self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick, self.file_list) - - # Pack - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(file_list, 1, wx.ALL | wx.EXPAND, 5) - - self.SetSizerAndFit(sizer) - - def HasAbsPath(self, abspath): - """True if abspath is already present.""" - return abspath in [f.abspath for f in self.id2filedata.values()] - - def GetListCtrl(self): - """Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py""" - return self.file_list - - def AppendFilepath(self, abspath): - """Add a file to the panel.""" - if self.HasAbsPath(abspath): - awx.showErrorMessage(self, message="%s is already in the list" % abspath) - - return self._AppendFilepath(abspath) - - def _AppendFilepath(self, abspath): - filedata = FileDataObj.from_abspath(abspath) - - # We use next as entry id because we want to be able - # to sort the columns with the mixin ColumnSorterMixin. - next = len(self.id2filedata) - entry_id = next - entry = [getattr(filedata, attr) for attr in self.columns] - self.file_list.Append(entry) - self.file_list.SetItemData(next, entry_id) - self.id2filedata[entry_id] = filedata - - return entry - - def OnItemActivated(self, event): - currentItem = event.m_itemIndex - fd = self.id2filedata[self.file_list.GetItemData(currentItem)] - - frame = frame_from_filepath(self, fd.abspath) - if frame is not None: - frame.Show() - - def OnRightClick(self, event): - currentItem = event.m_itemIndex - if currentItem == -1: - return - - fd = self.id2filedata[self.file_list.GetItemData(currentItem)] - # Open the popup menu then destroy it to avoid mem leak. - menu = popupmenu_for_filename(self, fd.abspath) - - if menu is not None: - self.PopupMenu(menu, event.GetPoint()) - menu.Destroy() - - def OnColClick(self, event): - event.Skip() - - -class FileListFrame(awx.Frame): - def __init__(self, parent, dirpaths=None, filepaths=None, walk=True, wildcard="", **kwargs): - """ - Args: - parent: - parent window - dirpaths: - List of directories to scan. - filepaths - List of filepaths (absolute paths). - walk: - True if we have to browse all files and directories starting from filepaths. - wildcard - Regular expressions for selecting files (tokens are separated by |). - """ - super(FileListFrame, self).__init__(parent, -1, **kwargs) - - if dirpaths is not None: - dirpaths = map(os.path.abspath, list_strings(dirpaths)) - else: - dirpaths = [] - - if filepaths is not None: - filepaths = map(os.path.abspath, list_strings(filepaths)) - else: - filepaths = [] - - wildcard = WildCard(wildcard) - - self.all_filepaths = filepaths - - if walk: - for dirpath in dirpaths: - for root, dirnames, filenames in os.walk(dirpath): - fnames = [os.path.join(root, f) for f in filenames] - self.all_filepaths += wildcard.filter(fnames) - else: - # Select only the files in dirpaths. - for dirpath in dirpaths: - fnames = [os.path.join(dirpat, f) for f in os.listdir(dirpath)] - fnames = filter(os.path.isfile, fnames) - self.all_filepaths += wildcard.filter(fnames) - - self.BuildUi() - - def BuildUi(self): - self.main_sizer = main_sizer = wx.BoxSizer(wx.VERTICAL) - - panel = FileListPanel(self, filepaths=self.all_filepaths) - main_sizer.Add(panel, 1, wx.EXPAND, 5) - - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - filter_label = wx.StaticText(self, -1, "Filter:", wx.DefaultPosition, wx.DefaultSize, 0) - filter_label.Wrap(-1) - hsizer.Add(filter_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - # Combobox to enter shell patterns. - wildcard_choices = ["*", "*.nc", "*.abo", "*.log"] - self.filter_combobox = wx.ComboBox(self, id=-1, value="*", style=wx.TE_PROCESS_ENTER, choices=wildcard_choices) - self.filter_combobox.SetToolTipString("Shell patterns separated by |") - - self.filter_combobox.Bind(wx.EVT_COMBOBOX, self.OnFilterComboBox) - self.filter_combobox.Bind(wx.EVT_TEXT_ENTER, self.OnFilterComboBox) - - hsizer.Add(self.filter_combobox, 0, wx.ALL, 5) - - main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.SetSizer(main_sizer) - self.Layout() - - def OnFilterComboBox(self, event): - wildcard = WildCard(self.filter_combobox.GetValue()) - - select_files = wildcard.filter(self.all_filepaths) - panel = FileListPanel(self, filepaths=select_files) - - main_sizer = self.main_sizer - main_sizer.Hide(0) - main_sizer.Remove(0) - main_sizer.Insert(0, panel, 1, wx.EXPAND, 5) - - self.Layout() - #self.Fit() - - -# FIXME: Rewrite these classes: -class DirBrowserFrame(awx.Frame): - def __init__(self, parent, **kwargs): - super(DirBrowserFrame, self).__init__(parent, -1) - NcFileDirCtrl(self, -1, **kwargs) - - -def wxapp_dirbrowser(dirpath): - """Standalone application.for DirBrowser.""" - if dirpath is None: - dirpath = " " - else: - dirpath = os.path.abspath(dirpath) - - app = awx.App() - frame = DirBrowserFrame(None, dir=dirpath) - frame.Show() - return app - - -def wxapp_listbrowser(dirpaths=None, filepaths=None, wildcard=""): - """Standalone application ListBroweser.""" - app = awx.App() - frame = FileListFrame(None, dirpaths=dirpaths, filepaths=filepaths, wildcard=wildcard) - frame.Show() - return app diff --git a/abipy/gui/comparison.py b/abipy/gui/comparison.py deleted file mode 100644 index f7e1455b4..000000000 --- a/abipy/gui/comparison.py +++ /dev/null @@ -1,220 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import wx -import collections -import fnmatch -import abipy.gui.awx as awx - -from monty.string import list_strings -from abipy.electrons import ElectronBandsPlotter, ElectronDosPlotter, MdfPlotter, SigresPlotter -from abipy.gui.electronswx import ElectronDosDialog - - -class FileCheckBoxPanel(awx.Panel): - """A panel with a list of filepaths and checkboxes.""" - def __init__(self, parent, filepaths, **kwargs): - """ - Args: - parent: - Parent window. - filepaths: - String or List of strings with filepaths. - """ - super(FileCheckBoxPanel, self).__init__(parent, -1, **kwargs) - - self.all_filepaths = list_strings(filepaths) - - self.BuildUi() - - def BuildUi(self): - main_sizer = wx.BoxSizer(wx.VERTICAL) - - static_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "Files"), wx.VERTICAL) - - self.check_boxes = collections.OrderedDict() - - self.wildcards = ["*"] - - for path in self.all_filepaths: - if not self._SelectFilename(path): continue - assert path not in self.check_boxes - cbox = wx.CheckBox(self, -1, path, wx.DefaultPosition, wx.DefaultSize, 0) - cbox.SetValue(True) - static_sizer.Add(cbox, 0, wx.ALL | wx.EXPAND, 5) - self.check_boxes[path] = cbox - - main_sizer.Add(static_sizer, 1, wx.EXPAND, 5) - - # Add buttons to (select|deselect) all checkboxes. - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - all_button = wx.Button(self, -1, "Select all", wx.DefaultPosition, wx.DefaultSize, 0) - all_button.Bind(wx.EVT_BUTTON, self.OnSelectAll) - hsizer.Add(all_button, 0, wx.ALL, 5) - - deselect_button = wx.Button(self, -1, "Deselect all", wx.DefaultPosition, wx.DefaultSize, 0) - deselect_button.Bind(wx.EVT_BUTTON, self.OnDeselectAll) - hsizer.Add(deselect_button, 0, wx.ALL, 5) - - filter_label = wx.StaticText(self, -1, "Filter:", wx.DefaultPosition, wx.DefaultSize, 0) - filter_label.Wrap(-1) - hsizer.Add(filter_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - wildcard_choices = ["*", "*.nc"] - self.filter_combobox = wx.ComboBox(self, wx.ID_ANY, "*", wx.DefaultPosition, wx.DefaultSize, wildcard_choices, - 0) - self.filter_combobox.Bind(wx.EVT_COMBOBOX, self.OnFilterComboBox) - self.filter_combobox.Bind(wx.EVT_TEXT_ENTER, self.OnFilterComboBox) - hsizer.Add(self.filter_combobox, 0, wx.ALL, 5) - - main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.SetSizerAndFit(main_sizer) - - def _SelectFilename(self, filename): - for wcard in self.wildcards: - if not fnmatch.fnmatch(filename, wcard): - return False - return True - - def OnFilterComboBox(self, event): - self.wildcards = self.filter_combobox.GetValue().split("|") - - for (filepath, cbox) in self.check_boxes.items(): - if self._SelectFilename(filepath): - cbox.SetValue(True) - else: - cbox.SetValue(False) - - def OnSelectAll(self, event): - for cbox in self.check_boxes.values(): - cbox.SetValue(True) - - def OnDeselectAll(self, event): - for cbox in self.check_boxes.values(): - cbox.SetValue(False) - - def GetSelectedFilepaths(self): - """ - Return the list of filepaths selected by the user. - Main entry point for client code. - """ - selected = [] - - for path, cbox in self.check_boxes.items(): - if cbox.GetValue(): - selected.append(path) - - return selected - - -class ComparisonFrame(awx.Frame): - """ - This frame allows the user to select/deselect a list of files and to produce plots - for all the files selected. Useful for convergence studies. - """ - - def __init__(self, parent, dirpaths=None, filepaths=None, wildcard=None, **kwargs): - """ - Args: - parent: - parent window - dirpaths - List of directory names - filepaths - List of filepaths. - wildcard - Regular expression for selecting files. - """ - super(ComparisonFrame, self).__init__(parent, -1, **kwargs) - - # TODO - #self.dirpaths = dirpaths if dirpaths is not None else [] - #self.filepaths = filepaths if filepaths is not None else [] - # - #self.dirpaths = map(os.path.abspath, self.dirpaths) - #self.filepaths = map(os.path.abspath, self.filepaths) - # - #self.wildcard = wildcard if wildcard is not None else "" - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - st1 = wx.StaticText(self, -1, "Quantity:", wx.DefaultPosition, wx.DefaultSize, 0) - st1.Wrap(-1) - hsizer.Add(st1, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - plotter_choices = ["ebands", "edos", "mdf", "sigres"] - self.plotter_cbox = wx.ComboBox(self, -1, "ebands", wx.DefaultPosition, wx.DefaultSize, plotter_choices, 0) - hsizer.Add(self.plotter_cbox, 0, wx.ALL, 5) - - compare_button = wx.Button(self, -1, "Compare", wx.DefaultPosition, wx.DefaultSize, 0) - compare_button.Bind(wx.EVT_BUTTON, self.OnCompareButton) - hsizer.Add(compare_button, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5) - - main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.panel = FileCheckBoxPanel(self, filepaths) - main_sizer.Add(self.panel, 1, wx.EXPAND, 5) - - self.SetSizerAndFit(main_sizer) - - def OnCompareButton(self, event): - selected_files = self.panel.GetSelectedFilepaths() - - choice = self.plotter_cbox.GetValue() - - try: - if choice == "ebands": - plotter = ElectronBandsPlotter() - - for filepath in selected_files: - plotter.add_ebands_from_file(filepath) - - plotter.plot() - - elif choice == "edos": - # Open dialog to ask the user the DOS parameters. - dos_dialog = ElectronDosDialog(None) - - if dos_dialog.ShowModal() == wx.ID_OK: - p = dos_dialog.GetParams() - - plotter = ElectronDosPlotter() - - for filepath in selected_files: - plotter.add_edos_from_file(filepath, **p) - - plotter.plot() - - dos_dialog.Destroy() - - elif choice == "mdf": - plotter = MdfPlotter() - - for filepath in selected_files: - plotter.add_mdf_from_file(filepath, mdf_type="exc") - - plotter.plot() - - elif choice == "sigres": - plotter = SigresPlotter() - - plotter.add_files(selected_files) - - plotter.plot_qpgaps() - #plotter.plot_qpenes() - - else: - awx.showErrorMessage(self, message="No function registered for choice %s" % choice) - - except Exception: - awx.showErrorMessage(self) - - -def wxapp_comparison(dirpaths=None, filepaths=None, wildcard=None): - app = awx.App() - frame = ComparisonFrame(None, dirpaths=dirpaths, filepaths=filepaths, wildcard=wildcard) - frame.Show() - return app diff --git a/abipy/gui/converter.py b/abipy/gui/converter.py deleted file mode 100644 index 25ba202a0..000000000 --- a/abipy/gui/converter.py +++ /dev/null @@ -1,119 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import wx -import pymatgen.core.units as units - -from abipy.gui import awx - - -class ConverterFrame(awx.Frame): - DEFAULT_UTYPE = "energy" - - def __init__(self, parent, **kwargs): - super(ConverterFrame, self).__init__(parent, -1, title="Unit Converter") - self.BuildUi() - - def BuildUi(self): - main_sizer = wx.BoxSizer(wx.VERTICAL) - - hsz1 = wx.BoxSizer(wx.HORIZONTAL) - - from_text = wx.StaticText(self, -1, "From:") - from_text.Wrap(-1) - hsz1.Add(from_text, 0, wx.ALL, 5) - - self.from_textctrl = wx.TextCtrl(self, -1, "1.0") - hsz1.Add(self.from_textctrl, 1, wx.ALL, 5) - - from_uchoices = units.ALL_UNITS[self.DEFAULT_UTYPE].keys() - self.from_unit_choice = wx.ComboBox(self, -1, choices=from_uchoices) - self.from_unit_choice.SetSelection(0) - hsz1.Add(self.from_unit_choice, 1, wx.ALL, 5) - - main_sizer.Add(hsz1, 0.4, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 5) - - hsz2 = wx.BoxSizer(wx.HORIZONTAL) - - to_text = wx.StaticText(self, -1, "To:") - to_text.Wrap(-1) - hsz2.Add(to_text, 0, wx.ALL, 5) - - self.to_textctrl = wx.TextCtrl(self, -1, wx.EmptyString) - hsz2.Add(self.to_textctrl, 1, wx.ALL, 5) - - to_uchoices = units.ALL_UNITS[self.DEFAULT_UTYPE].keys() - self.to_unit_choice = wx.ComboBox(self, -1, choices=to_uchoices) - self.to_unit_choice.SetSelection(0) - hsz2.Add(self.to_unit_choice, 1, wx.ALL, 5) - - main_sizer.Add(hsz2, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 5) - - hsz3 = wx.BoxSizer(wx.HORIZONTAL) - - utype_text = wx.StaticText(self, -1, "Unit type:") - utype_text.Wrap(-1) - hsz3.Add(utype_text, 0, wx.ALL, 5) - - unit_type_choices = units.ALL_UNITS.keys() - self.unit_type_choice = wx.Choice(self, -1, wx.DefaultPosition, wx.DefaultSize, unit_type_choices, 0) - self.unit_type_choice.SetSelection(unit_type_choices.index(self.DEFAULT_UTYPE)) - self.Bind(wx.EVT_CHOICE, self.OnUnitTypeChoiced, self.unit_type_choice) - - hsz3.Add(self.unit_type_choice, 0, wx.ALL, 5) - - convert_button = wx.Button(self, -1, "Convert") - hsz3.Add(convert_button, 0, wx.ALL, 5) - - main_sizer.Add(hsz3, 1, wx.EXPAND, 5) - - self.Bind(wx.EVT_BUTTON, self.OnConvert, convert_button) - - self.SetSizerAndFit(main_sizer) - - def OnUnitTypeChoiced(self, event): - new_type = self.unit_type_choice.GetStringSelection() - new_choices = units.ALL_UNITS[new_type].keys() - - self.from_unit_choice.Clear() - self.from_unit_choice.AppendItems(new_choices) - self.from_unit_choice.SetSelection(0) - - self.to_unit_choice.Clear() - self.to_unit_choice.AppendItems(new_choices) - self.to_unit_choice.SetSelection(0) - - def OnConvert(self, event): - try: - fvalue = float(self.from_textctrl.GetValue()) - except: - awx.showErrorMessage(self) - return - - from_unit = self.from_unit_choice.GetValue() - if from_unit == "foo": - from abipy.gui.awx.eggs import Puzzle - return Puzzle(self) - - ufloat = units.FloatWithUnit(fvalue, from_unit) - to_unit = self.to_unit_choice.GetValue() - - try: - conversion = ufloat.to(to_unit) - print(ufloat, conversion) - self.to_textctrl.SetValue(str(float(conversion))) - - except: - awx.showErrorMessage(self) - - -def wxapp_converter(): - """Standalon application.""" - app = awx.App() - frame = ConverterFrame(None) - frame.Show() - app.SetTopWindow(frame) - return app - - -if __name__ == "__main__": - wxapp_converter().MainLoop() diff --git a/abipy/gui/demo/demo_comparison.py b/abipy/gui/demo/demo_comparison.py deleted file mode 100755 index a2f6dc131..000000000 --- a/abipy/gui/demo/demo_comparison.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -import os -import abipy -import abipy.data - -import abipy.gui.wxapps as wxapps - -datadir = abipy.data.dirpath -filepaths = [os.path.join(datadir, f) for f in os.listdir(datadir)] - -app = wxapps.wxapp_comparison(filepaths=filepaths).MainLoop() diff --git a/abipy/gui/demo/demo_eos.py b/abipy/gui/demo/demo_eos.py deleted file mode 100755 index 441bcacf4..000000000 --- a/abipy/gui/demo/demo_eos.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python -import wx - -from abipy.gui.eos import EosFrame - -volumes = [13.72, 14.83, 16.0, 17.23, 18.52] -energies = [-56.29, -56.41, -56.46, -56.46, -56.42] - -app = wx.App() -frame = EosFrame(None, volumes, energies) -frame.Show() -app.SetTopWindow(frame) -app.MainLoop() diff --git a/abipy/gui/demo/demo_events.py b/abipy/gui/demo/demo_events.py deleted file mode 100755 index 2b1143f25..000000000 --- a/abipy/gui/demo/demo_events.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python -import os -import abipy -import abipy.data - -import abipy.gui.wxapps as wxapps - -dirpath = os.path.join(abipy.data.dirpath, "runs", "data_si_ebands") -wxapps.wxapp_events(dirpath).MainLoop() diff --git a/abipy/gui/demo/demo_func1d.py b/abipy/gui/demo/demo_func1d.py deleted file mode 100755 index cf427efdf..000000000 --- a/abipy/gui/demo/demo_func1d.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -import wx -import numpy as np - -from abipy.core.func1d import Function1D -from abipy.gui.awx.func1dframe import Func1dPlotFrame - -app = wx.App() -func1d = Function1D.from_func(np.sin, np.arange(1,100,1)) -frame = Func1dPlotFrame(None, func1d) -frame.Show() -app.MainLoop() diff --git a/abipy/gui/demo/demo_phbstviewer.py b/abipy/gui/demo/demo_phbstviewer.py deleted file mode 100755 index 553db0692..000000000 --- a/abipy/gui/demo/demo_phbstviewer.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -import abipy.data as abidata - -from abipy.gui.wxapps import wxapp_phbstviewer - -phbst_filepath = abidata.ref_file("trf2_5.out_PHBST.nc") - -wxapp_phbstviewer(phbst_filepath).MainLoop() diff --git a/abipy/gui/demo/demo_pseudos.py b/abipy/gui/demo/demo_pseudos.py deleted file mode 100755 index dd15bd4c6..000000000 --- a/abipy/gui/demo/demo_pseudos.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -import abipy.data as abidata - -from abipy.gui.pseudos import wxapp_pseudos - -dirpath = abidata.pseudo_dir -wxapp_pseudos(dirpath).MainLoop() diff --git a/abipy/gui/demo/demo_scissors.py b/abipy/gui/demo/demo_scissors.py deleted file mode 100755 index 6dc62da2a..000000000 --- a/abipy/gui/demo/demo_scissors.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -import abipy -import abipy.data - -from abipy.gui.wxapps import wxapp_scissors - -app = wxapp_scissors(abipy.data.ref_file("tgw1_9o_DS4_SIGRES.nc")) -app.MainLoop() diff --git a/abipy/gui/demo/demo_showfiles.py b/abipy/gui/demo/demo_showfiles.py deleted file mode 100755 index 30303963e..000000000 --- a/abipy/gui/demo/demo_showfiles.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -import os -from abipy.gui.wxapps import wxapp_showfiles - -# Show all *.py files located within the current directory -app = wxapp_showfiles(filenames=None, dirpath=os.path.dirname(__file__), walk=True, wildcard="*.py") -app.MainLoop() diff --git a/abipy/gui/demo/demo_structure_converter.py b/abipy/gui/demo/demo_structure_converter.py deleted file mode 100755 index 3b20e3f61..000000000 --- a/abipy/gui/demo/demo_structure_converter.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python - -import abipy.data as abidata - -from abipy.gui.wxapps import wxapp_structure_converter - -filename = abidata.ref_file("si_nscf_GSR.nc") - -app = wxapp_structure_converter(filename) -app.MainLoop() diff --git a/abipy/gui/editor.py b/abipy/gui/editor.py index 1561e7657..527708a0e 100644 --- a/abipy/gui/editor.py +++ b/abipy/gui/editor.py @@ -1,5 +1,4 @@ """Frames for text visualization.""" -from __future__ import print_function, division, unicode_literals, absolute_import import os import wx diff --git a/abipy/gui/electronswx.py b/abipy/gui/electronswx.py index 1b03b8111..818c6953f 100644 --- a/abipy/gui/electronswx.py +++ b/abipy/gui/electronswx.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import collections diff --git a/abipy/gui/eos.py b/abipy/gui/eos.py deleted file mode 100644 index a609c53d1..000000000 --- a/abipy/gui/eos.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import wx -import abipy.gui.awx as awx - -from pymatgen.analysis.eos import EOS - - -class EosFrame(awx.Frame): - """ - Frame that allows the user to fit E(V). - """ - def __init__(self, parent, volumes, energies, vol_unit="ang^3", ene_unit="eV", **kwargs): - super(EosFrame, self).__init__(parent, id=-1, title="EOS Frame", **kwargs) - - self.volumes, self.vol_unit = volumes, vol_unit - self.energies, self.ene_unit = energies, ene_unit - - self.BuildUi() - - def BuildUi(self): - main_sizer = wx.BoxSizer(wx.VERTICAL) - - models = EOS.MODELS.keys() - self.model_choice = wx.Choice(self, -1, wx.DefaultPosition, wx.DefaultSize, models, 0) - self.model_choice.SetSelection(0) - main_sizer.Add(self.model_choice, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 5) - - fit_button = wx.Button(self, -1, "Plot", wx.DefaultPosition, wx.DefaultSize, 0) - fit_button.Bind(wx.EVT_BUTTON, self.OnFitButton) - main_sizer.Add(fit_button, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.SetSizerAndFit(main_sizer) - - def OnFitButton(self, event): - model = self.model_choice.GetStringSelection() - - try: - eos = EOS(eos_name=model) - fit = eos.fit(self.volumes, self.energies, vol_unit=self.vol_unit, ene_unit=self.ene_unit) - print(fit) - fit.plot() - - except: - awx.showErrorMessage(self) - diff --git a/abipy/gui/events.py b/abipy/gui/events.py index 1cff9090f..06311fd27 100644 --- a/abipy/gui/events.py +++ b/abipy/gui/events.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import wx.lib.agw.flatnotebook as fnb diff --git a/abipy/gui/fftprof.py b/abipy/gui/fftprof.py index 832b250ef..35603bef1 100644 --- a/abipy/gui/fftprof.py +++ b/abipy/gui/fftprof.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import wx from collections import OrderedDict diff --git a/abipy/gui/flowviewer.py b/abipy/gui/flowviewer.py index 72a83d806..fd353ae7e 100644 --- a/abipy/gui/flowviewer.py +++ b/abipy/gui/flowviewer.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import time diff --git a/abipy/gui/gsrviewer.py b/abipy/gui/gsrviewer.py deleted file mode 100644 index 868eb8ada..000000000 --- a/abipy/gui/gsrviewer.py +++ /dev/null @@ -1,191 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import os -import wx -import abipy.gui.awx as awx - -from wx.py.shell import Shell -from monty.string import marquee -from abipy.abilab import abiopen -from abipy.gui import mixins as mix -from abipy.gui.kpoints import KpointsPanel -from abipy.gui.baseviewer import MultiViewerFrame - - -class GsrViewerFrame(MultiViewerFrame, mix.Has_Structure, mix.Has_MultipleEbands, mix.Has_Tools, mix.Has_NetcdfFiles): - VERSION = "0.1" - - HELP_MSG = """Quick help: - - Kpoint list: - - Right-Click: display popup menu with choices. - -Also, these key bindings can be used -(For Mac OSX, replace 'Ctrl' with 'Apple'): - - Ctrl-Q: quit -""" - - @property - def codename(self): - return "GsrViewer" - - @property - def active_gsr(self): - """The active GSR file i.e. the GSR associated to the active tab.""" - return self.active_tab.gsr - - @property - def structure(self): - """`Structure` associated to the active tab.""" - return self.active_gsr.structure - - @property - def ebands(self): - """`ElectronBands` associated to the active tab.""" - return self.active_gsr.ebands - - @property - def ebands_list(self): - """List of `ElectronBands`.""" - ebands_list = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - ebands_list.append(tab.gsr.ebands) - return ebands_list - - @property - def ebands_filepaths(self): - """ - Return a list with the absolute paths of the files - from which the `ElectronBands` have been read. - """ - paths = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - paths.append(tab.gsr.filepath) - return paths - - @property - def nc_filepaths(self): - """String with the absolute path of the netcdf file.""" - paths = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - paths.append(tab.gsr.filepath) - return paths - - def makeMenu(self): - """Creates the main menu.""" - # Base menu - menu_bar = super(GsrViewerFrame, self).makeMenu() - - # Add Mixin menus. - menu_bar.Append(self.CreateStructureMenu(), "Structure") - menu_bar.Append(self.CreateEbandsMenu(), "Ebands") - menu_bar.Append(self.CreateToolsMenu(), "Tools") - menu_bar.Append(self.CreateNetcdfMenu(), "Netcdf") - - # Help menu - help_menu = self.makeHelpMenu() - menu_bar.Append(help_menu, "Help") - - self.SetMenuBar(menu_bar) - - def makeToolBar(self): - """Creates the toolbar.""" - self.toolbar = toolbar = self.CreateToolBar() - toolbar.SetToolBitmapSize(wx.Size(48, 48)) - - def bitmap(path): - return wx.Bitmap(awx.path_img(path)) - - artBmp = wx.ArtProvider.GetBitmap - toolbar.AddSimpleTool(wx.ID_OPEN, artBmp(wx.ART_FILE_OPEN, wx.ART_TOOLBAR), "Open") - #toolbar.AddSeparator() - toolbar.Realize() - - def addFileTab(self, parent, filepath): - """Read data from filepath and create a new notebook tab.""" - gsr = abiopen(filepath) - tab = GsrFileTab(self.notebook, gsr) - self.notebook.AddPage(tab, os.path.basename(filepath)) - - -class GsrFileTab(wx.Panel): - """Tab showing information on a single GSR file.""" - def __init__(self, parent, gsr, **kwargs): - """ - Args: - parent: - parent window. - gsr: - `GsrFile` instance. - """ - super(GsrFileTab, self).__init__(parent, -1, **kwargs) - self.gsr = gsr - - splitter = wx.SplitterWindow(self, id=-1, style=wx.SP_3D) - splitter.SetSashGravity(0.95) - - self.kpoints_panel = KpointsPanel(splitter, gsr.structure, gsr.kpoints) - - # Add Python shell - msg = "GSR_File object is accessible via the gsr variable. Use gsr. to access the list of methods." - msg = marquee(msg, width=len(msg) + 8, mark="#") - msg = "#"*len(msg) + "\n" + msg + "\n" + "#"*len(msg) + "\n" - - pyshell = Shell(splitter, introText=msg, locals={"gsr": self.gsr}) - splitter.SplitHorizontally(self.kpoints_panel, pyshell) - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(splitter, 1, wx.EXPAND, 5) - self.SetSizerAndFit(sizer) - - @property - def statusbar(self): - return self.viewer_frame.statusbar - - def GetVisualizer(self): - """Returns a string with the visualizer selected by the user.""" - return self.viewer_frame.GetVisualizer() - - def _visualize_skb(self, spin, kpoint, band): - """Calls the visualizer to visualize the specified wavefunction.""" - # To make the Gui responsive one can use the approach described in - # http://wiki.wxpython.org/LongRunningTasks - appname = self.GetVisualizer() - if appname == "None": return - - self.statusbar.PushStatusText("Visualizing wavefunction (spin=%d, kpoint=%s, band=%d)" % (spin, kpoint, band)) - try: - visu = self.wfk.visualize_ur2(spin, kpoint, band, appname=appname) - thread = awx.WorkerThread(self, target=visu) - thread.start() - - except: - awx.showErrorMessage(self) - - @property - def viewer_frame(self): - """The parent frame `GsrViewerFrame`.""" - try: - return self._viewer_frame - - except AttributeError: - self._viewer_frame = self.getParentWithType(GsrViewerFrame) - return self._viewer_frame - - -class GsrViewerApp(awx.App): - pass - - -def wxapp_gsrviewer(gsr_filepaths): - """Standalone application.""" - app = GsrViewerApp() - frame = GsrViewerFrame(None, filepaths=gsr_filepaths) - app.SetTopWindow(frame) - frame.Show() - return app diff --git a/abipy/gui/kpoints.py b/abipy/gui/kpoints.py index 6578b7a3c..a9396ea1f 100644 --- a/abipy/gui/kpoints.py +++ b/abipy/gui/kpoints.py @@ -1,5 +1,4 @@ """Collection of widgets that allow the user to interact with list of K-points.""" -from __future__ import print_function, division, unicode_literals, absolute_import import wx import wx.lib.newevent diff --git a/abipy/gui/mandelbrot.py b/abipy/gui/mandelbrot.py index aaa52bb57..c5a10afd0 100755 --- a/abipy/gui/mandelbrot.py +++ b/abipy/gui/mandelbrot.py @@ -1,10 +1,8 @@ #!/usr/bin/env python """MANDELBROT SET""" -from __future__ import print_function, division, unicode_literals, absolute_import import numpy as np - def mandelbrot(extent=None, ndivs=(1000,1000), iterations=100): """ Based on http://cyrille.rossant.net/mandelbrot-set/ diff --git a/abipy/gui/mdfviewer.py b/abipy/gui/mdfviewer.py index 0300ea049..9e3fa4d3b 100644 --- a/abipy/gui/mdfviewer.py +++ b/abipy/gui/mdfviewer.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import wx.lib.agw.flatnotebook as fnb diff --git a/abipy/gui/mixins.py b/abipy/gui/mixins.py index 334ad0bce..79c94605d 100644 --- a/abipy/gui/mixins.py +++ b/abipy/gui/mixins.py @@ -1,8 +1,5 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import abc import os -import six import wx import wx.lib.dialogs as wxdg import abipy.gui.awx as awx @@ -20,8 +17,7 @@ from abipy.iotools import ETSF_Reader -@six.add_metaclass(abc.ABCMeta) -class Has_Structure(object): +class Has_Structure(metaclass=abc.ABCMeta): """ Mixin class that provides a menu and callbacks for analyzing the crystalline structure. @@ -79,8 +75,8 @@ def OnStructureShowBz(self, event): """"Visualize the Brillouin zone with matplotlib.""" self.structure.show_bz() -@six.add_metaclass(abc.ABCMeta) -class Has_Ebands(object): + +class Has_Ebands(metaclass=abc.ABCMeta): """ Mixin class that provides a menu and callbacks for analyzing electron bands. """ @@ -161,7 +157,7 @@ def OnFermiSurface(self, event): # new_ebands.plot() # new_ebands.pickle_dump() -@six.add_metaclass(abc.ABCMeta) + class Has_MultipleEbands(Has_Ebands): """ Mixin class that provides a menu and callbacks @@ -264,25 +260,6 @@ def onPlotEbandsWithDos(self, event): awx.showErrorMessage(self) -#@six.add_metaclass(abc.ABCMeta) -#class Has_GsResults(object): -# """ -# Mixin class for GUIs with ground-state results (etotal, forces, stresses...) -# """ -# def CreateToolsMenu(self): -# """Create the tools menu.""" -# # Tools Menu ID's -# self.ID_GSRESULTS_EOSFIT = wx.NewId() -# -# menu = wx.Menu() -# menu.Append(self.ID_GSRESULTS_EOSFIT, "Fit E(V)", "Equation of State") -# self.Bind(wx.EVT_MENU, self.onEosFit, id=self.ID_GSRESULTS_EOSFIT) -# -# return menu -# -# def onEosFit(self, event): -# EosFrame(self, volumes, energies, vol_unit="ang^3", ene_unit="eV").Show() - class Has_Tools(object): """ Mixin class that provides a menu with external tools. @@ -311,8 +288,8 @@ def OnTools_UnitConverter(self, event): """Open new frame with the unit converter.""" ConverterFrame(self).Show() -@six.add_metaclass(abc.ABCMeta) -class Has_NetcdfFiles(object): + +class Has_NetcdfFiles(metaclass=abc.ABCMeta): """ Mixin class that provides a menu and callbacks for analyzing and comparing netcdf files. @@ -365,8 +342,7 @@ def OnNetcdf_WxNcView(self, event): NcViewerFrame(self, filepaths=self.nc_filepaths).Show() -@six.add_metaclass(abc.ABCMeta) -class Has_Phbands(object): +class Has_Phbands(metaclass=abc.ABCMeta): """ Mixin class that provides a menu and callbacks for analyzing phonon bands. """ @@ -456,7 +432,6 @@ def phdos(self): """PHDOS data for the active tab if it has been added. None otherwise""" -@six.add_metaclass(abc.ABCMeta) class Has_MultiplePhbands(Has_Phbands): """ Mixin class that provides a menu and callbacks diff --git a/abipy/gui/oncvgui.py b/abipy/gui/oncvgui.py index 0e18c58dd..cdfb59cb4 100755 --- a/abipy/gui/oncvgui.py +++ b/abipy/gui/oncvgui.py @@ -1,14 +1,11 @@ #!/usr/bin/env python """Gui for the oncvpsp norm-conserving pseudopotential generator.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import copy import time import shutil import abc import sys -import six import wx import wx.lib.mixins.listctrl as listmix import numpy as np @@ -427,8 +424,7 @@ def onAbout(self, event): website="http://www.mat-simresearch.com/") -@six.add_metaclass(abc.ABCMeta) -class OptimizationFrame(awx.Frame): +class OptimizationFrame(awx.Frame, metaclass=abc.ABCMeta): """Base class for optimization frames.""" def __init__(self, parent, **kwargs): super(OptimizationFrame, self).__init__(parent, **kwargs) diff --git a/abipy/gui/oncvtooltips.py b/abipy/gui/oncvtooltips.py index b525edd26..85e91e5a2 100644 --- a/abipy/gui/oncvtooltips.py +++ b/abipy/gui/oncvtooltips.py @@ -1,6 +1,4 @@ """Tooltips for oncv GUI.""" -from __future__ import print_function, division, unicode_literals, absolute_import - def oncv_tip(key): """Tip for variable key.""" diff --git a/abipy/gui/phbstviewer.py b/abipy/gui/phbstviewer.py deleted file mode 100644 index 71691a381..000000000 --- a/abipy/gui/phbstviewer.py +++ /dev/null @@ -1,218 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import os -import wx -import abc -import abipy.gui.awx as awx - -from wx.py.shell import Shell -from monty.string import marquee -from abipy.abilab import abiopen -from abipy.gui import mixins as mix -from abipy.gui.kpoints import KpointsPanel -from abipy.gui.baseviewer import MultiViewerFrame - - -class PhbstViewerFrame(MultiViewerFrame, mix.Has_Structure, mix.Has_MultiplePhbands, mix.Has_Tools, mix.Has_NetcdfFiles): - VERSION = "0.1" - - HELP_MSG = """Quick help: - - Kpoint list: - - Right-Click: display popup menu with choices. - -Also, these key bindings can be used -(For Mac OSX, replace 'Ctrl' with 'Apple'): - - Ctrl-Q: quit -""" - - @property - def codename(self): - return "PhbstViewer" - - @property - def active_phbst(self): - """The active PHBST file i.e. the PHBST associated to the active tab.""" - return self.active_tab.phbst - - @property - def structure(self): - """`Structure` associated to the active tab.""" - return self.active_phbst.structure - - @property - def phbands(self): - """`PhononBands` associated to the active tab.""" - return self.active_phbst.phbands - - @property - def active_phdos_file(self): - """The active PHDOS file i.e. the PHDOS associated to the active tab.""" - try: - return self.active_tab.phdos_file - except AttributeError: - return None - - @property - def phdos(self): - """PHDOS data for the active tab if it has been added. None otherwise""" - if self.active_phdos_file: - return self.active_phdos_file.phdos - else: - return None - - @property - def phbands_list(self): - """List of `PhononBands`.""" - phbands_list = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - phbands_list.append(tab.phbst.phbands) - return phbands_list - - @property - def phbands_filepaths(self): - """ - Return a list with the absolute paths of the files - from which the `PhononBands` have been read. - """ - paths = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - paths.append(tab.phbst.filepath) - return paths - - @property - def phdos_list(self): - """List of `PhononDos`.""" - phdos_list = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - if tab.phdos_file: - phdos_list.append(tab.phdos_file.phdos) - return phdos_list - - @property - def phdos_filepaths(self): - """ - Return a list with the absolute paths of the files - from which the `PhononDos` have been read. - """ - paths = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - if tab.phdos_file: - paths.append(tab.phdos_file.filepath) - return paths - - @property - def nc_filepaths(self): - """String with the absolute path of the netcdf file.""" - paths = [] - for page in range(self.notebook.GetPageCount()): - tab = self.notebook.GetPage(page) - paths.append(tab.phbst.filepath) - return paths - - def makeMenu(self): - """Creates the main menu.""" - # Base menu - menu_bar = super(PhbstViewerFrame, self).makeMenu() - - # Add Mixin menus. - menu_bar.Append(self.CreateStructureMenu(), "Structure") - menu_bar.Append(self.CreatePhbandsMenu(), "Phbands") - menu_bar.Append(self.CreateToolsMenu(), "Tools") - menu_bar.Append(self.CreateNetcdfMenu(), "Netcdf") - - # Help menu - help_menu = self.makeHelpMenu() - menu_bar.Append(help_menu, "Help") - - self.SetMenuBar(menu_bar) - - def makeToolBar(self): - """Creates the toolbar.""" - self.toolbar = toolbar = self.CreateToolBar() - toolbar.SetToolBitmapSize(wx.Size(48, 48)) - - def bitmap(path): - return wx.Bitmap(awx.path_img(path)) - - artBmp = wx.ArtProvider.GetBitmap - toolbar.AddSimpleTool(wx.ID_OPEN, artBmp(wx.ART_FILE_OPEN, wx.ART_TOOLBAR), "Open") - #toolbar.AddSeparator() - toolbar.Realize() - - def addFileTab(self, parent, filepath): - """Read data from filepath and create a new notebook tab.""" - phbst = abiopen(filepath) - tab = PhbstFileTab(self.notebook, phbst) - self.notebook.AddPage(tab, os.path.basename(filepath)) - - -class PhbstFileTab(wx.Panel): - """Tab showing information on a single PHBST file.""" - def __init__(self, parent, phbst, **kwargs): - """ - Args: - parent: - parent window. - phbst: - `PhbstFile` instance. - """ - super(PhbstFileTab, self).__init__(parent, -1, **kwargs) - self.phbst = phbst - self.phdos_file = None - - splitter = wx.SplitterWindow(self, id=-1, style=wx.SP_3D) - splitter.SetSashGravity(0.95) - - self.qpoints_panel = KpointsPanel(splitter, phbst.structure, phbst.qpoints) - - # Add Python shell - msg = "PHBST_File object is accessible via the phbst variable. Use phbst. to access the list of methods." - msg = marquee(msg, width=len(msg) + 8, mark="#") - msg = "#"*len(msg) + "\n" + msg + "\n" + "#"*len(msg) + "\n" - - pyshell = Shell(splitter, introText=msg, locals={"phbst": self.phbst}) - splitter.SplitHorizontally(self.qpoints_panel, pyshell) - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(splitter, 1, wx.EXPAND, 5) - self.SetSizerAndFit(sizer) - - @property - def statusbar(self): - return self.viewer_frame.statusbar - - def GetVisualizer(self): - """Returns a string with the visualizer selected by the user.""" - return self.viewer_frame.GetVisualizer() - - @property - def viewer_frame(self): - """The parent frame `PhbstViewerFrame`.""" - try: - return self._viewer_frame - - except AttributeError: - self._viewer_frame = self.getParentWithType(PhbstViewerFrame) - return self._viewer_frame - - -class PhbstViewerApp(awx.App): - pass - - -def wxapp_phbstviewer(phbst_filepaths): - """Standalone application.""" - app = PhbstViewerApp() - if not phbst_filepaths: - phbst_filepaths = () - frame = PhbstViewerFrame(None, filepaths=phbst_filepaths) - app.SetTopWindow(frame) - frame.Show() - return app diff --git a/abipy/gui/popupmenus.py b/abipy/gui/popupmenus.py index 6ec7c3b97..2ce8e5fe6 100644 --- a/abipy/gui/popupmenus.py +++ b/abipy/gui/popupmenus.py @@ -1,6 +1,4 @@ """Collections of Popup menus associated to filenames.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import wx import wx.lib.dialogs as wxdg import abipy.gui.awx as awx diff --git a/abipy/gui/pseudos.py b/abipy/gui/pseudos.py deleted file mode 100644 index b79ddc493..000000000 --- a/abipy/gui/pseudos.py +++ /dev/null @@ -1,349 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, division, unicode_literals, absolute_import - -import os -import wx -import abipy.gui.awx as awx -import wx.lib.mixins.listctrl as listmix -import wx.lib.dialogs as wxdg - -from monty.string import is_string -from abipy.flowtk import PseudoParser - - -class MyListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin): - """ Mixin class to resize the last column appropriately.""" - def __init__(self, parent, **kwargs): - wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.BORDER_SUNKEN, **kwargs) - listmix.ListCtrlAutoWidthMixin.__init__(self) - - -class PseudosViewerFrame(awx.Frame): - def __init__(self, parent, pseudos, **kwargs): - super(PseudosViewerFrame, self).__init__(parent, -1, **kwargs) - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - panel = PseudoListPanel(self, pseudos) - main_sizer.Add(panel, 1, wx.EXPAND, 5) - - #hsizer = wx.BoxSizer(wx.HORIZONTAL) - - #filter_label = wx.StaticText(self, -1, "Filter:", wx.DefaultPosition, wx.DefaultSize, 0) - #filter_label.Wrap(-1) - #hsizer.Add(filter_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - ## Combobox to enter shell patterns. - #wildcard_choices = ["*", "*.nc", "*.abo", "*.log"] - #self.filter_combobox = wx.ComboBox(self, id=-1, value="*", style=wx.TE_PROCESS_ENTER, choices=wildcard_choices) - #self.filter_combobox.SetToolTipString("Shell patterns separated by |") - - #self.filter_combobox.Bind(wx.EVT_COMBOBOX, self.OnFilterComboBox) - #self.filter_combobox.Bind(wx.EVT_TEXT_ENTER, self.OnFilterComboBox) - - #hsizer.Add(self.filter_combobox, 0, wx.ALL, 5) - - #main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - #panel.SetSizerAndFit(main_sizer) - self.SetSizer(main_sizer) - self.Layout() - - -class PseudoListPanel(awx.Panel, listmix.ColumnSorterMixin): - """ - This panel shows a list of files (strings), supports column sorting - and provides specific popup menus for the different type of files - (file type detection is based on file extensions). - """ - def __init__(self, parent, pseudos, **kwargs): - """ - Args: - parent: - parent window - pseudos: - List of pseudopotentials. - """ - super(PseudoListPanel, self).__init__(parent, -1, **kwargs) - self.pseudos = pseudos - - self.BuildUi() - - def BuildUi(self): - self.pseudo_list = pseudo_list = MyListCtrl(self) - - pseudo_list.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClick) - pseudo_list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated) - - self.id2pseudo = {} - columns = self.columns = ["basename", "symbol", "Z_val", "l_max", "rcore", "type"] - - # Used to store the Max width in pixels for the data in the column. - column_widths = [awx.get_width_height(self, s)[0] for s in columns] - - for (index, colname) in enumerate(columns): - pseudo_list.InsertColumn(index, colname) - - for pseudo in self.pseudos: - entry = self.AppendPseudo(pseudo) - w = [awx.get_width_height(self, s)[0] for s in entry] - column_widths = map(max, zip(w, column_widths)) - - for (index, colname) in enumerate(columns): - pseudo_list.SetColumnWidth(index, column_widths[index]) - - # Now that the list exists we can init the other base class, see wx/lib/mixins/listctrl.py - self.itemDataMap = {pid: [getattr(pseudo, attr) for attr in self.columns] for pid, pseudo in self.id2pseudo.items()} - listmix.ColumnSorterMixin.__init__(self, len(columns)) - self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick, self.pseudo_list) - - # Pack - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(pseudo_list, 1, wx.ALL | wx.EXPAND, 5) - - self.SetSizerAndFit(sizer) - - def GetListCtrl(self): - """Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py""" - return self.pseudo_list - - def AppendPseudo(self, pseudo): - """Add a pseudo to the panel.""" - next = len(self.id2pseudo) - - # We use next as entry id because we want to be able - # to sort the columns with the mixin ColumnSorterMixin. - entry_id = next - entry = map(str, [getattr(pseudo, attr) for attr in self.columns]) - self.pseudo_list.Append(entry) - self.pseudo_list.SetItemData(next, entry_id) - self.id2pseudo[entry_id] = pseudo - - return entry - - def OnColClick(self, event): - event.Skip() - - def OnItemActivated(self, event): - currentItem = event.m_itemIndex - pseudo = self.id2pseudo[self.pseudo_list.GetItemData(currentItem)] - print(pseudo) - - wxdg.ScrolledMessageDialog(self, str(pseudo), caption=pseudo.filepath, style=wx.MAXIMIZE_BOX).Show() - - #def OnOpenPseudoFile(self, event): - # """Open the pseudopotential file in another frame.""" - # currentItem = event.m_itemIndex - # pseudo = self.id2pseudo[self.pseudo_list.GetItemData(currentItem)] - # print(pseudo) - # filepath = pseudo.filepath - # wxdg.ScrolledMessageDialog(self, str(pseudo), caption=pseudo.filepath, style=wx.MAXIMIZE_BOX).Show() - - #def OnPlotPseudo(self, event): - # """Open the pseudopotential file in another frame.""" - # currentItem = event.m_itemIndex - # pseudo = self.id2pseudo[self.pseudo_list.GetItemData(currentItem)] - # print(pseudo) - - def OnRightClick(self, event): - currentItem = event.m_itemIndex - if currentItem == -1: - return - - #pseudo = self.id2pseudo[self.pseudo_list.GetItemData(currentItem)] - #print(pseudo) - ## Open the popup menu then destroy it to avoid mem leak. - #menu = popupmenu_for_pseudo(self, pseudo) - - #if menu is not None: - # self.PopupMenu(menu, event.GetPoint()) - # menu.Destroy() - - -#class PopupMenu(wx.Menu): -# """ -# Base class for popup menus. `A PopupMenu` has a list of callback functions -# indexed by the menu title. The signature of the callback function is func(parent, filename) where -# filename is the name of the file selected in the Widget and parent is the wx -# Window that will become the parent of the new frame created by the callback. -# """ -# MENU_TITLES = OrderedDict([ -# ]) -# -# HANDLED_FILES = [] -# -# def __init__(self): -# super(PopupMenu, self).__init__() -# self._make_menu() -# -# @staticmethod -# def from_filename(filename): -# """ -# Static factory function that instanciates the appropriate subclass of `NcFilePopupMenu` -# Returns None if the extesion of filename is not supported. -# """ -# # Find the AbinitNcFile subclass associated to files. -# try: -# file_class = abifile_subclass_from_filename(filename) -# except KeyError: -# return None -# -# # Check whether a subclass handles this file.. -# # Fallback to a simple PopupMenu if no match. -# def allsubclasses(cls): -# """Returns the set of subclasses of cls.""" -# children = [cls] -# for sc in cls.__subclasses__(): -# if sc.__subclasses__(): -# for k in sc.__subclasses__(): -# children.extend(allsubclasses(k)) -# else: -# children.append(sc) -# return set(children) -# -# for cls in allsubclasses(PopupMenu): -# if cls.handle_file_class(file_class): -# return cls() -# else: -# return PopupMenu() -# -# @classmethod -# def handle_file_class(cls, file_class): -# """True if the popupmenu is associated to file_class.""" -# return file_class in cls.HANDLED_FILES -# -# def _make_menu(self): -# """Build the menu taking into account the options of the superclasses.""" -# base_classes = list(self.__class__.__bases__) + [self.__class__] -# base_classes.reverse() -# -# assert not hasattr(self, "menu_title_by_id") -# assert not hasattr(self, "menu_titles") -# self.menu_title_by_id, self.menu_titles = OrderedDict(), OrderedDict() -# -# for cls in base_classes: -# try: -# menus = cls.MENU_TITLES -# except AttributeError as exc: -# awx.WARNING("exc ",exc," for cls", cls) -# continue -# -# self.menu_titles.update(menus) -# -# for title in menus: -# self.menu_title_by_id[wx.NewId()] = title -# -# # Add sentinel for Menu separator. -# self.menu_title_by_id["separator_" + str(len(self.menu_titles))] = None -# -# for (id, title) in self.menu_title_by_id.items(): -# if title is None: -# sepid = int(id.split("_")[-1]) -# if sepid != len(self.menu_titles): -# self.AppendSeparator() -# else: -# # Register menu handlers with EVT_MENU, on the menu. -# self.Append(id, title) -# wx.EVT_MENU(self, id, self.OnMenuSelection) -# -# def set_parent(self, parent): -# """Set the parent window.""" -# self._parent = parent -# -# @property -# def parent(self): -# """Returns the parent window.""" -# try: -# return self._parent -# except AttributeError: -# awx.WARNING("Popup menu doesn't have parent") -# return None -# -# def set_target(self, target): -# """Set the target of the callback.""" -# self._target = target -# -# @property -# def target(self): -# """The target of the callback.""" -# try: -# return self._target -# except AttributeError: -# return None -# -# def _get_callback(self, title): -# return self.menu_titles[title] -# -# def OnMenuSelection(self, event): -# title = self.menu_title_by_id[event.GetId()] -# callback = self._get_callback(title) -# #print("Calling callback %s on target %s" % (callback, self.target)) -# try: -# callback(parent=self.parent, filepath=self.target) -# except: -# awx.showErrorMessage(parent=self.parent) -# -# -#class AbinitTextFilePopupMenu(PopupMenu): -# """ -# """ -# MENU_TITLES = OrderedDict([ -# ("events", showAbinitEventsFrame), -# ("properties", showFileStat), -# ("timer", showAbinitTimerFrame), -# ]) -# -# HANDLED_FILES = [AbinitLogFile, AbinitOutputFile] -# -# -#class NcFilePopupMenu(PopupMenu): -# """ -# Base class for popup menus. `A PopupMenu` has a list of callback functions -# indexed by the menu title and a list of `AbinitNcFile` associated to it. -# The signature of the callback function is func(filename, parent) where -# filename is the name of the file selected in the Widget and parent is the wx -# Window that will become the parent of the new frame created by the callback. -# -# How to subclass PopupMenu: -# -# 1. Define a new class that inherits from NcFilePopupMenu. -# -# 2. Define the callbacks in the class variable MENU_TITLES. -# Use OrderedDict to have a fixed ordering of the labels. -# -# 3. Define the class variable HANDLED_FILES with the list of -# `AbinitNcFile` subclasses associated to the popupmenu. -# -# 4. Done (most of the work is indeed done in the base class and in -# the factory function popupmenu_for_filename. -# """ -# MENU_TITLES = OrderedDict([ -# ("structure", showStructure), -# ("ncdump", showNcdumpMessage), -# ("properties", showFileStat), -# ]) -# -# HANDLED_FILES = [] -# -# -#class EbandsPopupMenu(NcFilePopupMenu): -# """Popup menu for Netcdf files that contain the electron band structure.""" -# MENU_TITLES = OrderedDict([ -# ("ePlot", ewx.showElectronBandsPlot), -# ("eDos", ewx.showElectronDosFrame), -# ("eJdos", ewx.showElectronJdosFrame), -# ]) -# -# HANDLED_FILES = [WFK_File, GSR_File] - - -def wxapp_pseudos(dirpath): - """Standalone application.""" - parser = PseudoParser() - pseudos = parser.scan_directory(dirpath) - - app = wx.App() - frame = PseudosViewerFrame(None, pseudos) - app.SetTopWindow(frame) - frame.Show() - return app diff --git a/abipy/gui/scissors.py b/abipy/gui/scissors.py deleted file mode 100644 index 3bf7166b4..000000000 --- a/abipy/gui/scissors.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, division, unicode_literals, absolute_import - -import wx - -from monty.collections import AttrDict -from abipy.gui import awx -from abipy.electrons import ScissorsBuilder - - -class ScissorsParamsDialog(wx.Dialog): - """ - This dialog prompts the user to enter the parameters for the - generations of the Scissors operator. - """ - #TODO: See - #http://www.blog.pythonlibrary.org/2012/05/05/wxpython-adding-and-removing-widgets-dynamically/ - # for how to add and remove widgets dinamically. - def __init__(self, parent, nsppol, num_domains, e0min, e0max, **kwargs): - """ - Args: - parent: - parent window. - nsppol: - Number of spins. - num_domains: - Number of domains for the scissors. - e0min: - Minimum KS energy [eV] - e0max: - Maximum KS energy [eV] - """ - assert nsppol == 1 - - super(ScissorsParamsDialog, self).__init__(parent, -1, **kwargs) - self.SetTitle("Select scissors parameters") - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - # Construct a panel for each spin. - self.panel_spin = [] - for spin in range(nsppol): - panel = ScissorsParamsPanel(self, num_domains, e0min, e0max) - self.panel_spin.append(panel) - - main_sizer.Add(panel, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - hbox = wx.BoxSizer(wx.HORIZONTAL) - - ok_button = wx.Button(self, wx.ID_OK, label='Ok') - close_button = wx.Button(self, wx.ID_CANCEL, label='Cancel') - - hbox.Add(ok_button) - hbox.Add(close_button, flag=wx.LEFT, border=5) - - main_sizer.Add(hbox, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=10) - - self.SetSizerAndFit(main_sizer) - - def GetScissorBuilderParams(self): - """Returns a `AttrDict` with the parameters required to build the scissors.""" - domains_spin, bounds_spin = [], [] - for panel in self.panel_spin: - p = panel.GetParams() - domains_spin.append(p.domains) - bounds_spin.append(p.bounds) - - return AttrDict( - domains_spin=domains_spin, - bounds_spin=bounds_spin, - ) - - -class ScissorsParamsPanel(awx.Panel): - """ - Panel with controls allowing the user to specify the - Scissors parameters for a single spin. - """ - def __init__(self, parent, num_domains, e0min, e0max, **kwargs): - """ - Args: - parent: - Parent window. - num_domains: - Number of domains. - e0min: - Minimum KS energy [eV] - e0max: - Maximum KS energy [eV] - """ - awx.Panel.__init__(self, parent, -1, **kwargs) - - self.bound_choices = ["c", "h"] - - # Enlarge the range used in SpinCtrlDouble. - self.emin = e0min - 0.1 * abs(e0min) - self.emax = e0max + 0.1 * abs(e0max) - self.num_domains = num_domains - - self.BuildUi() - - def BuildUi(self): - main_sizer = wx.BoxSizer(wx.VERTICAL) - - # List of controls. Each control is associated to a particular domain. - self._control_domains = [] - - for numdom in range(self.num_domains): - static_boxsizer = self._AddControlBox(numdom) - main_sizer.Add(static_boxsizer, 1, wx.EXPAND, 5) - - self.SetSizer(main_sizer) - self.Fit() - - def _AddControlBox(self, numdom): - static_boxsizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "Domain #%d" % numdom), wx.VERTICAL) - - vsizer1 = wx.BoxSizer(wx.VERTICAL) - - flexgrid_sizer1 = wx.FlexGridSizer(0, 4, 0, 0) - flexgrid_sizer1.AddGrowableCol(1) - flexgrid_sizer1.SetFlexibleDirection(wx.HORIZONTAL) - flexgrid_sizer1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED) - - stext1 = wx.StaticText(self, -1, "Emin:", wx.DefaultPosition, wx.DefaultSize, 0) - stext1.Wrap(-1) - flexgrid_sizer1.Add(stext1, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - min_spinctrl = wx.SpinCtrlDouble(self, id=-1, value=str(self.emin), min=self.emin, max=self.emax, inc=0.1) - flexgrid_sizer1.Add(min_spinctrl, 1, wx.ALL, 5) - - stext2 = wx.StaticText(self, -1, "Bound_type:", wx.DefaultPosition, wx.DefaultSize, 0) - stext2.Wrap(-1) - flexgrid_sizer1.Add(stext2, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - minbound_choice = wx.Choice(self, -1, wx.DefaultPosition, wx.DefaultSize, self.bound_choices, 0) - minbound_choice.SetSelection(0) - flexgrid_sizer1.Add(minbound_choice, 0, wx.ALL, 5) - - stext3 = wx.StaticText(self, -1, "Emax:", wx.DefaultPosition, wx.DefaultSize, 0) - stext3.Wrap(-1) - flexgrid_sizer1.Add(stext3, 0, wx.TOP | wx.BOTTOM | wx.LEFT | wx.ALIGN_CENTER_HORIZONTAL, 5) - - max_spinctrl = wx.SpinCtrlDouble(self, id=-1, value=str(self.emax), min=self.emin, max=self.emax, inc=0.1) - flexgrid_sizer1.Add(max_spinctrl, 1, wx.ALL, 5) - - stext4 = wx.StaticText(self, -1, "Bound_type:", wx.DefaultPosition, wx.DefaultSize, 0) - stext4.Wrap(-1) - flexgrid_sizer1.Add(stext4, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - maxbound_choice = wx.Choice(self, -1, wx.DefaultPosition, wx.DefaultSize, self.bound_choices, 0) - maxbound_choice.SetSelection(0) - flexgrid_sizer1.Add(maxbound_choice, 0, wx.ALL, 5) - - vsizer1.Add(flexgrid_sizer1, 1, wx.EXPAND, 5) - - static_boxsizer.Add(vsizer1, 1, wx.EXPAND, 5) - - class Control(AttrDict): - """Helper class that faciliates the extraction of the parameters in GetParams""" - def get_eminmax(self): - return [float(self.min_spinctrl.GetValue()), - float(self.max_spinctrl.GetValue())] - - def get_bound(self): - return [self.minbound_choice.GetStringSelection(), - self.maxbound_choice.GetStringSelection()] - - control = Control( - min_spinctrl=min_spinctrl, - minbound_choice=minbound_choice, - max_spinctrl=max_spinctrl, - maxbound_choice=maxbound_choice, - ) - - self._control_domains.append(control) - - return static_boxsizer - - def GetParams(self): - """" - Return a AttrDict with all the parameters needed to - generate the scissors operator - """ - domains = [c.get_eminmax() for c in self._control_domains] - bounds = [c.get_bound() for c in self._control_domains] - - return AttrDict( - domains=domains, - bounds=bounds, - ) - - -class ScissorsBuilderFrame(awx.Frame): - def __init__(self, parent, filepath, **kwargs): - super(ScissorsBuilderFrame, self).__init__(parent, -1, **kwargs) - - # Instanciate the object that will perform most of the work. - self.scissors_builder = ScissorsBuilder.from_file(filepath) - - self.BuildUi() - - @property - def nsppol(self): - """Number of spins.""" - return self.scissors_builder.nsppol - - @property - def e0min(self): - """Minimum KS energy (over spins)""" - return self.scissors_builder.e0min - - @property - def e0max(self): - """Maximum KS energy (over spins)""" - return self.scissors_builder.e0max - - def BuildUi(self): - main_sizer = wx.BoxSizer(wx.HORIZONTAL) - - stext = wx.StaticText(self, -1, "Numer of domains:", wx.DefaultPosition, wx.DefaultSize, 0) - stext.Wrap(-1) - main_sizer.Add(stext, 0, wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - self.numdomains_ctrl = wx.SpinCtrl(self, -1, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, - wx.SP_ARROW_KEYS, 1, 100, 1) - main_sizer.Add(self.numdomains_ctrl, 0, wx.ALL, 5) - - startfit_button = wx.Button(self, -1, "Start Fit", wx.DefaultPosition, wx.DefaultSize, 0) - startfit_button.Bind(wx.EVT_BUTTON, self.OnStartFitButton) - main_sizer.Add(startfit_button, 0, wx.ALL, 5) - - self.SetSizerAndFit(main_sizer) - - def OnStartFitButton(self, event): - """Callback that start the generation of the scissors.""" - num_domains = int(self.numdomains_ctrl.GetValue()) - - build_dialog = ScissorsParamsDialog(self, self.nsppol, num_domains, self.e0min, self.e0max) - - if build_dialog.ShowModal() == wx.ID_OK: - # Get the parameters of the scissors. - p = build_dialog.GetScissorBuilderParams() - #logger.info("scissor params", p) - - # Try the fit. - fitok = True - try: - self.scissors_builder.build(p.domains_spin, p.bounds_spin) - except: - awx.showErrorMessage(self) - fitok = False - - # Plot the results and save the current contents in the file. - if fitok: - self.scissors_builder.plotfit() - - if awx.askUser(self, "Save data?"): - saveFileDialog = wx.FileDialog(self, "Save pickle file", "", "", - "Pickle files (*.pickle)|*.pickle", - wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) - - if saveFileDialog.ShowModal() == wx.ID_OK: - savefile = saveFileDialog.GetPath() - #logger.info("About to save in %s" % savefile) - self.scissors_builder.save_data(savefile) - - saveFileDialog.Destroy() - - build_dialog.Destroy() - - -def wxapp_scissors(filepath): - app = awx.App() - ScissorsBuilderFrame(None, filepath).Show() - return app - - diff --git a/abipy/gui/sigresviewer.py b/abipy/gui/sigresviewer.py index b0dd8b746..fa8599d9b 100644 --- a/abipy/gui/sigresviewer.py +++ b/abipy/gui/sigresviewer.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import wx.lib.agw.flatnotebook as fnb diff --git a/abipy/gui/structure.py b/abipy/gui/structure.py deleted file mode 100644 index 6dbc67ae0..000000000 --- a/abipy/gui/structure.py +++ /dev/null @@ -1,99 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import wx -import abipy.gui.awx as awx - -from monty.string import is_string -from abipy.core.structure import Structure -from abipy.gui.editor import SimpleTextViewer - - -class StructureConverterFrame(wx.Frame): - """ - This frame allows the user to convert the structure to different formats (CIF, POSCAR, ...). - """ - def __init__(self, parent, obj, **kwargs): - """ - Args: - parent: - Parent window. - obj: - Structure object, filename or object with a structure attribute. - """ - super(StructureConverterFrame, self).__init__(parent, -1, **kwargs) - self._get_structure(obj) - - panel = wx.Panel(self, id=-1) - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - label = wx.StaticText(panel, -1, "Convert to:") - label.Wrap(-1) - - # list of supported formats. - formats = ["cif", "POSCAR", "cssr", "json"] - self.format_choice = wx.Choice(panel, -1, choices=formats) - self.format_choice.SetSelection(0) - - show_button = wx.Button(panel, -1, "Show", wx.DefaultPosition, wx.DefaultSize, 0) - show_button.Bind(wx.EVT_BUTTON, self.OnShow) - - save_button = wx.Button(panel, -1, "Save", wx.DefaultPosition, wx.DefaultSize, 0) - save_button.Bind(wx.EVT_BUTTON, self.OnSave) - - hsizer.Add(label, 0, wx.ALL, 5) - hsizer.Add(self.format_choice, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - hsizer.Add(show_button, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - hsizer.Add(save_button, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - main_sizer.Add(hsizer, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - str_structure = wx.TextCtrl(panel, -1, str(self.structure), style=wx.TE_MULTILINE|wx.TE_LEFT|wx.TE_READONLY) - main_sizer.Add(str_structure, 1, wx.ALL | wx.EXPAND, 5) - - panel.SetSizerAndFit(main_sizer) - - def _get_structure(self, obj): - """Extract the structure from the input object.""" - return Structure.as_structure(obj) - - @property - def format(self): - """The format specified by the user.""" - return self.format_choice.GetStringSelection() - - def _convert(self): - """Returns string with the structure converted in the user-specified format.""" - return self.structure.convert(fmt=self.format) - - def OnShow(self, event): - s = self._convert() - SimpleTextViewer(self, text=s, title=self.structure.formula).Show() - - def OnSave(self, event): - save_dialog = wx.FileDialog(self, "Save %s file" % self.format, "", "", - wildcard="%{format} files (*.{format})|*.{format}".format(format=self.format), - style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) - - if save_dialog.ShowModal() == wx.ID_CANCEL: return - - with open(save_dialog.GetPath(), "w") as fh: - fh.write(self._convert()) - - -def wxapp_structure_converter(obj): - """ - Standalong WX application for structure conversion. - - Args: - obj: - Structure object, filename or object with a structure attribute. - """ - app = awx.App() - frame = StructureConverterFrame(None, obj) - app.SetTopWindow(frame) - frame.Show() - - return app diff --git a/abipy/gui/timer.py b/abipy/gui/timer.py deleted file mode 100644 index 4881e46b6..000000000 --- a/abipy/gui/timer.py +++ /dev/null @@ -1,160 +0,0 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - -import os -import wx -import abipy.gui.awx as awx - -from collections import OrderedDict -from abipy.flowtk import AbinitTimerSection, AbinitTimerParser - - -class AbinitTimerFrame(awx.Frame): - """ - Frame to control to plot the timing data of a *single* ABINIT run. - """ - def __init__(self, parent, filepath, **kwargs): - """ - Args: - parent: - parent window - filepath: - Abinit output file. - """ - filepath = os.path.abspath(filepath) - if "title" not in kwargs: - kwargs["title"] = "Abinit Timer: %s" % os.path.basename(filepath) - - super(AbinitTimerFrame, self).__init__(parent, **kwargs) - - try: - self.timer = AbinitTimerParser() - self.timer.parse(filepath) - - except Exception as exc: - raise awx.Error(str(exc)) - - self.BuildUi() - - def BuildUi(self): - - # Set callbacks (bound methods of AbiTimerData). - self.plot_types = OrderedDict([ - ("pie", self.timer.plot_pie), - ("stacked_hist", self.timer.plot_stacked_hist), - #("raw_data", self.OnRawData), - ]) - - keys = AbinitTimerSection.NUMERIC_FIELDS - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - plot_label = wx.StaticText(self, -1, "plot type:", wx.DefaultPosition, wx.DefaultSize, 0) - plot_label.Wrap(-1) - hsizer.Add(plot_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - self.plot_cbox = wx.ComboBox(self, -1, "pie", wx.DefaultPosition, wx.DefaultSize, self.plot_types.keys(), - 0) - hsizer.Add(self.plot_cbox, 0, wx.ALL, 5) - - key_label = wx.StaticText(self, -1, "key:", wx.DefaultPosition, wx.DefaultSize, 0) - key_label.Wrap(-1) - hsizer.Add(key_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - self.key_cbox = wx.ComboBox(self, -1, "wall_time", wx.DefaultPosition, wx.DefaultSize, keys, 0) - hsizer.Add(self.key_cbox, 0, wx.ALL, 5) - - main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - plot_button = wx.Button(self, -1, "Plot", wx.DefaultPosition, wx.DefaultSize, 0) - plot_button.Bind(wx.EVT_BUTTON, self.OnClick) - main_sizer.Add(plot_button, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.SetSizerAndFit(main_sizer) - - def OnClick(self, event): - callback = self.plot_types[self.plot_cbox.GetValue()] - kwargs = dict( - key=str(self.key_cbox.GetValue()) - ) - callback(**kwargs) - - #def OnRawData(self, **kwargs): - # """Return a string with the timing data.""" - # table = self.timer.totable() - # strio = StringIO.StringIO() - # print(table, out=strio) - # return strio.getvalue() - - -class MultiTimerFrame(awx.Frame): - """ - Frame to control to plot the timing data of a *single* ABINIT run. - """ - def __init__(self, parent, timers, **kwargs): - """ - Args: - parent: - parent window - timers: - """ - super(MultiTimerFrame, self).__init__(parent, **kwargs) - self.timers = timers - - self.BuildUi() - - def BuildUi(self): - # Set callbacks (bound methods of AbinitTimer). - self.plot_types = OrderedDict([ - ("efficiency", self.timers.plot_efficiency), - ("stacked_hist", self.timers.plot_stacked_hist), - ("pie", self.timers.plot_pie), - #("raw_data", self.OnRawData), - ]) - - keys = AbinitTimerSection.NUMERIC_FIELDS - - main_sizer = wx.BoxSizer(wx.VERTICAL) - - hsizer = wx.BoxSizer(wx.HORIZONTAL) - - plot_label = wx.StaticText(self, -1, "plot type:", wx.DefaultPosition, wx.DefaultSize, 0) - plot_label.Wrap(-1) - hsizer.Add(plot_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - self.plot_cbox = wx.ComboBox(self, -1, "stacked_hist", wx.DefaultPosition, wx.DefaultSize, self.plot_types.keys(), - 0) - hsizer.Add(self.plot_cbox, 0, wx.ALL, 5) - - key_label = wx.StaticText(self, -1, "key:", wx.DefaultPosition, wx.DefaultSize, 0) - key_label.Wrap(-1) - hsizer.Add(key_label, 0, wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.BOTTOM | wx.LEFT, 5) - - self.key_cbox = wx.ComboBox(self, -1, "wall_time", wx.DefaultPosition, wx.DefaultSize, keys, 0) - hsizer.Add(self.key_cbox, 0, wx.ALL, 5) - - main_sizer.Add(hsizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5) - - plot_button = wx.Button(self, -1, "Plot", wx.DefaultPosition, wx.DefaultSize, 0) - plot_button.Bind(wx.EVT_BUTTON, self.OnClick) - main_sizer.Add(plot_button, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5) - - self.SetSizerAndFit(main_sizer) - - def OnClick(self, event): - callback = self.plot_types[self.plot_cbox.GetValue()] - kwargs = dict( - key=str(self.key_cbox.GetValue()) - ) - callback(**kwargs) - - #def OnRawData(self, **kwargs): - # strings = [] - # for timer in self.timers: - # table = timer.totable() - # strio = StringIO.StringIO() - # print(table, out=strio) - # strings.append(strio.get_value) - # return strings - diff --git a/abipy/gui/wfkviewer.py b/abipy/gui/wfkviewer.py index f213594e5..2e157f6bb 100644 --- a/abipy/gui/wfkviewer.py +++ b/abipy/gui/wfkviewer.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import wx import abipy.gui.awx as awx diff --git a/abipy/gui/wxapps.py b/abipy/gui/wxapps.py index 9e5336fc3..3e6f6f4ce 100644 --- a/abipy/gui/wxapps.py +++ b/abipy/gui/wxapps.py @@ -1,5 +1,4 @@ """This module import all WxWidgets applications provides by Abipy in a single namespace.""" -from __future__ import print_function, division, unicode_literals, absolute_import from .events import wxapp_events from .browser import wxapp_dirbrowser, wxapp_listbrowser diff --git a/abipy/gui/wxncview.py b/abipy/gui/wxncview.py index edd888641..02b4d79b0 100644 --- a/abipy/gui/wxncview.py +++ b/abipy/gui/wxncview.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import collections import wx diff --git a/abipy/integration_tests/README.md b/abipy/integration_tests/README.md index 40f8310e8..6463215d1 100644 --- a/abipy/integration_tests/README.md +++ b/abipy/integration_tests/README.md @@ -2,15 +2,16 @@ ## Requirements -- abinit >= 8.6 -- abipy, pymatgen and corresponding dependencies - pytest (framework for unit tests) +- abinit +- abipy with configured manager.yaml + ## How to run the tests Change the configuration options for the task manager reported in the file `manager.yaml` -Execute pytest in the current directory. +Execute pytest in the current directory. Results are produced in the directory in `_mytests` ## How to add a new integration test diff --git a/abipy/integration_tests/TODO.md b/abipy/integration_tests/TODO.md index 595dfe14b..d6226d3f5 100644 --- a/abipy/integration_tests/TODO.md +++ b/abipy/integration_tests/TODO.md @@ -2,76 +2,59 @@ TODO list: ## High priority -* Remove all the abiview commands that are now implemented in abiopen. - -* Add ebands.method to fix the fermi level in semiconductors - Remember that ebands is immutable - -* Use angdeg instead of rprimd in structure_to_abivars if hex or rhomboedral lattice +* Use angdeg instead of rprimd in structure_to_abivars if hex or rhomboedral lattice (tricky because input settings should be preserved) * introduce new status for tasks that are removed at runtime e.g. S_CANCELLED and handle new case in flow machinery. Be careful with pickle, status comparison and ordering though. -* DONE Check PJDOS in abinit@gitlab - -* DONE Add mpirun_args see e.g nic4 and mpirun --bind-to None - -* DONE Re-implement max_njobs in the queue using a counter local to the Launcher. - -* Fix annoying warnings about k-point sampling. +* introduce new status WAITING_FOR_RESTART + so that we don't have to restart task in callbacks -* Reorganize modules in flowtk to prepare future migration. Modules with gs_works, dfpt_works ... - qadapter package ... (postponed to v0.4) +* Check Positive gw_qprange in EPH (Fixed by Henrique) -* DONE Reintegrate AbiPy with new abivars +* Add iscf to GSR.nc so that we know if we have SCF|NSCF run. -* Almost DONE: Add support for https://mybinder.readthedocs.io/en/latest/sample_repos.html#conda-environment-with-environment-yml +* Improve exception handling in NetcdfReader -* DONE Add https://github.com/mcmtroffaes/sphinxcontrib-bibtex +* Read forces in read_structure ? Fix problem MSONable and ArrayWithUnit -* DONE Add support for DVDV, DDB in plot_networkx (but graphviz is much better) +* Automate CHANGELOG creation. -* Check Positive gw_qprange in EPH (Fixed by Henrique) +* Refactor S_QCRITICAL logic (logic injected by user, since qcritical errors are cluster-specific) -* DONE Fix problem with get_edos if we don't have enough bands +* Refactor wrappers for mrgddb and mrgdvdb (problems with subprocess when + merging large number of partial files (likely due to Popen with large stderr/stdout) -* abicomp should accept tolsym args +* Move to new version of APSscheduler -* Add support for PSML/UPF format +* BECS: 3x3 Tensor is not symmetric. Remove get_voigt_dataframe ## Medium priority -* remove phononflow - -* Add with_becs to PhononWork +* Add support for PSML/UPF format -* video with atom and hydrogen +* Add support for new Abinit9 interface (getden_path, getwfk_path, pp_dirpath and pseudos) + but remember that strings in the input should not be too long. + Use common root for pseudos, what about getwfk_path? Need to refactor treatment of string lengths in Abinit! -* ALMOST DONE: Fix travis warnings. +* Add DOS to GSR file (useful if tetra) Create Dosfile ? Fortran exec? -* DONE: Fix sphinx warnings. +* videos in README (atom and hydrogen) or screenshot based on jupyterlab * Refactor/improve Visualizer -* Read LO-TO data from PHBST.nc instead of anaddb.nc (not easy as directions should be computed by AbiPy) - * add possibility of changing amu in anaddb/abinit and API to "mix" DDB files phonon group velocities (requires extension in netcdf files). -* DONE: Autodetect presence of data for lo_to_splitting in DDB. - -* DONE Solve problem with visualize in jupyter notebooks (files should be produced in workdir) - -* DONE Change shifts default value in g0w0_with_ppmodel_inputs - * Scheduler should report info on exceptions (especially if at the end when on_all_ok is invoked) -* Replace core.tensor with pymatgen tensor (postponed to v0.4) - * Add nsppol, nspinor, nspden to HIST file (and other stuff?) -* Fix bug with SCGW and SKW interpolation reported by Ahn. +* Fix bug with SCGW and SKW interpolation reported by Ahn. Sort energies + +* Optimize SKW (slow if dense IBZ). Add possibility of initializing SKW + from nc file produced by Fortran version. * Add integration test for dilatmx error handler @@ -82,19 +65,11 @@ TODO list: * Investigate NaN issue in BECS reported by Ahn if tolvrs instead of tolwfr (tolwfr could activate nbdbuf) -* DONE: Fix possible error reported by Henrique (NscfTask from file that tries to change ngfft) - -* Add iscf to GSR.nc so that we know if we have SCF|NSCF run. - -* Add input file to NC files (?) - -* Had to increase fermie again to get correct gap in diamond treated if FD smearing +* Add phonon plot with Longitudinal/transverse character and Z q ## Low priority -* Use parser subclass to avoid boiler plate code. - -* Rationalze wrappers for mrgdddb .... (raise exception in python if clear error, retcode +* Rationalze wrappers for mrgdddb .... (raise exception in python if clear error, retcode is the returncode of the script not necessarily the retcode of the exe, need to parse log file and make sure that all scripts write log files in "abinit" format that can be read with EventsParser. @@ -104,33 +79,22 @@ TODO list: * Add python API to support discontinuous paths (Abinit is not able to handle that but python code should be agnostic -* Finalize DDK.nc (EVK.nc) - -* Remove abipy.core.mixis.AbinitOutNcFile (deprecated, will be removed in 0.4) +* Finalize DDK.nc (EVK.nc) * Fix issue with DOJO_REPORT and PAW XML files. -* DONE plot_networkx does not work with flows containing callbacks e.g. run_qptdm_flow - FIXED with graphviz - * Check xsf_write_data and visualization of potentials. * Add phbands.to_bxsf and histogram for phonon modes at a given q-point. + overlap matrix for displacements? -* Add treatment of out-of-boundary conditions in scissors operator. - -* Add possibility of specifying the max number of CPUs that can be used +* Add possibility of specifying the max number of CPUs that can be used for a flow at the level of the scheduler. * Fix problem with AbiniEvent format, src_file and scr_line (see src/67_common/scprqt.F90) Introduce an integer flag (msg_level) to be passed to msg_hndl -* Try to generalize the (very nice) approach used by Guido to handle target_dilatmx - WorkWithCondition(...) could be used to simulate a convergence study. The main - problem is how to include input_generators (__next__) while preserving data persistence - with pickle! I've already done something related to this problem in FlowCallback... - -* ABINIT abort file should not be produced if the exit is expected otherwise we +* ABINIT abort file should not be produced if the exit is expected otherwise we can have IO race conditions and ABI_CRITICAL events!!!!!!! * Add option max_num_launchers in scheduler.yml @@ -138,11 +102,9 @@ TODO list: * Add extra metadata to netcdf files (try to propagate info on space group from parser to crystal_t as well as Abinit input as string) -* Initialize job.sh with max number of MPI procs? - * Improvement in the dilatmx error handler: - [30/03/15 15:15:58] guido petretto: cmq ci sarebbe un'altra cosa che non so se avevi già considerato. + [30/03/15 15:15:58] guido petretto: cmq ci sarebbe un'altra cosa che non so se avevi già considerato. Questo non porta a errori, ma non so se è il modo più corretto di gestire la cosa, anche perché non sono sicuro di cosa faaccia abinit esattamente [30/03/15 15:16:10] guido petretto: esempio: @@ -152,35 +114,26 @@ TODO list: [30/03/15 15:19:48] guido petretto: a questo punto il job viene riavviato, ma in in c'è ancora la vecchia density e nell'input c'è irdden=1, ma la struttura è diversa -* DONE Add the fermi level to the DEN file (netcdf and fortran version) so that the NSCF run can read - it and can report this value in the final band structure. - -* DONE ecut is not reported in the GSR file. Similar problem for the k-sampling (see SIGRES.nc) - * FFTProf (use file extension and interface it with abiopen) * Create new github package for benchmarks/Abinit tests + template for new python projects. -* _repr_html_ for structure and other basic objects (pymatgen/and abipy) - matplotlib plot for structure? +* Remove GUI code. * nbjsmol (build system, refactor API?) * fatbands with SOC (waiting for Matthieu's refactoring) -* integrate improvements in skw by Nicholas. - Finalize baseclass for ElectronInterpolator - -* ALMOST DONE lobster interface from Guido - -* DONE Remove Prettytable +* Improvements in SKW. Finalize baseclass for ElectronInterpolator * context manager to change variables (e.g. autoparal) -* Cleanup and refactoring in OpticTask - -* Replace SIGRES with new fileformat based on SIGEPH (long-term) +* Cleanup and refactoring in OpticTask (Well, optic should be rewritten from scratch) -* DONE [eV] --> (ev) in title +* Replace SIGRES with new fileformat based on SIGEPH (long-term project) * Update spack recipe, add support for EasyBuild, revamp homebrew (?) + +* Classification of phonons/electrons + +* Error handler for tolwfr to increase nband / nbdduf and resubmit diff --git a/abipy/integration_tests/conftest.py b/abipy/integration_tests/conftest.py index fc1dd2e54..637f3830f 100644 --- a/abipy/integration_tests/conftest.py +++ b/abipy/integration_tests/conftest.py @@ -1,14 +1,12 @@ """Configuration file for pytest.""" -from __future__ import print_function, division - import os import pytest import yaml import copy -import abipy.abilab as abilab import abipy.flowtk as flowtk from monty.collections import AttrDict +from monty.string import marquee # Are we running on travis? on_travis = os.environ.get("TRAVIS", "False") == "true" @@ -24,7 +22,7 @@ # Read the base configuration from file with open(os.path.join(USER_CONFIG_DIR, "manager.yml")) as fh: - base_conf = yaml.load(fh) + base_conf = yaml.safe_load(fh) # Build list of configurations. _manager_confs = [] @@ -44,18 +42,16 @@ def fwp(tmpdir, request): """ Parameters used to initialize Flows. - This fixture allows us to change the |TaskManager| - so that we can easily test different configurations. + This fixture allows us to change the |TaskManager| so that we can easily test different configurations. """ # Temporary working directory fwp.workdir = str(tmpdir) # Create the TaskManager. fwp.manager = flowtk.TaskManager.from_string(request.param) - fwp.scheduler = flowtk.PyFlowScheduler.from_file(os.path.join(USER_CONFIG_DIR, "scheduler.yml")) - fwp.on_travis = on_travis + fwp.abinit_build = flowtk.AbinitBuild() return fwp @@ -73,14 +69,14 @@ def fwp(tmpdir, request): (("paral_kgb", 1),), ] + @pytest.fixture(params=_tvars_list) def tvars(request): """ Abinit variables passed to the test functions. This fixture allows us change the variables in the input files - so that we can easily test different scenarios e.g. runs with or without - paral_kgb==1 + so that we can easily test different scenarios e.g. runs with or without paral_kgb == 1 """ return AttrDict({k: v for k, v in request.param}) @@ -89,19 +85,18 @@ def pytest_addoption(parser): """Add extra command line options.""" parser.addoption('--loglevel', default="ERROR", type=str, help="Set the loglevel. Possible values: CRITICAL, ERROR (default), WARNING, INFO, DEBUG") - #parser.addoption('--manager', default=None, help="TaskManager file (defaults to the manager.yml found in cwd" def pytest_report_header(config): """Write the initial header.""" - lines = ["\n*** Integration tests for abipy + abinit + pymatgen ***\n"] + lines = [] app = lines.append - - app("Assuming the environment is properly configured:") - app("In particular, we assume that the abinit executable is in $PATH and can be executed.") - app("Change manager.yml according to your platform.") - app("Number of manager configurations: %d" % len(_manager_confs)) + app("\n" + marquee("Begin integration tests for AbiPy + abinit", mark="=")) + app("\tAssuming the environment is properly configured:") + app("\tIn particular, the abinit executable must be in $PATH.") + app("\tChange manager.yml according to your platform.") + app("\tNumber of TaskManager configurations used: %d" % len(_manager_confs)) if config.option.verbose > 0: for i, s in enumerate(_manager_confs): @@ -109,9 +104,18 @@ def pytest_report_header(config): app("TaskManager #%d" % i) app(s) app(80 * "=") - app("") + # Print info on Abinit build + abinit_build = flowtk.AbinitBuild() + print() + print(abinit_build) + print() + if not config.option.verbose: + print("Use --verbose for additional info") + else: + print(abinit_build.info) + # Initialize logging # loglevel is bound to the string value obtained from the command line argument. # Convert to upper case to allow the user to specify --loglevel=DEBUG or --loglevel=debug @@ -122,10 +126,3 @@ def pytest_report_header(config): logging.basicConfig(level=numeric_level) return lines - - -#def pytest_runtest_logreport(report): -# """Reporting hook""" -# if report.outcome == "failed": -# print("noedid", report.nodeid, "failed") - diff --git a/abipy/integration_tests/itest_bse.py b/abipy/integration_tests/itest_bse.py deleted file mode 100644 index 550657ad6..000000000 --- a/abipy/integration_tests/itest_bse.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Integration tests for BSE flows.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import pytest -import abipy.data as abidata -import abipy.abilab as abilab -import abipy.flowtk as flowtk - -from abipy.core.testing import has_abinit, has_matplotlib - -# TODO -#def itest_bse_with_mdf(fwp, tvars): -# pseudos = abidata.pseudos("14si.pspnc") -# structure = abilab.Structure.from_file(abidata.cif_file("si.cif")) -# -# kppa = scf_kppa = 1 -# nscf_nband = 6 -# nscf_ngkpt = [4,4,4] -# nscf_shiftk = [0.1, 0.2, 0.3] -# bs_loband = 2 -# bs_nband = nscf_nband -# soenergy = 0.7 -# mdf_epsinf = 12 -# max_ncpus = 1 -# ecuteps = 2 -# -# extra_abivars = dict( -# ecut=12, -# istwfk="*1", -# ) -# -# flow = flowtk.Flow(workdir=fwp.workdir, manager=fwp.manager) -# -# # BSE calculation with model dielectric function. -# from pymatgen.io.abinit.calculations import bse_with_mdf -# work = bse_with_mdf(structure, pseudos, scf_kppa, nscf_nband, nscf_ngkpt, nscf_shiftk, -# ecuteps, bs_loband, bs_nband, soenergy, mdf_epsinf, -# accuracy="normal", spin_mode="unpolarized", smearing=None, -# charge=0.0, scf_solver=None, **extra_abivars) -# -# flow.register_work(work) -# flow.allocate() -# flow.build_and_pickle_dump(abivalidate=True) -# -# for task in flow: -# task.start_and_wait() -# assert task.status == task.S_DONE -# -# flow.check_status() -# flow.show_status() -# assert all(work.finalized for work in flow) -# assert flow.all_ok -# assert flow.validate_json_schema() diff --git a/abipy/integration_tests/itest_ebands.py b/abipy/integration_tests/itest_ebands.py index d9119ad6f..8f24177ac 100644 --- a/abipy/integration_tests/itest_ebands.py +++ b/abipy/integration_tests/itest_ebands.py @@ -1,8 +1,6 @@ """ Integration tests for flows (require pytest, ABINIT and a properly configured environment) """ -from __future__ import print_function, division, unicode_literals, absolute_import - import pytest import os import numpy as np @@ -27,14 +25,14 @@ def make_scf_nscf_inputs(tvars, pp_paths, nstep=50): ecut = 4 global_vars = dict( ecut=ecut, - nband=int(nval/2), + nband=int(nval / 2), nstep=nstep, paral_kgb=tvars.paral_kgb, timopt=-1, ) if multi.ispaw: - global_vars.update(pawecutdg=2*ecut) + global_vars.update(pawecutdg=2 * ecut) multi.set_vars(global_vars) @@ -121,7 +119,9 @@ def itest_unconverged_scf(fwp, tvars): assert t1.status == t1.S_OK flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # Test inspect methods if has_matplotlib(): @@ -228,7 +228,10 @@ def itest_bandstructure_flow(fwp, tvars): #afalse(t1.can_run) flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) for task in flow.iflat_tasks(): @@ -249,6 +252,10 @@ def itest_bandstructure_flow(fwp, tvars): assert timer.plot_stacked_hist(show=False) assert timer.plot_efficiency(show=False) + df, ebands_plotter = flow.compare_ebands( + verbose=2, + with_spglib=False, printout=True, with_colors=True) + # Test CUT3D API provided by DensityFortranFile. den_path = t0.outdir.has_abiext("DEN") assert den_path @@ -270,6 +277,12 @@ def itest_bandstructure_flow(fwp, tvars): den = denfile.get_density(workdir=workdir) assert den.structure is not None and hasattr(den, "datar") + df = flow.get_dims_dataframe(printout=False, with_colors=True) + assert "natom" in df + + df = flow.compare_abivars(["ecut", "natom"], printout=True, with_colors=True) + assert np.all(df["natom"].values == 2) + def itest_bandstructure_schedflow(fwp, tvars): """ @@ -298,7 +311,10 @@ def itest_bandstructure_schedflow(fwp, tvars): assert fwp.scheduler.nlaunch == 2 flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) # The WFK files should have been removed because we called set_garbage_collector @@ -354,7 +370,10 @@ def itest_htc_bandstructure(fwp, tvars): assert fwp.scheduler.nlaunch == 3 flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) # Test if GSR files are produced and are readable. @@ -377,3 +396,45 @@ def itest_htc_bandstructure(fwp, tvars): assert gsr.ebands.has_bzmesh assert not gsr.ebands.has_bzpath gsr.ebands.get_edos() + + +def itest_metagga_ebands_flow(fwp, tvars): + """ + Test band structure calculation with meta-GGA + """ + if not fwp.abinit_build.has_libxc: + pytest.skip("itest_metagga_ebands_flow requires libxc support in Abinit.") + + from abipy.data.hgh_pseudos import HGH_TABLE + multi = abilab.MultiDataset(structure=abidata.cif_file("si.cif"), + pseudos=HGH_TABLE, ndtset=2) + + # Global variables + shiftk = [float(s) for s in "0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.5".split()] + multi.set_vars(ecut=20, diemac=12, iomode=3, ixc=-208012, prtkden=1, usekden=1) + + # Dataset 1 + multi[0].set_vars(tolvrs=1e-7) + multi[0].set_kmesh(ngkpt=[2, 2, 2], shiftk=shiftk) + + # Dataset 2 + multi[1].set_vars(tolwfr=1e-8) + multi[1].set_kpath(ndivsm=2) + + scf_input, nscf_input = multi.split_datasets() + work = flowtk.works.BandStructureWork(scf_input=scf_input, nscf_input=nscf_input) + + flow = abilab.Flow(workdir=fwp.workdir, manager=fwp.manager) + flow.register_work(work) + flow.build_and_pickle_dump(abivalidate=True) + + fwp.scheduler.add_flow(flow) + assert fwp.scheduler.start() == 0 + assert not fwp.scheduler.exceptions + #assert fwp.scheduler.nlaunch == 3 + + flow.show_status() + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) diff --git a/abipy/integration_tests/itest_flows_from_files.py b/abipy/integration_tests/itest_flows_from_files.py index 84856ad65..6206ffb9f 100644 --- a/abipy/integration_tests/itest_flows_from_files.py +++ b/abipy/integration_tests/itest_flows_from_files.py @@ -1,10 +1,7 @@ """ Integration tests for flows/works/tasks that rely on external files e.g. DEN --> NscfTask. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os -#import pytest import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk @@ -107,7 +104,9 @@ def itest_nscf_from_denfile(fwp, tvars): assert scheduler.nlaunch == 1 flow.check_status(show=True) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() assert all(work.finalized for work in flow) # The WFK files should have been removed because we called set_garbage_collector diff --git a/abipy/integration_tests/itest_frohlich_zpr.py b/abipy/integration_tests/itest_frohlich_zpr.py new file mode 100644 index 000000000..aedb566d1 --- /dev/null +++ b/abipy/integration_tests/itest_frohlich_zpr.py @@ -0,0 +1,83 @@ +"""Integration tests for phonon flows.""" + +#import numpy as np +import abipy.data as abidata +import abipy.abilab as abilab +#import abipy.flowtk as flowtk + +from abipy.dfpt.ddb import DdbFile + + +def make_scf_input(usepaw=0): + """Returns the GS input file""" + # Here we use parameters similar to https://docs.abinit.org/tests/v8/Input/t57.in + pseudos = abidata.pseudos("Ca.psp8", "O.psp8") + + structure = dict( + acell=3 * [9.136], + xred=[ + 0.0000000000, 0.0000000000, 0.0000000000, + 0.5000000000, 0.5000000000, 0.5000000000], + rprim=[ + 0 , 0.5, 0.5, + 0.5, 0 , 0.5, + 0.5, 0.5, 0], + typat=[1, 2], + natom=2, + ntypat=2, + znucl=[20, 8], + ) + + scf_input = abilab.AbinitInput(structure=structure, pseudos=pseudos) + + scf_input.set_vars( + nband=10, + nbdbuf=2, + diemac=6, + #ecut=30, # Underconverged ecut. + ecut=15, + nstep=100, + tolvrs=1e-6, + kptrlatt=[-2, 2, 2, # In cartesian coordinates, this grid is simple cubic + 2, -2, 2, + 2, 2, -2], + ) + + return scf_input + + +def itest_frohlich_zpr_flow(fwp, tvars): + """ + """ + # Build the SCF input. + scf_input = make_scf_input() + + # Build the flow. + from abipy.flowtk.effmass_works import FrohlichZPRFlow + flow = FrohlichZPRFlow.from_scf_input(fwp.workdir, scf_input, ddb_node=None, ndivsm=2, tolwfr=1e-10, + manager=fwp.manager, metadata=dict(mp_id="mp-123")) + + scheduler = flow.make_scheduler() + assert scheduler.start() == 0 + flow.check_status(show=True) + assert all(work.finalized for work in flow) + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert flow.on_all_ok_num_calls == 1 + + # Reconstruct python objects from JSON file. + data = abilab.mjson_load(flow.outdir.path_in("zprfrohl_results.json")) + + assert data["metadata"]["mp_id"] == "mp-123" + assert data["structure"].formula == 'Ca1 O1' + ebands_kpath = data["ebands_kpath"] + assert ebands_kpath.nsppol == 1 + assert ebands_kpath.kpoints.is_path + assert ebands_kpath.homos[0].kpoint == [0, 0, 0] + assert ebands_kpath.lumos[0].kpoint == [0.5, 0, 0.5] + with DdbFile.from_string(data["ddb_string"]) as ddb: + assert ddb.structure.formula == 'Ca1 O1' + assert ddb.has_bec_terms(select="at_least_one") + assert ddb.has_epsinf_terms(select="at_least_one_diagoterm") + assert data["epsinf_cart"].shape == data["eps0_cart"].shape diff --git a/abipy/integration_tests/itest_gw.py b/abipy/integration_tests/itest_gw.py index f525b8257..2a53dca73 100644 --- a/abipy/integration_tests/itest_gw.py +++ b/abipy/integration_tests/itest_gw.py @@ -1,12 +1,10 @@ """Integration tests for GW flows.""" -from __future__ import print_function, division, unicode_literals, absolute_import -import pytest import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk -from abipy.core.testing import has_abinit, has_matplotlib +#from abipy.core.testing import has_abinit, has_matplotlib def make_g0w0_inputs(ngkpt, tvars): @@ -109,7 +107,9 @@ def itest_g0w0_flow(fwp, tvars): flow.check_status(show=True) assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() scf_task = flow[0][0] nscf_task = flow[0][1] @@ -193,7 +193,9 @@ def itest_g0w0qptdm_flow(fwp, tvars): flow.show_status() assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # Test set_garbage_collector # The WFK|SCR file should have been removed because we call set_garbage_collector @@ -258,7 +260,10 @@ def itest_htc_g0w0(fwp, tvars): assert len(work[2].outdir.list_filepaths(wildcard="*SCR")) == 1 flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) #assert flow.validate_json_schema() diff --git a/abipy/integration_tests/itest_handlers.py b/abipy/integration_tests/itest_handlers.py index e80830621..0bd13b792 100644 --- a/abipy/integration_tests/itest_handlers.py +++ b/abipy/integration_tests/itest_handlers.py @@ -1,7 +1,4 @@ -from __future__ import print_function, division, unicode_literals, absolute_import -import sys -import os import pytest import abipy.data as abidata import abipy.abilab as abilab @@ -24,10 +21,10 @@ def itest_tolsymerror_handler(fwp): """ structure = dict( acell=(1.0, 1.0, 1.0), - xred = [ + xred=[ 1.0001907690, 1.0040151117, 0.0099335191, 0.2501907744, 0.2540150788, 0.2599335332], - rprim = [ + rprim=[ -6.2733366562, 0.0000000000, -3.6219126071, -6.2733366562, 0.0000000000, 3.6219126071, -4.1822244376, 5.9145585205, 0.0000000000], @@ -57,15 +54,14 @@ def itest_tolsymerror_handler(fwp): assert flow.make_scheduler().start() == 0 flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() task = flow[0][0] assert len(task.corrections) == 1 assert task.corrections[0]["event"]["@class"] == "TolSymError" - #assert task.corrections.count("TolSymError") == 1 - #assert 0 - def itest_dilatmxerror_handler(fwp): """Test the handler of DilatmxError. The test triggers: @@ -80,8 +76,8 @@ def itest_dilatmxerror_handler(fwp): in variable cell structural optimizations. """ - if fwp.on_travis: - pytest.xfail("dilatmxerror_handler is not portable and it's been disabled on travis builder!") + #if fwp.on_travis: + pytest.xfail("dilatmxerror_handler is not portable and it's been disabled!") structure = abilab.Structure.from_file(abidata.cif_file("si.cif")) structure.scale_lattice(structure.volume * 0.8) @@ -116,7 +112,9 @@ def itest_dilatmxerror_handler(fwp): assert flow.make_scheduler().start() == 0 flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() task = flow[0][0] # Don't check the number of corrections as it's not portable. diff --git a/abipy/integration_tests/itest_optic.py b/abipy/integration_tests/itest_optic.py index b04cb7b9c..20a56125b 100644 --- a/abipy/integration_tests/itest_optic.py +++ b/abipy/integration_tests/itest_optic.py @@ -1,13 +1,10 @@ """Optical spectra with Optic.""" -from __future__ import print_function, division, unicode_literals, absolute_import import pytest import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk -from abipy.core.testing import has_abinit - def make_inputs(tvars): """Construct input files.""" @@ -117,7 +114,9 @@ def itest_optic_flow(fwp, tvars): assert task.status == task.S_DONE flow.check_status(show=True) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # Optic does not support MPI with ncores > 1 hence we have to construct a manager with mpi_procs==1 shell_manager = fwp.manager.to_shell_manager(mpi_procs=1) @@ -155,7 +154,10 @@ def itest_optic_flow(fwp, tvars): assert optic_task2.status == optic_task2.S_DONE flow.check_status(show=True) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + assert all(work.finalized for work in flow) #assert flow.validate_json_schema() diff --git a/abipy/integration_tests/itest_phonons.py b/abipy/integration_tests/itest_phonons.py index 373a8a1d5..86896f217 100644 --- a/abipy/integration_tests/itest_phonons.py +++ b/abipy/integration_tests/itest_phonons.py @@ -1,15 +1,15 @@ """Integration tests for phonon flows.""" -from __future__ import print_function, division, unicode_literals, absolute_import -import pytest +import os import numpy as np -import numpy.testing.utils as nptu import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk - from abipy.core.testing import has_matplotlib +import logging +logger = logging.getLogger(__name__) + def scf_ph_inputs(tvars=None): """ @@ -85,7 +85,9 @@ def itest_phonon_flow(fwp, tvars): assert scheduler.start() == 0 flow.check_status(show=True) assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() with flow.open_final_ddb() as ddb: ddb_path = ddb.filepath @@ -135,8 +137,6 @@ def itest_phonon_flow(fwp, tvars): assert len(atask.wdir.list_filepaths(wildcard="*PHBST.nc")) == 1 assert len(atask.wdir.list_filepaths(wildcard="*PHDOS.nc")) == 1 - #assert flow.validate_json_schema() - def itest_phonon_restart(fwp): """Test the restart of phonon calculations with the scheduler.""" @@ -158,7 +158,7 @@ def itest_phonon_restart(fwp): ngkpt=[4, 4, 4], shiftk=[0, 0, 0], tolvrs=1.0e-5, - ) + ) multi = abilab.MultiDataset(structure=structure, pseudos=abidata.pseudos("13al.981214.fhi", "33as.pspnc"), ndtset=1 + len(qpoints)) @@ -178,14 +178,14 @@ def itest_phonon_restart(fwp): #rfdir 1 0 0 # Along the first reduced coordinate axis #kptopt 2 # Automatic generation of k points, taking - # i == 0 --> restart from WFK + # i == 0 --> restart from WFK if i == 1: multi[i+1].set_vars(prtwf=-1, nstep=5) # Restart with WFK and smart- io. if i == 2: multi[i+1].set_vars(prtwf=0, nstep=8) # Restart from 1DEN. Too long --> disabled. all_inps = multi.split_datasets() scf_input, ph_inputs = all_inps[0], all_inps[1:] - flow = flowtk.phonon_flow(fwp.workdir, scf_input, ph_inputs, manager=fwp.manager) + flow = phonon_flow(fwp.workdir, scf_input, ph_inputs, manager=fwp.manager) flow.set_garbage_collector() for task in flow.iflat_tasks(): @@ -195,6 +195,147 @@ def itest_phonon_restart(fwp): flow.check_status(show=True, verbose=1) assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() assert sum(task.num_restarts for task in flow.iflat_tasks()) > 0 + + +def phonon_flow(workdir, scf_input, ph_inputs, with_nscf=False, with_ddk=False, with_dde=False, + manager=None, flow_class=flowtk.PhononFlow, allocate=True): + """ + Build a :class:`PhononFlow` for phonon calculations. + Args: + workdir: Working directory. + scf_input: Input for the GS SCF run. + ph_inputs: List of Inputs for the phonon runs. + with_nscf: add an nscf task in front of al phonon tasks to make sure the q point is covered + with_ddk: add the ddk step + with_dde: add the dde step it the dde is set ddk is switched on automatically + manager: :class:`TaskManager` used to submit the jobs + Initialized from manager.yml if manager is None. + flow_class: Flow class + Returns: + :class:`Flow` object + """ + logger.critical("phonon_flow is deprecated and could give wrong results") + if with_dde: + with_ddk = True + + natom = len(scf_input.structure) + + # Create the container that will manage the different works. + flow = flow_class(workdir, manager=manager) + + # Register the first work (GS calculation) + # register_task creates a work for the task, registers it to the flow and returns the work + # the 0the element of the work is the task + scf_task = flow.register_task(scf_input, task_class=flowtk.ScfTask)[0] + + # Build a temporary work with a shell manager just to run + # ABINIT to get the list of irreducible pertubations for this q-point. + shell_manager = flow.manager.to_shell_manager(mpi_procs=1) + + if with_ddk: + logger.info('add ddk') + # TODO + # MG Warning: be careful here because one should use tolde or tolwfr (tolvrs shall not be used!) + ddk_input = ph_inputs[0].deepcopy() + ddk_input.set_vars(qpt=[0, 0, 0], rfddk=1, rfelfd=2, rfdir=[1, 1, 1]) + ddk_task = flow.register_task(ddk_input, deps={scf_task: 'WFK'}, task_class=flowtk.DdkTask)[0] + + if with_dde: + logger.info('add dde') + dde_input = ph_inputs[0].deepcopy() + dde_input.set_vars(qpt=[0, 0, 0], rfddk=1, rfelfd=2) + dde_input_idir = dde_input.deepcopy() + dde_input_idir.set_vars(rfdir=[1, 1, 1]) + dde_task = flow.register_task(dde_input, deps={scf_task: 'WFK', ddk_task: 'DDK'}, task_class=flowtk.DdeTask)[0] + + if not isinstance(ph_inputs, (list, tuple)): + ph_inputs = [ph_inputs] + + for i, ph_input in enumerate(ph_inputs): + fake_input = ph_input.deepcopy() + + # Run abinit on the front-end to get the list of irreducible pertubations. + tmp_dir = os.path.join(workdir, "__ph_run" + str(i) + "__") + w = flowtk.PhononWork(workdir=tmp_dir, manager=shell_manager) + fake_task = w.register(fake_input) + + # Use the magic value paral_rf = -1 to get the list of irreducible perturbations for this q-point. + abivars = dict( + paral_rf=-1, + rfatpol=[1, natom], # Set of atoms to displace. + rfdir=[1, 1, 1], # Along this set of reduced coordinate axis. + ) + + fake_task.set_vars(abivars) + w.allocate() + w.start(wait=True) + + # Parse the file to get the perturbations. + try: + irred_perts = flowtk.yaml_read_irred_perts(fake_task.log_file.path) + except Exception: + print("Error in %s" % fake_task.log_file.path) + raise + + logger.info(irred_perts) + + w.rmtree() + + # Now we can build the final list of works: + # One work per q-point, each work computes all + # the irreducible perturbations for a singe q-point. + + work_qpt = flowtk.PhononWork() + + if with_nscf: + # MG: Warning this code assume 0 is Gamma! + import copy + nscf_input = copy.deepcopy(scf_input) + nscf_input.set_vars(kptopt=3, iscf=-3, qpt=irred_perts[0]['qpt'], nqpt=1) + nscf_task = work_qpt.register_nscf_task(nscf_input, deps={scf_task: "DEN"}) + deps = {nscf_task: "WFQ", scf_task: "WFK"} + else: + deps = {scf_task: "WFK"} + + if with_ddk: + deps[ddk_task] = 'DDK' + + logger.info(irred_perts[0]['qpt']) + + for irred_pert in irred_perts: + #print(irred_pert) + new_input = ph_input.deepcopy() + + #rfatpol 1 1 # Only the first atom is displaced + #rfdir 1 0 0 # Along the first reduced coordinate axis + qpt = irred_pert["qpt"] + idir = irred_pert["idir"] + ipert = irred_pert["ipert"] + + # TODO this will work for phonons, but not for the other types of perturbations. + rfdir = 3 * [0] + rfdir[idir - 1] = 1 + rfatpol = [ipert, ipert] + + new_input.set_vars( + #rfpert=1, + qpt=qpt, + rfdir=rfdir, + rfatpol=rfatpol, + ) + + if with_ddk: + new_input.set_vars(rfelfd=3) + + work_qpt.register_phonon_task(new_input, deps=deps) + + flow.register_work(work_qpt) + + if allocate: flow.allocate() + + return flow diff --git a/abipy/integration_tests/itest_phonopy.py b/abipy/integration_tests/itest_phonopy.py index 01626d363..ee62ecd13 100644 --- a/abipy/integration_tests/itest_phonopy.py +++ b/abipy/integration_tests/itest_phonopy.py @@ -1,17 +1,15 @@ """ Integration tests for flows (require pytest, ABINIT and a properly configured environment) """ -from __future__ import print_function, division, unicode_literals, absolute_import - -import pytest import os +import unittest import numpy.testing.utils as nptu import abipy.data as abidata import abipy.flowtk as flowtk import abipy.flowtk.abiphonopy as abiph from abipy.abio.factories import gs_input -from abipy.core.testing import AbipyTest, has_phonopy +from abipy.core.testing import has_phonopy def itest_phonopy_flow(fwp, tvars): @@ -49,7 +47,9 @@ def itest_phonopy_flow(fwp, tvars): assert not scheduler.exceptions flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() assert all(work.finalized for work in flow) # The WFK files should have been removed because we called set_garbage_collector @@ -65,7 +65,7 @@ def itest_phonopy_flow(fwp, tvars): assert nmiss == 0 -def itest_phonopy_flow(fwp, tvars): +def itest_phonopy_gruneisen_flow(fwp, tvars): """ Testing phonopy Gruneisen flow with the scheduler. """ @@ -98,7 +98,9 @@ def itest_phonopy_flow(fwp, tvars): assert not scheduler.exceptions flow.show_status() - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # Initialial work + 3 phonopy works. assert len(flow) == 4 assert all(work.finalized for work in flow) diff --git a/abipy/integration_tests/itest_relaxations.py b/abipy/integration_tests/itest_relaxations.py index 6bde3f485..a642761df 100644 --- a/abipy/integration_tests/itest_relaxations.py +++ b/abipy/integration_tests/itest_relaxations.py @@ -1,13 +1,12 @@ """Integration tests for structural relaxations.""" -from __future__ import print_function, division, unicode_literals, absolute_import -import pytest import numpy as np +import pytest import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk -from abipy.core.testing import has_abinit, has_matplotlib +from abipy.core.testing import has_matplotlib def ion_relaxation(tvars, ntime=50): @@ -85,7 +84,9 @@ def itest_atomic_relaxation(fwp, tvars): flow.show_status() assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # post-processing tools if has_matplotlib(): @@ -168,7 +169,9 @@ def itest_relaxation_with_restart_from_den(fwp, tvars): flow.show_status() assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() # we should have (0, 1) restarts and no WFK file in outdir. for i, task in enumerate(relax_work): @@ -185,32 +188,35 @@ def itest_relaxation_with_restart_from_den(fwp, tvars): def itest_dilatmx_error_handler(fwp, tvars): - """ - Test cell relaxation with automatic restart in the presence of dilatmx error. - """ - # Build the flow - flow = flowtk.Flow(fwp.workdir, manager=fwp.manager) + """ + Test cell relaxation with automatic restart in the presence of dilatmx error. + """ + pytest.xfail("dilatmxerror_handler is not portable and it's been disabled!") + # Build the flow + flow = flowtk.Flow(fwp.workdir, manager=fwp.manager) - # Decrease the volume to trigger DilatmxError - ion_input, ioncell_input = make_ion_ioncell_inputs(tvars, dilatmx=1.01, scalevol=0.8) + # Decrease the volume to trigger DilatmxError + ion_input, ioncell_input = make_ion_ioncell_inputs(tvars, dilatmx=1.01, scalevol=0.8) - work = flowtk.Work() - work.register_relax_task(ioncell_input) + work = flowtk.Work() + work.register_relax_task(ioncell_input) - flow.register_work(work) - flow.allocate() - assert flow.make_scheduler().start() == 0 - flow.show_status() + flow.register_work(work) + flow.allocate() + assert flow.make_scheduler().start() == 0 + flow.show_status() - assert all(work.finalized for work in flow) - assert flow.all_ok + assert all(work.finalized for work in flow) + if not flow.all_ok: + flow.debug() + raise RuntimeError() - # t0 should have reached S_OK, and we should have DilatmxError in the corrections. - t0 = work[0] - assert t0.status == t0.S_OK - print(t0.corrections) - assert t0.num_corrections > 0 - assert t0.corrections[0]["event"]["@class"] == "DilatmxError" + # t0 should have reached S_OK, and we should have DilatmxError in the corrections. + t0 = work[0] + assert t0.status == t0.S_OK + print(t0.corrections) + assert t0.num_corrections > 0 + assert t0.corrections[0]["event"]["@class"] == "DilatmxError" def itest_relaxation_with_target_dilatmx(fwp, tvars): @@ -221,14 +227,18 @@ def itest_relaxation_with_target_dilatmx(fwp, tvars): # Use small value for ntime to trigger restart, then disable the output of the WFK file. ion_input, ioncell_input = make_ion_ioncell_inputs(tvars, dilatmx=1.05) - relax_work = flowtk.RelaxWork(ion_input, ioncell_input, target_dilatmx=1.03) + target_dilatmx = 1.03 + relax_work = flowtk.RelaxWork(ion_input, ioncell_input, target_dilatmx=target_dilatmx) flow.register_work(relax_work) assert flow.make_scheduler().start() == 0 flow.show_status() assert all(work.finalized for work in flow) - assert flow.all_ok + if not flow.all_ok: + flow.debug() + raise RuntimeError() + #assert relax_work.last_dilatmx <= target_dilatmx # we should have (0, 1) restarts for i, task in enumerate(relax_work): diff --git a/abipy/integration_tests/itest_scheduler.py b/abipy/integration_tests/itest_scheduler.py index f370e6516..4dd75c4d8 100644 --- a/abipy/integration_tests/itest_scheduler.py +++ b/abipy/integration_tests/itest_scheduler.py @@ -1,9 +1,6 @@ #!/usr/bin/env python """Integration tests for the scheduler.""" -from __future__ import print_function, division, unicode_literals, absolute_import -import sys -import os import abipy.data as abidata import abipy.abilab as abilab import abipy.flowtk as flowtk diff --git a/abipy/iotools/__init__.py b/abipy/iotools/__init__.py index a74de88d5..86464664c 100644 --- a/abipy/iotools/__init__.py +++ b/abipy/iotools/__init__.py @@ -1,10 +1,10 @@ # coding: utf-8 -from __future__ import print_function, division, unicode_literals, absolute_import - +# flake8: noqa import numpy as np import pymatgen.io.abinit.netcdf as ionc from monty.functools import lazy_property +from pymatgen.core.periodic_table import Element from .xsf import * from .visualizer import * @@ -15,7 +15,7 @@ class ETSF_Reader(ionc.ETSF_Reader): """ Provides high-level API to read data from netcdf files written - folloing the ETSF-IO specifications described in :cite:`Caliste2008` + following the ETSF-IO specifications described in :cite:`Caliste2008` """ def read_structure(self): @@ -64,3 +64,23 @@ def read_string(self, varname): def none_if_masked_array(self, arr): """Return None if arr is a MaskedArray else None.""" return None if np.ma.is_masked(arr) else arr + + def read_amu_symbol(self): + """ + Read atomic masses and return dictionary element_symbol --> amu. + + .. note:: + + Only netcdf files with phonon-related quantities contain this variable. + """ + for k in ("atomic_mass_units", "atomic_numbers"): + if k not in self.rootgrp.variables: + raise RuntimeError("`%s` does not contain `%s` variable." % (self.path, k)) + + # ntypat arrays + amu_list = self.read_value("atomic_mass_units") + atomic_numbers = self.read_value("atomic_numbers") + amu_z = {at: a for at, a in zip(atomic_numbers, amu_list)} + amu_symbol = {Element.from_Z(n).symbol: v for n, v in amu_z.items()} + + return amu_symbol diff --git a/abipy/iotools/cube.py b/abipy/iotools/cube.py index c2e94e3ea..2566abe91 100644 --- a/abipy/iotools/cube.py +++ b/abipy/iotools/cube.py @@ -3,7 +3,6 @@ Tools for writing cube files. See http://paulbourke.net/dataformats/cube/ and http://www.gaussian.com/g_tech/g_ur/u_cubegen.htm """ -from __future__ import print_function, division, unicode_literals, absolute_import import numpy as np @@ -72,7 +71,7 @@ def cube_read_structure_mesh_data(file): ii = 0 for line in fh: for val in line.split(): - data[ii//(ny*nz), (ii//nz)%ny, ii%nz] = float(val) + data[ii // (ny * nz), (ii // nz) % ny, ii % nz] = float(val) ii += 1 data = data / (bohr_to_angstrom ** 3) if ii != nx*ny*nz: diff --git a/abipy/iotools/tests/test_cube.py b/abipy/iotools/tests/test_cube.py index 960f1f6b6..3aff7c433 100644 --- a/abipy/iotools/tests/test_cube.py +++ b/abipy/iotools/tests/test_cube.py @@ -1,7 +1,4 @@ -#!/usr/bin/env python """Tests for cube module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import tempfile import unittest import numpy as np diff --git a/abipy/iotools/tests/test_visualizer.py b/abipy/iotools/tests/test_visualizer.py index be0911694..4b8a67bcb 100644 --- a/abipy/iotools/tests/test_visualizer.py +++ b/abipy/iotools/tests/test_visualizer.py @@ -1,8 +1,4 @@ -#!/usr/bin/env python """Tests for visualizer module""" -from __future__ import print_function, division, unicode_literals, absolute_import - -#import abipy.data as abidata from abipy.core.testing import AbipyTest from abipy.iotools.visualizer import Visualizer, Xcrysden, Vesta, V_Sim, Ovito, Avogadro diff --git a/abipy/iotools/tests/test_xsf.py b/abipy/iotools/tests/test_xsf.py index cc13de503..4e4508349 100644 --- a/abipy/iotools/tests/test_xsf.py +++ b/abipy/iotools/tests/test_xsf.py @@ -1,7 +1,4 @@ -#!/usr/bin/env python """Tests for xsf module""" -from __future__ import print_function, division - import tempfile import numpy as np import abipy.data as abidata diff --git a/abipy/iotools/visualizer.py b/abipy/iotools/visualizer.py index 63cbe787c..ce1ce52ba 100644 --- a/abipy/iotools/visualizer.py +++ b/abipy/iotools/visualizer.py @@ -1,11 +1,9 @@ # coding: utf-8 -"""Define a class used to execute a visualizer within the Python interpreter.""" -from __future__ import print_function, division, unicode_literals, absolute_import +"""Classes used to execute a visualizer within the Python interpreter.""" import sys import os import abc -import six from monty.os.path import which from monty.termcolor import cprint @@ -72,8 +70,7 @@ class VisualizerError(Exception): """Base class for Visualizer errors""" -@six.add_metaclass(abc.ABCMeta) -class Visualizer(object): +class Visualizer(metaclass=abc.ABCMeta): """ Handle the visualization of data. """ @@ -178,10 +175,9 @@ def supported_extensions(cls): def from_name(cls, appname): """Return the visualizer class from the name of the application.""" for visu in cls.__subclasses__(): - if visu.name == appname: - return visu + if visu.name == appname: return visu - raise cls.Error("appname is not among the list of supported visualizers %s " % appname) + raise cls.Error("`%s` is not among the list of supported visualizers" % appname) @classmethod def all_visunames(cls): diff --git a/abipy/iotools/xsf.py b/abipy/iotools/xsf.py index 31200fe82..168ead39c 100644 --- a/abipy/iotools/xsf.py +++ b/abipy/iotools/xsf.py @@ -1,11 +1,10 @@ # coding: utf-8 """Tools for writing Xcrysden files.""" -from __future__ import print_function, division, unicode_literals, absolute_import import numpy as np -from pymatgen.core.units import Energy, EnergyArray, ArrayWithUnit -from abipy.tools import transpose_last3dims, add_periodic_replicas +from pymatgen.core.units import Energy, EnergyArray #, ArrayWithUnit +from abipy.tools.numtools import transpose_last3dims, add_periodic_replicas __all__ = [ @@ -133,7 +132,7 @@ def xsf_write_data(file, structure, data, add_replicas=True, cplx_mode=None): for z in range(fgrid[0]): for y in range(fgrid[1]): slice_x = fdata[dg,z,y] - fwrite(' '.join(['%f' % d for d in slice_x]) ) + fwrite(' '.join(['%f' % d for d in slice_x])) fwrite('\n') fwrite('\n') diff --git a/abipy/nose.cfg b/abipy/nose.cfg deleted file mode 100644 index c900d1924..000000000 --- a/abipy/nose.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -with-doctest=1 -verbosity=2 -# Use `pip install nose-exclude` -# if nosetest fails with error: Error reading config file 'setup.cfg': no such option 'exclude-dir -exclude-dir=abipy/gui diff --git a/abipy/extensions/__init__.py b/abipy/panels/__init__.py similarity index 100% rename from abipy/extensions/__init__.py rename to abipy/panels/__init__.py diff --git a/abipy/panels/core.py b/abipy/panels/core.py new file mode 100644 index 000000000..ca460e52b --- /dev/null +++ b/abipy/panels/core.py @@ -0,0 +1,195 @@ +""""Base classes and mixins for AbiPy panels.""" + +#import abc +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from monty.functools import lazy_property + + +def sizing_mode_select(name="sizing_mode", value="scale_both"): + """ + Widget to select the value of sizing_mode. See https://panel.holoviz.org/user_guide/Customization.html + """ + return pn.widgets.Select(name=name, value=value, options=["fixed", + "stretch_width", "stretch_height", "stretch_both", + "scale_height", "scale_width", "scale_both"]) + + +class AbipyParameterized(param.Parameterized): + + verbose = param.Integer(0, bounds=(0, None), doc="Verbosity Level") + mpi_procs = param.Integer(1, bounds=(1, None), doc="Number of MPI processes used when runnin Fortran code") + #fontsize = + + #def get_global_widgets(self): + # return pn.Column(self.verbose, self.mpi_procs) + + @lazy_property + def fig_kwargs(self): + """Default arguments passed to AbiPy plot methods.""" + return dict(show=False, fig_close=True) + + @staticmethod + def _mp(fig): + return pn.pane.Matplotlib(fig, sizing_mode="scale_width") + + @staticmethod + def _df(df, disabled=True, sizing_mode="scale_width"): + return pn.widgets.DataFrame(df, disabled=disabled, sizing_mode=sizing_mode) + + +#class PanelWithNcFile(AbipyParameterized): #, metaclass=abc.ABCMeta): +# """ +# This frame allows the user to inspect the dimensions and the variables reported in a netcdf file. +# Tab showing information on the netcdf file. +# """ + + +class PanelWithElectronBands(AbipyParameterized): #, metaclass=abc.ABCMeta): + + # Bands plot + with_gaps = pnw.Checkbox(name='Show gaps') + #ebands_ylims + #ebands_e0 + # e0: Option used to define the zero of energy in the band structure plot. Possible values: + # - `fermie`: shift all eigenvalues to have zero energy at the Fermi energy (`self.fermie`). + # - Number e.g e0=0.5: shift all eigenvalues to have zero energy at 0.5 eV + # - None: Don't shift energies, equivalent to e0=0 + set_fermie_to_vbm = pnw.Checkbox(name="Set Fermie to VBM") + + plot_ebands_btn = pnw.Button(name="Plot e-bands", button_type='primary') + + # DOS plot. + edos_method = pnw.Select(name="e-DOS method", options=["gaussian", "tetra"]) + edos_step = pnw.Spinner(name='e-DOS step (eV)', value=0.1, step=0.05, start=1e-6, end=None) + edos_width = pnw.Spinner(name='e-DOS Gaussian broadening (eV)', value=0.2, step=0.05, start=1e-6, end=None) + plot_edos_btn = pnw.Button(name="Plot e-DOS", button_type='primary') + + # Fermi surface plot. + fs_viewer = pnw.Select(name="FS viewer", options=["matplotlib", "xcrysden"]) + plot_fermi_surface_btn = pnw.Button(name="Plot Fermi surface", button_type='primary') + + #@abc.abstractproperty + #def ebands(self): + # """Returns the |ElectronBands| object.""" + + def get_plot_ebands_widgets(self): + """Widgets to plot ebands.""" + return pn.Column(self.with_gaps, self.set_fermie_to_vbm, self.plot_ebands_btn) + + @param.depends('plot_ebands_btn.clicks') + def on_plot_ebands_btn(self): + """Button triggering ebands plot.""" + if self.plot_ebands_btn.clicks == 0: return + if self.set_fermie_to_vbm.value: + self.ebands.set_fermie_to_vbm() + + fig1 = self.ebands.plot(e0="fermie", ylims=None, + with_gaps=self.with_gaps.value, max_phfreq=None, fontsize=8, **self.fig_kwargs) + + fig2 = self.ebands.kpoints.plot(**self.fig_kwargs) + row = pn.Row(self._mp(fig1), self._mp(fig2)) #, sizing_mode='scale_width') + text = bkw.PreText(text=self.ebands.to_string(verbose=self.verbose)) + return pn.Column(row, text, sizing_mode='scale_width') + + def get_plot_edos_widgets(self): + """Widgets to compute e-DOS.""" + return pn.Column(self.edos_method, self.edos_step, self.edos_width, self.plot_edos_btn) + + @param.depends('plot_edos_btn.clicks') + def on_plot_edos_btn(self): + """Button triggering edos plot.""" + if self.plot_edos_btn.clicks == 0: return + edos = self.ebands.get_edos(method=self.edos_method.value, step=self.edos_step.value, width=self.edos_width.value) + fig = edos.plot(**self.fig_kwargs) + return pn.Row(self._mp(fig), sizing_mode='scale_width') + + def get_plot_fermi_surface_widgets(self): + """Widgets to compute e-DOS.""" + return pn.Column(self.fs_viewer, self.plot_fermi_surface_btn) + + @param.depends('plot_fermi_surface_btn.clicks') + def on_plot_fermi_surface_btn(self): + if self.plot_fermi_surface_btn.clicks == 0: return + + # Cache eb3d + if hasattr(self, "_eb3d"): + eb3d = self._eb3d + else: + # Build ebands in full BZ. + eb3d = self._eb3d = self.ebands.get_ebands3d() + + if self.fs_viewer.value == "matplotlib": + # Use matplotlib to plot isosurfaces corresponding to the Fermi level (default) + # Warning: requires skimage package, rendering could be slow. + fig = eb3d.plot_isosurfaces(e0="fermie", cmap=None, **self.fig_kwargs) + return pn.Row(self._mp(fig), sizing_mode='scale_width') + + else: + raise ValueError("Invalid choice: %s" % self.fs_viewer.value) + + #elif self.fs_viewer.value == "xcrysden": + # Alternatively, it's possible to export the data in xcrysden format + # and then use `xcrysden --bxsf mgb2.bxsf` + #eb3d.to_bxsf("mgb2.bxsf") + # If you have mayavi installed, try: + #eb3d.mvplot_isosurfaces() + + +class BaseRobotPanel(AbipyParameterized): + """pass""" + + +class PanelWithEbandsRobot(BaseRobotPanel): #, metaclass=abc.ABCMeta): + """ + Mixin class for panels with a robot that owns a list of of |ElectronBands| + """ + + # Widgets to plot ebands. + ebands_plotter_mode = pnw.Select(name="Plot Mode", value="gridplot", + options=["gridplot", "combiplot", "boxplot", "combiboxplot"]) # "animate", + ebands_plotter_btn = pnw.Button(name="Plot", button_type='primary') + ebands_df_checkbox = pnw.Checkbox(name='With Ebands DataFrame', value=False) + + # Widgets to plot edos. + edos_plotter_mode = pnw.Select(name="Plot Mode", value="gridplot", + options=["gridplot", "combiplot"]) + edos_plotter_btn = pnw.Button(name="Plot", button_type='primary') + + def get_ebands_plotter_widgets(self): + return pn.Column(self.ebands_plotter_mode, self.ebands_df_checkbox, self.ebands_plotter_btn) + + @param.depends("ebands_plotter_btn.clicks") + def on_ebands_plotter_btn(self): + if self.ebands_plotter_btn.clicks == 0: return + ebands_plotter = self.robot.get_ebands_plotter() + plot_mode = self.ebands_plotter_mode.value + plotfunc = getattr(ebands_plotter, plot_mode, None) + if plotfunc is None: + raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) + + fig = plotfunc(**self.fig_kwargs) + col = pn.Column(self._mp(fig), sizing_mode='scale_width') + if self.ebands_df_checkbox.value: + df = ebands_plotter.get_ebands_frame(with_spglib=True) + col.append(self._df(df)) + + return pn.Row(col, sizing_mode='scale_width') + + def get_edos_plotter_widgets(self): + return pn.Column(self.edos_plotter_mode, self.edos_plotter_btn) + + @param.depends("edos_plotter_btn.clicks") + def on_edos_plotter_btn(self): + if self.edos_plotter_btn.clicks == 0: return + edos_plotter = self.robot.get_edos_plotter() + plot_mode = self.edos_plotter_mode.value + plotfunc = getattr(edos_plotter, plot_mode, None) + if plotfunc is None: + raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) + + fig = plotfunc(**self.fig_kwargs) + return pn.Row(pn.Column(self._mp(fig)), sizing_mode='scale_width') diff --git a/abipy/panels/ddb.py b/abipy/panels/ddb.py new file mode 100644 index 000000000..105d4282d --- /dev/null +++ b/abipy/panels/ddb.py @@ -0,0 +1,160 @@ +""""Panels for DDB files.""" +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from abipy.panels.core import AbipyParameterized + + +class DdbFilePanel(AbipyParameterized): + """ + A panel to analyze a |DdbFile|. + Provides widgets to invoke anaddb and visualize the results. + """ + verbose = param.Integer(0, bounds=(0, None), doc="Verbosity Level") + mpi_procs = param.Integer(1, bounds=(1, None), doc="Number of MPI processes used in anaddb") + + nqsmall = param.Integer(10, bounds=(1, None), doc="Number of divisions for smallest vector to generate Q-mesh") + ndivsm = param.Integer(2, bounds=(1, None), doc="Number of divisions for smallest segment in q-path") + lo_to_splitting = param.ObjectSelector(default="automatic", objects=["automatic", True, False]) + chneut = param.ObjectSelector(default=1, objects=[0, 1, 2], doc="Abinit variable") + dipdip = param.ObjectSelector(default=1, objects=[0, 1], doc="Abinit variable") + asr = param.ObjectSelector(default=2, objects=[0, 1, 2], doc="Abinit variable") + units = param.ObjectSelector(default="eV", objects=["eV", "meV", "Ha", "cm-1", "Thz"], doc="Energy units") + + dos_method = param.ObjectSelector(default="tetra", objects=["tetra", "gaussian"], doc="Integration method for DOS") + temp_range = pnw.RangeSlider(name="T-range", start=0.0, end=1000, value=(0.0, 300.0), step=20) + + gamma_ev = param.Number(1e-4, bounds=(1e-20, None), doc="Phonon linewidth in eV") + w_range = pnw.RangeSlider(name="Frequency range (eV)", start=0.0, end=1.0, + value=(0.0, 0.1), step=0.001) + + get_epsinf_btn = pnw.Button(name="Compute", button_type='primary') + plot_phbands_btn = pnw.Button(name="Plot Bands and DOS", button_type='primary') + plot_eps0w_btn = pnw.Button(name="Plot eps0(omega)", button_type='primary') + + plot_vsound_btn = pnw.Button(name="Calculate speed of sound", button_type='primary') + + def __init__(self, ddb, **params): + super().__init__(**params) + self.ddb = ddb + + @param.depends('get_epsinf_btn.clicks') + def get_epsinf(self): + """Compute eps_infinity and Born effective charges.""" + if self.get_epsinf_btn.clicks == 0: return + + epsinf, becs = self.ddb.anaget_epsinf_and_becs(chneut=self.chneut, + mpi_procs=self.mpi_procs, verbose=self.verbose) + + gen = self.ddb.anaget_dielectric_tensor_generator(asr=self.asr, chneut=self.chneut, dipdip=self.dipdip, + mpi_procs=self.mpi_procs, verbose=self.verbose) + + eps0 = gen.tensor_at_frequency(w=0, gamma_ev=self.gamma_ev) + #eps0 = pnw.DataFrame(eps0.get_dataframe()) + return pn.Column(epsinf, eps0, becs) + + @param.depends('plot_eps0w_btn.clicks') + def plot_eps0w(self): + """Compute eps0(omega) and plot the results.""" + if self.plot_eps0w_btn.clicks == 0: return + gen = self.ddb.anaget_dielectric_tensor_generator(asr=self.asr, chneut=self.chneut, dipdip=self.dipdip, + mpi_procs=self.mpi_procs, verbose=self.verbose) + ws = self.w_range.value + w_max = ws[1] + if w_max == 1.0: w_max = None # Will compute w_max in plot routine from ph freqs. + + def p(component, reim): + return gen.plot(w_min=ws[0], w_max=w_max, gamma_ev=self.gamma_ev, num=500, component=component, + reim=reim, units=self.units, **self.fig_kwargs) + + # Build grid + gspec = pn.GridSpec(sizing_mode='scale_width') + gspec[0, 0] = p("diag", "re") + gspec[0, 1] = p("diag", "im") + gspec[1, 0] = p("offdiag", "re") + gspec[1, 1] = p("offdiag", "im") + gspec[2, :] = gen.get_oscillator_dataframe(reim="all", tol=1e-6) + + return gspec + + @param.depends('plot_phbands_btn.clicks') + def plot_phbands_and_phdos(self, event=None): + """Compute phonon bands and ph-DOSes and plot the results.""" + if self.plot_phbands_btn.clicks == 0: return + #self.plot_phbands_btn.button_type = "warning" + + print("Computing phbands") + with self.ddb.anaget_phbst_and_phdos_files( + nqsmall=self.nqsmall, qppa=None, ndivsm=self.ndivsm, + line_density=None, asr=self.asr, chneut=self.chneut, dipdip=self.dipdip, + dos_method=self.dos_method, lo_to_splitting=self.lo_to_splitting, + verbose=self.verbose, mpi_procs=self.mpi_procs) as g: + + phbst_file, phdos_file = g + phbands, phdos = phbst_file.phbands, phdos_file.phdos + print("Computing phbands completed") + + # Build grid + gspec = pn.GridSpec(sizing_mode='scale_width') + gspec[0, 0] = phbands.plot_with_phdos(phdos, units=self.units, **self.fig_kwargs) + gspec[0, 1] = phdos_file.plot_pjdos_type(units=self.units, exchange_xy=True, **self.fig_kwargs) + gspec[1, 0] = phdos_file.msqd_dos.plot(units=self.units, **self.fig_kwargs) + temps = self.temp_range.value + gspec[1, 1] = phdos.plot_harmonic_thermo(tstart=temps[0], tstop=temps[1], num=50, **self.fig_kwargs) + #msqd_dos.plot_tensor(**self.fig_kwargs) + #self.plot_phbands_btn.button_type = "primary" + + return gspec + + @param.depends('plot_vsound_btn.clicks') + def plot_vsound(self): + """ + Compute the speed of sound by fitting phonon frequencies + along selected directions by linear least-squares fit. + """ + if self.plot_vsound_btn.clicks == 0: return + from abipy.dfpt.vsound import SoundVelocity + sv = SoundVelocity.from_ddb(self.ddb.filepath, num_points=20, qpt_norm=0.1, + ignore_neg_freqs=True, asr=self.asr, chneut=self.chneut, dipdip=self.dipdip, + verbose=self.verbose, mpi_procs=self.mpi_procs) + + # Insert results in grid. + gspec = pn.GridSpec(sizing_mode='scale_width') + gspec[0, :1] = sv.get_dataframe() + gspec[1, :1] = sv.plot(**self.fig_kwargs) + + return gspec + + def get_panel(self): + """Return tabs with widgets to interact with the DDB file.""" + tabs = pn.Tabs(); app = tabs.append + row = pn.Row(bkw.PreText(text=self.ddb.to_string(verbose=self.verbose), sizing_mode="scale_both")) + app(("Summary", row)) + app(("Ph-bands", pn.Row( + pn.Column("# PH-bands options", + *[self.param[k] for k in ("nqsmall", "ndivsm", "asr", "chneut", "dipdip", "lo_to_splitting")], + self.temp_range, self.plot_phbands_btn), + self.plot_phbands_and_phdos) + )) + app(("BECs", pn.Row( + pn.Column("# Born effective charges options", + *[self.param[k] for k in ("asr", "chneut", "dipdip", "gamma_ev")], self.get_epsinf_btn), + self.get_epsinf) + )) + app(("eps0", pn.Row( + pn.Column("# epsilon_0", + *[self.param[k] for k in ("asr", "chneut", "dipdip", "gamma_ev")], + self.w_range, self.plot_eps0w_btn), + self.plot_eps0w) + )) + app(("Speed of Sound", pn.Row( + pn.Column("# Speed of sound options", + *[self.param[k] for k in ("asr", "chneut", "dipdip")], + self.plot_vsound_btn), + self.plot_vsound) + )) + app(("Global", pn.Column("# Global parameters", *[self.param[k] for k in ("units", "mpi_procs", "verbose")]))) + + return tabs diff --git a/abipy/panels/fatbands.py b/abipy/panels/fatbands.py new file mode 100644 index 000000000..0ec6fc85f --- /dev/null +++ b/abipy/panels/fatbands.py @@ -0,0 +1,90 @@ +"""Panels for interacting with FATBANDS.nc files.""" +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from .core import PanelWithElectronBands, PanelWithEbandsRobot + + +class FatBandsFilePanel(PanelWithElectronBands): + """ + Panel with widgets to interact with a |FatBandsFile|. + """ + def __init__(self, ncfile, **params): + super().__init__(**params) + self.ncfile = ncfile + + @property + def ebands(self): + """|ElectronBands|.""" + return self.ncfile.ebands + + def get_panel(self): + """Return tabs with widgets to interact with the FATBANDS.nc file.""" + tabs = pn.Tabs(); app = tabs.append + app(("Summary", pn.Row(bkw.PreText(text=self.ncfile.to_string(verbose=self.verbose), + sizing_mode="scale_both")))) + app(("e-Bands", pn.Row(self.get_plot_ebands_widgets(), self.on_plot_ebands_btn))) + + if self.ncfile.ebands.kpoints.is_ibz: + # Add DOS tab only if k-sampling. + app(("e-DOS", pn.Row(self.get_plot_edos_widgets(), self.on_plot_edos_btn))) + + # Plot the L-PJDOS grouped by atomic type. + #self.ncfile.plot_pjdos_typeview(lmax=lmax, **self.fig_kwargs) + # Plot the L-PJDOS grouped by L. + #self.ncfile.plot_pjdos_lview(lmax=lmax, **self.fig_kwargs) + + # Fermi surface requires a gamma-centered k-mesh + if self.ncfile.ebands.supports_fermi_surface: + app(("Fermi Surface", pn.Row(self.get_plot_fermi_surface_widgets(), self.on_plot_fermi_surface_btn))) + + elif self.ncfile.ebands.kpoints.is_path: + # NC files have contributions up to L=4 (g channel) + # but here we are intererested in s,p,d terms only so + # we use the optional argument lmax + lmax = 2 + + # Plot the electronic fatbands grouped by atomic type. + #self.ncfile.plot_fatbands_typeview(lmax=lmax, **self.fig_kwargs) + # Plot the electronic fatbands grouped by L. + #self.ncfile.plot_fatbands_lview(lmax=lmax, **self.fig_kwargs) + + else: + raise ValueError("Neither a IBZ nor k-path!") + + return tabs + + +#class FatbandsRobotPanel(PanelWithEbandsRobot): +# """ +# A Panel to interoperate with multiple GSR files. +# """ +# +# gsr_dataframe_btn = pnw.Button(name="Compute", button_type='primary') +# +# def __init__(self, robot, **params): +# super().__init__(**params) +# self.robot = robot +# +# @param.depends("gsr_dataframe_btn.clicks") +# def on_gsr_dataframe_btn(self): +# if self.gsr_dataframe_btn.clicks == 0: return +# df = self.robot.get_dataframe(with_geo=True) +# return pn.Column(self._df(df), sizing_mode='stretch_width') +# +# def get_panel(self): +# """Return tabs with widgets to interact with the |GsrRobot|.""" +# tabs = pn.Tabs(); app = tabs.append +# app(("Summary", pn.Row(bkw.PreText(text=self.robot.to_string(verbose=self.verbose), +# sizing_mode="scale_both")))) +# app(("e-Bands", pn.Row(self.get_ebands_plotter_widgets(), self.on_ebands_plotter_btn))) +# +# # Add e-DOS tab only if all ebands have k-sampling. +# if all(abifile.ebands.kpoints.is_ibz for abifile in self.robot.abifiles): +# app(("e-DOS", pn.Row(self.get_edos_plotter_widgets(), self.on_edos_plotter_btn))) +# +# app(("GSR-DataFrame", pn.Row(self.gsr_dataframe_btn, self.on_gsr_dataframe_btn))) +# +# return tabs diff --git a/abipy/panels/flows.py b/abipy/panels/flows.py new file mode 100644 index 000000000..d86e5966a --- /dev/null +++ b/abipy/panels/flows.py @@ -0,0 +1,191 @@ +""""Panels for AbiPy flows.""" +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from io import StringIO +from abipy.panels.core import AbipyParameterized + + +class FlowPanel(AbipyParameterized): + """ + """ + verbose = pn.widgets.IntSlider(start=0, end=10, step=1, value=0) + + engine = pn.widgets.Select(value="fdp", + options=['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage']) + dirtree = pn.widgets.Checkbox(name='Dirtree', value=False) + graphviz_btn = pn.widgets.Button(name="Show graph", button_type='primary') + + status_btn = pn.widgets.Button(name="Show status", button_type='primary') + history_btn = pn.widgets.Button(name="Show history", button_type='primary') + debug_btn = pn.widgets.Button(name="Debug", button_type='primary') + events_btn = pn.widgets.Button(name="Events", button_type='primary') + corrections_btn = pn.widgets.Button(name="Corrections", button_type='primary') + handlers_btn = pn.widgets.Button(name="Handlers", button_type='primary') + + vars_text = pn.widgets.TextInput(name='Abivars', placeholder='Enter list of variables separated by comma') + vars_btn = pn.widgets.Button(name="Show Variables", button_type='primary') + + dims_btn = pn.widgets.Button(name="Show Dimensions", button_type='primary') + + structures_btn = pn.widgets.Button(name="Show Structures", button_type='primary') + structures_io_checkbox = pn.widgets.CheckBoxGroup( + name='Input/Output Structure', value=['output'], options=['input', 'output'], inline=True) + + # Widgets to plot ebands. + ebands_btn = pn.widgets.Button(name="Show Ebands", button_type='primary') + ebands_plotter_mode = pnw.Select(name="Plot Mode", value="gridplot", + options=["gridplot", "combiplot", "boxplot", "combiboxplot"]) # "animate", + ebands_plotter_btn = pnw.Button(name="Plot", button_type='primary') + ebands_df_checkbox = pnw.Checkbox(name='With Ebands DataFrame', value=False) + ebands_ksamp_checkbox = pn.widgets.CheckBoxGroup( + name='Input/Output Structure', value=["with_path", "with_ibz"], options=['with_path', 'with_ibz'], inline=True) + + #TODO: Implement widget for selected_nids(flow, options), + #radio_group = pn.widgets.RadioButtonGroup( + # name='Radio Button Group', options=['Biology', 'Chemistry', 'Physics'], button_type='success') + + def __init__(self, flow, **params): + super().__init__(**params) + self.flow = flow + + @param.depends('status_btn.clicks') + def on_status_btn(self): + if self.status_btn.clicks == 0: return + stream = StringIO() + self.flow.show_status(stream=stream, verbose=self.verbose.value) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('history_btn.clicks') + def on_history_btn(self): + if self.history_btn.clicks == 0: return + stream = StringIO() + #flow.show_history(status=options.task_status, nids=selected_nids(flow, options), + # full_history=options.full_history, metadata=options.metadata) + self.flow.show_history(stream=stream) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('graphviz_btn.clicks') + def on_graphviz_btn(self): + """ + """ + if self.graphviz_btn.clicks == 0: return + node = self.flow + if self.dirtree.value: + graph = node.get_graphviz_dirtree(engine=self.engine.value) + else: + graph = node.get_graphviz(engine=self.engine.value) + return pn.Column(graph) + + @param.depends('debug_btn.clicks') + def on_debug_btn(self): + if self.debug_btn.clicks == 0: return + #TODO https://github.com/ralphbean/ansi2html ? + stream = StringIO() + #flow.debug(status=options.task_status, nids=selected_nids(flow, options)) + self.flow.debug(stream=stream) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('events_btn.clicks') + def on_events_btn(self): + if self.events_btn.clicks == 0: return + stream = StringIO() + self.flow.show_events(stream=stream) + #flow.show_events(status=options.task_status, nids=selected_nids(flow, options)) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('corrections_btn.clicks') + def on_corrections_btn(self): + if self.corrections_btn.clicks == 0: return + stream = StringIO() + self.flow.show_corrections(stream=stream) + #flow.show_corrections(status=options.task_status, nids=selected_nids(flow, options)) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('handlers_btn.clicks') + def on_handlers_btn(self): + #if self.handlers_btn.clicks == 0: return + stream = StringIO() + #if options.doc: + # flowtk.autodoc_event_handlers() + #else: + #show_events(self, status=None, nids=None, stream=sys.stdout): + self.flow.show_event_handlers(verbose=self.verbose.value, stream=stream) + return pn.Row(bkw.PreText(text=stream.getvalue())) + + @param.depends('vars_btn.clicks') + def on_vars_btn(self): + if self.vars_btn.clicks == 0: return + if not self.vars_text.value: return + varnames = [s.strip() for s in self.vars_text.value.split(",")] + df = self.flow.compare_abivars(varnames=varnames, # nids=selected_nids(flow, options), + printout=False, with_colors=False) + return pn.Row(self._df(df)) + + @param.depends('dims_btn.clicks') + def on_dims_btn(self): + if self.dims_btn.clicks == 0: return + df = self.flow.get_dims_dataframe(# nids=selected_nids(flow, options), + printout=False, with_colors=False) + return pn.Row(self._df(df), sizing_mode="scale_width") + + @param.depends('structures_btn.clicks') + def on_structures_btn(self): + if self.structures_btn.clicks == 0: return + what = "" + if "input" in self.structures_io_checkbox.value: what += "i" + if "output" in self.structures_io_checkbox.value: what += "o" + dfs = self.flow.compare_structures(nids=None, # select_nids(flow, options), + what=what, + verbose=self.verbose.value, with_spglib=False, printout=False, + with_colors=False) + + return pn.Row(self._df(dfs.lattice), sizing_mode="scale_width") + + @param.depends('ebands_plotter_btn.clicks') + def on_ebands_btn(self): + if self.ebands_plotter_btn.clicks == 0: return + + df, ebands_plotter = self.flow.compare_ebands( + nids=None, # select_nids(flow, options), + with_path="with_path" in self.ebands_ksamp_checkbox.value, + with_ibz="with_ibz" in self.ebands_ksamp_checkbox.value, + verbose=self.verbose.value, + with_spglib=False + ) + + if ebands_plotter is None: + return + + plot_mode = self.ebands_plotter_mode.value + plotfunc = getattr(ebands_plotter, plot_mode, None) + if plotfunc is None: + raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) + + fig = plotfunc(**self.fig_kwargs) + col = pn.Column(self._mp(fig)) + if self.ebands_df_checkbox.value: + col.append(self._df(df)) + + return pn.Row(col) #, sizing_mode='scale_width') + + def get_panel(self): + """Return tabs with widgets to interact with the flow.""" + tabs = pn.Tabs(); app = tabs.append + #row = pn.Row(bkw.PreText(text=self.ddb.to_string(verbose=self.verbose.value), sizing_mode="scale_both")) + app(("Status", pn.Row(self.status_btn, self.on_status_btn))) + app(("History", pn.Row(self.history_btn, self.on_history_btn))) + app(("Events", pn.Row(self.events_btn, self.on_events_btn))) + app(("Corrections", pn.Row(self.corrections_btn, self.on_corrections_btn))) + app(("Handlers", pn.Row(self.handlers_btn, self.on_handlers_btn))) + app(("Structures", pn.Row(pn.Column(self.structures_io_checkbox, self.structures_btn), self.on_structures_btn))) + ws = pn.Column(self.ebands_plotter_mode, self.ebands_ksamp_checkbox, self.ebands_df_checkbox, self.ebands_plotter_btn) + app(("Ebands", pn.Row(ws, self.on_ebands_btn))) + app(("Abivars", pn.Row(pn.Column(self.vars_text, self.vars_btn), self.on_vars_btn))) + app(("Dims", pn.Row(pn.Column(self.dims_btn), self.on_dims_btn))) + app(("Debug", pn.Row(self.debug_btn, self.on_debug_btn))) + app(("Graphviz", pn.Row(pn.Column(self.engine, self.dirtree, self.graphviz_btn), + self.on_graphviz_btn))) + return tabs diff --git a/abipy/panels/gsr.py b/abipy/panels/gsr.py new file mode 100644 index 000000000..d03ee96b7 --- /dev/null +++ b/abipy/panels/gsr.py @@ -0,0 +1,72 @@ +"""Panels for interacting with GSR files.""" +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from .core import PanelWithElectronBands, PanelWithEbandsRobot + + +class GsrFilePanel(PanelWithElectronBands): + """ + Panel with widgets to interact with a |GsrFile|. + """ + def __init__(self, gsr, **params): + super().__init__(**params) + self.gsr = gsr + + @property + def ebands(self): + """|ElectronBands|.""" + return self.gsr.ebands + + def get_panel(self): + """Return tabs with widgets to interact with the DDB file.""" + tabs = pn.Tabs(); app = tabs.append + app(("Summary", pn.Row(bkw.PreText(text=self.gsr.to_string(verbose=self.verbose), + sizing_mode="scale_both")))) + app(("e-Bands", pn.Row(self.get_plot_ebands_widgets(), self.on_plot_ebands_btn))) + + # Add DOS tab only if k-sampling. + kpoints = self.gsr.ebands.kpoints + if kpoints.is_ibz: + app(("e-DOS", pn.Row(self.get_plot_edos_widgets(), self.on_plot_edos_btn))) + + if self.gsr.ebands.supports_fermi_surface: + # Fermi surface requires gamma-centered k-mesh + app(("Fermi Surface", pn.Row(self.get_plot_fermi_surface_widgets(), self.on_plot_fermi_surface_btn))) + + return tabs + + +class GsrRobotPanel(PanelWithEbandsRobot): + """ + A Panel to interoperate with multiple GSR files. + """ + + gsr_dataframe_btn = pnw.Button(name="Compute", button_type='primary') + + def __init__(self, robot, **params): + super().__init__(**params) + self.robot = robot + + @param.depends("gsr_dataframe_btn.clicks") + def on_gsr_dataframe_btn(self): + if self.gsr_dataframe_btn.clicks == 0: return + df = self.robot.get_dataframe(with_geo=True) + return pn.Column(self._df(df), sizing_mode='stretch_width') + + def get_panel(self): + """Return tabs with widgets to interact with the |GsrRobot|.""" + tabs = pn.Tabs(); app = tabs.append + app(("Summary", pn.Row(bkw.PreText(text=self.robot.to_string(verbose=self.verbose), + sizing_mode="scale_both")))) + app(("e-Bands", pn.Row(self.get_ebands_plotter_widgets(), self.on_ebands_plotter_btn))) + + # Add e-DOS tab only if all ebands have k-sampling. + if all(abifile.ebands.kpoints.is_ibz for abifile in self.robot.abifiles): + app(("e-DOS", pn.Row(self.get_edos_plotter_widgets(), self.on_edos_plotter_btn))) + + app(("GSR-DataFrame", pn.Row(self.gsr_dataframe_btn, self.on_gsr_dataframe_btn))) + + return tabs diff --git a/abipy/panels/hist.py b/abipy/panels/hist.py new file mode 100644 index 000000000..b019e07ae --- /dev/null +++ b/abipy/panels/hist.py @@ -0,0 +1,68 @@ +""""Panels for HIST files.""" +import param +import panel as pn +import bokeh.models.widgets as bkw + +from abipy.panels.core import sizing_mode_select, AbipyParameterized + + +_what_list = ["pressure", "forces", "energy", "abc", "angles", "volume"] + + +class HistFilePanel(AbipyParameterized): + """ + Panel with widgets to interact with a |HistFile|. + """ + what_list = pn.widgets.CheckBoxGroup(name="Select", value=_what_list, options=_what_list, inline=False) + plot_relax_btn = pn.widgets.Button(name="Show relaxation", button_type="primary") + + sizing_mode = sizing_mode_select(value="fixed") + + appname = pn.widgets.Select(name="Viewer", value="ovito", options=["ovito", "mayavi", "vtk"]) + to_unit_cell = pn.widgets.Checkbox(name="To unit cell") + view_relax_btn = pn.widgets.Button(name="View relaxation", button_type="primary") + + def __init__(self, hist, **params): + super().__init__(**params) + self.hist = hist + + def get_plot_relax_widgets(self): + """Widgets to visualize the structure relaxation.""" + return pn.Column(self.what_list, self.sizing_mode, self.plot_relax_btn) + + @param.depends('plot_relax_btn.clicks') + def on_plot_relax_btn(self): + """ + Plot the evolution of structural parameters (lattice lengths, angles and volume) + as well as pressure, info on forces and total energy. + """ + if self.plot_relax_btn.clicks == 0: return + + num_plots, nrows, ncols = len(self.what_list.value), 1, 1 + if num_plots > 1: + ncols = 2 + nrows = (num_plots // ncols) + (num_plots % ncols) + + box = pn.GridBox(nrows=nrows, ncols=ncols, sizing_mode=self.sizing_mode.value) #'scale_width') + for i, what in enumerate(self.what_list.value): + irow, icol = divmod(i, ncols) + box.append(self._mp(self.hist.plot(what, title=what, **self.fig_kwargs))) + + return box + #return pn.Column(box, box.controls(jslink=True)) + + @param.depends('view_relax_btn.clicks') + def on_view_relax_btn(self): + if self.view_relax_btn.clicks == 0: return + return self.hist.visualize(appname=self.appname.value, to_unit_cell=self.to_unit_cell.value) + + def get_panel(self): + """Return tabs with widgets to interact with the DDB file.""" + tabs = pn.Tabs() + tabs.append(("Summary", pn.Row(bkw.PreText(text=self.hist.to_string(verbose=self.verbose), + sizing_mode="scale_both")))) + tabs.append(("Relaxation", pn.Row(self.get_plot_relax_widgets(), self.on_plot_relax_btn))) + tabs.append(("Visualize", pn.Row(pn.Column(self.appname, self.to_unit_cell, self.view_relax_btn), + self.on_view_relax_btn))) + + return tabs diff --git a/abipy/panels/outputs.py b/abipy/panels/outputs.py new file mode 100644 index 000000000..cb06102c3 --- /dev/null +++ b/abipy/panels/outputs.py @@ -0,0 +1,58 @@ +"""Panels for interacting with output files in text format.""" + +import param +import panel as pn +#import panel.widgets as pnw +import bokeh.models.widgets as bkw +from abipy.panels.core import AbipyParameterized + + +class AbinitOutputFilePanel(AbipyParameterized): + """ + Panel with widgets to interact with an Abinit output file. + """ + def __init__(self, outfile, **params): + super().__init__(**params) + self.outfile = outfile + + def _get_gridbox(self, what): + """Return GridBox with matplotlib for GS/DFPT SCF cycles.""" + if what == "GS": + cycles = self.outfile.get_all_gs_scf_cycles() + elif what == "DFPT": + cycles = self.outfile.get_all_d2de_scf_cycles() + else: + raise ValueError("Invalid value for what: %s" % what) + + if not cycles: return None + + num_plots, nrows, ncols = len(cycles), 1, 1 + if num_plots > 1: + ncols = 2 + nrows = (num_plots // ncols) + (num_plots % ncols) + + box = pn.GridBox(nrows=nrows, ncols=ncols) #, sizing_mode='scale_both') + for icycle, cycle in enumerate(cycles): + box.append(self._mp(cycle.plot(title="%s cycle #%d" % (what, icycle), **self.fig_kwargs))) + + return box + + def get_panel(self): + """Return tabs with widgets to interact with the Abinit output file.""" + tabs = pn.Tabs(); app = tabs.append + app(("Summary", pn.Row(bkw.PreText(text=self.outfile.to_string(verbose=self.verbose), + sizing_mode="scale_both")))) + df = self.outfile.get_dims_spginfo_dataframe().transpose() + df.index.name = "Dataset" + app(("Dims", self._df(df))) + + # Add tabs with plots for the GS/DFPT SCF cycles. + for what in ("GS", "DFPT"): + box = self._get_gridbox(what) + if box is not None: + app(("%s Cycles" % what, box)) + + #timer = self.get_timer() + #timer.plot_all(**self.fig_kwargs) + + return tabs diff --git a/abipy/panels/phonons.py b/abipy/panels/phonons.py new file mode 100644 index 000000000..68cb64829 --- /dev/null +++ b/abipy/panels/phonons.py @@ -0,0 +1,39 @@ +""""Panels for phonon-related objects.""" +import param +import panel as pn +import panel.widgets as pnw + +from abipy.panels.core import AbipyParameterized + + +class PhononBandsPlotterPanel(AbipyParameterized): + + phbands_plotter_mode = pnw.Select(name="Plot Mode", value="gridplot", + options=["gridplot", "combiplot", "boxplot", "combiboxplot"]) # "animate", + phbands_plotter_units = pnw.Select(name="Units", value="eV", + options=["eV", "meV", "Ha", "cm-1", "Thz"]) + phbands_plotter_btn = pnw.Button(name="Plot", button_type='primary') + + def __init__(self, plotter, **params): + super().__init__(**params) + self.plotter = plotter + + @param.depends("phbands_plotter_btn.clicks") + def on_phbands_plot_btn(self): + if self.phbands_plotter_btn.clicks == 0: return + plot_mode = self.phbands_plotter_mode.value + plotfunc = getattr(self.plotter, plot_mode, None) + if plotfunc is None: + raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) + + fig = plotfunc(units=self.phbands_plotter_units.value, **self.fig_kwargs) + df = self.plotter.get_phbands_frame(with_spglib=True) + return pn.Row(pn.Column(self._mp(fig), self._df(df)), sizing_mode='scale_width') + + def get_panel(self): + """Return tabs with widgets to interact with the |PhononBandsPlotter|.""" + tabs = pn.Tabs() + ws = pn.Column(self.phbands_plotter_mode, self.phbands_plotter_units, self.phbands_plotter_btn) + tabs.append(("PhbandsPlotter", pn.Row(ws, self.on_phbands_plot_btn, sizing_mode='scale_width'))) + + return tabs diff --git a/abipy/panels/structure.py b/abipy/panels/structure.py new file mode 100644 index 000000000..700f5cfba --- /dev/null +++ b/abipy/panels/structure.py @@ -0,0 +1,192 @@ +""""GUIs for structure.""" +import param +import panel as pn +import panel.widgets as pnw +import bokeh.models.widgets as bkw + +from abipy.panels.core import AbipyParameterized + + +pn.config.js_files = { + '$': 'https://code.jquery.com/jquery-3.4.1.slim.min.js', + "clipboard": "https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js", +} + + +class StructurePanel(AbipyParameterized): + """ + Panel with widgets to interact with an AbiPy Structure + """ + # Convert widgets. + output_format = pnw.Select(name="format", value="abinit", + options="abinit,cif,xsf,poscar,qe,siesta,wannier90,cssr,json".split(",")) + + # Spglib widgets + spglib_symprec = pnw.Spinner(name="symprec", value=0.01, start=0.0, end=None, step=0.01) + spglib_angtol = pnw.Spinner(name="angtol", value=5, start=0.0, end=None, step=1) + + # K-path widgets + kpath_format = pnw.Select(name="format", value="abinit", options=["abinit", "siesta", "wannier90"]) + line_density = pnw.Spinner(name="line density", value=10, step=5, start=0, end=None) + + # Viewer widgets. + viewer_btn = pnw.Button(name="View structure", button_type='primary') + viewer = pnw.Select(name="Viewer", value="vesta", + options=["vesta", "xcrysden", "vtk", "matplotlib", "mayavi"]) + + # Mp-match + mp_match_btn = pnw.Button(name="Connect to Materials Project", button_type='primary') + + # Mp-search + #mp_search_btn = pnw.Button(name="Connect to Materials Project", button_type='primary') + #mp_api_key + + # GS input generator widgets. + gs_input_btn = pnw.Button(name="Generate input", button_type='primary') + gs_type = pnw.Select(name="GS type", value="scf", options=["scf", "relax"]) + kppra = pnw.Spinner(name="kppra", value=1000, step=1000, start=0, end=None) + + label2mode = { + "unpolarized": 'unpolarized', + "polarized": 'polarized', + "anti-ferromagnetic": "afm", + "non-collinear with magnetism": "spinor", + "non-collinear, no magnetism": "spinor_nomag", + } + + spin_mode = pnw.Select(name="SpinMode", value="unpolarized", options=list(label2mode.keys())) + + def __init__(self, structure, **params): + super().__init__(**params) + self.structure = structure + + @param.depends("output_format.value") + def convert(self): + return pn.Row(bkw.PreText(text=self.structure.convert(fmt=self.output_format.value)), + sizing_mode='stretch_width') + + @param.depends("spglib_symprec.value", "spglib_angtol.value") + def spglib_summary(self): + s = self.structure.spget_summary(symprec=self.spglib_symprec.value, + angle_tolerance=self.spglib_angtol.value) + return pn.Row(bkw.PreText(text=s, sizing_mode='stretch_width')) + + @param.depends("kpath_format.value", "line_density.value") + def get_kpath(self): + s = self.structure.get_kpath_input_string(fmt=self.kpath_format.value, + line_density=self.line_density.value) + return pn.Row(bkw.PreText(text=s, sizing_mode='stretch_width')) + + @param.depends("viewer_btn.clicks") + def view(self): + if self.viewer_btn.clicks == 0: return + #return self.structure.nglview() + #return self.structure.crystaltoolkitview() + #import nglview as nv + #view = nv.demo(gui=False) + + #view = self.structure.get_jsmol() + #from ipywidgets_bokeh import IPyWidget + #view = IPyWidget(view) + #from IPython.display import display + #display(view) + #view = pn.ipywidget(view) + #return pn.Row(view) + + #from bokeh.models import ColumnDataSource + #from bokeh.io import show, curdoc + #from bokeh.models.widgets import Button, TextInput + #from bokeh.layouts import layout, widgetbox + #from jsmol_bokeh_extension import JSMol + #script_source = ColumnDataSource() + + #info = dict( + # height="100%", + # width="100%", + # serverURL="https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php", + # use="HTML5", + # j2sPath="https://chemapps.stolaf.edu/jmol/jsmol/j2s", + # script= + # "background black;load https://chemapps.stolaf.edu/jmol/jsmol-2013-09-18/data/caffeine.mol", + #) + + #applet = JSMol( + # width=600, + # height=600, + # script_source=script_source, + # info=info, + #) + + #button = Button(label='Execute') + #inp_script = TextInput(value='background white;') + + #def run_script(): + # script_source.data['script'] = [inp_script.value] + + #button.on_click(run_script) + #ly = layout([applet, widgetbox(button, inp_script)]) + #show(ly) + #curdoc().add_root(ly) + + return pn.Row(applet) + + return self.structure.visualize(appname=self.viewer.value) + + @param.depends("gs_input_btn.clicks") + def on_gs_input_btn(self): + if self.gs_input_btn.clicks == 0: return + from abipy.abio.factories import gs_input + from abipy.data.hgh_pseudos import HGH_TABLE + + gs_inp = gs_input( + self.structure, HGH_TABLE, kppa=self.kppra.value, ecut=8, + spin_mode=self.label2mode[self.spin_mode.value], + smearing=None) + gs_inp.pop_vars(("charge", "chksymbreak")) + gs_inp.set_vars(ecut="?? # depends on pseudos", nband="?? # depends on pseudos") + + if self.gs_type.value == "relax": + gs_inp.set_vars(optcell=2, ionmov=2, ecutsm=0.5, dilatmx=1.05) + + gs_inp.set_mnemonics(False) + return """ + +
    %s
    +""" % gs_inp._repr_html_() + + @param.depends("mp_match_btn.clicks") + def on_mp_match_btn(self): + if self.mp_match_btn.clicks == 0: return + from abipy.core.structure import mp_match_structure + mp = mp_match_structure(self.structure, api_key=None, endpoint=None, final=True) + if not mp.structures: + raise RuntimeError("No structure found in MP database") + + return pn.Column(self._df(mp.lattice_dataframe), sizing_mode='stretch_width') + + #@param.depends("mp_search_btn.clicks") + #def on_mp_search_btn(self): + # if self.mp_search_btn.clicks == 0: return + # from abipy.core.structure import mp_search + # chemsys_formula_id = self.stucture.formula + # mp = mp_search(chemsys_formula_id, api_key=None, endpoint=None, final=True) + # if not mp.structures: + # raise RuntimeError("No structure found in MP database") + + # return pn.Column(self._df(mp.lattice_dataframe), sizing_mode='stretch_width') + + def get_panel(self): + """Build panel with widgets to interact with the structure either in a notebook or in a bokeh app""" + tabs = pn.Tabs(); app = tabs.append + ws = pn.Column('# Spglib options', self.spglib_symprec, self.spglib_angtol) + app(("Spglib", pn.Row(ws, self.spglib_summary))) + ws = pn.Column('# K-path options', self.kpath_format, self.line_density) + app(("Kpath", pn.Row(ws, self.get_kpath))) + app(("Convert", pn.Row(pn.Column("# Convert structure", self.output_format), self.convert))) + app(("View", pn.Row(pn.Column("# Visualize structure", self.viewer, self.viewer_btn), self.view))) + ws = pn.Column('# Generate GS input', self.gs_type, self.spin_mode, self.kppra, self.gs_input_btn) + app(("GS-input", pn.Row(ws, self.on_gs_input_btn))) + app(("MP-match", pn.Row(pn.Column(self.mp_match_btn), self.on_mp_match_btn))) + + #return tabs + return pn.Column(tabs, pn.pane.HTML("")) diff --git a/abipy/scripts/abicheck.py b/abipy/scripts/abicheck.py index f64d24756..00c4e9d0d 100755 --- a/abipy/scripts/abicheck.py +++ b/abipy/scripts/abicheck.py @@ -3,7 +3,6 @@ This script checks that the options in ``manager.yml``, ``scheduler.yml``, and the environment on the local machine are properly configured. """ -from __future__ import unicode_literals, division, print_function, absolute_import import sys import os @@ -18,7 +17,9 @@ def show_managers(options): - """Print table with manager files provided by AbiPy.""" + """ + Print table with manager files provided by AbiPy. + """ from tabulate import tabulate table = [] root = os.path.join(abidata.dirpath, "managers") @@ -32,27 +33,36 @@ def show_managers(options): print(tabulate(table, headers=["hostname", "queue-type", "filepath"], tablefmt="rst")) return 0 + def get_epilog(): return """\ Usage example: abicheck.py ==> Test abipy installation and requirements. - abicheck.py --with-flow ==> Consistency check + execution of AbiPy flow. + abicheck.py -m ==> Print table with manager files provided by AbiPy. + abicheck.py -c ==> Install Yaml configuration files for manager and scheduler in ~/.abinit/abipy dir. + abicheck.py --with-flow ==> Consistency check followed by execution of AbiPy flow. """ + def get_parser(with_epilog=False): parser = argparse.ArgumentParser(epilog=get_epilog() if with_epilog else "", formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('--loglevel', default="ERROR", type=str, - help="Set the loglevel. Possible values: CRITICAL, ERROR (default), WARNING, INFO, DEBUG") + help="Set the loglevel. Possible values: CRITICAL, ERROR (default), WARNING, INFO, DEBUG") parser.add_argument('-V', '--version', action='version', version=abilab.__version__) parser.add_argument('-v', '--verbose', default=0, action='count', # -vv --> verbose=2 - help='verbose, can be supplied multiple times to increase verbosity.') + help='verbose, can be supplied multiple times to increase verbosity.') parser.add_argument('--no-colors', default=False, action="store_true", help='Disable ASCII colors.') parser.add_argument('--with-flow', default=False, action="store_true", help='Build and run small abipy flow for testing.') parser.add_argument("-m", '--show-managers', default=False, action="store_true", help="Print table with manager files provided by AbiPy.") + + parser.add_argument("-c", '--create-config', default=False, action="store_true", + help="Create yaml configuration files in ~/abinit/.abipy with predefined settings.") + parser.add_argument("-f", '--force-reinstall', default=False, action="store_true", + help="Overwrite yaml configuration files if --create-config and files already exist.") return parser @@ -87,28 +97,29 @@ def show_examples_and_exit(err_msg=None, error_code=1): termcolor.enable(False) if options.show_managers: + # Show table with manager configuration files. return show_managers(options) + if options.create_config: + # Install Yaml configuration files for manager and scheduler. + abilab.install_config_files(workdir=None, force_reinstall=options.force_reinstall) + errmsg = abilab.abicheck(verbose=options.verbose) if errmsg: cprint(errmsg, "red") cprint("TIP: Use `--show-managers` to print the manager files provided by AbiPy.\n" + "If abicheck.py is failing because it cannot find the manager.yml configuration file", - "yellow") + "yellow") return 2 else: - print() - cprint("Abipy requirements are properly configured", "green") - print() + cprint("\nAbipy requirements are properly configured\n", "green") if not options.with_flow: return 0 retcode = run_flow(options) if retcode == 0: - print() - cprint("Test flow completed successfully", "green") - print() + cprint("\nTest flow completed successfully\n", "green") return retcode @@ -181,5 +192,6 @@ def run_flow(options): return retcode + if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/scripts/abicomp.py b/abipy/scripts/abicomp.py index 195fc51cb..0509c5196 100755 --- a/abipy/scripts/abicomp.py +++ b/abipy/scripts/abicomp.py @@ -4,7 +4,6 @@ By default the script displays the results/plots in the shell. Use --ipython to start an ipython terminal or -nb to generate an ipython notebook. """ -from __future__ import unicode_literals, division, print_function, absolute_import import sys import os @@ -18,32 +17,23 @@ from abipy.tools.plotting import get_ax_fig_plt, GenericDataFilesPlotter -# Not used but could be useful to analyze densities. -def sort_paths(options): - """ - Sort input files whose name is in the form `out_TIM2_DEN` - Files are sorted by TIM index. - """ - if options.no_sort: return - names = [os.path.basename(p) for p in options.filepath] - import re - # out_TIM2_DEN - tim = re.compile(r".+_TIM(\d+)_.+") - l = [] - for p, n in zip(options.filepath, names): - m = tim.match(n) - if m: - l.append((int(m.group(1)), p)) - if not l: return - if len(l) != len(options.filepath): - print("Cannot sort input path!") - return - - options.paths = [t[1] for t in sorted(l, key=lambda t: t[0])] - print("Input files have been automatically sorted") - for i, p in enumerate(options.paths): - print("%d: %s" % (i, p)) - print("Use --no-sort to disable automatic sorting.") +def remove_disordered(structures, paths): + """Remove disordered structures and print warning message.""" + slist = [] + for s, p in zip(structures, paths): + if not s.is_ordered: + cprint("Removing disordered structure: %s found in %s" % (s.formula, p), "magenta") + else: + slist.append(s) + return slist + + +def df_to_clipboard(options, df): + """Copy dataframe to clipboard if options.clipboard.""" + if getattr(options, "clipboard", False): + cprint("Copying dataframe to the system clipboard.", "green") + cprint("This can be pasted into Excel, for example", "green") + df.to_clipboard() def abiview_fields(options): @@ -71,7 +61,6 @@ def abicomp_structure(options): nb.cells.extend([ nbv.new_code_cell("""\ -from __future__ import print_function, division, unicode_literals, absolute_import import sys import os @@ -97,17 +86,17 @@ def abicomp_structure(options): cmd = "jupyter notebook %s" % nbpath return os.system(cmd) - dfs = abilab.dataframes_from_structures(paths, index=index) + dfs = abilab.dataframes_from_structures(paths, index=index, + symprec=options.symprec, angle_tolerance=options.angle_tolerance) if options.ipython: import IPython IPython.embed(header="Type `dfs` in the terminal and use to list its methods", dfs=dfs) else: - print("File list:") - for i, p in enumerate(paths): - print("%d %s" % (i, p)) - print() + print("Spglib options: symprec=", options.symprec, "angle_tolerance=", options.angle_tolerance) abilab.print_dataframe(dfs.lattice, title="Lattice parameters:") + df_to_clipboard(options, dfs.lattice) + if options.verbose: abilab.print_dataframe(dfs.coords, title="Atomic positions (columns give the site index):") @@ -121,7 +110,6 @@ def compare_structures(options): print("You need more than one structure to compare!") return 1 - structures = [] try: structures = [abilab.Structure.from_file(p) for p in paths] except Exception as ex: @@ -146,6 +134,45 @@ def compare_structures(options): pprint(m.as_dict()) +def abicomp_spg(options): + """ + Compare the space group found by Abinit with the spglib results + for a set of crystalline structure(s) read from FILE(s). + """ + try: + structures = [abilab.Structure.from_file(p) for p in options.paths] + except Exception as ex: + print("Error reading structures from files. Are they in the right format?") + print(str(ex)) + return 1 + + # Remove disordered structures. + structures = remove_disordered(structures, options.paths) + + rows, index = [], [] + symprec, angle_tolerance = options.symprec, options.angle_tolerance + for structure in structures: + index.append(structure.formula) + # Call Abinit + row = structure.abiget_spginfo(tolsym=options.tolsym, pre="abi_") + # Call spglib. + spglib_symbol, spglib_number = structure.get_space_group_info(symprec=symprec, angle_tolerance=angle_tolerance) + spglib_lattice_type = structure.spget_lattice_type(symprec=symprec, angle_tolerance=angle_tolerance) + row.update(spglib_symbol=spglib_symbol, spglib_number=spglib_number, spglib_lattice=spglib_lattice_type) + rows.append(row) + + import pandas as pd + df = pd.DataFrame(rows, index=index, columns=list(rows[0].keys()) if rows else None) + + print("Spglib options: symprec=", options.symprec, "angle_tolerance=", options.angle_tolerance) + print("Abinit options: tolsym=", options.tolsym) + print("") + abilab.print_dataframe(df, title="Spacegroup found by Abinit and Spglib:") + df_to_clipboard(options, df) + + return 0 + + def abicomp_mp_structure(options): """ Compare the crystalline structure(s) read from FILE with the one(s) @@ -182,7 +209,10 @@ def _compare_with_database(options): if r.structures: if options.notebook: new = r.add_entry(this_structure, "this") - retcode += new.make_and_open_notebook(foreground=options.foreground) + retcode += new.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) + else: print() dfs = abilab.dataframes_from_structures(r.structures + [this_structure], index=r.ids + ["this"]) @@ -222,6 +252,7 @@ def abicomp_xrd(options): annotate_peaks=not options.no_annotate_peaks, tight_layout=True) return 0 + def abicomp_data(options): """ Compare results stored in multiple files with data in tabular format. @@ -245,12 +276,14 @@ def abicomp_ebands(options): plotter=plotter) elif options.notebook: - plotter.make_and_open_notebook(foreground=options.foreground) - + plotter.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: # Print pandas Dataframe. - frame = plotter.get_ebands_frame() - abilab.print_dataframe(frame) + df = plotter.get_ebands_frame() + abilab.print_dataframe(df) + df_to_clipboard(options, df) # Optionally, print info on gaps and their location if not options.verbose: @@ -282,7 +315,9 @@ def abicomp_edos(options): plotter=plotter) elif options.notebook: - plotter.make_and_open_notebook(foreground=options.foreground) + plotter.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) elif options.expose: plotter.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, @@ -319,15 +354,16 @@ def abicomp_phbands(options): plotter=plotter) elif options.notebook: - plotter.make_and_open_notebook(foreground=options.foreground) + plotter.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) elif options.expose: plotter.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, verbose=options.verbose) else: # Print pandas Dataframe. - frame = plotter.get_phbands_frame() - abilab.print_dataframe(frame) + abilab.print_dataframe(plotter.get_phbands_frame()) # Optionally, print info on gaps and their location if not options.verbose: @@ -336,8 +372,11 @@ def abicomp_phbands(options): for phbands in plotter.phbands_list: print(phbands) - # Here I select the plot method to call. - if options.plot_mode != "None": + # Select the plot method to call. + if options.plot_mode == "panel": + plotter.get_panel().show() + + elif options.plot_mode != "None": plotfunc = getattr(plotter, options.plot_mode, None) if plotfunc is None: raise ValueError("Don't know how to handle plot_mode: %s" % options.plot_mode) @@ -363,7 +402,9 @@ def abicomp_phdos(options): verbose=options.verbose) elif options.notebook: - plotter.make_and_open_notebook(foreground=options.foreground) + plotter.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: # Optionally, print info on gaps and their location @@ -408,7 +449,6 @@ def abicomp_getattr(options): if options.plot and len(values) == len(options.paths[1:]): # Plot values. - ax, fig, plt = get_ax_fig_plt() xs = np.arange(len(options.paths[1:])) ax.plot(xs, values) @@ -449,6 +489,13 @@ def abicomp_ddb(options): return _invoke_robot(options) +def abicomp_anaddb(options): + """ + Compare multiple anaddb.nc files. + """ + return _invoke_robot(options) + + def abicomp_phbst(options): """ Compare multiple PHBST.nc files. @@ -484,49 +531,44 @@ def abicomp_a2f(options): return _invoke_robot(options) -def abicomp_sigeph(options): +def abicomp_gkq(options): """ - Compare multiple SIGEPH files. + Compare multiple GKQ files with EPH matrix elements for a given q-point. """ - return _invoke_robot(options) + if options.diff: + robot = _build_robot(options, trim_paths=True) + robot.plot_gkq2_diff() + else: + return _invoke_robot(options) -def abicomp_abiwan(options): + +def abicomp_wrmax(options): """ - Compare multiple ABIWAN files. + Compare multiple WRmax files with first order potential in real-space. """ return _invoke_robot(options) -def dataframe_from_pseudos(pseudos, index=None): +def abicomp_v1qavg(options): + """ + Compare multiple V1QAVG files with the average of the DFPT V1 potentials as function of q-point. """ - Build pandas dataframe with the most important info associated to - a list of pseudos or a list of objects that can be converted into pseudos. + return _invoke_robot(options) - Args: - pseudos: List of objects that can be converted to pseudos. - index: Index of the dataframe. - Return: - pandas Dataframe. +def abicomp_sigeph(options): + """ + Compare multiple SIGEPH files storing the e-ph self-energy. """ - from abipy.flowtk import PseudoTable - pseudos = PseudoTable.as_table(pseudos) + return _invoke_robot(options) - import pandas as pd - from collections import OrderedDict - attname = ["Z_val", "l_max", "l_local", "nlcc_radius", "xc", "supports_soc", "type"] - rows = [] - for p in pseudos: - row = OrderedDict([(k, getattr(p, k, None)) for k in attname]) - row["ecut_normal"], row["pawecutdg_normal"] = None, None - if p.has_hints: - hint = p.hint_for_accuracy(accuracy="normal") - row["ecut_normal"] = hint.ecut - if hint.pawecutdg: row["pawecutdg_normal"] = hint.pawecutdg - rows.append(row) - return pd.DataFrame(rows, index=index, columns=list(rows[0].keys()) if rows else None) +def abicomp_abiwan(options): + """ + Compare multiple ABIWAN files. + """ + return _invoke_robot(options) def abicomp_pseudos(options): @@ -534,26 +576,21 @@ def abicomp_pseudos(options): # Make sure entries in index are unique. index = [os.path.basename(p) for p in options.paths] if len(index) != len(set(index)): index = [os.path.relpath(p) for p in options.paths] + from abipy.electrons.psps import dataframe_from_pseudos df = dataframe_from_pseudos(options.paths, index=index) abilab.print_dataframe(df, sortby="Z_val") return 0 -def _invoke_robot(options): - """ - Analyze multiple files with a robot. Support list of files and/or - list of directories passed on the CLI.. - - By default, the script with call `robot.to_string(options.verbose)` to print info to terminal. - For finer control, use --ipy to start an ipython console to interact with the robot directly - or --nb to generate a jupyter notebook. - """ +def _build_robot(options, trim_paths=False): + """Build robot instance from CLI options.""" robot_cls = abilab.Robot.class_for_ext(options.command.upper()) # To define an Help action # http://stackoverflow.com/questions/20094215/argparse-subparser-monolithic-help-output?rq=1 paths = options.paths - #print(paths) + if options.verbose > 1: + print("In _invoke_robot with paths", paths) if os.path.isdir(paths[0]): # Assume directory. @@ -573,22 +610,46 @@ def _invoke_robot(options): cprint("Ignoring %s. Neither file or directory." % str(p), "red") if len(robot) == 0: - cprint("Warning: robot is empty. No file found", "red") - return 1 + raise RuntimeError("Empty robot --> No file associated to this robot has been found") + + if trim_paths: robot.trim_paths() + return robot + + +def _invoke_robot(options): + """ + Analyze multiple files with a robot. Support list of files and/or list of directories passed on the CLI. + + By default, the script with call `robot.to_string(options.verbose)` to print info to terminal. + For finer control, use --ipy to start an ipython console to interact with the robot directly + or --nb to generate a jupyter notebook. + """ + robot = _build_robot(options) if options.notebook: - robot.make_and_open_notebook(foreground=options.foreground) + robot.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) + + elif options.panel: + try: + import panel # noqa: F401 + except ImportError as exc: + cprint("Use `conda install panel` or `pip install panel` to install the python package.", "red") + raise exc + + robot.get_panel().show() + return 0 elif options.print or options.expose: robot.trim_paths() - #df = robot.get_params_dataframe() - #abilab.print_dataframe(df, title="Output of robot.get_params_dataframe():") - # Print dataframe if robot provides get_dataframe method. if hasattr(robot, "get_dataframe"): try: df = robot.get_dataframe() abilab.print_dataframe(df, title="Output of robot.get_dataframe():") + df_to_clipboard(options, df) + except Exception as exc: cprint("Exception:\n%s\n\nwhile invoking get_dataframe. Falling back to to_string" % str(exc), "red") print(robot.to_string(verbose=options.verbose)) @@ -695,7 +756,9 @@ def abicomp_time(options): import IPython IPython.start_ipython(argv=[], user_ns={"parser": parser}) elif options.notebook: - parser.make_and_open_notebook(foreground=options.foreground) + parser.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: parser.plot_all() @@ -712,6 +775,7 @@ def get_epilog(): abicomp.py structure */*/outdata/out_GSR.nc => Compare structures in multiple files. Use `--group` to compare for similarity. + abicomp.py spg si.cif out_GSR.nc => Compare spacegroup(s) found by Abinit and spglib. abicomp.py hist FILE(s) => Compare final structures read from HIST.nc files. abicomp.py mp_structure FILE(s) => Compare structure(s) read from FILE(s) with the one(s) given in the materials project database. @@ -726,6 +790,9 @@ def get_epilog(): abicomp.py ebands out1_GSR.nc out2_WFK.nc => Plot electron bands on a grid (Use `-p` to change plot mode) abicomp.py ebands *_GSR.nc -ipy => Build plotter object and start ipython console. abicomp.py ebands *_GSR.nc -nb => Interact with the plotter in the jupyter notebook. + abicomp.py ebands `find . -name "*_GSR.nc"` -c = Find all GSR.nc files startign from current working directory + Copy dataframe to the system clipboard. + This can be pasted into Excel, for example abicomp.py edos *_WFK.nc -nb => Compare electron DOS in the jupyter notebook. abicomp.py optic DIR -nb => Compare optic results in the jupyter notebook. abicomp.py abiwan *_ABIWAN.nc --expose => Compare ABIWAN results, produce matplotlib figures. @@ -734,17 +801,26 @@ def get_epilog(): # Phonons ######### - abicomp.py phbands *_PHBST.nc -nb => Compare phonon bands in the jupyter notebook. + abicomp.py phbands *_PHBST.nc -p gridplot => Compare phonon bands with matplotlib grid. + abicomp.py phbands *_PHBST.nc -p panel => Compare phonon bands in the panel dashboard (GUI) abicomp.py phbst *_PHBST.nc -ipy => Compare phonon bands with robot in ipython terminal. abicomp.py phdos *_PHDOS.nc -nb => Compare phonon DOSes in the jupyter notebook. abicomp.py ddb outdir1 outdir2 out_DDB -nb => Analyze all DDB files in directories outdir1, outdir2 and out_DDB file. +############### +# Anaddb netcdf +############### + + abicomp anaddb tutorespfn_telast_2-telast_3/anaddb.nc + ######### # E-PH ######### abicomp.py a2f *_A2F.nc -nb => Compare A2f results in the jupyter notebook. abicomp.py sigeph *_SIGEPH.nc -nb => Compare Fan-Migdal self-energy in the jupyter notebook. + abicomp.py gkq out1_GKQ.nc out1_GKQ.nc -d => Plot difference between matrix elements (supports 2+ files). + abicomp.py v1qavg out_V1QAVG.nc => Compare V1QAVG files. ######## # GW/BSE @@ -835,9 +911,32 @@ def get_parser(with_epilog=False): copts_parser.add_argument('--loglevel', default="ERROR", type=str, help="Set the loglevel. Possible values: CRITICAL, ERROR (default), WARNING, INFO, DEBUG.") + # Parent parser for commands calling spglib. + spgopt_parser = argparse.ArgumentParser(add_help=False) + spgopt_parser.add_argument('--symprec', default=1e-3, type=float, + help="""\ +symprec (float): Tolerance for symmetry finding. Defaults to 1e-3, +which is fairly strict and works well for properly refined structures with atoms in the proper symmetry coordinates. +For structures with slight deviations from their proper atomic positions (e.g., structures relaxed with electronic structure +codes), a looser tolerance of 0.1 (the value used in Materials Project) is often needed.""") + spgopt_parser.add_argument('--angle-tolerance', default=5.0, type=float, + help="angle_tolerance (float): Angle tolerance for symmetry finding. Default: 5.0") + #spgopt_parser.add_argument("--no-time-reversal", default=False, action="store_true", help="Don't use time-reversal.") + + # Parent parser for commands operating on pandas dataframes + pandas_parser = argparse.ArgumentParser(add_help=False) + pandas_parser.add_argument("-c", '--clipboard', default=False, action="store_true", + help="Copy dataframe to the system clipboard. This can be pasted into Excel, for example") + # Parent parser for commands supporting (ipython/jupyter) ipy_parser = argparse.ArgumentParser(add_help=False) ipy_parser.add_argument('-nb', '--notebook', default=False, action="store_true", help='Generate jupyter notebook.') + ipy_parser.add_argument('--classic-notebook', action='store_true', default=False, + help="Use classic notebook instead of jupyterlab.") + ipy_parser.add_argument('--no-browser', action='store_true', default=False, + help=("Start the jupyter server to serve the notebook " + "but don't open the notebook in the browser.\n" + "Use this option to connect remotely from localhost to the machine running the kernel")) ipy_parser.add_argument('--foreground', action='store_true', default=False, help="Run jupyter notebook in the foreground.") ipy_parser.add_argument('-ipy', '--ipython', default=False, action="store_true", help='Invoke ipython terminal.') @@ -848,10 +947,6 @@ def get_parser(with_epilog=False): nb_parser.add_argument('--foreground', action='store_true', default=False, help="Run jupyter notebook in the foreground.") - # Parent parser for *robot* commands - robot_parser = argparse.ArgumentParser(add_help=False) - robot_parser.add_argument('--no-walk', default=False, action="store_true", help="Don't enter subdirectories.") - # Parent parser for commands supporting expose expose_parser = argparse.ArgumentParser(add_help=False) expose_parser.add_argument("-e", '--expose', default=False, action="store_true", @@ -870,12 +965,22 @@ def get_parser(with_epilog=False): subparsers = parser.add_subparsers(dest='command', help='sub-command help', description="Valid subcommands") # Subparser for structure command. - p_struct = subparsers.add_parser('structure', parents=[copts_parser, ipy_parser], help=abicomp_structure.__doc__) + p_struct = subparsers.add_parser('structure', parents=[copts_parser, ipy_parser, spgopt_parser, pandas_parser], + help=abicomp_structure.__doc__) p_struct.add_argument("-g", "--group", default=False, action="store_true", help="Compare a set of structures for similarity.") p_struct.add_argument("-a", "--anonymous", default=False, action="store_true", help="Whether to use anonymous mode in StructureMatcher. Default False") + # Subparser for spg command. + p_spg = subparsers.add_parser('spg', parents=[copts_parser, spgopt_parser, pandas_parser], + help=abicomp_spg.__doc__) + p_spg.add_argument("-t", "--tolsym", type=float, default=None, help="""\ +Gives the tolerance on the atomic positions (reduced coordinates), primitive vectors, or magnetization, +to be considered equivalent, thanks to symmetry operations. This is used in the recognition of the set +of symmetries of the system, or the application of the symmetry operations to generate from a reduced set of atoms, +the full set of atoms. Note that a value larger than 0.01 is considered to be unacceptable.""") + # Subparser for mp_structure command. p_mpstruct = subparsers.add_parser('mp_structure', parents=[copts_parser, nb_parser], help=abicomp_mp_structure.__doc__) @@ -908,9 +1013,10 @@ def get_parser(with_epilog=False): help="Use the row index as x-value in the plot. By default the plotter uses the first column as x-values") # Subparser for ebands command. - p_ebands = subparsers.add_parser('ebands', parents=[copts_parser, ipy_parser], help=abicomp_ebands.__doc__) + p_ebands = subparsers.add_parser('ebands', parents=[copts_parser, ipy_parser, pandas_parser], + help=abicomp_ebands.__doc__) p_ebands.add_argument("-p", "--plot-mode", default="gridplot", - choices=["gridplot", "combiplot", "boxplot", "combiboxplot", "animate", "None"], + choices=["gridplot", "combiplot", "boxplot", "combiboxplot", "plot_band_edges", "animate", "None"], help="Plot mode e.g. `-p combiplot` to plot bands on the same figure. Default is `gridplot`.") p_ebands.add_argument("-e0", default="fermie", choices=["fermie", "None"], help="Option used to define the zero of energy in the band structure plot. Default is `fermie`.") @@ -928,8 +1034,9 @@ def get_parser(with_epilog=False): p_phbands = subparsers.add_parser('phbands', parents=[copts_parser, ipy_parser, expose_parser], help=abicomp_phbands.__doc__) p_phbands.add_argument("-p", "--plot-mode", default="gridplot", - choices=["gridplot", "combiplot", "boxplot", "combiboxplot", "animate", "None"], - help="Plot mode e.g. `-p combiplot` to plot bands on the same figure. Default is `gridplot`.") + choices=["gridplot", "combiplot", "boxplot", "combiboxplot", "animate", "panel", "None"], + help="Plot mode e.g. `-p combiplot` to plot bands on the same figure." + "Use `panel` for GUI in web browser. Default is `gridplot`.") # Subparser for phdos command. p_phdos = subparsers.add_parser('phdos', parents=[copts_parser, ipy_parser, expose_parser], @@ -952,16 +1059,27 @@ def get_parser(with_epilog=False): #robot_ipy_parser.add_argument('-ipy', '--ipython', default=True, action="store_true", help='Invoke ipython terminal.') robot_ipy_parser.add_argument('-p', '--print', default=False, action="store_true", help='Print robot and return.') - robot_parents = [copts_parser, robot_ipy_parser, robot_parser, expose_parser] + # Parent parser for *robot* commands + robot_parser = argparse.ArgumentParser(add_help=False) + robot_parser.add_argument('--no-walk', default=False, action="store_true", help="Don't enter subdirectories.") + robot_parser.add_argument('--panel', default=False, action="store_true", + help="Open GUI in web browser, requires panel package. WARNING: Experimental") + + robot_parents = [copts_parser, robot_ipy_parser, robot_parser, expose_parser, pandas_parser] p_gsr = subparsers.add_parser('gsr', parents=robot_parents, help=abicomp_gsr.__doc__) p_hist = subparsers.add_parser('hist', parents=robot_parents, help=abicomp_hist.__doc__) p_ddb = subparsers.add_parser('ddb', parents=robot_parents, help=abicomp_ddb.__doc__) + p_anaddb = subparsers.add_parser('anaddb', parents=robot_parents, help=abicomp_anaddb.__doc__) p_phbst = subparsers.add_parser('phbst', parents=robot_parents, help=abicomp_phbst.__doc__) p_sigres = subparsers.add_parser('sigres', parents=robot_parents, help=abicomp_sigres.__doc__) p_mdf = subparsers.add_parser('mdf', parents=robot_parents, help=abicomp_mdf.__doc__) p_optic = subparsers.add_parser('optic', parents=robot_parents, help=abicomp_optic.__doc__) p_a2f = subparsers.add_parser('a2f', parents=robot_parents, help=abicomp_a2f.__doc__) p_sigeph = subparsers.add_parser('sigeph', parents=robot_parents, help=abicomp_sigeph.__doc__) + p_gkq = subparsers.add_parser('gkq', parents=robot_parents, help=abicomp_gkq.__doc__) + p_gkq.add_argument('-d', '--diff', default=False, action="store_true", help='Plot difference between eph matrix elements.') + p_v1qavg = subparsers.add_parser('v1qavg', parents=robot_parents, help=abicomp_v1qavg.__doc__) + p_wrmax = subparsers.add_parser('wrmax', parents=robot_parents, help=abicomp_wrmax.__doc__) p_abiwan = subparsers.add_parser('abiwan', parents=robot_parents, help=abicomp_abiwan.__doc__) # Subparser for pseudos command. diff --git a/abipy/scripts/abidoc.py b/abipy/scripts/abidoc.py index d6a8759d8..34ebcb97a 100755 --- a/abipy/scripts/abidoc.py +++ b/abipy/scripts/abidoc.py @@ -2,14 +2,11 @@ """ Interface to the database of ABINIT input variables """ -from __future__ import unicode_literals, division, print_function, absolute_import import sys -import os import argparse import abipy.flowtk as flowtk -from pprint import pprint from monty.functools import prof_main from monty.termcolor import cprint from abipy.core.release import __version__ @@ -87,7 +84,7 @@ def get_parser(with_epilog=False): help="Find variables related to varname.") # Subparser for find. p_find = subparsers.add_parser('find', parents=[copts_parser, var_parser], - help="Find all variables whose name contains varname.") + help="Find all variables whose name contains varname.") # Subparser for require. #p_require = subparsers.add_parser('require', parents=[copts_parser], help="Find all variables required by varname.") @@ -180,13 +177,13 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.mode == "s": # Grouped by varset for section in vdb.my_varset_list: - print(30*"#" + " Section: " + section + " " + 30*"#") + print(30 * "#" + " Section: " + section + " " + 30 * "#") print_vlist(vdb.vars_with_section(section), options) elif options.mode == "c": # Grouped by characteristics. for char in vdb.my_characteristics: - print(30*"#" + " Characteristic: " + char + 30*"#") + print(30 * "#" + " Characteristic: " + char + 30 * "#") print_vlist(vdb.vars_with_char(char), options) else: diff --git a/abipy/scripts/abinp.py b/abipy/scripts/abinp.py index 18d1b816f..40b2b29e5 100755 --- a/abipy/scripts/abinp.py +++ b/abipy/scripts/abinp.py @@ -1,10 +1,8 @@ #!/usr/bin/env python """ This script provides a simplified interface to the AbiPy factory functions. -For a more flexible interface please use the AbiPy objects to generate input files and workflows. +For a more flexible interface, please use the AbiPy objects to generate input files and workflows. """ -from __future__ import unicode_literals, division, print_function, absolute_import - import sys import os import argparse @@ -59,7 +57,7 @@ def finalize(obj, options): print("\n") print("# This input file template has been automatically generated by the abinp.py script.") print("# Several input parameters have default values that might not be suitable for you particular calculation.") - print("# Please check the input file, make sure you understand what's happening and modify the template according to your needs") + print("# Please check the input file and modify the template according to your needs.") return 0 @@ -168,9 +166,9 @@ def abinp_gs(options): structure = abilab.Structure.from_file(options.filepath) pseudos = get_pseudotable(options) gsinp = factories.gs_input(structure, pseudos, - kppa=None, ecut=None, pawecutdg=None, scf_nband=None, - accuracy="normal", spin_mode="unpolarized", - smearing="fermi_dirac:0.1 eV", charge=0.0, scf_algorithm=None) + kppa=options.kppa, ecut=None, pawecutdg=None, scf_nband=None, + accuracy="normal", spin_mode=options.spin_mode, + smearing=options.smearing, charge=0.0, scf_algorithm=None) return finalize(gsinp, options) @@ -180,9 +178,9 @@ def abinp_ebands(options): structure = get_structure(options) pseudos = get_pseudotable(options) multi = factories.ebands_input(structure, pseudos, - kppa=None, nscf_nband=None, ndivsm=15, - ecut=None, pawecutdg=None, scf_nband=None, accuracy="normal", spin_mode="unpolarized", - smearing="fermi_dirac:0.1 eV", charge=0.0, scf_algorithm=None, dos_kppa=None) + kppa=options.kppa, nscf_nband=None, ndivsm=15, + ecut=None, pawecutdg=None, scf_nband=None, accuracy="normal", spin_mode=options.spin_mode, + smearing=options.smearing, charge=0.0, scf_algorithm=None, dos_kppa=None) # Add getwfk variables. for inp in multi[1:]: @@ -197,9 +195,9 @@ def abinp_phonons(options): pseudos = get_pseudotable(options) gsinp = factories.gs_input(structure, pseudos, - kppa=None, ecut=None, pawecutdg=None, scf_nband=None, - accuracy="normal", spin_mode="unpolarized", - smearing="fermi_dirac:0.1 eV", charge=0.0, scf_algorithm=None) + kppa=options.kppa, ecut=None, pawecutdg=None, scf_nband=None, + accuracy="normal", spin_mode=options.spin_mode, + smearing=options.smearing, charge=0.0, scf_algorithm=None) multi = factories.phonons_from_gsinput(gsinp, ph_ngqpt=None, qpoints=None, with_ddk=True, with_dde=True, with_bec=False, ph_tol=None, ddk_tol=None, dde_tol=None, wfq_tol=None, qpoints_to_skip=None) @@ -215,12 +213,12 @@ def abinp_g0w0(options): """Generate input files for G0W0 calculations.""" structure = get_structure(options) pseudos = get_pseudotable(options) - kppa, nscf_nband, ecuteps, ecutsigx = 1000, 100, 4, 12 + nscf_nband, ecuteps, ecutsigx = 100, 4, 12 multi = factories.g0w0_with_ppmodel_inputs(structure, pseudos, - kppa, nscf_nband, ecuteps, ecutsigx, + options.kppa, nscf_nband, ecuteps, ecutsigx, ecut=None, pawecutdg=None, - accuracy="normal", spin_mode="unpolarized", smearing="fermi_dirac:0.1 eV", + accuracy="normal", spin_mode=options.spin_mode, smearing=options.smearing, ppmodel="godby", charge=0.0, scf_algorithm=None, inclvkb=2, scr_nband=None, sigma_nband=None, gw_qprange=1) @@ -285,9 +283,11 @@ def get_epilog(): # Redirect output to run.abi. abinp.py ebands out_GSR.nc # Build input for SCF + NSCF run with structure read from GSR.nc file. abinp.py ebands mp-149 # Build input for SCF+NSCF run with (relaxed) structure taken from the - # materials project database. Requires internet connect and MAPI_KEY. + # materials project database. Requires internet connection and MAPI_KEY. abinp.py phonons POSCAR # Build input for GS + DFPT calculation of phonons with DFPT. abinp.py phonons out_HIST.nc # Build input for G0W0 run with (relaxed) structure read from HIST.nc file. + # Use e.g. --kppa=100 --spin-mode=polarized --smearing="gaussian: 0.3 eV" + # to specify the k-points sampling, the treatment of spin and the occupation scheme. ######################## # Anaddb Input Factories @@ -309,7 +309,7 @@ def get_epilog(): Use `-v` to increase verbosity level (can be supplied multiple times e.g -vv). CAVEAT: This script provides a simplified interface to the AbiPy factory functions. -For a more flexible interface please use the AbiPy objects to generate input files and workflows. +For a more flexible interface, please use the AbiPy objects to generate input files and workflows. """ @@ -338,6 +338,15 @@ def get_parser(with_epilog=False): "contains more than one dataset.") abiinput_parser.add_argument("-p", '--pseudos', nargs="+", default=None, help="List of pseudopotentials") + abiinput_parser.add_argument('--kppa', type=int, default=None, + help="Number of k-points per reciprocal atom. Use default value (1000) if not specified.") + abiinput_parser.add_argument('--spin-mode', type=str, default="unpolarized", + help="Spin polarization. Default: unpolarized. Allowed values in: " + + "[polarized, unpolarized, afm (anti-ferromagnetic), spinor (non-collinear magnetism) " + + " spinor_nomag (non-collinear, no magnetism)].") + abiinput_parser.add_argument('--smearing', type=str, default="fermi_dirac:0.1 eV", + help="Smearing scheme. Defaults to Fermi-Dirac.") + # Parent parser for commands requiring a file. path_selector = argparse.ArgumentParser(add_help=False) path_selector.add_argument('filepath', type=str, @@ -403,6 +412,7 @@ def get_parser(with_epilog=False): return parser + @prof_main def main(): diff --git a/abipy/scripts/abiopen.py b/abipy/scripts/abiopen.py index e3789753e..bcd574210 100755 --- a/abipy/scripts/abiopen.py +++ b/abipy/scripts/abiopen.py @@ -1,18 +1,16 @@ #!/usr/bin/env python """ -This script opens an output file produced by Abinit (usually in netcdf format but +This script opens one of the output files produced by Abinit (usually in netcdf format but other files are supported as well). By default the script starts an interactive ipython session so that one can interact with the file and call its methods. Alternatively, it is possible to generate automatically a jupyter notebook to execute code. """ -from __future__ import unicode_literals, division, print_function, absolute_import - import sys import os -import io import argparse -import tempfile +import subprocess +from pprint import pprint from monty.os.path import which from monty.termcolor import cprint from monty.functools import prof_main @@ -21,11 +19,11 @@ def make_and_open_notebook(options): """ - Generate an jupyter notebook and open it in the browser. + Generate a jupyter notebook and open it in the browser. Return system exit code. Raise: - RuntimeError if jupyther is not in $PATH + RuntimeError if jupyter is not in $PATH """ import os import nbformat @@ -35,16 +33,16 @@ def make_and_open_notebook(options): nb.cells.extend([ nbf.new_markdown_cell("## This is an auto-generated notebook for %s" % os.path.relpath(options.filepath)), nbf.new_code_cell("""\ -from __future__ import print_function, division, unicode_literals, absolute_import + %matplotlib notebook import numpy as np #import seaborn as sns #sns.set(context='notebook', style='darkgrid', palette='deep', # font='sans-serif', font_scale=1, color_codes=False, rc=None) -from abipy import abilab\ -"""), +from abipy import abilab - nbf.new_code_cell("abifile = abilab.abiopen('%s')" % options.filepath) +"""), + nbf.new_code_cell("abifile = abilab.abiopen('%s')" % options.filepath) ]) import io, tempfile @@ -56,36 +54,51 @@ def make_and_open_notebook(options): if which("jupyter") is None: raise RuntimeError("Cannot find jupyter in PATH. Install it with `pip install`") + if not options.classic_notebook: + # Use jupyter-lab instead of classic notebook + has_jupyterlab = which("jupyter-lab") is not None + appname = "jupyter-lab" if has_jupyterlab else "jupyter notebook" + else: + appname = "jupyter notebook" + if options.foreground: - return os.system("jupyter notebook %s" % nbpath) + return os.system("%s %s" % (appname, nbpath)) else: fd, tmpname = tempfile.mkstemp(text=True) print(tmpname) - cmd = "jupyter notebook %s" % nbpath - print("Executing:", cmd) - print("stdout and stderr redirected to %s" % tmpname) - import subprocess + cmd = "%s %s" % (appname, nbpath) + print("Executing:", cmd, "\nstdout and stderr redirected to %s" % tmpname) process = subprocess.Popen(cmd.split(), shell=False, stdout=fd, stderr=fd) cprint("pid: %s" % str(process.pid), "yellow") + return 0 def get_epilog(): s = """\ Usage example: - abiopen.py FILE => Open file in ipython shell. - abiopen.py FILE -nb => Generate jupyter notebook. - abiopen.py FILE -p => Print info on object to terminal. - abiopen.py FILE -e => Generate matplotlib figures automatically. - Use -sns to activate seaborn settings. + abiopen.py FILE => Open file in ipython shell. + abiopen.py FILE -nb => Generate jupyter notebook. + abiopen.py FILE -p => Print info on object to terminal. + abiopen.py FILE -e => Generate matplotlib figures automatically. + Use -sns to activate seaborn settings. + abiopen.py FILE --panel => Generate GUI in web browser to interact with FILE + Requires panel package (WARNING: still under development!) -`FILE` is any file supported by abipy/pymatgen e.g Netcdf files, Abinit input, POSCAR, xsf ... +where `FILE` is any file supported by abipy/pymatgen e.g. Netcdf files, Abinit input, POSCAR, xsf. +File extensions supported (including zipped files with extension in ".bz2", ".gz", ".z"): Use `-v` to increase verbosity level (can be supplied multiple times e.g -vv). -File extensions supported: +JSON file are supported as well. In this case, abiopen.py tries to reconstruct python objects +assuming JSON document in MSONable format and then invokes ipython with the `data` object. +Use `-e` or `--notebook` or `--panel` to print the JSON dictionary without reconstructing python objects. + +Table mapping file extension to AbiPy object: + """ return s + abilab.abiopen_ext2class_table() + def get_parser(with_epilog=False): parser = argparse.ArgumentParser(epilog=get_epilog() if with_epilog else "", formatter_class=argparse.RawDescriptionHelpFormatter) @@ -99,14 +112,24 @@ def get_parser(with_epilog=False): parser.add_argument("filepath", help="File to open. See table below for the list of supported extensions.") - # notebook option + # notebook options. parser.add_argument('-nb', '--notebook', action='store_true', default=False, help="Open file in jupyter notebook") + parser.add_argument('--classic-notebook', action='store_true', default=False, + help="Use classic notebook instead of jupyterlab.") + parser.add_argument('--no-browser', action='store_true', default=False, + help=("Start the jupyter server to serve the notebook " + "but don't open the notebook in the browser.\n" + "Use this option to connect remotely from localhost to the machine running the kernel")) parser.add_argument('--foreground', action='store_true', default=False, - help="Run jupyter notebook in the foreground.") + help="Run jupyter notebook in the foreground.") # print option parser.add_argument('-p', '--print', action='store_true', default=False, help="Print python object and return.") + # panel option + parser.add_argument('--panel', action='store_true', default=False, + help="Open GUI in web browser, requires panel package.") + # expose option. parser.add_argument('-e', '--expose', action='store_true', default=False, help="Open file and generate matplotlib figures automatically by calling expose method.") @@ -166,6 +189,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if not os.path.exists(options.filepath): raise RuntimeError("%s: no such file" % options.filepath) + if options.filepath.endswith(".json"): + return handle_json(options) + if not options.notebook: abifile = abilab.abiopen(options.filepath) @@ -185,7 +211,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): print(abifile) if hasattr(abifile, "expose"): - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, verbose=options.verbose) else: @@ -198,10 +223,30 @@ def show_examples_and_exit(err_msg=None, error_code=1): return 0 + elif options.panel: + try: + import panel # noqa: F401 + except ImportError as exc: + cprint("Use `conda install panel` or `pip install panel` to install the python package.", "red") + raise exc + + if not hasattr(abifile, "get_panel"): + raise TypeError("Object of type `%s` does not implement get_panel method" % type(abifile)) + + import matplotlib + matplotlib.use("Agg") + abifile.get_panel().show() #threaded=True) + return 0 + # Start ipython shell with namespace # Use embed because I don't know how to show a header with start_ipython. import IPython - IPython.embed(header="The Abinit file is bound to the `abifile` variable.\nTry `print(abifile)`") + IPython.embed(header=""" +The Abinit file object is associated to the `abifile` python variable. +Use `abifile.` to list available methods. +Use e.g. `abifile.plot?` to access docstring and `abifile.plot??` to visualize source. +Use `print(abifile)` to print the object. +""") else: # Call specialized method if the object is a NotebookWriter @@ -210,15 +255,64 @@ def show_examples_and_exit(err_msg=None, error_code=1): if hasattr(cls, "make_and_open_notebook"): if hasattr(cls, "__exit__"): with abilab.abiopen(options.filepath) as abifile: - return abifile.make_and_open_notebook(foreground=options.foreground) + return abifile.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: abifile = abilab.abiopen(options.filepath) - return abifile.make_and_open_notebook(foreground=options.foreground) + return abifile.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: return make_and_open_notebook(options) return 0 +def handle_json(options): + """Handle JSON file.""" + + if options.notebook: + # Visualize JSON document in jupyter + cmd = "jupyter-lab %s" % options.filepath + print("Executing:", cmd) + process = subprocess.Popen(cmd.split(), shell=False) #, stdout=fd, stderr=fd) + cprint("pid: %s" % str(process.pid), "yellow") + return 0 + + elif options.panel: + # Visualize JSON document in panel dashboard + import json + import panel as pn + with open(options.filepath, "rt") as fh: + d = json.load(fh) + json_pane = pn.pane.JSON(d, name='JSON', height=300, width=500) + app = pn.Row(json_pane.controls(jslink=True), json_pane) + app.show() + return 0 + + else: + if options.print: + # Print python object to terminal. + data = abilab.mjson_load(options.filepath) + pprint(data, indent=4) + return 0 + elif options.expose: + # Pretty-print dict to terminal. + import json + with open(options.filepath, "rt") as fh: + data = json.load(fh) + pprint(data, indent=4) + return 0 + + data = abilab.mjson_load(options.filepath) + # Start ipython shell with namespace + # Use embed because I don't know how to show a header with start_ipython. + import IPython + IPython.embed(header=""" +The object initialized from JSON (MSONable) is associated to the `data` python variable. +""") + + if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/scripts/abirun.py b/abipy/scripts/abirun.py index 0228bab26..e6be56468 100755 --- a/abipy/scripts/abirun.py +++ b/abipy/scripts/abirun.py @@ -3,8 +3,6 @@ This script allows the user to submit the calculations contained in the `Flow`. It provides a command line interface as well as a graphical interface based on wxpython. """ -from __future__ import unicode_literals, division, print_function, absolute_import - import sys import os import argparse @@ -12,7 +10,6 @@ import time import platform import tempfile -import numpy as np import abipy.flowtk as flowtk import abipy.abilab as abilab @@ -20,14 +17,11 @@ from collections import defaultdict, OrderedDict from socket import gethostname from monty import termcolor -from monty.os.path import which from monty.functools import prof_main from monty.termcolor import cprint, colored, get_terminal_size -from monty.string import boxed, list_strings, make_banner -from pymatgen.util.io_utils import ask_yesno +from monty.string import boxed, make_banner from abipy.tools import duck from abipy.flowtk import Status -from abipy.core.structure import dataframes_from_structures def straceback(): @@ -82,7 +76,7 @@ def flowdir_wname_tname(dirname): raise RuntimeError("Cannot locate flowdir from %s" % dirname) -def selected_nids(flow, options): +def select_nids(flow, options): """ Return the list of node ids selected by the user via the command line interface. """ @@ -121,7 +115,7 @@ def cli_abiopen(options, filepath): import IPython # Use embed because I don't know how to show a header with start_ipython. - IPython.embed(header="The Abinit file is bound to the `abifile` variable.\nTry `print(abifile)`") + IPython.embed(header="The Abinit file is associated to the `abifile` variable.\nTry `print(abifile)`") else: # Call specialized method if the object is a NotebookWriter @@ -135,359 +129,8 @@ def cli_abiopen(options, filepath): abifile = abilab.abiopen(filepath) return abifile.make_and_open_notebook(foreground=options.foreground) else: - return make_and_open_notebook(options) - -# TODO: These should become flow methods. -def flow_write_open_notebook(flow, options): - """ - Generate an ipython notebook and open it in the browser. - Return system exit code. - """ - import nbformat - nbf = nbformat.v4 - nb = nbf.new_notebook() - - nb.cells.extend([ - #nbf.new_markdown_cell("This is an auto-generated notebook for %s" % os.path.basename(pseudopath)), - nbf.new_code_cell("""\ -from __future__ import print_function, division, unicode_literals, absolute_import - -import sys, os -import numpy as np - -%matplotlib notebook -from IPython.display import display - -# This to render pandas DataFrames with https://github.com/quantopian/qgrid -#import qgrid -#qgrid.nbinstall(overwrite=True) # copies javascript dependencies to your /nbextensions folder - -from abipy import abilab - -# Tell AbiPy we are inside a notebook and use seaborn settings for plots. -# See https://seaborn.pydata.org/generated/seaborn.set.html#seaborn.set -abilab.enable_notebook(with_seaborn=True) - -# AbiPy widgets for pandas and seaborn plot APIs -#import abipy.display.seabornw import snw -#import abipy.display.pandasw import pdw -"""), - - nbf.new_code_cell("flow = abilab.Flow.pickle_load('%s')" % flow.workdir), - nbf.new_code_cell("if flow.num_errored_tasks: flow.debug()"), - nbf.new_code_cell("flow.check_status(show=True, verbose=0)"), - nbf.new_code_cell("flow.show_dependencies()"), - nbf.new_code_cell("flow.plot_networkx();"), - nbf.new_code_cell("#flow.get_graphviz();"), - nbf.new_code_cell("flow.show_inputs(nids=None, wslice=None)"), - nbf.new_code_cell("flow.show_history()"), - nbf.new_code_cell("flow.show_corrections()"), - nbf.new_code_cell("flow.show_event_handlers()"), - nbf.new_code_cell("flow.inspect(nids=None, wslice=None)"), - nbf.new_code_cell("flow.show_abierrors()"), - nbf.new_code_cell("flow.show_qouts()"), - ]) - - import tempfile, io - _, nbpath = tempfile.mkstemp(suffix='.ipynb', text=True) - - with io.open(nbpath, 'wt', encoding="utf8") as fh: - nbformat.write(nb, fh) - - if which("jupyter") is None: - raise RuntimeError("Cannot find jupyter in $PATH. Install it with `pip install`") - - if options.foreground: - return os.system("jupyter notebook %s" % nbpath) - else: - fd, tmpname = tempfile.mkstemp(text=True) - print(tmpname) - cmd = "jupyter notebook %s" % nbpath - print("Executing:", cmd) - print("stdout and stderr redirected to %s" % tmpname) - import subprocess - process = subprocess.Popen(cmd.split(), shell=False, stdout=fd, stderr=fd) - cprint("pid: %s" % str(process.pid), "yellow") - - -def flow_compare_structures(flow, nids=None, with_spglib=False, what="io", verbose=0, - precision=3, printout=False, with_colors=False): - """ - Analyze structures of the tasks (input and output structures if it's a relaxation - task. Print pandas DataFrame - - Args: - nids: List of node identifiers. By defaults all nodes are shown - with_spglib: If True, spglib is invoked to get the spacegroup symbol and number - what (str): "i" for input structures, "o" for output structures. - precision: Floating point output precision (number of significant digits). - This is only a suggestion - printout: True to print dataframe. - with_colors: True if task status should be colored. - """ - #flow.check_status() - structures, index, status, max_forces, pressures, task_classes = [], [], [], [], [], [] - - def push_data(post, task, structure, cart_forces, pressure): - """Helper function to fill lists""" - index.append(task.pos_str + post) - structures.append(structure) - status.append(task.status.colored if with_colors else str(task.status)) - if cart_forces is not None: - fmods = np.sqrt([np.dot(f, f) for f in cart_forces]) - max_forces.append(fmods.max()) - else: - max_forces.append(None) - pressures.append(pressure) - task_classes.append(task.__class__.__name__) - - for task in flow.iflat_tasks(nids=nids): - if "i" in what: - push_data("_in", task, task.input.structure, cart_forces=None, pressure=None) - - if "o" not in what: - continue - - # Add final structure, pressure and max force if relaxation task or GS task - if task.status in (task.S_RUN, task.S_OK): - if hasattr(task, "open_hist"): - # Structural relaxations produce HIST.nc and we can get - # the final structure or the structure of the last relaxation step. - try: - with task.open_hist() as hist: - final_structure = hist.final_structure - stress_cart_tensors, pressures_hist = hist.reader.read_cart_stress_tensors() - forces = hist.reader.read_cart_forces(unit="eV ang^-1")[-1] - push_data("_out", task, final_structure, forces, pressures_hist[-1]) - except Exception as exc: - cprint("Exception while opening HIST.nc file of task: %s\n%s" % (task, str(exc)), "red") - - elif hasattr(task, "open_gsr") and task.status == task.S_OK and task.input.get("iscf", 7) >= 0: - with task.open_gsr() as gsr: - forces = gsr.reader.read_cart_forces(unit="eV ang^-1") - push_data("_out", task, gsr.structure, forces, gsr.pressure) - - dfs = dataframes_from_structures(structures, index=index, with_spglib=with_spglib, cart_coords=False) - - if any(f is not None for f in max_forces): - # Add pressure and forces to the dataframe - dfs.lattice["P [GPa]"] = pressures - dfs.lattice["Max|F| eV/ang"] = max_forces - - # Add columns to the dataframe. - status = [str(s) for s in status] - dfs.lattice["task_class"] = task_classes - dfs.lattice["status"] = dfs.coords["status"] = status - - if printout: - abilab.print_dataframe(dfs.lattice, title="Lattice parameters:", precision=precision) - if verbose: - abilab.print_dataframe(dfs.coords, title="Atomic positions (columns give the site index):") - else: - print("Use `--verbose` to print atoms.") - - return dfs - - -def flow_compare_ebands(flow, nids=None, with_spglib=False, verbose=0, - precision=3, printout=False, with_colors=False, plot_mode=None): - """ - Analyze electron bands produced by the tasks. Print pandas DataFrame - - Args: - nids: List of node identifiers. By default, all nodes are shown - with_spglib: If True, spglib is invoked to get the spacegroup symbol and number - precision: Floating point output precision (number of significant digits). - This is only a suggestion - printout: True to print dataframe. - with_colors: True if task status should be colored. - plot_mode: Plot results if not None. Allowed value in ["gridplot", "combiplot"] - """ - #flow.check_status() - ebands_list, index, status, ncfiles, task_classes, task_nids = [], [], [], [], [], [] - - # Cannot use robots because ElectronBands can be found in different filetypes - for task in flow.iflat_tasks(nids=nids, status=flow.S_OK): - # Read ebands from GSR or SIGRES files. - for ext in ("gsr", "sigres"): - task_open_ncfile = getattr(task, "open_%s" % ext, None) - if task_open_ncfile is not None: break - else: - continue - - try: - with task_open_ncfile() as ncfile: - ebands_list.append(ncfile.ebands) - index.append(task.pos_str) - status.append(task.status.colored if with_colors else str(task.status)) - ncfiles.append(os.path.relpath(ncfile.filepath)) - task_classes.append(task.__class__.__name__) - task_nids.append(task.node_id) - except Exception as exc: - cprint("Exception while opening HIST.nc file of task: %s\n%s" % (task, str(exc)), "red") - - if not ebands_list: return - df = abilab.dataframe_from_ebands(ebands_list, index=index, with_spglib=with_spglib) - - # Add columns to the dataframe. - status = [str(s) for s in status] - df["task_class"] = task_classes - df["ncfile"] = ncfiles - df["node_id"] = task_nids - df["status"] = status - - if printout: - abilab.print_dataframe(df, title="KS electronic bands:", precision=precision) - - if plot_mode is not None: - plotter = abilab.ElectronBandsPlotter(key_ebands=zip(ncfiles, ebands_list)) - plotfunc = getattr(plotter, plot_mode, None) - if plotfunc is None: - raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) - plotfunc(tight_layout=True) - - return df - - -def flow_compare_hist(flow, nids=None, with_spglib=False, verbose=0, - precision=3, printout=False, with_colors=False, plot_mode=None): - """ - Analyze HIST nc files produced by the tasks. Print pandas DataFrame with final results. - - Args: - nids: List of node identifiers. By defaults all nodes are shown - with_spglib: If True, spglib is invoked to get the spacegroup symbol and number - precision: Floating point output precision (number of significant digits). - This is only a suggestion - printout: True to print dataframe. - with_colors: True if task status should be colored. - plot_mode: Plot results if not None. Allowed value in ["gridplot", "combiplot"] - """ - #flow.check_status() - hist_paths, index, status, ncfiles, task_classes, task_nids = [], [], [], [], [], [] - - for task in flow.iflat_tasks(nids=nids): - if task.status not in (flow.S_OK, flow.S_RUN): continue - hist_path = task.outdir.has_abiext("HIST") - if not hist_path: continue - - hist_paths.append(hist_path) - index.append(task.pos_str) - status.append(task.status.colored if with_colors else str(task.status)) - ncfiles.append(os.path.relpath(hist_path)) - task_classes.append(task.__class__.__name__) - task_nids.append(task.node_id) - - if not hist_paths: return - robot = abilab.HistRobot.from_files(hist_paths, labels=hist_paths) - df = robot.get_dataframe(index=index, with_spglib=with_spglib) - - # Add columns to the dataframe. - status = [str(s) for s in status] - df["task_class"] = task_classes - df["ncfile"] = ncfiles - df["node_id"] = task_nids - df["status"] = status - - if printout: - title = "Table with final structures, pressures in GPa and force stats in eV/Ang:\n" - abilab.print_dataframe(df, title=title, precision=precision) - - #print("plot_mode", plot_mode) - if plot_mode is not None: - if len(robot) == 1: - robot.abifiles[0].plot() - else: - if plot_mode == "gridplot": - for what in robot.what_list: - robot.gridplot(what=what) - elif plot_mode == "combiplot": - robot.combiplot() - else: - raise ValueError("Invalid value of plot_mode: %s" % str(plot_mode)) - - return df - - -def flow_get_dims_dataframe(flow, nids=None, printout=False, with_colors=False): - """ - Analyze output files produced by Abinit tasks. Print pandas DataFrame with dimensions. - - Args: - nids: List of node identifiers. By defaults all nodes are shown - printout: True to print dataframe. - with_colors: True if task status should be colored. - """ - abo_paths, index, status, abo_relpaths, task_classes, task_nids = [], [], [], [], [], [] - - for task in flow.iflat_tasks(nids=nids): - if task.status not in (flow.S_OK, flow.S_RUN): continue - if not task.is_abinit_task: continue - - abo_paths.append(task.output_file.path) - index.append(task.pos_str) - status.append(task.status.colored if with_colors else str(task.status)) - abo_relpaths.append(os.path.relpath(task.output_file.relpath)) - task_classes.append(task.__class__.__name__) - task_nids.append(task.node_id) - - if not abo_paths: return - - # Get dimensions from output files as well as walltime/cputime - robot = abilab.AboRobot.from_files(abo_paths) - df = robot.get_dims_dataframe(with_time=True, index=index) - - # Add columns to the dataframe. - status = [str(s) for s in status] - df["task_class"] = task_classes - df["relpath"] = abo_relpaths - df["node_id"] = task_nids - df["status"] = status - - if printout: - abilab.print_dataframe(df, title="Table with Abinit dimensions:\n") - - return df - - -def flow_compare_abivars(flow, varnames, nids=None, wslice=None, printout=False, with_colors=False): - """ - Print the input of the tasks to the given stream. - - Args: - varnames: - List of Abinit variables. If not None, only the variable in varnames - are selected and printed. - nids: - List of node identifiers. By defaults all nodes are shown - wslice: - Slice object used to select works. - printout: True to print dataframe. - with_colors: True if task status should be colored. - """ - varnames = [s.strip() for s in list_strings(varnames)] - index, rows = [], [] - for task in flow.select_tasks(nids=nids, wslice=wslice): - index.append(task.pos_str) - dstruct = task.input.structure.as_dict(fmt="abivars") - - od = OrderedDict() - for vname in varnames: - value = task.input.get(vname, None) - if value is None: # maybe in structure? - value = dstruct.get(vname, None) - od[vname] = value - - od["task_class"] = task.__class__.__name__ - od["status"] = task.status.colored if with_colors else str(task.status) - rows.append(od) - - import pandas as pd - df = pd.DataFrame(rows, index=index) - if printout: - abilab.print_dataframe(df, title="Input variables:") - - return df + raise TypeError("Object ot type `%s` does not provide make_and_open_notebook method" % str(cls)) + #return make_and_open_notebook(options) def flow_debug_reset_tasks(flow, nids=None, verbose=0): @@ -625,6 +268,7 @@ def exit_now(): except KeyboardInterrupt: cprint("Received KeyboardInterrupt from user\n", "yellow") + def get_epilog(): usage = """\ @@ -880,12 +524,8 @@ def parse_wslice(s): p_docsched = subparsers.add_parser('doc_scheduler', parents=[copts_parser], help="Document the options available in scheduler.yml.") - # Subparser for gui command. - #p_gui = subparsers.add_parser('gui', parents=[copts_parser], help="Open the GUI (requires wxPython).") - #p_gui.add_argument("--chroot", default="", type=str, help=("Use chroot as new directory of the flow. " + - # "Mainly used for opening a flow located on a remote filesystem mounted with sshfs. " + - # "In this case chroot is the absolute path to the flow on the **localhost** " + - # "Note that it is not possible to change the flow from remote when chroot is used.")) + p_panel = subparsers.add_parser('panel', parents=[copts_parser], + help="Interact with the flow in the browser (requires panel package).") # Subparser for new_manager. p_new_manager = subparsers.add_parser('new_manager', parents=[copts_parser, flow_selector_parser], @@ -1032,8 +672,8 @@ def parse_wslice(s): help="Analyze error files and log files produced by reset tasks for possible error messages.") # Subparser for clone_task. - p_clone_task = subparsers.add_parser('clone_task', parents=[copts_parser, flow_selector_parser], - help="Clone task, change input variables and add new tasks to the flow. Requires clone_task.py.") + #p_clone_task = subparsers.add_parser('clone_task', parents=[copts_parser, flow_selector_parser], + # help="Clone task, change input variables and add new tasks to the flow. Requires clone_task.py.") # Subparser for group. p_group = subparsers.add_parser('group', parents=[copts_parser, flow_selector_parser], @@ -1070,12 +710,6 @@ def parse_wslice(s): help="List all the output files with the given extension that have been produced by the nodes.") p_listext.add_argument('listexts', nargs="*", default=[], help="List of Abinit file extensions. e.g DDB, GSR, WFK etc") - # Subparser for timer. - # TODO - #p_timer = subparsers.add_parser('timer', parents=[copts_parser, flow_selector_parser], - # help=("Read the section with timing info from the main ABINIT output file (requires timopt != 0) " - # "Open Ipython terminal to inspect data.")) - return parser @@ -1183,7 +817,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): # Read the flow from the pickle database. flow = flowtk.Flow.pickle_load(options.flowdir, remove_lock=options.remove_lock) - #flow.show_info() # If we have selected a work/task, we have to convert wname/tname into node ids (nids) if wname or tname: @@ -1214,14 +847,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): retcode = 0 - #if options.command == "gui": - # if options.chroot: - # # Change the workdir of flow. - # print("Will chroot to %s..." % options.chroot) - # flow.chroot(options.chroot) - # from abipy.gui.flowviewer import wxapp_flow_viewer - # wxapp_flow_viewer(flow).MainLoop() - if options.command == "new_manager": # Read the new manager from file. new_manager = flowtk.TaskManager.from_file(options.manager_file) @@ -1232,21 +857,31 @@ def show_examples_and_exit(err_msg=None, error_code=1): # Change the manager of the errored tasks. print("Resetting tasks with status: %s" % options.task_status) - for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options)): + for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options)): task.reset() task.set_manager(new_manager) # Update the database. return flow.build_and_pickle_dump() + elif options.command == "panel": + try: + import panel # noqa: F401 + except ImportError as exc: + cprint("Use `conda install panel` or `pip install panel` to install the python package.", "red") + raise exc + + flow.get_panel().show() + return 0 + elif options.command == "events": - flow.show_events(status=options.task_status, nids=selected_nids(flow, options)) + flow.show_events(status=options.task_status, nids=select_nids(flow, options)) elif options.command == "corrections": - flow.show_corrections(status=options.task_status, nids=selected_nids(flow, options)) + flow.show_corrections(status=options.task_status, nids=select_nids(flow, options)) elif options.command == "history": - flow.show_history(status=options.task_status, nids=selected_nids(flow, options), + flow.show_history(status=options.task_status, nids=select_nids(flow, options), full_history=options.full_history, metadata=options.metadata) elif options.command == "handlers": @@ -1255,7 +890,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): else: flow.show_event_handlers(verbose=options.verbose) - elif options.command == "single": + elif options.command == "single": nlaunch = flow.single_shot() if nlaunch: flow.show_status() cprint("Number of tasks launched: %d" % nlaunch, "yellow") @@ -1289,9 +924,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if options.delay: flow_watch_status(flow, delay=options.delay, verbose=options.verbose, - nids=selected_nids(flow, options), func_name=show_func.__name__) + nids=select_nids(flow, options), func_name=show_func.__name__) else: - show_func(verbose=options.verbose, nids=selected_nids(flow, options)) + show_func(verbose=options.verbose, nids=select_nids(flow, options)) if options.verbose and flow.manager.has_queue: print("Total number of jobs in queue: %s" % flow.manager.get_njobs_in_queue()) @@ -1302,7 +937,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): print("Will set all tasks with status: ", options.task_status, " to new_status", new_status) count = 0 - for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options)): + for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options)): task.set_status(new_status, msg="Changed by abirun from %s to %s" % (task.status, new_status)) count += 1 @@ -1312,10 +947,10 @@ def show_examples_and_exit(err_msg=None, error_code=1): flow.pickle_dump() elif options.command == "open": - flow.open_files(what=options.what, status=None, op="==", nids=selected_nids(flow, options)) + flow.open_files(what=options.what, status=None, op="==", nids=select_nids(flow, options)) elif options.command == "cancel": - print("Number of jobs cancelled %d" % flow.cancel(nids=selected_nids(flow, options))) + print("Number of jobs cancelled %d" % flow.cancel(nids=select_nids(flow, options))) # Remove directory if options.rmtree: flow.rmtree() @@ -1325,7 +960,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): options.task_status = Status.as_status("Unconverged") nlaunch, excs = 0, [] - for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options)): + for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options)): #if options.verbose: print("Will try to restart %s, with status %s" % (task, task.status)) try: @@ -1356,7 +991,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): print("Resetting tasks with node ids: %s" % str(options.nids)) count = 0 - for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options)): + for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options)): print("Resetting task %s... " % task, end="") failed = task.reset() if failed: @@ -1393,13 +1028,13 @@ def get_path(task): # Default status for tail is Running if options.task_status is None: options.task_status = Status.as_status("Running") - paths = [get_path(task) for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options))] + paths = [get_path(task) for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options))] if not paths: cprint("No job is running. Exiting!", "magenta") else: cprint("Press to interrupt. Number of output files %d\n" % len(paths), - color="magenta", end="", flush=True) + color="magenta", end="", flush=True) try: os.system("tail -f %s" % " ".join(paths)) except KeyboardInterrupt: @@ -1421,7 +1056,7 @@ def get_path(task): elif options.command == "robot": print("Building robot for file extension:", options.robot_ext, "with task_class:", options.task_class) - robot = abilab.Robot.from_flow(flow, outdirs="all", nids=selected_nids(flow, options), + robot = abilab.Robot.from_flow(flow, outdirs="all", nids=select_nids(flow, options), ext=options.robot_ext) if len(robot) == 0: cprint("Robot couldn't find files", "yellow") @@ -1457,7 +1092,7 @@ def get_path(task): # Print cycles. from pymatgen.io.abinit.abiinspect import CyclesPlotter cls2plotter = OrderedDict() - for task, cycle in flow.get_task_scfcycles(nids=selected_nids(flow, options), + for task, cycle in flow.get_task_scfcycles(nids=select_nids(flow, options), exclude_ok_tasks=options.exclude_ok_tasks): print() cprint(repr(task), **task.status.color_opts) @@ -1481,11 +1116,11 @@ def get_path(task): options.plot_mode, plotter.__class__.__name__, str(exc)), "red") elif options.command == "dims": - flow_get_dims_dataframe(flow, nids=selected_nids(flow, options), + flow.get_dims_dataframe(nids=select_nids(flow, options), printout=True, with_colors=not options.no_colors) elif options.command == "inspect": - tasks = flow.select_tasks(nids=selected_nids(flow, options)) + tasks = flow.select_tasks(nids=select_nids(flow, options)) def plot_graphs(): for task in tasks: if hasattr(task, "inspect"): @@ -1499,29 +1134,49 @@ def plot_graphs(): plot_graphs() elif options.command == "inputs": - flow.show_inputs(varnames=options.varnames, nids=selected_nids(flow, options)) + flow.show_inputs(varnames=options.varnames, nids=select_nids(flow, options)) elif options.command == "abivars": - flow_compare_abivars(flow, varnames=options.varnames, nids=selected_nids(flow, options), + flow.compare_abivars(varnames=options.varnames, nids=select_nids(flow, options), printout=True, with_colors=not options.no_colors) elif options.command == "structures": - flow_compare_structures(flow, nids=selected_nids(flow, options), what=options.what, + flow.compare_structures(nids=select_nids(flow, options), + what=options.what, verbose=options.verbose, with_spglib=False, printout=True, with_colors=not options.no_colors) elif options.command == "ebands": - flow_compare_ebands(flow, nids=selected_nids(flow, options), verbose=options.verbose, - with_spglib=False, printout=True, with_colors=not options.no_colors, - plot_mode=options.plot_mode) + df, ebands_plotter = flow.compare_ebands( + nids=select_nids(flow, options), verbose=options.verbose, + with_spglib=False, printout=True, with_colors=not options.no_colors) + + plot_mode = options.plot_mode + if plot_mode is not None: + plotfunc = getattr(ebands_plotter, plot_mode, None) + if plotfunc is None: + raise ValueError("Don't know how to handle plot_mode: %s" % plot_mode) + plotfunc(tight_layout=True) elif options.command == "hist": - flow_compare_hist(flow, nids=selected_nids(flow, options), verbose=options.verbose, - with_spglib=False, printout=True, with_colors=not options.no_colors, - plot_mode=options.plot_mode) + df, robot = flow.compare_hist(nids=select_nids(flow, options), verbose=options.verbose, + with_spglib=False, printout=True, with_colors=not options.no_colors) + + plot_mode = options.plot_mode + if plot_mode is not None: + if len(robot) == 1: + robot.abifiles[0].plot() + else: + if plot_mode == "gridplot": + for what in robot.what_list: + robot.gridplot(what=what) + elif plot_mode == "combiplot": + robot.combiplot() + else: + raise ValueError("Invalid value of plot_mode: %s" % str(plot_mode)) elif options.command == "notebook": - return flow_write_open_notebook(flow, options) + return flow.write_open_notebook(options.foreground) elif options.command == "ipython": import IPython @@ -1544,84 +1199,21 @@ def plot_graphs(): flow.show_tricky_tasks(verbose=options.verbose) elif options.command == "debug": - flow.debug(status=options.task_status, nids=selected_nids(flow, options)) + flow.debug(status=options.task_status, nids=select_nids(flow, options)) elif options.command == "debug_reset": - flow_debug_reset_tasks(flow, nids=selected_nids(flow, options), verbose=options.verbose) + flow_debug_reset_tasks(flow, nids=select_nids(flow, options), verbose=options.verbose) # TODO #elif options.command == "debug_restart": - # flow_debug_restart_tasks(flow, nids=selected_nids(flow, options), verbose=options.verbose) - - elif options.command == "clone_task": - if wname is None and tname is None: - cprint("Use e.g. `abirun.py FLOWDIR/w0/t0` to select the task to clone.", "yellow") - return 1 - - if flow.has_scheduler: - cprint("Cannot add new tasks when there's a scheduler running in background.", "yellow") - return 1 - - task_dirpath = os.path.join(flow.workdir, wname, tname) - for task in flow.iflat_tasks(): - if task.workdir == task_dirpath: - task_id = task.node_id - print("Will clone task: ", repr(task)) - break - else: - raise ValueError("Cannot find task associated to workdir `%s`" % task_dirpath) - - #print(task.deps, type(task.deps)) - py_file = "clone_task.py" - if not os.path.exists(py_file): - cprint("clone_task requires %s in the current working directory" % py_file, "yellow") - cprint("Will generate template file. Please edit it and rerun", "yellow") - template = r""" -def list_of_dict_with_vars(task): - " - This function is called by `abirun.py clone_task` to build new tasks. - It receives the task to be cloned and retunn a list of dictionaries. - Each dictionary contains the Abinit variables that will be added to the initial input. - To build e.g. two new tasks with a different value of ecut use: - - .. example: - - return [ - {"ecut": 20}, - {"ecut": 30}, - ] - " - #return [ - # {"ecut": 20, nband: 10}, - # {"ecut": 30, nband: 20}, - #]""" - with open(py_file, "wt") as fh: - fh.write(template) - return 1 - else: - print("Importing `list_of_dict_with_vars` from ", pyfile) - import imp - mod = imp.load_source(pyfile.replace(".py", ""), pyfile) + # flow_debug_restart_tasks(flow, nids=select_nids(flow, options), verbose=options.verbose) - dict_list = mod.list_of_dict_with_vars(task) - if not dict_list: - cprint("list_of_dict_with_vars returned empty list", "red") - return 1 - - for d in dict_list: - print("Registering new task with vars:", d) - task.work.register(task.input.new_with_vars(**d), - deps=task.deps, task_class=task.__class__) - - task.work.finalized = False - flow.allocate() - if ask_yesno("Do you want to rebuild the flow? [Y/n]"): - flow.build_and_pickle_dump() + #elif options.command == "clone_task": elif options.command == "group": d = defaultdict(list) print("\nMapping `%s` ---> List of node identifiers" % options.groupby) - for task in flow.iflat_tasks(status=options.task_status, nids=selected_nids(flow, options)): + for task in flow.iflat_tasks(status=options.task_status, nids=select_nids(flow, options)): if options.groupby == "status": k = task.status elif options.groupby == "task_class": @@ -1638,11 +1230,11 @@ def list_of_dict_with_vars(task): if options.nids is None: raise ValueError("nids must be specified when using diff command") - tasks = list(flow.iflat_tasks(nids=selected_nids(flow, options))) + tasks = list(flow.iflat_tasks(nids=select_nids(flow, options))) if len(tasks) not in (2, 3): if len(tasks) == 1: - cprint("task == task, returning\n" , color="magenta", end="", flush=True) + cprint("task == task, returning\n", color="magenta", end="", flush=True) return 0 else: raise ValueError("Don't know how to compare files produced by %d tasks" % len(tasks)) @@ -1691,20 +1283,11 @@ def list_of_dict_with_vars(task): flow.listext(ext) print("") - #elif options.command == "timer": - # print("Warning this option is still under development") - # timer = flow.parse_timing() - # if timer is None: - # cprint("Cannot parse timer data!", color="magenta", end="", flush=True) - # return 1 - - # import IPython - # IPython.start_ipython(argv=[], user_ns={"timer": timer}) - else: raise RuntimeError("Don't know what to do with command %s!" % options.command) return retcode + if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/scripts/abistruct.py b/abipy/scripts/abistruct.py index 05c8a490b..cd6afc431 100755 --- a/abipy/scripts/abistruct.py +++ b/abipy/scripts/abistruct.py @@ -2,8 +2,6 @@ """ Script to analyze/export/visualize the crystal structure saved in the netcdf files produced by ABINIT. """ -from __future__ import unicode_literals, division, print_function, absolute_import - import sys import os import argparse @@ -11,7 +9,6 @@ from pprint import pprint from tabulate import tabulate -from warnings import warn from monty.string import marquee from monty.functools import prof_main from monty.termcolor import cprint @@ -25,22 +22,6 @@ from abipy.abio import factories -#def remove_equivalent_atoms(structure): -# from pymatgen.symmetry.analyzer import SpacegroupAnalyzer -# spgan = SpacegroupAnalyzer(structure) #, symprec=symprec, angle_tolerance=angle_tolerance) -# spgdata = spgan.get_symmetry_dataset() -# equivalent_atoms = spgdata["equivalent_atoms"] -# mask = np.zeros(len(structure), dtype=np.int) -# for pos, eqpos in enumerate(equivalent_atoms): -# mask[eqpos] += 1 -# -# indices = [i for i, m in enumerate(mask) if m == 0] -# new = structure.copy() -# new.remove_sites(indices) -# with open("foo.abi", "wt") as fh: -# fh.write(new.abi_string) - - def save_structure(structure, options): """Save structure to file.""" if not options.savefile: return @@ -52,6 +33,17 @@ def save_structure(structure, options): structure.to(filename=options.savefile) + +def check_ordered_structure(structure): + """Print a warning and sys.exit 1 if structure is disordered.""" + if not structure.is_ordered: + cprint(""" +Cannot handle disordered structure with fractional site occupancies. +Use OrderDisorderedStructureTransformation or EnumerateStructureTransformation +to build an appropriate supercell from partial occupancies.""", color="magenta") + sys.exit(1) + + def get_epilog(): return """\ Usage example: @@ -62,10 +54,15 @@ def get_epilog(): abistruct.py spglib FILE => Read structure from FILE and analyze it with spglib. abistruct.py abispg FILE => Read structure from FILE, and compute ABINIT space group. + abistruct.py primitive FILE => Read structure from FILE, use pymatgen and spglib to find primitive structure. abistruct.py abisanitize FILE => Read structure from FILE, call abisanitize, compare structures and save "abisanitized" structure to file. abistruct.py conventional FILE => Read structure from FILE, generate conventional structure following Setyawan, W., & Curtarolo, S. (2010) doi:10.1016/j.commatsci.2010.05.010 + abistruct.py proto FILE => Read structure from FILE, find possible crystallographic prototypes: + in the AFLOW library of crystallographic prototypes. + http://doi.org/10.1016/j.commatsci.2017.01.017 + ################## # Conversion tools ################## @@ -92,6 +89,8 @@ def get_epilog(): abistruct.py lgk FILE -k 0.25 0 0 => Read structure from FILE, find little group of k-point, print Bilbao character table. abistruct.py kstar FILE -k 0.25 0 0 => Read structure from FILE, print star of k-point. + abistruct.py keq FILE -k 0.5 0 0 0 0.5 0 => Read structure from FILE, test whether k1 and k2 are + symmetry-equivalent k-points. ############### # Miscelleanous @@ -110,6 +109,8 @@ def get_epilog(): Supports also ovito, xcrysden, vtk, mayavi, matplotlib See --help abistruct.py ipython FILE => Read structure from FILE and open it in the Ipython terminal. abistruct.py notebook FILE => Read structure from FILE and generate jupyter notebook. + abistruct.py panel FILE => Generate GUI in web browser to interact with the structure + Requires panel package. ########### # Databases @@ -127,13 +128,16 @@ def get_epilog(): Print info and Abinit input files. Use e.g. `-f POSCAR` to change output format. `-f None` to disable structure output. abistruct.py mp_pd FILE-or-elements => Generate phase diagram with entries from the Materials Project. - Accept FILE with structure or list of elements e.g `Li-Fe-O` + abistruct.py mp_ebands FILE => Fetch electron band structure from MP database. Print gaps. + Accept FILE with structure if ebands fro structure is wanted + or mp id e.g. "mp-149 or list of elements e.g `Li-Fe-O` or chemical formula. `FILE` is any file supported by abipy/pymatgen e.g Netcdf files, Abinit input/output, POSCAR, xsf ... Use `abistruct.py --help` for help and `abistruct.py COMMAND --help` to get the documentation for `COMMAND`. Use `-v` to increase verbosity level (can be supplied multiple times e.g -vv). """ + def get_parser(with_epilog=False): # Parent parser for commands that need to know the filepath @@ -144,6 +148,12 @@ def get_parser(with_epilog=False): # Parent parser for commands supporting (jupyter notebooks) nb_parser = argparse.ArgumentParser(add_help=False) nb_parser.add_argument('-nb', '--notebook', default=False, action="store_true", help='Generate jupyter notebook.') + nb_parser.add_argument('--classic-notebook', action='store_true', default=False, + help="Use classic notebook instead of jupyterlab.") + nb_parser.add_argument('--no-browser', action='store_true', default=False, + help=("Start the jupyter server to serve the notebook " + "but don't open the notebook in the browser.\n" + "Use this option to connect remotely from localhost to the machine running the kernel")) nb_parser.add_argument('--foreground', action='store_true', default=False, help="Run jupyter notebook in the foreground.") @@ -151,6 +161,7 @@ def get_parser(with_epilog=False): formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('-V', '--version', action='version', version=abilab.__version__) + # Parser for commands that need to call spglib. spgopt_parser = argparse.ArgumentParser(add_help=False) spgopt_parser.add_argument('--symprec', default=1e-3, type=float, help="""\ @@ -161,6 +172,8 @@ def get_parser(with_epilog=False): spgopt_parser.add_argument('--angle-tolerance', default=5.0, type=float, help="angle_tolerance (float): Angle tolerance for symmetry finding. Default: 5.0") spgopt_parser.add_argument("--no-time-reversal", default=False, action="store_true", help="Don't use time-reversal.") + spgopt_parser.add_argument("--site-symmetry", default=False, action="store_true", + help="Show site symmetries i.e. the point group operations that leave the site invariant.") # Parent parser for common options. copts_parser = argparse.ArgumentParser(add_help=False) @@ -184,6 +197,7 @@ def add_primitive_options(parser): help="Enforce primitive standard cell.") supported_formats = "(abivars, cif, xsf, poscar, qe, siesta, wannier90, cssr, json, None)" + def add_format_arg(parser, default, option=True, formats=None): """Add --format option to a parser with default value `default`.""" formats = supported_formats if formats is None else formats @@ -207,9 +221,11 @@ def add_format_arg(parser, default, option=True, formats=None): help="Extract/Compute Abinit space group from file with structure.") p_abispg.add_argument("-t", "--tolsym", type=float, default=None, help="""\ Gives the tolerance on the atomic positions (reduced coordinates), primitive vectors, or magnetization, -to be considered equivalent, thanks to symmetry operations. This is used in the recognition of the set +to be considered equivalent, thanks to symmetry operations. This value is used by ABINIT in the recognition of the set of symmetries of the system, or the application of the symmetry operations to generate from a reduced set of atoms, -the full set of atoms. Note that a value larger than 0.01 is considered to be unacceptable.""") +The internal default is 1e-8. Setting tolsym to a value larger than 1e-8 will make Abinit detect the spacegroup within +this tolerance and re-symmetrize the input structure. This option is useful if the structure has been taken from a CIF +file that does not have enough significant digits.""") p_abispg.add_argument("-d", "--diff-mode", type=str, default="table", choices=["table", "diff"], help="Select diff output format.") @@ -218,6 +234,9 @@ def add_format_arg(parser, default, option=True, formats=None): help="Convert structure to the specified format.") add_format_arg(p_convert, default="cif") + p_print = subparsers.add_parser('print', parents=[copts_parser, path_selector], + help="Print Structure to terminal.") + # Subparser for supercell command. p_supercell = subparsers.add_parser('supercell', parents=[copts_parser, path_selector], help="Generate supercell.") @@ -240,6 +259,9 @@ def add_format_arg(parser, default, option=True, formats=None): help="Sanitize structure with abi_sanitize, compare structures and save result to file.") add_primitive_options(p_abisanitize) + p_primitive = subparsers.add_parser('primitive', parents=[copts_parser, path_selector, spgopt_parser, savefile_parser], + help="Use spglib to find a smaller unit cell than the input") + # Subparser for irefine p_irefine = subparsers.add_parser('irefine', parents=[copts_parser, path_selector, spgopt_parser], help="Refine structure with abi_sanitize iteratively, stop if target space group is obtained.") @@ -254,6 +276,26 @@ def add_format_arg(parser, default, option=True, formats=None): help="Gives a structure with a conventional cell according to certain standards. " "The standards are defined in Setyawan, W., & Curtarolo, S. (2010) doi:10.1016/j.commatsci.2010.05.010") + # Subparser for proto. + p_proto = subparsers.add_parser('proto', parents=[copts_parser, path_selector], + help=("Find prototype in the AFLOW LIBRARY OF CRYSTALLOGRAPHIC PROTOTYPES. " + "http://doi.org/10.1016/j.commatsci.2017.01.017")) + p_proto.add_argument("--ltol", default=0.2, type=float, help="fractional length tolerance.") + p_proto.add_argument("--stol", default=0.3, type=float, help="site tolerance.") + p_proto.add_argument("--angle-tol", default=5, type=float, help="angle tolerance.") + + # Subparser for wyckoff. + p_wyckoff = subparsers.add_parser('wyckoff', parents=[copts_parser, spgopt_parser, path_selector], + help="Print wyckoff positions. WARNING: still under development!") + p_wyckoff.add_argument("--refine", default=False, action="store_true", + help="Use spglib to refine structure before computation") + + # Subparser for tensor_site. + p_tensor_site = subparsers.add_parser('tensor_site', parents=[copts_parser, spgopt_parser, path_selector], + help="Print symmetry properties of tensors due to site-symmetries. WARNING: still under development!") + p_tensor_site.add_argument("--refine", default=False, action="store_true", + help="Use spglib to refine structure before computation") + # Subparser for neighbors. p_neighbors = subparsers.add_parser('neighbors', parents=[copts_parser, path_selector], help="Get neighbors for each atom in the unit cell, out to a distance radius.") @@ -293,8 +335,18 @@ def add_format_arg(parser, default, option=True, formats=None): # Subparser for notebook. p_notebook = subparsers.add_parser('notebook', parents=[copts_parser, path_selector], help="Read structure from file and generate jupyter notebook.") + p_notebook.add_argument('--classic-notebook', action='store_true', default=False, + help="Use classic notebook instead of jupyterlab.") + p_notebook.add_argument('--no-browser', action='store_true', default=False, + help=("Start the jupyter server to serve the notebook " + "but don't open the notebook in the browser.\n" + "Use this option to connect remotely from localhost to the machine running the kernel")) p_notebook.add_argument('--foreground', action='store_true', default=False, help="Run jupyter notebook in the foreground.") + + p_panel = subparsers.add_parser('panel', parents=[copts_parser, path_selector], + help="Open GUI in web browser, requires panel package.") + # Subparser for kpath. p_kpath = subparsers.add_parser('kpath', parents=[copts_parser, path_selector], help="Read structure from file, generate k-path for band-structure calculations.") @@ -348,6 +400,12 @@ def add_format_arg(parser, default, option=True, formats=None): p_kstar.add_argument("-k", "--kpoint", nargs=3, required=True, type=float, help="K-point in reduced coordinates e.g. 0.25 0 0") + # Subparser for keq. + p_keq = subparsers.add_parser('keq', parents=[copts_parser, path_selector, spgopt_parser], + help="Read structure from file, check whether two k-points are equivalent by symmetry.") + p_keq.add_argument("-k", "--kpoints", nargs=6, required=True, type=float, + help="K-points in reduced coordinates e.g. 0.25 0 0 0 0.25 0") + # Subparser for visualize command. p_visualize = subparsers.add_parser('visualize', parents=[copts_parser, path_selector], help=("Visualize the structure with the specified application. " @@ -358,14 +416,14 @@ def add_format_arg(parser, default, option=True, formats=None): # Options for commands accessing the materials project database. mp_rest_parser = argparse.ArgumentParser(add_help=False) mp_rest_parser.add_argument("--mapi-key", default=None, - help="Pymatgen MAPI_KEY. Use value in .pmgrc.yaml if not specified.") + help="Pymatgen PMG_MAPI_KEY. Use value in .pmgrc.yaml if not specified.") mp_rest_parser.add_argument("--endpoint", help="Pymatgen database.", default="https://www.materialsproject.org/rest/v2") mp_rest_parser.add_argument("-b", "--browser", default=False, action='store_true', help="Open materials-project webpages in browser") # Subparser for mp_id command. p_mpid = subparsers.add_parser('mp_id', parents=[copts_parser, mp_rest_parser], - help="Get structure from the pymatgen database. Export to format. Requires internet connection and MAPI_KEY.") + help="Get structure from the pymatgen database. Export to format. Requires internet connection and PMG_MAPI_KEY.") p_mpid.add_argument("mpid", type=str, default=None, help="Pymatgen identifier.") add_format_arg(p_mpid, default="cif") @@ -378,7 +436,7 @@ def add_format_arg(parser, default, option=True, formats=None): p_mpsearch = subparsers.add_parser('mp_search', parents=[mp_rest_parser, copts_parser, nb_parser], help="Get structure from the pymatgen database. Requires internet connection and PMG_MAPI_KEY") p_mpsearch.add_argument("chemsys_formula_id", type=str, default=None, - help="A chemical system (e.g., Li-Fe-O), or formula (e.g., Fe2O3) or materials_id (e.g., mp-1234).") + help="A chemical system (e.g., Li-Fe-O), or formula (e.g., Fe2O3) or materials_id (e.g., mp-149).") p_mpsearch.add_argument("-s", "--select-spgnum", type=int, default=None, help="Select structures with this space group number.") add_format_arg(p_mpsearch, default="abivars") @@ -394,6 +452,13 @@ def add_format_arg(parser, default, option=True, formats=None): well as red crosses. If a number > 0 is entered, all phases with ehull < show_unstable will be shown.""") + # Subparser for mp_ebands command. + p_mp_ebands = subparsers.add_parser('mp_ebands', parents=[copts_parser, mp_rest_parser], + help="Get structure from the pymatgen database. Export to format. Requires internet connection and PMG_MAPI_KEY.") + p_mp_ebands.add_argument("chemsys_formula_id", type=str, default=None, + help="A chemical system (e.g., Li-Fe-O), or formula (e.g., Fe2O3) or materials_id (e.g., mp-149).") + #add_format_arg(p_mp_ebands, default="cif") + # Subparser for cod_search command. p_codsearch = subparsers.add_parser('cod_search', parents=[copts_parser, nb_parser], help="Get structure from COD database. Requires internet connection and mysql") @@ -413,10 +478,11 @@ def add_format_arg(parser, default, option=True, formats=None): # Subparser for animate command. p_animate = subparsers.add_parser('animate', parents=[copts_parser, path_selector], - help="Read structures from HIST.nc or XDATCAR. Print structures in Xrysden AXSF format to stdout.") + help="Read structures from HIST.nc or XDATCAR. Print structures in Xcrysden AXSF format to stdout.") return parser + @prof_main def main(): @@ -437,6 +503,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if not options.command: show_examples_and_exit(error_code=1) + if hasattr(options, "format"): + options.format = options.format.strip() + # loglevel is bound to the string value obtained from the command line argument. # Convert to upper case to allow the user to specify --loglevel=DEBUG or --loglevel=debug import logging @@ -451,25 +520,30 @@ def show_examples_and_exit(err_msg=None, error_code=1): if options.command == "spglib": structure = abilab.Structure.from_file(options.filepath) print(structure.spget_summary(symprec=options.symprec, angle_tolerance=options.angle_tolerance, - verbose=options.verbose)) - #remove_equivalent_atoms(structure) + site_symmetry=options.site_symmetry, verbose=options.verbose)) elif options.command == "abispg": structure = abilab.Structure.from_file(options.filepath) - spgrp = structure.abi_spacegroup + check_ordered_structure(structure) + abi_spg = structure.abi_spacegroup - if spgrp is not None: + if abi_spg is not None and options.tolsym is None: print(structure.spget_summary(verbose=options.verbose)) else: - # Here we compare Abinit wrt spglib. If spgrp is None, we create a temporary + # Here we compare Abinit wrt spglib. If abi_spg is None, we create a temporary # task to run the code in dry-run mode. - print("FILE does not contain Abinit symmetry operations.") - print("Calling Abinit in --dry-run mode with chkprim = 0 to get space group.") + if abi_spg is None: + print("FILE does not contain Abinit symmetry operations.") + cprint("Calling Abinit in --dry-run mode with chkprim = 0 to get space group.") + if options.tolsym is not None and options.tolsym > 1e-8: + cprint("Crystal structure will be re-symmetrized by Abinit with tolsym: %s" % options.tolsym, "yellow") + from abipy.data.hgh_pseudos import HGH_TABLE gsinp = factories.gs_input(structure, HGH_TABLE, spin_mode="unpolarized") gsinp["chkprim"] = 0 abistructure = gsinp.abiget_spacegroup(tolsym=options.tolsym) print(abistructure.spget_summary(verbose=options.verbose)) + print("") diff_structures([structure, abistructure], mode=options.diff_mode, headers=["Input structure", "After Abinit symmetrization"], fmt="abivars") @@ -482,6 +556,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if fmt == "cif" and options.filepath.endswith(".cif"): fmt = "abivars" print(abilab.Structure.from_file(options.filepath).convert(fmt=fmt)) + elif options.command == "print": + print(abilab.Structure.from_file(options.filepath).to_string(verbose=options.verbose)) + elif options.command == "supercell": structure = abilab.Structure.from_file(options.filepath) @@ -512,7 +589,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): if not options.verbose: print("\nUse -v for more info") - #print(sanitized.convert(fmt="cif")) else: #print("\nDifference between structures:") if len(structure) == len(sanitized): @@ -530,6 +606,18 @@ def show_examples_and_exit(err_msg=None, error_code=1): # Save file. save_structure(sanitized, options) + elif options.command == "primitive": + structure = abilab.Structure.from_file(options.filepath) + primitive = structure.get_primitive_structure(tolerance=0.25, use_site_props=False, constrain_latt=None) + separator = "\n" + 90 * "=" + print("\nInitial structure:\n", structure, separator) + print("\nPrimitive structure returned by pymatgen:\n", primitive, separator) + print("\nAbinit input for primitive structure:\n", primitive.abi_string) + if structure != primitive: + print("\nInput structure is not primitive (according to pymatgen + spglib)") + else: + print("\nInput structure seems to be primitive (according to pymatgen + spglib)") + elif options.command == "irefine": structure = abilab.Structure.from_file(options.filepath) sanitized = structure.copy() @@ -545,11 +633,11 @@ def show_examples_and_exit(err_msg=None, error_code=1): spg_symb, spg_num = sanitized.get_space_group_info(symprec=symprec, angle_tolerance=angle_tolerance) print(">>> Space-group number:", spg_symb, ", symbol:", spg_num, "for trial:", itrial) if spg_num == options.target_spgnum: - print(2 * "\n", "# Final structure with space group number:", spg_symb, ", symbol:", spg_num, 2 *"\n") + print(2 * "\n", "# Final structure with space group number:", spg_symb, ", symbol:", spg_num, 2 * "\n") print(sanitized.convert(fmt="cif")) break - # Increment counter and tols. + # Increment counter and tolerances. itrial += 1 symprec += options.symprec_step angle_tolerance += options.angle_tolerance_step @@ -562,7 +650,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.command == "conventional": print("\nCalling get_conventional_standard_structure to get conventional structure:") - print("The standards are defined in Setyawan, W., & Curtarolo, S. (2010). ") + print("The standards are defined in Setyawan, W., & Curtarolo, S. (2010).") print("High-throughput electronic band structure calculations: Challenges and tools. ") print("Computational Materials Science, 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010\n") @@ -593,6 +681,48 @@ def show_examples_and_exit(err_msg=None, error_code=1): # Save file. save_structure(conv, options) + elif options.command == "proto": + structure = abilab.Structure.from_file(options.filepath) + from pymatgen.analysis.aflow_prototypes import AflowPrototypeMatcher + m = AflowPrototypeMatcher(initial_ltol=options.ltol, initial_stol=options.stol, + initial_angle_tol=options.angle_tol) + dlist = m.get_prototypes(structure) + if not dlist: + cprint("Cannot find AFLOW prototype for structure.") + print(structure.to_string(verbose=options.verbose)) + return 1 + else: + cprint("Found %d matches" % len(dlist), "green") + for d in dlist: + if "snl" in d: + snl = d.pop("snl") + if options.verbose: pprint(snl.as_dict()) + pprint(d) + url = "http://aflow.org/CrystalDatabase/%s.html" % d["tags"]["aflow"] + print("AFLOW url: %s\n" % url) + if not options.verbose: + print("Use --verbose to increase output level") + + elif options.command == "wyckoff": + structure = abilab.Structure.from_file(options.filepath) + if options.refine: + print("Refining structure with symprec: %s, angle_tolerance: %s" % (options.symprec, options.angle_tolerance)) + structure = structure.refine(symprec=options.symprec, angle_tolerance=options.angle_tolerance) + print(structure.spget_summary(verbose=options.verbose)) + ss = structure.site_symmetries + df = ss.get_wyckoff_dataframe(verbose=options.verbose) + abilab.print_dataframe(df, title="\nWyckoff positions in reduced coordinates.") + + elif options.command == "tensor_site": + structure = abilab.Structure.from_file(options.filepath) + if options.refine: + print("Refining structure with symprec: %s, angle_tolerance: %s" % (options.symprec, options.angle_tolerance)) + structure = structure.refine(symprec=options.symprec, angle_tolerance=options.angle_tolerance) + print(structure.spget_summary(verbose=options.verbose)) + ss = structure.site_symmetries + df = ss.get_tensor_rank2_dataframe(verbose=options.verbose) + abilab.print_dataframe(df, title="\nTensor components in reduced coordinates (rank 2, symmetric)") + elif options.command == "neighbors": abilab.Structure.from_file(options.filepath).print_neighbors(radius=options.radius) @@ -625,7 +755,20 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.command == "notebook": structure = abilab.Structure.from_file(options.filepath) - structure.make_and_open_notebook(nbpath=None, foreground=options.foreground) + structure.make_and_open_notebook(nbpath=None, foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) + + elif options.command == "panel": + structure = abilab.Structure.from_file(options.filepath) + try: + import panel # flake8: noqa + except ImportError as exc: + cprint("Use `conda install panel` or `pip install panel` to install the python package.", "red") + raise exc + + structure.get_panel().show() #threaded=True) + return 0 elif options.command == "visualize": structure = abilab.Structure.from_file(options.filepath) @@ -679,8 +822,11 @@ def show_examples_and_exit(err_msg=None, error_code=1): #elif options.command == "kmesh_jhu": # structure = abilab.Structure.from_file(options.filepath) - # ksampling = structure.ksampling_from_jhudb(kppra=1000) - # #print(ksampling) + # from pymatgen.ext.jhu import get_kpoints + # kpoints = get_kpoints(structure, min_distance=0, min_total_kpoints=1, + # kppra=None, gap_distance=7, remove_symmetry=None, + # include_gamma="auto", header="simple", incar=None) + # #print(kpoints) elif options.command == "lgk": structure = abilab.Structure.from_file(options.filepath) @@ -703,9 +849,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.command == "kstar": structure = abilab.Structure.from_file(options.filepath) - # TODO - #kstar = structure.get_star_kpoint(options.kpoint, has_timerev=not options.no_time_reversal) - # Call spglib to get spacegroup if Abinit spacegroup is not available. if structure.abi_spacegroup is None: structure.spgset_abi_spacegroup(has_timerev=not options.no_time_reversal) @@ -716,6 +859,23 @@ def show_examples_and_exit(err_msg=None, error_code=1): for k in kstar: print(4 * " ", repr(k)) + elif options.command == "keq": + structure = abilab.Structure.from_file(options.filepath) + + # Call spglib to get spacegroup if Abinit spacegroup is not available. + if structure.abi_spacegroup is None: + structure.spgset_abi_spacegroup(has_timerev=not options.no_time_reversal) + + k1, k2 = options.kpoints[:3], options.kpoints[3:6] + k1tab = structure.abi_spacegroup.symeq(k1, k2) + + if k1tab.isym != -1: + print("\nk1:", k1, "and k2:", k2, "are symmetry equivalent k-points\n") + print("Related by the symmetry operation (reduced coords):\n", k1tab.op) + print("With umklapp vector Go = TO(k1) - k2 =", k1tab.g0) + else: + print(k1, "and", k2, "are NOT symmetry equivalent") + elif options.command == "mp_id": # Get the Structure corresponding to material_id. structure = abilab.Structure.from_mpid(options.mpid, final=True, @@ -726,11 +886,13 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.command == "mp_match": mp = abilab.mp_match_structure(options.filepath) if not mp.structures: - cprint("No structure found in database", "yellow") + cprint("No structure found in MP database", "yellow") return 1 if options.notebook: - return mp.make_and_open_notebook(foreground=options.foreground) + return mp.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: mp.print_results(fmt=options.format, verbose=options.verbose) @@ -745,7 +907,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if options.select_spgnum: mp = mp.filter_by_spgnum(options.select_spgnum) if options.notebook: - return mp.make_and_open_notebook(foreground=options.foreground) + return mp.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: mp.print_results(fmt=options.format, verbose=options.verbose) @@ -765,6 +929,34 @@ def show_examples_and_exit(err_msg=None, error_code=1): pdr.print_dataframes(verbose=options.verbose) pdr.plot(show_unstable=options.show_unstable) + elif options.command == "mp_ebands": + if os.path.exists(options.chemsys_formula_id): + mp = abilab.mp_match_structure(options.chemsys_formula_id) + for mpid in mp.ids: + ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + print(ebands) + else: + if options.chemsys_formula_id.startswith("mp-"): + # Assume valid mp identifier. + mpid = options.chemsys_formula_id + ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + print(ebands) + else: + mp = abilab.mp_search(options.chemsys_formula_id) + if not mp.structures: + cprint("No structure found in Materials Project database", "yellow") + return 1 + + for mpid, structure in zip(mp.ids, mp.structures): + if structure is None: + cprint("ignoring mpid %s because cannot find structure" % mpid, "red") + continue + ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + if ebands is None: + cprint("Cannot get ebands for structure:\n%s" % str(structure), "red") + else: + print(ebands) + elif options.command == "cod_search": cod = abilab.cod_search(options.formula, primitive=options.primitive) if not cod.structures: @@ -773,7 +965,9 @@ def show_examples_and_exit(err_msg=None, error_code=1): if options.select_spgnum: cod = cod.filter_by_spgnum(options.select_spgnum) if options.notebook: - return cod.make_and_open_notebook(foreground=options.foreground) + return cod.make_and_open_notebook(foreground=options.foreground, + classic_notebook=options.classic_notebook, + no_browser=options.no_browser) else: cod.print_results(fmt=options.format, verbose=options.verbose) diff --git a/abipy/scripts/abiview.py b/abipy/scripts/abiview.py index d1f0e247b..e79dfbe5e 100755 --- a/abipy/scripts/abiview.py +++ b/abipy/scripts/abiview.py @@ -3,12 +3,9 @@ This script visualizes results with external graphical applications. or convert data from Abinit files (usually netcdf) to other formats. """ -from __future__ import unicode_literals, division, print_function, absolute_import - import sys import os import argparse -import numpy as np from monty.functools import prof_main from monty.termcolor import cprint @@ -20,13 +17,21 @@ def handle_overwrite(path, options): """Exit 1 if file ``path`` exists and not options.force else return path.""" name_parts = os.path.splitext(path) - print("Writing %s file:" % name_parts[-1].replace("." , "").upper()) + print("Writing %s file:" % name_parts[-1].replace(".", "").upper()) if os.path.exists(path) and not options.force: cprint("Cannot overwrite pre-existent file. Use `-f` options.", "red") sys.exit(1) return path +def df_to_clipboard(options, df): + """Copy dataframe to clipboard if options.clipboard.""" + if getattr(options, "clipboard", False): + cprint("Copying dataframe to the system clipboard.", "green") + cprint("This can be pasted into Excel, for example", "green") + df.to_clipboard() + + def abiview_structure(options): """ Visualize the structure with the specified visualizer. Requires external app @@ -47,11 +52,12 @@ def abiview_hist(options): with abilab.abiopen(options.filepath) as hist: print(hist.to_string(verbose=options.verbose)) if options.appname is not None: - hist.visualize(appname=options.appname) + hist.visualize(appname=options.appname, to_unit_cell=options.to_unit_cell) elif options.xdatcar: xpath = options.filepath + ".XDATCAR" handle_overwrite(xpath, options) - hist.write_xdatcar(filepath=xpath, groupby_type=True, overwrite=True) + hist.write_xdatcar(filepath=xpath, groupby_type=True, overwrite=True, + to_unit_cell=options.to_unit_cell) else: hist.plot() @@ -72,25 +78,16 @@ def abiview_data(options): return 0 -def abiview_abo(options): - """ - Plot self-consistent iterations extracted from Abinit output file - as well as timer data (if present) - """ - with abilab.abiopen(options.filepath) as abo: - print(abo.to_string(verbose=options.verbose)) - abo.plot() - #timer = abo.get_timer() - return 0 - - -def abiview_log(options): - """ - Print WARNINGS/COMMENTS/ERRORS found in Abinit log file. - """ - with abilab.abiopen(options.filepath) as abo: - print(abo.to_string(verbose=options.verbose)) - return 0 +#def abiview_abo(options): +# """ +# Plot self-consistent iterations extracted from Abinit output file +# as well as timer data (if present) +# """ +# with abilab.abiopen(options.filepath) as abo: +# print(abo.to_string(verbose=options.verbose)) +# abo.plot() +# #timer = abo.get_timer() +# return 0 def abiview_dirviz(options): @@ -144,7 +141,7 @@ def abiview_skw(options): def abiview_fs(options): """ - Extract eigenvaleus in the IBZ from file and visualize Fermi surface with --appname + Extract eigenvalues in the IBZ from file and visualize Fermi surface with --appname """ with abilab.abiopen(options.filepath) as abifile: eb3d = abifile.ebands.get_ebands3d() @@ -161,31 +158,6 @@ def abiview_fs(options): return 0 -def abiview_fatbands(options): - """ - Plot electronic fatbands bands if file contains high-symmetry k-path - or PJDOS if k-sampling. Requires FATBANDS.nc file. - """ - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) - - return 0 - - -def abiview_optic(options): - """ - Plot optical spectra produced by optic code. Requires OPTIC.nc file. - """ - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) - - return 0 - - def abiview_ddb(options): """ Invoke Anaddb to compute phonon bands and DOS from the DDB, plot the results. @@ -209,7 +181,6 @@ def abiview_ddb(options): print("Calculation completed.\nResults available in", os.path.dirname(phbst_file.filepath)) phbands = phbst_file.phbands - phdos = phdos_file.phdos if options.xmgrace: outpath = options.filepath + ".agr" @@ -222,6 +193,7 @@ def abiview_ddb(options): elif options.phononwebsite: return phbands.view_phononwebsite(browser=options.browser, verbose=options.verbose) else: + phdos = phdos_file.phdos units = "mev" with MplExpose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout) as e: #e(phbst_file.expose()) @@ -232,6 +204,13 @@ def abiview_ddb(options): e(phbands.plot_fatbands(units=units, phdos_file=phdos_file, show=False)) e(phdos.plot(units=units, show=False)) e(phdos_file.plot_pjdos_type(units=units, show=False)) + #try + # msq_dos = phdos_file.msq_dos + #except RuntimeError: + # msq_dos = None + #if msq_dos is not None: + # e(msq_dos.plot_uiso(show=False)) + # e(msq_dos.plot_uiso(show=False)) phbst_file.close() phdos_file.close() @@ -239,72 +218,90 @@ def abiview_ddb(options): return 0 -def abiview_phbands(options): - """Plot phonon bands. Accept any file with PhononBands e.g. PHBST.nc, ...""" - with abilab.abiopen(options.filepath) as abifile: - if options.xmgrace: - outpath = options.filepath + ".agr" - abifile.phbands.to_xmgrace(handle_overwrite(outpath, options)) - #elif options.bxsf: - # outpath = options.filepath + ".bxsf" - # abifile.phbands.to_bxsf(handle_overwrite(outpath, options)) - # return 0 - elif options.phononwebsite: - return abifile.phbands.view_phononwebsite(browser=options.browser) - else: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose_phbands(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose, units="mev") - - return 0 +def abiview_ddb_vs(options): + """ + Compute speed of sound by fitting phonon frequencies along selected directions. + """ + num_points = 20; asr = 2; chneut = 1; dipdip = 1 + print(""" +Computing phonon frequencies for linear least-squares with: +num_points= {num_points}, asr = {asr}, chneut = {chneut}, dipdip = {dipdip} +""".format(**locals())) + print("Invoking anaddb ... ") + sv = abilab.SoundVelocity.from_ddb(options.filepath, num_points=num_points, + asr=asr, chneut=chneut, dipdip=dipdip, verbose=options.verbose) + #print("Calculation completed.\nResults available in", os.path.dirname(phbst_file.filepath)) -def abiview_phdos(options): - """Plot phonon DOS. Require PHDOS.nc file.""" - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - units = "mev" - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose, units="mev") + df = sv.get_dataframe() + abilab.print_dataframe(df, title="Speed of sound for different directions:") + df_to_clipboard(options, df) + sv.plot() return 0 -def abiview_scr(options): +def abiview_ddb_ir(options): """ - Plot screening results computed by GW code. Requires SCR.nc file. + Compute infra-red spectrum from DDB. Plot results. """ - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) + asr = 2; chneut = 1; dipdip = 1 + print(""" +Computing phonon frequencies for infra-red spectrum with: +asr = {asr}, chneut = {chneut}, dipdip = {dipdip} +""".format(**locals())) + + with abilab.abiopen(options.filepath) as ddb: + tgen = ddb.anaget_dielectric_tensor_generator(asr=asr, chneut=chneut, dipdip=dipdip, verbose=options.verbose) + print(tgen.to_string(verbose=options.verbose)) + + gamma_ev = 1e-4 + print("Plotting dielectric tensor with constant phonon damping: %s (eV)" % gamma_ev) + tgen.plot_all(gamma_ev=gamma_ev) return 0 -def abiview_sigres(options): +def abiview_ddb_ifc(options): """ - Plot the QP results. Requires SIGRES.nc file. + Visualize interatomic force constants in real space. """ - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) + asr = 2; chneut = 1; dipdip = 1 + print(""" +Computing interatomic force constants with +asr = {asr}, chneut = {chneut}, dipdip = {dipdip} +""".format(**locals())) + + with abilab.abiopen(options.filepath) as ddb: + # Execute anaddb to compute the interatomic force constants. + ifc = ddb.anaget_ifc(asr=asr, chneut=chneut, dipdip=dipdip) + #print(ifc) + with MplExpose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout) as e: + e(ifc.plot_longitudinal_ifc(title="Longitudinal IFCs", show=False)) + e(ifc.plot_longitudinal_ifc_short_range(title="Longitudinal IFCs short range", show=False)) + e(ifc.plot_longitudinal_ifc_ewald(title="Longitudinal IFCs Ewald", show=False)) return 0 -def abiview_mdf(options): - """ - Plot the macroscopic dielectric functions computed by the Bethe-Salpeter code. - Requires MDF.nc file. - """ +def abiview_phbands(options): + """Plot phonon bands. Accept any file with PhononBands e.g. PHBST.nc, ...""" with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) + if options.xmgrace: + outpath = options.filepath + ".agr" + abifile.phbands.to_xmgrace(handle_overwrite(outpath, options)) + #elif options.bxsf: + # outpath = options.filepath + ".bxsf" + # abifile.phbands.to_bxsf(handle_overwrite(outpath, options)) + # return 0 + elif options.phononwebsite: + return abifile.phbands.view_phononwebsite(browser=options.browser) + else: + print(abifile.to_string(verbose=options.verbose)) + abifile.expose_phbands(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, + verbose=options.verbose, units="mev") - return 0 + return 0 def abiview_denpot(options): @@ -327,36 +324,6 @@ def abiview_denpot(options): return 0 -def abiview_gruns(options): - """Plot Grunesein parameters. Requires GRUNS.nc file.""" - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) - - return 0 - - -def abiview_a2f(options): - """Plot Eliashberg function. Requires A2F.nc file.""" - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) - - return 0 - - -def abiview_sigeph(options): - """Plot e-ph self-energy. Requires SIGEPH.nc file.""" - with abilab.abiopen(options.filepath) as abifile: - print(abifile.to_string(verbose=options.verbose)) - abifile.expose(slide_mode=options.slide_mode, slide_timeout=options.slide_timeout, - verbose=options.verbose) - - return 0 - - def abiview_lobster(options): """Analyze lobster output files in directory.""" from abipy.electrons.lobster import LobsterAnalyzer @@ -397,8 +364,6 @@ def get_epilog(): # Text files ############ - abiview.py abo run.abo ==> Plot SCF iterations extracted from Abinit output file. - abiview.py log run.log ==> Print warnings/comments/errors found in Abinit log file. abiview.py data FILE ==> Parse text FILE with data in tabular format and plot arrays. ########### @@ -407,10 +372,8 @@ def get_epilog(): abiview.py ebands out_WFK.nc ==> Plot electrons bands (or DOS) with matplotlib. abiview.py ebands out_GSR.nc --xmgrace ==> Generate xmgrace file with electron bands. - abiview.py fatbands out_FATBANDS.nc ==> Plot electron fatbands or PJDOS depending on k-sampling. abiview.py fs FILE_WITH_KMESH.nc ==> Visualize Fermi surface from netcdf file with electron energies on a k-mesh. Use -a xsf to change application e.g. Xcrysden. - abiview.py optic out_OPTIC.nc ==> Plot optical properties computed by optic code. abiview.py skw out_GSR.nc ==> Interpolate IBZ energies with star-functions and plot interpolated bands. @@ -418,25 +381,11 @@ def get_epilog(): # Phonons ######### - abiview.py ddb out_DDB ==> Compute ph-bands and DOS from DDB, plot results. + abiview.py ddb in_DDB ==> Compute ph-bands and DOS from DDB, plot results. + abiview.py ddb_vs ==> Compute speed of sound from DDB by fitting phonon frequencies. + abiview.py ddb_ir ==> Compute infra-red spectrum from DDB. Plot results. + abiview.py ddb_ifc ==> Visualize interatomic force constants in real space. abiview.py phbands out_PHBST.nc -web ==> Visualize phonon bands and displacements with phononwebsite. - abiview.py phdos out_PHDOS.nc ==> Plot phonon DOS. - -####### -# E-PH -####### - - abiview.py a2f out_A2F.nc ==> Plot Eliashberg results. - abiview.py sigeph out_SIGEPH.nc ==> Plot E-PH self-energy. - -######## -# GW/BSE -######## - - abiview.py scr out_SCR.nc ==> Plot results stored in SCR file (GW code). - abiview.py sigres out_SIGRES.nc ==> Plot QP results stored in SIGRES. - abiview.py mdf out_MDF.nc --seaborn ==> Plot macroscopic dielectric functions with excitonic effects. - Use seaborn settings for plots. ############### # Miscelleanous @@ -454,6 +403,7 @@ def get_epilog(): #abiview.py denpot out_DEN.nc ==> Visualize density with Vesta. #abiview.py denpot out_DEN.nc --chgcar ==> Convert DEN file into CHGCAR fileformat. + def get_parser(with_epilog=False): # Parent parser for common options. @@ -478,6 +428,11 @@ def get_parser(with_epilog=False): slide_parser.add_argument("-t", "--slide-timeout", type=int, default=None, help="Close figure after slide-timeout seconds (only if slide-mode). Block if not specified.") + # Parent parser for commands that operating on pandas dataframes + pandas_parser = argparse.ArgumentParser(add_help=False) + pandas_parser.add_argument("-c", '--clipboard', default=False, action="store_true", + help="Copy dataframe to the system clipboard. This can be pasted into Excel, for example") + # Parent parser for commands supporting ipython ipy_parser = argparse.ArgumentParser(add_help=False) ipy_parser.add_argument('-ipy', '--ipython', default=False, action="store_true", help='Invoke ipython terminal.') @@ -541,6 +496,8 @@ def add_args(p, *args): help=("Application name. Default: ovito. " "Possible options: `%s`, `mpl` (matplotlib) `mayavi`, `vtk`" % ", ".join(Visualizer.all_visunames()))) p_hist.add_argument("--xdatcar", default=False, action="store_true", help="Convert HIST file into XDATCAR format.") + p_hist.add_argument("--to-unit-cell", default=False, action="store_true", + help="Whether to translate sites into the unit cell.") add_args(p_hist, "force") # Subparser for data command. @@ -549,12 +506,9 @@ def add_args(p, *args): help="Use the row index as x-value in the plot. By default the plotter uses the first column as x-values") # Subparser for abo command. - p_abo = subparsers.add_parser('abo', parents=[copts_parser], help=abiview_abo.__doc__) + #p_abo = subparsers.add_parser('abo', parents=[copts_parser], help=abiview_abo.__doc__) - # Subparser for log command. - p_log = subparsers.add_parser('log', parents=[copts_parser], help=abiview_log.__doc__) - - # Subparser for log command. + # Subparser for dirviz command. p_dirviz = subparsers.add_parser('dirviz', parents=[copts_parser], help=abiview_dirviz.__doc__) p_dirviz.add_argument("-e", "--engine", type=str, default="fdp", help=("graphviz engine: ['dot', 'neato', 'twopi', 'circo', 'fdp', 'sfdp', 'patchwork', 'osage']. " @@ -571,47 +525,32 @@ def add_args(p, *args): help=("Ratio between the number of star functions and the number of ab-initio k-points. " "The default should be OK in many systems, larger values may be required for accurate derivatives.")) p_skw.add_argument("-ld", "--line-density", type=int, default=20, - help ="Number of points in the smallest segment of the k-path.") + help="Number of points in the smallest segment of the k-path.") # Subparser for fs command. p_fs = subparsers.add_parser('fs', parents=[copts_parser], help=abiview_fs.__doc__) p_fs.add_argument("-a", "--appname", type=str, default="mpl", help="Application name. Possible options: mpl (matplotlib, default), xsf (xcrysden), mayavi.") - # Subparser for fatbands command. - p_fatbands = subparsers.add_parser('fatbands', parents=[copts_parser, slide_parser], help=abiview_fatbands.__doc__) - # Subparser for ddb command. p_ddb = subparsers.add_parser('ddb', parents=[copts_parser, slide_parser], help=abiview_ddb.__doc__) add_args(p_ddb, "xmgrace", "phononweb", "browser", "force") - # Subparser for phbands command. - p_phbands = subparsers.add_parser('phbands', parents=[copts_parser, slide_parser], help=abiview_phbands.__doc__) - add_args(p_phbands, "xmgrace", "phononweb", "browser", "force") - - # Subparser for phdos command. - p_phdos = subparsers.add_parser('phdos', parents=[copts_parser, slide_parser], help=abiview_phdos.__doc__) - - # Subparser for gruns command. - p_gruns = subparsers.add_parser('gruns', parents=[copts_parser, slide_parser], help=abiview_gruns.__doc__) + # Subparser for ddb_vs command. + p_ddb_vs = subparsers.add_parser('ddb_vs', parents=[copts_parser, pandas_parser, slide_parser], + help=abiview_ddb_vs.__doc__) - # Subparser for scr command. - p_scr = subparsers.add_parser('scr', parents=[copts_parser, slide_parser], help=abiview_scr.__doc__) + # Subparser for ddb_ir command. + p_ddb_ir = subparsers.add_parser('ddb_ir', parents=[copts_parser, pandas_parser, slide_parser], + help=abiview_ddb_ir.__doc__) - # Subparser for sigres command. - p_sigres = subparsers.add_parser('sigres', parents=[copts_parser, slide_parser], help=abiview_sigres.__doc__) + # Subparser for ddb_ifc command. + p_ddb_ifc = subparsers.add_parser('ddb_ifc', parents=[copts_parser, pandas_parser, slide_parser], + help=abiview_ddb_ifc.__doc__) - # Subparser for mdf command. - p_mdf = subparsers.add_parser('mdf', parents=[copts_parser, slide_parser], help=abiview_mdf.__doc__) - - # Subparser for optic command. - p_optic = subparsers.add_parser('optic', parents=[copts_parser, slide_parser], help=abiview_optic.__doc__) - - # Subparser for a2f command. - p_a2f = subparsers.add_parser('a2f', parents=[copts_parser, slide_parser], help=abiview_a2f.__doc__) - - # Subparser for sigeph command. - p_sigeph = subparsers.add_parser('sigeph', parents=[copts_parser, slide_parser], help=abiview_sigeph.__doc__) + # Subparser for phbands command. + p_phbands = subparsers.add_parser('phbands', parents=[copts_parser, slide_parser], help=abiview_phbands.__doc__) + add_args(p_phbands, "xmgrace", "phononweb", "browser", "force") # Subparser for lobster command. p_lobster = subparsers.add_parser('lobster', parents=[copts_parser, ipy_parser, nb_parser], @@ -675,5 +614,6 @@ def show_examples_and_exit(err_msg=None, error_code=1): # Dispatch return globals()["abiview_" + options.command](options) + if __name__ == "__main__": sys.exit(main()) diff --git a/abipy/scripts/tests/test_abilab.py b/abipy/scripts/tests/test_abilab.py index 4eb8439b8..a1abab1d6 100644 --- a/abipy/scripts/tests/test_abilab.py +++ b/abipy/scripts/tests/test_abilab.py @@ -1,11 +1,10 @@ # coding: utf-8 -"""Test manager files.""" -from __future__ import print_function, division, unicode_literals, absolute_import - +"""Test abilab module.""" import os import abipy.data as abidata -from abipy import abilab +import json +from abipy import abilab from abipy.core.testing import AbipyTest @@ -31,6 +30,16 @@ def test_abilab(self): d = abilab.software_stack() assert d + filepath = self.get_tmpname(text=True, suffix=".json") + data = {"foo": "bar"} + abilab.mjson_write(data, filepath, indent=4) + data = abilab.mjson_load(filepath) + assert data["foo"] == "bar" + + same_data = abilab.mjson_loads(json.dumps(data)) + assert len(same_data) == len(data) + assert same_data["foo"] == data["foo"] + assert not abilab.abicheck(verbose=1) abilab.abipy_logo1() @@ -41,4 +50,6 @@ def test_abilab(self): abilab.enable_notebook(with_seaborn=True) assert abilab.in_notebook() abilab.disable_notebook() - assert not abilab.in_notebook() \ No newline at end of file + assert not abilab.in_notebook() + + assert abilab.install_config_files(workdir=self.mkdtemp()) == 0 diff --git a/abipy/scripts/tests/test_managers.py b/abipy/scripts/tests/test_managers.py index 0c42ab9fd..28599a835 100644 --- a/abipy/scripts/tests/test_managers.py +++ b/abipy/scripts/tests/test_managers.py @@ -1,6 +1,5 @@ # coding: utf-8 """Test manager files.""" -from __future__ import print_function, division, unicode_literals, absolute_import import os import abipy.data as abidata @@ -31,4 +30,4 @@ def test_schedulers(self): sched = flowtk.PyFlowScheduler.from_file(p) print(sched) - #assert 0 \ No newline at end of file + #assert 0 diff --git a/abipy/scripts/tests/test_scripts.py b/abipy/scripts/tests/test_scripts.py index 9cc51d620..3abdc6e09 100644 --- a/abipy/scripts/tests/test_scripts.py +++ b/abipy/scripts/tests/test_scripts.py @@ -1,7 +1,5 @@ # coding: utf-8 """Test AbiPy command line scripts.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import sys import os import abipy.data as abidata @@ -9,13 +7,15 @@ from scripttest import TestFileEnvironment from monty.inspect import all_subclasses -from pymatgen.io.abinit.qadapters import QueueAdapter +from abipy.flowtk.qadapters import QueueAdapter from abipy.core.testing import AbipyTest from abipy import abilab script_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) +test_files_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "test_files")) + def test_if_all_scripts_are_tested(): """Testing if all scripts are tested""" @@ -46,9 +46,9 @@ def get_env(self, check_help_version=True): env = TestFileEnvironment() # Use Agg backend for plots. - #env.writefile("matplotlibrc", "backend: Agg") - #with open(os.path.join(env.base_path, "matplotlibrc"), "wt") as fh: - # fh.write("backend: Agg\n") + #if not os.path.exists(env.base_path): os.makedirs(env.base_path) + with open(os.path.join(env.base_path, "matplotlibrc"), "wt") as fh: + fh.write("backend: Agg\n") if check_help_version: # Start with --help. If this does not work... @@ -123,6 +123,10 @@ def test_abiopen(self): path = abidata.ref_file(f) r = env.run(self.script, path, "-p", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + # Test abiopen with json file + json_path = os.path.join(test_files_dir, "nscf_input.json") + r = env.run(self.script, json_path, "-e", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + class TestAbistruct(ScriptTest): script = os.path.join(script_dir, "abistruct.py") @@ -140,11 +144,14 @@ def test_abispg(self): r = env.run(self.script, "abispg", ncfile, "-t 1e-6", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + r = env.run(self.script, "primitive", ncfile, self.loglevel, self.verbose, + expect_stderr=self.expect_stderr) + def test_convert(self): """Testing abistruct convert""" ncfile = abidata.ref_file("tgw1_9o_DS4_SIGRES.nc") env = self.get_env() - for fmt in ["cif", "cssr", "POSCAR", "json", "mson", "abivars"]: + for fmt in ["cif", "cssr", "POSCAR", "json", "abivars"]: r = env.run(self.script, "convert", ncfile, "-f", fmt, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) @@ -152,9 +159,11 @@ def test_supercell(self): """Testing abistruct supercell""" cif_file = abidata.cif_file("gan2.cif") env = self.get_env() - r = env.run(self.script, "supercell", cif_file, "-s 2" , "-f", "abivars", self.loglevel, self.verbose, + r = env.run(self.script, "supercell", cif_file, "-s 2", "-f", "abivars", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + r = env.run(self.script, "print", cif_file, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + def test_kpath(self): """Testing abistruct kpath""" env = self.get_env() @@ -218,6 +227,7 @@ def test_oxistate(self): def test_cod_api(self): """Testing abistruct COD methods.""" + self.skip_if_not_executable("mysql") env = self.get_env() r = env.run(self.script, "cod_id", "1526507", "--primitive", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) @@ -250,6 +260,9 @@ def test_abicomp(self): r = env.run(self.script, "structure", cif_paths[0], cif_paths[1], cif_paths[2], self.loglevel, self.verbose, "--group", expect_stderr=self.expect_stderr) + r = env.run(self.script, "spg", cif_paths[0], cif_paths[1], cif_paths[2], self.loglevel, self.verbose, + expect_stderr=self.expect_stderr) + r = env.run(self.script, "mp_structure", cif_paths[0], cif_paths[1], self.loglevel, self.verbose, expect_stderr=self.expect_stderr) @@ -418,42 +431,55 @@ def test_abiview(self): """Testing abiview.py script""" env = self.get_env() - runabo = abidata.ref_file("refs/gs_dfpt.abo") - r = env.run(self.script, "abo", runabo, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #runabo = abidata.ref_file("refs/gs_dfpt.abo") + #r = env.run(self.script, "abo", runabo, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) - logpath = abidata.ref_file("refs/abinit.log") - r = env.run(self.script, "log", logpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #logpath = abidata.ref_file("refs/abinit.log") + #r = env.run(self.script, "log", logpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) ncpath = abidata.ref_file("refs/sic_relax_HIST.nc") + out_file = ncpath + ".XDATCAR" + if os.path.exists(out_file): os.remove(out_file) r = env.run(self.script, "hist", ncpath, "--xdatcar", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + if os.path.exists(out_file): os.remove(out_file) ncpath = abidata.ref_file("si_nscf_GSR.nc") r = env.run(self.script, "ebands", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + + out_file = ncpath + ".agr" + if os.path.exists(out_file): os.remove(out_file) r = env.run(self.script, "ebands", ncpath, "--xmgrace", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + if os.path.exists(out_file): os.remove(out_file) ncpath = abidata.ref_file("si_scf_GSR.nc") + out_file = ncpath + ".bxsf" + if os.path.exists(out_file): os.remove(out_file) r = env.run(self.script, "ebands", ncpath, "--bxsf", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + if os.path.exists(out_file): os.remove(out_file) - ncpath = abidata.ref_file("mgb2_kpath_FATBANDS.nc") - r = env.run(self.script, "fatbands", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #ncpath = abidata.ref_file("mgb2_kpath_FATBANDS.nc") + #r = env.run(self.script, "fatbands", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) ddbpath = abidata.ref_file("refs/znse_phonons/ZnSe_hex_qpt_DDB") r = env.run(self.script, "ddb", ddbpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) ncpath = abidata.ref_file("ZnSe_hex_886.out_PHBST.nc") r = env.run(self.script, "phbands", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + out_file = ncpath + ".agr" + if os.path.exists(out_file): os.remove(out_file) r = env.run(self.script, "phbands", ncpath, "--xmgrace", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + if os.path.exists(out_file): os.remove(out_file) - ncpath = abidata.ref_file("ZnSe_hex_886.out_PHDOS.nc") - r = env.run(self.script, "phdos", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #ncpath = abidata.ref_file("ZnSe_hex_886.out_PHDOS.nc") + #r = env.run(self.script, "phdos", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) - ncpath = abidata.ref_file("mg2si_GRUNS.nc") - r = env.run(self.script, "gruns", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #ncpath = abidata.ref_file("mg2si_GRUNS.nc") + #r = env.run(self.script, "gruns", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) - ncpath = abidata.ref_file("si_666_MDF.nc") - r = env.run(self.script, "mdf", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) + #ncpath = abidata.ref_file("si_666_MDF.nc") + #r = env.run(self.script, "mdf", ncpath, self.loglevel, self.verbose, expect_stderr=self.expect_stderr) #ncpath = abidata.ref_file("si_nscf_GSR.nc") #r = env.run(self.script, "denpot", ncpath, "chgcar", self.loglevel, self.verbose, expect_stderr=self.expect_stderr) diff --git a/abipy/test_files/badyaml.log b/abipy/test_files/badyaml.log new file mode 100644 index 000000000..dfc5cdf8a --- /dev/null +++ b/abipy/test_files/badyaml.log @@ -0,0 +1,231 @@ + ABINIT + + Give name for formatted input file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi + Give name for formatted output file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abo + Give root name for generic input files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in + Give root name for generic output files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out + Give root name for generic temporary files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/tmpdata/tmp + +.Version 7.11.5 of ABINIT +.(MPI version, prepared for a x86_64_darwin10.8.0_gnu4.7 computer) + +.Copyright (C) 1998-2015 ABINIT group . + ABINIT comes with ABSOLUTELY NO WARRANTY. + It is free software, and you are welcome to redistribute it + under certain conditions (GNU General Public License, + see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt). + + ABINIT is a project of the Universite Catholique de Louvain, + Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt . + Please read ~abinit/doc/users/acknowledgments.html for suggested + acknowledgments of the ABINIT effort. + For more information, see http://www.abinit.org . + +.Starting date : Fri 13 Mar 2015. +- ( at 20h08 ) + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + === Build Information === + Version : 7.11.5 + Build target : x86_64_darwin10.8.0_gnu4.7 + Build date : 20150309 + + === Compiler Suite === + C compiler : gnu4.7 + C++ compiler : gnu4.7 + Fortran compiler : gnu4.7 + CFLAGS : -g -O2 -mtune=native -march=native + CXXFLAGS : -g -O2 -mtune=native -march=native + FCFLAGS : -g -ffree-line-length-none + FC_LDFLAGS : + + === Optimizations === + Debug level : basic + Optimization level : standard + Architecture : unknown_unknown + + === Multicore === + Parallel build : yes + Parallel I/O : yes + openMP support : no + GPU support : no + + === Connectors / Fallbacks === + Connectors on : yes + Fallbacks on : yes + DFT flavor : libxc-fallback + FFT flavor : fftw3 + LINALG flavor : netlib-fallback + MATH flavor : none + TIMER flavor : abinit + TRIO flavor : netcdf-fallback+etsf_io-fallback + + === Experimental features === + Bindings : @enable_bindings@ + Exports : no + GW double-precision : yes + + === Bazaar branch information === + Branch ID : gmatteo@cenaero-20150309121815-5lbj8ihq15ffcsbb + Revision : 939 + Committed : 0 + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Default optimizations: + -O2 -mtune=native -march=native + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + CPP options activated during the build: + + CC_GNU CXX_GNU HAVE_BZR_BRANCH + + HAVE_CLIB HAVE_DFT_LIBXC HAVE_FC_ALLOCATABLE_DT... + + HAVE_FC_ASYNC HAVE_FC_COMMAND_ARGUMENT HAVE_FC_COMMAND_LINE + + HAVE_FC_CONTIGUOUS HAVE_FC_CPUTIME HAVE_FC_EXIT + + HAVE_FC_FLUSH HAVE_FC_GAMMA HAVE_FC_GETENV + + HAVE_FC_INT_QUAD HAVE_FC_IOMSG HAVE_FC_ISO_C_BINDING + + HAVE_FC_LONG_LINES HAVE_FC_MOVE_ALLOC HAVE_FC_PRIVATE + + HAVE_FC_PROTECTED HAVE_FC_STREAM_IO HAVE_FC_SYSTEM + + HAVE_FFT HAVE_FFT_FFTW3 HAVE_FFT_MPI + + HAVE_FFT_SERIAL HAVE_GW_DPC HAVE_LIBPAW_ABINIT + + HAVE_LINALG_ZDOTC_B*G HAVE_LINALG_ZDOTU_B*G HAVE_MPI + + HAVE_MPI2 HAVE_MPI_IALLREDUCE HAVE_MPI_IALLTOALL + + HAVE_MPI_IALLTOALLV HAVE_MPI_IO HAVE_MPI_TYPE_CREATE_S... + + HAVE_NUMPY HAVE_TIMER HAVE_TIMER_ABINIT + + HAVE_TIMER_MPI HAVE_TIMER_SERIAL HAVE_TRIO_ETSF_IO + + HAVE_TRIO_NETCDF USE_MACROAVE + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +- input file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi +- output file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abo +- root for input files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in +- root for output files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out + +-instrng : 73 lines of input have been read from file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi + + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 1 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 2 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc + read the values zionpsp= 2.0 , pspcod= 1 , lmax= 2 +nproj = 1 1 0 0 +nprojso = 0 0 0 + read the values zionpsp= 3.0 , pspcod= 1 , lmax= 1 +nproj = 1 0 0 0 +nprojso = 0 0 0 + + inpspheads: deduce mpsang = 3, n1xccc =2501. + + invars1m : enter jdtset=0 + invars1 : treat image number 1 + + symlatt : the Bravais lattice is hP (primitive hexagonal) + xred is defined in input file + ingeo : takes atomic coordinates from input array xred + + symlatt : the Bravais lattice is hP (primitive hexagonal) + + symlatt : the Bravais lattice is hP (primitive hexagonal) + symspgr : spgroup= 191 P6/m m m (=D6h^1) + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 7.5103208671638277E-002 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 9.9002139878206136E-002 7.5103208671638277E-002 5.7158912102896989E-002 7.5103208671638277E-002 + + mknormpath : total number of points on the path : 97 + + Number of divisions for each segment of the normalized path : + 0.00000 0.00000 0.00000 ==> 0.50000 0.00000 0.00000 ( ndiv : 10 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.00000 0.00000 0.00000 ( ndiv : 12 ) + 0.00000 0.00000 0.00000 ==> 0.00000 0.00000 0.50000 ( ndiv : 8 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.33333 0.33333 0.50000 ( ndiv : 6 ) + 0.33333 0.33333 0.50000 ==> 0.00000 0.00000 0.50000 ( ndiv : 12 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.50000 0.00000 0.00000 ( ndiv : 8 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.33333 0.33333 0.50000 ( ndiv : 8 ) + + + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 7.5103208671638277E-002 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 9.9002139878206136E-002 7.5103208671638277E-002 5.7158912102896989E-002 7.5103208671638277E-002 + + mknormpath : total number of points on the path : 97 + + Number of divisions for each segment of the normalized path : + 0.00000 0.00000 0.00000 ==> 0.50000 0.00000 0.00000 ( ndiv : 10 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.00000 0.00000 0.00000 ( ndiv : 12 ) + 0.00000 0.00000 0.00000 ==> 0.00000 0.00000 0.50000 ( ndiv : 8 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.33333 0.33333 0.50000 ( ndiv : 6 ) + 0.33333 0.33333 0.50000 ==> 0.00000 0.00000 0.50000 ( ndiv : 12 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.50000 0.00000 0.00000 ( ndiv : 8 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.33333 0.33333 0.50000 ( ndiv : 8 ) + + + dtset%nelect= 8.0000000000000000 + chkneu : initialized the occupation numbers for occopt= 4 + spin-unpolarized case : + 2.00 2.00 2.00 2.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +npfft, npband, npspinor and npkpt: 1 1 1 2 + +--- !WARNING +src_file: distrb2.F90 : 3 +src_line: 113 +message: | + Warning with a Wrong YAML doc. The event parser should register a AbinitYamlWarning +... + +--- !ERROR +src_file: distrb2.F90 +src_line: 113 +message: | + Error with a Wrong YAML doc. +the event parser should register a AbinitYamlErro +... diff --git a/abipy/test_files/dfpt_from_gsinput_dde.json b/abipy/test_files/dfpt_from_gsinput_dde.json new file mode 100644 index 000000000..db503d5fb --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_dde.json @@ -0,0 +1,244 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 2 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 12 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "rfdir", + [ + 1, + 0, + 0 + ] + ], + [ + "prepanl", + 1 + ], + [ + "rfelfd", + 3 + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0, + 0, + 0 + ] + ], + [ + "tolvrs", + 1e-10 + ] + ], + "tags": [ + "dde" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/dfpt_from_gsinput_ddk.json b/abipy/test_files/dfpt_from_gsinput_ddk.json new file mode 100644 index 000000000..647c0586e --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_ddk.json @@ -0,0 +1,244 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 2 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 12 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "rfelfd", + 2 + ], + [ + "rfdir", + [ + 1, + 0, + 0 + ] + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0, + 0, + 0 + ] + ], + [ + "iscf", + -3 + ], + [ + "tolwfr", + 1e-22 + ] + ], + "tags": [ + "ddk" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/dfpt_from_gsinput_dte.json b/abipy/test_files/dfpt_from_gsinput_dte.json new file mode 100644 index 000000000..83eba3493 --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_dte.json @@ -0,0 +1,284 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 2 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 8 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "d3e_pert1_elfd", + 0 + ], + [ + "d3e_pert2_elfd", + 1 + ], + [ + "d3e_pert3_elfd", + 1 + ], + [ + "d3e_pert1_dir", + [ + 1, + 0, + 0 + ] + ], + [ + "d3e_pert2_dir", + [ + 1, + 0, + 0 + ] + ], + [ + "d3e_pert3_dir", + [ + 1, + 0, + 0 + ] + ], + [ + "d3e_pert1_phon", + 1 + ], + [ + "d3e_pert2_phon", + 0 + ], + [ + "d3e_pert3_phon", + 0 + ], + [ + "d3e_pert1_atpol", + [ + 1, + 1 + ] + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0, + 0, + 0 + ] + ], + [ + "optdriver", + 5 + ] + ], + "tags": [ + "dfpt", + "dte" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/dfpt_from_gsinput_ph_q_pert_1.json b/abipy/test_files/dfpt_from_gsinput_ph_q_pert_1.json new file mode 100644 index 000000000..5384f652c --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_ph_q_pert_1.json @@ -0,0 +1,248 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 2 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 12 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "rfphon", + 1 + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0.0, + 0.0, + 0.0 + ] + ], + [ + "rfatpol", + [ + 1, + 1 + ] + ], + [ + "rfdir", + [ + 1, + 0, + 0 + ] + ], + [ + "tolvrs", + 1e-10 + ] + ], + "tags": [ + "phonon", + "ph_q_pert" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/dfpt_from_gsinput_ph_q_pert_2.json b/abipy/test_files/dfpt_from_gsinput_ph_q_pert_2.json new file mode 100644 index 000000000..66e3388b5 --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_ph_q_pert_2.json @@ -0,0 +1,248 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 3 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 12 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "rfphon", + 1 + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0.5, + 0.0, + 0.0 + ] + ], + [ + "rfatpol", + [ + 1, + 1 + ] + ], + [ + "rfdir", + [ + 1, + 0, + 0 + ] + ], + [ + "tolvrs", + 1e-10 + ] + ], + "tags": [ + "phonon", + "ph_q_pert" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/dfpt_from_gsinput_strain.json b/abipy/test_files/dfpt_from_gsinput_strain.json new file mode 100644 index 000000000..625de58e5 --- /dev/null +++ b/abipy/test_files/dfpt_from_gsinput_strain.json @@ -0,0 +1,245 @@ +{ + "structure": { + "@module": "abipy.core.structure", + "@class": "Structure", + "charge": null, + "lattice": { + "matrix": [ + [ + 3.21629013, + 0.0, + 1.9694097064168623e-16 + ], + [ + -1.608145070001309, + 2.7853889599984156, + 1.9694097087314446e-16 + ], + [ + 0.0, + 0.0, + 5.23996246 + ] + ], + "a": 3.21629013, + "b": 3.21629013378, + "c": 5.23996246, + "alpha": 90.0, + "beta": 90.0, + "gamma": 120.000000064, + "volume": 46.94282735957225 + }, + "sites": [ + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.49912 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 2.6153700630352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.99912 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 5.2353512930352 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.666667, + 0.333333, + 0.87588 + ], + "xyz": [ + 1.608146671477964, + 0.9284620582031519, + 4.5895783194648 + ], + "label": "N" + }, + { + "species": [ + { + "element": "N", + "occu": 1.0 + } + ], + "abc": [ + 0.333333, + 0.666667, + 0.37588 + ], + "xyz": [ + -1.6114792726321182e-06, + 1.8569269017952639, + 1.9695970894648003 + ], + "label": "N" + } + ] + }, + "pseudos": [ + { + "basename": "7n.pspnc", + "type": "NcAbinitPseudo", + "symbol": "N", + "Z": 7, + "Z_val": 5.0, + "l_max": 1, + "md5": "b32922f6e50fd55b78b426e2f84d8459", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/7n.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + }, + { + "basename": "31ga.pspnc", + "type": "NcAbinitPseudo", + "symbol": "Ga", + "Z": 31, + "Z_val": 3.0, + "l_max": 1, + "md5": "f0d760aad874ea3f64d5f4b40adef9bd", + "filepath": "/home/guido/programming/python/develop/mat_proj/abipy/abipy/abipy/data/pseudos/31ga.pspnc", + "@module": "pymatgen.io.abinit.pseudos", + "@class": "NcAbinitPseudo" + } + ], + "comment": null, + "decorators": [], + "abi_args": [ + [ + "ecut", + 2 + ], + [ + "pawecutdg", + null + ], + [ + "ngkpt", + [ + 7, + 7, + 5 + ] + ], + [ + "shiftk", + [ + [ + 0.5, + 0.5, + 0.5 + ] + ] + ], + [ + "nshiftk", + 1 + ], + [ + "kptopt", + 2 + ], + [ + "chksymbreak", + 0 + ], + [ + "nsppol", + 1 + ], + [ + "nspinor", + 1 + ], + [ + "nspden", + 1 + ], + [ + "nband", + 12 + ], + [ + "fband", + null + ], + [ + "charge", + 0.0 + ], + [ + "ixc", + 7 + ], + [ + "rfstrs", + 1 + ], + [ + "rfdir", + [ + 1, + 0, + 0 + ] + ], + [ + "nqpt", + 1 + ], + [ + "qpt", + [ + 0, + 0, + 0 + ] + ], + [ + "paral_kgb", + 0 + ], + [ + "tolvrs", + 1e-12 + ] + ], + "tags": [ + "strain", + "dfpt" + ], + "@module": "abipy.abio.inputs", + "@class": "AbinitInput" +} \ No newline at end of file diff --git a/abipy/test_files/mgb2_nscf.abo b/abipy/test_files/mgb2_nscf.abo new file mode 100644 index 000000000..7e530d090 --- /dev/null +++ b/abipy/test_files/mgb2_nscf.abo @@ -0,0 +1,1726 @@ + +.Version 7.11.5 of ABINIT +.(MPI version, prepared for a x86_64_darwin10.8.0_gnu4.7 computer) + +.Copyright (C) 1998-2015 ABINIT group . + ABINIT comes with ABSOLUTELY NO WARRANTY. + It is free software, and you are welcome to redistribute it + under certain conditions (GNU General Public License, + see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt). + + ABINIT is a project of the Universite Catholique de Louvain, + Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt . + Please read ~abinit/doc/users/acknowledgments.html for suggested + acknowledgments of the ABINIT effort. + For more information, see http://www.abinit.org . + +.Starting date : Fri 13 Mar 2015. +- ( at 20h08 ) + +- input file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi +- output file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abo +- root for input files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in +- root for output files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out + + + Symmetries : space group P6/m m m (#191); Bravais hP (primitive hexag.) +================================================================================ + Values of the parameters that define the memory need of the present run + intxc = 0 ionmov = 0 iscf = -2 xclevel = 1 + lmnmax = 2 lnmax = 2 mband = 11 mffmem = 1 +P mgfft = 20 mkmem = 49 mpssoang= 3 mpw = 308 + mqgrid = 3001 natom = 3 nfft = 6480 nkpt = 97 + nloalg = 4 nspden = 1 nspinor = 1 nsppol = 1 + nsym = 24 n1xccc = 2501 ntypat = 2 occopt = 4 +================================================================================ +P This job should need less than 5.739 Mbytes of memory. + Rough estimation (10% accuracy) of disk space for files : +_ WF disk file : 5.017 Mbytes ; DEN or POT disk file : 0.051 Mbytes. +================================================================================ + +-------------------------------------------------------------------------------- +------------- Echo of variables that govern the present computation ------------ +-------------------------------------------------------------------------------- +- +- outvars: echo of selected default values +- accesswff0 = 0 , fftalg0 =312 , wfoptalg0 = 0 +- +- outvars: echo of global parameters not present in the input file +- max_nthreads = 0 +- + -outvars: echo values of preprocessed input variables -------- + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + irdden 1 + iscf -2 + istwfk 2 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 2 0 + 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 0 + outvar_i_n : Printing only first 50 k-points. + kpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 5.00000000E-02 0.00000000E+00 0.00000000E+00 + 1.00000000E-01 0.00000000E+00 0.00000000E+00 + 1.50000000E-01 0.00000000E+00 0.00000000E+00 + 2.00000000E-01 0.00000000E+00 0.00000000E+00 + 2.50000000E-01 0.00000000E+00 0.00000000E+00 + 3.00000000E-01 0.00000000E+00 0.00000000E+00 + 3.50000000E-01 0.00000000E+00 0.00000000E+00 + 4.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.50000000E-01 0.00000000E+00 0.00000000E+00 + 5.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.72222222E-01 5.55555555E-02 0.00000000E+00 + 4.44444444E-01 1.11111111E-01 0.00000000E+00 + 4.16666667E-01 1.66666667E-01 0.00000000E+00 + 3.88888889E-01 2.22222222E-01 0.00000000E+00 + 3.61111111E-01 2.77777778E-01 0.00000000E+00 + 3.33333333E-01 3.33333333E-01 0.00000000E+00 + 3.05555556E-01 3.05555556E-01 0.00000000E+00 + 2.77777778E-01 2.77777778E-01 0.00000000E+00 + 2.50000000E-01 2.50000000E-01 0.00000000E+00 + 2.22222222E-01 2.22222222E-01 0.00000000E+00 + 1.94444444E-01 1.94444444E-01 0.00000000E+00 + 1.66666667E-01 1.66666667E-01 0.00000000E+00 + 1.38888889E-01 1.38888889E-01 0.00000000E+00 + 1.11111111E-01 1.11111111E-01 0.00000000E+00 + 8.33333333E-02 8.33333333E-02 0.00000000E+00 + 5.55555555E-02 5.55555555E-02 0.00000000E+00 + 2.77777778E-02 2.77777778E-02 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.25000000E-01 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 2.50000000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 3.75000000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 0.00000000E+00 0.00000000E+00 5.00000000E-01 + 5.00000000E-02 0.00000000E+00 5.00000000E-01 + 1.00000000E-01 0.00000000E+00 5.00000000E-01 + 1.50000000E-01 0.00000000E+00 5.00000000E-01 + 2.00000000E-01 0.00000000E+00 5.00000000E-01 + 2.50000000E-01 0.00000000E+00 5.00000000E-01 + 3.00000000E-01 0.00000000E+00 5.00000000E-01 + 3.50000000E-01 0.00000000E+00 5.00000000E-01 + 4.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.50000000E-01 0.00000000E+00 5.00000000E-01 + 5.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.72222222E-01 5.55555555E-02 5.00000000E-01 + 4.44444444E-01 1.11111111E-01 5.00000000E-01 + 4.16666667E-01 1.66666667E-01 5.00000000E-01 + outvar_i_n : Printing only first 50 k-points. + kptopt -11 +P mkmem 49 + natom 3 + nband 11 + nbdbuf 2 + ngfft 18 18 20 + nkpt 97 +- npkpt 2 + nsym 24 + ntypat 2 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 5.00000000E-01 5.00000000E-01 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolwfr 1.00000000E-12 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + outvars : Printing only first 50 k-points. + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333330E-01 6.6666666670E-01 5.0000000000E-01 + 6.6666666670E-01 3.3333333330E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + chkinp: Checking input parameters for consistency. + +================================================================================ +== DATASET 1 ================================================================== +- nproc = 2 + + Exchange-correlation functional for the present dataset will be: + LDA: new Teter (4/93) with spin-polarized option - ixc=1 + Citation for XC functional: + S. Goedecker, M. Teter, J. Huetter, PRB 54, 1703 (1996) + + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + +--- Pseudopotential description ------------------------------------------------ +- pspini: atom type 1 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- Troullier-Martins psp for element Mg Thu Oct 27 17:30:49 EDT 1994 +- 12.00000 2.00000 940714 znucl, zion, pspdat + 1 1 2 2 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 3.352 8.820 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 1.127 1.670 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2 0.000 0.000 0 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2.54196289048337 0.05499530377757 0.78827945413088 rchrg,fchrg,qchrg + pspatm: epsatm= -1.54393848 + --- l ekb(1:nproj) --> + 0 1.755924 + 1 0.853613 + pspatm: atomic psp has been read and splines computed + +- pspini: atom type 2 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- Troullier-Martins psp for element B Thu Oct 27 17:29:24 EDT 1994 +- 5.00000 3.00000 940714 znucl, zion, pspdat + 1 1 1 1 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 8.313 21.401 1 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 11.531 17.234 0 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1.10004537463277 0.35216853368804 0.40909985967175 rchrg,fchrg,qchrg + pspatm: epsatm= 0.59609267 + --- l ekb(1:nproj) --> + 0 3.906219 + pspatm: atomic psp has been read and splines computed + +-------------------------------------------------------------------------------- + +P newkpt: treating 11 bands with npw= 146 for ikpt= 1 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 2 by node 0 +P newkpt: treating 11 bands with npw= 299 for ikpt= 3 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 4 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 5 by node 0 +P newkpt: treating 11 bands with npw= 299 for ikpt= 6 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 7 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 8 by node 0 +P newkpt: treating 11 bands with npw= 301 for ikpt= 9 by node 0 +P newkpt: treating 11 bands with npw= 306 for ikpt= 10 by node 0 +P newkpt: treating 11 bands with npw= 300 for ikpt= 11 by node 0 +P newkpt: treating 11 bands with npw= 304 for ikpt= 12 by node 0 +P newkpt: treating 11 bands with npw= 302 for ikpt= 13 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 14 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 15 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 16 by node 0 +P newkpt: treating 11 bands with npw= 306 for ikpt= 17 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 18 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 19 by node 0 +P newkpt: treating 11 bands with npw= 288 for ikpt= 20 by node 0 +P newkpt: treating 11 bands with npw= 288 for ikpt= 21 by node 0 +P newkpt: treating 11 bands with npw= 292 for ikpt= 22 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 23 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 24 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 25 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 26 by node 0 +P newkpt: treating 11 bands with npw= 303 for ikpt= 27 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 28 by node 0 +P newkpt: treating 11 bands with npw= 146 for ikpt= 29 by node 0 +P newkpt: treating 11 bands with npw= 291 for ikpt= 30 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 31 by node 0 +P newkpt: treating 11 bands with npw= 291 for ikpt= 32 by node 0 +P newkpt: treating 11 bands with npw= 279 for ikpt= 33 by node 0 +P newkpt: treating 11 bands with npw= 274 for ikpt= 34 by node 0 +P newkpt: treating 11 bands with npw= 274 for ikpt= 35 by node 0 +P newkpt: treating 11 bands with npw= 280 for ikpt= 36 by node 0 +P newkpt: treating 11 bands with npw= 286 for ikpt= 37 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 38 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 39 by node 0 +P newkpt: treating 11 bands with npw= 290 for ikpt= 40 by node 0 +P newkpt: treating 11 bands with npw= 290 for ikpt= 41 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 42 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 43 by node 0 +P newkpt: treating 11 bands with npw= 302 for ikpt= 44 by node 0 +P newkpt: treating 11 bands with npw= 302 for ikpt= 45 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 46 by node 0 +P newkpt: treating 11 bands with npw= 300 for ikpt= 47 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 48 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 49 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 50 by node 1 + newkpt: prtvol=0 or 1, do not print more k-points. + + +================================================================================ + prteigrs : about to open file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_EIG + Non-SCF case, kpt 1 ( 0.00000 0.00000 0.00000), residuals and eigenvalues= + 1.73E-13 5.84E-14 2.96E-13 1.84E-13 4.98E-13 9.30E-14 1.61E-13 4.76E-13 + 1.10E-13 8.42E-13 1.22E-11 + -1.8002E-01 1.7145E-01 2.9801E-01 2.9801E-01 3.3630E-01 5.0991E-01 + 5.0991E-01 5.7367E-01 6.5094E-01 7.2899E-01 8.6971E-01 + prteigrs : nnsclo,ikpt= 30 1 max resid (incl. the buffer)= 1.21831E-11 + Non-SCF case, kpt 2 ( 0.05000 0.00000 0.00000), residuals and eigenvalues= + 2.69E-13 6.12E-13 2.23E-13 1.83E-13 1.09E-13 1.71E-13 3.28E-13 3.19E-13 + 5.86E-13 2.90E-12 6.90E-07 + -1.7846E-01 1.7302E-01 2.8799E-01 2.9285E-01 3.3772E-01 5.0851E-01 + 5.1695E-01 5.7753E-01 6.4506E-01 7.3784E-01 8.5923E-01 + prteigrs : nnsclo,ikpt= 30 2 max resid (incl. the buffer)= 6.89591E-07 + Non-SCF case, kpt 3 ( 0.10000 0.00000 0.00000), residuals and eigenvalues= + 2.88E-13 1.21E-13 2.63E-13 6.32E-13 1.40E-13 3.56E-13 7.76E-14 2.99E-13 + 5.84E-13 7.17E-12 2.74E-07 + -1.7362E-01 1.7765E-01 2.6324E-01 2.8194E-01 3.4211E-01 5.0374E-01 + 5.3777E-01 5.8899E-01 6.2700E-01 7.6231E-01 8.3619E-01 + prteigrs : nnsclo,ikpt= 30 3 max resid (incl. the buffer)= 2.73883E-07 + Non-SCF case, kpt 4 ( 0.15000 0.00000 0.00000), residuals and eigenvalues= + 3.53E-13 1.84E-13 2.91E-13 4.77E-13 2.45E-13 4.00E-13 3.13E-13 1.73E-13 + 2.70E-13 6.12E-08 1.74E-07 + -1.6560E-01 1.8557E-01 2.3067E-01 2.6721E-01 3.4954E-01 4.9465E-01 + 5.6782E-01 6.0177E-01 6.0502E-01 7.9815E-01 8.1178E-01 + prteigrs : nnsclo,ikpt= 30 4 max resid (incl. the buffer)= 1.74376E-07 + Non-SCF case, kpt 5 ( 0.20000 0.00000 0.00000), residuals and eigenvalues= + 2.59E-13 3.60E-13 2.42E-13 3.80E-13 3.15E-13 1.27E-13 1.88E-13 1.28E-13 + 8.67E-13 6.17E-08 4.96E-07 + -1.5442E-01 1.9422E-01 1.9629E-01 2.5205E-01 3.5983E-01 4.8250E-01 + 5.6841E-01 6.0505E-01 6.1743E-01 7.9431E-01 8.0398E-01 + prteigrs : nnsclo,ikpt= 30 5 max resid (incl. the buffer)= 4.96339E-07 + Non-SCF case, kpt 6 ( 0.25000 0.00000 0.00000), residuals and eigenvalues= + 3.17E-13 2.18E-13 1.43E-13 9.20E-14 1.45E-13 2.55E-13 1.78E-13 5.22E-13 + 3.79E-13 3.48E-08 8.76E-07 + -1.4040E-01 1.5531E-01 2.1050E-01 2.3762E-01 3.7220E-01 4.7114E-01 + 5.3264E-01 6.1850E-01 6.4622E-01 7.8001E-01 7.9120E-01 + prteigrs : nnsclo,ikpt= 30 6 max resid (incl. the buffer)= 8.75900E-07 + Non-SCF case, kpt 7 ( 0.30000 0.00000 0.00000), residuals and eigenvalues= + 4.50E-13 6.63E-14 1.85E-13 3.29E-13 2.80E-13 3.69E-13 3.28E-13 4.83E-13 + 4.13E-13 8.58E-09 2.88E-06 + -1.2307E-01 1.1670E-01 2.2510E-01 2.2683E-01 3.8662E-01 4.6205E-01 + 4.9593E-01 6.0602E-01 6.8960E-01 7.6171E-01 8.0413E-01 + prteigrs : nnsclo,ikpt= 30 7 max resid (incl. the buffer)= 2.87782E-06 + Non-SCF case, kpt 8 ( 0.35000 0.00000 0.00000), residuals and eigenvalues= + 6.66E-13 5.78E-13 4.12E-13 1.16E-13 1.69E-13 3.33E-13 1.57E-13 1.42E-13 + 6.53E-13 5.33E-12 1.51E-06 + -1.0279E-01 7.9171E-02 2.1496E-01 2.4511E-01 4.0124E-01 4.5659E-01 + 4.6041E-01 5.8498E-01 7.3075E-01 7.4815E-01 7.9917E-01 + prteigrs : nnsclo,ikpt= 30 8 max resid (incl. the buffer)= 1.51329E-06 + Non-SCF case, kpt 9 ( 0.40000 0.00000 0.00000), residuals and eigenvalues= + 3.16E-13 2.30E-13 8.48E-14 2.62E-13 4.22E-13 2.71E-13 3.87E-13 4.53E-13 + 5.46E-13 5.07E-11 4.73E-06 + -7.9946E-02 4.3523E-02 2.0741E-01 2.6423E-01 4.1281E-01 4.2800E-01 + 4.5742E-01 5.6106E-01 7.3860E-01 7.5829E-01 8.0365E-01 + prteigrs : nnsclo,ikpt= 30 9 max resid (incl. the buffer)= 4.73425E-06 + Non-SCF case, kpt 10 ( 0.45000 0.00000 0.00000), residuals and eigenvalues= + 2.21E-13 6.43E-14 8.29E-14 5.01E-13 3.84E-13 3.88E-13 1.55E-13 7.23E-13 + 7.74E-13 2.64E-11 6.00E-09 + -5.5040E-02 1.0750E-02 2.0238E-01 2.8106E-01 4.0313E-01 4.1832E-01 + 4.6546E-01 5.3984E-01 7.3306E-01 7.6552E-01 7.9760E-01 + prteigrs : nnsclo,ikpt= 30 10 max resid (incl. the buffer)= 6.00274E-09 + Non-SCF case, kpt 11 ( 0.50000 0.00000 0.00000), residuals and eigenvalues= + 4.33E-13 9.89E-14 2.97E-13 3.53E-13 9.45E-14 7.78E-13 5.23E-13 2.27E-13 + 9.94E-13 5.07E-11 4.99E-11 + -3.6419E-02 -1.0284E-02 2.0136E-01 2.8919E-01 3.9314E-01 4.1954E-01 + 4.7153E-01 5.2988E-01 7.3141E-01 7.6680E-01 7.9574E-01 + prteigrs : nnsclo,ikpt= 30 11 max resid (incl. the buffer)= 5.06962E-11 + Non-SCF case, kpt 12 ( 0.47222 0.05556 0.00000), residuals and eigenvalues= + 1.54E-13 5.64E-14 4.76E-13 1.46E-13 3.26E-13 7.96E-14 3.65E-13 3.42E-13 + 7.44E-13 1.01E-11 7.87E-07 + -3.5231E-02 -9.1548E-03 1.9167E-01 2.9020E-01 3.9230E-01 4.3001E-01 + 4.7240E-01 5.3180E-01 7.0700E-01 7.5768E-01 8.2428E-01 + prteigrs : nnsclo,ikpt= 30 12 max resid (incl. the buffer)= 7.86512E-07 + Non-SCF case, kpt 13 ( 0.44444 0.11111 0.00000), residuals and eigenvalues= + 2.12E-13 1.64E-13 5.66E-14 9.26E-14 4.60E-13 3.70E-13 1.94E-13 3.30E-13 + 7.87E-13 4.60E-13 8.55E-08 + -3.1319E-02 -5.2059E-03 1.6755E-01 2.9508E-01 3.9012E-01 4.5589E-01 + 4.7519E-01 5.3841E-01 6.7028E-01 7.3635E-01 8.1855E-01 + prteigrs : nnsclo,ikpt= 30 13 max resid (incl. the buffer)= 8.54600E-08 + Non-SCF case, kpt 14 ( 0.41667 0.16667 0.00000), residuals and eigenvalues= + 1.86E-13 2.05E-13 1.35E-13 9.90E-14 1.30E-13 2.09E-13 2.67E-13 2.00E-13 + 4.53E-13 1.01E-12 2.63E-08 + -2.4751E-02 1.1138E-03 1.3660E-01 3.0411E-01 3.8584E-01 4.7987E-01 + 4.8440E-01 5.5249E-01 6.3792E-01 7.1261E-01 7.9680E-01 + prteigrs : nnsclo,ikpt= 30 14 max resid (incl. the buffer)= 2.62791E-08 + Non-SCF case, kpt 15 ( 0.38889 0.22222 0.00000), residuals and eigenvalues= + 2.31E-13 4.88E-13 1.96E-13 8.33E-14 2.93E-13 1.59E-13 1.93E-13 4.98E-13 + 1.38E-13 1.26E-12 4.17E-08 + -1.5548E-02 9.0578E-03 1.0470E-01 3.1546E-01 3.7789E-01 4.8635E-01 + 5.0335E-01 5.7576E-01 6.1353E-01 6.9640E-01 7.7382E-01 + prteigrs : nnsclo,ikpt= 30 15 max resid (incl. the buffer)= 4.17079E-08 + Non-SCF case, kpt 16 ( 0.36111 0.27778 0.00000), residuals and eigenvalues= + 2.85E-13 4.44E-13 1.69E-13 1.09E-13 1.92E-13 1.94E-13 1.63E-13 3.58E-13 + 2.03E-13 3.68E-11 7.61E-07 + -3.7154E-03 1.5705E-02 7.5961E-02 3.3002E-01 3.6504E-01 4.9450E-01 + 5.0914E-01 5.9467E-01 5.9883E-01 7.0204E-01 7.5169E-01 + prteigrs : nnsclo,ikpt= 30 16 max resid (incl. the buffer)= 7.61479E-07 + Non-SCF case, kpt 17 ( 0.33333 0.33333 0.00000), residuals and eigenvalues= + 3.57E-13 1.95E-13 2.37E-13 1.39E-13 2.38E-13 1.04E-13 1.15E-13 6.55E-13 + 4.91E-13 1.90E-11 5.63E-07 + 1.0352E-02 1.0352E-02 6.2957E-02 3.4750E-01 3.4750E-01 5.0371E-01 + 5.0371E-01 5.9408E-01 5.9843E-01 7.3097E-01 7.3100E-01 + prteigrs : nnsclo,ikpt= 30 17 max resid (incl. the buffer)= 5.63158E-07 + Non-SCF case, kpt 18 ( 0.30556 0.30556 0.00000), residuals and eigenvalues= + 1.69E-13 3.07E-13 1.86E-13 1.88E-13 1.26E-13 2.89E-13 5.28E-13 2.95E-13 + 3.18E-13 1.40E-10 1.94E-10 + -1.1635E-02 2.7365E-02 7.2409E-02 3.2699E-01 3.6837E-01 4.8960E-01 + 5.1472E-01 5.9752E-01 5.9834E-01 7.1382E-01 7.2046E-01 + prteigrs : nnsclo,ikpt= 30 18 max resid (incl. the buffer)= 1.94111E-10 + Non-SCF case, kpt 19 ( 0.27778 0.27778 0.00000), residuals and eigenvalues= + 1.78E-13 4.89E-14 1.28E-13 4.98E-13 4.44E-13 1.92E-13 4.37E-13 2.11E-13 + 2.87E-13 5.84E-12 6.30E-12 + -3.7806E-02 4.6859E-02 9.0093E-02 3.0488E-01 3.9228E-01 4.7020E-01 + 5.2599E-01 5.9117E-01 6.1006E-01 6.9832E-01 7.1181E-01 + prteigrs : nnsclo,ikpt= 30 19 max resid (incl. the buffer)= 6.30054E-12 + Non-SCF case, kpt 20 ( 0.25000 0.25000 0.00000), residuals and eigenvalues= + 4.65E-13 4.54E-13 3.29E-13 1.42E-13 3.29E-13 2.54E-13 1.62E-13 7.67E-13 + 8.51E-13 8.29E-13 9.00E-13 + -6.3307E-02 6.9063E-02 1.1180E-01 2.8284E-01 4.1866E-01 4.4862E-01 + 5.3749E-01 5.7954E-01 6.2795E-01 6.8670E-01 7.1502E-01 + Non-SCF case, kpt 21 ( 0.22222 0.22222 0.00000), residuals and eigenvalues= + 4.52E-13 7.36E-14 1.74E-13 1.05E-13 2.46E-13 2.25E-13 1.58E-13 4.37E-13 + 4.46E-13 3.99E-13 7.65E-13 + -8.7121E-02 9.3380E-02 1.3578E-01 2.6146E-01 4.2700E-01 4.4750E-01 + 5.4667E-01 5.6457E-01 6.5094E-01 6.7881E-01 7.2730E-01 + Non-SCF case, kpt 22 ( 0.19444 0.19444 0.00000), residuals and eigenvalues= + 1.74E-13 3.06E-13 4.34E-14 3.51E-13 3.84E-13 5.35E-13 8.38E-13 9.75E-14 + 3.22E-13 5.72E-13 1.42E-11 + -1.0844E-01 1.1965E-01 1.6081E-01 2.4054E-01 4.0671E-01 4.7827E-01 + 5.4881E-01 5.5279E-01 6.7490E-01 6.7833E-01 7.4499E-01 + prteigrs : nnsclo,ikpt= 30 22 max resid (incl. the buffer)= 1.41666E-11 + Non-SCF case, kpt 23 ( 0.16667 0.16667 0.00000), residuals and eigenvalues= + 1.66E-13 2.71E-13 4.60E-13 2.92E-13 2.90E-13 7.78E-13 6.66E-13 1.51E-13 + 2.61E-13 6.23E-13 8.29E-10 + -1.2726E-01 1.4814E-01 1.8725E-01 2.2260E-01 3.8836E-01 5.1065E-01 + 5.3483E-01 5.5488E-01 6.7196E-01 7.0978E-01 7.6549E-01 + prteigrs : nnsclo,ikpt= 30 23 max resid (incl. the buffer)= 8.29045E-10 + Non-SCF case, kpt 24 ( 0.13889 0.13889 0.00000), residuals and eigenvalues= + 1.16E-13 2.12E-13 3.62E-13 3.48E-13 4.02E-13 1.11E-13 2.69E-13 5.52E-13 + 3.14E-13 8.34E-10 3.68E-07 + -1.4312E-01 1.7822E-01 2.0775E-01 2.1408E-01 3.7251E-01 5.2351E-01 + 5.4364E-01 5.5342E-01 6.6235E-01 7.4511E-01 7.8760E-01 + prteigrs : nnsclo,ikpt= 30 24 max resid (incl. the buffer)= 3.68299E-07 + Non-SCF case, kpt 25 ( 0.11111 0.11111 0.00000), residuals and eigenvalues= + 2.04E-13 9.41E-14 1.63E-13 6.77E-14 1.49E-13 1.91E-13 1.91E-13 9.79E-13 + 6.94E-13 2.86E-07 7.92E-06 + -1.5629E-01 1.9448E-01 2.0882E-01 2.3969E-01 3.5935E-01 5.1480E-01 + 5.4920E-01 5.7516E-01 6.4014E-01 7.8375E-01 8.0862E-01 + prteigrs : nnsclo,ikpt= 30 25 max resid (incl. the buffer)= 7.91579E-06 + Non-SCF case, kpt 26 ( 0.08333 0.08333 0.00000), residuals and eigenvalues= + 2.86E-13 4.99E-13 2.06E-13 1.07E-13 1.98E-13 1.53E-13 1.84E-13 2.42E-13 + 1.31E-13 3.66E-08 1.71E-05 + -1.6667E-01 1.8446E-01 2.3934E-01 2.6253E-01 3.4900E-01 5.1055E-01 + 5.4210E-01 6.0453E-01 6.1227E-01 7.9283E-01 8.1887E-01 + prteigrs : nnsclo,ikpt= 30 26 max resid (incl. the buffer)= 1.70600E-05 + Non-SCF case, kpt 27 ( 0.05556 0.05556 0.00000), residuals and eigenvalues= + 2.44E-13 8.86E-13 6.53E-13 4.88E-13 5.04E-13 3.70E-13 1.57E-13 6.57E-13 + 5.00E-13 4.51E-10 1.20E-04 + -1.7413E-01 1.7706E-01 2.6649E-01 2.8115E-01 3.4179E-01 5.0872E-01 + 5.2956E-01 5.8928E-01 6.2766E-01 7.5986E-01 8.4542E-01 + prteigrs : nnsclo,ikpt= 30 27 max resid (incl. the buffer)= 1.20237E-04 + Non-SCF case, kpt 28 ( 0.02778 0.02778 0.00000), residuals and eigenvalues= + 1.08E-13 2.14E-13 2.46E-13 2.19E-13 8.21E-14 3.86E-13 2.39E-13 8.33E-14 + 8.94E-13 3.05E-11 1.87E-05 + -1.7857E-01 1.7291E-01 2.8877E-01 2.9293E-01 3.3762E-01 5.0904E-01 + 5.1607E-01 5.7726E-01 6.4549E-01 7.3720E-01 8.6174E-01 + prteigrs : nnsclo,ikpt= 30 28 max resid (incl. the buffer)= 1.87222E-05 + Non-SCF case, kpt 29 ( 0.00000 0.00000 0.00000), residuals and eigenvalues= + 1.73E-13 5.84E-14 2.96E-13 1.84E-13 4.98E-13 9.30E-14 1.61E-13 4.76E-13 + 1.10E-13 8.42E-13 1.22E-11 + -1.8002E-01 1.7145E-01 2.9801E-01 2.9801E-01 3.3630E-01 5.0991E-01 + 5.0991E-01 5.7367E-01 6.5094E-01 7.2899E-01 8.6971E-01 + prteigrs : nnsclo,ikpt= 30 29 max resid (incl. the buffer)= 1.21831E-11 + Non-SCF case, kpt 30 ( 0.00000 0.00000 0.06250), residuals and eigenvalues= + 1.94E-13 2.29E-13 3.80E-13 1.59E-13 4.15E-13 8.12E-14 7.29E-14 1.95E-13 + 1.79E-13 3.84E-13 1.08E-08 + -1.7877E-01 1.6054E-01 2.9852E-01 2.9852E-01 3.5009E-01 5.1038E-01 + 5.1038E-01 5.7386E-01 6.5026E-01 7.3021E-01 8.5689E-01 + prteigrs : nnsclo,ikpt= 30 30 max resid (incl. the buffer)= 1.08210E-08 + Non-SCF case, kpt 31 ( 0.00000 0.00000 0.12500), residuals and eigenvalues= + 3.59E-13 1.03E-13 4.63E-13 1.45E-13 2.89E-13 2.22E-13 7.51E-13 4.08E-13 + 3.82E-13 6.38E-11 4.26E-08 + -1.7511E-01 1.3488E-01 2.9956E-01 2.9956E-01 3.8407E-01 5.1167E-01 + 5.1167E-01 5.7338E-01 6.4626E-01 7.3379E-01 8.2919E-01 + prteigrs : nnsclo,ikpt= 30 31 max resid (incl. the buffer)= 4.26017E-08 + Non-SCF case, kpt 32 ( 0.00000 0.00000 0.18750), residuals and eigenvalues= + 1.25E-13 8.71E-13 6.26E-13 2.77E-13 1.22E-13 6.37E-13 2.41E-13 2.22E-13 + 9.32E-13 9.25E-10 1.77E-08 + -1.6911E-01 1.0587E-01 3.0179E-01 3.0179E-01 4.2903E-01 5.1402E-01 + 5.1402E-01 5.7363E-01 6.4406E-01 7.3964E-01 7.9936E-01 + prteigrs : nnsclo,ikpt= 30 32 max resid (incl. the buffer)= 1.77143E-08 + Non-SCF case, kpt 33 ( 0.00000 0.00000 0.25000), residuals and eigenvalues= + 6.02E-13 7.04E-14 7.53E-13 1.68E-13 3.32E-13 2.07E-13 2.55E-13 2.70E-13 + 3.68E-13 3.78E-06 1.13E-10 + -1.6122E-01 7.6120E-02 3.0594E-01 3.0594E-01 4.7919E-01 5.1697E-01 + 5.1697E-01 5.7449E-01 6.4495E-01 7.4734E-01 7.7207E-01 + prteigrs : nnsclo,ikpt= 30 33 max resid (incl. the buffer)= 3.78411E-06 + Non-SCF case, kpt 34 ( 0.00000 0.00000 0.31250), residuals and eigenvalues= + 4.13E-13 9.50E-13 3.61E-13 1.52E-13 2.57E-13 3.74E-13 7.01E-13 6.68E-13 + 3.10E-13 2.00E-12 1.63E-05 + -1.5200E-01 4.8700E-02 3.0870E-01 3.0870E-01 5.2086E-01 5.2086E-01 + 5.3144E-01 5.7535E-01 6.4163E-01 7.4934E-01 7.5291E-01 + prteigrs : nnsclo,ikpt= 30 34 max resid (incl. the buffer)= 1.63395E-05 + Non-SCF case, kpt 35 ( 0.00000 0.00000 0.37500), residuals and eigenvalues= + 4.03E-13 4.12E-14 2.96E-13 8.31E-13 1.29E-13 1.68E-13 1.40E-13 2.48E-13 + 6.77E-13 1.54E-12 7.92E-07 + -1.4279E-01 2.6129E-02 3.1111E-01 3.1111E-01 5.2322E-01 5.2322E-01 + 5.7617E-01 5.8284E-01 6.3887E-01 7.3234E-01 7.3235E-01 + prteigrs : nnsclo,ikpt= 30 35 max resid (incl. the buffer)= 7.91815E-07 + Non-SCF case, kpt 36 ( 0.00000 0.00000 0.43750), residuals and eigenvalues= + 3.59E-13 9.92E-13 2.10E-13 8.06E-13 7.35E-13 3.40E-13 3.90E-13 2.42E-13 + 7.80E-13 1.59E-09 3.79E-08 + -1.3568E-01 1.0498E-02 3.1276E-01 3.1276E-01 5.2402E-01 5.2402E-01 + 5.7669E-01 6.2526E-01 6.3722E-01 7.2183E-01 7.2183E-01 + prteigrs : nnsclo,ikpt= 30 36 max resid (incl. the buffer)= 3.79494E-08 + Non-SCF case, kpt 37 ( 0.00000 0.00000 0.50000), residuals and eigenvalues= + 1.28E-13 8.35E-14 3.64E-13 4.52E-13 1.66E-13 1.31E-13 5.37E-13 8.18E-13 + 1.70E-13 2.07E-10 2.45E-08 + -1.3284E-01 4.7586E-03 3.1323E-01 3.1323E-01 5.2455E-01 5.2455E-01 + 5.7397E-01 6.3660E-01 6.4305E-01 7.1826E-01 7.1826E-01 + prteigrs : nnsclo,ikpt= 30 37 max resid (incl. the buffer)= 2.44595E-08 + Non-SCF case, kpt 38 ( 0.05000 0.00000 0.50000), residuals and eigenvalues= + 6.78E-14 6.41E-13 2.04E-13 1.86E-13 5.80E-13 1.58E-13 4.23E-13 9.63E-13 + 1.72E-13 4.72E-09 1.43E-08 + -1.3142E-01 6.5928E-03 3.0299E-01 3.0805E-01 5.2426E-01 5.3203E-01 + 5.5995E-01 6.4041E-01 6.4432E-01 7.0890E-01 7.2029E-01 + prteigrs : nnsclo,ikpt= 30 38 max resid (incl. the buffer)= 1.43486E-08 + Non-SCF case, kpt 39 ( 0.10000 0.00000 0.50000), residuals and eigenvalues= + 1.69E-13 1.63E-13 7.01E-13 4.52E-13 8.60E-13 3.30E-13 1.94E-13 6.57E-13 + 2.57E-13 7.82E-13 5.77E-13 + -1.2716E-01 1.2132E-02 2.8115E-01 2.9667E-01 5.2259E-01 5.2663E-01 + 5.5281E-01 6.4777E-01 6.5307E-01 6.9001E-01 7.1330E-01 + Non-SCF case, kpt 40 ( 0.15000 0.00000 0.50000), residuals and eigenvalues= + 5.39E-13 1.92E-13 3.08E-13 7.41E-14 1.23E-13 7.30E-13 2.57E-13 7.02E-13 + 3.15E-13 2.67E-13 9.23E-13 + -1.1983E-01 2.1465E-02 2.5094E-01 2.8088E-01 4.8557E-01 5.1971E-01 + 5.8421E-01 6.5267E-01 6.7012E-01 6.7358E-01 6.9715E-01 + Non-SCF case, kpt 41 ( 0.20000 0.00000 0.50000), residuals and eigenvalues= + 1.13E-13 2.46E-13 8.77E-13 7.95E-14 3.57E-13 2.81E-13 5.10E-13 4.52E-13 + 3.72E-13 1.03E-12 2.65E-12 + -1.0961E-01 3.4066E-02 2.1611E-01 2.6530E-01 4.4133E-01 5.1294E-01 + 6.2223E-01 6.5053E-01 6.5184E-01 6.8733E-01 6.9973E-01 + prteigrs : nnsclo,ikpt= 30 41 max resid (incl. the buffer)= 2.65084E-12 + Non-SCF case, kpt 42 ( 0.25000 0.00000 0.50000), residuals and eigenvalues= + 1.34E-13 4.75E-13 1.07E-13 1.33E-13 1.27E-13 3.79E-13 2.09E-13 4.50E-13 + 3.24E-13 1.27E-11 2.19E-11 + -9.6629E-02 5.0046E-02 1.7919E-01 2.5046E-01 3.9682E-01 5.0545E-01 + 6.3600E-01 6.3747E-01 6.6535E-01 6.9331E-01 7.2631E-01 + prteigrs : nnsclo,ikpt= 30 42 max resid (incl. the buffer)= 2.18986E-11 + Non-SCF case, kpt 43 ( 0.30000 0.00000 0.50000), residuals and eigenvalues= + 2.37E-13 1.54E-13 2.27E-13 1.46E-13 1.75E-13 9.69E-14 4.17E-13 1.00E-12 + 5.76E-13 2.59E-13 5.60E-12 + -8.0736E-02 6.9149E-02 1.4265E-01 2.3726E-01 3.5342E-01 4.9854E-01 + 6.2210E-01 6.2287E-01 7.0612E-01 7.1101E-01 7.5506E-01 + prteigrs : nnsclo,ikpt= 30 43 max resid (incl. the buffer)= 5.59722E-12 + Non-SCF case, kpt 44 ( 0.35000 0.00000 0.50000), residuals and eigenvalues= + 1.56E-13 1.98E-13 6.23E-13 3.20E-13 2.22E-13 7.95E-14 4.90E-13 6.00E-13 + 3.70E-13 5.36E-12 3.48E-10 + -6.2057E-02 9.0913E-02 1.0740E-01 2.2637E-01 3.1196E-01 4.9276E-01 + 6.0845E-01 6.1258E-01 7.2188E-01 7.5880E-01 7.8366E-01 + prteigrs : nnsclo,ikpt= 30 44 max resid (incl. the buffer)= 3.47875E-10 + Non-SCF case, kpt 45 ( 0.40000 0.00000 0.50000), residuals and eigenvalues= + 4.36E-13 3.84E-13 3.18E-13 1.24E-13 3.50E-13 1.48E-13 7.62E-13 2.09E-13 + 5.43E-13 3.92E-09 8.60E-09 + -4.0705E-02 7.3952E-02 1.1450E-01 2.1878E-01 2.7447E-01 4.8848E-01 + 5.9866E-01 6.0523E-01 7.3833E-01 8.0523E-01 8.1078E-01 + prteigrs : nnsclo,ikpt= 30 45 max resid (incl. the buffer)= 8.59640E-09 + Non-SCF case, kpt 46 ( 0.45000 0.00000 0.50000), residuals and eigenvalues= + 2.69E-13 2.93E-13 1.69E-13 1.90E-13 6.70E-13 7.26E-13 1.82E-13 7.41E-13 + 5.61E-13 9.08E-08 4.90E-06 + -1.7339E-02 4.3653E-02 1.3705E-01 2.1427E-01 2.4383E-01 4.8622E-01 + 5.9313E-01 6.0081E-01 7.5268E-01 8.3317E-01 8.4422E-01 + prteigrs : nnsclo,ikpt= 30 46 max resid (incl. the buffer)= 4.89926E-06 + Non-SCF case, kpt 47 ( 0.50000 0.00000 0.50000), residuals and eigenvalues= + 4.95E-14 3.32E-13 1.24E-13 1.21E-13 1.78E-13 3.56E-13 9.16E-13 7.30E-13 + 7.37E-13 6.69E-08 5.67E-08 + -5.1669E-05 2.3333E-02 1.4813E-01 2.1258E-01 2.2976E-01 4.8527E-01 + 5.9105E-01 5.9934E-01 7.5796E-01 8.4349E-01 8.5419E-01 + prteigrs : nnsclo,ikpt= 30 47 max resid (incl. the buffer)= 6.68998E-08 + Non-SCF case, kpt 48 ( 0.47222 0.05556 0.50000), residuals and eigenvalues= + 1.37E-13 8.32E-13 7.06E-13 7.09E-14 4.38E-13 5.68E-13 3.02E-13 5.96E-13 + 5.40E-13 1.27E-06 1.47E-06 + 1.3506E-03 2.4962E-02 1.4986E-01 2.0486E-01 2.3024E-01 4.9571E-01 + 5.4511E-01 6.4775E-01 7.5956E-01 8.3537E-01 8.3866E-01 + prteigrs : nnsclo,ikpt= 30 48 max resid (incl. the buffer)= 1.47491E-06 + Non-SCF case, kpt 49 ( 0.44444 0.11111 0.50000), residuals and eigenvalues= + 1.63E-13 3.62E-13 9.92E-14 2.69E-13 1.45E-13 7.95E-13 3.20E-13 5.21E-13 + 5.70E-13 9.77E-10 8.46E-09 + 4.9155E-03 2.8573E-02 1.5460E-01 1.8444E-01 2.3120E-01 4.9927E-01 + 5.2386E-01 7.0002E-01 7.6252E-01 8.1091E-01 8.2221E-01 + prteigrs : nnsclo,ikpt= 30 49 max resid (incl. the buffer)= 8.45775E-09 + Non-SCF case, kpt 50 ( 0.41667 0.16667 0.50000), residuals and eigenvalues= + 1.32E-13 5.83E-13 3.36E-13 9.81E-14 5.16E-13 1.65E-13 7.14E-13 6.15E-13 + 7.43E-13 4.37E-13 1.21E-12 + 1.1047E-02 3.4406E-02 1.5702E-01 1.6257E-01 2.3154E-01 4.5937E-01 + 5.6391E-01 7.4717E-01 7.6752E-01 7.8647E-01 7.9826E-01 + prteigrs : nnsclo,ikpt= 30 50 max resid (incl. the buffer)= 1.21403E-12 + Non-SCF case, kpt 51 ( 0.38889 0.22222 0.50000), residuals and eigenvalues= + 2.96E-13 2.79E-13 2.96E-13 5.02E-13 1.75E-13 7.06E-13 3.55E-13 5.64E-13 + 4.10E-13 4.09E-13 6.91E-13 + 1.9731E-02 4.1993E-02 1.2822E-01 1.7379E-01 2.2921E-01 4.2790E-01 + 6.1080E-01 7.6445E-01 7.7038E-01 7.7430E-01 7.7979E-01 + Non-SCF case, kpt 52 ( 0.36111 0.27778 0.50000), residuals and eigenvalues= + 4.73E-13 1.70E-13 1.90E-13 2.47E-13 1.20E-13 2.40E-13 4.32E-13 9.56E-13 + 7.99E-13 9.92E-13 3.89E-12 + 3.0820E-02 4.8628E-02 1.0086E-01 1.8811E-01 2.2098E-01 4.0804E-01 + 6.6026E-01 7.4038E-01 7.4128E-01 7.8184E-01 7.9103E-01 + prteigrs : nnsclo,ikpt= 30 52 max resid (incl. the buffer)= 3.89308E-12 + Non-SCF case, kpt 53 ( 0.33333 0.33333 0.50000), residuals and eigenvalues= + 1.74E-13 2.52E-13 1.01E-13 5.01E-13 1.05E-13 9.15E-14 6.17E-13 7.18E-13 + 2.33E-13 8.96E-13 2.34E-13 + 4.4398E-02 4.4398E-02 8.8794E-02 2.0579E-01 2.0579E-01 4.0155E-01 + 7.0218E-01 7.2026E-01 7.2026E-01 7.8997E-01 7.8997E-01 + Non-SCF case, kpt 54 ( 0.30556 0.30556 0.50000), residuals and eigenvalues= + 1.32E-13 6.78E-14 7.53E-13 3.35E-13 3.01E-13 1.03E-13 3.47E-13 5.04E-13 + 4.35E-13 6.30E-13 7.90E-13 + 2.3309E-02 6.0041E-02 9.7002E-02 1.8380E-01 2.2626E-01 4.0718E-01 + 6.7767E-01 6.9875E-01 7.6345E-01 7.7891E-01 7.9539E-01 + Non-SCF case, kpt 55 ( 0.27778 0.27778 0.50000), residuals and eigenvalues= + 1.20E-13 2.86E-13 2.84E-13 5.48E-13 9.64E-14 6.65E-13 4.61E-13 5.68E-13 + 7.87E-13 7.50E-12 4.56E-11 + -1.4887E-03 7.8421E-02 1.1377E-01 1.5871E-01 2.4948E-01 4.2212E-01 + 6.5015E-01 6.8050E-01 7.6377E-01 7.9605E-01 8.0619E-01 + prteigrs : nnsclo,ikpt= 30 55 max resid (incl. the buffer)= 4.56211E-11 + Non-SCF case, kpt 56 ( 0.25000 0.25000 0.50000), residuals and eigenvalues= + 1.65E-13 5.12E-13 1.91E-13 1.87E-13 4.59E-13 1.04E-13 7.10E-13 1.47E-13 + 2.48E-13 6.88E-13 6.37E-11 + -2.5599E-02 9.8640E-02 1.3280E-01 1.3317E-01 2.7597E-01 4.4372E-01 + 6.2424E-01 6.6202E-01 7.4639E-01 7.9271E-01 8.3440E-01 + prteigrs : nnsclo,ikpt= 30 56 max resid (incl. the buffer)= 6.36551E-11 + Non-SCF case, kpt 57 ( 0.22222 0.22222 0.50000), residuals and eigenvalues= + 1.08E-13 7.19E-13 5.11E-13 4.73E-13 1.20E-13 1.84E-13 8.36E-13 5.08E-13 + 3.61E-13 2.95E-12 1.81E-08 + -4.7491E-02 1.0800E-01 1.2081E-01 1.5552E-01 3.0555E-01 4.7031E-01 + 6.0072E-01 6.4522E-01 7.2883E-01 7.8533E-01 8.4979E-01 + prteigrs : nnsclo,ikpt= 30 57 max resid (incl. the buffer)= 1.80742E-08 + Non-SCF case, kpt 58 ( 0.19444 0.19444 0.50000), residuals and eigenvalues= + 2.93E-13 1.42E-13 8.77E-14 3.97E-13 1.55E-13 6.69E-13 5.14E-13 2.11E-13 + 2.77E-13 6.01E-12 6.65E-06 + -6.7317E-02 8.5087E-02 1.4567E-01 1.7990E-01 3.3866E-01 5.0079E-01 + 5.8041E-01 6.3004E-01 7.1181E-01 7.7612E-01 8.3332E-01 + prteigrs : nnsclo,ikpt= 30 58 max resid (incl. the buffer)= 6.65062E-06 + Non-SCF case, kpt 59 ( 0.16667 0.16667 0.50000), residuals and eigenvalues= + 1.75E-13 2.32E-13 1.21E-13 3.74E-13 2.49E-13 4.04E-13 2.56E-13 5.73E-13 + 4.38E-13 3.95E-13 3.21E-10 + -8.4687E-02 6.4469E-02 1.7227E-01 2.0497E-01 3.7395E-01 5.3420E-01 + 5.6290E-01 6.1515E-01 6.9573E-01 7.6504E-01 7.8737E-01 + prteigrs : nnsclo,ikpt= 30 59 max resid (incl. the buffer)= 3.21490E-10 + Non-SCF case, kpt 60 ( 0.13889 0.13889 0.50000), residuals and eigenvalues= + 8.29E-14 1.37E-13 3.79E-13 1.64E-13 3.04E-13 3.61E-13 8.46E-13 2.75E-13 + 7.48E-13 2.48E-10 3.56E-10 + -9.9381E-02 4.6637E-02 2.0036E-01 2.3070E-01 4.1176E-01 5.4900E-01 + 5.6977E-01 6.0050E-01 6.8158E-01 7.4463E-01 7.5430E-01 + prteigrs : nnsclo,ikpt= 30 60 max resid (incl. the buffer)= 3.56282E-10 + Non-SCF case, kpt 61 ( 0.11111 0.11111 0.50000), residuals and eigenvalues= + 1.75E-13 2.24E-13 5.84E-13 5.42E-13 3.67E-13 3.44E-13 5.65E-13 5.48E-13 + 5.39E-13 1.50E-11 3.86E-10 + -1.1142E-01 3.1883E-02 2.2999E-01 2.5510E-01 4.5209E-01 5.3819E-01 + 5.8395E-01 6.0633E-01 6.7028E-01 7.0667E-01 7.4480E-01 + prteigrs : nnsclo,ikpt= 30 61 max resid (incl. the buffer)= 3.86276E-10 + Non-SCF case, kpt 62 ( 0.08333 0.08333 0.50000), residuals and eigenvalues= + 2.94E-13 1.43E-13 7.48E-14 1.97E-13 1.74E-13 2.31E-13 2.52E-13 8.92E-13 + 4.31E-13 5.79E-13 1.23E-10 + -1.2089E-01 2.0194E-02 2.5855E-01 2.7717E-01 4.9235E-01 5.3097E-01 + 5.6616E-01 6.3952E-01 6.6459E-01 6.7434E-01 7.3615E-01 + prteigrs : nnsclo,ikpt= 30 62 max resid (incl. the buffer)= 1.22998E-10 + Non-SCF case, kpt 63 ( 0.05556 0.05556 0.50000), residuals and eigenvalues= + 1.88E-13 1.63E-13 4.67E-13 1.92E-13 3.02E-13 5.31E-13 5.03E-13 4.09E-13 + 3.45E-13 1.38E-11 1.04E-09 + -1.2750E-01 1.1700E-02 2.8452E-01 2.9644E-01 5.2641E-01 5.2980E-01 + 5.4796E-01 6.4730E-01 6.5223E-01 6.8382E-01 7.2802E-01 + prteigrs : nnsclo,ikpt= 30 63 max resid (incl. the buffer)= 1.04294E-09 + Non-SCF case, kpt 64 ( 0.02778 0.02778 0.50000), residuals and eigenvalues= + 7.49E-14 6.00E-13 1.92E-13 2.90E-13 4.99E-13 4.96E-13 3.02E-13 2.03E-13 + 3.09E-13 1.11E-10 4.56E-09 + -1.3154E-01 6.4571E-03 3.0375E-01 3.0828E-01 5.2452E-01 5.3106E-01 + 5.6093E-01 6.4010E-01 6.4422E-01 7.0852E-01 7.2154E-01 + prteigrs : nnsclo,ikpt= 30 64 max resid (incl. the buffer)= 4.55943E-09 + Non-SCF case, kpt 65 ( 0.00000 0.00000 0.50000), residuals and eigenvalues= + 1.28E-13 8.35E-14 3.64E-13 4.52E-13 1.66E-13 1.31E-13 5.37E-13 8.18E-13 + 1.70E-13 2.07E-10 2.45E-08 + -1.3284E-01 4.7586E-03 3.1323E-01 3.1323E-01 5.2455E-01 5.2455E-01 + 5.7397E-01 6.3660E-01 6.4305E-01 7.1826E-01 7.1826E-01 + prteigrs : nnsclo,ikpt= 30 65 max resid (incl. the buffer)= 2.44595E-08 + Non-SCF case, kpt 66 ( 0.05000 0.00000 0.50000), residuals and eigenvalues= + 6.78E-14 6.41E-13 2.04E-13 1.86E-13 5.80E-13 1.58E-13 4.23E-13 9.63E-13 + 1.72E-13 4.72E-09 1.43E-08 + -1.3142E-01 6.5928E-03 3.0299E-01 3.0805E-01 5.2426E-01 5.3203E-01 + 5.5995E-01 6.4041E-01 6.4432E-01 7.0890E-01 7.2029E-01 + prteigrs : nnsclo,ikpt= 30 66 max resid (incl. the buffer)= 1.43486E-08 + Non-SCF case, kpt 67 ( 0.10000 0.00000 0.50000), residuals and eigenvalues= + 1.69E-13 1.63E-13 7.01E-13 4.52E-13 8.60E-13 3.30E-13 1.94E-13 6.57E-13 + 2.57E-13 7.82E-13 5.77E-13 + -1.2716E-01 1.2132E-02 2.8115E-01 2.9667E-01 5.2259E-01 5.2663E-01 + 5.5281E-01 6.4777E-01 6.5307E-01 6.9001E-01 7.1330E-01 + Non-SCF case, kpt 68 ( 0.15000 0.00000 0.50000), residuals and eigenvalues= + 5.39E-13 1.92E-13 3.08E-13 7.41E-14 1.23E-13 7.30E-13 2.57E-13 7.02E-13 + 3.15E-13 2.67E-13 9.23E-13 + -1.1983E-01 2.1465E-02 2.5094E-01 2.8088E-01 4.8557E-01 5.1971E-01 + 5.8421E-01 6.5267E-01 6.7012E-01 6.7358E-01 6.9715E-01 + Non-SCF case, kpt 69 ( 0.20000 0.00000 0.50000), residuals and eigenvalues= + 1.13E-13 2.46E-13 8.77E-13 7.95E-14 3.57E-13 2.81E-13 5.10E-13 4.52E-13 + 3.72E-13 1.03E-12 2.65E-12 + -1.0961E-01 3.4066E-02 2.1611E-01 2.6530E-01 4.4133E-01 5.1294E-01 + 6.2223E-01 6.5053E-01 6.5184E-01 6.8733E-01 6.9973E-01 + prteigrs : nnsclo,ikpt= 30 69 max resid (incl. the buffer)= 2.65084E-12 + Non-SCF case, kpt 70 ( 0.25000 0.00000 0.50000), residuals and eigenvalues= + 1.34E-13 4.75E-13 1.07E-13 1.33E-13 1.27E-13 3.79E-13 2.09E-13 4.50E-13 + 3.24E-13 1.27E-11 2.19E-11 + -9.6629E-02 5.0046E-02 1.7919E-01 2.5046E-01 3.9682E-01 5.0545E-01 + 6.3600E-01 6.3747E-01 6.6535E-01 6.9331E-01 7.2631E-01 + prteigrs : nnsclo,ikpt= 30 70 max resid (incl. the buffer)= 2.18986E-11 + Non-SCF case, kpt 71 ( 0.30000 0.00000 0.50000), residuals and eigenvalues= + 2.37E-13 1.54E-13 2.27E-13 1.46E-13 1.75E-13 9.69E-14 4.17E-13 1.00E-12 + 5.76E-13 2.59E-13 5.60E-12 + -8.0736E-02 6.9149E-02 1.4265E-01 2.3726E-01 3.5342E-01 4.9854E-01 + 6.2210E-01 6.2287E-01 7.0612E-01 7.1101E-01 7.5506E-01 + prteigrs : nnsclo,ikpt= 30 71 max resid (incl. the buffer)= 5.59722E-12 + Non-SCF case, kpt 72 ( 0.35000 0.00000 0.50000), residuals and eigenvalues= + 1.56E-13 1.98E-13 6.23E-13 3.20E-13 2.22E-13 7.95E-14 4.90E-13 6.00E-13 + 3.70E-13 5.36E-12 3.48E-10 + -6.2057E-02 9.0913E-02 1.0740E-01 2.2637E-01 3.1196E-01 4.9276E-01 + 6.0845E-01 6.1258E-01 7.2188E-01 7.5880E-01 7.8366E-01 + prteigrs : nnsclo,ikpt= 30 72 max resid (incl. the buffer)= 3.47875E-10 + Non-SCF case, kpt 73 ( 0.40000 0.00000 0.50000), residuals and eigenvalues= + 4.36E-13 3.84E-13 3.18E-13 1.24E-13 3.50E-13 1.48E-13 7.62E-13 2.09E-13 + 5.43E-13 3.92E-09 8.60E-09 + -4.0705E-02 7.3952E-02 1.1450E-01 2.1878E-01 2.7447E-01 4.8848E-01 + 5.9866E-01 6.0523E-01 7.3833E-01 8.0523E-01 8.1078E-01 + prteigrs : nnsclo,ikpt= 30 73 max resid (incl. the buffer)= 8.59640E-09 + Non-SCF case, kpt 74 ( 0.45000 0.00000 0.50000), residuals and eigenvalues= + 2.69E-13 2.93E-13 1.69E-13 1.90E-13 6.70E-13 7.26E-13 1.82E-13 7.41E-13 + 5.61E-13 9.08E-08 4.90E-06 + -1.7339E-02 4.3653E-02 1.3705E-01 2.1427E-01 2.4383E-01 4.8622E-01 + 5.9313E-01 6.0081E-01 7.5268E-01 8.3317E-01 8.4422E-01 + prteigrs : nnsclo,ikpt= 30 74 max resid (incl. the buffer)= 4.89926E-06 + Non-SCF case, kpt 75 ( 0.50000 0.00000 0.50000), residuals and eigenvalues= + 4.95E-14 3.32E-13 1.24E-13 1.21E-13 1.78E-13 3.56E-13 9.16E-13 7.30E-13 + 7.37E-13 6.69E-08 5.67E-08 + -5.1669E-05 2.3333E-02 1.4813E-01 2.1258E-01 2.2976E-01 4.8527E-01 + 5.9105E-01 5.9934E-01 7.5796E-01 8.4349E-01 8.5419E-01 + prteigrs : nnsclo,ikpt= 30 75 max resid (incl. the buffer)= 6.68998E-08 + Non-SCF case, kpt 76 ( 0.50000 0.00000 0.43750), residuals and eigenvalues= + 8.21E-13 7.89E-13 4.38E-13 1.31E-13 1.24E-13 2.31E-13 3.58E-13 3.73E-13 + 6.48E-13 5.83E-09 2.14E-05 + -1.8838E-03 2.2066E-02 1.5278E-01 2.1228E-01 2.3412E-01 4.8226E-01 + 5.9561E-01 6.0255E-01 7.3855E-01 8.1208E-01 8.6186E-01 + prteigrs : nnsclo,ikpt= 30 76 max resid (incl. the buffer)= 2.13562E-05 + Non-SCF case, kpt 77 ( 0.50000 0.00000 0.37500), residuals and eigenvalues= + 1.26E-13 5.89E-13 2.87E-13 4.35E-14 3.00E-13 3.60E-13 2.23E-13 6.66E-13 + 9.33E-13 1.82E-10 1.18E-06 + -7.2990E-03 1.7233E-02 1.6475E-01 2.1104E-01 2.4666E-01 4.7475E-01 + 6.0727E-01 6.1206E-01 6.9491E-01 7.7066E-01 8.5802E-01 + prteigrs : nnsclo,ikpt= 30 77 max resid (incl. the buffer)= 1.17950E-06 + Non-SCF case, kpt 78 ( 0.50000 0.00000 0.31250), residuals and eigenvalues= + 2.26E-13 8.17E-13 6.28E-14 6.12E-14 3.73E-13 1.32E-13 9.84E-13 6.58E-13 + 3.34E-13 2.70E-12 1.48E-06 + -1.4370E-02 1.1006E-02 1.8378E-01 2.0950E-01 2.6616E-01 4.6516E-01 + 6.2051E-01 6.2768E-01 6.4663E-01 7.2989E-01 8.5512E-01 + prteigrs : nnsclo,ikpt= 30 78 max resid (incl. the buffer)= 1.47755E-06 + Non-SCF case, kpt 79 ( 0.50000 0.00000 0.25000), residuals and eigenvalues= + 1.71E-13 4.94E-14 6.01E-14 1.65E-13 1.09E-13 3.10E-13 6.51E-13 4.33E-13 + 9.90E-13 5.43E-13 7.02E-07 + -2.1463E-02 4.3418E-03 2.0680E-01 2.0756E-01 2.9025E-01 4.5536E-01 + 5.9846E-01 6.2270E-01 6.4882E-01 7.0129E-01 8.5187E-01 + prteigrs : nnsclo,ikpt= 30 79 max resid (incl. the buffer)= 7.01656E-07 + Non-SCF case, kpt 80 ( 0.50000 0.00000 0.18750), residuals and eigenvalues= + 2.59E-13 2.02E-13 2.54E-13 1.01E-13 1.60E-13 1.58E-13 7.30E-13 2.69E-13 + 6.94E-13 9.40E-13 4.79E-07 + -2.7688E-02 -1.6030E-03 2.0471E-01 2.3402E-01 3.1868E-01 4.4633E-01 + 5.5290E-01 6.0150E-01 6.7505E-01 7.0017E-01 8.4899E-01 + prteigrs : nnsclo,ikpt= 30 80 max resid (incl. the buffer)= 4.79434E-07 + Non-SCF case, kpt 81 ( 0.50000 0.00000 0.12500), residuals and eigenvalues= + 1.94E-13 2.96E-13 5.20E-14 8.50E-14 1.79E-13 2.50E-13 2.64E-13 1.82E-13 + 4.40E-13 5.70E-13 1.74E-04 + -3.2470E-02 -6.3331E-03 2.0298E-01 2.5988E-01 3.4859E-01 4.3764E-01 + 5.1271E-01 5.6880E-01 7.0573E-01 7.1351E-01 8.6215E-01 + prteigrs : nnsclo,ikpt= 30 81 max resid (incl. the buffer)= 1.74091E-04 + Non-SCF case, kpt 82 ( 0.50000 0.00000 0.06250), residuals and eigenvalues= + 5.01E-13 2.17E-13 8.77E-14 3.13E-13 1.14E-13 2.38E-13 5.05E-13 6.36E-13 + 4.90E-13 2.72E-13 1.05E-07 + -3.5541E-02 -9.4715E-03 2.0126E-01 2.7999E-01 3.7676E-01 4.2764E-01 + 4.8290E-01 5.4094E-01 7.2611E-01 7.3973E-01 8.2548E-01 + prteigrs : nnsclo,ikpt= 30 82 max resid (incl. the buffer)= 1.04585E-07 + Non-SCF case, kpt 83 ( 0.50000 0.00000 0.00000), residuals and eigenvalues= + 4.33E-13 9.89E-14 2.97E-13 3.53E-13 9.45E-14 7.78E-13 5.23E-13 2.27E-13 + 9.94E-13 5.07E-11 4.99E-11 + -3.6419E-02 -1.0284E-02 2.0136E-01 2.8919E-01 3.9314E-01 4.1954E-01 + 4.7153E-01 5.2988E-01 7.3141E-01 7.6680E-01 7.9574E-01 + prteigrs : nnsclo,ikpt= 30 83 max resid (incl. the buffer)= 5.06962E-11 + Non-SCF case, kpt 84 ( 0.47222 0.05556 0.00000), residuals and eigenvalues= + 1.54E-13 5.64E-14 4.76E-13 1.46E-13 3.26E-13 7.96E-14 3.65E-13 3.42E-13 + 7.44E-13 1.01E-11 7.87E-07 + -3.5231E-02 -9.1548E-03 1.9167E-01 2.9020E-01 3.9230E-01 4.3001E-01 + 4.7240E-01 5.3180E-01 7.0700E-01 7.5768E-01 8.2428E-01 + prteigrs : nnsclo,ikpt= 30 84 max resid (incl. the buffer)= 7.86512E-07 + Non-SCF case, kpt 85 ( 0.44444 0.11111 0.00000), residuals and eigenvalues= + 2.12E-13 1.64E-13 5.66E-14 9.26E-14 4.60E-13 3.70E-13 1.94E-13 3.30E-13 + 7.87E-13 4.60E-13 8.55E-08 + -3.1319E-02 -5.2059E-03 1.6755E-01 2.9508E-01 3.9012E-01 4.5589E-01 + 4.7519E-01 5.3841E-01 6.7028E-01 7.3635E-01 8.1855E-01 + prteigrs : nnsclo,ikpt= 30 85 max resid (incl. the buffer)= 8.54600E-08 + Non-SCF case, kpt 86 ( 0.41667 0.16667 0.00000), residuals and eigenvalues= + 1.86E-13 2.05E-13 1.35E-13 9.90E-14 1.30E-13 2.09E-13 2.67E-13 2.00E-13 + 4.53E-13 1.01E-12 2.63E-08 + -2.4751E-02 1.1138E-03 1.3660E-01 3.0411E-01 3.8584E-01 4.7987E-01 + 4.8440E-01 5.5249E-01 6.3792E-01 7.1261E-01 7.9680E-01 + prteigrs : nnsclo,ikpt= 30 86 max resid (incl. the buffer)= 2.62791E-08 + Non-SCF case, kpt 87 ( 0.38889 0.22222 0.00000), residuals and eigenvalues= + 2.31E-13 4.88E-13 1.96E-13 8.33E-14 2.93E-13 1.59E-13 1.93E-13 4.98E-13 + 1.38E-13 1.26E-12 4.17E-08 + -1.5548E-02 9.0578E-03 1.0470E-01 3.1546E-01 3.7789E-01 4.8635E-01 + 5.0335E-01 5.7576E-01 6.1353E-01 6.9640E-01 7.7382E-01 + prteigrs : nnsclo,ikpt= 30 87 max resid (incl. the buffer)= 4.17079E-08 + Non-SCF case, kpt 88 ( 0.36111 0.27778 0.00000), residuals and eigenvalues= + 2.85E-13 4.44E-13 1.69E-13 1.09E-13 1.92E-13 1.94E-13 1.63E-13 3.58E-13 + 2.03E-13 3.68E-11 7.61E-07 + -3.7154E-03 1.5705E-02 7.5961E-02 3.3002E-01 3.6504E-01 4.9450E-01 + 5.0914E-01 5.9467E-01 5.9883E-01 7.0204E-01 7.5169E-01 + prteigrs : nnsclo,ikpt= 30 88 max resid (incl. the buffer)= 7.61479E-07 + Non-SCF case, kpt 89 ( 0.33333 0.33333 0.00000), residuals and eigenvalues= + 3.57E-13 1.95E-13 2.37E-13 1.39E-13 2.38E-13 1.04E-13 1.15E-13 6.55E-13 + 4.91E-13 1.90E-11 5.63E-07 + 1.0352E-02 1.0352E-02 6.2957E-02 3.4750E-01 3.4750E-01 5.0371E-01 + 5.0371E-01 5.9408E-01 5.9843E-01 7.3097E-01 7.3100E-01 + prteigrs : nnsclo,ikpt= 30 89 max resid (incl. the buffer)= 5.63158E-07 + Non-SCF case, kpt 90 ( 0.33333 0.33333 0.06250), residuals and eigenvalues= + 5.46E-13 1.83E-13 1.08E-13 1.08E-13 1.52E-13 1.56E-13 3.41E-13 2.31E-13 + 1.44E-13 2.41E-10 6.52E-09 + 1.1353E-02 1.1353E-02 6.4420E-02 3.3811E-01 3.3811E-01 5.1588E-01 + 5.1588E-01 5.6009E-01 6.3043E-01 7.3253E-01 7.3253E-01 + prteigrs : nnsclo,ikpt= 30 90 max resid (incl. the buffer)= 6.51673E-09 + Non-SCF case, kpt 91 ( 0.33333 0.33333 0.12500), residuals and eigenvalues= + 1.36E-13 3.20E-13 2.05E-13 1.01E-13 2.46E-13 3.69E-13 3.22E-13 3.72E-13 + 3.77E-13 5.96E-13 5.91E-12 + 1.4449E-02 1.4449E-02 6.6931E-02 3.1619E-01 3.1619E-01 5.2423E-01 + 5.4578E-01 5.4578E-01 6.5687E-01 7.3537E-01 7.3537E-01 + prteigrs : nnsclo,ikpt= 30 91 max resid (incl. the buffer)= 5.90635E-12 + Non-SCF case, kpt 92 ( 0.33333 0.33333 0.18750), residuals and eigenvalues= + 1.52E-13 8.33E-14 1.76E-13 1.17E-13 1.93E-13 1.20E-13 3.82E-13 6.62E-13 + 2.50E-13 1.69E-12 3.03E-12 + 1.8756E-02 1.8756E-02 7.0225E-02 2.8904E-01 2.8904E-01 4.9061E-01 + 5.8344E-01 5.8344E-01 6.7384E-01 7.3888E-01 7.3888E-01 + prteigrs : nnsclo,ikpt= 30 92 max resid (incl. the buffer)= 3.02990E-12 + Non-SCF case, kpt 93 ( 0.33333 0.33333 0.25000), residuals and eigenvalues= + 6.90E-13 1.93E-13 3.13E-13 4.66E-13 6.04E-13 2.14E-13 5.18E-13 4.33E-13 + 4.90E-13 3.11E-13 7.23E-13 + 2.4572E-02 2.4572E-02 7.4897E-02 2.6311E-01 2.6311E-01 4.6093E-01 + 6.2453E-01 6.2453E-01 6.8486E-01 7.4491E-01 7.4491E-01 + Non-SCF case, kpt 94 ( 0.33333 0.33333 0.31250), residuals and eigenvalues= + 4.48E-13 6.19E-13 6.18E-14 2.29E-13 2.22E-13 3.38E-13 1.55E-13 1.57E-13 + 7.38E-13 3.52E-13 6.14E-13 + 3.1182E-02 3.1182E-02 7.9871E-02 2.4062E-01 2.4062E-01 4.3616E-01 + 6.6481E-01 6.6481E-01 6.9237E-01 7.5386E-01 7.5386E-01 + Non-SCF case, kpt 95 ( 0.33333 0.33333 0.37500), residuals and eigenvalues= + 1.34E-13 2.32E-13 1.05E-13 3.94E-13 1.85E-13 2.06E-13 5.47E-13 3.50E-13 + 1.83E-13 6.37E-13 6.69E-13 + 3.7452E-02 3.7452E-02 8.4127E-02 2.2148E-01 2.2148E-01 4.1733E-01 + 6.9612E-01 6.9612E-01 6.9740E-01 7.6525E-01 7.6525E-01 + Non-SCF case, kpt 96 ( 0.33333 0.33333 0.43750), residuals and eigenvalues= + 1.35E-13 1.09E-13 7.48E-14 1.18E-13 9.42E-14 2.35E-13 4.80E-13 3.43E-13 + 2.85E-13 8.52E-13 8.12E-13 + 4.2392E-02 4.2392E-02 8.7584E-02 2.0964E-01 2.0964E-01 4.0556E-01 + 7.0093E-01 7.1405E-01 7.1405E-01 7.8113E-01 7.8113E-01 + Non-SCF case, kpt 97 ( 0.33333 0.33333 0.50000), residuals and eigenvalues= + 1.74E-13 2.52E-13 1.01E-13 5.01E-13 1.05E-13 9.15E-14 6.17E-13 7.18E-13 + 2.33E-13 8.96E-13 2.34E-13 + 4.4398E-02 4.4398E-02 8.8794E-02 2.0579E-01 2.0579E-01 4.0155E-01 + 7.0218E-01 7.2026E-01 7.2026E-01 7.8997E-01 7.8997E-01 +================================================================================ + + ----iterations are completed or convergence reached---- + + Mean square residual over all n,k,spin= 3.9472E-07; max= 1.2024E-04 + 0.0000 0.0000 0.0000 1 1.21831E-11 kpt; spin; max resid(k); each band: + 1.73E-13 5.84E-14 2.96E-13 1.84E-13 4.98E-13 9.30E-14 1.61E-13 4.76E-13 + 1.10E-13 8.42E-13 1.22E-11 + 0.0500 0.0000 0.0000 1 6.89591E-07 kpt; spin; max resid(k); each band: + 2.69E-13 6.12E-13 2.23E-13 1.83E-13 1.09E-13 1.71E-13 3.28E-13 3.19E-13 + 5.86E-13 2.90E-12 6.90E-07 + 0.1000 0.0000 0.0000 1 2.73883E-07 kpt; spin; max resid(k); each band: + 2.88E-13 1.21E-13 2.63E-13 6.32E-13 1.40E-13 3.56E-13 7.76E-14 2.99E-13 + 5.84E-13 7.17E-12 2.74E-07 + 0.1500 0.0000 0.0000 1 1.74376E-07 kpt; spin; max resid(k); each band: + 3.53E-13 1.84E-13 2.91E-13 4.77E-13 2.45E-13 4.00E-13 3.13E-13 1.73E-13 + 2.70E-13 6.12E-08 1.74E-07 + 0.2000 0.0000 0.0000 1 4.96339E-07 kpt; spin; max resid(k); each band: + 2.59E-13 3.60E-13 2.42E-13 3.80E-13 3.15E-13 1.27E-13 1.88E-13 1.28E-13 + 8.67E-13 6.17E-08 4.96E-07 + 0.2500 0.0000 0.0000 1 8.75900E-07 kpt; spin; max resid(k); each band: + 3.17E-13 2.18E-13 1.43E-13 9.20E-14 1.45E-13 2.55E-13 1.78E-13 5.22E-13 + 3.79E-13 3.48E-08 8.76E-07 + 0.3000 0.0000 0.0000 1 2.87782E-06 kpt; spin; max resid(k); each band: + 4.50E-13 6.63E-14 1.85E-13 3.29E-13 2.80E-13 3.69E-13 3.28E-13 4.83E-13 + 4.13E-13 8.58E-09 2.88E-06 + 0.3500 0.0000 0.0000 1 1.51329E-06 kpt; spin; max resid(k); each band: + 6.66E-13 5.78E-13 4.12E-13 1.16E-13 1.69E-13 3.33E-13 1.57E-13 1.42E-13 + 6.53E-13 5.33E-12 1.51E-06 + 0.4000 0.0000 0.0000 1 4.73425E-06 kpt; spin; max resid(k); each band: + 3.16E-13 2.30E-13 8.48E-14 2.62E-13 4.22E-13 2.71E-13 3.87E-13 4.53E-13 + 5.46E-13 5.07E-11 4.73E-06 + 0.4500 0.0000 0.0000 1 6.00274E-09 kpt; spin; max resid(k); each band: + 2.21E-13 6.43E-14 8.29E-14 5.01E-13 3.84E-13 3.88E-13 1.55E-13 7.23E-13 + 7.74E-13 2.64E-11 6.00E-09 + 0.5000 0.0000 0.0000 1 5.06962E-11 kpt; spin; max resid(k); each band: + 4.33E-13 9.89E-14 2.97E-13 3.53E-13 9.45E-14 7.78E-13 5.23E-13 2.27E-13 + 9.94E-13 5.07E-11 4.99E-11 + 0.4722 0.0556 0.0000 1 7.86512E-07 kpt; spin; max resid(k); each band: + 1.54E-13 5.64E-14 4.76E-13 1.46E-13 3.26E-13 7.96E-14 3.65E-13 3.42E-13 + 7.44E-13 1.01E-11 7.87E-07 + 0.4444 0.1111 0.0000 1 8.54600E-08 kpt; spin; max resid(k); each band: + 2.12E-13 1.64E-13 5.66E-14 9.26E-14 4.60E-13 3.70E-13 1.94E-13 3.30E-13 + 7.87E-13 4.60E-13 8.55E-08 + 0.4167 0.1667 0.0000 1 2.62791E-08 kpt; spin; max resid(k); each band: + 1.86E-13 2.05E-13 1.35E-13 9.90E-14 1.30E-13 2.09E-13 2.67E-13 2.00E-13 + 4.53E-13 1.01E-12 2.63E-08 + 0.3889 0.2222 0.0000 1 4.17079E-08 kpt; spin; max resid(k); each band: + 2.31E-13 4.88E-13 1.96E-13 8.33E-14 2.93E-13 1.59E-13 1.93E-13 4.98E-13 + 1.38E-13 1.26E-12 4.17E-08 + 0.3611 0.2778 0.0000 1 7.61479E-07 kpt; spin; max resid(k); each band: + 2.85E-13 4.44E-13 1.69E-13 1.09E-13 1.92E-13 1.94E-13 1.63E-13 3.58E-13 + 2.03E-13 3.68E-11 7.61E-07 + 0.3333 0.3333 0.0000 1 5.63158E-07 kpt; spin; max resid(k); each band: + 3.57E-13 1.95E-13 2.37E-13 1.39E-13 2.38E-13 1.04E-13 1.15E-13 6.55E-13 + 4.91E-13 1.90E-11 5.63E-07 + 0.3056 0.3056 0.0000 1 1.94111E-10 kpt; spin; max resid(k); each band: + 1.69E-13 3.07E-13 1.86E-13 1.88E-13 1.26E-13 2.89E-13 5.28E-13 2.95E-13 + 3.18E-13 1.40E-10 1.94E-10 + 0.2778 0.2778 0.0000 1 6.30054E-12 kpt; spin; max resid(k); each band: + 1.78E-13 4.89E-14 1.28E-13 4.98E-13 4.44E-13 1.92E-13 4.37E-13 2.11E-13 + 2.87E-13 5.84E-12 6.30E-12 + 0.2500 0.2500 0.0000 1 8.99555E-13 kpt; spin; max resid(k); each band: + 4.65E-13 4.54E-13 3.29E-13 1.42E-13 3.29E-13 2.54E-13 1.62E-13 7.67E-13 + 8.51E-13 8.29E-13 9.00E-13 + 0.2222 0.2222 0.0000 1 7.64707E-13 kpt; spin; max resid(k); each band: + 4.52E-13 7.36E-14 1.74E-13 1.05E-13 2.46E-13 2.25E-13 1.58E-13 4.37E-13 + 4.46E-13 3.99E-13 7.65E-13 + 0.1944 0.1944 0.0000 1 1.41666E-11 kpt; spin; max resid(k); each band: + 1.74E-13 3.06E-13 4.34E-14 3.51E-13 3.84E-13 5.35E-13 8.38E-13 9.75E-14 + 3.22E-13 5.72E-13 1.42E-11 + 0.1667 0.1667 0.0000 1 8.29045E-10 kpt; spin; max resid(k); each band: + 1.66E-13 2.71E-13 4.60E-13 2.92E-13 2.90E-13 7.78E-13 6.66E-13 1.51E-13 + 2.61E-13 6.23E-13 8.29E-10 + 0.1389 0.1389 0.0000 1 3.68299E-07 kpt; spin; max resid(k); each band: + 1.16E-13 2.12E-13 3.62E-13 3.48E-13 4.02E-13 1.11E-13 2.69E-13 5.52E-13 + 3.14E-13 8.34E-10 3.68E-07 + 0.1111 0.1111 0.0000 1 7.91579E-06 kpt; spin; max resid(k); each band: + 2.04E-13 9.41E-14 1.63E-13 6.77E-14 1.49E-13 1.91E-13 1.91E-13 9.79E-13 + 6.94E-13 2.86E-07 7.92E-06 + 0.0833 0.0833 0.0000 1 1.70600E-05 kpt; spin; max resid(k); each band: + 2.86E-13 4.99E-13 2.06E-13 1.07E-13 1.98E-13 1.53E-13 1.84E-13 2.42E-13 + 1.31E-13 3.66E-08 1.71E-05 + 0.0556 0.0556 0.0000 1 1.20237E-04 kpt; spin; max resid(k); each band: + 2.44E-13 8.86E-13 6.53E-13 4.88E-13 5.04E-13 3.70E-13 1.57E-13 6.57E-13 + 5.00E-13 4.51E-10 1.20E-04 + 0.0278 0.0278 0.0000 1 1.87222E-05 kpt; spin; max resid(k); each band: + 1.08E-13 2.14E-13 2.46E-13 2.19E-13 8.21E-14 3.86E-13 2.39E-13 8.33E-14 + 8.94E-13 3.05E-11 1.87E-05 + 0.0000 0.0000 0.0000 1 1.21831E-11 kpt; spin; max resid(k); each band: + 1.73E-13 5.84E-14 2.96E-13 1.84E-13 4.98E-13 9.30E-14 1.61E-13 4.76E-13 + 1.10E-13 8.42E-13 1.22E-11 + 0.0000 0.0000 0.0625 1 1.08210E-08 kpt; spin; max resid(k); each band: + 1.94E-13 2.29E-13 3.80E-13 1.59E-13 4.15E-13 8.12E-14 7.29E-14 1.95E-13 + 1.79E-13 3.84E-13 1.08E-08 + 0.0000 0.0000 0.1250 1 4.26017E-08 kpt; spin; max resid(k); each band: + 3.59E-13 1.03E-13 4.63E-13 1.45E-13 2.89E-13 2.22E-13 7.51E-13 4.08E-13 + 3.82E-13 6.38E-11 4.26E-08 + 0.0000 0.0000 0.1875 1 1.77143E-08 kpt; spin; max resid(k); each band: + 1.25E-13 8.71E-13 6.26E-13 2.77E-13 1.22E-13 6.37E-13 2.41E-13 2.22E-13 + 9.32E-13 9.25E-10 1.77E-08 + 0.0000 0.0000 0.2500 1 3.78411E-06 kpt; spin; max resid(k); each band: + 6.02E-13 7.04E-14 7.53E-13 1.68E-13 3.32E-13 2.07E-13 2.55E-13 2.70E-13 + 3.68E-13 3.78E-06 1.13E-10 + 0.0000 0.0000 0.3125 1 1.63395E-05 kpt; spin; max resid(k); each band: + 4.13E-13 9.50E-13 3.61E-13 1.52E-13 2.57E-13 3.74E-13 7.01E-13 6.68E-13 + 3.10E-13 2.00E-12 1.63E-05 + 0.0000 0.0000 0.3750 1 7.91815E-07 kpt; spin; max resid(k); each band: + 4.03E-13 4.12E-14 2.96E-13 8.31E-13 1.29E-13 1.68E-13 1.40E-13 2.48E-13 + 6.77E-13 1.54E-12 7.92E-07 + 0.0000 0.0000 0.4375 1 3.79494E-08 kpt; spin; max resid(k); each band: + 3.59E-13 9.92E-13 2.10E-13 8.06E-13 7.35E-13 3.40E-13 3.90E-13 2.42E-13 + 7.80E-13 1.59E-09 3.79E-08 + 0.0000 0.0000 0.5000 1 2.44595E-08 kpt; spin; max resid(k); each band: + 1.28E-13 8.35E-14 3.64E-13 4.52E-13 1.66E-13 1.31E-13 5.37E-13 8.18E-13 + 1.70E-13 2.07E-10 2.45E-08 + 0.0500 0.0000 0.5000 1 1.43486E-08 kpt; spin; max resid(k); each band: + 6.78E-14 6.41E-13 2.04E-13 1.86E-13 5.80E-13 1.58E-13 4.23E-13 9.63E-13 + 1.72E-13 4.72E-09 1.43E-08 + 0.1000 0.0000 0.5000 1 8.59952E-13 kpt; spin; max resid(k); each band: + 1.69E-13 1.63E-13 7.01E-13 4.52E-13 8.60E-13 3.30E-13 1.94E-13 6.57E-13 + 2.57E-13 7.82E-13 5.77E-13 + 0.1500 0.0000 0.5000 1 9.22807E-13 kpt; spin; max resid(k); each band: + 5.39E-13 1.92E-13 3.08E-13 7.41E-14 1.23E-13 7.30E-13 2.57E-13 7.02E-13 + 3.15E-13 2.67E-13 9.23E-13 + 0.2000 0.0000 0.5000 1 2.65084E-12 kpt; spin; max resid(k); each band: + 1.13E-13 2.46E-13 8.77E-13 7.95E-14 3.57E-13 2.81E-13 5.10E-13 4.52E-13 + 3.72E-13 1.03E-12 2.65E-12 + 0.2500 0.0000 0.5000 1 2.18986E-11 kpt; spin; max resid(k); each band: + 1.34E-13 4.75E-13 1.07E-13 1.33E-13 1.27E-13 3.79E-13 2.09E-13 4.50E-13 + 3.24E-13 1.27E-11 2.19E-11 + 0.3000 0.0000 0.5000 1 5.59722E-12 kpt; spin; max resid(k); each band: + 2.37E-13 1.54E-13 2.27E-13 1.46E-13 1.75E-13 9.69E-14 4.17E-13 1.00E-12 + 5.76E-13 2.59E-13 5.60E-12 + 0.3500 0.0000 0.5000 1 3.47875E-10 kpt; spin; max resid(k); each band: + 1.56E-13 1.98E-13 6.23E-13 3.20E-13 2.22E-13 7.95E-14 4.90E-13 6.00E-13 + 3.70E-13 5.36E-12 3.48E-10 + 0.4000 0.0000 0.5000 1 8.59640E-09 kpt; spin; max resid(k); each band: + 4.36E-13 3.84E-13 3.18E-13 1.24E-13 3.50E-13 1.48E-13 7.62E-13 2.09E-13 + 5.43E-13 3.92E-09 8.60E-09 + 0.4500 0.0000 0.5000 1 4.89926E-06 kpt; spin; max resid(k); each band: + 2.69E-13 2.93E-13 1.69E-13 1.90E-13 6.70E-13 7.26E-13 1.82E-13 7.41E-13 + 5.61E-13 9.08E-08 4.90E-06 + 0.5000 0.0000 0.5000 1 6.68998E-08 kpt; spin; max resid(k); each band: + 4.95E-14 3.32E-13 1.24E-13 1.21E-13 1.78E-13 3.56E-13 9.16E-13 7.30E-13 + 7.37E-13 6.69E-08 5.67E-08 + 0.4722 0.0556 0.5000 1 1.47491E-06 kpt; spin; max resid(k); each band: + 1.37E-13 8.32E-13 7.06E-13 7.09E-14 4.38E-13 5.68E-13 3.02E-13 5.96E-13 + 5.40E-13 1.27E-06 1.47E-06 + 0.4444 0.1111 0.5000 1 8.45775E-09 kpt; spin; max resid(k); each band: + 1.63E-13 3.62E-13 9.92E-14 2.69E-13 1.45E-13 7.95E-13 3.20E-13 5.21E-13 + 5.70E-13 9.77E-10 8.46E-09 + 0.4167 0.1667 0.5000 1 1.21403E-12 kpt; spin; max resid(k); each band: + 1.32E-13 5.83E-13 3.36E-13 9.81E-14 5.16E-13 1.65E-13 7.14E-13 6.15E-13 + 7.43E-13 4.37E-13 1.21E-12 + outwf : prtvol=0 or 1, do not print more k-points. + + reduced coordinates (array xred) for 3 atoms + 0.000000000000 0.000000000000 0.000000000000 + 0.333333333333 0.666666666667 0.500000000000 + 0.666666666667 0.333333333333 0.500000000000 + + cartesian coordinates (angstrom) at end: + 1 0.00000000000000 0.00000000000000 0.00000000000000 + 2 -0.89085146584847 1.54300000082417 1.76150000096413 + 3 0.89085146584847 1.54300000082417 1.76150000096413 + length scales= 1.000000000000 1.000000000000 1.000000000000 bohr + = 0.529177208590 0.529177208590 0.529177208590 angstroms + prteigrs : about to open file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_EIG + Eigenvalues (hartree) for nkpt= 97 k points: + kpt# 1, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.0000 (reduced coord) + -0.18002 0.17145 0.29801 0.29801 0.33630 0.50991 0.50991 0.57367 + 0.65094 0.72899 0.86971 + kpt# 2, nband= 11, wtk= 1.00000, kpt= 0.0500 0.0000 0.0000 (reduced coord) + -0.17846 0.17302 0.28799 0.29285 0.33772 0.50851 0.51695 0.57753 + 0.64506 0.73784 0.85923 + kpt# 3, nband= 11, wtk= 1.00000, kpt= 0.1000 0.0000 0.0000 (reduced coord) + -0.17362 0.17765 0.26324 0.28194 0.34211 0.50374 0.53777 0.58899 + 0.62700 0.76231 0.83619 + kpt# 4, nband= 11, wtk= 1.00000, kpt= 0.1500 0.0000 0.0000 (reduced coord) + -0.16560 0.18557 0.23067 0.26721 0.34954 0.49465 0.56782 0.60177 + 0.60502 0.79815 0.81178 + kpt# 5, nband= 11, wtk= 1.00000, kpt= 0.2000 0.0000 0.0000 (reduced coord) + -0.15442 0.19422 0.19629 0.25205 0.35983 0.48250 0.56841 0.60505 + 0.61743 0.79431 0.80398 + kpt# 6, nband= 11, wtk= 1.00000, kpt= 0.2500 0.0000 0.0000 (reduced coord) + -0.14040 0.15531 0.21050 0.23762 0.37220 0.47114 0.53264 0.61850 + 0.64622 0.78001 0.79120 + kpt# 7, nband= 11, wtk= 1.00000, kpt= 0.3000 0.0000 0.0000 (reduced coord) + -0.12307 0.11670 0.22510 0.22683 0.38662 0.46205 0.49593 0.60602 + 0.68960 0.76171 0.80413 + kpt# 8, nband= 11, wtk= 1.00000, kpt= 0.3500 0.0000 0.0000 (reduced coord) + -0.10279 0.07917 0.21496 0.24511 0.40124 0.45659 0.46041 0.58498 + 0.73075 0.74815 0.79917 + kpt# 9, nband= 11, wtk= 1.00000, kpt= 0.4000 0.0000 0.0000 (reduced coord) + -0.07995 0.04352 0.20741 0.26423 0.41281 0.42800 0.45742 0.56106 + 0.73860 0.75829 0.80365 + kpt# 10, nband= 11, wtk= 1.00000, kpt= 0.4500 0.0000 0.0000 (reduced coord) + -0.05504 0.01075 0.20238 0.28106 0.40313 0.41832 0.46546 0.53984 + 0.73306 0.76552 0.79760 + kpt# 11, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.0000 (reduced coord) + -0.03642 -0.01028 0.20136 0.28919 0.39314 0.41954 0.47153 0.52988 + 0.73141 0.76680 0.79574 + kpt# 12, nband= 11, wtk= 1.00000, kpt= 0.4722 0.0556 0.0000 (reduced coord) + -0.03523 -0.00915 0.19167 0.29020 0.39230 0.43001 0.47240 0.53180 + 0.70700 0.75768 0.82428 + kpt# 13, nband= 11, wtk= 1.00000, kpt= 0.4444 0.1111 0.0000 (reduced coord) + -0.03132 -0.00521 0.16755 0.29508 0.39012 0.45589 0.47519 0.53841 + 0.67028 0.73635 0.81855 + kpt# 14, nband= 11, wtk= 1.00000, kpt= 0.4167 0.1667 0.0000 (reduced coord) + -0.02475 0.00111 0.13660 0.30411 0.38584 0.47987 0.48440 0.55249 + 0.63792 0.71261 0.79680 + kpt# 15, nband= 11, wtk= 1.00000, kpt= 0.3889 0.2222 0.0000 (reduced coord) + -0.01555 0.00906 0.10470 0.31546 0.37789 0.48635 0.50335 0.57576 + 0.61353 0.69640 0.77382 + kpt# 16, nband= 11, wtk= 1.00000, kpt= 0.3611 0.2778 0.0000 (reduced coord) + -0.00372 0.01571 0.07596 0.33002 0.36504 0.49450 0.50914 0.59467 + 0.59883 0.70204 0.75169 + kpt# 17, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.0000 (reduced coord) + 0.01035 0.01035 0.06296 0.34750 0.34750 0.50371 0.50371 0.59408 + 0.59843 0.73097 0.73100 + kpt# 18, nband= 11, wtk= 1.00000, kpt= 0.3056 0.3056 0.0000 (reduced coord) + -0.01164 0.02736 0.07241 0.32699 0.36837 0.48960 0.51472 0.59752 + 0.59834 0.71382 0.72046 + kpt# 19, nband= 11, wtk= 1.00000, kpt= 0.2778 0.2778 0.0000 (reduced coord) + -0.03781 0.04686 0.09009 0.30488 0.39228 0.47020 0.52599 0.59117 + 0.61006 0.69832 0.71181 + kpt# 20, nband= 11, wtk= 1.00000, kpt= 0.2500 0.2500 0.0000 (reduced coord) + -0.06331 0.06906 0.11180 0.28284 0.41866 0.44862 0.53749 0.57954 + 0.62795 0.68670 0.71502 + kpt# 21, nband= 11, wtk= 1.00000, kpt= 0.2222 0.2222 0.0000 (reduced coord) + -0.08712 0.09338 0.13578 0.26146 0.42700 0.44750 0.54667 0.56457 + 0.65094 0.67881 0.72730 + kpt# 22, nband= 11, wtk= 1.00000, kpt= 0.1944 0.1944 0.0000 (reduced coord) + -0.10844 0.11965 0.16081 0.24054 0.40671 0.47827 0.54881 0.55279 + 0.67490 0.67833 0.74499 + kpt# 23, nband= 11, wtk= 1.00000, kpt= 0.1667 0.1667 0.0000 (reduced coord) + -0.12726 0.14814 0.18725 0.22260 0.38836 0.51065 0.53483 0.55488 + 0.67196 0.70978 0.76549 + kpt# 24, nband= 11, wtk= 1.00000, kpt= 0.1389 0.1389 0.0000 (reduced coord) + -0.14312 0.17822 0.20775 0.21408 0.37251 0.52351 0.54364 0.55342 + 0.66235 0.74511 0.78760 + kpt# 25, nband= 11, wtk= 1.00000, kpt= 0.1111 0.1111 0.0000 (reduced coord) + -0.15629 0.19448 0.20882 0.23969 0.35935 0.51480 0.54920 0.57516 + 0.64014 0.78375 0.80862 + kpt# 26, nband= 11, wtk= 1.00000, kpt= 0.0833 0.0833 0.0000 (reduced coord) + -0.16667 0.18446 0.23934 0.26253 0.34900 0.51055 0.54210 0.60453 + 0.61227 0.79283 0.81887 + kpt# 27, nband= 11, wtk= 1.00000, kpt= 0.0556 0.0556 0.0000 (reduced coord) + -0.17413 0.17706 0.26649 0.28115 0.34179 0.50872 0.52956 0.58928 + 0.62766 0.75986 0.84542 + kpt# 28, nband= 11, wtk= 1.00000, kpt= 0.0278 0.0278 0.0000 (reduced coord) + -0.17857 0.17291 0.28877 0.29293 0.33762 0.50904 0.51607 0.57726 + 0.64549 0.73720 0.86174 + kpt# 29, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.0000 (reduced coord) + -0.18002 0.17145 0.29801 0.29801 0.33630 0.50991 0.50991 0.57367 + 0.65094 0.72899 0.86971 + kpt# 30, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.0625 (reduced coord) + -0.17877 0.16054 0.29852 0.29852 0.35009 0.51038 0.51038 0.57386 + 0.65026 0.73021 0.85689 + kpt# 31, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.1250 (reduced coord) + -0.17511 0.13488 0.29956 0.29956 0.38407 0.51167 0.51167 0.57338 + 0.64626 0.73379 0.82919 + kpt# 32, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.1875 (reduced coord) + -0.16911 0.10587 0.30179 0.30179 0.42903 0.51402 0.51402 0.57363 + 0.64406 0.73964 0.79936 + kpt# 33, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.2500 (reduced coord) + -0.16122 0.07612 0.30594 0.30594 0.47919 0.51697 0.51697 0.57449 + 0.64495 0.74734 0.77207 + kpt# 34, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.3125 (reduced coord) + -0.15200 0.04870 0.30870 0.30870 0.52086 0.52086 0.53144 0.57535 + 0.64163 0.74934 0.75291 + kpt# 35, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.3750 (reduced coord) + -0.14279 0.02613 0.31111 0.31111 0.52322 0.52322 0.57617 0.58284 + 0.63887 0.73234 0.73235 + kpt# 36, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.4375 (reduced coord) + -0.13568 0.01050 0.31276 0.31276 0.52402 0.52402 0.57669 0.62526 + 0.63722 0.72183 0.72183 + kpt# 37, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.5000 (reduced coord) + -0.13284 0.00476 0.31323 0.31323 0.52455 0.52455 0.57397 0.63660 + 0.64305 0.71826 0.71826 + kpt# 38, nband= 11, wtk= 1.00000, kpt= 0.0500 0.0000 0.5000 (reduced coord) + -0.13142 0.00659 0.30299 0.30805 0.52426 0.53203 0.55995 0.64041 + 0.64432 0.70890 0.72029 + kpt# 39, nband= 11, wtk= 1.00000, kpt= 0.1000 0.0000 0.5000 (reduced coord) + -0.12716 0.01213 0.28115 0.29667 0.52259 0.52663 0.55281 0.64777 + 0.65307 0.69001 0.71330 + kpt# 40, nband= 11, wtk= 1.00000, kpt= 0.1500 0.0000 0.5000 (reduced coord) + -0.11983 0.02147 0.25094 0.28088 0.48557 0.51971 0.58421 0.65267 + 0.67012 0.67358 0.69715 + kpt# 41, nband= 11, wtk= 1.00000, kpt= 0.2000 0.0000 0.5000 (reduced coord) + -0.10961 0.03407 0.21611 0.26530 0.44133 0.51294 0.62223 0.65053 + 0.65184 0.68733 0.69973 + kpt# 42, nband= 11, wtk= 1.00000, kpt= 0.2500 0.0000 0.5000 (reduced coord) + -0.09663 0.05005 0.17919 0.25046 0.39682 0.50545 0.63600 0.63747 + 0.66535 0.69331 0.72631 + kpt# 43, nband= 11, wtk= 1.00000, kpt= 0.3000 0.0000 0.5000 (reduced coord) + -0.08074 0.06915 0.14265 0.23726 0.35342 0.49854 0.62210 0.62287 + 0.70612 0.71101 0.75506 + kpt# 44, nband= 11, wtk= 1.00000, kpt= 0.3500 0.0000 0.5000 (reduced coord) + -0.06206 0.09091 0.10740 0.22637 0.31196 0.49276 0.60845 0.61258 + 0.72188 0.75880 0.78366 + kpt# 45, nband= 11, wtk= 1.00000, kpt= 0.4000 0.0000 0.5000 (reduced coord) + -0.04070 0.07395 0.11450 0.21878 0.27447 0.48848 0.59866 0.60523 + 0.73833 0.80523 0.81078 + kpt# 46, nband= 11, wtk= 1.00000, kpt= 0.4500 0.0000 0.5000 (reduced coord) + -0.01734 0.04365 0.13705 0.21427 0.24383 0.48622 0.59313 0.60081 + 0.75268 0.83317 0.84422 + kpt# 47, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.5000 (reduced coord) + -0.00005 0.02333 0.14813 0.21258 0.22976 0.48527 0.59105 0.59934 + 0.75796 0.84349 0.85419 + kpt# 48, nband= 11, wtk= 1.00000, kpt= 0.4722 0.0556 0.5000 (reduced coord) + 0.00135 0.02496 0.14986 0.20486 0.23024 0.49571 0.54511 0.64775 + 0.75956 0.83537 0.83866 + kpt# 49, nband= 11, wtk= 1.00000, kpt= 0.4444 0.1111 0.5000 (reduced coord) + 0.00492 0.02857 0.15460 0.18444 0.23120 0.49927 0.52386 0.70002 + 0.76252 0.81091 0.82221 + kpt# 50, nband= 11, wtk= 1.00000, kpt= 0.4167 0.1667 0.5000 (reduced coord) + 0.01105 0.03441 0.15702 0.16257 0.23154 0.45937 0.56391 0.74717 + 0.76752 0.78647 0.79826 + kpt# 51, nband= 11, wtk= 1.00000, kpt= 0.3889 0.2222 0.5000 (reduced coord) + 0.01973 0.04199 0.12822 0.17379 0.22921 0.42790 0.61080 0.76445 + 0.77038 0.77430 0.77979 + kpt# 52, nband= 11, wtk= 1.00000, kpt= 0.3611 0.2778 0.5000 (reduced coord) + 0.03082 0.04863 0.10086 0.18811 0.22098 0.40804 0.66026 0.74038 + 0.74128 0.78184 0.79103 + kpt# 53, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.5000 (reduced coord) + 0.04440 0.04440 0.08879 0.20579 0.20579 0.40155 0.70218 0.72026 + 0.72026 0.78997 0.78997 + kpt# 54, nband= 11, wtk= 1.00000, kpt= 0.3056 0.3056 0.5000 (reduced coord) + 0.02331 0.06004 0.09700 0.18380 0.22626 0.40718 0.67767 0.69875 + 0.76345 0.77891 0.79539 + kpt# 55, nband= 11, wtk= 1.00000, kpt= 0.2778 0.2778 0.5000 (reduced coord) + -0.00149 0.07842 0.11377 0.15871 0.24948 0.42212 0.65015 0.68050 + 0.76377 0.79605 0.80619 + kpt# 56, nband= 11, wtk= 1.00000, kpt= 0.2500 0.2500 0.5000 (reduced coord) + -0.02560 0.09864 0.13280 0.13317 0.27597 0.44372 0.62424 0.66202 + 0.74639 0.79271 0.83440 + kpt# 57, nband= 11, wtk= 1.00000, kpt= 0.2222 0.2222 0.5000 (reduced coord) + -0.04749 0.10800 0.12081 0.15552 0.30555 0.47031 0.60072 0.64522 + 0.72883 0.78533 0.84979 + kpt# 58, nband= 11, wtk= 1.00000, kpt= 0.1944 0.1944 0.5000 (reduced coord) + -0.06732 0.08509 0.14567 0.17990 0.33866 0.50079 0.58041 0.63004 + 0.71181 0.77612 0.83332 + kpt# 59, nband= 11, wtk= 1.00000, kpt= 0.1667 0.1667 0.5000 (reduced coord) + -0.08469 0.06447 0.17227 0.20497 0.37395 0.53420 0.56290 0.61515 + 0.69573 0.76504 0.78737 + kpt# 60, nband= 11, wtk= 1.00000, kpt= 0.1389 0.1389 0.5000 (reduced coord) + -0.09938 0.04664 0.20036 0.23070 0.41176 0.54900 0.56977 0.60050 + 0.68158 0.74463 0.75430 + kpt# 61, nband= 11, wtk= 1.00000, kpt= 0.1111 0.1111 0.5000 (reduced coord) + -0.11142 0.03188 0.22999 0.25510 0.45209 0.53819 0.58395 0.60633 + 0.67028 0.70667 0.74480 + kpt# 62, nband= 11, wtk= 1.00000, kpt= 0.0833 0.0833 0.5000 (reduced coord) + -0.12089 0.02019 0.25855 0.27717 0.49235 0.53097 0.56616 0.63952 + 0.66459 0.67434 0.73615 + kpt# 63, nband= 11, wtk= 1.00000, kpt= 0.0556 0.0556 0.5000 (reduced coord) + -0.12750 0.01170 0.28452 0.29644 0.52641 0.52980 0.54796 0.64730 + 0.65223 0.68382 0.72802 + kpt# 64, nband= 11, wtk= 1.00000, kpt= 0.0278 0.0278 0.5000 (reduced coord) + -0.13154 0.00646 0.30375 0.30828 0.52452 0.53106 0.56093 0.64010 + 0.64422 0.70852 0.72154 + kpt# 65, nband= 11, wtk= 1.00000, kpt= 0.0000 0.0000 0.5000 (reduced coord) + -0.13284 0.00476 0.31323 0.31323 0.52455 0.52455 0.57397 0.63660 + 0.64305 0.71826 0.71826 + kpt# 66, nband= 11, wtk= 1.00000, kpt= 0.0500 0.0000 0.5000 (reduced coord) + -0.13142 0.00659 0.30299 0.30805 0.52426 0.53203 0.55995 0.64041 + 0.64432 0.70890 0.72029 + kpt# 67, nband= 11, wtk= 1.00000, kpt= 0.1000 0.0000 0.5000 (reduced coord) + -0.12716 0.01213 0.28115 0.29667 0.52259 0.52663 0.55281 0.64777 + 0.65307 0.69001 0.71330 + kpt# 68, nband= 11, wtk= 1.00000, kpt= 0.1500 0.0000 0.5000 (reduced coord) + -0.11983 0.02147 0.25094 0.28088 0.48557 0.51971 0.58421 0.65267 + 0.67012 0.67358 0.69715 + kpt# 69, nband= 11, wtk= 1.00000, kpt= 0.2000 0.0000 0.5000 (reduced coord) + -0.10961 0.03407 0.21611 0.26530 0.44133 0.51294 0.62223 0.65053 + 0.65184 0.68733 0.69973 + kpt# 70, nband= 11, wtk= 1.00000, kpt= 0.2500 0.0000 0.5000 (reduced coord) + -0.09663 0.05005 0.17919 0.25046 0.39682 0.50545 0.63600 0.63747 + 0.66535 0.69331 0.72631 + kpt# 71, nband= 11, wtk= 1.00000, kpt= 0.3000 0.0000 0.5000 (reduced coord) + -0.08074 0.06915 0.14265 0.23726 0.35342 0.49854 0.62210 0.62287 + 0.70612 0.71101 0.75506 + kpt# 72, nband= 11, wtk= 1.00000, kpt= 0.3500 0.0000 0.5000 (reduced coord) + -0.06206 0.09091 0.10740 0.22637 0.31196 0.49276 0.60845 0.61258 + 0.72188 0.75880 0.78366 + kpt# 73, nband= 11, wtk= 1.00000, kpt= 0.4000 0.0000 0.5000 (reduced coord) + -0.04070 0.07395 0.11450 0.21878 0.27447 0.48848 0.59866 0.60523 + 0.73833 0.80523 0.81078 + kpt# 74, nband= 11, wtk= 1.00000, kpt= 0.4500 0.0000 0.5000 (reduced coord) + -0.01734 0.04365 0.13705 0.21427 0.24383 0.48622 0.59313 0.60081 + 0.75268 0.83317 0.84422 + kpt# 75, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.5000 (reduced coord) + -0.00005 0.02333 0.14813 0.21258 0.22976 0.48527 0.59105 0.59934 + 0.75796 0.84349 0.85419 + kpt# 76, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.4375 (reduced coord) + -0.00188 0.02207 0.15278 0.21228 0.23412 0.48226 0.59561 0.60255 + 0.73855 0.81208 0.86186 + kpt# 77, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.3750 (reduced coord) + -0.00730 0.01723 0.16475 0.21104 0.24666 0.47475 0.60727 0.61206 + 0.69491 0.77066 0.85802 + kpt# 78, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.3125 (reduced coord) + -0.01437 0.01101 0.18378 0.20950 0.26616 0.46516 0.62051 0.62768 + 0.64663 0.72989 0.85512 + kpt# 79, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.2500 (reduced coord) + -0.02146 0.00434 0.20680 0.20756 0.29025 0.45536 0.59846 0.62270 + 0.64882 0.70129 0.85187 + kpt# 80, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.1875 (reduced coord) + -0.02769 -0.00160 0.20471 0.23402 0.31868 0.44633 0.55290 0.60150 + 0.67505 0.70017 0.84899 + kpt# 81, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.1250 (reduced coord) + -0.03247 -0.00633 0.20298 0.25988 0.34859 0.43764 0.51271 0.56880 + 0.70573 0.71351 0.86215 + kpt# 82, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.0625 (reduced coord) + -0.03554 -0.00947 0.20126 0.27999 0.37676 0.42764 0.48290 0.54094 + 0.72611 0.73973 0.82548 + kpt# 83, nband= 11, wtk= 1.00000, kpt= 0.5000 0.0000 0.0000 (reduced coord) + -0.03642 -0.01028 0.20136 0.28919 0.39314 0.41954 0.47153 0.52988 + 0.73141 0.76680 0.79574 + kpt# 84, nband= 11, wtk= 1.00000, kpt= 0.4722 0.0556 0.0000 (reduced coord) + -0.03523 -0.00915 0.19167 0.29020 0.39230 0.43001 0.47240 0.53180 + 0.70700 0.75768 0.82428 + kpt# 85, nband= 11, wtk= 1.00000, kpt= 0.4444 0.1111 0.0000 (reduced coord) + -0.03132 -0.00521 0.16755 0.29508 0.39012 0.45589 0.47519 0.53841 + 0.67028 0.73635 0.81855 + kpt# 86, nband= 11, wtk= 1.00000, kpt= 0.4167 0.1667 0.0000 (reduced coord) + -0.02475 0.00111 0.13660 0.30411 0.38584 0.47987 0.48440 0.55249 + 0.63792 0.71261 0.79680 + kpt# 87, nband= 11, wtk= 1.00000, kpt= 0.3889 0.2222 0.0000 (reduced coord) + -0.01555 0.00906 0.10470 0.31546 0.37789 0.48635 0.50335 0.57576 + 0.61353 0.69640 0.77382 + kpt# 88, nband= 11, wtk= 1.00000, kpt= 0.3611 0.2778 0.0000 (reduced coord) + -0.00372 0.01571 0.07596 0.33002 0.36504 0.49450 0.50914 0.59467 + 0.59883 0.70204 0.75169 + kpt# 89, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.0000 (reduced coord) + 0.01035 0.01035 0.06296 0.34750 0.34750 0.50371 0.50371 0.59408 + 0.59843 0.73097 0.73100 + kpt# 90, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.0625 (reduced coord) + 0.01135 0.01135 0.06442 0.33811 0.33811 0.51588 0.51588 0.56009 + 0.63043 0.73253 0.73253 + kpt# 91, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.1250 (reduced coord) + 0.01445 0.01445 0.06693 0.31619 0.31619 0.52423 0.54578 0.54578 + 0.65687 0.73537 0.73537 + kpt# 92, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.1875 (reduced coord) + 0.01876 0.01876 0.07022 0.28904 0.28904 0.49061 0.58344 0.58344 + 0.67384 0.73888 0.73888 + kpt# 93, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.2500 (reduced coord) + 0.02457 0.02457 0.07490 0.26311 0.26311 0.46093 0.62453 0.62453 + 0.68486 0.74491 0.74491 + kpt# 94, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.3125 (reduced coord) + 0.03118 0.03118 0.07987 0.24062 0.24062 0.43616 0.66481 0.66481 + 0.69237 0.75386 0.75386 + kpt# 95, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.3750 (reduced coord) + 0.03745 0.03745 0.08413 0.22148 0.22148 0.41733 0.69612 0.69612 + 0.69740 0.76525 0.76525 + kpt# 96, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.4375 (reduced coord) + 0.04239 0.04239 0.08758 0.20964 0.20964 0.40556 0.70093 0.71405 + 0.71405 0.78113 0.78113 + kpt# 97, nband= 11, wtk= 1.00000, kpt= 0.3333 0.3333 0.5000 (reduced coord) + 0.04440 0.04440 0.08879 0.20579 0.20579 0.40155 0.70218 0.72026 + 0.72026 0.78997 0.78997 + Total charge density [el/Bohr^3] +, Maximum= 1.3269E-01 at reduced coord. 0.4444 0.8889 0.5000 +,Next maximum= 1.3269E-01 at reduced coord. 0.4444 0.5556 0.5000 +, Minimum= 1.0465E-03 at reduced coord. 0.0000 0.0000 0.0000 +,Next minimum= 1.4272E-03 at reduced coord. 0.0556 0.0000 0.0000 +, Integrated= 8.0000E+00 + +== END DATASET(S) ============================================================== +================================================================================ + + -outvars: echo values of variables after computation -------- + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + irdden 1 + iscf -2 + istwfk 2 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 2 0 + 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 0 + outvar_i_n : Printing only first 50 k-points. + kpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 5.00000000E-02 0.00000000E+00 0.00000000E+00 + 1.00000000E-01 0.00000000E+00 0.00000000E+00 + 1.50000000E-01 0.00000000E+00 0.00000000E+00 + 2.00000000E-01 0.00000000E+00 0.00000000E+00 + 2.50000000E-01 0.00000000E+00 0.00000000E+00 + 3.00000000E-01 0.00000000E+00 0.00000000E+00 + 3.50000000E-01 0.00000000E+00 0.00000000E+00 + 4.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.50000000E-01 0.00000000E+00 0.00000000E+00 + 5.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.72222222E-01 5.55555555E-02 0.00000000E+00 + 4.44444444E-01 1.11111111E-01 0.00000000E+00 + 4.16666667E-01 1.66666667E-01 0.00000000E+00 + 3.88888889E-01 2.22222222E-01 0.00000000E+00 + 3.61111111E-01 2.77777778E-01 0.00000000E+00 + 3.33333333E-01 3.33333333E-01 0.00000000E+00 + 3.05555556E-01 3.05555556E-01 0.00000000E+00 + 2.77777778E-01 2.77777778E-01 0.00000000E+00 + 2.50000000E-01 2.50000000E-01 0.00000000E+00 + 2.22222222E-01 2.22222222E-01 0.00000000E+00 + 1.94444444E-01 1.94444444E-01 0.00000000E+00 + 1.66666667E-01 1.66666667E-01 0.00000000E+00 + 1.38888889E-01 1.38888889E-01 0.00000000E+00 + 1.11111111E-01 1.11111111E-01 0.00000000E+00 + 8.33333333E-02 8.33333333E-02 0.00000000E+00 + 5.55555555E-02 5.55555555E-02 0.00000000E+00 + 2.77777778E-02 2.77777778E-02 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.25000000E-01 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 2.50000000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 3.75000000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 0.00000000E+00 0.00000000E+00 5.00000000E-01 + 5.00000000E-02 0.00000000E+00 5.00000000E-01 + 1.00000000E-01 0.00000000E+00 5.00000000E-01 + 1.50000000E-01 0.00000000E+00 5.00000000E-01 + 2.00000000E-01 0.00000000E+00 5.00000000E-01 + 2.50000000E-01 0.00000000E+00 5.00000000E-01 + 3.00000000E-01 0.00000000E+00 5.00000000E-01 + 3.50000000E-01 0.00000000E+00 5.00000000E-01 + 4.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.50000000E-01 0.00000000E+00 5.00000000E-01 + 5.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.72222222E-01 5.55555555E-02 5.00000000E-01 + 4.44444444E-01 1.11111111E-01 5.00000000E-01 + 4.16666667E-01 1.66666667E-01 5.00000000E-01 + outvar_i_n : Printing only first 50 k-points. + kptopt -11 +P mkmem 49 + natom 3 + nband 11 + nbdbuf 2 + ngfft 18 18 20 + nkpt 97 +- npkpt 2 + nsym 24 + ntypat 2 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 5.00000000E-01 5.00000000E-01 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolwfr 1.00000000E-12 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + outvars : Printing only first 50 k-points. + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333333E-01 6.6666666667E-01 5.0000000000E-01 + 6.6666666667E-01 3.3333333333E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + Test the timer : + a combined call timab(*,1,tsec) + timab(*,2,tsec) is +- CPU time = 1.9825E-06 sec, Wall time = 1.9849E-06 sec + +- Total cpu time (s,m,h): 19.5 0.33 0.005 +- Total wall clock time (s,m,h): 29.9 0.50 0.008 +- +- For major independent code sections, cpu and wall times (sec), +- as well as % of the time and number of calls for node 0- +- +- cpu_time = 9.7, wall_time = 14.9 +- +- routine cpu % wall % number of calls Gflops +- (-1=no count) +- fourwf%(pot) 5.006 25.7 7.954 26.6 12157 -1.00 +- nonlop(apply) 0.579 3.0 0.933 3.1 12157 -1.00 +- pspini 0.395 2.0 0.495 1.7 1 -1.00 +- invars2 0.225 1.2 0.225 0.8 1 -1.00 +- timing timab 0.114 0.6 0.114 0.4 11 -1.00 +- getghc-other 0.112 0.6 0.160 0.5 -1 -1.00 +- vtowfk(ssdiag) 0.066 0.3 0.097 0.3 -1 -1.00 +- abinit(2) 0.050 0.3 0.050 0.2 1 -1.00 +- newkpt(excl. rwwf ) 0.019 0.1 0.042 0.1 -1 -1.00 +- ewald 0.010 0.1 0.010 0.0 1 -1.00 +- fourdp 0.004 0.0 0.004 0.0 3 -1.00 +- mkcore 0.003 0.0 0.008 0.0 1 -1.00 +- prep_bandfft_tabs 0.002 0.0 0.002 0.0 49 -1.00 +- vtowfk(contrib) 0.002 0.0 0.002 0.0 49 -1.00 +- kpgsph 0.001 0.0 0.001 0.0 146 -1.00 +- xc:pot/=fourdp 0.001 0.0 0.003 0.0 1 -1.00 +- setsym 0.000 0.0 0.001 0.0 1 -1.00 +- status 0.000 0.0 0.000 0.0 23 -1.00 +- vtowfk (1) 0.000 0.0 0.000 0.0 49 -1.00 +- vtorho(MPI) 0.000 0.0 0.000 0.0 1 -1.00 +- inwffil(excl. calls) 0.000 0.0 0.000 0.0 1 -1.00 +- vtowfk3(contrib) 0.000 0.0 0.000 0.0 -1 -1.00 +- cgwf3-O(npw) 0.000 0.0 0.000 0.0 -1 -1.00 +- others (89) 0.000 0.0 0.000 0.0 -1 -1.00 +- +- +- subtotal 6.591 33.8 10.103 33.8 + +- For major independent code sections, cpu and wall times (sec), +- as well as % of the total time and number of calls + +- +- cpu_time = 19.5, wall_time = 29.9 +- +- routine cpu % wall % number of calls Gflops +- (-1=no count) +- fourwf%(pot) 9.813 50.3 15.861 53.1 23941 -1.00 +- nonlop(apply) 1.148 5.9 1.911 6.4 23941 -1.00 +- pspini 0.792 4.1 1.014 3.4 2 -1.00 +- invars2 0.440 2.3 0.440 1.5 2 -1.00 +- vtorho(MPI) 0.316 1.6 0.317 1.1 2 -1.00 +- timing timab 0.228 1.2 0.231 0.8 22 -1.00 +- getghc-other 0.220 1.1 0.323 1.1 -2 -1.00 +- vtowfk(ssdiag) 0.131 0.7 0.207 0.7 -2 -1.00 +- abinit(2) 0.091 0.5 0.092 0.3 2 -1.00 +- newkpt(excl. rwwf ) 0.034 0.2 0.060 0.2 -2 -1.00 +- ewald 0.020 0.1 0.027 0.1 2 -1.00 +- fourdp 0.008 0.0 0.008 0.0 6 -1.00 +- mkcore 0.006 0.0 0.011 0.0 2 -1.00 +- prep_bandfft_tabs 0.005 0.0 0.008 0.0 97 -1.00 +- vtowfk(contrib) 0.004 0.0 0.006 0.0 97 -1.00 +- kpgsph 0.003 0.0 0.003 0.0 291 -1.00 +- xc:pot/=fourdp 0.002 0.0 0.003 0.0 2 -1.00 +- setsym 0.001 0.0 0.001 0.0 2 -1.00 +- status 0.001 0.0 0.001 0.0 46 -1.00 +- vtowfk (1) 0.001 0.0 0.001 0.0 97 -1.00 +- inwffil(excl. calls) 0.000 0.0 0.000 0.0 2 -1.00 +- vtowfk3(contrib) 0.000 0.0 0.000 0.0 -2 -1.00 +- cgwf3-O(npw) 0.000 0.0 0.000 0.0 -2 -1.00 +- others (89) 0.000 0.0 0.000 0.0 -1 -1.00 +- + +- subtotal 13.261 68.0 20.525 68.8 + + Partitioning of abinit +- abinit 19.515 100.0 29.853 100.0 2 + +- abinit(1) 0.043 0.2 0.047 0.2 2 +- abinit(2) 0.091 0.5 0.092 0.3 2 +- indefo+macroin+invars2m 0.442 2.3 0.442 1.5 2 +- abinit(4) 0.045 0.2 0.047 0.2 2 +- abinit(5) 0.037 0.2 0.037 0.1 2 +- driver 18.621 95.4 28.942 96.9 2 +- abinit(6) 0.008 0.0 0.015 0.1 2 +- timing timab 0.228 1.2 0.231 0.8 22 + +- subtotal 19.515 100.0 29.853 100.0 + + Partitioning of driver +- driver 18.621 95.4 28.942 96.9 2 + +- gstateimg 18.586 95.2 28.907 96.8 2 +- driver(aft. select case) 0.034 0.2 0.034 0.1 2 + +- subtotal 18.621 95.4 28.942 96.9 + + Partitioning of gstateimg+gstate +- gstateimg 18.586 95.2 28.907 96.8 2 + +- gstate->kpgsph 0.042 0.2 0.068 0.2 4 +- gstate(pspini) 0.792 4.1 1.014 3.4 2 +- gstate (2) 0.009 0.0 0.012 0.0 2 +- gstate(...scfcv) 17.212 88.2 27.227 91.2 2 +- gstate (3) 0.532 2.7 0.585 2.0 2 + +- subtotal 18.586 95.2 28.907 96.8 + + Partitioning of scfcv +- scfcv 17.211 88.2 27.227 91.2 2 + +- scfcv(iniloop, setvtr ) 0.033 0.2 0.047 0.2 2 +- scfcv(vtorho(f)) 17.172 88.0 27.132 90.9 2 +- scfcv(outscfcv) 0.006 0.0 0.047 0.2 2 + +- subtotal 17.211 88.2 27.227 91.2 + + Partitioning of vtorho +- vtorho 17.172 88.0 27.132 90.9 2 + +- vtorho(bef. vtowfk) 0.017 0.1 0.024 0.1 97 +- vtowfk 16.818 86.2 26.769 89.7 97 +- vtorho(MPI) 0.316 1.6 0.317 1.1 2 +- vtorho(mkrho 2) 0.019 0.1 0.019 0.1 2 + +- subtotal 17.172 88.0 27.132 90.9 + + Partitioning of vtowfk +- vtowfk 16.818 86.2 26.769 89.7 97 + +- lobpcgwf 16.683 85.5 26.555 89.0 527 +- vtowfk(subdiago) 0.124 0.6 0.199 0.7 527 +- vtowfk(2) 0.007 0.0 0.007 0.0 -2 + +- subtotal 16.818 86.2 26.769 89.7 + + Partitioning of getghc +- getghc 11.181 57.3 18.096 60.6 24385 + +- fourwf%getghc 9.813 50.3 15.861 53.1 23941 +- nonlop%getghc 1.148 5.9 1.911 6.4 23941 +- getghc-other 0.220 1.1 0.323 1.1 -2 + +- subtotal 11.181 57.3 18.096 60.6 + + Partitioning of fourwf (upwards partitioning) +- fourwf 9.813 50.3 15.861 53.1 23941 + +- fourwf%getghc 9.813 50.3 15.861 53.1 23941 + +- subtotal 9.813 50.3 15.861 53.1 + + Partitioning of prep_getghc +- prep_getghc 11.933 61.1 19.151 64.2 23941 + +- prep_getghc(before if) 0.305 1.6 0.452 1.5 23941 +- prep_getghc(bef. getghc) 0.009 0.0 0.018 0.1 444 +- prep_getghc(alltoall) 0.284 1.5 0.406 1.4 47882 +- prep_getghc(getghc - 1 ) 11.062 56.7 17.793 59.6 23497 +- prep_getghc(getghc - 3 ) 0.183 0.9 0.355 1.2 444 +- prep_getghc(getghc - 4 ) 0.019 0.1 0.035 0.1 444 +- (other) 0.062 0.3 0.083 0.3 -1 + +- subtotal 11.933 61.1 19.151 64.2 + + Partitioning of inwffil +- inwffil 0.036 0.2 0.061 0.2 2 + +- inwffil(call newkpt) 0.036 0.2 0.061 0.2 2 + +- subtotal 0.036 0.2 0.061 0.2 + + Partitioning of newkpt +- newkpt 0.035 0.2 0.061 0.2 2 + +- newkpt(call wfconv) 0.018 0.1 0.020 0.1 97 +- newkpt(after loop ) 0.015 0.1 0.039 0.1 2 + +- subtotal 0.034 0.2 0.060 0.2 + + Partitioning of fourdp (upwards partitioning) +- fourdp 0.008 0.0 0.008 0.0 6 + +- fourdp%(other) 0.008 0.0 0.008 0.0 6 + +- subtotal 0.008 0.0 0.008 0.0 + + Partitioning of afterscfloop +- afterscfloop 0.000 0.0 0.000 0.0 2 + + +- subtotal 0.000 0.0 0.000 0.0 + + Partitioning of outscfcv +- outscfcv 0.006 0.0 0.047 0.2 2 + +- outscfcv([PAW]prtden) 0.001 0.0 0.041 0.1 2 + +- subtotal 0.001 0.0 0.041 0.1 +- +-Synchronisation (=leave_test) and MPI calls +- communic.MPI 0.331 1.7 0.356 1.2 6 +- +- +- subtotal 0.000 0.0 0.000 0.0 + + Additional information +- timana(1) 0.000 0.0 0.000 0.0 2 +- total timab 2.911 14.9 2.946 9.9 1470420 +- fourwf 9.813 50.3 15.861 53.1 23941 +- status 0.001 0.0 0.001 0.0 46 +- nonlop(total) 1.148 5.9 1.911 6.4 23941 + + + Detailed analysis of some time consuming routines + tcpu ncalls tcpu/ncalls ndata tcpu/ncalls/ndata + (sec) (msec) (microsec) +- fourwf%(pot) 9.813 23941 0.410 12960 0.032 +- fourwf%(den) 0.000 0 +- fourdp 0.008 6 1.266 6480 0.195 +- nonlop(apply) 1.148 23941 0.048 888 0.054 +- nonlop(forces) 0.000 0 +- nonlop(forstr) 0.000 0 +- projbd 0.000 0 +- xc:pot/=fourdp 0.002 2 0.769 6480 0.119 + +================================================================================ + + Suggested references for the acknowledgment of ABINIT usage. + + The users of ABINIT have little formal obligations with respect to the ABINIT group + (those specified in the GNU General Public License, http://www.gnu.org/copyleft/gpl.txt). + However, it is common practice in the scientific literature, + to acknowledge the efforts of people that have made the research possible. + In this spirit, please find below suggested citations of work written by ABINIT developers, + corresponding to implementations inside of ABINIT that you have used in the present run. + Note also that it will be of great value to readers of publications presenting these results, + to read papers enabling them to understand the theoretical formalism and details + of the ABINIT implementation. + For information on why they are suggested, see also http://www.abinit.org/about/?text=acknowledgments. + + [1] Large scale ab initio calculations based on three levels of parallelization + F. Bottin, S. Leroux, A. Knyazev, G. Zerah, Comput. Mat. Science 42, 329, (2008). + Comment : in case paral_kgb is non-zero. Strong suggestion to cite this paper in your publications. + This paper is also available at http://www.arxiv.org/abs/0707.3405 + + [2] ABINIT : First-principles approach of materials and nanosystem properties. + X. Gonze, B. Amadon, P.-M. Anglade, J.-M. Beuken, F. Bottin, P. Boulanger, F. Bruneval, + D. Caliste, R. Caracas, M. Cote, T. Deutsch, L. Genovese, Ph. Ghosez, M. Giantomassi + S. Goedecker, D.R. Hamann, P. Hermet, F. Jollet, G. Jomard, S. Leroux, M. Mancini, S. Mazevet, + M.J.T. Oliveira, G. Onida, Y. Pouillon, T. Rangel, G.-M. Rignanese, D. Sangalli, R. Shaltaf, + M. Torrent, M.J. Verstraete, G. Zerah, J.W. Zwanziger + Computer Phys. Comm. 180, 2582-2615 (2009). + Comment : the third generic paper describing the ABINIT project. + Note that a version of this paper, that is not formatted for Computer Phys. Comm. + is available at http://www.abinit.org/about/ABINIT_CPC_v10.pdf . + The licence allows the authors to put it on the Web. + + [3] A brief introduction to the ABINIT software package. + X. Gonze, G.-M. Rignanese, M. Verstraete, J.-M. Beuken, Y. Pouillon, R. Caracas, F. Jollet, + M. Torrent, G. Zerah, M. Mikami, Ph. Ghosez, M. Veithen, J.-Y. Raty, V. Olevano, F. Bruneval, + L. Reining, R. Godby, G. Onida, D.R. Hamann, and D.C. Allan. + Z. Kristallogr. 220, 558-562 (2005). + Comment : the second generic paper describing the ABINIT project. Note that this paper + should be cited especially if you are using the GW part of ABINIT, as several authors + of this part are not in the list of authors of the first or third paper. + The .pdf of the latter paper is available at http://www.abinit.org/about/zfk_0505-06_558-562.pdf. + Note that it should not redistributed (Copyright by Oldenburg Wissenshaftverlag, + the licence allows the authors to put it on the Web). + + + And optionally : + + [4] First-principles computation of material properties : the ABINIT software project. + X. Gonze, J.-M. Beuken, R. Caracas, F. Detraux, M. Fuchs, G.-M. Rignanese, L. Sindic, + M. Verstraete, G. Zerah, F. Jollet, M. Torrent, A. Roy, M. Mikami, Ph. Ghosez, J.-Y. Raty, D.C. Allan. + Computational Materials Science 25, 478-492 (2002). http://dx.doi.org/10.1016/S0927-0256(02)00325-7 + Comment : the original paper describing the ABINIT project. + + [5] Fast radix 2, 3, 4 and 5 kernels for Fast Fourier Transformations + on computers with overlapping multiply-add instructions. + S. Goedecker, SIAM J. on Scientific Computing 18, 1605 (1997). +- +- Proc. 0 individual time (sec): cpu= 9.7 wall= 14.9 + +================================================================================ + + Calculation completed. +.Delivered 0 WARNINGs and 0 COMMENTs to log file. ++Overall time at end (sec) : cpu= 19.5 wall= 29.9 diff --git a/abipy/test_files/mgb2_nscf.log b/abipy/test_files/mgb2_nscf.log new file mode 100644 index 000000000..c4b0cb40d --- /dev/null +++ b/abipy/test_files/mgb2_nscf.log @@ -0,0 +1,845 @@ + ABINIT + + Give name for formatted input file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi + Give name for formatted output file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abo + Give root name for generic input files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in + Give root name for generic output files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out + Give root name for generic temporary files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/tmpdata/tmp + +.Version 7.11.5 of ABINIT +.(MPI version, prepared for a x86_64_darwin10.8.0_gnu4.7 computer) + +.Copyright (C) 1998-2015 ABINIT group . + ABINIT comes with ABSOLUTELY NO WARRANTY. + It is free software, and you are welcome to redistribute it + under certain conditions (GNU General Public License, + see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt). + + ABINIT is a project of the Universite Catholique de Louvain, + Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt . + Please read ~abinit/doc/users/acknowledgments.html for suggested + acknowledgments of the ABINIT effort. + For more information, see http://www.abinit.org . + +.Starting date : Fri 13 Mar 2015. +- ( at 20h08 ) + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + === Build Information === + Version : 7.11.5 + Build target : x86_64_darwin10.8.0_gnu4.7 + Build date : 20150309 + + === Compiler Suite === + C compiler : gnu4.7 + C++ compiler : gnu4.7 + Fortran compiler : gnu4.7 + CFLAGS : -g -O2 -mtune=native -march=native + CXXFLAGS : -g -O2 -mtune=native -march=native + FCFLAGS : -g -ffree-line-length-none + FC_LDFLAGS : + + === Optimizations === + Debug level : basic + Optimization level : standard + Architecture : unknown_unknown + + === Multicore === + Parallel build : yes + Parallel I/O : yes + openMP support : no + GPU support : no + + === Connectors / Fallbacks === + Connectors on : yes + Fallbacks on : yes + DFT flavor : libxc-fallback + FFT flavor : fftw3 + LINALG flavor : netlib-fallback + MATH flavor : none + TIMER flavor : abinit + TRIO flavor : netcdf-fallback+etsf_io-fallback + + === Experimental features === + Bindings : @enable_bindings@ + Exports : no + GW double-precision : yes + + === Bazaar branch information === + Branch ID : gmatteo@cenaero-20150309121815-5lbj8ihq15ffcsbb + Revision : 939 + Committed : 0 + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Default optimizations: + -O2 -mtune=native -march=native + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + CPP options activated during the build: + + CC_GNU CXX_GNU HAVE_BZR_BRANCH + + HAVE_CLIB HAVE_DFT_LIBXC HAVE_FC_ALLOCATABLE_DT... + + HAVE_FC_ASYNC HAVE_FC_COMMAND_ARGUMENT HAVE_FC_COMMAND_LINE + + HAVE_FC_CONTIGUOUS HAVE_FC_CPUTIME HAVE_FC_EXIT + + HAVE_FC_FLUSH HAVE_FC_GAMMA HAVE_FC_GETENV + + HAVE_FC_INT_QUAD HAVE_FC_IOMSG HAVE_FC_ISO_C_BINDING + + HAVE_FC_LONG_LINES HAVE_FC_MOVE_ALLOC HAVE_FC_PRIVATE + + HAVE_FC_PROTECTED HAVE_FC_STREAM_IO HAVE_FC_SYSTEM + + HAVE_FFT HAVE_FFT_FFTW3 HAVE_FFT_MPI + + HAVE_FFT_SERIAL HAVE_GW_DPC HAVE_LIBPAW_ABINIT + + HAVE_LINALG_ZDOTC_B*G HAVE_LINALG_ZDOTU_B*G HAVE_MPI + + HAVE_MPI2 HAVE_MPI_IALLREDUCE HAVE_MPI_IALLTOALL + + HAVE_MPI_IALLTOALLV HAVE_MPI_IO HAVE_MPI_TYPE_CREATE_S... + + HAVE_NUMPY HAVE_TIMER HAVE_TIMER_ABINIT + + HAVE_TIMER_MPI HAVE_TIMER_SERIAL HAVE_TRIO_ETSF_IO + + HAVE_TRIO_NETCDF USE_MACROAVE + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +- input file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi +- output file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abo +- root for input files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in +- root for output files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out + +-instrng : 73 lines of input have been read from file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/run.abi + + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 1 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 2 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc + read the values zionpsp= 2.0 , pspcod= 1 , lmax= 2 +nproj = 1 1 0 0 +nprojso = 0 0 0 + read the values zionpsp= 3.0 , pspcod= 1 , lmax= 1 +nproj = 1 0 0 0 +nprojso = 0 0 0 + + inpspheads: deduce mpsang = 3, n1xccc =2501. + + invars1m : enter jdtset=0 + invars1 : treat image number 1 + + symlatt : the Bravais lattice is hP (primitive hexagonal) + xred is defined in input file + ingeo : takes atomic coordinates from input array xred + + symlatt : the Bravais lattice is hP (primitive hexagonal) + + symlatt : the Bravais lattice is hP (primitive hexagonal) + symspgr : spgroup= 191 P6/m m m (=D6h^1) + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 7.5103208671638277E-002 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 9.9002139878206136E-002 7.5103208671638277E-002 5.7158912102896989E-002 7.5103208671638277E-002 + + mknormpath : total number of points on the path : 97 + + Number of divisions for each segment of the normalized path : + 0.00000 0.00000 0.00000 ==> 0.50000 0.00000 0.00000 ( ndiv : 10 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.00000 0.00000 0.00000 ( ndiv : 12 ) + 0.00000 0.00000 0.00000 ==> 0.00000 0.00000 0.50000 ( ndiv : 8 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.33333 0.33333 0.50000 ( ndiv : 6 ) + 0.33333 0.33333 0.50000 ==> 0.00000 0.00000 0.50000 ( ndiv : 12 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.50000 0.00000 0.00000 ( ndiv : 8 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.33333 0.33333 0.50000 ( ndiv : 8 ) + + + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 7.5103208671638277E-002 9.9002139878206136E-002 5.7158912102896989E-002 0.11431782420704921 9.9002139878206136E-002 7.5103208671638277E-002 5.7158912102896989E-002 7.5103208671638277E-002 + + mknormpath : total number of points on the path : 97 + + Number of divisions for each segment of the normalized path : + 0.00000 0.00000 0.00000 ==> 0.50000 0.00000 0.00000 ( ndiv : 10 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.00000 0.00000 0.00000 ( ndiv : 12 ) + 0.00000 0.00000 0.00000 ==> 0.00000 0.00000 0.50000 ( ndiv : 8 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.33333 0.33333 0.50000 ( ndiv : 6 ) + 0.33333 0.33333 0.50000 ==> 0.00000 0.00000 0.50000 ( ndiv : 12 ) + 0.00000 0.00000 0.50000 ==> 0.50000 0.00000 0.50000 ( ndiv : 10 ) + 0.50000 0.00000 0.50000 ==> 0.50000 0.00000 0.00000 ( ndiv : 8 ) + 0.50000 0.00000 0.00000 ==> 0.33333 0.33333 0.00000 ( ndiv : 6 ) + 0.33333 0.33333 0.00000 ==> 0.33333 0.33333 0.50000 ( ndiv : 8 ) + + + dtset%nelect= 8.0000000000000000 + chkneu : initialized the occupation numbers for occopt= 4 + spin-unpolarized case : + 2.00 2.00 2.00 2.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +npfft, npband, npspinor and npkpt: 1 1 1 2 + +--- !WARNING +src_file: distrb2.F90 +src_line: 113 +message: | + nkpt*nsppol (97) is not a multiple of nproc_kpt (2) + The k-point parallelisation is not efficient. +... + +mpi_setup: mkmem undefined in the input file.Use default mkmem = nkpt + mpi_setup: With nkpt_me=49 and mkmem = 97, ground state wf handled in core. + Resetting mkmem to nkpt_me to save memory space. +mpi_setup: mkqmem undefined in the input file.Use default mkqmem = nkpt + mpi_setup: With nkpt_me=49 and mkqmem = 97, ground state wf handled in core. + Resetting mkqmem to nkpt_me to save memory space. +mpi_setup: mk1mem undefined in the input file.Use default mk1mem = nkpt + mpi_setup: With nkpt_me=49 and mk1mem = 97, ground state wf handled in core. + Resetting mk1mem to nkpt_me to save memory space. + +--- !WARNING +src_file: mpi_setup.F90 +src_line: 692 +message: | + The number of KPT processors, npkpt, should be a multiple of nkpt*nsppol. + However, npkpt=2 and nkpt*nsppol=97 +... + + For input ecut= 1.000000E+01 best grid ngfft= 18 18 20 + max ecut= 1.113388E+01 + + ==== FFT mesh ==== + FFT mesh divisions ........................ 18 18 20 + Augmented FFT divisions ................... 19 19 20 + FFT algorithm ............................. 312 + FFT cache size ............................ 16 + getmpw: optimal value of mpw= 308 + + Symmetries : space group P6/m m m (#191); Bravais hP (primitive hexag.) + + getdim_nloc : deduce lmnmax = 4, lnmax = 2, + lmnmaxso= 4, lnmaxso= 2. +memory : analysis of memory needs +================================================================================ + Values of the parameters that define the memory need of the present run + intxc = 0 ionmov = 0 iscf = -2 xclevel = 1 + lmnmax = 2 lnmax = 2 mband = 11 mffmem = 1 +P mgfft = 20 mkmem = 49 mpssoang= 3 mpw = 308 + mqgrid = 3001 natom = 3 nfft = 6480 nkpt = 97 + nloalg = 4 nspden = 1 nspinor = 1 nsppol = 1 + nsym = 24 n1xccc = 2501 ntypat = 2 occopt = 4 +================================================================================ +P This job should need less than 5.739 Mbytes of memory. + Rough estimation (10% accuracy) of disk space for files : +_ WF disk file : 5.017 Mbytes ; DEN or POT disk file : 0.051 Mbytes. +================================================================================ + + Biggest array : cg(disk), with 2.5351 MBytes. + memana : allocated an array of 2.535 Mbytes, for testing purposes. + memana : allocated 5.739 Mbytes, for testing purposes. + The job will continue. +-------------------------------------------------------------------------------- +------------- Echo of variables that govern the present computation ------------ +-------------------------------------------------------------------------------- +- +- outvars: echo of selected default values +- accesswff0 = 0 , fftalg0 =312 , wfoptalg0 = 0 +- +- outvars: echo of global parameters not present in the input file +- max_nthreads = 0 +- + -outvars: echo values of preprocessed input variables -------- + + These variables are accessible in NetCDF format (/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_OUT.nc) + + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + irdden 1 + iscf -2 + istwfk 2 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 2 0 + 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 0 + outvar_i_n : Printing only first 50 k-points. + kpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 5.00000000E-02 0.00000000E+00 0.00000000E+00 + 1.00000000E-01 0.00000000E+00 0.00000000E+00 + 1.50000000E-01 0.00000000E+00 0.00000000E+00 + 2.00000000E-01 0.00000000E+00 0.00000000E+00 + 2.50000000E-01 0.00000000E+00 0.00000000E+00 + 3.00000000E-01 0.00000000E+00 0.00000000E+00 + 3.50000000E-01 0.00000000E+00 0.00000000E+00 + 4.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.50000000E-01 0.00000000E+00 0.00000000E+00 + 5.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.72222222E-01 5.55555555E-02 0.00000000E+00 + 4.44444444E-01 1.11111111E-01 0.00000000E+00 + 4.16666667E-01 1.66666667E-01 0.00000000E+00 + 3.88888889E-01 2.22222222E-01 0.00000000E+00 + 3.61111111E-01 2.77777778E-01 0.00000000E+00 + 3.33333333E-01 3.33333333E-01 0.00000000E+00 + 3.05555556E-01 3.05555556E-01 0.00000000E+00 + 2.77777778E-01 2.77777778E-01 0.00000000E+00 + 2.50000000E-01 2.50000000E-01 0.00000000E+00 + 2.22222222E-01 2.22222222E-01 0.00000000E+00 + 1.94444444E-01 1.94444444E-01 0.00000000E+00 + 1.66666667E-01 1.66666667E-01 0.00000000E+00 + 1.38888889E-01 1.38888889E-01 0.00000000E+00 + 1.11111111E-01 1.11111111E-01 0.00000000E+00 + 8.33333333E-02 8.33333333E-02 0.00000000E+00 + 5.55555555E-02 5.55555555E-02 0.00000000E+00 + 2.77777778E-02 2.77777778E-02 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.25000000E-01 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 2.50000000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 3.75000000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 0.00000000E+00 0.00000000E+00 5.00000000E-01 + 5.00000000E-02 0.00000000E+00 5.00000000E-01 + 1.00000000E-01 0.00000000E+00 5.00000000E-01 + 1.50000000E-01 0.00000000E+00 5.00000000E-01 + 2.00000000E-01 0.00000000E+00 5.00000000E-01 + 2.50000000E-01 0.00000000E+00 5.00000000E-01 + 3.00000000E-01 0.00000000E+00 5.00000000E-01 + 3.50000000E-01 0.00000000E+00 5.00000000E-01 + 4.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.50000000E-01 0.00000000E+00 5.00000000E-01 + 5.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.72222222E-01 5.55555555E-02 5.00000000E-01 + 4.44444444E-01 1.11111111E-01 5.00000000E-01 + 4.16666667E-01 1.66666667E-01 5.00000000E-01 + outvar_i_n : Printing only first 50 k-points. + kptopt -11 +P mkmem 49 + natom 3 + nband 11 + nbdbuf 2 + ngfft 18 18 20 + nkpt 97 +- npkpt 2 + nsym 24 + ntypat 2 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 5.00000000E-01 5.00000000E-01 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolwfr 1.00000000E-12 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + outvars : Printing only first 50 k-points. + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333330E-01 6.6666666670E-01 5.0000000000E-01 + 6.6666666670E-01 3.3333333330E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + chkinp: Checking input parameters for consistency. + DATA TYPE INFORMATION: + REAL: Data type name: REAL(DP) + Kind value: 8 + Precision: 15 + Smallest nonnegligible quantity relative to 1: 0.22204460E-15 + Smallest positive number: 0.22250739-307 + Largest representable number: 0.17976931+309 + INTEGER: Data type name: INTEGER(default) + Kind value: 4 + Bit size: 32 + Largest representable number: 2147483647 + LOGICAL: Data type name: LOGICAL + Kind value: 4 + CHARACTER: Data type name: CHARACTER Kind value: 1 + + ==== OpenMP parallelism is OFF ==== + + ==== Using MPI-2 specifications ==== + MPI-IO support is ON + xmpi_tag_ub ................ 2147483647 + xmpi_bsize_ch .............. 1 + xmpi_bsize_int ............. 4 + xmpi_bsize_sp .............. 4 + xmpi_bsize_dp .............. 8 + xmpi_bsize_spc ............. 8 + xmpi_bsize_dpc ............. 16 + xmpio_bsize_frm ............ 4 + xmpi_address_kind .......... 8 + xmpi_offset_kind ........... 8 + MPI_WTICK .................. 9.9999999999999995E-007 + +================================================================================ +== DATASET 1 ================================================================== +- nproc = 2 + + + getdim_nloc : deduce lmnmax = 4, lnmax = 2, + lmnmaxso= 4, lnmaxso= 2. + Exchange-correlation functional for the present dataset will be: + LDA: new Teter (4/93) with spin-polarized option - ixc=1 + Citation for XC functional: + S. Goedecker, M. Teter, J. Huetter, PRB 54, 1703 (1996) + + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + kpgio: loop on k-points done in parallel +- pspini: atom type 1 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- Troullier-Martins psp for element Mg Thu Oct 27 17:30:49 EDT 1994 +- 12.00000 2.00000 940714 znucl, zion, pspdat + 1 1 2 2 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 3.352 8.820 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 1.127 1.670 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2 0.000 0.000 0 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2.54196289048337 0.05499530377757 0.78827945413088 rchrg,fchrg,qchrg + pspatm: epsatm= -1.54393848 + --- l ekb(1:nproj) --> + 0 1.755924 + 1 0.853613 + pspatm: atomic psp has been read and splines computed + +- pspini: atom type 2 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- Troullier-Martins psp for element B Thu Oct 27 17:29:24 EDT 1994 +- 5.00000 3.00000 940714 znucl, zion, pspdat + 1 1 1 1 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 8.313 21.401 1 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 11.531 17.234 0 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1.10004537463277 0.35216853368804 0.40909985967175 rchrg,fchrg,qchrg + pspatm: epsatm= 0.59609267 + --- l ekb(1:nproj) --> + 0 3.906219 + pspatm: atomic psp has been read and splines computed + + -2.81402505E+00 ecore*ucvol(ha*bohr**3) + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 + 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 + wfconv: 11 bands initialized randomly with npw= 146, for ikpt= 1 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 2 + wfconv: 11 bands initialized randomly with npw= 299, for ikpt= 3 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 4 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 5 + wfconv: 11 bands initialized randomly with npw= 299, for ikpt= 6 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 7 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 8 + wfconv: 11 bands initialized randomly with npw= 301, for ikpt= 9 + wfconv: 11 bands initialized randomly with npw= 306, for ikpt= 10 + wfconv: 11 bands initialized randomly with npw= 300, for ikpt= 11 + wfconv: 11 bands initialized randomly with npw= 304, for ikpt= 12 + wfconv: 11 bands initialized randomly with npw= 302, for ikpt= 13 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 14 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 15 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 16 + wfconv: 11 bands initialized randomly with npw= 306, for ikpt= 17 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 18 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 19 + wfconv: 11 bands initialized randomly with npw= 288, for ikpt= 20 + wfconv: 11 bands initialized randomly with npw= 288, for ikpt= 21 + wfconv: 11 bands initialized randomly with npw= 292, for ikpt= 22 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 23 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 24 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 25 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 26 + wfconv: 11 bands initialized randomly with npw= 303, for ikpt= 27 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 28 + wfconv: 11 bands initialized randomly with npw= 146, for ikpt= 29 + wfconv: 11 bands initialized randomly with npw= 291, for ikpt= 30 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 31 + wfconv: 11 bands initialized randomly with npw= 291, for ikpt= 32 + wfconv: 11 bands initialized randomly with npw= 279, for ikpt= 33 + wfconv: 11 bands initialized randomly with npw= 274, for ikpt= 34 + wfconv: 11 bands initialized randomly with npw= 274, for ikpt= 35 + wfconv: 11 bands initialized randomly with npw= 280, for ikpt= 36 + wfconv: 11 bands initialized randomly with npw= 286, for ikpt= 37 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 38 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 39 + wfconv: 11 bands initialized randomly with npw= 290, for ikpt= 40 + wfconv: 11 bands initialized randomly with npw= 290, for ikpt= 41 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 42 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 43 + wfconv: 11 bands initialized randomly with npw= 302, for ikpt= 44 + wfconv: 11 bands initialized randomly with npw= 302, for ikpt= 45 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 46 + wfconv: 11 bands initialized randomly with npw= 300, for ikpt= 47 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 48 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 49 + + ioarr: reading density data +ioarr: file name is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in_DEN + +================================================================================ + + - hdr_check: checking restart file header for consistency - + + + current calculation restart file + ------------------- ------------ + + calculation expects a density | input file contains a density +. ABINIT code version 7.11.5 | ABINIT code version 7.11.5 +. date 20150313 bantot 1067 natom 3 | date 20150313 bantot 440 natom 3 + nkpt 97 nsym 24 ngfft 18, 18, 20 | nkpt 40 nsym 24 ngfft 18, 18, 20 + ntypat 2 ecut_eff 10.0000000 | ntypat 2 ecut_eff 10.0000000 + usepaw 0 | usepaw 0 + usewvl 0 | usewvl 0 + rprimd: | rprimd: + 5.0503959 2.9158474 0.0000000 | 5.0503959 2.9158474 0.0000000 + -5.0503959 2.9158474 0.0000000 | -5.0503959 2.9158474 0.0000000 + 0.0000000 0.0000000 6.6575052 | 0.0000000 0.0000000 6.6575052 + symafm: | symafm: + 1 1 1 1 1 1 1 1 1 1 1 1 | 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 | 1 1 1 1 1 1 1 1 1 1 1 1 + symrel: | symrel: + 1 0 0 0 1 0 0 0 1 | 1 0 0 0 1 0 0 0 1 + -1 0 0 0 -1 0 0 0 -1 | -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 | 0 1 0 1 0 0 0 0 1 + 0 -1 0 -1 0 0 0 0 -1 | 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 | 1 1 0 -1 0 0 0 0 1 + -1 -1 0 1 0 0 0 0 -1 | -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 | -1 0 0 1 1 0 0 0 1 + 1 0 0 -1 -1 0 0 0 -1 | 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 | 0 1 0 -1 -1 0 0 0 1 + 0 -1 0 1 1 0 0 0 -1 | 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 | -1 -1 0 0 1 0 0 0 1 + 1 1 0 0 -1 0 0 0 -1 | 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 | -1 0 0 0 -1 0 0 0 1 + 1 0 0 0 1 0 0 0 -1 | 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 | 0 -1 0 -1 0 0 0 0 1 + 0 1 0 1 0 0 0 0 -1 | 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 | -1 -1 0 1 0 0 0 0 1 + 1 1 0 -1 0 0 0 0 -1 | 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 | 1 0 0 -1 -1 0 0 0 1 + -1 0 0 1 1 0 0 0 -1 | -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 | 0 -1 0 1 1 0 0 0 1 + 0 1 0 -1 -1 0 0 0 -1 | 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 | 1 1 0 0 -1 0 0 0 1 + -1 -1 0 0 1 0 0 0 -1 | -1 -1 0 0 1 0 0 0 -1 + typat: | typat: + 1 2 2 | 1 2 2 + so_psp : | so_psp : + 1 1 | 1 1 + tnons: | tnons: + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + znucl: | znucl: + 12.00 5.00 | 12.00 5.00 + pseudopotential atom type 1: | pseudopotential atom type 1: + pspso 0 pspxc 1 | pspso 0 pspxc 1 + pspdat 940714 pspcod 1 zion 2.0 | pspdat 940714 pspcod 1 zion 2.0 + pseudopotential atom type 2: | pseudopotential atom type 2: + pspso 0 pspxc 1 | pspso 0 pspxc 1 + pspdat 940714 pspcod 1 zion 3.0 | pspdat 940714 pspcod 1 zion 3.0 + xred: | xred: + 0.0000000 0.0000000 0.0000000 | 0.0000000 0.0000000 0.0000000 + 0.3333333 0.6666667 0.5000000 | 0.3333333 0.6666667 0.5000000 + 0.6666667 0.3333333 0.5000000 | 0.6666667 0.3333333 0.5000000 + hdr_check: Density/Potential file is OK for restart of calculation +================================================================================ +ioarr: data read from disk file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/indata/in_DEN + +================================================================================ + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + vtorho : nnsclo_now= 30, note that nnsclo,dbl_nnsclo,istep= 0 0 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 + 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 + ioarr: writing density data +ioarr: file name is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_DEN +ioarr: data written to disk file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_DEN +================================================================================ + + ----iterations are completed or convergence reached---- + + + outwf: write wavefunction to file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_WFK, with accesswff 1 + outwf with iomode: 1, cpu: 0.23, wall: 0.27 + +== END DATASET(S) ============================================================== +================================================================================ + + -outvars: echo values of variables after computation -------- + + These variables are accessible in NetCDF format (/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t1/outdata/out_OUT.nc) + + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + irdden 1 + iscf -2 + istwfk 2 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 2 0 + 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 0 + outvar_i_n : Printing only first 50 k-points. + kpt 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 5.00000000E-02 0.00000000E+00 0.00000000E+00 + 1.00000000E-01 0.00000000E+00 0.00000000E+00 + 1.50000000E-01 0.00000000E+00 0.00000000E+00 + 2.00000000E-01 0.00000000E+00 0.00000000E+00 + 2.50000000E-01 0.00000000E+00 0.00000000E+00 + 3.00000000E-01 0.00000000E+00 0.00000000E+00 + 3.50000000E-01 0.00000000E+00 0.00000000E+00 + 4.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.50000000E-01 0.00000000E+00 0.00000000E+00 + 5.00000000E-01 0.00000000E+00 0.00000000E+00 + 4.72222222E-01 5.55555555E-02 0.00000000E+00 + 4.44444444E-01 1.11111111E-01 0.00000000E+00 + 4.16666667E-01 1.66666667E-01 0.00000000E+00 + 3.88888889E-01 2.22222222E-01 0.00000000E+00 + 3.61111111E-01 2.77777778E-01 0.00000000E+00 + 3.33333333E-01 3.33333333E-01 0.00000000E+00 + 3.05555556E-01 3.05555556E-01 0.00000000E+00 + 2.77777778E-01 2.77777778E-01 0.00000000E+00 + 2.50000000E-01 2.50000000E-01 0.00000000E+00 + 2.22222222E-01 2.22222222E-01 0.00000000E+00 + 1.94444444E-01 1.94444444E-01 0.00000000E+00 + 1.66666667E-01 1.66666667E-01 0.00000000E+00 + 1.38888889E-01 1.38888889E-01 0.00000000E+00 + 1.11111111E-01 1.11111111E-01 0.00000000E+00 + 8.33333333E-02 8.33333333E-02 0.00000000E+00 + 5.55555555E-02 5.55555555E-02 0.00000000E+00 + 2.77777778E-02 2.77777778E-02 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.25000000E-01 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 2.50000000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 3.75000000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 0.00000000E+00 0.00000000E+00 5.00000000E-01 + 5.00000000E-02 0.00000000E+00 5.00000000E-01 + 1.00000000E-01 0.00000000E+00 5.00000000E-01 + 1.50000000E-01 0.00000000E+00 5.00000000E-01 + 2.00000000E-01 0.00000000E+00 5.00000000E-01 + 2.50000000E-01 0.00000000E+00 5.00000000E-01 + 3.00000000E-01 0.00000000E+00 5.00000000E-01 + 3.50000000E-01 0.00000000E+00 5.00000000E-01 + 4.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.50000000E-01 0.00000000E+00 5.00000000E-01 + 5.00000000E-01 0.00000000E+00 5.00000000E-01 + 4.72222222E-01 5.55555555E-02 5.00000000E-01 + 4.44444444E-01 1.11111111E-01 5.00000000E-01 + 4.16666667E-01 1.66666667E-01 5.00000000E-01 + outvar_i_n : Printing only first 50 k-points. + kptopt -11 +P mkmem 49 + natom 3 + nband 11 + nbdbuf 2 + ngfft 18 18 20 + nkpt 97 +- npkpt 2 + nsym 24 + ntypat 2 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 5.00000000E-01 5.00000000E-01 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolwfr 1.00000000E-12 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + outvars : Printing only first 50 k-points. + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333333E-01 6.6666666667E-01 5.0000000000E-01 + 6.6666666667E-01 3.3333333333E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + +================================================================================ + + Suggested references for the acknowledgment of ABINIT usage. + + The users of ABINIT have little formal obligations with respect to the ABINIT group + (those specified in the GNU General Public License, http://www.gnu.org/copyleft/gpl.txt). + However, it is common practice in the scientific literature, + to acknowledge the efforts of people that have made the research possible. + In this spirit, please find below suggested citations of work written by ABINIT developers, + corresponding to implementations inside of ABINIT that you have used in the present run. + Note also that it will be of great value to readers of publications presenting these results, + to read papers enabling them to understand the theoretical formalism and details + of the ABINIT implementation. + For information on why they are suggested, see also http://www.abinit.org/about/?text=acknowledgments. + + [1] Large scale ab initio calculations based on three levels of parallelization + F. Bottin, S. Leroux, A. Knyazev, G. Zerah, Comput. Mat. Science 42, 329, (2008). + Comment : in case paral_kgb is non-zero. Strong suggestion to cite this paper in your publications. + This paper is also available at http://www.arxiv.org/abs/0707.3405 + + [2] ABINIT : First-principles approach of materials and nanosystem properties. + X. Gonze, B. Amadon, P.-M. Anglade, J.-M. Beuken, F. Bottin, P. Boulanger, F. Bruneval, + D. Caliste, R. Caracas, M. Cote, T. Deutsch, L. Genovese, Ph. Ghosez, M. Giantomassi + S. Goedecker, D.R. Hamann, P. Hermet, F. Jollet, G. Jomard, S. Leroux, M. Mancini, S. Mazevet, + M.J.T. Oliveira, G. Onida, Y. Pouillon, T. Rangel, G.-M. Rignanese, D. Sangalli, R. Shaltaf, + M. Torrent, M.J. Verstraete, G. Zerah, J.W. Zwanziger + Computer Phys. Comm. 180, 2582-2615 (2009). + Comment : the third generic paper describing the ABINIT project. + Note that a version of this paper, that is not formatted for Computer Phys. Comm. + is available at http://www.abinit.org/about/ABINIT_CPC_v10.pdf . + The licence allows the authors to put it on the Web. + + [3] A brief introduction to the ABINIT software package. + X. Gonze, G.-M. Rignanese, M. Verstraete, J.-M. Beuken, Y. Pouillon, R. Caracas, F. Jollet, + M. Torrent, G. Zerah, M. Mikami, Ph. Ghosez, M. Veithen, J.-Y. Raty, V. Olevano, F. Bruneval, + L. Reining, R. Godby, G. Onida, D.R. Hamann, and D.C. Allan. + Z. Kristallogr. 220, 558-562 (2005). + Comment : the second generic paper describing the ABINIT project. Note that this paper + should be cited especially if you are using the GW part of ABINIT, as several authors + of this part are not in the list of authors of the first or third paper. + The .pdf of the latter paper is available at http://www.abinit.org/about/zfk_0505-06_558-562.pdf. + Note that it should not redistributed (Copyright by Oldenburg Wissenshaftverlag, + the licence allows the authors to put it on the Web). + + + And optionally : + + [4] First-principles computation of material properties : the ABINIT software project. + X. Gonze, J.-M. Beuken, R. Caracas, F. Detraux, M. Fuchs, G.-M. Rignanese, L. Sindic, + M. Verstraete, G. Zerah, F. Jollet, M. Torrent, A. Roy, M. Mikami, Ph. Ghosez, J.-Y. Raty, D.C. Allan. + Computational Materials Science 25, 478-492 (2002). http://dx.doi.org/10.1016/S0927-0256(02)00325-7 + Comment : the original paper describing the ABINIT project. + + [5] Fast radix 2, 3, 4 and 5 kernels for Fast Fourier Transformations + on computers with overlapping multiply-add instructions. + S. Goedecker, SIAM J. on Scientific Computing 18, 1605 (1997). + Proc. 0 individual time (sec): cpu= 9.7 wall= 14.9 + + Calculation completed. +.Delivered 0 WARNINGs and 0 COMMENTs to log file. +--- !FinalSummary +start_datetime: Fri Mar 13 20:08:57 2015 +end_datetime: Fri Mar 13 20:09:12 2015 +overall_cpu_time: 19.5 +overall_wall_time: 29.9 +... diff --git a/abipy/test_files/mgb2_scf.abo b/abipy/test_files/mgb2_scf.abo new file mode 100644 index 000000000..c582de2a3 --- /dev/null +++ b/abipy/test_files/mgb2_scf.abo @@ -0,0 +1,1339 @@ + +.Version 7.11.5 of ABINIT +.(MPI version, prepared for a x86_64_darwin10.8.0_gnu4.7 computer) + +.Copyright (C) 1998-2015 ABINIT group . + ABINIT comes with ABSOLUTELY NO WARRANTY. + It is free software, and you are welcome to redistribute it + under certain conditions (GNU General Public License, + see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt). + + ABINIT is a project of the Universite Catholique de Louvain, + Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt . + Please read ~abinit/doc/users/acknowledgments.html for suggested + acknowledgments of the ABINIT effort. + For more information, see http://www.abinit.org . + +.Starting date : Fri 13 Mar 2015. +- ( at 20h08 ) + +- input file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abi +- output file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abo +- root for input files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/indata/in +- root for output files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out + + + Symmetries : space group P6/m m m (#191); Bravais hP (primitive hexag.) +================================================================================ + Values of the parameters that define the memory need of the present run + intxc = 0 ionmov = 0 iscf = 7 xclevel = 1 + lmnmax = 2 lnmax = 2 mband = 11 mffmem = 1 +P mgfft = 20 mkmem = 20 mpssoang= 3 mpw = 308 + mqgrid = 3001 natom = 3 nfft = 6480 nkpt = 40 + nloalg = 4 nspden = 1 nspinor = 1 nsppol = 1 + nsym = 24 n1xccc = 2501 ntypat = 2 occopt = 4 +================================================================================ +P This job should need less than 4.818 Mbytes of memory. + Rough estimation (10% accuracy) of disk space for files : +_ WF disk file : 2.070 Mbytes ; DEN or POT disk file : 0.051 Mbytes. +================================================================================ + +-------------------------------------------------------------------------------- +------------- Echo of variables that govern the present computation ------------ +-------------------------------------------------------------------------------- +- +- outvars: echo of selected default values +- accesswff0 = 0 , fftalg0 =312 , wfoptalg0 = 0 +- +- outvars: echo of global parameters not present in the input file +- max_nthreads = 0 +- + -outvars: echo values of preprocessed input variables -------- + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + kpt 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 0.00000000E+00 6.25000000E-02 + 2.50000000E-01 0.00000000E+00 6.25000000E-02 + 3.75000000E-01 0.00000000E+00 6.25000000E-02 + 5.00000000E-01 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 1.25000000E-01 6.25000000E-02 + 3.75000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 2.50000000E-01 6.25000000E-02 + 3.75000000E-01 2.50000000E-01 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 0.00000000E+00 1.87500000E-01 + 2.50000000E-01 0.00000000E+00 1.87500000E-01 + 3.75000000E-01 0.00000000E+00 1.87500000E-01 + 5.00000000E-01 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 1.25000000E-01 1.87500000E-01 + 3.75000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 2.50000000E-01 1.87500000E-01 + 3.75000000E-01 2.50000000E-01 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 0.00000000E+00 3.12500000E-01 + 2.50000000E-01 0.00000000E+00 3.12500000E-01 + 3.75000000E-01 0.00000000E+00 3.12500000E-01 + 5.00000000E-01 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 1.25000000E-01 3.12500000E-01 + 3.75000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 2.50000000E-01 3.12500000E-01 + 3.75000000E-01 2.50000000E-01 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 0.00000000E+00 4.37500000E-01 + 2.50000000E-01 0.00000000E+00 4.37500000E-01 + 3.75000000E-01 0.00000000E+00 4.37500000E-01 + 5.00000000E-01 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 1.25000000E-01 4.37500000E-01 + 3.75000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 2.50000000E-01 4.37500000E-01 + 3.75000000E-01 2.50000000E-01 4.37500000E-01 + kptrlatt 8 0 0 0 8 0 0 0 8 + kptrlen 4.66535588E+01 +P mkmem 20 + natom 3 + nband 11 + ngfft 18 18 20 + nkpt 40 +- npkpt 2 + nsym 24 + ntypat 2 + occ 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 0.00000000E+00 0.00000000E+00 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolvrs 1.00000000E-06 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + wtk 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 0.00391 0.02344 + 0.02344 0.02344 0.01172 0.02344 0.04688 0.04688 + 0.02344 0.02344 0.00391 0.02344 0.02344 0.02344 + 0.01172 0.02344 0.04688 0.04688 0.02344 0.02344 + 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333330E-01 6.6666666670E-01 5.0000000000E-01 + 6.6666666670E-01 3.3333333330E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + chkinp: Checking input parameters for consistency. + +================================================================================ +== DATASET 1 ================================================================== +- nproc = 2 + + Exchange-correlation functional for the present dataset will be: + LDA: new Teter (4/93) with spin-polarized option - ixc=1 + Citation for XC functional: + S. Goedecker, M. Teter, J. Huetter, PRB 54, 1703 (1996) + + Real(R)+Recip(G) space primitive vectors, cartesian coordinates (Bohr,Bohr^-1): + R(1)= 5.0503959 2.9158474 0.0000000 G(1)= 0.0990021 0.1714767 0.0000000 + R(2)= -5.0503959 2.9158474 0.0000000 G(2)= -0.0990021 0.1714767 0.0000000 + R(3)= 0.0000000 0.0000000 6.6575052 G(3)= 0.0000000 0.0000000 0.1502064 + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + +--- Pseudopotential description ------------------------------------------------ +- pspini: atom type 1 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- Troullier-Martins psp for element Mg Thu Oct 27 17:30:49 EDT 1994 +- 12.00000 2.00000 940714 znucl, zion, pspdat + 1 1 2 2 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 3.352 8.820 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 1.127 1.670 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2 0.000 0.000 0 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2.54196289048337 0.05499530377757 0.78827945413088 rchrg,fchrg,qchrg + pspatm: epsatm= -1.54393848 + --- l ekb(1:nproj) --> + 0 1.755924 + 1 0.853613 + pspatm: atomic psp has been read and splines computed + +- pspini: atom type 2 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- Troullier-Martins psp for element B Thu Oct 27 17:29:24 EDT 1994 +- 5.00000 3.00000 940714 znucl, zion, pspdat + 1 1 1 1 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 8.313 21.401 1 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 11.531 17.234 0 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1.10004537463277 0.35216853368804 0.40909985967175 rchrg,fchrg,qchrg + pspatm: epsatm= 0.59609267 + --- l ekb(1:nproj) --> + 0 3.906219 + pspatm: atomic psp has been read and splines computed + + -2.81402505E+00 ecore*ucvol(ha*bohr**3) +-------------------------------------------------------------------------------- + +P newkpt: treating 11 bands with npw= 291 for ikpt= 1 by node 0 +P newkpt: treating 11 bands with npw= 300 for ikpt= 2 by node 0 +P newkpt: treating 11 bands with npw= 295 for ikpt= 3 by node 0 +P newkpt: treating 11 bands with npw= 301 for ikpt= 4 by node 0 +P newkpt: treating 11 bands with npw= 308 for ikpt= 5 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 6 by node 0 +P newkpt: treating 11 bands with npw= 293 for ikpt= 7 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 8 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 9 by node 0 +P newkpt: treating 11 bands with npw= 297 for ikpt= 10 by node 0 +P newkpt: treating 11 bands with npw= 291 for ikpt= 11 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 12 by node 0 +P newkpt: treating 11 bands with npw= 296 for ikpt= 13 by node 0 +P newkpt: treating 11 bands with npw= 295 for ikpt= 14 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 15 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 16 by node 0 +P newkpt: treating 11 bands with npw= 295 for ikpt= 17 by node 0 +P newkpt: treating 11 bands with npw= 294 for ikpt= 18 by node 0 +P newkpt: treating 11 bands with npw= 298 for ikpt= 19 by node 0 +P newkpt: treating 11 bands with npw= 303 for ikpt= 20 by node 0 +P newkpt: treating 11 bands with npw= 274 for ikpt= 21 by node 1 +P newkpt: treating 11 bands with npw= 293 for ikpt= 22 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 23 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 24 by node 1 +P newkpt: treating 11 bands with npw= 300 for ikpt= 25 by node 1 +P newkpt: treating 11 bands with npw= 292 for ikpt= 26 by node 1 +P newkpt: treating 11 bands with npw= 295 for ikpt= 27 by node 1 +P newkpt: treating 11 bands with npw= 297 for ikpt= 28 by node 1 +P newkpt: treating 11 bands with npw= 298 for ikpt= 29 by node 1 +P newkpt: treating 11 bands with npw= 297 for ikpt= 30 by node 1 +P newkpt: treating 11 bands with npw= 280 for ikpt= 31 by node 1 +P newkpt: treating 11 bands with npw= 291 for ikpt= 32 by node 1 +P newkpt: treating 11 bands with npw= 297 for ikpt= 33 by node 1 +P newkpt: treating 11 bands with npw= 301 for ikpt= 34 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 35 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 36 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 37 by node 1 +P newkpt: treating 11 bands with npw= 295 for ikpt= 38 by node 1 +P newkpt: treating 11 bands with npw= 297 for ikpt= 39 by node 1 +P newkpt: treating 11 bands with npw= 296 for ikpt= 40 by node 1 + +_setup2: Arith. and geom. avg. npw (full set) are 296.047 296.029 + +================================================================================ + + iter Etot(hartree) deltaE(h) residm vres2 + ETOT 1 -7.0250417290754 -7.025E+00 2.430E-03 1.769E+02 + ETOT 2 -7.1467059890187 -1.217E-01 2.672E-04 7.920E-01 + ETOT 3 -7.1475123730445 -8.064E-04 1.155E-04 1.570E-01 + ETOT 4 -7.1476179372442 -1.056E-04 6.147E-05 4.259E-03 + ETOT 5 -7.1476240932598 -6.156E-06 1.241E-04 4.150E-05 + ETOT 6 -7.1476241568657 -6.361E-08 2.681E-05 3.879E-08 + + At SCF step 6 vres2 = 3.88E-08 < tolvrs= 1.00E-06 =>converged. + + Cartesian components of stress tensor (hartree/bohr^3) + sigma(1 1)= 6.19525691E-04 sigma(3 2)= 0.00000000E+00 + sigma(2 2)= 6.19525691E-04 sigma(3 1)= 0.00000000E+00 + sigma(3 3)= 5.35534283E-04 sigma(2 1)= 0.00000000E+00 + +================================================================================ + + ----iterations are completed or convergence reached---- + + Mean square residual over all n,k,spin= 7.1021E-08; max= 2.6812E-05 + 0.0000 0.0000 0.0625 1 5.96369E-12 kpt; spin; max resid(k); each band: + 2.37E-14 5.15E-14 1.58E-17 1.19E-17 2.00E-15 1.02E-16 1.33E-16 3.37E-14 + 3.94E-15 9.41E-14 5.96E-12 + 0.1250 0.0000 0.0625 1 3.63751E-10 kpt; spin; max resid(k); each band: + 2.72E-14 6.10E-14 3.29E-13 1.65E-14 7.16E-13 5.45E-13 1.81E-14 3.20E-13 + 1.52E-13 1.11E-11 3.64E-10 + 0.2500 0.0000 0.0625 1 1.45769E-07 kpt; spin; max resid(k); each band: + 5.50E-14 5.41E-13 5.24E-13 1.88E-14 5.10E-12 1.39E-12 1.69E-12 2.19E-12 + 7.67E-13 3.61E-11 1.46E-07 + 0.3750 0.0000 0.0625 1 9.70839E-11 kpt; spin; max resid(k); each band: + 1.64E-13 1.56E-13 3.85E-15 1.37E-13 3.43E-11 3.85E-11 3.75E-11 9.44E-13 + 2.20E-12 8.82E-11 9.71E-11 + 0.5000 0.0000 0.0625 1 1.29381E-06 kpt; spin; max resid(k); each band: + 1.58E-14 5.28E-14 1.82E-17 7.79E-14 6.33E-13 5.90E-13 3.86E-14 3.85E-13 + 4.07E-12 1.15E-11 1.29E-06 + 0.1250 0.1250 0.0625 1 4.31287E-09 kpt; spin; max resid(k); each band: + 4.12E-14 3.15E-13 1.14E-14 4.22E-13 1.13E-12 2.42E-13 1.97E-12 2.77E-13 + 1.69E-12 4.71E-12 4.31E-09 + 0.2500 0.1250 0.0625 1 3.25092E-11 kpt; spin; max resid(k); each band: + 4.52E-14 7.47E-14 7.94E-13 6.52E-13 5.49E-12 2.30E-12 1.69E-12 5.03E-12 + 3.79E-12 6.58E-12 3.25E-11 + 0.3750 0.1250 0.0625 1 7.02345E-11 kpt; spin; max resid(k); each band: + 2.67E-13 2.60E-13 2.04E-13 1.58E-13 1.41E-12 7.02E-11 4.48E-11 2.42E-12 + 1.77E-12 2.36E-11 3.05E-11 + 0.2500 0.2500 0.0625 1 3.03021E-11 kpt; spin; max resid(k); each band: + 2.05E-13 9.75E-15 1.79E-13 1.46E-13 5.34E-13 1.99E-12 7.12E-13 3.03E-11 + 7.73E-12 5.11E-13 1.49E-11 + 0.3750 0.2500 0.0625 1 5.16143E-11 kpt; spin; max resid(k); each band: + 1.59E-14 4.01E-13 2.74E-13 1.22E-13 3.34E-13 6.41E-14 1.63E-11 1.23E-11 + 9.07E-12 7.68E-12 5.16E-11 + 0.0000 0.0000 0.1875 1 1.69186E-12 kpt; spin; max resid(k); each band: + 1.17E-13 1.12E-14 4.07E-17 4.64E-17 4.57E-15 3.51E-16 3.50E-16 2.35E-13 + 6.22E-15 1.69E-12 9.31E-13 + 0.1250 0.0000 0.1875 1 5.99964E-09 kpt; spin; max resid(k); each band: + 1.17E-13 2.90E-14 8.92E-14 1.48E-15 6.78E-12 2.96E-12 6.58E-14 1.24E-12 + 2.58E-13 6.00E-09 2.07E-09 + 0.2500 0.0000 0.1875 1 6.97104E-11 kpt; spin; max resid(k); each band: + 1.38E-13 2.54E-11 1.17E-11 1.91E-14 6.97E-11 2.13E-11 3.03E-11 1.58E-11 + 2.20E-11 1.27E-12 1.42E-11 + 0.3750 0.0000 0.1875 1 2.11303E-11 kpt; spin; max resid(k); each band: + 1.80E-13 1.60E-13 1.71E-13 2.46E-15 6.69E-13 1.17E-12 9.34E-13 1.63E-12 + 2.55E-12 1.01E-12 2.11E-11 + 0.5000 0.0000 0.1875 1 2.14727E-10 kpt; spin; max resid(k); each band: + 1.76E-13 1.42E-13 4.90E-17 9.67E-14 3.35E-13 1.38E-12 6.95E-14 7.80E-13 + 1.08E-14 2.87E-13 2.15E-10 + 0.1250 0.1250 0.1875 1 1.44107E-11 kpt; spin; max resid(k); each band: + 1.18E-13 1.06E-13 9.59E-14 1.05E-13 1.44E-11 4.32E-13 2.88E-12 3.07E-13 + 8.45E-13 5.54E-12 1.42E-11 + 0.2500 0.1250 0.1875 1 1.03191E-10 kpt; spin; max resid(k); each band: + 1.54E-13 1.30E-12 6.22E-11 2.35E-11 1.10E-12 1.03E-10 5.35E-11 6.06E-11 + 5.15E-11 1.09E-11 9.76E-11 + 0.3750 0.1250 0.1875 1 4.95018E-11 kpt; spin; max resid(k); each band: + 2.85E-13 2.85E-13 1.21E-12 7.06E-13 4.19E-13 6.54E-12 7.76E-12 7.11E-12 + 4.28E-12 4.95E-11 3.41E-11 + 0.2500 0.2500 0.1875 1 1.90193E-11 kpt; spin; max resid(k); each band: + 1.62E-13 1.75E-13 3.07E-13 2.83E-13 1.94E-13 1.82E-11 1.90E-11 1.51E-12 + 2.34E-12 8.21E-13 9.36E-12 + 0.3750 0.2500 0.1875 1 1.65242E-11 kpt; spin; max resid(k); each band: + 2.42E-13 4.54E-13 3.86E-13 1.37E-13 2.95E-13 1.04E-12 2.20E-13 1.65E-11 + 4.87E-12 1.11E-11 4.22E-12 + 0.0000 0.0000 0.3125 1 2.96226E-06 kpt; spin; max resid(k); each band: + 1.14E-12 2.01E-14 5.89E-17 5.15E-17 2.44E-15 2.44E-15 6.14E-14 1.26E-13 + 2.47E-14 1.65E-13 2.96E-06 + 0.1250 0.0000 0.3125 1 3.59044E-11 kpt; spin; max resid(k); each band: + 7.31E-13 1.45E-14 1.05E-13 2.94E-14 3.59E-11 1.13E-11 2.10E-11 1.58E-13 + 1.76E-12 1.09E-13 1.07E-11 + 0.2500 0.0000 0.3125 1 3.70228E-10 kpt; spin; max resid(k); each band: + 6.26E-13 1.86E-13 2.84E-13 8.08E-15 1.81E-12 1.55E-12 6.01E-13 3.70E-10 + 2.19E-10 3.35E-11 3.83E-11 + 0.3750 0.0000 0.3125 1 4.02586E-12 kpt; spin; max resid(k); each band: + 7.95E-13 2.43E-12 1.08E-12 4.69E-15 4.98E-13 1.83E-12 3.25E-12 9.61E-14 + 1.54E-12 4.03E-12 2.66E-12 + 0.5000 0.0000 0.3125 1 3.62805E-09 kpt; spin; max resid(k); each band: + 6.65E-13 1.37E-13 9.71E-14 1.63E-16 9.02E-14 2.01E-12 1.44E-12 8.15E-16 + 2.60E-13 1.15E-12 3.63E-09 + 0.1250 0.1250 0.3125 1 2.87842E-11 kpt; spin; max resid(k); each band: + 1.91E-13 2.63E-14 1.75E-13 6.38E-14 1.61E-13 2.88E-11 1.91E-11 1.85E-13 + 2.49E-12 1.80E-11 2.97E-12 + 0.2500 0.1250 0.3125 1 2.31871E-10 kpt; spin; max resid(k); each band: + 7.57E-13 2.32E-10 7.29E-11 1.50E-13 4.88E-12 1.59E-10 1.73E-10 4.88E-11 + 3.69E-11 2.71E-11 6.92E-11 + 0.3750 0.1250 0.3125 1 2.44245E-10 kpt; spin; max resid(k); each band: + 8.13E-13 5.74E-13 2.44E-10 1.57E-10 3.08E-12 1.65E-10 8.84E-11 2.64E-11 + 3.64E-11 4.49E-11 4.85E-11 + 0.2500 0.2500 0.3125 1 1.73465E-10 kpt; spin; max resid(k); each band: + 6.62E-13 4.33E-13 8.54E-12 3.96E-12 1.20E-13 4.58E-13 4.87E-11 8.18E-13 + 1.49E-11 9.57E-13 1.73E-10 + 0.3750 0.2500 0.3125 1 2.17977E-11 kpt; spin; max resid(k); each band: + 5.63E-13 6.87E-13 7.41E-13 1.10E-13 4.20E-13 2.09E-13 1.22E-12 4.34E-12 + 2.18E-11 1.18E-11 2.23E-12 + 0.0000 0.0000 0.4375 1 5.15496E-13 kpt; spin; max resid(k); each band: + 5.15E-13 4.59E-14 4.35E-17 4.34E-17 2.09E-15 2.08E-15 1.98E-14 2.91E-13 + 6.34E-15 4.88E-14 1.65E-13 + 0.1250 0.0000 0.4375 1 1.69940E-11 kpt; spin; max resid(k); each band: + 6.95E-13 5.14E-14 6.59E-14 3.92E-14 1.70E-11 9.96E-12 6.07E-14 2.37E-12 + 1.50E-12 2.41E-14 1.71E-12 + 0.2500 0.0000 0.4375 1 9.16417E-12 kpt; spin; max resid(k); each band: + 8.00E-13 9.27E-14 9.06E-14 3.06E-15 3.59E-13 6.15E-13 8.01E-12 8.41E-12 + 9.16E-12 7.86E-12 6.81E-12 + 0.3750 0.0000 0.4375 1 2.24546E-11 kpt; spin; max resid(k); each band: + 5.95E-13 6.86E-12 4.75E-12 1.81E-15 3.47E-13 1.47E-12 1.12E-12 2.37E-15 + 3.24E-12 2.25E-11 7.08E-12 + 0.5000 0.0000 0.4375 1 2.68120E-05 kpt; spin; max resid(k); each band: + 5.77E-13 1.53E-13 1.53E-13 1.44E-16 6.92E-14 1.76E-12 6.09E-13 5.47E-16 + 2.29E-12 1.17E-08 2.68E-05 + 0.1250 0.1250 0.4375 1 8.68701E-12 kpt; spin; max resid(k); each band: + 7.64E-13 6.71E-14 5.19E-14 6.44E-14 3.70E-14 8.59E-12 8.69E-12 1.03E-13 + 3.46E-12 7.35E-12 4.98E-12 + 0.2500 0.1250 0.4375 1 1.00247E-09 kpt; spin; max resid(k); each band: + 6.36E-13 2.74E-13 3.34E-13 6.95E-14 2.39E-13 4.20E-10 1.53E-10 1.06E-11 + 1.10E-11 3.96E-11 1.00E-09 + 0.3750 0.1250 0.4375 1 1.82133E-10 kpt; spin; max resid(k); each band: + 5.29E-13 3.92E-13 8.18E-13 6.43E-13 3.80E-13 3.52E-11 1.28E-11 1.19E-11 + 4.35E-11 3.04E-11 1.82E-10 + 0.2500 0.2500 0.4375 1 2.08713E-10 kpt; spin; max resid(k); each band: + 4.52E-13 2.44E-13 1.00E-10 8.05E-11 5.81E-14 7.56E-13 5.79E-12 1.21E-13 + 3.58E-11 4.26E-12 2.09E-10 + 0.3750 0.2500 0.4375 1 4.80286E-11 kpt; spin; max resid(k); each band: + 5.06E-13 3.69E-13 3.19E-13 1.21E-13 3.81E-13 9.93E-14 1.13E-12 4.80E-11 + 3.63E-11 2.28E-11 1.60E-11 + reduced coordinates (array xred) for 3 atoms + 0.000000000000 0.000000000000 0.000000000000 + 0.333333333333 0.666666666667 0.500000000000 + 0.666666666667 0.333333333333 0.500000000000 + rms dE/dt= 1.2307E-27; max dE/dt= 1.6156E-27; dE/dt below (all hartree) + 1 0.000000000000 0.000000000000 0.000000000000 + 2 0.000000000000 -0.000000000000 0.000000000000 + 3 0.000000000000 0.000000000000 0.000000000000 + + cartesian coordinates (angstrom) at end: + 1 0.00000000000000 0.00000000000000 0.00000000000000 + 2 -0.89085146584847 1.54300000082417 1.76150000096413 + 3 0.89085146584847 1.54300000082417 1.76150000096413 + + cartesian forces (hartree/bohr) at end: + 1 0.00000000000000 0.00000000000000 -0.00000000000000 + 2 -0.00000000000000 0.00000000000000 -0.00000000000000 + 3 0.00000000000000 -0.00000000000000 -0.00000000000000 + frms,max,avg= 2.0001549E-28 3.6938081E-28 0.000E+00 0.000E+00 0.000E+00 h/b + + cartesian forces (eV/Angstrom) at end: + 1 0.00000000000000 0.00000000000000 -0.00000000000000 + 2 -0.00000000000000 0.00000000000000 -0.00000000000000 + 3 0.00000000000000 -0.00000000000000 -0.00000000000000 + frms,max,avg= 1.0285209E-26 1.8994323E-26 0.000E+00 0.000E+00 0.000E+00 e/A + length scales= 1.000000000000 1.000000000000 1.000000000000 bohr + = 0.529177208590 0.529177208590 0.529177208590 angstroms + prteigrs : about to open file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_EIG + Fermi (or HOMO) energy (hartree) = 0.27984 Average Vxc (hartree)= -0.39656 + Eigenvalues (hartree) for nkpt= 40 k points: + kpt# 1, nband= 11, wtk= 0.00391, kpt= 0.0000 0.0000 0.0625 (reduced coord) + -0.17877 0.16055 0.29852 0.29852 0.35010 0.51038 0.51038 0.57387 + 0.65026 0.73021 0.85689 + occupation numbers for kpt# 1 + 2.00000 2.00000 0.11585 0.11585 0.00202 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 2, nband= 11, wtk= 0.02344, kpt= 0.1250 0.0000 0.0625 (reduced coord) + -0.16878 0.17037 0.24841 0.27514 0.35901 0.50014 0.55211 0.58865 + 0.62146 0.77968 0.81109 + occupation numbers for kpt# 2 + 2.00000 2.00001 2.12218 1.11397 0.00072 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 3, nband= 11, wtk= 0.02344, kpt= 0.2500 0.0000 0.0625 (reduced coord) + -0.13905 0.15612 0.20003 0.23820 0.38506 0.47220 0.52363 0.62856 + 0.64698 0.76656 0.78383 + occupation numbers for kpt# 3 + 2.00000 2.00000 2.00286 2.13047 0.00001 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 4, nband= 11, wtk= 0.02344, kpt= 0.3750 0.0000 0.0625 (reduced coord) + -0.09058 0.06196 0.21097 0.24488 0.41142 0.43735 0.46243 0.58449 + 0.73737 0.73767 0.77765 + occupation numbers for kpt# 4 + 2.00000 2.00000 2.01330 2.13988 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 5, nband= 11, wtk= 0.01172, kpt= 0.5000 0.0000 0.0625 (reduced coord) + -0.03554 -0.00947 0.20126 0.27999 0.37676 0.42764 0.48290 0.54094 + 0.72611 0.73974 0.82552 + occupation numbers for kpt# 5 + 2.00000 2.00000 2.00346 0.83230 0.00004 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 6, nband= 11, wtk= 0.02344, kpt= 0.1250 0.1250 0.0625 (reduced coord) + -0.14896 0.18992 0.19416 0.22783 0.37866 0.51958 0.53922 0.56634 + 0.65779 0.74054 0.80200 + occupation numbers for kpt# 6 + 2.00000 2.00053 2.00111 2.07364 0.00003 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 7, nband= 11, wtk= 0.04688, kpt= 0.2500 0.1250 0.0625 (reduced coord) + -0.10983 0.11140 0.18374 0.22854 0.41520 0.46740 0.50763 0.59141 + 0.68011 0.68686 0.77681 + occupation numbers for kpt# 7 + 2.00000 2.00000 2.00017 2.07760 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 8, nband= 11, wtk= 0.04688, kpt= 0.3750 0.1250 0.0625 (reduced coord) + -0.05348 0.02573 0.16336 0.27618 0.39206 0.46059 0.49020 0.55933 + 0.65229 0.74168 0.78595 + occupation numbers for kpt# 8 + 2.00000 2.00000 2.00000 1.05261 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 9, nband= 11, wtk= 0.02344, kpt= 0.2500 0.2500 0.0625 (reduced coord) + -0.06234 0.06969 0.11220 0.27253 0.40802 0.46069 0.54842 0.57174 + 0.62338 0.68865 0.73018 + occupation numbers for kpt# 9 + 2.00000 2.00000 2.00000 1.26730 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 10, nband= 11, wtk= 0.02344, kpt= 0.3750 0.2500 0.0625 (reduced coord) + -0.00897 0.01401 0.08983 0.31327 0.36163 0.50209 0.51967 0.56484 + 0.61897 0.70563 0.76335 + occupation numbers for kpt# 10 + 2.00000 2.00000 2.00000 0.00154 0.00051 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 11, nband= 11, wtk= 0.00391, kpt= 0.0000 0.0000 0.1875 (reduced coord) + -0.16911 0.10587 0.30179 0.30179 0.42903 0.51402 0.51402 0.57364 + 0.64406 0.73964 0.79936 + occupation numbers for kpt# 11 + 2.00000 2.00000 0.06567 0.06567 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 12, nband= 11, wtk= 0.02344, kpt= 0.1250 0.0000 0.1875 (reduced coord) + -0.15927 0.11594 0.25341 0.27884 0.43601 0.50648 0.55659 0.55924 + 0.63936 0.75974 0.76398 + occupation numbers for kpt# 12 + 2.00000 2.00000 2.05622 0.89765 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 13, nband= 11, wtk= 0.02344, kpt= 0.2500 0.0000 0.1875 (reduced coord) + -0.13000 0.14563 0.16237 0.24134 0.44569 0.47665 0.49574 0.65063 + 0.66918 0.71691 0.72608 + occupation numbers for kpt# 13 + 2.00000 2.00000 2.00000 2.14017 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 14, nband= 11, wtk= 0.02344, kpt= 0.3750 0.0000 0.1875 (reduced coord) + -0.08211 0.06888 0.19409 0.21434 0.37401 0.45357 0.51737 0.64047 + 0.68353 0.71178 0.77251 + occupation numbers for kpt# 14 + 2.00000 2.00000 2.00109 2.02000 0.00007 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 15, nband= 11, wtk= 0.01172, kpt= 0.5000 0.0000 0.1875 (reduced coord) + -0.02769 -0.00160 0.20471 0.23402 0.31869 0.44633 0.55291 0.60150 + 0.67505 0.70017 0.84897 + occupation numbers for kpt# 15 + 2.00000 2.00000 2.00574 2.10939 0.00040 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 16, nband= 11, wtk= 0.02344, kpt= 0.1250 0.1250 0.1875 (reduced coord) + -0.13971 0.13613 0.19922 0.23234 0.45369 0.49779 0.52719 0.57714 + 0.67670 0.68511 0.79003 + occupation numbers for kpt# 16 + 2.00000 2.00000 2.00252 2.09967 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 17, nband= 11, wtk= 0.04688, kpt= 0.2500 0.1250 0.1875 (reduced coord) + -0.10103 0.11727 0.17463 0.18963 0.41561 0.48636 0.52078 0.60911 + 0.64220 0.71058 0.81109 + occupation numbers for kpt# 17 + 2.00000 2.00000 2.00003 2.00050 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 18, nband= 11, wtk= 0.04688, kpt= 0.3750 0.1250 0.1875 (reduced coord) + -0.04526 0.03297 0.16805 0.22747 0.33790 0.49371 0.54156 0.57985 + 0.64150 0.76149 0.80147 + occupation numbers for kpt# 18 + 2.00000 2.00000 2.00001 2.07168 0.00478 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 19, nband= 11, wtk= 0.02344, kpt= 0.2500 0.2500 0.1875 (reduced coord) + -0.05416 0.07641 0.11709 0.22231 0.35760 0.51951 0.53567 0.60242 + 0.62143 0.70777 0.80050 + occupation numbers for kpt# 19 + 2.00000 2.00000 2.00000 2.04621 0.00087 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 20, nband= 11, wtk= 0.02344, kpt= 0.3750 0.2500 0.1875 (reduced coord) + -0.00151 0.02131 0.09557 0.26467 0.31029 0.50175 0.57118 0.57882 + 0.64724 0.74796 0.76760 + occupation numbers for kpt# 20 + 2.00000 2.00000 2.00000 1.68616 0.00693 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 21, nband= 11, wtk= 0.00391, kpt= 0.0000 0.0000 0.3125 (reduced coord) + -0.15200 0.04870 0.30870 0.30870 0.52086 0.52086 0.53144 0.57536 + 0.64163 0.74934 0.74940 + occupation numbers for kpt# 21 + 2.00000 2.00000 0.01214 0.01214 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 22, nband= 11, wtk= 0.02344, kpt= 0.1250 0.0000 0.3125 (reduced coord) + -0.14269 0.05926 0.26026 0.28445 0.50641 0.53051 0.54532 0.56254 + 0.65284 0.71008 0.72771 + occupation numbers for kpt# 22 + 2.00000 2.00000 1.86905 0.59532 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 23, nband= 11, wtk= 0.02344, kpt= 0.2500 0.0000 0.3125 (reduced coord) + -0.11410 0.09111 0.17062 0.24611 0.42500 0.49097 0.56965 0.65376 + 0.67077 0.67739 0.71153 + occupation numbers for kpt# 23 + 2.00000 2.00000 2.00001 2.13596 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 24, nband= 11, wtk= 0.02344, kpt= 0.3750 0.0000 0.3125 (reduced coord) + -0.06730 0.07964 0.14144 0.21888 0.32630 0.47215 0.60392 0.63679 + 0.64807 0.74468 0.77705 + occupation numbers for kpt# 24 + 2.00000 2.00000 2.00000 2.03296 0.00395 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 25, nband= 11, wtk= 0.01172, kpt= 0.5000 0.0000 0.3125 (reduced coord) + -0.01437 0.01101 0.18378 0.20951 0.26617 0.46516 0.62051 0.62768 + 0.64664 0.72989 0.85510 + occupation numbers for kpt# 25 + 2.00000 2.00000 2.00017 2.01103 1.61406 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 26, nband= 11, wtk= 0.02344, kpt= 0.1250 0.1250 0.3125 (reduced coord) + -0.12353 0.08069 0.20728 0.23833 0.45877 0.52627 0.56277 0.58586 + 0.62891 0.70956 0.76836 + occupation numbers for kpt# 26 + 2.00000 2.00000 2.00820 2.13099 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 27, nband= 11, wtk= 0.04688, kpt= 0.2500 0.1250 0.3125 (reduced coord) + -0.08589 0.12082 0.12852 0.19519 0.36974 0.52129 0.55600 0.60620 + 0.65773 0.74119 0.80028 + occupation numbers for kpt# 27 + 2.00000 2.00000 2.00000 2.00132 0.00015 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 28, nband= 11, wtk= 0.04688, kpt= 0.3750 0.1250 0.3125 (reduced coord) + -0.03149 0.04468 0.17305 0.17799 0.28691 0.50205 0.54105 0.64096 + 0.70528 0.75403 0.80664 + occupation numbers for kpt# 28 + 2.00000 2.00000 2.00002 2.00005 0.47952 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 29, nband= 11, wtk= 0.02344, kpt= 0.2500 0.2500 0.3125 (reduced coord) + -0.04011 0.08750 0.12536 0.17103 0.30948 0.47519 0.60578 0.64373 + 0.64923 0.75207 0.84901 + occupation numbers for kpt# 29 + 2.00000 2.00000 2.00000 2.00001 0.00935 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 30, nband= 11, wtk= 0.02344, kpt= 0.3750 0.2500 0.3125 (reduced coord) + 0.01131 0.03344 0.10488 0.21604 0.26114 0.44972 0.62022 0.66024 + 0.70007 0.77027 0.77538 + occupation numbers for kpt# 30 + 2.00000 2.00000 2.00000 2.02429 1.83644 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 31, nband= 11, wtk= 0.00391, kpt= 0.0000 0.0000 0.4375 (reduced coord) + -0.13568 0.01050 0.31276 0.31276 0.52402 0.52402 0.57669 0.62526 + 0.63722 0.72184 0.72184 + occupation numbers for kpt# 31 + 2.00000 2.00000 0.00212 0.00212 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 32, nband= 11, wtk= 0.02344, kpt= 0.1250 0.0000 0.4375 (reduced coord) + -0.12661 0.02189 0.26609 0.28847 0.50906 0.52093 0.56693 0.63321 + 0.66151 0.68340 0.70740 + occupation numbers for kpt# 32 + 2.00000 2.00000 1.61802 0.41257 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 33, nband= 11, wtk= 0.02344, kpt= 0.2500 0.0000 0.4375 (reduced coord) + -0.09916 0.05516 0.17806 0.24969 0.39980 0.50339 0.63582 0.63903 + 0.66491 0.67827 0.72474 + occupation numbers for kpt# 33 + 2.00000 2.00000 2.00005 2.11035 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 34, nband= 11, wtk= 0.02344, kpt= 0.3750 0.0000 0.4375 (reduced coord) + -0.05388 0.08894 0.10752 0.22198 0.29657 0.48771 0.60714 0.61177 + 0.71027 0.78166 0.79168 + occupation numbers for kpt# 34 + 2.00000 2.00000 2.00000 2.04481 0.15568 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 35, nband= 11, wtk= 0.01172, kpt= 0.5000 0.0000 0.4375 (reduced coord) + -0.00188 0.02207 0.15278 0.21228 0.23412 0.48226 0.59561 0.60255 + 0.73856 0.81208 0.86360 + occupation numbers for kpt# 35 + 2.00000 2.00000 2.00000 2.01564 2.10997 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 36, nband= 11, wtk= 0.02344, kpt= 0.1250 0.1250 0.4375 (reduced coord) + -0.10832 0.04416 0.21399 0.24254 0.43497 0.54114 0.59111 0.59145 + 0.65813 0.72320 0.75185 + occupation numbers for kpt# 36 + 2.00000 2.00000 2.01920 2.14166 0.00000 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 37, nband= 11, wtk= 0.04688, kpt= 0.2500 0.1250 0.4375 (reduced coord) + -0.07191 0.08733 0.13550 0.20033 0.34186 0.52407 0.54399 0.66511 + 0.69072 0.73985 0.81457 + occupation numbers for kpt# 37 + 2.00000 2.00000 2.00000 2.00300 0.00392 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 38, nband= 11, wtk= 0.04688, kpt= 0.3750 0.1250 0.4375 (reduced coord) + -0.01897 0.05494 0.14419 0.18009 0.25611 0.49450 0.53410 0.71439 + 0.73541 0.76680 0.83425 + occupation numbers for kpt# 38 + 2.00000 2.00000 2.00000 2.00008 1.99684 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 39, nband= 11, wtk= 0.02344, kpt= 0.2500 0.2500 0.4375 (reduced coord) + -0.02747 0.09722 0.13194 0.13838 0.28050 0.44744 0.62294 0.66067 + 0.72842 0.78987 0.84238 + occupation numbers for kpt# 39 + 2.00000 2.00000 2.00000 2.00000 0.80404 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + kpt# 40, nband= 11, wtk= 0.02344, kpt= 0.3750 0.2500 0.4375 (reduced coord) + 0.02292 0.04404 0.11246 0.18470 0.23012 0.42026 0.63374 0.73764 + 0.74935 0.77785 0.78430 + occupation numbers for kpt# 40 + 2.00000 2.00000 2.00000 2.00020 2.08668 0.00000 0.00000 0.00000 + 0.00000 0.00000 0.00000 + Total charge density [el/Bohr^3] +, Maximum= 1.3269E-01 at reduced coord. 0.4444 0.8889 0.5000 +,Next maximum= 1.3269E-01 at reduced coord. 0.4444 0.5556 0.5000 +, Minimum= 1.0465E-03 at reduced coord. 0.0000 0.0000 0.0000 +,Next minimum= 1.4272E-03 at reduced coord. 0.0556 0.0000 0.0000 +, Integrated= 8.0000E+00 + +-------------------------------------------------------------------------------- + Components of total free energy (in Hartree) : + + Kinetic energy = 4.24275448587195E+00 + Hartree energy = 9.34456181620709E-01 + XC energy = -3.36592933277798E+00 + Ewald energy = -7.19741165777062E+00 + PspCore energy = -1.43514648985679E-02 + Loc. psp. energy= -2.64679664282801E+00 + NL psp energy= 8.98859156747168E-01 + >>>>> Internal E= -7.14841927403536E+00 + + -kT*entropy = 7.95117169628319E-04 + >>>>>>>>> Etotal= -7.14762415686573E+00 + + Other information on the energy : + Total energy(eV)= -1.94496744619482E+02 ; Band energy (Ha)= 7.8511189885E-01 +-------------------------------------------------------------------------------- + + Cartesian components of stress tensor (hartree/bohr^3) + sigma(1 1)= 6.19525691E-04 sigma(3 2)= 0.00000000E+00 + sigma(2 2)= 6.19525691E-04 sigma(3 1)= 0.00000000E+00 + sigma(3 3)= 5.35534283E-04 sigma(2 1)= 0.00000000E+00 + +-Cartesian components of stress tensor (GPa) [Pressure= -1.7403E+01 GPa] +- sigma(1 1)= 1.82270721E+01 sigma(3 2)= 0.00000000E+00 +- sigma(2 2)= 1.82270721E+01 sigma(3 1)= 0.00000000E+00 +- sigma(3 3)= 1.57559599E+01 sigma(2 1)= 0.00000000E+00 + +== END DATASET(S) ============================================================== +================================================================================ + + -outvars: echo values of variables after computation -------- + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree + etotal -7.1476241569E+00 + fcart 1.2440289821E-28 9.2345202991E-29 -0.0000000000E+00 + -3.0212132423E-28 2.7703560897E-28 -0.0000000000E+00 + 1.7771842601E-28 -3.6938081196E-28 -0.0000000000E+00 +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + kpt 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 0.00000000E+00 6.25000000E-02 + 2.50000000E-01 0.00000000E+00 6.25000000E-02 + 3.75000000E-01 0.00000000E+00 6.25000000E-02 + 5.00000000E-01 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 1.25000000E-01 6.25000000E-02 + 3.75000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 2.50000000E-01 6.25000000E-02 + 3.75000000E-01 2.50000000E-01 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 0.00000000E+00 1.87500000E-01 + 2.50000000E-01 0.00000000E+00 1.87500000E-01 + 3.75000000E-01 0.00000000E+00 1.87500000E-01 + 5.00000000E-01 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 1.25000000E-01 1.87500000E-01 + 3.75000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 2.50000000E-01 1.87500000E-01 + 3.75000000E-01 2.50000000E-01 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 0.00000000E+00 3.12500000E-01 + 2.50000000E-01 0.00000000E+00 3.12500000E-01 + 3.75000000E-01 0.00000000E+00 3.12500000E-01 + 5.00000000E-01 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 1.25000000E-01 3.12500000E-01 + 3.75000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 2.50000000E-01 3.12500000E-01 + 3.75000000E-01 2.50000000E-01 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 0.00000000E+00 4.37500000E-01 + 2.50000000E-01 0.00000000E+00 4.37500000E-01 + 3.75000000E-01 0.00000000E+00 4.37500000E-01 + 5.00000000E-01 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 1.25000000E-01 4.37500000E-01 + 3.75000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 2.50000000E-01 4.37500000E-01 + 3.75000000E-01 2.50000000E-01 4.37500000E-01 + kptrlatt 8 0 0 0 8 0 0 0 8 + kptrlen 4.66535588E+01 +P mkmem 20 + natom 3 + nband 11 + ngfft 18 18 20 + nkpt 40 +- npkpt 2 + nsym 24 + ntypat 2 + occ 2.000000 2.000001 0.115849 0.115849 0.002018 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000010 2.122178 1.113972 0.000724 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.002863 2.130470 0.000009 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.013297 2.139881 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.003459 0.832301 0.000044 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000528 2.001107 2.073641 0.000031 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000166 2.077600 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000002 1.052608 0.000002 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 1.267300 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 0.001542 0.000509 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.065673 0.065673 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.056217 0.897651 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000001 2.140175 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.001094 2.019999 0.000072 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.005740 2.109392 0.000401 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.002523 2.099674 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000025 2.000502 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000006 2.071679 0.004777 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.046212 0.000868 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 1.686160 0.006933 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.012141 0.012141 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 1.869050 0.595320 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000010 2.135959 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.032965 0.003951 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000167 2.011027 1.614064 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.008201 2.130994 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.001317 0.000149 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000018 2.000052 0.479518 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000011 0.009351 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.024287 1.836439 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.002121 0.002121 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 1.618024 0.412567 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000053 2.110351 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.044807 0.155682 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.015639 2.109965 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.019203 2.141665 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.002998 0.003921 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000080 1.996841 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.804041 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000200 2.086681 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 0.00000000E+00 0.00000000E+00 5.00000000E-01 + spgroup 191 + strten 6.1952569136E-04 6.1952569137E-04 5.3553428305E-04 + 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolvrs 1.00000000E-06 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + wtk 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 0.00391 0.02344 + 0.02344 0.02344 0.01172 0.02344 0.04688 0.04688 + 0.02344 0.02344 0.00391 0.02344 0.02344 0.02344 + 0.01172 0.02344 0.04688 0.04688 0.02344 0.02344 + 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333333E-01 6.6666666667E-01 5.0000000000E-01 + 6.6666666667E-01 3.3333333333E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + Test the timer : + a combined call timab(*,1,tsec) + timab(*,2,tsec) is +- CPU time = 1.4721E-06 sec, Wall time = 1.4733E-06 sec + +- Total cpu time (s,m,h): 10.2 0.17 0.003 +- Total wall clock time (s,m,h): 10.3 0.17 0.003 +- +- For major independent code sections, cpu and wall times (sec), +- as well as % of the time and number of calls for node 0- +- +- cpu_time = 5.1, wall_time = 5.2 +- +- routine cpu % wall % number of calls Gflops +- (-1=no count) +- fourwf%(pot) 2.204 21.6 2.212 21.5 8689 -1.00 +- nonlop(apply) 0.279 2.7 0.282 2.7 8689 -1.00 +- pspini 0.250 2.5 0.251 2.4 1 -1.00 +- invars2 0.150 1.5 0.150 1.5 1 -1.00 +- timing timab 0.127 1.2 0.127 1.2 12 -1.00 +- mkrho/= 0.097 1.0 0.097 0.9 12 -1.00 +- getghc-other 0.056 0.5 0.046 0.4 -1 -1.00 +- abinit(2) 0.048 0.5 0.048 0.5 1 -1.00 +- vtowfk(ssdiag) 0.024 0.2 0.024 0.2 -1 -1.00 +- ewald 0.010 0.1 0.010 0.1 1 -1.00 +- stress 0.009 0.1 0.009 0.1 1 -1.00 +- fourdp 0.008 0.1 0.008 0.1 32 -1.00 +- mkcore 0.008 0.1 0.008 0.1 3 -1.00 +- ewald2 (+vdw_dftd2) 0.005 0.0 0.005 0.0 1 -1.00 +- forces 0.004 0.0 0.004 0.0 1 -1.00 +- xc:pot/=fourdp 0.004 0.0 0.004 0.0 7 -1.00 +- newkpt(excl. rwwf ) 0.003 0.0 0.003 0.0 -1 -1.00 +- prep_bandfft_tabs 0.003 0.0 0.003 0.0 114 -1.00 +- vtorho(MPI) 0.003 0.0 0.003 0.0 6 -1.00 +- vtowfk(contrib) 0.003 0.0 0.003 0.0 120 -1.00 +- symrhg(no FFT) 0.002 0.0 0.002 0.0 6 -1.00 +- setsym 0.001 0.0 0.001 0.0 1 -1.00 +- kpgsph 0.001 0.0 0.001 0.0 60 -1.00 +- vtowfk (1) 0.000 0.0 0.000 0.0 120 -1.00 +- scfcv-scprqt 0.000 0.0 0.000 0.0 6 -1.00 +- status 0.000 0.0 0.000 0.0 27 -1.00 +- inwffil(excl. calls) 0.000 0.0 0.000 0.0 1 -1.00 +- vtowfk3(contrib) 0.000 0.0 0.000 0.0 -1 -1.00 +- cgwf3-O(npw) 0.000 0.0 0.000 0.0 -1 -1.00 +- others (83) 0.000 0.0 0.000 0.0 -1 -1.00 +- +- +- subtotal 3.299 32.3 3.302 32.1 + +- For major independent code sections, cpu and wall times (sec), +- as well as % of the total time and number of calls + +- +- cpu_time = 10.2, wall_time = 10.3 +- +- routine cpu % wall % number of calls Gflops +- (-1=no count) +- fourwf%(pot) 4.395 43.0 4.411 42.8 17393 -1.00 +- nonlop(apply) 0.553 5.4 0.559 5.4 17393 -1.00 +- pspini 0.500 4.9 0.500 4.9 2 -1.00 +- invars2 0.302 3.0 0.302 2.9 2 -1.00 +- timing timab 0.253 2.5 0.253 2.5 24 -1.00 +- mkrho/= 0.197 1.9 0.197 1.9 24 -1.00 +- getghc-other 0.111 1.1 0.092 0.9 -2 -1.00 +- abinit(2) 0.091 0.9 0.091 0.9 2 -1.00 +- vtowfk(ssdiag) 0.047 0.5 0.047 0.5 -2 -1.00 +- vtorho(MPI) 0.031 0.3 0.031 0.3 12 -1.00 +- ewald 0.020 0.2 0.020 0.2 2 -1.00 +- stress 0.018 0.2 0.018 0.2 2 -1.00 +- fourdp 0.017 0.2 0.017 0.2 64 -1.00 +- mkcore 0.016 0.2 0.016 0.2 6 -1.00 +- ewald2 (+vdw_dftd2) 0.010 0.1 0.010 0.1 2 -1.00 +- newkpt(excl. rwwf ) 0.008 0.1 0.008 0.1 -2 -1.00 +- forces 0.007 0.1 0.007 0.1 2 -1.00 +- xc:pot/=fourdp 0.007 0.1 0.007 0.1 14 -1.00 +- prep_bandfft_tabs 0.006 0.1 0.006 0.1 227 -1.00 +- vtowfk(contrib) 0.005 0.1 0.005 0.1 240 -1.00 +- symrhg(no FFT) 0.004 0.0 0.004 0.0 12 -1.00 +- setsym 0.002 0.0 0.002 0.0 2 -1.00 +- kpgsph 0.001 0.0 0.001 0.0 120 -1.00 +- scfcv-scprqt 0.001 0.0 0.001 0.0 12 -1.00 +- vtowfk (1) 0.001 0.0 0.001 0.0 240 -1.00 +- status 0.001 0.0 0.001 0.0 54 -1.00 +- inwffil(excl. calls) 0.000 0.0 0.000 0.0 2 -1.00 +- vtowfk3(contrib) 0.000 0.0 0.000 0.0 -2 -1.00 +- cgwf3-O(npw) 0.000 0.0 0.000 0.0 -2 -1.00 +- others (83) 0.000 0.0 0.000 0.0 -1 -1.00 +- + +- subtotal 6.604 64.7 6.608 64.2 + + Partitioning of abinit +- abinit 10.212 100.0 10.296 100.0 2 + +- abinit(1) 0.035 0.3 0.035 0.3 2 +- abinit(2) 0.091 0.9 0.091 0.9 2 +- indefo+macroin+invars2m 0.303 3.0 0.303 2.9 2 +- abinit(4) 0.035 0.3 0.036 0.3 2 +- abinit(5) 0.032 0.3 0.032 0.3 2 +- driver 9.456 92.6 9.522 92.5 2 +- abinit(6) 0.007 0.1 0.023 0.2 2 +- timing timab 0.253 2.5 0.253 2.5 24 + +- subtotal 10.212 100.0 10.296 100.0 + + Partitioning of driver +- driver 9.456 92.6 9.522 92.5 2 + +- gstateimg 9.452 92.6 9.519 92.5 2 +- driver(aft. select case) 0.003 0.0 0.003 0.0 2 + +- subtotal 9.456 92.6 9.522 92.5 + + Partitioning of gstateimg+gstate +- gstateimg 9.452 92.6 9.519 92.5 2 + +- gstate->kpgsph 0.013 0.1 0.013 0.1 4 +- gstate(pspini) 0.500 4.9 0.500 4.9 2 +- gstate (2) 0.004 0.0 0.004 0.0 2 +- gstate(...scfcv) 8.760 85.8 8.764 85.1 2 +- gstate (3) 0.176 1.7 0.238 2.3 2 + +- subtotal 9.452 92.6 9.519 92.5 + + Partitioning of scfcv +- scfcv 8.760 85.8 8.764 85.1 2 + +- scfcv(iniloop, setvtr ) 0.028 0.3 0.028 0.3 12 +- scfcv(vtorho(f)) 8.654 84.7 8.657 84.1 12 +- scfcv(rhotov) 0.010 0.1 0.010 0.1 12 +- scfcv(mix pot) 0.009 0.1 0.009 0.1 10 +- scfcv(afterscfloop) 0.051 0.5 0.051 0.5 2 +- scfcv(outscfcv) 0.006 0.1 0.006 0.1 2 + +- subtotal 8.760 85.8 8.764 85.1 + + Partitioning of rhotov +- rhotov 0.010 0.1 0.010 0.1 12 + +- rhotov(rhohxc) 0.009 0.1 0.009 0.1 12 + +- subtotal 0.010 0.1 0.010 0.1 + + Partitioning of vtorho +- vtorho 8.654 84.7 8.657 84.1 12 + +- vtorho(bef. vtowfk) 0.006 0.1 0.006 0.1 240 +- vtowfk 7.819 76.6 7.822 76.0 240 +- vtorho(MPI) 0.031 0.3 0.031 0.3 12 +- vtorho(newocc) 0.586 5.7 0.586 5.7 12 +- vtorho(mkrho 1) 0.207 2.0 0.207 2.0 12 + +- subtotal 8.654 84.7 8.657 84.1 + + Partitioning of vtowfk +- vtowfk 7.819 76.6 7.822 76.0 240 + +- lobpcgwf 7.766 76.0 7.769 75.5 320 +- vtowfk(subdiago) 0.044 0.4 0.044 0.4 320 +- vtowfk(2) 0.003 0.0 0.003 0.0 -2 +- vtowfk(3) 0.003 0.0 0.003 0.0 -2 + +- subtotal 7.819 76.6 7.822 76.0 + + Partitioning of getghc +- getghc 5.059 49.5 5.062 49.2 17393 + +- fourwf%getghc 4.395 43.0 4.411 42.8 17393 +- nonlop%getghc 0.553 5.4 0.559 5.4 17393 +- getghc-other 0.111 1.1 0.092 0.9 -2 + +- subtotal 5.059 49.5 5.062 49.2 + + Partitioning of fourwf (upwards partitioning) +- fourwf 4.558 44.6 4.575 44.4 18509 + +- fourwf%getghc 4.395 43.0 4.411 42.8 17393 +- fourwf%prep_four 0.163 1.6 0.164 1.6 1116 + +- subtotal 4.558 44.6 4.575 44.4 + + Partitioning of prep_getghc +- prep_getghc 5.479 53.7 5.482 53.2 17393 + +- prep_getghc(before if) 0.207 2.0 0.207 2.0 17393 +- prep_getghc(alltoall) 0.142 1.4 0.145 1.4 34786 +- prep_getghc(getghc - 1 ) 5.101 49.9 5.100 49.5 17393 +- (other) 0.030 0.3 0.029 0.3 -1 + +- subtotal 5.479 53.7 5.482 53.2 + + Partitioning of prep_fourwf +- prep_fourwf 0.179 1.8 0.179 1.7 2640 + +- fourwf%prep_four 0.163 1.6 0.164 1.6 1116 +- alltoall%prep_fo 0.007 0.1 0.007 0.1 2640 + +- subtotal 0.170 1.7 0.171 1.7 + + Partitioning of prep_nonlop +- prep_nonlop 0.014 0.1 0.014 0.1 187 + +- nonlop%prep_nonl%forstrn 0.012 0.1 0.013 0.1 187 + +- subtotal 0.014 0.1 0.014 0.1 + + Partitioning of mkrho (upwards partitioning) +- mkrho 0.207 2.0 0.207 2.0 12 + +- mkrho%vtorho 0.207 2.0 0.207 2.0 12 + +- subtotal 0.207 2.0 0.207 2.0 + + Partitioning of inwffil +- inwffil 0.009 0.1 0.009 0.1 2 + +- inwffil(call newkpt) 0.009 0.1 0.009 0.1 2 + +- subtotal 0.009 0.1 0.009 0.1 + + Partitioning of newkpt +- newkpt 0.009 0.1 0.009 0.1 2 + +- newkpt(call wfconv) 0.006 0.1 0.006 0.1 40 + +- subtotal 0.008 0.1 0.008 0.1 + + Partitioning of newvtr +- newvtr 0.009 0.1 0.009 0.1 10 + +- newvtr(call prcref_PMA) 0.005 0.0 0.005 0.0 10 +- newvtr(aft. prcref_PMA) 0.003 0.0 0.003 0.0 10 + +- subtotal 0.009 0.1 0.009 0.1 + + Partitioning of fourdp (upwards partitioning) +- fourdp 0.017 0.2 0.017 0.2 64 + +- fourdp%(other) 0.017 0.2 0.017 0.2 64 + +- subtotal 0.017 0.2 0.017 0.2 + + Partitioning of afterscfloop +- afterscfloop 0.051 0.5 0.051 0.5 2 + +- afterscfloop(forstr) 0.050 0.5 0.050 0.5 2 + +- subtotal 0.051 0.5 0.051 0.5 + + Partitioning of forstr +- forstr 0.050 0.5 0.050 0.5 2 + +- forstr(forstrnps) 0.025 0.2 0.025 0.2 2 +- forstr(forces) 0.007 0.1 0.007 0.1 2 +- forstr(stress) 0.018 0.2 0.018 0.2 2 + +- subtotal 0.050 0.5 0.050 0.5 + + Partitioning of forstrnps +- forstrnps 0.025 0.2 0.025 0.2 2 + +- forstrnps(bef.loop band) 0.003 0.0 0.003 0.0 40 +- forstrnps(nonlop+prep_ba 0.020 0.2 0.020 0.2 187 + +- subtotal 0.025 0.2 0.025 0.2 + + Partitioning of outscfcv +- outscfcv 0.005 0.1 0.006 0.1 2 + + +- subtotal 0.001 0.0 0.002 0.0 +- +-Synchronisation (=leave_test) and MPI calls +- communic.MPI 0.042 0.4 0.042 0.4 66 +- +- forstrnps:synchr 0.000 0.0 0.000 0.0 4 +- mkrho :MPIrhor 0.008 0.1 0.008 0.1 12 +- +- subtotal 0.008 0.1 0.008 0.1 + + Additional information +- timana(1) 0.000 0.0 0.000 0.0 2 +- total timab 1.733 17.0 1.734 16.8 1184946 +- fourwf 4.558 44.6 4.575 44.4 18509 +- mklocl(2) 0.001 0.0 0.001 0.0 2 +- status 0.001 0.0 0.001 0.0 54 +- newocc 0.586 5.7 0.586 5.7 12 +- nonlop(total) 0.565 5.5 0.571 5.6 17580 + + + Detailed analysis of some time consuming routines + tcpu ncalls tcpu/ncalls ndata tcpu/ncalls/ndata + (sec) (msec) (microsec) +- fourwf%(pot) 4.395 17393 0.253 12960 0.019 +- fourwf%(den) 0.000 0 +- fourdp 0.017 64 0.262 6480 0.041 +- nonlop(apply) 0.553 17393 0.032 885 0.036 +- nonlop(forces) 0.000 0 +- nonlop(forstr) 0.000 0 +- projbd 0.000 0 +- xc:pot/=fourdp 0.007 14 0.512 6480 0.079 + +================================================================================ + + Suggested references for the acknowledgment of ABINIT usage. + + The users of ABINIT have little formal obligations with respect to the ABINIT group + (those specified in the GNU General Public License, http://www.gnu.org/copyleft/gpl.txt). + However, it is common practice in the scientific literature, + to acknowledge the efforts of people that have made the research possible. + In this spirit, please find below suggested citations of work written by ABINIT developers, + corresponding to implementations inside of ABINIT that you have used in the present run. + Note also that it will be of great value to readers of publications presenting these results, + to read papers enabling them to understand the theoretical formalism and details + of the ABINIT implementation. + For information on why they are suggested, see also http://www.abinit.org/about/?text=acknowledgments. + + [1] Large scale ab initio calculations based on three levels of parallelization + F. Bottin, S. Leroux, A. Knyazev, G. Zerah, Comput. Mat. Science 42, 329, (2008). + Comment : in case paral_kgb is non-zero. Strong suggestion to cite this paper in your publications. + This paper is also available at http://www.arxiv.org/abs/0707.3405 + + [2] ABINIT : First-principles approach of materials and nanosystem properties. + X. Gonze, B. Amadon, P.-M. Anglade, J.-M. Beuken, F. Bottin, P. Boulanger, F. Bruneval, + D. Caliste, R. Caracas, M. Cote, T. Deutsch, L. Genovese, Ph. Ghosez, M. Giantomassi + S. Goedecker, D.R. Hamann, P. Hermet, F. Jollet, G. Jomard, S. Leroux, M. Mancini, S. Mazevet, + M.J.T. Oliveira, G. Onida, Y. Pouillon, T. Rangel, G.-M. Rignanese, D. Sangalli, R. Shaltaf, + M. Torrent, M.J. Verstraete, G. Zerah, J.W. Zwanziger + Computer Phys. Comm. 180, 2582-2615 (2009). + Comment : the third generic paper describing the ABINIT project. + Note that a version of this paper, that is not formatted for Computer Phys. Comm. + is available at http://www.abinit.org/about/ABINIT_CPC_v10.pdf . + The licence allows the authors to put it on the Web. + + [3] A brief introduction to the ABINIT software package. + X. Gonze, G.-M. Rignanese, M. Verstraete, J.-M. Beuken, Y. Pouillon, R. Caracas, F. Jollet, + M. Torrent, G. Zerah, M. Mikami, Ph. Ghosez, M. Veithen, J.-Y. Raty, V. Olevano, F. Bruneval, + L. Reining, R. Godby, G. Onida, D.R. Hamann, and D.C. Allan. + Z. Kristallogr. 220, 558-562 (2005). + Comment : the second generic paper describing the ABINIT project. Note that this paper + should be cited especially if you are using the GW part of ABINIT, as several authors + of this part are not in the list of authors of the first or third paper. + The .pdf of the latter paper is available at http://www.abinit.org/about/zfk_0505-06_558-562.pdf. + Note that it should not redistributed (Copyright by Oldenburg Wissenshaftverlag, + the licence allows the authors to put it on the Web). + + + And optionally : + + [4] First-principles computation of material properties : the ABINIT software project. + X. Gonze, J.-M. Beuken, R. Caracas, F. Detraux, M. Fuchs, G.-M. Rignanese, L. Sindic, + M. Verstraete, G. Zerah, F. Jollet, M. Torrent, A. Roy, M. Mikami, Ph. Ghosez, J.-Y. Raty, D.C. Allan. + Computational Materials Science 25, 478-492 (2002). http://dx.doi.org/10.1016/S0927-0256(02)00325-7 + Comment : the original paper describing the ABINIT project. + + [5] Fast radix 2, 3, 4 and 5 kernels for Fast Fourier Transformations + on computers with overlapping multiply-add instructions. + S. Goedecker, SIAM J. on Scientific Computing 18, 1605 (1997). +- +- Proc. 0 individual time (sec): cpu= 5.1 wall= 5.2 + +================================================================================ + + Calculation completed. +.Delivered 0 WARNINGs and 0 COMMENTs to log file. ++Overall time at end (sec) : cpu= 10.2 wall= 10.3 diff --git a/abipy/test_files/mgb2_scf.log b/abipy/test_files/mgb2_scf.log new file mode 100644 index 000000000..14b545f84 --- /dev/null +++ b/abipy/test_files/mgb2_scf.log @@ -0,0 +1,1173 @@ + ABINIT + + Give name for formatted input file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abi + Give name for formatted output file: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abo + Give root name for generic input files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/indata/in + Give root name for generic output files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out + Give root name for generic temporary files: +/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/tmpdata/tmp + +.Version 7.11.5 of ABINIT +.(MPI version, prepared for a x86_64_darwin10.8.0_gnu4.7 computer) + +.Copyright (C) 1998-2015 ABINIT group . + ABINIT comes with ABSOLUTELY NO WARRANTY. + It is free software, and you are welcome to redistribute it + under certain conditions (GNU General Public License, + see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt). + + ABINIT is a project of the Universite Catholique de Louvain, + Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt . + Please read ~abinit/doc/users/acknowledgments.html for suggested + acknowledgments of the ABINIT effort. + For more information, see http://www.abinit.org . + +.Starting date : Fri 13 Mar 2015. +- ( at 20h08 ) + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + === Build Information === + Version : 7.11.5 + Build target : x86_64_darwin10.8.0_gnu4.7 + Build date : 20150309 + + === Compiler Suite === + C compiler : gnu4.7 + C++ compiler : gnu4.7 + Fortran compiler : gnu4.7 + CFLAGS : -g -O2 -mtune=native -march=native + CXXFLAGS : -g -O2 -mtune=native -march=native + FCFLAGS : -g -ffree-line-length-none + FC_LDFLAGS : + + === Optimizations === + Debug level : basic + Optimization level : standard + Architecture : unknown_unknown + + === Multicore === + Parallel build : yes + Parallel I/O : yes + openMP support : no + GPU support : no + + === Connectors / Fallbacks === + Connectors on : yes + Fallbacks on : yes + DFT flavor : libxc-fallback + FFT flavor : fftw3 + LINALG flavor : netlib-fallback + MATH flavor : none + TIMER flavor : abinit + TRIO flavor : netcdf-fallback+etsf_io-fallback + + === Experimental features === + Bindings : @enable_bindings@ + Exports : no + GW double-precision : yes + + === Bazaar branch information === + Branch ID : gmatteo@cenaero-20150309121815-5lbj8ihq15ffcsbb + Revision : 939 + Committed : 0 + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Default optimizations: + -O2 -mtune=native -march=native + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + CPP options activated during the build: + + CC_GNU CXX_GNU HAVE_BZR_BRANCH + + HAVE_CLIB HAVE_DFT_LIBXC HAVE_FC_ALLOCATABLE_DT... + + HAVE_FC_ASYNC HAVE_FC_COMMAND_ARGUMENT HAVE_FC_COMMAND_LINE + + HAVE_FC_CONTIGUOUS HAVE_FC_CPUTIME HAVE_FC_EXIT + + HAVE_FC_FLUSH HAVE_FC_GAMMA HAVE_FC_GETENV + + HAVE_FC_INT_QUAD HAVE_FC_IOMSG HAVE_FC_ISO_C_BINDING + + HAVE_FC_LONG_LINES HAVE_FC_MOVE_ALLOC HAVE_FC_PRIVATE + + HAVE_FC_PROTECTED HAVE_FC_STREAM_IO HAVE_FC_SYSTEM + + HAVE_FFT HAVE_FFT_FFTW3 HAVE_FFT_MPI + + HAVE_FFT_SERIAL HAVE_GW_DPC HAVE_LIBPAW_ABINIT + + HAVE_LINALG_ZDOTC_B*G HAVE_LINALG_ZDOTU_B*G HAVE_MPI + + HAVE_MPI2 HAVE_MPI_IALLREDUCE HAVE_MPI_IALLTOALL + + HAVE_MPI_IALLTOALLV HAVE_MPI_IO HAVE_MPI_TYPE_CREATE_S... + + HAVE_NUMPY HAVE_TIMER HAVE_TIMER_ABINIT + + HAVE_TIMER_MPI HAVE_TIMER_SERIAL HAVE_TRIO_ETSF_IO + + HAVE_TRIO_NETCDF USE_MACROAVE + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +- input file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abi +- output file -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abo +- root for input files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/indata/in +- root for output files -> /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out + +-instrng : 60 lines of input have been read from file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/run.abi + + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 1 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc + + iofn2 : Please give name of formatted atomic psp file + iofn2 : for atom type 2 , psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc + read the values zionpsp= 2.0 , pspcod= 1 , lmax= 2 +nproj = 1 1 0 0 +nprojso = 0 0 0 + read the values zionpsp= 3.0 , pspcod= 1 , lmax= 1 +nproj = 1 0 0 0 +nprojso = 0 0 0 + + inpspheads: deduce mpsang = 3, n1xccc =2501. + + invars1m : enter jdtset=0 + invars1 : treat image number 1 + + symlatt : the Bravais lattice is hP (primitive hexagonal) + xred is defined in input file + ingeo : takes atomic coordinates from input array xred + + symlatt : the Bravais lattice is hP (primitive hexagonal) + + symlatt : the Bravais lattice is hP (primitive hexagonal) + symspgr : spgroup= 191 P6/m m m (=D6h^1) + Simple Lattice Grid + Simple Lattice Grid + dtset%nelect= 8.0000000000000000 + chkneu : initialized the occupation numbers for occopt= 4 + spin-unpolarized case : + 2.00 2.00 2.00 2.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +npfft, npband, npspinor and npkpt: 1 1 1 2 +mpi_setup: mkmem undefined in the input file.Use default mkmem = nkpt + mpi_setup: With nkpt_me=20 and mkmem = 40, ground state wf handled in core. + Resetting mkmem to nkpt_me to save memory space. +mpi_setup: mkqmem undefined in the input file.Use default mkqmem = nkpt + mpi_setup: With nkpt_me=20 and mkqmem = 40, ground state wf handled in core. + Resetting mkqmem to nkpt_me to save memory space. +mpi_setup: mk1mem undefined in the input file.Use default mk1mem = nkpt + mpi_setup: With nkpt_me=20 and mk1mem = 40, ground state wf handled in core. + Resetting mk1mem to nkpt_me to save memory space. + For input ecut= 1.000000E+01 best grid ngfft= 18 18 20 + max ecut= 1.113388E+01 + + ==== FFT mesh ==== + FFT mesh divisions ........................ 18 18 20 + Augmented FFT divisions ................... 19 19 20 + FFT algorithm ............................. 312 + FFT cache size ............................ 16 + getmpw: optimal value of mpw= 308 + + Symmetries : space group P6/m m m (#191); Bravais hP (primitive hexag.) + + getdim_nloc : deduce lmnmax = 4, lnmax = 2, + lmnmaxso= 4, lnmaxso= 2. +memory : analysis of memory needs +================================================================================ + Values of the parameters that define the memory need of the present run + intxc = 0 ionmov = 0 iscf = 7 xclevel = 1 + lmnmax = 2 lnmax = 2 mband = 11 mffmem = 1 +P mgfft = 20 mkmem = 20 mpssoang= 3 mpw = 308 + mqgrid = 3001 natom = 3 nfft = 6480 nkpt = 40 + nloalg = 4 nspden = 1 nspinor = 1 nsppol = 1 + nsym = 24 n1xccc = 2501 ntypat = 2 occopt = 4 +================================================================================ +P This job should need less than 4.818 Mbytes of memory. + Rough estimation (10% accuracy) of disk space for files : +_ WF disk file : 2.070 Mbytes ; DEN or POT disk file : 0.051 Mbytes. +================================================================================ + + Biggest array : cg(disk), with 1.0359 MBytes. + memana : allocated an array of 1.036 Mbytes, for testing purposes. + memana : allocated 4.818 Mbytes, for testing purposes. + The job will continue. +-------------------------------------------------------------------------------- +------------- Echo of variables that govern the present computation ------------ +-------------------------------------------------------------------------------- +- +- outvars: echo of selected default values +- accesswff0 = 0 , fftalg0 =312 , wfoptalg0 = 0 +- +- outvars: echo of global parameters not present in the input file +- max_nthreads = 0 +- + -outvars: echo values of preprocessed input variables -------- + + These variables are accessible in NetCDF format (/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_OUT.nc) + + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + kpt 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 0.00000000E+00 6.25000000E-02 + 2.50000000E-01 0.00000000E+00 6.25000000E-02 + 3.75000000E-01 0.00000000E+00 6.25000000E-02 + 5.00000000E-01 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 1.25000000E-01 6.25000000E-02 + 3.75000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 2.50000000E-01 6.25000000E-02 + 3.75000000E-01 2.50000000E-01 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 0.00000000E+00 1.87500000E-01 + 2.50000000E-01 0.00000000E+00 1.87500000E-01 + 3.75000000E-01 0.00000000E+00 1.87500000E-01 + 5.00000000E-01 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 1.25000000E-01 1.87500000E-01 + 3.75000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 2.50000000E-01 1.87500000E-01 + 3.75000000E-01 2.50000000E-01 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 0.00000000E+00 3.12500000E-01 + 2.50000000E-01 0.00000000E+00 3.12500000E-01 + 3.75000000E-01 0.00000000E+00 3.12500000E-01 + 5.00000000E-01 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 1.25000000E-01 3.12500000E-01 + 3.75000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 2.50000000E-01 3.12500000E-01 + 3.75000000E-01 2.50000000E-01 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 0.00000000E+00 4.37500000E-01 + 2.50000000E-01 0.00000000E+00 4.37500000E-01 + 3.75000000E-01 0.00000000E+00 4.37500000E-01 + 5.00000000E-01 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 1.25000000E-01 4.37500000E-01 + 3.75000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 2.50000000E-01 4.37500000E-01 + 3.75000000E-01 2.50000000E-01 4.37500000E-01 + kptrlatt 8 0 0 0 8 0 0 0 8 + kptrlen 4.66535588E+01 +P mkmem 20 + natom 3 + nband 11 + ngfft 18 18 20 + nkpt 40 +- npkpt 2 + nsym 24 + ntypat 2 + occ 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 0.00000000E+00 0.00000000E+00 5.00000000E-01 + spgroup 191 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolvrs 1.00000000E-06 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + wtk 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 0.00391 0.02344 + 0.02344 0.02344 0.01172 0.02344 0.04688 0.04688 + 0.02344 0.02344 0.00391 0.02344 0.02344 0.02344 + 0.01172 0.02344 0.04688 0.04688 0.02344 0.02344 + 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146603E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652959E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333330E-01 6.6666666670E-01 5.0000000000E-01 + 6.6666666670E-01 3.3333333330E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + chkinp: Checking input parameters for consistency. + DATA TYPE INFORMATION: + REAL: Data type name: REAL(DP) + Kind value: 8 + Precision: 15 + Smallest nonnegligible quantity relative to 1: 0.22204460E-15 + Smallest positive number: 0.22250739-307 + Largest representable number: 0.17976931+309 + INTEGER: Data type name: INTEGER(default) + Kind value: 4 + Bit size: 32 + Largest representable number: 2147483647 + LOGICAL: Data type name: LOGICAL + Kind value: 4 + CHARACTER: Data type name: CHARACTER Kind value: 1 + + ==== OpenMP parallelism is OFF ==== + + ==== Using MPI-2 specifications ==== + MPI-IO support is ON + xmpi_tag_ub ................ 2147483647 + xmpi_bsize_ch .............. 1 + xmpi_bsize_int ............. 4 + xmpi_bsize_sp .............. 4 + xmpi_bsize_dp .............. 8 + xmpi_bsize_spc ............. 8 + xmpi_bsize_dpc ............. 16 + xmpio_bsize_frm ............ 4 + xmpi_address_kind .......... 8 + xmpi_offset_kind ........... 8 + MPI_WTICK .................. 9.9999999999999995E-007 + +================================================================================ +== DATASET 1 ================================================================== +- nproc = 2 + + + getdim_nloc : deduce lmnmax = 4, lnmax = 2, + lmnmaxso= 4, lnmaxso= 2. + Exchange-correlation functional for the present dataset will be: + LDA: new Teter (4/93) with spin-polarized option - ixc=1 + Citation for XC functional: + S. Goedecker, M. Teter, J. Huetter, PRB 54, 1703 (1996) + + Unit cell volume ucvol= 1.9607929E+02 bohr^3 + Angles (23,13,12)= 9.00000000E+01 9.00000000E+01 1.20000000E+02 degrees + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + kpgio: loop on k-points done in parallel +- pspini: atom type 1 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/12mg.pspnc +- Troullier-Martins psp for element Mg Thu Oct 27 17:30:49 EDT 1994 +- 12.00000 2.00000 940714 znucl, zion, pspdat + 1 1 2 2 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 3.352 8.820 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 1.127 1.670 1 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2 0.000 0.000 0 2.5922174 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 2.54196289048337 0.05499530377757 0.78827945413088 rchrg,fchrg,qchrg + pspatm: epsatm= -1.54393848 + --- l ekb(1:nproj) --> + 0 1.755924 + 1 0.853613 + pspatm: atomic psp has been read and splines computed + +- pspini: atom type 2 psp file is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- pspatm: opening atomic psp file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/pseudos/5b.pspnc +- Troullier-Martins psp for element B Thu Oct 27 17:29:24 EDT 1994 +- 5.00000 3.00000 940714 znucl, zion, pspdat + 1 1 1 1 2001 0.00000 pspcod,pspxc,lmax,lloc,mmax,r2well + 0 8.313 21.401 1 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1 11.531 17.234 0 1.5924135 l,e99.0,e99.9,nproj,rcpsp + 0.00000000 0.00000000 0.00000000 0.00000000 rms, ekb1, ekb2, epsatm + 1.10004537463277 0.35216853368804 0.40909985967175 rchrg,fchrg,qchrg + pspatm: epsatm= 0.59609267 + --- l ekb(1:nproj) --> + 0 3.906219 + pspatm: atomic psp has been read and splines computed + + -2.81402505E+00 ecore*ucvol(ha*bohr**3) + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 + 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 + wfconv: 11 bands initialized randomly with npw= 291, for ikpt= 1 + wfconv: 11 bands initialized randomly with npw= 300, for ikpt= 2 + wfconv: 11 bands initialized randomly with npw= 295, for ikpt= 3 + wfconv: 11 bands initialized randomly with npw= 301, for ikpt= 4 + wfconv: 11 bands initialized randomly with npw= 308, for ikpt= 5 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 6 + wfconv: 11 bands initialized randomly with npw= 293, for ikpt= 7 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 8 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 9 + wfconv: 11 bands initialized randomly with npw= 297, for ikpt= 10 + wfconv: 11 bands initialized randomly with npw= 291, for ikpt= 11 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 12 + wfconv: 11 bands initialized randomly with npw= 296, for ikpt= 13 + wfconv: 11 bands initialized randomly with npw= 295, for ikpt= 14 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 15 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 16 + wfconv: 11 bands initialized randomly with npw= 295, for ikpt= 17 + wfconv: 11 bands initialized randomly with npw= 294, for ikpt= 18 + wfconv: 11 bands initialized randomly with npw= 298, for ikpt= 19 + wfconv: 11 bands initialized randomly with npw= 303, for ikpt= 20 + +_setup2: Arith. and geom. avg. npw (full set) are 296.047 296.029 + initro : for itypat= 1, take decay length= 1.6000, + initro : indeed, coreel= 10.0000, nval= 2 and densty= 0.0000E+00. + initro : for itypat= 2, take decay length= 1.0000, + initro : indeed, coreel= 2.0000, nval= 3 and densty= 0.0000E+00. + +================================================================================ + + getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 18 18 20 + ecut(hartree)= 10.000 => boxcut(ratio)= 2.11034 + + ITER STEP NUMBER 1 + vtorho : nnsclo_now= 2, note that nnsclo,dbl_nnsclo,istep= 0 0 1 + newocc : new Fermi energy is 0.232117 , with nelect= 8.000000 + Number of bissection calls = 45 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 2.077 2.077 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.010 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.284 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.066 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.408 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.549 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.034 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.086 2.086 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.014 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.008 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.141 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.127 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.107 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.291 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.111 2.111 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.020 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.006 0.089 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.002 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.128 0.606 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.122 2.122 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.002 2.025 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 1.066 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.283 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.012 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.023 1.801 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.6718E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 2.8199E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.6718E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 2.8199E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 1 -7.0250417290754 -7.025E+00 2.430E-03 1.769E+02 + scprqt: = -3.8605413E-01 hartree + +Simple mixing update: + residual square of the potential : 50.946346437807264 + + ITER STEP NUMBER 2 + vtorho : nnsclo_now= 2, note that nnsclo,dbl_nnsclo,istep= 0 0 2 + newocc : new Fermi energy is 0.291674 , with nelect= 8.000000 + Number of bissection calls = 47 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 0.052 0.052 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.088 0.892 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.002 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.019 2.141 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.005 1.002 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.002 2.086 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.061 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.227 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.435 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.007 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.024 0.024 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.983 0.683 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.141 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.027 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.008 2.095 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.004 2.113 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.059 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.037 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.788 0.014 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.001 0.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.729 0.411 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.113 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.044 0.003 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.016 1.710 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.012 2.139 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.002 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.573 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.018 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.019 1.913 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.425 0.261 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.062 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.059 0.208 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.022 2.098 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.027 2.139 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.004 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.046 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.937 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.073 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.2813E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 9.9619E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.2813E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 9.9619E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 2 -7.1467059890187 -1.217E-01 2.672E-04 7.920E-01 + scprqt: = -3.9711779E-01 hartree + + Pulay update with 1 previous iterations: + mixing of old trial potential : alpha(m:m-4)= 0.951 0.493E-01 + + ITER STEP NUMBER 3 + vtorho : nnsclo_now= 1, note that nnsclo,dbl_nnsclo,istep= 0 0 3 + newocc : new Fermi energy is 0.278154 , with nelect= 8.000000 + Number of bissection calls = 46 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 0.134 0.134 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.128 1.169 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.126 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.012 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 0.840 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.001 2.001 2.069 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.077 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.058 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.271 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.002 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.079 0.079 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.072 0.954 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.138 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.018 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.005 2.112 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.002 2.094 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.074 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.048 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.667 0.006 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.017 0.017 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.904 0.649 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.139 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.030 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.010 1.550 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.007 2.127 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.433 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.007 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.027 1.800 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.004 0.004 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.671 0.460 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.121 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.040 0.128 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.014 2.118 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.017 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 1.960 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.742 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.094 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.3320E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 9.9649E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.3320E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 9.9649E-04 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 3 -7.1475123730445 -8.064E-04 1.155E-04 1.570E-01 + scprqt: = -3.9633999E-01 hartree + + Pulay update with 2 previous iterations: + mixing of old trial potential : alpha(m:m-4)= 1.23 -0.190 -0.399E-01 + + ITER STEP NUMBER 4 + vtorho : nnsclo_now= 1, note that nnsclo,dbl_nnsclo,istep= 0 0 4 + newocc : new Fermi energy is 0.280246 , with nelect= 8.000000 + Number of bissection calls = 47 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 0.112 0.112 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.121 1.101 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.131 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.014 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.004 0.834 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.001 2.001 2.075 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.077 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.055 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.270 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.002 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.063 0.063 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.052 0.885 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.141 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.020 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.006 2.109 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.101 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.071 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.046 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.691 0.007 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.011 0.011 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.861 0.583 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.135 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.034 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.011 1.625 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.008 2.132 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.489 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.010 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.024 1.844 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.002 0.002 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.606 0.402 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.108 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.046 0.161 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.016 2.108 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.020 2.142 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.003 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.817 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.085 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.3251E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0494E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.3251E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0494E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 4 -7.1476179372442 -1.056E-04 6.147E-05 4.259E-03 + scprqt: = -3.9660840E-01 hartree + + Pulay update with 3 previous iterations: + mixing of old trial potential : alpha(m:m-4)= 0.928 0.805E-01 -0.993E-02 0.185E-02 + + ITER STEP NUMBER 5 + vtorho : nnsclo_now= 1, note that nnsclo,dbl_nnsclo,istep= 0 0 5 + newocc : new Fermi energy is 0.279770 , with nelect= 8.000000 + Number of bissection calls = 47 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 0.116 0.116 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.122 1.115 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.130 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.013 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 0.832 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.001 2.001 2.074 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.078 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.052 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.267 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.002 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.066 0.066 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.057 0.899 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.020 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.006 2.109 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.100 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.072 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.046 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.686 0.007 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.012 0.012 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.870 0.596 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.136 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.033 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.011 1.613 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.008 2.131 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.479 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.009 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.024 1.836 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.002 0.002 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.619 0.414 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.111 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.045 0.155 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.016 2.110 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.019 2.142 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 1.996 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.803 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.087 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.3271E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0458E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.3271E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0458E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 5 -7.1476240932598 -6.156E-06 1.241E-04 4.150E-05 + scprqt: = -3.9655704E-01 hartree + + Pulay update with 4 previous iterations: + mixing of old trial potential : alpha(m:m-4)= 1.09 -0.667E-01 -0.316E-01 0.407E-02 0.189E-03 + + ITER STEP NUMBER 6 + vtorho : nnsclo_now= 1, note that nnsclo,dbl_nnsclo,istep= 0 0 6 + newocc : new Fermi energy is 0.279838 , with nelect= 8.000000 + Number of bissection calls = 47 + newocc : computed new occ. numbers for occopt= 4 , spin-unpolarized case. + 2.000 2.000 0.116 0.116 0.002 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.122 1.114 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.130 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.013 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 0.832 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.001 2.001 2.074 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.078 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.053 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.267 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 0.002 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.066 0.066 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.056 0.898 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.140 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.001 2.020 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.006 2.109 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.003 2.100 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.072 0.005 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.046 0.001 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 1.686 0.007 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.012 0.012 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.869 0.595 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.136 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.033 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.011 1.614 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.008 2.131 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.480 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.009 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.024 1.836 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 0.002 0.002 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 1.618 0.413 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.110 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.045 0.156 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.016 2.110 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.019 2.142 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.003 0.004 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 1.997 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 0.804 0.000 0.000 0.000 0.000 0.000 0.000 + 2.000 2.000 2.000 2.000 2.087 0.000 0.000 0.000 0.000 0.000 0.000 +mkrho: echo density (plane-wave part only) + Total charge density [el/Bohr^3] +, Maximum= 1.3269E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0465E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + Total charge density [el/Bohr^3] +, Maximum= 1.3269E-01 at reduced coord. 0.4444 0.8889 0.5000 +, Minimum= 1.0465E-03 at reduced coord. 0.0000 0.0000 0.0000 +, Integrated= 8.0000E+00 + ETOT 6 -7.1476241568657 -6.361E-08 2.681E-05 3.879E-08 + scprqt: = -3.9656085E-01 hartree + + At SCF step 6 vres2 = 3.88E-08 < tolvrs= 1.00E-06 =>converged. + + Cartesian components of stress tensor (hartree/bohr^3) + sigma(1 1)= 6.19525691E-04 sigma(3 2)= 0.00000000E+00 + sigma(2 2)= 6.19525691E-04 sigma(3 1)= 0.00000000E+00 + sigma(3 3)= 5.35534283E-04 sigma(2 1)= 0.00000000E+00 + + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 + 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 3 2 2 3 2 3 3 2 + ioarr: writing density data +ioarr: file name is /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_DEN +ioarr: data written to disk file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_DEN +================================================================================ + + ----iterations are completed or convergence reached---- + + + outwf: write wavefunction to file /Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_WFK, with accesswff 1 + outwf with iomode: 1, cpu: 0.08, wall: 0.11 + + Cartesian components of stress tensor (hartree/bohr^3) + sigma(1 1)= 6.19525691E-04 sigma(3 2)= 0.00000000E+00 + sigma(2 2)= 6.19525691E-04 sigma(3 1)= 0.00000000E+00 + sigma(3 3)= 5.35534283E-04 sigma(2 1)= 0.00000000E+00 + +-Cartesian components of stress tensor (GPa) [Pressure= -1.7403E+01 GPa] +- sigma(1 1)= 1.82270721E+01 sigma(3 2)= 0.00000000E+00 +- sigma(2 2)= 1.82270721E+01 sigma(3 1)= 0.00000000E+00 +- sigma(3 3)= 1.57559599E+01 sigma(2 1)= 0.00000000E+00 + +== END DATASET(S) ============================================================== +================================================================================ + + -outvars: echo values of variables after computation -------- + + These variables are accessible in NetCDF format (/Users/gmatteo/Coding/git_branches/abipy/abipy/data/runs/flow_mgb2_edoses/w0/t0/outdata/out_OUT.nc) + + accesswff 1 + acell 1.0000000000E+00 1.0000000000E+00 1.0000000000E+00 Bohr + amu 2.43050000E+01 1.08110000E+01 + ecut 1.00000000E+01 Hartree + etotal -7.1476241569E+00 + fcart 1.2440289821E-28 9.2345202991E-29 -0.0000000000E+00 + -3.0212132423E-28 2.7703560897E-28 -0.0000000000E+00 + 1.7771842601E-28 -3.6938081196E-28 -0.0000000000E+00 +- fftalg 312 + fft_opt_lob 2 + iprcch 6 + kpt 0.00000000E+00 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 0.00000000E+00 6.25000000E-02 + 2.50000000E-01 0.00000000E+00 6.25000000E-02 + 3.75000000E-01 0.00000000E+00 6.25000000E-02 + 5.00000000E-01 0.00000000E+00 6.25000000E-02 + 1.25000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 1.25000000E-01 6.25000000E-02 + 3.75000000E-01 1.25000000E-01 6.25000000E-02 + 2.50000000E-01 2.50000000E-01 6.25000000E-02 + 3.75000000E-01 2.50000000E-01 6.25000000E-02 + 0.00000000E+00 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 0.00000000E+00 1.87500000E-01 + 2.50000000E-01 0.00000000E+00 1.87500000E-01 + 3.75000000E-01 0.00000000E+00 1.87500000E-01 + 5.00000000E-01 0.00000000E+00 1.87500000E-01 + 1.25000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 1.25000000E-01 1.87500000E-01 + 3.75000000E-01 1.25000000E-01 1.87500000E-01 + 2.50000000E-01 2.50000000E-01 1.87500000E-01 + 3.75000000E-01 2.50000000E-01 1.87500000E-01 + 0.00000000E+00 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 0.00000000E+00 3.12500000E-01 + 2.50000000E-01 0.00000000E+00 3.12500000E-01 + 3.75000000E-01 0.00000000E+00 3.12500000E-01 + 5.00000000E-01 0.00000000E+00 3.12500000E-01 + 1.25000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 1.25000000E-01 3.12500000E-01 + 3.75000000E-01 1.25000000E-01 3.12500000E-01 + 2.50000000E-01 2.50000000E-01 3.12500000E-01 + 3.75000000E-01 2.50000000E-01 3.12500000E-01 + 0.00000000E+00 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 0.00000000E+00 4.37500000E-01 + 2.50000000E-01 0.00000000E+00 4.37500000E-01 + 3.75000000E-01 0.00000000E+00 4.37500000E-01 + 5.00000000E-01 0.00000000E+00 4.37500000E-01 + 1.25000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 1.25000000E-01 4.37500000E-01 + 3.75000000E-01 1.25000000E-01 4.37500000E-01 + 2.50000000E-01 2.50000000E-01 4.37500000E-01 + 3.75000000E-01 2.50000000E-01 4.37500000E-01 + kptrlatt 8 0 0 0 8 0 0 0 8 + kptrlen 4.66535588E+01 +P mkmem 20 + natom 3 + nband 11 + ngfft 18 18 20 + nkpt 40 +- npkpt 2 + nsym 24 + ntypat 2 + occ 2.000000 2.000001 0.115849 0.115849 0.002018 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000010 2.122178 1.113972 0.000724 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.002863 2.130470 0.000009 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.013297 2.139881 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.003459 0.832301 0.000044 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000528 2.001107 2.073641 0.000031 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000166 2.077600 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000002 1.052608 0.000002 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 1.267300 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 0.001542 0.000509 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.065673 0.065673 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.056217 0.897651 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000001 2.140175 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.001094 2.019999 0.000072 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.005740 2.109392 0.000401 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.002523 2.099674 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000025 2.000502 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000006 2.071679 0.004777 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.046212 0.000868 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 1.686160 0.006933 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.012141 0.012141 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 1.869050 0.595320 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000010 2.135959 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.032965 0.003951 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000167 2.011027 1.614064 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.008201 2.130994 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.001317 0.000149 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000018 2.000052 0.479518 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000011 0.009351 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.024287 1.836439 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 0.002121 0.002121 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 1.618024 0.412567 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000053 2.110351 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.044807 0.155682 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.015639 2.109965 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.019203 2.141665 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.002998 0.003921 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000080 1.996841 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000000 0.804041 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + 2.000000 2.000000 2.000000 2.000200 2.086681 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 + occopt 4 + ortalg -2 + paral_kgb 1 + rprim 5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + -5.0503958866E+00 2.9158474246E+00 0.0000000000E+00 + 0.0000000000E+00 0.0000000000E+00 6.6575051698E+00 + shiftk 0.00000000E+00 0.00000000E+00 5.00000000E-01 + spgroup 191 + strten 6.1952569136E-04 6.1952569137E-04 5.3553428305E-04 + 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + symrel 1 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1 + 0 1 0 1 0 0 0 0 1 0 -1 0 -1 0 0 0 0 -1 + 1 1 0 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 -1 + -1 0 0 1 1 0 0 0 1 1 0 0 -1 -1 0 0 0 -1 + 0 1 0 -1 -1 0 0 0 1 0 -1 0 1 1 0 0 0 -1 + -1 -1 0 0 1 0 0 0 1 1 1 0 0 -1 0 0 0 -1 + -1 0 0 0 -1 0 0 0 1 1 0 0 0 1 0 0 0 -1 + 0 -1 0 -1 0 0 0 0 1 0 1 0 1 0 0 0 0 -1 + -1 -1 0 1 0 0 0 0 1 1 1 0 -1 0 0 0 0 -1 + 1 0 0 -1 -1 0 0 0 1 -1 0 0 1 1 0 0 0 -1 + 0 -1 0 1 1 0 0 0 1 0 1 0 -1 -1 0 0 0 -1 + 1 1 0 0 -1 0 0 0 1 -1 -1 0 0 1 0 0 0 -1 + timopt -1 + tolvrs 1.00000000E-06 + tsmear 3.00000000E-02 Hartree + typat 1 2 2 + wfoptalg 14 + wtk 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 0.00391 0.02344 + 0.02344 0.02344 0.01172 0.02344 0.04688 0.04688 + 0.02344 0.02344 0.00391 0.02344 0.02344 0.02344 + 0.01172 0.02344 0.04688 0.04688 0.02344 0.02344 + 0.00391 0.02344 0.02344 0.02344 0.01172 0.02344 + 0.04688 0.04688 0.02344 0.02344 + xangst 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + 8.9085146585E-01 1.5430000008E+00 1.7615000010E+00 + xcart 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + -1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + 1.6834652955E+00 2.9158474246E+00 3.3287525849E+00 + xred 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 + 3.3333333333E-01 6.6666666667E-01 5.0000000000E-01 + 6.6666666667E-01 3.3333333333E-01 5.0000000000E-01 + znucl 12.00000 5.00000 + +================================================================================ + + +================================================================================ + + Suggested references for the acknowledgment of ABINIT usage. + + The users of ABINIT have little formal obligations with respect to the ABINIT group + (those specified in the GNU General Public License, http://www.gnu.org/copyleft/gpl.txt). + However, it is common practice in the scientific literature, + to acknowledge the efforts of people that have made the research possible. + In this spirit, please find below suggested citations of work written by ABINIT developers, + corresponding to implementations inside of ABINIT that you have used in the present run. + Note also that it will be of great value to readers of publications presenting these results, + to read papers enabling them to understand the theoretical formalism and details + of the ABINIT implementation. + For information on why they are suggested, see also http://www.abinit.org/about/?text=acknowledgments. + + [1] Large scale ab initio calculations based on three levels of parallelization + F. Bottin, S. Leroux, A. Knyazev, G. Zerah, Comput. Mat. Science 42, 329, (2008). + Comment : in case paral_kgb is non-zero. Strong suggestion to cite this paper in your publications. + This paper is also available at http://www.arxiv.org/abs/0707.3405 + + [2] ABINIT : First-principles approach of materials and nanosystem properties. + X. Gonze, B. Amadon, P.-M. Anglade, J.-M. Beuken, F. Bottin, P. Boulanger, F. Bruneval, + D. Caliste, R. Caracas, M. Cote, T. Deutsch, L. Genovese, Ph. Ghosez, M. Giantomassi + S. Goedecker, D.R. Hamann, P. Hermet, F. Jollet, G. Jomard, S. Leroux, M. Mancini, S. Mazevet, + M.J.T. Oliveira, G. Onida, Y. Pouillon, T. Rangel, G.-M. Rignanese, D. Sangalli, R. Shaltaf, + M. Torrent, M.J. Verstraete, G. Zerah, J.W. Zwanziger + Computer Phys. Comm. 180, 2582-2615 (2009). + Comment : the third generic paper describing the ABINIT project. + Note that a version of this paper, that is not formatted for Computer Phys. Comm. + is available at http://www.abinit.org/about/ABINIT_CPC_v10.pdf . + The licence allows the authors to put it on the Web. + + [3] A brief introduction to the ABINIT software package. + X. Gonze, G.-M. Rignanese, M. Verstraete, J.-M. Beuken, Y. Pouillon, R. Caracas, F. Jollet, + M. Torrent, G. Zerah, M. Mikami, Ph. Ghosez, M. Veithen, J.-Y. Raty, V. Olevano, F. Bruneval, + L. Reining, R. Godby, G. Onida, D.R. Hamann, and D.C. Allan. + Z. Kristallogr. 220, 558-562 (2005). + Comment : the second generic paper describing the ABINIT project. Note that this paper + should be cited especially if you are using the GW part of ABINIT, as several authors + of this part are not in the list of authors of the first or third paper. + The .pdf of the latter paper is available at http://www.abinit.org/about/zfk_0505-06_558-562.pdf. + Note that it should not redistributed (Copyright by Oldenburg Wissenshaftverlag, + the licence allows the authors to put it on the Web). + + + And optionally : + + [4] First-principles computation of material properties : the ABINIT software project. + X. Gonze, J.-M. Beuken, R. Caracas, F. Detraux, M. Fuchs, G.-M. Rignanese, L. Sindic, + M. Verstraete, G. Zerah, F. Jollet, M. Torrent, A. Roy, M. Mikami, Ph. Ghosez, J.-Y. Raty, D.C. Allan. + Computational Materials Science 25, 478-492 (2002). http://dx.doi.org/10.1016/S0927-0256(02)00325-7 + Comment : the original paper describing the ABINIT project. + + [5] Fast radix 2, 3, 4 and 5 kernels for Fast Fourier Transformations + on computers with overlapping multiply-add instructions. + S. Goedecker, SIAM J. on Scientific Computing 18, 1605 (1997). + Proc. 0 individual time (sec): cpu= 5.1 wall= 5.2 + + Calculation completed. +.Delivered 0 WARNINGs and 0 COMMENTs to log file. +--- !FinalSummary +start_datetime: Fri Mar 13 20:08:51 2015 +end_datetime: Fri Mar 13 20:08:57 2015 +overall_cpu_time: 10.2 +overall_wall_time: 10.3 +... diff --git a/abipy/tools/SimpleHTTPServer.py b/abipy/tools/SimpleHTTPServer.py deleted file mode 100644 index 8fe7b70b4..000000000 --- a/abipy/tools/SimpleHTTPServer.py +++ /dev/null @@ -1,228 +0,0 @@ -"""Simple HTTP Server. - -This module builds on BaseHTTPServer by implementing the standard GET -and HEAD requests in a fairly straightforward manner. - -""" -# Replace for py3k SimpleHTTPRequestHandler compatibile with py2.7 -# Taken from https://github.com/enthought/Python-2.7.3/blob/master/Lib/SimpleHTTPServer.py - -__version__ = "0.6" - -__all__ = ["SimpleHTTPRequestHandler"] - -import os -import posixpath -try: - # py2k - from BaseHTTPServer import BaseHTTPRequestHandler -except ImportError: - from http.server import SimpleHTTPRequestHandler as BaseHTTPRequestHandler -import urllib -import cgi -import sys -import shutil -import mimetypes - -#try: -# from cStringIO import StringIO -#except ImportError: -# from StringIO import StringIO -# py2-py3 -from six.moves import cStringIO as StringIO - - -class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): # pragma: no cover - - """Simple HTTP request handler with GET and HEAD commands. - - This serves files from the current directory and any of its - subdirectories. The MIME type for files is determined by - calling the .guess_type() method. - - The GET and HEAD requests are identical except that the HEAD - request omits the actual contents of the file. - - """ - - server_version = "SimpleHTTP/" + __version__ - - def do_GET(self): - """Serve a GET request.""" - f = self.send_head() - if f: - self.copyfile(f, self.wfile) - f.close() - - def do_HEAD(self): - """Serve a HEAD request.""" - f = self.send_head() - if f: - f.close() - - def send_head(self): - """Common code for GET and HEAD commands. - - This sends the response code and MIME headers. - - Return value is either a file object (which has to be copied - to the outputfile by the caller unless the command was HEAD, - and must be closed by the caller under all circumstances), or - None, in which case the caller has nothing further to do. - - """ - path = self.translate_path(self.path) - f = None - if os.path.isdir(path): - if not self.path.endswith('/'): - # redirect browser - doing basically what apache does - self.send_response(301) - self.send_header("Location", self.path + "/") - self.end_headers() - return None - for index in "index.html", "index.htm": - index = os.path.join(path, index) - if os.path.exists(index): - path = index - break - else: - return self.list_directory(path) - ctype = self.guess_type(path) - try: - # Always read in binary mode. Opening files in text mode may cause - # newline translations, making the actual size of the content - # transmitted *less* than the content-length! - f = open(path, 'rb') - except IOError: - self.send_error(404, "File not found") - return None - self.send_response(200) - self.send_header("Content-type", ctype) - fs = os.fstat(f.fileno()) - self.send_header("Content-Length", str(fs[6])) - self.send_header("Last-Modified", self.date_time_string(fs.st_mtime)) - self.end_headers() - return f - - def list_directory(self, path): - """Helper to produce a directory listing (absent index.html). - - Return value is either a file object, or None (indicating an - error). In either case, the headers are sent, making the - interface the same as for send_head(). - - """ - try: - list = os.listdir(path) - except os.error: - self.send_error(404, "No permission to list directory") - return None - list.sort(key=lambda a: a.lower()) - f = StringIO() - displaypath = cgi.escape(urllib.unquote(self.path)) - f.write('') - f.write("\nDirectory listing for %s\n" % displaypath) - f.write("\n

    Directory listing for %s

    \n" % displaypath) - f.write("
    \n
      \n") - for name in list: - fullname = os.path.join(path, name) - displayname = linkname = name - # Append / for directories or @ for symbolic links - if os.path.isdir(fullname): - displayname = name + "/" - linkname = name + "/" - if os.path.islink(fullname): - displayname = name + "@" - # Note: a link to a directory displays with @ and links with / - f.write('
    • %s\n' - % (urllib.quote(linkname), cgi.escape(displayname))) - f.write("
    \n
    \n\n\n") - length = f.tell() - f.seek(0) - self.send_response(200) - encoding = sys.getfilesystemencoding() - self.send_header("Content-type", "text/html; charset=%s" % encoding) - self.send_header("Content-Length", str(length)) - self.end_headers() - return f - - def translate_path(self, path): - """Translate a /-separated PATH to the local filename syntax. - - Components that mean special things to the local file system - (e.g. drive or directory names) are ignored. (XXX They should - probably be diagnosed.) - - """ - # abandon query parameters - path = path.split('?',1)[0] - path = path.split('#',1)[0] - path = posixpath.normpath(urllib.unquote(path)) - words = path.split('/') - words = filter(None, words) - path = os.getcwd() - for word in words: - drive, word = os.path.splitdrive(word) - head, word = os.path.split(word) - if word in (os.curdir, os.pardir): continue - path = os.path.join(path, word) - return path - - def copyfile(self, source, outputfile): - """Copy all data between two file objects. - - The SOURCE argument is a file object open for reading - (or anything with a read() method) and the DESTINATION - argument is a file object open for writing (or - anything with a write() method). - - The only reason for overriding this would be to change - the block size or perhaps to replace newlines by CRLF - -- note however that this the default server uses this - to copy binary data as well. - - """ - shutil.copyfileobj(source, outputfile) - - def guess_type(self, path): - """Guess the type of a file. - - Argument is a PATH (a filename). - - Return value is a string of the form type/subtype, - usable for a MIME Content-type header. - - The default implementation looks the file's extension - up in the table self.extensions_map, using application/octet-stream - as a default; however it would be permissible (if - slow) to look inside the data to make a better guess. - - """ - - base, ext = posixpath.splitext(path) - if ext in self.extensions_map: - return self.extensions_map[ext] - ext = ext.lower() - if ext in self.extensions_map: - return self.extensions_map[ext] - else: - return self.extensions_map[''] - - if not mimetypes.inited: - mimetypes.init() # try to read system mime.types - extensions_map = mimetypes.types_map.copy() - extensions_map.update({ - '': 'application/octet-stream', # Default - '.py': 'text/plain', - '.c': 'text/plain', - '.h': 'text/plain', - }) - - -#def test(HandlerClass = SimpleHTTPRequestHandler, -# ServerClass = BaseHTTPServer.HTTPServer): -# BaseHTTPServer.test(HandlerClass, ServerClass) - - -#if __name__ == '__main__': -# test() diff --git a/abipy/tools/__init__.py b/abipy/tools/__init__.py index a44fbff48..743d0a146 100644 --- a/abipy/tools/__init__.py +++ b/abipy/tools/__init__.py @@ -1,43 +1,2 @@ # coding: utf-8 """Helper functions.""" -from __future__ import print_function, division, absolute_import, unicode_literals - -from .devtools import * -from .iotools import * -from .numtools import * -from .text import * - - -class NoDefaultProvided(object): - pass - - -def hasattrd(obj, name): - """ - The arguments are an object and a string. - The result is True if the string is the name of one of the object’s attributes, False if not. - Unlike the builtin hasattr, hasattrd supports dot notation e.g. hasattr(int, "__class__.__name__") - (This is implemented by calling getattrd(object, name) and seeing whether it raises an exception or not.) - """ - try: - getattrd(obj, name) - return True - except AttributeError: - return False - - -def getattrd(obj, name, default=NoDefaultProvided): - """ - Same as getattr(), but allows dot notation lookup e.g. getattrd(obj, "a.b") - - Raises: AttributeError if ``name`` is not found and ``default`` is not given. - - Discussed in: http://stackoverflow.com/questions/11975781 - """ - from functools import reduce - try: - return reduce(getattr, name.split("."), obj) - except AttributeError: - if default is not NoDefaultProvided: - return default - raise diff --git a/abipy/tools/bessel.py b/abipy/tools/bessel.py index c5dcc6fdf..182bb2acf 100644 --- a/abipy/tools/bessel.py +++ b/abipy/tools/bessel.py @@ -1,10 +1,7 @@ # coding: utf-8 """This module provides functions to compute integrals of Bessel functions.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np -from collections import deque from scipy.special import spherical_jn from scipy.interpolate import UnivariateSpline from scipy.integrate import simps # cumtrapz, quad diff --git a/abipy/tools/decorators.py b/abipy/tools/decorators.py index 339f6b030..4184fefae 100644 --- a/abipy/tools/decorators.py +++ b/abipy/tools/decorators.py @@ -1,6 +1,6 @@ # coding: utf-8 """Decorators.""" -from __future__ import print_function, division, unicode_literals, absolute_import +import time from functools import wraps @@ -19,3 +19,19 @@ def wrapper(*args, **kwargs): import traceback return traceback.format_exc() return wrapper + + +def timeit(method): + """ + timeit decorator adapted from: + https://medium.com/pythonhive/python-decorator-to-measure-the-execution-time-of-methods-fa04cb6bb36d + sets the timing of the routine as an attribute of the class + """ + def timed(self, *args, **kw): + ts = time.time() + result = method(self, *args, **kw) + te = time.time() + + setattr(self,"time_"+method.__name__, (te - ts) * 1000) + return result + return timed diff --git a/abipy/tools/derivatives.py b/abipy/tools/derivatives.py index 5e4c68ebb..daa7d1bac 100644 --- a/abipy/tools/derivatives.py +++ b/abipy/tools/derivatives.py @@ -1,9 +1,9 @@ # coding: utf-8 """Tools for computing derivatives by finite differences.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np +from monty.collections import dict2namedtuple + __all__ = [ "finite_diff", ] @@ -16,6 +16,7 @@ def rearr(array): # See http://en.wikipedia.org/wiki/Finite_difference_coefficients # Derivative Accuracy -4 -3 -2 -1 0 1 2 3 4 + central_fdiff_weights = { 1: { 2: rearr([-1/2, 0, 1/2]), @@ -89,35 +90,34 @@ def rearr(array): d[ord][accuracy] = ((-1)**ord) * weights[-1::-1] -def finite_diff(arr, h, order=1, acc=4): +def finite_diff(arr, h, order=1, acc=4, index=None): """ Compute the derivative of order `order` by finite difference. For each point in arr, the function tries to use central differences and fallbacks to forward/backward approximations for points that are close to the extrema. - Note that high accuracy levels can fail and raise `ValueError` if not enough points - are available in `arr`. + Note that high accuracy levels can fail and raise `ValueError` if not enough points are available in `arr`. Args: arr: Input array with y-values. h: Spacing along x order: Derivative order acc: accuracy level. + index: If not None, gives the index of the single element in arr where the derivative is wanted. + In this case a namedtuple with the derivative, the number of points used and the mode is returned Return: - numpy array. + numpy array or (value, npts, mode) if index is not None . """ arr = np.asarray(arr) if np.iscomplexobj(arr): - raise ValueError("Derivatives of complex functions are not supported") + raise ValueError("Derivatives of complex functions are not supported!") # Retrieve weights. try: centr_ws = central_fdiff_weights[order][acc] - forw_ws = forward_fdiff_weights[order][acc] - back_ws = backward_fdiff_weights[order][acc] except KeyError: - raise ValueError("Weights for order %s, accuracy %s are missing!" % (order, acc)) + raise ValueError("Centeral diff weights for order: %s, and accuracy: %s are missing!" % (order, acc)) npsum = np.sum ders = np.empty(arr.shape) @@ -125,33 +125,43 @@ def finite_diff(arr, h, order=1, acc=4): cpad = len(centr_ws) // 2 for i in range(n): + if index is not None and i != index: continue start = i - cpad stop = i + cpad + 1 if start >= 0 and stop <= n: # Can do central difference. ders[i] = npsum(centr_ws * arr[start:stop]) + npts = len(centr_ws) + mode = "central" elif start < 0: # Try forward. + forw_ws = forward_fdiff_weights[order][acc] stop = i + len(forw_ws) if stop > n: raise ValueError( - ("Don't have enough points for index=%s in array of len=%s\n" - "to compute foward finite difference with order=%s, and acc=%s (nweights=%s)\n" - "Decrease acc or increase the sampling" % (i, n, order, acc, len(forw_ws)) - )) + ("\n\tDon't have enough points for index: %s in array of lenght: %s\n" + + "\tto compute forward finite difference with order: %s, and acc: %s (num_weights: %s)\n" + + "\tDecrease acc or increase the number of sampling points.") % (i, n, order, acc, len(forw_ws))) ders[i] = npsum(forw_ws * arr[i:stop]) + npts = len(forw_ws) + mode = "forward" elif stop > n: # Try backward. + back_ws = backward_fdiff_weights[order][acc] start = i - len(back_ws) + 1 if start < 0: raise ValueError( - ("Don't have enough points for index=%s in array of len=%s\n" - "to compute backward finite difference with order=%s, and acc=%s (nweights=%s)\n" - "Decrease acc or increase the sampling" % (i, n, order, acc, len(back_ws)) - )) + ("\n\tDon't have enough points for index: %s in array of length: %s\n" + + "\tto compute backward finite difference with order: %s, and acc: %s (num_weights: %s)\n" + + "\tDecrease acc or increase the number of sampling points.") % (i, n, order, acc, len(back_ws))) ders[i] = npsum(back_ws * arr[start:i+1]) + npts = len(back_ws) + mode = "backward" - return ders/(h**order) + if index is None: + return ders / (h ** order) + else: + return dict2namedtuple(value=ders[index] / (h ** order), npts=npts, mode=mode) diff --git a/abipy/tools/devtools.py b/abipy/tools/devtools.py index 72ad6e816..15008f28e 100644 --- a/abipy/tools/devtools.py +++ b/abipy/tools/devtools.py @@ -1,6 +1,4 @@ # coding: utf-8 -from __future__ import print_function, division, unicode_literals, absolute_import - import os import tempfile import warnings @@ -84,8 +82,7 @@ def difflib(self, **kwargs): import difflib #diff = difflib.HtmlDiff().make_table(fromlines, tolines, diff = difflib.HtmlDiff().make_file(fromlines, tolines, - self.filepaths[0], path) - #context=options.c, numlines=n) + self.filepaths[0], path) #context=options.c, numlines=n) with open(tmpname, "wt") as fh: fh.writelines(diff) diff --git a/abipy/tools/duck.py b/abipy/tools/duck.py index 6519ac9ed..7375e89c4 100644 --- a/abipy/tools/duck.py +++ b/abipy/tools/duck.py @@ -1,7 +1,5 @@ # coding: utf-8 """Duck-typing tests""" -from __future__ import print_function, division, unicode_literals, absolute_import - import collections import warnings import numpy as np @@ -48,7 +46,7 @@ def is_number_like(obj): def is_listlike(obj): #if isinstance(branch, (list, tuple, np.ndarray)): if isinstance(obj, np.ndarray): return True - if not isinstance(obj, collections.Sequence): return False + if not isinstance(obj, collections.abc.Sequence): return False if is_string(obj): return False try: @@ -94,7 +92,7 @@ def torange(obj): else: try: return obj.__iter__() - except: + except Exception: raise TypeError("Don't know how to convert %s into a range object" % str(obj)) @@ -130,3 +128,38 @@ def as_slice(obj): return slice(*tokens) raise ValueError("Cannot convert %s into a slice:\n%s" % (type(obj), obj)) + + +class NoDefaultProvided(object): + pass + + +def hasattrd(obj, name): + """ + The arguments are an object and a string. + The result is True if the string is the name of one of the object’s attributes, False if not. + Unlike the builtin hasattr, hasattrd supports dot notation e.g. hasattr(int, "__class__.__name__") + (This is implemented by calling getattrd(object, name) and seeing whether it raises an exception or not.) + """ + try: + getattrd(obj, name) + return True + except AttributeError: + return False + + +def getattrd(obj, name, default=NoDefaultProvided): + """ + Same as getattr(), but allows dot notation lookup e.g. getattrd(obj, "a.b") + + Raises: AttributeError if ``name`` is not found and ``default`` is not given. + + Discussed in: http://stackoverflow.com/questions/11975781 + """ + from functools import reduce + try: + return reduce(getattr, name.split("."), obj) + except AttributeError: + if default is not NoDefaultProvided: + return default + raise diff --git a/abipy/tools/fftprof.py b/abipy/tools/fftprof.py index 741fa50e7..108b77605 100644 --- a/abipy/tools/fftprof.py +++ b/abipy/tools/fftprof.py @@ -2,9 +2,6 @@ Python interface to fftprof. Provides objects to benchmark the FFT libraries used by ABINIT and plot the results with matplotlib. """ -from __future__ import print_function, division, unicode_literals, absolute_import - -import sys import os import tempfile import numpy as np @@ -12,7 +9,7 @@ from subprocess import Popen, PIPE from monty.os.path import which from monty.fnmatch import WildCard -from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt +from abipy.tools.plotting import add_fig_kwargs __all__ = [ "FFTBenchmark", diff --git a/abipy/tools/functools_lru_cache.py b/abipy/tools/functools_lru_cache.py deleted file mode 100644 index 86e3f4acc..000000000 --- a/abipy/tools/functools_lru_cache.py +++ /dev/null @@ -1,187 +0,0 @@ -# pragma: no cover -# Backport of functools_lru_cache -# Taken from https://github.com/jaraco/backports.functools_lru_cache -from __future__ import absolute_import - -import functools -from collections import namedtuple -from threading import RLock - -_CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"]) - - -@functools.wraps(functools.update_wrapper) -def update_wrapper(wrapper, - wrapped, - assigned = functools.WRAPPER_ASSIGNMENTS, - updated = functools.WRAPPER_UPDATES): - """ - Patch two bugs in functools.update_wrapper. - """ - # workaround for http://bugs.python.org/issue3445 - assigned = tuple(attr for attr in assigned if hasattr(wrapped, attr)) - wrapper = functools.update_wrapper(wrapper, wrapped, assigned, updated) - # workaround for https://bugs.python.org/issue17482 - wrapper.__wrapped__ = wrapped - return wrapper - - -class _HashedSeq(list): - __slots__ = 'hashvalue' - - def __init__(self, tup, hash=hash): - self[:] = tup - self.hashvalue = hash(tup) - - def __hash__(self): - return self.hashvalue - - -def _make_key(args, kwds, typed, - kwd_mark=(object(),), - fasttypes=set([int, str, frozenset, type(None)]), - sorted=sorted, tuple=tuple, type=type, len=len): - 'Make a cache key from optionally typed positional and keyword arguments' - key = args - if kwds: - sorted_items = sorted(kwds.items()) - key += kwd_mark - for item in sorted_items: - key += item - if typed: - key += tuple(type(v) for v in args) - if kwds: - key += tuple(type(v) for k, v in sorted_items) - elif len(key) == 1 and type(key[0]) in fasttypes: - return key[0] - return _HashedSeq(key) - - -def lru_cache(maxsize=100, typed=False): - """Least-recently-used cache decorator. - - If *maxsize* is set to None, the LRU features are disabled and the cache - can grow without bound. - - If *typed* is True, arguments of different types will be cached separately. - For example, f(3.0) and f(3) will be treated as distinct calls with - distinct results. - - Arguments to the cached function must be hashable. - - View the cache statistics named tuple (hits, misses, maxsize, currsize) with - f.cache_info(). Clear the cache and statistics with f.cache_clear(). - Access the underlying function with f.__wrapped__. - - See: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used - - """ - - # Users should only access the lru_cache through its public API: - # cache_info, cache_clear, and f.__wrapped__ - # The internals of the lru_cache are encapsulated for thread safety and - # to allow the implementation to change (including a possible C version). - - def decorating_function(user_function): - - cache = dict() - stats = [0, 0] # make statistics updateable non-locally - HITS, MISSES = 0, 1 # names for the stats fields - make_key = _make_key - cache_get = cache.get # bound method to lookup key or return None - _len = len # localize the global len() function - lock = RLock() # because linkedlist updates aren't threadsafe - root = [] # root of the circular doubly linked list - root[:] = [root, root, None, None] # initialize by pointing to self - nonlocal_root = [root] # make updateable non-locally - PREV, NEXT, KEY, RESULT = 0, 1, 2, 3 # names for the link fields - - if maxsize == 0: - - def wrapper(*args, **kwds): - # no caching, just do a statistics update after a successful call - result = user_function(*args, **kwds) - stats[MISSES] += 1 - return result - - elif maxsize is None: - - def wrapper(*args, **kwds): - # simple caching without ordering or size limit - key = make_key(args, kwds, typed) - result = cache_get(key, root) # root used here as a unique not-found sentinel - if result is not root: - stats[HITS] += 1 - return result - result = user_function(*args, **kwds) - cache[key] = result - stats[MISSES] += 1 - return result - - else: - - def wrapper(*args, **kwds): - # size limited caching that tracks accesses by recency - key = make_key(args, kwds, typed) if kwds or typed else args - with lock: - link = cache_get(key) - if link is not None: - # record recent use of the key by moving it to the front of the list - root, = nonlocal_root - link_prev, link_next, key, result = link - link_prev[NEXT] = link_next - link_next[PREV] = link_prev - last = root[PREV] - last[NEXT] = root[PREV] = link - link[PREV] = last - link[NEXT] = root - stats[HITS] += 1 - return result - result = user_function(*args, **kwds) - with lock: - root, = nonlocal_root - if key in cache: - # getting here means that this same key was added to the - # cache while the lock was released. since the link - # update is already done, we need only return the - # computed result and update the count of misses. - pass - elif _len(cache) >= maxsize: - # use the old root to store the new key and result - oldroot = root - oldroot[KEY] = key - oldroot[RESULT] = result - # empty the oldest link and make it the new root - root = nonlocal_root[0] = oldroot[NEXT] - oldkey = root[KEY] - root[KEY] = root[RESULT] = None - # now update the cache dictionary for the new links - del cache[oldkey] - cache[key] = oldroot - else: - # put result in a new link at the front of the list - last = root[PREV] - link = [last, root, key, result] - last[NEXT] = root[PREV] = cache[key] = link - stats[MISSES] += 1 - return result - - def cache_info(): - """Report cache statistics""" - with lock: - return _CacheInfo(stats[HITS], stats[MISSES], maxsize, len(cache)) - - def cache_clear(): - """Clear the cache and cache statistics""" - with lock: - cache.clear() - root = nonlocal_root[0] - root[:] = [root, root, None, None] - stats[:] = [0, 0] - - wrapper.__wrapped__ = user_function - wrapper.cache_info = cache_info - wrapper.cache_clear = cache_clear - return update_wrapper(wrapper, user_function) - - return decorating_function diff --git a/abipy/tools/iotools.py b/abipy/tools/iotools.py index c5df114e0..1c6d3d131 100644 --- a/abipy/tools/iotools.py +++ b/abipy/tools/iotools.py @@ -1,15 +1,46 @@ # coding: utf-8 """IO related utilities.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os -import tempfile +from contextlib import ExitStack from subprocess import call from monty.termcolor import cprint from monty.string import list_strings +class ExitStackWithFiles(ExitStack): + """ + Context manager for dynamic management of a stack of file-like objects. + Mainly used in a callee that needs to return files to the caller + + Usage example: + + .. code-block:: python + + exit_stack = ExitStackWithFiles() + exit_stack.enter_context(phbst_file) + return exit_stack + """ + def __init__(self): + self.files = [] + super().__init__() + + def enter_context(self, myfile): + # If my file is None, we add it to files but without registering the callback. + self.files.append(myfile) + if myfile is not None: + return super().enter_context(myfile) + + def __iter__(self): + return self.files.__iter__() + + def __next__(self): + return self.files.__next__() + + def __getitem__(self, slice): + return self.files.__getitem__(slice) + + def ask_yes_no(prompt, default=None): # pragma: no cover """ Ask a question and return a boolean (y/n) answer. @@ -82,7 +113,7 @@ def __init__(self, editor=None): def edit_file(self, fname): retcode = call([self.editor, fname]) if retcode != 0: - cprint("Retcode %s while editing file: %s" % (retcode, fname) ,"red") + cprint("Retcode %s while editing file: %s" % (retcode, fname), "red") return retcode def edit_files(self, fnames, ask_for_exit=True): diff --git a/abipy/tools/notebooks.py b/abipy/tools/notebooks.py index 74545d867..ae63deaca 100644 --- a/abipy/tools/notebooks.py +++ b/abipy/tools/notebooks.py @@ -1,5 +1,4 @@ """Tools for ipython notebooks.""" -from __future__ import print_function, division, unicode_literals, absolute_import def print_source_in_module(function, module): # pragma: no cover @@ -36,11 +35,38 @@ def print_source(function, **kwargs): # pragma: no cover from pygments.lexers import PythonLexer from pygments.formatters import HtmlFormatter from IPython.core.display import HTML - if "full" not in kwargs: kwargs["full"] = True + if "full" not in kwargs: kwargs["full"] = True return HTML(highlight(getsource(function), PythonLexer(), HtmlFormatter(**kwargs))) +def print_doc(function, **kwargs): # pragma: no cover + """ + For use inside a jupyter_ notebook: given a function, print the docstring. + + Args: + **kwargs: Passed to HtmlFormatter + + Return: + HTML string. + """ + from inspect import getsource + from pygments import highlight + from pygments.lexers import PythonLexer + from pygments.formatters import HtmlFormatter + from IPython.core.display import HTML + + # Extract source code up to end of docstring. + lines, count = [], 0 + for l in getsource(function).splitlines(): + lines.append(l) + if l.lstrip().startswith('"""'): count += 1 + if count == 2: break + + if "full" not in kwargs: kwargs["full"] = True + return HTML(highlight("\n".join(lines), PythonLexer(), HtmlFormatter(**kwargs))) + + def ipw_listdir(top=".", recurse=True, widget_type="dropdown"): # pragma: no cover """ Return an ipython widget listing all the files located within the directory ``top`` diff --git a/abipy/tools/numtools.py b/abipy/tools/numtools.py index 5242773f1..e43b6747b 100644 --- a/abipy/tools/numtools.py +++ b/abipy/tools/numtools.py @@ -1,9 +1,6 @@ # coding: utf-8 """Numeric tools.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np -import bisect as bs from monty.collections import dict2namedtuple from abipy.tools import duck @@ -62,6 +59,51 @@ def add_periodic_replicas(arr): return oarr + +def data_from_cplx_mode(cplx_mode, arr, tol=None): + """ + Extract the data from the numpy array ``arr`` depending on the values of ``cplx_mode``. + + Args: + cplx_mode: Possible values in ("re", "im", "abs", "angle") + "re" for the real part, + "im" for the imaginary part. + "all" for both re and im. + "abs" means that the absolute value of the complex number is shown. + "angle" will display the phase of the complex number in radians. + tol: If not None, values below tol are set to zero. Cannot be used with "angle" + """ + if cplx_mode == "re": + val = arr.real + elif cplx_mode == "im": + val = arr.imag + elif cplx_mode == "all": + val = arr + elif cplx_mode == "abs": + val = np.abs(arr) + elif cplx_mode == "angle": + val = np.angle(arr, deg=False) + if tol is not None: + raise ValueError("Tol cannot be used with cplx_mode = angle") + else: + raise ValueError("Unsupported mode `%s`" % str(cplx_mode)) + + return val if tol is None else np.where(np.abs(val) > tol, val, 0) + + +def is_diagonal(matrix, atol=1e-12): + """ + Return True if matrix is diagonal. + """ + m = matrix.copy() + np.fill_diagonal(m, 0) + + if issubclass(matrix.dtype.type, np.integer): + return np.all(m == 0) + else: + return np.all(np.abs(m) <= atol) + + ######################################################################################### # Tools to facilitate iterations ######################################################################################### @@ -152,6 +194,7 @@ def prune_ord(alist): # Special functions ######################################################################################### + def gaussian(x, width, center=0.0, height=None): """ Returns the values of gaussian(x) where x is array-like. @@ -187,6 +230,7 @@ def lorentzian(x, width, center=0.0, height=None): # === Data Interpolation/Smoothing === #===================================== + def smooth(x, window_len=11, window='hanning'): """ smooth the data using a window with requested size. @@ -392,7 +436,7 @@ def eval_points(self, frac_coords, idt=None, cartesian=False, kpoint=None): frac_coords = np.reshape(frac_coords, (-1, 3)) if cartesian: red_from_cart = self.structure.lattice.inv_matrix.T - frac_coords = [np.dot(red_from, v) for v in frac_coords] + frac_coords = [np.dot(red_from_cart, v) for v in frac_coords] uc_coords = np.reshape(frac_coords, (-1, 3)) % 1 @@ -409,3 +453,36 @@ def eval_points(self, frac_coords, idt=None, cartesian=False, kpoint=None): values *= np.exp(2j * np.pi * np.dot(frac_coords, kpoint)) return values + + +def find_degs_sk(enesb, atol): + """ + Return list of lists with the indices of the degenerated bands. + + Args: + enesb: Iterable with energies for the different bands. + Energies are assumed to be ordered. + atol: Absolute tolerance. Two states are degenerated if they differ by less than `atol`. + + Return: + List of lists. The i-th item contains the indices of the degenerates states + for the i-th degenerated set. + + :Examples: + + >>> find_degs_sk([1, 1, 2, 3.4, 3.401], atol=0.01) + [[0, 1], [2], [3, 4]] + """ + ndeg = 0 + degs = [[0]] + e0 = enesb[0] + for ib, ee in enumerate(enesb[1:]): + ib += 1 + if abs(ee - e0) > atol: + e0 = ee + ndeg += 1 + degs.append([ib]) + else: + degs[ndeg].append(ib) + + return degs diff --git a/abipy/tools/plotting.py b/abipy/tools/plotting.py index bfcb06af3..7c53bf870 100644 --- a/abipy/tools/plotting.py +++ b/abipy/tools/plotting.py @@ -6,17 +6,14 @@ Avoid importing matplotlib in the module namespace otherwise startup is very slow. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import os import time import itertools import numpy as np from collections import OrderedDict, namedtuple -from monty.string import list_strings -from monty.functools import lazy_property from pymatgen.util.plotting import add_fig_kwargs, get_ax_fig_plt, get_ax3d_fig_plt, get_axarray_fig_plt +from .numtools import data_from_cplx_mode __all__ = [ @@ -62,6 +59,30 @@ def ax_append_title(ax, title, loc="center", fontsize=None): return new_title +def ax_share(xy_string, *ax_list): + """ + Share x- or y-axis of two or more subplots after they are created + + Args: + xy_string: "x" to share x-axis, "xy" for both + ax_list: List of axes to share. + + Example: + + ax_share("y", ax0, ax1) + ax_share("xy", *(ax0, ax1, ax2)) + """ + if "x" in xy_string: + for ix, ax in enumerate(ax_list): + others = [a for a in ax_list if a != ax] + ax.get_shared_x_axes().join(*others) + + if "y" in xy_string: + for ix, ax in enumerate(ax_list): + others = [a for a in ax_list if a != ax] + ax.get_shared_y_axes().join(*others) + + #def set_grid(fig, boolean): # if hasattr(fig, "axes"): # for ax in fig.axes: @@ -117,8 +138,6 @@ def set_visible(ax, boolean, *args): Hide/Show the artists of axis ax listed in args. """ if "legend" in args and ax.legend(): - #handles, labels = ax.get_legend_handles_labels() - #if handles: ax.legend().set_visible(boolean) if "title" in args and ax.title: ax.title.set_visible(boolean) @@ -126,6 +145,12 @@ def set_visible(ax, boolean, *args): ax.xaxis.label.set_visible(boolean) if "ylabel" in args and ax.yaxis.label: ax.yaxis.label.set_visible(boolean) + if "xticklabels" in args: + for label in ax.get_xticklabels(): + label.set_visible(boolean) + if "yticklabels" in args: + for label in ax.get_yticklabels(): + label.set_visible(boolean) def rotate_ticklabels(ax, rotation, axname="x"): @@ -138,24 +163,6 @@ def rotate_ticklabels(ax, rotation, axname="x"): tick.set_rotation(rotation) -def data_from_cplx_mode(cplx_mode, arr): - """ - Extract the data from the numpy array ``arr`` depending on the values of ``cplx_mode``. - - Args: - cplx_mode: Possible values in ("re", "im", "abs", "angle") - "re" for the real part, - "im" for the imaginary part. - "abs" means that the absolute value of the complex number is shown. - "angle" will display the phase of the complex number in radians. - """ - if cplx_mode == "re": return arr.real - if cplx_mode == "im": return arr.imag - if cplx_mode == "abs": return np.abs(arr) - if cplx_mode == "angle": return np.angle(arr, deg=False) - raise ValueError("Unsupported mode `%s`" % str(cplx_mode)) - - @add_fig_kwargs def plot_xy_with_hue(data, x, y, hue, decimals=None, ax=None, xlims=None, ylims=None, fontsize=12, **kwargs): @@ -166,7 +173,7 @@ def plot_xy_with_hue(data, x, y, hue, decimals=None, ax=None, Args: data: |pandas-DataFrame| containing columns `x`, `y`, and `hue`. x: Name of the column used as x-value - y: Name of the column used as y-value + y: Name of the column(s) used as y-value hue: Variable that define subsets of the data, which will be drawn on separate lines decimals: Number of decimal places to round `hue` columns. Ignore if None ax: |matplotlib-Axes| or None if a new figure should be created. @@ -177,6 +184,24 @@ def plot_xy_with_hue(data, x, y, hue, decimals=None, ax=None, Returns: |matplotlib-Figure| """ + if isinstance(y, (list, tuple)): + # Recursive call for each ax in ax_list. + num_plots, ncols, nrows = len(y), 1, 1 + if num_plots > 1: + ncols = 2 + nrows = (num_plots // ncols) + (num_plots % ncols) + + ax_list, fig, plt = get_axarray_fig_plt(None, nrows=nrows, ncols=ncols, + sharex=False, sharey=False, squeeze=False) + + ax_list = ax_list.ravel() + if num_plots % ncols != 0: ax_list[-1].axis('off') + + for yname, ax in zip(y, ax_list): + plot_xy_with_hue(data, x, str(yname), hue, decimals=decimals, ax=ax, + xlims=xlims, ylims=ylims, fontsize=fontsize, show=False, **kwargs) + return fig + # Check here because pandas error messages are a bit criptic. miss = [k for k in (x, y, hue) if k not in data] if miss: @@ -192,7 +217,8 @@ def plot_xy_with_hue(data, x, y, hue, decimals=None, ax=None, xy = np.array(sorted(zip(grp[x], grp[y]), key=lambda t: t[0])) xvals, yvals = xy[:, 0], xy[:, 1] - label = "{} = {}".format(hue, key) + #label = "{} = {}".format(hue, key) + label = "%s" % (str(key)) if not kwargs: ax.plot(xvals, yvals, 'o-', label=label) else: @@ -367,7 +393,7 @@ def __new__(cls, *xys): """Extends the base class adding consistency check.""" if not xys: xys = ([], [], []) - return super(cls, Marker).__new__(cls, *xys) + return super().__new__(cls, *xys) if len(xys) != 3: raise TypeError("Expecting 3 entries in xys got %d" % len(xys)) @@ -381,7 +407,7 @@ def __new__(cls, *xys): if np.iscomplex(s): raise ValueError("Found ambiguous complex entry %s" % str(s)) - return super(cls, Marker).__new__(cls, *xys) + return super().__new__(cls, *xys) def __bool__(self): return bool(len(self.s)) @@ -518,10 +544,8 @@ def plot_unit_cell(lattice, ax=None, **kwargs): """ ax, fig, plt = get_ax3d_fig_plt(ax) - if "color" not in kwargs: - kwargs["color"] = "k" - if "linewidth" not in kwargs: - kwargs["linewidth"] = 3 + if "color" not in kwargs: kwargs["color"] = "k" + if "linewidth" not in kwargs: kwargs["linewidth"] = 3 v = 8 * [None] v[0] = lattice.get_cartesian_coords([0.0, 0.0, 0.0]) @@ -537,9 +561,45 @@ def plot_unit_cell(lattice, ax=None, **kwargs): (6, 7), (7, 4), (0, 7), (1, 6), (2, 5), (3, 4)): ax.plot(*zip(v[i], v[j]), **kwargs) + # Plot cartesian frame + ax_add_cartesian_frame(ax) + return fig, ax +def ax_add_cartesian_frame(ax, start=(0, 0, 0)): + """ + Add cartesian frame to 3d axis at point `start`. + """ + # https://stackoverflow.com/questions/22867620/putting-arrowheads-on-vectors-in-matplotlibs-3d-plot + from matplotlib.patches import FancyArrowPatch + from mpl_toolkits.mplot3d import proj3d + arrow_opts = {"color": "k"} + arrow_opts.update(dict(lw=1, arrowstyle="-|>",)) + + class Arrow3D(FancyArrowPatch): + def __init__(self, xs, ys, zs, *args, **kwargs): + FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs) + self._verts3d = xs, ys, zs + + def draw(self, renderer): + xs3d, ys3d, zs3d = self._verts3d + xs, ys, zs = proj3d.proj_transform(xs3d, ys3d, zs3d, renderer.M) + self.set_positions((xs[0], ys[0]), (xs[1], ys[1])) + FancyArrowPatch.draw(self, renderer) + + start = np.array(start) + for end in ((1, 0, 0), (0, 1, 0), (0, 0, 1)): + end = start + np.array(end) + xs, ys, zs = list(zip(start, end)) + p = Arrow3D(xs, ys, zs, + connectionstyle='arc3', mutation_scale=20, + alpha=0.8, **arrow_opts) + ax.add_artist(p) + + return ax + + def plot_structure(structure, ax=None, to_unit_cell=False, alpha=0.7, style="points+labels", color_scheme="VESTA", **kwargs): """ @@ -565,7 +625,7 @@ def plot_structure(structure, ax=None, to_unit_cell=False, alpha=0.7, symbol = site.specie.symbol color = tuple(i / 255 for i in EL_COLORS[color_scheme][symbol]) radius = CovalentRadius.radius[symbol] - if to_unit_cell and hasattr(site, "to_unit_cell"): site = site.to_unit_cell + if to_unit_cell and hasattr(site, "to_unit_cell"): site = site.to_unit_cell() # Use cartesian coordinates. x, y, z = site.coords xyzs[i] = (x, y, z, radius) @@ -580,7 +640,7 @@ def plot_structure(structure, ax=None, to_unit_cell=False, alpha=0.7, # https://gist.github.com/syrte/592a062c562cd2a98a83 if "points" in style: x, y, z, s = xyzs.T.copy() - s = 5000 * s **2 + s = 5000 * s ** 2 ax.scatter(x, y, zs=z, s=s, c=colors, alpha=alpha) #facecolors="white", #edgecolors="blue" ax.set_title(structure.composition.formula) diff --git a/abipy/tools/printing.py b/abipy/tools/printing.py index 55df7fae4..9196b32ee 100644 --- a/abipy/tools/printing.py +++ b/abipy/tools/printing.py @@ -1,10 +1,9 @@ """Utilities for pandas dataframe""" -from __future__ import print_function, division, unicode_literals, absolute_import import sys -def print_dataframe(frame, title=None, precision=6, sortby=None, file=sys.stdout): +def print_dataframe(frame, title=None, precision=6, sortby=None, file=sys.stdout, display=None): """ Print entire pandas DataFrame. @@ -15,7 +14,15 @@ def print_dataframe(frame, title=None, precision=6, sortby=None, file=sys.stdout This is only a suggestion [default: 6] [currently: 6] sortby: string name or list of names which refer to the axis items to be sorted (dataframe is not changed) file: a file-like object (stream); defaults to the current sys.stdout. + If file == "string", a temporary stream is created and a string is returned. + display: Use ipython rich display protocol by invoking _repr_`display_ and returning the result. + Use e.g. display="html" to get HTML table. """ + return_string = file == "string" + if return_string: + from io import StringIO + file = StringIO() + if title is not None: print(title, file=file) if sortby is not None and sortby in frame: frame = frame.sort_values(sortby, inplace=False) @@ -25,5 +32,11 @@ def print_dataframe(frame, title=None, precision=6, sortby=None, file=sys.stdout "display.max_columns", len(list(frame.keys())), "display.precision", precision, ): - print(frame, file=file) - print(" ", file=file) + if display is None: + print(frame, file=file) + print(" ", file=file) + if return_string: return file.getvalue() + else: + from IPython.core.display import HTML + output = getattr(frame, "_repr_%s_" % display)() + return HTML(output) diff --git a/abipy/tools/tensors.py b/abipy/tools/tensors.py new file mode 100644 index 000000000..b8d00e5c2 --- /dev/null +++ b/abipy/tools/tensors.py @@ -0,0 +1,105 @@ +# coding: utf-8 +""" +This modules provides subclasses of pymatgen tensor objects. +""" +import numpy as np +import pandas as pd + +from pymatgen.core.tensors import Tensor, SquareTensor +from pymatgen.analysis.elasticity.elastic import ElasticTensor # noqa: F401 +from pymatgen.analysis.elasticity.stress import Stress as pmg_Stress +from pymatgen.analysis.piezo import PiezoTensor # noqa: F401 +from abipy.iotools import ETSF_Reader + + +class _Tensor33(object): + + def _repr_html_(self): + """Integration with jupyter notebooks.""" + return self.get_dataframe()._repr_html_() + + def get_dataframe(self, tol=1e-3): + """Return |pandas-Dataframe| with tensor elements set to zero below `tol`.""" + tensor = self.zeroed(tol=tol) + return pd.DataFrame({"x": tensor[:,0], "y": tensor[:,1], "z": tensor[:,2]}, index=["x", "y", "z"]) + + def get_voigt_dataframe(self, tol=1e-3): + """ + Return |pandas-DataFrame| with Voigt indices as colums. + Elements below tol are set to zero. + + Useful to analyze the converge of individual elements. + """ + tensor = self.zeroed(tol=tol) + columns = ["xx", "yy", "zz", "yz", "xz", "xy"] + d = {k: v for k, v in zip(columns, tensor.voigt)} + return pd.DataFrame(d, index=[0], columns=columns) + + +class Stress(pmg_Stress, _Tensor33): + """ + Stress tensor. rank2 symmetric tensor with shape [3, 3]. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: Stress + """ + + +class DielectricTensor(SquareTensor, _Tensor33): + """ + Subclass of |pmg-Tensor| describing a dielectric tensor. + rank2 symmetric tensor with shape [3, 3]. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: DielectricTensor + """ + + def reflectivity(self, n1=1, tol=1e-6): + """ + If the tensor is diagonal (with off diagonal elements smaller than tol) + returns the three components of the reflectivity + + :math:`|n1 - n2| / | n1 + n2 |` + """ + d = np.diag(self) + + if np.max(np.abs(self - np.diag(d))) > tol: + raise ValueError("The tensor is not diagonal.") + + n2 = np.sqrt(d) + + return np.abs((n1 - n2) / (n1 + n2)) ** 2 + + +class ZstarTensor(SquareTensor, _Tensor33): + """ + Born effective charge tensor (for a single atom). + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: ZstarTensor + """ + + +class NLOpticalSusceptibilityTensor(Tensor): + """ + Subclass of |pmg-Tensor| containing the non-linear optical susceptibility tensor. + + .. rubric:: Inheritance Diagram + .. inheritance-diagram:: NLOpticalSusceptibilityTensor + """ + + @classmethod + def from_file(cls, filepath): + """ + Creates the tensor from an anaddb.nc netcdf file containing ``dchide``. + This requires to run anaddb with ``tnlflag`` > 0 + """ + with ETSF_Reader(filepath) as reader: + try: + return cls(reader.read_value("dchide")) + except Exception as exc: + import traceback + msg = traceback.format_exc() + msg += ("Error while trying to read from file.\n" + "Verify that nlflag > 0 in anaddb\n") + raise ValueError(msg) diff --git a/abipy/tools/tests/test_bessel.py b/abipy/tools/tests/test_bessel.py index 38be71b53..ceeafcd3e 100644 --- a/abipy/tools/tests/test_bessel.py +++ b/abipy/tools/tests/test_bessel.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for bessel module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import numpy as np from abipy.tools import bessel diff --git a/abipy/tools/tests/test_decorators.py b/abipy/tools/tests/test_decorators.py index cc22468e4..c1417ad08 100644 --- a/abipy/tools/tests/test_decorators.py +++ b/abipy/tools/tests/test_decorators.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for duck module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import numpy as np from abipy.core.testing import AbipyTest diff --git a/abipy/tools/tests/test_derivatives.py b/abipy/tools/tests/test_derivatives.py index 76069be45..d927fed3c 100644 --- a/abipy/tools/tests/test_derivatives.py +++ b/abipy/tools/tests/test_derivatives.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for derivatives module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import numpy as np from abipy.tools.derivatives import finite_diff @@ -41,14 +39,14 @@ def test_poly(self): for order in orders: for acc in accuracies: if order == 4 and acc == 6: continue - print("order %s, acc %s" % (order, acc)) + #print("order %s, acc %s" % (order, acc)) yder = finite_diff(f, h, order=order, acc=acc) - print(np.max(np.abs(yder - dpolys[order]))) + #print(np.max(np.abs(yder - dpolys[order]))) self.assert_almost_equal(yder, dpolys[order], decimal=decs[order]) def test_exp(self): """Test derivatives of exp(x).""" - x, h = np.linspace(0, 2, 800, retstep=True) + x, h = np.linspace(0, 2, 800, retstep=True) orders = [1,2,3,4] accuracies = [2,4,6] exp = np.exp(x) @@ -63,7 +61,10 @@ def test_exp(self): for order in orders: for acc in accuracies: if order == 4 and acc == 6: continue - print("order %s, acc %s" % (order, acc)) + #print("order %s, acc %s" % (order, acc)) yder = finite_diff(exp, h, order=order, acc=acc) - print(np.max(np.abs(yder - exp))) + #print(np.max(np.abs(yder - exp))) self.assert_almost_equal(yder, exp, decs[order]) + + d = finite_diff(exp, h, order=order, acc=acc, index=100) + assert yder[100] == d.value diff --git a/abipy/tools/tests/test_devtools.py b/abipy/tools/tests/test_devtools.py index de62d27ba..b6571aa56 100644 --- a/abipy/tools/tests/test_devtools.py +++ b/abipy/tools/tests/test_devtools.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for devtools module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import numpy as np import abipy.data as abidata diff --git a/abipy/tools/tests/test_duck.py b/abipy/tools/tests/test_duck.py index cb56ce4d3..7c46f3af5 100644 --- a/abipy/tools/tests/test_duck.py +++ b/abipy/tools/tests/test_duck.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for duck module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import numpy as np from abipy.core.testing import AbipyTest @@ -61,3 +59,12 @@ def test_list_ints(self): assert duck.list_ints(1) == [1] assert duck.list_ints([1]) == [1] assert duck.list_ints([1, 2, 3]) == [1, 2, 3] + + def test_getattrd(self): + """Testing getattrd and hasattrd.""" + getattrd, hasattrd = duck.getattrd, duck.hasattrd + with self.assertRaises(AttributeError): getattrd(int, 'a') + assert getattrd(int, 'a', default=None) is None + assert getattrd(int, '__class__.__name__') == "type" + assert hasattrd(int, '__class__.__name__') + assert not hasattrd(int, 'foobar.__name__') diff --git a/abipy/tools/tests/test_fftprof.py b/abipy/tools/tests/test_fftprof.py index 40ab268ba..81db73b95 100644 --- a/abipy/tools/tests/test_fftprof.py +++ b/abipy/tools/tests/test_fftprof.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for fftprof module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import os import abipy.data as abidata diff --git a/abipy/tools/tests/test_numtools.py b/abipy/tools/tests/test_numtools.py index 8c49c2cd3..2b60d2014 100644 --- a/abipy/tools/tests/test_numtools.py +++ b/abipy/tools/tests/test_numtools.py @@ -1,5 +1,3 @@ -from __future__ import print_function, division, absolute_import, unicode_literals - import numpy as np from abipy.tools.numtools import * @@ -45,6 +43,24 @@ def test_add_periodic_replicas(self): assert np.all(view[...,0,0] == view[...,-1,-1]) assert np.all(view[...,0,0,0] == view[...,-1,-1,-1]) + def test_data_from_cplx_mode(self): + """Testing data_from_cplx_mode.""" + carr = np.empty((2, 4), dtype=np.complex) + + self.assert_equal(data_from_cplx_mode("all", carr), carr) + self.assert_equal(data_from_cplx_mode("re", carr), carr.real) + self.assert_equal(data_from_cplx_mode("im", carr), carr.imag) + self.assert_equal(data_from_cplx_mode("abs", carr), np.abs(carr)) + self.assert_equal(data_from_cplx_mode("angle", carr), np.angle(carr)) + + with self.assertRaises(ValueError): + data_from_cplx_mode("foo", carr) + with self.assertRaises(ValueError): + data_from_cplx_mode("angle", carr, tol=1.0) + + rarr = np.ones((2, 4), dtype=np.float) + self.assert_equal(data_from_cplx_mode("re", rarr, tol=1.1), np.zeros_like(rarr)) + def test_special_functions(self): """Testing special functions.""" assert gaussian(x=0.0, width=1.0, center=0.0, height=1.0) == 1.0 diff --git a/abipy/tools/tests/test_plotting.py b/abipy/tools/tests/test_plotting.py index 0edc6aaeb..c457f743c 100644 --- a/abipy/tools/tests/test_plotting.py +++ b/abipy/tools/tests/test_plotting.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for derivatives module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - import os import numpy as np @@ -34,17 +32,8 @@ def test_set_axlims(self): assert left_right == (1, 2) def test_data_from_cplx_mode(self): - """Testing data_from_cplx_mode.""" + """Testing plot_array.""" carr = np.empty((2, 4), dtype=np.complex) - - self.assert_equal(data_from_cplx_mode("re", carr), carr.real) - self.assert_equal(data_from_cplx_mode("im", carr), carr.imag) - self.assert_equal(data_from_cplx_mode("abs", carr), np.abs(carr)) - self.assert_equal(data_from_cplx_mode("angle", carr), np.angle(carr)) - with self.assertRaises(ValueError): - data_from_cplx_mode("foo", carr) - - # Test plot_array if self.has_matplotlib(): assert plot_array(carr, cplx_mode="abs", show=False) cvec = np.empty(10, dtype=np.complex) @@ -81,6 +70,9 @@ def test_plot_xy_with_hue(self): with self.assertRaises(ValueError): plot_xy_with_hue(data=df, x="foo", y="y", hue="bar", ax=None, show=False) + assert plot_xy_with_hue(data=df, x="x", y=["y", "y"], hue="z", decimals=0, ax=None, show=False, + color="red", marker="v") + def test_array_plotter(self): """Testing array plotter.""" plotter = ArrayPlotter() diff --git a/abipy/dfpt/tests/test_tensors.py b/abipy/tools/tests/test_tensors.py similarity index 54% rename from abipy/dfpt/tests/test_tensors.py rename to abipy/tools/tests/test_tensors.py index 88ab034f5..edaceff3b 100644 --- a/abipy/dfpt/tests/test_tensors.py +++ b/abipy/tools/tests/test_tensors.py @@ -1,31 +1,29 @@ """Tests for tensors module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import os import numpy as np from abipy.core.testing import AbipyTest -from abipy.dfpt.tensors import DielectricTensor, NLOpticalSusceptibilityTensor +from abipy.tools.tensors import DielectricTensor, NLOpticalSusceptibilityTensor import abipy.data as abidata -class NLOpticalSusceptibilityTensorTest(AbipyTest): +class DielectricTensorTest(AbipyTest): def test_base(self): - """Base tests for NLOpticalSusceptibilityTensor""" - anaddbnc_fname = abidata.ref_file("AlAs_nl_dte_anaddb.nc") - - tensor = NLOpticalSusceptibilityTensor.from_file(anaddbnc_fname) - repr(tensor) - str(tensor) + """Base tests for DielectricTensor""" + eps = DielectricTensor(np.diag([1, 2, 3])) + repr(eps); str(eps) + assert eps._repr_html_() + assert len(eps.get_dataframe()) == 3 + assert len(eps.get_voigt_dataframe().keys()) == 6 + self.assertArrayAlmostEqual(eps.reflectivity(), [0., 0.029437251522859434, 0.071796769724490825]) -class DielectricTensorTest(AbipyTest): +class NLOpticalSusceptibilityTensorTest(AbipyTest): def test_base(self): - """Base tests for DielectricTensor""" - dt = DielectricTensor(np.diag([1,2,3])) - repr(dt) - str(dt) + """Base tests for NLOpticalSusceptibilityTensor""" + anaddbnc_fname = abidata.ref_file("AlAs_nl_dte_anaddb.nc") - self.assertArrayAlmostEqual(dt.reflectivity(), [0., 0.029437251522859434, 0.071796769724490825]) \ No newline at end of file + tensor = NLOpticalSusceptibilityTensor.from_file(anaddbnc_fname) + repr(tensor); str(tensor) diff --git a/abipy/tools/tests/test_texttools.py b/abipy/tools/tests/test_texttools.py index 99d7c307d..d2498b5c4 100644 --- a/abipy/tools/tests/test_texttools.py +++ b/abipy/tools/tests/test_texttools.py @@ -1,7 +1,5 @@ # coding: utf-8 """Tests for textools module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - from abipy.tools.text import * from abipy.core.testing import AbipyTest diff --git a/abipy/tools/tests/test_tools.py b/abipy/tools/tests/test_tools.py deleted file mode 100644 index 4faf68284..000000000 --- a/abipy/tools/tests/test_tools.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding: utf-8 -"""Tests for tools __init__.py module.""" -from __future__ import division, print_function, absolute_import, unicode_literals - -import abipy.tools as at -from abipy.core.testing import AbipyTest - - -class TestTools(AbipyTest): - - def test_getattrd(self): - """Testing getattrd.""" - with self.assertRaises(AttributeError): at.getattrd(int, 'a') - assert at.getattrd(int, 'a', default=None) is None - assert at.getattrd(int, '__class__.__name__') == "type" - assert at.hasattrd(int, '__class__.__name__') - assert not at.hasattrd(int, 'foobar.__name__') diff --git a/abipy/tools/text.py b/abipy/tools/text.py index 406fcdc02..5d5bf9e58 100644 --- a/abipy/tools/text.py +++ b/abipy/tools/text.py @@ -1,6 +1,5 @@ # coding: utf-8 """Utilities for working with strings and text.""" -from __future__ import print_function, division, unicode_literals, absolute_import def tonumber(s): @@ -10,13 +9,13 @@ def tonumber(s): # Duck test. try: stnum = s.upper().replace("D", "E") # D-01 is not recognized by python: Replace it with E. - # stnum = strip_punct(stnum) # Remove punctuation chars. + # stnum = strip_punct(stnum) # Remove punctuation chars. return float(stnum) # Try to convert. except ValueError: raise - except: + except Exception: raise RuntimeError("Don't know how to handle type %s: %s" % (type(s), str(s))) @@ -48,6 +47,7 @@ def rreplace(s, old, new, occurrence): >>> assert rreplace(s, '2', ' ', 4) == '1 3 4 5' >>> assert rreplace(s, '2', ' ', 0) == '1232425' """ - # Based on https://stackoverflow.com/questions/2556108/rreplace-how-to-replace-the-last-occurrence-of-an-expression-in-a-string + # Based on: + # https://stackoverflow.com/questions/2556108/rreplace-how-to-replace-the-last-occurrence-of-an-expression-in-a-string li = s.rsplit(old, occurrence) return new.join(li) diff --git a/abipy/wannier90/__init__.py b/abipy/wannier90/__init__.py index 571ef05d0..f0e9986b7 100644 --- a/abipy/wannier90/__init__.py +++ b/abipy/wannier90/__init__.py @@ -1,3 +1,4 @@ +# flake8: noqa from .win import Wannier90Input from .wout import WoutFile from .abiwan import AbiwanFile, AbiwanRobot diff --git a/abipy/wannier90/abiwan.py b/abipy/wannier90/abiwan.py index 957578e7a..a25a9a652 100644 --- a/abipy/wannier90/abiwan.py +++ b/abipy/wannier90/abiwan.py @@ -3,8 +3,6 @@ Interface to the ABIWAN netcdf file produced by abinit when calling wannier90 in library mode. Inspired to the Fortran version of wannier90. """ -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import pandas as pd import time @@ -19,6 +17,7 @@ from abipy.abio.robots import Robot from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt #, get_axarray_fig_plt from abipy.electrons.ebands import ElectronBands, ElectronsReader, ElectronBandsPlotter, RobotWithEbands +from abipy.core.skw import ElectronInterpolator class AbiwanFile(AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter): @@ -42,8 +41,7 @@ def from_file(cls, filepath): return cls(filepath) def __init__(self, filepath): - super(AbiwanFile, self).__init__(filepath) - + super().__init__(filepath) self.reader = AbiwanReader(filepath) # Number of bands actually used to construct the Wannier functions @@ -58,7 +56,7 @@ def nwan_spin(self): def mwan(self): """ Max number of Wannier functions over spins, i.e max(nwan_spin) - (used to dimension arrays). + Used to dimension arrays. """ return self.reader.read_dimvalue("mwan") @@ -392,7 +390,6 @@ def write_notebook(self, nbpath=None): return self._write_nb_nbpath(nb, nbpath) -from abipy.core.skw import ElectronInterpolator class HWanR(ElectronInterpolator): """ This object represents the KS Hamiltonian in the wannier-gauge representation. @@ -525,7 +522,7 @@ class AbiwanReader(ElectronsReader): class AbiwanRobot(Robot, RobotWithEbands): """ - This robot analyzes the results contained in multiple ABIWAN.nc_ files. + This robot analyzes the results contained in multiple ABIWAN.nc files. .. rubric:: Inheritance Diagram .. inheritance-diagram:: AbiwanRobot diff --git a/abipy/wannier90/tests/test_abiwan.py b/abipy/wannier90/tests/test_abiwan.py index 79388b9f1..b2c3db406 100644 --- a/abipy/wannier90/tests/test_abiwan.py +++ b/abipy/wannier90/tests/test_abiwan.py @@ -1,6 +1,4 @@ """Tests for wannier90 module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import os import abipy.data as abidata @@ -120,6 +118,6 @@ def test_abiwan_robot(self): assert plotter.gridplot(show=False) if self.has_nbformat(): - robot.write_notebook(nbpath=self.get_tmpname(text=True)) + assert robot.write_notebook(nbpath=self.get_tmpname(text=True)) robot.close() diff --git a/abipy/wannier90/tests/test_win.py b/abipy/wannier90/tests/test_win.py index c9e46bfc9..3a30cd763 100644 --- a/abipy/wannier90/tests/test_win.py +++ b/abipy/wannier90/tests/test_win.py @@ -1,6 +1,4 @@ """Tests for wannier90 module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import os import abipy.data as abidata diff --git a/abipy/wannier90/tests/test_wout.py b/abipy/wannier90/tests/test_wout.py index eb7cf16d0..a2223afb2 100644 --- a/abipy/wannier90/tests/test_wout.py +++ b/abipy/wannier90/tests/test_wout.py @@ -1,6 +1,4 @@ """Tests for wannier90 module""" -from __future__ import print_function, division, absolute_import, unicode_literals - import os import numpy as np import abipy.data as abidata diff --git a/abipy/wannier90/win.py b/abipy/wannier90/win.py index 454650e82..c77278472 100644 --- a/abipy/wannier90/win.py +++ b/abipy/wannier90/win.py @@ -1,7 +1,5 @@ # coding: utf-8 """Interface to the win input file used by Wannier90.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np from collections import OrderedDict diff --git a/abipy/wannier90/wout.py b/abipy/wannier90/wout.py index 4fc26d06e..e2c23b257 100644 --- a/abipy/wannier90/wout.py +++ b/abipy/wannier90/wout.py @@ -1,7 +1,5 @@ # coding: utf-8 """Interface to the wout output file produced by Wannier90.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import pandas as pd @@ -28,7 +26,7 @@ class WoutFile(BaseFile, Has_Structure, NotebookWriter): .. inheritance-diagram:: WoutFile """ def __init__(self, filepath): - super(WoutFile, self).__init__(filepath) + super().__init__(filepath) self.warnings = [] self.use_disentangle = False self.conv_df, self.dis_df = None, None diff --git a/abipy/waves/__init__.py b/abipy/waves/__init__.py index 9fdc43922..0ed514093 100644 --- a/abipy/waves/__init__.py +++ b/abipy/waves/__init__.py @@ -1,2 +1,3 @@ +# flake8: noqa from .pwwave import * from .wfkfile import * diff --git a/abipy/waves/pwwave.py b/abipy/waves/pwwave.py index a8117dc25..bd8e95695 100644 --- a/abipy/waves/pwwave.py +++ b/abipy/waves/pwwave.py @@ -1,16 +1,11 @@ # coding: utf-8 """This module contains the class describing a planewave wavefunction.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import tempfile -import copy -import six -import itertools +#import copy import numpy as np from monty.termcolor import cprint from abipy.core import Mesh3D -from abipy.core.kpoints import Kpoint +#from abipy.core.kpoints import Kpoint from abipy.iotools import Visualizer from abipy.iotools.xsf import xsf_write_structure, xsf_write_data from abipy.tools.plotting import add_fig_kwargs, get_ax_fig_plt, get_axarray_fig_plt @@ -20,12 +15,13 @@ "PWWaveFunction", ] + def latex_label_ispinor(ispinor, nspinor): if nspinor == 1: return "" elif nspinor == 2: return {k: v.replace("myuparrow", "uparrow") for k, v in - {0: r"$\sigma=\myuparrow$", 1: r"$\sigma=\downarrow$"}.items()}[ispden] + {0: r"$\sigma=\myuparrow$", 1: r"$\sigma=\downarrow$"}.items()}[ispinor] else: raise ValueError("Wrong value for nspinor: %s" % nspinor) @@ -44,10 +40,7 @@ def __ne__(self, other): def __iter__(self): """Yields G, ug[0:nspinor, G]""" - if six.PY2: - return itertools.izip(self.gvecs, self.ug.T) - else: - return zip(self.gvecs, self.ug.T) + return zip(self.gvecs, self.ug.T) def __getitem__(self, slice): return self.gvecs[slice], self.ug[:, slice] @@ -442,7 +435,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, with_krphase=False, m Return: |matplotlib-Figure| """ site = self.structure[site_index] - nn_list = self.structure.get_neighbors(site, radius, include_index=True) + nn_list = self.structure.get_neighbors_old(site, radius, include_index=True) if not nn_list: cprint("Zero neighbors found for radius %s Ang. Returning None." % radius, "yellow") return None @@ -451,7 +444,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, with_krphase=False, m nn_list = list(sorted(nn_list, key=lambda t: t[1])) if max_nn is not None and len(nn_list) > max_nn: cprint("For radius %s, found %s neighbors but only max_nn %s sites are show." % - (radius, len(nn_list), max_nn), "yellow") + (radius, len(nn_list), max_nn), "yellow") nn_list = nn_list[:max_nn] # Get grid of axes (one row for neighbor) @@ -466,7 +459,7 @@ def plot_line_neighbors(self, site_index, radius, num=200, with_krphase=False, m # For each neighbor, plot psi along the line connecting site to nn. for i, (nn, ax) in enumerate(zip(nn_list, ax_list)): - nn_site, nn_dist, nn_sc_index = nn + nn_site, nn_dist, nn_sc_index = nn title = "%s, %s, dist=%.3f A" % (nn_site.species_string, str(nn_site.frac_coords), nn_dist) r = interpolator.eval_line(site.frac_coords, nn_site.frac_coords, num=num, kpoint=kpoint) @@ -584,5 +577,5 @@ class PAW_WaveFunction(WaveFunction): All the methods that are related to the all-electron representation should start with ae. .. rubric:: Inheritance Diagram - .. inheritance-diagram:: PaW_WaveFunction + .. inheritance-diagram:: PAW_WaveFunction """ diff --git a/abipy/waves/tests/test_pwwave.py b/abipy/waves/tests/test_pwwave.py index 7ea81d1a8..06c7a1aee 100644 --- a/abipy/waves/tests/test_pwwave.py +++ b/abipy/waves/tests/test_pwwave.py @@ -1,6 +1,4 @@ """Tests for pwwave module""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np from abipy.core import Mesh3D diff --git a/abipy/waves/tests/test_wfkfile.py b/abipy/waves/tests/test_wfkfile.py index 210dae7ed..6e90db5b7 100644 --- a/abipy/waves/tests/test_wfkfile.py +++ b/abipy/waves/tests/test_wfkfile.py @@ -1,6 +1,4 @@ """Tests for Wfkfile module.""" -from __future__ import print_function, division, unicode_literals, absolute_import - import numpy as np import abipy.data as abidata diff --git a/abipy/waves/wfkfile.py b/abipy/waves/wfkfile.py index 49d856838..404a7c1ac 100644 --- a/abipy/waves/wfkfile.py +++ b/abipy/waves/wfkfile.py @@ -1,15 +1,12 @@ # coding: utf-8 """Wavefunction file.""" -from __future__ import print_function, division, unicode_literals, absolute_import - -import six -import numpy as np +#import numpy as np from monty.functools import lazy_property -from monty.string import marquee # is_string, list_strings, -from abipy.core import Mesh3D, GSphere, Structure +from monty.string import marquee +from abipy.core import Mesh3D, GSphere from abipy.core.mixins import AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter -from abipy.iotools import ETSF_Reader, Visualizer +from abipy.iotools import Visualizer from abipy.electrons.ebands import ElectronsReader from abipy.waves.pwwave import PWWaveFunction from abipy.tools import duck @@ -21,8 +18,8 @@ class WfkFile(AbinitNcFile, Has_Header, Has_Structure, Has_ElectronBands, NotebookWriter): """ - This object provides a simple interface to access and analyze - the data stored in the WFK file produced by ABINIT. + This object provides a simplified interface to access and analyze + the data stored in the WFK.nc file produced by ABINIT. Usage example: @@ -49,7 +46,7 @@ def __init__(self, filepath): """ Initialize the object from a Netcdf file. """ - super(WfkFile, self).__init__(filepath) + super().__init__(filepath) self.reader = reader = WFK_Reader(filepath) assert reader.has_pwbasis_set @@ -315,7 +312,7 @@ class WFK_Reader(ElectronsReader): def __init__(self, filepath): """Initialize the object from a filename.""" - super(WFK_Reader, self).__init__(filepath) + super().__init__(filepath) self.kpoints = self.read_kpoints() self.nfft1 = self.read_dimvalue("number_of_grid_points_vector1") @@ -341,10 +338,7 @@ def __init__(self, filepath): def basis_set(self): """String defining the basis set.""" basis_set = self.read_value("basis_set") - if six.PY2: - return "".join(basis_set).strip() - else: - return "".join(str(basis_set, encoding='UTF-8')).strip() + return "".join(str(basis_set, encoding='UTF-8')).strip() @property def has_pwbasis_set(self): diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 8f23823df..000000000 --- a/circle.yml +++ /dev/null @@ -1,22 +0,0 @@ -machine: - python: - version: 2.7.8 -dependenciees: - #only: - # - none # list of branches to build - override: - - easy_install -U setuptools - - pip install distribute --upgrade - - pip install -q numpy - - pip install pymatgen - - pip install -r requirements.txt - - python setup.py develop -#test: -# override: -# - nosetests: -# environment: -# PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages/ -general: - branches: - ignore: # list of branches to ignore - - master diff --git a/dash_app/app.py b/dash_app/app.py new file mode 100755 index 000000000..d439caf2a --- /dev/null +++ b/dash_app/app.py @@ -0,0 +1,472 @@ +#!/usr/bin/env python + +import base64 +import datetime +import tempfile +import io +import os +import dash +import dash_core_components as dcc +import dash_html_components as html +import dash_bootstrap_components as dbc +from dash_dangerously_set_inner_html import DangerouslySetInnerHTML + +from dash.dependencies import Input, Output, State +from abipy import abilab +import abipy.data as abidata +from abipy.data.ucells import structure_from_ucell + + +def copy_to_clipboard_button(id): + return DangerouslySetInnerHTML(f""" +""") + + +def div_with_exc(exc): + return html.Div([dbc.Jumbotron([html.H2("There was an error: %s" % str(exc), + className="text-danger")])]) + + +app = dash.Dash(__name__, + external_stylesheets=[dbc.themes.BOOTSTRAP], + # external JavaScript files + external_scripts=[ + "https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js", + #"https://code.jquery.com/jquery-3.4.1.min.js" + ], + # these meta_tags ensure content is scaled correctly on different devices + # see: https://www.w3schools.com/css/css_rwd_viewport.asp for more + meta_tags=[{"name": "viewport", "content": "width=device-width, initial-scale=1"}] +) + +# Since we're adding callbacks to elements that don't exist in the app.layout, +# Dash will raise an exception to warn us that we might be doing something wrong. +# In this case, we're adding the elements through a callback, so we can ignore the exception. +app.config.suppress_callback_exceptions = True + +# we use the Row and Col components to construct the sidebar header +# it consists of a title, and a toggle, the latter is hidden on large screens +sidebar_header = dbc.Row( + [ + dbc.Col(html.H1("Actions", className="display-4")), + dbc.Col( + [ + html.Button( + # use the Bootstrap navbar-toggler classes to style + html.Span(className="navbar-toggler-icon"), + className="navbar-toggler", + # the navbar-toggler classes don't set color + style={ + "color": "rgba(0,0,0,.5)", + "border-color": "rgba(0,0,0,.1)", + }, + id="navbar-toggle", + ), + html.Button( + # use the Bootstrap navbar-toggler classes to style + html.Span(className="navbar-toggler-icon"), + className="navbar-toggler", + # the navbar-toggler classes don't set color + style={ + "color": "rgba(0,0,0,.5)", + "border-color": "rgba(0,0,0,.1)", + }, + id="sidebar-toggle", + ), + ], + # the column containing the toggle will be only as wide as the + # toggle, resulting in the toggle being right aligned + width="auto", + # vertically align the toggle in the center + align="center", + ), + ] +) + +pages = [ + dbc.NavLink("Upload Structure", href="/page-1", id="page-1-link"), + dbc.NavLink("Convert Structure", href="/page-2", id="page-2-link"), + dbc.NavLink("Symmetry Analysis", href="/page-3", id="page-3-link"), + dbc.NavLink("Kpath", href="/page-4", id="page-4-link"), + dbc.NavLink("Build GS Input", href="/page-5", id="page-5-link"), + #dbc.NavLink("Build Ebands Input",href="/page-5", id="page-5-link"), + #dbc.NavLink("Build DFPT Input",href="/page-5", id="page-5-link"), + #dbc.NavLink("Build G0W0 Input",href="/page-5", id="page-5-link"), + dbc.NavLink("About", href="/page-6", id="page-6-link"), +] +num_pages = len(pages) + +sidebar = html.Div([ + sidebar_header, + # we wrap the horizontal rule and short blurb in a div that can be hidden on a small screen + html.Div([ + html.Hr(), + #html.P("Actions:", className="lead"), + ], id="blurb"), + # use the Collapse component to animate hiding / revealing links + dbc.Collapse(dbc.Nav(pages, vertical=True, pills=True), id="collapse"), + ], + id="sidebar", +) + +#example_structure = structure_from_ucell("Si") + +app.layout = html.Div([ + dcc.Location(id="url"), + sidebar, + html.Div(id="page-content"), + # Hidden div inside the app that stores the intermediate value + # https://dash.plot.ly/sharing-data-between-callbacks + html.Div(id='json_structure', style={'display': 'none'}) +]) + +modal_help = html.Div([ + dbc.Button("Help", className="btn-sm", id="open_modal"), + dbc.Modal( + [dbc.ModalHeader("How to upload a Structure"), + dbc.ModalBody(dcc.Markdown(""" +Use this interface to upload a file containing structural information. +Then select one of the other `actions` in the menu bar to operate on the selected structure. + +The file extension (e.g. `.cif`) defines the format used to interpret the data. +All the formats supported by AbiPy and pymatgen are supported. +This includes Abinit netcdf files with the `.nc` extension, DDB files with the `_DDB` extension, +as well as Abinit input files with the `.abi` extension and Abinit output files with the `.abo` extension. +Use `abiopen.py --help` to get full list of file extensions supported. +""")), + dbc.ModalFooter( + dbc.Button("Close", id="close", className="ml-auto") + ), + ], id="modal_help", + ), +]) + + +@app.callback( + Output("modal_help", "is_open"), + [Input("open_modal", "n_clicks"), Input("close", "n_clicks")], + [State("modal_help", "is_open")], +) +def toggle_modal(n1, n2, is_open): + if n1 or n2: + return not is_open + return is_open + + +structure_upload = html.Div([ + dcc.Upload(id='upload-data', + children=html.Div(['Drag and Drop or ', html.A('Select Files')]), + style={ + 'width': '100%', + 'height': '60px', + 'lineHeight': '60px', + 'borderWidth': '1px', + 'borderStyle': 'dashed', + 'borderRadius': '5px', + 'textAlign': 'center', + 'margin': '10px' + }, + # Don't allow multiple files to be uploaded + multiple=False, + ), + modal_help, +]) + + +init_structure_layout = dbc.Container([ + dbc.Row([dbc.Col([html.H3("Upload file:"), structure_upload], md=4), + dbc.Col([html.Div(id='print_structure')]), + ]), + ], className="mt-4", +) + + +input_groups = html.Div([ + dbc.InputGroup([ + dbc.InputGroupAddon("SpinMode:", addon_type="prepend"), + dbc.Select(id="spin_mode", options=[ + {'label': "unpolarized", 'value': 'unpolarized'}, + {'label': "polarized", 'value': 'polarized'}, + {"label": "anti-ferromagnetic", "value": "afm"}, + {"label": "non-collinear with magnetism", "value": "spinor"}, + {"label": "non-collinear, no magnetism", "value": "spinor_nomag"}, + ], value="unpolarized"), + ]), + dbc.InputGroup([ + dbc.InputGroupAddon("Kppra:", addon_type="prepend"), + dcc.Input(id="kppra", type="number", min=0, step=1000, value=1000), + ]), + dcc.RadioItems(id="gs_type", + options=[ + {'label': 'SCF', 'value': 'scf'}, + {'label': 'Relax', 'value': 'relax'}, + ], value='scf' + ) +]) + +#'nosmearing': 1, +#'fermi_dirac': 3, +#'marzari4': 4, +#'marzari5': 5, +#'methfessel': 6, +#'gaussian': 7} + +input_page_layout = html.Div([ + dbc.Row([dbc.Col(input_groups), dbc.Col(html.Div(id='gs_input_page_output'))]), +]) + +convert_format_input = dbc.InputGroup([ + dbc.InputGroupAddon("Output Format:", addon_type="prepend"), + dbc.Select(id="convert_format", options=[ + {"label": k, "value": k} for k in "abivars,cif,xsf,poscar,qe,siesta,wannier90,cssr,json".split(",") + ], value="cif"), +]) + +convert_page_layout = html.Div([ + dbc.Row([dbc.Col(convert_format_input), + dbc.Col(html.Div(id='convert_page_output'))]), +]) + +symmetry_options_input = dbc.InputGroup([ + dbc.InputGroupAddon("spglib symprec (A):", addon_type="prepend"), + dbc.Input(id="spglib_symprec", type="number", min=1e-6, step=0.02, value=0.01), + dbc.InputGroupAddon("spglib angdeg (degrees):", addon_type="prepend"), + dbc.Input(id="spglib_angtol", type="number", min=1e-6, step=1, value=5), + #dbc.InputGroupAddon("Abinit tolsym:", addon_type="prepend"), + #dbc.Input(id="abinit_tolsym", type="number", min=1e-12, step=1e-1, value=1e-8), +]) + + +symmetry_analysis_page_layout = html.Div([ + dbc.Row(dbc.Col(symmetry_options_input)), + dbc.Row(html.Div(id='symmetry_page_output')), +]) + + +@app.callback(Output('gs_input_page_output', 'children'), + [Input('spin_mode', 'value'), + Input('kppra', 'value'), + Input('gs_type', 'value'), + ], + [State("json_structure", "children")], + ) +def update_gs_input(spin_mode, kppra, gs_type, json_structure): + if not json_structure: return structure_undefined_error() + + structure = abilab.mjson_loads(json_structure) + pseudos = os.path.join(abidata.pseudo_dir, "14si.pspnc") + + # Build input for GS calculation + # ecut must be specified because this pseudopotential does not provide hints for ecut. + try: + gs_inp = abilab.gs_input( + structure, pseudos, + kppa=kppra, ecut=8, spin_mode=spin_mode, smearing=None) + gs_inp.pop_vars(("charge", "chksymbreak")) + + if gs_type == "relax": + gs_inp.set_vars(optcell=2, ionmov=2, ecutsm=0.5, dilatmx=1.05) + + #multi = ebands_input(structure, pseudos, + # kppa=kppra, nscf_nband=None, ndivsm=15, + # ecut=8, pawecutdg=None, scf_nband=None, accuracy="normal", spin_mode=spin_mode, + # smearing="fermi_dirac:0.1 eV", charge=None, dos_kppa=None): + + gs_inp.set_mnemonics(False) + except Exception as exc: + return html.Div([dbc.Jumbotron([html.H2("There was an error processing this file. %s" % str(exc), + className="text-danger")])]) + + s = DangerouslySetInnerHTML(gs_inp._repr_html_()) + + return html.Div([ + copy_to_clipboard_button(id="copy_gsinput"), + html.Hr(), + html.Pre(s, id="copy_gsinput"), # className="text-sm-left", + ]) + + +@app.callback(Output('convert_page_output', 'children'), + [Input('convert_format', 'value')], + [State("json_structure", "children")], + ) +def update_convert_page(output_format, json_structure): + if not json_structure: return structure_undefined_error() + structure = abilab.mjson_loads(json_structure) + return html.Div([ + copy_to_clipboard_button(id="copy_convert_output"), + html.Hr(), + html.Pre(structure.convert(fmt=output_format), id="copy_convert_output"), + ]) + + +@app.callback(Output('symmetry_page_output', 'children'), + [Input('spglib_symprec', 'value'), + Input('spglib_angtol', 'value'), + #Input('abinit_tolsym', 'value'), + ], + [State("json_structure", "children")], + ) +def update_symmetry_page(spglib_symprec, spglib_angtol, json_structure): + if not json_structure: return structure_undefined_error() + structure = abilab.mjson_loads(json_structure) + + #print(f"symprec: {spglib_symprec}, spglib_angtol: {spglib_angtol}, abinit_tolsym: {abinit_tolsym}") + s = structure.spget_summary(symprec=spglib_symprec, angle_tolerance=spglib_angtol) + return html.Div([html.Br(), html.Pre(s)]) + + +kpath_options_input = dbc.InputGroup([ + dbc.InputGroupAddon("Output Format:", addon_type="prepend"), + dbc.Select(id="kpath_fmt", + options=[{"label": k, "value": k} for k in ("abinit", "wannier90", "siesta")], value="abinit"), + dbc.InputGroupAddon("Line Density:", addon_type="prepend"), + dbc.Input(id="kpath_line_density", min=1, step=10, value=10, type="number"), +]) + + +kpath_page_layout = html.Div([ + dbc.Row(dbc.Col(html.Div(kpath_options_input))), + dbc.Row(html.Div(id='kpath_page_output')), +]) + + +@app.callback(Output('kpath_page_output', 'children'), + [Input('kpath_fmt', 'value'), + Input('kpath_line_density', 'value'), + ], + [State("json_structure", "children")], + ) +def update_kpath_page(kpath_fmt, kpath_line_density, json_structure): + if not json_structure: return structure_undefined_error() + structure = abilab.mjson_loads(json_structure) + + #print(f"kpath_fmt: {kpath_fmt}, kpath_line_density: {kpath_line_density}") + try: + s = structure.get_kpath_input_string(fmt=kpath_fmt, line_density=int(kpath_line_density)) + except Exception as exc: + return div_with_exc(exc) + + return html.Div([ + html.Br(), + copy_to_clipboard_button(id="kpath_string"), + html.Hr(), + html.Pre(s, id="kpath_string") + ]) + + +def structure_undefined_error(): + return html.Div([ + html.Br(), + dbc.Jumbotron([html.H2("Use `Select Structure` to upload the file", className="text-danger")]) + ]) + + +@app.callback([Output('print_structure', 'children'), + Output('json_structure', 'children')], + [Input('upload-data', 'contents')], + [State('upload-data', 'filename'), + State('upload-data', 'last_modified')]) +def structure_from_upload(contents, filename, date): + #print("filename, date", filename, date) + content_type, content_string = contents.split(',') + + if filename.endswith(".nc"): + mode = "wb" + decoded = base64.b64decode(content_string) + else: + mode = "wt" + decoded = base64.b64decode(content_string).decode('utf-8') + + try: + with tempfile.TemporaryDirectory() as tmp_dirname: + tmp_path = os.path.join(tmp_dirname, filename) + with open(tmp_path, mode) as fh: + fh.write(decoded) + structure = abilab.Structure.from_file(tmp_path) + + return html.Div([html.Br(), html.Pre(str(structure))]), structure.to_json() + + except Exception as exc: + return html.Div([dbc.Jumbotron([html.H2("There was an error processing this file. %s" % str(exc), + className="text-danger")])]), None + + +about_page_layout = html.Div([ + dcc.Markdown(""" +This web app is built on the +[AbiPy](https://github.com/abinit/abipy), +[pymatgen](https://github.com/materialsproject/pymatgen) and +[spglib](https://atztogo.github.io/spglib/) libraries. + +Note that this tool provides a simplified interface to the AbiPy API. +For a more flexible interface, please use the AbiPy objects to generate input files and workflows. + +**Privacy**: We do not store any files or data on our server. +Any uploaded files is analyzed and the results presented immediately. +""") +]) + +@app.callback(Output("page-content", "children"), + [Input("url", "pathname")]) +def render_page_content(pathname): + + if pathname in ["/", "/page-1"]: + return init_structure_layout + elif pathname == "/page-2": + return convert_page_layout + elif pathname == "/page-3": + return symmetry_analysis_page_layout + elif pathname == "/page-4": + return kpath_page_layout + elif pathname == "/page-5": + return input_page_layout + elif pathname == "/page-6": + return about_page_layout + + # If the user tries to reach a different page, return a 404 message + return dbc.Jumbotron([html.H1("404: Not found", className="text-danger"), + html.Hr(), + html.P(f"The pathname {pathname} was not recognised..."), + ]) + + +# this callback uses the current pathname to set the active state of the +# corresponding nav link to true, allowing users to tell see page they are on +@app.callback( + [Output(f"page-{i}-link", "active") for i in range(1, num_pages + 1)], + [Input("url", "pathname")], +) +def toggle_active_links(pathname): + if pathname == "/": + # Treat page 1 as the homepage / index + out = num_pages * [False] + out[0] = True + return out + return [pathname == f"/page-{i}" for i in range(1, num_pages + 1)] + + +@app.callback( + Output("sidebar", "className"), + [Input("sidebar-toggle", "n_clicks")], + [State("sidebar", "className")], +) +def toggle_classname(n, classname): + if n and classname == "": + return "collapsed" + return "" + + +@app.callback( + Output("collapse", "is_open"), + [Input("navbar-toggle", "n_clicks")], + [State("collapse", "is_open")], +) +def toggle_collapse(n, is_open): + if n: + return not is_open + return is_open + + +if __name__ == "__main__": + app.run_server(debug=True) diff --git a/dash_app/assets/extra.js b/dash_app/assets/extra.js new file mode 100644 index 000000000..341db9f34 --- /dev/null +++ b/dash_app/assets/extra.js @@ -0,0 +1,2 @@ +// +new ClipboardJS('.btn'); diff --git a/dash_app/assets/responsive-sidebar.css b/dash_app/assets/responsive-sidebar.css new file mode 100644 index 000000000..6e3d20aac --- /dev/null +++ b/dash_app/assets/responsive-sidebar.css @@ -0,0 +1,96 @@ +#sidebar { + text-align: center; + padding: 2rem 1rem; + background-color: #f8f9fa; +} + +#sidebar h2 { + text-align: left; + margin-bottom: 0; +} + +/* Hide the blurb on a small screen */ +#blurb { + display: none; +} + +#sidebar-toggle { + display: none; +} + +#collapse *:first-child { + margin-top: 1rem; +} + +/* add the three horizontal bars icon for the toggle */ +.navbar-toggler-icon { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +#page-content { + padding: 2rem 1rem; +} + +@media (min-width: 48em) { + #sidebar { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 20rem; + text-align: left; + transition: margin 0.3s ease-in-out, padding 0.3s ease-in-out; + } + + #sidebar-toggle { + display: inline-block; + position: relative; + top: 0; + transition: top 0.3s ease-in-out; + } + + /* add negative margin to sidebar to achieve the collapse */ + #sidebar.collapsed { + margin-left: -15.5rem; + padding-right: 0.5rem; + } + + /* move the sidebar toggle up to the top left corner */ + #sidebar.collapsed #sidebar-toggle { + top: -2rem; + } + + /* also adjust margin of page content */ + #sidebar.collapsed ~ #page-content { + margin-left: 6.5rem; + } + + /* move all contents of navbar other than header (containing toggle) further + off-screen */ + #sidebar.collapsed > *:not(:first-child) { + margin-left: -6rem; + margin-right: 6rem; + } + + /* reveal the blurb on a large screen */ + #blurb { + display: block; + } + + /* Hide the toggle on a large screen */ + #navbar-toggle { + display: none; + } + + #collapse { + display: block; + } + + /* set margins of the main content so that it doesn't overlap the sidebar */ + #page-content { + margin-left: 22rem; + margin-right: 2rem; + transition: margin-left 0.3s ease-in-out; + } +} + diff --git a/dev_scripts/conda_get.sh b/dev_scripts/conda_get.sh index 90df3897d..fd216b916 100755 --- a/dev_scripts/conda_get.sh +++ b/dev_scripts/conda_get.sh @@ -1,30 +1,29 @@ #!/bin/bash -set -e # exit on first error +set -e # exit on first error, -v print each command # Install conda with travis: https://conda.io/docs/travis.html if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then - curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh; - else - curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; - fi + curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; else - if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; - else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - fi + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi bash miniconda.sh -b -p ${HOME}/miniconda export PATH="${HOME}/miniconda/bin:${PATH}" - hash -r conda config --set always_yes yes --set changeps1 yes conda update -q conda # Useful for debugging any issues with conda conda info -a -# Replace dep1 dep2 ... with your dependencies +conda config --add channels conda-forge +echo "Installing abinit from abinit channel in abinit-environment..." +conda create -q -n abinit-environment python=${TRAVIS_PYTHON_VERSION} +source activate abinit-environment +conda install -y -c abinit abinit=${ABINIT_VERSION} +abinit --version +abinit --build + +echo "Creating test-environment for python stack..." conda create -q -n test-environment python=${TRAVIS_PYTHON_VERSION} source activate test-environment diff --git a/dev_scripts/conda_install.sh b/dev_scripts/conda_install.sh index 33af33b8a..edc8ab98f 100755 --- a/dev_scripts/conda_install.sh +++ b/dev_scripts/conda_install.sh @@ -1,12 +1,10 @@ #!/bin/bash set -e # exit on first error -echo "Installing AbiPy dependencies with conda." -echo "Adding conda-forge, matsci and abinit to channels" -echo "Working in CONDA_PREFIX: ${CONDA_PREFIX} ..." -conda config --add channels conda-forge -conda config --add channels matsci -conda config --add channels abinit +echo "Installing bader executable (http://theory.cm.utexas.edu/henkelman/code/bader/) from matsci ..." +conda install -y -c matsci bader +conda install -c abinit apscheduler==2.1.0 +#pip install apscheduler==2.1.0 echo "Installing requirements listed requirements.txt and requirements-optional.txt ..." # https://github.com/ContinuumIO/anaconda-issues/issues/542 @@ -14,16 +12,6 @@ conda install -y -c anaconda setuptools conda install nomkl conda install -y --file ./requirements.txt conda install -y --file ./requirements-optional.txt +conda install -y -c conda-forge graphviz python-graphviz -conda install -c conda-forge graphviz python-graphviz - -echo "Installing bader executable (http://theory.cm.utexas.edu/henkelman/code/bader/) from matsci ..." -conda install -y -c matsci bader - -echo "Installing abinit from abinit channel ..." -#conda install -y -c gmatteo abinit=${ABINIT_VERSION} -conda install -y -c abinit abinit=${ABINIT_VERSION} -abinit --version -abinit --build - -echo "Installation completed" \ No newline at end of file +echo "Installation completed" diff --git a/dev_scripts/open_hook.py b/dev_scripts/open_hook.py deleted file mode 100644 index a1e9dbd9e..000000000 --- a/dev_scripts/open_hook.py +++ /dev/null @@ -1,147 +0,0 @@ -""" -This module installs a hook for the built-in open so that one can detect if there are -files that have not been closed. To install the hook, import the module in the script -and call install. Example - -import open_hook - -# Install the hook -open_hook.install() - -# Show open files. -open_hook.print_open_files() - -# Remove the hook -open_hook.remove() - -Initial version taken from -http://stackoverflow.com/questions/2023608/check-what-files-are-open-in-python -""" -from __future__ import print_function, division, unicode_literals - -import sys -try: - import __builtin__ -except ImportError: - # Py3k - import builtins as __builtin__ - -# Save the builtin version (do not change!) -_builtin_file = __builtin__.file -_builtin_open = __builtin__.open - -# Global variables used to control the logging volume and the log file. -_VERBOSE = 1 -_LOGFILE = sys.stdout - - -def set_options(**kwargs): - """Set the value of verbose and logfile.""" - verbose = kwargs.get("verbose", None) - if verbose is not None: - _VERBOSE = verbose - - logfile = kwargs.get("logfile", None) - if logfile is not None: - _LOGFILE = logfile - - -# Set of files that have been opened in the python code. -_openfiles = set() - - -def print_open_files(file=sys.stdout): - """Print the list of the files that are still open.""" - print("### %d OPEN FILES: [%s]" % (len(_openfiles), ", ".join(f._x for f in _openfiles)), file=file) - - -def num_openfiles(): - """Number of files in use.""" - return len(_openfiles) - - -def clear_openfiles(): - """Reinitialize the set of open files.""" - _openfiles = set() - - -class _newfile(_builtin_file): - def __init__(self, *args, **kwargs): - self._x = args[0] - - if _VERBOSE: - print("### OPENING %s ###" % str(self._x), file=_LOGFILE) - - _builtin_file.__init__(self, *args, **kwargs) - _openfiles.add(self) - - def close(self): - if _VERBOSE: - print("### CLOSING %s ###" % str(self._x), file=_LOGFILE) - - _builtin_file.close(self) - try: - _openfiles.remove(self) - except KeyError: - print("File %s is not in openfiles set" % self) - - -def _newopen(*args, **kwargs): - """Replacement for python open.""" - return _newfile(*args, **kwargs) - - -def install(): - """Install the hook.""" - __builtin__.file = _newfile - __builtin__.open = _newopen - - -def remove(): - """Remove the hook.""" - __builtin__.file = _builtin_file = __builtin__.file - __builtin__.open = _builtin_open = __builtin__.open - - -def test_open_hook(): - """Unit tests for open_hook""" - import unittest - import tempfile - - py3k = False - try: - import __builtin__ - except ImportError: - py3k = True - import builtins as __builtin__ - - - @unittest.skipIf(py3k, "OpenHook not compatible with py3k") - class OpenHookTest(unittest.TestCase): - """Test open_hook module.""" - def setUp(self): - from abipy.tools import open_hook - self.open_hook = open_hook - self.open_hook.install() - - def test_open(self): - """Test if open_hook detects open files.""" - self.assertEqual(self.open_hook.num_openfiles(), 0) - - _, fname = tempfile.mkstemp() - fh = open(fname) - - self.open_hook.print_open_files() - self.assertEqual(self.open_hook.num_openfiles(), 1) - - def tearDown(self): - self.open_hook.remove() - # Here we should have the __builtin__ version - - self.assertTrue(file is __builtin__.file) - self.assertTrue(open is __builtin__.open) - - -if __name__ == "__main__": - import unittest - unittest.main() diff --git a/dev_scripts/runtests.sh b/dev_scripts/runtests.sh index eec99ab57..b8c4d8cf9 100755 --- a/dev_scripts/runtests.sh +++ b/dev_scripts/runtests.sh @@ -4,36 +4,28 @@ set -e # exit on first error echo "PMG_MAPI_KEY: 8pkvwRLQSCVbW2Fe" > ${HOME}/.pmgrc.yaml -abinit --version -abinit --build -abicheck.py --with-flow - -# Run unit tests with nose. -#nosetests -v --with-coverage --cover-package=abipy --logging-level=INFO --doctest-tests +echo "Running preliminary tests for Abipy with Abinit..." +#abinit --version +#abinit --build +#abicheck.py --with-flow # Run unit tests with pytest. No doctests if 2.7 -if [[ "${ABIPY_PYTEST}" == "yes" ]]; then - if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then - pytest -n 2 --cov-config=.coveragerc --cov=abipy -v abipy \ - --ignore=abipy/integration_tests --ignore=abipy/data/refs --ignore=abipy/scripts/ \ - --ignore=abipy/examples/plot --ignore=abipy/examples/flows --ignore=abipy/gui - else - #pytest --cov-config=.coveragerc --cov=abipy -v --doctest-modules abipy \ +if [[ "${ABIPY_PYTEST}" == "yes" ]]; then + echo "Running tests with pytests..." pytest -n 2 --cov-config=.coveragerc --cov=abipy -v --doctest-modules abipy \ --ignore=abipy/integration_tests --ignore=abipy/data/refs --ignore=abipy/scripts/ \ - --ignore=abipy/examples/plot --ignore=abipy/examples/flows --ignore=abipy/gui - fi + --ignore=abipy/examples/plot --ignore=abipy/examples/flows --ignore=abipy/gui fi -# This is to run the integration tests (append results) -# integration_tests are excluded in setup.cfg -if [[ "${ABIPY_COVERALLS}" == "yes" ]]; then - pytest -n 2 --cov-config=.coveragerc --cov=abipy --cov-append -v abipy/integration_tests - #pytest --cov-config=.coveragerc --cov=abipy --cov-append -v abipy/integration_tests +# This is to run the integration tests (append results) integration_tests are excluded in setup.cfg +if [[ "${ABIPY_COVERALLS}" == "yes" ]]; then + echo "Running integration tests..." + pytest -n 2 --cov-config=.coveragerc --cov=abipy --cov-append -v abipy/integration_tests fi # Generate documentation if [[ "${ABIPY_SPHINX}" == "yes" ]]; then + echo "Generating documentations with sphinx..." pip install -r ./docs/requirements.txt cd ./docs && export READTHEDOCS=1 && make && unset READTHEDOCS && cd .. fi diff --git a/docs/README.rst b/docs/README.rst index da62d14ef..f9e57279b 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -1,7 +1,7 @@ .. _documenting-abipy: Documenting AbiPy -================== +================= .. contents:: :backlinks: top @@ -9,22 +9,23 @@ Documenting AbiPy Organization of documentation ----------------------------- -The documentation for AbiPy is generated from ReStructured Text using the Sphinx_ documentation generation tool. -The documentation sources are found in the :file:`~/docs/` directory in the repository. Major items : +The AbiPy documentation is generated from ReStructured Text using the Sphinx_ documentation generation tool. +The documentation sources are in the :file:`~/docs/` directory in the repository. +Major items: * index.rst - the top level include document for AbiPy docs * api - placeholders to automatically generate the api documentation * scripts - documentation for scripts -* workflows - documentation for workflows +* flow_gallery/gallery - automatically generated by sphinx-gallery +* workflows - Documentation about Abinit flows/works/tasks and TaskManager * README.rst - the present file -* conf.py - the sphinx configuration +* conf.py - the sphinx configuration file * _static - used by the sphinx build system -* _templates - used by the sphinx build system -The main entry point is :file:`docs/index.rst`, which pulls in -the files for the users guide, developers guide, api reference. -The actual ReStructured Text files for the APIs of the subpackages, for the scripts and for the workflows (resp.) are kept -in :file:`docs/api`, :file:`docs/scripts` and :file:`docs/workflows` (resp.). +The main entry point is :file:`docs/index.rst`, which pulls in the files +for the users guide, developers guide, api reference. +The actual ReStructured Text files for the APIs of the subpackages, for the scripts and for the workflows (resp.) are kept +in :file:`docs/api`, :file:`docs/scripts` and :file:`docs/workflows` (resp.). Additional files can be added to the various guides by including their base file name (the ``.rst`` extension is not necessary) in the table of contents. @@ -34,12 +35,12 @@ statement, such as:: .. include:: ../../TODO The output produced by Sphinx can be configured by editing the :file:`conf.py` file located in the :file:`docs/`. -Before building the documentation, you need to install the sphinx extensions listed +Before building the documentation, you need to install the sphinx extensions listed in :file:`abipy/docs/requirements.txt` with:: pip install -r abipy/docs/requirements.txt -To build the HTML documentation, install sphinx then type ``make html`` that will execute:: +To build the HTML documentation, install sphinx then type ``make`` that will execute:: sphinx-build -b html -d _build/doctrees . _build/html @@ -50,6 +51,11 @@ Remember to issue:: before running ``make`` to activate the generation of the thumbnails in :file:`abipy/examples/flows`. The documentation is produced in :file:`_build/html`. +Use:: + + open _build/html/index.html + +to open the homepage in your browser. You can run ``make help`` to see information on all possible make targets. @@ -57,7 +63,7 @@ Use:: ./ghp_import.py _build/html/ -n -p -to deploy to gh-pages. +to deploy to gh-pages (only for project leader). .. _formatting-abipy-docs: @@ -66,11 +72,11 @@ Formatting ---------- The Sphinx website contains plenty of documentation_ concerning ReST markup and -working with Sphinx in general. +working with Sphinx in general. Here are a few additional things to keep in mind: -* Please familiarize yourself with the Sphinx directives for `inline markup`_. - Abipy's documentation makes heavy use of cross-referencing and other semantic markup. +* Please familiarize yourself with the Sphinx directives for `inline markup`_. + Abipy's documentation makes heavy use of cross-referencing and other semantic markup. Several aliases are defined in :file:`abipy/docs/links.rst` and are automatically included in each ``rst`` file via `rst_epilog `_ @@ -89,7 +95,7 @@ Here are a few additional things to keep in mind: \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}} -* Bibtex citations are supported via the +* Bibtex citations are supported via the `sphinxcontrib-bibtex extension `_ The bibtext entries are declared in the :file:`abipy/docs/refs.bib` file. For example:: @@ -152,33 +158,28 @@ Here are a few additional things to keep in mind: The transforms have been completely revamped. * The autodoc extension will handle index entries for the API, but additional - entries in the index_ need to be explicitly added. + entries in the index need to be explicitly added. -.. _documentation: http://sphinx.pocoo.org/contents.html -.. _`inline markup`: http://sphinx.pocoo.org/markup/inline.html -.. _index: http://sphinx.pocoo.org/markup/para.html#index-generating-markup +.. _documentation: http://www.sphinx-doc.org/en/master/ +.. _`inline markup`: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html?highlight=inline#inline-markup Docstrings ---------- In addition to the aforementioned formatting suggestions: -* Docstrings are written following the +* Docstrings are written following the `Google Python Style Guide `_. We use the `napoleon `_ extension to convert Google style docstrings to reStructuredText before Sphinx attempts to parse them. -* Please limit the text width of docstrings to (around) 90 characters. - -* Keyword arguments should be described using a definition list. - Dynamically generated figures ----------------------------- -Figures can be automatically generated from scripts and included in the docs. -It is not necessary to explicitly save the figure in the script, this will be done +Figures can be automatically generated from scripts and included in the docs. +It is not necessary to explicitly save the figure in the script, this will be done automatically at build time to ensure that the code that is included runs and produces the advertised figure. -Any plots specific to the documentation should be added to the :file:`examples/plot/` directory and committed to git. +Any plots specific to the documentation should be added to the :file:`examples/plot/` directory and committed to git. `sphinx-gallery `_ diff --git a/docs/api/core_api.rst b/docs/api/core_api.rst index b7f9ee7e3..c64ae4f5e 100644 --- a/docs/api/core_api.rst +++ b/docs/api/core_api.rst @@ -116,14 +116,6 @@ core Package :undoc-members: :show-inheritance: -:mod:`tensor` Module --------------------- - -.. automodule:: abipy.core.tensor - :members: - :undoc-members: - :show-inheritance: - :mod:`testing` Module --------------------- @@ -132,10 +124,10 @@ core Package :undoc-members: :show-inheritance: -:mod:`wyckoff` Module ---------------------- +:mod:`site_symmetries` Module +----------------------------- -.. automodule:: abipy.core.wyckoff +.. automodule:: abipy.core.site_symmetries :members: :undoc-members: :show-inheritance: diff --git a/docs/api/dfpt_api.rst b/docs/api/dfpt_api.rst index 35bab8610..29ec20c34 100644 --- a/docs/api/dfpt_api.rst +++ b/docs/api/dfpt_api.rst @@ -28,6 +28,14 @@ dfpt Package :undoc-members: :show-inheritance: +:mod:`elastic` Module +--------------------- + +.. automodule:: abipy.dfpt.elastic + :members: + :undoc-members: + :show-inheritance: + :mod:`frozen_phonons` Module ---------------------------- @@ -45,6 +53,22 @@ dfpt Package :undoc-members: :show-inheritance: +:mod:`ifc` Module +----------------- + +.. automodule:: abipy.dfpt.ifc + :members: + :undoc-members: + :show-inheritance: + +:mod:`msqdos` Module +-------------------- + +.. automodule:: abipy.dfpt.msqdos + :members: + :undoc-members: + :show-inheritance: + :mod:`phonons` Module --------------------- @@ -53,6 +77,14 @@ dfpt Package :undoc-members: :show-inheritance: +:mod:`phtk` Module +------------------ + +.. automodule:: abipy.dfpt.phtk + :members: + :undoc-members: + :show-inheritance: + :mod:`qha` Module ----------------- @@ -61,11 +93,18 @@ dfpt Package :undoc-members: :show-inheritance: +:mod:`raman` Module +------------------- -:mod:`tensors` Module ---------------------- +.. automodule:: abipy.dfpt.raman + :members: + :undoc-members: + :show-inheritance: + +:mod:`vsound` Module +-------------------- -.. automodule:: abipy.dfpt.tensors +.. automodule:: abipy.dfpt.vsound :members: :undoc-members: :show-inheritance: diff --git a/docs/api/display_api.rst b/docs/api/display_api.rst index 98baf8dfd..8084fdcbd 100644 --- a/docs/api/display_api.rst +++ b/docs/api/display_api.rst @@ -21,22 +21,6 @@ display Package :undoc-members: :show-inheritance: -:mod:`pandasw` Module ----------------------- - -.. automodule:: abipy.display.pandasw - :members: - :undoc-members: - :show-inheritance: - -:mod:`seabornw` Module ----------------------- - -.. automodule:: abipy.display.seabornw - :members: - :undoc-members: - :show-inheritance: - :mod:`utils` Module ------------------- diff --git a/docs/api/electrons_api.rst b/docs/api/electrons_api.rst index 4cb8418d8..f07923fbd 100644 --- a/docs/api/electrons_api.rst +++ b/docs/api/electrons_api.rst @@ -13,6 +13,14 @@ electrons Package :undoc-members: :show-inheritance: +:mod:`eskw` Package +------------------- + +.. automodule:: abipy.electrons.eskw + :members: + :undoc-members: + :show-inheritance: + :mod:`bse` Module ----------------- @@ -29,14 +37,6 @@ electrons Package :undoc-members: :show-inheritance: -:mod:`ddk` Module ------------------ - -.. automodule:: abipy.electrons.ddk - :members: - :undoc-members: - :show-inheritance: - :mod:`denpot` Module -------------------- @@ -52,6 +52,14 @@ electrons Package :members: :undoc-members: :show-inheritance: + +:mod:`effmass_analyzer` Module +------------------------------ + +.. automodule:: abipy.electrons.effmass_analyzer + :members: + :undoc-members: + :show-inheritance: :mod:`fatbands` Module ---------------------- diff --git a/docs/api/eph_api.rst b/docs/api/eph_api.rst index fcc46bc3b..a67759750 100644 --- a/docs/api/eph_api.rst +++ b/docs/api/eph_api.rst @@ -20,6 +20,22 @@ eph Package :undoc-members: :show-inheritance: +:mod:`common` Module +-------------------- + +.. automodule:: abipy.eph.common + :members: + :undoc-members: + :show-inheritance: + +:mod:`eph_plotter` Module +------------------------- + +.. automodule:: abipy.eph.eph_plotter + :members: + :undoc-members: + :show-inheritance: + :mod:`sigeph` Module -------------------- @@ -27,3 +43,19 @@ eph Package :members: :undoc-members: :show-inheritance: + +:mod:`transportfile` Module +--------------------------- + +.. automodule:: abipy.eph.transportfile + :members: + :undoc-members: + :show-inheritance: + +:mod:`v1sym` Module +------------------- + +.. automodule:: abipy.eph.v1sym + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/flowtk_api.rst b/docs/api/flowtk_api.rst index 1696c5605..8666625e2 100644 --- a/docs/api/flowtk_api.rst +++ b/docs/api/flowtk_api.rst @@ -36,6 +36,14 @@ flowtk Package :undoc-members: :show-inheritance: +:mod:`abitimer` Module +---------------------- + +.. automodule:: abipy.flowtk.abitimer + :members: + :undoc-members: + :show-inheritance: + :mod:`dfpt_works` Module ------------------------ @@ -44,6 +52,23 @@ flowtk Package :undoc-members: :show-inheritance: + +:mod:`effmass_works` Module +--------------------------- + +.. automodule:: abipy.flowtk.effmass_works + :members: + :undoc-members: + :show-inheritance: + +:mod:`eph_flows` Module +----------------------- + +.. automodule:: abipy.flowtk.eph_flows + :members: + :undoc-members: + :show-inheritance: + :mod:`events` Module -------------------- @@ -76,6 +101,14 @@ flowtk Package :undoc-members: :show-inheritance: +:mod:`launcher` Module +---------------------- + +.. automodule:: abipy.flowtk.launcher + :members: + :undoc-members: + :show-inheritance: + :mod:`mocks` Module ------------------- @@ -92,6 +125,14 @@ flowtk Package :undoc-members: :show-inheritance: +:mod:`nodes` Module +------------------- + +.. automodule:: abipy.flowtk.nodes + :members: + :undoc-members: + :show-inheritance: + :mod:`pseudos` Module --------------------- @@ -100,6 +141,14 @@ flowtk Package :undoc-members: :show-inheritance: +:mod:`qadapters` Module +----------------------- + +.. automodule:: abipy.flowtk.qadapters + :members: + :undoc-members: + :show-inheritance: + :mod:`qha` Module ----------------- @@ -108,6 +157,14 @@ flowtk Package :undoc-members: :show-inheritance: +:mod:`qjobs` Module +------------------- + +.. automodule:: abipy.flowtk.qjobs + :members: + :undoc-members: + :show-inheritance: + :mod:`qutils` Module -------------------- diff --git a/docs/api/index.rst b/docs/api/index.rst index 93a989ffe..7b8583ddc 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -4,11 +4,6 @@ API documentation ================= -.. htmlonly:: - - :Release: |version| - :Date: |today| - .. toctree:: :maxdepth: 1 @@ -23,6 +18,7 @@ API documentation eph_api.rst flowtk_api.rst iotools_api.rst + panels_api.rst tools_api.rst waves_api.rst wannier90_api.rst diff --git a/docs/api/panels_api.rst b/docs/api/panels_api.rst new file mode 100644 index 000000000..afb12d6ba --- /dev/null +++ b/docs/api/panels_api.rst @@ -0,0 +1,62 @@ + +panels Package +============== + +.. contents:: + :backlinks: top + +:mod:`panels` Package +--------------------- + +.. automodule:: abipy.panels + :members: + :undoc-members: + :show-inheritance: + +:mod:`core` Module +------------------ + +.. automodule:: abipy.panels.core + :members: + :undoc-members: + :show-inheritance: + +:mod:`ddb` Module +----------------- + +.. automodule:: abipy.panels.ddb + :members: + :undoc-members: + :show-inheritance: + +:mod:`flows` Module +------------------- + +.. automodule:: abipy.panels.flows + :members: + :undoc-members: + :show-inheritance: + +:mod:`gsr` Module +----------------- + +.. automodule:: abipy.panels.gsr + :members: + :undoc-members: + :show-inheritance: + +:mod:`phonons` Module +--------------------- + +.. automodule:: abipy.panels.phonons + :members: + :undoc-members: + :show-inheritance: + +:mod:`structure` Module +----------------------- + +.. automodule:: abipy.panels.structure + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/tools_api.rst b/docs/api/tools_api.rst index b3c1f9767..cb8ed42f3 100644 --- a/docs/api/tools_api.rst +++ b/docs/api/tools_api.rst @@ -93,6 +93,14 @@ tools Package :undoc-members: :show-inheritance: +:mod:`tensors` Module +--------------------- + +.. automodule:: abipy.tools.tensors + :members: + :undoc-members: + :show-inheritance: + :mod:`text` Module ------------------ diff --git a/docs/coding_guide.rst b/docs/coding_guide.rst index c935ad51d..d8e4854b2 100644 --- a/docs/coding_guide.rst +++ b/docs/coding_guide.rst @@ -112,4 +112,5 @@ Testing Abipy has a testing infrastructure based on :mod:`unittest` and pytest_. Common test support is provided by :mod:`abipy.core.testing`, -data files are stored in :file:`abipy/tests/data`. +data files are stored in :file:`abipy/data`, in particular in :file:`abipy/data/refs` that +contains several output files that can be used for writing unit tests and examples. diff --git a/docs/conf.py b/docs/conf.py index 7de742efd..cfaa3b221 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,20 +4,17 @@ # Note that not all possible configuration values are present in this autogenerated file. # # All configuration values have a default; values that are commented out serve to show the default. -from __future__ import print_function, absolute_import, unicode_literals, division import sys import os import shutil -#import matplotlib as mpl -#mpl.use("Agg") + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. ABIPY_ROOT = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) -#print(ABIPY_ROOT) sys.path.insert(0, ABIPY_ROOT) @@ -26,14 +23,7 @@ mod_name = os.path.join(ABIPY_ROOT, "abipy", "core", "release.py") relmod = imp.load_source(mod_name, mod_name) -on_rtd = os.environ.get('READTHEDOCS') == 'True' and os.environ.get("READTHEDOCS_PROJECT") -if on_rtd: - print("Preparing execution on READTHEDOCS server...") - os.makedirs(os.path.expanduser("~/.abinit/abipy")) - shutil.copy(os.path.join(ABIPY_ROOT, "data", "managers", "travis_scheduler.yml"), - os.path.expanduser("~/.abinit/abipy/scheduler.yml")) - shutil.copy(os.path.join(ABIPY_ROOT, "data", "managers", "travis_manager.yml"), - os.path.expanduser("~/.abinit/abipy/manager.yml")) +on_rtd = os.environ.get('READTHEDOCS') == 'True' # -- General configuration ----------------------------------------------------- @@ -58,20 +48,20 @@ 'sphinx_gallery.gen_gallery', "sphinxarg.ext", # CLI doc 'sphinxcontrib.bibtex', - "releases", + "jupyter_sphinx.execute", #'nbsphinx', + #"releases", #'sphinx.ext.coverage', - ] # Add any Sphinx extension module names here, as strings. They can # be extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. import matplotlib + extensions += [ - 'matplotlib.sphinxext.only_directives', - 'matplotlib.sphinxext.plot_directive', 'IPython.sphinxext.ipython_directive', 'IPython.sphinxext.ipython_console_highlighting', + 'matplotlib.sphinxext.plot_directive', ] # Add local extensions (not available on PyPi) @@ -80,16 +70,63 @@ 'youtube', ] +######################### +# Spinx Gallery Settings +######################### + +mpl = matplotlib +mpl.use("Agg") +mpl.rcParams['figure.dpi'] = 300 + + +#def reset_mpl(gallery_conf, fname): +# """reset matplotlib to always use the seaborn style.""" +# # https://542-25860190-gh.circle-artifacts.com/0/rtd_html/advanced_configuration.html#resetting-modules +# #from matplotlib import style +# #style.use('ggplot') +# import seaborn as sns +# rc = {'figure.dpi': 300} +# sns.set(context='talk', style='darkgrid', palette='deep', font='sans-serif', font_scale=1, color_codes=True, rc=rc) + +#import glob +#from sphinx_gallery.gen_rst import figure_rst +# +#class PNGScraper(object): +# # https://sphinx-gallery.readthedocs.io/en/latest/advanced_configuration.html#image-scrapers +# def __init__(self): +# self.seen = set() +# +# def __call__(self, block, block_vars, gallery_conf): +# pngs = sorted(glob.glob(os.path.join(os.getcwd(), '*.png'))) +# image_names = [] +# image_path_iterator = block_vars['image_path_iterator'] +# for png in pngs: +# if png not in self.seen: +# self.seen |= set(png) +# image_names.append(image_path_iterator.next()) +# shutil.copyfile(png, image_names[-1]) +# return figure_rst(image_names, gallery_conf['src_dir']) + + from sphinx_gallery.sorting import FileNameSortKey, NumberOfCodeLinesSortKey + sphinx_gallery_conf = { # path to your examples scripts - 'examples_dirs': ["../abipy/examples/plot", "../abipy/examples/flows",], + 'examples_dirs': [ + "../abipy/examples/plot", + "../abipy/examples/flows", + ], + #'examples_dirs': [], # path where to save gallery generated examples - 'gallery_dirs': ["gallery", "flow_gallery",], + 'gallery_dirs': [ + "gallery", + "flow_gallery", + ], 'filename_pattern': "(/plot_*|/run_*)", 'default_thumb_file': '_static/abipy_logo.png', 'within_subsection_order': NumberOfCodeLinesSortKey, 'backreferences_dir': False, + #'reset_modules': (reset_mpl,), #'find_mayavi_figures': True, 'reference_url': { 'abipy': None, # The module you locally document uses None @@ -98,6 +135,9 @@ 'pandas': "http://pandas-docs.github.io/pandas-docs-travis/", "pymatgen": "http://pymatgen.org/", }, + #'image_scrapers': ('matplotlib',), + #'image_scrapers': ('matplotlib', 'mayavi'), + #'image_scrapers': ('matplotlib', PNGScraper()), # TODO #https://sphinx-gallery.github.io/advanced_configuration.html#generate-binder-links-for-gallery-notebooks-experimental #'binder': { @@ -411,7 +451,7 @@ def setup(app): "scipy": ("https://docs.scipy.org/doc/scipy/reference/", None), 'pandas': ("http://pandas-docs.github.io/pandas-docs-travis/", None), 'matplotlib': ('https://matplotlib.org/', None), - "monty": ("http://pythonhosted.org/monty/", None), + "monty": ("https://pythonhosted.org/monty/", None), "pymatgen": ("http://pymatgen.org/", None), 'mayavi': ('http://docs.enthought.com/mayavi/mayavi', None), } @@ -442,22 +482,21 @@ def setup(app): # pybtex provides a very powerful way to create and register new styles, using setuptools entry points, # as documented here: http://docs.pybtex.org/api/plugins.html -#from pybtex.style.formatting.unsrt import Style as UnsrtStyle -#from pybtex.style.template import toplevel # ... and anything else needed -#from pybtex.plugin import register_plugin +from pybtex.style.formatting.plain import Style +from pybtex.style.labels.alpha import LabelStyle -#class MyStyle(UnsrtStyle): -# def format_label(self, entry): -# print("hello") -# return "APA" -# -# #def format_XXX(self, e): -# # template = toplevel [ -# # # etc. -# # ] -# # return template.format_data(e) -#register_plugin('pybtex.style.formatting', 'mystyle', MyStyle) +class AbiPyLabelStyle(LabelStyle): + def format_label(self, entry): + return entry.key + +class AbiPyStyle(Style): + default_label_style = 'abipy' + +from pybtex.plugin import register_plugin +register_plugin('pybtex.style.labels', 'abipy', AbiPyLabelStyle) +register_plugin('pybtex.style.formatting', 'abipystyle', AbiPyStyle) + # This is for releases http://releases.readthedocs.io/en/latest/usage.html releases_github_path = "abinit/abipy" diff --git a/docs/flows_howto.rst b/docs/flows_howto.rst index 508464ee9..bf45f1a29 100644 --- a/docs/flows_howto.rst +++ b/docs/flows_howto.rst @@ -16,10 +16,10 @@ Feel free to suggest new entries! Suggestions: * Start with the examples available in examples/flows before embarking on large scale calculations. -* Make sure the Abinit executable compiled on the machine can be executed both on the frontend +* Make sure the Abinit executable compiled on the machine can be executed both on the front end and the compute node (ask your sysadmin) * If you are running on clusters in which the architecture of the compute node is completely different - from the one available on the frontend, use ``shell_runner`` + from the one available on the front end, use ``shell_runner`` * Use the ``debug`` command Do not: @@ -91,7 +91,7 @@ When running many calculations, Use ``prtwf -1`` to tell Abinit to produce the wavefunction file only if SCF cycle didn't converged so that AbiPy can reuse the file to restart the calculation. -Note that it's possibile to use:: +Note that it's possible to use:: flow.use_smartio() @@ -101,9 +101,25 @@ for their children. How to extend tasks/works with specialized code ----------------------------------------------- -Remember that pickle_ does not support classes defined inside scripts. +Remember that pickle_ does not support classes defined inside scripts (`__main__`). +This means that `abirun.py` will likely raise an exception when trying to +reconstruct the object from the pickle file: + +.. code-block:: python + + AttributeError: Cannot get attribute 'MyWork' on `_ or inside jupyter notebooks. +This document explains how to install the required dependencies and how to +generate dashboards either with the command line interface or inside jupyter notebooks. + +.. important:: + + Note that you will need a running python kernel to execute the callbacks triggerered + by the GUI hence the examples given in this page are only meant to show how to build the the GUI. + +Installation +------------ + +Install the `panel `_ package either from pip with: + +.. code-block:: bash + + pip install panel + +or with conda: + +.. code-block:: bash + + conda install panel -c conda-forge + +If you want to work with JupyterLab, you will also need to install +the optional PyViz JupyterLab extension: + +.. code-block:: bash + + conda install -c conda-forge jupyterlab + jupyter labextension install @pyviz/jupyterlab_pyviz + + +Basic Usage +----------- + +The AbiPy structure and many AbiPY files provide a ``get_panel`` method that returns +a dashboard that can be used inside the jupyter notebook. +To enable the integration with ``panel`` inside a jupyter notebook, execute the below code: + +.. jupyter-execute:: + + # Import panel and activate extensions + import panel as pn + pn.extension() + +Now one can start to construct AbiPy objects and use the ``get_panel`` method to generate graphical interfaces. +In our first example, we use the ``abiopen`` function to open a ``GSR`` file +and then we call ``get_panel`` to build a set of widgets that allows us to interact with the object: + + +.. jupyter-execute:: + + # Import AbiPy modules. + from abipy import abilab + import abipy.data as abidata + + filename = abidata.ref_file("si_nscf_GSR.nc") + gsr = abilab.abiopen(filename) + + gsr.get_panel() + + +The same approach can be used with a ``DDB`` file. +In this case, we get more tabs and options because one can use the GUI +to set the input parameters, invoke ``anaddb`` and visualize the results: + + +.. jupyter-execute:: + + # Open DDB file with abiopen and invoke get_panel method. + #ddb_path = abidata.ref_file("mp-1009129-9x9x10q_ebecs_DDB") + + #abilab.abiopen(ddb_path).get_panel() + + +Calling ``get_structure`` with an AbiPy structure, creates a set of widgets +to facilitate common operations such as exporting to a different format or +generating a Abinit input file for GS calculations: + +.. jupyter-execute:: + + gsr.structure.get_panel() + + +There are, however, cases in which you don't need the interactive environment provided +by jupyter notebooks as you are mainly interested in the visualization of the results. +In this case, it is possible to use the command line interface to automatically generate +a dashboard with widgets without having to start a jupyter-lab application. + +To build a dashboard for a ``Structure`` object extract from ``FILE``, use: + +.. code-block:: shell + + abistruct.py panel FILE + + +where ``FILE`` is any file providing a ``Structure`` object e.g. netcdf file, cif files, abi, abo etc. + +To build a dashboard associated to one of the AbiPy file, use the syntax: + +.. code-block:: shell + + abiopen.py FILE --panel + + +where ``FILE`` is one of the Abinit files supported by ``abiopen.py``. +For instance, one can create a dashboard to interact with a ``DDB`` file with: + +.. code-block:: shell + + abiopen.py out_DDB --panel + +.. important:: + + To build a dashboard for an AbiPy Flow use: + + abirun.py FLOWDIR panel + + or, alternatively: + + abiopen.py FLOWDIR/__AbinitFlow__.pickle --panel + +.. jupyter-execute:: + + import numpy as np + from matplotlib import pyplot + %matplotlib inline + + x = np.linspace(1E-3, 2 * np.pi) + + pyplot.plot(x, np.sin(x) / x) + pyplot.plot(x, np.cos(x)) + pyplot.grid() diff --git a/docs/index.rst b/docs/index.rst index 5536ec4bd..86df40f7a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,4 @@ -.. htmlonly:: - :Release: |version| - :Date: |today| +.. :Release: |version| :Date: |today| .. list-table:: @@ -12,7 +10,7 @@ * - Continuous Integration - |travis-status| |coverage-status| * - Documentation - - |docs-stable| |docs-devel| |launch-nbviewer| |launch-binder| + - |docs-github| |launch-nbviewer| |launch-binder| Getting Started @@ -33,6 +31,7 @@ Post-processing :maxdepth: 1 scripts/index + graphical_interface gallery/index postprocessing_howto diff --git a/docs/installation.rst b/docs/installation.rst index aa05c980f..489e2e477 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -72,9 +72,9 @@ By default, the installer creates the ``anaconda`` directory in your home. Anaconda will add one line to your ``.bashrc`` to enable access to the anaconda executables. Once the installation is completed, execute:: - source ~/anaconda/bin/activate root + source ~/anaconda/bin/activate base -to activate the ``root`` environment. +to activate the ``base`` environment. The output of ``which python`` should show that you are using the python interpreter provided by anaconda. Use the conda_ command-line interface to install the packages not included in the official distribution. @@ -86,17 +86,16 @@ Remember that if a package is not available in the official conda repository, yo download the package from one of the conda channels or use ``pip install`` if no conda package is available. Fortunately there are conda channels providing all dependencies needed by AbiPy. -To install the pymatgen_ package from the matsci_ channel, use:: +Now add ``conda-forge``, and ``abinit`` to your conda channels with:: - conda install pymatgen --channel matsci + conda config --add channels conda-forge + conda config --add channels abinit -then install Abipy from the abinit-channel_ with:: +These are the channels from which we will download pymatgen, abipy and abinit. +Finally, install AbiPy from the abinit-channel_ with:: conda install abipy --channel abinit -Visit `materials.sh `_ for instructions on how to use the -matsci channel to install pymatgen and other packages. - Once you have completed the installation of AbiPy and pymatgen, open the ipython_ shell and type:: # make sure spglib library works diff --git a/docs/links.rst b/docs/links.rst index 80ccfe217..774669b93 100644 --- a/docs/links.rst +++ b/docs/links.rst @@ -88,6 +88,7 @@ .. |pymatgen-Structure| replace:: :class:`pymatgen.core.structure.Structure` .. |Lattice| replace:: :class:`pymatgen.core.lattice.Lattice` .. |AbinitInput| replace:: :class:`abipy.abio.inputs.AbinitInput` +.. |AnaddbInput| replace:: :class:`abipy.abio.inputs.AnaddbInput` .. |MultiDataset| replace:: :class:`abipy.abio.inputs.MultiDataset` .. |ElectronBands| replace:: :class:`abipy.electrons.ebands.ElectronBands` .. |ElectronBandsPlotter| replace:: :class:`abipy.electrons.ebands.ElectronBandsPlotter` @@ -95,27 +96,41 @@ .. |ElectronDos| replace:: :class:`abipy.electrons.ebands.ElectronDos` .. |ElectronDosPlotter| replace:: :class:`abipy.electrons.ebands.ElectronDosPlotter` .. |PhononBands| replace:: :class:`abipy.dfpt.phonons.PhononBands` -.. |Task| replace:: :class:`pymatgen.io.abinit.tasks.Task` -.. |ScfTask| replace:: :class:`pymatgen.io.abinit.tasks.ScfTask` -.. |NscfTask| replace:: :class:`pymatgen.io.abinit.tasks.NscfTask` -.. |Flow| replace:: :class:`pymatgen.io.abinit.flows.Flow` -.. |Work| replace:: :class:`pymatgen.io.abinit.works.Work` -.. |TaskManager| replace:: :class:`pymatgen.io.abinit.tasks.TaskManager` +.. |Node| replace:: :class:`abipy.flowtk.nodes.Node` +.. |Task| replace:: :class:`abipy.flowtk.tasks.Task` +.. |AbinitTask| replace:: :class:`abipy.flowtk.tasks.AbinitTask` +.. |ScfTask| replace:: :class:`abipy.flowtk.tasks.ScfTask` +.. |NscfTask| replace:: :class:`abipy.flowtk.tasks.NscfTask` +.. |AnaddbTask| replace:: :class:`abipy.flowtk.tasks.AnaddbTask` +.. |Flow| replace:: :class:`abipy.flowtk.flows.Flow` +.. |Work| replace:: :class:`abipy.flowtk.works.Work` +.. |TaskManager| replace:: :class:`abipy.flowtk.tasks.TaskManager` .. |GsrFile| replace:: :class:`abipy.electrons.gsr.GsrFile` .. |GsrRobot| replace:: :class:`abipy.electrons.gsr.GsrRobot` +.. |MdfFile| replace:: :class:`abipy.electrons.bse.MdfFile` .. |DdbFile| replace:: :class:`abipy.dfpt.ddb.DdbFile` +.. |HistFile| replace:: :class:`abipy.dynamics.hist.HistFile` +.. |FatBandsFile| replace:: :class:`abipy.electrons.fatbands.FatBandsFile` .. |DielectricTensorGenerator| replace:: :class:`abipy.dfpt.ddb.DielectricTensorGenerator` .. |DdbRobot| replace:: :class:`abipy.dfpt.ddb.DdbRobot` .. |AnaddbNcFile| replace:: :class:`abipy.dfpt.anaddb.AnaddbNcFile` +.. |AbinitNcFile| replace:: :class:`abipy.core.mixins.AbinitNcFile` +.. |pmg-Tensor| replace:: :class:`pymatgen.core.tensors.Tensor` +.. |Stress| replace:: :class:`abipy.tools.tensors.Stress` +.. |DielectricTensor| replace:: :class:`abipy.tools.tensors.DielectricTensor` +.. |ElasticData| replace:: :class:`abipy.dfpt.elastic.ElasticData` .. |PhbstFile| replace:: :class:`abipy.dfpt.phonons.PhbstFile` .. |PhdosFile| replace:: :class:`abipy.dfpt.phonons.PhdosFile` .. |PhononDos| replace:: :class:`abipy.dfpt.phonons.PhononDos` .. |PhononBandsPlotter| replace:: :class:`abipy.dfpt.phonons.PhononBandsPlotter` .. |PhononDosPlotter| replace:: :class:`abipy.dfpt.phonons.PhononDosPlotter` +.. |MsqDos| replace:: :class:`abipy.dfpt.msqdos.MsqDos` .. |Pseudo| replace:: :class:`pymatgen.io.abinit.pseudos.Pseudo` .. |PseudoTable| replace:: :class:`pymatgen.io.abinit.pseudos.PseudoTable` .. |Visualizer| replace:: :class:`abipy.iotools.visualizer.Visualizer` .. |SigresFile| replace:: :class:`abipy.electrons.gw.SigresFile` +.. |SigephFile| replace:: :class:`abipy.electrons.eph.SigephFile` +.. |SigephRobot| replace:: :class:`abipy.electrons.eph.SigephRobot` .. Important objects provided by libraries. .. |matplotlib-Figure| replace:: :class:`matplotlib.figure.Figure` @@ -124,7 +139,6 @@ .. |pandas-DataFrames| replace:: :class:`pandas.DataFrame` .. |numpy-array| replace:: :class:`numpy.ndarray` - .. Badges .. |pypi-version| image:: https://badge.fury.io/py/abipy.svg :alt: PyPi version @@ -162,10 +176,6 @@ :target: https://requires.io/github/abinit/abipy/requirements/?branch=develop :alt: Requirements Status -.. |docs-stable| image:: https://img.shields.io/badge/docs-stable_version-blue.svg - :alt: Documentation stable version - :target: http://pythonhosted.org/abipy/ - -.. |docs-devel| image:: https://img.shields.io/badge/docs-devel_version-ff69b4.svg - :alt: Documentation development version +.. |docs-github| image:: https://img.shields.io/badge/docs-ff69b4.svg + :alt: AbiPy Documentation :target: http://abinit.github.io/abipy diff --git a/docs/postprocessing_howto.rst b/docs/postprocessing_howto.rst index ac7966227..1255a64c4 100644 --- a/docs/postprocessing_howto.rst +++ b/docs/postprocessing_howto.rst @@ -64,7 +64,7 @@ Use:: to read the structure from ``FILE`` and generate a CIF_ file (default behaviour). The majority of the netcdf_ files produced by Abinit contain structural information -so this command can be used with netcdf ouput files as well as Abinit input/output +so this command can be used with netcdf output files as well as Abinit input/output files and all the other formats supported by pymatgen e.g. POSCAR files. Other formats can be specified with the ``-f`` option. For example:: @@ -101,7 +101,7 @@ to validate the input file with Abinit (requires ``manager.yml`` and, obviously, The script provides other options to invoke Abinit to get space group information, the list of k-points in the IBZ. the list of atomic perturbations for phonons or the list of autoparal configurations. -See ``abinp.py --help`` for futher info. +See ``abinp.py --help`` for further info. Print the warnings in the log file ---------------------------------- @@ -232,6 +232,24 @@ to generate a template with the input variables defining the k-path +0.62500 +0.25000 +0.62500 # U +0.50000 +0.00000 +0.50000 # X + +Re-symmetrize a structure when Abinit reports less symmetries than expected +--------------------------------------------------------------------------- + +Crystalline structures saved in text format (e.g. CIF files downloaded from +the Materials Project websites) may not have enough significant digits +and Abinit may not find the same spacegroup as the one reported by the source +as the default tolerance for symmetry detection in Abinit is tight (tolsym = 1e-8). + +In this case, one can use the `abispg` option of abistruct.py to compute the spacegroup +with Abinit and a tolerance larger that the default value:: + + abistruct.py abispg problematic.cif --tolsym=1e-6 + +Hopefully, the code will detect the correct spacegroup, will re-symmetrize +the initial lattice vectors and atomic positions and print the new symmetrized structure to terminal. + + Get neighbors for each atom in the unit cell out to a distance radius --------------------------------------------------------------------- @@ -402,7 +420,7 @@ Use:: abiview.py phbands out_PHBST.nc -web -to start a local webserver and open the HTML page inside the default browser +to start a local web server and open the HTML page inside the default browser (the browser can be changed with the ``--browser`` option). It is also possible to visualize the phonon modes starting directly from a DDB_ file with:: @@ -410,7 +428,7 @@ It is also possible to visualize the phonon modes starting directly from a DDB_ abiview.py ddb -web In this case, AbiPy will invoke anaddb to produce the ``PHBST.nc`` file on an automatically -generated q-path and then start the webserver. +generated q-path and then start the web server. Visualize the results of a structural relaxation ------------------------------------------------ @@ -461,7 +479,7 @@ the AbiPy scripts are quite handy for a quick analysis of the results. Compare multiple files ---------------------- -The :ref:`abicomp.py` script is explicitely designed for this kind of task. +The :ref:`abicomp.py` script is explicitly designed for this kind of task. It operates on multiple files (usually files with the same extension) and either produces matplotlib_ plots or creates AbiPy robots providing methods to analyze the results, perform convergence studies and build pandas DataFrames_. @@ -530,3 +548,12 @@ To list all the variables depending on the ``natom`` dimension, use:: abidoc.py withdim natom More options are available. See ``abidoc.py --help``. + +Avoid transfering files from the cluster to localhost just to use matplotlib +---------------------------------------------------------------------------- + +Use `SSHFS `_ +to mount the remote file system over SSH. +Now one can execute the AbiPy scripts in a terminal running on the local machine. +to open/visualize the files stored on the cluster. + diff --git a/docs/refs.bib b/docs/refs.bib index 42a3f9aee..ea0746566 100644 --- a/docs/refs.bib +++ b/docs/refs.bib @@ -326,3 +326,44 @@ @article{Setten2018 year = {2018}, month = may, } + +@article{Lee1995, + title = {Ab initio calculation of the thermodynamic properties and atomic temperature factors of ${\mathrm{SiO}}_{2}$ \ensuremath{\alpha}-quartz and stishovite}, + author = {Lee, Changyol and Gonze, Xavier}, + journal = {Phys. Rev. B}, + volume = {51}, + issue = {13}, + pages = {8610--8613}, + numpages = {0}, + year = {1995}, + month = {Apr}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.51.8610}, + url = {https://link.aps.org/doi/10.1103/PhysRevB.51.8610} +} + +@article{Trueblood1996, +author = "Trueblood, K. N. and B{\"{u}}rgi, H.-B. and Burzlaff, H. and Dunitz, J. D. and Gramaccioli, C. M. and Schulz, H. H. and Shmueli, U. and Abrahams, S. C.", +title = "{Atomic Dispacement Parameter Nomenclature. Report of a Subcommittee on Atomic Displacement Parameter Nomenclature}", +journal = "Acta Crystallographica Section A", +year = "1996", +volume = "52", +number = "5", +pages = "770--781", +month = "Sep", +doi = {10.1107/S0108767396005697}, +url = {https://doi.org/10.1107/S0108767396005697}, +} + +@article{Grosse-Kunstleve2002, +author = "Grosse-Kunstleve, R. W. and Adams, P. D.", +title = "{On the handling of atomic anisotropic displacement parameters}", +journal = "Journal of Applied Crystallography", +year = "2002", +volume = "35", +number = "4", +pages = "477--480", +month = "Aug", +doi = {10.1107/S0021889802008580}, +url = {https://doi.org/10.1107/S0021889802008580}, +} diff --git a/docs/requirements.txt b/docs/requirements.txt index 388a48804..dea183d9d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1,9 @@ ipython -sphinx==1.6.5 +sphinx sphinxcontrib-napoleon sphinxcontrib-programoutput sphinx-gallery sphinx-argparse sphinx_bootstrap_theme -#nbsphinx sphinxcontrib-bibtex -releases +jupyter-sphinx diff --git a/docs/scripts/index.rst b/docs/scripts/index.rst index 387edf725..4857f231b 100644 --- a/docs/scripts/index.rst +++ b/docs/scripts/index.rst @@ -1,14 +1,11 @@ +.. :Release: |version| :Date: |today| + .. _scripts-index: ======= Scripts ======= -.. htmlonly:: - - :Release: |version| - :Date: |today| - This page documents the usage of the AbiPy scripts, the subcommands available and the options supported by each subcommand. diff --git a/docs/workflows/manager_examples.rst b/docs/workflows/manager_examples.rst index a439d479e..62b43876f 100644 --- a/docs/workflows/manager_examples.rst +++ b/docs/workflows/manager_examples.rst @@ -558,7 +558,7 @@ Travis job: mpi_runner: mpirun pre_run: - - source activate test-environment + - source activate abinit-environment - ulimit -s unlimited limits: min_cores: 1 diff --git a/docs/zzbiblio.rst b/docs/zzbiblio.rst index 58636e49c..47c641911 100644 --- a/docs/zzbiblio.rst +++ b/docs/zzbiblio.rst @@ -7,4 +7,5 @@ Bibliography .. rubric:: References .. bibliography:: refs.bib + :style: abipystyle :cited: diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 22a08c6ce..000000000 --- a/readthedocs.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Don't build any extra formats -formats: - - none - -requirements_file: docs/requirements.txt - -conda: - file: environment_linux_2.7.yml - -python: - version: 2.7 - -build: - image: latest - -python: - setup_py_install: true diff --git a/requirements-optional.txt b/requirements-optional.txt index 7f6d63717..19eaaa843 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -7,11 +7,14 @@ networkx scikit-image #graphviz or python-graphviz if conda phonopy -#mayavi +ase +param +panel +bokeh # Unit tests +python-coveralls pytest pytest-cov pytest-xdist pytest-sugar scripttest -python-coveralls \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1ffb77f8c..bc23043bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,16 @@ -six +monty tabulate apscheduler==2.1.0 pydispatcher>=2.0.5 tqdm -html2text pyyaml>=3.11 pandas numpy scipy +sympy spglib -pymatgen>=2018.7.15 +#pymatgen>=2019.10.16 +pymatgen>=2019.12.22 netCDF4 matplotlib seaborn diff --git a/setup.cfg b/setup.cfg index 0971c88a4..5a0fea9fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,12 +10,31 @@ force = 1 [bdist_wheel] universal=1 -[nosetests] -verbosity=0 -with-doctest=1 -# Use `pip install nose-exclude` -# if nosetest fails with error: Error reading config file 'setup.cfg': no such option 'exclude-dir -exclude-dir=abipy/gui -#with-coverage=1 -#cover-package=abipy -#cover-erase=1 +[tool:pytest] +ignore=abipy/gui +addopt=--cov-config=.coveragerc --cov=abipy -v --doctest-modules abipy \ + --ignore=abipy/integration_tests --ignore=abipy/data/refs --ignore=abipy/scripts/ \ + --ignore=abipy/examples/plot --ignore=abipy/examples/flows --ignore=abipy/gui + +#norecursedirs = scripts/post_processing _build* doxygen_docs tmp-robodoc .ipynb_checkpoints + +#pytest -n 2 --cov-config=.coveragerc --cov=abipy -v --doctest-modules abipy \ +# --ignore=abipy/integration_tests --ignore=abipy/data/refs --ignore=abipy/scripts/ \ +# --ignore=abipy/examples/plot --ignore=abipy/examples/flows --ignore=abipy/gui + + +[pycodestyle] +count = True +max-line-length = 130 +statistics = True +ignore = E114,E116,E121,E122,E123,E124,E126,E127,E128,E129,E131,E133,E201,E203,E226,E231,E241,E242,E261,E262,E265,E266,E306,E401,E402,E704,W503,W504,W505,E701,E702,E731,E741,W605 +exclude= .git,__pycache__,abipy/gui,abipy/abio/abivar_database,dev_scripts,docs,.ipynb_checkpoints,abipy/examples/flows/develop/,test_*.py,abipy/data/refs + +[flake8] +# max-complexity = 10 +max-line-length = 130 +exclude= .git,__pycache__,abipy/gui,abipy/abio/abivar_database,dev_scripts,docs,.ipynb_checkpoints,abipy/examples/flows/develop/,test_*.py,abipy/benchmarks,abipy/data/refs,abilab.py +extend_ignore = E114,E116,E121,E122,E123,E124,E126,E127,E128,E129,E131,E133,E201,E203,E226,E231,E241,E242,E261,E262,E265,E266,E306,E401,E402,E704,W503,W504,W505,E701,E702,E731,E741,W605,F841 + +[pydocstyle] +ignore = D105,D107,D205 diff --git a/setup.py b/setup.py index dc8f7c461..aa42e07e3 100755 --- a/setup.py +++ b/setup.py @@ -1,19 +1,13 @@ #!/usr/bin/env python -"""Setup script for abipy.""" -from __future__ import print_function +# flake8: noqa +"""Setup script for AbiPy.""" import sys import os import shutil from glob import glob -from setuptools import find_packages, setup, Extension - -# This check is also made in abipy/__init__, don't forget to update both when -# changing Python version requirements. -if sys.version[0:3] < '2.7': - sys.stderr.write("abipy requires Python version 2.7 or above. Exiting.") - sys.exit(1) +from setuptools import find_packages, setup ext_modules = [] @@ -21,6 +15,7 @@ # Useful globals and utility functions #------------------------------------------------------------------------------- + # A little utility we'll need below, since glob() does NOT allow you to do exclusion on multiple endings! def file_doesnt_end_with(test, endings): """ @@ -34,27 +29,18 @@ def file_doesnt_end_with(test, endings): return False return True + #--------------------------------------------------------------------------- # Basic project information #--------------------------------------------------------------------------- # release.py contains version, authors, license, url, keywords, etc. -release_file = os.path.join('abipy','core','release.py') +release_file = os.path.join('abipy', 'core', 'release.py') with open(release_file) as f: code = compile(f.read(), release_file, 'exec') exec(code) -#--------------------------------------------------------------------------- -# Find packages -#--------------------------------------------------------------------------- -# -#def find_packages(): -# """ -# Find all of abipy's packages. -# """ -# return find_packages(exclude=()) - #--------------------------------------------------------------------------- # Find package data @@ -82,7 +68,7 @@ def find_package_data(): "refs/*.log", "refs/*.abo", ], - 'abipy.data.refs' : [ + 'abipy.data.refs': [ "al_eph/*", "al_g0w0_spfunc/*", "alas_nl_dfpt/*", @@ -98,7 +84,7 @@ def find_package_data(): "sio2_screening/*", "znse_phonons/*", ], - 'abipy.gui.awx' : ['images/*'], + 'abipy.gui.awx': ['images/*'], } return package_data @@ -127,7 +113,6 @@ def find_scripts(): def get_long_desc(): with open("README.rst") as f: return f.read() - return long_desc #----------------------------------------------------------------------------- @@ -143,30 +128,31 @@ def cleanup(): except (IOError, OSError): try: os.unlink('abipy.egg-info') - except: + except Exception: pass + # List of external packages we rely on. # Note setup install will download them from Pypi if they are not available. #with open("requirements.txt", "rt") as fh: # install_requires = [s.strip() for s in fh] install_requires = [ -"six", -"tabulate", -"apscheduler==2.1.0", -"pydispatcher>=2.0.5", -"tqdm", -"html2text", -"pyyaml>=3.11", -"pandas", -"numpy", -"scipy", -"spglib", -"pymatgen>=2018.7.15", -"netCDF4", -"matplotlib", -"seaborn", + "monty", + "tabulate", + "apscheduler==2.1.0", + "pydispatcher>=2.0.5", + "tqdm", + "pyyaml>=3.11", + "pandas", + "numpy", + "scipy", + "spglib", + #"pymatgen>=2019.10.16", + "pymatgen>=2019.12.22", + "netCDF4", + "matplotlib", + "seaborn", ] with_wxpython = False @@ -226,5 +212,4 @@ def cleanup(): Have fun! """) - cleanup() diff --git a/tasks.py b/tasks.py index e392ab9ae..d3c762cdb 100644 --- a/tasks.py +++ b/tasks.py @@ -14,6 +14,7 @@ ABIPY_ROOTDIR = os.path.dirname(__file__) DOCS_DIR = os.path.join(ABIPY_ROOTDIR, "docs") + @task def make_doc(ctx): with cd(DOCS_DIR): @@ -54,11 +55,20 @@ def pytest(ctx): ctx.run(pytest_cmd, pty=True) +@task +def style(ctx): + with cd(ABIPY_ROOTDIR): + ctx.run("pycodestyle 2>&1 | tee style.log", pty=True) + ctx.run("flake8 --count --show-source --statistics | tee -a style.log", pty=True) + #ctx.run("pydocstyle abipy | tee -a style.log", pty=True) + + @task def plots(ctx): with cd(os.path.join(ABIPY_ROOTDIR, "abipy", "examples")): ctx.run("_runplots.py", pty=True) + @task def flows(ctx): with cd(os.path.join(ABIPY_ROOTDIR, "abipy", "examples")):