Skip to content

Commit

Permalink
Merge 06daa92 into d6b13f5
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Aug 24, 2020
2 parents d6b13f5 + 06daa92 commit 91322f8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion aiida_cp2k/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
###############################################################################
"""AiiDA-CP2K plugins, parsers, workflows, etc ..."""

__version__ = "1.1.0"
__version__ = "1.1.1"

# EOF
5 changes: 5 additions & 0 deletions aiida_cp2k/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
43 changes: 12 additions & 31 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 91322f8

Please sign in to comment.