diff --git a/aiida_cp2k/__init__.py b/aiida_cp2k/__init__.py index 36a88db5..e673b1f8 100644 --- a/aiida_cp2k/__init__.py +++ b/aiida_cp2k/__init__.py @@ -7,6 +7,6 @@ ############################################################################### """AiiDA-CP2K plugins, parsers, workflows, etc ...""" -__version__ = "1.1.0" +__version__ = "1.1.1" # EOF diff --git a/aiida_cp2k/utils/parser.py b/aiida_cp2k/utils/parser.py index 8ff8843d..294be408 100644 --- a/aiida_cp2k/utils/parser.py +++ b/aiida_cp2k/utils/parser.py @@ -46,6 +46,11 @@ def parse_cp2k_output_advanced(fstring): # pylint: disable=too-many-locals, too energy = float(line.split()[8]) result_dict['energy'] = energy result_dict['energy_units'] = "a.u." + if line.strip().startswith('Total energy: '): + # In case of constrained geo opt, "ENERGY| ..." also contains the constraint energy + # This only contains the electronic SCF energy + energy_scf = float(line.split()[2]) + result_dict['energy_scf'] = energy_scf if 'The number of warnings for this run is' in line: result_dict['nwarnings'] = int(line.split()[-1]) if 'exceeded requested execution time' in line: diff --git a/docs/source/conf.py b/docs/source/conf.py index 2a81d59b..06435fa2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,44 +11,25 @@ serve to show the default. """ +# pylint: disable=invalid-name,ungrouped-imports + import os import sys import time -from aiida.manage import configuration -from aiida.manage.manager import get_manager -# pylint: disable=invalid-name,ungrouped-imports +from aiida.manage.configuration import load_documentation_profile # -- AiiDA-related setup -------------------------------------------------- -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. - -# Enable rtd mode via `export READTHEDOCS=True` -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: # only import and set the theme if we're building docs locally - try: - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - except ImportError: - # No sphinx_rtd_theme installed - pass - # Load the database environment by first loading the profile and then loading the backend through the manager - config = configuration.get_config() - configuration.load_profile(config.default_profile_name) - get_manager().get_backend() -else: - # Back-end settings for readthedocs online documentation. - configuration.IN_RT_DOC_MODE = True - configuration.BACKEND = "django" - - configuration.reset_config() # empty config was created when importing aiida - configuration.load_profile() # load dummy config for RTD - # load DB backend (no schema check since no DB) - get_manager()._load_backend(schema_check=False) # pylint: disable=protected-access +# Load the dummy profile even if we are running locally, this way the documentation will succeed even if the current +# default profile of the AiiDA installation does not use a Django backend. +load_documentation_profile() + +# If we are not on READTHEDOCS load the Sphinx theme manually +if not os.environ.get('READTHEDOCS', None): + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # let's make sure the entry points are up to date try: diff --git a/setup.json b/setup.json index c602c3b2..785699ff 100644 --- a/setup.json +++ b/setup.json @@ -50,5 +50,5 @@ "license": "MIT License", "name": "aiida_cp2k", "url": "https://github.com/aiidateam/aiida-cp2k", - "version": "1.1.0" + "version": "1.1.1" }