├── .gitignore ├── LICENSE.md ├── README.md ├── doc ├── Makefile ├── docify.sh ├── make.bat └── source │ ├── README │ ├── conf.py │ ├── index.rst │ ├── installation.rst │ ├── manual.rst │ ├── pycdft │ ├── pycdft.atomic.rst │ ├── pycdft.common.rst │ ├── pycdft.constraint.rst │ ├── pycdft.debug.rst │ ├── pycdft.dft_driver.rst │ └── pycdft.elcoupling.rst │ ├── quickreference.rst │ └── tutorial.rst ├── examples ├── 01-he2_coupling │ ├── README │ ├── interactive │ │ ├── He2_3Ang.cif │ │ ├── He_ONCV_PBE-1.0.xml │ │ ├── gs.in │ │ ├── he2_coupling.ipynb │ │ └── he2_coupling.py │ ├── reference │ │ ├── 3.0-he2-coupling.ipynb │ │ ├── 3.0-he2-coupling.py │ │ ├── He2.cif │ │ └── gs.in │ ├── restart_example │ │ ├── run_coupling.py │ │ └── run_he2_solvers.py │ └── script │ │ ├── He2_tmp.cif │ │ ├── He_ONCV_PBE-1.0.xml │ │ ├── gs_tmp.in │ │ ├── he2_coupling-tmp.py │ │ └── run_he2_coupling ├── 02-thiophene │ ├── C_ONCV_PBE-1.0.xml │ ├── H_ONCV_PBE-1.0.xml │ ├── README │ ├── S_ONCV_PBE-1.0.xml │ ├── align.cif │ ├── align.in │ ├── run_thio_dist │ └── thiophene-coupling-tmp.ipynb └── 03-thiophene-rotated │ ├── C_ONCV_PBE-1.0.xml │ ├── H_ONCV_PBE-1.0.xml │ ├── README │ ├── S_ONCV_PBE-1.0.xml │ ├── delta0.cif │ ├── delta20.cif │ ├── delta20.in │ ├── delta40.cif │ ├── delta40.in │ ├── delta60.cif │ ├── delta60.in │ ├── delta80.cif │ ├── delta80.in │ ├── delta90.cif │ ├── delta90.in │ ├── setup_thio_delta │ ├── thio_delta_gs │ ├── thio_delta_pycdft │ └── thiophene-coupling-tmp.ipynb ├── pycdft ├── __init__.py ├── atomic │ ├── README │ ├── __init__.py │ ├── pp.py │ └── rho │ │ ├── Ag.spavr │ │ ├── Al.spavr │ │ ├── Ar.spavr │ │ ├── As.spavr │ │ ├── Au.spavr │ │ ├── B.spavr │ │ ├── Ba.spavr │ │ ├── Be.spavr │ │ ├── Bi.spavr │ │ ├── Br.spavr │ │ ├── C.spavr │ │ ├── Ca.spavr │ │ ├── Cd.spavr │ │ ├── Cl.spavr │ │ ├── Co.spavr │ │ ├── Cr.spavr │ │ ├── Cs.spavr │ │ ├── Cu.spavr │ │ ├── F.spavr │ │ ├── Fe.spavr │ │ ├── Ga.spavr │ │ ├── Ge.spavr │ │ ├── H.spavr │ │ ├── He.spavr │ │ ├── Hf.spavr │ │ ├── Hg.spavr │ │ ├── I.spavr │ │ ├── In.spavr │ │ ├── Ir.spavr │ │ ├── K.spavr │ │ ├── Kr.spavr │ │ ├── Li.spavr │ │ ├── Mg.spavr │ │ ├── Mn.spavr │ │ ├── Mo.spavr │ │ ├── N.spavr │ │ ├── Na.spavr │ │ ├── Nb.spavr │ │ ├── Ne.spavr │ │ ├── Ni.spavr │ │ ├── O.spavr │ │ ├── Os.spavr │ │ ├── P.spavr │ │ ├── Pb.spavr │ │ ├── Pd.spavr │ │ ├── Pt.spavr │ │ ├── Rb.spavr │ │ ├── Re.spavr │ │ ├── Rh.spavr │ │ ├── Ru.spavr │ │ ├── S.spavr │ │ ├── Sb.spavr │ │ ├── Sc.spavr │ │ ├── Se.spavr │ │ ├── Si.spavr │ │ ├── Sn.spavr │ │ ├── Sr.spavr │ │ ├── Ta.spavr │ │ ├── Tc.spavr │ │ ├── Te.spavr │ │ ├── Ti.spavr │ │ ├── Tl.spavr │ │ ├── V.spavr │ │ ├── W.spavr │ │ ├── Xe.spavr │ │ ├── Y.spavr │ │ ├── Zn.spavr │ │ └── Zr.spavr ├── cdft.py ├── common │ ├── __init__.py │ ├── atom.py │ ├── fragment.py │ ├── ft.py │ ├── sample.py │ ├── units.py │ └── wfc.py ├── constraint │ ├── __init__.py │ ├── base.py │ ├── charge.py │ └── charge_transfer.py ├── debug │ ├── __init__.py │ └── plot_debug.py ├── dft_driver │ ├── __init__.py │ ├── base.py │ └── qbox_driver.py └── elcoupling │ ├── __init__.py │ └── elcoupling.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .idea 3 | *.egg-info 4 | 5 | INSTALL_self 6 | 7 | *checkpoint.ipynb 8 | pycdft_outputs 9 | qb_cdft.* 10 | *.out 11 | gs.xml 12 | wfc.xml 13 | *.cube 14 | __pycache__ 15 | 16 | bin/ 17 | build/ 18 | dist/ 19 | lib/ 20 | 21 | doxygen/ 22 | 23 | sphinx/west-doc/ 24 | sphinx/docify_self.sh 25 | doc/docify_self.sh 26 | doc/sphinx_build/ 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 The University of Chicago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PyCDFT 2 | 3 | A Python package for performing constrained density functional theory calculations 4 | 5 | Please see the accompanying paper for details: 6 | 7 | He Ma, Wennie Wang, Siyoung Kim, Man-Hin Cheng, Marco Govoni, Giulia Galli. 8 | *J. Comp. Chem.* Accepted. [10.1002/JCC.26354](https://dx.doi.org/10.1002/JCC.26354) (2020); [arXiv](https://arxiv.org/abs/2005.08021) 9 | 10 | Code is also released [here](https://doi.org/10.5281/zenodo.3821096) 11 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /doc/docify.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # clean and build sphinx documentation for pycdft 4 | # also installed: 5 | # pip install --user Sphinx 6 | # python3 -m pip install nbsphinx --user 7 | # pip install sphinx_rtd_theme --user 8 | # 9 | 10 | # CHANGE THIS 11 | home_dir="/PATH/TO/pycdft/sphinx/" 12 | 13 | cd $home_dir 14 | rm -r $home_dir/sphinx_build/* 15 | 16 | sphinx-build -b html $home_dir/source/ $home_dir/sphinx_build/ 17 | -------------------------------------------------------------------------------- /doc/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /doc/source/README: -------------------------------------------------------------------------------- 1 | 2 | # pull from source to automatically generate the appropriate *rst files 3 | sphinx-apidoc -o . ../../pycdft/ 4 | -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | import os 14 | import sys 15 | sys.path.insert(0, os.path.abspath('../../pycdft/')) 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'PyCDFT' 21 | author = 'He Ma, Wennie Wang, Siyoung Kim, Man-Hin Cheng, Marco Govoni, Giulia Galli' 22 | 23 | # The full version, including alpha/beta/rc tags 24 | release = '1.0' 25 | 26 | 27 | # -- General configuration --------------------------------------------------- 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [ 33 | 'sphinx.ext.autodoc', 34 | 'sphinx.ext.coverage', 35 | 'sphinx.ext.intersphinx', 36 | 'sphinx.ext.mathjax', 37 | 'nbsphinx', 38 | 'IPython.sphinxext.ipython_console_highlighting', 39 | 'sphinx.ext.napoleon', 40 | ] 41 | 42 | # sphinx.napolean- converts docstrings in googley format to reStructuredText (*.rst) 43 | napoleon_google_docstring = True 44 | napoleon_include_init_with_doc = False 45 | 46 | autodoc_member_order = 'bysource' 47 | 48 | # Add any paths that contain templates here, relative to this directory. 49 | templates_path = ['_templates'] 50 | 51 | # master toctree document 52 | master_doc = 'index' 53 | 54 | # List of patterns, relative to source directory, that match files and 55 | # directories to ignore when looking for source files. 56 | # This pattern also affects html_static_path and html_extra_path. 57 | exclude_patterns = ['_build', '_static', '.ipynb_checkpoints'] 58 | 59 | # The name of the Pygments (syntax highlighting) style to use. 60 | pygments_style = 'sphinx' 61 | 62 | # -- Options for HTML output ------------------------------------------------- 63 | 64 | # The theme to use for HTML and HTML Help pages. See the documentation for 65 | # a list of builtin themes. 66 | # 67 | #html_theme = 'alabaster' 68 | 69 | # The theme to use for HTML and HTML Help pages. See the documentation for 70 | # a list of builtin themes. 71 | # Add any paths that contain custom themes here, relative to this directory. 72 | html_theme = "sphinx_rtd_theme" 73 | #html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 74 | ##html_theme_path = ["_themes", ] 75 | #html_show_sourcelink = False 76 | #html_show_copyright = False 77 | #html_show_sphinx = False 78 | 79 | #--------------------------------------------------------------------------- 80 | 81 | # Add any paths that contain custom static files (such as style sheets) here, 82 | # relative to this directory. They are copied after the builtin static files, 83 | # so a file named "default.css" will overwrite the builtin "default.css". 84 | html_static_path = ['_static'] 85 | 86 | intersphinx_mapping = { 87 | 'python': ('https://docs.python.org/3.6', None), 88 | } 89 | -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | .. PyCDFT documentation master file, created by 2 | sphinx-quickstart on Tue Jan 7 17:06:09 2020. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to PyCDFT's documentation! 7 | ================================== 8 | 9 | Contents 10 | -------- 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | :hidden: 15 | 16 | installation 17 | tutorial 18 | quickreference 19 | manual 20 | 21 | .. glossary:: 22 | 23 | :ref:`installation` 24 | Instructions on how to install **PyCDFT**. 25 | 26 | :ref:`tutorial` 27 | Some tutorials on the usage of **PyCDFT**. 28 | 29 | :ref:`quickreference` 30 | Template for **PyCDFT** minimum working input file. 31 | 32 | :ref:`manual` 33 | The documentation of the code. 34 | 35 | 36 | Indices and tables 37 | ================== 38 | 39 | * :ref:`modindex` 40 | 41 | -------------------------------------------------------------------------------- /doc/source/installation.rst: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | Installation 4 | ------------ 5 | 6 | **PyCDFT** can be installed with **pip**. 7 | First, clone the git repository into a local directory 8 | 9 | .. code:: bash 10 | 11 | $ git clone https://github.com/hema-ted/pycdft.git 12 | 13 | Then, execute **pip** in the folder containing **setup.py** 14 | 15 | .. code:: bash 16 | 17 | $ pip install -e . 18 | 19 | The optional flag -e allows one to install **PyCDFT** in editable mode so one can modify the source code without re-installing the package. 20 | 21 | **PyCDFT** depends on the following packages, which will be installed automatically if installed through **pip**: 22 | 23 | - `numpy `_ 24 | - `scipy `_ 25 | - `pyFFTW `_ 26 | - `lxml `_ 27 | - `ase `_ 28 | 29 | In order to use **PyCDFT**, one needs to also install a DFT driver. 30 | Currently, **PyCDFT** supports using Qbox as the DFT driver. 31 | Extension to support other DFT codes may be added in the future. 32 | 33 | To install Qbox, please follow the `online instructions `_. 34 | 35 | **PyCDFT** has been tested with Python 3.6+ and Qbox 1.67.4+. Note that lower versions of Qbox may not work properly with **PyCDFT**. 36 | -------------------------------------------------------------------------------- /doc/source/manual.rst: -------------------------------------------------------------------------------- 1 | .. _Manual: 2 | 3 | PyCDFT documentation 4 | ==================== 5 | 6 | Code documentation for **PyCDFT** 7 | 8 | 9 | pycdft.cdft 10 | ------------ 11 | 12 | .. automodule:: pycdft.cdft 13 | :members: CDFTSolver 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | Submodules 18 | ----------- 19 | 20 | The main module depends on the following submodules: 21 | 22 | .. toctree:: 23 | :maxdepth: 1 24 | 25 | pycdft/pycdft.atomic 26 | pycdft/pycdft.common 27 | pycdft/pycdft.constraint 28 | pycdft/pycdft.debug 29 | pycdft/pycdft.dft_driver 30 | pycdft/pycdft.elcoupling 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.atomic.rst: -------------------------------------------------------------------------------- 1 | pycdft.atomic 2 | ============= 3 | 4 | This subpackage contains: 5 | - ``*.spavr`` files, pre-computed spherically-averaged charge densities for an isolated atom 6 | These charge densities are based on the `ONCV pseudopotentials `_ (v 1.0, 1.1) 7 | - ``pp.py``, input file for generating ``*.spavr`` files using post-processing routines in `WEST `_ 8 | 9 | There is an assumed 5 Angstrom cutoff of the charge density. All charge densities are sampled in 0.02 Angstrom increments, which is harded coded. 10 | 11 | pycdft.atomic.pp 12 | ----------------- 13 | 14 | .. automodule:: pycdft.atomic.pp 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | 19 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.common.rst: -------------------------------------------------------------------------------- 1 | pycdft.common 2 | ============= 3 | 4 | System-specific modules 5 | ----------------------- 6 | 7 | pycdft.common.atom 8 | ------------------- 9 | 10 | .. automodule:: pycdft.common.atom 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pycdft.common.fragment 16 | ---------------------- 17 | 18 | .. automodule:: pycdft.common.fragment 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | pycdft.common.sample 24 | -------------------- 25 | 26 | .. automodule:: pycdft.common.sample 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | Internal modules 32 | ---------------- 33 | 34 | pycdft.common.wfc 35 | ----------------- 36 | 37 | .. automodule:: pycdft.common.wfc 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | 42 | pycdft.common.ft 43 | ---------------- 44 | 45 | .. automodule:: pycdft.common.ft 46 | :members: ftrr 47 | :undoc-members: 48 | :show-inheritance: 49 | 50 | pycdft.common.units 51 | ------------------- 52 | 53 | .. automodule:: pycdft.common.units 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | 58 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.constraint.rst: -------------------------------------------------------------------------------- 1 | pycdft.constraint 2 | ================= 3 | 4 | PyCDFT supports the following contraints: 5 | - charge constraint, where the absolute electron number of fragment is constrained 6 | - charge transfer constraint, where the electron number difference 7 | between a donor and acceptor fragment is constrained 8 | 9 | pycdft.constraint.charge 10 | ------------------------- 11 | 12 | .. automodule:: pycdft.constraint.charge 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | pycdft.constraint.charge\_transfer 18 | ----------------------------------- 19 | 20 | .. automodule:: pycdft.constraint.charge_transfer 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | pycdft.constraint.base 26 | ---------------------- 27 | 28 | .. automodule:: pycdft.constraint.base 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.debug.rst: -------------------------------------------------------------------------------- 1 | pycdft.debug 2 | ============ 3 | 4 | pycdft.debug.plot\_debug 5 | ------------------------ 6 | 7 | This module is for examining the: 8 | - Hirshfeld weight, :math:`w(\bf{r})`: ``get_hirsh``, ``get_hirsh_ct`` 9 | - Hirshfeld weight gradient, :math:`\nabla w(\bf{r})`: ``get_grad`` 10 | - charge densities for atom *i*, :math:`\rho_i(\bf{r})`: ``get_rho_atom``, ``get_rho`` 11 | 12 | 13 | Example usage is: 14 | 15 | .. code-block:: python 16 | 17 | origin=tuple(np.multiply([-20.6689, -20.6689, -23.6216],0.529)) 18 | get_hirsh_ct(solver1,origin) 19 | 20 | where ``origin`` (in Bohr) can be extracted from any ``.cube`` file 21 | 22 | .. automodule:: pycdft.debug.plot_debug 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | 27 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.dft_driver.rst: -------------------------------------------------------------------------------- 1 | pycdft.dft\_driver 2 | ================== 3 | 4 | **PyCDFT** is compatible with the following DFT codes: 5 | - `Qbox `_ (via client-server mode) 6 | 7 | pycdft.dft\_driver.qbox\_driver 8 | ------------------------------- 9 | 10 | .. automodule:: pycdft.dft_driver.qbox_driver 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | pycdft.dft\_driver.base 16 | ----------------------- 17 | 18 | .. automodule:: pycdft.dft_driver.base 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /doc/source/pycdft/pycdft.elcoupling.rst: -------------------------------------------------------------------------------- 1 | pycdft.elcoupling 2 | ================== 3 | 4 | Module for calculating the electron coupling parameter :math:`H_{ab}` 5 | 6 | The implementation is based on the formalism presented in: 7 | 8 | 1) H. Oberhofer and J. Blumberger. 9 | "Electronic coupling matrix elements from charge constrained density functional theory calculations using a plane wave basis set." *J Chem. Phys.* **133**, 244105 (2010). 10 | `10.1063/1.3507878 `_ 11 | 12 | 2) B. Kaduk, T. Kowalcuk, T. Van Voorhis. 13 | "Constrained Density Functional Theory." *Chem Rev.* **112**, 321 (2012) 14 | `10.1021/cr200148b `_; esp. p 344, Eq. 51 15 | 16 | 3) M.B. Goldey, N. Brawand, M. Vörös, G. Galli. 17 | "Charge Transport in Nanostructured Materials: Implementation and Verification of Constrained Density Functional Theory." *J. Chem. Theory Comp.* **13**, 2581 (2017). 18 | `10.1021/acs/jctc.7b00088 `_ 19 | 20 | pycdft.elcoupling.elcoupling 21 | ---------------------------- 22 | 23 | .. automodule:: pycdft.elcoupling.elcoupling 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | -------------------------------------------------------------------------------- /doc/source/quickreference.rst: -------------------------------------------------------------------------------- 1 | .. _quickreference: 2 | 3 | Quick Reference 4 | =============== 5 | 6 | These are quick references for **PyCDFT** usage. 7 | 8 | Run PyCDFT interactively 9 | ------------------------ 10 | 11 | Before performing a CDFT calculation, one should always complete the normal ground state DFT calculation first (see Tutorials). 12 | 13 | Like most Python packages, **PyCDFT** can be used interactively in a Python terminal or Jupyter notebook, which is ideal for testing purposes. 14 | Example Python commands for using **PyCDFT** are given below. 15 | 16 | Besides the Python terminal or Jupyter notebook, one also needs to run the DFT driver in a separate terminal. 17 | For instance, one can use the follow command to execute Qbox in client-server mode as a DFT driver 18 | 19 | .. code-block:: bash 20 | 21 | mpirun -np $qb -server qb_cdft.in qb_cdft.out 22 | 23 | where qb_cdft.in and qb_cdft.out are input/output file names of Qbox for communicating with **PyCDFT**. 24 | 25 | On clusters which use schedulers such as slurm, it may be convenient to execute the DFT driver in an `interactive session `_ . 26 | 27 | Run PyCDFT through bash script 28 | ------------------------------ 29 | 30 | For larger jobs, it is recommended to directly execute both **PyCDFT** and the DFT driver in the same job submission script. 31 | An example bash script is 32 | 33 | .. code-block:: bash 34 | 35 | export qb="/path/to/qbox" 36 | mpirun $qb -server qb_cdft.in qb_cdft.out & 37 | sleep 2 38 | python -u run_cdft.py > run_cdft.out 39 | 40 | where run_cdft.py is a Python script calling **PyCDFT** to perform CDFT calculations (see below for a template). 41 | More example scripts can be found in the /examples directory. Each example comes with a Jupyter notebook that can be converted to a number of formats (e.g., Python script, html, pdf, LaTeX) using 42 | 43 | .. code-block:: bash 44 | 45 | jupyter nbconvert --to FORMAT notebook.ipynb 46 | 47 | where **FORMAT** takes on values described `here `_ (e.g., 'script' to convert to Python script). 48 | 49 | Template input file 50 | ------------------- 51 | 52 | A minimum working example for running **PyCDFT** and computing the electron coupling parameter of a He-He+ dimer. 53 | 54 | .. literalinclude:: ../../examples/01-he2_coupling/interactive/he2_coupling.py 55 | :language: python 56 | 57 | 58 | List of user-defined parameters 59 | ------------------------------- 60 | Here we list important user-defined parameters for CDFT calculations. 61 | See the code documentation for more details. 62 | 63 | Important parameters for the construction of **CDFTSolver** 64 | 65 | - job: 'scf' for SCF calculation and 'opt' for geometry optimization. 66 | - optimizer: 'secant', 'bisect', 'brentq', 'brenth' or 'BFGS'. Optimization algorithm used for Langrange multipliers. 67 | 68 | Important parameters for the construction of **ChargeConstraint** or **ChargeTransferConstraint** 69 | 70 | - fragment (ChargeConstraint only): a Fragment instance denoting the part of the system to which the constraint applied. 71 | - donor/acceptor (ChargeTransferConstraint only): a Fragment instance denoting the part of the system serving as the donor/acceptor. 72 | - N0: target charge number (ChargeConstraint) or charge difference number (ChargeTransferConstraint) 73 | - N_tol: convergence threshold for N - N0 74 | - V_brak/V_init: search interval/initial guess for optimizer 75 | 76 | 77 | FAQ 78 | --- 79 | 80 | A compilation of helpful hints and common runtime errors. Each item listed has the date of which it was last modified. 81 | 82 | 1) Things to check for CDFT calculations (05/2020) 83 | 84 | - all files are present or accessible in the directory, i.e., cif structure file, pseudopotentials 85 | - the cif file and "ground-state" calculation give the same structure 86 | - the "ground-state" calculation has converged 87 | - it is recommended to group atoms by fragment when specifying atom positions 88 | - PyCDFT is given the correct FFT grid dimensions 89 | 90 | 2) A note on units (05/2020) 91 | 92 | - PyCDFT uses ASE to read in the structure, which uses Angstroms 93 | - Qbox uses atomic units (Ry, Bohr) 94 | 95 | 3) Runtime errors (05/2020) 96 | 97 | Q: I can run a few CDFT iterations of a **CDFTSolver** but **PyCDFT** crashes with (, TypeError('cannot unpack non-iterable float object') 98 | 99 | A: This could be a sign that the optimizers used in PyCDFT did not converge and threw an error. Adjust inputs to the optimizer and restart the calculation. Further info may be found in the documentation for scipy.optimizer. 100 | 101 | Other possible runtime errors in **PyCDFT** are related to an assertion condition failing. If this is the case, check your input files again corresponding to the error given. 102 | Keep in mind that the **DFTDriver** may also throw runtime errors. 103 | 104 | Debugging 105 | --------- 106 | 107 | **PyCDFT** provides some functions to inspect intermediate quantities for testing purposes: 108 | 109 | .. code-block:: bash 110 | 111 | get_hirsh(CDFTSolver, origin) 112 | get_hirsh_ct(CDFTSolver, origin) 113 | get_rho_atom(CDFTSolver, origin) 114 | get_rho(CDFTSolver, origin) 115 | get_grad(CDFTSolver, origin) 116 | 117 | See **pycdft/pycdft.debug** for details. 118 | -------------------------------------------------------------------------------- /doc/source/tutorial.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial: 2 | 3 | Tutorial 4 | ======== 5 | 6 | The following tutorials are included in the release, located in the **examples/** folder: 7 | 8 | - 01-he2_coupling: calculation of electronic coupling :math:`H_{ab}` of a He-He+ dimer 9 | - 02-thiophene: calculation of electronic coupling :math:`H_{ab}` of a stacked thiophene dimer 10 | - 03-thiophene_rotated: calculation of electronic coupling :math:`H_{ab}` of a stacked thiophene dimer with relative rotation 11 | 12 | Here, we show the basic usage of **PyCDFT** with 01-he2_coupling. 13 | 14 | Computing electronic coupling of a He-He+ dimer 15 | ----------------------------------------------- 16 | 17 | This is a minimum working example for computing the electronic coupling of a He-He+ dimer 18 | (two He atoms separated by some distance with one electron removed). 19 | 20 | 1) After the installation of **PyCDFT** and a DFT driver (**Qbox** is used in this example), perform the ground state DFT calculation with Qbox. 21 | 22 | .. code-block:: bash 23 | 24 | export qb="/path/to/qbox" 25 | $mpirun -np $qb < gs.in > gs.out 26 | 27 | where /path/to/qbox is the path to the Qbox executable and ntasks denotes the number of MPI processes. 28 | 29 | 2) In the same directory, execute Qbox in `client-server mode `_. 30 | 31 | .. code-block:: bash 32 | 33 | $mpirun -np $qb -server qb_cdft.in qb_cdft.out 34 | 35 | and leave the terminal open throughout the entire calculation, Qbox will response to commands given by **PyCDFT**. 36 | 37 | 3) In the same directory, open a Python terminal and follow the procedures below. 38 | 39 | First, load the atomic structure and construct a **Sample** instance. 40 | In this example, we choose a separation of 3 Angstroms between He atoms, and we used the same FFT grid in Qbox (**n1,n2,n3**). To check the FFT grid used by **Qbox**, simply type **grep np2v gs.out** in the directory containing Qbox output file gs.out. 41 | 42 | .. code-block:: python 43 | 44 | from pycdft import * 45 | from ase.io import read 46 | 47 | # read atomic structure using ASE 48 | cell = read("./He2_3Ang.cif") 49 | 50 | # construct the Sample instance 51 | sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1) 52 | 53 | Next we set up the CDFT calculations. 54 | To begin with, we construct a QboxDriver instance that provide necessary commands to for **PyCDFT** to communicate with Qbox. 55 | We initialize the QboxDriver by specifying commands used by Qbox in the self-consistent field calculation. 56 | See `Qbox documentation `_ for more information. 57 | 58 | .. code-block:: python 59 | 60 | qboxdriver = QboxDriver( 61 | sample=sample, 62 | init_cmd="load gs.xml \n" 63 | "set xc PBE \n" 64 | "set wf_dyn PSDA \n" 65 | "set_atoms_dyn CG \n" 66 | "set scf_tol 1.0E-8 \n", 67 | scf_cmd="run 0 50 5", 68 | ) 69 | 70 | Then, we construct CDFT solvers (**CDFTSolver**), which orchestrate the entire CDFT calculations. 71 | In order to compute the electronic coupling, we need two CDFT solvers for the initial and final diabatic state, respectively. 72 | After CDFT solvers are constructed, we add constraints to the solvers. 73 | In this example we will apply **ChargeTransferConstraint** to enforce the electron number difference between the two He atoms to be 1. 74 | 75 | .. code-block:: python 76 | 77 | solver1 = CDFTSolver( 78 | job="scf", # indicate that the calculation is a SCF calculation 79 | optimizer="brenth", # specifiy the optimizer used for the Lagrangian multiplier 80 | sample=sample, dft_driver=qboxdriver 81 | ) 82 | solver2 = solver1.copy() 83 | 84 | V = (2,-2) # search range for the brenth optimizer 85 | 86 | # add constraint to two solvers 87 | ChargeTransferConstraint( 88 | sample=solver1.sample, 89 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), # based on ordering in cif file 90 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), 91 | V_brak=V, 92 | N0=1, # target number of electrons 93 | N_tol=1E-6 # numerical tolerance of Hirshfeld weight 94 | ) 95 | ChargeTransferConstraint( 96 | sample=solver2.sample, 97 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 98 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 99 | V_brak=V, 100 | N0=-1, 101 | N_tol=1E-6 102 | ) 103 | 104 | Then, we execute the calculations by calling the **solve** method of **CDFTSolver** 105 | 106 | .. code-block:: python 107 | 108 | print("---- solver A ------") 109 | solver1.solve() 110 | print("---- solver B ------") 111 | solver2.solve() 112 | 113 | Finally, we compute the electronic coupling of the He-He+ dimer based on the two diabatic states obtained from CDFT calculations 114 | 115 | .. code-block:: python 116 | 117 | compute_elcoupling(solver1, solver2) 118 | 119 | The electronic coupling predicted by **PyCDFT** is 120 | 121 | .. code-block:: bash 122 | 123 | Hab (H): 0.002145233079196648 124 | Hab (mH): 2.1452330791966476 125 | Hab (eV): 0.05837458088794375 126 | 127 | Note that if one has a good guess for the Lagrange multipliers in constraint potentials (for instance from previous calculations using smaller kinetic energy cutoff, etc.), it is recommended to use optimizers such as **secant**, which can take a initial guess for the Lagrange multiplier. In this case, the **V_brak** parameter should be replaced by the **V_init** parameter when initializing the constraints. 128 | 129 | For the He-He+ dimer separated by 3 Angstrom, a good starting guess is V_init = -0.7 for solver1 and V_init = 0.7 for solver2. 130 | 131 | Restarting CDFT calculation for :math:`H_{ab}` 132 | ---------------------------------------------- 133 | 134 | Depending on your computational resources and system, you may want to separately converge each CDFTSolver and save the relevant files for calculating the electronic coupling later. 135 | An example of how to do this in **PyCDFT** is provided in examples/01-he2_coupling/restart_example/. 136 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/README: -------------------------------------------------------------------------------- 1 | This example shows the calculation for electronic coupling with the He-He+ dimer at 3 Ang separation. 2 | It can be run in either an interactive session (in interactive/) or through the job submission queue (in pbs/). 3 | See usage manual (under Quick Reference) or 01-he_scf for the how to's. 4 | 5 | The expected output files are located in reference/ 6 | 7 | nThe tut/ directory contains the python script for this example 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/interactive/He2_3Ang.cif: -------------------------------------------------------------------------------- 1 | data_image0 2 | _cell_length_a 15.8753 3 | _cell_length_b 15.8753 4 | _cell_length_c 15.8753 5 | _cell_angle_alpha 90 6 | _cell_angle_beta 90 7 | _cell_angle_gamma 90 8 | 9 | loop_ 10 | _atom_site_label 11 | _atom_site_occupancy 12 | _atom_site_fract_x 13 | _atom_site_fract_y 14 | _atom_site_fract_z 15 | _atom_site_thermal_displace_type 16 | _atom_site_B_iso_or_equiv 17 | _atom_site_type_symbol 18 | He1 1.0000 0.00000 0.00000 0.00000 Biso 1.000 He 19 | He2 1.0000 0.00000 0.00000 0.188972 Biso 1.000 He 20 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/interactive/gs.in: -------------------------------------------------------------------------------- 1 | set cell 30.000000 0.000000 0.000000 0.000000 30.000000 0.000000 0.000000 0.000000 30.000000 2 | 3 | species He He_ONCV_PBE-1.0.xml 4 | 5 | atom He1 He 0.00000000 0.00000000 0.00000000 6 | atom He2 He 0.00000000 0.00000000 5.66919 7 | 8 | set net_charge 1 9 | set nspin 2 10 | set xc PBE 11 | set ecut 30 12 | set wf_dyn JD 13 | set scf_tol 1.0E-8 14 | 15 | randomize_wf 16 | 17 | run 0 200 5 18 | 19 | save gs.xml 20 | 21 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/interactive/he2_coupling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Example 01: CDFT calculation of the electronic coupling of $\\mathrm{He}_2^+$" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "### Initialize DFT driver (Qbox)" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "After the installation of PyCDFT and a DFT driver (Qbox in this example), perform the ground state DFT calculation with Qbox.\n", 22 | "\n", 23 | "```bash\n", 24 | " export qb=\"/path/to/qbox\"\n", 25 | " $mpirun -np $qb < gs.in > gs.out\n", 26 | "```\n", 27 | "where /path/to/qbox is the path to the Qbox executable and ntasks denotes the number of MPI processes.\n", 28 | "\n", 29 | "Then in the same directory, execute Qbox in [client-server mode](qboxcode.org/daoc/html/usage/client-server.html)\n", 30 | "\n", 31 | "```bash\n", 32 | " $mpirun -np $qb -server qb_cdft.in qb_cdft.out\n", 33 | "```\n", 34 | "and leave the terminal open throughout the entire calculation, Qbox will response to commands given by PyCDFT.\n", 35 | "\n", 36 | "Make sure this Jupyter notebook sits in the same directory as the ground state calculation." 37 | ] 38 | }, 39 | { 40 | "cell_type": "markdown", 41 | "metadata": {}, 42 | "source": [ 43 | "### Read atomic structure of $\\mathrm{He}_2^+$" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": null, 49 | "metadata": {}, 50 | "outputs": [], 51 | "source": [ 52 | "from pycdft import *\n", 53 | "from ase.io import read\n", 54 | "\n", 55 | "# read atomic structure using ASE\n", 56 | "cell = read(\"./He2_3Ang.cif\")\n", 57 | "\n", 58 | "# construct the Sample instance\n", 59 | "sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1)" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "metadata": {}, 65 | "source": [ 66 | "### Set up CDFT calculations" 67 | ] 68 | }, 69 | { 70 | "cell_type": "markdown", 71 | "metadata": {}, 72 | "source": [ 73 | "First, construct a **DFTDriver** that provide necessary commands to for PyCDFT to communicate with Qbox" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "metadata": {}, 80 | "outputs": [], 81 | "source": [ 82 | "qboxdriver = QboxDriver(\n", 83 | " sample=sample,\n", 84 | " init_cmd=\"load gs.xml \\n\" \n", 85 | " \"set xc PBE \\n\" \n", 86 | " \"set wf_dyn PSDA \\n\" \n", 87 | " \"set_atoms_dyn CG \\n\" \n", 88 | " \"set scf_tol 1.0E-8 \\n\",\n", 89 | " scf_cmd=\"run 0 50 5\",\n", 90 | ")" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": {}, 96 | "source": [ 97 | "Then, set up **CDFTSolver** instances, which orchestrate the entire CDFT calculations.\n", 98 | "In order to compute the electronic coupling, we need two solvers for the two diabatic state where the extra +1 charge is localized on each He atom." 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": null, 104 | "metadata": {}, 105 | "outputs": [], 106 | "source": [ 107 | "solver1 = CDFTSolver(\n", 108 | " job=\"scf\", # indicate that the calculation is a SCF calculation\n", 109 | " optimizer=\"brenth\", # specifiy the optimizer used for the Lagrangian multiplier\n", 110 | " sample=sample, dft_driver=qboxdriver\n", 111 | ")\n", 112 | "solver2 = solver1.copy()" 113 | ] 114 | }, 115 | { 116 | "cell_type": "markdown", 117 | "metadata": {}, 118 | "source": [ 119 | "Finally, we add constraints to the solvers by constructing **Constraint** instances.\n", 120 | "In this example we will use **ChargeTransferConstraint** to enforce the electron number difference between the two He atoms to be 1." 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": null, 126 | "metadata": {}, 127 | "outputs": [], 128 | "source": [ 129 | "V = (2,-2)\n", 130 | "\n", 131 | "ChargeTransferConstraint(\n", 132 | " sample=solver1.sample,\n", 133 | " donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), # donor fragment\n", 134 | " acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), # acceptor fragment\n", 135 | " V_brak =V, # search region for the brenth optimizer\n", 136 | " N0=1, # desired charge to be localized\n", 137 | " N_tol=1E-6 # convergence threshold for |N - N0|\n", 138 | ")\n", 139 | "ChargeTransferConstraint(\n", 140 | " sample=solver2.sample, \n", 141 | " donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]),\n", 142 | " acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]),\n", 143 | " V_brak=V,\n", 144 | " N0=-1, \n", 145 | " N_tol=1E-6\n", 146 | ")" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "In this example we used V = (2,-2) as the search region for the **brenth** optimizer, which we found to be sufficient for most cases.\n", 154 | "\n", 155 | "Note that if one has a good guess for the Lagrange multipliers in constraint potentials (for instance from previous calculations using smaller kinetic energy cutoff, etc.), it is recommended to use optimizers such as **secant**, which can take a initial guess for the Lagrange multiplier. In this case, the **V_brak** parameter should be replaced by the **V_init** parameter when initializing the constraints.\n", 156 | "For the He-He+ dimer separated by 3 Angstrom, a good starting guess is V_init = -0.7 for solver1 and V_init = 0.7 for solver2." 157 | ] 158 | }, 159 | { 160 | "cell_type": "markdown", 161 | "metadata": {}, 162 | "source": [ 163 | "### Execute CDFT calculations" 164 | ] 165 | }, 166 | { 167 | "cell_type": "markdown", 168 | "metadata": {}, 169 | "source": [ 170 | "Call the **solve** method of **CDFTSolver** instances to execute CDFT calculations." 171 | ] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "execution_count": null, 176 | "metadata": { 177 | "scrolled": false 178 | }, 179 | "outputs": [], 180 | "source": [ 181 | "solver1.solve()" 182 | ] 183 | }, 184 | { 185 | "cell_type": "code", 186 | "execution_count": null, 187 | "metadata": { 188 | "scrolled": false 189 | }, 190 | "outputs": [], 191 | "source": [ 192 | "solver2.solve()" 193 | ] 194 | }, 195 | { 196 | "cell_type": "markdown", 197 | "metadata": {}, 198 | "source": [ 199 | "Finally, we call upon the routines for calculating electronic coupling. \n", 200 | "An example output is given in ./reference" 201 | ] 202 | }, 203 | { 204 | "cell_type": "markdown", 205 | "metadata": {}, 206 | "source": [ 207 | "### Compute electronic coupling" 208 | ] 209 | }, 210 | { 211 | "cell_type": "markdown", 212 | "metadata": {}, 213 | "source": [ 214 | "After CDFT calculations are converged, the electronic coupling Hab can be computed using the **compute_elcoupling** function" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": null, 220 | "metadata": {}, 221 | "outputs": [], 222 | "source": [ 223 | "compute_elcoupling(solver1, solver2)" 224 | ] 225 | } 226 | ], 227 | "metadata": { 228 | "anaconda-cloud": {}, 229 | "kernelspec": { 230 | "display_name": "Python 3", 231 | "language": "python", 232 | "name": "python3" 233 | }, 234 | "language_info": { 235 | "codemirror_mode": { 236 | "name": "ipython", 237 | "version": 3 238 | }, 239 | "file_extension": ".py", 240 | "mimetype": "text/x-python", 241 | "name": "python", 242 | "nbconvert_exporter": "python", 243 | "pygments_lexer": "ipython3", 244 | "version": "3.7.5" 245 | } 246 | }, 247 | "nbformat": 4, 248 | "nbformat_minor": 1 249 | } 250 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/interactive/he2_coupling.py: -------------------------------------------------------------------------------- 1 | # ## Prerequisite 2 | 3 | # After compiling the DFT driver and installing PyCDFT, run the ground state calculation. 4 | # - - - - - - - 5 | # For Qbox 6 | # 7 | # ```bash 8 | # export qb="/path/to/executable" 9 | # $qb < gs.in > gs.out 10 | # ``` 11 | # Then in the same directory, run [Qbox in server mode](qboxcode.org/daoc/html/usage/client-server.html) (using interactive queue), e.g., 12 | # 13 | # 14 | # ```bash 15 | # mpirun -np $qb -server qb_cdft.in qb_cdft.out 16 | # ``` 17 | # 18 | # where ntasks designates the number of tasks/processors and qb_cdft.\* are files reserved in client-server mode. 19 | # 20 | # Make sure this Jupyter notebook sits in the same directory as the groundstate calculation. 21 | # 22 | # Using 20 processors on Intel Ivybridge nodes, this example takes less than 10 min. 23 | 24 | # ### Tutorial: coupling constant for He$_2^+$ 25 | 26 | # Here we will do a proper run of PyCDFT and include the calculation of the electron coupling. 27 | # Instead of randomly guessing an initial constraint potential $V$, we shall use the `brentq` or `brenth` optimizers to perform a search. For these particular optimizers, we need to specify a range of $V$ where the function space is sampled for both positive and negative values; a range of (-2,2) is typically sufficient. 28 | # 29 | # As before, we initialize the system in the PyCDFT module. 30 | 31 | from pycdft import * 32 | from ase.io import read 33 | 34 | V = (2,-2) 35 | # V = -0.703772086888 # this is close to optimal constraint potential, use secant optimizer to refine 36 | 37 | print("==================== Initializing Run =========================") 38 | # Read atomic structure 39 | cell = read("./He2_3Ang.cif") 40 | print(r"Initial atomic positions (Ang):") 41 | print(cell.get_positions()) 42 | print(cell.get_cell()) 43 | cell.positions[1][2] = 3.0 44 | 45 | # Construct sample class, set FFT grid 46 | sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1) 47 | print(sample.atoms[1]) 48 | 49 | # Set up the DFT Driver, provide necessary commands to initialize 50 | # the external DFT code (Qbox in this case) 51 | qboxdriver = QboxDriver( 52 | sample=sample, 53 | init_cmd="load gs.xml \n" 54 | "set xc PBE \n" 55 | "set wf_dyn PSDA \n" 56 | "set_atoms_dyn CG \n" 57 | "set scf_tol 1.0E-8 \n", 58 | scf_cmd="run 0 50 5", 59 | ) 60 | 61 | # Set up two CDFT solvers for two diabatic states 62 | solver1 = CDFTSolver(job="scf", # Indicate the calculation is SCF calculation 63 | optimizer="brenth", # Specifiy the optimizer used for the Lagrangian multiplier 64 | sample=sample, 65 | dft_driver=qboxdriver) 66 | solver2 = solver1.copy() 67 | 68 | # Initialize two constraints that localize the extra +1 charge on each site 69 | # Here we use ChargeTransferConstraint, which constrains the relative electron number 70 | # between two Fragments that represent the donor and acceptor 71 | ChargeTransferConstraint( 72 | sample=solver1.sample, 73 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), # Donor Fragment 74 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), # Acceptor Fragment 75 | V_brak =V, # Search region for the brenth optimizer 76 | N0=1, # Desired charge to be localized 77 | N_tol=1E-6 # tolerance to target charge to be localized 78 | ) 79 | ChargeTransferConstraint( 80 | sample=solver2.sample, 81 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 82 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 83 | V_brak=V, 84 | N0=-1, 85 | N_tol=1E-6 86 | ) 87 | 88 | 89 | # And performed constrained DFT 90 | print("~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~") 91 | print("---- solver A ------") 92 | solver1.solve() 93 | print("---- solver B ------") 94 | solver2.solve() 95 | 96 | 97 | # Finally, we call upon the routines for calculating electronic coupling. 98 | # An example output is given in ./reference 99 | print("~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~") 100 | compute_elcoupling(solver1, solver2) 101 | 102 | print("=========== "+ str(d)+" Bohr"+" =======================") 103 | print("==================== JOB DONE =========================") 104 | 105 | 106 | # Visualize the charge density. 107 | 108 | #print ("~~~~~~~~~~~ Debugging ~~~~~~~~~") 109 | #origin=tuple(np.multiply([0,0,0],0.529)) 110 | #get_rho(solver1,origin,1) 111 | #get_rho(solver2,origin,2) 112 | 113 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/reference/3.0-he2-coupling.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # ## Prerequisite 5 | 6 | # After compiling the DFT driver and installing PyCDFT, run the ground state calculation. 7 | # - - - - - - - 8 | # For Qbox 9 | # 10 | # ```bash 11 | # export qb="/path/to/executable" 12 | # $qb < gs.in > gs.out 13 | # ``` 14 | # Then in the same directory, run [Qbox in server mode](qboxcode.org/daoc/html/usage/client-server.html) (using interactive queue) 15 | # 16 | # 17 | # ```bash 18 | # mpirun -np $qb -server qb_cdft.in qb_cdft.out 19 | # ``` 20 | # 21 | # where qb_cdft.\* are files reserved in client-server mode. 22 | 23 | # ### Tutorial: coupling constant for He$_2^+$ 24 | 25 | # In[1]: 26 | 27 | 28 | from pycdft import * 29 | from ase.io import read 30 | 31 | 32 | # In[2]: 33 | 34 | 35 | cell = read("./He2.cif") 36 | print(r"Initial atomic positions (Ang):") 37 | print(cell.get_positions()) 38 | print(cell.get_cell()) 39 | 40 | 41 | # In[5]: 42 | 43 | 44 | d = 3.0 45 | #V = (-1,1) 46 | V = -0.704717721359 47 | 48 | print("==================== Initializing Run =========================") 49 | # load sample geometry 50 | cell.positions[1][2] = d 51 | sample = Sample(ase_cell=cell, n1=140, n2=140, n3=140, vspin=1) 52 | print(sample.atoms[1]) 53 | 54 | # load DFT driver 55 | qboxdriver = QboxDriver( 56 | sample=sample, 57 | init_cmd="load gs.xml \n" 58 | "set xc PBE \n" 59 | "set wf_dyn PSDA \n" 60 | "set_atoms_dyn CG \n" 61 | "set scf_tol 1.0E-8 \n", 62 | scf_cmd="run 0 50 5", 63 | ) 64 | 65 | # set up CDFT constraints and solver 66 | solver1 = CDFTSolver(job="scf", optimizer="secant",sample=sample, dft_driver=qboxdriver) 67 | solver2 = solver1.copy() 68 | 69 | # add constraint to two solvers 70 | ChargeTransferConstraint( 71 | sample=solver1.sample, 72 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), 73 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), 74 | #V_brak=V, 75 | V_init = -0.704717721359, 76 | N0=1, 77 | N_tol=1E-6 78 | ) 79 | ChargeTransferConstraint( 80 | sample=solver2.sample, 81 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 82 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 83 | #V_brak=V, 84 | V_init = 0.704670044631, 85 | N0=-1, 86 | N_tol=1E-6 87 | ) 88 | 89 | 90 | 91 | 92 | print("~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~") 93 | print("---- solver A ------") 94 | solver1.solve() 95 | print("---- solver B ------") 96 | solver2.solve() 97 | 98 | print("~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~") 99 | compute_elcoupling(solver1, solver2) 100 | 101 | print("=========== "+ str(d)+" Bohr"+" =======================") 102 | print("==================== JOB DONE =========================") 103 | 104 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/reference/He2.cif: -------------------------------------------------------------------------------- 1 | data_image0 2 | _cell_length_a 15.87531 3 | _cell_length_b 15.87531 4 | _cell_length_c 15.87531 5 | _cell_angle_alpha 90 6 | _cell_angle_beta 90 7 | _cell_angle_gamma 90 8 | 9 | loop_ 10 | _atom_site_label 11 | _atom_site_occupancy 12 | _atom_site_fract_x 13 | _atom_site_fract_y 14 | _atom_site_fract_z 15 | _atom_site_thermal_displace_type 16 | _atom_site_B_iso_or_equiv 17 | _atom_site_type_symbol 18 | He1 1.0000 0.00000 0.00000 0.00000 Biso 1.000 He 19 | He2 1.0000 0.00000 0.00000 0.18897268777 Biso 1.000 He 20 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/reference/gs.in: -------------------------------------------------------------------------------- 1 | set cell 30.000000 0.000000 0.000000 0.000000 30.000000 0.000000 0.000000 0.000000 30.000000 2 | 3 | species He He_ONCV_PBE-1.0.xml 4 | 5 | atom He1 He 0.00000000 0.00000000 0.00000000 6 | atom He2 He 0.00000000 0.00000000 5.66919 7 | 8 | set net_charge 1 9 | set nspin 2 10 | set xc PBE 11 | set ecut 45 12 | set wf_dyn PSDA 13 | set scf_tol 1.0E-8 14 | 15 | randomize_wf 16 | 17 | run 0 200 5 18 | 19 | save gs.xml 20 | 21 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/restart_example/run_coupling.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | from pycdft import * 4 | from ase.io import read 5 | 6 | # This file contains commands to restart from previous (converged) calculation of CDFT 7 | # For reference, the inputs from the CDFT run is kept 8 | 9 | cell = read("./He2.cif") 10 | print(r"Initial atomic positions (Ang):") 11 | print(cell.get_positions()) 12 | print(cell.get_cell()) 13 | 14 | V = -0.703772086888 # this is close to optimal constraint potential, use secant optimizer to refine 15 | 16 | print("==================== Initializing Run =========================") 17 | # load sample geometry 18 | cell.positions[1][2] = 3.0 19 | sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1) 20 | print(sample.atoms[1]) 21 | 22 | # load DFT driver, the commands are not essential but kept for reference 23 | qboxdriver = QboxDriver( 24 | sample=sample, 25 | init_cmd="load gs.xml \n" 26 | "set xc PBE \n" 27 | "set wf_dyn PSDA \n" 28 | "set_atoms_dyn CG \n" 29 | "set scf_tol 1.0E-8 \n", 30 | scf_cmd="run 0 50 5", 31 | ) 32 | 33 | # set up CDFT constraints and solver 34 | solver1 = CDFTSolver(job="scf", optimizer="secant",sample=sample, dft_driver=qboxdriver,lrestart=True) 35 | solver2 = solver1.copy() 36 | 37 | # add constraint to two solvers; the contraints are not essential but kept for reference 38 | ChargeTransferConstraint( 39 | sample=solver1.sample, 40 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), 41 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), 42 | V_init = V, 43 | N0=1, 44 | N_tol=1E-6 45 | ) 46 | ChargeTransferConstraint( 47 | sample=solver2.sample, 48 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 49 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 50 | V_init = -V, 51 | N0=-1, 52 | N_tol=1E-6 53 | ) 54 | 55 | # Below are the main routines needed to restart a CDFT calculation 56 | print("~~~~~~~~~~~~~~~~~~~~ Restarting CDFT ~~~~~~~~~~~~~~~~~~~~") 57 | print("---- solver A ------") 58 | solver1.restart("wfc-1.xml",[-4.726619,-0.703904]) # input arguments are name of wfc file, [Ed,Ec] from output 59 | solver1.get_Vc("Vc-1.dat") # input argument is name of constraint potential file 60 | 61 | print("---- solver B ------") 62 | solver2.restart("wfc-2.xml",[-4.726621,-0.703725]) 63 | solver2.get_Vc("Vc-2.dat") 64 | 65 | 66 | # Finally, we call upon the routines for calculating electronic coupling. 67 | # An example output is given as coupling_restart.out 68 | 69 | print("~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~") 70 | compute_elcoupling(solver1, solver2,close_dft_driver=False) 71 | 72 | print("==================== JOB DONE =========================") 73 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/restart_example/run_he2_solvers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | import subprocess 5 | from pycdft import * 6 | from ase.io import read 7 | 8 | cell = read("./He2.cif") 9 | print(r"Initial atomic positions (Ang):") 10 | print(cell.get_positions()) 11 | print(cell.get_cell()) 12 | 13 | 14 | # Here we will do a proper run of PyCDFT, this time as an example for how to restart from a previous (converged) calculation. 15 | # We will use the 'secant' optimizer and guess a good value for the constraint potential 16 | # As before, we initialize the system in the PyCDFT module. 17 | 18 | V = -0.703772086888 # this is close to optimal constraint potential, use secant optimizer to refine 19 | 20 | print("==================== Initializing Run =========================") 21 | # load sample geometry 22 | cell.positions[1][2] = 3.0 23 | sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1) 24 | print(sample.atoms[1]) 25 | 26 | # load DFT driver 27 | qboxdriver = QboxDriver( 28 | sample=sample, 29 | init_cmd="load gs.xml \n" 30 | "set xc PBE \n" 31 | "set wf_dyn PSDA \n" 32 | "set_atoms_dyn CG \n" 33 | "set scf_tol 1.0E-8 \n", 34 | scf_cmd="run 0 50 5", 35 | ) 36 | 37 | # set up CDFT constraints and solver 38 | solver1 = CDFTSolver(job="scf", optimizer="secant",sample=sample, dft_driver=qboxdriver) 39 | solver2 = solver1.copy() 40 | 41 | # add constraint to two solvers 42 | ChargeTransferConstraint( 43 | sample=solver1.sample, 44 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), 45 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), 46 | V_init = V, 47 | N0=1, 48 | N_tol=1E-6 49 | ) 50 | ChargeTransferConstraint( 51 | sample=solver2.sample, 52 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 53 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 54 | V_init = -V, 55 | N0=-1, 56 | N_tol=1E-6 57 | ) 58 | 59 | # And performed constrained DFT 60 | # Here we rename files from each CDFTSolver, which will be used to 61 | # calculate the electronic coupling separately from restart 62 | print("~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~") 63 | print("---- solver A ------") 64 | solver1.solve() 65 | 66 | bashCommand = "mv wfc.xml wfc-1.xml" 67 | process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) 68 | output, error = process.communicate() 69 | 70 | bashCommand = "mv Vc.dat Vc-1.dat" 71 | process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) 72 | output, error = process.communicate() 73 | 74 | print("---- solver B ------") 75 | solver2.solve() 76 | 77 | bashCommand = "mv wfc.xml wfc-2.xml" 78 | process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) 79 | output, error = process.communicate() 80 | 81 | bashCommand = "mv Vc.dat Vc-2.dat" 82 | process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) 83 | output, error = process.communicate() 84 | 85 | print("==================== JOB DONE =========================") 86 | 87 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/script/He2_tmp.cif: -------------------------------------------------------------------------------- 1 | data_image0 2 | _cell_length_a 15.8753 3 | _cell_length_b 15.8753 4 | _cell_length_c 15.8753 5 | _cell_angle_alpha 90 6 | _cell_angle_beta 90 7 | _cell_angle_gamma 90 8 | 9 | loop_ 10 | _atom_site_label 11 | _atom_site_occupancy 12 | _atom_site_fract_x 13 | _atom_site_fract_y 14 | _atom_site_fract_z 15 | _atom_site_thermal_displace_type 16 | _atom_site_B_iso_or_equiv 17 | _atom_site_type_symbol 18 | He1 1.0000 0.00000 0.00000 0.00000 Biso 1.000 He 19 | He2 1.0000 0.00000 0.00000 REPL Biso 1.000 He 20 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/script/gs_tmp.in: -------------------------------------------------------------------------------- 1 | set cell 30.000000 0.000000 0.000000 0.000000 30.000000 0.000000 0.000000 0.000000 30.000000 2 | 3 | species He He_ONCV_PBE-1.0.xml 4 | 5 | atom He1 He 0.00000000 0.00000000 0.00000000 6 | atom He2 He 0.00000000 0.00000000 REPL 7 | 8 | set net_charge 1 9 | set nspin 2 10 | set xc PBE 11 | set ecut 30 12 | set wf_dyn JD 13 | set scf_tol 1.0E-8 14 | 15 | randomize_wf 16 | 17 | run 0 200 5 18 | 19 | save gs.xml 20 | 21 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/script/he2_coupling-tmp.py: -------------------------------------------------------------------------------- 1 | # ### Tutorial: coupling constant for He$_2^+$ 2 | 3 | # Here we will do a proper run of PyCDFT and include the calculation of the electron coupling. 4 | # Instead of randomly guessing an initial constraint potential $V$, we shall use the `brentq` or `brenth` optimizers to perform a search. For these particular optimizers, we need to specify a range of $V$ where the function space is sampled for both positive and negative values; a range of (-2,2) is typically sufficient. 5 | # 6 | # As before, we initialize the system in the PyCDFT module. 7 | 8 | from pycdft import * 9 | from ase.io import read 10 | 11 | V = (2,-2) 12 | # V = -0.703772086888 # this is close to optimal constraint potential, use secant optimizer to refine 13 | 14 | print("==================== Initializing Run =========================") 15 | # Read atomic structure 16 | cell = read("./He2.cif") 17 | print(r"Initial atomic positions (Ang):") 18 | print(cell.get_positions()) 19 | print(cell.get_cell()) 20 | cell.positions[1][2] = REPL 21 | 22 | # Construct sample class, set FFT grid 23 | sample = Sample(ase_cell=cell, n1=112, n2=112, n3=112, vspin=1) 24 | print(sample.atoms[1]) 25 | 26 | # Set up the DFT Driver, provide necessary commands to initialize 27 | # the external DFT code (Qbox in this case) 28 | qboxdriver = QboxDriver( 29 | sample=sample, 30 | init_cmd="load gs.xml \n" 31 | "set xc PBE \n" 32 | "set wf_dyn PSDA \n" 33 | "set_atoms_dyn CG \n" 34 | "set scf_tol 1.0E-8 \n", 35 | scf_cmd="run 0 50 5", 36 | ) 37 | 38 | # Set up two CDFT solvers for two diabatic states 39 | solver1 = CDFTSolver(job="scf", # Indicate the calculation is SCF calculation 40 | optimizer="brenth", # Specifiy the optimizer used for the Lagrangian multiplier 41 | sample=sample, 42 | dft_driver=qboxdriver) 43 | solver2 = solver1.copy() 44 | 45 | # Initialize two constraints that localize the extra +1 charge on each site 46 | # Here we use ChargeTransferConstraint, which constrains the relative electron number 47 | # between two Fragments that represent the donor and acceptor 48 | ChargeTransferConstraint( 49 | sample=solver1.sample, 50 | donor=Fragment(solver1.sample, solver1.sample.atoms[0:1]), # Donor Fragment 51 | acceptor=Fragment(solver1.sample, solver1.sample.atoms[1:2]), # Acceptor Fragment 52 | V_brak =V, # Search region for the brenth optimizer 53 | N0=1, # Desired charge to be localized 54 | N_tol=1E-6 # tolerance to target charge to be localized 55 | ) 56 | ChargeTransferConstraint( 57 | sample=solver2.sample, 58 | donor=Fragment(solver2.sample, solver2.sample.atoms[0:1]), 59 | acceptor=Fragment(solver2.sample, solver2.sample.atoms[1:2]), 60 | V_brak=V, 61 | N0=-1, 62 | N_tol=1E-6 63 | ) 64 | 65 | 66 | # And performed constrained DFT 67 | 68 | print("~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~") 69 | print("---- solver A ------") 70 | solver1.solve() 71 | print("---- solver B ------") 72 | solver2.solve() 73 | 74 | 75 | # Finally, we call upon the routines for calculating electronic coupling. 76 | # An example output is given in ./reference 77 | 78 | print("~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~") 79 | compute_elcoupling(solver1, solver2) 80 | 81 | print("=========== "+ str(d)+" Bohr"+" =======================") 82 | print("==================== JOB DONE =========================") 83 | 84 | # Visualize the charge density. 85 | 86 | #print ("~~~~~~~~~~~ Debugging ~~~~~~~~~") 87 | #origin=tuple(np.multiply([0,0,0],0.529)) 88 | #get_rho(solver1,origin,1) 89 | #get_rho(solver2,origin,2) 90 | 91 | -------------------------------------------------------------------------------- /examples/01-he2_coupling/script/run_he2_coupling: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --partition=gagalli-brdwl 3 | #SBATCH --mail-type=END,FAIL 4 | #SBATCH --qos=gagalli-debug 5 | #SBATCH --time=02:00:00 6 | #SBATCH --ntasks-per-node=28 7 | #SBATCH --nodes=1 8 | 9 | #SBATCH --constraint=e5-2680v4 10 | 11 | # modules compiled with Qbox 1.67.4 12 | module unload python intelmpi mkl 13 | module load python/3.7.0 gcc 14 | module load mkl/2018.up2 intelmpi/2018.2.199+intel-18.0 xerces/3.1.4 15 | 16 | # -------------------------------------------------------------------- 17 | # Job submission script for calculating electron coupling for He-He+ dimer 18 | # as a function of bond length 19 | 20 | # It is needed to have good starting wavefunctions corresponding to the 21 | # starting geometry of the CDFT run 22 | 23 | # This is a short script for running the ground-state calculations in Qbox 24 | # for a set of bond distances for the He-He+ dimer electron coupling example 25 | 26 | # requires a modified version of Qbox that can handle external potentials 27 | #---------------------------------------------------------------------- 28 | 29 | NCORES=$(($SLURM_NTASKS_PER_NODE * $SLURM_JOB_NUM_NODES)) 30 | 31 | #TODO: substitute the appropriate path of the Qbox executable 32 | export qb="/path/to/executable/qb_vext" 33 | 34 | ds=(2.5 3.0 4.0 5.0 6.0) # Angstroms 35 | ang2bohr=1.88973 36 | 37 | for d in ${ds[@]}; do 38 | mkdir $d 39 | cd $d 40 | 41 | # set up run 42 | db=$(bc <<< $d*$ang2bohr) 43 | frac_d=$(bc <<< $db*0.0333333) # assumed box size, 30 Bohr 44 | cp ../{*py,*1.0.xml} . 45 | sed "s/REPL/$db/g" ../gs_tmp.in > gs.in 46 | sed "s/REPL/$frac_d/g" ../He2_tmp.cif > He2.cif 47 | 48 | # set up notebook 49 | cp he2_coupling-tmp.py ${d}-he2-coupling.py 50 | sed -i "s/REPL/$d/g" ${d}-he2-coupling.py 51 | 52 | echo "=== Running Qbox ====" 53 | mpirun -np 4 $qb < gs.in > gs.out 54 | 55 | echo "=== Running PyCDFT @ distance ${d} Ang. ====" 56 | mpirun -np $NCORES $qb -server qb_cdft.in qb_cdft.out & 57 | sleep 10 58 | python -u ${d}-he2-coupling.py > coupling_${d}.out 59 | wait 60 | 61 | cd ../ 62 | done 63 | -------------------------------------------------------------------------------- /examples/02-thiophene/README: -------------------------------------------------------------------------------- 1 | This example shows the calculation for electronic coupling with the thiophene-thiophene+ dimer. 2 | It can be run in either an interactive session or through the job submission queue. 3 | See usage manual (under Quick Reference) or 01-he_scf for the how to's. 4 | 5 | See the run_thio_dist script for a PBS submission queue 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/02-thiophene/align.cif: -------------------------------------------------------------------------------- 1 | #====================================================================== 2 | 3 | # CRYSTAL DATA 4 | 5 | #---------------------------------------------------------------------- 6 | 7 | data_VESTA_phase_1 8 | 9 | 10 | _chemical_name_common '8030' 11 | _cell_length_a 25.00000 12 | _cell_length_b 25.00000 13 | _cell_length_c 30.00000 14 | _cell_angle_alpha 90 15 | _cell_angle_beta 90 16 | _cell_angle_gamma 90 17 | _space_group_name_H-M_alt 'P 1' 18 | _space_group_IT_number 1 19 | 20 | loop_ 21 | _space_group_symop_operation_xyz 22 | 'x, y, z' 23 | 24 | loop_ 25 | _atom_site_label 26 | _atom_site_occupancy 27 | _atom_site_fract_x 28 | _atom_site_fract_y 29 | _atom_site_fract_z 30 | _atom_site_adp_type 31 | _atom_site_B_iso_or_equiv 32 | _atom_site_type_symbol 33 | S1 1.0 0.064651 0.046617 0.000000 Biso 1.000000 S 34 | C1 1.0 0.149087 0.109113 0.000000 Biso 1.000000 C 35 | C2 1.0 0.105431 0.143425 0.000000 Biso 1.000000 C 36 | C3 1.0 0.133339 0.055801 0.000000 Biso 1.000000 C 37 | C4 1.0 0.057348 0.115529 0.000000 Biso 1.000000 C 38 | H1 1.0 0.188023 0.121549 0.000000 Biso 1.000000 H 39 | H2 1.0 0.108311 0.184197 0.000000 Biso 1.000000 H 40 | H3 1.0 0.159815 0.024718 0.000000 Biso 1.000000 H 41 | H4 1.0 0.020891 0.133909 0.000000 Biso 1.000000 H 42 | S1 1.0 0.064651 0.046617 REPL Biso 1.000000 S 43 | C1 1.0 0.149087 0.109113 REPL Biso 1.000000 C 44 | C2 1.0 0.105431 0.143425 REPL Biso 1.000000 C 45 | C3 1.0 0.133339 0.055801 REPL Biso 1.000000 C 46 | C4 1.0 0.057348 0.115529 REPL Biso 1.000000 C 47 | H1 1.0 0.188023 0.121549 REPL Biso 1.000000 H 48 | H2 1.0 0.108311 0.184197 REPL Biso 1.000000 H 49 | H3 1.0 0.159815 0.024718 REPL Biso 1.000000 H 50 | H4 1.0 0.020891 0.133909 REPL Biso 1.000000 H 51 | -------------------------------------------------------------------------------- /examples/02-thiophene/align.in: -------------------------------------------------------------------------------- 1 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 2 | 3 | species H H_ONCV_PBE-1.0.xml 4 | species C C_ONCV_PBE-1.0.xml 5 | species S S_ONCV_PBE-1.0.xml 6 | 7 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 8 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 9 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 10 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 11 | atom H5 H 8.882798738764373 5.742357604644488 REPL 12 | atom H6 H 5.116952788724296 8.702046447956798 REPL 13 | atom H7 H 7.550163971618516 1.1677561746423457 REPL 14 | atom H8 H 0.9869566406850583 6.326282935115376 REPL 15 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 16 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 17 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 18 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 19 | atom C5 C 7.043339461481649 5.154841794795302 REPL 20 | atom C6 C 4.980892517546612 6.775848747798301 REPL 21 | atom C7 C 6.299354339778128 2.636214997217313 REPL 22 | atom C8 C 2.7093001498256033 5.457953843363361 REPL 23 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 24 | atom S2 S 3.0543168721903995 2.2023339102395916 REPL 25 | 26 | set net_charge 1 27 | set nspin 2 28 | set xc PBE 29 | set ecut 40 30 | set wf_dyn JD 31 | set scf_tol 1.0E-8 32 | 33 | randomize_wf 34 | 35 | run 0 200 5 36 | 37 | save gs.xml 38 | 39 | -------------------------------------------------------------------------------- /examples/02-thiophene/run_thio_dist: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --partition=gagalli-ivyb 3 | #SBATCH --mail-type=FAIL,END 4 | #SBATCH --time=06:00:00 5 | #SBATCH --ntasks-per-node=20 6 | #SBATCH --nodes=2 7 | 8 | #------------------------------------------------ 9 | # Tutorial 3: thiophene-thiophene+ dimer 10 | # 11 | # This is a wrapper for running PyCDFT with Qbox 12 | # It is needed to have good starting wavefunctions corresponding to the 13 | # starting geometry of the CDFT run 14 | 15 | # This is a short script for running the ground-state calculations in Qbox 16 | # for a set of bond distances for the thiophene dimer electron coupling example 17 | 18 | # requires a modified version of Qbox that can handle external potentials 19 | #------------------------------------------------ 20 | 21 | module unload python intelmpi mkl 22 | module load mkl/2018.up2 intelmpi/2018.2.199+intel-18.0 xerces/3.1.4 23 | module load python/3.7.0 gcc/6.1 24 | NCORES=$(($SLURM_NTASKS_PER_NODE * $SLURM_JOB_NUM_NODES)) 25 | 26 | #TODO: substitute the appropriate path of the Qbox executable 27 | export qb="/path/to/executable/qb_vext" 28 | 29 | ds=(3.5 4.0 4.5 5.0) 30 | ang2bohr=1.889725989 31 | bohr2ang=0.529177249 32 | 33 | # run gs calculation in Qbox 34 | for d in ${ds[@]}; do 35 | mkdir $d 36 | cd $d 37 | 38 | # set up run 39 | db=$(bc <<< $d*$ang2bohr) 40 | frac_d=$(bc <<< $db*0.01763924163) # assumed box size, 30 Ang 41 | cp ../{align.in,align.cif,*1.0.xml} . 42 | sed -i "s/REPL/$db/g" align.in 43 | sed -i "s/REPL/$frac_d/g" align.cif 44 | 45 | echo "=== Running Qbox ====" 46 | mpirun -np $NCORES $qb < align.in > align.out 47 | 48 | cd ../ 49 | done 50 | 51 | 52 | # There are two options for running PyCDFT 53 | # Interactive client-server modes --> best suited with jupyter notebook 54 | # or 55 | # SLURM queue (below) using python script 56 | # 57 | # run PyCDFT 58 | for d in ${ds[@]}; do 59 | cd $d 60 | # set up run 61 | cp ../thiophene-coupling-tmp.ipynb ${d}-thiophene-coupling.ipynb 62 | 63 | # convert notebook to python script 64 | jupyter nbconvert --to script ${d}-thiophene-coupling.ipynb 65 | wait 66 | sed -i "s/REPL1/align.cif/g" ${d}-thiophene-coupling.py 67 | if [ -f "align.out" ]; then 68 | gridx=($(grep "np2v" align.out | awk '{print $(NF-7)}')) 69 | gridy=($(grep "np2v" align.out | awk '{print $(NF-4)}')) 70 | gridz=($(grep "np2v" align.out | awk '{print $(NF-1)}')) 71 | sed -i "s/REPLX/${gridx}/g" ${d}-thiophene-coupling.py 72 | sed -i "s/REPLY/${gridy}/g" ${d}-thiophene-coupling.py 73 | sed -i "s/REPLZ/${gridz}/g" ${d}-thiophene-coupling.py 74 | else 75 | echo "Missing DFT output file!" 76 | exit 1 77 | fi 78 | 79 | echo "====== Running Qbox in client-server for ${d} distance =======" 80 | mpirun -np $NCORES $qb -server qb_cdft.in qb_cdft.out & 81 | sleep 10 82 | python -u $d-thiophene-coupling.py > coupling_${d}.out 83 | cd ../ 84 | done 85 | -------------------------------------------------------------------------------- /examples/02-thiophene/thiophene-coupling-tmp.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Prerequisite" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "After compiling the DFT driver and installing PyCDFT, run the ground state calculation.\n", 15 | "- - - - - - -\n", 16 | "For Qbox\n", 17 | "\n", 18 | "```bash\n", 19 | " export qb=\"/path/to/executable\"\n", 20 | " $qb < gs.in > gs.out\n", 21 | "```\n", 22 | "Then in the same directory, run [Qbox in server mode](qboxcode.org/daoc/html/usage/client-server.html) (using interactive queue)\n", 23 | " \n", 24 | "\n", 25 | "```bash\n", 26 | " mpirun -np $qb -server qb_cdft.in qb_cdft.out\n", 27 | "```\n", 28 | "\n", 29 | "where qb_cdft.\\* are files reserved in client-server mode." 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "### Tutorial: coupling constant for thiophene" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": null, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "from pycdft import *\n", 46 | "from ase.io import read" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [ 55 | "cell = read(\"./REPL1\")\n", 56 | "print(r\"Initial atomic positions (Ang):\")\n", 57 | "print(cell.get_positions())\n", 58 | "print(r\"Initial lattice parameters (Ang):\")\n", 59 | "print(cell.get_cell())" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": null, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "V = (-0.8,0.8)\n", 69 | "#V = -0.135568\n", 70 | " \n", 71 | "print(\"==================== Initializing Run =========================\")\n", 72 | "# load sample geometry\n", 73 | "sample = Sample(ase_cell=cell, n1=REPLX, n2=REPLY, n3=REPLZ, vspin=1)\n", 74 | "print(sample.atoms[1])\n", 75 | " \n", 76 | "# load DFT driver\n", 77 | "qboxdriver = QboxDriver(\n", 78 | " sample=sample,\n", 79 | " init_cmd=\"load gs.xml\\n\"\n", 80 | " \"set xc PBE\\n\"\n", 81 | " \"set wf_dyn JD\\n\"\n", 82 | " \"set scf_tol 1.0E-8\\n\",\n", 83 | " scf_cmd=\"run 0 50 5\"\n", 84 | ")\n", 85 | " \n", 86 | "# set up CDFT constraints and solver\n", 87 | "solver1 = CDFTSolver(job=\"scf\", optimizer=\"brentq\",sample=sample, dft_driver=qboxdriver)\n", 88 | "solver2 = solver1.copy()\n", 89 | " \n", 90 | "# add constraint to two solvers\n", 91 | "ChargeTransferConstraint(\n", 92 | " sample=solver1.sample,\n", 93 | " donor=Fragment(solver1.sample, solver1.sample.atoms[0:9]),\n", 94 | " acceptor=Fragment(solver1.sample, solver1.sample.atoms[9:18]),\n", 95 | " V_brak=V,\n", 96 | " #V_init = V,\n", 97 | " N0=1,\n", 98 | " N_tol=5E-5\n", 99 | ")\n", 100 | "ChargeTransferConstraint(\n", 101 | " sample=solver2.sample, \n", 102 | " donor=Fragment(solver2.sample, solver2.sample.atoms[0:9]),\n", 103 | " acceptor=Fragment(solver2.sample, solver2.sample.atoms[9:18]),\n", 104 | " V_brak=V,\n", 105 | " #V_init= -V,\n", 106 | " N0=-1, \n", 107 | " N_tol=5E-5\n", 108 | ")\n", 109 | " \n", 110 | "print(\"~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~\")\n", 111 | "print(\"---- solver A ------\")\n", 112 | "solver1.solve()\n", 113 | "print(\"---- solver B ------\")\n", 114 | "solver2.solve()\n", 115 | " \n", 116 | "print(\"~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~\")\n", 117 | "compute_elcoupling(solver1, solver2)\n", 118 | "#print(\"~~~~~~~~~~~~~~~~~~~~ Calculating coupling (nonsymm comparison) ~~~~~~~~~~~~~~~~~~~~\")\n", 119 | "#compute_elcoupling_nonsymm(solver1, solver2)\n", 120 | " \n", 121 | "print(\"==================== JOB DONE =========================\")" 122 | ] 123 | } 124 | ], 125 | "metadata": { 126 | "anaconda-cloud": {}, 127 | "kernelspec": { 128 | "display_name": "Python 3", 129 | "language": "python", 130 | "name": "python3" 131 | }, 132 | "language_info": { 133 | "codemirror_mode": { 134 | "name": "ipython", 135 | "version": 3 136 | }, 137 | "file_extension": ".py", 138 | "mimetype": "text/x-python", 139 | "name": "python", 140 | "nbconvert_exporter": "python", 141 | "pygments_lexer": "ipython3", 142 | "version": "3.7.0" 143 | } 144 | }, 145 | "nbformat": 4, 146 | "nbformat_minor": 1 147 | } 148 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/README: -------------------------------------------------------------------------------- 1 | This folder contains input files for calculating the coupling between thiophene-thiophene+ dimer 2 | using PyCDFT. 3 | delta*.in 4 | delta*.cif 5 | 6 | where delta indicates the relative rotated angle of two thiophene molecules at 5 Angstrom distance 7 | 8 | This example is configured for Midway 2 at UChicago RCC but can be easily adapted to other machines. 9 | To run this example on Midway 2: 10 | 11 | 1) Run Qbox with external potentials (vext) implemented 12 | >> qsub thio_delta_gs 13 | 14 | 2) Set up CDFT calculation 15 | >> bash ./setup_thio_delta 16 | 17 | 3) Run CDFT calculation 18 | >> qsub thio_delta_pycdft 19 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta0.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | H H5 1 0.188023 0.121549 0.166667 1 32 | H H6 1 0.108311 0.184197 0.166667 1 33 | H H7 1 0.159815 0.024718 0.166667 1 34 | H H8 1 0.020891 0.133909 0.166667 1 35 | C C9 1 0.149087 0.109113 0.000000 1.0 36 | C C10 1 0.105431 0.143425 0.000000 1.0 37 | C C11 1 0.133339 0.055801 0.000000 1.0 38 | C C12 1 0.057348 0.115529 0.000000 1.0 39 | C C13 1 0.149087 0.109113 0.166667 1 40 | C C14 1 0.105431 0.143425 0.166667 1 41 | C C15 1 0.133339 0.055801 0.166667 1 42 | C C16 1 0.057348 0.115529 0.166667 1 43 | S S17 1 0.064651 0.046617 0.000000 1.0 44 | S S18 1 0.064651 0.046617 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta20.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | S S5 1 0.064651 0.046617 0.000000 1.0 32 | C C6 1 0.149087 0.109113 0.000000 1.0 33 | C C7 1 0.105431 0.143425 0.000000 1.0 34 | C C8 1 0.133339 0.055801 0.000000 1.0 35 | C C9 1 0.057348 0.115529 0.000000 1.0 36 | H H10 1 0.177251 0.147286 0.166667 1 37 | H H11 1 0.080920 0.178893 0.166667 1 38 | H H12 1 0.183863 0.046647 0.166667 1 39 | H H13 1 0.015971 0.101739 0.166667 1 40 | C C14 1 0.144917 0.122283 0.166667 1 41 | C C15 1 0.092158 0.139595 0.166667 1 42 | C C16 1 0.148352 0.066800 0.166667 1 43 | C C17 1 0.056516 0.096936 0.166667 1 44 | S S18 1 0.086948 0.034678 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta20.in: -------------------------------------------------------------------------------- 1 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 2 | 3 | species H H_ONCV_PBE-1.0.xml 4 | species C C_ONCV_PBE-1.0.xml 5 | species S S_ONCV_PBE-1.0.xml 6 | 7 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 8 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 9 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 10 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 11 | atom H5 H 8.37389553004007 6.958254548845883 9.448648840154503 12 | atom H6 H 3.822915674895164 8.451468781871233 9.448648840154503 13 | atom H7 H 8.686267235952164 2.203751204731026 9.448648840154503 14 | atom H8 H 0.7545203440898504 4.806470808800777 9.448648840154503 15 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 16 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 17 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 18 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 19 | atom C5 C 6.846335527172297 5.777034076534912 9.448648840154503 20 | atom C6 C 4.353834191386412 6.59490748439187 9.448648840154503 21 | atom C7 C 7.008615746441512 3.155842400926802 9.448648840154503 22 | atom C8 C 2.6699938492631614 4.579561960722163 9.448648840154503 23 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 24 | atom S2 S 4.107697381374005 1.6382979457984976 9.448648840154503 25 | 26 | set net_charge 1 27 | set nspin 2 28 | set xc PBE 29 | set ecut 40 30 | set wf_dyn JD 31 | set scf_tol 1.0E-8 32 | 33 | randomize_wf 34 | 35 | run 0 200 5 36 | 37 | save gs.xml 38 | 39 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta40.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | C C5 1 0.149087 0.109113 0.000000 1.0 32 | C C6 1 0.105431 0.143425 0.000000 1.0 33 | C C7 1 0.133339 0.055801 0.000000 1.0 34 | C C8 1 0.057348 0.115529 0.000000 1.0 35 | S S9 1 0.064651 0.046617 0.000000 1.0 36 | H H10 1 0.158327 0.167788 0.166667 1 37 | H H11 1 0.056994 0.164541 0.166667 1 38 | H H12 1 0.198960 0.075479 0.166667 1 39 | H H13 1 0.022351 0.069825 0.166667 1 40 | C C14 1 0.136494 0.133233 0.166667 1 41 | C C15 1 0.080996 0.131456 0.166667 1 42 | C C16 1 0.158698 0.082271 0.166667 1 43 | C C17 1 0.062093 0.079180 0.166667 1 44 | S S18 1 0.111983 0.031084 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta40.in: -------------------------------------------------------------------------------- 1 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 2 | 3 | species H H_ONCV_PBE-1.0.xml 4 | species C C_ONCV_PBE-1.0.xml 5 | species S S_ONCV_PBE-1.0.xml 6 | 7 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 8 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 9 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 10 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 11 | atom H5 H 7.479866164843381 7.92683360429201 9.448648840154503 12 | atom H6 H 2.6925760748266807 7.7734350971691155 9.448648840154503 13 | atom H7 H 9.399497067191565 3.565865697298714 9.448648840154503 14 | atom H8 H 1.0559316392681886 3.2987529288130832 9.448648840154503 15 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 16 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 17 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 18 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 19 | atom C5 C 6.44840647712729 6.294346565908392 9.448648840154503 20 | atom C6 C 3.826506154273463 6.210395488865773 9.448648840154503 21 | atom C7 C 7.497393373387451 3.8867411701594152 9.448648840154503 22 | atom C8 C 2.9334688952207775 3.740712594391979 9.448648840154503 23 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 24 | atom S2 S 5.2904296344758395 1.4685060657246813 9.448648840154503 25 | 26 | set net_charge 1 27 | set nspin 2 28 | set xc PBE 29 | set ecut 40 30 | set wf_dyn JD 31 | set scf_tol 1.0E-8 32 | 33 | randomize_wf 34 | 35 | run 0 200 5 36 | 37 | save gs.xml 38 | 39 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta60.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | C C5 1 0.149087 0.109113 0.000000 1.0 32 | C C6 1 0.105431 0.143425 0.000000 1.0 33 | C C7 1 0.133339 0.055801 0.000000 1.0 34 | C C8 1 0.057348 0.115529 0.000000 1.0 35 | S S9 1 0.064651 0.046617 0.000000 1.0 36 | H H10 1 0.133531 0.180580 0.166667 1 37 | H H11 1 0.039421 0.142871 0.166667 1 38 | H H12 1 0.203285 0.107735 0.166667 1 39 | H H13 1 0.039261 0.042019 0.166667 1 40 | C C14 1 0.124833 0.140642 0.166667 1 41 | C C15 1 0.073290 0.119991 0.166667 1 42 | C C16 1 0.163129 0.100348 0.166667 1 43 | C C17 1 0.073407 0.064402 0.166667 1 44 | S S18 1 0.136738 0.036270 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta60.in: -------------------------------------------------------------------------------- 1 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 2 | 3 | species H H_ONCV_PBE-1.0.xml 4 | species C C_ONCV_PBE-1.0.xml 5 | species S S_ONCV_PBE-1.0.xml 6 | 7 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 8 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 9 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 10 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 11 | atom H5 H 6.308425024523308 8.53116797543955 9.448648840154503 12 | atom H6 H 1.8623722048942444 6.749676042856485 9.448648840154503 13 | atom H7 H 9.60382368970666 5.089740734488758 9.448648840154503 14 | atom H8 H 1.8548133009399281 1.9851099078524446 9.448648840154503 15 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 16 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 17 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 18 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 19 | atom C5 C 5.897504108306819 6.644371062142923 9.448648840154503 20 | atom C6 C 3.462450442573733 5.66875277738934 9.448648840154503 21 | atom C7 C 7.70672776977228 4.7407555875479455 9.448648840154503 22 | atom C8 C 3.4679778910903263 3.0425533279114956 9.448648840154503 23 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 24 | atom S2 S 6.45993380565762 1.7135090401439386 9.448648840154503 25 | 26 | set net_charge 1 27 | set nspin 2 28 | set xc PBE 29 | set ecut 40 30 | set wf_dyn JD 31 | set scf_tol 1.0E-8 32 | 33 | randomize_wf 34 | 35 | run 0 200 5 36 | 37 | save gs.xml 38 | 39 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta80.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | C C5 1 0.149087 0.109113 0.000000 1.0 32 | C C6 1 0.105431 0.143425 0.000000 1.0 33 | C C7 1 0.133339 0.055801 0.000000 1.0 34 | C C8 1 0.057348 0.115529 0.000000 1.0 35 | S S9 1 0.064651 0.046617 0.000000 1.0 36 | H H10 1 0.105856 0.184120 0.166667 1 37 | H H11 1 0.030318 0.116498 0.166667 1 38 | H H12 1 0.196318 0.139526 0.166667 1 39 | H H13 1 0.064662 0.021673 0.166667 1 40 | C C14 1 0.111342 0.143616 0.166667 1 41 | C C15 1 0.069971 0.106581 0.166667 1 42 | C C16 1 0.161110 0.118850 0.166667 1 43 | C C17 1 0.089093 0.054385 0.166667 1 44 | S S18 1 0.158226 0.049610 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta80.in: -------------------------------------------------------------------------------- 1 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 2 | 3 | species H H_ONCV_PBE-1.0.xml 4 | species C C_ONCV_PBE-1.0.xml 5 | species S S_ONCV_PBE-1.0.xml 6 | 7 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 8 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 9 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 10 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 11 | atom H5 H 5.000970856175265 8.698408725428784 9.448648840154503 12 | atom H6 H 1.4323178130433958 5.503732455436686 9.448648840154503 13 | atom H7 H 9.274680665645928 6.591647707061572 9.448648840154503 14 | atom H8 H 3.0548365468372585 1.023900783761775 9.448648840154503 15 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 16 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 17 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 18 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 19 | atom C5 C 5.260146775508863 6.7848721893937665 9.448648840154503 20 | atom C6 C 3.305650428671397 5.035222139718256 9.448648840154503 21 | atom C7 C 7.61134385049876 5.614848343565126 9.448648840154503 22 | atom C8 C 4.209033937511551 2.5693186972216187 9.448648840154503 23 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 24 | atom S2 S 7.475094606722219 2.3437326573350097 9.448648840154503 25 | 26 | set net_charge 1 27 | set nspin 2 28 | set xc PBE 29 | set ecut 40 30 | set wf_dyn JD 31 | set scf_tol 1.0E-8 32 | 33 | randomize_wf 34 | 35 | run 0 200 5 36 | 37 | save gs.xml 38 | 39 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta90.cif: -------------------------------------------------------------------------------- 1 | # generated using pymatgen 2 | data_H4C4S 3 | _symmetry_space_group_name_H-M 'P 1' 4 | _cell_length_a 25.00000000 5 | _cell_length_b 25.00000000 6 | _cell_length_c 30.00000000 7 | _cell_angle_alpha 90.00000000 8 | _cell_angle_beta 90.00000000 9 | _cell_angle_gamma 90.00000000 10 | _symmetry_Int_Tables_number 1 11 | _chemical_formula_structural H4C4S 12 | _chemical_formula_sum 'H8 C8 S2' 13 | _cell_volume 18750.00000000 14 | _cell_formula_units_Z 2 15 | loop_ 16 | _symmetry_equiv_pos_site_id 17 | _symmetry_equiv_pos_as_xyz 18 | 1 'x, y, z' 19 | loop_ 20 | _atom_site_type_symbol 21 | _atom_site_label 22 | _atom_site_symmetry_multiplicity 23 | _atom_site_fract_x 24 | _atom_site_fract_y 25 | _atom_site_fract_z 26 | _atom_site_occupancy 27 | H H1 1 0.188023 0.121549 0.000000 1.0 28 | H H2 1 0.108311 0.184197 0.000000 1.0 29 | H H3 1 0.159815 0.024718 0.000000 1.0 30 | H H4 1 0.020891 0.133909 0.000000 1.0 31 | C C5 1 0.149087 0.109113 0.000000 1.0 32 | C C6 1 0.105431 0.143425 0.000000 1.0 33 | C C7 1 0.133339 0.055801 0.000000 1.0 34 | C C8 1 0.057348 0.115529 0.000000 1.0 35 | S S9 1 0.064651 0.046617 0.000000 1.0 36 | H H10 1 0.091979 0.182241 0.166667 1 37 | H H11 1 0.029331 0.102529 0.166667 1 38 | H H12 1 0.188810 0.154033 0.166667 1 39 | H H13 1 0.079619 0.015109 0.166667 1 40 | C C14 1 0.104415 0.143305 0.166667 1 41 | C C15 1 0.070103 0.099649 0.166667 1 42 | C C16 1 0.157727 0.127557 0.166667 1 43 | C C17 1 0.097999 0.051566 0.166667 1 44 | S S18 1 0.166911 0.058869 0.166667 1 45 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/delta90.in: -------------------------------------------------------------------------------- 1 | 2 | set cell 47.243149714473084 0.0 0.0 0.0 47.243149714473084 0.0 0.0 0.0 56.691779657367704 3 | 4 | species H H_ONCV_PBE-1.0.xml 5 | species C C_ONCV_PBE-1.0.xml 6 | species S S_ONCV_PBE-1.0.xml 7 | 8 | atom H1 H 8.882798738764373 5.742357604644488 8.955325451492634e-16 9 | atom H2 H 5.116952788724296 8.702046447956798 8.461696591310609e-16 10 | atom H3 H 7.550163971618516 1.1677561746423457 5.338186501170295e-16 11 | atom H4 H 0.9869566406850583 6.326282935115376 4.478067718950874e-16 12 | atom C1 C 7.043339461481649 5.154841794795302 7.469231815459404e-16 13 | atom C2 C 4.980892517546612 6.775848747798301 7.198927779504126e-16 14 | atom C3 C 6.299354339778128 2.636214997217313 5.471458193555351e-16 15 | atom C4 C 2.7093001498256033 5.457953843363361 5.001000730291152e-16 16 | atom S1 S 3.0543168721903995 2.2023339102395916 3.2187702774691594e-16 17 | atom H5 H 4.345377667587521 8.609638847115288 9.448648840154503 18 | atom H6 H 1.3856888242752108 4.843792897075211 9.448648840154503 19 | atom H7 H 8.919979097589664 7.277004079969433 9.448648840154503 20 | atom H8 H 3.7614523371166326 0.7137967490359738 9.448648840154503 21 | atom C5 C 4.932893477436708 6.770179569832565 9.448648840154503 22 | atom C6 C 3.3118865244337075 4.7077326258975285 9.448648840154503 23 | atom C7 C 7.451520275014697 6.0261944481290435 9.448648840154503 24 | atom C8 C 4.6297814288686485 2.4361402581765192 9.448648840154503 25 | atom S2 S 7.885401361992416 2.781156980541316 9.448648840154503 26 | 27 | 28 | 29 | set net_charge 1 30 | set nspin 2 31 | set xc PBE 32 | set ecut 40 33 | set wf_dyn JD 34 | set scf_tol 1.0E-8 35 | 36 | randomize_wf 37 | 38 | run 0 200 5 39 | 40 | save gs.xml 41 | 42 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/setup_thio_delta: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #------------------------------------------------ 4 | # Set up or rerun calculation: 5 | # Thiophene coupling as a function of angular difference at 5 Ang distance 6 | # 7 | # generates jupyter notebook for interactive sessions 8 | # and python script for job submission to queue 9 | # including for restarting interupted PyCDFT calculations 10 | # 11 | # A run for the initial ground state wavefunctions is needed first 12 | #------------------------------------------------ 13 | 14 | # input parameters 15 | tol=5e-5 # CDFT tolerance 16 | Vstart_a="V_brak = V" 17 | Vstart_b="V_brak = V" # CDFT constraint potential 18 | optimizer="brenth" 19 | inputs=$( ls *.in ) 20 | 21 | main () { 22 | for inp in ${inputs[@]}; do 23 | IFS='.' read -ra name <<< $inp 24 | fol=$name 25 | 26 | cd ${fol} 27 | # convert notebook to python script 28 | cp ../thiophene-coupling-tmp.ipynb ./${name}-thiophene-coupling.ipynb 29 | jupyter nbconvert --to script ${name}-thiophene-coupling.ipynb 30 | cp ../${name}.cif . 31 | 32 | # 33 | sed -i "s/REPL1/${name}.cif/g" ${name}-thiophene-coupling.py 34 | if [ -f ${name}.out ]; then 35 | grid=($(grep "np2v" ${name}.out | awk '{print $(NF-7),$(NF-4),$(NF-1)}')) 36 | sed -i "s/REPLX/${grid[0]}/g" ${name}-thiophene-coupling.py 37 | sed -i "s/REPLY/${grid[1]}/g" ${name}-thiophene-coupling.py 38 | sed -i "s/REPLZ/${grid[2]}/g" ${name}-thiophene-coupling.py 39 | else 40 | echo "Missing DFT output file!" 41 | exit 1 42 | fi 43 | 44 | sed -i "s/REPLOPT_A/${optimizer}/g" ${name}-thiophene-coupling.py 45 | sed -i "s/REPL_TOL/${tol}/g" ${name}-thiophene-coupling.py 46 | sed -i "s/REPLV_START_A/${Vstart_a}/g" ${name}-thiophene-coupling.py 47 | sed -i "s/REPLV_START_B/${Vstart_b}/g" ${name}-thiophene-coupling.py 48 | 49 | 50 | echo "====== Done setup: ${name} =======" 51 | cd ../ 52 | done 53 | } 54 | 55 | # actual running set up 56 | main 57 | exit 58 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/thio_delta_gs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --partition=gagalli-ivyb 3 | #SBATCH --mail-type=FAIL,END 4 | #SBATCH --time=2:00:00 5 | #SBATCH --ntasks-per-node=20 6 | #SBATCH --nodes=4 7 | 8 | #------------------------------------------------ 9 | # Thiophene coupling as a function of angular difference at 5 Ang distance 10 | 11 | # It is needed to have good starting wavefunctions corresponding to the 12 | # starting geometry of the CDFT run 13 | 14 | # This is a short script for running the ground-state calculations in Qbox 15 | # for a set of bond distances for the thiophene dimer electron coupling example 16 | 17 | # requires a modified version of Qbox that can handle external potentials 18 | #------------------------------------------------ 19 | 20 | NCORES=$(($SLURM_NTASKS_PER_NODE * $SLURM_JOB_NUM_NODES)) 21 | 22 | #TODO: substitute the appropriate path of the Qbox executable 23 | export qb="/path/to/executable/qb" 24 | 25 | inputs=$( ls *.in ) 26 | 27 | # run gs calculation in Qbox 28 | for inp in ${inputs[@]}; do 29 | IFS='.' read -ra name <<< $inp 30 | fol=$name 31 | 32 | mkdir $fol 33 | cd $fol 34 | 35 | cp ../{${fol}.in,${fol}.cif,*1.0.xml} . 36 | 37 | echo "=== Running Qbox ====" 38 | mpirun -np $NCORES $qb < ${name}.in > ${name}.out 39 | 40 | cd ../ 41 | done 42 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/thio_delta_pycdft: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --partition=gagalli-ivyb 3 | #SBATCH --mail-type=FAIL,END 4 | #SBATCH --time=06:00:00 5 | #SBATCH --ntasks-per-node=20 6 | #SBATCH --nodes=4 7 | 8 | #------------------------------------------------ 9 | # Thiophene coupling as a function of angular difference at 5 Ang distance 10 | 11 | # This is a wrapper for running PyCDFT with Qbox 12 | # It is needed to have good starting wavefunctions corresponding to the 13 | # starting geometry of the CDFT run 14 | 15 | # This is a short script for running PyCDFT 16 | # for a set of bond distances for the thiophene dimer electron coupling 17 | 18 | # requires a modified version of Qbox that can handle external potentials 19 | #------------------------------------------------ 20 | 21 | NCORES=$(($SLURM_NTASKS_PER_NODE * $SLURM_JOB_NUM_NODES)) 22 | 23 | # TODO: substitute the appropriate path of the Qbox executable 24 | #export qb="/path/to/executable/qb" 25 | export qb="/home/wwwennie/bin/qbox-1.67.4/bin/qb" 26 | 27 | inputs=$( ls *.in ) 28 | 29 | # run PyCDFT 30 | for inp in ${inputs[@]}; do 31 | IFS='.' read -ra name <<< $inp 32 | fol=$name 33 | 34 | cd ${fol} 35 | echo "====== Running Qbox in client-server for ${name} =======" 36 | mpirun -np $NCORES $qb -server qb_cdft.in qb_cdft.out & 37 | sleep 10 38 | python -u ${name}-thiophene-coupling.py > coupling_${name}.out 39 | wait 40 | cd ../ 41 | done 42 | 43 | -------------------------------------------------------------------------------- /examples/03-thiophene-rotated/thiophene-coupling-tmp.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Prerequisite" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "After compiling the DFT driver and installing PyCDFT, run the ground state calculation.\n", 15 | "- - - - - - -\n", 16 | "For Qbox\n", 17 | "\n", 18 | "```bash\n", 19 | " export qb=\"/path/to/executable\"\n", 20 | " $qb < gs.in > gs.out\n", 21 | "```\n", 22 | "Then in the same directory, run [Qbox in server mode](qboxcode.org/daoc/html/usage/client-server.html) (using interactive queue)\n", 23 | " \n", 24 | "\n", 25 | "```bash\n", 26 | " mpirun -np $qb -server qb_cdft.in qb_cdft.out\n", 27 | "```\n", 28 | "\n", 29 | "where qb_cdft.\\* are files reserved in client-server mode." 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "### Tutorial: coupling constant for thiophene" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": null, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "from pycdft import *\n", 46 | "from ase.io import read" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [ 55 | "cell = read(\"./REPL1\")\n", 56 | "print(r\"Initial atomic positions (Ang):\")\n", 57 | "print(cell.get_positions())\n", 58 | "print(r\"Initial lattice parameters (Ang):\")\n", 59 | "print(cell.get_cell())" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": null, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "V = (-0.2,0.2)\n", 69 | " \n", 70 | "print(\"==================== Initializing Run =========================\")\n", 71 | "# load sample geometry\n", 72 | "sample = Sample(ase_cell=cell, n1=REPLX, n2=REPLY, n3=REPLZ, vspin=1)\n", 73 | "print(sample.atoms[1])\n", 74 | " \n", 75 | "# load DFT driver\n", 76 | "qboxdriver = QboxDriver(\n", 77 | " sample=sample,\n", 78 | " init_cmd=\"load gs.xml\\n\"\n", 79 | " \"set xc PBE\\n\"\n", 80 | " \"set wf_dyn JD\\n\"\n", 81 | " \"set scf_tol 1.0E-8\\n\",\n", 82 | " scf_cmd=\"run 0 50 5\"\n", 83 | ")\n", 84 | " \n", 85 | "# set up CDFT constraints and solver\n", 86 | "solver1 = CDFTSolver(job=\"scf\", optimizer=\"REPLOPT_A\",sample=sample, dft_driver=qboxdriver)\n", 87 | "solver2 = solver1.copy() \n", 88 | " \n", 89 | "# add constraint to two solvers\n", 90 | "ChargeTransferConstraint(\n", 91 | " sample=solver1.sample,\n", 92 | " donor=Fragment(solver1.sample, solver1.sample.atoms[0:9]),\n", 93 | " acceptor=Fragment(solver1.sample, solver1.sample.atoms[9:18]),\n", 94 | " REPLV_START_A ,\n", 95 | " N0=1,\n", 96 | " N_tol=REPL_TOL\n", 97 | ")\n", 98 | "ChargeTransferConstraint(\n", 99 | " sample=solver2.sample, \n", 100 | " donor=Fragment(solver2.sample, solver2.sample.atoms[0:9]),\n", 101 | " acceptor=Fragment(solver2.sample, solver2.sample.atoms[9:18]),\n", 102 | " REPLV_START_B ,\n", 103 | " N0=-1, \n", 104 | " N_tol=REPL_TOL\n", 105 | ")\n", 106 | " \n", 107 | "print(\"~~~~~~~~~~~~~~~~~~~~ Applying CDFT ~~~~~~~~~~~~~~~~~~~~\")\n", 108 | "print(\"---- solver A ------\")\n", 109 | "solver1.solve()\n", 110 | "print(\"---- solver B ------\")\n", 111 | "solver2.solve()\n", 112 | " \n", 113 | "print(\"~~~~~~~~~~~~~~~~~~~~ Calculating coupling ~~~~~~~~~~~~~~~~~~~~\")\n", 114 | "compute_elcoupling(solver1, solver2)\n", 115 | " \n", 116 | "print(\"==================== JOB DONE =========================\")" 117 | ] 118 | } 119 | ], 120 | "metadata": { 121 | "anaconda-cloud": {}, 122 | "kernelspec": { 123 | "display_name": "Python 3", 124 | "language": "python", 125 | "name": "python3" 126 | }, 127 | "language_info": { 128 | "codemirror_mode": { 129 | "name": "ipython", 130 | "version": 3 131 | }, 132 | "file_extension": ".py", 133 | "mimetype": "text/x-python", 134 | "name": "python", 135 | "nbconvert_exporter": "python", 136 | "pygments_lexer": "ipython3", 137 | "version": "3.7.0" 138 | } 139 | }, 140 | "nbformat": 4, 141 | "nbformat_minor": 1 142 | } 143 | -------------------------------------------------------------------------------- /pycdft/__init__.py: -------------------------------------------------------------------------------- 1 | from .common import * 2 | from .dft_driver import * 3 | from .constraint import * 4 | from .cdft import CDFTSolver 5 | from .elcoupling import * 6 | from .debug import * 7 | -------------------------------------------------------------------------------- /pycdft/atomic/README: -------------------------------------------------------------------------------- 1 | The following *.spavr files are spherically averaged charge density for an isolated atom. 2 | They are generated using the QE + westpp code (http://www.west-code.org/doc/INPUT_WESTPP.html). 3 | Based on PBE wavefunctions of ONCV pseudopotentials. 4 | Post-processing through WEST interface for charge density. 5 | 6 | A note from He (Sept 2018): 7 | Note that there was a bug in westpp code that incorrectly treats the G=0 component of rho, 8 | and will lead to negative tails of radial density. So if somehow you cannot reproduce my 9 | sesults with exactly the same input file, maybe you can ask Marco if he has already merged 10 | the bug fix into the trunk of the westpp repo. 11 | -------------------------------------------------------------------------------- /pycdft/atomic/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | rho_path = "{}/rho/".format(os.path.dirname(os.path.abspath(__file__))) 4 | rd_grid = np.linspace(0, 5, 251) 5 | drd = 0.02 6 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/B.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 4.774685E+02 3 | 2.000000E-02 4.830800E+02 4 | 4.000000E-02 4.998792E+02 5 | 6.000000E-02 5.277611E+02 6 | 8.000000E-02 5.665513E+02 7 | 1.000000E-01 6.160080E+02 8 | 1.200000E-01 6.758238E+02 9 | 1.400000E-01 7.456284E+02 10 | 1.600000E-01 8.249918E+02 11 | 1.800000E-01 9.134274E+02 12 | 2.000000E-01 1.010397E+03 13 | 2.200000E-01 1.115313E+03 14 | 2.400000E-01 1.227547E+03 15 | 2.600000E-01 1.346429E+03 16 | 2.800000E-01 1.471259E+03 17 | 3.000000E-01 1.601306E+03 18 | 3.200000E-01 1.735818E+03 19 | 3.400000E-01 1.874026E+03 20 | 3.600000E-01 2.015147E+03 21 | 3.800000E-01 2.158395E+03 22 | 4.000000E-01 2.302981E+03 23 | 4.200000E-01 2.448119E+03 24 | 4.400000E-01 2.593036E+03 25 | 4.600000E-01 2.736970E+03 26 | 4.800000E-01 2.879181E+03 27 | 5.000000E-01 3.018952E+03 28 | 5.200000E-01 3.155596E+03 29 | 5.400000E-01 3.288456E+03 30 | 5.600000E-01 3.416915E+03 31 | 5.800000E-01 3.540394E+03 32 | 6.000000E-01 3.658358E+03 33 | 6.200000E-01 3.770320E+03 34 | 6.400000E-01 3.875841E+03 35 | 6.600000E-01 3.974530E+03 36 | 6.800000E-01 4.066054E+03 37 | 7.000000E-01 4.150129E+03 38 | 7.200000E-01 4.226528E+03 39 | 7.400000E-01 4.295075E+03 40 | 7.600000E-01 4.355652E+03 41 | 7.800000E-01 4.408190E+03 42 | 8.000000E-01 4.452673E+03 43 | 8.200000E-01 4.489134E+03 44 | 8.400000E-01 4.517656E+03 45 | 8.600000E-01 4.538361E+03 46 | 8.800000E-01 4.551418E+03 47 | 9.000000E-01 4.557031E+03 48 | 9.200000E-01 4.555439E+03 49 | 9.400000E-01 4.546912E+03 50 | 9.600000E-01 4.531746E+03 51 | 9.800000E-01 4.510260E+03 52 | 1.000000E+00 4.482792E+03 53 | 1.020000E+00 4.449693E+03 54 | 1.040000E+00 4.411327E+03 55 | 1.060000E+00 4.368063E+03 56 | 1.080000E+00 4.320273E+03 57 | 1.100000E+00 4.268331E+03 58 | 1.120000E+00 4.212606E+03 59 | 1.140000E+00 4.153462E+03 60 | 1.160000E+00 4.091253E+03 61 | 1.180000E+00 4.026325E+03 62 | 1.200000E+00 3.959009E+03 63 | 1.220000E+00 3.889623E+03 64 | 1.240000E+00 3.818470E+03 65 | 1.260000E+00 3.745836E+03 66 | 1.280000E+00 3.671992E+03 67 | 1.300000E+00 3.597190E+03 68 | 1.320000E+00 3.521666E+03 69 | 1.340000E+00 3.445637E+03 70 | 1.360000E+00 3.369306E+03 71 | 1.380000E+00 3.292857E+03 72 | 1.400000E+00 3.216459E+03 73 | 1.420000E+00 3.140267E+03 74 | 1.440000E+00 3.064420E+03 75 | 1.460000E+00 2.989045E+03 76 | 1.480000E+00 2.914254E+03 77 | 1.500000E+00 2.840150E+03 78 | 1.520000E+00 2.766824E+03 79 | 1.540000E+00 2.694357E+03 80 | 1.560000E+00 2.622819E+03 81 | 1.580000E+00 2.552276E+03 82 | 1.600000E+00 2.482781E+03 83 | 1.620000E+00 2.414384E+03 84 | 1.640000E+00 2.347127E+03 85 | 1.660000E+00 2.281047E+03 86 | 1.680000E+00 2.216175E+03 87 | 1.700000E+00 2.152537E+03 88 | 1.720000E+00 2.090156E+03 89 | 1.740000E+00 2.029049E+03 90 | 1.760000E+00 1.969230E+03 91 | 1.780000E+00 1.910711E+03 92 | 1.800000E+00 1.853498E+03 93 | 1.820000E+00 1.797597E+03 94 | 1.840000E+00 1.743008E+03 95 | 1.860000E+00 1.689730E+03 96 | 1.880000E+00 1.637761E+03 97 | 1.900000E+00 1.587093E+03 98 | 1.920000E+00 1.537718E+03 99 | 1.940000E+00 1.489627E+03 100 | 1.960000E+00 1.442806E+03 101 | 1.980000E+00 1.397243E+03 102 | 2.000000E+00 1.352920E+03 103 | 2.020000E+00 1.309821E+03 104 | 2.040000E+00 1.267928E+03 105 | 2.060000E+00 1.227220E+03 106 | 2.080000E+00 1.187676E+03 107 | 2.100000E+00 1.149276E+03 108 | 2.120000E+00 1.111996E+03 109 | 2.140000E+00 1.075813E+03 110 | 2.160000E+00 1.040705E+03 111 | 2.180000E+00 1.006646E+03 112 | 2.200000E+00 9.736136E+02 113 | 2.220000E+00 9.415828E+02 114 | 2.240000E+00 9.105295E+02 115 | 2.260000E+00 8.804295E+02 116 | 2.280000E+00 8.512589E+02 117 | 2.300000E+00 8.229938E+02 118 | 2.320000E+00 7.956107E+02 119 | 2.340000E+00 7.690864E+02 120 | 2.360000E+00 7.433981E+02 121 | 2.380000E+00 7.185232E+02 122 | 2.400000E+00 6.944397E+02 123 | 2.420000E+00 6.711258E+02 124 | 2.440000E+00 6.485603E+02 125 | 2.460000E+00 6.267224E+02 126 | 2.480000E+00 6.055914E+02 127 | 2.500000E+00 5.851475E+02 128 | 2.520000E+00 5.653708E+02 129 | 2.540000E+00 5.462422E+02 130 | 2.560000E+00 5.277426E+02 131 | 2.580000E+00 5.098537E+02 132 | 2.600000E+00 4.925571E+02 133 | 2.620000E+00 4.758352E+02 134 | 2.640000E+00 4.596704E+02 135 | 2.660000E+00 4.440456E+02 136 | 2.680000E+00 4.289442E+02 137 | 2.700000E+00 4.143498E+02 138 | 2.720000E+00 4.002463E+02 139 | 2.740000E+00 3.866181E+02 140 | 2.760000E+00 3.734500E+02 141 | 2.780000E+00 3.607271E+02 142 | 2.800000E+00 3.484349E+02 143 | 2.820000E+00 3.365593E+02 144 | 2.840000E+00 3.250865E+02 145 | 2.860000E+00 3.140033E+02 146 | 2.880000E+00 3.032968E+02 147 | 2.900000E+00 2.929543E+02 148 | 2.920000E+00 2.829639E+02 149 | 2.940000E+00 2.733137E+02 150 | 2.960000E+00 2.639923E+02 151 | 2.980000E+00 2.549889E+02 152 | 3.000000E+00 2.462928E+02 153 | 3.020000E+00 2.378938E+02 154 | 3.040000E+00 2.297819E+02 155 | 3.060000E+00 2.219475E+02 156 | 3.080000E+00 2.143815E+02 157 | 3.100000E+00 2.070748E+02 158 | 3.120000E+00 2.000189E+02 159 | 3.140000E+00 1.932053E+02 160 | 3.160000E+00 1.866260E+02 161 | 3.180000E+00 1.802730E+02 162 | 3.200000E+00 1.741389E+02 163 | 3.220000E+00 1.682162E+02 164 | 3.240000E+00 1.624978E+02 165 | 3.260000E+00 1.569767E+02 166 | 3.280000E+00 1.516462E+02 167 | 3.300000E+00 1.464999E+02 168 | 3.320000E+00 1.415314E+02 169 | 3.340000E+00 1.367345E+02 170 | 3.360000E+00 1.321033E+02 171 | 3.380000E+00 1.276320E+02 172 | 3.400000E+00 1.233152E+02 173 | 3.420000E+00 1.191472E+02 174 | 3.440000E+00 1.151230E+02 175 | 3.460000E+00 1.112375E+02 176 | 3.480000E+00 1.074858E+02 177 | 3.500000E+00 1.038632E+02 178 | 3.520000E+00 1.003651E+02 179 | 3.540000E+00 9.698720E+01 180 | 3.560000E+00 9.372524E+01 181 | 3.580000E+00 9.057516E+01 182 | 3.600000E+00 8.753306E+01 183 | 3.620000E+00 8.459517E+01 184 | 3.640000E+00 8.175788E+01 185 | 3.660000E+00 7.901769E+01 186 | 3.680000E+00 7.637126E+01 187 | 3.700000E+00 7.381536E+01 188 | 3.720000E+00 7.134688E+01 189 | 3.740000E+00 6.896282E+01 190 | 3.760000E+00 6.666029E+01 191 | 3.780000E+00 6.443651E+01 192 | 3.800000E+00 6.228878E+01 193 | 3.820000E+00 6.021451E+01 194 | 3.840000E+00 5.821118E+01 195 | 3.860000E+00 5.627635E+01 196 | 3.880000E+00 5.440768E+01 197 | 3.900000E+00 5.260289E+01 198 | 3.920000E+00 5.085977E+01 199 | 3.940000E+00 4.917617E+01 200 | 3.960000E+00 4.755003E+01 201 | 3.980000E+00 4.597935E+01 202 | 4.000000E+00 4.446217E+01 203 | 4.020000E+00 4.299662E+01 204 | 4.040000E+00 4.158089E+01 205 | 4.060000E+00 4.021321E+01 206 | 4.080000E+00 3.889189E+01 207 | 4.100000E+00 3.761529E+01 208 | 4.120000E+00 3.638183E+01 209 | 4.140000E+00 3.518999E+01 210 | 4.160000E+00 3.403831E+01 211 | 4.180000E+00 3.292537E+01 212 | 4.200000E+00 3.184983E+01 213 | 4.220000E+00 3.081037E+01 214 | 4.240000E+00 2.980575E+01 215 | 4.260000E+00 2.883476E+01 216 | 4.280000E+00 2.789625E+01 217 | 4.300000E+00 2.698911E+01 218 | 4.320000E+00 2.611227E+01 219 | 4.340000E+00 2.526470E+01 220 | 4.360000E+00 2.444543E+01 221 | 4.380000E+00 2.365349E+01 222 | 4.400000E+00 2.288797E+01 223 | 4.420000E+00 2.214798E+01 224 | 4.440000E+00 2.143267E+01 225 | 4.460000E+00 2.074121E+01 226 | 4.480000E+00 2.007281E+01 227 | 4.500000E+00 1.942668E+01 228 | 4.520000E+00 1.880207E+01 229 | 4.540000E+00 1.819826E+01 230 | 4.560000E+00 1.761455E+01 231 | 4.580000E+00 1.705023E+01 232 | 4.600000E+00 1.650466E+01 233 | 4.620000E+00 1.597718E+01 234 | 4.640000E+00 1.546718E+01 235 | 4.660000E+00 1.497404E+01 236 | 4.680000E+00 1.449718E+01 237 | 4.700000E+00 1.403603E+01 238 | 4.720000E+00 1.359005E+01 239 | 4.740000E+00 1.315872E+01 240 | 4.760000E+00 1.274151E+01 241 | 4.780000E+00 1.233794E+01 242 | 4.800000E+00 1.194755E+01 243 | 4.820000E+00 1.156987E+01 244 | 4.840000E+00 1.120447E+01 245 | 4.860000E+00 1.085094E+01 246 | 4.880000E+00 1.050888E+01 247 | 4.900000E+00 1.017790E+01 248 | 4.920000E+00 9.857625E+00 249 | 4.940000E+00 9.547712E+00 250 | 4.960000E+00 9.247817E+00 251 | 4.980000E+00 8.957612E+00 252 | 5.000000E+00 8.676784E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/C.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 2.051532E+03 3 | 2.000000E-02 2.083273E+03 4 | 4.000000E-02 2.178001E+03 5 | 6.000000E-02 2.334243E+03 6 | 8.000000E-02 2.549585E+03 7 | 1.000000E-01 2.820726E+03 8 | 1.200000E-01 3.143558E+03 9 | 1.400000E-01 3.513255E+03 10 | 1.600000E-01 3.924392E+03 11 | 1.800000E-01 4.371056E+03 12 | 2.000000E-01 4.846978E+03 13 | 2.200000E-01 5.345667E+03 14 | 2.400000E-01 5.860535E+03 15 | 2.600000E-01 6.385030E+03 16 | 2.800000E-01 6.912754E+03 17 | 3.000000E-01 7.437570E+03 18 | 3.200000E-01 7.953703E+03 19 | 3.400000E-01 8.455821E+03 20 | 3.600000E-01 8.939098E+03 21 | 3.800000E-01 9.399269E+03 22 | 4.000000E-01 9.832657E+03 23 | 4.200000E-01 1.023619E+04 24 | 4.400000E-01 1.060742E+04 25 | 4.600000E-01 1.094446E+04 26 | 4.800000E-01 1.124603E+04 27 | 5.000000E-01 1.151135E+04 28 | 5.200000E-01 1.174017E+04 29 | 5.400000E-01 1.193263E+04 30 | 5.600000E-01 1.208931E+04 31 | 5.800000E-01 1.221108E+04 32 | 6.000000E-01 1.229912E+04 33 | 6.200000E-01 1.235482E+04 34 | 6.400000E-01 1.237973E+04 35 | 6.600000E-01 1.237556E+04 36 | 6.800000E-01 1.234407E+04 37 | 7.000000E-01 1.228710E+04 38 | 7.200000E-01 1.220649E+04 39 | 7.400000E-01 1.210409E+04 40 | 7.600000E-01 1.198171E+04 41 | 7.800000E-01 1.184111E+04 42 | 8.000000E-01 1.168400E+04 43 | 8.200000E-01 1.151203E+04 44 | 8.400000E-01 1.132677E+04 45 | 8.600000E-01 1.112973E+04 46 | 8.800000E-01 1.092234E+04 47 | 9.000000E-01 1.070594E+04 48 | 9.200000E-01 1.048181E+04 49 | 9.400000E-01 1.025116E+04 50 | 9.600000E-01 1.001512E+04 51 | 9.800000E-01 9.774752E+03 52 | 1.000000E+00 9.531062E+03 53 | 1.020000E+00 9.284977E+03 54 | 1.040000E+00 9.037368E+03 55 | 1.060000E+00 8.789040E+03 56 | 1.080000E+00 8.540741E+03 57 | 1.100000E+00 8.293158E+03 58 | 1.120000E+00 8.046923E+03 59 | 1.140000E+00 7.802609E+03 60 | 1.160000E+00 7.560739E+03 61 | 1.180000E+00 7.321782E+03 62 | 1.200000E+00 7.086157E+03 63 | 1.220000E+00 6.854238E+03 64 | 1.240000E+00 6.626349E+03 65 | 1.260000E+00 6.402777E+03 66 | 1.280000E+00 6.183763E+03 67 | 1.300000E+00 5.969514E+03 68 | 1.320000E+00 5.760199E+03 69 | 1.340000E+00 5.555958E+03 70 | 1.360000E+00 5.356895E+03 71 | 1.380000E+00 5.163092E+03 72 | 1.400000E+00 4.974600E+03 73 | 1.420000E+00 4.791451E+03 74 | 1.440000E+00 4.613653E+03 75 | 1.460000E+00 4.441196E+03 76 | 1.480000E+00 4.274053E+03 77 | 1.500000E+00 4.112181E+03 78 | 1.520000E+00 3.955522E+03 79 | 1.540000E+00 3.804008E+03 80 | 1.560000E+00 3.657559E+03 81 | 1.580000E+00 3.516086E+03 82 | 1.600000E+00 3.379493E+03 83 | 1.620000E+00 3.247676E+03 84 | 1.640000E+00 3.120526E+03 85 | 1.660000E+00 2.997930E+03 86 | 1.680000E+00 2.879770E+03 87 | 1.700000E+00 2.765928E+03 88 | 1.720000E+00 2.656283E+03 89 | 1.740000E+00 2.550711E+03 90 | 1.760000E+00 2.449091E+03 91 | 1.780000E+00 2.351300E+03 92 | 1.800000E+00 2.257216E+03 93 | 1.820000E+00 2.166719E+03 94 | 1.840000E+00 2.079692E+03 95 | 1.860000E+00 1.996015E+03 96 | 1.880000E+00 1.915577E+03 97 | 1.900000E+00 1.838264E+03 98 | 1.920000E+00 1.763967E+03 99 | 1.940000E+00 1.692579E+03 100 | 1.960000E+00 1.623998E+03 101 | 1.980000E+00 1.558122E+03 102 | 2.000000E+00 1.494853E+03 103 | 2.020000E+00 1.434097E+03 104 | 2.040000E+00 1.375762E+03 105 | 2.060000E+00 1.319759E+03 106 | 2.080000E+00 1.266002E+03 107 | 2.100000E+00 1.214406E+03 108 | 2.120000E+00 1.164892E+03 109 | 2.140000E+00 1.117381E+03 110 | 2.160000E+00 1.071798E+03 111 | 2.180000E+00 1.028068E+03 112 | 2.200000E+00 9.861211E+02 113 | 2.220000E+00 9.458881E+02 114 | 2.240000E+00 9.073025E+02 115 | 2.260000E+00 8.702998E+02 116 | 2.280000E+00 8.348173E+02 117 | 2.300000E+00 8.007947E+02 118 | 2.320000E+00 7.681734E+02 119 | 2.340000E+00 7.368970E+02 120 | 2.360000E+00 7.069107E+02 121 | 2.380000E+00 6.781618E+02 122 | 2.400000E+00 6.505994E+02 123 | 2.420000E+00 6.241746E+02 124 | 2.440000E+00 5.988400E+02 125 | 2.460000E+00 5.745503E+02 126 | 2.480000E+00 5.512618E+02 127 | 2.500000E+00 5.289327E+02 128 | 2.520000E+00 5.075229E+02 129 | 2.540000E+00 4.869937E+02 130 | 2.560000E+00 4.673084E+02 131 | 2.580000E+00 4.484318E+02 132 | 2.600000E+00 4.303301E+02 133 | 2.620000E+00 4.129712E+02 134 | 2.640000E+00 3.963242E+02 135 | 2.660000E+00 3.803599E+02 136 | 2.680000E+00 3.650501E+02 137 | 2.700000E+00 3.503679E+02 138 | 2.720000E+00 3.362878E+02 139 | 2.740000E+00 3.227852E+02 140 | 2.760000E+00 3.098365E+02 141 | 2.780000E+00 2.974193E+02 142 | 2.800000E+00 2.855119E+02 143 | 2.820000E+00 2.740936E+02 144 | 2.840000E+00 2.631446E+02 145 | 2.860000E+00 2.526457E+02 146 | 2.880000E+00 2.425785E+02 147 | 2.900000E+00 2.329252E+02 148 | 2.920000E+00 2.236688E+02 149 | 2.940000E+00 2.147929E+02 150 | 2.960000E+00 2.062816E+02 151 | 2.980000E+00 1.981196E+02 152 | 3.000000E+00 1.902924E+02 153 | 3.020000E+00 1.827856E+02 154 | 3.040000E+00 1.755858E+02 155 | 3.060000E+00 1.686799E+02 156 | 3.080000E+00 1.620553E+02 157 | 3.100000E+00 1.557000E+02 158 | 3.120000E+00 1.496024E+02 159 | 3.140000E+00 1.437517E+02 160 | 3.160000E+00 1.381371E+02 161 | 3.180000E+00 1.327487E+02 162 | 3.200000E+00 1.275769E+02 163 | 3.220000E+00 1.226124E+02 164 | 3.240000E+00 1.178467E+02 165 | 3.260000E+00 1.132714E+02 166 | 3.280000E+00 1.088786E+02 167 | 3.300000E+00 1.046609E+02 168 | 3.320000E+00 1.006110E+02 169 | 3.340000E+00 9.672222E+01 170 | 3.360000E+00 9.298801E+01 171 | 3.380000E+00 8.940222E+01 172 | 3.400000E+00 8.595892E+01 173 | 3.420000E+00 8.265248E+01 174 | 3.440000E+00 7.947746E+01 175 | 3.460000E+00 7.642868E+01 176 | 3.480000E+00 7.350114E+01 177 | 3.500000E+00 7.069004E+01 178 | 3.520000E+00 6.799075E+01 179 | 3.540000E+00 6.539880E+01 180 | 3.560000E+00 6.290989E+01 181 | 3.580000E+00 6.051984E+01 182 | 3.600000E+00 5.822463E+01 183 | 3.620000E+00 5.602037E+01 184 | 3.640000E+00 5.390332E+01 185 | 3.660000E+00 5.186985E+01 186 | 3.680000E+00 4.991647E+01 187 | 3.700000E+00 4.803981E+01 188 | 3.720000E+00 4.623665E+01 189 | 3.740000E+00 4.450388E+01 190 | 3.760000E+00 4.283854E+01 191 | 3.780000E+00 4.123777E+01 192 | 3.800000E+00 3.969886E+01 193 | 3.820000E+00 3.821924E+01 194 | 3.840000E+00 3.679643E+01 195 | 3.860000E+00 3.542809E+01 196 | 3.880000E+00 3.411200E+01 197 | 3.900000E+00 3.284606E+01 198 | 3.920000E+00 3.162826E+01 199 | 3.940000E+00 3.045671E+01 200 | 3.960000E+00 2.932961E+01 201 | 3.980000E+00 2.824525E+01 202 | 4.000000E+00 2.720200E+01 203 | 4.020000E+00 2.619832E+01 204 | 4.040000E+00 2.523273E+01 205 | 4.060000E+00 2.430380E+01 206 | 4.080000E+00 2.341019E+01 207 | 4.100000E+00 2.255058E+01 208 | 4.120000E+00 2.172372E+01 209 | 4.140000E+00 2.092837E+01 210 | 4.160000E+00 2.016337E+01 211 | 4.180000E+00 1.942755E+01 212 | 4.200000E+00 1.871980E+01 213 | 4.220000E+00 1.803905E+01 214 | 4.240000E+00 1.738422E+01 215 | 4.260000E+00 1.675430E+01 216 | 4.280000E+00 1.614828E+01 217 | 4.300000E+00 1.556520E+01 218 | 4.320000E+00 1.500412E+01 219 | 4.340000E+00 1.446414E+01 220 | 4.360000E+00 1.394438E+01 221 | 4.380000E+00 1.344399E+01 222 | 4.400000E+00 1.296218E+01 223 | 4.420000E+00 1.249818E+01 224 | 4.440000E+00 1.205124E+01 225 | 4.460000E+00 1.162068E+01 226 | 4.480000E+00 1.120584E+01 227 | 4.500000E+00 1.080607E+01 228 | 4.520000E+00 1.042081E+01 229 | 4.540000E+00 1.004948E+01 230 | 4.560000E+00 9.691555E+00 231 | 4.580000E+00 9.346548E+00 232 | 4.600000E+00 9.013986E+00 233 | 4.620000E+00 8.693426E+00 234 | 4.640000E+00 8.384448E+00 235 | 4.660000E+00 8.086651E+00 236 | 4.680000E+00 7.799653E+00 237 | 4.700000E+00 7.523088E+00 238 | 4.720000E+00 7.256603E+00 239 | 4.740000E+00 6.999855E+00 240 | 4.760000E+00 6.752511E+00 241 | 4.780000E+00 6.514248E+00 242 | 4.800000E+00 6.284746E+00 243 | 4.820000E+00 6.063695E+00 244 | 4.840000E+00 5.850787E+00 245 | 4.860000E+00 5.645721E+00 246 | 4.880000E+00 5.448200E+00 247 | 4.900000E+00 5.257934E+00 248 | 4.920000E+00 5.074637E+00 249 | 4.940000E+00 4.898031E+00 250 | 4.960000E+00 4.727843E+00 251 | 4.980000E+00 4.563811E+00 252 | 5.000000E+00 4.405679E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/F.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 3.083869E+04 3 | 2.000000E-02 3.105588E+04 4 | 4.000000E-02 3.170290E+04 5 | 6.000000E-02 3.276627E+04 6 | 8.000000E-02 3.422386E+04 7 | 1.000000E-01 3.604550E+04 8 | 1.200000E-01 3.819371E+04 9 | 1.400000E-01 4.062465E+04 10 | 1.600000E-01 4.328920E+04 11 | 1.800000E-01 4.613414E+04 12 | 2.000000E-01 4.910345E+04 13 | 2.200000E-01 5.213958E+04 14 | 2.400000E-01 5.518479E+04 15 | 2.600000E-01 5.818243E+04 16 | 2.800000E-01 6.107814E+04 17 | 3.000000E-01 6.382095E+04 18 | 3.200000E-01 6.636426E+04 19 | 3.400000E-01 6.866668E+04 20 | 3.600000E-01 7.069268E+04 21 | 3.800000E-01 7.241308E+04 22 | 4.000000E-01 7.380536E+04 23 | 4.200000E-01 7.485376E+04 24 | 4.400000E-01 7.554924E+04 25 | 4.600000E-01 7.588930E+04 26 | 4.800000E-01 7.587761E+04 27 | 5.000000E-01 7.552348E+04 28 | 5.200000E-01 7.484139E+04 29 | 5.400000E-01 7.385021E+04 30 | 5.600000E-01 7.257259E+04 31 | 5.800000E-01 7.103414E+04 32 | 6.000000E-01 6.926272E+04 33 | 6.200000E-01 6.728770E+04 34 | 6.400000E-01 6.513923E+04 35 | 6.600000E-01 6.284760E+04 36 | 6.800000E-01 6.044267E+04 37 | 7.000000E-01 5.795330E+04 38 | 7.200000E-01 5.540693E+04 39 | 7.400000E-01 5.282924E+04 40 | 7.600000E-01 5.024381E+04 41 | 7.800000E-01 4.767198E+04 42 | 8.000000E-01 4.513269E+04 43 | 8.200000E-01 4.264242E+04 44 | 8.400000E-01 4.021523E+04 45 | 8.600000E-01 3.786276E+04 46 | 8.800000E-01 3.559439E+04 47 | 9.000000E-01 3.341736E+04 48 | 9.200000E-01 3.133692E+04 49 | 9.400000E-01 2.935654E+04 50 | 9.600000E-01 2.747806E+04 51 | 9.800000E-01 2.570195E+04 52 | 1.000000E+00 2.402748E+04 53 | 1.020000E+00 2.245287E+04 54 | 1.040000E+00 2.097555E+04 55 | 1.060000E+00 1.959227E+04 56 | 1.080000E+00 1.829926E+04 57 | 1.100000E+00 1.709239E+04 58 | 1.120000E+00 1.596727E+04 59 | 1.140000E+00 1.491939E+04 60 | 1.160000E+00 1.394414E+04 61 | 1.180000E+00 1.303696E+04 62 | 1.200000E+00 1.219336E+04 63 | 1.220000E+00 1.140897E+04 64 | 1.240000E+00 1.067960E+04 65 | 1.260000E+00 1.000125E+04 66 | 1.280000E+00 9.370129E+03 67 | 1.300000E+00 8.782671E+03 68 | 1.320000E+00 8.235547E+03 69 | 1.340000E+00 7.725660E+03 70 | 1.360000E+00 7.250143E+03 71 | 1.380000E+00 6.806352E+03 72 | 1.400000E+00 6.391860E+03 73 | 1.420000E+00 6.004443E+03 74 | 1.440000E+00 5.642070E+03 75 | 1.460000E+00 5.302889E+03 76 | 1.480000E+00 4.985211E+03 77 | 1.500000E+00 4.687501E+03 78 | 1.520000E+00 4.408358E+03 79 | 1.540000E+00 4.146509E+03 80 | 1.560000E+00 3.900789E+03 81 | 1.580000E+00 3.670136E+03 82 | 1.600000E+00 3.453573E+03 83 | 1.620000E+00 3.250205E+03 84 | 1.640000E+00 3.059204E+03 85 | 1.660000E+00 2.879805E+03 86 | 1.680000E+00 2.711296E+03 87 | 1.700000E+00 2.553014E+03 88 | 1.720000E+00 2.404338E+03 89 | 1.740000E+00 2.264687E+03 90 | 1.760000E+00 2.133513E+03 91 | 1.780000E+00 2.010302E+03 92 | 1.800000E+00 1.894566E+03 93 | 1.820000E+00 1.785847E+03 94 | 1.840000E+00 1.683712E+03 95 | 1.860000E+00 1.587750E+03 96 | 1.880000E+00 1.497577E+03 97 | 1.900000E+00 1.412826E+03 98 | 1.920000E+00 1.333156E+03 99 | 1.940000E+00 1.258243E+03 100 | 1.960000E+00 1.187784E+03 101 | 1.980000E+00 1.121496E+03 102 | 2.000000E+00 1.059113E+03 103 | 2.020000E+00 1.000387E+03 104 | 2.040000E+00 9.450852E+02 105 | 2.060000E+00 8.929929E+02 106 | 2.080000E+00 8.439090E+02 107 | 2.100000E+00 7.976469E+02 108 | 2.120000E+00 7.540333E+02 109 | 2.140000E+00 7.129068E+02 110 | 2.160000E+00 6.741177E+02 111 | 2.180000E+00 6.375267E+02 112 | 2.200000E+00 6.030041E+02 113 | 2.220000E+00 5.704291E+02 114 | 2.240000E+00 5.396888E+02 115 | 2.260000E+00 5.106776E+02 116 | 2.280000E+00 4.832968E+02 117 | 2.300000E+00 4.574534E+02 118 | 2.320000E+00 4.330600E+02 119 | 2.340000E+00 4.100343E+02 120 | 2.360000E+00 3.882985E+02 121 | 2.380000E+00 3.677791E+02 122 | 2.400000E+00 3.484065E+02 123 | 2.420000E+00 3.301147E+02 124 | 2.440000E+00 3.128415E+02 125 | 2.460000E+00 2.965274E+02 126 | 2.480000E+00 2.811166E+02 127 | 2.500000E+00 2.665560E+02 128 | 2.520000E+00 2.527954E+02 129 | 2.540000E+00 2.397875E+02 130 | 2.560000E+00 2.274878E+02 131 | 2.580000E+00 2.158541E+02 132 | 2.600000E+00 2.048471E+02 133 | 2.620000E+00 1.944298E+02 134 | 2.640000E+00 1.845675E+02 135 | 2.660000E+00 1.752277E+02 136 | 2.680000E+00 1.663804E+02 137 | 2.700000E+00 1.579973E+02 138 | 2.720000E+00 1.500520E+02 139 | 2.740000E+00 1.425202E+02 140 | 2.760000E+00 1.353789E+02 141 | 2.780000E+00 1.286070E+02 142 | 2.800000E+00 1.221845E+02 143 | 2.820000E+00 1.160930E+02 144 | 2.840000E+00 1.103151E+02 145 | 2.860000E+00 1.048345E+02 146 | 2.880000E+00 9.963580E+01 147 | 2.900000E+00 9.470461E+01 148 | 2.920000E+00 9.002723E+01 149 | 2.940000E+00 8.559069E+01 150 | 2.960000E+00 8.138267E+01 151 | 2.980000E+00 7.739141E+01 152 | 3.000000E+00 7.360572E+01 153 | 3.020000E+00 7.001487E+01 154 | 3.040000E+00 6.660864E+01 155 | 3.060000E+00 6.337722E+01 156 | 3.080000E+00 6.031127E+01 157 | 3.100000E+00 5.740183E+01 158 | 3.120000E+00 5.464039E+01 159 | 3.140000E+00 5.201882E+01 160 | 3.160000E+00 4.952941E+01 161 | 3.180000E+00 4.716483E+01 162 | 3.200000E+00 4.491816E+01 163 | 3.220000E+00 4.278289E+01 164 | 3.240000E+00 4.075285E+01 165 | 3.260000E+00 3.882229E+01 166 | 3.280000E+00 3.698580E+01 167 | 3.300000E+00 3.523834E+01 168 | 3.320000E+00 3.357519E+01 169 | 3.340000E+00 3.199198E+01 170 | 3.360000E+00 3.048460E+01 171 | 3.380000E+00 2.904925E+01 172 | 3.400000E+00 2.768239E+01 173 | 3.420000E+00 2.638070E+01 174 | 3.440000E+00 2.514107E+01 175 | 3.460000E+00 2.396060E+01 176 | 3.480000E+00 2.283656E+01 177 | 3.500000E+00 2.176634E+01 178 | 3.520000E+00 2.074750E+01 179 | 3.540000E+00 1.977768E+01 180 | 3.560000E+00 1.885465E+01 181 | 3.580000E+00 1.797625E+01 182 | 3.600000E+00 1.714042E+01 183 | 3.620000E+00 1.634514E+01 184 | 3.640000E+00 1.558848E+01 185 | 3.660000E+00 1.486856E+01 186 | 3.680000E+00 1.418358E+01 187 | 3.700000E+00 1.353178E+01 188 | 3.720000E+00 1.291147E+01 189 | 3.740000E+00 1.232101E+01 190 | 3.760000E+00 1.175885E+01 191 | 3.780000E+00 1.122348E+01 192 | 3.800000E+00 1.071347E+01 193 | 3.820000E+00 1.022747E+01 194 | 3.840000E+00 9.764194E+00 195 | 3.860000E+00 9.322424E+00 196 | 3.880000E+00 8.901026E+00 197 | 3.900000E+00 8.498934E+00 198 | 3.920000E+00 8.115157E+00 199 | 3.940000E+00 7.748772E+00 200 | 3.960000E+00 7.398923E+00 201 | 3.980000E+00 7.064816E+00 202 | 4.000000E+00 6.745717E+00 203 | 4.020000E+00 6.440945E+00 204 | 4.040000E+00 6.149866E+00 205 | 4.060000E+00 5.871892E+00 206 | 4.080000E+00 5.606469E+00 207 | 4.100000E+00 5.353078E+00 208 | 4.120000E+00 5.111228E+00 209 | 4.140000E+00 4.880447E+00 210 | 4.160000E+00 4.660286E+00 211 | 4.180000E+00 4.450309E+00 212 | 4.200000E+00 4.250094E+00 213 | 4.220000E+00 4.059226E+00 214 | 4.240000E+00 3.877302E+00 215 | 4.260000E+00 3.703924E+00 216 | 4.280000E+00 3.538704E+00 217 | 4.300000E+00 3.381257E+00 218 | 4.320000E+00 3.231209E+00 219 | 4.340000E+00 3.088194E+00 220 | 4.360000E+00 2.951854E+00 221 | 4.380000E+00 2.821844E+00 222 | 4.400000E+00 2.697829E+00 223 | 4.420000E+00 2.579488E+00 224 | 4.440000E+00 2.466517E+00 225 | 4.460000E+00 2.358624E+00 226 | 4.480000E+00 2.255538E+00 227 | 4.500000E+00 2.157001E+00 228 | 4.520000E+00 2.062776E+00 229 | 4.540000E+00 1.972641E+00 230 | 4.560000E+00 1.886393E+00 231 | 4.580000E+00 1.803845E+00 232 | 4.600000E+00 1.724826E+00 233 | 4.620000E+00 1.649179E+00 234 | 4.640000E+00 1.576762E+00 235 | 4.660000E+00 1.507442E+00 236 | 4.680000E+00 1.441100E+00 237 | 4.700000E+00 1.377624E+00 238 | 4.720000E+00 1.316908E+00 239 | 4.740000E+00 1.258855E+00 240 | 4.760000E+00 1.203370E+00 241 | 4.780000E+00 1.150361E+00 242 | 4.800000E+00 1.099740E+00 243 | 4.820000E+00 1.051417E+00 244 | 4.840000E+00 1.005306E+00 245 | 4.860000E+00 9.613192E-01 246 | 4.880000E+00 9.193685E-01 247 | 4.900000E+00 8.793663E-01 248 | 4.920000E+00 8.412246E-01 249 | 4.940000E+00 8.048556E-01 250 | 4.960000E+00 7.701721E-01 251 | 4.980000E+00 7.370878E-01 252 | 5.000000E+00 7.055182E-01 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/H.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 1.189352E+04 3 | 2.000000E-02 1.187975E+04 4 | 4.000000E-02 1.183859E+04 5 | 6.000000E-02 1.177046E+04 6 | 8.000000E-02 1.167603E+04 7 | 1.000000E-01 1.155625E+04 8 | 1.200000E-01 1.141230E+04 9 | 1.400000E-01 1.124557E+04 10 | 1.600000E-01 1.105763E+04 11 | 1.800000E-01 1.085023E+04 12 | 2.000000E-01 1.062523E+04 13 | 2.200000E-01 1.038459E+04 14 | 2.400000E-01 1.013034E+04 15 | 2.600000E-01 9.864537E+03 16 | 2.800000E-01 9.589224E+03 17 | 3.000000E-01 9.306429E+03 18 | 3.200000E-01 9.018118E+03 19 | 3.400000E-01 8.726178E+03 20 | 3.600000E-01 8.432391E+03 21 | 3.800000E-01 8.138423E+03 22 | 4.000000E-01 7.845806E+03 23 | 4.200000E-01 7.555931E+03 24 | 4.400000E-01 7.270040E+03 25 | 4.600000E-01 6.989223E+03 26 | 4.800000E-01 6.714419E+03 27 | 5.000000E-01 6.446418E+03 28 | 5.200000E-01 6.185866E+03 29 | 5.400000E-01 5.933272E+03 30 | 5.600000E-01 5.689018E+03 31 | 5.800000E-01 5.453368E+03 32 | 6.000000E-01 5.226477E+03 33 | 6.200000E-01 5.008408E+03 34 | 6.400000E-01 4.799137E+03 35 | 6.600000E-01 4.598569E+03 36 | 6.800000E-01 4.406546E+03 37 | 7.000000E-01 4.222862E+03 38 | 7.200000E-01 4.047269E+03 39 | 7.400000E-01 3.879487E+03 40 | 7.600000E-01 3.719215E+03 41 | 7.800000E-01 3.566136E+03 42 | 8.000000E-01 3.419927E+03 43 | 8.200000E-01 3.280260E+03 44 | 8.400000E-01 3.146811E+03 45 | 8.600000E-01 3.019262E+03 46 | 8.800000E-01 2.897307E+03 47 | 9.000000E-01 2.780649E+03 48 | 9.200000E-01 2.669008E+03 49 | 9.400000E-01 2.562119E+03 50 | 9.600000E-01 2.459733E+03 51 | 9.800000E-01 2.361617E+03 52 | 1.000000E+00 2.267557E+03 53 | 1.020000E+00 2.177351E+03 54 | 1.040000E+00 2.090814E+03 55 | 1.060000E+00 2.007776E+03 56 | 1.080000E+00 1.928077E+03 57 | 1.100000E+00 1.851571E+03 58 | 1.120000E+00 1.778123E+03 59 | 1.140000E+00 1.707606E+03 60 | 1.160000E+00 1.639902E+03 61 | 1.180000E+00 1.574899E+03 62 | 1.200000E+00 1.512492E+03 63 | 1.220000E+00 1.452582E+03 64 | 1.240000E+00 1.395072E+03 65 | 1.260000E+00 1.339872E+03 66 | 1.280000E+00 1.286892E+03 67 | 1.300000E+00 1.236048E+03 68 | 1.320000E+00 1.187256E+03 69 | 1.340000E+00 1.140437E+03 70 | 1.360000E+00 1.095511E+03 71 | 1.380000E+00 1.052402E+03 72 | 1.400000E+00 1.011037E+03 73 | 1.420000E+00 9.713428E+02 74 | 1.440000E+00 9.332508E+02 75 | 1.460000E+00 8.966933E+02 76 | 1.480000E+00 8.616053E+02 77 | 1.500000E+00 8.279244E+02 78 | 1.520000E+00 7.955905E+02 79 | 1.540000E+00 7.645462E+02 80 | 1.560000E+00 7.347368E+02 81 | 1.580000E+00 7.061099E+02 82 | 1.600000E+00 6.786159E+02 83 | 1.620000E+00 6.522075E+02 84 | 1.640000E+00 6.268399E+02 85 | 1.660000E+00 6.024706E+02 86 | 1.680000E+00 5.790594E+02 87 | 1.700000E+00 5.565679E+02 88 | 1.720000E+00 5.349598E+02 89 | 1.740000E+00 5.142007E+02 90 | 1.760000E+00 4.942576E+02 91 | 1.780000E+00 4.750990E+02 92 | 1.800000E+00 4.566950E+02 93 | 1.820000E+00 4.390167E+02 94 | 1.840000E+00 4.220363E+02 95 | 1.860000E+00 4.057272E+02 96 | 1.880000E+00 3.900635E+02 97 | 1.900000E+00 3.750203E+02 98 | 1.920000E+00 3.605734E+02 99 | 1.940000E+00 3.466994E+02 100 | 1.960000E+00 3.333757E+02 101 | 1.980000E+00 3.205801E+02 102 | 2.000000E+00 3.082914E+02 103 | 2.020000E+00 2.964890E+02 104 | 2.040000E+00 2.851528E+02 105 | 2.060000E+00 2.742637E+02 106 | 2.080000E+00 2.638030E+02 107 | 2.100000E+00 2.537529E+02 108 | 2.120000E+00 2.440962E+02 109 | 2.140000E+00 2.348166E+02 110 | 2.160000E+00 2.258983E+02 111 | 2.180000E+00 2.173263E+02 112 | 2.200000E+00 2.090864E+02 113 | 2.220000E+00 2.011650E+02 114 | 2.240000E+00 1.935491E+02 115 | 2.260000E+00 1.862265E+02 116 | 2.280000E+00 1.791855E+02 117 | 2.300000E+00 1.724150E+02 118 | 2.320000E+00 1.659045E+02 119 | 2.340000E+00 1.596440E+02 120 | 2.360000E+00 1.536240E+02 121 | 2.380000E+00 1.478352E+02 122 | 2.400000E+00 1.422690E+02 123 | 2.420000E+00 1.369171E+02 124 | 2.440000E+00 1.317712E+02 125 | 2.460000E+00 1.268238E+02 126 | 2.480000E+00 1.220674E+02 127 | 2.500000E+00 1.174946E+02 128 | 2.520000E+00 1.130986E+02 129 | 2.540000E+00 1.088725E+02 130 | 2.560000E+00 1.048097E+02 131 | 2.580000E+00 1.009039E+02 132 | 2.600000E+00 9.714880E+01 133 | 2.620000E+00 9.353847E+01 134 | 2.640000E+00 9.006707E+01 135 | 2.660000E+00 8.672897E+01 136 | 2.680000E+00 8.351873E+01 137 | 2.700000E+00 8.043112E+01 138 | 2.720000E+00 7.746111E+01 139 | 2.740000E+00 7.460386E+01 140 | 2.760000E+00 7.185475E+01 141 | 2.780000E+00 6.920934E+01 142 | 2.800000E+00 6.666344E+01 143 | 2.820000E+00 6.421301E+01 144 | 2.840000E+00 6.185424E+01 145 | 2.860000E+00 5.958350E+01 146 | 2.880000E+00 5.739736E+01 147 | 2.900000E+00 5.529254E+01 148 | 2.920000E+00 5.326594E+01 149 | 2.940000E+00 5.131462E+01 150 | 2.960000E+00 4.943579E+01 151 | 2.980000E+00 4.762676E+01 152 | 3.000000E+00 4.588499E+01 153 | 3.020000E+00 4.420804E+01 154 | 3.040000E+00 4.259357E+01 155 | 3.060000E+00 4.103932E+01 156 | 3.080000E+00 3.954313E+01 157 | 3.100000E+00 3.810288E+01 158 | 3.120000E+00 3.671654E+01 159 | 3.140000E+00 3.538212E+01 160 | 3.160000E+00 3.409770E+01 161 | 3.180000E+00 3.286141E+01 162 | 3.200000E+00 3.167141E+01 163 | 3.220000E+00 3.052593E+01 164 | 3.240000E+00 2.942325E+01 165 | 3.260000E+00 2.836168E+01 166 | 3.280000E+00 2.733959E+01 167 | 3.300000E+00 2.635542E+01 168 | 3.320000E+00 2.540763E+01 169 | 3.340000E+00 2.449477E+01 170 | 3.360000E+00 2.361544E+01 171 | 3.380000E+00 2.276827E+01 172 | 3.400000E+00 2.195199E+01 173 | 3.420000E+00 2.116536E+01 174 | 3.440000E+00 2.040723E+01 175 | 3.460000E+00 1.967648E+01 176 | 3.480000E+00 1.897206E+01 177 | 3.500000E+00 1.829298E+01 178 | 3.520000E+00 1.763829E+01 179 | 3.540000E+00 1.700711E+01 180 | 3.560000E+00 1.639858E+01 181 | 3.580000E+00 1.581191E+01 182 | 3.600000E+00 1.524632E+01 183 | 3.620000E+00 1.470110E+01 184 | 3.640000E+00 1.417554E+01 185 | 3.660000E+00 1.366897E+01 186 | 3.680000E+00 1.318075E+01 187 | 3.700000E+00 1.271024E+01 188 | 3.720000E+00 1.225684E+01 189 | 3.740000E+00 1.181997E+01 190 | 3.760000E+00 1.139903E+01 191 | 3.780000E+00 1.099346E+01 192 | 3.800000E+00 1.060272E+01 193 | 3.820000E+00 1.022626E+01 194 | 3.840000E+00 9.863544E+00 195 | 3.860000E+00 9.514059E+00 196 | 3.880000E+00 9.177298E+00 197 | 3.900000E+00 8.852767E+00 198 | 3.920000E+00 8.539987E+00 199 | 3.940000E+00 8.238494E+00 200 | 3.960000E+00 7.947839E+00 201 | 3.980000E+00 7.667591E+00 202 | 4.000000E+00 7.397337E+00 203 | 4.020000E+00 7.136682E+00 204 | 4.040000E+00 6.885250E+00 205 | 4.060000E+00 6.642683E+00 206 | 4.080000E+00 6.408643E+00 207 | 4.100000E+00 6.182810E+00 208 | 4.120000E+00 5.964882E+00 209 | 4.140000E+00 5.754575E+00 210 | 4.160000E+00 5.551620E+00 211 | 4.180000E+00 5.355764E+00 212 | 4.200000E+00 5.166766E+00 213 | 4.220000E+00 4.984400E+00 214 | 4.240000E+00 4.808447E+00 215 | 4.260000E+00 4.638702E+00 216 | 4.280000E+00 4.474965E+00 217 | 4.300000E+00 4.317042E+00 218 | 4.320000E+00 4.164748E+00 219 | 4.340000E+00 4.017900E+00 220 | 4.360000E+00 3.876318E+00 221 | 4.380000E+00 3.739829E+00 222 | 4.400000E+00 3.608258E+00 223 | 4.420000E+00 3.481436E+00 224 | 4.440000E+00 3.359193E+00 225 | 4.460000E+00 3.241364E+00 226 | 4.480000E+00 3.127785E+00 227 | 4.500000E+00 3.018296E+00 228 | 4.520000E+00 2.912738E+00 229 | 4.540000E+00 2.810959E+00 230 | 4.560000E+00 2.712808E+00 231 | 4.580000E+00 2.618141E+00 232 | 4.600000E+00 2.526818E+00 233 | 4.620000E+00 2.438705E+00 234 | 4.640000E+00 2.353673E+00 235 | 4.660000E+00 2.271602E+00 236 | 4.680000E+00 2.192376E+00 237 | 4.700000E+00 2.115885E+00 238 | 4.720000E+00 2.042028E+00 239 | 4.740000E+00 1.970708E+00 240 | 4.760000E+00 1.901837E+00 241 | 4.780000E+00 1.835328E+00 242 | 4.800000E+00 1.771104E+00 243 | 4.820000E+00 1.709090E+00 244 | 4.840000E+00 1.649216E+00 245 | 4.860000E+00 1.591416E+00 246 | 4.880000E+00 1.535626E+00 247 | 4.900000E+00 1.481787E+00 248 | 4.920000E+00 1.429838E+00 249 | 4.940000E+00 1.379724E+00 250 | 4.960000E+00 1.331388E+00 251 | 4.980000E+00 1.284775E+00 252 | 5.000000E+00 1.239830E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/I.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 5.637035E+02 3 | 2.000000E-02 5.663424E+02 4 | 4.000000E-02 5.751557E+02 5 | 6.000000E-02 5.928098E+02 6 | 8.000000E-02 6.236669E+02 7 | 1.000000E-01 6.736661E+02 8 | 1.200000E-01 7.501597E+02 9 | 1.400000E-01 8.617105E+02 10 | 1.600000E-01 1.017855E+03 11 | 1.800000E-01 1.228836E+03 12 | 2.000000E-01 1.505318E+03 13 | 2.200000E-01 1.858081E+03 14 | 2.400000E-01 2.297713E+03 15 | 2.600000E-01 2.834301E+03 16 | 2.800000E-01 3.477128E+03 17 | 3.000000E-01 4.234384E+03 18 | 3.200000E-01 5.112906E+03 19 | 3.400000E-01 6.117939E+03 20 | 3.600000E-01 7.252932E+03 21 | 3.800000E-01 8.519376E+03 22 | 4.000000E-01 9.916680E+03 23 | 4.200000E-01 1.144209E+04 24 | 4.400000E-01 1.309068E+04 25 | 4.600000E-01 1.485532E+04 26 | 4.800000E-01 1.672679E+04 27 | 5.000000E-01 1.869384E+04 28 | 5.200000E-01 2.074339E+04 29 | 5.400000E-01 2.286066E+04 30 | 5.600000E-01 2.502941E+04 31 | 5.800000E-01 2.723222E+04 32 | 6.000000E-01 2.945070E+04 33 | 6.200000E-01 3.166581E+04 34 | 6.400000E-01 3.385817E+04 35 | 6.600000E-01 3.600834E+04 36 | 6.800000E-01 3.809713E+04 37 | 7.000000E-01 4.010587E+04 38 | 7.200000E-01 4.201672E+04 39 | 7.400000E-01 4.381292E+04 40 | 7.600000E-01 4.547902E+04 41 | 7.800000E-01 4.700107E+04 42 | 8.000000E-01 4.836686E+04 43 | 8.200000E-01 4.956597E+04 44 | 8.400000E-01 5.058997E+04 45 | 8.600000E-01 5.143245E+04 46 | 8.800000E-01 5.208906E+04 47 | 9.000000E-01 5.255752E+04 48 | 9.200000E-01 5.283759E+04 49 | 9.400000E-01 5.293099E+04 50 | 9.600000E-01 5.284135E+04 51 | 9.800000E-01 5.257404E+04 52 | 1.000000E+00 5.213606E+04 53 | 1.020000E+00 5.153589E+04 54 | 1.040000E+00 5.078326E+04 55 | 1.060000E+00 4.988903E+04 56 | 1.080000E+00 4.886495E+04 57 | 1.100000E+00 4.772348E+04 58 | 1.120000E+00 4.647759E+04 59 | 1.140000E+00 4.514057E+04 60 | 1.160000E+00 4.372582E+04 61 | 1.180000E+00 4.224671E+04 62 | 1.200000E+00 4.071639E+04 63 | 1.220000E+00 3.914766E+04 64 | 1.240000E+00 3.755279E+04 65 | 1.260000E+00 3.594348E+04 66 | 1.280000E+00 3.433070E+04 67 | 1.300000E+00 3.272462E+04 68 | 1.320000E+00 3.113457E+04 69 | 1.340000E+00 2.956899E+04 70 | 1.360000E+00 2.803537E+04 71 | 1.380000E+00 2.654030E+04 72 | 1.400000E+00 2.508941E+04 73 | 1.420000E+00 2.368744E+04 74 | 1.440000E+00 2.233824E+04 75 | 1.460000E+00 2.104480E+04 76 | 1.480000E+00 1.980934E+04 77 | 1.500000E+00 1.863333E+04 78 | 1.520000E+00 1.751754E+04 79 | 1.540000E+00 1.646214E+04 80 | 1.560000E+00 1.546675E+04 81 | 1.580000E+00 1.453050E+04 82 | 1.600000E+00 1.365208E+04 83 | 1.620000E+00 1.282985E+04 84 | 1.640000E+00 1.206186E+04 85 | 1.660000E+00 1.134593E+04 86 | 1.680000E+00 1.067968E+04 87 | 1.700000E+00 1.006062E+04 88 | 1.720000E+00 9.486157E+03 89 | 1.740000E+00 8.953657E+03 90 | 1.760000E+00 8.460479E+03 91 | 1.780000E+00 8.003999E+03 92 | 1.800000E+00 7.581644E+03 93 | 1.820000E+00 7.190910E+03 94 | 1.840000E+00 6.829382E+03 95 | 1.860000E+00 6.494750E+03 96 | 1.880000E+00 6.184815E+03 97 | 1.900000E+00 5.897502E+03 98 | 1.920000E+00 5.630862E+03 99 | 1.940000E+00 5.383072E+03 100 | 1.960000E+00 5.152442E+03 101 | 1.980000E+00 4.937407E+03 102 | 2.000000E+00 4.736527E+03 103 | 2.020000E+00 4.548483E+03 104 | 2.040000E+00 4.372071E+03 105 | 2.060000E+00 4.206196E+03 106 | 2.080000E+00 4.049865E+03 107 | 2.100000E+00 3.902183E+03 108 | 2.120000E+00 3.762346E+03 109 | 2.140000E+00 3.629630E+03 110 | 2.160000E+00 3.503390E+03 111 | 2.180000E+00 3.383049E+03 112 | 2.200000E+00 3.268096E+03 113 | 2.220000E+00 3.158075E+03 114 | 2.240000E+00 3.052585E+03 115 | 2.260000E+00 2.951269E+03 116 | 2.280000E+00 2.853815E+03 117 | 2.300000E+00 2.759945E+03 118 | 2.320000E+00 2.669417E+03 119 | 2.340000E+00 2.582018E+03 120 | 2.360000E+00 2.497559E+03 121 | 2.380000E+00 2.415875E+03 122 | 2.400000E+00 2.336822E+03 123 | 2.420000E+00 2.260270E+03 124 | 2.440000E+00 2.186107E+03 125 | 2.460000E+00 2.114232E+03 126 | 2.480000E+00 2.044556E+03 127 | 2.500000E+00 1.976999E+03 128 | 2.520000E+00 1.911488E+03 129 | 2.540000E+00 1.847959E+03 130 | 2.560000E+00 1.786350E+03 131 | 2.580000E+00 1.726608E+03 132 | 2.600000E+00 1.668679E+03 133 | 2.620000E+00 1.612517E+03 134 | 2.640000E+00 1.558075E+03 135 | 2.660000E+00 1.505309E+03 136 | 2.680000E+00 1.454178E+03 137 | 2.700000E+00 1.404640E+03 138 | 2.720000E+00 1.356656E+03 139 | 2.740000E+00 1.310186E+03 140 | 2.760000E+00 1.265193E+03 141 | 2.780000E+00 1.221638E+03 142 | 2.800000E+00 1.179485E+03 143 | 2.820000E+00 1.138697E+03 144 | 2.840000E+00 1.099238E+03 145 | 2.860000E+00 1.061070E+03 146 | 2.880000E+00 1.024160E+03 147 | 2.900000E+00 9.884720E+02 148 | 2.920000E+00 9.539708E+02 149 | 2.940000E+00 9.206226E+02 150 | 2.960000E+00 8.883937E+02 151 | 2.980000E+00 8.572509E+02 152 | 3.000000E+00 8.271618E+02 153 | 3.020000E+00 7.980942E+02 154 | 3.040000E+00 7.700169E+02 155 | 3.060000E+00 7.428993E+02 156 | 3.080000E+00 7.167112E+02 157 | 3.100000E+00 6.914233E+02 158 | 3.120000E+00 6.670070E+02 159 | 3.140000E+00 6.434344E+02 160 | 3.160000E+00 6.206783E+02 161 | 3.180000E+00 5.987121E+02 162 | 3.200000E+00 5.775101E+02 163 | 3.220000E+00 5.570471E+02 164 | 3.240000E+00 5.372988E+02 165 | 3.260000E+00 5.182414E+02 166 | 3.280000E+00 4.998519E+02 167 | 3.300000E+00 4.821079E+02 168 | 3.320000E+00 4.649878E+02 169 | 3.340000E+00 4.484705E+02 170 | 3.360000E+00 4.325356E+02 171 | 3.380000E+00 4.171632E+02 172 | 3.400000E+00 4.023342E+02 173 | 3.420000E+00 3.880300E+02 174 | 3.440000E+00 3.742325E+02 175 | 3.460000E+00 3.609243E+02 176 | 3.480000E+00 3.480885E+02 177 | 3.500000E+00 3.357087E+02 178 | 3.520000E+00 3.237690E+02 179 | 3.540000E+00 3.122543E+02 180 | 3.560000E+00 3.011495E+02 181 | 3.580000E+00 2.904405E+02 182 | 3.600000E+00 2.801133E+02 183 | 3.620000E+00 2.701546E+02 184 | 3.640000E+00 2.605513E+02 185 | 3.660000E+00 2.512910E+02 186 | 3.680000E+00 2.423617E+02 187 | 3.700000E+00 2.337515E+02 188 | 3.720000E+00 2.254492E+02 189 | 3.740000E+00 2.174439E+02 190 | 3.760000E+00 2.097251E+02 191 | 3.780000E+00 2.022826E+02 192 | 3.800000E+00 1.951066E+02 193 | 3.820000E+00 1.881876E+02 194 | 3.840000E+00 1.815164E+02 195 | 3.860000E+00 1.750843E+02 196 | 3.880000E+00 1.688826E+02 197 | 3.900000E+00 1.629032E+02 198 | 3.920000E+00 1.571380E+02 199 | 3.940000E+00 1.515794E+02 200 | 3.960000E+00 1.462200E+02 201 | 3.980000E+00 1.410526E+02 202 | 4.000000E+00 1.360703E+02 203 | 4.020000E+00 1.312665E+02 204 | 4.040000E+00 1.266348E+02 205 | 4.060000E+00 1.221688E+02 206 | 4.080000E+00 1.178627E+02 207 | 4.100000E+00 1.137107E+02 208 | 4.120000E+00 1.097071E+02 209 | 4.140000E+00 1.058467E+02 210 | 4.160000E+00 1.021243E+02 211 | 4.180000E+00 9.853489E+01 212 | 4.200000E+00 9.507363E+01 213 | 4.220000E+00 9.173590E+01 214 | 4.240000E+00 8.851724E+01 215 | 4.260000E+00 8.541335E+01 216 | 4.280000E+00 8.242007E+01 217 | 4.300000E+00 7.953342E+01 218 | 4.320000E+00 7.674954E+01 219 | 4.340000E+00 7.406472E+01 220 | 4.360000E+00 7.147538E+01 221 | 4.380000E+00 6.897808E+01 222 | 4.400000E+00 6.656949E+01 223 | 4.420000E+00 6.424643E+01 224 | 4.440000E+00 6.200580E+01 225 | 4.460000E+00 5.984464E+01 226 | 4.480000E+00 5.776008E+01 227 | 4.500000E+00 5.574936E+01 228 | 4.520000E+00 5.380983E+01 229 | 4.540000E+00 5.193893E+01 230 | 4.560000E+00 5.013418E+01 231 | 4.580000E+00 4.839320E+01 232 | 4.600000E+00 4.671371E+01 233 | 4.620000E+00 4.509348E+01 234 | 4.640000E+00 4.353040E+01 235 | 4.660000E+00 4.202240E+01 236 | 4.680000E+00 4.056751E+01 237 | 4.700000E+00 3.916383E+01 238 | 4.720000E+00 3.780951E+01 239 | 4.740000E+00 3.650278E+01 240 | 4.760000E+00 3.524193E+01 241 | 4.780000E+00 3.402534E+01 242 | 4.800000E+00 3.285140E+01 243 | 4.820000E+00 3.171860E+01 244 | 4.840000E+00 3.062546E+01 245 | 4.860000E+00 2.957056E+01 246 | 4.880000E+00 2.855255E+01 247 | 4.900000E+00 2.757011E+01 248 | 4.920000E+00 2.662197E+01 249 | 4.940000E+00 2.570691E+01 250 | 4.960000E+00 2.482375E+01 251 | 4.980000E+00 2.397137E+01 252 | 5.000000E+00 2.314867E+01 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/K.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 1.043038E+04 3 | 2.000000E-02 1.046816E+04 4 | 4.000000E-02 1.058116E+04 5 | 6.000000E-02 1.076845E+04 6 | 8.000000E-02 1.102842E+04 7 | 1.000000E-01 1.135889E+04 8 | 1.200000E-01 1.175709E+04 9 | 1.400000E-01 1.221967E+04 10 | 1.600000E-01 1.274277E+04 11 | 1.800000E-01 1.332205E+04 12 | 2.000000E-01 1.395271E+04 13 | 2.200000E-01 1.462959E+04 14 | 2.400000E-01 1.534715E+04 15 | 2.600000E-01 1.609961E+04 16 | 2.800000E-01 1.688092E+04 17 | 3.000000E-01 1.768487E+04 18 | 3.200000E-01 1.850517E+04 19 | 3.400000E-01 1.933542E+04 20 | 3.600000E-01 2.016928E+04 21 | 3.800000E-01 2.100043E+04 22 | 4.000000E-01 2.182269E+04 23 | 4.200000E-01 2.263006E+04 24 | 4.400000E-01 2.341673E+04 25 | 4.600000E-01 2.417717E+04 26 | 4.800000E-01 2.490616E+04 27 | 5.000000E-01 2.559883E+04 28 | 5.200000E-01 2.625066E+04 29 | 5.400000E-01 2.685757E+04 30 | 5.600000E-01 2.741589E+04 31 | 5.800000E-01 2.792240E+04 32 | 6.000000E-01 2.837435E+04 33 | 6.200000E-01 2.876943E+04 34 | 6.400000E-01 2.910584E+04 35 | 6.600000E-01 2.938221E+04 36 | 6.800000E-01 2.959767E+04 37 | 7.000000E-01 2.975177E+04 38 | 7.200000E-01 2.984452E+04 39 | 7.400000E-01 2.987633E+04 40 | 7.600000E-01 2.984804E+04 41 | 7.800000E-01 2.976083E+04 42 | 8.000000E-01 2.961625E+04 43 | 8.200000E-01 2.941616E+04 44 | 8.400000E-01 2.916271E+04 45 | 8.600000E-01 2.885833E+04 46 | 8.800000E-01 2.850564E+04 47 | 9.000000E-01 2.810748E+04 48 | 9.200000E-01 2.766686E+04 49 | 9.400000E-01 2.718688E+04 50 | 9.600000E-01 2.667079E+04 51 | 9.800000E-01 2.612188E+04 52 | 1.000000E+00 2.554348E+04 53 | 1.020000E+00 2.493893E+04 54 | 1.040000E+00 2.431157E+04 55 | 1.060000E+00 2.366469E+04 56 | 1.080000E+00 2.300153E+04 57 | 1.100000E+00 2.232523E+04 58 | 1.120000E+00 2.163884E+04 59 | 1.140000E+00 2.094530E+04 60 | 1.160000E+00 2.024741E+04 61 | 1.180000E+00 1.954782E+04 62 | 1.200000E+00 1.884906E+04 63 | 1.220000E+00 1.815346E+04 64 | 1.240000E+00 1.746321E+04 65 | 1.260000E+00 1.678031E+04 66 | 1.280000E+00 1.610661E+04 67 | 1.300000E+00 1.544378E+04 68 | 1.320000E+00 1.479329E+04 69 | 1.340000E+00 1.415649E+04 70 | 1.360000E+00 1.353452E+04 71 | 1.380000E+00 1.292838E+04 72 | 1.400000E+00 1.233892E+04 73 | 1.420000E+00 1.176682E+04 74 | 1.440000E+00 1.121265E+04 75 | 1.460000E+00 1.067681E+04 76 | 1.480000E+00 1.015960E+04 77 | 1.500000E+00 9.661204E+03 78 | 1.520000E+00 9.181688E+03 79 | 1.540000E+00 8.721028E+03 80 | 1.560000E+00 8.279109E+03 81 | 1.580000E+00 7.855738E+03 82 | 1.600000E+00 7.450651E+03 83 | 1.620000E+00 7.063521E+03 84 | 1.640000E+00 6.693968E+03 85 | 1.660000E+00 6.341567E+03 86 | 1.680000E+00 6.005854E+03 87 | 1.700000E+00 5.686333E+03 88 | 1.720000E+00 5.382485E+03 89 | 1.740000E+00 5.093771E+03 90 | 1.760000E+00 4.819639E+03 91 | 1.780000E+00 4.559530E+03 92 | 1.800000E+00 4.312880E+03 93 | 1.820000E+00 4.079126E+03 94 | 1.840000E+00 3.857709E+03 95 | 1.860000E+00 3.648076E+03 96 | 1.880000E+00 3.449684E+03 97 | 1.900000E+00 3.262005E+03 98 | 1.920000E+00 3.084519E+03 99 | 1.940000E+00 2.916725E+03 100 | 1.960000E+00 2.758137E+03 101 | 1.980000E+00 2.608287E+03 102 | 2.000000E+00 2.466725E+03 103 | 2.020000E+00 2.333016E+03 104 | 2.040000E+00 2.206747E+03 105 | 2.060000E+00 2.087522E+03 106 | 2.080000E+00 1.974963E+03 107 | 2.100000E+00 1.868709E+03 108 | 2.120000E+00 1.768418E+03 109 | 2.140000E+00 1.673763E+03 110 | 2.160000E+00 1.584435E+03 111 | 2.180000E+00 1.500141E+03 112 | 2.200000E+00 1.420601E+03 113 | 2.220000E+00 1.345554E+03 114 | 2.240000E+00 1.274747E+03 115 | 2.260000E+00 1.207945E+03 116 | 2.280000E+00 1.144925E+03 117 | 2.300000E+00 1.085473E+03 118 | 2.320000E+00 1.029390E+03 119 | 2.340000E+00 9.764854E+02 120 | 2.360000E+00 9.265809E+02 121 | 2.380000E+00 8.795065E+02 122 | 2.400000E+00 8.351019E+02 123 | 2.420000E+00 7.932156E+02 124 | 2.440000E+00 7.537043E+02 125 | 2.460000E+00 7.164326E+02 126 | 2.480000E+00 6.812726E+02 127 | 2.500000E+00 6.481032E+02 128 | 2.520000E+00 6.168104E+02 129 | 2.540000E+00 5.872863E+02 130 | 2.560000E+00 5.594289E+02 131 | 2.580000E+00 5.331422E+02 132 | 2.600000E+00 5.083355E+02 133 | 2.620000E+00 4.849231E+02 134 | 2.640000E+00 4.628243E+02 135 | 2.660000E+00 4.419629E+02 136 | 2.680000E+00 4.222671E+02 137 | 2.700000E+00 4.036693E+02 138 | 2.720000E+00 3.861058E+02 139 | 2.740000E+00 3.695164E+02 140 | 2.760000E+00 3.538447E+02 141 | 2.780000E+00 3.390372E+02 142 | 2.800000E+00 3.250440E+02 143 | 2.820000E+00 3.118176E+02 144 | 2.840000E+00 2.993138E+02 145 | 2.860000E+00 2.874906E+02 146 | 2.880000E+00 2.763086E+02 147 | 2.900000E+00 2.657307E+02 148 | 2.920000E+00 2.557221E+02 149 | 2.940000E+00 2.462499E+02 150 | 2.960000E+00 2.372832E+02 151 | 2.980000E+00 2.287927E+02 152 | 3.000000E+00 2.207512E+02 153 | 3.020000E+00 2.131328E+02 154 | 3.040000E+00 2.059131E+02 155 | 3.060000E+00 1.990693E+02 156 | 3.080000E+00 1.925798E+02 157 | 3.100000E+00 1.864242E+02 158 | 3.120000E+00 1.805835E+02 159 | 3.140000E+00 1.750395E+02 160 | 3.160000E+00 1.697754E+02 161 | 3.180000E+00 1.647750E+02 162 | 3.200000E+00 1.600233E+02 163 | 3.220000E+00 1.555060E+02 164 | 3.240000E+00 1.512099E+02 165 | 3.260000E+00 1.471221E+02 166 | 3.280000E+00 1.432309E+02 167 | 3.300000E+00 1.395249E+02 168 | 3.320000E+00 1.359937E+02 169 | 3.340000E+00 1.326272E+02 170 | 3.360000E+00 1.294161E+02 171 | 3.380000E+00 1.263514E+02 172 | 3.400000E+00 1.234248E+02 173 | 3.420000E+00 1.206284E+02 174 | 3.440000E+00 1.179549E+02 175 | 3.460000E+00 1.153971E+02 176 | 3.480000E+00 1.129484E+02 177 | 3.500000E+00 1.106027E+02 178 | 3.520000E+00 1.083540E+02 179 | 3.540000E+00 1.061968E+02 180 | 3.560000E+00 1.041258E+02 181 | 3.580000E+00 1.021361E+02 182 | 3.600000E+00 1.002231E+02 183 | 3.620000E+00 9.838228E+01 184 | 3.640000E+00 9.660959E+01 185 | 3.660000E+00 9.490108E+01 186 | 3.680000E+00 9.325308E+01 187 | 3.700000E+00 9.166212E+01 188 | 3.720000E+00 9.012491E+01 189 | 3.740000E+00 8.863837E+01 190 | 3.760000E+00 8.719962E+01 191 | 3.780000E+00 8.580591E+01 192 | 3.800000E+00 8.445468E+01 193 | 3.820000E+00 8.314352E+01 194 | 3.840000E+00 8.187015E+01 195 | 3.860000E+00 8.063245E+01 196 | 3.880000E+00 7.942841E+01 197 | 3.900000E+00 7.825617E+01 198 | 3.920000E+00 7.711395E+01 199 | 3.940000E+00 7.600012E+01 200 | 3.960000E+00 7.491312E+01 201 | 3.980000E+00 7.385151E+01 202 | 4.000000E+00 7.281395E+01 203 | 4.020000E+00 7.179915E+01 204 | 4.040000E+00 7.080594E+01 205 | 4.060000E+00 6.983320E+01 206 | 4.080000E+00 6.887992E+01 207 | 4.100000E+00 6.794511E+01 208 | 4.120000E+00 6.702788E+01 209 | 4.140000E+00 6.612737E+01 210 | 4.160000E+00 6.524281E+01 211 | 4.180000E+00 6.437346E+01 212 | 4.200000E+00 6.351863E+01 213 | 4.220000E+00 6.267768E+01 214 | 4.240000E+00 6.185001E+01 215 | 4.260000E+00 6.103506E+01 216 | 4.280000E+00 6.023231E+01 217 | 4.300000E+00 5.944128E+01 218 | 4.320000E+00 5.866151E+01 219 | 4.340000E+00 5.789258E+01 220 | 4.360000E+00 5.713410E+01 221 | 4.380000E+00 5.638570E+01 222 | 4.400000E+00 5.564705E+01 223 | 4.420000E+00 5.491781E+01 224 | 4.440000E+00 5.419770E+01 225 | 4.460000E+00 5.348645E+01 226 | 4.480000E+00 5.278379E+01 227 | 4.500000E+00 5.208950E+01 228 | 4.520000E+00 5.140335E+01 229 | 4.540000E+00 5.072514E+01 230 | 4.560000E+00 5.005468E+01 231 | 4.580000E+00 4.939180E+01 232 | 4.600000E+00 4.873633E+01 233 | 4.620000E+00 4.808813E+01 234 | 4.640000E+00 4.744706E+01 235 | 4.660000E+00 4.681299E+01 236 | 4.680000E+00 4.618579E+01 237 | 4.700000E+00 4.556537E+01 238 | 4.720000E+00 4.495161E+01 239 | 4.740000E+00 4.434443E+01 240 | 4.760000E+00 4.374373E+01 241 | 4.780000E+00 4.314944E+01 242 | 4.800000E+00 4.256148E+01 243 | 4.820000E+00 4.197977E+01 244 | 4.840000E+00 4.140426E+01 245 | 4.860000E+00 4.083488E+01 246 | 4.880000E+00 4.027157E+01 247 | 4.900000E+00 3.971428E+01 248 | 4.920000E+00 3.916296E+01 249 | 4.940000E+00 3.861756E+01 250 | 4.960000E+00 3.807804E+01 251 | 4.980000E+00 3.754435E+01 252 | 5.000000E+00 3.701646E+01 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/N.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 6.816022E+03 3 | 2.000000E-02 6.897155E+03 4 | 4.000000E-02 7.139068E+03 5 | 6.000000E-02 7.537339E+03 6 | 8.000000E-02 8.084725E+03 7 | 1.000000E-01 8.771337E+03 8 | 1.200000E-01 9.584888E+03 9 | 1.400000E-01 1.051099E+04 10 | 1.600000E-01 1.153352E+04 11 | 1.800000E-01 1.263495E+04 12 | 2.000000E-01 1.379683E+04 13 | 2.200000E-01 1.500012E+04 14 | 2.400000E-01 1.622567E+04 15 | 2.600000E-01 1.745459E+04 16 | 2.800000E-01 1.866863E+04 17 | 3.000000E-01 1.985053E+04 18 | 3.200000E-01 2.098432E+04 19 | 3.400000E-01 2.205555E+04 20 | 3.600000E-01 2.305154E+04 21 | 3.800000E-01 2.396147E+04 22 | 4.000000E-01 2.477653E+04 23 | 4.200000E-01 2.548991E+04 24 | 4.400000E-01 2.609678E+04 25 | 4.600000E-01 2.659429E+04 26 | 4.800000E-01 2.698141E+04 27 | 5.000000E-01 2.725881E+04 28 | 5.200000E-01 2.742873E+04 29 | 5.400000E-01 2.749475E+04 30 | 5.600000E-01 2.746161E+04 31 | 5.800000E-01 2.733504E+04 32 | 6.000000E-01 2.712150E+04 33 | 6.200000E-01 2.682804E+04 34 | 6.400000E-01 2.646207E+04 35 | 6.600000E-01 2.603121E+04 36 | 6.800000E-01 2.554314E+04 37 | 7.000000E-01 2.500544E+04 38 | 7.200000E-01 2.442551E+04 39 | 7.400000E-01 2.381042E+04 40 | 7.600000E-01 2.316688E+04 41 | 7.800000E-01 2.250118E+04 42 | 8.000000E-01 2.181913E+04 43 | 8.200000E-01 2.112602E+04 44 | 8.400000E-01 2.042666E+04 45 | 8.600000E-01 1.972535E+04 46 | 8.800000E-01 1.902589E+04 47 | 9.000000E-01 1.833160E+04 48 | 9.200000E-01 1.764535E+04 49 | 9.400000E-01 1.696959E+04 50 | 9.600000E-01 1.630637E+04 51 | 9.800000E-01 1.565740E+04 52 | 1.000000E+00 1.502404E+04 53 | 1.020000E+00 1.440736E+04 54 | 1.040000E+00 1.380820E+04 55 | 1.060000E+00 1.322714E+04 56 | 1.080000E+00 1.266457E+04 57 | 1.100000E+00 1.212070E+04 58 | 1.120000E+00 1.159561E+04 59 | 1.140000E+00 1.108924E+04 60 | 1.160000E+00 1.060143E+04 61 | 1.180000E+00 1.013193E+04 62 | 1.200000E+00 9.680423E+03 63 | 1.220000E+00 9.246542E+03 64 | 1.240000E+00 8.829872E+03 65 | 1.260000E+00 8.429966E+03 66 | 1.280000E+00 8.046358E+03 67 | 1.300000E+00 7.678564E+03 68 | 1.320000E+00 7.326094E+03 69 | 1.340000E+00 6.988456E+03 70 | 1.360000E+00 6.665155E+03 71 | 1.380000E+00 6.355706E+03 72 | 1.400000E+00 6.059626E+03 73 | 1.420000E+00 5.776442E+03 74 | 1.440000E+00 5.505691E+03 75 | 1.460000E+00 5.246921E+03 76 | 1.480000E+00 4.999687E+03 77 | 1.500000E+00 4.763557E+03 78 | 1.520000E+00 4.538110E+03 79 | 1.540000E+00 4.322934E+03 80 | 1.560000E+00 4.117628E+03 81 | 1.580000E+00 3.921799E+03 82 | 1.600000E+00 3.735066E+03 83 | 1.620000E+00 3.557055E+03 84 | 1.640000E+00 3.387403E+03 85 | 1.660000E+00 3.225758E+03 86 | 1.680000E+00 3.071773E+03 87 | 1.700000E+00 2.925114E+03 88 | 1.720000E+00 2.785456E+03 89 | 1.740000E+00 2.652483E+03 90 | 1.760000E+00 2.525890E+03 91 | 1.780000E+00 2.405383E+03 92 | 1.800000E+00 2.290675E+03 93 | 1.820000E+00 2.181493E+03 94 | 1.840000E+00 2.077574E+03 95 | 1.860000E+00 1.978665E+03 96 | 1.880000E+00 1.884524E+03 97 | 1.900000E+00 1.794919E+03 98 | 1.920000E+00 1.709630E+03 99 | 1.940000E+00 1.628446E+03 100 | 1.960000E+00 1.551168E+03 101 | 1.980000E+00 1.477605E+03 102 | 2.000000E+00 1.407576E+03 103 | 2.020000E+00 1.340910E+03 104 | 2.040000E+00 1.277444E+03 105 | 2.060000E+00 1.217023E+03 106 | 2.080000E+00 1.159503E+03 107 | 2.100000E+00 1.104743E+03 108 | 2.120000E+00 1.052611E+03 109 | 2.140000E+00 1.002983E+03 110 | 2.160000E+00 9.557402E+02 111 | 2.180000E+00 9.107682E+02 112 | 2.200000E+00 8.679596E+02 113 | 2.220000E+00 8.272117E+02 114 | 2.240000E+00 7.884263E+02 115 | 2.260000E+00 7.515098E+02 116 | 2.280000E+00 7.163728E+02 117 | 2.300000E+00 6.829298E+02 118 | 2.320000E+00 6.510990E+02 119 | 2.340000E+00 6.208022E+02 120 | 2.360000E+00 5.919647E+02 121 | 2.380000E+00 5.645151E+02 122 | 2.400000E+00 5.383850E+02 123 | 2.420000E+00 5.135092E+02 124 | 2.440000E+00 4.898255E+02 125 | 2.460000E+00 4.672747E+02 126 | 2.480000E+00 4.458002E+02 127 | 2.500000E+00 4.253482E+02 128 | 2.520000E+00 4.058678E+02 129 | 2.540000E+00 3.873104E+02 130 | 2.560000E+00 3.696301E+02 131 | 2.580000E+00 3.527832E+02 132 | 2.600000E+00 3.367285E+02 133 | 2.620000E+00 3.214271E+02 134 | 2.640000E+00 3.068419E+02 135 | 2.660000E+00 2.929383E+02 136 | 2.680000E+00 2.796830E+02 137 | 2.700000E+00 2.670451E+02 138 | 2.720000E+00 2.549950E+02 139 | 2.740000E+00 2.435048E+02 140 | 2.760000E+00 2.325481E+02 141 | 2.780000E+00 2.220997E+02 142 | 2.800000E+00 2.121360E+02 143 | 2.820000E+00 2.026343E+02 144 | 2.840000E+00 1.935731E+02 145 | 2.860000E+00 1.849319E+02 146 | 2.880000E+00 1.766911E+02 147 | 2.900000E+00 1.688320E+02 148 | 2.920000E+00 1.613368E+02 149 | 2.940000E+00 1.541885E+02 150 | 2.960000E+00 1.473706E+02 151 | 2.980000E+00 1.408675E+02 152 | 3.000000E+00 1.346642E+02 153 | 3.020000E+00 1.287464E+02 154 | 3.040000E+00 1.231004E+02 155 | 3.060000E+00 1.177131E+02 156 | 3.080000E+00 1.125719E+02 157 | 3.100000E+00 1.076649E+02 158 | 3.120000E+00 1.029808E+02 159 | 3.140000E+00 9.850865E+01 160 | 3.160000E+00 9.423824E+01 161 | 3.180000E+00 9.015979E+01 162 | 3.200000E+00 8.626406E+01 163 | 3.220000E+00 8.254227E+01 164 | 3.240000E+00 7.898614E+01 165 | 3.260000E+00 7.558785E+01 166 | 3.280000E+00 7.234000E+01 167 | 3.300000E+00 6.923560E+01 168 | 3.320000E+00 6.626805E+01 169 | 3.340000E+00 6.343113E+01 170 | 3.360000E+00 6.071893E+01 171 | 3.380000E+00 5.812589E+01 172 | 3.400000E+00 5.564670E+01 173 | 3.420000E+00 5.327634E+01 174 | 3.440000E+00 5.101005E+01 175 | 3.460000E+00 4.884327E+01 176 | 3.480000E+00 4.677165E+01 177 | 3.500000E+00 4.479103E+01 178 | 3.520000E+00 4.289744E+01 179 | 3.540000E+00 4.108705E+01 180 | 3.560000E+00 3.935619E+01 181 | 3.580000E+00 3.770132E+01 182 | 3.600000E+00 3.611905E+01 183 | 3.620000E+00 3.460611E+01 184 | 3.640000E+00 3.315934E+01 185 | 3.660000E+00 3.177571E+01 186 | 3.680000E+00 3.045233E+01 187 | 3.700000E+00 2.918639E+01 188 | 3.720000E+00 2.797523E+01 189 | 3.740000E+00 2.681628E+01 190 | 3.760000E+00 2.570709E+01 191 | 3.780000E+00 2.464535E+01 192 | 3.800000E+00 2.362885E+01 193 | 3.820000E+00 2.265546E+01 194 | 3.840000E+00 2.172322E+01 195 | 3.860000E+00 2.083024E+01 196 | 3.880000E+00 1.997474E+01 197 | 3.900000E+00 1.915504E+01 198 | 3.920000E+00 1.836956E+01 199 | 3.940000E+00 1.761681E+01 200 | 3.960000E+00 1.689540E+01 201 | 3.980000E+00 1.620398E+01 202 | 4.000000E+00 1.554131E+01 203 | 4.020000E+00 1.490620E+01 204 | 4.040000E+00 1.429753E+01 205 | 4.060000E+00 1.371422E+01 206 | 4.080000E+00 1.315524E+01 207 | 4.100000E+00 1.261963E+01 208 | 4.120000E+00 1.210643E+01 209 | 4.140000E+00 1.161474E+01 210 | 4.160000E+00 1.114369E+01 211 | 4.180000E+00 1.069243E+01 212 | 4.200000E+00 1.026014E+01 213 | 4.220000E+00 9.846024E+00 214 | 4.240000E+00 9.449307E+00 215 | 4.260000E+00 9.069242E+00 216 | 4.280000E+00 8.705101E+00 217 | 4.300000E+00 8.356182E+00 218 | 4.320000E+00 8.021805E+00 219 | 4.340000E+00 7.701315E+00 220 | 4.360000E+00 7.394079E+00 221 | 4.380000E+00 7.099495E+00 222 | 4.400000E+00 6.816983E+00 223 | 4.420000E+00 6.545992E+00 224 | 4.440000E+00 6.285999E+00 225 | 4.460000E+00 6.036509E+00 226 | 4.480000E+00 5.797051E+00 227 | 4.500000E+00 5.567184E+00 228 | 4.520000E+00 5.346495E+00 229 | 4.540000E+00 5.134591E+00 230 | 4.560000E+00 4.931108E+00 231 | 4.580000E+00 4.735702E+00 232 | 4.600000E+00 4.548051E+00 233 | 4.620000E+00 4.367851E+00 234 | 4.640000E+00 4.194817E+00 235 | 4.660000E+00 4.028677E+00 236 | 4.680000E+00 3.869175E+00 237 | 4.700000E+00 3.716065E+00 238 | 4.720000E+00 3.569112E+00 239 | 4.740000E+00 3.428088E+00 240 | 4.760000E+00 3.292774E+00 241 | 4.780000E+00 3.162955E+00 242 | 4.800000E+00 3.038423E+00 243 | 4.820000E+00 2.918974E+00 244 | 4.840000E+00 2.804408E+00 245 | 4.860000E+00 2.694527E+00 246 | 4.880000E+00 2.589138E+00 247 | 4.900000E+00 2.488054E+00 248 | 4.920000E+00 2.391089E+00 249 | 4.940000E+00 2.298063E+00 250 | 4.960000E+00 2.208800E+00 251 | 4.980000E+00 2.123131E+00 252 | 5.000000E+00 2.040892E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/O.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 1.041043E+04 3 | 2.000000E-02 1.058695E+04 4 | 4.000000E-02 1.111292E+04 5 | 6.000000E-02 1.197765E+04 6 | 8.000000E-02 1.316364E+04 7 | 1.000000E-01 1.464705E+04 8 | 1.200000E-01 1.639832E+04 9 | 1.400000E-01 1.838297E+04 10 | 1.600000E-01 2.056245E+04 11 | 1.800000E-01 2.289513E+04 12 | 2.000000E-01 2.533734E+04 13 | 2.200000E-01 2.784441E+04 14 | 2.400000E-01 3.037173E+04 15 | 2.600000E-01 3.287572E+04 16 | 2.800000E-01 3.531479E+04 17 | 3.000000E-01 3.765017E+04 18 | 3.200000E-01 3.984662E+04 19 | 3.400000E-01 4.187304E+04 20 | 3.600000E-01 4.370292E+04 21 | 3.800000E-01 4.531464E+04 22 | 4.000000E-01 4.669161E+04 23 | 4.200000E-01 4.782235E+04 24 | 4.400000E-01 4.870034E+04 25 | 4.600000E-01 4.932378E+04 26 | 4.800000E-01 4.969531E+04 27 | 5.000000E-01 4.982158E+04 28 | 5.200000E-01 4.971276E+04 29 | 5.400000E-01 4.938204E+04 30 | 5.600000E-01 4.884508E+04 31 | 5.800000E-01 4.811949E+04 32 | 6.000000E-01 4.722424E+04 33 | 6.200000E-01 4.617919E+04 34 | 6.400000E-01 4.500457E+04 35 | 6.600000E-01 4.372060E+04 36 | 6.800000E-01 4.234704E+04 37 | 7.000000E-01 4.090294E+04 38 | 7.200000E-01 3.940629E+04 39 | 7.400000E-01 3.787389E+04 40 | 7.600000E-01 3.632114E+04 41 | 7.800000E-01 3.476196E+04 42 | 8.000000E-01 3.320873E+04 43 | 8.200000E-01 3.167228E+04 44 | 8.400000E-01 3.016192E+04 45 | 8.600000E-01 2.868546E+04 46 | 8.800000E-01 2.724934E+04 47 | 9.000000E-01 2.585867E+04 48 | 9.200000E-01 2.451736E+04 49 | 9.400000E-01 2.322827E+04 50 | 9.600000E-01 2.199324E+04 51 | 9.800000E-01 2.081329E+04 52 | 1.000000E+00 1.968872E+04 53 | 1.020000E+00 1.861917E+04 54 | 1.040000E+00 1.760380E+04 55 | 1.060000E+00 1.664131E+04 56 | 1.080000E+00 1.573011E+04 57 | 1.100000E+00 1.486833E+04 58 | 1.120000E+00 1.405393E+04 59 | 1.140000E+00 1.328473E+04 60 | 1.160000E+00 1.255851E+04 61 | 1.180000E+00 1.187301E+04 62 | 1.200000E+00 1.122599E+04 63 | 1.220000E+00 1.061527E+04 64 | 1.240000E+00 1.003871E+04 65 | 1.260000E+00 9.494287E+03 66 | 1.280000E+00 8.980061E+03 67 | 1.300000E+00 8.494207E+03 68 | 1.320000E+00 8.035014E+03 69 | 1.340000E+00 7.600882E+03 70 | 1.360000E+00 7.190325E+03 71 | 1.380000E+00 6.801967E+03 72 | 1.400000E+00 6.434531E+03 73 | 1.420000E+00 6.086839E+03 74 | 1.440000E+00 5.757800E+03 75 | 1.460000E+00 5.446405E+03 76 | 1.480000E+00 5.151716E+03 77 | 1.500000E+00 4.872859E+03 78 | 1.520000E+00 4.609020E+03 79 | 1.540000E+00 4.359433E+03 80 | 1.560000E+00 4.123378E+03 81 | 1.580000E+00 3.900171E+03 82 | 1.600000E+00 3.689165E+03 83 | 1.620000E+00 3.489742E+03 84 | 1.640000E+00 3.301311E+03 85 | 1.660000E+00 3.123304E+03 86 | 1.680000E+00 2.955177E+03 87 | 1.700000E+00 2.796408E+03 88 | 1.720000E+00 2.646495E+03 89 | 1.740000E+00 2.504953E+03 90 | 1.760000E+00 2.371319E+03 91 | 1.780000E+00 2.245149E+03 92 | 1.800000E+00 2.126019E+03 93 | 1.820000E+00 2.013522E+03 94 | 1.840000E+00 1.907273E+03 95 | 1.860000E+00 1.806906E+03 96 | 1.880000E+00 1.712074E+03 97 | 1.900000E+00 1.622449E+03 98 | 1.920000E+00 1.537724E+03 99 | 1.940000E+00 1.457608E+03 100 | 1.960000E+00 1.381832E+03 101 | 1.980000E+00 1.310141E+03 102 | 2.000000E+00 1.242298E+03 103 | 2.020000E+00 1.178083E+03 104 | 2.040000E+00 1.117290E+03 105 | 2.060000E+00 1.059727E+03 106 | 2.080000E+00 1.005216E+03 107 | 2.100000E+00 9.535900E+02 108 | 2.120000E+00 9.046930E+02 109 | 2.140000E+00 8.583795E+02 110 | 2.160000E+00 8.145128E+02 111 | 2.180000E+00 7.729646E+02 112 | 2.200000E+00 7.336138E+02 113 | 2.220000E+00 6.963459E+02 114 | 2.240000E+00 6.610527E+02 115 | 2.260000E+00 6.276310E+02 116 | 2.280000E+00 5.959830E+02 117 | 2.300000E+00 5.660152E+02 118 | 2.320000E+00 5.376383E+02 119 | 2.340000E+00 5.107673E+02 120 | 2.360000E+00 4.853208E+02 121 | 2.380000E+00 4.612209E+02 122 | 2.400000E+00 4.383935E+02 123 | 2.420000E+00 4.167678E+02 124 | 2.440000E+00 3.962764E+02 125 | 2.460000E+00 3.768553E+02 126 | 2.480000E+00 3.584438E+02 127 | 2.500000E+00 3.409845E+02 128 | 2.520000E+00 3.244232E+02 129 | 2.540000E+00 3.087087E+02 130 | 2.560000E+00 2.937933E+02 131 | 2.580000E+00 2.796319E+02 132 | 2.600000E+00 2.661824E+02 133 | 2.620000E+00 2.534057E+02 134 | 2.640000E+00 2.412650E+02 135 | 2.660000E+00 2.297261E+02 136 | 2.680000E+00 2.187573E+02 137 | 2.700000E+00 2.083289E+02 138 | 2.720000E+00 1.984132E+02 139 | 2.740000E+00 1.889843E+02 140 | 2.760000E+00 1.800180E+02 141 | 2.780000E+00 1.714915E+02 142 | 2.800000E+00 1.633835E+02 143 | 2.820000E+00 1.556738E+02 144 | 2.840000E+00 1.483431E+02 145 | 2.860000E+00 1.413732E+02 146 | 2.880000E+00 1.347468E+02 147 | 2.900000E+00 1.284473E+02 148 | 2.920000E+00 1.224587E+02 149 | 2.940000E+00 1.167657E+02 150 | 2.960000E+00 1.113537E+02 151 | 2.980000E+00 1.062084E+02 152 | 3.000000E+00 1.013163E+02 153 | 3.020000E+00 9.666435E+01 154 | 3.040000E+00 9.223992E+01 155 | 3.060000E+00 8.803104E+01 156 | 3.080000E+00 8.402620E+01 157 | 3.100000E+00 8.021447E+01 158 | 3.120000E+00 7.658543E+01 159 | 3.140000E+00 7.312922E+01 160 | 3.160000E+00 6.983652E+01 161 | 3.180000E+00 6.669857E+01 162 | 3.200000E+00 6.370711E+01 163 | 3.220000E+00 6.085446E+01 164 | 3.240000E+00 5.813338E+01 165 | 3.260000E+00 5.553719E+01 166 | 3.280000E+00 5.305962E+01 167 | 3.300000E+00 5.069485E+01 168 | 3.320000E+00 4.843748E+01 169 | 3.340000E+00 4.628247E+01 170 | 3.360000E+00 4.422511E+01 171 | 3.380000E+00 4.226101E+01 172 | 3.400000E+00 4.038604E+01 173 | 3.420000E+00 3.859631E+01 174 | 3.440000E+00 3.688814E+01 175 | 3.460000E+00 3.525801E+01 176 | 3.480000E+00 3.370257E+01 177 | 3.500000E+00 3.221860E+01 178 | 3.520000E+00 3.080300E+01 179 | 3.540000E+00 2.945274E+01 180 | 3.560000E+00 2.816492E+01 181 | 3.580000E+00 2.693669E+01 182 | 3.600000E+00 2.576530E+01 183 | 3.620000E+00 2.464804E+01 184 | 3.640000E+00 2.358232E+01 185 | 3.660000E+00 2.256559E+01 186 | 3.680000E+00 2.159541E+01 187 | 3.700000E+00 2.066942E+01 188 | 3.720000E+00 1.978535E+01 189 | 3.740000E+00 1.894103E+01 190 | 3.760000E+00 1.813439E+01 191 | 3.780000E+00 1.736347E+01 192 | 3.800000E+00 1.662643E+01 193 | 3.820000E+00 1.592152E+01 194 | 3.840000E+00 1.524713E+01 195 | 3.860000E+00 1.460173E+01 196 | 3.880000E+00 1.398392E+01 197 | 3.900000E+00 1.339239E+01 198 | 3.920000E+00 1.282594E+01 199 | 3.940000E+00 1.228346E+01 200 | 3.960000E+00 1.176390E+01 201 | 3.980000E+00 1.126632E+01 202 | 4.000000E+00 1.078982E+01 203 | 4.020000E+00 1.033357E+01 204 | 4.040000E+00 9.896778E+00 205 | 4.060000E+00 9.478713E+00 206 | 4.080000E+00 9.078661E+00 207 | 4.100000E+00 8.695941E+00 208 | 4.120000E+00 8.329891E+00 209 | 4.140000E+00 7.979866E+00 210 | 4.160000E+00 7.645234E+00 211 | 4.180000E+00 7.325373E+00 212 | 4.200000E+00 7.019667E+00 213 | 4.220000E+00 6.727509E+00 214 | 4.240000E+00 6.448301E+00 215 | 4.260000E+00 6.181449E+00 216 | 4.280000E+00 5.926375E+00 217 | 4.300000E+00 5.682507E+00 218 | 4.320000E+00 5.449293E+00 219 | 4.340000E+00 5.226193E+00 220 | 4.360000E+00 5.012691E+00 221 | 4.380000E+00 4.808291E+00 222 | 4.400000E+00 4.612519E+00 223 | 4.420000E+00 4.424931E+00 224 | 4.440000E+00 4.245106E+00 225 | 4.460000E+00 4.072655E+00 226 | 4.480000E+00 3.907214E+00 227 | 4.500000E+00 3.748450E+00 228 | 4.520000E+00 3.596055E+00 229 | 4.540000E+00 3.449748E+00 230 | 4.560000E+00 3.309272E+00 231 | 4.580000E+00 3.174393E+00 232 | 4.600000E+00 3.044898E+00 233 | 4.620000E+00 2.920589E+00 234 | 4.640000E+00 2.801284E+00 235 | 4.660000E+00 2.686813E+00 236 | 4.680000E+00 2.577017E+00 237 | 4.700000E+00 2.471744E+00 238 | 4.720000E+00 2.370844E+00 239 | 4.740000E+00 2.274174E+00 240 | 4.760000E+00 2.181591E+00 241 | 4.780000E+00 2.092952E+00 242 | 4.800000E+00 2.008114E+00 243 | 4.820000E+00 1.926933E+00 244 | 4.840000E+00 1.849263E+00 245 | 4.860000E+00 1.774958E+00 246 | 4.880000E+00 1.703871E+00 247 | 4.900000E+00 1.635853E+00 248 | 4.920000E+00 1.570759E+00 249 | 4.940000E+00 1.508445E+00 250 | 4.960000E+00 1.448767E+00 251 | 4.980000E+00 1.391588E+00 252 | 5.000000E+00 1.336776E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/P.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 2.681743E+01 3 | 2.000000E-02 2.922727E+01 4 | 4.000000E-02 3.646089E+01 5 | 6.000000E-02 4.853050E+01 6 | 8.000000E-02 6.545601E+01 7 | 1.000000E-01 8.726441E+01 8 | 1.200000E-01 1.139889E+02 9 | 1.400000E-01 1.456679E+02 10 | 1.600000E-01 1.823433E+02 11 | 1.800000E-01 2.240597E+02 12 | 2.000000E-01 2.708617E+02 13 | 2.200000E-01 3.227928E+02 14 | 2.400000E-01 3.798927E+02 15 | 2.600000E-01 4.421957E+02 16 | 2.800000E-01 5.097276E+02 17 | 3.000000E-01 5.825040E+02 18 | 3.200000E-01 6.605276E+02 19 | 3.400000E-01 7.437856E+02 20 | 3.600000E-01 8.322476E+02 21 | 3.800000E-01 9.258629E+02 22 | 4.000000E-01 1.024559E+03 23 | 4.200000E-01 1.128238E+03 24 | 4.400000E-01 1.236777E+03 25 | 4.600000E-01 1.350024E+03 26 | 4.800000E-01 1.467800E+03 27 | 5.000000E-01 1.589894E+03 28 | 5.200000E-01 1.716064E+03 29 | 5.400000E-01 1.846038E+03 30 | 5.600000E-01 1.979511E+03 31 | 5.800000E-01 2.116150E+03 32 | 6.000000E-01 2.255589E+03 33 | 6.200000E-01 2.397434E+03 34 | 6.400000E-01 2.541265E+03 35 | 6.600000E-01 2.686635E+03 36 | 6.800000E-01 2.833075E+03 37 | 7.000000E-01 2.980095E+03 38 | 7.200000E-01 3.127187E+03 39 | 7.400000E-01 3.273830E+03 40 | 7.600000E-01 3.419490E+03 41 | 7.800000E-01 3.563627E+03 42 | 8.000000E-01 3.705698E+03 43 | 8.200000E-01 3.845160E+03 44 | 8.400000E-01 3.981474E+03 45 | 8.600000E-01 4.114110E+03 46 | 8.800000E-01 4.242551E+03 47 | 9.000000E-01 4.366296E+03 48 | 9.200000E-01 4.484864E+03 49 | 9.400000E-01 4.597801E+03 50 | 9.600000E-01 4.704679E+03 51 | 9.800000E-01 4.805101E+03 52 | 1.000000E+00 4.898705E+03 53 | 1.020000E+00 4.985168E+03 54 | 1.040000E+00 5.064203E+03 55 | 1.060000E+00 5.135569E+03 56 | 1.080000E+00 5.199064E+03 57 | 1.100000E+00 5.254534E+03 58 | 1.120000E+00 5.301869E+03 59 | 1.140000E+00 5.341005E+03 60 | 1.160000E+00 5.371922E+03 61 | 1.180000E+00 5.394647E+03 62 | 1.200000E+00 5.409249E+03 63 | 1.220000E+00 5.415839E+03 64 | 1.240000E+00 5.414569E+03 65 | 1.260000E+00 5.405629E+03 66 | 1.280000E+00 5.389243E+03 67 | 1.300000E+00 5.365668E+03 68 | 1.320000E+00 5.335190E+03 69 | 1.340000E+00 5.298119E+03 70 | 1.360000E+00 5.254790E+03 71 | 1.380000E+00 5.205554E+03 72 | 1.400000E+00 5.150777E+03 73 | 1.420000E+00 5.090837E+03 74 | 1.440000E+00 5.026120E+03 75 | 1.460000E+00 4.957015E+03 76 | 1.480000E+00 4.883911E+03 77 | 1.500000E+00 4.807197E+03 78 | 1.520000E+00 4.727256E+03 79 | 1.540000E+00 4.644464E+03 80 | 1.560000E+00 4.559185E+03 81 | 1.580000E+00 4.471775E+03 82 | 1.600000E+00 4.382572E+03 83 | 1.620000E+00 4.291902E+03 84 | 1.640000E+00 4.200073E+03 85 | 1.660000E+00 4.107378E+03 86 | 1.680000E+00 4.014090E+03 87 | 1.700000E+00 3.920465E+03 88 | 1.720000E+00 3.826742E+03 89 | 1.740000E+00 3.733140E+03 90 | 1.760000E+00 3.639861E+03 91 | 1.780000E+00 3.547090E+03 92 | 1.800000E+00 3.454994E+03 93 | 1.820000E+00 3.363725E+03 94 | 1.840000E+00 3.273419E+03 95 | 1.860000E+00 3.184197E+03 96 | 1.880000E+00 3.096166E+03 97 | 1.900000E+00 3.009422E+03 98 | 1.920000E+00 2.924045E+03 99 | 1.940000E+00 2.840107E+03 100 | 1.960000E+00 2.757669E+03 101 | 1.980000E+00 2.676782E+03 102 | 2.000000E+00 2.597487E+03 103 | 2.020000E+00 2.519818E+03 104 | 2.040000E+00 2.443804E+03 105 | 2.060000E+00 2.369463E+03 106 | 2.080000E+00 2.296810E+03 107 | 2.100000E+00 2.225853E+03 108 | 2.120000E+00 2.156596E+03 109 | 2.140000E+00 2.089038E+03 110 | 2.160000E+00 2.023174E+03 111 | 2.180000E+00 1.958997E+03 112 | 2.200000E+00 1.896493E+03 113 | 2.220000E+00 1.835650E+03 114 | 2.240000E+00 1.776448E+03 115 | 2.260000E+00 1.718870E+03 116 | 2.280000E+00 1.662893E+03 117 | 2.300000E+00 1.608494E+03 118 | 2.320000E+00 1.555649E+03 119 | 2.340000E+00 1.504330E+03 120 | 2.360000E+00 1.454511E+03 121 | 2.380000E+00 1.406162E+03 122 | 2.400000E+00 1.359256E+03 123 | 2.420000E+00 1.313761E+03 124 | 2.440000E+00 1.269648E+03 125 | 2.460000E+00 1.226885E+03 126 | 2.480000E+00 1.185441E+03 127 | 2.500000E+00 1.145285E+03 128 | 2.520000E+00 1.106386E+03 129 | 2.540000E+00 1.068712E+03 130 | 2.560000E+00 1.032232E+03 131 | 2.580000E+00 9.969149E+02 132 | 2.600000E+00 9.627303E+02 133 | 2.620000E+00 9.296478E+02 134 | 2.640000E+00 8.976373E+02 135 | 2.660000E+00 8.666692E+02 136 | 2.680000E+00 8.367144E+02 137 | 2.700000E+00 8.077443E+02 138 | 2.720000E+00 7.797307E+02 139 | 2.740000E+00 7.526461E+02 140 | 2.760000E+00 7.264634E+02 141 | 2.780000E+00 7.011561E+02 142 | 2.800000E+00 6.766981E+02 143 | 2.820000E+00 6.530640E+02 144 | 2.840000E+00 6.302290E+02 145 | 2.860000E+00 6.081687E+02 146 | 2.880000E+00 5.868593E+02 147 | 2.900000E+00 5.662775E+02 148 | 2.920000E+00 5.464006E+02 149 | 2.940000E+00 5.272064E+02 150 | 2.960000E+00 5.086731E+02 151 | 2.980000E+00 4.907798E+02 152 | 3.000000E+00 4.735056E+02 153 | 3.020000E+00 4.568306E+02 154 | 3.040000E+00 4.407351E+02 155 | 3.060000E+00 4.252000E+02 156 | 3.080000E+00 4.102068E+02 157 | 3.100000E+00 3.957374E+02 158 | 3.120000E+00 3.817744E+02 159 | 3.140000E+00 3.683005E+02 160 | 3.160000E+00 3.552994E+02 161 | 3.180000E+00 3.427550E+02 162 | 3.200000E+00 3.306517E+02 163 | 3.220000E+00 3.189746E+02 164 | 3.240000E+00 3.077089E+02 165 | 3.260000E+00 2.968406E+02 166 | 3.280000E+00 2.863560E+02 167 | 3.300000E+00 2.762420E+02 168 | 3.320000E+00 2.664857E+02 169 | 3.340000E+00 2.570748E+02 170 | 3.360000E+00 2.479974E+02 171 | 3.380000E+00 2.392420E+02 172 | 3.400000E+00 2.307973E+02 173 | 3.420000E+00 2.226527E+02 174 | 3.440000E+00 2.147976E+02 175 | 3.460000E+00 2.072221E+02 176 | 3.480000E+00 1.999162E+02 177 | 3.500000E+00 1.928708E+02 178 | 3.520000E+00 1.860765E+02 179 | 3.540000E+00 1.795246E+02 180 | 3.560000E+00 1.732065E+02 181 | 3.580000E+00 1.671141E+02 182 | 3.600000E+00 1.612392E+02 183 | 3.620000E+00 1.555742E+02 184 | 3.640000E+00 1.501116E+02 185 | 3.660000E+00 1.448441E+02 186 | 3.680000E+00 1.397648E+02 187 | 3.700000E+00 1.348669E+02 188 | 3.720000E+00 1.301439E+02 189 | 3.740000E+00 1.255894E+02 190 | 3.760000E+00 1.211974E+02 191 | 3.780000E+00 1.169621E+02 192 | 3.800000E+00 1.128776E+02 193 | 3.820000E+00 1.089387E+02 194 | 3.840000E+00 1.051400E+02 195 | 3.860000E+00 1.014764E+02 196 | 3.880000E+00 9.794302E+01 197 | 3.900000E+00 9.453523E+01 198 | 3.920000E+00 9.124846E+01 199 | 3.940000E+00 8.807836E+01 200 | 3.960000E+00 8.502071E+01 201 | 3.980000E+00 8.207150E+01 202 | 4.000000E+00 7.922682E+01 203 | 4.020000E+00 7.648293E+01 204 | 4.040000E+00 7.383623E+01 205 | 4.060000E+00 7.128323E+01 206 | 4.080000E+00 6.882060E+01 207 | 4.100000E+00 6.644510E+01 208 | 4.120000E+00 6.415361E+01 209 | 4.140000E+00 6.194315E+01 210 | 4.160000E+00 5.981080E+01 211 | 4.180000E+00 5.775378E+01 212 | 4.200000E+00 5.576938E+01 213 | 4.220000E+00 5.385499E+01 214 | 4.240000E+00 5.200810E+01 215 | 4.260000E+00 5.022628E+01 216 | 4.280000E+00 4.850717E+01 217 | 4.300000E+00 4.684852E+01 218 | 4.320000E+00 4.524814E+01 219 | 4.340000E+00 4.370392E+01 220 | 4.360000E+00 4.221382E+01 221 | 4.380000E+00 4.077587E+01 222 | 4.400000E+00 3.938820E+01 223 | 4.420000E+00 3.804898E+01 224 | 4.440000E+00 3.675645E+01 225 | 4.460000E+00 3.550893E+01 226 | 4.480000E+00 3.430480E+01 227 | 4.500000E+00 3.314248E+01 228 | 4.520000E+00 3.202049E+01 229 | 4.540000E+00 3.093738E+01 230 | 4.560000E+00 2.989175E+01 231 | 4.580000E+00 2.888228E+01 232 | 4.600000E+00 2.790768E+01 233 | 4.620000E+00 2.696672E+01 234 | 4.640000E+00 2.605822E+01 235 | 4.660000E+00 2.518103E+01 236 | 4.680000E+00 2.433406E+01 237 | 4.700000E+00 2.351624E+01 238 | 4.720000E+00 2.272656E+01 239 | 4.740000E+00 2.196404E+01 240 | 4.760000E+00 2.122772E+01 241 | 4.780000E+00 2.051670E+01 242 | 4.800000E+00 1.983008E+01 243 | 4.820000E+00 1.916702E+01 244 | 4.840000E+00 1.852669E+01 245 | 4.860000E+00 1.790830E+01 246 | 4.880000E+00 1.731107E+01 247 | 4.900000E+00 1.673426E+01 248 | 4.920000E+00 1.617715E+01 249 | 4.940000E+00 1.563904E+01 250 | 4.960000E+00 1.511926E+01 251 | 4.980000E+00 1.461717E+01 252 | 5.000000E+00 1.413214E+01 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/S.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 1.496187E+02 3 | 2.000000E-02 1.552089E+02 4 | 4.000000E-02 1.719799E+02 5 | 6.000000E-02 1.999327E+02 6 | 8.000000E-02 2.390677E+02 7 | 1.000000E-01 2.893841E+02 8 | 1.200000E-01 3.508771E+02 9 | 1.400000E-01 4.235363E+02 10 | 1.600000E-01 5.073425E+02 11 | 1.800000E-01 6.022647E+02 12 | 2.000000E-01 7.082565E+02 13 | 2.200000E-01 8.252522E+02 14 | 2.400000E-01 9.531629E+02 15 | 2.600000E-01 1.091872E+03 16 | 2.800000E-01 1.241232E+03 17 | 3.000000E-01 1.401058E+03 18 | 3.200000E-01 1.571126E+03 19 | 3.400000E-01 1.751170E+03 20 | 3.600000E-01 1.940872E+03 21 | 3.800000E-01 2.139868E+03 22 | 4.000000E-01 2.347738E+03 23 | 4.200000E-01 2.564006E+03 24 | 4.400000E-01 2.788140E+03 25 | 4.600000E-01 3.019549E+03 26 | 4.800000E-01 3.257583E+03 27 | 5.000000E-01 3.501537E+03 28 | 5.200000E-01 3.750644E+03 29 | 5.400000E-01 4.004088E+03 30 | 5.600000E-01 4.260998E+03 31 | 5.800000E-01 4.520457E+03 32 | 6.000000E-01 4.781504E+03 33 | 6.200000E-01 5.043140E+03 34 | 6.400000E-01 5.304333E+03 35 | 6.600000E-01 5.564029E+03 36 | 6.800000E-01 5.821151E+03 37 | 7.000000E-01 6.074616E+03 38 | 7.200000E-01 6.323335E+03 39 | 7.400000E-01 6.566227E+03 40 | 7.600000E-01 6.802224E+03 41 | 7.800000E-01 7.030282E+03 42 | 8.000000E-01 7.249388E+03 43 | 8.200000E-01 7.458571E+03 44 | 8.400000E-01 7.656908E+03 45 | 8.600000E-01 7.843532E+03 46 | 8.800000E-01 8.017641E+03 47 | 9.000000E-01 8.178505E+03 48 | 9.200000E-01 8.325471E+03 49 | 9.400000E-01 8.457972E+03 50 | 9.600000E-01 8.575527E+03 51 | 9.800000E-01 8.677749E+03 52 | 1.000000E+00 8.764346E+03 53 | 1.020000E+00 8.835123E+03 54 | 1.040000E+00 8.889985E+03 55 | 1.060000E+00 8.928934E+03 56 | 1.080000E+00 8.952068E+03 57 | 1.100000E+00 8.959581E+03 58 | 1.120000E+00 8.951758E+03 59 | 1.140000E+00 8.928970E+03 60 | 1.160000E+00 8.891670E+03 61 | 1.180000E+00 8.840384E+03 62 | 1.200000E+00 8.775710E+03 63 | 1.220000E+00 8.698303E+03 64 | 1.240000E+00 8.608873E+03 65 | 1.260000E+00 8.508173E+03 66 | 1.280000E+00 8.396992E+03 67 | 1.300000E+00 8.276146E+03 68 | 1.320000E+00 8.146470E+03 69 | 1.340000E+00 8.008806E+03 70 | 1.360000E+00 7.864002E+03 71 | 1.380000E+00 7.712897E+03 72 | 1.400000E+00 7.556318E+03 73 | 1.420000E+00 7.395072E+03 74 | 1.440000E+00 7.229942E+03 75 | 1.460000E+00 7.061679E+03 76 | 1.480000E+00 6.890998E+03 77 | 1.500000E+00 6.718578E+03 78 | 1.520000E+00 6.545055E+03 79 | 1.540000E+00 6.371022E+03 80 | 1.560000E+00 6.197028E+03 81 | 1.580000E+00 6.023574E+03 82 | 1.600000E+00 5.851119E+03 83 | 1.620000E+00 5.680076E+03 84 | 1.640000E+00 5.510812E+03 85 | 1.660000E+00 5.343655E+03 86 | 1.680000E+00 5.178891E+03 87 | 1.700000E+00 5.016768E+03 88 | 1.720000E+00 4.857497E+03 89 | 1.740000E+00 4.701257E+03 90 | 1.760000E+00 4.548196E+03 91 | 1.780000E+00 4.398434E+03 92 | 1.800000E+00 4.252065E+03 93 | 1.820000E+00 4.109161E+03 94 | 1.840000E+00 3.969772E+03 95 | 1.860000E+00 3.833931E+03 96 | 1.880000E+00 3.701656E+03 97 | 1.900000E+00 3.572949E+03 98 | 1.920000E+00 3.447803E+03 99 | 1.940000E+00 3.326199E+03 100 | 1.960000E+00 3.208108E+03 101 | 1.980000E+00 3.093496E+03 102 | 2.000000E+00 2.982323E+03 103 | 2.020000E+00 2.874540E+03 104 | 2.040000E+00 2.770098E+03 105 | 2.060000E+00 2.668942E+03 106 | 2.080000E+00 2.571014E+03 107 | 2.100000E+00 2.476253E+03 108 | 2.120000E+00 2.384598E+03 109 | 2.140000E+00 2.295983E+03 110 | 2.160000E+00 2.210342E+03 111 | 2.180000E+00 2.127608E+03 112 | 2.200000E+00 2.047712E+03 113 | 2.220000E+00 1.970584E+03 114 | 2.240000E+00 1.896154E+03 115 | 2.260000E+00 1.824350E+03 116 | 2.280000E+00 1.755102E+03 117 | 2.300000E+00 1.688337E+03 118 | 2.320000E+00 1.623984E+03 119 | 2.340000E+00 1.561970E+03 120 | 2.360000E+00 1.502224E+03 121 | 2.380000E+00 1.444675E+03 122 | 2.400000E+00 1.389253E+03 123 | 2.420000E+00 1.335888E+03 124 | 2.440000E+00 1.284511E+03 125 | 2.460000E+00 1.235055E+03 126 | 2.480000E+00 1.187454E+03 127 | 2.500000E+00 1.141643E+03 128 | 2.520000E+00 1.097559E+03 129 | 2.540000E+00 1.055142E+03 130 | 2.560000E+00 1.014330E+03 131 | 2.580000E+00 9.750675E+02 132 | 2.600000E+00 9.372971E+02 133 | 2.620000E+00 9.009651E+02 134 | 2.640000E+00 8.660193E+02 135 | 2.660000E+00 8.324093E+02 136 | 2.680000E+00 8.000866E+02 137 | 2.700000E+00 7.690042E+02 138 | 2.720000E+00 7.391171E+02 139 | 2.740000E+00 7.103817E+02 140 | 2.760000E+00 6.827562E+02 141 | 2.780000E+00 6.561999E+02 142 | 2.800000E+00 6.306739E+02 143 | 2.820000E+00 6.061403E+02 144 | 2.840000E+00 5.825627E+02 145 | 2.860000E+00 5.599058E+02 146 | 2.880000E+00 5.381353E+02 147 | 2.900000E+00 5.172181E+02 148 | 2.920000E+00 4.971221E+02 149 | 2.940000E+00 4.778163E+02 150 | 2.960000E+00 4.592703E+02 151 | 2.980000E+00 4.414551E+02 152 | 3.000000E+00 4.243422E+02 153 | 3.020000E+00 4.079042E+02 154 | 3.040000E+00 3.921146E+02 155 | 3.060000E+00 3.769476E+02 156 | 3.080000E+00 3.623786E+02 157 | 3.100000E+00 3.483835E+02 158 | 3.120000E+00 3.349393E+02 159 | 3.140000E+00 3.220239E+02 160 | 3.160000E+00 3.096159E+02 161 | 3.180000E+00 2.976948E+02 162 | 3.200000E+00 2.862409E+02 163 | 3.220000E+00 2.752355E+02 164 | 3.240000E+00 2.646606E+02 165 | 3.260000E+00 2.544989E+02 166 | 3.280000E+00 2.447340E+02 167 | 3.300000E+00 2.353501E+02 168 | 3.320000E+00 2.263321E+02 169 | 3.340000E+00 2.176658E+02 170 | 3.360000E+00 2.093373E+02 171 | 3.380000E+00 2.013335E+02 172 | 3.400000E+00 1.936418E+02 173 | 3.420000E+00 1.862501E+02 174 | 3.440000E+00 1.791469E+02 175 | 3.460000E+00 1.723210E+02 176 | 3.480000E+00 1.657617E+02 177 | 3.500000E+00 1.594588E+02 178 | 3.520000E+00 1.534022E+02 179 | 3.540000E+00 1.475825E+02 180 | 3.560000E+00 1.419903E+02 181 | 3.580000E+00 1.366168E+02 182 | 3.600000E+00 1.314533E+02 183 | 3.620000E+00 1.264915E+02 184 | 3.640000E+00 1.217233E+02 185 | 3.660000E+00 1.171410E+02 186 | 3.680000E+00 1.127371E+02 187 | 3.700000E+00 1.085043E+02 188 | 3.720000E+00 1.044357E+02 189 | 3.740000E+00 1.005246E+02 190 | 3.760000E+00 9.676449E+01 191 | 3.780000E+00 9.314930E+01 192 | 3.800000E+00 8.967307E+01 193 | 3.820000E+00 8.633014E+01 194 | 3.840000E+00 8.311510E+01 195 | 3.860000E+00 8.002280E+01 196 | 3.880000E+00 7.704829E+01 197 | 3.900000E+00 7.418688E+01 198 | 3.920000E+00 7.143410E+01 199 | 3.940000E+00 6.878568E+01 200 | 3.960000E+00 6.623755E+01 201 | 3.980000E+00 6.378584E+01 202 | 4.000000E+00 6.142686E+01 203 | 4.020000E+00 5.915708E+01 204 | 4.040000E+00 5.697311E+01 205 | 4.060000E+00 5.487173E+01 206 | 4.080000E+00 5.284983E+01 207 | 4.100000E+00 5.090444E+01 208 | 4.120000E+00 4.903268E+01 209 | 4.140000E+00 4.723179E+01 210 | 4.160000E+00 4.549911E+01 211 | 4.180000E+00 4.383204E+01 212 | 4.200000E+00 4.222811E+01 213 | 4.220000E+00 4.068488E+01 214 | 4.240000E+00 3.920002E+01 215 | 4.260000E+00 3.777127E+01 216 | 4.280000E+00 3.639643E+01 217 | 4.300000E+00 3.507337E+01 218 | 4.320000E+00 3.380005E+01 219 | 4.340000E+00 3.257449E+01 220 | 4.360000E+00 3.139477E+01 221 | 4.380000E+00 3.025906E+01 222 | 4.400000E+00 2.916560E+01 223 | 4.420000E+00 2.811268E+01 224 | 4.440000E+00 2.709870E+01 225 | 4.460000E+00 2.612210E+01 226 | 4.480000E+00 2.518140E+01 227 | 4.500000E+00 2.427520E+01 228 | 4.520000E+00 2.340216E+01 229 | 4.540000E+00 2.256100E+01 230 | 4.560000E+00 2.175051E+01 231 | 4.580000E+00 2.096954E+01 232 | 4.600000E+00 2.021699E+01 233 | 4.620000E+00 1.949181E+01 234 | 4.640000E+00 1.879302E+01 235 | 4.660000E+00 1.811966E+01 236 | 4.680000E+00 1.747083E+01 237 | 4.700000E+00 1.684565E+01 238 | 4.720000E+00 1.624329E+01 239 | 4.740000E+00 1.566293E+01 240 | 4.760000E+00 1.510380E+01 241 | 4.780000E+00 1.456514E+01 242 | 4.800000E+00 1.404621E+01 243 | 4.820000E+00 1.354631E+01 244 | 4.840000E+00 1.306475E+01 245 | 4.860000E+00 1.260084E+01 246 | 4.880000E+00 1.215393E+01 247 | 4.900000E+00 1.172337E+01 248 | 4.920000E+00 1.130856E+01 249 | 4.940000E+00 1.090887E+01 250 | 4.960000E+00 1.052373E+01 251 | 4.980000E+00 1.015257E+01 252 | 5.000000E+00 9.794836E+00 253 | -------------------------------------------------------------------------------- /pycdft/atomic/rho/V.spavr: -------------------------------------------------------------------------------- 1 | # r f(r) : R0 (a.u) 0.000000 0.000000 0.000000 2 | 0.000000E+00 3.296798E+04 3 | 2.000000E-02 3.312718E+04 4 | 4.000000E-02 3.360283E+04 5 | 6.000000E-02 3.438909E+04 6 | 8.000000E-02 3.547627E+04 7 | 1.000000E-01 3.685105E+04 8 | 1.200000E-01 3.849659E+04 9 | 1.400000E-01 4.039276E+04 10 | 1.600000E-01 4.251644E+04 11 | 1.800000E-01 4.484183E+04 12 | 2.000000E-01 4.734077E+04 13 | 2.200000E-01 4.998315E+04 14 | 2.400000E-01 5.273727E+04 15 | 2.600000E-01 5.557031E+04 16 | 2.800000E-01 5.844872E+04 17 | 3.000000E-01 6.133869E+04 18 | 3.200000E-01 6.420657E+04 19 | 3.400000E-01 6.701932E+04 20 | 3.600000E-01 6.974489E+04 21 | 3.800000E-01 7.235268E+04 22 | 4.000000E-01 7.481382E+04 23 | 4.200000E-01 7.710161E+04 24 | 4.400000E-01 7.919175E+04 25 | 4.600000E-01 8.106262E+04 26 | 4.800000E-01 8.269550E+04 27 | 5.000000E-01 8.407476E+04 28 | 5.200000E-01 8.518793E+04 29 | 5.400000E-01 8.602581E+04 30 | 5.600000E-01 8.658248E+04 31 | 5.800000E-01 8.685526E+04 32 | 6.000000E-01 8.684467E+04 33 | 6.200000E-01 8.655423E+04 34 | 6.400000E-01 8.599041E+04 35 | 6.600000E-01 8.516233E+04 36 | 6.800000E-01 8.408160E+04 37 | 7.000000E-01 8.276201E+04 38 | 7.200000E-01 8.121929E+04 39 | 7.400000E-01 7.947081E+04 40 | 7.600000E-01 7.753524E+04 41 | 7.800000E-01 7.543230E+04 42 | 8.000000E-01 7.318240E+04 43 | 8.200000E-01 7.080635E+04 44 | 8.400000E-01 6.832511E+04 45 | 8.600000E-01 6.575945E+04 46 | 8.800000E-01 6.312975E+04 47 | 9.000000E-01 6.045576E+04 48 | 9.200000E-01 5.775634E+04 49 | 9.400000E-01 5.504937E+04 50 | 9.600000E-01 5.235154E+04 51 | 9.800000E-01 4.967822E+04 52 | 1.000000E+00 4.704344E+04 53 | 1.020000E+00 4.445973E+04 54 | 1.040000E+00 4.193817E+04 55 | 1.060000E+00 3.948834E+04 56 | 1.080000E+00 3.711834E+04 57 | 1.100000E+00 3.483483E+04 58 | 1.120000E+00 3.264308E+04 59 | 1.140000E+00 3.054705E+04 60 | 1.160000E+00 2.854946E+04 61 | 1.180000E+00 2.665191E+04 62 | 1.200000E+00 2.485494E+04 63 | 1.220000E+00 2.315819E+04 64 | 1.240000E+00 2.156047E+04 65 | 1.260000E+00 2.005985E+04 66 | 1.280000E+00 1.865384E+04 67 | 1.300000E+00 1.733943E+04 68 | 1.320000E+00 1.611318E+04 69 | 1.340000E+00 1.497138E+04 70 | 1.360000E+00 1.391005E+04 71 | 1.380000E+00 1.292508E+04 72 | 1.400000E+00 1.201226E+04 73 | 1.420000E+00 1.116735E+04 74 | 1.440000E+00 1.038614E+04 75 | 1.460000E+00 9.664489E+03 76 | 1.480000E+00 8.998344E+03 77 | 1.500000E+00 8.383796E+03 78 | 1.520000E+00 7.817087E+03 79 | 1.540000E+00 7.294632E+03 80 | 1.560000E+00 6.813028E+03 81 | 1.580000E+00 6.369065E+03 82 | 1.600000E+00 5.959728E+03 83 | 1.620000E+00 5.582201E+03 84 | 1.640000E+00 5.233859E+03 85 | 1.660000E+00 4.912271E+03 86 | 1.680000E+00 4.615188E+03 87 | 1.700000E+00 4.340542E+03 88 | 1.720000E+00 4.086431E+03 89 | 1.740000E+00 3.851115E+03 90 | 1.760000E+00 3.633004E+03 91 | 1.780000E+00 3.430649E+03 92 | 1.800000E+00 3.242733E+03 93 | 1.820000E+00 3.068057E+03 94 | 1.840000E+00 2.905537E+03 95 | 1.860000E+00 2.754186E+03 96 | 1.880000E+00 2.613113E+03 97 | 1.900000E+00 2.481510E+03 98 | 1.920000E+00 2.358643E+03 99 | 1.940000E+00 2.243847E+03 100 | 1.960000E+00 2.136517E+03 101 | 1.980000E+00 2.036101E+03 102 | 2.000000E+00 1.942097E+03 103 | 2.020000E+00 1.854043E+03 104 | 2.040000E+00 1.771518E+03 105 | 2.060000E+00 1.694133E+03 106 | 2.080000E+00 1.621527E+03 107 | 2.100000E+00 1.553367E+03 108 | 2.120000E+00 1.489346E+03 109 | 2.140000E+00 1.429175E+03 110 | 2.160000E+00 1.372586E+03 111 | 2.180000E+00 1.319329E+03 112 | 2.200000E+00 1.269169E+03 113 | 2.220000E+00 1.221887E+03 114 | 2.240000E+00 1.177279E+03 115 | 2.260000E+00 1.135153E+03 116 | 2.280000E+00 1.095330E+03 117 | 2.300000E+00 1.057644E+03 118 | 2.320000E+00 1.021940E+03 119 | 2.340000E+00 9.880729E+02 120 | 2.360000E+00 9.559099E+02 121 | 2.380000E+00 9.253275E+02 122 | 2.400000E+00 8.962122E+02 123 | 2.420000E+00 8.684596E+02 124 | 2.440000E+00 8.419740E+02 125 | 2.460000E+00 8.166680E+02 126 | 2.480000E+00 7.924621E+02 127 | 2.500000E+00 7.692838E+02 128 | 2.520000E+00 7.470672E+02 129 | 2.540000E+00 7.257528E+02 130 | 2.560000E+00 7.052865E+02 131 | 2.580000E+00 6.856189E+02 132 | 2.600000E+00 6.667056E+02 133 | 2.620000E+00 6.485057E+02 134 | 2.640000E+00 6.309820E+02 135 | 2.660000E+00 6.141000E+02 136 | 2.680000E+00 5.978282E+02 137 | 2.700000E+00 5.821370E+02 138 | 2.720000E+00 5.669986E+02 139 | 2.740000E+00 5.523870E+02 140 | 2.760000E+00 5.382774E+02 141 | 2.780000E+00 5.246461E+02 142 | 2.800000E+00 5.114706E+02 143 | 2.820000E+00 4.987290E+02 144 | 2.840000E+00 4.864004E+02 145 | 2.860000E+00 4.744646E+02 146 | 2.880000E+00 4.629022E+02 147 | 2.900000E+00 4.516944E+02 148 | 2.920000E+00 4.408234E+02 149 | 2.940000E+00 4.302720E+02 150 | 2.960000E+00 4.200240E+02 151 | 2.980000E+00 4.100640E+02 152 | 3.000000E+00 4.003776E+02 153 | 3.020000E+00 3.909512E+02 154 | 3.040000E+00 3.817725E+02 155 | 3.060000E+00 3.728298E+02 156 | 3.080000E+00 3.641127E+02 157 | 3.100000E+00 3.556116E+02 158 | 3.120000E+00 3.473179E+02 159 | 3.140000E+00 3.392239E+02 160 | 3.160000E+00 3.313227E+02 161 | 3.180000E+00 3.236081E+02 162 | 3.200000E+00 3.160748E+02 163 | 3.220000E+00 3.087179E+02 164 | 3.240000E+00 3.015331E+02 165 | 3.260000E+00 2.945165E+02 166 | 3.280000E+00 2.876644E+02 167 | 3.300000E+00 2.809735E+02 168 | 3.320000E+00 2.744406E+02 169 | 3.340000E+00 2.680627E+02 170 | 3.360000E+00 2.618367E+02 171 | 3.380000E+00 2.557593E+02 172 | 3.400000E+00 2.498276E+02 173 | 3.420000E+00 2.440382E+02 174 | 3.440000E+00 2.383878E+02 175 | 3.460000E+00 2.328729E+02 176 | 3.480000E+00 2.274898E+02 177 | 3.500000E+00 2.222351E+02 178 | 3.520000E+00 2.171048E+02 179 | 3.540000E+00 2.120952E+02 180 | 3.560000E+00 2.072026E+02 181 | 3.580000E+00 2.024232E+02 182 | 3.600000E+00 1.977532E+02 183 | 3.620000E+00 1.931892E+02 184 | 3.640000E+00 1.887276E+02 185 | 3.660000E+00 1.843651E+02 186 | 3.680000E+00 1.800987E+02 187 | 3.700000E+00 1.759255E+02 188 | 3.720000E+00 1.718428E+02 189 | 3.740000E+00 1.678482E+02 190 | 3.760000E+00 1.639395E+02 191 | 3.780000E+00 1.601147E+02 192 | 3.800000E+00 1.563720E+02 193 | 3.820000E+00 1.527099E+02 194 | 3.840000E+00 1.491269E+02 195 | 3.860000E+00 1.456218E+02 196 | 3.880000E+00 1.421936E+02 197 | 3.900000E+00 1.388410E+02 198 | 3.920000E+00 1.355631E+02 199 | 3.940000E+00 1.323589E+02 200 | 3.960000E+00 1.292275E+02 201 | 3.980000E+00 1.261679E+02 202 | 4.000000E+00 1.231789E+02 203 | 4.020000E+00 1.202597E+02 204 | 4.040000E+00 1.174088E+02 205 | 4.060000E+00 1.146252E+02 206 | 4.080000E+00 1.119075E+02 207 | 4.100000E+00 1.092543E+02 208 | 4.120000E+00 1.066641E+02 209 | 4.140000E+00 1.041355E+02 210 | 4.160000E+00 1.016667E+02 211 | 4.180000E+00 9.925620E+01 212 | 4.200000E+00 9.690238E+01 213 | 4.220000E+00 9.460359E+01 214 | 4.240000E+00 9.235820E+01 215 | 4.260000E+00 9.016464E+01 216 | 4.280000E+00 8.802138E+01 217 | 4.300000E+00 8.592693E+01 218 | 4.320000E+00 8.387992E+01 219 | 4.340000E+00 8.187903E+01 220 | 4.360000E+00 7.992305E+01 221 | 4.380000E+00 7.801085E+01 222 | 4.400000E+00 7.614141E+01 223 | 4.420000E+00 7.431379E+01 224 | 4.440000E+00 7.252714E+01 225 | 4.460000E+00 7.078069E+01 226 | 4.480000E+00 6.907373E+01 227 | 4.500000E+00 6.740564E+01 228 | 4.520000E+00 6.577579E+01 229 | 4.540000E+00 6.418363E+01 230 | 4.560000E+00 6.262861E+01 231 | 4.580000E+00 6.111019E+01 232 | 4.600000E+00 5.962782E+01 233 | 4.620000E+00 5.818095E+01 234 | 4.640000E+00 5.676899E+01 235 | 4.660000E+00 5.539134E+01 236 | 4.680000E+00 5.404735E+01 237 | 4.700000E+00 5.273636E+01 238 | 4.720000E+00 5.145764E+01 239 | 4.740000E+00 5.021046E+01 240 | 4.760000E+00 4.899404E+01 241 | 4.780000E+00 4.780758E+01 242 | 4.800000E+00 4.665027E+01 243 | 4.820000E+00 4.552128E+01 244 | 4.840000E+00 4.441978E+01 245 | 4.860000E+00 4.334494E+01 246 | 4.880000E+00 4.229595E+01 247 | 4.900000E+00 4.127203E+01 248 | 4.920000E+00 4.027240E+01 249 | 4.940000E+00 3.929633E+01 250 | 4.960000E+00 3.834315E+01 251 | 4.980000E+00 3.741219E+01 252 | 5.000000E+00 3.650287E+01 253 | -------------------------------------------------------------------------------- /pycdft/common/__init__.py: -------------------------------------------------------------------------------- 1 | from .sample import Sample 2 | from .ft import FFTGrid 3 | from .fragment import Fragment 4 | 5 | 6 | def timer(start, end): 7 | """ Helper function for timing. """ 8 | hours, rem = divmod(end-start, 3600) 9 | minutes, seconds = divmod(rem, 60) 10 | print("{:0>2}h:{:0>2}m:{:05.2f}s".format(int(hours), int(minutes), seconds)) 11 | -------------------------------------------------------------------------------- /pycdft/common/atom.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from ase import Atom as ASEAtom 3 | from pycdft.common.units import angstrom_to_bohr, bohr_to_angstrom 4 | 5 | 6 | class Atom(object): 7 | """ An atom in a specific cell. 8 | 9 | An atom can be initialized by and exported to an ASE Atom object. 10 | 11 | All physical quantities are in atomic unit. 12 | 13 | Attributes: 14 | sample (Sample): the sample where the atom lives. 15 | symbol (str): chemical symbol of the atom. 16 | abs_coord (np.ndarray, shape = [3]): absolute coordinate. 17 | 18 | Extra attributes are welcomed to be attached to an atom. 19 | These will be printed out in the representation of Atom object. 20 | """ 21 | 22 | _extra_attr_to_print = [] 23 | 24 | def __init__(self, sample, ase_atom): 25 | self.sample = sample 26 | self.symbol = ase_atom.symbol 27 | self.abs_coord = ase_atom.position * angstrom_to_bohr 28 | 29 | @property 30 | def cry_coord(self): 31 | return self.abs_coord @ self.sample.G.T / (2 * np.pi) 32 | 33 | @cry_coord.setter 34 | def cry_coord(self, cry_coord): 35 | self.abs_coord = cry_coord @ self.sample.R 36 | 37 | @property 38 | def ase_atom(self): 39 | return ASEAtom(symbol=self.symbol.capitalize(), 40 | position=self.abs_coord * bohr_to_angstrom) 41 | 42 | def __repr__(self): 43 | rep = "Atom {}. Abs coordi (Bohr) ({}). ".format( 44 | self.symbol, 45 | ", ".join("{:.3f}".format(coord) for coord in self.abs_coord) 46 | ) 47 | if any(hasattr(self, attr) for attr in self._extra_attr_to_print): 48 | rep += "; ".join("{} = {}".format( 49 | attr, getattr(self, attr) 50 | ) 51 | for attr in self._extra_attr_to_print if hasattr(self, attr) 52 | ) 53 | return rep 54 | 55 | def __str__(self): 56 | return self.__repr__() 57 | -------------------------------------------------------------------------------- /pycdft/common/fragment.py: -------------------------------------------------------------------------------- 1 | from pycdft.common.atom import Atom 2 | from pycdft.common.sample import Sample 3 | 4 | 5 | class Fragment(object): 6 | """ 7 | A part of the system to which constraints may apply. 8 | 9 | Attributes: 10 | sample (Sample): sample. 11 | atoms (list of Atom): list of atoms belonging to the fragment. 12 | natoms (int): number of atoms in fragment 13 | rhopro_r (array): real space promolecule charge density 14 | """ 15 | 16 | def __init__(self, sample: Sample, atoms: list, name: str = ""): 17 | self.name = name 18 | self.sample = sample 19 | self.atoms = atoms 20 | self.natoms = len(self.atoms) 21 | self.rhopro_r = None 22 | self.sample.fragments.append(self) 23 | -------------------------------------------------------------------------------- /pycdft/common/units.py: -------------------------------------------------------------------------------- 1 | """ Contains common unit conversions """ 2 | bohr_to_angstrom = 5.2917724900001E-01 3 | angstrom_to_bohr = 1.8897259885789E+00 4 | hartree_to_ev = 2.72113E+01 5 | hartree_to_millihartree = 1.0E3 6 | -------------------------------------------------------------------------------- /pycdft/common/wfc.py: -------------------------------------------------------------------------------- 1 | from pycdft.common.sample import * 2 | 3 | 4 | class WfcManager: 5 | r"""Helper class to manage a collection of quantities like :math:`\psi(r)' or :math:`\psi(G)`. 6 | 7 | The collection can be indexed by either an internal index or a (spin, kpoint, band) index. 8 | """ 9 | 10 | def __init__(self, wfc, transform=lambda f: f): 11 | self.wfc = wfc 12 | self.qty = dict() 13 | self.transform = transform 14 | 15 | def indices(self): 16 | return self.qty.keys() 17 | 18 | def clear(self): 19 | self.qty.clear() 20 | 21 | def _get_idx(self, key): 22 | try: 23 | idx = int(key) 24 | except TypeError: 25 | try: 26 | ispin = int(key[0]) 27 | ikpt = int(key[1]) 28 | ibnd = int(key[2]) 29 | assert 0 <= ispin <= self.wfc.nspin 30 | assert 0 <= ikpt <= self.wfc.nkpt 31 | assert 0 <= ibnd <= self.wfc.nbnd[ispin, ikpt] 32 | except ValueError: 33 | raise ValueError("Index must be either internal index or (spin, kpoint, band) index") 34 | except (AssertionError, IndexError): 35 | raise IndexError("(spin, kpoint, band) index out of range ({}, {}, {})".format( 36 | self.wfc.nspin, self.wfc.nkpt, self.wfc.nbnd 37 | )) 38 | idx = self.wfc.skb2idx(ispin, ikpt, ibnd) 39 | return idx 40 | 41 | def __getitem__(self, key): 42 | return self.qty[self._get_idx(key)] 43 | 44 | def __setitem__(self, key, value): 45 | idx = self._get_idx(key) 46 | self.qty[idx] = self.transform(value) 47 | 48 | 49 | class Wavefunction: 50 | """Container class for Kohn-Sham wavefunction. 51 | 52 | A wavefunction is defined as a collection of KS orbitals, each uniquely labeled by 53 | three integers: spin (0 or 1), k point index and band index. To facilitate distributed 54 | storage and access of a wavefunction on multiple processors, each KS orbital is also 55 | uniquelly labeled by an internal index. Internal index (idx) is generated by following 56 | pattern:: 57 | 58 | for ispin in range(nspin): 59 | for ikpt in range(nkpt): 60 | for ibnd in range(nbnd[ispin, ikpt]): 61 | idx ++ 62 | 63 | Currently, k points are not fully supported. 64 | 65 | Note: 66 | ``psi_r`` and ``psi_g`` can be accessed like dicts. They can be indexed with either 67 | an integer (internal index) or a 3-tuple of integers (spin, kpoint, band index). 68 | After been indexed, the corresponding quantity (numpy array) of a 69 | specific KS orbital is returned. 70 | 71 | Attributes: 72 | psi_r: R space KS orbitals defined on a R space grid described by self.wgrid. 73 | psi_g: G space KS orbitals defined on a G space grid described by self.wgrid. 74 | 75 | sample (Sample): sample upon which the wavefunction is defined. 76 | wgrid (FFTGrid): wavefunction grid. 77 | dgrid (FFTGrid): charge density grid. 78 | 79 | nspin (int): # of spin channel. 1: spin unpolarized; 2: spin polarized. 80 | nkpt (int): # of k points. 81 | nbnd (int): # of bands. 82 | norb (int): total # of orbitals on all spins, kpoints. 83 | occ (array): occupation numbers. shape: (nspin, nkpt, nbnd). 84 | 85 | idx_skb_map (dict): private, internal index -> (spin, kpoint, band) index map; access with skb2idx 86 | skb_idx_map (dict): private, (spin, kpoint, band) index -> internal index map; access with idx2skb 87 | """ 88 | 89 | def __init__(self, sample: Sample, wgrid, dgrid, nspin, nkpt, nbnd, occ, gamma=True): 90 | 91 | # define general info 92 | self.sample = sample 93 | self.wgrid = wgrid 94 | self.dgrid = dgrid 95 | 96 | self.nspin = nspin 97 | self.nkpt = nkpt 98 | assert self.nkpt == 1, "K points are not supported yet" 99 | try: 100 | nbnd_ = int(nbnd) 101 | # all spin and kpoints share the same nbnd 102 | self.nbnd = np.ones((self.nspin, self.nkpt), dtype=int) * nbnd_ 103 | except TypeError: 104 | # every spin and kpoint have its own nbnd 105 | self.nbnd = np.array(nbnd, dtype=np.int_) 106 | assert self.nbnd.shape == (self.nspin, self.nkpt) 107 | if occ.ndim == 1: 108 | # all spin and kpoints share the same occupation 109 | self.occ = np.tile(occ, (self.nspin, self.nkpt)).reshape(self.nspin, self.nkpt, -1) 110 | else: 111 | # every spin and kpoint have its own occupation 112 | self.occ = np.zeros((self.nspin, self.nkpt, np.max(self.nbnd)), dtype=int) 113 | for ispin in range(self.nspin): 114 | for ikpt in range(self.nkpt): 115 | nbnd = self.nbnd[ispin, ikpt] 116 | self.occ[ispin, ikpt, 0:nbnd] = occ[ispin, ikpt][0:nbnd] 117 | 118 | self.gamma = gamma 119 | 120 | # define maps between internal index <-> (spin, kpoint, band) index 121 | self.idx_skb_map = dict() 122 | idx = 0 123 | for ispin, ikpt in np.ndindex(self.nspin, self.nkpt): 124 | for ibnd in range(self.nbnd[ispin, ikpt]): 125 | self.idx_skb_map[idx] = (ispin, ikpt, ibnd) 126 | idx += 1 127 | self.norb = len(self.idx_skb_map) 128 | self.skb_idx_map = { 129 | self.idx_skb_map[idx]: idx 130 | for idx in range(self.norb) 131 | } 132 | 133 | # define containers to store collections of psi(r) or psi(G) 134 | self.psi_g = WfcManager(self) 135 | self.psi_r = WfcManager(self, transform=self.normalize) 136 | 137 | def skb2idx(self, ispin, ikpt, ibnd): 138 | """Get internal index from (spin, kpoint, band) index.""" 139 | try: 140 | return self.skb_idx_map[ispin, ikpt, ibnd] 141 | except KeyError: 142 | return None 143 | 144 | def idx2skb(self, idx): 145 | """Get (spin, kpoint, band) index from internal index.""" 146 | return self.idx_skb_map[idx] 147 | 148 | def normalize(self, psir): 149 | """Normalize psi(r).""" 150 | assert psir.shape == (self.wgrid.n1, self.wgrid.n2, self.wgrid.n3) 151 | norm = np.sqrt(np.sum(np.abs(psir) ** 2) * self.sample.omega / self.wgrid.N) 152 | return psir / norm 153 | -------------------------------------------------------------------------------- /pycdft/constraint/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import Constraint 2 | from .charge import ChargeConstraint 3 | from .charge_transfer import ChargeTransferConstraint 4 | -------------------------------------------------------------------------------- /pycdft/constraint/base.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | import numpy as np 3 | from pycdft.common.sample import Sample 4 | 5 | 6 | class Constraint(object): 7 | """ Constraint. 8 | 9 | Attributes: 10 | sample (Sample): the whole system. 11 | N (float): the electron number or electron number difference for this constraint 12 | computed from the charge density of the current DFT step. 13 | N0 (float): the target value for the electron number or electron number difference, 14 | N = N0 at convergence. 15 | V (float): Lagrangian multiplier associate with the constraint. 16 | V_init (float): Initial guess or bracket for V, used for certain optimization algorithms. 17 | V_brak (2-tuple of float): Search bracket for V, used for certain optimization algorithms. 18 | Vc (np.ndarray, shape = [vspin, n1, n2, n3]): constraint potential. 19 | w (np.ndarray, shape = [vspin, n1, n2, n3]): weight function. 20 | N_tol (float): convergence threshold for N - N0 (= dW/dV). 21 | """ 22 | 23 | __metaclass__ = ABCMeta 24 | type = None 25 | 26 | @abstractmethod 27 | def __init__(self, sample: Sample, N0, V_init=None, V_brak=None, N_tol=None): 28 | """ 29 | Args: 30 | V_init (float): initial guess for V. 31 | """ 32 | self.sample = sample 33 | self.N0 = N0 34 | self.V_init = V_init 35 | self.V_brak = V_brak 36 | self.N_tol = N_tol 37 | 38 | self.V = None 39 | self.w = None 40 | self.N = None 41 | self.Vc = None 42 | self.Fc = None 43 | 44 | self.sample.constraints.append(self) 45 | 46 | @property 47 | def dW_by_dV(self): 48 | r""" The derivative of free energy with respect to V. 49 | :math:`dW/dV = \int dr w_i(r) n(r) - N_0 = N - N_0`""" 50 | return self.N - self.N0 51 | 52 | @property 53 | def is_converged(self): 54 | return bool(abs(self.N - self.N0) < self.N_tol) 55 | 56 | def update_structure(self): 57 | """ Update the constraint with new structure.""" 58 | print("Updating constraint with new structure...") 59 | self.update_w() 60 | self.update_N() 61 | 62 | @abstractmethod 63 | def update_w(self): 64 | """ Update the weight with new structure. """ 65 | pass 66 | 67 | def update_N(self): 68 | """ Update the electron number or electron number difference. """ 69 | omega = self.sample.omega 70 | n = self.sample.n1 * self.sample.n2 * self.sample.n3 71 | rho_r = self.sample.rho_r 72 | self.N = (omega / n) * np.sum(self.w * rho_r) 73 | 74 | def update_Vc(self): 75 | """ Update constraint potential. """ 76 | self.Vc = self.V * self.w 77 | 78 | def update_Fc(self): 79 | """ Update constraint force. """ 80 | omega = self.sample.omega 81 | n = self.sample.n 82 | self.Fc = np.zeros([self.sample.natoms, 3]) 83 | 84 | for iatom, atom in enumerate(self.sample.atoms): 85 | # s is spin index, a is coordinate (i.e., x,y,z) index 86 | # i,j,k is dimensions of FFT grid = n1, n2, n3 87 | w_grad = self.compute_w_grad_r(atom) 88 | self.Fc[iatom] = - self.V * (omega / n) * np.einsum( 89 | "sijk,asijk->a", self.sample.rho_r, w_grad 90 | ) 91 | 92 | @abstractmethod 93 | def compute_w_grad_r(self, atom): 94 | pass 95 | -------------------------------------------------------------------------------- /pycdft/constraint/charge.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from pycdft.common.sample import Sample 3 | from pycdft.common.fragment import Fragment 4 | from pycdft.constraint.base import Constraint 5 | 6 | 7 | class ChargeConstraint(Constraint): 8 | r""" Constraint on the absolute electron number of a fragment. 9 | 10 | For fragment F, Hirshfeld weight is defined as 11 | :math:`w_\text{F}({\bf r}) = \frac{\sum_{I \in F} \rho_I}{\sum_I \rho_I}` 12 | 13 | 14 | Extra attributes: 15 | fragment (Fragment): a fragment of the whole system. 16 | """ 17 | 18 | type = "charge" 19 | 20 | def __init__(self, sample: Sample, fragment: Fragment, N0: float, 21 | V_init=0, V_brak=(-1, 1), N_tol=1.0E-3, eps=1e-6): 22 | super(ChargeConstraint, self).__init__( 23 | sample, N0, V_init=V_init, V_brak=V_brak, N_tol=N_tol, 24 | ) 25 | self.fragment = fragment 26 | self.eps = eps 27 | print(f"Constraint: type = {self.type}, N_tol = {self.N_tol:.5f}, eps = {self.eps:.2E}") 28 | 29 | def update_w(self): 30 | w = self.fragment.rhopro_r / self.sample.rhopro_tot_r 31 | w[self.sample.rhopro_tot_r < self.eps] = 0.0 32 | if self.sample.vspin == 1: 33 | self.w = w[None, ...] 34 | else: 35 | self.w = np.append(w, w, axis=0).reshape(2, *w.shape) 36 | 37 | def compute_w_grad_r(self, atom): 38 | delta = 1 if atom in self.fragment.atoms else 0 39 | rho_grad_r = self.sample.compute_rhoatom_grad_r(atom) 40 | w_grad = np.einsum( 41 | "sijk,aijk,ijk->asijk", delta - self.w, rho_grad_r, 1/self.sample.rhopro_tot_r 42 | ) 43 | for icart, ispin in np.ndindex(3, self.sample.vspin): 44 | w_grad[icart, ispin][self.sample.rhopro_tot_r < self.eps] = 0.0 45 | return w_grad 46 | 47 | # added for debugging forces 48 | def debug_w_grad_r(self, atom): 49 | delta = 1 if atom in self.fragment.atoms else 0 50 | rho_grad_r = self.sample.compute_rhoatom_grad_r(atom) 51 | w_grad = np.einsum( 52 | "sijk,aijk,ijk->asijk", delta - self.w, rho_grad_r, 1/self.sample.rhopro_tot_r 53 | ) 54 | # w_grad_part = np.einsum( 55 | # "sijk,ijk->sijk", delta - self.w, 1/self.sample.rhopro_tot_r 56 | # ) 57 | for icart, ispin in np.ndindex(3, self.sample.vspin): 58 | w_grad[icart, ispin][self.sample.rhopro_tot_r < self.eps] = 0.0 59 | return w_grad, rho_grad_r 60 | -------------------------------------------------------------------------------- /pycdft/constraint/charge_transfer.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from pycdft.common.sample import Sample 3 | from pycdft.common.fragment import Fragment 4 | from pycdft.constraint.base import Constraint 5 | 6 | 7 | class ChargeTransferConstraint(Constraint): 8 | r""" Constraint on electron number difference between a donor and an acceptor fragment 9 | 10 | For donor region D and acceptor region A, Hirshfeld weight is defined as 11 | :math:`w({\bf r})= \frac{\sum_{I \in D} \rho_I-\sum_{I \in A} \rho_I}{\sum_I \rho_I}` 12 | 13 | Extra attributes: 14 | donor (Fragment): donor fragment. 15 | acceptor (Fragment): acceptor fragment. 16 | """ 17 | 18 | type = "charge transfer" 19 | 20 | def __init__(self, sample: Sample, donor: Fragment, acceptor: Fragment, N0: float, 21 | V_init=0, V_brak=(-1, 1), N_tol=1.0E-3, eps=1e-6): 22 | super(ChargeTransferConstraint, self).__init__( 23 | sample, N0, V_init=V_init, V_brak=V_brak, N_tol=N_tol 24 | ) 25 | self.eps = eps 26 | self.donor = donor 27 | self.acceptor = acceptor 28 | print(f"Constraint: type = {self.type}, N_tol = {self.N_tol:.5f}, eps = {self.eps:.2E}") 29 | 30 | def update_w(self): 31 | #w = (self.acceptor.rhopro_r - self.donor.rhopro_r) / self.sample.rhopro_tot_r 32 | w = (self.donor.rhopro_r - self.acceptor.rhopro_r) / self.sample.rhopro_tot_r 33 | w[self.sample.rhopro_tot_r < self.eps] = 0.0 34 | if self.sample.vspin == 1: 35 | self.w = w[None, ...] 36 | else: 37 | self.w = np.append(w, w, axis=0).reshape(2, *w.shape) 38 | 39 | def compute_w_grad_r(self, atom): 40 | if atom in self.donor.atoms: 41 | delta = 1 42 | elif atom in self.acceptor.atoms: 43 | delta = -1 44 | else: 45 | delta = 0 46 | 47 | rho_grad_r = self.sample.compute_rhoatom_grad_r(atom) 48 | w_grad = np.einsum( 49 | "sijk,aijk,ijk->asijk", delta - self.w, rho_grad_r, 1 / self.sample.rhopro_tot_r 50 | ) 51 | for icart, ispin in np.ndindex(3, self.sample.vspin): 52 | w_grad[icart, ispin][self.sample.rhopro_tot_r < self.eps] = 0.0 53 | return w_grad 54 | 55 | # added for debuggin forces 56 | def debug_w_grad_r(self, atom): 57 | if atom in self.donor.atoms: 58 | delta = 1 59 | elif atom in self.acceptor.atoms: 60 | delta = -1 61 | #delta = 0 # should reproduce charge constains in He_2^+ 62 | # but instead half reproduces a-d and w_grad is no longer symmetric 63 | else: 64 | delta = 0 65 | 66 | rho_grad_r = self.sample.compute_rhoatom_grad_r(atom) 67 | w_grad = np.einsum( 68 | "sijk,aijk,ijk->asijk", delta - self.w, rho_grad_r, 1 / self.sample.rhopro_tot_r 69 | ) 70 | # w_grad_part = np.einsum( 71 | # "sijk,ijk-> sijk", delta - self.w, 1 / self.sample.rhopro_tot_r 72 | # ) 73 | 74 | for icart, ispin in np.ndindex(3, self.sample.vspin): 75 | w_grad[icart, ispin][self.sample.rhopro_tot_r < self.eps] = 0.0 76 | return w_grad, rho_grad_r 77 | -------------------------------------------------------------------------------- /pycdft/debug/__init__.py: -------------------------------------------------------------------------------- 1 | from .plot_debug import * 2 | -------------------------------------------------------------------------------- /pycdft/debug/plot_debug.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from ase.io.cube import write_cube 3 | from pycdft.common.ft import fftn, ifftn 4 | 5 | # Compatible for PyCDFT v0.1 6 | # Helper functions for debugging the forces in PyCDFT 7 | # The goal is to print the following: 8 | # 1) w_k(r) and grad_w_k(r) for each constraint k; compare with finite diff 9 | # 2) rho_i(r) and grad_rho_i(r) for each atom i; compare with finite diff 10 | 11 | def parse(dat,mode): 12 | """ parsing of e.g., charge density or weights for writing/reading to CUBE format 13 | 14 | Attributes: 15 | dat (array): volumetric data, n1 x n2 x n3 16 | mode (int): 1 = from CUBE -> PyCDFT; -1 = from PyCDFT -> write CUBE 17 | """ 18 | #assert(np.abs(mode)==1) 19 | n1,n2,n3 = np.shape(dat) 20 | if mode==1: 21 | dat1 = np.roll(dat, n1//2, axis=0) 22 | dat2 = np.roll(dat1, n2//2, axis=1) 23 | dat3 = np.roll(dat2, n3//2, axis=2) 24 | elif mode==-1: 25 | dat1 = np.roll(dat,int(np.ceil(n3/2)),axis=2) 26 | dat2 = np.roll(dat1,int(np.ceil(n2/2)),axis=1) 27 | dat3 = np.roll(dat2,int(np.ceil(n1/2)),axis=0) 28 | parse_dat = dat3 29 | return parse_dat 30 | 31 | #===================== Hirshfeld weights per constraint ==================== 32 | 33 | def get_hirsh(CDFTSolver,origin): 34 | """ Extract Hirschfeld weights for Charge constraint 35 | 36 | Attributes: 37 | CDFTSolver (CDFTSolver) 38 | origin (tuple): (x,y,z) coord; same as rhor.cube file; origin of volumetric data; 39 | give in Angstroms; gets converted to Bohr in program 40 | """ 41 | constraints = CDFTSolver.sample.constraints 42 | 43 | index=1 44 | for c in constraints: 45 | atoms_iter = CDFTSolver.sample.atoms # calculating requires pycdft-modified Atom type 46 | atoms_write = CDFTSolver.sample.ase_cell # writing requires ASE Atom type 47 | 48 | # write to cube file for visualizing 49 | weights_dat = parse(c.w[0],-1) 50 | 51 | filname="hirshr"+str(index)+".cube" 52 | fileobj=open(filname,"w") 53 | 54 | write_cube(fileobj,atoms_write,weights_dat,origin=origin) 55 | fileobj.close() 56 | print(f"Generated cube file for Constraint {index}.") 57 | 58 | print("Completed Hirshfeld weight extraction!") 59 | 60 | def get_hirsh_ct(CDFTSolver,origin): 61 | """ Extract Hirschfeld weights for Charge_Transfer constraint 62 | 63 | Attributes: 64 | CDFTSolver (CDFTSolver) 65 | origin (tuple): (x,y,z) coord; same as rhor.cube file; origin of volumetric data; 66 | give in Angstroms; gets converted to Bohr in program 67 | """ 68 | constraints = CDFTSolver.sample.constraints 69 | 70 | index=1 71 | for c in constraints: 72 | atoms = CDFTSolver.sample.ase_cell 73 | # write to cube file for visualizing 74 | weights_dat = parse(c.w[0],-1) 75 | 76 | filname="hirshr"+str(index)+".cube" 77 | fileobj=open(filname,"w") 78 | 79 | write_cube(fileobj,atoms,weights_dat,origin=origin) 80 | fileobj.close() 81 | print(f"Generated for Constraint {index}.") 82 | 83 | print("Completed! Have fun plotting") 84 | 85 | 86 | #===================== Charge density- total and per atom ========================= 87 | 88 | def get_rho_atom(CDFTSolver,origin): 89 | """ Generate charge density for each atom 90 | 91 | Attributes: 92 | CDFTSolver (CDFTSolver) 93 | origin (tuple): (x,y,z) coord; same as rhor.cube file; origin of volumetric data 94 | give in Angstroms; gets converted to Bohr in program 95 | """ 96 | atoms_iter = CDFTSolver.sample.atoms # calculating requires pycdft-modified Atom type 97 | atoms_write = CDFTSolver.sample.ase_cell # writing requires ASE Atom type 98 | n = CDFTSolver.sample.n 99 | omega = CDFTSolver.sample.omega 100 | 101 | index = 1 102 | for atom in atoms_iter: 103 | rhoatom_g = CDFTSolver.sample.compute_rhoatom_g(atom) 104 | rhoatom_r = (n / omega) * ifftn(rhoatom_g).real # FT G -> R 105 | #rhoatom_r = (n / omega) * ifftn(rhoatom_g).real # FT G -> R 106 | 107 | # write to cube file 108 | rhoatom_r = parse(rhoatom_r,-1) 109 | 110 | filname="rhoatom_r_"+str(index)+".cube" 111 | fileobj=open(filname,"w") 112 | 113 | write_cube(fileobj,atoms_write,rhoatom_r,origin=origin) 114 | fileobj.close() 115 | print(f"Generated rhoatom_r cube file for Atom {index}") 116 | index += 1 117 | print("Completed get_rho_atom") 118 | 119 | def get_rho(CDFTSolver,origin,index): 120 | """ Borrowed from implementation of abstract ``fetch_rhor`` method for Qbox 121 | Generate from Qbox the rhor.cube file 122 | 123 | """ 124 | vspin = CDFTSolver.sample.vspin 125 | nspin = CDFTSolver.sample.wfc.nspin 126 | atoms = CDFTSolver.sample.ase_cell 127 | n1, n2, n3 = CDFTSolver.sample.n1, CDFTSolver.sample.n2, CDFTSolver.sample.n3 128 | rho_r = np.zeros([vspin, n1, n2, n3]) 129 | 130 | for ispin in range(vspin): 131 | for i in range(nspin): 132 | filname="rho_r"+str(index)+"_spin"+str(i+1)+".cube" 133 | 134 | # Qbox generates charge density 135 | CDFTSolver.dft_driver.run_cmd(cmd="plot -density {} {}".format( 136 | "-spin {}".format(i + 1) if nspin == 2 else "", 137 | filname 138 | )) 139 | 140 | # quick check 141 | #rhor_raw = read_cube_data(CDFTSolver.dft_driver.rhor_file)[0] 142 | #assert rhor_raw.shape == (n1, n2, n3) 143 | 144 | print("Generated charge density cube file!") 145 | 146 | #============== Charge and Hirshfeld gradients ============================= 147 | def get_grad(CDFTSolver,origin): 148 | r""" Extract gradient of Hirschfeld weights and charge density; both are calculated in calculation 149 | of :math:`\nabla w(\bf{r})` 150 | 151 | Attributes: 152 | CDFTSolver (CDFTSolver) 153 | origin (tuple): (x,y,z) coord; same as rhor.cube file; origin of volumetric data; 154 | give in Angstroms; gets converted to Bohr in program 155 | """ 156 | constraints = CDFTSolver.sample.constraints 157 | 158 | ic = 1 159 | for c in constraints: 160 | 161 | atoms_iter = CDFTSolver.sample.atoms # calculating requires pycdft-modified Atom type 162 | atoms_write = CDFTSolver.sample.ase_cell # writing requires ASE Atom type 163 | 164 | ia = 1 165 | for atom in atoms_iter: 166 | 167 | #w_grad, rho_grad_r,w_grad_part,rhopro_r = c.debug_w_grad_r(atom) 168 | w_grad, rho_grad_r = c.debug_w_grad_r(atom) 169 | 170 | # write to cube file for visualizing 171 | # separate file for each cartesian direction 172 | for icart in range(3): 173 | w_grad_tmp = parse(w_grad[icart][0],-1) 174 | rho_grad_r_tmp = parse(rho_grad_r[icart],-1) 175 | 176 | fil1="w_grad_atom"+str(ia)+"_c"+str(ic)+"_i"+str(icart)+".cube" 177 | fil2="rhoatom_grad_atom"+str(ia)+"_c"+str(ic)+"_i"+str(icart)+".cube" 178 | 179 | fileobj=open(fil1,"w") 180 | write_cube(fileobj,atoms_write,w_grad_tmp,origin=origin) 181 | fileobj.close() 182 | print(f"Generated Hirshfeld wts cube file for Atom {ia}, constraint {ic}, dir {icart}") 183 | 184 | fileobj=open(fil2,"w") 185 | write_cube(fileobj,atoms_write,rho_grad_r_tmp,origin=origin) 186 | fileobj.close() 187 | 188 | ia += 1 189 | ic += 1 190 | print(f"Generated charge density cube file for Atom {ia}, constraint {ic}, dir {icart}") 191 | 192 | print("Completed extraction of grad quantities!") 193 | 194 | #-------------------------------------------------------- 195 | -------------------------------------------------------------------------------- /pycdft/dft_driver/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import DFTDriver 2 | from .qbox_driver import QboxDriver 3 | -------------------------------------------------------------------------------- /pycdft/dft_driver/base.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | from pycdft.common.sample import Sample 3 | 4 | 5 | class DFTDriver(object): 6 | """ DFT driver. 7 | 8 | Attributes: 9 | sample (Sample): the whole system for which CDFT calculation is performed. 10 | istep (int): current geometry optimization step. 11 | icscf (int): current constrained SCF step. 12 | output_path (str): output file path. 13 | """ 14 | 15 | __metaclass__ = ABCMeta 16 | 17 | def __init__(self, sample: Sample): 18 | self.sample = sample 19 | self.istep = None 20 | self.icscf = None 21 | self.output_path = None 22 | 23 | @abstractmethod 24 | def reset(self, output_path): 25 | """ Reset the DFT code.""" 26 | pass 27 | 28 | @abstractmethod 29 | def set_Vc(self, Vc): 30 | """ Set the constraint potential Vc in DFT code. 31 | 32 | Given constraint potential Vc as an array of shape [vspin, n1, n2, n3], 33 | this method send the constraint potential to the DFT code. 34 | 35 | Args: 36 | Vc: the constraint potential. 37 | """ 38 | pass 39 | 40 | @abstractmethod 41 | def run_scf(self): 42 | """ Order the DFT code to perform SCF calculation under the constraint. 43 | 44 | Returns when SCF calculation is finished. 45 | """ 46 | pass 47 | 48 | @abstractmethod 49 | def run_opt(self): 50 | """ Order the DFT code to run one structure relaxation step.""" 51 | pass 52 | 53 | @abstractmethod 54 | def get_rho_r(self): 55 | """ Fetch the charge density from the DFT code, write to self.sample.rhor.""" 56 | pass 57 | 58 | @abstractmethod 59 | def get_force(self): 60 | """ Fetch the DFT force from the DFT code.""" 61 | pass 62 | 63 | @abstractmethod 64 | def set_Fc(self): 65 | """ Set the constraint force in the DFT code.""" 66 | pass 67 | 68 | @abstractmethod 69 | def get_structure(self): 70 | """ Fetch the structure from the DFT code, write to self.sample.""" 71 | pass 72 | 73 | @abstractmethod 74 | def get_wfc(self): 75 | """ Fetch the wavefunction from the DFT code.""" 76 | pass 77 | 78 | @abstractmethod 79 | def exit(self): 80 | """ exit out of DFT driver""" 81 | pass 82 | -------------------------------------------------------------------------------- /pycdft/elcoupling/__init__.py: -------------------------------------------------------------------------------- 1 | from .elcoupling import * 2 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="pycdft", 5 | version="1.0", 6 | author="He Ma, Wennie Wang, Siyoung Kim, Man Hin Cheng, Marco Govoni, Giulia Galli", 7 | author_email="mahe@uchicago.edu", 8 | packages=['pycdft'], 9 | install_requires=[ 10 | "ase", 11 | "numpy", 12 | "scipy", 13 | "pyFFTW", 14 | "lxml" 15 | ], 16 | ) 17 | --------------------------------------------------------------------------------