Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decentralizing QE #184

Merged
merged 49 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
550a80b
Change kcp from explicit files to a submodule
elinscott Sep 20, 2022
bdca138
Remove test for compiling kcp (this is now performed in the separate …
elinscott Sep 20, 2022
5b73fca
Removing utils as explicit files
elinscott Sep 20, 2022
3044ca3
Adding koopmans-qe-utls as a submodule
elinscott Sep 20, 2022
03a22ef
Remove tests for compiling qe 7
elinscott Sep 20, 2022
ef57cd5
Point to updated qe-utils
elinscott Sep 20, 2022
09f3ac2
Updated Makefile
elinscott Sep 20, 2022
aee7b1b
Updated README to reflect tweaked compilation instructions
elinscott Sep 20, 2022
c9b7a09
Stop making koopmans look in bin/ for executables; now rely on the us…
elinscott Sep 20, 2022
fd87fa1
Updated kcp
elinscott Sep 20, 2022
b3a5c4d
Update kcp version
elinscott Sep 20, 2022
97fe5be
Updated koopmans-qe-utils
elinscott Sep 21, 2022
ff7e3d5
Updated utils submodule
elinscott Sep 22, 2022
7cf4f8a
Moved koopmans testing into separate directory so that koopmans can b…
elinscott Sep 26, 2022
b138277
Updated requirements to reflect test restructure
elinscott Sep 26, 2022
1cc75ce
Adding files to enable python build
elinscott Sep 27, 2022
f9a1007
Replace setup.py with pyproject.toml
elinscott Sep 27, 2022
f94ea19
Move codecov.yml into a hidden directory
elinscott Sep 27, 2022
e75346c
Added mypy ignore statement to new_calculator()
elinscott Sep 27, 2022
0ca229a
Added mypy ignore statement to other instances of new_calculator()
elinscott Sep 27, 2022
6800f57
Move koopmans to src/koopmans to follow the conventional layout
elinscott Sep 27, 2022
67c4a83
Updated koopmans.base_directory
elinscott Sep 27, 2022
e875c15
Various bugfixes
elinscott Sep 27, 2022
112e898
Add automated publish to pypi upon release
elinscott Sep 27, 2022
c21c8dc
Correct pseudo directory
elinscott Sep 27, 2022
fa792f6
Updated docs to parse project info from pyproject.toml
elinscott Sep 27, 2022
3a1c13d
Adding erroneous import in conf.py
elinscott Sep 27, 2022
1a8ac24
Updated rtd config
elinscott Sep 27, 2022
3ff9ea6
Updated rtd config
elinscott Sep 27, 2022
0756914
Updated rtd config
elinscott Sep 27, 2022
ba3a055
Moved docs requirements into toml
elinscott Sep 27, 2022
d2c7e87
Moved docs requirements into toml - bugfix
elinscott Sep 27, 2022
4b13ee6
Updated conf so that it obtained project, version, etc
elinscott Sep 27, 2022
3c31fd4
Add Riccardo and Nicola as authors
elinscott Sep 27, 2022
9f54289
Move bib and pseudos into src/koopmans/
elinscott Sep 27, 2022
d2da033
Tweaks associated with moving bib and pseudos
elinscott Sep 27, 2022
3fcc18d
Added references
elinscott Sep 27, 2022
c4b8dd8
Fixing bugs from previous commit
elinscott Sep 27, 2022
72b4482
mypy compliance
elinscott Sep 27, 2022
9fb55db
Updated benchmarks to refer to new pseudo directory
elinscott Sep 27, 2022
e2a9c3b
Updated MANIFEST.in
elinscott Sep 27, 2022
52fd0d0
Updated gitignore
elinscott Sep 27, 2022
acba1c3
Replace pseudo soft links because pip does not package soft links
elinscott Sep 28, 2022
2bfd0ac
Corrected pseudo path of test_generate_dos
elinscott Sep 28, 2022
fd6cf7e
Expand explanation of what make install does
elinscott Sep 29, 2022
94ef977
Improving wording from previous commit
elinscott Sep 29, 2022
e25d0a7
Further improving wording from previous commit
elinscott Sep 29, 2022
2f43bce
Minor bugfix replace __path__ with __file__
elinscott Sep 29, 2022
011bd4a
fixing absolute path in _chech.py
degennar Sep 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ coverage:
project: off
patch: off
changes: off

ignore:
- "koopmans/testing"
40 changes: 0 additions & 40 deletions .github/workflows/make_qe4.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/make_qe6.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish

on:
release:
types:
- published

env:
GIT_USER_NAME: 'koopmans developers'
GIT_USER_EMAIL: ${{ secrets.PUBLISH_EMAIL }}

jobs:

publish:
name: Publish koopmans
runs-on: ubuntu-latest
if: github.repository == 'epfl-theos/koopmans' && startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel build
pip install -e .

- name: Build source distribution
run: python -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/typechecking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
pip install mypy
- name: Run mypy
run: |
mypy koopmans/ --ignore-missing-imports
mypy src/koopmans/ --ignore-missing-imports
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ postproc/
wannier/
screening/
hamiltonian/
build/
dist/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "quantum_espresso/q-e"]
path = quantum_espresso/q-e
url = https://gitlab.com/QEF/q-e.git
[submodule "quantum_espresso/kcp"]
path = quantum_espresso/kcp
url = ../koopmans-kcp.git
[submodule "quantum_espresso/utils"]
path = quantum_espresso/utils
url = ../koopmans-qe-utils.git
7 changes: 4 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ formats:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: requirements/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
graft src/koopmans/pseudopotentials
include src/koopmans/references.bib
33 changes: 23 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# List of available tasks
.PHONY: help install submodules configure_4 configure_7 configure espresso_4 espresso_7 espresso_utils espresso workflow tests clean clean_espresso clean_tests benchmarks
.PHONY: help install submodules configure_4 configure_7 configure espresso_4 espresso_7 espresso_utils espresso espresso_4_install espresso_7_install espresso_utils_install espresso_install workflow tests clean clean_espresso clean_tests benchmarks

MPIF90 = "mpif90"
PREFIX ?= /usr/local

default: submodules espresso workflow

help:
@echo ' _ '
Expand All @@ -14,8 +17,9 @@ help:
@echo ' For performing Koopmans spectral functional calculations with Quantum ESPRESSO'
@echo ' See README.rst for more information'
@echo ''
@echo ' To install'
@echo ' > make install'
@echo ' To install everything'
@echo ' > make'
@echo ' > sudo make install'
@echo ' (For more details, see README.rst)'
@echo ''
@echo ' To run the test suite'
Expand All @@ -25,8 +29,6 @@ help:
@echo ' > make clean'
@echo ''

install: submodules espresso workflow

submodules:
git submodule init
git submodule update
Expand All @@ -40,16 +42,27 @@ configure_7:
configure: configure_4 configure_7

espresso_4:
@(cd quantum_espresso/kcp; $(MAKE) kcp)
@(cd quantum_espresso/kcp && $(MAKE) kcp)

espresso_4_install:
@(cd quantum_espresso/kcp && $(MAKE) install PREFIX=$(PREFIX))

espresso_7:
@(cd quantum_espresso/q-e; $(MAKE) pw kcw ph)
@(cd quantum_espresso/q-e && $(MAKE) pw kcw ph)

espresso_7_install:
@(cd quantum_espresso/q-e && $(MAKE) install PREFIX=$(PREFIX))

espresso_utils:
@(cd quantum_espresso/utils; $(MAKE) all)
@(cd quantum_espresso/utils && $(MAKE) all)

espresso_utils_install:
@(cd quantum_espresso/utils && $(MAKE) install PREFIX=$(PREFIX))

espresso: configure_4 espresso_4 configure_7 espresso_7 espresso_utils

install: espresso_4_install espresso_7_install espresso_utils_install

workflow:
python3 -m pip install --upgrade pip
python3 -m pip install -e .
Expand All @@ -67,5 +80,5 @@ tests:
clean_tests:
rm -rf tests/tmp

benchmark:
python3 -m pytest --generate_benchmark
benchmarks:
python3 -m pytest tests/ --generate_benchmark
17 changes: 14 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This repository contains...

| ``bin/`` executables (N.B. this directory does not need to be added to ``$PATH``)
| ``docs/`` documentation (see https://koopmans-functionals.org/)
| ``koopmans/`` source code of the workflow manager
| ``src/`` source code
| ``quantum_espresso/`` modified versions of ``Quantum ESPRESSO`` that contain implementations of the Koopmans functionals
| ``pseudos/`` pseudopotentials
| ``requirements/`` python dependencies
Expand All @@ -24,7 +24,7 @@ Installation

Quick installation
^^^^^^^^^^^^^^^^^^
For a quick installation one can simply run ``make install``
For a quick installation one can simply run ``make; sudo make install``

Detailed installation
^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -68,6 +68,17 @@ Then you need to compile the copies of ``Quantum ESPRESSO``. To do this, run

where ``<mpif90>`` should be replaced by the name of your chosen MPI Fortran90 compiler e.g. ``MPIF90=mpiifort``. The code should automatically detect and link the requisite libraries. (If this fails you may need to manually compile the two versions of ``Quantum ESPRESSO`` contained in the ``quantum_espresso/`` directory.)

Adding Quantum ESPRESSO to your path
""""""""""""""""""""""""""""""""""""

To add all of the Quantum ESPRESSO binaries to your path, run

.. code-block:: bash

sudo make install

By default this will copy the Quantum ESPRESSO binaries to ``/usr/local/bin``. This requires sudo privileges. If you do not have sudo privileges, you can either (a) install the codes in a different location by running ``make install PREFIX=/path/to/bin/`` (substitute ``/path/to/bin/`` with any directory of your choosing that is on your path) or (b) append ``bin/`` from the current directory to your path.

Installing the workflow manager
"""""""""""""""""""""""""""""""

Expand Down Expand Up @@ -112,7 +123,7 @@ Currently, Koopmans functionals only works with norm-conserving pseudopotentials

For convenience, ``koopmans`` already ships with both of these pseudopotential libraries and you can simply select the one you want to use using the ``pseudo_library`` keyword.

If you prefer to use your own pseudopotentials, add them to ``koopmans/pseudopotentials`` in the subdirectory ``<my_pseudos>/<functional>``, where ``<my_pseudos>`` is a name of your choosing and ``<functional>`` is the functional used to generate your pseudopotentials. You can then direct ``koopmans`` to use these pseudopotentials by setting the keywords ``pseudo_library`` and ``base_functional`` to ``<my_pseudos>`` and ``<functional>`` respectively.
If you prefer to use your own pseudopotentials, add them to ``src/koopmans/pseudopotentials/<my_pseudos>/<functional>``, where ``<my_pseudos>`` is a name of your choosing and ``<functional>`` is the functional used to generate your pseudopotentials. You can then direct ``koopmans`` to use these pseudopotentials by setting the keywords ``pseudo_library`` and ``base_functional`` to ``<my_pseudos>`` and ``<functional>`` respectively.

Alternatively, you can direct the code to always use your personal pseudopotentials directory by defining the variable

Expand Down
Loading